shithub: riscv

Download patch

ref: 5524d7607501020ca891436dfbcd88aaf5d15bdf
parent: 29b26a2f175b3fe4329c121eca4c7cbb383f5e28
author: cinap_lenrek <[email protected]>
date: Sun Jan 22 18:30:34 EST 2012

move mp3 stuff to /sys/src/cmd/audio, add ogg vorbis, add play

--- /dev/null
+++ b/rc/bin/play
@@ -1,0 +1,80 @@
+#!/bin/rc
+
+out=/dev/audio
+typ=()
+tmp=()
+argv0=$0
+
+fn cleanup {
+	if(! ~ $#tmp 0)
+		rm -f $tmp
+	tmp=()
+}
+
+fn sigint {
+	cleanup
+	exit
+}
+
+fn sigexit {
+	cleanup
+}
+
+fn play1 {
+	if(~ $#* 0){
+		tmp=/tmp/play.$pid.tmp
+		dd -bs 64 -count 1 >$tmp >[2]/dev/null
+		cat $tmp /fd/0 | play1 `{file -m $tmp} xxx
+		cleanup
+	}
+	if not {
+		switch($1){
+		case *plain*
+			sed 's/
//g' | while(j=`{read}){
+				if(~ $"j http:* https:* HTTP:* HTTPS:*){
+					if(~ $#typ 0) typ=mp3
+					echo $"j >[1=2]
+					hget -r 'Icy-MetaData: 0' $j | play1 $typ
+				}
+				if not {
+					if(test -r $"j){
+						echo $"j >[1=2]
+						play1 <$"j
+					}
+				}
+			}
+		case *ogg* *vorbis*
+			audio/oggdec
+		case *mp3* *mpeg*
+			audio/mp3dec
+		case *pls*
+			awk 'BEGIN {FS="="} /^File/{print $2}' | play1 plain
+		case *
+			echo $argv0: unknown format: $1 >[1=2]
+		}
+	}
+}
+
+fn usage {
+	echo usage: $argv0 [ -t type ] [-o file ] [ file ... ] >[1=2]
+	exit usage
+}
+
+while(~ $1 -*){
+	switch($1){
+	case -t
+		typ=$2
+		shift
+	case -o
+		out=$2
+		shift
+	case *
+		usage
+	}
+	shift
+}
+
+>$out {
+	if(~ $#* 0){play1 $typ; exit}
+	for(i){echo $i} | play1 plain 
+} 
--- a/sys/man/1/mp3dec
+++ b/sys/man/1/mp3dec
@@ -2,41 +2,21 @@
 .SH NAME
 mp3dec \- decode audio MPEG files (layers 1, 2 and 3)
 .SH SYNOPSIS
-.B mp3dec
+.B audio/mp3dec
 [
-.B -o
-.I outfile
+.B -d
 ]
-[
-.I file
-\&...
-]
 .SH DESCRIPTION
 .I Mp3dec
-decodes one or more MPEG audio files, writing
-16-bit stereo linear PCM sample data to
-.I outfile
-(default
-.BR /dev/audio ).
-If no files are named,
-.I mp3dec
-reads standard input.
+decodes MPEG audio from stdanrd input,
+writing 16-bit stereo linear PCM sample data to
+standard output.
 .PP
-In the absence of the
-.B -o
-option,
-.I mp3dec
-also opens
-.BR /dev/volume
-and sets the sample rate for playback to
-match the audio stream.
-When writing to
-.IR outfile ,
-.I mp3dec
-prints a warning to standard error
-if the stream rate is not 44100 Hz.
+The
+.B -d
+option enabled debug prints to standard error.
 .SH SOURCE
-.B /sys/src/games/mp3dec
+.B /sys/src/cmd/audio/mp3dec
 .SH "SEE ALSO"
 .IR mp3enc (1),
 .IR juke (7),
--- a/sys/man/1/mp3enc
+++ b/sys/man/1/mp3enc
@@ -4,7 +4,7 @@
 .SH SYNOPSIS
 .in +0.5i
 .ti -0.5i
-.B games/mp3enc
+.B audio/mp3enc
 [
 .B -hprv
 ] [
@@ -190,7 +190,7 @@
 dd -conv swab | games/mp3enc -a -r -m m --resample 16 -b 24
 .EE
 .SH SOURCE
-.B /sys/src/games/mp3enc
+.B /sys/src/cmd/audio/mp3enc
 .SH SEE ALSO
 .IR dd (1),
 .IR mp3dec (1),
--- /dev/null
+++ b/sys/src/cmd/audio/config
@@ -1,0 +1,1 @@
+BIN=/$objtype/bin/audio
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/AUTHORS
@@ -1,0 +1,11 @@
+
+Original:
+
+	Monty <[email protected]>
+	and the rest of the Xiph.org Foundation.
+
+
+Plan9 port:
+
+	Aki Nyrhinen <[email protected]>
+
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/COPYING
@@ -1,0 +1,28 @@
+Copyright (c) 2002, Xiph.Org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.Org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/bitwise.c
@@ -1,0 +1,452 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: packing variable sized words into an octet stream
+  last mod: $Id: bitwise.c,v 1.13 2002/07/11 09:09:08 xiphmont Exp $
+
+ ********************************************************************/
+
+/* We're 'LSb' endian; if we write a word but read individual bits,
+   then we'll read the lsb first */
+
+#include <string.h>
+#include <stdlib.h>
+#include <ogg/ogg.h>
+
+#define BUFFER_INCREMENT 256
+
+static unsigned long mask[]=
+{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f,
+ 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff,
+ 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff,
+ 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff,
+ 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff,
+ 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff,
+ 0x3fffffff,0x7fffffff,0xffffffff };
+
+void oggpack_writeinit(oggpack_buffer *b){
+  memset(b,0,sizeof(*b));
+  b->ptr=b->buffer=_ogg_malloc(BUFFER_INCREMENT);
+  b->buffer[0]='\0';
+  b->storage=BUFFER_INCREMENT;
+}
+
+void oggpack_writetrunc(oggpack_buffer *b,long bits){
+  long bytes=bits>>3;
+  bits-=bytes*8;
+  b->ptr=b->buffer+bytes;
+  b->endbit=bits;
+  b->endbyte=bytes;
+  *b->ptr|=mask[bits];
+}
+
+void oggpack_writealign(oggpack_buffer *b){
+  int bits=8-b->endbit;
+  if(bits<8)
+    oggpack_write(b,0,bits);
+}
+
+void oggpack_writecopy(oggpack_buffer *b,void *source,long bits){
+  unsigned char *ptr=(unsigned char *)source;
+
+  long bytes=bits/8;
+  bits-=bytes*8;
+
+  if(b->endbit){
+    int i;
+    /* unaligned copy.  Do it the hard way. */
+    for(i=0;i<bytes;i++)
+      oggpack_write(b,(long)(ptr[i]),8);    
+  }else{
+    /* aligned block copy */
+    if(b->endbyte+bytes+1>=b->storage){
+      b->storage=b->endbyte+bytes+BUFFER_INCREMENT;
+      b->buffer=_ogg_realloc(b->buffer,b->storage);
+      b->ptr=b->buffer+b->endbyte;
+    }
+
+    memmove(b->ptr,source,bytes);
+    b->ptr+=bytes;
+    b->buffer+=bytes;
+    *b->ptr=0;
+
+  }
+  if(bits)
+    oggpack_write(b,(long)(ptr[bytes]),bits);    
+}
+
+void oggpack_reset(oggpack_buffer *b){
+  b->ptr=b->buffer;
+  b->buffer[0]=0;
+  b->endbit=b->endbyte=0;
+}
+
+void oggpack_writeclear(oggpack_buffer *b){
+  _ogg_free(b->buffer);
+  memset(b,0,sizeof(*b));
+}
+
+void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes){
+  memset(b,0,sizeof(*b));
+  b->buffer=b->ptr=buf;
+  b->storage=bytes;
+}
+
+/* Takes only up to 32 bits. */
+void oggpack_write(oggpack_buffer *b,unsigned long value,int bits){
+  if(b->endbyte+4>=b->storage){
+    b->buffer=_ogg_realloc(b->buffer,b->storage+BUFFER_INCREMENT);
+    b->storage+=BUFFER_INCREMENT;
+    b->ptr=b->buffer+b->endbyte;
+  }
+
+  value&=mask[bits]; 
+  bits+=b->endbit;
+
+  b->ptr[0]|=value<<b->endbit;  
+  
+  if(bits>=8){
+    b->ptr[1]=value>>(8-b->endbit);  
+    if(bits>=16){
+      b->ptr[2]=value>>(16-b->endbit);  
+      if(bits>=24){
+	b->ptr[3]=value>>(24-b->endbit);  
+	if(bits>=32){
+	  if(b->endbit)
+	    b->ptr[4]=value>>(32-b->endbit);
+	  else
+	    b->ptr[4]=0;
+	}
+      }
+    }
+  }
+
+  b->endbyte+=bits/8;
+  b->ptr+=bits/8;
+  b->endbit=bits&7;
+}
+
+/* Read in bits without advancing the bitptr; bits <= 32 */
+long oggpack_look(oggpack_buffer *b,int bits){
+  unsigned long ret;
+  unsigned long m=mask[bits];
+
+  bits+=b->endbit;
+
+  if(b->endbyte+4>=b->storage){
+    /* not the main path */
+    if(b->endbyte*8+bits>b->storage*8)return(-1);
+  }
+  
+  ret=b->ptr[0]>>b->endbit;
+  if(bits>8){
+    ret|=b->ptr[1]<<(8-b->endbit);  
+    if(bits>16){
+      ret|=b->ptr[2]<<(16-b->endbit);  
+      if(bits>24){
+	ret|=b->ptr[3]<<(24-b->endbit);  
+	if(bits>32 && b->endbit)
+	  ret|=b->ptr[4]<<(32-b->endbit);
+      }
+    }
+  }
+  return(m&ret);
+}
+
+long oggpack_look1(oggpack_buffer *b){
+  if(b->endbyte>=b->storage)return(-1);
+  return((b->ptr[0]>>b->endbit)&1);
+}
+
+void oggpack_adv(oggpack_buffer *b,int bits){
+  bits+=b->endbit;
+  b->ptr+=bits/8;
+  b->endbyte+=bits/8;
+  b->endbit=bits&7;
+}
+
+void oggpack_adv1(oggpack_buffer *b){
+  if(++(b->endbit)>7){
+    b->endbit=0;
+    b->ptr++;
+    b->endbyte++;
+  }
+}
+
+/* bits <= 32 */
+long oggpack_read(oggpack_buffer *b,int bits){
+  unsigned long ret;
+  unsigned long m=mask[bits];
+
+  bits+=b->endbit;
+
+  if(b->endbyte+4>=b->storage){
+    /* not the main path */
+    ret=-1UL;
+    if(b->endbyte*8+bits>b->storage*8)goto overflow;
+  }
+  
+  ret=b->ptr[0]>>b->endbit;
+  if(bits>8){
+    ret|=b->ptr[1]<<(8-b->endbit);  
+    if(bits>16){
+      ret|=b->ptr[2]<<(16-b->endbit);  
+      if(bits>24){
+	ret|=b->ptr[3]<<(24-b->endbit);  
+	if(bits>32 && b->endbit){
+	  ret|=b->ptr[4]<<(32-b->endbit);
+	}
+      }
+    }
+  }
+  ret&=m;
+  
+ overflow:
+
+  b->ptr+=bits/8;
+  b->endbyte+=bits/8;
+  b->endbit=bits&7;
+  return(ret);
+}
+
+long oggpack_read1(oggpack_buffer *b){
+  unsigned long ret;
+  
+  if(b->endbyte>=b->storage){
+    /* not the main path */
+    ret=-1UL;
+    goto overflow;
+  }
+
+  ret=(b->ptr[0]>>b->endbit)&1;
+  
+ overflow:
+
+  b->endbit++;
+  if(b->endbit>7){
+    b->endbit=0;
+    b->ptr++;
+    b->endbyte++;
+  }
+  return(ret);
+}
+
+long oggpack_bytes(oggpack_buffer *b){
+  return(b->endbyte+(b->endbit+7)/8);
+}
+
+long oggpack_bits(oggpack_buffer *b){
+  return(b->endbyte*8+b->endbit);
+}
+
+unsigned char *oggpack_get_buffer(oggpack_buffer *b){
+  return(b->buffer);
+}
+
+/* Self test of the bitwise routines; everything else is based on
+   them, so they damned well better be solid. */
+
+#ifdef _V_SELFTEST
+#include <stdio.h>
+
+static int ilog(unsigned int v){
+  int ret=0;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+      
+oggpack_buffer o;
+oggpack_buffer r;
+
+void report(char *in){
+  fprintf(stderr,"%s",in);
+  exit(1);
+}
+
+void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){
+  long bytes,i;
+  unsigned char *buffer;
+
+  oggpack_reset(&o);
+  for(i=0;i<vals;i++)
+    oggpack_write(&o,b[i],bits?bits:ilog(b[i]));
+  buffer=oggpack_get_buffer(&o);
+  bytes=oggpack_bytes(&o);
+  if(bytes!=compsize)report("wrong number of bytes!\n");
+  for(i=0;i<bytes;i++)if(buffer[i]!=comp[i]){
+    for(i=0;i<bytes;i++)fprintf(stderr,"%x %x\n",(int)buffer[i],(int)comp[i]);
+    report("wrote incorrect value!\n");
+  }
+  oggpack_readinit(&r,buffer,bytes);
+  for(i=0;i<vals;i++){
+    int tbit=bits?bits:ilog(b[i]);
+    if(oggpack_look(&r,tbit)==-1)
+      report("out of data!\n");
+    if(oggpack_look(&r,tbit)!=(b[i]&mask[tbit]))
+      report("looked at incorrect value!\n");
+    if(tbit==1)
+      if(oggpack_look1(&r)!=(b[i]&mask[tbit]))
+	report("looked at single bit incorrect value!\n");
+    if(tbit==1){
+      if(oggpack_read1(&r)!=(b[i]&mask[tbit]))
+	report("read incorrect single bit value!\n");
+    }else{
+    if(oggpack_read(&r,tbit)!=(b[i]&mask[tbit]))
+      report("read incorrect value!\n");
+    }
+  }
+  if(oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+}
+
+int main(void){
+  unsigned char *buffer;
+  long bytes,i;
+  static unsigned long testbuffer1[]=
+    {18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7,
+       567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4};
+  int test1size=43;
+
+  static unsigned long testbuffer2[]=
+    {216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212,
+       1233432,534,5,346435231,14436467,7869299,76326614,167548585,
+       85525151,0,12321,1,349528352};
+  int test2size=21;
+
+  static unsigned long large[]=
+    {2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212,
+       1233432,534,5,2146435231,14436467,7869299,76326614,167548585,
+       85525151,0,12321,1,2146528352};
+
+  static unsigned long testbuffer3[]=
+    {1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1,
+       0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1};
+  int test3size=56;
+
+  int onesize=33;
+  static int one[]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40,
+                    34,242,223,136,35,222,211,86,171,50,225,135,214,75,172,
+                    223,4};
+
+  int twosize=6;
+  static int two[]={61,255,255,251,231,29};
+
+  int threesize=54;
+  static int three[]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254,
+                      142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83,
+                      58,135,196,61,55,129,183,54,101,100,170,37,127,126,10,
+                      100,52,4,14,18,86,77,1};
+
+  int foursize=38;
+  static int four[]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72,
+                     132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169,
+                     28,2,133,0,1};
+
+  int fivesize=45;
+  static int five[]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62,
+                     241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169,
+                     84,75,159,2,1,0,132,192,8,0,0,18,22};
+
+  int sixsize=7;
+  static int six[]={17,177,170,242,169,19,148};
+
+  /* Test read/write together */
+  /* Later we test against pregenerated bitstreams */
+  oggpack_writeinit(&o);
+
+  fprintf(stderr,"\nSmall preclipped packing: ");
+  cliptest(testbuffer1,test1size,0,one,onesize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nNull bit call: ");
+  cliptest(testbuffer3,test3size,0,two,twosize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nLarge preclipped packing: ");
+  cliptest(testbuffer2,test2size,0,three,threesize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\n32 bit preclipped packing: ");
+  oggpack_reset(&o);
+  for(i=0;i<test2size;i++)
+    oggpack_write(&o,large[i],32);
+  buffer=oggpack_get_buffer(&o);
+  bytes=oggpack_bytes(&o);
+  oggpack_readinit(&r,buffer,bytes);
+  for(i=0;i<test2size;i++){
+    if(oggpack_look(&r,32)==-1)report("out of data. failed!");
+    if(oggpack_look(&r,32)!=large[i]){
+      fprintf(stderr,"%ld != %ld (%lx!=%lx):",oggpack_look(&r,32),large[i],
+	      oggpack_look(&r,32),large[i]);
+      report("read incorrect value!\n");
+    }
+    oggpack_adv(&r,32);
+  }
+  if(oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nSmall unclipped packing: ");
+  cliptest(testbuffer1,test1size,7,four,foursize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nLarge unclipped packing: ");
+  cliptest(testbuffer2,test2size,17,five,fivesize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nSingle bit unclipped packing: ");
+  cliptest(testbuffer3,test3size,1,six,sixsize);
+  fprintf(stderr,"ok.");
+
+  fprintf(stderr,"\nTesting read past end: ");
+  oggpack_readinit(&r,"\0\0\0\0\0\0\0\0",8);
+  for(i=0;i<64;i++){
+    if(oggpack_read(&r,1)!=0){
+      fprintf(stderr,"failed; got -1 prematurely.\n");
+      exit(1);
+    }
+  }
+  if(oggpack_look(&r,1)!=-1 ||
+     oggpack_read(&r,1)!=-1){
+      fprintf(stderr,"failed; read past end without -1.\n");
+      exit(1);
+  }
+  oggpack_readinit(&r,"\0\0\0\0\0\0\0\0",8);
+  if(oggpack_read(&r,30)!=0 || oggpack_read(&r,16)!=0){
+      fprintf(stderr,"failed 2; got -1 prematurely.\n");
+      exit(1);
+  }
+
+  if(oggpack_look(&r,18)!=0 ||
+     oggpack_look(&r,18)!=0){
+    fprintf(stderr,"failed 3; got -1 prematurely.\n");
+      exit(1);
+  }
+  if(oggpack_look(&r,19)!=-1 ||
+     oggpack_look(&r,19)!=-1){
+    fprintf(stderr,"failed; read past end without -1.\n");
+      exit(1);
+  }
+  if(oggpack_look(&r,32)!=-1 ||
+     oggpack_look(&r,32)!=-1){
+    fprintf(stderr,"failed; read past end without -1.\n");
+      exit(1);
+  }
+  fprintf(stderr,"ok.\n\n");
+
+
+  return(0);
+}  
+#endif  /* _V_SELFTEST */
+
+#undef BUFFER_INCREMENT
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/framing.c
@@ -1,0 +1,1746 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: code raw [Vorbis] packets into framed OggSquish stream and
+           decode Ogg streams back into raw packets
+ last mod: $Id: framing.c,v 1.22 2002/07/11 09:09:08 xiphmont Exp $
+
+ note: The CRC code is directly derived from public domain code by
+ Ross Williams ([email protected]).  See docs/framing.html
+ for details.
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <ogg/ogg.h>
+
+/* A complete description of Ogg framing exists in docs/framing.html */
+
+int ogg_page_version(ogg_page *og){
+  return((int)(og->header[4]));
+}
+
+int ogg_page_continued(ogg_page *og){
+  return((int)(og->header[5]&0x01));
+}
+
+int ogg_page_bos(ogg_page *og){
+  return((int)(og->header[5]&0x02));
+}
+
+int ogg_page_eos(ogg_page *og){
+  return((int)(og->header[5]&0x04));
+}
+
+ogg_int64_t ogg_page_granulepos(ogg_page *og){
+  unsigned char *page=og->header;
+  ogg_int64_t granulepos=page[13]&(0xff);
+  granulepos= (granulepos<<8)|(page[12]&0xff);
+  granulepos= (granulepos<<8)|(page[11]&0xff);
+  granulepos= (granulepos<<8)|(page[10]&0xff);
+  granulepos= (granulepos<<8)|(page[9]&0xff);
+  granulepos= (granulepos<<8)|(page[8]&0xff);
+  granulepos= (granulepos<<8)|(page[7]&0xff);
+  granulepos= (granulepos<<8)|(page[6]&0xff);
+  return(granulepos);
+}
+
+int ogg_page_serialno(ogg_page *og){
+  return(og->header[14] |
+	 (og->header[15]<<8) |
+	 (og->header[16]<<16) |
+	 (og->header[17]<<24));
+}
+ 
+long ogg_page_pageno(ogg_page *og){
+  return(og->header[18] |
+	 (og->header[19]<<8) |
+	 (og->header[20]<<16) |
+	 (og->header[21]<<24));
+}
+
+
+
+/* returns the number of packets that are completed on this page (if
+   the leading packet is begun on a previous page, but ends on this
+   page, it's counted */
+
+/* NOTE:
+If a page consists of a packet begun on a previous page, and a new
+packet begun (but not completed) on this page, the return will be:
+  ogg_page_packets(page)   ==1, 
+  ogg_page_continued(page) !=0
+
+If a page happens to be a single packet that was begun on a
+previous page, and spans to the next page (in the case of a three or
+more page packet), the return will be: 
+  ogg_page_packets(page)   ==0, 
+  ogg_page_continued(page) !=0
+*/
+
+int ogg_page_packets(ogg_page *og){
+  int i,n=og->header[26],count=0;
+  for(i=0;i<n;i++)
+    if(og->header[27+i]<255)count++;
+  return(count);
+}
+
+
+#if 0
+/* helper to initialize lookup for direct-table CRC (illustrative; we
+   use the static init below) */
+
+static ogg_uint32_t _ogg_crc_entry(unsigned long index){
+  int           i;
+  unsigned long r;
+
+  r = index << 24;
+  for (i=0; i<8; i++)
+    if (r & 0x80000000UL)
+      r = (r << 1) ^ 0x04c11db7; /* The same as the ethernet generator
+				    polynomial, although we use an
+				    unreflected alg and an init/final
+				    of 0, not 0xffffffff */
+    else
+       r<<=1;
+ return (r & 0xffffffffUL);
+}
+#endif
+
+static ogg_uint32_t crc_lookup[256]={
+  0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,
+  0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005,
+  0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,
+  0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd,
+  0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,
+  0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75,
+  0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,
+  0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd,
+  0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,
+  0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5,
+  0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,
+  0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d,
+  0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,
+  0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95,
+  0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,
+  0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d,
+  0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,
+  0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072,
+  0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,
+  0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca,
+  0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,
+  0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02,
+  0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,
+  0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba,
+  0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,
+  0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692,
+  0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,
+  0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a,
+  0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,
+  0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2,
+  0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,
+  0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a,
+  0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,
+  0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb,
+  0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,
+  0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53,
+  0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,
+  0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b,
+  0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,
+  0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623,
+  0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,
+  0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b,
+  0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,
+  0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3,
+  0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,
+  0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b,
+  0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,
+  0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3,
+  0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,
+  0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c,
+  0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,
+  0x68860bfd,0x6c47164a,0x61043093,0x65c52d24,
+  0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,
+  0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec,
+  0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,
+  0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654,
+  0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,
+  0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c,
+  0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,
+  0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4,
+  0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,
+  0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c,
+  0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,
+  0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4};
+
+/* init the encode/decode logical stream state */
+
+int ogg_stream_init(ogg_stream_state *os,int serialno){
+  if(os){
+    memset(os,0,sizeof(*os));
+    os->body_storage=16*1024;
+    os->body_data=_ogg_malloc(os->body_storage*sizeof(*os->body_data));
+
+    os->lacing_storage=1024;
+    os->lacing_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->lacing_vals));
+    os->granule_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->granule_vals));
+
+    os->serialno=serialno;
+
+    return(0);
+  }
+  return(-1);
+} 
+
+/* _clear does not free os, only the non-flat storage within */
+int ogg_stream_clear(ogg_stream_state *os){
+  if(os){
+    if(os->body_data)_ogg_free(os->body_data);
+    if(os->lacing_vals)_ogg_free(os->lacing_vals);
+    if(os->granule_vals)_ogg_free(os->granule_vals);
+
+    memset(os,0,sizeof(*os));    
+  }
+  return(0);
+} 
+
+int ogg_stream_destroy(ogg_stream_state *os){
+  if(os){
+    ogg_stream_clear(os);
+    _ogg_free(os);
+  }
+  return(0);
+} 
+
+/* Helpers for ogg_stream_encode; this keeps the structure and
+   what's happening fairly clear */
+
+static void _os_body_expand(ogg_stream_state *os,int needed){
+  if(os->body_storage<=os->body_fill+needed){
+    os->body_storage+=(needed+1024);
+    os->body_data=_ogg_realloc(os->body_data,os->body_storage*sizeof(*os->body_data));
+  }
+}
+
+static void _os_lacing_expand(ogg_stream_state *os,int needed){
+  if(os->lacing_storage<=os->lacing_fill+needed){
+    os->lacing_storage+=(needed+32);
+    os->lacing_vals=_ogg_realloc(os->lacing_vals,os->lacing_storage*sizeof(*os->lacing_vals));
+    os->granule_vals=_ogg_realloc(os->granule_vals,os->lacing_storage*sizeof(*os->granule_vals));
+  }
+}
+
+/* checksum the page */
+/* Direct table CRC; note that this will be faster in the future if we
+   perform the checksum silmultaneously with other copies */
+
+void ogg_page_checksum_set(ogg_page *og){
+  if(og){
+    ogg_uint32_t crc_reg=0;
+    int i;
+
+    /* safety; needed for API behavior, but not framing code */
+    og->header[22]=0;
+    og->header[23]=0;
+    og->header[24]=0;
+    og->header[25]=0;
+    
+    for(i=0;i<og->header_len;i++)
+      crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->header[i]];
+    for(i=0;i<og->body_len;i++)
+      crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->body[i]];
+    
+    og->header[22]=crc_reg&0xff;
+    og->header[23]=(crc_reg>>8)&0xff;
+    og->header[24]=(crc_reg>>16)&0xff;
+    og->header[25]=(crc_reg>>24)&0xff;
+  }
+}
+
+/* submit data to the internal buffer of the framing engine */
+int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){
+  int lacing_vals=op->bytes/255+1,i;
+
+  if(os->body_returned){
+    /* advance packet data according to the body_returned pointer. We
+       had to keep it around to return a pointer into the buffer last
+       call */
+    
+    os->body_fill-=os->body_returned;
+    if(os->body_fill)
+      memmove(os->body_data,os->body_data+os->body_returned,
+	      os->body_fill);
+    os->body_returned=0;
+  }
+ 
+  /* make sure we have the buffer storage */
+  _os_body_expand(os,op->bytes);
+  _os_lacing_expand(os,lacing_vals);
+
+  /* Copy in the submitted packet.  Yes, the copy is a waste; this is
+     the liability of overly clean abstraction for the time being.  It
+     will actually be fairly easy to eliminate the extra copy in the
+     future */
+
+  memcpy(os->body_data+os->body_fill,op->packet,op->bytes);
+  os->body_fill+=op->bytes;
+
+  /* Store lacing vals for this packet */
+  for(i=0;i<lacing_vals-1;i++){
+    os->lacing_vals[os->lacing_fill+i]=255;
+    os->granule_vals[os->lacing_fill+i]=os->granulepos;
+  }
+  os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255;
+  os->granulepos=os->granule_vals[os->lacing_fill+i]=op->granulepos;
+
+  /* flag the first segment as the beginning of the packet */
+  os->lacing_vals[os->lacing_fill]|= 0x100;
+
+  os->lacing_fill+=lacing_vals;
+
+  /* for the sake of completeness */
+  os->packetno++;
+
+  if(op->e_o_s)os->e_o_s=1;
+
+  return(0);
+}
+
+/* This will flush remaining packets into a page (returning nonzero),
+   even if there is not enough data to trigger a flush normally
+   (undersized page). If there are no packets or partial packets to
+   flush, ogg_stream_flush returns 0.  Note that ogg_stream_flush will
+   try to flush a normal sized page like ogg_stream_pageout; a call to
+   ogg_stream_flush does not gurantee that all packets have flushed.
+   Only a return value of 0 from ogg_stream_flush indicates all packet
+   data is flushed into pages.
+
+   ogg_stream_page will flush the last page in a stream even if it's
+   undersized; you almost certainly want to use ogg_stream_pageout
+   (and *not* ogg_stream_flush) unless you need to flush an undersized
+   page in the middle of a stream for some reason. */
+
+int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){
+  int i;
+  int vals=0;
+  int maxvals=(os->lacing_fill>255?255:os->lacing_fill);
+  int bytes=0;
+  long acc=0;
+  ogg_int64_t granule_pos=os->granule_vals[0];
+
+  if(maxvals==0)return(0);
+  
+  /* construct a page */
+  /* decide how many segments to include */
+  
+  /* If this is the initial header case, the first page must only include
+     the initial header packet */
+  if(os->b_o_s==0){  /* 'initial header page' case */
+    granule_pos=0;
+    for(vals=0;vals<maxvals;vals++){
+      if((os->lacing_vals[vals]&0x0ff)<255){
+	vals++;
+	break;
+      }
+    }
+  }else{
+    for(vals=0;vals<maxvals;vals++){
+      if(acc>4096)break;
+      acc+=os->lacing_vals[vals]&0x0ff;
+      granule_pos=os->granule_vals[vals];
+    }
+  }
+  
+  /* construct the header in temp storage */
+  memcpy(os->header,"OggS",4);
+  
+  /* stream structure version */
+  os->header[4]=0x00;
+  
+  /* continued packet flag? */
+  os->header[5]=0x00;
+  if((os->lacing_vals[0]&0x100)==0)os->header[5]|=0x01;
+  /* first page flag? */
+  if(os->b_o_s==0)os->header[5]|=0x02;
+  /* last page flag? */
+  if(os->e_o_s && os->lacing_fill==vals)os->header[5]|=0x04;
+  os->b_o_s=1;
+
+  /* 64 bits of PCM position */
+  for(i=6;i<14;i++){
+    os->header[i]=(granule_pos&0xff);
+    granule_pos>>=8;
+  }
+
+  /* 32 bits of stream serial number */
+  {
+    long serialno=os->serialno;
+    for(i=14;i<18;i++){
+      os->header[i]=(serialno&0xff);
+      serialno>>=8;
+    }
+  }
+
+  /* 32 bits of page counter (we have both counter and page header
+     because this val can roll over) */
+  if(os->pageno==-1)os->pageno=0; /* because someone called
+				     stream_reset; this would be a
+				     strange thing to do in an
+				     encode stream, but it has
+				     plausible uses */
+  {
+    long pageno=os->pageno++;
+    for(i=18;i<22;i++){
+      os->header[i]=(pageno&0xff);
+      pageno>>=8;
+    }
+  }
+  
+  /* zero for computation; filled in later */
+  os->header[22]=0;
+  os->header[23]=0;
+  os->header[24]=0;
+  os->header[25]=0;
+  
+  /* segment table */
+  os->header[26]=vals&0xff;
+  for(i=0;i<vals;i++)
+    bytes+=os->header[i+27]=(os->lacing_vals[i]&0xff);
+  
+  /* set pointers in the ogg_page struct */
+  og->header=os->header;
+  og->header_len=os->header_fill=vals+27;
+  og->body=os->body_data+os->body_returned;
+  og->body_len=bytes;
+  
+  /* advance the lacing data and set the body_returned pointer */
+  
+  os->lacing_fill-=vals;
+  memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(*os->lacing_vals));
+  memmove(os->granule_vals,os->granule_vals+vals,os->lacing_fill*sizeof(*os->granule_vals));
+  os->body_returned+=bytes;
+  
+  /* calculate the checksum */
+  
+  ogg_page_checksum_set(og);
+
+  /* done */
+  return(1);
+}
+
+
+/* This constructs pages from buffered packet segments.  The pointers
+returned are to static buffers; do not free. The returned buffers are
+good only until the next call (using the same ogg_stream_state) */
+
+int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og){
+
+  if((os->e_o_s&&os->lacing_fill) ||          /* 'were done, now flush' case */
+     os->body_fill-os->body_returned > 4096 ||/* 'page nominal size' case */
+     os->lacing_fill>=255 ||                  /* 'segment table full' case */
+     (os->lacing_fill&&!os->b_o_s)){          /* 'initial header page' case */
+        
+    return(ogg_stream_flush(os,og));
+  }
+  
+  /* not enough data to construct a page and not end of stream */
+  return(0);
+}
+
+int ogg_stream_eos(ogg_stream_state *os){
+  return os->e_o_s;
+}
+
+/* DECODING PRIMITIVES: packet streaming layer **********************/
+
+/* This has two layers to place more of the multi-serialno and paging
+   control in the application's hands.  First, we expose a data buffer
+   using ogg_sync_buffer().  The app either copies into the
+   buffer, or passes it directly to read(), etc.  We then call
+   ogg_sync_wrote() to tell how many bytes we just added.
+
+   Pages are returned (pointers into the buffer in ogg_sync_state)
+   by ogg_sync_pageout().  The page is then submitted to
+   ogg_stream_pagein() along with the appropriate
+   ogg_stream_state* (ie, matching serialno).  We then get raw
+   packets out calling ogg_stream_packetout() with a
+   ogg_stream_state.  See the 'frame-prog.txt' docs for details and
+   example code. */
+
+/* initialize the struct to a known state */
+int ogg_sync_init(ogg_sync_state *oy){
+  if(oy){
+    memset(oy,0,sizeof(*oy));
+  }
+  return(0);
+}
+
+/* clear non-flat storage within */
+int ogg_sync_clear(ogg_sync_state *oy){
+  if(oy){
+    if(oy->data)_ogg_free(oy->data);
+    ogg_sync_init(oy);
+  }
+  return(0);
+}
+
+int ogg_sync_destroy(ogg_sync_state *oy){
+  if(oy){
+    ogg_sync_clear(oy);
+    _ogg_free(oy);
+  }
+  return(0);
+}
+
+char *ogg_sync_buffer(ogg_sync_state *oy, long size){
+
+  /* first, clear out any space that has been previously returned */
+  if(oy->returned){
+    oy->fill-=oy->returned;
+    if(oy->fill>0)
+      memmove(oy->data,oy->data+oy->returned,oy->fill);
+    oy->returned=0;
+  }
+
+  if(size>oy->storage-oy->fill){
+    /* We need to extend the internal buffer */
+    long newsize=size+oy->fill+4096; /* an extra page to be nice */
+
+    if(oy->data)
+      oy->data=_ogg_realloc(oy->data,newsize);
+    else
+      oy->data=_ogg_malloc(newsize);
+    oy->storage=newsize;
+  }
+
+  /* expose a segment at least as large as requested at the fill mark */
+  return((char *)oy->data+oy->fill);
+}
+
+int ogg_sync_wrote(ogg_sync_state *oy, long bytes){
+  if(oy->fill+bytes>oy->storage)return(-1);
+  oy->fill+=bytes;
+  return(0);
+}
+
+/* sync the stream.  This is meant to be useful for finding page
+   boundaries.
+
+   return values for this:
+  -n) skipped n bytes
+   0) page not ready; more data (no bytes skipped)
+   n) page synced at current location; page length n bytes
+   
+*/
+
+long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){
+  unsigned char *page=oy->data+oy->returned;
+  unsigned char *next;
+  long bytes=oy->fill-oy->returned;
+  
+  if(oy->headerbytes==0){
+    int headerbytes,i;
+    if(bytes<27)return(0); /* not enough for a header */
+    
+    /* verify capture pattern */
+    if(memcmp(page,"OggS",4))goto sync_fail;
+    
+    headerbytes=page[26]+27;
+    if(bytes<headerbytes)return(0); /* not enough for header + seg table */
+    
+    /* count up body length in the segment table */
+    
+    for(i=0;i<page[26];i++)
+      oy->bodybytes+=page[27+i];
+    oy->headerbytes=headerbytes;
+  }
+  
+  if(oy->bodybytes+oy->headerbytes>bytes)return(0);
+  
+  /* The whole test page is buffered.  Verify the checksum */
+  {
+    /* Grab the checksum bytes, set the header field to zero */
+    char chksum[4];
+    ogg_page log;
+    
+    memcpy(chksum,page+22,4);
+    memset(page+22,0,4);
+    
+    /* set up a temp page struct and recompute the checksum */
+    log.header=page;
+    log.header_len=oy->headerbytes;
+    log.body=page+oy->headerbytes;
+    log.body_len=oy->bodybytes;
+    ogg_page_checksum_set(&log);
+    
+    /* Compare */
+    if(memcmp(chksum,page+22,4)){
+      /* D'oh.  Mismatch! Corrupt page (or miscapture and not a page
+	 at all) */
+      /* replace the computed checksum with the one actually read in */
+      memcpy(page+22,chksum,4);
+      
+      /* Bad checksum. Lose sync */
+      goto sync_fail;
+    }
+  }
+  
+  /* yes, have a whole page all ready to go */
+  {
+    unsigned char *page=oy->data+oy->returned;
+    long bytes;
+
+    if(og){
+      og->header=page;
+      og->header_len=oy->headerbytes;
+      og->body=page+oy->headerbytes;
+      og->body_len=oy->bodybytes;
+    }
+
+    oy->unsynced=0;
+    oy->returned+=(bytes=oy->headerbytes+oy->bodybytes);
+    oy->headerbytes=0;
+    oy->bodybytes=0;
+    return(bytes);
+  }
+  
+ sync_fail:
+  
+  oy->headerbytes=0;
+  oy->bodybytes=0;
+  
+  /* search for possible capture */
+  next=memchr(page+1,'O',bytes-1);
+  if(!next)
+    next=oy->data+oy->fill;
+
+  oy->returned=next-oy->data;
+  return(-(next-page));
+}
+
+/* sync the stream and get a page.  Keep trying until we find a page.
+   Supress 'sync errors' after reporting the first.
+
+   return values:
+   -1) recapture (hole in data)
+    0) need more data
+    1) page returned
+
+   Returns pointers into buffered data; invalidated by next call to
+   _stream, _clear, _init, or _buffer */
+
+int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){
+
+  /* all we need to do is verify a page at the head of the stream
+     buffer.  If it doesn't verify, we look for the next potential
+     frame */
+
+  while(1){
+    long ret=ogg_sync_pageseek(oy,og);
+    if(ret>0){
+      /* have a page */
+      return(1);
+    }
+    if(ret==0){
+      /* need more data */
+      return(0);
+    }
+    
+    /* head did not start a synced page... skipped some bytes */
+    if(!oy->unsynced){
+      oy->unsynced=1;
+      return(-1);
+    }
+
+    /* loop. keep looking */
+
+  }
+}
+
+/* add the incoming page to the stream state; we decompose the page
+   into packet segments here as well. */
+
+int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
+  unsigned char *header=og->header;
+  unsigned char *body=og->body;
+  long           bodysize=og->body_len;
+  int            segptr=0;
+
+  int version=ogg_page_version(og);
+  int continued=ogg_page_continued(og);
+  int bos=ogg_page_bos(og);
+  int eos=ogg_page_eos(og);
+  ogg_int64_t granulepos=ogg_page_granulepos(og);
+  int serialno=ogg_page_serialno(og);
+  long pageno=ogg_page_pageno(og);
+  int segments=header[26];
+  
+  /* clean up 'returned data' */
+  {
+    long lr=os->lacing_returned;
+    long br=os->body_returned;
+
+    /* body data */
+    if(br){
+      os->body_fill-=br;
+      if(os->body_fill)
+	memmove(os->body_data,os->body_data+br,os->body_fill);
+      os->body_returned=0;
+    }
+
+    if(lr){
+      /* segment table */
+      if(os->lacing_fill-lr){
+	memmove(os->lacing_vals,os->lacing_vals+lr,
+		(os->lacing_fill-lr)*sizeof(*os->lacing_vals));
+	memmove(os->granule_vals,os->granule_vals+lr,
+		(os->lacing_fill-lr)*sizeof(*os->granule_vals));
+      }
+      os->lacing_fill-=lr;
+      os->lacing_packet-=lr;
+      os->lacing_returned=0;
+    }
+  }
+
+  /* check the serial number */
+  if(serialno!=os->serialno)return(-1);
+  if(version>0)return(-1);
+
+  _os_lacing_expand(os,segments+1);
+
+  /* are we in sequence? */
+  if(pageno!=os->pageno){
+    int i;
+
+    /* unroll previous partial packet (if any) */
+    for(i=os->lacing_packet;i<os->lacing_fill;i++)
+      os->body_fill-=os->lacing_vals[i]&0xff;
+    os->lacing_fill=os->lacing_packet;
+
+    /* make a note of dropped data in segment table */
+    if(os->pageno!=-1){
+      os->lacing_vals[os->lacing_fill++]=0x400;
+      os->lacing_packet++;
+    }
+
+    /* are we a 'continued packet' page?  If so, we'll need to skip
+       some segments */
+    if(continued){
+      bos=0;
+      for(;segptr<segments;segptr++){
+	int val=header[27+segptr];
+	body+=val;
+	bodysize-=val;
+	if(val<255){
+	  segptr++;
+	  break;
+	}
+      }
+    }
+  }
+  
+  if(bodysize){
+    _os_body_expand(os,bodysize);
+    memcpy(os->body_data+os->body_fill,body,bodysize);
+    os->body_fill+=bodysize;
+  }
+
+  {
+    int saved=-1;
+    while(segptr<segments){
+      int val=header[27+segptr];
+      os->lacing_vals[os->lacing_fill]=val;
+      os->granule_vals[os->lacing_fill]=-1;
+      
+      if(bos){
+	os->lacing_vals[os->lacing_fill]|=0x100;
+	bos=0;
+      }
+      
+      if(val<255)saved=os->lacing_fill;
+      
+      os->lacing_fill++;
+      segptr++;
+      
+      if(val<255)os->lacing_packet=os->lacing_fill;
+    }
+  
+    /* set the granulepos on the last granuleval of the last full packet */
+    if(saved!=-1){
+      os->granule_vals[saved]=granulepos;
+    }
+
+  }
+
+  if(eos){
+    os->e_o_s=1;
+    if(os->lacing_fill>0)
+      os->lacing_vals[os->lacing_fill-1]|=0x200;
+  }
+
+  os->pageno=pageno+1;
+
+  return(0);
+}
+
+/* clear things to an initial state.  Good to call, eg, before seeking */
+int ogg_sync_reset(ogg_sync_state *oy){
+  oy->fill=0;
+  oy->returned=0;
+  oy->unsynced=0;
+  oy->headerbytes=0;
+  oy->bodybytes=0;
+  return(0);
+}
+
+int ogg_stream_reset(ogg_stream_state *os){
+  os->body_fill=0;
+  os->body_returned=0;
+
+  os->lacing_fill=0;
+  os->lacing_packet=0;
+  os->lacing_returned=0;
+
+  os->header_fill=0;
+
+  os->e_o_s=0;
+  os->b_o_s=0;
+  os->pageno=-1;
+  os->packetno=0;
+  os->granulepos=0;
+
+  return(0);
+}
+
+int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){
+  ogg_stream_reset(os);
+  os->serialno=serialno;
+  return(0);
+}
+
+static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){
+
+  /* The last part of decode. We have the stream broken into packet
+     segments.  Now we need to group them into packets (or return the
+     out of sync markers) */
+
+  int ptr=os->lacing_returned;
+
+  if(os->lacing_packet<=ptr)return(0);
+
+  if(os->lacing_vals[ptr]&0x400){
+    /* we need to tell the codec there's a gap; it might need to
+       handle previous packet dependencies. */
+    os->lacing_returned++;
+    os->packetno++;
+    return(-1);
+  }
+
+  if(!op && !adv)return(1); /* just using peek as an inexpensive way
+                               to ask if there's a whole packet
+                               waiting */
+
+  /* Gather the whole packet. We'll have no holes or a partial packet */
+  {
+    int size=os->lacing_vals[ptr]&0xff;
+    int bytes=size;
+    int eos=os->lacing_vals[ptr]&0x200; /* last packet of the stream? */
+    int bos=os->lacing_vals[ptr]&0x100; /* first packet of the stream? */
+
+    while(size==255){
+      int val=os->lacing_vals[++ptr];
+      size=val&0xff;
+      if(val&0x200)eos=0x200;
+      bytes+=size;
+    }
+
+    if(op){
+      op->e_o_s=eos;
+      op->b_o_s=bos;
+      op->packet=os->body_data+os->body_returned;
+      op->packetno=os->packetno;
+      op->granulepos=os->granule_vals[ptr];
+      op->bytes=bytes;
+    }
+
+    if(adv){
+      os->body_returned+=bytes;
+      os->lacing_returned=ptr+1;
+      os->packetno++;
+    }
+  }
+  return(1);
+}
+
+int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){
+  return _packetout(os,op,1);
+}
+
+int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){
+  return _packetout(os,op,0);
+}
+
+void ogg_packet_clear(ogg_packet *op) {
+  _ogg_free(op->packet);
+  memset(op, 0, sizeof(*op));
+}
+
+#ifdef _V_SELFTEST
+#include <stdio.h>
+
+ogg_stream_state os_en, os_de;
+ogg_sync_state oy;
+
+void checkpacket(ogg_packet *op,int len, int no, int pos){
+  long j;
+  static int sequence=0;
+  static int lastno=0;
+
+  if(op->bytes!=len){
+    fprintf(stderr,"incorrect packet length!\n");
+    exit(1);
+  }
+  if(op->granulepos!=pos){
+    fprintf(stderr,"incorrect packet position!\n");
+    exit(1);
+  }
+
+  /* packet number just follows sequence/gap; adjust the input number
+     for that */
+  if(no==0){
+    sequence=0;
+  }else{
+    sequence++;
+    if(no>lastno+1)
+      sequence++;
+  }
+  lastno=no;
+  if(op->packetno!=sequence){
+    fprintf(stderr,"incorrect packet sequence %ld != %d\n",
+	    (long)(op->packetno),sequence);
+    exit(1);
+  }
+
+  /* Test data */
+  for(j=0;j<op->bytes;j++)
+    if(op->packet[j]!=((j+no)&0xff)){
+      fprintf(stderr,"body data mismatch (1) at pos %ld: %x!=%lx!\n\n",
+	      j,op->packet[j],(j+no)&0xff);
+      exit(1);
+    }
+}
+
+void check_page(unsigned char *data,const int *header,ogg_page *og){
+  long j;
+  /* Test data */
+  for(j=0;j<og->body_len;j++)
+    if(og->body[j]!=data[j]){
+      fprintf(stderr,"body data mismatch (2) at pos %ld: %x!=%x!\n\n",
+	      j,data[j],og->body[j]);
+      exit(1);
+    }
+
+  /* Test header */
+  for(j=0;j<og->header_len;j++){
+    if(og->header[j]!=header[j]){
+      fprintf(stderr,"header content mismatch at pos %ld:\n",j);
+      for(j=0;j<header[26]+27;j++)
+	fprintf(stderr," (%ld)%02x:%02x",j,header[j],og->header[j]);
+      fprintf(stderr,"\n");
+      exit(1);
+    }
+  }
+  if(og->header_len!=header[26]+27){
+    fprintf(stderr,"header length incorrect! (%ld!=%d)\n",
+	    og->header_len,header[26]+27);
+    exit(1);
+  }
+}
+
+void print_header(ogg_page *og){
+  int j;
+  fprintf(stderr,"\nHEADER:\n");
+  fprintf(stderr,"  capture: %c %c %c %c  version: %d  flags: %x\n",
+	  og->header[0],og->header[1],og->header[2],og->header[3],
+	  (int)og->header[4],(int)og->header[5]);
+
+  fprintf(stderr,"  granulepos: %d  serialno: %d  pageno: %ld\n",
+	  (og->header[9]<<24)|(og->header[8]<<16)|
+	  (og->header[7]<<8)|og->header[6],
+	  (og->header[17]<<24)|(og->header[16]<<16)|
+	  (og->header[15]<<8)|og->header[14],
+	  ((long)(og->header[21])<<24)|(og->header[20]<<16)|
+	  (og->header[19]<<8)|og->header[18]);
+
+  fprintf(stderr,"  checksum: %02x:%02x:%02x:%02x\n  segments: %d (",
+	  (int)og->header[22],(int)og->header[23],
+	  (int)og->header[24],(int)og->header[25],
+	  (int)og->header[26]);
+
+  for(j=27;j<og->header_len;j++)
+    fprintf(stderr,"%d ",(int)og->header[j]);
+  fprintf(stderr,")\n\n");
+}
+
+void copy_page(ogg_page *og){
+  unsigned char *temp=_ogg_malloc(og->header_len);
+  memcpy(temp,og->header,og->header_len);
+  og->header=temp;
+
+  temp=_ogg_malloc(og->body_len);
+  memcpy(temp,og->body,og->body_len);
+  og->body=temp;
+}
+
+void error(void){
+  fprintf(stderr,"error!\n");
+  exit(1);
+}
+
+/* 17 only */
+const int head1_0[] = {0x4f,0x67,0x67,0x53,0,0x06,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0x15,0xed,0xec,0x91,
+		       1,
+		       17};
+
+/* 17, 254, 255, 256, 500, 510, 600 byte, pad */
+const int head1_1[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0x59,0x10,0x6c,0x2c,
+		       1,
+		       17};
+const int head2_1[] = {0x4f,0x67,0x67,0x53,0,0x04,
+		       0x07,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x89,0x33,0x85,0xce,
+		       13,
+		       254,255,0,255,1,255,245,255,255,0,
+		       255,255,90};
+
+/* nil packets; beginning,middle,end */
+const int head1_2[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0xff,0x7b,0x23,0x17,
+		       1,
+		       0};
+const int head2_2[] = {0x4f,0x67,0x67,0x53,0,0x04,
+		       0x07,0x28,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x5c,0x3f,0x66,0xcb,
+		       17,
+		       17,254,255,0,0,255,1,0,255,245,255,255,0,
+		       255,255,90,0};
+
+/* large initial packet */
+const int head1_3[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0x01,0x27,0x31,0xaa,
+		       18,
+		       255,255,255,255,255,255,255,255,
+		       255,255,255,255,255,255,255,255,255,10};
+
+const int head2_3[] = {0x4f,0x67,0x67,0x53,0,0x04,
+		       0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x7f,0x4e,0x8a,0xd2,
+		       4,
+		       255,4,255,0};
+
+
+/* continuing packet test */
+const int head1_4[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0xff,0x7b,0x23,0x17,
+		       1,
+		       0};
+
+const int head2_4[] = {0x4f,0x67,0x67,0x53,0,0x00,
+		       0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x34,0x24,0xd5,0x29,
+		       17,
+		       255,255,255,255,255,255,255,255,
+		       255,255,255,255,255,255,255,255,255};
+
+const int head3_4[] = {0x4f,0x67,0x67,0x53,0,0x05,
+		       0x07,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,2,0,0,0,
+		       0xc8,0xc3,0xcb,0xed,
+		       5,
+		       10,255,4,255,0};
+
+
+/* page with the 255 segment limit */
+const int head1_5[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0xff,0x7b,0x23,0x17,
+		       1,
+		       0};
+
+const int head2_5[] = {0x4f,0x67,0x67,0x53,0,0x00,
+		       0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0xed,0x2a,0x2e,0xa7,
+		       255,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10,10,
+		       10,10,10,10,10,10,10};
+
+const int head3_5[] = {0x4f,0x67,0x67,0x53,0,0x04,
+		       0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,2,0,0,0,
+		       0x6c,0x3b,0x82,0x3d,
+		       1,
+		       50};
+
+
+/* packet that overspans over an entire page */
+const int head1_6[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0xff,0x7b,0x23,0x17,
+		       1,
+		       0};
+
+const int head2_6[] = {0x4f,0x67,0x67,0x53,0,0x00,
+		       0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x3c,0xd9,0x4d,0x3f,
+		       17,
+		       100,255,255,255,255,255,255,255,255,
+		       255,255,255,255,255,255,255,255};
+
+const int head3_6[] = {0x4f,0x67,0x67,0x53,0,0x01,
+		       0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,2,0,0,0,
+		       0xbd,0xd5,0xb5,0x8b,
+		       17,
+		       255,255,255,255,255,255,255,255,
+		       255,255,255,255,255,255,255,255,255};
+
+const int head4_6[] = {0x4f,0x67,0x67,0x53,0,0x05,
+		       0x07,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,3,0,0,0,
+		       0xef,0xdd,0x88,0xde,
+		       7,
+		       255,255,75,255,4,255,0};
+
+/* packet that overspans over an entire page */
+const int head1_7[] = {0x4f,0x67,0x67,0x53,0,0x02,
+		       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,0,0,0,0,
+		       0xff,0x7b,0x23,0x17,
+		       1,
+		       0};
+
+const int head2_7[] = {0x4f,0x67,0x67,0x53,0,0x00,
+		       0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,1,0,0,0,
+		       0x3c,0xd9,0x4d,0x3f,
+		       17,
+		       100,255,255,255,255,255,255,255,255,
+		       255,255,255,255,255,255,255,255};
+
+const int head3_7[] = {0x4f,0x67,0x67,0x53,0,0x05,
+		       0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
+		       0x01,0x02,0x03,0x04,2,0,0,0,
+		       0xd4,0xe0,0x60,0xe5,
+		       1,0};
+
+void test_pack(const int *pl, const int **headers){
+  unsigned char *data=_ogg_malloc(1024*1024); /* for scripted test cases only */
+  long inptr=0;
+  long outptr=0;
+  long deptr=0;
+  long depacket=0;
+  long granule_pos=7,pageno=0;
+  int i,j,packets,pageout=0;
+  int eosflag=0;
+  int bosflag=0;
+
+  ogg_stream_reset(&os_en);
+  ogg_stream_reset(&os_de);
+  ogg_sync_reset(&oy);
+
+  for(packets=0;;packets++)if(pl[packets]==-1)break;
+
+  for(i=0;i<packets;i++){
+    /* construct a test packet */
+    ogg_packet op;
+    int len=pl[i];
+    
+    op.packet=data+inptr;
+    op.bytes=len;
+    op.e_o_s=(pl[i+1]<0?1:0);
+    op.granulepos=granule_pos;
+
+    granule_pos+=1024;
+
+    for(j=0;j<len;j++)data[inptr++]=i+j;
+
+    /* submit the test packet */
+    ogg_stream_packetin(&os_en,&op);
+
+    /* retrieve any finished pages */
+    {
+      ogg_page og;
+      
+      while(ogg_stream_pageout(&os_en,&og)){
+	/* We have a page.  Check it carefully */
+
+	fprintf(stderr,"%ld, ",pageno);
+
+	if(headers[pageno]==NULL){
+	  fprintf(stderr,"coded too many pages!\n");
+	  exit(1);
+	}
+
+	check_page(data+outptr,headers[pageno],&og);
+
+	outptr+=og.body_len;
+	pageno++;
+
+	/* have a complete page; submit it to sync/decode */
+
+	{
+	  ogg_page og_de;
+	  ogg_packet op_de,op_de2;
+	  char *buf=ogg_sync_buffer(&oy,og.header_len+og.body_len);
+	  memcpy(buf,og.header,og.header_len);
+	  memcpy(buf+og.header_len,og.body,og.body_len);
+	  ogg_sync_wrote(&oy,og.header_len+og.body_len);
+
+	  while(ogg_sync_pageout(&oy,&og_de)>0){
+	    /* got a page.  Happy happy.  Verify that it's good. */
+	    
+	    check_page(data+deptr,headers[pageout],&og_de);
+	    deptr+=og_de.body_len;
+	    pageout++;
+
+	    /* submit it to deconstitution */
+	    ogg_stream_pagein(&os_de,&og_de);
+
+	    /* packets out? */
+	    while(ogg_stream_packetpeek(&os_de,&op_de2)>0){
+	      ogg_stream_packetpeek(&os_de,NULL);
+	      ogg_stream_packetout(&os_de,&op_de); /* just catching them all */
+	      
+	      /* verify peek and out match */
+	      if(memcmp(&op_de,&op_de2,sizeof(op_de))){
+		fprintf(stderr,"packetout != packetpeek! pos=%ld\n",
+			depacket);
+		exit(1);
+	      }
+
+	      /* verify the packet! */
+	      /* check data */
+	      if(memcmp(data+depacket,op_de.packet,op_de.bytes)){
+		fprintf(stderr,"packet data mismatch in decode! pos=%ld\n",
+			depacket);
+		exit(1);
+	      }
+	      /* check bos flag */
+	      if(bosflag==0 && op_de.b_o_s==0){
+		fprintf(stderr,"b_o_s flag not set on packet!\n");
+		exit(1);
+	      }
+	      if(bosflag && op_de.b_o_s){
+		fprintf(stderr,"b_o_s flag incorrectly set on packet!\n");
+		exit(1);
+	      }
+	      bosflag=1;
+	      depacket+=op_de.bytes;
+	      
+	      /* check eos flag */
+	      if(eosflag){
+		fprintf(stderr,"Multiple decoded packets with eos flag!\n");
+		exit(1);
+	      }
+
+	      if(op_de.e_o_s)eosflag=1;
+
+	      /* check granulepos flag */
+	      if(op_de.granulepos!=-1){
+		fprintf(stderr," granule:%ld ",(long)op_de.granulepos);
+	      }
+	    }
+	  }
+	}
+      }
+    }
+  }
+  _ogg_free(data);
+  if(headers[pageno]!=NULL){
+    fprintf(stderr,"did not write last page!\n");
+    exit(1);
+  }
+  if(headers[pageout]!=NULL){
+    fprintf(stderr,"did not decode last page!\n");
+    exit(1);
+  }
+  if(inptr!=outptr){
+    fprintf(stderr,"encoded page data incomplete!\n");
+    exit(1);
+  }
+  if(inptr!=deptr){
+    fprintf(stderr,"decoded page data incomplete!\n");
+    exit(1);
+  }
+  if(inptr!=depacket){
+    fprintf(stderr,"decoded packet data incomplete!\n");
+    exit(1);
+  }
+  if(!eosflag){
+    fprintf(stderr,"Never got a packet with EOS set!\n");
+    exit(1);
+  }
+  fprintf(stderr,"ok.\n");
+}
+
+int main(void){
+
+  ogg_stream_init(&os_en,0x04030201);
+  ogg_stream_init(&os_de,0x04030201);
+  ogg_sync_init(&oy);
+
+  /* Exercise each code path in the framing code.  Also verify that
+     the checksums are working.  */
+
+  {
+    /* 17 only */
+    const int packets[]={17, -1};
+    const int *headret[]={head1_0,NULL};
+    
+    fprintf(stderr,"testing single page encoding... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* 17, 254, 255, 256, 500, 510, 600 byte, pad */
+    const int packets[]={17, 254, 255, 256, 500, 510, 600, -1};
+    const int *headret[]={head1_1,head2_1,NULL};
+    
+    fprintf(stderr,"testing basic page encoding... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* nil packets; beginning,middle,end */
+    const int packets[]={0,17, 254, 255, 0, 256, 0, 500, 510, 600, 0, -1};
+    const int *headret[]={head1_2,head2_2,NULL};
+    
+    fprintf(stderr,"testing basic nil packets... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* large initial packet */
+    const int packets[]={4345,259,255,-1};
+    const int *headret[]={head1_3,head2_3,NULL};
+    
+    fprintf(stderr,"testing initial-packet lacing > 4k... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* continuing packet test */
+    const int packets[]={0,4345,259,255,-1};
+    const int *headret[]={head1_4,head2_4,head3_4,NULL};
+    
+    fprintf(stderr,"testing single packet page span... ");
+    test_pack(packets,headret);
+  }
+
+  /* page with the 255 segment limit */
+  {
+
+    const int packets[]={0,10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,10,
+		   10,10,10,10,10,10,10,50,-1};
+    const int *headret[]={head1_5,head2_5,head3_5,NULL};
+    
+    fprintf(stderr,"testing max packet segments... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* packet that overspans over an entire page */
+    const int packets[]={0,100,9000,259,255,-1};
+    const int *headret[]={head1_6,head2_6,head3_6,head4_6,NULL};
+    
+    fprintf(stderr,"testing very large packets... ");
+    test_pack(packets,headret);
+  }
+
+  {
+    /* term only page.  why not? */
+    const int packets[]={0,100,4080,-1};
+    const int *headret[]={head1_7,head2_7,head3_7,NULL};
+    
+    fprintf(stderr,"testing zero data page (1 nil packet)... ");
+    test_pack(packets,headret);
+  }
+
+
+
+  {
+    /* build a bunch of pages for testing */
+    unsigned char *data=_ogg_malloc(1024*1024);
+    int pl[]={0,100,4079,2956,2057,76,34,912,0,234,1000,1000,1000,300,-1};
+    int inptr=0,i,j;
+    ogg_page og[5];
+    
+    ogg_stream_reset(&os_en);
+
+    for(i=0;pl[i]!=-1;i++){
+      ogg_packet op;
+      int len=pl[i];
+      
+      op.packet=data+inptr;
+      op.bytes=len;
+      op.e_o_s=(pl[i+1]<0?1:0);
+      op.granulepos=(i+1)*1000;
+
+      for(j=0;j<len;j++)data[inptr++]=i+j;
+      ogg_stream_packetin(&os_en,&op);
+    }
+
+    _ogg_free(data);
+
+    /* retrieve finished pages */
+    for(i=0;i<5;i++){
+      if(ogg_stream_pageout(&os_en,&og[i])==0){
+	fprintf(stderr,"Too few pages output building sync tests!\n");
+	exit(1);
+      }
+      copy_page(&og[i]);
+    }
+
+    /* Test lost pages on pagein/packetout: no rollback */
+    {
+      ogg_page temp;
+      ogg_packet test;
+
+      fprintf(stderr,"Testing loss of pages... ");
+
+      ogg_sync_reset(&oy);
+      ogg_stream_reset(&os_de);
+      for(i=0;i<5;i++){
+	memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header,
+	       og[i].header_len);
+	ogg_sync_wrote(&oy,og[i].header_len);
+	memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len);
+	ogg_sync_wrote(&oy,og[i].body_len);
+      }
+
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+      ogg_sync_pageout(&oy,&temp);
+      /* skip */
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+
+      /* do we get the expected results/packets? */
+      
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,0,0,0);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,100,1,-1);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,4079,2,3000);
+      if(ogg_stream_packetout(&os_de,&test)!=-1){
+	fprintf(stderr,"Error: loss of page did not return error\n");
+	exit(1);
+      }
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,76,5,-1);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,34,6,-1);
+      fprintf(stderr,"ok.\n");
+    }
+
+    /* Test lost pages on pagein/packetout: rollback with continuation */
+    {
+      ogg_page temp;
+      ogg_packet test;
+
+      fprintf(stderr,"Testing loss of pages (rollback required)... ");
+
+      ogg_sync_reset(&oy);
+      ogg_stream_reset(&os_de);
+      for(i=0;i<5;i++){
+	memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header,
+	       og[i].header_len);
+	ogg_sync_wrote(&oy,og[i].header_len);
+	memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len);
+	ogg_sync_wrote(&oy,og[i].body_len);
+      }
+
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+      ogg_sync_pageout(&oy,&temp);
+      /* skip */
+      ogg_sync_pageout(&oy,&temp);
+      ogg_stream_pagein(&os_de,&temp);
+
+      /* do we get the expected results/packets? */
+      
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,0,0,0);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,100,1,-1);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,4079,2,3000);
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,2956,3,4000);
+      if(ogg_stream_packetout(&os_de,&test)!=-1){
+	fprintf(stderr,"Error: loss of page did not return error\n");
+	exit(1);
+      }
+      if(ogg_stream_packetout(&os_de,&test)!=1)error();
+      checkpacket(&test,300,13,14000);
+      fprintf(stderr,"ok.\n");
+    }
+    
+    /* the rest only test sync */
+    {
+      ogg_page og_de;
+      /* Test fractional page inputs: incomplete capture */
+      fprintf(stderr,"Testing sync on partial inputs... ");
+      ogg_sync_reset(&oy);
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,
+	     3);
+      ogg_sync_wrote(&oy,3);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      
+      /* Test fractional page inputs: incomplete fixed header */
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+3,
+	     20);
+      ogg_sync_wrote(&oy,20);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      
+      /* Test fractional page inputs: incomplete header */
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+23,
+	     5);
+      ogg_sync_wrote(&oy,5);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      
+      /* Test fractional page inputs: incomplete body */
+      
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+28,
+	     og[1].header_len-28);
+      ogg_sync_wrote(&oy,og[1].header_len-28);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,1000);
+      ogg_sync_wrote(&oy,1000);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body+1000,
+	     og[1].body_len-1000);
+      ogg_sync_wrote(&oy,og[1].body_len-1000);
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+      
+      fprintf(stderr,"ok.\n");
+    }
+
+    /* Test fractional page inputs: page + incomplete capture */
+    {
+      ogg_page og_de;
+      fprintf(stderr,"Testing sync on 1+partial inputs... ");
+      ogg_sync_reset(&oy); 
+
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,
+	     og[1].header_len);
+      ogg_sync_wrote(&oy,og[1].header_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,
+	     og[1].body_len);
+      ogg_sync_wrote(&oy,og[1].body_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,
+	     20);
+      ogg_sync_wrote(&oy,20);
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+20,
+	     og[1].header_len-20);
+      ogg_sync_wrote(&oy,og[1].header_len-20);
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,
+	     og[1].body_len);
+      ogg_sync_wrote(&oy,og[1].body_len);
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+
+      fprintf(stderr,"ok.\n");
+    }
+    
+    /* Test recapture: garbage + page */
+    {
+      ogg_page og_de;
+      fprintf(stderr,"Testing search for capture... ");
+      ogg_sync_reset(&oy); 
+      
+      /* 'garbage' */
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,
+	     og[1].body_len);
+      ogg_sync_wrote(&oy,og[1].body_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,
+	     og[1].header_len);
+      ogg_sync_wrote(&oy,og[1].header_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,
+	     og[1].body_len);
+      ogg_sync_wrote(&oy,og[1].body_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,
+	     20);
+      ogg_sync_wrote(&oy,20);
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+
+      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header+20,
+	     og[2].header_len-20);
+      ogg_sync_wrote(&oy,og[2].header_len-20);
+      memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body,
+	     og[2].body_len);
+      ogg_sync_wrote(&oy,og[2].body_len);
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+
+      fprintf(stderr,"ok.\n");
+    }
+
+    /* Test recapture: page + garbage + page */
+    {
+      ogg_page og_de;
+      fprintf(stderr,"Testing recapture... ");
+      ogg_sync_reset(&oy); 
+
+      memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header,
+	     og[1].header_len);
+      ogg_sync_wrote(&oy,og[1].header_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,
+	     og[1].body_len);
+      ogg_sync_wrote(&oy,og[1].body_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,
+	     og[2].header_len);
+      ogg_sync_wrote(&oy,og[2].header_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header,
+	     og[2].header_len);
+      ogg_sync_wrote(&oy,og[2].header_len);
+
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+
+      memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body,
+	     og[2].body_len-5);
+      ogg_sync_wrote(&oy,og[2].body_len-5);
+
+      memcpy(ogg_sync_buffer(&oy,og[3].header_len),og[3].header,
+	     og[3].header_len);
+      ogg_sync_wrote(&oy,og[3].header_len);
+
+      memcpy(ogg_sync_buffer(&oy,og[3].body_len),og[3].body,
+	     og[3].body_len);
+      ogg_sync_wrote(&oy,og[3].body_len);
+
+      if(ogg_sync_pageout(&oy,&og_de)>0)error();
+      if(ogg_sync_pageout(&oy,&og_de)<=0)error();
+
+      fprintf(stderr,"ok.\n");
+    }
+  }    
+
+  return(0);
+}
+
+#endif
+
+
+
+
binary files /dev/null b/sys/src/cmd/audio/libogg/libogg.au differ
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/mkfile
@@ -1,0 +1,25 @@
+</$objtype/mkfile
+
+CC=pcc
+CFLAGS=-I.  -c
+LIB=libogg.a$O
+
+OFILES=\
+	framing.$O\
+	bitwise.$O\
+
+HFILES=\
+	ogg/ogg.h\
+	ogg/os_types.h\
+
+UPDATE=\
+	mkfile\
+	$HFILES\
+	${OFILES:%.$O=%.c}\
+	${LIB:/$objtype/%=/386/%}\
+
+</sys/src/cmd/mklib
+
+nuke:V:
+	mk clean
+	rm -f libogg.a[$OS]
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/ogg/config_types.h
@@ -1,0 +1,10 @@
+#ifndef __CONFIG_TYPES_H__
+#define __CONFIG_TYPES_H__
+
+/* these are filled in by configure */
+typedef int16_t ogg_int16_t;
+typedef int32_t ogg_int32_t;
+typedef u_int32_t ogg_uint32_t;
+typedef int64_t ogg_int64_t;
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/ogg/ogg.h
@@ -1,0 +1,186 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel libogg include
+ last mod: $Id: ogg.h,v 1.18 2002/07/13 10:28:33 giles Exp $
+
+ ********************************************************************/
+#ifndef _OGG_H
+#define _OGG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#pragma lib "/sys/src/cmd/audio/libogg/libogg.a$O"
+
+#include <ogg/os_types.h>
+
+typedef struct {
+  long endbyte;
+  int  endbit;
+
+  unsigned char *buffer;
+  unsigned char *ptr;
+  long storage;
+} oggpack_buffer;
+
+/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
+
+typedef struct {
+  unsigned char *header;
+  long header_len;
+  unsigned char *body;
+  long body_len;
+} ogg_page;
+
+/* ogg_stream_state contains the current encode/decode state of a logical
+   Ogg bitstream **********************************************************/
+
+typedef struct {
+  unsigned char   *body_data;    /* bytes from packet bodies */
+  long    body_storage;          /* storage elements allocated */
+  long    body_fill;             /* elements stored; fill mark */
+  long    body_returned;         /* elements of fill returned */
+
+
+  int     *lacing_vals;      /* The values that will go to the segment table */
+  ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
+				this way, but it is simple coupled to the
+				lacing fifo */
+  long    lacing_storage;
+  long    lacing_fill;
+  long    lacing_packet;
+  long    lacing_returned;
+
+  unsigned char    header[282];      /* working space for header encode */
+  int              header_fill;
+
+  int     e_o_s;          /* set when we have buffered the last packet in the
+                             logical bitstream */
+  int     b_o_s;          /* set after we've written the initial page
+                             of a logical bitstream */
+  long    serialno;
+  long    pageno;
+  ogg_int64_t  packetno;      /* sequence number for decode; the framing
+                             knows where there's a hole in the data,
+                             but we need coupling so that the codec
+                             (which is in a seperate abstraction
+                             layer) also knows about the gap */
+  ogg_int64_t   granulepos;
+
+} ogg_stream_state;
+
+/* ogg_packet is used to encapsulate the data and metadata belonging
+   to a single raw Ogg/Vorbis packet *************************************/
+
+typedef struct {
+  unsigned char *packet;
+  long  bytes;
+  long  b_o_s;
+  long  e_o_s;
+
+  ogg_int64_t  granulepos;
+  
+  ogg_int64_t  packetno;     /* sequence number for decode; the framing
+				knows where there's a hole in the data,
+				but we need coupling so that the codec
+				(which is in a seperate abstraction
+				layer) also knows about the gap */
+} ogg_packet;
+
+typedef struct {
+  unsigned char *data;
+  int storage;
+  int fill;
+  int returned;
+
+  int unsynced;
+  int headerbytes;
+  int bodybytes;
+} ogg_sync_state;
+
+/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
+
+extern void  oggpack_writeinit(oggpack_buffer *b);
+extern void  oggpack_writetrunc(oggpack_buffer *b,long bits);
+extern void  oggpack_writealign(oggpack_buffer *b);
+extern void  oggpack_writecopy(oggpack_buffer *b,void *source,long bits);
+extern void  oggpack_reset(oggpack_buffer *b);
+extern void  oggpack_writeclear(oggpack_buffer *b);
+extern void  oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
+extern void  oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
+extern long  oggpack_look(oggpack_buffer *b,int bits);
+extern long  oggpack_look1(oggpack_buffer *b);
+extern void  oggpack_adv(oggpack_buffer *b,int bits);
+extern void  oggpack_adv1(oggpack_buffer *b);
+extern long  oggpack_read(oggpack_buffer *b,int bits);
+extern long  oggpack_read1(oggpack_buffer *b);
+extern long  oggpack_bytes(oggpack_buffer *b);
+extern long  oggpack_bits(oggpack_buffer *b);
+extern unsigned char *oggpack_get_buffer(oggpack_buffer *b);
+
+/* Ogg BITSTREAM 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_flush(ogg_stream_state *os, ogg_page *og);
+
+/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
+
+extern int      ogg_sync_init(ogg_sync_state *oy);
+extern int      ogg_sync_clear(ogg_sync_state *oy);
+extern int      ogg_sync_reset(ogg_sync_state *oy);
+extern int	ogg_sync_destroy(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 int      ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
+
+/* Ogg BITSTREAM 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);
+extern int      ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
+extern int      ogg_stream_destroy(ogg_stream_state *os);
+extern int      ogg_stream_eos(ogg_stream_state *os);
+
+extern void     ogg_page_checksum_set(ogg_page *og);
+
+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 ogg_int64_t  ogg_page_granulepos(ogg_page *og);
+extern int      ogg_page_serialno(ogg_page *og);
+extern long     ogg_page_pageno(ogg_page *og);
+extern int      ogg_page_packets(ogg_page *og);
+
+extern void     ogg_packet_clear(ogg_packet *op);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* _OGG_H */
+
+
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libogg/ogg/os_types.h
@@ -1,0 +1,16 @@
+#ifndef _OS_TYPES_H
+#define _OS_TYPES_H
+
+/* make it easy on the folks that want to compile the libs with a
+   different malloc than stdlib */
+#define _ogg_malloc  malloc
+#define _ogg_calloc  calloc
+#define _ogg_realloc realloc
+#define _ogg_free    free
+
+typedef short ogg_int16_t;
+typedef int ogg_int32_t;
+typedef unsigned int ogg_uint32_t;
+typedef long long ogg_int64_t;
+
+#endif  /* _OS_TYPES_H */
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/AUTHORS
@@ -1,0 +1,11 @@
+
+Original:
+
+	Monty <[email protected]>
+	and the rest of the Xiph.org Foundation.
+
+
+Plan9 port:
+
+	Aki Nyrhinen <[email protected]>
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/COPYING
@@ -1,0 +1,28 @@
+Copyright (c) 2002, Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/analysis.c
@@ -1,0 +1,119 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: single-block PCM analysis mode dispatch
+ last mod: $Id: analysis.c,v 1.55 2002/07/11 06:40:48 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "scales.h"
+#include "os.h"
+#include "misc.h"
+
+int analysis_noisy=1;
+
+/* decides between modes, dispatches to the appropriate mapping. */
+int vorbis_analysis(vorbis_block *vb, ogg_packet *op){
+  int                   ret;
+
+  vb->glue_bits=0;
+  vb->time_bits=0;
+  vb->floor_bits=0;
+  vb->res_bits=0;
+
+  /* first things first.  Make sure encode is ready */
+  oggpack_reset(&vb->opb);
+  
+  /* we only have one mapping type (0), and we let the mapping code
+     itself figure out what soft mode to use.  This allows easier
+     bitrate management */
+
+  if((ret=_mapping_P[0]->forward(vb)))
+    return(ret);
+
+  if(op){
+    if(vorbis_bitrate_managed(vb))
+      /* The app is using a bitmanaged mode... but not using the
+         bitrate management interface. */
+      return(OV_EINVAL);
+    
+    op->packet=oggpack_get_buffer(&vb->opb);
+    op->bytes=oggpack_bytes(&vb->opb);
+    op->b_o_s=0;
+    op->e_o_s=vb->eofflag;
+    op->granulepos=vb->granulepos;
+    op->packetno=vb->sequence; /* for sake of completeness */
+  }
+  return(0);
+}
+
+/* there was no great place to put this.... */
+void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg_int64_t off){
+  int j;
+  FILE *of;
+  char buffer[80];
+
+  /*  if(i==5870){*/
+    sprintf(buffer,"%s_%d.m",base,i);
+    of=fopen(buffer,"w");
+    
+    if(!of)perror("failed to open data dump file");
+    
+    for(j=0;j<n;j++){
+      if(bark){
+	float b=toBARK((4000.f*j/n)+.25);
+	fprintf(of,"%f ",b);
+      }else
+	if(off!=0)
+	  fprintf(of,"%f ",(double)(j+off)/8000.);
+	else
+	  fprintf(of,"%f ",(double)j);
+      
+      if(dB){
+	float val;
+	if(v[j]==0.)
+	  val=-140.;
+	else
+	  val=todB(v+j);
+	fprintf(of,"%f\n",val);
+      }else{
+	fprintf(of,"%f\n",v[j]);
+      }
+    }
+    fclose(of);
+    /*  } */
+}
+
+void _analysis_output(char *base,int i,float *v,int n,int bark,int dB,
+		      ogg_int64_t off){
+  if(analysis_noisy)_analysis_output_always(base,i,v,n,bark,dB,off);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/backends.h
@@ -1,0 +1,145 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: libvorbis backend and mapping structures; needed for 
+           static mode headers
+ last mod: $Id: backends.h,v 1.14 2002/07/11 06:40:48 xiphmont Exp $
+
+ ********************************************************************/
+
+/* this is exposed up here because we need it for static modes.
+   Lookups for each backend aren't exposed because there's no reason
+   to do so */
+
+#ifndef _vorbis_backend_h_
+#define _vorbis_backend_h_
+
+#include "codec_internal.h"
+
+/* this would all be simpler/shorter with templates, but.... */
+/* Floor backend generic *****************************************/
+typedef struct{
+  void                   (*pack)  (vorbis_info_floor *,oggpack_buffer *);
+  vorbis_info_floor     *(*unpack)(vorbis_info *,oggpack_buffer *);
+  vorbis_look_floor     *(*look)  (vorbis_dsp_state *,vorbis_info_floor *);
+  void (*free_info) (vorbis_info_floor *);
+  void (*free_look) (vorbis_look_floor *);
+  void *(*inverse1)  (struct vorbis_block *,vorbis_look_floor *);
+  int   (*inverse2)  (struct vorbis_block *,vorbis_look_floor *,
+		     void *buffer,float *);
+} vorbis_func_floor;
+
+typedef struct{
+  int   order;
+  long  rate;
+  long  barkmap;
+
+  int   ampbits;
+  int   ampdB;
+
+  int   numbooks; /* <= 16 */
+  int   books[16];
+
+  float lessthan;     /* encode-only config setting hacks for libvorbis */
+  float greaterthan;  /* encode-only config setting hacks for libvorbis */
+
+} vorbis_info_floor0;
+
+
+#define VIF_POSIT 63
+#define VIF_CLASS 16
+#define VIF_PARTS 31
+typedef struct{
+  int   partitions;                /* 0 to 31 */
+  int   partitionclass[VIF_PARTS]; /* 0 to 15 */
+
+  int   class_dim[VIF_CLASS];        /* 1 to 8 */
+  int   class_subs[VIF_CLASS];       /* 0,1,2,3 (bits: 1<<n poss) */
+  int   class_book[VIF_CLASS];       /* subs ^ dim entries */
+  int   class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */
+
+
+  int   mult;                      /* 1 2 3 or 4 */ 
+  int   postlist[VIF_POSIT+2];    /* first two implicit */ 
+
+
+  /* encode side analysis parameters */
+  float maxover;     
+  float maxunder;  
+  float maxerr;    
+
+  float twofitweight;  
+  float twofitatten;
+
+  int   n;
+
+} vorbis_info_floor1;
+
+/* Residue backend generic *****************************************/
+typedef struct{
+  void                 (*pack)  (vorbis_info_residue *,oggpack_buffer *);
+  vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *);
+  vorbis_look_residue *(*look)  (vorbis_dsp_state *,
+				 vorbis_info_residue *);
+  void (*free_info)    (vorbis_info_residue *);
+  void (*free_look)    (vorbis_look_residue *);
+  long **(*class)      (struct vorbis_block *,vorbis_look_residue *,
+			float **,int *,int);
+  int  (*forward)      (struct vorbis_block *,vorbis_look_residue *,
+			float **,float **,int *,int,long **);
+  int  (*inverse)      (struct vorbis_block *,vorbis_look_residue *,
+			float **,int *,int);
+} vorbis_func_residue;
+
+typedef struct vorbis_info_residue0{
+/* block-partitioned VQ coded straight residue */
+  long  begin;
+  long  end;
+
+  /* first stage (lossless partitioning) */
+  int    grouping;         /* group n vectors per partition */
+  int    partitions;       /* possible codebooks for a partition */
+  int    groupbook;        /* huffbook for partitioning */
+  int    secondstages[64]; /* expanded out to pointers in lookup */
+  int    booklist[256];    /* list of second stage books */
+
+  float  classmetric1[64];  
+  float  classmetric2[64];  
+
+} vorbis_info_residue0;
+
+/* Mapping backend generic *****************************************/
+typedef struct{
+  void                 (*pack)  (vorbis_info *,vorbis_info_mapping *,
+				 oggpack_buffer *);
+  vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
+  void (*free_info)    (vorbis_info_mapping *);
+  int  (*forward)      (struct vorbis_block *vb);
+  int  (*inverse)      (struct vorbis_block *vb,vorbis_info_mapping *);
+} vorbis_func_mapping;
+
+typedef struct vorbis_info_mapping0{
+  int   submaps;  /* <= 16 */
+  int   chmuxlist[256];   /* up to 256 channels in a Vorbis stream */
+  
+  int   floorsubmap[16];   /* [mux] submap to floors */
+  int   residuesubmap[16]; /* [mux] submap to residue */
+
+  int   coupling_steps;
+  int   coupling_mag[256];
+  int   coupling_ang[256];
+
+} vorbis_info_mapping0;
+
+#endif
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/barkmel.c
@@ -1,0 +1,64 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: bark scale utility
+ last mod: $Id: barkmel.c,v 1.12 2002/07/11 06:40:48 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdio.h>
+#include "scales.h"
+int main(){
+  int i;
+  double rate;
+  for(i=64;i<32000;i*=2){
+    rate=48000.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=44100.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=32000.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=22050.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=16000.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=11025.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+    rate=8000.f;
+    fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n\n",
+	    rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
+
+
+  }
+  {
+    float i;
+    int j;
+    for(i=0.,j=0;i<28;i+=1,j++){
+      fprintf(stderr,"(%d) bark=%f %gHz (%d of 128)\n",
+              j,i,fromBARK(i),(int)(fromBARK(i)/22050.*128.));
+    }
+  }
+  return(0);
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/bitrate.c
@@ -1,0 +1,531 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: bitrate tracking and management
+ last mod: $Id: bitrate.c,v 1.20 2002/07/18 02:12:20 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "os.h"
+#include "misc.h"
+#include "bitrate.h"
+
+
+static long BINBYTES(bitrate_manager_state *bm,long pos,long bin){
+  int bins=bm->queue_bins;
+  return(bm->queue_binned[pos*bins+bin]);
+}
+
+#define LIMITBYTES(pos,bin) (bm->minmax_binstack[(pos)*bins*2+((bin)+bins)])
+
+static long LACING_ADJUST(long bytes){
+  int addto=bytes/255+1;
+  return(bytes+addto);
+}
+
+static int floater_interpolate(bitrate_manager_state *bm,vorbis_info *vi,
+				  double desired_rate){
+  int bin=rint(bm->avgfloat);
+  double lobitrate,hibitrate;
+
+
+  lobitrate=(double)(bm->avg_binacc[bin]*8)/bm->avg_sampleacc*vi->rate;
+  while(lobitrate>desired_rate && bin>0){
+    bin--;
+    lobitrate=(double)(bm->avg_binacc[bin]*8)/bm->avg_sampleacc*vi->rate;
+  }
+
+  if(bin+1<bm->queue_bins){
+    hibitrate=(double)(bm->avg_binacc[bin+1]*8)/bm->avg_sampleacc*vi->rate;
+    if(fabs(hibitrate-desired_rate) < fabs(lobitrate-desired_rate))bin++;
+  }
+  return(bin);
+}
+
+/* try out a new limit */
+static long limit_sum(bitrate_manager_state *bm,int limit){
+  int i=bm->minmax_stackptr;
+  long acc=bm->minmax_acctotal;
+  long bins=bm->queue_bins;
+  
+  acc-=LIMITBYTES(i,0);
+  acc+=LIMITBYTES(i,limit);
+
+  while(i-->0){
+    if(bm->minmax_limitstack[i]<=limit)break;
+    acc-=LIMITBYTES(i,bm->minmax_limitstack[i]);
+    acc+=LIMITBYTES(i,limit);
+  }
+  return(acc);
+}
+
+/* compute bitrate tracking setup, allocate circular packet size queue */
+void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
+  int i;
+  codec_setup_info *ci=vi->codec_setup;
+  bitrate_manager_info *bi=&ci->bi;
+  long maxlatency;
+
+  memset(bm,0,sizeof(*bm));
+  
+  if(bi){
+    
+    bm->avg_sampledesired=bi->queue_avg_time*vi->rate;
+    bm->avg_centerdesired=bi->queue_avg_time*vi->rate*bi->queue_avg_center;
+    bm->minmax_sampledesired=bi->queue_minmax_time*vi->rate;
+    
+    /* first find the max possible needed queue size */
+    maxlatency=max(bm->avg_sampledesired-bm->avg_centerdesired,
+		   bm->minmax_sampledesired)+bm->avg_centerdesired;
+    
+    if(maxlatency>0 &&
+       (bi->queue_avgmin>0 || bi->queue_avgmax>0 || bi->queue_hardmax>0 ||
+	bi->queue_hardmin>0)){
+      long maxpackets=maxlatency/(ci->blocksizes[0]>>1)+3;
+      long bins=PACKETBLOBS;
+      
+      bm->queue_size=maxpackets;
+      bm->queue_bins=bins;
+      bm->queue_binned=_ogg_calloc(maxpackets,bins*sizeof(*bm->queue_binned));
+      bm->queue_actual=_ogg_calloc(maxpackets,sizeof(*bm->queue_actual));
+      
+      if((bi->queue_avgmin>0 || bi->queue_avgmax>0) &&
+	 bi->queue_avg_time>0){
+	
+	bm->avg_binacc=_ogg_calloc(bins,sizeof(*bm->avg_binacc));
+	bm->avgfloat=PACKETBLOBS/2;
+	
+      }else{
+	bm->avg_tail= -1;
+      }
+      
+      if((bi->queue_hardmin>0 || bi->queue_hardmax>0) &&
+	 bi->queue_minmax_time>0){
+	
+	bm->minmax_binstack=_ogg_calloc((bins*2+1)*bins*2,
+					sizeof(*bm->minmax_binstack));
+	bm->minmax_posstack=_ogg_calloc((bins*2+1),
+				      sizeof(*bm->minmax_posstack));
+	bm->minmax_limitstack=_ogg_calloc((bins*2+1),
+					  sizeof(*bm->minmax_limitstack));
+      }else{
+	bm->minmax_tail= -1;
+      }
+      
+      /* space for the packet queueing */
+      bm->packetbuffers=_ogg_calloc(maxpackets,sizeof(*bm->packetbuffers));
+      bm->packets=_ogg_calloc(maxpackets,sizeof(*bm->packets));
+      for(i=0;i<maxpackets;i++)
+	oggpack_writeinit(bm->packetbuffers+i);
+      
+    }else{
+      bm->packetbuffers=_ogg_calloc(1,sizeof(*bm->packetbuffers));
+      bm->packets=_ogg_calloc(1,sizeof(*bm->packets));
+      oggpack_writeinit(bm->packetbuffers);
+
+    }      
+  }
+}
+
+void vorbis_bitrate_clear(bitrate_manager_state *bm){
+  int i;
+  if(bm){
+    if(bm->queue_binned)_ogg_free(bm->queue_binned);
+    if(bm->queue_actual)_ogg_free(bm->queue_actual);
+    if(bm->avg_binacc)_ogg_free(bm->avg_binacc);
+    if(bm->minmax_binstack)_ogg_free(bm->minmax_binstack);
+    if(bm->minmax_posstack)_ogg_free(bm->minmax_posstack);
+    if(bm->minmax_limitstack)_ogg_free(bm->minmax_limitstack);
+
+    if(bm->packetbuffers){
+      if(bm->queue_size==0){
+	oggpack_writeclear(bm->packetbuffers);
+      }else{
+	for(i=0;i<bm->queue_size;i++)
+	  oggpack_writeclear(bm->packetbuffers+i);	
+      }
+      _ogg_free(bm->packetbuffers);
+    }
+    if(bm->packets)_ogg_free(bm->packets);
+    
+    memset(bm,0,sizeof(*bm));
+  }
+}
+
+int vorbis_bitrate_managed(vorbis_block *vb){
+  vorbis_dsp_state      *vd=vb->vd;
+  backend_lookup_state  *b=vd->backend_state; 
+  bitrate_manager_state *bm=&b->bms;
+
+  if(bm->queue_binned)return(1);
+  return(0);
+}
+
+/* finish taking in the block we just processed */
+int vorbis_bitrate_addblock(vorbis_block *vb){
+  int i; 
+  vorbis_block_internal *vbi=vb->internal;
+  vorbis_dsp_state      *vd=vb->vd;
+  backend_lookup_state  *b=vd->backend_state; 
+  bitrate_manager_state *bm=&b->bms;
+  vorbis_info           *vi=vd->vi;
+  codec_setup_info      *ci=vi->codec_setup;
+  bitrate_manager_info  *bi=&ci->bi;
+  int                    eofflag=vb->eofflag;
+  int                    head=bm->queue_head;
+  int                    next_head=head+1;
+  int                    bins=bm->queue_bins;
+  int                    minmax_head,new_minmax_head;
+  
+  ogg_uint32_t           *head_ptr;
+  oggpack_buffer          temp;
+
+  if(!bm->queue_binned){
+    oggpack_buffer temp;
+    /* not a bitrate managed stream, but for API simplicity, we'll
+       buffer one packet to keep the code path clean */
+    
+    if(bm->queue_head)return(-1); /* one has been submitted without
+                                     being claimed */
+    bm->queue_head++;
+
+    bm->packets[0].packet=oggpack_get_buffer(&vb->opb);
+    bm->packets[0].bytes=oggpack_bytes(&vb->opb);
+    bm->packets[0].b_o_s=0;
+    bm->packets[0].e_o_s=vb->eofflag;
+    bm->packets[0].granulepos=vb->granulepos;
+    bm->packets[0].packetno=vb->sequence; /* for sake of completeness */
+
+    memcpy(&temp,bm->packetbuffers,sizeof(vb->opb));
+    memcpy(bm->packetbuffers,&vb->opb,sizeof(vb->opb));
+    memcpy(&vb->opb,&temp,sizeof(vb->opb));
+
+    return(0);
+  }
+
+  /* add encoded packet to head */
+  if(next_head>=bm->queue_size)next_head=0;
+  head_ptr=bm->queue_binned+bins*head;
+
+  /* is there room to add a block? In proper use of the API, this will
+     never come up... but guard it anyway */
+  if(next_head==bm->avg_tail || next_head==bm->minmax_tail)return(-1);
+
+  /* add the block to the toplevel queue */
+  bm->queue_head=next_head;
+  bm->queue_actual[head]=(vb->W?0x80000000UL:0);
+
+  /* buffer packet fields */
+  bm->packets[head].packet=oggpack_get_buffer(&vb->opb);
+  bm->packets[head].bytes=oggpack_bytes(&vb->opb);
+  bm->packets[head].b_o_s=0;
+  bm->packets[head].e_o_s=vb->eofflag;
+  bm->packets[head].granulepos=vb->granulepos;
+  bm->packets[head].packetno=vb->sequence; /* for sake of completeness */
+
+  /* swap packet buffers */
+  memcpy(&temp,bm->packetbuffers+head,sizeof(vb->opb));
+  memcpy(bm->packetbuffers+head,&vb->opb,sizeof(vb->opb));
+  memcpy(&vb->opb,&temp,sizeof(vb->opb));
+
+  /* save markers */
+  head_ptr[0]=vbi->packetblob_markers[0];
+  for(i=1;i<PACKETBLOBS;i++){
+    head_ptr[i]=vbi->packetblob_markers[i]-vbi->packetblob_markers[i-1];
+  }
+
+  if(bm->avg_binacc)
+    new_minmax_head=minmax_head=bm->avg_center;
+  else
+    new_minmax_head=minmax_head=head;
+
+  /* the average tracking queue is updated first; its results (if it's
+     in use) are taken into account by the min/max limiter (if min/max
+     is in use) */
+  if(bm->avg_binacc){
+    unsigned long desired_center=bm->avg_centerdesired;
+    if(eofflag)desired_center=0;
+
+    /* update the avg head */
+    for(i=0;i<bins;i++)
+      bm->avg_binacc[i]+=LACING_ADJUST(head_ptr[i]);
+    bm->avg_sampleacc+=ci->blocksizes[vb->W]>>1;
+    bm->avg_centeracc+=ci->blocksizes[vb->W]>>1;
+
+    if(bm->avg_sampleacc>bm->avg_sampledesired || eofflag){
+
+      /* update the avg center */
+      if(bm->avg_centeracc>desired_center){
+	/* choose the new average floater */
+	int samples=ci->blocksizes[vb->W]>>1;
+	double upper=floater_interpolate(bm,vi,bi->queue_avgmax);
+	double lower=floater_interpolate(bm,vi,bi->queue_avgmin);
+	double new=PACKETBLOBS/2.,slew;
+	int bin;
+	
+	if(upper<new)new=upper;
+	if(lower>new)new=lower;
+	
+	slew=(new-bm->avgfloat)/samples*vi->rate;
+	
+	if(slew<bi->avgfloat_downslew_max)
+	  new=bm->avgfloat+bi->avgfloat_downslew_max/vi->rate*samples;
+	if(slew>bi->avgfloat_upslew_max)
+	  new=bm->avgfloat+bi->avgfloat_upslew_max/vi->rate*samples;
+	
+	bm->avgfloat=new;
+	/* apply the average floater to new blocks */
+	bin=rint(bm->avgfloat);
+
+	/*fprintf(stderr,"%d ",bin);*/
+	
+	while(bm->avg_centeracc>desired_center){
+	  samples=ci->blocksizes[bm->queue_actual[bm->avg_center]&
+				0x80000000UL?1:0]>>1;
+	  
+	  bm->queue_actual[bm->avg_center]|=bin;
+	  
+	  bm->avg_centeracc-=samples;
+	  bm->avg_center++;
+	  if(bm->avg_center>=bm->queue_size)bm->avg_center=0;
+	}
+	new_minmax_head=bm->avg_center;
+	
+      }
+      
+      /* update the avg tail if needed */
+      while(bm->avg_sampleacc>bm->avg_sampledesired){
+	int samples=
+	  ci->blocksizes[bm->queue_actual[bm->avg_tail]&0x80000000UL?1:0]>>1;
+	for(i=0;i<bm->queue_bins;i++)
+	  bm->avg_binacc[i]-=LACING_ADJUST(bm->queue_binned[bins*bm->avg_tail+i]);
+	bm->avg_sampleacc-=samples;
+	bm->avg_tail++;
+	if(bm->avg_tail>=bm->queue_size)bm->avg_tail=0;
+      }
+      
+      
+    }
+  }else{
+    /* if we're not using an average tracker, the 'float' is nailed to
+       the avgfloat_initial value.  It needs to be set for the min/max
+       to deal properly */
+    long bin=PACKETBLOBS/2;
+    bm->queue_actual[head]|=bin;
+    new_minmax_head=next_head;
+  }	
+  
+  /* update the min/max queues and enforce limits */
+  if(bm->minmax_binstack){
+    unsigned long sampledesired=eofflag?0:bm->minmax_sampledesired;
+    
+    /* add to stack recent */
+    while(minmax_head!=new_minmax_head){
+      unsigned int i;
+      int samples=ci->blocksizes[bm->queue_actual[minmax_head]&
+				0x80000000UL?1:0]>>1;
+      int actual=bm->queue_actual[minmax_head]&0x7fffffffUL;
+
+      for(i=0;i<(unsigned int)bins;i++){
+	bm->minmax_binstack[bm->minmax_stackptr*bins*2+bins+i]+=
+	  LACING_ADJUST(BINBYTES(bm,minmax_head,
+				actual>i?actual:i));
+	
+	bm->minmax_binstack[bm->minmax_stackptr*bins*2+i]+=
+	  LACING_ADJUST(BINBYTES(bm,minmax_head,
+				actual<i?actual:i));
+      }
+      
+      bm->minmax_posstack[bm->minmax_stackptr]=minmax_head; /* not one
+							       past
+							       like
+							       typical */
+      bm->minmax_limitstack[bm->minmax_stackptr]=0;
+      bm->minmax_sampleacc+=samples;
+      bm->minmax_acctotal+=
+	LACING_ADJUST(BINBYTES(bm,minmax_head,actual));
+      
+      minmax_head++;
+      if(minmax_head>=bm->queue_size)minmax_head=0;
+
+
+    }
+    
+    /* check limits, enforce changes */
+    if(bm->minmax_sampleacc>sampledesired){
+      double bitrate=(double)(bm->minmax_acctotal*8)/
+	bm->minmax_sampleacc*vi->rate;
+      int limit=0;
+      
+      if((bi->queue_hardmax>0 && bitrate>bi->queue_hardmax) || 
+	 (bi->queue_hardmin>0 && bitrate<bi->queue_hardmin)){
+	int newstack;
+	int stackctr;
+	long bitsum=bm->minmax_acctotal*8;
+
+	bitrate=(double)bitsum/bm->minmax_sampleacc*vi->rate;
+
+	/* we're off rate.  Iteratively try out new hard floater
+           limits until we find one that brings us inside.  Here's
+           where we see the whole point of the limit stacks.  */
+	if(bi->queue_hardmax>0 && bitrate>bi->queue_hardmax){
+	  for(limit=-1;limit>-bins+1;limit--){
+	    long bitsum=limit_sum(bm,limit)*8;
+	    bitrate=(double)bitsum/bm->minmax_sampleacc*vi->rate;
+	    if(bitrate<=bi->queue_hardmax)break;
+	  }
+	}else if(bitrate<bi->queue_hardmin){
+	  for(limit=1;limit<bins-1;limit++){
+	    long bitsum=limit_sum(bm,limit)*8;
+	    bitrate=(double)bitsum/bm->minmax_sampleacc*vi->rate;
+	    if(bitrate>=bi->queue_hardmin)break;
+	  }
+	  if(bitrate>bi->queue_hardmax)limit--;
+	}
+
+	/* trace the limit backward, stop when we see a lower limit */
+	newstack=bm->minmax_stackptr-1;
+	while(newstack>=0){
+	  if(bm->minmax_limitstack[newstack]<limit)break;
+	  newstack--;
+	}
+	
+	/* update bit counter with new limit and replace any stack
+           limits that have been replaced by our new lower limit */
+	stackctr=bm->minmax_stackptr;
+	while(stackctr>newstack){
+	  bm->minmax_acctotal-=
+	    LIMITBYTES(stackctr,bm->minmax_limitstack[stackctr]);
+	  bm->minmax_acctotal+=LIMITBYTES(stackctr,limit);
+	  
+	  if(stackctr<bm->minmax_stackptr)
+	    for(i=0;i<bins*2;i++)
+	      bm->minmax_binstack[stackctr*bins*2+i]+=
+		bm->minmax_binstack[(stackctr+1)*bins*2+i];
+
+	  stackctr--;
+	}
+	stackctr++;
+	bm->minmax_posstack[stackctr]=bm->minmax_posstack[bm->minmax_stackptr];
+	bm->minmax_limitstack[stackctr]=limit;
+
+	/* set up new blank stack entry */
+	stackctr++;
+	bm->minmax_stackptr=stackctr;
+	memset(&bm->minmax_binstack[stackctr*bins*2],
+	       0,
+	       sizeof(*bm->minmax_binstack)*bins*2);
+	bm->minmax_limitstack[stackctr]=0;
+	bm->minmax_posstack[stackctr]=-1;
+	
+      }
+    }
+    
+    /* remove from tail */
+    while(bm->minmax_sampleacc>sampledesired){
+      int samples=
+	ci->blocksizes[bm->queue_actual[bm->minmax_tail]&0x80000000UL?1:0]>>1;
+      int actual=bm->queue_actual[bm->minmax_tail]&0x7fffffffUL;
+
+      for(i=0;i<bins;i++){
+	bm->minmax_binstack[bins+i]-= /* always comes off the stack bottom */
+	  LACING_ADJUST(BINBYTES(bm,bm->minmax_tail,
+				actual>i?
+				actual:i));
+	bm->minmax_binstack[i]-= 
+	  LACING_ADJUST(BINBYTES(bm,bm->minmax_tail,
+				actual<i?
+				actual:i));
+      }
+
+      if(bm->minmax_limitstack[0]>actual)
+	actual=bm->minmax_limitstack[0];
+      if(bins+bm->minmax_limitstack[0]<actual)
+	actual=bins+bm->minmax_limitstack[0];
+      
+      bm->minmax_acctotal-=LACING_ADJUST(BINBYTES(bm,bm->minmax_tail,actual));
+      bm->minmax_sampleacc-=samples;
+
+      /* revise queue_actual to reflect the limit */
+      bm->queue_actual[bm->minmax_tail]&=0x80000000UL;
+      bm->queue_actual[bm->minmax_tail]|=actual;
+      
+      if(bm->minmax_tail==bm->minmax_posstack[0]){
+	/* the stack becomes a FIFO; the first data has fallen off */
+	memmove(bm->minmax_binstack,bm->minmax_binstack+bins*2,
+		sizeof(*bm->minmax_binstack)*bins*2*bm->minmax_stackptr);
+	memmove(bm->minmax_posstack,bm->minmax_posstack+1,
+		sizeof(*bm->minmax_posstack)*bm->minmax_stackptr);
+	memmove(bm->minmax_limitstack,bm->minmax_limitstack+1,
+		sizeof(*bm->minmax_limitstack)*bm->minmax_stackptr);
+	bm->minmax_stackptr--;
+      }
+      
+      bm->minmax_tail++;
+      if(bm->minmax_tail>=bm->queue_size)bm->minmax_tail=0;
+
+    }
+    
+    
+    bm->last_to_flush=bm->minmax_tail;
+  }else{
+    bm->last_to_flush=bm->avg_center;
+  }
+  if(eofflag)
+    bm->last_to_flush=bm->queue_head;
+  return(0);
+}
+
+int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){
+  backend_lookup_state  *b=vd->backend_state;
+  bitrate_manager_state *bm=&b->bms;
+
+  if(bm->queue_size==0){
+    if(bm->queue_head==0)return(0);
+
+    memcpy(op,bm->packets,sizeof(*op));
+    bm->queue_head=0;
+
+  }else{
+
+    if(bm->next_to_flush==bm->last_to_flush)return(0);
+
+    {
+      long bin=bm->queue_actual[bm->next_to_flush]&0x7fffffff,i;
+      long bins=bm->queue_bins;
+      ogg_uint32_t *markers=bm->queue_binned+bins*bm->next_to_flush;
+      long bytes=markers[bin];
+
+      memcpy(op,bm->packets+bm->next_to_flush,sizeof(*op));
+
+      /* we have [PACKETBLOBS] possible packets all squished together in
+	 the buffer, in sequence.  count in to number [bin] */
+      for(i=0;i<bin;i++)
+	op->packet+=markers[i];
+      op->bytes=bytes;
+	
+    }
+
+    bm->next_to_flush++;
+    if(bm->next_to_flush>=bm->queue_size)bm->next_to_flush=0;
+
+  }
+
+  return(1);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/bitrate.h
@@ -1,0 +1,84 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: bitrate tracking and management
+ last mod: $Id: bitrate.h,v 1.7 2002/07/11 06:40:48 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_BITRATE_H_
+#define _V_BITRATE_H_
+
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "os.h"
+
+/* encode side bitrate tracking */
+typedef struct bitrate_manager_state {
+  ogg_uint32_t  *queue_binned;
+  ogg_uint32_t  *queue_actual;
+  int            queue_size;
+
+  int            queue_head;
+  int            queue_bins;
+
+  long          *avg_binacc;
+  int            avg_center;
+  int            avg_tail;
+  ogg_uint32_t   avg_centeracc;
+  ogg_uint32_t   avg_sampleacc;
+  ogg_uint32_t   avg_sampledesired;
+  ogg_uint32_t   avg_centerdesired;
+
+  long          *minmax_binstack;
+  long          *minmax_posstack;
+  long          *minmax_limitstack;
+  long           minmax_stackptr;
+
+  long           minmax_acctotal;
+  int            minmax_tail;
+  ogg_uint32_t   minmax_sampleacc;
+  ogg_uint32_t   minmax_sampledesired;
+
+  int            next_to_flush;
+  int            last_to_flush;
+  
+  double         avgfloat;
+
+  /* unfortunately, we need to hold queued packet data somewhere */
+  oggpack_buffer *packetbuffers;
+  ogg_packet     *packets;
+
+} bitrate_manager_state;
+
+typedef struct bitrate_manager_info{
+  /* detailed bitrate management setup */
+  double queue_avg_time;
+  double queue_avg_center;
+  double queue_minmax_time;
+  double queue_hardmin;
+  double queue_hardmax;
+  double queue_avgmin;
+  double queue_avgmax;
+
+  double avgfloat_downslew_max;
+  double avgfloat_upslew_max;
+
+} bitrate_manager_info;
+
+extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs);
+extern void vorbis_bitrate_clear(bitrate_manager_state *bs);
+extern int vorbis_bitrate_managed(vorbis_block *vb);
+extern int vorbis_bitrate_addblock(vorbis_block *vb);
+extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op);
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/block.c
@@ -1,0 +1,838 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: PCM data vector blocking, windowing and dis/reassembly
+ last mod: $Id: block.c,v 1.67 2002/07/11 06:40:48 xiphmont Exp $
+
+ Handle windowing, overlap-add, etc of the PCM vectors.  This is made
+ more amusing by Vorbis' current two allowed block sizes.
+ 
+ ********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+
+#include "window.h"
+#include "mdct.h"
+#include "lpc.h"
+#include "registry.h"
+#include "misc.h"
+
+static int ilog2(unsigned int v){
+  int ret=0;
+  if(v)--v;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+/* pcm accumulator examples (not exhaustive):
+
+ <-------------- lW ---------------->
+                   <--------------- W ---------------->
+:            .....|.....       _______________         |
+:        .'''     |     '''_---      |       |\        |
+:.....'''         |_____--- '''......|       | \_______|
+:.................|__________________|_______|__|______|
+                  |<------ Sl ------>|      > Sr <     |endW
+                  |beginSl           |endSl  |  |endSr   
+                  |beginW            |endlW  |beginSr
+
+
+                      |< lW >|       
+                   <--------------- W ---------------->
+                  |   |  ..  ______________            |
+                  |   | '  `/        |     ---_        |
+                  |___.'___/`.       |         ---_____| 
+                  |_______|__|_______|_________________|
+                  |      >|Sl|<      |<------ Sr ----->|endW
+                  |       |  |endSl  |beginSr          |endSr
+                  |beginW |  |endlW                     
+                  mult[0] |beginSl                     mult[n]
+
+ <-------------- lW ----------------->
+                          |<--W-->|                               
+:            ..............  ___  |   |                    
+:        .'''             |`/   \ |   |                       
+:.....'''                 |/`....\|...|                    
+:.........................|___|___|___|                  
+                          |Sl |Sr |endW    
+                          |   |   |endSr
+                          |   |beginSr
+                          |   |endSl
+			  |beginSl
+			  |beginW
+*/
+
+/* block abstraction setup *********************************************/
+
+#ifndef WORD_ALIGN
+#define WORD_ALIGN 8
+#endif
+
+int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
+  memset(vb,0,sizeof(*vb));
+  vb->vd=v;
+  vb->localalloc=0;
+  vb->localstore=NULL;
+  if(v->analysisp){
+    vorbis_block_internal *vbi=
+      vb->internal=_ogg_calloc(1,sizeof(vorbis_block_internal));
+    oggpack_writeinit(&vb->opb);
+    vbi->ampmax=-9999;
+  }
+  
+  return(0);
+}
+
+void *_vorbis_block_alloc(vorbis_block *vb,long bytes){
+  bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1);
+  if(bytes+vb->localtop>vb->localalloc){
+    /* can't just _ogg_realloc... there are outstanding pointers */
+    if(vb->localstore){
+      struct alloc_chain *link=_ogg_malloc(sizeof(*link));
+      vb->totaluse+=vb->localtop;
+      link->next=vb->reap;
+      link->ptr=vb->localstore;
+      vb->reap=link;
+    }
+    /* highly conservative */
+    vb->localalloc=bytes;
+    vb->localstore=_ogg_malloc(vb->localalloc);
+    vb->localtop=0;
+  }
+  {
+    void *ret=(void *)(((char *)vb->localstore)+vb->localtop);
+    vb->localtop+=bytes;
+    return ret;
+  }
+}
+
+/* reap the chain, pull the ripcord */
+void _vorbis_block_ripcord(vorbis_block *vb){
+  /* reap the chain */
+  struct alloc_chain *reap=vb->reap;
+  while(reap){
+    struct alloc_chain *next=reap->next;
+    _ogg_free(reap->ptr);
+    memset(reap,0,sizeof(*reap));
+    _ogg_free(reap);
+    reap=next;
+  }
+  /* consolidate storage */
+  if(vb->totaluse){
+    vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc);
+    vb->localalloc+=vb->totaluse;
+    vb->totaluse=0;
+  }
+
+  /* pull the ripcord */
+  vb->localtop=0;
+  vb->reap=NULL;
+}
+
+int vorbis_block_clear(vorbis_block *vb){
+  if(vb->vd)
+    if(vb->vd->analysisp)
+      oggpack_writeclear(&vb->opb);
+  _vorbis_block_ripcord(vb);
+  if(vb->localstore)_ogg_free(vb->localstore);
+
+  if(vb->internal)
+    _ogg_free(vb->internal);
+
+  memset(vb,0,sizeof(*vb));
+  return(0);
+}
+
+/* Analysis side code, but directly related to blocking.  Thus it's
+   here and not in analysis.c (which is for analysis transforms only).
+   The init is here because some of it is shared */
+
+static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){
+  int i;
+  codec_setup_info *ci=vi->codec_setup;
+  backend_lookup_state *b=NULL;
+
+  memset(v,0,sizeof(*v));
+  b=v->backend_state=_ogg_calloc(1,sizeof(*b));
+
+  v->vi=vi;
+  b->modebits=ilog2(ci->modes);
+
+  b->transform[0]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[0]));
+  b->transform[1]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[1]));
+
+  /* MDCT is tranform 0 */
+
+  b->transform[0][0]=_ogg_calloc(1,sizeof(mdct_lookup));
+  b->transform[1][0]=_ogg_calloc(1,sizeof(mdct_lookup));
+  mdct_init(b->transform[0][0],ci->blocksizes[0]);
+  mdct_init(b->transform[1][0],ci->blocksizes[1]);
+
+  /* Vorbis I uses only window type 0 */
+  b->window[0]=_vorbis_window(0,ci->blocksizes[0]/2);
+  b->window[1]=_vorbis_window(0,ci->blocksizes[1]/2);
+
+  if(encp){ /* encode/decode differ here */
+
+    /* analysis always needs an fft */
+    drft_init(&b->fft_look[0],ci->blocksizes[0]);
+    drft_init(&b->fft_look[1],ci->blocksizes[1]);
+
+    /* finish the codebooks */
+    if(!ci->fullbooks){
+      ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks));
+      for(i=0;i<ci->books;i++)
+	vorbis_book_init_encode(ci->fullbooks+i,ci->book_param[i]);
+    }
+
+    b->psy=_ogg_calloc(ci->psys,sizeof(*b->psy));
+    for(i=0;i<ci->psys;i++){
+      _vp_psy_init(b->psy+i,
+		   ci->psy_param[i],
+		   &ci->psy_g_param,
+		   ci->blocksizes[ci->psy_param[i]->blockflag]/2,
+		   vi->rate);
+    }
+
+    v->analysisp=1;
+  }else{
+    /* finish the codebooks */
+    if(!ci->fullbooks){
+      ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks));
+      for(i=0;i<ci->books;i++){
+	vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]);
+	/* decode codebooks are now standalone after init */
+	vorbis_staticbook_destroy(ci->book_param[i]);
+	ci->book_param[i]=NULL;
+      }
+    }
+  }
+
+  /* initialize the storage vectors. blocksize[1] is small for encode,
+     but the correct size for decode */
+  v->pcm_storage=ci->blocksizes[1];
+  v->pcm=_ogg_malloc(vi->channels*sizeof(*v->pcm));
+  v->pcmret=_ogg_malloc(vi->channels*sizeof(*v->pcmret));
+  {
+    int i;
+    for(i=0;i<vi->channels;i++)
+      v->pcm[i]=_ogg_calloc(v->pcm_storage,sizeof(*v->pcm[i]));
+  }
+
+  /* all 1 (large block) or 0 (small block) */
+  /* explicitly set for the sake of clarity */
+  v->lW=0; /* previous window size */
+  v->W=0;  /* current window size */
+
+  /* all vector indexes */
+  v->centerW=ci->blocksizes[1]/2;
+
+  v->pcm_current=v->centerW;
+
+  /* initialize all the backend lookups */
+  b->flr=_ogg_calloc(ci->floors,sizeof(*b->flr));
+  b->residue=_ogg_calloc(ci->residues,sizeof(*b->residue));
+
+  for(i=0;i<ci->floors;i++)
+    b->flr[i]=_floor_P[ci->floor_type[i]]->
+      look(v,ci->floor_param[i]);
+
+  for(i=0;i<ci->residues;i++)
+    b->residue[i]=_residue_P[ci->residue_type[i]]->
+      look(v,ci->residue_param[i]);    
+
+  return(0);
+}
+
+/* arbitrary settings and spec-mandated numbers get filled in here */
+int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi){
+  backend_lookup_state *b=NULL;
+
+  _vds_shared_init(v,vi,1);
+  b=v->backend_state;
+  b->psy_g_look=_vp_global_look(vi);
+
+  /* Initialize the envelope state storage */
+  b->ve=_ogg_calloc(1,sizeof(*b->ve));
+  _ve_envelope_init(b->ve,vi);
+
+  vorbis_bitrate_init(vi,&b->bms);
+
+  return(0);
+}
+
+void vorbis_dsp_clear(vorbis_dsp_state *v){
+  int i;
+  if(v){
+    vorbis_info *vi=v->vi;
+    codec_setup_info *ci=(vi?vi->codec_setup:NULL);
+    backend_lookup_state *b=v->backend_state;
+
+    if(b){
+      if(b->window[0])
+	_ogg_free(b->window[0]);
+      if(b->window[1])
+	_ogg_free(b->window[1]);
+	
+      if(b->ve){
+	_ve_envelope_clear(b->ve);
+	_ogg_free(b->ve);
+      }
+
+      if(b->transform[0]){
+	mdct_clear(b->transform[0][0]);
+	_ogg_free(b->transform[0][0]);
+	_ogg_free(b->transform[0]);
+      }
+      if(b->transform[1]){
+	mdct_clear(b->transform[1][0]);
+	_ogg_free(b->transform[1][0]);
+	_ogg_free(b->transform[1]);
+      }
+
+      if(b->flr){
+	for(i=0;i<ci->floors;i++)
+	  _floor_P[ci->floor_type[i]]->
+	    free_look(b->flr[i]);
+	_ogg_free(b->flr);
+      }
+      if(b->residue){
+	for(i=0;i<ci->residues;i++)
+	  _residue_P[ci->residue_type[i]]->
+	    free_look(b->residue[i]);
+	_ogg_free(b->residue);
+      }
+      if(b->psy){
+	for(i=0;i<ci->psys;i++)
+	  _vp_psy_clear(b->psy+i);
+	_ogg_free(b->psy);
+      }
+
+      if(b->psy_g_look)_vp_global_free(b->psy_g_look);
+      vorbis_bitrate_clear(&b->bms);
+
+      drft_clear(&b->fft_look[0]);
+      drft_clear(&b->fft_look[1]);
+
+    }
+    
+    if(v->pcm){
+      for(i=0;i<vi->channels;i++)
+	if(v->pcm[i])_ogg_free(v->pcm[i]);
+      _ogg_free(v->pcm);
+      if(v->pcmret)_ogg_free(v->pcmret);
+    }
+
+    if(b){
+      /* free header, header1, header2 */
+      if(b->header)_ogg_free(b->header);
+      if(b->header1)_ogg_free(b->header1);
+      if(b->header2)_ogg_free(b->header2);
+      _ogg_free(b);
+    }
+    
+    memset(v,0,sizeof(*v));
+  }
+}
+
+float **vorbis_analysis_buffer(vorbis_dsp_state *v, int vals){
+  int i;
+  vorbis_info *vi=v->vi;
+  backend_lookup_state *b=v->backend_state;
+
+  /* free header, header1, header2 */
+  if(b->header)_ogg_free(b->header);b->header=NULL;
+  if(b->header1)_ogg_free(b->header1);b->header1=NULL;
+  if(b->header2)_ogg_free(b->header2);b->header2=NULL;
+
+  /* Do we have enough storage space for the requested buffer? If not,
+     expand the PCM (and envelope) storage */
+    
+  if(v->pcm_current+vals>=v->pcm_storage){
+    v->pcm_storage=v->pcm_current+vals*2;
+   
+    for(i=0;i<vi->channels;i++){
+      v->pcm[i]=_ogg_realloc(v->pcm[i],v->pcm_storage*sizeof(*v->pcm[i]));
+    }
+  }
+
+  for(i=0;i<vi->channels;i++)
+    v->pcmret[i]=v->pcm[i]+v->pcm_current;
+    
+  return(v->pcmret);
+}
+
+static void _preextrapolate_helper(vorbis_dsp_state *v){
+  int i;
+  int order=32;
+  float *lpc=malloc(order*sizeof(*lpc));
+  float *work=malloc(v->pcm_current*sizeof(*work));
+  long j;
+  v->preextrapolate=1;
+
+  if(v->pcm_current-v->centerW>order*2){ /* safety */
+    for(i=0;i<v->vi->channels;i++){
+      /* need to run the extrapolation in reverse! */
+      for(j=0;j<v->pcm_current;j++)
+	work[j]=v->pcm[i][v->pcm_current-j-1];
+      
+      /* prime as above */
+      vorbis_lpc_from_data(work,lpc,v->pcm_current-v->centerW,order);
+      
+      /* run the predictor filter */
+      vorbis_lpc_predict(lpc,work+v->pcm_current-v->centerW-order,
+			 order,
+			 work+v->pcm_current-v->centerW,
+			 v->centerW);
+
+      for(j=0;j<v->pcm_current;j++)
+	v->pcm[i][v->pcm_current-j-1]=work[j];
+
+    }
+  }
+  free(work);
+  free(lpc);
+  return;
+}
+
+
+/* call with val<=0 to set eof */
+
+int vorbis_analysis_wrote(vorbis_dsp_state *v, int vals){
+  vorbis_info *vi=v->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  /*backend_lookup_state *b=v->backend_state;*/
+
+  if(vals<=0){
+    int order=32;
+    int i;
+    float *lpc=malloc(order*sizeof(*lpc));
+
+    /* if it wasn't done earlier (very short sample) */
+    if(!v->preextrapolate)
+      _preextrapolate_helper(v);
+
+    /* We're encoding the end of the stream.  Just make sure we have
+       [at least] a few full blocks of zeroes at the end. */
+    /* actually, we don't want zeroes; that could drop a large
+       amplitude off a cliff, creating spread spectrum noise that will
+       suck to encode.  Extrapolate for the sake of cleanliness. */
+
+    vorbis_analysis_buffer(v,ci->blocksizes[1]*3); 
+    v->eofflag=v->pcm_current;
+    v->pcm_current+=ci->blocksizes[1]*3;
+
+    for(i=0;i<vi->channels;i++){
+      if(v->eofflag>order*2){
+	/* extrapolate with LPC to fill in */
+	long n;
+
+	/* make a predictor filter */
+	n=v->eofflag;
+	if(n>ci->blocksizes[1])n=ci->blocksizes[1];
+	vorbis_lpc_from_data(v->pcm[i]+v->eofflag-n,lpc,n,order);
+
+	/* run the predictor filter */
+	vorbis_lpc_predict(lpc,v->pcm[i]+v->eofflag-order,order,
+			   v->pcm[i]+v->eofflag,v->pcm_current-v->eofflag);
+      }else{
+	/* not enough data to extrapolate (unlikely to happen due to
+           guarding the overlap, but bulletproof in case that
+           assumtion goes away). zeroes will do. */
+	memset(v->pcm[i]+v->eofflag,0,
+	       (v->pcm_current-v->eofflag)*sizeof(*v->pcm[i]));
+
+      }
+    }
+    free(lpc);
+  }else{
+
+    if(v->pcm_current+vals>v->pcm_storage) {
+      return(OV_EINVAL);
+    }
+    v->pcm_current+=vals;
+
+    /* we may want to reverse extrapolate the beginning of a stream
+       too... in case we're beginning on a cliff! */
+    /* clumsy, but simple.  It only runs once, so simple is good. */
+    if(!v->preextrapolate && v->pcm_current-v->centerW>ci->blocksizes[1])
+      _preextrapolate_helper(v);
+
+  }
+  return(0);
+}
+
+/* do the deltas, envelope shaping, pre-echo and determine the size of
+   the next block on which to continue analysis */
+int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){
+  int i;
+  vorbis_info *vi=v->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  backend_lookup_state *b=v->backend_state;
+  vorbis_look_psy_global *g=b->psy_g_look;
+  vorbis_info_psy_global *gi=&ci->psy_g_param;
+  long beginW=v->centerW-ci->blocksizes[v->W]/2,centerNext;
+  vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal;
+
+  /* check to see if we're started... */
+  if(!v->preextrapolate)return(0);
+
+  /* check to see if we're done... */
+  if(v->eofflag==-1)return(0);
+
+  /* By our invariant, we have lW, W and centerW set.  Search for
+     the next boundary so we can determine nW (the next window size)
+     which lets us compute the shape of the current block's window */
+
+  /* we do an envelope search even on a single blocksize; we may still
+     be throwing more bits at impulses, and envelope search handles
+     marking impulses too. */
+  {  
+    long bp=_ve_envelope_search(v);
+
+    if(bp==-1){
+
+      if(v->eofflag==0) return(0); /* not enough data currently to search for a
+				     full long block */
+      v->nW=0;
+    }else{
+
+      if(ci->blocksizes[0]==ci->blocksizes[1])
+	v->nW=0;
+      else
+	v->nW=bp;
+    }
+  }
+
+  centerNext=v->centerW+ci->blocksizes[v->W]/4+ci->blocksizes[v->nW]/4;
+
+  {
+    /* center of next block + next block maximum right side. */
+
+    long blockbound=centerNext+ci->blocksizes[v->nW]/2;
+    if(v->pcm_current<blockbound)return(0); /* not enough data yet;
+                                               although this check is
+                                               less strict that the
+                                               _ve_envelope_search,
+                                               the search is not run
+                                               if we only use one
+                                               block size */
+
+
+  }
+  
+  /* fill in the block.  Note that for a short window, lW and nW are *short*
+     regardless of actual settings in the stream */
+
+  _vorbis_block_ripcord(vb);
+  vb->lW=v->lW;
+  vb->W=v->W;
+  vb->nW=v->nW;
+
+  if(v->W){
+    if(!v->lW || !v->nW){
+      vbi->blocktype=BLOCKTYPE_TRANSITION;
+      fprintf(stderr,"-");
+    }else{
+      vbi->blocktype=BLOCKTYPE_LONG;
+      fprintf(stderr,"_");
+    }
+  }else{
+    if(_ve_envelope_mark(v)){
+      vbi->blocktype=BLOCKTYPE_IMPULSE;
+      fprintf(stderr,"|");
+
+    }else{
+      vbi->blocktype=BLOCKTYPE_PADDING;
+      fprintf(stderr,".");
+
+    }
+  }
+ 
+  vb->vd=v;
+  vb->sequence=v->sequence++;
+  vb->granulepos=v->granulepos;
+  vb->pcmend=ci->blocksizes[v->W];
+  
+  /* copy the vectors; this uses the local storage in vb */
+
+  /* this tracks 'strongest peak' for later psychoacoustics */
+  /* moved to the global psy state; clean this mess up */
+  if(vbi->ampmax>g->ampmax)g->ampmax=vbi->ampmax;
+  g->ampmax=_vp_ampmax_decay(g->ampmax,v);
+  vbi->ampmax=g->ampmax;
+  
+  vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels);
+  vbi->pcmdelay=_vorbis_block_alloc(vb,sizeof(*vbi->pcmdelay)*vi->channels);
+  for(i=0;i<vi->channels;i++){
+    vbi->pcmdelay[i]=
+      _vorbis_block_alloc(vb,(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i]));
+    memcpy(vbi->pcmdelay[i],v->pcm[i],(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i]));
+    vb->pcm[i]=vbi->pcmdelay[i]+beginW;
+    
+    /* before we added the delay 
+       vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i]));
+       memcpy(vb->pcm[i],v->pcm[i]+beginW,ci->blocksizes[v->W]*sizeof(*vb->pcm[i]));
+    */
+    
+  }
+  
+  /* handle eof detection: eof==0 means that we've not yet received EOF
+                           eof>0  marks the last 'real' sample in pcm[]
+                           eof<0  'no more to do'; doesn't get here */
+
+  if(v->eofflag){
+    if(v->centerW>=v->eofflag){
+      v->eofflag=-1;
+      vb->eofflag=1;
+      return(1);
+    }
+  }
+
+  /* advance storage vectors and clean up */
+  {
+    int new_centerNext=ci->blocksizes[1]/2;
+    int movementW=centerNext-new_centerNext;
+
+    if(movementW>0){
+
+      _ve_envelope_shift(b->ve,movementW);
+      v->pcm_current-=movementW;
+      
+      for(i=0;i<vi->channels;i++)
+	memmove(v->pcm[i],v->pcm[i]+movementW,
+		v->pcm_current*sizeof(*v->pcm[i]));
+      
+      
+      v->lW=v->W;
+      v->W=v->nW;
+      v->centerW=new_centerNext;
+      
+      if(v->eofflag){
+	v->eofflag-=movementW;
+	if(v->eofflag<=0)v->eofflag=-1;
+	/* do not add padding to end of stream! */
+	if(v->centerW>=v->eofflag){
+	  v->granulepos+=movementW-(v->centerW-v->eofflag);
+	}else{
+	  v->granulepos+=movementW;
+	}
+      }else{
+	v->granulepos+=movementW;
+      }
+    }
+  }
+
+  /* done */
+  return(1);
+}
+
+int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){
+  _vds_shared_init(v,vi,0);
+
+  v->pcm_returned=-1;
+  v->granulepos=-1;
+  v->sequence=-1;
+
+  return(0);
+}
+
+/* Unlike in analysis, the window is only partially applied for each
+   block.  The time domain envelope is not yet handled at the point of
+   calling (as it relies on the previous block). */
+
+int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
+  vorbis_info *vi=v->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  int i,j;
+
+  if(!vb)return(OV_EINVAL);
+  if(v->pcm_current>v->pcm_returned  && v->pcm_returned!=-1)return(OV_EINVAL);
+    
+  v->lW=v->W;
+  v->W=vb->W;
+  v->nW=-1;
+  
+  if(v->sequence+1 != vb->sequence)v->granulepos=-1; /* out of sequence;
+							lose count */
+  v->sequence=vb->sequence;
+  
+  if(vb->pcm){  /* not pcm to process if vorbis_synthesis_trackonly 
+		   was called on block */
+    int n=ci->blocksizes[v->W]/2;
+    int n0=ci->blocksizes[0]/2;
+    int n1=ci->blocksizes[1]/2;
+    
+    int thisCenter;
+    int prevCenter;
+    
+    v->glue_bits+=vb->glue_bits;
+    v->time_bits+=vb->time_bits;
+    v->floor_bits+=vb->floor_bits;
+    v->res_bits+=vb->res_bits;
+    
+    if(v->centerW){
+      thisCenter=n1;
+      prevCenter=0;
+    }else{
+	thisCenter=0;
+	prevCenter=n1;
+    }
+    
+    /* v->pcm is now used like a two-stage double buffer.  We don't want
+       to have to constantly shift *or* adjust memory usage.  Don't
+       accept a new block until the old is shifted out */
+    
+    /* overlap/add PCM */
+    
+    for(j=0;j<vi->channels;j++){
+      /* the overlap/add section */
+      if(v->lW){
+	if(v->W){
+	  /* large/large */
+	  float *pcm=v->pcm[j]+prevCenter;
+	  float *p=vb->pcm[j];
+	  for(i=0;i<n1;i++)
+	    pcm[i]+=p[i];
+	}else{
+	  /* large/small */
+	  float *pcm=v->pcm[j]+prevCenter+n1/2-n0/2;
+	  float *p=vb->pcm[j];
+	  for(i=0;i<n0;i++)
+	    pcm[i]+=p[i];
+	}
+      }else{
+	if(v->W){
+	  /* small/large */
+	  float *pcm=v->pcm[j]+prevCenter;
+	  float *p=vb->pcm[j]+n1/2-n0/2;
+	  for(i=0;i<n0;i++)
+	    pcm[i]+=p[i];
+	  for(;i<n1/2+n0/2;i++)
+	    pcm[i]=p[i];
+	}else{
+	  /* small/small */
+	  float *pcm=v->pcm[j]+prevCenter;
+	  float *p=vb->pcm[j];
+	  for(i=0;i<n0;i++)
+	    pcm[i]+=p[i];
+	}
+      }
+      
+      /* the copy section */
+      {
+	float *pcm=v->pcm[j]+thisCenter;
+	float *p=vb->pcm[j]+n;
+	for(i=0;i<n;i++)
+	  pcm[i]=p[i];
+      }
+    }
+    
+    if(v->centerW)
+      v->centerW=0;
+    else
+      v->centerW=n1;
+    
+    /* deal with initial packet state; we do this using the explicit
+       pcm_returned==-1 flag otherwise we're sensitive to first block
+       being short or long */
+    
+    if(v->pcm_returned==-1){
+      v->pcm_returned=thisCenter;
+      v->pcm_current=thisCenter;
+    }else{
+      v->pcm_returned=prevCenter;
+      v->pcm_current=prevCenter+
+	ci->blocksizes[v->lW]/4+
+	ci->blocksizes[v->W]/4;
+    }
+    
+  }
+
+  /* track the frame number... This is for convenience, but also
+     making sure our last packet doesn't end with added padding.  If
+     the last packet is partial, the number of samples we'll have to
+     return will be past the vb->granulepos.
+     
+     This is not foolproof!  It will be confused if we begin
+     decoding at the last page after a seek or hole.  In that case,
+     we don't have a starting point to judge where the last frame
+     is.  For this reason, vorbisfile will always try to make sure
+     it reads the last two marked pages in proper sequence */
+  
+  if(v->granulepos==-1){
+    if(vb->granulepos!=-1){ /* only set if we have a position to set to */
+      v->granulepos=vb->granulepos;
+    }
+  }else{
+    v->granulepos+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4;
+    if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){
+      
+      if(v->granulepos>vb->granulepos){
+	long extra=v->granulepos-vb->granulepos;
+	
+	if(vb->eofflag){
+	  /* partial last frame.  Strip the extra samples off */
+	  v->pcm_current-=extra;
+	}else if(vb->sequence == 1){
+	  /* ^^^ argh, this can be 1 from seeking! */
+	  
+	  
+	  /* partial first frame.  Discard extra leading samples */
+	  v->pcm_returned+=extra;
+	  if(v->pcm_returned>v->pcm_current)
+	    v->pcm_returned=v->pcm_current;
+	  
+	} /* else {Shouldn't happen *unless* the bitstream is out of
+	     spec.  Either way, believe the bitstream } */
+      } /* else {Shouldn't happen *unless* the bitstream is out of
+	   spec.  Either way, believe the bitstream } */
+      v->granulepos=vb->granulepos;
+    }
+  }
+  
+  /* Update, cleanup */
+  
+  if(vb->eofflag)v->eofflag=1;
+  return(0);
+  
+}
+
+/* pcm==NULL indicates we just want the pending samples, no more */
+int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm){
+  vorbis_info *vi=v->vi;
+  if(v->pcm_returned>-1 && v->pcm_returned<v->pcm_current){
+    if(pcm){
+      int i;
+      for(i=0;i<vi->channels;i++)
+	v->pcmret[i]=v->pcm[i]+v->pcm_returned;
+      *pcm=v->pcmret;
+    }
+    return(v->pcm_current-v->pcm_returned);
+  }
+  return(0);
+}
+
+int vorbis_synthesis_read(vorbis_dsp_state *v,int n){
+  if(n && v->pcm_returned+n>v->pcm_current)return(OV_EINVAL);
+  v->pcm_returned+=n;
+  return(0);
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/books/coupled/res_books_stereo.h
@@ -1,0 +1,19080 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: static codebooks autogenerated by huff/huffbuld
+ last modified: $Id: res_books_stereo.h,v 1.2 2002/07/11 10:27:51 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "codebook.h"
+static long _vq_quantlist__16c0_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c0_s_p1_0[] = {
+	 1, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0,
+	 0, 0, 0, 7, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 8, 0, 0, 0, 0,
+	 0, 0, 8,10,10, 0, 0, 0, 0, 0, 0, 8,10,10, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,10,10, 0, 0, 0,
+	 0, 0, 0, 9, 9,12, 0, 0, 0, 0, 0, 0,10,12,11, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,10,10, 0, 0,
+	 0, 0, 0, 0, 9,12,10, 0, 0, 0, 0, 0, 0,10,11,12,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8,10,10, 0, 0,
+	 0, 0, 0, 0, 8,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7,10,10, 0, 0, 0, 0, 0, 0,10,12,11, 0,
+	 0, 0, 0, 0, 0, 9,10,12, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7,10,10, 0, 0, 0, 0, 0, 0,10,11,12,
+	 0, 0, 0, 0, 0, 0, 9,12, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c0_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16c0_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p1_0 = {
+	_vq_quantthresh__16c0_s_p1_0,
+	_vq_quantmap__16c0_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _16c0_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__16c0_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16c0_s_p1_0,
+	NULL,
+	&_vq_auxt__16c0_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c0_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c0_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c0_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p2_0 = {
+	_vq_quantthresh__16c0_s_p2_0,
+	_vq_quantmap__16c0_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _16c0_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__16c0_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c0_s_p2_0,
+	NULL,
+	&_vq_auxt__16c0_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c0_s_p3_0[] = {
+	 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 6, 7, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 9, 9,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c0_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c0_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p3_0 = {
+	_vq_quantthresh__16c0_s_p3_0,
+	_vq_quantmap__16c0_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _16c0_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__16c0_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c0_s_p3_0,
+	NULL,
+	&_vq_auxt__16c0_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16c0_s_p4_0[] = {
+	 1, 3, 2, 7, 8, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c0_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16c0_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p4_0 = {
+	_vq_quantthresh__16c0_s_p4_0,
+	_vq_quantmap__16c0_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _16c0_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__16c0_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16c0_s_p4_0,
+	NULL,
+	&_vq_auxt__16c0_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16c0_s_p5_0[] = {
+	 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7,
+	 8, 8, 0, 0, 0, 7, 7, 7, 7, 8, 8, 0, 0, 0, 7, 7,
+	 8, 8, 9, 9, 0, 0, 0, 7, 7, 8, 8, 9, 9, 0, 0, 0,
+	 8, 9, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0,
+	 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__16c0_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16c0_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p5_0 = {
+	_vq_quantthresh__16c0_s_p5_0,
+	_vq_quantmap__16c0_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _16c0_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__16c0_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16c0_s_p5_0,
+	NULL,
+	&_vq_auxt__16c0_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16c0_s_p6_0[] = {
+	 1, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,11,
+	11,11, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,
+	10,11,11,12,12,12,13, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,10,10,10,
+	10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,
+	10,10,11,11,12,12,13,13,13,13, 0, 0, 0, 0, 0, 9,
+	 9,10,10,11,11,12,12,13,13,13,14, 0, 0, 0, 0, 0,
+	10,10,10,11,11,11,12,12,13,13,13,14, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,12,12,13,13,14,14, 0, 0, 0,
+	 0, 0, 0, 0,11,11,12,12,13,13,13,13,14,14, 0, 0,
+	 0, 0, 0, 0, 0,11,11,12,12,12,13,13,14,15,14, 0,
+	 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,14,14,15,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,14,13,14,
+	14,
+};
+
+static float _vq_quantthresh__16c0_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__16c0_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p6_0 = {
+	_vq_quantthresh__16c0_s_p6_0,
+	_vq_quantmap__16c0_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _16c0_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__16c0_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__16c0_s_p6_0,
+	NULL,
+	&_vq_auxt__16c0_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c0_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,11,10,10,11,
+	11,10, 4, 7, 7,10,10,10,11,10,10, 6,10,10,11,11,
+	11,11,11,10, 6, 9, 9,11,12,12,11, 9, 9, 6, 9,10,
+	11,12,12,11, 9,10, 7,11,11,11,11,11,12,13,12, 6,
+	 9,10,11,10,10,12,13,13, 6,10, 9,11,10,10,11,12,
+	13,
+};
+
+static float _vq_quantthresh__16c0_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__16c0_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p7_0 = {
+	_vq_quantthresh__16c0_s_p7_0,
+	_vq_quantmap__16c0_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _16c0_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__16c0_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__16c0_s_p7_0,
+	NULL,
+	&_vq_auxt__16c0_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16c0_s_p7_1[] = {
+	 1, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7,
+	 8, 8, 8, 9, 9, 9,10,10,10, 6, 7, 8, 8, 8, 8, 9,
+	 8,10,10,10, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, 7,
+	 7, 8, 8, 9, 9, 8, 9,10,10,10, 8, 8, 9, 9, 9, 9,
+	 9, 9,11,11,11, 8, 8, 9, 9, 9, 9, 9,10,10,11,11,
+	 9, 9, 9, 9, 9, 9, 9,10,11,11,11,10,11, 9, 9, 9,
+	 9,10, 9,11,11,11,10,11,10,10, 9, 9,10,10,11,11,
+	11,11,11, 9, 9, 9, 9,10,10,
+};
+
+static float _vq_quantthresh__16c0_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16c0_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p7_1 = {
+	_vq_quantthresh__16c0_s_p7_1,
+	_vq_quantmap__16c0_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _16c0_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__16c0_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16c0_s_p7_1,
+	NULL,
+	&_vq_auxt__16c0_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c0_s_p8_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 7, 6, 8, 8,10,10, 6, 5, 6,
+	 8, 8, 8, 8, 8, 8, 8, 9,10,10, 7, 6, 6, 8, 8, 8,
+	 8, 8, 8, 8, 8,10,10, 0, 8, 8, 8, 8, 9, 8, 9, 9,
+	 9,10,10,10, 0, 9, 8, 8, 8, 9, 9, 8, 8, 9, 9,10,
+	10, 0,12,11, 8, 8, 9, 9, 9, 9,10,10,11,10, 0,12,
+	13, 8, 8, 9,10, 9, 9,11,11,11,12, 0, 0, 0, 8, 8,
+	 8, 8,10, 9,12,13,12,14, 0, 0, 0, 8, 8, 8, 9,10,
+	10,12,12,13,14, 0, 0, 0,13,13, 9, 9,11,11, 0, 0,
+	14, 0, 0, 0, 0,14,14,10,10,12,11,12,14,14,14, 0,
+	 0, 0, 0, 0,11,11,13,13,14,13,14,14, 0, 0, 0, 0,
+	 0,12,13,13,12,13,14,14,14,
+};
+
+static float _vq_quantthresh__16c0_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__16c0_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p8_0 = {
+	_vq_quantthresh__16c0_s_p8_0,
+	_vq_quantmap__16c0_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _16c0_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__16c0_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__16c0_s_p8_0,
+	NULL,
+	&_vq_auxt__16c0_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c0_s_p8_1[] = {
+	 1, 4, 3, 5, 5, 7, 7, 7, 6, 6, 7, 7, 7, 5, 5, 7,
+	 7, 7, 6, 6, 7, 7, 7, 6, 6,
+};
+
+static float _vq_quantthresh__16c0_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c0_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p8_1 = {
+	_vq_quantthresh__16c0_s_p8_1,
+	_vq_quantmap__16c0_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _16c0_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__16c0_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c0_s_p8_1,
+	NULL,
+	&_vq_auxt__16c0_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p9_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c0_s_p9_0[] = {
+	 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__16c0_s_p9_0[] = {
+	-157.5, 157.5, 
+};
+
+static long _vq_quantmap__16c0_s_p9_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p9_0 = {
+	_vq_quantthresh__16c0_s_p9_0,
+	_vq_quantmap__16c0_s_p9_0,
+	3,
+	3
+};
+
+static static_codebook _16c0_s_p9_0 = {
+	4, 81,
+	_vq_lengthlist__16c0_s_p9_0,
+	1, -518803456, 1628680192, 2, 0,
+	_vq_quantlist__16c0_s_p9_0,
+	NULL,
+	&_vq_auxt__16c0_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16c0_s_p9_1[] = {
+	 1, 5, 5, 5, 5, 9,11,11,10,10,10,10,10,10,10, 7,
+	 6, 6, 6, 6,10,10,10,10,10,10,10,10,10,10, 7, 6,
+	 6, 6, 6,10, 9,10,10,10,10,10,10,10,10,10, 7, 7,
+	 8, 9,10,10,10,10,10,10,10,10,10,10,10, 8, 7,10,
+	10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__16c0_s_p9_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__16c0_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p9_1 = {
+	_vq_quantthresh__16c0_s_p9_1,
+	_vq_quantmap__16c0_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _16c0_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__16c0_s_p9_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__16c0_s_p9_1,
+	NULL,
+	&_vq_auxt__16c0_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c0_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__16c0_s_p9_2[] = {
+	 1, 5, 5, 7, 8, 8, 7, 9, 9, 9,12,12,11,12,12,10,
+	10,11,12,12,12,11,12,12, 8, 9, 8, 7, 9,10,10,11,
+	11,10,11,12,10,12,10,12,12,12,11,12,11, 9, 8, 8,
+	 9,10, 9, 8, 9,10,12,12,11,11,12,11,10,11,12,11,
+	12,12, 8, 9, 9, 9,10,11,12,11,12,11,11,11,11,12,
+	12,11,11,12,12,11,11, 9, 9, 8, 9, 9,11, 9, 9,10,
+	 9,11,11,11,11,12,11,11,10,12,12,12, 9,12,11,10,
+	11,11,11,11,12,12,12,11,11,11,12,10,12,12,12,10,
+	10, 9,10, 9,10,10, 9, 9, 9,10,10,12,10,11,11, 9,
+	11,11,10,11,11,11,10,10,10, 9, 9,10,10, 9, 9,10,
+	11,11,10,11,10,11,10,11,11,10,11,11,11,10, 9,10,
+	10, 9,10, 9, 9,11, 9, 9,11,10,10,11,11,10,10,11,
+	10,11, 8, 9,11,11,10, 9,10,11,11,10,11,11,10,10,
+	10,11,10, 9,10,10,11, 9,10,10, 9,11,10,10,10,10,
+	11,10,11,11, 9,11,10,11,10,10,11,11,10,10,10, 9,
+	10,10,11,11,11, 9,10,10,10,10,10,11,10,10,10, 9,
+	10,10,11,10,10,10,10,10, 9,10,11,10,10,10,10,11,
+	11,11,10,10,10,10,10,11,10,11,10,11,10,10,10, 9,
+	11,11,10,10,10,11,11,10,10,10,10,10,10,10,10,11,
+	11, 9,10,10,10,11,10,11,10,10,10,11, 9,10,11,10,
+	11,10,10, 9,10,10,10,11,10,11,10,10,10,10,10,11,
+	11,10,11,11,10,10,11,11,10, 9, 9,10,10,10,10,10,
+	 9,11, 9,10,10,10,11,11,10,10,10,10,11,11,11,10,
+	 9, 9,10,10,11,10,10,10,10,10,11,11,11,10,10,10,
+	11,11,11, 9,10,10,10,10, 9,10, 9,10,11,10,11,10,
+	10,11,11,10,11,11,11,11,11,10,11,10,10,10, 9,11,
+	11,10,11,11,11,11,11,11,11,11,11,10,11,10,10,10,
+	10,11,10,10,11, 9,10,10,10,
+};
+
+static float _vq_quantthresh__16c0_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__16c0_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c0_s_p9_2 = {
+	_vq_quantthresh__16c0_s_p9_2,
+	_vq_quantmap__16c0_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _16c0_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__16c0_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__16c0_s_p9_2,
+	NULL,
+	&_vq_auxt__16c0_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16c0_s_single[] = {
+	 3, 4,19, 7, 9, 7, 8,11, 9,12, 4, 1,19, 6, 7, 7,
+	 8,10,11,13,18,18,18,18,18,18,18,18,18,18, 8, 6,
+	18, 8, 9, 9,11,12,14,18, 9, 6,18, 9, 7, 8, 9,11,
+	12,18, 7, 6,18, 8, 7, 7, 7, 9,11,17, 8, 8,18, 9,
+	 7, 6, 6, 8,11,17,10,10,18,12, 9, 8, 7, 9,12,18,
+	13,15,18,15,13,11,10,11,15,18,14,18,18,18,18,18,
+	16,16,18,18,
+};
+
+static static_codebook _huff_book__16c0_s_single = {
+	2, 100,
+	_huff_lengthlist__16c0_s_single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16c1_s_long[] = {
+	 2, 5,20, 7,10, 7, 8,10,11,11, 4, 2,20, 5, 8, 6,
+	 7, 9,10,10,20,20,20,20,19,19,19,19,19,19, 7, 5,
+	19, 6,10, 7, 9,11,13,17,11, 8,19,10, 7, 7, 8,10,
+	11,15, 7, 5,19, 7, 7, 5, 6, 9,11,16, 7, 6,19, 8,
+	 7, 6, 6, 7, 9,13, 9, 9,19,11, 9, 8, 6, 7, 8,13,
+	12,14,19,16,13,10, 9, 8, 9,13,14,17,19,18,18,17,
+	12,11,11,13,
+};
+
+static static_codebook _huff_book__16c1_s_long = {
+	2, 100,
+	_huff_lengthlist__16c1_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c1_s_p1_0[] = {
+	 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 9, 9,11, 0, 0, 0, 0, 0, 0, 9,11,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8,11, 9, 0, 0, 0, 0, 0, 0, 9,10,11,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,11,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,11, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,11,
+	 0, 0, 0, 0, 0, 0, 9,11, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c1_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16c1_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p1_0 = {
+	_vq_quantthresh__16c1_s_p1_0,
+	_vq_quantmap__16c1_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _16c1_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__16c1_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16c1_s_p1_0,
+	NULL,
+	&_vq_auxt__16c1_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c1_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c1_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c1_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p2_0 = {
+	_vq_quantthresh__16c1_s_p2_0,
+	_vq_quantmap__16c1_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _16c1_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__16c1_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c1_s_p2_0,
+	NULL,
+	&_vq_auxt__16c1_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c1_s_p3_0[] = {
+	 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 7, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 9, 9,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c1_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c1_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p3_0 = {
+	_vq_quantthresh__16c1_s_p3_0,
+	_vq_quantmap__16c1_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _16c1_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__16c1_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c1_s_p3_0,
+	NULL,
+	&_vq_auxt__16c1_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16c1_s_p4_0[] = {
+	 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c1_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16c1_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p4_0 = {
+	_vq_quantthresh__16c1_s_p4_0,
+	_vq_quantmap__16c1_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _16c1_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__16c1_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16c1_s_p4_0,
+	NULL,
+	&_vq_auxt__16c1_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16c1_s_p5_0[] = {
+	 1, 3, 3, 5, 5, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7,
+	 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, 8, 8,
+	 8, 8, 9, 9, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0,
+	 9, 9, 8, 8,10,10, 0, 0, 0, 9, 9, 8, 8,10,10, 0,
+	 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__16c1_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16c1_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p5_0 = {
+	_vq_quantthresh__16c1_s_p5_0,
+	_vq_quantmap__16c1_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _16c1_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__16c1_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16c1_s_p5_0,
+	NULL,
+	&_vq_auxt__16c1_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16c1_s_p6_0[] = {
+	 1, 3, 3, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11,12,
+	12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 0, 0, 0, 8, 8, 8, 9,10, 9,10,10,10,10,
+	11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,11,
+	11,11,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,
+	10,11,11,12,12,13,13, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,
+	10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0, 9,
+	 9,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0,
+	10,10,11,10,11,11,12,12,13,13,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,12,12,13,13,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, 0, 0,
+	 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, 0,
+	 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__16c1_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__16c1_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p6_0 = {
+	_vq_quantthresh__16c1_s_p6_0,
+	_vq_quantmap__16c1_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _16c1_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__16c1_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__16c1_s_p6_0,
+	NULL,
+	&_vq_auxt__16c1_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c1_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9,10,10,
+	10, 9, 4, 7, 7,10,10,10,11,10,10, 6,10,10,11,11,
+	11,11,10,10, 6,10, 9,11,11,11,11,10,10, 6,10,10,
+	11,11,11,11,10,10, 7,11,11,11,11,11,12,12,11, 6,
+	10,10,11,10,10,11,11,11, 6,10,10,10,11,10,11,11,
+	11,
+};
+
+static float _vq_quantthresh__16c1_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__16c1_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p7_0 = {
+	_vq_quantthresh__16c1_s_p7_0,
+	_vq_quantmap__16c1_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _16c1_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__16c1_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__16c1_s_p7_0,
+	NULL,
+	&_vq_auxt__16c1_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16c1_s_p7_1[] = {
+	 2, 3, 3, 5, 6, 7, 7, 7, 7, 8, 8,10,10,10, 6, 6,
+	 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8,
+	 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7,
+	 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 9, 9,10,10,10,10,10, 8, 8, 8,
+	 8, 9, 9,10,10,10,10,10, 9, 9, 8, 8, 9, 9,10,10,
+	10,10,10, 8, 8, 8, 8, 9, 9,
+};
+
+static float _vq_quantthresh__16c1_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16c1_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p7_1 = {
+	_vq_quantthresh__16c1_s_p7_1,
+	_vq_quantmap__16c1_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _16c1_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__16c1_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16c1_s_p7_1,
+	NULL,
+	&_vq_auxt__16c1_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c1_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 6, 5, 5,
+	 7, 8, 8, 9, 8, 8, 9, 9,10,11, 6, 5, 5, 8, 8, 9,
+	 9, 8, 8, 9,10,10,11, 0, 8, 8, 8, 9, 9, 9, 9, 9,
+	10,10,11,11, 0, 9, 9, 9, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,13,13, 9, 9,10,10,10,10,11,11,12,12, 0,14,
+	13, 9, 9,10,10,10,10,11,11,12,12, 0, 0, 0,10,10,
+	 9, 9,11,11,12,12,13,12, 0, 0, 0,10,10, 9, 9,10,
+	10,12,12,13,13, 0, 0, 0,13,14,11,10,11,11,12,12,
+	13,14, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0,
+	 0, 0, 0, 0,12,12,12,12,13,13,14,15, 0, 0, 0, 0,
+	 0,12,12,12,12,13,13,14,15,
+};
+
+static float _vq_quantthresh__16c1_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__16c1_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p8_0 = {
+	_vq_quantthresh__16c1_s_p8_0,
+	_vq_quantmap__16c1_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _16c1_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__16c1_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__16c1_s_p8_0,
+	NULL,
+	&_vq_auxt__16c1_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c1_s_p8_1[] = {
+	 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6,
+	 6, 6, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__16c1_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c1_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p8_1 = {
+	_vq_quantthresh__16c1_s_p8_1,
+	_vq_quantmap__16c1_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _16c1_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__16c1_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c1_s_p8_1,
+	NULL,
+	&_vq_auxt__16c1_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c1_s_p9_0[] = {
+	 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__16c1_s_p9_0[] = {
+	-1732.5, -1417.5, -1102.5, -787.5, -472.5, -157.5, 157.5, 472.5, 
+	787.5, 1102.5, 1417.5, 1732.5, 
+};
+
+static long _vq_quantmap__16c1_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p9_0 = {
+	_vq_quantthresh__16c1_s_p9_0,
+	_vq_quantmap__16c1_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _16c1_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__16c1_s_p9_0,
+	1, -513964032, 1628680192, 4, 0,
+	_vq_quantlist__16c1_s_p9_0,
+	NULL,
+	&_vq_auxt__16c1_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16c1_s_p9_1[] = {
+	 1, 4, 4, 4, 4, 8, 8,12,13,14,14,14,14,14,14, 6,
+	 6, 6, 6, 6,10, 9,14,14,14,14,14,14,14,14, 7, 6,
+	 5, 6, 6,10, 9,12,13,13,13,13,13,13,13,13, 7, 7,
+	 9, 9,11,11,12,13,13,13,13,13,13,13,13, 7, 7, 8,
+	 8,11,12,13,13,13,13,13,13,13,13,13,12,12,10,10,
+	13,12,13,13,13,13,13,13,13,13,13,12,12,10,10,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,12,13,12,
+	13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,12,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+	13,
+};
+
+static float _vq_quantthresh__16c1_s_p9_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__16c1_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p9_1 = {
+	_vq_quantthresh__16c1_s_p9_1,
+	_vq_quantmap__16c1_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _16c1_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__16c1_s_p9_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__16c1_s_p9_1,
+	NULL,
+	&_vq_auxt__16c1_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c1_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__16c1_s_p9_2[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9,10,
+	10,10, 9,10,10,11,12,12, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,10,10,10,11,11,10,12,11,11,13,11, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9,10,10,10,10, 9,10,10,11,11,12,
+	11,11, 8, 8, 8, 8, 9, 9,10,10,10,10,11,11,11,11,
+	11,11,11,12,11,12,12, 8, 8, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,11,11,11,11,11,11,12,11, 9, 9, 9, 9,
+	10,10,10,10,11,10,11,11,11,11,11,11,12,12,12,12,
+	11, 9, 9, 9, 9,10,10,10,10,11,11,11,11,11,11,11,
+	11,11,12,12,12,13, 9,10,10, 9,11,10,10,10,10,11,
+	11,11,11,11,10,11,12,11,12,12,11,12,11,10, 9,10,
+	10,11,10,11,11,11,11,11,11,11,11,11,12,12,11,12,
+	12,12,10,10,10,11,10,11,11,11,11,11,11,11,11,11,
+	11,11,12,13,12,12,11, 9,10,10,11,11,10,11,11,11,
+	12,11,11,11,11,11,12,12,13,13,12,13,10,10,12,10,
+	11,11,11,11,11,11,11,11,11,12,12,11,13,12,12,12,
+	12,13,12,11,11,11,11,11,11,12,11,12,11,11,11,11,
+	12,12,13,12,11,12,12,11,11,11,11,11,12,11,11,11,
+	11,12,11,11,12,11,12,13,13,12,12,12,12,11,11,11,
+	11,11,12,11,11,12,11,12,11,11,11,11,13,12,12,12,
+	12,13,11,11,11,12,12,11,11,11,12,11,12,12,12,11,
+	12,13,12,11,11,12,12,11,12,11,11,11,12,12,11,12,
+	11,11,11,12,12,12,12,13,12,13,12,12,12,12,11,11,
+	12,11,11,11,11,11,11,12,12,12,13,12,11,13,13,12,
+	12,11,12,10,11,11,11,11,12,11,12,12,11,12,12,13,
+	12,12,13,12,12,12,12,12,11,12,12,12,11,12,11,11,
+	11,12,13,12,13,13,13,13,13,12,13,13,12,12,13,11,
+	11,11,11,11,12,11,11,12,11,
+};
+
+static float _vq_quantthresh__16c1_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__16c1_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c1_s_p9_2 = {
+	_vq_quantthresh__16c1_s_p9_2,
+	_vq_quantmap__16c1_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _16c1_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__16c1_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__16c1_s_p9_2,
+	NULL,
+	&_vq_auxt__16c1_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16c1_s_short[] = {
+	 5, 6,17, 8,12, 9,10,10,12,13, 5, 2,17, 4, 9, 5,
+	 7, 8,11,13,16,16,16,16,16,16,16,16,16,16, 6, 4,
+	16, 5,10, 5, 7,10,14,16,13, 9,16,11, 8, 7, 8, 9,
+	13,16, 7, 4,16, 5, 7, 4, 6, 8,11,13, 8, 6,16, 7,
+	 8, 5, 5, 7, 9,13, 9, 8,16, 9, 8, 6, 6, 7, 9,13,
+	11,11,16,10,10, 7, 7, 7, 9,13,13,13,16,13,13, 9,
+	 9, 9,10,13,
+};
+
+static static_codebook _huff_book__16c1_s_short = {
+	2, 100,
+	_huff_lengthlist__16c1_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16c2_s_long[] = {
+	 4, 7, 9, 9, 9, 8, 9,10,15,19, 5, 4, 5, 6, 7, 7,
+	 8, 9,14,16, 6, 5, 4, 5, 6, 7, 8,10,12,19, 7, 6,
+	 5, 4, 5, 6, 7, 9,11,18, 8, 7, 6, 5, 5, 5, 7, 9,
+	10,17, 8, 7, 7, 5, 5, 5, 6, 7,12,18, 8, 8, 8, 7,
+	 7, 5, 5, 7,12,18, 8, 9,10, 9, 9, 7, 6, 7,12,17,
+	14,18,16,16,15,12,11,10,12,18,15,17,18,18,18,15,
+	14,14,16,18,
+};
+
+static static_codebook _huff_book__16c2_s_long = {
+	2, 100,
+	_huff_lengthlist__16c2_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c2_s_p1_0[] = {
+	 1, 3, 3, 0, 0, 0, 0, 0, 0, 4, 5, 5, 0, 0, 0, 0,
+	 0, 0, 4, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c2_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16c2_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p1_0 = {
+	_vq_quantthresh__16c2_s_p1_0,
+	_vq_quantmap__16c2_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _16c2_s_p1_0 = {
+	4, 81,
+	_vq_lengthlist__16c2_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16c2_s_p1_0,
+	NULL,
+	&_vq_auxt__16c2_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c2_s_p2_0[] = {
+	 2, 4, 3, 7, 7, 0, 0, 0, 7, 8, 0, 0, 0, 8, 8, 0,
+	 0, 0, 8, 8, 0, 0, 0, 8, 8, 4, 5, 4, 8, 8, 0, 0,
+	 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0,
+	 9, 9, 4, 4, 5, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8,
+	 8, 0, 0, 0, 9, 9, 0, 0, 0, 9, 9, 7, 8, 8,10,10,
+	 0, 0, 0,12,11, 0, 0, 0,11,11, 0, 0, 0,14,13, 0,
+	 0, 0,14,13, 7, 8, 8, 9,10, 0, 0, 0,11,12, 0, 0,
+	 0,11,11, 0, 0, 0,14,14, 0, 0, 0,13,14, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8,11,11, 0, 0, 0,
+	11,11, 0, 0, 0,12,11, 0, 0, 0,12,12, 0, 0, 0,13,
+	13, 8, 8, 8,11,11, 0, 0, 0,11,11, 0, 0, 0,11,12,
+	 0, 0, 0,12,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 8, 8, 8,12,11, 0, 0, 0,12,11, 0,
+	 0, 0,11,11, 0, 0, 0,13,13, 0, 0, 0,13,12, 8, 8,
+	 8,11,12, 0, 0, 0,11,12, 0, 0, 0,11,11, 0, 0, 0,
+	13,13, 0, 0, 0,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9,14,13, 0, 0, 0,13,12, 0, 0, 0,13,
+	13, 0, 0, 0,13,12, 0, 0, 0,13,13, 8, 9, 9,13,14,
+	 0, 0, 0,12,13, 0, 0, 0,13,13, 0, 0, 0,12,13, 0,
+	 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
+	 9, 9,14,13, 0, 0, 0,13,13, 0, 0, 0,13,12, 0, 0,
+	 0,13,13, 0, 0, 0,13,12, 8, 9, 9,14,14, 0, 0, 0,
+	13,13, 0, 0, 0,12,13, 0, 0, 0,13,13, 0, 0, 0,12,
+	13,
+};
+
+static float _vq_quantthresh__16c2_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c2_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p2_0 = {
+	_vq_quantthresh__16c2_s_p2_0,
+	_vq_quantmap__16c2_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _16c2_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__16c2_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c2_s_p2_0,
+	NULL,
+	&_vq_auxt__16c2_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16c2_s_p3_0[] = {
+	 1, 3, 3, 6, 6, 7, 7, 8, 8, 0, 0, 0, 6, 6, 7, 7,
+	 9, 9, 0, 0, 0, 6, 6, 7, 7, 9, 9, 0, 0, 0, 7, 7,
+	 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0,
+	 7, 7, 9, 9,10,10, 0, 0, 0, 7, 7, 9, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c2_s_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16c2_s_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p3_0 = {
+	_vq_quantthresh__16c2_s_p3_0,
+	_vq_quantmap__16c2_s_p3_0,
+	9,
+	9
+};
+
+static static_codebook _16c2_s_p3_0 = {
+	2, 81,
+	_vq_lengthlist__16c2_s_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16c2_s_p3_0,
+	NULL,
+	&_vq_auxt__16c2_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16c2_s_p4_0[] = {
+	 2, 3, 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9,10,
+	10, 0, 0, 0, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,
+	11,11, 0, 0, 0, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,
+	10,10,11, 0, 0, 0, 6, 6, 8, 8, 8, 8, 9, 9,10,10,
+	10,11,11,11, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,
+	10,10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9,
+	 9,10,10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,
+	10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, 8, 9,
+	 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__16c2_s_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__16c2_s_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p4_0 = {
+	_vq_quantthresh__16c2_s_p4_0,
+	_vq_quantmap__16c2_s_p4_0,
+	17,
+	17
+};
+
+static static_codebook _16c2_s_p4_0 = {
+	2, 289,
+	_vq_lengthlist__16c2_s_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__16c2_s_p4_0,
+	NULL,
+	&_vq_auxt__16c2_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16c2_s_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 6,10,10,10,10,
+	10,10, 4, 7, 6,10,10,10,10,10,10, 5, 9, 9, 9,12,
+	11,10,11,12, 7,10,10,12,12,12,12,12,12, 7,10,10,
+	11,12,12,12,12,13, 6,10,10,10,12,12,10,12,12, 7,
+	10,10,11,13,12,12,12,12, 7,10,10,11,12,12,12,12,
+	12,
+};
+
+static float _vq_quantthresh__16c2_s_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__16c2_s_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p5_0 = {
+	_vq_quantthresh__16c2_s_p5_0,
+	_vq_quantmap__16c2_s_p5_0,
+	3,
+	3
+};
+
+static static_codebook _16c2_s_p5_0 = {
+	4, 81,
+	_vq_lengthlist__16c2_s_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__16c2_s_p5_0,
+	NULL,
+	&_vq_auxt__16c2_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16c2_s_p5_1[] = {
+	 2, 3, 3, 6, 6, 7, 7, 7, 7, 8, 8,11,11,11, 6, 6,
+	 7, 7, 8, 8, 8, 8,11,11,11, 6, 6, 7, 7, 8, 8, 8,
+	 8,11,11,11, 6, 6, 8, 8, 8, 8, 9, 9,11,11,11, 6,
+	 6, 8, 8, 8, 8, 9, 9,11,11,11, 7, 7, 8, 8, 8, 8,
+	 8, 8,11,11,11, 7, 7, 8, 8, 8, 8, 8, 9,11,11,11,
+	 8, 8, 8, 8, 8, 8, 8, 8,11,11,11,11,11, 8, 8, 8,
+	 8, 8, 8,11,11,11,11,11, 8, 8, 8, 8, 8, 8,11,11,
+	11,11,11, 7, 7, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__16c2_s_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16c2_s_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p5_1 = {
+	_vq_quantthresh__16c2_s_p5_1,
+	_vq_quantmap__16c2_s_p5_1,
+	11,
+	11
+};
+
+static static_codebook _16c2_s_p5_1 = {
+	2, 121,
+	_vq_lengthlist__16c2_s_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16c2_s_p5_1,
+	NULL,
+	&_vq_auxt__16c2_s_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c2_s_p6_0[] = {
+	 1, 4, 4, 7, 6, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 7, 7, 9, 9, 9, 9,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9,10,10,11,11,12,12, 0, 6, 6, 7, 7, 9, 9,10,10,
+	11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10,11,12,12,
+	12, 0,11,11, 8, 8,10,10,11,11,12,12,13,13, 0,11,
+	12, 8, 8,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__16c2_s_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__16c2_s_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p6_0 = {
+	_vq_quantthresh__16c2_s_p6_0,
+	_vq_quantmap__16c2_s_p6_0,
+	13,
+	13
+};
+
+static static_codebook _16c2_s_p6_0 = {
+	2, 169,
+	_vq_lengthlist__16c2_s_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__16c2_s_p6_0,
+	NULL,
+	&_vq_auxt__16c2_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16c2_s_p6_1[] = {
+	 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6,
+	 6, 6, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__16c2_s_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16c2_s_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p6_1 = {
+	_vq_quantthresh__16c2_s_p6_1,
+	_vq_quantmap__16c2_s_p6_1,
+	5,
+	5
+};
+
+static static_codebook _16c2_s_p6_1 = {
+	2, 25,
+	_vq_lengthlist__16c2_s_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16c2_s_p6_1,
+	NULL,
+	&_vq_auxt__16c2_s_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c2_s_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 8, 8, 9, 9,10,10,11,11,12,12, 6, 5, 5, 8, 8, 9,
+	 9,10,10,11,11,12,13,18, 6, 6, 7, 7, 9, 9,10,10,
+	12,12,13,13,18, 6, 6, 7, 7, 9, 9,10,10,12,12,13,
+	13,18,11,10, 8, 8,10,10,11,11,12,12,13,13,18,11,
+	11, 8, 8,10,10,11,11,12,13,13,13,18,18,18,10,11,
+	11,11,12,12,13,13,14,14,18,18,18,11,11,11,11,12,
+	12,13,13,14,14,18,18,18,14,14,12,12,12,12,14,14,
+	15,14,18,18,18,15,15,11,12,12,12,13,13,15,15,18,
+	18,18,18,18,13,13,13,13,13,14,17,16,18,18,18,18,
+	18,13,14,13,13,14,13,15,14,
+};
+
+static float _vq_quantthresh__16c2_s_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__16c2_s_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p7_0 = {
+	_vq_quantthresh__16c2_s_p7_0,
+	_vq_quantmap__16c2_s_p7_0,
+	13,
+	13
+};
+
+static static_codebook _16c2_s_p7_0 = {
+	2, 169,
+	_vq_lengthlist__16c2_s_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__16c2_s_p7_0,
+	NULL,
+	&_vq_auxt__16c2_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16c2_s_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 7, 7, 7, 7, 9, 9, 9, 6, 6,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 6, 6, 7, 7, 8, 8, 8,
+	 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 7,
+	 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8,
+	 8, 8, 9, 9, 9, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9,
+	 7, 7, 8, 8, 7, 7, 8, 8, 9, 9, 9, 9, 9, 7, 7, 7,
+	 7, 8, 8, 9, 9, 9, 9, 9, 8, 8, 7, 7, 8, 8, 9, 9,
+	 9, 9, 9, 7, 7, 7, 7, 8, 8,
+};
+
+static float _vq_quantthresh__16c2_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16c2_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p7_1 = {
+	_vq_quantthresh__16c2_s_p7_1,
+	_vq_quantmap__16c2_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _16c2_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__16c2_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16c2_s_p7_1,
+	NULL,
+	&_vq_auxt__16c2_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16c2_s_p8_0[] = {
+	 1, 4, 4, 7, 6, 7, 7, 6, 6, 8, 8, 9, 9,10,10, 6,
+	 6, 6, 8, 8, 9, 8, 8, 8, 9, 9,11,10,11,11, 7, 6,
+	 6, 8, 8, 9, 8, 7, 7, 9, 9,10,10,12,11,14, 8, 8,
+	 8, 9, 9, 9, 9, 9,10, 9,10,10,11,13,14, 8, 8, 8,
+	 8, 9, 9, 8, 8, 9, 9,10,10,11,12,14,13,11, 9, 9,
+	 9, 9, 9, 9, 9,10,11,10,13,12,14,11,13, 8, 9, 9,
+	 9, 9, 9,10,10,11,10,13,12,14,14,14, 8, 9, 9, 9,
+	11,11,11,11,11,12,13,13,14,14,14, 9, 8, 9, 9,10,
+	10,12,10,11,12,12,14,14,14,14,11,12,10,10,12,12,
+	12,12,13,14,12,12,14,14,14,12,12, 9,10,11,11,12,
+	14,12,14,14,14,14,14,14,14,14,11,11,12,11,12,14,
+	14,14,14,14,14,14,14,14,14,12,11,11,11,11,14,14,
+	14,14,14,14,14,14,14,14,14,14,13,12,14,14,14,14,
+	14,14,14,14,14,14,14,14,14,12,12,12,13,14,14,13,
+	13,
+};
+
+static float _vq_quantthresh__16c2_s_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__16c2_s_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p8_0 = {
+	_vq_quantthresh__16c2_s_p8_0,
+	_vq_quantmap__16c2_s_p8_0,
+	15,
+	15
+};
+
+static static_codebook _16c2_s_p8_0 = {
+	2, 225,
+	_vq_lengthlist__16c2_s_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__16c2_s_p8_0,
+	NULL,
+	&_vq_auxt__16c2_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__16c2_s_p8_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8,11,12,11, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9, 9,11,11,10, 7, 7, 8,
+	 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,
+	11,11, 8, 7, 8, 8, 9, 9, 9, 9, 9, 9,10,10, 9,10,
+	10, 9,10,10,11,11,12, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9,10, 9,10,10,10,10,11,11,11, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,11,11,
+	11, 8, 8, 9, 8, 9, 9, 9, 9,10, 9, 9, 9,10,10,10,
+	10, 9,10,11,11,11, 9, 9, 9, 9,10, 9, 9, 9,10,10,
+	 9,10, 9,10,10,10,10,10,11,12,11,11,11, 9, 9, 9,
+	 9, 9,10,10, 9,10,10,10,10,10,10,10,10,12,11,13,
+	13,11, 9, 9, 9, 9,10,10, 9,10,10,10,10,11,10,10,
+	10,10,11,12,11,12,11, 9, 9, 9,10,10, 9,10,10,10,
+	10,10,10,10,10,10,10,11,11,11,12,11, 9,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,11,12,12,12,
+	11,11,11,10, 9,10,10,10,10,10,10,10,10,11,10,10,
+	10,11,11,11,11,11,11,11,10,10,10,11,10,10,10,10,
+	10,10,10,10,10,10,11,11,11,11,12,12,11,10,10,10,
+	10,10,10,10,10,11,10,10,10,11,10,12,11,11,12,11,
+	11,11,10,10,10,10,10,11,10,10,10,10,10,11,10,10,
+	11,11,11,12,11,12,11,11,12,10,10,10,10,10,10,10,
+	11,10,10,11,10,12,11,11,11,12,11,11,11,11,10,10,
+	10,10,10,10,10,11,11,11,10,11,12,11,11,11,12,11,
+	12,11,12,10,11,10,10,10,10,11,10,10,10,10,10,10,
+	12,11,11,11,11,11,12,12,10,10,10,10,10,11,10,10,
+	11,10,11,11,11,11,11,11,11,11,11,11,11,11,12,11,
+	10,11,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__16c2_s_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__16c2_s_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p8_1 = {
+	_vq_quantthresh__16c2_s_p8_1,
+	_vq_quantmap__16c2_s_p8_1,
+	21,
+	21
+};
+
+static static_codebook _16c2_s_p8_1 = {
+	2, 441,
+	_vq_lengthlist__16c2_s_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__16c2_s_p8_1,
+	NULL,
+	&_vq_auxt__16c2_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16c2_s_p9_0[] = {
+	 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__16c2_s_p9_0[] = {
+	-5120.5, -4189.5, -3258.5, -2327.5, -1396.5, -465.5, 465.5, 1396.5, 
+	2327.5, 3258.5, 4189.5, 5120.5, 
+};
+
+static long _vq_quantmap__16c2_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p9_0 = {
+	_vq_quantthresh__16c2_s_p9_0,
+	_vq_quantmap__16c2_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _16c2_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__16c2_s_p9_0,
+	1, -510275072, 1631393792, 4, 0,
+	_vq_quantlist__16c2_s_p9_0,
+	NULL,
+	&_vq_auxt__16c2_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p9_1[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16c2_s_p9_1[] = {
+	 1, 5, 5, 9, 8, 7, 7, 7, 6,10,11,11,11,11,11,11,
+	11, 8, 7, 6, 8, 8,10, 9,10,10,10, 9,11,10,10,10,
+	10,10, 8, 6, 6, 8, 8, 9, 8, 9, 8, 9,10,10,10,10,
+	10,10,10,10, 8,10, 9, 9, 9, 9,10,10,10,10,10,10,
+	10,10,10,10,10, 8, 9, 9, 9,10,10, 9,10,10,10,10,
+	10,10,10,10,10,10,10,10, 9, 8, 9, 9,10,10,10,10,
+	10,10,10,10,10,10,10,10, 9, 8, 8, 9, 9,10,10,10,
+	10,10,10,10,10,10,10,10,10,10, 9,10, 9, 9,10,10,
+	10,10,10,10,10,10,10,10,10,10,10, 9, 8, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	 8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10, 9,10, 9,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10, 9,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__16c2_s_p9_1[] = {
+	-367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, -24.5, 
+	24.5, 73.5, 122.5, 171.5, 220.5, 269.5, 318.5, 367.5, 
+};
+
+static long _vq_quantmap__16c2_s_p9_1[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p9_1 = {
+	_vq_quantthresh__16c2_s_p9_1,
+	_vq_quantmap__16c2_s_p9_1,
+	17,
+	17
+};
+
+static static_codebook _16c2_s_p9_1 = {
+	2, 289,
+	_vq_lengthlist__16c2_s_p9_1,
+	1, -518488064, 1622704128, 5, 0,
+	_vq_quantlist__16c2_s_p9_1,
+	NULL,
+	&_vq_auxt__16c2_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16c2_s_p9_2[] = {
+	13,
+	12,
+	14,
+	11,
+	15,
+	10,
+	16,
+	9,
+	17,
+	8,
+	18,
+	7,
+	19,
+	6,
+	20,
+	5,
+	21,
+	4,
+	22,
+	3,
+	23,
+	2,
+	24,
+	1,
+	25,
+	0,
+	26,
+};
+
+static long _vq_lengthlist__16c2_s_p9_2[] = {
+	 1, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 8, 7, 8, 7, 7, 4, 4,
+};
+
+static float _vq_quantthresh__16c2_s_p9_2[] = {
+	-12.5, -11.5, -10.5, -9.5, -8.5, -7.5, -6.5, -5.5, 
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 
+	11.5, 12.5, 
+};
+
+static long _vq_quantmap__16c2_s_p9_2[] = {
+	   25,   23,   21,   19,   17,   15,   13,   11,
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,   12,   14,   16,   18,   20,
+	   22,   24,   26,
+};
+
+static encode_aux_threshmatch _vq_auxt__16c2_s_p9_2 = {
+	_vq_quantthresh__16c2_s_p9_2,
+	_vq_quantmap__16c2_s_p9_2,
+	27,
+	27
+};
+
+static static_codebook _16c2_s_p9_2 = {
+	1, 27,
+	_vq_lengthlist__16c2_s_p9_2,
+	1, -528875520, 1611661312, 5, 0,
+	_vq_quantlist__16c2_s_p9_2,
+	NULL,
+	&_vq_auxt__16c2_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16c2_s_short[] = {
+	 7,10,11,11,11,14,15,15,17,14, 8, 6, 7, 7, 8, 9,
+	11,11,14,17, 9, 6, 6, 6, 7, 7,10,11,15,16, 9, 6,
+	 6, 4, 4, 5, 8, 9,12,16,10, 6, 6, 4, 4, 4, 6, 9,
+	13,16,10, 7, 6, 5, 4, 3, 5, 7,13,16,11, 9, 8, 7,
+	 6, 5, 5, 6,12,15,10,10,10, 9, 7, 6, 6, 7,11,15,
+	13,13,13,13,11,10,10, 9,12,16,16,16,16,14,16,15,
+	15,12,14,14,
+};
+
+static static_codebook _huff_book__16c2_s_short = {
+	2, 100,
+	_huff_lengthlist__16c2_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c0_s_long[] = {
+	 3, 4,18, 8, 8, 8, 9,10,11,13, 3, 2,18, 5, 5, 6,
+	 8,11,12,12,18,18,18,18,18,18,18,18,18,18, 8, 5,
+	18, 7, 8, 8,10,14,14,16, 8, 5,18, 7, 5, 6, 7,11,
+	12,13, 8, 6,18, 7, 5, 6, 7,10,12,14, 8, 7,18,10,
+	 7, 6, 6, 8,11,14, 9,10,18,13, 9, 7, 6, 8,10,13,
+	11,13,18,16,13,10, 9, 8, 8,11,12,17,18,17,18,14,
+	11, 9,10,14,
+};
+
+static static_codebook _huff_book__44c0_s_long = {
+	2, 100,
+	_huff_lengthlist__44c0_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c0_s_p1_0[] = {
+	 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 9, 9,11, 0, 0, 0, 0, 0, 0, 9,11,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 9,10,11,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,11,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,11, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 9,11,10, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c0_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p1_0 = {
+	_vq_quantthresh__44c0_s_p1_0,
+	_vq_quantmap__44c0_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c0_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c0_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c0_s_p1_0,
+	NULL,
+	&_vq_auxt__44c0_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p2_0 = {
+	_vq_quantthresh__44c0_s_p2_0,
+	_vq_quantmap__44c0_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c0_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c0_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_s_p2_0,
+	NULL,
+	&_vq_auxt__44c0_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_s_p3_0[] = {
+	 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 7, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 9, 9,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p3_0 = {
+	_vq_quantthresh__44c0_s_p3_0,
+	_vq_quantmap__44c0_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c0_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c0_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_s_p3_0,
+	NULL,
+	&_vq_auxt__44c0_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c0_s_p4_0[] = {
+	 1, 3, 2, 8, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c0_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p4_0 = {
+	_vq_quantthresh__44c0_s_p4_0,
+	_vq_quantmap__44c0_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c0_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c0_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c0_s_p4_0,
+	NULL,
+	&_vq_auxt__44c0_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c0_s_p5_0[] = {
+	 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 0, 0, 6, 7, 7, 7,
+	 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, 7, 7,
+	 8, 8, 9, 9, 0, 0, 0, 7, 7, 8, 8,10, 9, 0, 0, 0,
+	 8, 8, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0,
+	 0, 0,10, 9, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11,
+	11,
+};
+
+static float _vq_quantthresh__44c0_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c0_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p5_0 = {
+	_vq_quantthresh__44c0_s_p5_0,
+	_vq_quantmap__44c0_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c0_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c0_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c0_s_p5_0,
+	NULL,
+	&_vq_auxt__44c0_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c0_s_p6_0[] = {
+	 1, 3, 4, 6, 6, 7, 8, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,10,
+	11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,
+	11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9,10,10,10,
+	10,11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,12,12,13, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,
+	 9,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9,
+	 9, 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	10, 9,10,10,11,11,11,12,12,13,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,12,12,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,13,13,13,13, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,12,13,12,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,
+	14,
+};
+
+static float _vq_quantthresh__44c0_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c0_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p6_0 = {
+	_vq_quantthresh__44c0_s_p6_0,
+	_vq_quantmap__44c0_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c0_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c0_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c0_s_p6_0,
+	NULL,
+	&_vq_auxt__44c0_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c0_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,10,11,
+	10,11,10,10, 6, 9, 9,11,10,10,11, 9,10, 6, 9, 9,
+	11,10,10,11, 9, 9, 7,10,10,11,11,11,12,11,11, 7,
+	 9, 9,10, 9, 9,11,11,10, 7, 9, 9,10,10,10,12,10,
+	11,
+};
+
+static float _vq_quantthresh__44c0_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c0_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p7_0 = {
+	_vq_quantthresh__44c0_s_p7_0,
+	_vq_quantmap__44c0_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c0_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c0_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c0_s_p7_0,
+	NULL,
+	&_vq_auxt__44c0_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c0_s_p7_1[] = {
+	 2, 3, 3, 6, 6, 7, 7, 7, 7, 7, 7,10, 9, 9, 6, 6,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 6, 6, 7, 7, 8, 8, 8,
+	 8,10, 9,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 8, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 9, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c0_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c0_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p7_1 = {
+	_vq_quantthresh__44c0_s_p7_1,
+	_vq_quantmap__44c0_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c0_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c0_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c0_s_p7_1,
+	NULL,
+	&_vq_auxt__44c0_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c0_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 9, 7, 5, 5,
+	 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 6, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 8, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 8, 9, 9,10,10,10,11,12,11, 0,13,
+	13, 9, 8, 9, 9,10,10,10,11,11,11, 0, 0, 0,10,10,
+	 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, 9, 8,10,
+	10,11,11,12,12, 0, 0, 0,13,13,10,10,11,11,12,12,
+	12,12, 0, 0, 0,15,15,10,10,11, 9,12,12,13,13, 0,
+	 0, 0, 0, 0,12,11,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,11,12,11,14,13,
+};
+
+static float _vq_quantthresh__44c0_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c0_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p8_0 = {
+	_vq_quantthresh__44c0_s_p8_0,
+	_vq_quantmap__44c0_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c0_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c0_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c0_s_p8_0,
+	NULL,
+	&_vq_auxt__44c0_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_s_p8_1[] = {
+	 2, 3, 4, 4, 4, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6,
+	 6, 6, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c0_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p8_1 = {
+	_vq_quantthresh__44c0_s_p8_1,
+	_vq_quantmap__44c0_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c0_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c0_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_s_p8_1,
+	NULL,
+	&_vq_auxt__44c0_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p9_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_s_p9_0[] = {
+	 1, 7, 7,11,11,10,11,11,11,11, 9,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11, 8,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11, 8,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44c0_s_p9_0[] = {
+	-331.5, -110.5, 110.5, 331.5, 
+};
+
+static long _vq_quantmap__44c0_s_p9_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p9_0 = {
+	_vq_quantthresh__44c0_s_p9_0,
+	_vq_quantmap__44c0_s_p9_0,
+	5,
+	5
+};
+
+static static_codebook _44c0_s_p9_0 = {
+	4, 625,
+	_vq_lengthlist__44c0_s_p9_0,
+	1, -518283264, 1627103232, 3, 0,
+	_vq_quantlist__44c0_s_p9_0,
+	NULL,
+	&_vq_auxt__44c0_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c0_s_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 9,12,12,13,12, 6, 5, 5,
+	 7, 7, 8, 8,10,10,12,11,14,13, 6, 5, 5, 7, 7, 7,
+	 8, 9, 9,11,12,13,12,15, 7, 7, 7, 7, 9, 9,11,11,
+	14,13,14,13,15, 7, 7, 8, 8, 8, 9,10,10,11,11,12,
+	11,15,10,10, 8, 8,10,10,12,11,13,15,14,14,15,11,
+	10, 8, 8,11,11,11,11,13,13,12,13,15,15,15,10,10,
+	10,10,12,13,13,13,15,14,15,15,15,10,10,10,11,13,
+	14,13,14,14,14,15,15,15,15,15,11,12,11,13,14,14,
+	15,15,15,15,15,14,15,11,11,13,12,14,13,15,15,15,
+	15,15,15,15,13,12,13,12,15,15,15,15,15,15,15,15,
+	15,12,13,12,12,15,14,15,15,
+};
+
+static float _vq_quantthresh__44c0_s_p9_1[] = {
+	-93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 25.5, 
+	42.5, 59.5, 76.5, 93.5, 
+};
+
+static long _vq_quantmap__44c0_s_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p9_1 = {
+	_vq_quantthresh__44c0_s_p9_1,
+	_vq_quantmap__44c0_s_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c0_s_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c0_s_p9_1,
+	1, -522616832, 1620115456, 4, 0,
+	_vq_quantlist__44c0_s_p9_1,
+	NULL,
+	&_vq_auxt__44c0_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_s_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c0_s_p9_2[] = {
+	 2, 4, 4, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 8,
+	 9,10,10,10, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9,10,10,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,11,10,10, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9,10, 9, 9,10,10,11, 9, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11, 9, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,11,11,10,11,11, 9, 9,
+	 9, 9, 9, 9,10, 9, 9, 9,10, 9,10,10,10,11,11, 9,
+	 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10,11,10,10,10,11,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,
+	11,11,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	11,11,10,10, 9,10,10,10, 9,10, 9, 9, 9, 9,10,10,
+	11,10,11,11,11, 9,10, 9, 9, 9, 9, 9, 9, 9,10,10,
+	11,10,11,11,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,11,11,10,11,11, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c0_s_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c0_s_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_s_p9_2 = {
+	_vq_quantthresh__44c0_s_p9_2,
+	_vq_quantmap__44c0_s_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c0_s_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c0_s_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c0_s_p9_2,
+	NULL,
+	&_vq_auxt__44c0_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c0_s_short[] = {
+	 6, 8,17,12,12,12,14,15,17,16, 5, 1,16, 5, 6, 6,
+	 9,12,14,13,16,16,16,16,16,16,16,16,16,16, 9, 4,
+	16, 6, 9, 7,10,14,14,14, 8, 5,16, 8, 6, 7,10,13,
+	15,16, 9, 6,16, 7, 7, 7,10,12,15,14,10, 8,16, 9,
+	 9, 9,10,12,15,14,13, 7,16, 8, 7, 7,10,12,14,13,
+	15, 6,16, 7, 5, 5, 7, 9,13,16,14, 7,16, 8, 6, 6,
+	 8, 9,11,14,
+};
+
+static static_codebook _huff_book__44c0_s_short = {
+	2, 100,
+	_huff_lengthlist__44c0_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c0_sm_long[] = {
+	 3, 4,10, 8,11, 9,10,10,11,13, 3, 2,10, 5, 8, 6,
+	 8,11,12,13,10, 8, 7,10, 7, 8, 9,11,12,13, 8, 5,
+	12, 6, 9, 7,10,13,14,16,11, 7, 7, 9, 5, 6, 7,10,
+	13,13, 8, 6, 7, 7, 5, 5, 6, 9,12,13, 9, 8, 8, 8,
+	 7, 6, 6, 8,11,14,10,10,10,11, 9, 8, 7, 8,10,13,
+	11,14,12,15,13,11, 9, 8, 9,12,12,18,15,18,17,15,
+	12,10,10,14,
+};
+
+static static_codebook _huff_book__44c0_sm_long = {
+	2, 100,
+	_huff_lengthlist__44c0_sm_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c0_sm_p1_0[] = {
+	 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 9, 9,10, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 9,10, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_sm_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p1_0 = {
+	_vq_quantthresh__44c0_sm_p1_0,
+	_vq_quantmap__44c0_sm_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c0_sm_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c0_sm_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c0_sm_p1_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_sm_p2_0[] = {
+	 1, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 6, 6, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 8,
+	 8, 0, 0, 0, 8, 8, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0, 0, 8, 8, 0, 0,
+	 0, 8, 8, 0, 0, 0,10, 9, 0, 0, 0, 0, 0, 0, 0, 6,
+	 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 9,
+	10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8,
+	 0, 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0,
+	 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0,10,10, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 8,10,10, 0, 0, 0,10,10, 0, 0, 0, 9,10, 0, 0, 0,
+	10,10, 0, 0, 0, 0, 0, 0, 0, 8,10,10, 0, 0, 0,10,
+	10, 0, 0, 0,10, 9, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_sm_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p2_0 = {
+	_vq_quantthresh__44c0_sm_p2_0,
+	_vq_quantmap__44c0_sm_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c0_sm_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c0_sm_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_sm_p2_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_sm_p3_0[] = {
+	 2, 3, 4, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 8, 8,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 8, 8, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_sm_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p3_0 = {
+	_vq_quantthresh__44c0_sm_p3_0,
+	_vq_quantmap__44c0_sm_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c0_sm_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c0_sm_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_sm_p3_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c0_sm_p4_0[] = {
+	 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6,
+	 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0,
+	 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c0_sm_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p4_0 = {
+	_vq_quantthresh__44c0_sm_p4_0,
+	_vq_quantmap__44c0_sm_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c0_sm_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c0_sm_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c0_sm_p4_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c0_sm_p5_0[] = {
+	 1, 3, 3, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7, 8, 8,
+	 9, 9, 0, 6, 6, 7, 7, 8, 8,10,10, 0, 7, 7, 8, 8,
+	 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0,
+	 8, 8, 9, 9,11,11, 0, 0, 0, 9, 9, 9, 9,11,11, 0,
+	 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11,
+	11,
+};
+
+static float _vq_quantthresh__44c0_sm_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p5_0 = {
+	_vq_quantthresh__44c0_sm_p5_0,
+	_vq_quantmap__44c0_sm_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c0_sm_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c0_sm_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c0_sm_p5_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c0_sm_p6_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9, 9, 8, 8,10,10,10,10,11,
+	11, 0, 6, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	12,12, 0, 6, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 0, 7, 7, 8, 8, 8, 8,10,10,10,10,11,11,
+	11,11,12,12, 0, 0, 0, 8, 7, 8, 8,10,10,10,10,11,
+	11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,
+	10,11,11,12,12,12,13, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,
+	10,10,11,11,12,12,12,13,13,13, 0, 0, 0, 0, 0, 9,
+	 9,10, 9,11,11,12,12,13,13,13,13, 0, 0, 0, 0, 0,
+	10,10,10,10,11,11,12,12,13,13,14,14, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,12,12,13,13,14,14, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,13,13,14,14, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,14,14, 0,
+	 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44c0_sm_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p6_0 = {
+	_vq_quantthresh__44c0_sm_p6_0,
+	_vq_quantmap__44c0_sm_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c0_sm_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c0_sm_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c0_sm_p6_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c0_sm_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 5, 7, 6,10, 9, 9,10,
+	 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10,10,10,11, 9,10, 6, 9, 9,
+	10,10,10,11,10, 9, 7,10,10,11,11,11,11,11,11, 6,
+	 9, 9,10, 9,10,11,11,10, 6, 9, 9,10,10,10,11,10,
+	11,
+};
+
+static float _vq_quantthresh__44c0_sm_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p7_0 = {
+	_vq_quantthresh__44c0_sm_p7_0,
+	_vq_quantmap__44c0_sm_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c0_sm_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c0_sm_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c0_sm_p7_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c0_sm_p7_1[] = {
+	 2, 4, 4, 5, 5, 7, 7, 7, 7, 7, 7, 9, 5, 5, 7, 7,
+	 7, 7, 8, 8, 8, 8, 9, 5, 5, 7, 7, 7, 7, 8, 8, 8,
+	 8,10, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8,
+	 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c0_sm_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p7_1 = {
+	_vq_quantthresh__44c0_sm_p7_1,
+	_vq_quantmap__44c0_sm_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c0_sm_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c0_sm_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c0_sm_p7_1,
+	NULL,
+	&_vq_auxt__44c0_sm_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c0_sm_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 7, 7, 9, 9,10,10, 7, 5, 5,
+	 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 9, 9, 9,10,10,11,11,12,11, 0,12,
+	12, 9, 9, 9, 9,10,10,11,11,12,11, 0, 0, 0, 9, 9,
+	 9,10,11,11,11,11,12,12, 0, 0, 0,10,10, 9, 9,11,
+	11,11,11,12,12, 0, 0, 0,13,13,10,10,11,11,12,12,
+	13,13, 0, 0, 0,14,14,10,10,11,10,12,12,13,13, 0,
+	 0, 0, 0, 0,12,12,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,10,12,11,14,14,
+};
+
+static float _vq_quantthresh__44c0_sm_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p8_0 = {
+	_vq_quantthresh__44c0_sm_p8_0,
+	_vq_quantmap__44c0_sm_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c0_sm_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c0_sm_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c0_sm_p8_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c0_sm_p8_1[] = {
+	 2, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c0_sm_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p8_1 = {
+	_vq_quantthresh__44c0_sm_p8_1,
+	_vq_quantmap__44c0_sm_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c0_sm_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c0_sm_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c0_sm_p8_1,
+	NULL,
+	&_vq_auxt__44c0_sm_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p9_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c0_sm_p9_0[] = {
+	 1, 3, 4,11,11,11,11,11,11, 4, 6, 6,10,10,10,10,
+	10,10, 4, 6, 5,10,10,10,10,10,10,10, 6, 7,10, 9,
+	10,10,10,10,10, 7, 9,10, 9,10,10,10,10,10, 9,10,
+	 7, 9,10,10,10,10,10,10,10, 9,10,10,10,10,10,10,
+	10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44c0_sm_p9_0[] = {
+	-773.5, -552.5, -331.5, -110.5, 110.5, 331.5, 552.5, 773.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p9_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p9_0 = {
+	_vq_quantthresh__44c0_sm_p9_0,
+	_vq_quantmap__44c0_sm_p9_0,
+	9,
+	9
+};
+
+static static_codebook _44c0_sm_p9_0 = {
+	2, 81,
+	_vq_lengthlist__44c0_sm_p9_0,
+	1, -516186112, 1627103232, 4, 0,
+	_vq_quantlist__44c0_sm_p9_0,
+	NULL,
+	&_vq_auxt__44c0_sm_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c0_sm_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 9,12,12,13,13, 6, 5, 5,
+	 7, 7, 8, 8,10,10,12,12,14,13, 6, 5, 5, 6, 7, 8,
+	 8,10, 9,11,12,13,12,18, 7, 7, 7, 7, 9, 9,11,11,
+	14,14,14,13,17, 7, 7, 8, 7, 9, 9,10,10,12,11,13,
+	12,18,10,10, 8, 8,10,10,12,11,13,14,16,15,17,11,
+	11, 8, 8,11,11,11,12,13,13,13,15,18,18,18,10,11,
+	10,10,12,13,14,13,17,14,17,17,17,10,10,11,11,14,
+	14,14,13,14,14,18,18,18,17,15,11,12,12,13,15,15,
+	16,17,18,16,18,14,15,11,11,14,13,14,14,16,17,18,
+	17,17,17,18,14,13,13,12,17,15,17,16,18,17,18,18,
+	18,12,13,12,13,16,14,18,18,
+};
+
+static float _vq_quantthresh__44c0_sm_p9_1[] = {
+	-93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 25.5, 
+	42.5, 59.5, 76.5, 93.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p9_1 = {
+	_vq_quantthresh__44c0_sm_p9_1,
+	_vq_quantmap__44c0_sm_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c0_sm_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c0_sm_p9_1,
+	1, -522616832, 1620115456, 4, 0,
+	_vq_quantlist__44c0_sm_p9_1,
+	NULL,
+	&_vq_auxt__44c0_sm_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c0_sm_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c0_sm_p9_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9,10, 6, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9,10, 6, 6, 7, 7, 7, 7, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,11,10,10, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10, 9,10,11,10, 9, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11,11, 9, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,11,10,11,11, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,11,11, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,10,10,11,11,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,
+	11,11,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,11,10,
+	11,11,10,10, 9,10,10,10, 9, 9, 9, 9, 9, 9,10,10,
+	10,11,11,11,11,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	11,10,11,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,11,11,11,10,11,11, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c0_sm_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c0_sm_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c0_sm_p9_2 = {
+	_vq_quantthresh__44c0_sm_p9_2,
+	_vq_quantmap__44c0_sm_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c0_sm_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c0_sm_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c0_sm_p9_2,
+	NULL,
+	&_vq_auxt__44c0_sm_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c0_sm_short[] = {
+	 5, 7,12,12,13,13,13,15,16,18, 4, 2,11, 5, 9, 7,
+	 9,12,13,14,13, 7, 8, 9, 8, 9,11,13,19,19, 9, 4,
+	12, 5,10, 7, 9,12,15,14,11, 6, 7, 7, 5, 6, 8,11,
+	15,17,10, 5, 8, 6, 6, 5, 6, 9,14,14,10, 5, 9, 7,
+	 7, 6, 6, 9,12,14,12, 6,10, 7, 7, 7, 8, 9,13,14,
+	14, 7, 9, 7, 5, 5, 6, 9,11,13,14, 9,10, 9, 6, 6,
+	 7, 8,10,13,
+};
+
+static static_codebook _huff_book__44c0_sm_short = {
+	2, 100,
+	_huff_lengthlist__44c0_sm_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c1_s_long[] = {
+	 3, 4,19, 9,10, 9, 9,10,11,12, 4, 2,19, 5, 6, 6,
+	 8,10,12,11,19,19,19,19,19,19,19,19,18,18, 8, 4,
+	18, 6, 8, 7,10,13,14,13,10, 5,18, 7, 4, 6, 7,10,
+	12,13, 9, 6,18, 7, 5, 6, 7,10,12,13, 9, 7,18, 9,
+	 7, 6, 6, 7,10,13, 9, 9,18,12, 9, 8, 6, 6, 9,12,
+	10,12,18,15,12,11, 9, 8, 8,11,11,14,18,17,15,13,
+	12, 9,10,12,
+};
+
+static static_codebook _huff_book__44c1_s_long = {
+	2, 100,
+	_huff_lengthlist__44c1_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c1_s_p1_0[] = {
+	 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0,
+	 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0,
+	 0, 0, 0, 0, 8, 9, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 8, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9,
+	 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c1_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p1_0 = {
+	_vq_quantthresh__44c1_s_p1_0,
+	_vq_quantmap__44c1_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c1_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c1_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c1_s_p1_0,
+	NULL,
+	&_vq_auxt__44c1_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p2_0 = {
+	_vq_quantthresh__44c1_s_p2_0,
+	_vq_quantmap__44c1_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c1_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c1_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_s_p2_0,
+	NULL,
+	&_vq_auxt__44c1_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_s_p3_0[] = {
+	 2, 3, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p3_0 = {
+	_vq_quantthresh__44c1_s_p3_0,
+	_vq_quantmap__44c1_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c1_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c1_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_s_p3_0,
+	NULL,
+	&_vq_auxt__44c1_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c1_s_p4_0[] = {
+	 1, 3, 2, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 9, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c1_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p4_0 = {
+	_vq_quantthresh__44c1_s_p4_0,
+	_vq_quantmap__44c1_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c1_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c1_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c1_s_p4_0,
+	NULL,
+	&_vq_auxt__44c1_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c1_s_p5_0[] = {
+	 1, 3, 3, 5, 5, 6, 6, 8, 8, 0, 0, 0, 7, 7, 8, 7,
+	 9, 9, 0, 0, 0, 7, 7, 8, 8, 9, 9, 0, 0, 0, 7, 7,
+	 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0,
+	 8, 8, 9, 9,10,10, 0, 0, 0, 8, 8, 9, 9,10,10, 0,
+	 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11,
+	11,
+};
+
+static float _vq_quantthresh__44c1_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c1_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p5_0 = {
+	_vq_quantthresh__44c1_s_p5_0,
+	_vq_quantmap__44c1_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c1_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c1_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c1_s_p5_0,
+	NULL,
+	&_vq_auxt__44c1_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c1_s_p6_0[] = {
+	 1, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,
+	11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,
+	10,10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9,10,10,
+	10,11,11,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,12,13,12, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,
+	10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9,
+	 9,10, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	10,10,10,10,11,11,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,11,11,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,13,12,13,13, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,11,12,12,12,13,13,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,12,12,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44c1_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c1_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p6_0 = {
+	_vq_quantthresh__44c1_s_p6_0,
+	_vq_quantmap__44c1_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c1_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c1_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c1_s_p6_0,
+	NULL,
+	&_vq_auxt__44c1_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c1_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10,11,10,10, 9, 9, 6, 9, 9,
+	10,10,10,10, 9, 9, 7,10,10,11,10,10,11,11,11, 6,
+	 9, 9,10, 9, 9,11,10,10, 6, 9, 9,10, 9, 9,11,10,
+	10,
+};
+
+static float _vq_quantthresh__44c1_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c1_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p7_0 = {
+	_vq_quantthresh__44c1_s_p7_0,
+	_vq_quantmap__44c1_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c1_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c1_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c1_s_p7_0,
+	NULL,
+	&_vq_auxt__44c1_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c1_s_p7_1[] = {
+	 2, 3, 3, 6, 6, 7, 7, 7, 7, 8, 8,10,10,10, 6, 6,
+	 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8,
+	 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7,
+	 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c1_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c1_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p7_1 = {
+	_vq_quantthresh__44c1_s_p7_1,
+	_vq_quantmap__44c1_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c1_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c1_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c1_s_p7_1,
+	NULL,
+	&_vq_auxt__44c1_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 7, 7, 9, 8,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 6, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 9, 9, 9,10,10,10,11,12,11, 0,12,
+	13, 9, 8, 9, 9,10,10,11,11,11,11, 0, 0, 0, 9, 9,
+	 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0,13,14,10,10,11,11,12,12,
+	12,13, 0, 0, 0,14,14,10,10,11,10,12,12,13,13, 0,
+	 0, 0, 0, 0,12,11,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,10,12,11,14,13,
+};
+
+static float _vq_quantthresh__44c1_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c1_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p8_0 = {
+	_vq_quantthresh__44c1_s_p8_0,
+	_vq_quantmap__44c1_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c1_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c1_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c1_s_p8_0,
+	NULL,
+	&_vq_auxt__44c1_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_s_p8_1[] = {
+	 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6,
+	 6, 6, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c1_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p8_1 = {
+	_vq_quantthresh__44c1_s_p8_1,
+	_vq_quantmap__44c1_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c1_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c1_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_s_p8_1,
+	NULL,
+	&_vq_auxt__44c1_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_s_p9_0[] = {
+	 1, 6, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 7, 6,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 6, 6, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 8,
+};
+
+static float _vq_quantthresh__44c1_s_p9_0[] = {
+	-1215.5, -994.5, -773.5, -552.5, -331.5, -110.5, 110.5, 331.5, 
+	552.5, 773.5, 994.5, 1215.5, 
+};
+
+static long _vq_quantmap__44c1_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p9_0 = {
+	_vq_quantthresh__44c1_s_p9_0,
+	_vq_quantmap__44c1_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c1_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c1_s_p9_0,
+	1, -514541568, 1627103232, 4, 0,
+	_vq_quantlist__44c1_s_p9_0,
+	NULL,
+	&_vq_auxt__44c1_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_s_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 9,12,12,13,12, 6, 5, 5,
+	 7, 7, 8, 8,10,10,11,12,13,13, 6, 5, 5, 7, 7, 8,
+	 8, 9, 9,11,11,12,12,15, 7, 7, 7, 7, 9, 9,11,11,
+	13,13,14,13,15, 7, 7, 8, 7, 9, 9,10,10,12,11,14,
+	12,15,10,10, 8, 8,10,10,12,11,12,13,14,13,15,10,
+	10, 8, 8,11,10,11,11,13,12,13,15,14,15,15,10,10,
+	10,10,12,13,13,12,15,14,15,15,13,10,10,11,11,13,
+	13,13,12,13,13,15,15,15,14,15,11,11,13,13,13,13,
+	14,15,15,15,15,13,13,11,11,12,13,13,14,13,15,15,
+	15,14,15,15,13,12,12,11,13,13,15,15,15,15,15,15,
+	14,13,12,13,12,15,13,15,15,
+};
+
+static float _vq_quantthresh__44c1_s_p9_1[] = {
+	-93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 25.5, 
+	42.5, 59.5, 76.5, 93.5, 
+};
+
+static long _vq_quantmap__44c1_s_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p9_1 = {
+	_vq_quantthresh__44c1_s_p9_1,
+	_vq_quantmap__44c1_s_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c1_s_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c1_s_p9_1,
+	1, -522616832, 1620115456, 4, 0,
+	_vq_quantlist__44c1_s_p9_1,
+	NULL,
+	&_vq_auxt__44c1_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_s_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c1_s_p9_2[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 8, 9, 9,
+	 9,10,10,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9,10,10,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9,10,10,11,10, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9,10, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,11, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10, 9,10,10,10,11,11, 9, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,11,11,11,11, 9, 9,
+	 9, 9, 9, 9,10, 9,10, 9, 9, 9,10,10,10,11,10, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,11,11,11,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,
+	11,11,10, 9, 9,10, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	11,11,11,10, 9,10,10,10, 9, 9, 9, 9,10, 9,10,10,
+	10,10,11,11,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	11,10,10,10,10,10,10, 9, 9, 9, 9,10, 9, 9, 9, 9,
+	10,10,10,11,11,10,10,11,11, 9, 9,10, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c1_s_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c1_s_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_s_p9_2 = {
+	_vq_quantthresh__44c1_s_p9_2,
+	_vq_quantmap__44c1_s_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c1_s_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c1_s_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c1_s_p9_2,
+	NULL,
+	&_vq_auxt__44c1_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c1_s_short[] = {
+	 5, 7,17,13,12,12,14,16,15,16, 4, 2,17, 5, 7, 6,
+	 8,11,14,13,16,16,16,16,16,16,16,16,16,16,10, 4,
+	16, 4, 8, 6, 7,11,14,14,10, 5,16, 6, 5, 6, 8,12,
+	15,15,10, 5,16, 5, 6, 5, 7,10,14,15,11, 6,16, 7,
+	 8, 7, 7,10,14,14,13, 8,16, 8, 7, 7, 8,10,12,13,
+	12, 8,16, 7, 5, 5, 6, 8,11,13,13, 9,16, 9, 6, 6,
+	 7, 8,10,13,
+};
+
+static static_codebook _huff_book__44c1_s_short = {
+	2, 100,
+	_huff_lengthlist__44c1_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c1_sm_long[] = {
+	 3, 4,10, 9,11, 9,10,11,11,13, 4, 2,11, 5, 7, 7,
+	 8,10,12,13,10,10, 7,12, 8, 9, 9,10,12,13, 8, 5,
+	13, 6, 9, 7,10,12,15,15,10, 6, 7, 8, 5, 5, 7,10,
+	12,13, 9, 6, 8, 7, 5, 5, 6, 9,11,12, 9, 8, 9, 9,
+	 6, 5, 5, 7,10,13,10,10,10,12, 9, 7, 6, 7, 9,13,
+	10,13,11,17,11,11, 9, 8, 9,12,12,16,14,17,15,14,
+	12,10,10,12,
+};
+
+static static_codebook _huff_book__44c1_sm_long = {
+	2, 100,
+	_huff_lengthlist__44c1_sm_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c1_sm_p1_0[] = {
+	 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 9, 9,10, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 9,10, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_sm_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p1_0 = {
+	_vq_quantthresh__44c1_sm_p1_0,
+	_vq_quantmap__44c1_sm_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c1_sm_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c1_sm_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c1_sm_p1_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_sm_p2_0[] = {
+	 1, 5, 5, 0, 0, 0, 5, 6, 0, 0, 0, 5, 6, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 8,
+	 8, 0, 0, 0, 8, 8, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0, 0, 8, 8, 0, 0,
+	 0, 8, 8, 0, 0, 0,10, 9, 0, 0, 0, 0, 0, 0, 0, 6,
+	 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 9,
+	10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8,
+	 0, 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0,
+	 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0,10,10, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 8,10,10, 0, 0, 0,10,10, 0, 0, 0, 9,10, 0, 0, 0,
+	10,10, 0, 0, 0, 0, 0, 0, 0, 8,10,10, 0, 0, 0,10,
+	10, 0, 0, 0,10, 9, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_sm_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p2_0 = {
+	_vq_quantthresh__44c1_sm_p2_0,
+	_vq_quantmap__44c1_sm_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c1_sm_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c1_sm_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_sm_p2_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_sm_p3_0[] = {
+	 2, 3, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 7, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 8, 8,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_sm_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p3_0 = {
+	_vq_quantthresh__44c1_sm_p3_0,
+	_vq_quantmap__44c1_sm_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c1_sm_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c1_sm_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_sm_p3_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c1_sm_p4_0[] = {
+	 1, 3, 3, 7, 7, 0, 0, 0, 0, 0, 5, 5, 6, 6, 0, 0,
+	 0, 0, 0, 5, 5, 7, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 9, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c1_sm_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p4_0 = {
+	_vq_quantthresh__44c1_sm_p4_0,
+	_vq_quantmap__44c1_sm_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c1_sm_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c1_sm_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c1_sm_p4_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c1_sm_p5_0[] = {
+	 2, 3, 3, 5, 5, 6, 6, 8, 8, 0, 5, 5, 6, 6, 7, 7,
+	 9, 9, 0, 5, 5, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7,
+	 7, 7, 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0,
+	 7, 7, 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0,
+	 0, 0, 9, 9, 9, 9,10,10, 0, 0, 0, 0, 0, 8, 8,10,
+	10,
+};
+
+static float _vq_quantthresh__44c1_sm_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p5_0 = {
+	_vq_quantthresh__44c1_sm_p5_0,
+	_vq_quantmap__44c1_sm_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c1_sm_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c1_sm_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c1_sm_p5_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c1_sm_p6_0[] = {
+	 2, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10,10,
+	11,11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10,
+	10,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,
+	10,10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9,
+	 9,10,10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8,10,10,
+	10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, 8,10,
+	10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, 8,
+	 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8,
+	 8, 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 9, 9,10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,10,10,11,11,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,10,10,11,11,11,11,13,12,13,13, 0, 0,
+	 0, 0, 0, 0, 0,10,10,11,11,11,11,13,13,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,12,12,13,12,14,
+	14,
+};
+
+static float _vq_quantthresh__44c1_sm_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p6_0 = {
+	_vq_quantthresh__44c1_sm_p6_0,
+	_vq_quantmap__44c1_sm_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c1_sm_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c1_sm_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c1_sm_p6_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c1_sm_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,10,10,10, 6, 9, 9,10,10,10,10, 9, 9, 6, 9, 9,
+	10,10,10,10,10, 9, 7,10,10,11,10,10,11,11,11, 6,
+	 9, 9,10, 9, 9,11,10,10, 6, 9, 9,10, 9, 9,11,10,
+	10,
+};
+
+static float _vq_quantthresh__44c1_sm_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p7_0 = {
+	_vq_quantthresh__44c1_sm_p7_0,
+	_vq_quantmap__44c1_sm_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c1_sm_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c1_sm_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c1_sm_p7_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c1_sm_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8,10, 7, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 9, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c1_sm_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p7_1 = {
+	_vq_quantthresh__44c1_sm_p7_1,
+	_vq_quantmap__44c1_sm_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c1_sm_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c1_sm_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c1_sm_p7_1,
+	NULL,
+	&_vq_auxt__44c1_sm_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_sm_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9,11,10, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 9, 9, 9,10,10,11,11,12,11, 0,13,
+	13, 9, 9, 9, 9,10,10,11,11,12,12, 0, 0, 0, 9, 9,
+	 9, 9,10,10,11,12,12,12, 0, 0, 0,10,10, 9, 9,11,
+	11,12,12,13,13, 0, 0, 0,13,13,10,10,11,11,12,12,
+	13,13, 0, 0, 0,14,14,10,10,11,10,12,12,13,13, 0,
+	 0, 0, 0, 0,12,11,11,11,12,12,14,13, 0, 0, 0, 0,
+	 0,12,12,11,10,12,12,14,13,
+};
+
+static float _vq_quantthresh__44c1_sm_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p8_0 = {
+	_vq_quantthresh__44c1_sm_p8_0,
+	_vq_quantmap__44c1_sm_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c1_sm_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c1_sm_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c1_sm_p8_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c1_sm_p8_1[] = {
+	 2, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c1_sm_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p8_1 = {
+	_vq_quantthresh__44c1_sm_p8_1,
+	_vq_quantmap__44c1_sm_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c1_sm_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c1_sm_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c1_sm_p8_1,
+	NULL,
+	&_vq_auxt__44c1_sm_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_sm_p9_0[] = {
+	 1, 5, 5,11,11,11,11,11,11,11,11,11,11, 4, 5, 5,
+	11,10,11,11,11,11,11,11,11,11, 4, 5, 4,11,11,11,
+	11,11,11,11,11,11,11,11, 6, 7,11, 9,11,11,11,11,
+	11,11,11,11,11, 6, 7, 9, 8,11,11,11,11,11,11,11,
+	11,11, 9, 9, 7, 8,11,11,11,11,11,11,11,11,11,10,
+	10, 9,10,11,11,11,11,11,11,11,11,11,11,11, 8,11,
+	10,10,11,11,11,11,11,11,11,11,11, 9,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11, 9,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44c1_sm_p9_0[] = {
+	-1215.5, -994.5, -773.5, -552.5, -331.5, -110.5, 110.5, 331.5, 
+	552.5, 773.5, 994.5, 1215.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p9_0 = {
+	_vq_quantthresh__44c1_sm_p9_0,
+	_vq_quantmap__44c1_sm_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c1_sm_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c1_sm_p9_0,
+	1, -514541568, 1627103232, 4, 0,
+	_vq_quantlist__44c1_sm_p9_0,
+	NULL,
+	&_vq_auxt__44c1_sm_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c1_sm_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7,10,10,12,12,13,13, 6, 5, 5,
+	 7, 7, 8, 8,10,10,12,12,14,13, 6, 5, 5, 7, 7, 8,
+	 8,10,10,12,12,13,13,16, 7, 7, 7, 7, 9, 9,11,11,
+	13,14,13,15,18, 7, 6, 8, 7, 9, 9,11,10,12,12,14,
+	12,19,10,10, 8, 8,10,10,12,11,13,15,15,15,17,11,
+	11, 8, 7,11,10,12,12,13,13,14,15,16,17,17,10,11,
+	10,10,13,13,14,13,16,15,17,17,16,10,10,11,11,14,
+	14,16,13,14,14,17,19,17,15,14,11,11,13,13,15,14,
+	16,15,17,16,17,14,14,11,11,14,13,14,14,14,15,17,
+	16,16,16,17,13,13,13,13,16,14,17,15,16,17,18,18,
+	17,13,13,13,13,15,15,16,16,
+};
+
+static float _vq_quantthresh__44c1_sm_p9_1[] = {
+	-93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 25.5, 
+	42.5, 59.5, 76.5, 93.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p9_1 = {
+	_vq_quantthresh__44c1_sm_p9_1,
+	_vq_quantmap__44c1_sm_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c1_sm_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c1_sm_p9_1,
+	1, -522616832, 1620115456, 4, 0,
+	_vq_quantlist__44c1_sm_p9_1,
+	NULL,
+	&_vq_auxt__44c1_sm_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c1_sm_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c1_sm_p9_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9,10, 6, 6, 7, 7, 8, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9,10, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,11,11,11, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10, 7, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10, 9,10,10,10, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11,11, 8, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9,10,11,10,11,11, 9, 9,
+	 9, 9, 9, 9, 9,10,10, 9, 9, 9,10,11,10,11,11, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,11,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,11,10,11,
+	11,10,11, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,
+	11,11,11,11, 9,10,10,10, 9, 9, 9, 9,10, 9,10,10,
+	10,11,11,11,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	11,10,11,10,11,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,11,11,10,10,10,11, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c1_sm_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c1_sm_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c1_sm_p9_2 = {
+	_vq_quantthresh__44c1_sm_p9_2,
+	_vq_quantmap__44c1_sm_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c1_sm_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c1_sm_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c1_sm_p9_2,
+	NULL,
+	&_vq_auxt__44c1_sm_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c1_sm_short[] = {
+	 4, 7,13,13,13,13,14,16,16,19, 4, 2,13, 5, 8, 7,
+	 9,12,14,13,16, 9,10,10, 9,10,11,13,17,19, 9, 4,
+	13, 5,10, 6, 8,11,15,15,11, 6, 9, 7, 6, 6, 8,11,
+	14,18,11, 5, 9, 6, 6, 5, 6, 9,13,15,12, 6, 9, 7,
+	 6, 5, 5, 8,12,15,13, 7,10, 8, 6, 6, 7, 9,12,13,
+	13, 9,11, 9, 6, 5, 6, 8,11,13,13,11,13,11, 7, 6,
+	 7, 8,10,12,
+};
+
+static static_codebook _huff_book__44c1_sm_short = {
+	2, 100,
+	_huff_lengthlist__44c1_sm_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c2_s_long[] = {
+	 5, 5,12,10,11,10,10,10,11,13, 5, 1, 9, 5, 8, 7,
+	 8,10,13,13,12, 9, 8,11, 7, 8, 9,11,13,15, 9, 5,
+	12, 6, 9, 8,10,12,15,14,12, 7, 6, 8, 5, 6, 7,10,
+	12,13,10, 7, 8, 7, 6, 6, 7, 9,12,12,10, 8, 9, 9,
+	 7, 6, 6, 7,10,11,10, 9,10,11, 9, 8, 6, 6, 8,11,
+	10,12,13,15,11,10, 8, 7, 8,11,11,13,16,16,14,13,
+	11, 9, 9,10,
+};
+
+static static_codebook _huff_book__44c2_s_long = {
+	2, 100,
+	_huff_lengthlist__44c2_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c2_s_p1_0[] = {
+	 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0,
+	 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0,
+	 0, 0, 0, 0, 8, 9, 8, 0, 0, 0, 0, 0, 0, 8, 9,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 0, 0, 0, 8,10, 9, 0,
+	 0, 0, 0, 0, 0, 8, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9,
+	 0, 0, 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c2_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c2_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p1_0 = {
+	_vq_quantthresh__44c2_s_p1_0,
+	_vq_quantmap__44c2_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c2_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c2_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c2_s_p1_0,
+	NULL,
+	&_vq_auxt__44c2_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c2_s_p2_0[] = {
+	 1, 4, 4, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0,
+	 7, 7, 0, 0, 0, 0, 0, 0, 0, 4, 6, 6, 0, 0, 0, 8,
+	 8, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0,
+	 0, 0, 4, 6, 6, 0, 0, 0, 8, 9, 0, 0, 0, 8, 8, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,11,10, 0, 0,
+	 0,11,11, 0, 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 7,
+	 8, 8, 0, 0, 0,10,11, 0, 0, 0,11,11, 0, 0, 0,11,
+	11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 8, 8, 0, 0, 0,11,11, 0, 0, 0,11,11,
+	 0, 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0,
+	 0, 0,11,11, 0, 0, 0,11,11, 0, 0, 0,11,11, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7, 9, 9, 0, 0, 0,11,12, 0, 0, 0,11,12, 0, 0, 0,
+	12,11, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,12,
+	11, 0, 0, 0,11,11, 0, 0, 0,11,11, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c2_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c2_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p2_0 = {
+	_vq_quantthresh__44c2_s_p2_0,
+	_vq_quantmap__44c2_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c2_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c2_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c2_s_p2_0,
+	NULL,
+	&_vq_auxt__44c2_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c2_s_p3_0[] = {
+	 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c2_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c2_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p3_0 = {
+	_vq_quantthresh__44c2_s_p3_0,
+	_vq_quantmap__44c2_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c2_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c2_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c2_s_p3_0,
+	NULL,
+	&_vq_auxt__44c2_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c2_s_p4_0[] = {
+	 1, 3, 3, 6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, 0,
+	 0, 0, 0, 6, 6, 6, 6, 0, 0, 0, 0, 0, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c2_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c2_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p4_0 = {
+	_vq_quantthresh__44c2_s_p4_0,
+	_vq_quantmap__44c2_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c2_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c2_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c2_s_p4_0,
+	NULL,
+	&_vq_auxt__44c2_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c2_s_p5_0[] = {
+	 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 7, 7, 7, 7, 8, 8,
+	 9, 9, 0, 7, 7, 7, 7, 8, 8, 9, 9, 0, 7, 7, 8, 7,
+	 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0,
+	 8, 8, 9, 9,10,10, 0, 0, 0, 8, 8, 9, 9,10,10, 0,
+	 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11,
+	11,
+};
+
+static float _vq_quantthresh__44c2_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c2_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p5_0 = {
+	_vq_quantthresh__44c2_s_p5_0,
+	_vq_quantmap__44c2_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c2_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c2_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c2_s_p5_0,
+	NULL,
+	&_vq_auxt__44c2_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c2_s_p6_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,10,
+	11,11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,
+	10,11,11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9, 9, 9, 9,
+	10,10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9, 9, 9,
+	 9,10,11,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,11,12,12,12, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,
+	 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9,
+	 9, 9, 9,10,10,11,11,12,12,12,13, 0, 0, 0, 0, 0,
+	10,10,10,10,10,11,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,10,10,11,11,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,11,12,12,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,11,11,12,12,13,12,14,13,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,12,12,12,13,13,
+	14,
+};
+
+static float _vq_quantthresh__44c2_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c2_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p6_0 = {
+	_vq_quantthresh__44c2_s_p6_0,
+	_vq_quantmap__44c2_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c2_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c2_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c2_s_p6_0,
+	NULL,
+	&_vq_auxt__44c2_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c2_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10, 9,10,10,
+	10,11,10,10, 6, 9, 9,10,10,10,11, 9, 9, 6, 9, 9,
+	10,10,10,11, 9, 9, 7,10,10,11,10,10,11,11,10, 6,
+	 9, 9,10, 9, 9,11,10,10, 6, 9, 9,10, 9,10,11,10,
+	10,
+};
+
+static float _vq_quantthresh__44c2_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c2_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p7_0 = {
+	_vq_quantthresh__44c2_s_p7_0,
+	_vq_quantmap__44c2_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c2_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c2_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c2_s_p7_0,
+	NULL,
+	&_vq_auxt__44c2_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c2_s_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 7, 7, 7, 7,10, 6, 6, 6, 6,
+	 7, 7, 8, 7, 8, 8, 9, 6, 6, 6, 6, 7, 7, 7, 7, 7,
+	 7,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,10, 9, 9, 6,
+	 6, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10, 9, 8, 8, 8,
+	 8, 8, 8,10,10,10, 9,10, 8, 8, 8, 8, 8, 8,10,10,
+	10,10, 9, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c2_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c2_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p7_1 = {
+	_vq_quantthresh__44c2_s_p7_1,
+	_vq_quantmap__44c2_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c2_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c2_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c2_s_p7_1,
+	NULL,
+	&_vq_auxt__44c2_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c2_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 9, 8, 9, 9,10,10, 7, 5, 5, 7, 7, 8,
+	 8, 8, 9,10, 9,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9,10,10,10,11,
+	11, 0,12,12, 9, 9,10,10,10,10,11,11,12,12, 0,13,
+	12, 9, 9,10, 9,10,10,11,11,11,12, 0, 0, 0,10,10,
+	10,10,11,11,11,11,12,12, 0, 0, 0,10,10, 9, 9,11,
+	11,12,12,12,13, 0, 0, 0,13,13,10,10,11,11,12,12,
+	13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0,
+	 0, 0, 0, 0,12,12,11,12,12,12,14,13, 0, 0, 0, 0,
+	 0,12,12,12,12,12,12,14,13,
+};
+
+static float _vq_quantthresh__44c2_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c2_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p8_0 = {
+	_vq_quantthresh__44c2_s_p8_0,
+	_vq_quantmap__44c2_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c2_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c2_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c2_s_p8_0,
+	NULL,
+	&_vq_auxt__44c2_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c2_s_p8_1[] = {
+	 2, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c2_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c2_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p8_1 = {
+	_vq_quantthresh__44c2_s_p8_1,
+	_vq_quantmap__44c2_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c2_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c2_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c2_s_p8_1,
+	NULL,
+	&_vq_auxt__44c2_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c2_s_p9_0[] = {
+	 1, 5, 4,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 5, 7, 7,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 9, 6, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44c2_s_p9_0[] = {
+	-1215.5, -994.5, -773.5, -552.5, -331.5, -110.5, 110.5, 331.5, 
+	552.5, 773.5, 994.5, 1215.5, 
+};
+
+static long _vq_quantmap__44c2_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p9_0 = {
+	_vq_quantthresh__44c2_s_p9_0,
+	_vq_quantmap__44c2_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c2_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c2_s_p9_0,
+	1, -514541568, 1627103232, 4, 0,
+	_vq_quantlist__44c2_s_p9_0,
+	NULL,
+	&_vq_auxt__44c2_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c2_s_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 9,11,11,12,12, 6, 5, 5,
+	 7, 7, 8, 8,10,10,12,11,13,13, 6, 5, 5, 7, 7, 8,
+	 8, 9, 9,11,11,12,13,16, 7, 7, 8, 8, 9, 9,10,10,
+	13,13,16,14,16, 7, 7, 8, 8, 9, 9,10,10,13,13,15,
+	13,16,10,10, 8, 8,10,10,11,11,12,12,15,14,16,11,
+	11, 8, 8,10,10,11,11,12,12,14,13,16,16,16,10,11,
+	10,10,12,12,14,13,13,13,16,16,16,10, 9,10, 7,13,
+	12,13,13,13,13,16,16,16,14,15,11,11,12,12,13,13,
+	15,14,16,16,16,16,14,11, 9,12, 9,15,13,13,14,16,
+	16,16,16,16,13,13,12,12,14,15,16,15,16,16,15,16,
+	16,13,12,12,11,15,13,14,15,
+};
+
+static float _vq_quantthresh__44c2_s_p9_1[] = {
+	-93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 25.5, 
+	42.5, 59.5, 76.5, 93.5, 
+};
+
+static long _vq_quantmap__44c2_s_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p9_1 = {
+	_vq_quantthresh__44c2_s_p9_1,
+	_vq_quantmap__44c2_s_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c2_s_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c2_s_p9_1,
+	1, -522616832, 1620115456, 4, 0,
+	_vq_quantlist__44c2_s_p9_1,
+	NULL,
+	&_vq_auxt__44c2_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c2_s_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c2_s_p9_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9,
+	 9,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,11,10, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10, 7, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,11,11, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 8, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,11,11,10,11,10, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,10, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,10,11,11,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,11,10,10,11,
+	10,10,11, 9, 9,10,10, 9, 9,10,10, 9, 9,10,10,10,
+	11,10,11,10,10, 9, 9,10, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,11,10,10, 9,10, 9, 9, 9, 9,10, 9, 9, 9,10,
+	10,10,11,11,10,10,10,10, 9, 9,10, 9, 9, 9,10, 9,
+	10,10,10,10,11,10,11,11,10, 9, 9, 9, 9, 9, 9, 9,
+	10,
+};
+
+static float _vq_quantthresh__44c2_s_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c2_s_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c2_s_p9_2 = {
+	_vq_quantthresh__44c2_s_p9_2,
+	_vq_quantmap__44c2_s_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c2_s_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c2_s_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c2_s_p9_2,
+	NULL,
+	&_vq_auxt__44c2_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c2_s_short[] = {
+	 9, 9,12,11,11,11,12,12,12,13, 6, 2, 9, 4, 7, 6,
+	 8,11,15,17,12, 7, 8, 9, 7, 9,10,13,15,17,11, 4,
+	12, 4, 9, 5, 8,11,16,17,12, 6, 7, 6, 6, 6, 8,11,
+	15,17,11, 5, 9, 5, 6, 5, 6,10,15,15,12, 7,11, 7,
+	 7, 6, 7,10,13,16,13, 8,11, 9, 8, 6, 7,10,12,16,
+	13, 9, 9, 8, 5, 5, 6, 9,12,14,16,10, 9, 9, 6, 5,
+	 6, 8,11,14,
+};
+
+static static_codebook _huff_book__44c2_s_short = {
+	2, 100,
+	_huff_lengthlist__44c2_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c3_s_long[] = {
+	 4, 5,11,10,12,10,10,10,11,12, 4, 2,11, 5,11, 6,
+	 7, 9,13,16,11,11, 7,11, 6, 8, 8, 9,11,12,10, 5,
+	11, 6,10, 7, 9,11,16,16,14, 9, 6, 9, 4, 5, 7, 8,
+	11,13,10, 6, 7, 7, 5, 5, 6, 8,10,11,10, 7, 8, 8,
+	 6, 6, 5, 7, 9,10,10, 9, 8,11, 8, 7, 6, 6, 7,10,
+	10,12,10,14, 9, 9, 7, 7, 7, 9,10,14,11,16,12,12,
+	 9, 8, 8, 9,
+};
+
+static static_codebook _huff_book__44c3_s_long = {
+	2, 100,
+	_huff_lengthlist__44c3_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c3_s_p1_0[] = {
+	 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0,
+	 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0,
+	 0, 0, 0, 0, 8, 9, 8, 0, 0, 0, 0, 0, 0, 8, 9,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 0, 0, 0, 8,10, 9, 0,
+	 0, 0, 0, 0, 0, 8, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9,
+	 0, 0, 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c3_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c3_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p1_0 = {
+	_vq_quantthresh__44c3_s_p1_0,
+	_vq_quantmap__44c3_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c3_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c3_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c3_s_p1_0,
+	NULL,
+	&_vq_auxt__44c3_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c3_s_p2_0[] = {
+	 2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0,
+	 8, 7, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 8,
+	 7, 0, 0, 0, 7, 7, 0, 0, 0,10, 9, 0, 0, 0, 0, 0,
+	 0, 0, 5, 5, 6, 0, 0, 0, 7, 8, 0, 0, 0, 7, 7, 0,
+	 0, 0, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 7, 7, 0, 0,
+	 0, 7, 8, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5,
+	 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9,
+	 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 5, 8, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7,
+	 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5, 7, 8, 0,
+	 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 8, 9,10, 0, 0, 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0,
+	10,10, 0, 0, 0, 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 9,
+	 9, 0, 0, 0, 9, 9, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c3_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c3_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p2_0 = {
+	_vq_quantthresh__44c3_s_p2_0,
+	_vq_quantmap__44c3_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c3_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c3_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c3_s_p2_0,
+	NULL,
+	&_vq_auxt__44c3_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c3_s_p3_0[] = {
+	 2, 3, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 8, 8,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c3_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c3_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p3_0 = {
+	_vq_quantthresh__44c3_s_p3_0,
+	_vq_quantmap__44c3_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c3_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c3_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c3_s_p3_0,
+	NULL,
+	&_vq_auxt__44c3_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c3_s_p4_0[] = {
+	 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6,
+	 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0,
+	 7, 7, 0, 0, 0, 0, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c3_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c3_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p4_0 = {
+	_vq_quantthresh__44c3_s_p4_0,
+	_vq_quantmap__44c3_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c3_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c3_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c3_s_p4_0,
+	NULL,
+	&_vq_auxt__44c3_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c3_s_p5_0[] = {
+	 2, 3, 3, 5, 5, 7, 7, 9, 8, 0, 4, 4, 7, 7, 7, 7,
+	 9, 9, 0, 5, 5, 6, 7, 7, 7, 9, 9, 0, 6, 6, 7, 7,
+	 7, 7, 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0,
+	 8, 8, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0,
+	 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__44c3_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c3_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p5_0 = {
+	_vq_quantthresh__44c3_s_p5_0,
+	_vq_quantmap__44c3_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c3_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c3_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c3_s_p5_0,
+	NULL,
+	&_vq_auxt__44c3_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c3_s_p6_0[] = {
+	 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	11,11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10, 9,
+	10,10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10,
+	 9,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,12,11,12,12, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, 8,
+	 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8,
+	 8, 9, 9,10,10,11,11,12,12,13,12, 0, 0, 0, 0, 0,
+	 9, 9,10,10,11,10,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,10,10,11,11,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,10,10,11,11,12,12,12,12,13,13, 0, 0,
+	 0, 0, 0, 0, 0,10,10,11,11,11,11,12,12,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,12,13,13,13,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,
+	13,
+};
+
+static float _vq_quantthresh__44c3_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c3_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p6_0 = {
+	_vq_quantthresh__44c3_s_p6_0,
+	_vq_quantmap__44c3_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c3_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c3_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c3_s_p6_0,
+	NULL,
+	&_vq_auxt__44c3_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c3_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10,10,10,10, 9, 9, 6, 9, 9,
+	10,10,10,10, 9, 9, 7,10,10,10,11,11,11,10,11, 6,
+	 9, 9,10,10, 9,11,10,10, 6, 9, 9,10, 9, 9,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44c3_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c3_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p7_0 = {
+	_vq_quantthresh__44c3_s_p7_0,
+	_vq_quantmap__44c3_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c3_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c3_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c3_s_p7_0,
+	NULL,
+	&_vq_auxt__44c3_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c3_s_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 9,
+};
+
+static float _vq_quantthresh__44c3_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c3_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p7_1 = {
+	_vq_quantthresh__44c3_s_p7_1,
+	_vq_quantmap__44c3_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c3_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c3_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c3_s_p7_1,
+	NULL,
+	&_vq_auxt__44c3_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c3_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 7, 8, 8, 8, 9, 9,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 9, 9, 9, 9,10,10, 7, 5, 5, 7, 7, 8,
+	 8, 9, 9, 9,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,11,12, 9, 9, 9,10,10,10,11,11,11,12, 0,13,
+	13, 9, 9, 9, 9,10,10,11,11,12,12, 0, 0, 0,10, 9,
+	 9, 9,10,11,11,11,12,12, 0, 0, 0,10,10, 9, 9,11,
+	11,11,11,12,13, 0, 0, 0,13,13,10,10,11,11,12,12,
+	13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0,
+	 0, 0, 0, 0,12,12,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,11,12,12,13,13,
+};
+
+static float _vq_quantthresh__44c3_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c3_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p8_0 = {
+	_vq_quantthresh__44c3_s_p8_0,
+	_vq_quantmap__44c3_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c3_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c3_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c3_s_p8_0,
+	NULL,
+	&_vq_auxt__44c3_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c3_s_p8_1[] = {
+	 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c3_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c3_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p8_1 = {
+	_vq_quantthresh__44c3_s_p8_1,
+	_vq_quantmap__44c3_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c3_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c3_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c3_s_p8_1,
+	NULL,
+	&_vq_auxt__44c3_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c3_s_p9_0[] = {
+	 1, 4, 4,10,10,10,10,10,10,10,10,10,10, 5,10, 7,
+	10,10,10,10,10,10,10,10,10,10, 5, 8, 6,10,10,10,
+	10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44c3_s_p9_0[] = {
+	-1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 382.5, 
+	637.5, 892.5, 1147.5, 1402.5, 
+};
+
+static long _vq_quantmap__44c3_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p9_0 = {
+	_vq_quantthresh__44c3_s_p9_0,
+	_vq_quantmap__44c3_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c3_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c3_s_p9_0,
+	1, -514332672, 1627381760, 4, 0,
+	_vq_quantlist__44c3_s_p9_0,
+	NULL,
+	&_vq_auxt__44c3_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c3_s_p9_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 9,11,11,11,12,12,12, 6,
+	 5, 5, 7, 7, 8, 8,10, 9,11,11,13,12,13,14, 6, 5,
+	 5, 7, 7, 8, 8,10,10,11,11,12,12,13,13,17, 7, 7,
+	 8, 8, 9, 9,10,10,12,12,14,13,14,14,17, 8, 7, 8,
+	 7, 9, 9,10,10,12,12,13,13,13,14,17,11,11, 8, 8,
+	10,10,11,11,12,12,13,13,15,14,17,11,11, 8, 7,10,
+	10,11,11,12,12,13,14,14,13,17,17,17,10,11,10,10,
+	12,12,13,12,13,13,14,14,17,16,16,10,10,11, 9,13,
+	12,13,13,13,13,14,14,16,16,15,13,15,11,12,12,12,
+	14,14,14,14,14,15,16,16,16,14,14,11, 9,12,10,13,
+	13,14,14,14,14,16,16,16,16,16,12,13,12,12,13,14,
+	14,14,15,15,15,16,16,15,16,13,11,13,10,14,12,15,
+	14,16,14,15,16,16,16,16,15,15,13,13,13,13,14,14,
+	16,16,16,16,16,15,16,16,14,13,12,13,13,14,16,16,
+	16,
+};
+
+static float _vq_quantthresh__44c3_s_p9_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__44c3_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p9_1 = {
+	_vq_quantthresh__44c3_s_p9_1,
+	_vq_quantmap__44c3_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _44c3_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__44c3_s_p9_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__44c3_s_p9_1,
+	NULL,
+	&_vq_auxt__44c3_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c3_s_p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c3_s_p9_2[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9,
+	 8,10, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9,10, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9,
+	 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10, 8, 7, 8, 8, 9, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,10, 8, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,10,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,
+	10,10,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	11,10,11,10, 9, 9, 9,10, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,11,11,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,10, 9,
+	10,10,10,10,11,10,11,10,10, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c3_s_p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c3_s_p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c3_s_p9_2 = {
+	_vq_quantthresh__44c3_s_p9_2,
+	_vq_quantmap__44c3_s_p9_2,
+	17,
+	17
+};
+
+static static_codebook _44c3_s_p9_2 = {
+	2, 289,
+	_vq_lengthlist__44c3_s_p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c3_s_p9_2,
+	NULL,
+	&_vq_auxt__44c3_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c3_s_short[] = {
+	10,10,13,12,13,12,12,12,12,13, 8, 3,11, 5,10, 5,
+	 7,11,14,16,11, 6, 9, 8, 7, 7, 9,12,15,16,12, 4,
+	12, 4,10, 5, 8,12,15,16,12, 6, 8, 7, 5, 5, 7,11,
+	14,15,11, 4, 9, 4, 6, 4, 6, 9,13,15,10, 6,10, 7,
+	 7, 5, 6, 9,13,15,12, 9,11, 9, 8, 6, 7, 9,12,15,
+	13,11,10, 9, 6, 5, 5, 8,11,14,16,12,11,10, 6, 5,
+	 6, 8,10,14,
+};
+
+static static_codebook _huff_book__44c3_s_short = {
+	2, 100,
+	_huff_lengthlist__44c3_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c4_s_long[] = {
+	 3, 5,11,11,13,11,11,11,12,12, 5, 2,11, 6,10, 7,
+	 8,10,13,16,10, 9, 6,10, 6, 7, 8, 9,11,12,11, 5,
+	11, 7,10, 8,10,12,15,17,12, 8, 5, 9, 4, 5, 7, 8,
+	10,12,10, 6, 7, 8, 5, 5, 6, 8,10,11,10, 8, 8, 9,
+	 6, 6, 6, 7, 9,10,11,10, 9,11, 8, 7, 6, 6, 7, 9,
+	11,13,10,15, 9, 9, 7, 7, 7, 8,10,15,11,17,11,11,
+	 9, 8, 7, 8,
+};
+
+static static_codebook _huff_book__44c4_s_long = {
+	2, 100,
+	_huff_lengthlist__44c4_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c4_s_p1_0[] = {
+	 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 0,
+	 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0,
+	 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0,
+	 0, 0, 7, 9, 8, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0, 0,
+	 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0,
+	 0, 0, 0, 0, 8,10, 8, 0, 0, 0, 0, 0, 0, 8, 9,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0,
+	 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 8, 0, 0, 0, 0, 0, 0, 8,10, 9, 0,
+	 0, 0, 0, 0, 0, 8, 8,10, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9,
+	 0, 0, 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c4_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c4_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p1_0 = {
+	_vq_quantthresh__44c4_s_p1_0,
+	_vq_quantmap__44c4_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c4_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c4_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c4_s_p1_0,
+	NULL,
+	&_vq_auxt__44c4_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c4_s_p2_0[] = {
+	 2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0,
+	 7, 7, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 8,
+	 7, 0, 0, 0, 7, 7, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 5, 6, 6, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 7, 7, 0, 0,
+	 0, 7, 7, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5,
+	 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9,
+	 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 5, 8, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7,
+	 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5, 7, 8, 0,
+	 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7,10,10, 0, 0, 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0,
+	10,10, 0, 0, 0, 0, 0, 0, 0, 7,10,10, 0, 0, 0, 9,
+	 9, 0, 0, 0, 9, 9, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c4_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c4_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p2_0 = {
+	_vq_quantthresh__44c4_s_p2_0,
+	_vq_quantmap__44c4_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c4_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c4_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c4_s_p2_0,
+	NULL,
+	&_vq_auxt__44c4_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c4_s_p3_0[] = {
+	 2, 3, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c4_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c4_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p3_0 = {
+	_vq_quantthresh__44c4_s_p3_0,
+	_vq_quantmap__44c4_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c4_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c4_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c4_s_p3_0,
+	NULL,
+	&_vq_auxt__44c4_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c4_s_p4_0[] = {
+	 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6,
+	 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0,
+	 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c4_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c4_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p4_0 = {
+	_vq_quantthresh__44c4_s_p4_0,
+	_vq_quantmap__44c4_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c4_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c4_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c4_s_p4_0,
+	NULL,
+	&_vq_auxt__44c4_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c4_s_p5_0[] = {
+	 2, 3, 3, 6, 6, 7, 7, 9, 9, 0, 4, 4, 7, 7, 7, 7,
+	 9, 9, 0, 4, 4, 7, 7, 7, 7, 9, 9, 0, 6, 6, 7, 7,
+	 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0,
+	 8, 8, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0,
+	 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11,
+	11,
+};
+
+static float _vq_quantthresh__44c4_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c4_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p5_0 = {
+	_vq_quantthresh__44c4_s_p5_0,
+	_vq_quantmap__44c4_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c4_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c4_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c4_s_p5_0,
+	NULL,
+	&_vq_auxt__44c4_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c4_s_p6_0[] = {
+	 2, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,10, 9,10,10,11,
+	11, 0, 4, 4, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	11,11, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10, 9,
+	10,11,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10,
+	10,11,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,
+	10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,11,12,12, 0, 0, 0, 0, 0, 8, 8,
+	 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8,
+	 8, 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0,
+	 9, 9,10,10,11,10,11,11,12,12,12,12, 0, 0, 0, 0,
+	 0, 0, 0,10,10,10,10,11,11,12,12,13,12, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,11,12,12,12,13,12, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,11,11,12,12,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,12,12,13,13,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,
+	13,
+};
+
+static float _vq_quantthresh__44c4_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c4_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p6_0 = {
+	_vq_quantthresh__44c4_s_p6_0,
+	_vq_quantmap__44c4_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c4_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c4_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c4_s_p6_0,
+	NULL,
+	&_vq_auxt__44c4_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c4_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10,10,10,10,10, 9, 6, 9, 9,
+	10, 9,10,11, 9, 9, 7,10,10,11,11,11,11,10,10, 6,
+	 9, 9,10, 9, 9,10,10, 9, 6, 9, 9,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44c4_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c4_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p7_0 = {
+	_vq_quantthresh__44c4_s_p7_0,
+	_vq_quantmap__44c4_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c4_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c4_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c4_s_p7_0,
+	NULL,
+	&_vq_auxt__44c4_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c4_s_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 9,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c4_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c4_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p7_1 = {
+	_vq_quantthresh__44c4_s_p7_1,
+	_vq_quantmap__44c4_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c4_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c4_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c4_s_p7_1,
+	NULL,
+	&_vq_auxt__44c4_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c4_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 9, 9,10,10,11,11, 7, 5, 5, 7, 7, 8,
+	 8, 9, 9,10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 9, 9, 9,10,10,10,10,11,11, 0,12,
+	12, 9, 8, 9, 9,10,10,11,11,12,11, 0, 0, 0, 9,10,
+	 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0,13,13,10,10,10,11,12,12,
+	12,12, 0, 0, 0,14,14,10,10,11,11,11,11,12,12, 0,
+	 0, 0, 0, 0,11,12,11,11,12,12,12,13, 0, 0, 0, 0,
+	 0,12,12,11,11,12,12,13,13,
+};
+
+static float _vq_quantthresh__44c4_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c4_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p8_0 = {
+	_vq_quantthresh__44c4_s_p8_0,
+	_vq_quantmap__44c4_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c4_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c4_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c4_s_p8_0,
+	NULL,
+	&_vq_auxt__44c4_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c4_s_p8_1[] = {
+	 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c4_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c4_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p8_1 = {
+	_vq_quantthresh__44c4_s_p8_1,
+	_vq_quantmap__44c4_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c4_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c4_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c4_s_p8_1,
+	NULL,
+	&_vq_auxt__44c4_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c4_s_p9_0[] = {
+	 1, 3, 3,10,10,10,10,10,10,10,10,10,10, 5, 7, 7,
+	10,10,10,10,10,10,10,10,10,10, 5, 7, 8,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44c4_s_p9_0[] = {
+	-1732.5, -1417.5, -1102.5, -787.5, -472.5, -157.5, 157.5, 472.5, 
+	787.5, 1102.5, 1417.5, 1732.5, 
+};
+
+static long _vq_quantmap__44c4_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p9_0 = {
+	_vq_quantthresh__44c4_s_p9_0,
+	_vq_quantmap__44c4_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c4_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c4_s_p9_0,
+	1, -513964032, 1628680192, 4, 0,
+	_vq_quantlist__44c4_s_p9_0,
+	NULL,
+	&_vq_auxt__44c4_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c4_s_p9_1[] = {
+	 1, 4, 4, 5, 6, 7, 7, 9, 9,11,11,12,12,12,13, 6,
+	 5, 5, 6, 7, 8, 8,10,10,11,11,13,13,13,13, 6, 5,
+	 5, 7, 7, 8, 8,11,10,11,11,12,13,12,13,17, 7, 7,
+	 8, 8, 9, 9,11,11,12,12,12,13,15,14,17, 7, 7, 8,
+	 8, 9, 9,11,10,12,12,13,13,14,13,17,11,12, 9, 9,
+	10,10,12,12,13,13,14,14,14,14,17,12,11, 9, 8,11,
+	10,11,12,13,13,13,14,14,14,17,17,17,11,11,11,11,
+	13,13,13,13,14,13,15,14,17,17,17,11,10,11, 9,13,
+	12,13,14,15,14,15,14,17,17,17,14,14,11,12,12,13,
+	14,14,16,15,15,15,17,17,17,15,15,12,11,13,11,13,
+	13,13,15,16,14,17,17,17,17,17,13,13,14,13,14,14,
+	15,15,16,15,17,17,17,17,17,14,14,14,12,14,12,16,
+	14,15,14,17,17,17,17,17,16,17,13,14,14,15,15,15,
+	17,15,17,17,17,17,17,16,17,13,14,14,14,15,17,15,
+	15,
+};
+
+static float _vq_quantthresh__44c4_s_p9_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44c4_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p9_1 = {
+	_vq_quantthresh__44c4_s_p9_1,
+	_vq_quantmap__44c4_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _44c4_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__44c4_s_p9_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44c4_s_p9_1,
+	NULL,
+	&_vq_auxt__44c4_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c4_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c4_s_p9_2[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9,11, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,11, 5, 5, 7, 7, 7,
+	 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,
+	 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9,10,10,10,10,10,10,11,11,11, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,11,11,
+	11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,
+	10,10,10,11,11,11, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,10,10,10,10,11,11,11,11,11, 8, 8, 9,
+	 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,11,11,11,
+	11,11, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,
+	10,10,11,11,11,11,11, 9, 9, 9, 9, 9,10,10,10,10,
+	10,10,10,10,10,10,10,11,11,11,11,11, 9, 9, 9, 9,
+	10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,
+	11,11,11, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,
+	10,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,11,11,11,11,11,11,11,10,10, 9,
+	10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,
+	11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,
+	10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10,
+	10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+	12,11,11,10,10,10,10,10,10,10,10,10,10,10,10,12,
+	11,12,12,11,11,11,11,11,10,10,10,10,10,10,10,10,
+	10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44c4_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c4_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c4_s_p9_2 = {
+	_vq_quantthresh__44c4_s_p9_2,
+	_vq_quantmap__44c4_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _44c4_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__44c4_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c4_s_p9_2,
+	NULL,
+	&_vq_auxt__44c4_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c4_s_short[] = {
+	 4, 9,13,12,16,11,12,15,15,16, 4, 2,11, 5,10, 6,
+	 8,11,14,14,13,11, 8,11, 7, 8,10,13,17,17,10, 4,
+	11, 5, 9, 6, 9,13,17,17,13, 9, 6, 9, 5, 5, 7,11,
+	15,17,10, 5, 7, 6, 5, 4, 7,10,15,15,10, 7, 9, 8,
+	 7, 6, 7,10,14,13,13,10,11,10, 8, 7, 8,10,14,14,
+	12,11,10, 9, 6, 5, 6, 9,13,17,14,13,11,10, 6, 6,
+	 6, 8,11,16,
+};
+
+static static_codebook _huff_book__44c4_s_short = {
+	2, 100,
+	_huff_lengthlist__44c4_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c5_s_long[] = {
+	 3, 6, 9,14,11,13,12,12,12,12, 6, 3, 5, 8, 6, 8,
+	10,11,12,14, 9, 5, 4,10, 5, 7, 8, 9,11,12,13, 8,
+	10, 9, 9, 9,12,15,16,17,10, 6, 5, 9, 3, 5, 6, 8,
+	10,12,10, 8, 7, 9, 5, 5, 6, 8,10,11,10, 9, 8,11,
+	 6, 6, 6, 7, 8,10,12,11, 9,13, 8, 7, 6, 6, 7, 9,
+	11,13,10,15, 9, 9, 7, 7, 7, 8,10,15,10,17,11,10,
+	 9, 8, 7, 7,
+};
+
+static static_codebook _huff_book__44c5_s_long = {
+	2, 100,
+	_huff_lengthlist__44c5_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c5_s_p1_0[] = {
+	 2, 4, 4, 0, 0, 0, 0, 0, 0, 4, 7, 6, 0, 0, 0, 0,
+	 0, 0, 4, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0,
+	 0, 0, 7, 9, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 9,10,11, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 9, 8, 0, 0,
+	 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 9,10,11,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 7, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 9, 8, 0, 0, 0, 0, 0, 0, 9,11,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 9,11,10, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c5_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c5_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p1_0 = {
+	_vq_quantthresh__44c5_s_p1_0,
+	_vq_quantmap__44c5_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c5_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__44c5_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c5_s_p1_0,
+	NULL,
+	&_vq_auxt__44c5_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c5_s_p2_0[] = {
+	 2, 4, 4, 0, 0, 0, 6, 5, 0, 0, 0, 5, 5, 0, 0, 0,
+	 7, 7, 0, 0, 0, 0, 0, 0, 0, 4, 6, 5, 0, 0, 0, 8,
+	 7, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0,
+	 0, 0, 4, 5, 6, 0, 0, 0, 7, 8, 0, 0, 0, 7, 8, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 8, 8, 0, 0,
+	 0, 8, 8, 0, 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 6,
+	 7, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0,10,
+	10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 7, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8,
+	 0, 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 0,
+	 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0,10,10, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7, 9, 9, 0, 0, 0,10,10, 0, 0, 0,10,10, 0, 0, 0,
+	10,10, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,10,
+	10, 0, 0, 0,10,10, 0, 0, 0,10,10, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c5_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c5_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p2_0 = {
+	_vq_quantthresh__44c5_s_p2_0,
+	_vq_quantmap__44c5_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c5_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c5_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c5_s_p2_0,
+	NULL,
+	&_vq_auxt__44c5_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c5_s_p3_0[] = {
+	 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c5_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c5_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p3_0 = {
+	_vq_quantthresh__44c5_s_p3_0,
+	_vq_quantmap__44c5_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _44c5_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__44c5_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c5_s_p3_0,
+	NULL,
+	&_vq_auxt__44c5_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c5_s_p4_0[] = {
+	 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6,
+	 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0,
+	 8, 7, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0,
+	 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c5_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c5_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p4_0 = {
+	_vq_quantthresh__44c5_s_p4_0,
+	_vq_quantmap__44c5_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _44c5_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__44c5_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c5_s_p4_0,
+	NULL,
+	&_vq_auxt__44c5_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c5_s_p5_0[] = {
+	 2, 3, 4, 5, 6, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7,
+	 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7,
+	 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0,
+	 7, 7, 8, 8,10,10, 0, 0, 0, 7, 8, 8, 8,10,10, 0,
+	 0, 0, 9, 9, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__44c5_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c5_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p5_0 = {
+	_vq_quantthresh__44c5_s_p5_0,
+	_vq_quantmap__44c5_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _44c5_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__44c5_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c5_s_p5_0,
+	NULL,
+	&_vq_auxt__44c5_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c5_s_p6_0[] = {
+	 2, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11,12,
+	12, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	12,12, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 0, 6, 6, 7, 7, 8, 8, 9,10,10,10,11,11,
+	11,12,12,12, 0, 0, 0, 7, 7, 8, 8,10,10,10,10,11,
+	11,12,12,12,12, 0, 0, 0, 7, 7, 9, 9,10,10,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 7, 7, 8, 9,10,10,10,
+	10,11,11,12,12,12,13, 0, 0, 0, 8, 8, 9, 9,10,10,
+	10,10,11,11,12,12,13,12, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8,
+	 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8,
+	 8, 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 9, 9,10,10,11,11,11,12,12,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,11,12,12,12,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,12,13,13,13, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,12,13,12,13,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,13,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,
+	13,
+};
+
+static float _vq_quantthresh__44c5_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c5_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p6_0 = {
+	_vq_quantthresh__44c5_s_p6_0,
+	_vq_quantmap__44c5_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _44c5_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__44c5_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c5_s_p6_0,
+	NULL,
+	&_vq_auxt__44c5_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c5_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10,10, 9,11,10,10, 6, 9, 9,
+	10, 9,10,11,10, 9, 7,10,10,11,11,11,11,10,10, 6,
+	 9, 9,10,10, 9,10, 9, 9, 6, 9, 9,10,10,10,11, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c5_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c5_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p7_0 = {
+	_vq_quantthresh__44c5_s_p7_0,
+	_vq_quantmap__44c5_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _44c5_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__44c5_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c5_s_p7_0,
+	NULL,
+	&_vq_auxt__44c5_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c5_s_p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7,
+	 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8,
+	 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 9, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c5_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c5_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p7_1 = {
+	_vq_quantthresh__44c5_s_p7_1,
+	_vq_quantmap__44c5_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c5_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c5_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c5_s_p7_1,
+	NULL,
+	&_vq_auxt__44c5_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c5_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,10,10, 6, 5, 5,
+	 7, 7, 8, 8, 9, 9,10,10,10,10, 7, 5, 5, 7, 7, 8,
+	 8, 9, 9,10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,11,12, 9, 9, 9, 9, 9,10,10,10,11,11, 0,13,
+	12, 9, 9, 9, 9,10,10,11,11,11,11, 0, 0, 0, 9,10,
+	 9, 9,10,10,11,11,12,11, 0, 0, 0,10,10, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0,13,13,10,10,11,11,11,12,
+	12,12, 0, 0, 0,14,14,10,10,11,11,11,11,12,12, 0,
+	 0, 0, 0, 0,12,12,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,11,12,12,13,13,
+};
+
+static float _vq_quantthresh__44c5_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c5_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p8_0 = {
+	_vq_quantthresh__44c5_s_p8_0,
+	_vq_quantmap__44c5_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _44c5_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__44c5_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c5_s_p8_0,
+	NULL,
+	&_vq_auxt__44c5_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c5_s_p8_1[] = {
+	 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c5_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c5_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p8_1 = {
+	_vq_quantthresh__44c5_s_p8_1,
+	_vq_quantmap__44c5_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _44c5_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__44c5_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c5_s_p8_1,
+	NULL,
+	&_vq_auxt__44c5_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p9_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c5_s_p9_0[] = {
+	 1, 3, 3,11,11,11,11,11,11,11,11,11,11,11,11, 5,
+	 7, 7,11,11,11,11,11,11,11,11,11,11,11,11, 5, 9,
+	 7,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44c5_s_p9_0[] = {
+	-2320.5, -1963.5, -1606.5, -1249.5, -892.5, -535.5, -178.5, 178.5, 
+	535.5, 892.5, 1249.5, 1606.5, 1963.5, 2320.5, 
+};
+
+static long _vq_quantmap__44c5_s_p9_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p9_0 = {
+	_vq_quantthresh__44c5_s_p9_0,
+	_vq_quantmap__44c5_s_p9_0,
+	15,
+	15
+};
+
+static static_codebook _44c5_s_p9_0 = {
+	2, 225,
+	_vq_lengthlist__44c5_s_p9_0,
+	1, -512522752, 1628852224, 4, 0,
+	_vq_quantlist__44c5_s_p9_0,
+	NULL,
+	&_vq_auxt__44c5_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p9_1[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c5_s_p9_1[] = {
+	 1, 4, 4, 6, 6, 8, 7, 9, 9,10,10,11,11,12,12,13,
+	13, 6, 5, 5, 6, 6, 8, 8,10,10,11,11,12,12,13,13,
+	13,13, 6, 5, 5, 7, 7, 8, 8,10,10,11,11,12,12,13,
+	13,13,13,18, 7, 7, 8, 8, 9, 9,10,11,11,11,12,12,
+	13,13,13,14,18, 7, 7, 8, 8, 9, 9,11,10,12,12,13,
+	13,13,13,14,15,18,12,12, 9, 9,10,10,11,11,12,12,
+	13,13,13,14,14,14,18,12,12, 9, 8,10,10,11,11,12,
+	12,14,13,13,14,15,15,18,16,18,11,11,11,11,12,12,
+	13,13,13,14,14,14,14,15,17,18,17,11,10,11, 9,12,
+	13,13,13,14,14,13,14,14,14,18,18,18,13,14,11,12,
+	12,12,13,14,13,13,14,15,16,15,18,18,18,15,13,12,
+	 9,12,11,13,14,14,15,14,14,16,14,18,18,18,18,18,
+	12,13,13,13,13,14,15,14,15,15,15,15,18,18,18,18,
+	17,14,12,13,11,14,12,15,14,14,15,16,15,18,18,18,
+	17,18,15,18,13,13,14,13,15,14,16,15,17,16,18,18,
+	17,18,18,15,17,14,13,14,12,14,14,15,15,15,15,18,
+	18,18,17,17,18,18,14,15,14,14,14,14,15,14,16,16,
+	17,18,18,18,18,17,17,15,15,13,13,15,13,15,13,15,
+	15,
+};
+
+static float _vq_quantthresh__44c5_s_p9_1[] = {
+	-157.5, -136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 
+	10.5, 31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 157.5, 
+};
+
+static long _vq_quantmap__44c5_s_p9_1[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p9_1 = {
+	_vq_quantthresh__44c5_s_p9_1,
+	_vq_quantmap__44c5_s_p9_1,
+	17,
+	17
+};
+
+static static_codebook _44c5_s_p9_1 = {
+	2, 289,
+	_vq_lengthlist__44c5_s_p9_1,
+	1, -520814592, 1620377600, 5, 0,
+	_vq_quantlist__44c5_s_p9_1,
+	NULL,
+	&_vq_auxt__44c5_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c5_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c5_s_p9_2[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,11, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10,11, 5, 5, 7, 7, 7,
+	 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,
+	 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,11,11,11, 8, 8, 8, 8,
+	 8, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,11,11,
+	11, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9,10,10,10,
+	10,10,10,11,11,11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9,10,10,10,10,10,10,10,11,11,11,11,11, 8, 8, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,11,11,11,
+	11,11, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,
+	10,10,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,10,10,10,11,11,11,11,11, 9, 9, 9, 9,
+	 9, 9,10,10,10,10,10,10,10,10,10,10,11,11,11,11,
+	11,11,11, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,
+	10,11,11,11,11,11,11,11,10, 9,10,10,10,10,10,10,
+	10,10,10, 9,10,10,11,11,11,11,11,11,11, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,
+	11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	11,11,11,11,11,11,11,11,11,10,10,10,10,10, 9,10,
+	10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10,
+	10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+	11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,11,
+	11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10,
+	10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44c5_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c5_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c5_s_p9_2 = {
+	_vq_quantthresh__44c5_s_p9_2,
+	_vq_quantmap__44c5_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _44c5_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__44c5_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c5_s_p9_2,
+	NULL,
+	&_vq_auxt__44c5_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c5_s_short[] = {
+	 3, 9,10,15,10,10,11,15,15,17, 4, 5, 7, 8, 7, 7,
+	 9,13,15,16, 7, 6, 6,10, 6, 8, 9,12,12,16,10, 8,
+	11, 8, 8, 7,11,15,17,17, 8, 5, 5, 8, 3, 4, 6,10,
+	15,17,10, 7, 7, 7, 4, 4, 5,10,14,17,10, 9, 8, 9,
+	 6, 5, 6,10,14,17,12,12,11,12, 9, 8, 8,11,14,17,
+	13,14,13,10, 7, 5, 6, 9,13,17,14,14,14,10, 7, 5,
+	 6, 7,10,15,
+};
+
+static static_codebook _huff_book__44c5_s_short = {
+	2, 100,
+	_huff_lengthlist__44c5_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c6_s_long[] = {
+	 3, 8,11,13,13,13,12,12,13,18, 6, 3, 4, 7, 9, 9,
+	11,11,13,16, 9, 4, 3, 5, 7, 7, 9,10,14,18,11, 7,
+	 4, 4, 6, 6, 8,10,14,15,11, 9, 6, 6, 6, 6, 8,10,
+	13,15,10, 9, 7, 6, 6, 6, 7, 8,12,12,12,10, 9, 8,
+	 7, 6, 6, 7,11,12,11,10,10, 9, 9, 7, 7, 6, 9,12,
+	12,12,13,13,13,10, 9, 8,10,12,13,14,16,16,17,14,
+	12,11,11,13,
+};
+
+static static_codebook _huff_book__44c6_s_long = {
+	2, 100,
+	_huff_lengthlist__44c6_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c6_s_p1_0[] = {
+	 1, 5, 5, 0, 5, 5, 0, 5, 5, 5, 8, 7, 0, 9, 8, 0,
+	 8, 8, 6, 7, 8, 0, 8, 9, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 5, 8, 8, 0, 8, 8, 0, 8, 8, 5, 8, 8,
+	 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+	 9, 8, 0, 8, 8, 0, 8, 8, 5, 8, 9, 0, 8, 8, 0, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44c6_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c6_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p1_0 = {
+	_vq_quantthresh__44c6_s_p1_0,
+	_vq_quantmap__44c6_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c6_s_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44c6_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c6_s_p1_0,
+	NULL,
+	&_vq_auxt__44c6_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c6_s_p2_0[] = {
+	 3, 5, 5, 8, 8, 0, 5, 5, 9, 9, 0, 5, 5, 9, 9, 0,
+	 7, 7,10,10, 0, 0, 0,10,10, 5, 7, 7, 9, 9, 0, 8,
+	 7,10, 9, 0, 8, 8,10,10, 0,10,10,11,11, 0, 0, 0,
+	11,11, 5, 7, 7, 9, 9, 0, 7, 8, 9,10, 0, 7, 8,10,
+	10, 0,10,10,11,11, 0, 0, 0,11,11, 8, 9, 9,11,10,
+	 0,11,10,12,12, 0,11,11,12,12, 0,13,13,14,14, 0,
+	 0, 0,14,14, 8, 9, 9,10,11, 0,10,11,12,12, 0,11,
+	11,12,12, 0,13,13,14,14, 0, 0, 0,14,14, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 5, 8, 8,11,11, 0, 7, 7,10,10,
+	 0, 7, 7,10,10, 0, 9, 8,11,10, 0, 0, 0,11,11, 5,
+	 7, 8,11,11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 8,
+	 9,10,11, 0, 0, 0,11,11, 9,10,10,12,12, 0,10,10,
+	12,11, 0,10,10,12,12, 0,12,12,13,13, 0, 0, 0,13,
+	13, 9,10,10,12,12, 0,10,10,11,12, 0,10,10,12,12,
+	 0,12,12,13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 5, 8, 7,11,10, 0, 7, 7,10,10, 0, 7, 7,
+	10,10, 0, 8, 9,11,11, 0, 0, 0,11,10, 5, 7, 8,10,
+	11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 8,11,11,
+	 0, 0, 0,11,11, 9,10,10,12,12, 0,10,10,12,12, 0,
+	10,10,12,12, 0,12,12,13,13, 0, 0, 0,13,13, 9, 9,
+	10,12,12, 0,10,10,12,12, 0,10,10,12,12, 0,12,12,
+	13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7,10,10,13,13, 0, 9, 8,12,12, 0, 8, 9,12,12, 0,
+	10, 9,12,12, 0, 0, 0,12,12, 7,10,10,13,13, 0, 9,
+	 9,12,12, 0, 9, 8,12,12, 0, 9,10,12,12, 0, 0, 0,
+	12,12,10,11,11,14,14, 0,11,10,13,13, 0,11,11,13,
+	13, 0,12,12,13,13, 0, 0, 0,13,13,10,11,11,14,14,
+	 0,10,11,13,13, 0,11,11,13,13, 0,12,12,13,13, 0,
+	 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,
+	11,11,14,14, 0,11,11,13,13, 0,11,10,13,13, 0,12,
+	12,13,13, 0, 0, 0,13,13,10,11,11,14,14, 0,11,11,
+	13,13, 0,10,11,13,13, 0,12,12,13,13, 0, 0, 0,13,
+	13,
+};
+
+static float _vq_quantthresh__44c6_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c6_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p2_0 = {
+	_vq_quantthresh__44c6_s_p2_0,
+	_vq_quantmap__44c6_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c6_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c6_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c6_s_p2_0,
+	NULL,
+	&_vq_auxt__44c6_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c6_s_p3_0[] = {
+	 2, 4, 4, 5, 5, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7,
+	 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 6, 6,
+	 8, 8,10,10, 0, 0, 0, 6, 6, 8, 8,10,10, 0, 0, 0,
+	 7, 7, 8, 8,10,10, 0, 0, 0, 7, 7, 9, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c6_s_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c6_s_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p3_0 = {
+	_vq_quantthresh__44c6_s_p3_0,
+	_vq_quantmap__44c6_s_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44c6_s_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44c6_s_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c6_s_p3_0,
+	NULL,
+	&_vq_auxt__44c6_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c6_s_p4_0[] = {
+	 3, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 8, 9,10,10,11,11,
+	11,11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,
+	11,11,11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,
+	10,11,11,12,12,12,12, 0, 0, 0, 6, 6, 7, 7, 9, 9,
+	10,10,11,11,12,12,12,13, 0, 0, 0, 0, 0, 7, 7, 9,
+	 9,10,10,11,11,12,12,12,13, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c6_s_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c6_s_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p4_0 = {
+	_vq_quantthresh__44c6_s_p4_0,
+	_vq_quantmap__44c6_s_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44c6_s_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44c6_s_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c6_s_p4_0,
+	NULL,
+	&_vq_auxt__44c6_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c6_s_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 4, 7, 7, 9,10,10,10,
+	10,10, 4, 7, 7, 9,10,10,10,10,10, 5, 9, 9, 9,11,
+	11, 9,11,11, 7,10,10,11,12,11,12,12,12, 7,10,10,
+	11,12,12,12,12,12, 6,10,10, 9,11,11,10,11,11, 7,
+	10, 9,11,12,12,11,12,11, 7,10,10,11,12,12,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44c6_s_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c6_s_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p5_0 = {
+	_vq_quantthresh__44c6_s_p5_0,
+	_vq_quantmap__44c6_s_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44c6_s_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44c6_s_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c6_s_p5_0,
+	NULL,
+	&_vq_auxt__44c6_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c6_s_p5_1[] = {
+	 3, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,11, 4, 4, 6, 6,
+	 8, 8, 9, 9, 9, 9,11, 4, 4, 6, 6, 8, 8, 9, 8, 9,
+	 9,12, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,12,12,12, 6,
+	 6, 8, 8, 9, 9, 9, 9,11,11,11, 7, 7, 8, 8, 9, 9,
+	 9, 9,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9,11,11,11,
+	 7, 7, 8, 8, 8, 8, 9, 9,11,11,11,11,11, 8, 8, 8,
+	 8, 9, 9,11,11,11,11,11, 7, 7, 8, 8, 8, 8,11,11,
+	11,11,11, 7, 7, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c6_s_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c6_s_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p5_1 = {
+	_vq_quantthresh__44c6_s_p5_1,
+	_vq_quantmap__44c6_s_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44c6_s_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44c6_s_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c6_s_p5_1,
+	NULL,
+	&_vq_auxt__44c6_s_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c6_s_p6_0[] = {
+	 1, 4, 4, 6, 7, 8, 8, 8, 8, 9, 9,10,10, 5, 5, 5,
+	 7, 7, 9, 9, 9, 9,10,10,11,11, 6, 5, 5, 7, 7, 9,
+	 9, 9, 9,10,10,11,11, 0, 7, 7, 7, 7, 9, 9,10,10,
+	11,11,11,11, 0, 7, 7, 7, 7, 9, 9,10,10,11,11,12,
+	12, 0,11,11, 8, 8,10, 9,10,11,11,11,12,12, 0,12,
+	12, 8, 8,10, 9,11,11,12,11,13,13, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__44c6_s_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c6_s_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p6_0 = {
+	_vq_quantthresh__44c6_s_p6_0,
+	_vq_quantmap__44c6_s_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44c6_s_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44c6_s_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c6_s_p6_0,
+	NULL,
+	&_vq_auxt__44c6_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c6_s_p6_1[] = {
+	 3, 4, 4, 5, 5, 6, 4, 4, 5, 5, 6, 4, 4, 5, 4, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c6_s_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c6_s_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p6_1 = {
+	_vq_quantthresh__44c6_s_p6_1,
+	_vq_quantmap__44c6_s_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44c6_s_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44c6_s_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c6_s_p6_1,
+	NULL,
+	&_vq_auxt__44c6_s_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c6_s_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 7, 7, 8, 8, 9, 9,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9, 9, 9,11,11,12,12,19, 7, 7, 7, 7, 9, 9,10,10,
+	11,11,12,12,19, 7, 7, 7, 7, 9, 9,10,10,11,11,12,
+	12,19,11,11, 8, 8,10,10,11,11,11,12,12,12,19,12,
+	12, 8, 8,10, 9,11,11,12,12,13,12,19,19,19,11,11,
+	10,10,11,11,12,12,13,13,19,19,19,11,11,10,10,11,
+	11,12,12,13,13,19,19,19,14,14,11,11,11,12,13,13,
+	13,13,19,19,19,15,15,11,11,12,12,13,12,14,14,19,
+	19,19,19,18,13,13,12,12,13,13,14,14,18,18,18,18,
+	18,13,12,12,12,13,13,14,14,
+};
+
+static float _vq_quantthresh__44c6_s_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44c6_s_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p7_0 = {
+	_vq_quantthresh__44c6_s_p7_0,
+	_vq_quantmap__44c6_s_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44c6_s_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44c6_s_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44c6_s_p7_0,
+	NULL,
+	&_vq_auxt__44c6_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c6_s_p7_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 9, 5, 5, 7, 7,
+	 7, 7, 7, 7, 8, 8, 9, 5, 5, 6, 6, 7, 7, 7, 7, 7,
+	 7, 9, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 7,
+	 7, 7, 7, 7, 8, 7, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8,
+	 8, 8, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9,
+	 7, 7, 8, 8, 7, 7, 8, 8, 9, 9, 9, 8, 9, 8, 8, 7,
+	 7, 7, 7, 9, 9, 8, 8, 9, 8, 8, 7, 7, 8, 8, 9, 9,
+	 9, 9, 8, 7, 7, 7, 7, 8, 8,
+};
+
+static float _vq_quantthresh__44c6_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c6_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p7_1 = {
+	_vq_quantthresh__44c6_s_p7_1,
+	_vq_quantmap__44c6_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c6_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c6_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c6_s_p7_1,
+	NULL,
+	&_vq_auxt__44c6_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c6_s_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 7, 7, 9, 9, 9,10,11,11, 6,
+	 5, 5, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11, 6, 5,
+	 5, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11,17, 8, 8,
+	 8, 8,10,10, 8, 9,10,10,11,11,12,11,17, 8, 8, 9,
+	 9,10,10, 9, 9,10,10,11,12,12,12,17,12,13, 9, 9,
+	10,10, 9,10,10,10,11,11,13,12,17,13,13,10, 9,10,
+	10,10,10,10,11,12,11,12,12,17,17,17, 9, 9, 9, 9,
+	10,10,11,11,11,12,12,13,17,17,17, 9, 9, 9, 9,11,
+	10,11,11,12,12,12,13,17,17,17,13,13,10,10,11,11,
+	12,11,12,13,13,13,17,17,17,14,13,10, 9,11, 9,12,
+	12,12,13,13,14,17,17,17,17,17,11,12,11,11,12,12,
+	13,14,13,14,17,17,17,17,17,12,10,11, 8,12,11,13,
+	14,14,14,17,17,16,16,16,13,15,11,12,12,13,13,13,
+	14,14,16,16,16,16,16,14,13,12, 9,13,10,14,13,14,
+	13,
+};
+
+static float _vq_quantthresh__44c6_s_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44c6_s_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p8_0 = {
+	_vq_quantthresh__44c6_s_p8_0,
+	_vq_quantmap__44c6_s_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44c6_s_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44c6_s_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44c6_s_p8_0,
+	NULL,
+	&_vq_auxt__44c6_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c6_s_p8_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
+	 9, 8, 9, 9, 9,11, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8,
+	 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,
+	 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,11,10,11, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,11, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9,11,11,
+	11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10, 9,10, 9,
+	10,10, 9,11,11,11, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10, 9,10, 9, 9, 9, 9,11,11,11,11,11, 8, 8, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,11,11,11,
+	11,11, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10,10, 9, 9,
+	 9, 9,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9,10,10,
+	 9,10, 9,10,10,10,10,11,11,11,11,11, 9, 9, 9, 9,
+	 9, 9,10,10,10,10, 9,10,10, 9,10, 9,11,11,11,11,
+	11,11,11, 9, 9, 9, 9,10, 9,10, 9, 9,10,10,10,10,
+	10,10,11,11,11,11,11,11, 9, 9, 9, 9,10,10,10,10,
+	 9,10, 9,10,10, 9,11,11,11,11,11,11,10, 9, 9, 9,
+	 9, 9,10, 9,10,10,10,10,10,10,10,11,11,11,11,11,
+	11,11, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,
+	11,11,11,11,11,11,11,11,11, 9,10, 9,10, 9,10,10,
+	10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10,
+	10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+	11,11,11,10,10, 9,10,10,10,10, 9,10, 9,10,10,11,
+	11,11,11,11,11,11,11,11,10,10,10, 9,10,10,10,10,
+	10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10,
+	10, 9,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44c6_s_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c6_s_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p8_1 = {
+	_vq_quantthresh__44c6_s_p8_1,
+	_vq_quantmap__44c6_s_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44c6_s_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44c6_s_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c6_s_p8_1,
+	NULL,
+	&_vq_auxt__44c6_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c6_s_p9_0[] = {
+	 1, 4, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c6_s_p9_0[] = {
+	-3503.5, -2866.5, -2229.5, -1592.5, -955.5, -318.5, 318.5, 955.5, 
+	1592.5, 2229.5, 2866.5, 3503.5, 
+};
+
+static long _vq_quantmap__44c6_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p9_0 = {
+	_vq_quantthresh__44c6_s_p9_0,
+	_vq_quantmap__44c6_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c6_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c6_s_p9_0,
+	1, -511845376, 1630791680, 4, 0,
+	_vq_quantlist__44c6_s_p9_0,
+	NULL,
+	&_vq_auxt__44c6_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c6_s_p9_1[] = {
+	 1, 4, 4, 7, 7, 7, 7, 7, 7, 8, 9,10,11, 6, 6, 6,
+	 7, 8, 8, 8, 7, 8, 9,10,11,10, 6, 5, 6, 7, 8, 8,
+	 8, 8, 8, 9,10,10,11,14, 9, 8, 8, 8, 9, 8, 8, 9,
+	10,10,12,11,14, 8, 8, 9, 8, 9, 8, 8, 8,11,10,11,
+	11,14,14,13, 8, 9, 9, 9, 9,10,11,11,12,12,13,12,
+	12, 8, 7,10, 9, 9, 9,11,11,11,10,13,13,13, 8, 9,
+	 9, 8,12,11,11,11,13,11,13,13,13, 9, 8, 9, 8,10,
+	10,11,10,11,10,13,13,13,12,12, 9,10,11,11,11,12,
+	13,12,13,13,13,13,12,10,10,10, 9,13,12,12,13,13,
+	13,13,13,13,12,12,10,10,12,12,13,13,13,13,13,13,
+	13,12,12,11,12,12,12,12,13,
+};
+
+static float _vq_quantthresh__44c6_s_p9_1[] = {
+	-269.5, -220.5, -171.5, -122.5, -73.5, -24.5, 24.5, 73.5, 
+	122.5, 171.5, 220.5, 269.5, 
+};
+
+static long _vq_quantmap__44c6_s_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p9_1 = {
+	_vq_quantthresh__44c6_s_p9_1,
+	_vq_quantmap__44c6_s_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c6_s_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c6_s_p9_1,
+	1, -518889472, 1622704128, 4, 0,
+	_vq_quantlist__44c6_s_p9_1,
+	NULL,
+	&_vq_auxt__44c6_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c6_s_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44c6_s_p9_2[] = {
+	 2, 4, 3, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44c6_s_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44c6_s_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c6_s_p9_2 = {
+	_vq_quantthresh__44c6_s_p9_2,
+	_vq_quantmap__44c6_s_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44c6_s_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44c6_s_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44c6_s_p9_2,
+	NULL,
+	&_vq_auxt__44c6_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c6_s_short[] = {
+	 4, 9,11,11,13,13,17,16,17,17, 4, 4, 6, 7, 9, 9,
+	12,15,17,17, 7, 5, 4, 5, 7, 8,11,12,17,17, 9, 6,
+	 4, 3, 5, 6,10,14,17,17,11, 8, 6, 4, 5, 6, 9,13,
+	17,17,11,10, 7, 5, 5, 5, 8,12,17,17,13,12, 9, 8,
+	 7, 6, 8,11,17,17,13,13, 9, 6, 6, 5, 6, 9,17,17,
+	17,16,10, 8, 7, 7, 8, 9,17,17,17,17,14,12,11,11,
+	11,13,17,17,
+};
+
+static static_codebook _huff_book__44c6_s_short = {
+	2, 100,
+	_huff_lengthlist__44c6_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c7_s_long[] = {
+	 3, 8,11,13,14,13,13,12,14,16, 6, 4, 5, 7, 9,10,
+	11,11,13,15,10, 4, 3, 5, 7, 7,10,10,14,16,11, 7,
+	 4, 4, 5, 6, 8,10,13,15,12, 9, 6, 5, 5, 6, 8, 9,
+	13,15,11, 9, 7, 6, 5, 5, 6, 8,11,13,11,10, 9, 8,
+	 7, 6, 6, 7,11,12,12,11,10, 9, 8, 7, 6, 6, 9,11,
+	12,12,12,12,12,10, 9, 8,10,12,12,14,15,16,16,14,
+	12,10,11,13,
+};
+
+static static_codebook _huff_book__44c7_s_long = {
+	2, 100,
+	_huff_lengthlist__44c7_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c7_s_p1_0[] = {
+	 1, 5, 5, 0, 5, 5, 0, 5, 5, 6, 8, 7, 0, 9, 8, 0,
+	 8, 8, 5, 7, 8, 0, 8, 9, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 5, 8, 8, 0, 8, 8, 0, 8, 8, 5, 8, 8,
+	 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+	 9, 8, 0, 8, 8, 0, 8, 8, 5, 8, 9, 0, 8, 8, 0, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44c7_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c7_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p1_0 = {
+	_vq_quantthresh__44c7_s_p1_0,
+	_vq_quantmap__44c7_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c7_s_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44c7_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c7_s_p1_0,
+	NULL,
+	&_vq_auxt__44c7_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c7_s_p2_0[] = {
+	 3, 5, 5, 8, 8, 0, 5, 5, 9, 9, 0, 5, 5, 9, 9, 0,
+	 7, 7,10, 9, 0, 0, 0, 9,10, 5, 7, 7, 9, 9, 0, 8,
+	 7,10, 9, 0, 8, 7,10, 9, 0,10, 9,11,11, 0, 0, 0,
+	11,11, 6, 7, 7, 9, 9, 0, 7, 8, 9,10, 0, 7, 8,10,
+	10, 0, 9, 9,11,11, 0, 0, 0,11,11, 8, 9, 9,11,10,
+	 0,11,10,12,12, 0,11,11,12,12, 0,13,13,14,14, 0,
+	 0, 0,14,14, 8, 9, 9,10,11, 0,10,11,11,12, 0,11,
+	11,12,12, 0,13,13,14,14, 0, 0, 0,14,14, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 5, 8, 7,11,11, 0, 7, 7,10,10,
+	 0, 7, 7,10,10, 0, 9, 8,11,10, 0, 0, 0,11,11, 5,
+	 7, 8,11,11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 8,
+	 9,10,11, 0, 0, 0,11,11, 9,10,10,12,12, 0,10,10,
+	12,11, 0,10,10,12,12, 0,12,12,13,13, 0, 0, 0,13,
+	13, 9,10,10,12,12, 0,10,10,11,12, 0,10,10,12,12,
+	 0,12,12,13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 5, 8, 7,11,10, 0, 7, 7,10,10, 0, 7, 7,
+	10,10, 0, 9, 9,11,11, 0, 0, 0,11,10, 5, 7, 8,10,
+	11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 9,11,11,
+	 0, 0, 0,10,11, 9,10, 9,12,11, 0,10,10,12,12, 0,
+	10,10,12,11, 0,12,12,13,13, 0, 0, 0,13,13, 9, 9,
+	10,11,12, 0,10,10,12,12, 0,10,10,11,12, 0,12,12,
+	13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7, 9, 9,13,13, 0, 9, 8,12,12, 0, 8, 9,12,12, 0,
+	10, 9,12,12, 0, 0, 0,12,12, 7,10, 9,13,13, 0, 9,
+	 9,12,12, 0, 9, 8,12,12, 0, 9,10,12,12, 0, 0, 0,
+	12,12,10,11,11,14,14, 0,11,10,13,12, 0,11,11,13,
+	13, 0,12,12,13,13, 0, 0, 0,13,13,10,11,11,14,14,
+	 0,10,11,12,13, 0,11,11,13,13, 0,12,12,13,13, 0,
+	 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,
+	11,11,14,14, 0,11,11,13,13, 0,11,10,13,13, 0,12,
+	12,13,13, 0, 0, 0,13,13,10,11,11,14,14, 0,11,11,
+	13,13, 0,10,11,13,13, 0,12,12,13,13, 0, 0, 0,13,
+	13,
+};
+
+static float _vq_quantthresh__44c7_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c7_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p2_0 = {
+	_vq_quantthresh__44c7_s_p2_0,
+	_vq_quantmap__44c7_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c7_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c7_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c7_s_p2_0,
+	NULL,
+	&_vq_auxt__44c7_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c7_s_p3_0[] = {
+	 2, 4, 4, 5, 5, 7, 7, 8, 8, 0, 4, 4, 6, 6, 7, 7,
+	 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 6, 6,
+	 8, 8,10,10, 0, 0, 0, 6, 6, 8, 8,10,10, 0, 0, 0,
+	 7, 7, 9, 9,10,10, 0, 0, 0, 7, 7, 9, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c7_s_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c7_s_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p3_0 = {
+	_vq_quantthresh__44c7_s_p3_0,
+	_vq_quantmap__44c7_s_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44c7_s_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44c7_s_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c7_s_p3_0,
+	NULL,
+	&_vq_auxt__44c7_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c7_s_p4_0[] = {
+	 3, 4, 4, 6, 5, 7, 7, 7, 7, 8, 8, 9, 9,10,10,11,
+	11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9,10,10,10,
+	11,11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,10,
+	11,11,11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,
+	10,11,11,12,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9,
+	 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c7_s_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c7_s_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p4_0 = {
+	_vq_quantthresh__44c7_s_p4_0,
+	_vq_quantmap__44c7_s_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44c7_s_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44c7_s_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c7_s_p4_0,
+	NULL,
+	&_vq_auxt__44c7_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c7_s_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 4, 7, 7,10,11,10,10,
+	11,11, 4, 7, 7,10,10,11,10,10,11, 5,10,10, 9,12,
+	11,10,12,12, 7,11,10,12,12,12,12,13,13, 7,10,11,
+	11,12,12,12,13,13, 5,10,10,10,12,12,10,12,12, 7,
+	11,10,12,13,13,12,12,12, 7,10,11,12,13,13,12,12,
+	12,
+};
+
+static float _vq_quantthresh__44c7_s_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c7_s_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p5_0 = {
+	_vq_quantthresh__44c7_s_p5_0,
+	_vq_quantmap__44c7_s_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44c7_s_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44c7_s_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c7_s_p5_0,
+	NULL,
+	&_vq_auxt__44c7_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c7_s_p5_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9,12, 4, 4, 6, 6,
+	 7, 7, 8, 8, 9, 9,11, 5, 5, 6, 6, 7, 7, 8, 8, 9,
+	 9,12, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,12,12,12, 6,
+	 6, 7, 7, 8, 8, 9, 9,12,12,12, 6, 6, 7, 7, 8, 8,
+	 9, 9,12,11,11, 6, 6, 7, 7, 8, 8, 9, 9,12,12,11,
+	 7, 7, 8, 8, 8, 8, 8, 8,12,12,12,11,11, 8, 8, 8,
+	 8, 8, 8,12,12,12,11,11, 7, 7, 7, 7, 8, 8,12,12,
+	12,11,11, 7, 7, 7, 7, 8, 8,
+};
+
+static float _vq_quantthresh__44c7_s_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c7_s_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p5_1 = {
+	_vq_quantthresh__44c7_s_p5_1,
+	_vq_quantmap__44c7_s_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44c7_s_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44c7_s_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c7_s_p5_1,
+	NULL,
+	&_vq_auxt__44c7_s_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c7_s_p6_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10, 9,10,10, 5, 5, 5,
+	 7, 7, 9, 9, 9, 9,10,10,11,11, 6, 5, 5, 7, 7, 9,
+	 9, 9, 9,11,10,11,11, 0, 6, 6, 7, 7, 9, 9,10,10,
+	11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10,11,11,12,
+	12, 0,11,10, 8, 8,10,10,11,11,11,12,12,12, 0,11,
+	11, 8, 8,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__44c7_s_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c7_s_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p6_0 = {
+	_vq_quantthresh__44c7_s_p6_0,
+	_vq_quantmap__44c7_s_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44c7_s_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44c7_s_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c7_s_p6_0,
+	NULL,
+	&_vq_auxt__44c7_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c7_s_p6_1[] = {
+	 3, 4, 4, 5, 5, 6, 4, 4, 5, 5, 6, 4, 4, 4, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c7_s_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c7_s_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p6_1 = {
+	_vq_quantthresh__44c7_s_p6_1,
+	_vq_quantmap__44c7_s_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44c7_s_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44c7_s_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c7_s_p6_1,
+	NULL,
+	&_vq_auxt__44c7_s_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c7_s_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 7, 7, 9, 8, 9, 9,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9, 9,10,11,11,12,12,20, 7, 7, 7, 7, 9, 9,10,10,
+	11,11,12,12,20, 7, 7, 7, 7, 9, 9,10,10,11,11,12,
+	12,20,11,11, 8, 8,10, 9,11,11,11,11,12,12,20,12,
+	12, 8, 8, 9, 9,11,11,12,12,12,12,20,20,20,11,11,
+	10,10,11,11,12,12,13,13,20,20,20,11,11,10,10,11,
+	11,12,12,13,13,20,20,20,14,14,11,11,11,12,13,13,
+	13,13,20,20,20,15,14,11,11,11,11,13,13,14,14,20,
+	20,20,20,19,12,12,12,12,13,13,14,14,19,19,19,19,
+	19,13,12,12,12,13,13,14,14,
+};
+
+static float _vq_quantthresh__44c7_s_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44c7_s_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p7_0 = {
+	_vq_quantthresh__44c7_s_p7_0,
+	_vq_quantmap__44c7_s_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44c7_s_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44c7_s_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44c7_s_p7_0,
+	NULL,
+	&_vq_auxt__44c7_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c7_s_p7_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 9, 5, 5, 6, 6,
+	 7, 7, 7, 7, 8, 8, 9, 5, 5, 6, 6, 7, 7, 7, 7, 7,
+	 7, 9, 6, 6, 7, 7, 7, 7, 8, 8, 7, 8, 9, 9, 9, 7,
+	 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8,
+	 8, 8, 9, 9, 9, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9,
+	 7, 7, 8, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 7, 7, 7,
+	 7, 8, 7, 9, 9, 9, 9, 9, 8, 8, 7, 7, 8, 8, 9, 9,
+	 9, 9, 9, 7, 7, 7, 7, 8, 8,
+};
+
+static float _vq_quantthresh__44c7_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c7_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p7_1 = {
+	_vq_quantthresh__44c7_s_p7_1,
+	_vq_quantmap__44c7_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c7_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c7_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c7_s_p7_1,
+	NULL,
+	&_vq_auxt__44c7_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c7_s_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9, 9,10,11,11, 6,
+	 5, 5, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11, 6, 5,
+	 5, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11,17, 8, 8,
+	 8, 8,10, 9, 8, 9,10,10,11,11,11,11,17, 8, 8, 8,
+	 8,10,10, 9, 9,10,10,11,11,12,12,17,12,13, 9, 9,
+	10,10, 9, 9,10,11,11,11,12,12,17,13,13, 9, 9,10,
+	10,10,10,10,10,11,11,12,12,17,17,17, 9, 9, 9, 9,
+	10,10,11,11,11,12,12,12,17,17,17, 9, 9, 9, 9,11,
+	10,11,12,11,12,13,12,17,17,17,13,14,10,10,10,11,
+	12,11,12,12,12,13,17,17,17,14,14,10, 9,10, 9,12,
+	12,12,12,13,13,17,17,17,17,17,11,11,11,11,11,12,
+	13,13,13,14,17,17,17,17,17,12,10,11, 9,12,11,13,
+	15,14,14,17,17,17,17,17,14,15,11,12,12,13,13,12,
+	14,14,17,16,16,16,16,15,13,12, 9,12,10,14,12,15,
+	14,
+};
+
+static float _vq_quantthresh__44c7_s_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44c7_s_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p8_0 = {
+	_vq_quantthresh__44c7_s_p8_0,
+	_vq_quantmap__44c7_s_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44c7_s_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44c7_s_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44c7_s_p8_0,
+	NULL,
+	&_vq_auxt__44c7_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c7_s_p8_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
+	 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,
+	 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,11,11,11, 7, 7, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,11, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,
+	11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9,
+	10,10, 9,11,11,11, 8, 9, 9, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9,10,10, 9, 9,10, 9,11,11,11,11,11, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,11,10,11,
+	11,11, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,10, 9,
+	 9,10,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10, 9, 9,10,10,10,10,11,11,11,11,11, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10, 9,10,10,10,10, 9,11,11,10,11,
+	11,11,11, 9, 9, 9, 9,10,10,10,10,10,10,10, 9,10,
+	10,10,11,11,11,11,11,11, 9, 9, 9, 9, 9,10,10,10,
+	10,10, 9, 9,10, 9,11,10,11,11,11,11,11, 9, 9, 9,
+	 9, 9,10,10, 9,10,10,10,10,10,10,11,11,11,11,11,
+	11,11,10, 9,10, 9,10,10,10,10,10,10,10,10,10, 9,
+	10,11,10,11,11,11,11,11,10, 9, 9,10,10,10,10,10,
+	10,10,10,10,10,11,11,11,11,11,11,11,10,11,10,10,
+	10,10,10,10,10,10, 9,10,10, 9,11,11,11,11,11,10,
+	11,11,11,10,10, 9, 9,10,10,10,10,10, 9,10,10,11,
+	11,11,11,11,10,11,11,11,10,10, 9, 9,10,10,10,10,
+	10,10,10,10,11,11,11,11,11,11,11,11,11,11,11, 9,
+	 9, 9, 9,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44c7_s_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c7_s_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p8_1 = {
+	_vq_quantthresh__44c7_s_p8_1,
+	_vq_quantmap__44c7_s_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44c7_s_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44c7_s_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c7_s_p8_1,
+	NULL,
+	&_vq_auxt__44c7_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c7_s_p9_0[] = {
+	 1, 4, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44c7_s_p9_0[] = {
+	-3503.5, -2866.5, -2229.5, -1592.5, -955.5, -318.5, 318.5, 955.5, 
+	1592.5, 2229.5, 2866.5, 3503.5, 
+};
+
+static long _vq_quantmap__44c7_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p9_0 = {
+	_vq_quantthresh__44c7_s_p9_0,
+	_vq_quantmap__44c7_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _44c7_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__44c7_s_p9_0,
+	1, -511845376, 1630791680, 4, 0,
+	_vq_quantlist__44c7_s_p9_0,
+	NULL,
+	&_vq_auxt__44c7_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c7_s_p9_1[] = {
+	 1, 4, 4, 7, 7, 7, 7, 7, 7, 9, 8,10,10, 6, 6, 6,
+	 7, 8, 8, 8, 8, 8, 9, 9,10,11, 6, 5, 6, 8, 7, 8,
+	 8, 8, 8, 9, 9,10,11,14, 9, 8, 9, 8, 9, 8, 8, 9,
+	10,10,11,11,14, 8, 9, 8, 8, 8, 9, 9, 8,12,10,11,
+	11,14,13,13, 8, 9, 9, 9, 9,10,10,12,12,12,14,14,
+	13, 8, 7,10, 9, 9,10,10,11,11,10,14,14,14, 8, 9,
+	 9, 8,11,10,12,11,11,11,14,14,14, 9, 7, 9, 8,10,
+	10,11,11,11,10,14,14,14,12,12,10, 9,11,11,11,13,
+	12,13,14,14,14,12,12,10,10,11, 8,11,11,14,13,14,
+	14,14,14,14,12,13,11,12,12,11,14,13,13,13,13,13,
+	13,12,11,11, 9,12,12,12,13,
+};
+
+static float _vq_quantthresh__44c7_s_p9_1[] = {
+	-269.5, -220.5, -171.5, -122.5, -73.5, -24.5, 24.5, 73.5, 
+	122.5, 171.5, 220.5, 269.5, 
+};
+
+static long _vq_quantmap__44c7_s_p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p9_1 = {
+	_vq_quantthresh__44c7_s_p9_1,
+	_vq_quantmap__44c7_s_p9_1,
+	13,
+	13
+};
+
+static static_codebook _44c7_s_p9_1 = {
+	2, 169,
+	_vq_lengthlist__44c7_s_p9_1,
+	1, -518889472, 1622704128, 4, 0,
+	_vq_quantlist__44c7_s_p9_1,
+	NULL,
+	&_vq_auxt__44c7_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c7_s_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44c7_s_p9_2[] = {
+	 2, 4, 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44c7_s_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44c7_s_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c7_s_p9_2 = {
+	_vq_quantthresh__44c7_s_p9_2,
+	_vq_quantmap__44c7_s_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44c7_s_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44c7_s_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44c7_s_p9_2,
+	NULL,
+	&_vq_auxt__44c7_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c7_s_short[] = {
+	 4,10,12,13,15,15,16,16,17,17, 5, 5, 7, 8, 9, 9,
+	12,17,18,18, 7, 5, 4, 5, 7, 8,10,13,18,18, 8, 6,
+	 5, 4, 5, 6, 9,12,17,18,10, 9, 6, 4, 4, 5, 8,12,
+	18,17,11, 9, 7, 5, 4, 4, 6,10,17,17,13,12,10, 8,
+	 6, 5, 6, 9,17,17,14,13,12, 7, 6, 5, 5, 8,16,17,
+	16,15,14, 8, 8, 7, 7, 9,14,17,17,17,17,12,11,11,
+	11,12,16,17,
+};
+
+static static_codebook _huff_book__44c7_s_short = {
+	2, 100,
+	_huff_lengthlist__44c7_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c8_s_long[] = {
+	 3, 8,12,14,14,13,13,12,13,15, 6, 4, 6, 8,10,10,
+	11,11,13,15, 9, 5, 4, 5, 7, 8, 9,10,13,15,11, 7,
+	 4, 4, 5, 6, 8, 9,13,14,12, 9, 6, 5, 5, 5, 7, 9,
+	12,14,11,10, 7, 6, 5, 4, 6, 7,11,12,11,10, 9, 8,
+	 7, 5, 6, 6,10,11,12,11,10, 9, 8, 6, 6, 5, 8,10,
+	12,12,12,11,11,10, 9, 7, 8,11,12,13,14,14,15,13,
+	10, 9, 9,11,
+};
+
+static static_codebook _huff_book__44c8_s_long = {
+	2, 100,
+	_huff_lengthlist__44c8_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c8_s_p1_0[] = {
+	 1, 5, 5, 0, 5, 5, 0, 5, 5, 6, 7, 7, 0, 9, 8, 0,
+	 8, 8, 6, 7, 8, 0, 8, 9, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 5, 8, 8, 0, 8, 8, 0, 8, 8, 5, 8, 8,
+	 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+	 8, 8, 0, 8, 8, 0, 8, 7, 5, 8, 8, 0, 8, 8, 0, 7,
+	 8,
+};
+
+static float _vq_quantthresh__44c8_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c8_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p1_0 = {
+	_vq_quantthresh__44c8_s_p1_0,
+	_vq_quantmap__44c8_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c8_s_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44c8_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c8_s_p1_0,
+	NULL,
+	&_vq_auxt__44c8_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c8_s_p2_0[] = {
+	 3, 5, 5, 8, 8, 0, 6, 6, 8, 8, 0, 5, 6, 8, 8, 0,
+	 7, 7, 9, 9, 0, 0, 0, 9, 9, 5, 7, 6, 9, 9, 0, 7,
+	 7,10, 9, 0, 7, 7,10, 9, 0, 9, 9,11,11, 0, 0, 0,
+	11,11, 5, 6, 7, 9, 9, 0, 7, 7, 9,10, 0, 7, 7, 9,
+	10, 0, 9, 9,11,11, 0, 0, 0,11,11, 8, 9, 9,11,10,
+	 0,11,10,12,11, 0,10,10,12,11, 0,13,13,14,13, 0,
+	 0, 0,14,13, 8, 9, 9,10,11, 0,10,11,11,12, 0,10,
+	10,12,12, 0,13,13,13,14, 0, 0, 0,13,14, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 6, 7, 7,10,10, 0, 7, 7,10,10,
+	 0, 7, 7,10,10, 0, 9, 8,10,10, 0, 0, 0,10,10, 6,
+	 7, 7,10,10, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 8,
+	 9,10,10, 0, 0, 0,10,10, 8,10, 9,12,12, 0,10, 9,
+	12,11, 0,10,10,11,12, 0,12,11,13,12, 0, 0, 0,13,
+	13, 8, 9,10,11,12, 0, 9,10,11,12, 0,10,10,11,12,
+	 0,11,12,12,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 6, 8, 7,11,10, 0, 7, 7,10,10, 0, 7, 7,
+	10, 9, 0, 8, 9,10,10, 0, 0, 0,10,10, 6, 7, 8,10,
+	11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 8,10,10,
+	 0, 0, 0,10,10, 8,10, 9,12,11, 0,10,10,12,11, 0,
+	10,10,12,11, 0,11,12,13,12, 0, 0, 0,13,12, 9, 9,
+	10,11,12, 0,10,10,11,12, 0,10,10,11,12, 0,12,11,
+	12,13, 0, 0, 0,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7, 9, 9,12,13, 0, 9, 8,12,11, 0, 8, 9,11,12, 0,
+	10, 9,12,11, 0, 0, 0,11,12, 7, 9, 9,13,13, 0, 9,
+	 9,11,12, 0, 9, 8,12,11, 0, 9,10,11,12, 0, 0, 0,
+	12,11, 9,11,11,14,13, 0,10,10,13,12, 0,10,10,13,
+	13, 0,12,11,13,12, 0, 0, 0,13,13, 9,11,11,13,14,
+	 0,10,10,12,13, 0,10,10,13,13, 0,11,12,12,13, 0,
+	 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+	11,11,14,13, 0,10,10,13,12, 0,10,10,13,12, 0,11,
+	12,13,13, 0, 0, 0,13,12, 9,11,11,13,14, 0,10,10,
+	13,13, 0,10,10,12,13, 0,12,11,13,13, 0, 0, 0,12,
+	13,
+};
+
+static float _vq_quantthresh__44c8_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c8_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p2_0 = {
+	_vq_quantthresh__44c8_s_p2_0,
+	_vq_quantmap__44c8_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c8_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c8_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c8_s_p2_0,
+	NULL,
+	&_vq_auxt__44c8_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c8_s_p3_0[] = {
+	 3, 3, 4, 5, 5, 7, 6, 8, 8, 0, 4, 4, 5, 5, 7, 7,
+	 9, 9, 0, 4, 4, 5, 6, 7, 7, 9, 9, 0, 5, 5, 6, 6,
+	 8, 8,10,10, 0, 0, 0, 6, 6, 8, 8,10,10, 0, 0, 0,
+	 7, 7, 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c8_s_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c8_s_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p3_0 = {
+	_vq_quantthresh__44c8_s_p3_0,
+	_vq_quantmap__44c8_s_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44c8_s_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44c8_s_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c8_s_p3_0,
+	NULL,
+	&_vq_auxt__44c8_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c8_s_p4_0[] = {
+	 3, 4, 4, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10,10,10,
+	10, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,10,10,
+	11,11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,
+	10,11,11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,
+	10,11,11,12,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9,
+	 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c8_s_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c8_s_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p4_0 = {
+	_vq_quantthresh__44c8_s_p4_0,
+	_vq_quantmap__44c8_s_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44c8_s_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44c8_s_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c8_s_p4_0,
+	NULL,
+	&_vq_auxt__44c8_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c8_s_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 6,10,10,10,10,
+	10,10, 4, 6, 6,10,10,10,10,10,10, 5,10,10, 9,12,
+	12,10,12,12, 7,10,10,12,12,12,12,12,12, 7,10,10,
+	12,12,12,12,12,13, 6,10,10,10,12,12,11,12,12, 8,
+	10,10,12,13,12,12,12,12, 7,10,10,12,12,13,12,13,
+	12,
+};
+
+static float _vq_quantthresh__44c8_s_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c8_s_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p5_0 = {
+	_vq_quantthresh__44c8_s_p5_0,
+	_vq_quantmap__44c8_s_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44c8_s_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44c8_s_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c8_s_p5_0,
+	NULL,
+	&_vq_auxt__44c8_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c8_s_p5_1[] = {
+	 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7,10, 4, 4, 6, 6,
+	 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8,11, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,11,11,11, 6,
+	 6, 7, 7, 8, 8, 8, 8,11,11,11, 6, 6, 7, 7, 8, 8,
+	 8, 8,11,11,11, 6, 6, 7, 7, 8, 8, 8, 8,11,11,11,
+	 7, 7, 7, 7, 8, 8, 8, 8,11,11,11,11,11, 7, 7, 8,
+	 8, 8, 8,11,11,11,11,11, 7, 7, 7, 7, 8, 8,11,11,
+	11,11,11, 7, 7, 7, 7, 8, 8,
+};
+
+static float _vq_quantthresh__44c8_s_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c8_s_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p5_1 = {
+	_vq_quantthresh__44c8_s_p5_1,
+	_vq_quantmap__44c8_s_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44c8_s_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44c8_s_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c8_s_p5_1,
+	NULL,
+	&_vq_auxt__44c8_s_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c8_s_p6_0[] = {
+	 1, 4, 4, 7, 6, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 7, 7, 9, 9,10, 9,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9,10,10,11,11,12,12, 0, 6, 6, 7, 7, 9, 9,10,10,
+	11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10,12,12,12,
+	12, 0,10,10, 8, 8,10,10,11,11,12,12,13,13, 0,11,
+	11, 8, 8,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__44c8_s_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c8_s_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p6_0 = {
+	_vq_quantthresh__44c8_s_p6_0,
+	_vq_quantmap__44c8_s_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44c8_s_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44c8_s_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c8_s_p6_0,
+	NULL,
+	&_vq_auxt__44c8_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c8_s_p6_1[] = {
+	 3, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 6,
+	 5, 5, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__44c8_s_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c8_s_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p6_1 = {
+	_vq_quantthresh__44c8_s_p6_1,
+	_vq_quantmap__44c8_s_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44c8_s_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44c8_s_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c8_s_p6_1,
+	NULL,
+	&_vq_auxt__44c8_s_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c8_s_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 5, 5,
+	 7, 7, 9, 9,10,10,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9,10,10,11,11,12,12,20, 6, 7, 7, 7, 9, 9,10,10,
+	11,11,12,12,20, 7, 7, 7, 7, 9, 9,10,10,11,11,12,
+	12,20,11,11, 8, 8,10,10,11,11,12,12,12,12,20,12,
+	12, 8, 8,10, 9,11,11,12,12,13,13,20,20,20,11,10,
+	10,10,11,11,12,12,13,13,20,20,20,10,11,10,10,11,
+	11,12,12,13,13,20,20,20,14,15,11,11,12,12,13,13,
+	14,13,20,20,20,15,15,11,11,12,12,13,13,14,14,20,
+	20,20,20,19,13,13,12,12,13,13,14,14,19,19,19,19,
+	19,13,13,12,12,13,13,14,14,
+};
+
+static float _vq_quantthresh__44c8_s_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44c8_s_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p7_0 = {
+	_vq_quantthresh__44c8_s_p7_0,
+	_vq_quantmap__44c8_s_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44c8_s_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44c8_s_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44c8_s_p7_0,
+	NULL,
+	&_vq_auxt__44c8_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c8_s_p7_1[] = {
+	 4, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 5, 5, 7, 7,
+	 7, 7, 7, 7, 7, 7, 8, 5, 5, 7, 7, 7, 7, 7, 7, 7,
+	 7, 8, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7,
+	 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7,
+	 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
+	 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 8, 8,
+	 8, 8, 8, 7, 7, 7, 7, 7, 7,
+};
+
+static float _vq_quantthresh__44c8_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c8_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p7_1 = {
+	_vq_quantthresh__44c8_s_p7_1,
+	_vq_quantmap__44c8_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c8_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c8_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c8_s_p7_1,
+	NULL,
+	&_vq_auxt__44c8_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c8_s_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,11, 6,
+	 5, 5, 7, 7, 9, 9, 8, 8,10,10,11,11,11,12, 6, 5,
+	 5, 7, 7, 9, 9, 9, 8,10,10,11,10,11,12,18, 8, 8,
+	 8, 8, 9, 9, 9, 9,10,10,11,11,12,12,18, 8, 8, 8,
+	 8, 9, 9, 9, 9,10,10,11,11,12,13,18,12,12, 9, 9,
+	10,10, 9, 9,10,11,11,12,13,12,18,12,12, 9, 9,10,
+	10,10,10,10,11,11,12,13,13,18,18,18, 9, 9, 9, 9,
+	10,10,11,11,12,12,12,12,18,18,18, 9, 9, 9, 9,10,
+	10,11,11,12,12,13,13,18,18,18,13,13,10,10,11,11,
+	12,11,12,12,13,13,18,18,18,14,14,10, 9,11,10,12,
+	12,12,12,13,13,18,18,18,18,18,11,12,11,11,12,12,
+	13,13,14,13,18,18,18,18,18,12,11,11,10,12,11,13,
+	13,13,14,18,18,18,18,18,15,16,12,12,12,13,13,13,
+	14,14,18,17,17,17,17,16,14,12,11,12,11,13,12,15,
+	14,
+};
+
+static float _vq_quantthresh__44c8_s_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44c8_s_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p8_0 = {
+	_vq_quantthresh__44c8_s_p8_0,
+	_vq_quantmap__44c8_s_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44c8_s_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44c8_s_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44c8_s_p8_0,
+	NULL,
+	&_vq_auxt__44c8_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c8_s_p8_1[] = {
+	 4, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,
+	10, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10,11, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,11,11,10,11,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,
+	 9, 9,10,11,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,11,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9,10, 9, 9, 9, 9, 9, 9, 9,11,10,11,10,
+	10,10,10, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9, 9,
+	 9,11,11,11,10,10,11,10, 9, 9, 9, 9, 9, 9,10,10,
+	 9, 9, 9, 9, 9, 9,10,11,10,10,10,11,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9,10, 9,11,11,10,10,10,
+	10,10, 9, 9, 9,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,11,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10,11,11,10,11,10,10,10,10,10,10, 9,
+	10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,
+	10,10,10, 9,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,
+	 9, 9,10, 9,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9, 9,10, 9, 9,10, 9, 9,
+};
+
+static float _vq_quantthresh__44c8_s_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c8_s_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p8_1 = {
+	_vq_quantthresh__44c8_s_p8_1,
+	_vq_quantmap__44c8_s_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44c8_s_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44c8_s_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c8_s_p8_1,
+	NULL,
+	&_vq_auxt__44c8_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p9_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c8_s_p9_0[] = {
+	 1, 5, 5,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10, 7,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10, 6, 8,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44c8_s_p9_0[] = {
+	-6982.5, -6051.5, -5120.5, -4189.5, -3258.5, -2327.5, -1396.5, -465.5, 
+	465.5, 1396.5, 2327.5, 3258.5, 4189.5, 5120.5, 6051.5, 6982.5, 
+};
+
+static long _vq_quantmap__44c8_s_p9_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p9_0 = {
+	_vq_quantthresh__44c8_s_p9_0,
+	_vq_quantmap__44c8_s_p9_0,
+	17,
+	17
+};
+
+static static_codebook _44c8_s_p9_0 = {
+	2, 289,
+	_vq_lengthlist__44c8_s_p9_0,
+	1, -509798400, 1631393792, 5, 0,
+	_vq_quantlist__44c8_s_p9_0,
+	NULL,
+	&_vq_auxt__44c8_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p9_1[] = {
+	9,
+	8,
+	10,
+	7,
+	11,
+	6,
+	12,
+	5,
+	13,
+	4,
+	14,
+	3,
+	15,
+	2,
+	16,
+	1,
+	17,
+	0,
+	18,
+};
+
+static long _vq_lengthlist__44c8_s_p9_1[] = {
+	 1, 4, 4, 7, 7, 7, 7, 7, 7, 9, 9,10,10,11,10,13,
+	12,11,12, 6, 6, 6, 8, 8, 8, 8, 8, 8, 9,10,10,10,
+	12,12,12,12,13,15, 5, 5, 5, 8, 8, 8, 8, 8, 8,10,
+	 9,10,11,12,13,12,13,13,12,15, 9, 8, 9, 9, 9, 9,
+	 9, 9,10,10,10,11,14,12,13,15,12,14,15, 8, 9, 9,
+	 9, 9, 9, 9, 9,10,10,12,11,12,11,12,13,13,13,15,
+	13,13, 9, 9,10, 9,10,10,11,10,11,12,12,12,14,13,
+	14,15,15,13,13, 9, 8,10, 9,10,10,11,10,12,12,13,
+	13,14,13,14,15,15,15,15, 9, 9, 9, 9,10,11,12,12,
+	12,13,13,13,14,15,15,14,15,15,15, 9, 7, 9, 8,12,
+	11,11,13,12,12,13,12,14,13,13,14,15,15,15,13,13,
+	10,10,12,11,13,13,12,12,13,13,14,13,13,15,15,15,
+	15,12,13,11, 9,11,10,12,12,15,13,13,13,14,13,14,
+	13,15,15,15,15,15,12,12,11,11,12,13,15,13,13,14,
+	14,14,15,14,15,15,15,15,15,13,11,12,11,12,11,13,
+	14,13,13,14,14,13,14,15,15,15,15,15,15,15,12,12,
+	12,13,15,13,15,14,15,14,13,15,15,15,15,15,15,14,
+	15,13,13,12,11,14,12,15,13,14,14,14,13,15,15,15,
+	15,15,15,15,14,13,14,13,15,13,15,15,15,14,15,14,
+	15,15,15,15,15,15,15,14,14,14,13,13,13,15,15,15,
+	15,14,15,15,15,15,15,15,15,15,15,15,12,13,13,13,
+	14,15,15,13,15,15,15,15,15,15,15,15,15,15,15,15,
+	15,14,14,15,15,15,14,14,15,
+};
+
+static float _vq_quantthresh__44c8_s_p9_1[] = {
+	-416.5, -367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, 
+	-24.5, 24.5, 73.5, 122.5, 171.5, 220.5, 269.5, 318.5, 
+	367.5, 416.5, 
+};
+
+static long _vq_quantmap__44c8_s_p9_1[] = {
+	   17,   15,   13,   11,    9,    7,    5,    3,
+	    1,    0,    2,    4,    6,    8,   10,   12,
+	   14,   16,   18,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p9_1 = {
+	_vq_quantthresh__44c8_s_p9_1,
+	_vq_quantmap__44c8_s_p9_1,
+	19,
+	19
+};
+
+static static_codebook _44c8_s_p9_1 = {
+	2, 361,
+	_vq_lengthlist__44c8_s_p9_1,
+	1, -518287360, 1622704128, 5, 0,
+	_vq_quantlist__44c8_s_p9_1,
+	NULL,
+	&_vq_auxt__44c8_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c8_s_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44c8_s_p9_2[] = {
+	 3, 4, 3, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44c8_s_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44c8_s_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c8_s_p9_2 = {
+	_vq_quantthresh__44c8_s_p9_2,
+	_vq_quantmap__44c8_s_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44c8_s_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44c8_s_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44c8_s_p9_2,
+	NULL,
+	&_vq_auxt__44c8_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c8_s_short[] = {
+	 4,11,13,14,16,15,16,16,17,16, 5, 6, 8, 9,10, 9,
+	11,17,16,17, 6, 6, 6, 6, 7, 8, 9,14,16,17, 8, 6,
+	 5, 4, 6, 7, 9,12,14,17, 9, 7, 6, 5, 5, 5, 8,11,
+	14,17,10, 9, 7, 6, 5, 3, 5, 8,13,17,12,11, 9, 8,
+	 7, 4, 4, 6,14,17,13,13,12, 8, 7, 5, 4, 5,12,17,
+	17,14,15,10, 8, 7, 7, 7,11,17,17,16,17,14,12,10,
+	11,11,15,17,
+};
+
+static static_codebook _huff_book__44c8_s_short = {
+	2, 100,
+	_huff_lengthlist__44c8_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c9_s_long[] = {
+	 3, 8,13,14,15,15,13,13,14,14, 6, 5, 8,10,12,12,
+	13,12,13,14,10, 6, 5, 6, 8, 9,11,11,13,14,13, 8,
+	 5, 4, 5, 6, 9,10,13,14,14,11, 7, 5, 4, 5, 8, 9,
+	12,14,12,11, 8, 6, 5, 3, 5, 7,10,13,12,10,10, 8,
+	 7, 5, 4, 6, 9,12,13,12,11,10, 9, 6, 5, 5, 7,10,
+	13,12,12,11,11, 9, 8, 7, 8,10,12,12,13,13,14,12,
+	10, 9, 9,10,
+};
+
+static static_codebook _huff_book__44c9_s_long = {
+	2, 100,
+	_huff_lengthlist__44c9_s_long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c9_s_p1_0[] = {
+	 1, 5, 5, 0, 5, 5, 0, 5, 5, 6, 8, 8, 0, 9, 8, 0,
+	 8, 8, 6, 8, 8, 0, 8, 9, 0, 8, 8, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 5, 8, 8, 0, 8, 7, 0, 8, 8, 5, 8, 8,
+	 0, 7, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+	 9, 8, 0, 8, 8, 0, 7, 7, 5, 8, 9, 0, 8, 8, 0, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44c9_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44c9_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p1_0 = {
+	_vq_quantthresh__44c9_s_p1_0,
+	_vq_quantmap__44c9_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44c9_s_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44c9_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44c9_s_p1_0,
+	NULL,
+	&_vq_auxt__44c9_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c9_s_p2_0[] = {
+	 3, 6, 6, 8, 8, 0, 6, 6, 8, 8, 0, 5, 5, 8, 8, 0,
+	 7, 7, 9, 9, 0, 0, 0, 9, 9, 6, 7, 7, 9, 8, 0, 8,
+	 7, 9, 9, 0, 7, 7, 9, 9, 0, 9, 9,11,10, 0, 0, 0,
+	10,10, 6, 7, 7, 8, 9, 0, 7, 8, 9, 9, 0, 7, 7, 9,
+	 9, 0, 9, 9,10,11, 0, 0, 0,10,10, 8, 9, 9,10,10,
+	 0,10,10,11,11, 0,10,10,11,11, 0,12,12,13,12, 0,
+	 0, 0,13,13, 8, 8, 9,10,10, 0,10,10,11,12, 0,10,
+	10,11,11, 0,12,12,13,13, 0, 0, 0,13,13, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 6, 8, 7,10,10, 0, 7, 7,10, 9,
+	 0, 7, 7,10,10, 0, 9, 8,10,10, 0, 0, 0,10,10, 6,
+	 7, 7,10,10, 0, 7, 7, 9,10, 0, 7, 7,10,10, 0, 8,
+	 9,10,10, 0, 0, 0,10,10, 8, 9, 9,11,11, 0,10, 9,
+	11,11, 0,10,10,11,11, 0,11,11,12,12, 0, 0, 0,12,
+	12, 8, 9, 9,11,11, 0, 9,10,11,11, 0,10,10,11,11,
+	 0,11,11,12,12, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 5, 8, 7,10,10, 0, 7, 7,10,10, 0, 7, 7,
+	10, 9, 0, 8, 9,10,10, 0, 0, 0,10, 9, 5, 7, 8,10,
+	10, 0, 7, 7,10,10, 0, 7, 7, 9,10, 0, 9, 8,10,10,
+	 0, 0, 0,10,10, 8, 9, 9,12,11, 0,10,10,11,11, 0,
+	10, 9,11,11, 0,11,11,12,12, 0, 0, 0,12,12, 8, 9,
+	 9,11,11, 0,10,10,11,11, 0, 9,10,11,11, 0,11,11,
+	12,12, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 7, 9, 9,12,12, 0, 9, 9,11,11, 0, 8, 9,11,11, 0,
+	10, 9,12,11, 0, 0, 0,11,11, 7, 9, 9,12,12, 0, 8,
+	 9,11,11, 0, 9, 8,11,11, 0, 9,10,11,11, 0, 0, 0,
+	11,11, 9,11,11,13,13, 0,10,10,12,12, 0,10,10,12,
+	12, 0,12,11,12,12, 0, 0, 0,13,13, 9,10,11,13,13,
+	 0,10,10,12,12, 0,10,10,12,12, 0,11,11,12,12, 0,
+	 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+	11,10,13,13, 0,10,10,12,12, 0,10, 9,12,12, 0,11,
+	11,12,13, 0, 0, 0,12,11, 9,10,10,12,13, 0,10,10,
+	12,12, 0,10,10,12,12, 0,11,11,13,12, 0, 0, 0,12,
+	12,
+};
+
+static float _vq_quantthresh__44c9_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c9_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p2_0 = {
+	_vq_quantthresh__44c9_s_p2_0,
+	_vq_quantmap__44c9_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44c9_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44c9_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c9_s_p2_0,
+	NULL,
+	&_vq_auxt__44c9_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44c9_s_p3_0[] = {
+	 3, 4, 4, 5, 5, 6, 6, 8, 8, 0, 4, 4, 5, 5, 7, 6,
+	 8, 8, 0, 4, 4, 5, 5, 7, 7, 8, 8, 0, 5, 5, 6, 6,
+	 7, 7, 9, 9, 0, 0, 0, 6, 6, 7, 7, 9, 9, 0, 0, 0,
+	 7, 7, 8, 8, 9, 9, 0, 0, 0, 7, 7, 8, 8, 9, 9, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c9_s_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44c9_s_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p3_0 = {
+	_vq_quantthresh__44c9_s_p3_0,
+	_vq_quantmap__44c9_s_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44c9_s_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44c9_s_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44c9_s_p3_0,
+	NULL,
+	&_vq_auxt__44c9_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44c9_s_p4_0[] = {
+	 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9,10,
+	10, 0, 5, 5, 5, 5, 6, 6, 8, 7, 8, 8, 9, 9,10,10,
+	11,11, 0, 5, 5, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10,
+	10,11,11, 0, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 6, 6, 7, 7, 8, 8, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0, 7, 7, 7, 7, 9, 9, 9, 9,
+	11,11,11,11,12,12, 0, 0, 0, 7, 7, 7, 8, 9, 9, 9,
+	 9,11,10,11,11,12,12, 0, 0, 0, 7, 7, 7, 7, 9, 9,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 7, 7, 9,
+	 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44c9_s_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44c9_s_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p4_0 = {
+	_vq_quantthresh__44c9_s_p4_0,
+	_vq_quantmap__44c9_s_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44c9_s_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44c9_s_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44c9_s_p4_0,
+	NULL,
+	&_vq_auxt__44c9_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44c9_s_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 6,10,10,10,10,
+	10,10, 4, 6, 6,10,10,10,10,10,10, 5,10,10, 9,12,
+	12,10,12,12, 7,10,10,12,12,12,12,12,13, 7,10,10,
+	12,12,12,12,13,13, 6,10,10,10,12,12,11,12,12, 8,
+	10,10,12,12,12,12,12,12, 7,10,10,12,12,13,12,12,
+	12,
+};
+
+static float _vq_quantthresh__44c9_s_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44c9_s_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p5_0 = {
+	_vq_quantthresh__44c9_s_p5_0,
+	_vq_quantmap__44c9_s_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44c9_s_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44c9_s_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44c9_s_p5_0,
+	NULL,
+	&_vq_auxt__44c9_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c9_s_p5_1[] = {
+	 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7,10, 5, 5, 6, 6,
+	 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6, 7, 7, 7, 7, 8,
+	 8,11, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,11,11,11, 6,
+	 6, 7, 7, 8, 8, 8, 8,11,11,11, 6, 6, 7, 7, 8, 8,
+	 8, 8,11,11,11, 6, 6, 7, 7, 7, 7, 8, 8,11,11,11,
+	 7, 7, 7, 7, 7, 7, 8, 8,11,11,11,11,11, 7, 7, 7,
+	 7, 8, 8,11,11,11,11,11, 7, 7, 7, 7, 7, 7,11,11,
+	11,11,11, 7, 7, 7, 7, 7, 7,
+};
+
+static float _vq_quantthresh__44c9_s_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c9_s_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p5_1 = {
+	_vq_quantthresh__44c9_s_p5_1,
+	_vq_quantmap__44c9_s_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44c9_s_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44c9_s_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c9_s_p5_1,
+	NULL,
+	&_vq_auxt__44c9_s_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c9_s_p6_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 5, 4, 4,
+	 6, 6, 8, 8, 9, 9,10,10,11,11, 6, 4, 4, 6, 6, 8,
+	 8, 9, 9,10,10,12,12, 0, 6, 6, 6, 6, 8, 8,10,10,
+	11,11,12,12, 0, 6, 6, 6, 6, 8, 8,10,10,11,11,12,
+	12, 0,10,10, 8, 8, 9, 9,11,11,12,12,13,13, 0,11,
+	11, 8, 8, 9,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__44c9_s_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44c9_s_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p6_0 = {
+	_vq_quantthresh__44c9_s_p6_0,
+	_vq_quantmap__44c9_s_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44c9_s_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44c9_s_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44c9_s_p6_0,
+	NULL,
+	&_vq_auxt__44c9_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44c9_s_p6_1[] = {
+	 4, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5,
+	 5, 5, 5, 5, 5, 5, 5, 5, 5,
+};
+
+static float _vq_quantthresh__44c9_s_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44c9_s_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p6_1 = {
+	_vq_quantthresh__44c9_s_p6_1,
+	_vq_quantmap__44c9_s_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44c9_s_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44c9_s_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44c9_s_p6_1,
+	NULL,
+	&_vq_auxt__44c9_s_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44c9_s_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 6, 5, 5,
+	 7, 7, 9, 8,10,10,11,11,12,12, 6, 5, 5, 7, 7, 9,
+	 9,10,10,11,11,12,12,20, 6, 6, 7, 7, 9, 9,10,10,
+	11,11,12,12,20, 7, 7, 7, 7, 9, 9,10,10,11,11,13,
+	12,20,10,10, 8, 8, 9, 9,11,11,12,12,13,13,20,11,
+	11, 8, 8, 9, 9,11,11,12,12,13,13,20,20,20,10,10,
+	10,10,11,11,12,12,13,13,20,20,20,10,10,10,10,11,
+	11,12,12,13,13,20,20,20,14,14,11,11,12,12,13,13,
+	14,13,20,20,20,14,15,11,11,11,11,13,13,14,13,20,
+	20,20,20,19,12,12,12,12,13,13,14,14,19,19,19,19,
+	19,13,13,12,12,13,13,14,14,
+};
+
+static float _vq_quantthresh__44c9_s_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44c9_s_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p7_0 = {
+	_vq_quantthresh__44c9_s_p7_0,
+	_vq_quantmap__44c9_s_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44c9_s_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44c9_s_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44c9_s_p7_0,
+	NULL,
+	&_vq_auxt__44c9_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44c9_s_p7_1[] = {
+	 5, 6, 6, 6, 6, 7, 6, 7, 7, 7, 7, 8, 6, 6, 6, 6,
+	 7, 7, 7, 7, 7, 7, 8, 6, 6, 6, 6, 7, 7, 7, 7, 7,
+	 7, 8, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 6,
+	 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7,
+	 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
+	 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8,
+	 8, 8, 8, 7, 7, 7, 7, 7, 7,
+};
+
+static float _vq_quantthresh__44c9_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44c9_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p7_1 = {
+	_vq_quantthresh__44c9_s_p7_1,
+	_vq_quantmap__44c9_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44c9_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44c9_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44c9_s_p7_1,
+	NULL,
+	&_vq_auxt__44c9_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44c9_s_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,11, 6,
+	 5, 5, 7, 7, 9, 9, 8, 9,10,10,11,11,12,12, 6, 5,
+	 5, 7, 7, 9, 9, 9, 9,10,10,11,11,12,12,19, 7, 8,
+	 8, 8, 9, 9, 9, 9,10,10,11,11,12,13,19, 8, 8, 8,
+	 8, 9, 9, 9, 9,10,10,11,12,12,12,19,12,12, 9, 9,
+	 9,10, 9,10,10,10,12,12,12,12,19,12,12, 9, 9,10,
+	 9,10,10,11,11,12,11,13,13,19,19,19, 9, 9, 9, 9,
+	10,10,11,11,12,12,12,12,19,19,19, 9, 9, 9, 9,10,
+	10,11,11,12,12,13,13,19,19,19,13,13,10,10,10,10,
+	12,12,12,12,13,13,19,19,19,13,13,10,10,10,10,12,
+	12,12,12,13,13,19,19,19,19,19,11,12,11,11,12,12,
+	13,12,13,13,19,19,19,18,18,12,11,11,10,12,11,13,
+	13,13,14,18,18,18,18,18,15,16,12,12,13,12,13,13,
+	14,14,18,18,18,18,18,16,15,12,11,12,11,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44c9_s_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44c9_s_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p8_0 = {
+	_vq_quantthresh__44c9_s_p8_0,
+	_vq_quantmap__44c9_s_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44c9_s_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44c9_s_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44c9_s_p8_0,
+	NULL,
+	&_vq_auxt__44c9_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44c9_s_p8_1[] = {
+	 4, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,
+	10, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,
+	10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,10,10,10,10,10,10,10, 9, 9, 9, 9,10,10,10,10,
+	 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,
+	10,10, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,
+	10,10, 9, 9, 9,10, 9, 9, 9, 9,10,10,10,10,10,10,
+	10,10,10, 9,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44c9_s_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44c9_s_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p8_1 = {
+	_vq_quantthresh__44c9_s_p8_1,
+	_vq_quantmap__44c9_s_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44c9_s_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44c9_s_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44c9_s_p8_1,
+	NULL,
+	&_vq_auxt__44c9_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p9_0[] = {
+	9,
+	8,
+	10,
+	7,
+	11,
+	6,
+	12,
+	5,
+	13,
+	4,
+	14,
+	3,
+	15,
+	2,
+	16,
+	1,
+	17,
+	0,
+	18,
+};
+
+static long _vq_lengthlist__44c9_s_p9_0[] = {
+	 1, 4, 4,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10, 7, 9,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10, 7, 9,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44c9_s_p9_0[] = {
+	-7913.5, -6982.5, -6051.5, -5120.5, -4189.5, -3258.5, -2327.5, -1396.5, 
+	-465.5, 465.5, 1396.5, 2327.5, 3258.5, 4189.5, 5120.5, 6051.5, 
+	6982.5, 7913.5, 
+};
+
+static long _vq_quantmap__44c9_s_p9_0[] = {
+	   17,   15,   13,   11,    9,    7,    5,    3,
+	    1,    0,    2,    4,    6,    8,   10,   12,
+	   14,   16,   18,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p9_0 = {
+	_vq_quantthresh__44c9_s_p9_0,
+	_vq_quantmap__44c9_s_p9_0,
+	19,
+	19
+};
+
+static static_codebook _44c9_s_p9_0 = {
+	2, 361,
+	_vq_lengthlist__44c9_s_p9_0,
+	1, -508535424, 1631393792, 5, 0,
+	_vq_quantlist__44c9_s_p9_0,
+	NULL,
+	&_vq_auxt__44c9_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p9_1[] = {
+	9,
+	8,
+	10,
+	7,
+	11,
+	6,
+	12,
+	5,
+	13,
+	4,
+	14,
+	3,
+	15,
+	2,
+	16,
+	1,
+	17,
+	0,
+	18,
+};
+
+static long _vq_lengthlist__44c9_s_p9_1[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9,10,10,10,12,11,12,
+	13,13,12, 6, 5, 5, 8, 8, 8, 9, 8, 9,10,10,11,11,
+	12,12,14,13,13,12, 5, 5, 5, 8, 8, 9, 8, 8, 9,10,
+	10,11,11,12,12,14,12,13,13,16, 8, 8, 9, 9, 9, 9,
+	 9, 9,10,10,11,12,13,13,13,13,14,14,16, 8, 8, 9,
+	 9, 9, 9, 9, 9,11,11,12,11,13,13,14,13,13,13,16,
+	14,13, 9, 9, 9, 9,10,10,11,12,12,13,13,13,14,13,
+	15,14,16,13,13, 9, 8, 9, 9,10,10,12,11,13,13,14,
+	14,14,14,15,14,16,16,16, 9, 9, 9, 9,10,10,12,12,
+	12,13,13,13,15,13,15,15,16,16,16, 9, 7, 9, 8,10,
+	11,11,12,12,13,13,16,15,14,14,14,16,16,16,13,13,
+	10,10,11,11,13,15,13,14,13,14,14,13,14,14,16,16,
+	16,13,12,10, 9,11,11,12,12,14,14,13,14,14,14,14,
+	14,16,16,16,16,16,12,13,11,11,12,13,13,13,14,15,
+	14,14,16,15,16,16,16,16,16,12,11,12,12,15,13,13,
+	13,14,13,15,14,15,14,16,16,16,16,16,14,15,12,13,
+	13,12,14,15,15,14,15,14,15,13,16,16,16,16,16,16,
+	16,13,13,14,12,16,12,16,15,14,15,14,14,16,16,16,
+	16,16,16,16,15,14,14,14,15,16,16,16,16,14,16,16,
+	16,16,16,16,16,16,16,14,14,14,12,15,11,15,13,16,
+	15,16,15,16,16,16,16,16,16,16,15,16,14,14,15,13,
+	15,16,16,16,16,15,16,16,16,16,16,16,16,16,16,15,
+	15,14,13,14,16,16,14,15,16,
+};
+
+static float _vq_quantthresh__44c9_s_p9_1[] = {
+	-416.5, -367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, 
+	-24.5, 24.5, 73.5, 122.5, 171.5, 220.5, 269.5, 318.5, 
+	367.5, 416.5, 
+};
+
+static long _vq_quantmap__44c9_s_p9_1[] = {
+	   17,   15,   13,   11,    9,    7,    5,    3,
+	    1,    0,    2,    4,    6,    8,   10,   12,
+	   14,   16,   18,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p9_1 = {
+	_vq_quantthresh__44c9_s_p9_1,
+	_vq_quantmap__44c9_s_p9_1,
+	19,
+	19
+};
+
+static static_codebook _44c9_s_p9_1 = {
+	2, 361,
+	_vq_lengthlist__44c9_s_p9_1,
+	1, -518287360, 1622704128, 5, 0,
+	_vq_quantlist__44c9_s_p9_1,
+	NULL,
+	&_vq_auxt__44c9_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44c9_s_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44c9_s_p9_2[] = {
+	 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 7, 6, 6, 7, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44c9_s_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44c9_s_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44c9_s_p9_2 = {
+	_vq_quantthresh__44c9_s_p9_2,
+	_vq_quantmap__44c9_s_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44c9_s_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44c9_s_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44c9_s_p9_2,
+	NULL,
+	&_vq_auxt__44c9_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44c9_s_short[] = {
+	 5,13,17,15,16,16,18,17,18,18, 5, 7,10,12,12,12,
+	12,17,18,17, 7, 6, 7, 8, 9, 9, 9,13,17,17, 8, 6,
+	 6, 5, 6, 7, 8,11,16,18, 9, 7, 7, 5, 5, 6, 7,10,
+	15,18, 9, 8, 7, 6, 5, 4, 5, 7,13,17,11,11, 9, 8,
+	 7, 4, 3, 5,12,18,13,13,12,10, 7, 5, 4, 3, 8,13,
+	16,16,16,13, 8, 8, 7, 5, 8,12,15,18,17,15,11,10,
+	 9, 8,10,14,
+};
+
+static static_codebook _huff_book__44c9_s_short = {
+	2, 100,
+	_huff_lengthlist__44c9_s_short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8c0_s_p1_0[] = {
+	 1, 5, 4, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 7, 8, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 7, 9, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 8, 0, 0, 0, 0,
+	 0, 0, 8,10,10, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,10, 9, 0, 0, 0,
+	 0, 0, 0, 8, 9,11, 0, 0, 0, 0, 0, 0, 9,11,11, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9,10, 0, 0,
+	 0, 0, 0, 0, 9,11,10, 0, 0, 0, 0, 0, 0, 9,11,11,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,11,11, 0,
+	 0, 0, 0, 0, 0, 9,10,11, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9,10, 0, 0, 0, 0, 0, 0, 9,11,11,
+	 0, 0, 0, 0, 0, 0, 8,11, 9, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c0_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8c0_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p1_0 = {
+	_vq_quantthresh__8c0_s_p1_0,
+	_vq_quantmap__8c0_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _8c0_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__8c0_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8c0_s_p1_0,
+	NULL,
+	&_vq_auxt__8c0_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c0_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c0_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c0_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p2_0 = {
+	_vq_quantthresh__8c0_s_p2_0,
+	_vq_quantmap__8c0_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _8c0_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__8c0_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c0_s_p2_0,
+	NULL,
+	&_vq_auxt__8c0_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c0_s_p3_0[] = {
+	 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, 7, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 8, 8,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 7, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c0_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c0_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p3_0 = {
+	_vq_quantthresh__8c0_s_p3_0,
+	_vq_quantmap__8c0_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _8c0_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__8c0_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c0_s_p3_0,
+	NULL,
+	&_vq_auxt__8c0_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8c0_s_p4_0[] = {
+	 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c0_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8c0_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p4_0 = {
+	_vq_quantthresh__8c0_s_p4_0,
+	_vq_quantmap__8c0_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _8c0_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__8c0_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8c0_s_p4_0,
+	NULL,
+	&_vq_auxt__8c0_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8c0_s_p5_0[] = {
+	 1, 3, 3, 5, 5, 7, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7,
+	 8, 8, 0, 0, 0, 7, 7, 7, 7, 8, 9, 0, 0, 0, 8, 8,
+	 8, 8, 9, 9, 0, 0, 0, 8, 8, 8, 8, 9, 9, 0, 0, 0,
+	 9, 9, 8, 8,10,10, 0, 0, 0, 9, 9, 8, 8,10,10, 0,
+	 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__8c0_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8c0_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p5_0 = {
+	_vq_quantthresh__8c0_s_p5_0,
+	_vq_quantmap__8c0_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _8c0_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__8c0_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8c0_s_p5_0,
+	NULL,
+	&_vq_auxt__8c0_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__8c0_s_p6_0[] = {
+	 1, 3, 3, 6, 6, 8, 8, 9, 9, 8, 8,10, 9,10,10,11,
+	11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	11,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,11, 0, 0, 0, 8, 8, 9, 9,10,10, 9, 9,10,10,
+	11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10, 9, 9,11,
+	10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,10,10,
+	11,11,11,12,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,10,
+	10,11,11,12,12,13,13, 0, 0, 0,10,10,10,10,11,11,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,10, 9,10,
+	11,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,
+	10, 9,10,11,12,12,13,13,14,13, 0, 0, 0, 0, 0, 9,
+	 9, 9,10,10,10,11,11,13,12,13,13, 0, 0, 0, 0, 0,
+	10,10,10,10,11,11,12,12,13,13,14,14, 0, 0, 0, 0,
+	 0, 0, 0,10,10,11,11,12,12,13,13,13,14, 0, 0, 0,
+	 0, 0, 0, 0,11,11,11,11,12,12,13,14,14,14, 0, 0,
+	 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,14,13, 0,
+	 0, 0, 0, 0, 0, 0,11,11,12,12,13,13,14,14,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__8c0_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__8c0_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p6_0 = {
+	_vq_quantthresh__8c0_s_p6_0,
+	_vq_quantmap__8c0_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _8c0_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__8c0_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__8c0_s_p6_0,
+	NULL,
+	&_vq_auxt__8c0_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8c0_s_p7_0[] = {
+	 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,11, 9,10,12,
+	 9,10, 4, 7, 7,10,10,10,11, 9, 9, 6,11,10,11,11,
+	12,11,11,11, 6,10,10,11,11,12,11,10,10, 6, 9,10,
+	11,11,11,11,10,10, 7,10,11,12,11,11,12,11,12, 6,
+	 9, 9,10, 9, 9,11,10,10, 6, 9, 9,10,10,10,11,10,
+	10,
+};
+
+static float _vq_quantthresh__8c0_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__8c0_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p7_0 = {
+	_vq_quantthresh__8c0_s_p7_0,
+	_vq_quantmap__8c0_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _8c0_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__8c0_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__8c0_s_p7_0,
+	NULL,
+	&_vq_auxt__8c0_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__8c0_s_p7_1[] = {
+	 1, 3, 3, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10, 7, 7,
+	 8, 8, 9, 9, 9, 9,10,10, 9, 7, 7, 8, 8, 9, 9, 9,
+	 9,10,10,10, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10, 8,
+	 8, 9, 9, 9, 9, 8, 9,10,10,10, 8, 8, 9, 9, 9,10,
+	10,10,10,10,10, 9, 9, 9, 9, 9, 9,10,10,11,10,11,
+	 9, 9, 9, 9,10,10,10,10,11,11,11,10,10, 9, 9,10,
+	10,10, 9,11,10,10,10,10,10,10, 9, 9,10,10,11,11,
+	10,10,10, 9, 9, 9,10,10,10,
+};
+
+static float _vq_quantthresh__8c0_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__8c0_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p7_1 = {
+	_vq_quantthresh__8c0_s_p7_1,
+	_vq_quantmap__8c0_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _8c0_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__8c0_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__8c0_s_p7_1,
+	NULL,
+	&_vq_auxt__8c0_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__8c0_s_p8_0[] = {
+	 1, 4, 4, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 7, 6, 6,
+	 7, 7, 8, 8, 7, 7, 8, 9,10,10, 7, 6, 6, 7, 7, 8,
+	 7, 7, 7, 9, 9,10,12, 0, 8, 8, 8, 8, 8, 9, 8, 8,
+	 9, 9,10,10, 0, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9,11,
+	10, 0, 0,13, 9, 8, 9, 9, 9, 9,10,10,11,11, 0,13,
+	 0, 9, 9, 9, 9, 9, 9,11,10,11,11, 0, 0, 0, 8, 9,
+	10, 9,10,10,13,11,12,12, 0, 0, 0, 8, 9, 9, 9,10,
+	10,13,12,12,13, 0, 0, 0,12, 0,10,10,12,11,10,11,
+	12,12, 0, 0, 0,13,13,10,10,10,11,12, 0,13, 0, 0,
+	 0, 0, 0, 0,13,11, 0,12,12,12,13,12, 0, 0, 0, 0,
+	 0, 0,13,13,11,13,13,11,12,
+};
+
+static float _vq_quantthresh__8c0_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__8c0_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p8_0 = {
+	_vq_quantthresh__8c0_s_p8_0,
+	_vq_quantmap__8c0_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _8c0_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__8c0_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__8c0_s_p8_0,
+	NULL,
+	&_vq_auxt__8c0_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c0_s_p8_1[] = {
+	 1, 3, 4, 5, 5, 7, 6, 6, 6, 5, 7, 7, 7, 6, 6, 7,
+	 7, 7, 6, 6, 7, 7, 7, 6, 6,
+};
+
+static float _vq_quantthresh__8c0_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c0_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p8_1 = {
+	_vq_quantthresh__8c0_s_p8_1,
+	_vq_quantmap__8c0_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _8c0_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__8c0_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c0_s_p8_1,
+	NULL,
+	&_vq_auxt__8c0_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p9_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8c0_s_p9_0[] = {
+	 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__8c0_s_p9_0[] = {
+	-157.5, 157.5, 
+};
+
+static long _vq_quantmap__8c0_s_p9_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p9_0 = {
+	_vq_quantthresh__8c0_s_p9_0,
+	_vq_quantmap__8c0_s_p9_0,
+	3,
+	3
+};
+
+static static_codebook _8c0_s_p9_0 = {
+	4, 81,
+	_vq_lengthlist__8c0_s_p9_0,
+	1, -518803456, 1628680192, 2, 0,
+	_vq_quantlist__8c0_s_p9_0,
+	NULL,
+	&_vq_auxt__8c0_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__8c0_s_p9_1[] = {
+	 1, 4, 4, 5, 5,10, 8,11,11,11,11,11,11,11,11, 6,
+	 6, 6, 7, 6,11,10,11,11,11,11,11,11,11,11, 7, 5,
+	 6, 6, 6, 8, 7,11,11,11,11,11,11,11,11,11, 7, 8,
+	 8, 8, 9, 9,11,11,11,11,11,11,11,11,11, 9, 8, 7,
+	 8, 9,11,11,11,11,11,11,11,11,11,11,11,10,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,
+};
+
+static float _vq_quantthresh__8c0_s_p9_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__8c0_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p9_1 = {
+	_vq_quantthresh__8c0_s_p9_1,
+	_vq_quantmap__8c0_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _8c0_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__8c0_s_p9_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__8c0_s_p9_1,
+	NULL,
+	&_vq_auxt__8c0_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c0_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__8c0_s_p9_2[] = {
+	 1, 5, 5, 7, 7, 8, 7, 8, 8,10,10, 9, 9,10,10,10,
+	11,11,10,12,11,12,12,12, 9, 8, 8, 8, 8, 8, 9,10,
+	10,10,10,11,11,11,10,11,11,12,12,11,12, 8, 8, 7,
+	 7, 8, 9,10,10,10, 9,10,10, 9,10,10,11,11,11,11,
+	11,11, 9, 9, 9, 9, 8, 9,10,10,11,10,10,11,11,12,
+	10,10,12,12,11,11,10, 9, 9,10, 8, 9,10,10,10, 9,
+	10,10,11,11,10,11,10,10,10,12,12,12, 9,10, 9,10,
+	 9, 9,10,10,11,11,11,11,10,10,10,11,12,11,12,11,
+	12,10,11,10,11, 9,10, 9,10, 9,10,10, 9,10,10,11,
+	10,11,11,11,11,12,11, 9,10,10,10,10,11,11,11,11,
+	11,10,11,11,11,11,10,12,10,12,12,11,12,10,10,11,
+	10, 9,11,10,11, 9,10,11,10,10,10,11,11,11,11,12,
+	12,10, 9, 9,11,10, 9,12,11,10,12,12,11,11,11,11,
+	10,11,11,12,11,10,12, 9,11,10,11,10,10,11,10,11,
+	 9,10,10,10,11,12,11,11,12,11,10,10,11,11, 9,10,
+	10,12,10,11,10,10,10, 9,10,10,10,10, 9,10,10,11,
+	11,11,11,12,11,10,10,10,10,11,11,10,11,11, 9,11,
+	10,12,10,12,11,10,11,10,10,10,11,10,10,11,11,10,
+	11,10,10,10,10,11,11,12,10,10,10,11,10,11,12,11,
+	10,11,10,10,11,11,10,12,10, 9,10,10,11,11,11,10,
+	12,10,10,11,11,11,10,10,11,10,10,10,11,10,11,10,
+	12,11,11,10,10,10,12,10,10,11, 9,10,11,11,11,10,
+	10,11,10,10, 9,11,11,12,12,11,12,11,11,11,11,11,
+	11, 9,10,11,10,12,10,10,10,10,11,10,10,11,10,10,
+	12,10,10,10,10,10, 9,12,10,10,10,10,12, 9,11,10,
+	10,11,10,12,12,10,12,12,12,10,10,10,10, 9,10,11,
+	10,10,12,10,10,12,11,10,11,10,10,12,11,10,12,10,
+	10,11, 9,11,10, 9,10, 9,10,
+};
+
+static float _vq_quantthresh__8c0_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__8c0_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c0_s_p9_2 = {
+	_vq_quantthresh__8c0_s_p9_2,
+	_vq_quantmap__8c0_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _8c0_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__8c0_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__8c0_s_p9_2,
+	NULL,
+	&_vq_auxt__8c0_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__8c0_s_single[] = {
+	 4, 5,18, 7,10, 6, 7, 8, 9,10, 5, 2,18, 5, 7, 5,
+	 6, 7, 8,11,17,17,17,17,17,17,17,17,17,17, 7, 4,
+	17, 6, 9, 6, 8,10,12,15,11, 7,17, 9, 6, 6, 7, 9,
+	11,15, 6, 4,17, 6, 6, 4, 5, 8,11,16, 6, 6,17, 8,
+	 6, 5, 6, 9,13,16, 8, 9,17,11, 9, 8, 8,11,13,17,
+	 9,12,17,15,14,13,12,13,14,17,12,15,17,17,17,17,
+	17,16,17,17,
+};
+
+static static_codebook _huff_book__8c0_s_single = {
+	2, 100,
+	_huff_lengthlist__8c0_s_single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8c1_s_p1_0[] = {
+	 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0,
+	 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 8, 9, 0, 0, 0,
+	 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0,
+	 0, 0, 0, 0, 7, 9, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 8, 0, 0, 0, 0,
+	 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0,
+	 0, 0, 0, 8, 8,10, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0,
+	 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10, 0,
+	 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 9,10,10,
+	 0, 0, 0, 0, 0, 0, 8,10, 8, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c1_s_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8c1_s_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p1_0 = {
+	_vq_quantthresh__8c1_s_p1_0,
+	_vq_quantmap__8c1_s_p1_0,
+	3,
+	3
+};
+
+static static_codebook _8c1_s_p1_0 = {
+	8, 6561,
+	_vq_lengthlist__8c1_s_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8c1_s_p1_0,
+	NULL,
+	&_vq_auxt__8c1_s_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c1_s_p2_0[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c1_s_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c1_s_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p2_0 = {
+	_vq_quantthresh__8c1_s_p2_0,
+	_vq_quantmap__8c1_s_p2_0,
+	5,
+	5
+};
+
+static static_codebook _8c1_s_p2_0 = {
+	4, 625,
+	_vq_lengthlist__8c1_s_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c1_s_p2_0,
+	NULL,
+	&_vq_auxt__8c1_s_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c1_s_p3_0[] = {
+	 2, 4, 4, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 6, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c1_s_p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c1_s_p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p3_0 = {
+	_vq_quantthresh__8c1_s_p3_0,
+	_vq_quantmap__8c1_s_p3_0,
+	5,
+	5
+};
+
+static static_codebook _8c1_s_p3_0 = {
+	4, 625,
+	_vq_lengthlist__8c1_s_p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c1_s_p3_0,
+	NULL,
+	&_vq_auxt__8c1_s_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p4_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8c1_s_p4_0[] = {
+	 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0,
+	 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+	 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
+	 8, 8, 0, 0, 0, 0, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0,
+	 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0,
+};
+
+static float _vq_quantthresh__8c1_s_p4_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8c1_s_p4_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p4_0 = {
+	_vq_quantthresh__8c1_s_p4_0,
+	_vq_quantmap__8c1_s_p4_0,
+	9,
+	9
+};
+
+static static_codebook _8c1_s_p4_0 = {
+	2, 81,
+	_vq_lengthlist__8c1_s_p4_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8c1_s_p4_0,
+	NULL,
+	&_vq_auxt__8c1_s_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8c1_s_p5_0[] = {
+	 1, 3, 3, 4, 5, 6, 6, 8, 8, 0, 0, 0, 8, 8, 7, 7,
+	 9, 9, 0, 0, 0, 8, 8, 7, 7, 9, 9, 0, 0, 0, 9,10,
+	 8, 8, 9, 9, 0, 0, 0,10,10, 8, 8, 9, 9, 0, 0, 0,
+	11,10, 8, 8,10,10, 0, 0, 0,11,11, 8, 8,10,10, 0,
+	 0, 0,12,12, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10,
+	10,
+};
+
+static float _vq_quantthresh__8c1_s_p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8c1_s_p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p5_0 = {
+	_vq_quantthresh__8c1_s_p5_0,
+	_vq_quantmap__8c1_s_p5_0,
+	9,
+	9
+};
+
+static static_codebook _8c1_s_p5_0 = {
+	2, 81,
+	_vq_lengthlist__8c1_s_p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8c1_s_p5_0,
+	NULL,
+	&_vq_auxt__8c1_s_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p6_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__8c1_s_p6_0[] = {
+	 1, 3, 3, 5, 5, 8, 8, 8, 8, 9, 9,10,10,11,11,11,
+	11, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 0, 0, 0, 9, 9, 8, 8,10,10,10,10,11,11,
+	12,12,12,12, 0, 0, 0, 9, 9, 8, 8,10,10,10,10,11,
+	11,12,12,12,12, 0, 0, 0,10,10, 9, 9,10,10,10,10,
+	11,11,12,12,13,13, 0, 0, 0,10,10, 9, 9,10,10,10,
+	10,11,11,12,12,13,13, 0, 0, 0,11,11, 9, 9,10,10,
+	10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10,
+	10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,
+	10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0, 9,
+	 9,10,10,11,11,12,11,12,12,13,13, 0, 0, 0, 0, 0,
+	10,10,11,11,11,11,12,12,13,12,13,13, 0, 0, 0, 0,
+	 0, 0, 0,11,10,11,11,12,12,13,13,13,13, 0, 0, 0,
+	 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, 0,
+	 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,13, 0,
+	 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__8c1_s_p6_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__8c1_s_p6_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p6_0 = {
+	_vq_quantthresh__8c1_s_p6_0,
+	_vq_quantmap__8c1_s_p6_0,
+	17,
+	17
+};
+
+static static_codebook _8c1_s_p6_0 = {
+	2, 289,
+	_vq_lengthlist__8c1_s_p6_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__8c1_s_p6_0,
+	NULL,
+	&_vq_auxt__8c1_s_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8c1_s_p7_0[] = {
+	 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10,
+	 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10,
+	10,11,10,10, 6, 9, 9,10, 9,10,11,10,10, 6, 9, 9,
+	10, 9, 9,11, 9,10, 7,10,10,11,11,11,11,10,10, 6,
+	 9, 9,10,10,10,11, 9, 9, 6, 9, 9,10,10,10,10, 9,
+	 9,
+};
+
+static float _vq_quantthresh__8c1_s_p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__8c1_s_p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p7_0 = {
+	_vq_quantthresh__8c1_s_p7_0,
+	_vq_quantmap__8c1_s_p7_0,
+	3,
+	3
+};
+
+static static_codebook _8c1_s_p7_0 = {
+	4, 81,
+	_vq_lengthlist__8c1_s_p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__8c1_s_p7_0,
+	NULL,
+	&_vq_auxt__8c1_s_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__8c1_s_p7_1[] = {
+	 2, 3, 3, 5, 5, 7, 7, 7, 7, 7, 7,10,10, 9, 7, 7,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8,
+	 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7,
+	 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8,
+	 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,
+	 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8,
+	 8, 8, 8,10,10,10,10,10, 8, 8, 8, 8, 8, 8,10,10,
+	10,10,10, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__8c1_s_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__8c1_s_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p7_1 = {
+	_vq_quantthresh__8c1_s_p7_1,
+	_vq_quantmap__8c1_s_p7_1,
+	11,
+	11
+};
+
+static static_codebook _8c1_s_p7_1 = {
+	2, 121,
+	_vq_lengthlist__8c1_s_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__8c1_s_p7_1,
+	NULL,
+	&_vq_auxt__8c1_s_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p8_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__8c1_s_p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 5,
+	 7, 7, 8, 8, 8, 8, 9,10,11,11, 7, 5, 5, 7, 7, 8,
+	 8, 9, 9,10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,
+	11, 0,12,12, 9, 9, 9, 9,10, 9,10,11,11,11, 0,13,
+	12, 9, 8, 9, 9,10,10,11,11,12,11, 0, 0, 0, 9, 9,
+	 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, 9, 9,10,
+	10,11,11,12,12, 0, 0, 0,13,13,10,10,11,11,12,11,
+	13,12, 0, 0, 0,14,14,10,10,11,10,11,11,12,12, 0,
+	 0, 0, 0, 0,12,12,11,11,12,12,13,13, 0, 0, 0, 0,
+	 0,12,12,11,10,12,11,13,12,
+};
+
+static float _vq_quantthresh__8c1_s_p8_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__8c1_s_p8_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p8_0 = {
+	_vq_quantthresh__8c1_s_p8_0,
+	_vq_quantmap__8c1_s_p8_0,
+	13,
+	13
+};
+
+static static_codebook _8c1_s_p8_0 = {
+	2, 169,
+	_vq_lengthlist__8c1_s_p8_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__8c1_s_p8_0,
+	NULL,
+	&_vq_auxt__8c1_s_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p8_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8c1_s_p8_1[] = {
+	 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6,
+	 6, 6, 5, 5, 6, 6, 6, 5, 5,
+};
+
+static float _vq_quantthresh__8c1_s_p8_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8c1_s_p8_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p8_1 = {
+	_vq_quantthresh__8c1_s_p8_1,
+	_vq_quantmap__8c1_s_p8_1,
+	5,
+	5
+};
+
+static static_codebook _8c1_s_p8_1 = {
+	2, 25,
+	_vq_lengthlist__8c1_s_p8_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8c1_s_p8_1,
+	NULL,
+	&_vq_auxt__8c1_s_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__8c1_s_p9_0[] = {
+	 1, 3, 3,10,10,10,10,10,10,10,10,10,10, 5, 6, 6,
+	10,10,10,10,10,10,10,10,10,10, 6, 7, 8,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__8c1_s_p9_0[] = {
+	-1732.5, -1417.5, -1102.5, -787.5, -472.5, -157.5, 157.5, 472.5, 
+	787.5, 1102.5, 1417.5, 1732.5, 
+};
+
+static long _vq_quantmap__8c1_s_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p9_0 = {
+	_vq_quantthresh__8c1_s_p9_0,
+	_vq_quantmap__8c1_s_p9_0,
+	13,
+	13
+};
+
+static static_codebook _8c1_s_p9_0 = {
+	2, 169,
+	_vq_lengthlist__8c1_s_p9_0,
+	1, -513964032, 1628680192, 4, 0,
+	_vq_quantlist__8c1_s_p9_0,
+	NULL,
+	&_vq_auxt__8c1_s_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__8c1_s_p9_1[] = {
+	 1, 4, 4, 5, 5, 7, 7, 9, 9,11,11,12,12,13,13, 6,
+	 5, 5, 6, 6, 9, 9,10,10,12,12,12,13,15,14, 6, 5,
+	 5, 7, 7, 9, 9,10,10,12,12,12,13,14,13,17, 7, 7,
+	 8, 8,10,10,11,11,12,13,13,13,13,13,17, 7, 7, 8,
+	 8,10,10,11,11,13,13,13,13,14,14,17,11,11, 9, 9,
+	11,11,12,12,12,13,13,14,15,13,17,12,12, 9, 9,11,
+	11,12,12,13,13,13,13,14,16,17,17,17,11,12,12,12,
+	13,13,13,14,15,14,15,15,17,17,17,12,12,11,11,13,
+	13,14,14,15,14,15,15,17,17,17,15,15,13,13,14,14,
+	15,14,15,15,16,15,17,17,17,15,15,13,13,13,14,14,
+	15,15,15,15,16,17,17,17,17,16,14,15,14,14,15,14,
+	14,15,15,15,17,17,17,17,17,14,14,16,14,15,15,15,
+	15,15,15,17,17,17,17,17,17,16,16,15,17,15,15,14,
+	17,15,17,16,17,17,17,17,16,15,14,15,15,15,15,15,
+	15,
+};
+
+static float _vq_quantthresh__8c1_s_p9_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__8c1_s_p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p9_1 = {
+	_vq_quantthresh__8c1_s_p9_1,
+	_vq_quantmap__8c1_s_p9_1,
+	15,
+	15
+};
+
+static static_codebook _8c1_s_p9_1 = {
+	2, 225,
+	_vq_lengthlist__8c1_s_p9_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__8c1_s_p9_1,
+	NULL,
+	&_vq_auxt__8c1_s_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8c1_s_p9_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__8c1_s_p9_2[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,11,11,12, 7, 7, 7, 7, 8, 8, 9, 9,
+	 9, 9,10,10,10,10,10,10,10,10,11,11,11, 7, 7, 7,
+	 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,11,
+	11,12, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,
+	10,10,10,10,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9,10,10,10,10,10,10,10,10,11,11,11, 8, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,11,11,
+	11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,10,
+	10,10,10,11,12,11, 9, 9, 8, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,10,10,10,10,11,11,11,11,11, 8, 8, 9,
+	 9, 9, 9,10,10,10,10,10,10,10,10,10,10,11,12,11,
+	12,11, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,
+	10,10,11,11,11,11,11, 9, 9, 9, 9,10,10,10,10,10,
+	10,10,10,10,10,10,10,12,11,12,11,11, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,12,11,11,11,
+	11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	11,11,11,12,11,11,12,11,10,10,10,10,10,10,10,10,
+	10,10,10,10,11,10,11,11,11,11,11,11,11,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,11,11,12,11,12,
+	11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	11,11,12,11,12,11,11,11,11,10,10,10,10,10,10,10,
+	10,10,10,10,10,11,11,12,11,11,12,11,11,12,10,10,
+	11,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+	11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,12,
+	12,11,12,11,11,12,12,12,11,11,10,10,10,10,10,10,
+	10,10,10,11,12,12,11,12,12,11,12,11,11,11,11,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__8c1_s_p9_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__8c1_s_p9_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__8c1_s_p9_2 = {
+	_vq_quantthresh__8c1_s_p9_2,
+	_vq_quantmap__8c1_s_p9_2,
+	21,
+	21
+};
+
+static static_codebook _8c1_s_p9_2 = {
+	2, 441,
+	_vq_lengthlist__8c1_s_p9_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__8c1_s_p9_2,
+	NULL,
+	&_vq_auxt__8c1_s_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__8c1_s_single[] = {
+	 4, 6,18, 8,11, 8, 8, 9, 9,10, 4, 4,18, 5, 9, 5,
+	 6, 7, 8,10,18,18,18,18,17,17,17,17,17,17, 7, 5,
+	17, 6,11, 6, 7, 8, 9,12,12, 9,17,12, 8, 8, 9,10,
+	10,13, 7, 5,17, 6, 8, 4, 5, 6, 8,10, 6, 5,17, 6,
+	 8, 5, 4, 5, 7, 9, 7, 7,17, 8, 9, 6, 5, 5, 6, 8,
+	 8, 8,17, 9,11, 8, 6, 6, 6, 7, 9,10,17,12,12,10,
+	 9, 7, 7, 8,
+};
+
+static static_codebook _huff_book__8c1_s_single = {
+	2, 100,
+	_huff_lengthlist__8c1_s_single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/books/floor/floor_books.h
@@ -1,0 +1,1455 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: static codebooks autogenerated by huff/huffbuld
+ last modified: $Id: floor_books.h,v 1.3 2002/07/11 06:41:01 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "codebook.h"
+static long _huff_lengthlist_line_1024x27_0sub0[] = {
+	 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+	 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 5, 8, 5, 8, 6,
+	 8, 6, 9, 6, 9, 6, 9, 6,10, 6,10, 6,11, 6,11, 6,
+	11, 6,12, 6,12, 7,12, 7,12, 7,12, 7,12, 7,12, 7,
+	12, 7,12, 7,12, 7,12, 7,12, 8,12, 8,11, 8,11, 8,
+	12, 9,11, 9, 9,10,11, 9,12, 9,12,12,14,13,13,14,
+	13,13,13,12,14,16,20,20,21,14,14,15,21,21,21,20,
+	21,21,21,21,21,21,21,21,21,21,20,20,20,20,20,20,
+};
+
+static static_codebook _huff_book_line_1024x27_0sub0 = {
+	1, 128,
+	_huff_lengthlist_line_1024x27_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_1sub0[] = {
+	 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 6, 4, 6, 5, 6, 5,
+	 7, 5, 7, 6, 8, 6, 8, 6, 8, 6, 9, 6,10, 6,10, 6,
+};
+
+static static_codebook _huff_book_line_1024x27_1sub0 = {
+	1, 32,
+	_huff_lengthlist_line_1024x27_1sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_1sub1[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 9, 5,10, 4,10, 4, 9, 4, 9, 3, 9, 4, 9, 4, 9, 4,
+	 9, 4, 9, 4, 9, 4, 8, 4, 8, 4, 8, 5, 9, 5, 9, 6,
+	 8, 6, 9, 7,10, 8,10, 9,10,10,10,12,11,13,12,13,
+	13,15,13,14,13,14,12,15,13,15,14,15,13,16,14,16,
+	14,15,14,14,14,16,15,18,15,18,16,18,18,18,18,18,
+	18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,17,
+};
+
+static static_codebook _huff_book_line_1024x27_1sub1 = {
+	1, 128,
+	_huff_lengthlist_line_1024x27_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_2sub0[] = {
+	 1, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+	 6, 6, 7, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9,10,10,
+};
+
+static static_codebook _huff_book_line_1024x27_2sub0 = {
+	1, 32,
+	_huff_lengthlist_line_1024x27_2sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_2sub1[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 5, 5, 6, 5, 6, 6,
+	 7, 6, 7, 7, 7, 7, 7, 7, 8, 9, 8, 9, 8,10, 8,11,
+	 8,12, 9,13, 9,14, 9,14, 8,12, 8,14, 9,14, 8,12,
+	 8,11, 8,11, 8,11, 9,11,10,11,10,12,10,12,11,12,
+	12,12,12,12,11,12,11,13,11,13,12,14,14,14,14,14,
+	14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,
+};
+
+static static_codebook _huff_book_line_1024x27_2sub1 = {
+	1, 128,
+	_huff_lengthlist_line_1024x27_2sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_3sub1[] = {
+	 0, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, 5, 4,
+	 5, 5,
+};
+
+static static_codebook _huff_book_line_1024x27_3sub1 = {
+	1, 18,
+	_huff_lengthlist_line_1024x27_3sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_3sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 3, 3, 3, 3, 4, 4, 4, 5, 4, 6, 5, 6, 5, 7,
+	 5, 9, 5,10, 6,11, 6,12, 7,13, 8,15, 8,15, 9,15,
+	 9,15,
+};
+
+static static_codebook _huff_book_line_1024x27_3sub2 = {
+	1, 50,
+	_huff_lengthlist_line_1024x27_3sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_3sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 2, 9, 2, 9, 2, 9, 4, 9, 6, 9, 7, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static static_codebook _huff_book_line_1024x27_3sub3 = {
+	1, 128,
+	_huff_lengthlist_line_1024x27_3sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_4sub1[] = {
+	 0, 4, 5, 4, 5, 4, 6, 3, 6, 3, 5, 3, 5, 3, 6, 4,
+	 6, 4,
+};
+
+static static_codebook _huff_book_line_1024x27_4sub1 = {
+	1, 18,
+	_huff_lengthlist_line_1024x27_4sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_4sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 2, 4, 2, 5, 3, 5, 4, 6, 6, 6, 6, 7, 7,
+	 7, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9,10,10,11,
+	10,11,
+};
+
+static static_codebook _huff_book_line_1024x27_4sub2 = {
+	1, 50,
+	_huff_lengthlist_line_1024x27_4sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_4sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 3, 3, 3, 6, 4, 6, 4, 5, 5, 7, 4, 8, 5, 9,
+	 4, 9, 5, 9, 5, 9, 6, 9, 5, 9, 7, 9, 7, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static static_codebook _huff_book_line_1024x27_4sub3 = {
+	1, 128,
+	_huff_lengthlist_line_1024x27_4sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_class1[] = {
+	 2, 9, 8,14, 7,13,11,14, 1, 5, 3, 7, 4,10, 7,12,
+};
+
+static static_codebook _huff_book_line_1024x27_class1 = {
+	1, 16,
+	_huff_lengthlist_line_1024x27_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_class2[] = {
+	 1, 3, 2, 5, 4, 7, 6, 7,
+};
+
+static static_codebook _huff_book_line_1024x27_class2 = {
+	1, 8,
+	_huff_lengthlist_line_1024x27_class2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_class3[] = {
+	 1, 5, 6,19, 5, 8,10,19, 9,10,15,19,19,19,19,19,
+	 4, 7, 9,19, 6, 7,10,19,11,11,15,19,19,19,19,19,
+	 8,11,13,19, 8,11,14,19,13,13,17,19,19,19,19,19,
+	19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+	 3, 7, 9,19, 6, 8,11,19,11,11,15,19,19,19,19,19,
+	 5, 7,11,19, 6, 7,11,19,11,10,14,19,19,19,19,19,
+	 8,11,15,19, 8,10,14,19,13,13,16,19,19,19,19,19,
+	19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+	 6, 9,11,19, 8,10,12,19,15,14,17,19,19,19,19,19,
+	 5, 8,11,19, 7, 9,12,19,14,11,16,19,19,19,19,19,
+	 9,10,18,19, 9,10,15,19,14,16,19,19,19,19,19,19,
+	19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+	16,17,19,19,16,17,17,19,19,19,19,19,19,19,19,19,
+	12,14,16,19,12,12,16,19,19,19,19,19,19,19,19,19,
+	18,18,19,19,17,16,19,19,19,19,19,19,19,19,19,19,
+	19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,
+};
+
+static static_codebook _huff_book_line_1024x27_class3 = {
+	1, 256,
+	_huff_lengthlist_line_1024x27_class3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_1024x27_class4[] = {
+	 1, 4, 8,12, 4, 6, 8,21, 9, 8,10,21,20,16,18,20,
+	 2, 6, 8,20, 7, 6, 9,19,11, 9,10,20,17,15,16,20,
+	 5, 8,11,19, 8, 8,10,15,12,10,12,15,20,20,15,20,
+	17,20,20,20,15,20,20,19,20,20,16,19,20,20,20,20,
+};
+
+static static_codebook _huff_book_line_1024x27_class4 = {
+	1, 64,
+	_huff_lengthlist_line_1024x27_class4,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_0sub0[] = {
+	 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+	 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6,
+	 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+	 8, 7, 8, 7, 8, 7, 8, 7, 9, 7, 9, 7, 9, 8,10, 8,
+	10, 8,10, 8,10, 8,10, 9,11, 9,11, 9,10, 9,10,10,
+	11,10,11,11,11,11,12,12,13,14,13,14,16,16,16,16,
+	16,16,15,16,16,16,16,16,16,16,16,16,16,16,16,16,
+	16,16,16,16,16,16,16,16,16,16,16,16,16,15,15,15,
+};
+
+static static_codebook _huff_book_line_128x11_0sub0 = {
+	1, 128,
+	_huff_lengthlist_line_128x11_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_1sub0[] = {
+	 2, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+	 6, 5, 6, 5, 6, 5, 7, 6, 7, 6, 7, 6, 8, 6, 8, 6,
+};
+
+static static_codebook _huff_book_line_128x11_1sub0 = {
+	1, 32,
+	_huff_lengthlist_line_128x11_1sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_1sub1[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 6, 3, 6, 3, 7, 3, 7, 4, 8, 4, 8, 4, 8, 4, 9, 4,
+	10, 5, 9, 5,10, 5,10, 5,10, 5,12, 6,12, 6,10, 6,
+	10, 7,10, 8,10, 8,10, 9,11, 9,12,11,10,11,11,13,
+	12,12,12,13,10,13,10,13,10,13,10,13,11,13,10,13,
+	10,13,10,13,10,13,10,13,11,12,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+};
+
+static static_codebook _huff_book_line_128x11_1sub1 = {
+	1, 128,
+	_huff_lengthlist_line_128x11_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_2sub1[] = {
+	 0, 4, 5, 4, 5, 4, 5, 3, 4, 3, 4, 4, 4, 4, 4, 5,
+	 5, 5,
+};
+
+static static_codebook _huff_book_line_128x11_2sub1 = {
+	1, 18,
+	_huff_lengthlist_line_128x11_2sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_2sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 2, 3, 3, 4, 3, 5, 4, 5, 5, 6, 5, 6, 6, 6,
+	 6, 8, 6,10, 7,10, 8,10, 8,10,10,10,10,10,10,10,
+	10,10,
+};
+
+static static_codebook _huff_book_line_128x11_2sub2 = {
+	1, 50,
+	_huff_lengthlist_line_128x11_2sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_2sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+};
+
+static static_codebook _huff_book_line_128x11_2sub3 = {
+	1, 128,
+	_huff_lengthlist_line_128x11_2sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_3sub1[] = {
+	 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4,
+	 5, 4,
+};
+
+static static_codebook _huff_book_line_128x11_3sub1 = {
+	1, 18,
+	_huff_lengthlist_line_128x11_3sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_3sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 3, 5, 3, 6, 4, 7, 4, 7, 4, 7, 4, 8, 4,
+	 8, 4, 9, 4, 9, 4, 9, 5,10, 5,11, 5,12, 6,13, 6,
+	13, 7,
+};
+
+static static_codebook _huff_book_line_128x11_3sub2 = {
+	1, 50,
+	_huff_lengthlist_line_128x11_3sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_3sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 7, 2, 6, 2, 7, 3, 8, 4, 7, 6, 9, 7, 9, 7,
+	 9, 9, 9, 8, 9, 8, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static static_codebook _huff_book_line_128x11_3sub3 = {
+	1, 128,
+	_huff_lengthlist_line_128x11_3sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_class1[] = {
+	 1, 6, 3, 7, 2, 5, 4, 7,
+};
+
+static static_codebook _huff_book_line_128x11_class1 = {
+	1, 8,
+	_huff_lengthlist_line_128x11_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_class2[] = {
+	 1, 5,11,14, 4,11,13,14,10,14,13,14,14,14,13,13,
+	 2, 6,11,13, 5,11,12,13,11,12,13,13,13,13,13,13,
+	 4, 8,12,13, 5, 9,11,13,12,13,13,13,13,13,13,13,
+	13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+};
+
+static static_codebook _huff_book_line_128x11_class2 = {
+	1, 64,
+	_huff_lengthlist_line_128x11_class2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x11_class3[] = {
+	 6, 7,11,16, 6, 7,10,16,11, 9,13,15,15,15,15,15,
+	 4, 4, 7,14, 4, 4, 6,14, 8, 6, 8,15,15,15,15,15,
+	 4, 4, 6,15, 3, 2, 4,13, 6, 5, 6,14,15,12,11,14,
+	11,11,13,15, 9, 8,10,15,11,10,11,15,15,15,15,15,
+};
+
+static static_codebook _huff_book_line_128x11_class3 = {
+	1, 64,
+	_huff_lengthlist_line_128x11_class3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_0sub0[] = {
+	 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+	 6, 5, 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 6, 7, 6,
+	 7, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 7, 9, 7,
+	 9, 7, 9, 7, 9, 7, 9, 7, 9, 7,10, 7,10, 8,10, 8,
+	11, 8,11, 8,11, 8,12, 8,12, 8,12, 8,12, 9,12, 9,
+	12, 9,12, 9,13, 9,13,10,13,10,13,11,14,12,14,13,
+	14,14,16,15,17,17,19,18,19,19,19,19,19,19,19,19,
+	19,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,
+};
+
+static static_codebook _huff_book_line_128x17_0sub0 = {
+	1, 128,
+	_huff_lengthlist_line_128x17_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_1sub0[] = {
+	 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 6, 5,
+	 6, 5, 6, 6, 7, 6, 7, 6, 8, 6, 8, 7, 9, 7, 9, 8,
+};
+
+static static_codebook _huff_book_line_128x17_1sub0 = {
+	1, 32,
+	_huff_lengthlist_line_128x17_1sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_1sub1[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 4, 2, 5, 3, 5, 3, 6, 4, 6, 4, 7, 4, 8, 5, 8, 5,
+	 8, 6, 9, 6, 9, 7, 9, 8,10, 8,10, 9,10,10,10,10,
+	10,12,10,14,11,15,12,15,11,15,11,15,11,14,11,15,
+	11,14,11,13,10,12,10,14,10,14,11,13,10,12,11,15,
+	12,15,13,15,12,13,14,15,15,15,15,15,15,15,15,15,
+	15,15,15,15,15,15,15,15,15,15,15,15,15,14,14,14,
+};
+
+static static_codebook _huff_book_line_128x17_1sub1 = {
+	1, 128,
+	_huff_lengthlist_line_128x17_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_2sub1[] = {
+	 0, 4, 5, 4, 7, 3, 8, 3, 9, 3,10, 2,12, 3,12, 4,
+	11, 6,
+};
+
+static static_codebook _huff_book_line_128x17_2sub1 = {
+	1, 18,
+	_huff_lengthlist_line_128x17_2sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_2sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 7, 1, 8, 2, 9, 3, 9, 7, 9, 7, 9, 7, 8, 7,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8,
+};
+
+static static_codebook _huff_book_line_128x17_2sub2 = {
+	1, 50,
+	_huff_lengthlist_line_128x17_2sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_2sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+};
+
+static static_codebook _huff_book_line_128x17_2sub3 = {
+	1, 128,
+	_huff_lengthlist_line_128x17_2sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_3sub1[] = {
+	 0, 4, 4, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 6, 4,
+	 6, 4,
+};
+
+static static_codebook _huff_book_line_128x17_3sub1 = {
+	1, 18,
+	_huff_lengthlist_line_128x17_3sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_3sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 5, 3, 6, 3, 6, 3, 7, 4, 8, 4, 8, 4, 9, 4,
+	 9, 4,10, 4,10, 5,11, 5,11, 5,12, 5,12, 6,12, 6,
+	12, 7,
+};
+
+static static_codebook _huff_book_line_128x17_3sub2 = {
+	1, 50,
+	_huff_lengthlist_line_128x17_3sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_3sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 7, 1, 7, 3, 6, 3, 6, 4, 6, 5, 6, 8, 7,10,
+	 7,11, 7,11, 8,11, 9,11, 7,11, 8,11, 8,11,10,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+};
+
+static static_codebook _huff_book_line_128x17_3sub3 = {
+	1, 128,
+	_huff_lengthlist_line_128x17_3sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_class1[] = {
+	 1, 3, 4, 7, 2, 6, 5, 7,
+};
+
+static static_codebook _huff_book_line_128x17_class1 = {
+	1, 8,
+	_huff_lengthlist_line_128x17_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_class2[] = {
+	 1, 2, 7,14, 4, 9,13,14, 8,14,14,14,14,14,14,14,
+	 3, 5,10,14, 8,14,14,14,11,14,14,14,14,14,14,14,
+	 7,10,14,14,12,14,14,14,14,14,14,14,14,14,14,14,
+	14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,
+};
+
+static static_codebook _huff_book_line_128x17_class2 = {
+	1, 64,
+	_huff_lengthlist_line_128x17_class2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x17_class3[] = {
+	 2, 6,11,19, 5, 9,12,19,10,11,13,19,19,19,19,19,
+	 2, 5, 8,19, 4, 6, 8,19, 8, 8, 9,19,19,16,19,19,
+	 3, 6, 8,19, 3, 5, 7,18, 8, 8, 9,16,16,11,16,19,
+	14,14,14,19,10,10,11,19,16,12,14,19,19,19,19,19,
+};
+
+static static_codebook _huff_book_line_128x17_class3 = {
+	1, 64,
+	_huff_lengthlist_line_128x17_class3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x4_0sub0[] = {
+	 2, 2, 2, 2,
+};
+
+static static_codebook _huff_book_line_128x4_0sub0 = {
+	1, 4,
+	_huff_lengthlist_line_128x4_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x4_0sub1[] = {
+	 0, 0, 0, 0, 3, 2, 3, 2, 3, 3,
+};
+
+static static_codebook _huff_book_line_128x4_0sub1 = {
+	1, 10,
+	_huff_lengthlist_line_128x4_0sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x4_0sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 4, 4, 4, 4,
+	 4, 3, 4, 4, 5, 3, 6, 4, 6,
+};
+
+static static_codebook _huff_book_line_128x4_0sub2 = {
+	1, 25,
+	_huff_lengthlist_line_128x4_0sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x4_0sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 2, 6, 3, 6, 3,
+	 7, 4, 7, 5, 7, 5, 7, 6, 8, 8, 9,10,10,16,10,16,
+	10,14,10,14,11,15,15,15,15,15,15,15,15,15,15,15,
+};
+
+static static_codebook _huff_book_line_128x4_0sub3 = {
+	1, 64,
+	_huff_lengthlist_line_128x4_0sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x4_class0[] = {
+	 8, 8, 8,14, 7, 7, 8,13, 7, 6, 7,11,11,11,10,13,
+	 9, 9,10,16, 8, 8, 9,12, 7, 7, 7,11,11,11,10,12,
+	11,11,11,14,10,10,10,14, 9, 8, 9,12,13,14,12,14,
+	16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+	 8, 7, 8,11, 7, 7, 7,11, 6, 6, 6,10,10,10,10,14,
+	 8, 8, 8,12, 7, 7, 8,11, 6, 7, 7,10,10,10,10,13,
+	10,10,10,12,10, 9, 9,12, 9, 9, 9,12,12,13,12,14,
+	16,16,16,16,16,14,16,16,14,14,16,16,16,16,16,16,
+	 7, 6, 5, 7, 6, 6, 5, 6, 6, 5, 5, 5, 9,10, 9,10,
+	 8, 7, 6, 7, 7, 6, 5, 6, 6, 6, 5, 6,10,10, 9, 9,
+	10, 9, 7, 8, 9, 8, 7, 7, 8, 7, 6, 7,11,11,10, 9,
+	16,13,14,16,14,14,13,15,16,14,12,13,16,16,14,16,
+	 9, 8, 7, 8, 8, 8, 7, 8, 8, 7, 6, 7,10,10, 9,12,
+	 9, 9, 8, 8, 9, 8, 7, 8, 8, 8, 6, 7,10,10, 9,12,
+	11,10, 9,10,10, 9, 7, 9, 9, 8, 6, 9,12,11,10,13,
+	12,16,16,16,12,13,12,16,15,12,11,14,16,16,16,16,
+};
+
+static static_codebook _huff_book_line_128x4_class0 = {
+	1, 256,
+	_huff_lengthlist_line_128x4_class0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_0sub1[] = {
+	 0, 3, 3, 3, 3, 3, 3, 3, 3,
+};
+
+static static_codebook _huff_book_line_128x7_0sub1 = {
+	1, 9,
+	_huff_lengthlist_line_128x7_0sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_0sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 3, 4, 4, 4,
+	 5, 4, 5, 4, 5, 4, 6, 4, 6,
+};
+
+static static_codebook _huff_book_line_128x7_0sub2 = {
+	1, 25,
+	_huff_lengthlist_line_128x7_0sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_0sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 3, 5, 3, 6, 4,
+	 6, 4, 6, 4, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 5, 5,
+	 6, 7, 8,10,12,12,12,12,12,12,12,12,12,12,12,12,
+};
+
+static static_codebook _huff_book_line_128x7_0sub3 = {
+	1, 64,
+	_huff_lengthlist_line_128x7_0sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_1sub1[] = {
+	 0, 3, 3, 3, 3, 2, 4, 3, 4,
+};
+
+static static_codebook _huff_book_line_128x7_1sub1 = {
+	1, 9,
+	_huff_lengthlist_line_128x7_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_1sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 3, 6, 3, 7, 3,
+	 8, 3, 9, 3,10, 3,11, 4,11,
+};
+
+static static_codebook _huff_book_line_128x7_1sub2 = {
+	1, 25,
+	_huff_lengthlist_line_128x7_1sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_1sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,12, 2, 9, 3,10, 4,
+	12, 5,12, 6,12,10,12,11,12,12,12,12,12,12,12,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+};
+
+static static_codebook _huff_book_line_128x7_1sub3 = {
+	1, 64,
+	_huff_lengthlist_line_128x7_1sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_class0[] = {
+	10, 7, 8,14,10, 7, 7,12,11, 8, 8,13,16,16,16,16,
+	 8, 5, 5,10, 7, 4, 4, 8, 8, 5, 5, 9,16,16,16,16,
+	 7, 4, 5, 7, 6, 3, 3, 6, 8, 5, 5, 7,16,14,13,16,
+	 9, 7, 7,10, 7, 4, 4, 7, 9, 6, 5, 6,15,13,11,14,
+};
+
+static static_codebook _huff_book_line_128x7_class0 = {
+	1, 64,
+	_huff_lengthlist_line_128x7_class0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_128x7_class1[] = {
+	 8,12,16,16,10,14,16,16,12,15,16,16,16,16,16,16,
+	 7,11,15,16, 7,11,16,16,10,12,16,16,16,16,16,16,
+	 9,15,16,16, 9,12,16,16,11,15,16,16,16,16,16,16,
+	16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+	 6,10,13,16, 7,10,15,16, 9,11,16,16,16,16,16,16,
+	 4, 8,13,16, 5, 8,15,16, 7, 9,15,16,16,16,16,16,
+	 6,12,16,16, 6,10,15,16, 9,10,14,16,16,16,16,16,
+	14,16,16,16,12,14,16,16,15,16,16,16,16,16,16,16,
+	 4, 9,11,16, 5, 9,13,16, 7, 9,15,16,16,16,16,16,
+	 2, 7,11,16, 3, 6,11,16, 5, 7,12,16,16,16,16,16,
+	 4, 9,14,16, 4, 7,13,16, 6, 8,13,16,16,16,16,16,
+	11,14,16,16,10,16,14,16,11,16,16,16,16,16,16,16,
+	 7,13,16,16, 9,13,15,16,11,13,16,16,16,16,16,16,
+	 5,10,14,16, 6,10,15,16, 9,10,16,16,16,16,16,16,
+	 7,13,16,16, 6,10,16,16, 9,12,16,16,16,16,16,16,
+	11,16,16,16,10,16,16,16,13,16,16,16,16,16,16,16,
+};
+
+static static_codebook _huff_book_line_128x7_class1 = {
+	1, 256,
+	_huff_lengthlist_line_128x7_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x4_0sub0[] = {
+	 1, 3, 2, 3,
+};
+
+static static_codebook _huff_book_line_256x4_0sub0 = {
+	1, 4,
+	_huff_lengthlist_line_256x4_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x4_0sub1[] = {
+	 0, 0, 0, 0, 2, 2, 3, 3, 3, 3,
+};
+
+static static_codebook _huff_book_line_256x4_0sub1 = {
+	1, 10,
+	_huff_lengthlist_line_256x4_0sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x4_0sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 3, 4,
+	 4, 4, 5, 4, 5, 5, 6, 4, 6,
+};
+
+static static_codebook _huff_book_line_256x4_0sub2 = {
+	1, 25,
+	_huff_lengthlist_line_256x4_0sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x4_0sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 3, 4, 3, 4, 4,
+	 5, 4, 5, 5, 6, 5, 7, 6, 8, 7, 9, 8, 9, 9,10,12,
+	15,15,15,15,15,15,15,15,14,14,14,14,14,14,14,14,
+};
+
+static static_codebook _huff_book_line_256x4_0sub3 = {
+	1, 64,
+	_huff_lengthlist_line_256x4_0sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x4_class0[] = {
+	 4, 5, 6,11, 5, 5, 6,10, 7, 6, 5, 6,14,13,10,10,
+	 6, 6, 6,10, 6, 6, 6,10, 7, 7, 7, 9, 9,10, 9,12,
+	 9, 8, 8,11, 8, 8, 8,10, 8, 8, 9,11, 8, 9, 9,13,
+	18,18,18,18,16,17,18,18,12,13,14,18,14,14,10,12,
+	 5, 5, 6,12, 6, 5, 6,10, 7, 7, 6, 7,13,12, 9,12,
+	 6, 6, 6,11, 6, 6, 6, 9, 7, 7, 7,10,10,10, 9,12,
+	 9, 8, 8,12, 8, 8, 7,11, 8, 8, 8,11, 9, 9, 8,10,
+	18,18,17,18,18,18,15,18,16,14,12,18,14,12,10,11,
+	 8, 7, 7,12, 8, 7, 7,10, 8, 7, 6, 6,11,10, 9,10,
+	 8, 8, 7,11, 8, 7, 7, 9, 8, 8, 7, 9,10,10, 9, 9,
+	10, 9, 8,12, 9, 9, 8,11,10, 9, 8, 9, 8, 8, 7, 9,
+	18,18,18,18,18,18,18,18,17,16,14,18,13,12,11,13,
+	12,12,13,16,11,10,10,16,12,12, 9, 7,15,12,11,11,
+	14,14,14,14,12,11,11,18,14,12,10,11,18,13,11,13,
+	18,18,18,17,17,16,15,17,18,15,16,18,16,12,11,11,
+	18,18,18,18,18,18,18,18,18,18,17,18,18,13,12,15,
+};
+
+static static_codebook _huff_book_line_256x4_class0 = {
+	1, 256,
+	_huff_lengthlist_line_256x4_class0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_0sub1[] = {
+	 0, 2, 3, 3, 3, 3, 4, 3, 4,
+};
+
+static static_codebook _huff_book_line_256x7_0sub1 = {
+	1, 9,
+	_huff_lengthlist_line_256x7_0sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_0sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 3, 4, 3, 5, 3,
+	 6, 3, 6, 4, 6, 4, 7, 5, 7,
+};
+
+static static_codebook _huff_book_line_256x7_0sub2 = {
+	1, 25,
+	_huff_lengthlist_line_256x7_0sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_0sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 2, 5, 3, 5, 3,
+	 6, 3, 6, 4, 7, 6, 7, 8, 7, 9, 8, 9, 9, 9,10, 9,
+	11,13,11,13,10,10,13,13,13,13,13,13,12,12,12,12,
+};
+
+static static_codebook _huff_book_line_256x7_0sub3 = {
+	1, 64,
+	_huff_lengthlist_line_256x7_0sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_1sub1[] = {
+	 0, 3, 3, 3, 3, 2, 4, 3, 4,
+};
+
+static static_codebook _huff_book_line_256x7_1sub1 = {
+	1, 9,
+	_huff_lengthlist_line_256x7_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_1sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 4, 3, 4, 4,
+	 5, 4, 6, 5, 6, 7, 6, 8, 8,
+};
+
+static static_codebook _huff_book_line_256x7_1sub2 = {
+	1, 25,
+	_huff_lengthlist_line_256x7_1sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_1sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 4, 3, 6, 3, 7,
+	 3, 8, 5, 8, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7,
+};
+
+static static_codebook _huff_book_line_256x7_1sub3 = {
+	1, 64,
+	_huff_lengthlist_line_256x7_1sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_class0[] = {
+	 7, 5, 5, 9, 9, 6, 6, 9,12, 8, 7, 8,11, 8, 9,15,
+	 6, 3, 3, 7, 7, 4, 3, 6, 9, 6, 5, 6, 8, 6, 8,15,
+	 8, 5, 5, 9, 8, 5, 4, 6,10, 7, 5, 5,11, 8, 7,15,
+	14,15,13,13,13,13, 8,11,15,10, 7, 6,11, 9,10,15,
+};
+
+static static_codebook _huff_book_line_256x7_class0 = {
+	1, 64,
+	_huff_lengthlist_line_256x7_class0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_256x7_class1[] = {
+	 5, 6, 8,15, 6, 9,10,15,10,11,12,15,15,15,15,15,
+	 4, 6, 7,15, 6, 7, 8,15, 9, 8, 9,15,15,15,15,15,
+	 6, 8, 9,15, 7, 7, 8,15,10, 9,10,15,15,15,15,15,
+	15,13,15,15,15,10,11,15,15,13,13,15,15,15,15,15,
+	 4, 6, 7,15, 6, 8, 9,15,10,10,12,15,15,15,15,15,
+	 2, 5, 6,15, 5, 6, 7,15, 8, 6, 7,15,15,15,15,15,
+	 5, 6, 8,15, 5, 6, 7,15, 9, 6, 7,15,15,15,15,15,
+	14,12,13,15,12,10,11,15,15,15,15,15,15,15,15,15,
+	 7, 8, 9,15, 9,10,10,15,15,14,14,15,15,15,15,15,
+	 5, 6, 7,15, 7, 8, 9,15,12, 9,10,15,15,15,15,15,
+	 7, 7, 9,15, 7, 7, 8,15,12, 8, 9,15,15,15,15,15,
+	13,13,14,15,12,11,12,15,15,15,15,15,15,15,15,15,
+	15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+	13,13,13,15,15,15,15,15,15,15,15,15,15,15,15,15,
+	15,12,13,15,15,12,13,15,15,14,15,15,15,15,15,15,
+	15,15,15,15,15,15,13,15,15,15,15,15,15,15,15,15,
+};
+
+static static_codebook _huff_book_line_256x7_class1 = {
+	1, 256,
+	_huff_lengthlist_line_256x7_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_0sub0[] = {
+	 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+	 5, 6, 5, 6, 6, 6, 6, 5, 6, 6, 7, 6, 7, 6, 7, 6,
+	 7, 6, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 9, 7, 9, 7,
+	 9, 7, 9, 8, 9, 8,10, 8,10, 8,10, 7,10, 6,10, 8,
+	10, 8,11, 7,10, 7,11, 8,11,11,12,12,11,11,12,11,
+	13,11,13,11,13,12,15,12,13,13,14,14,14,14,14,15,
+	15,15,16,14,17,19,19,18,18,18,18,18,18,18,18,18,
+	18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
+};
+
+static static_codebook _huff_book_line_512x17_0sub0 = {
+	1, 128,
+	_huff_lengthlist_line_512x17_0sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_1sub0[] = {
+	 2, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5,
+	 6, 5, 6, 6, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 8, 7,
+};
+
+static static_codebook _huff_book_line_512x17_1sub0 = {
+	1, 32,
+	_huff_lengthlist_line_512x17_1sub0,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_1sub1[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 4, 3, 5, 3, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 6, 5,
+	 6, 5, 7, 5, 8, 6, 8, 6, 8, 6, 8, 6, 8, 7, 9, 7,
+	 9, 7,11, 9,11,11,12,11,14,12,14,16,14,16,13,16,
+	14,16,12,15,13,16,14,16,13,14,12,15,13,15,13,13,
+	13,15,12,14,14,15,13,15,12,15,15,15,15,15,15,15,
+	15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+};
+
+static static_codebook _huff_book_line_512x17_1sub1 = {
+	1, 128,
+	_huff_lengthlist_line_512x17_1sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_2sub1[] = {
+	 0, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 5, 4, 5, 3,
+	 5, 3,
+};
+
+static static_codebook _huff_book_line_512x17_2sub1 = {
+	1, 18,
+	_huff_lengthlist_line_512x17_2sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_2sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 6, 4, 6, 5,
+	 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 7, 8, 7, 9, 7,
+	 9, 8,
+};
+
+static static_codebook _huff_book_line_512x17_2sub2 = {
+	1, 50,
+	_huff_lengthlist_line_512x17_2sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_2sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 3, 3, 3, 3, 4, 3, 4, 4, 5, 5, 6, 6, 7, 7,
+	 7, 8, 8,11, 8, 9, 9, 9,10,11,11,11, 9,10,10,11,
+	11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+};
+
+static static_codebook _huff_book_line_512x17_2sub3 = {
+	1, 128,
+	_huff_lengthlist_line_512x17_2sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_3sub1[] = {
+	 0, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 5, 4, 5,
+	 5, 5,
+};
+
+static static_codebook _huff_book_line_512x17_3sub1 = {
+	1, 18,
+	_huff_lengthlist_line_512x17_3sub1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_3sub2[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 2, 3, 3, 4, 3, 5, 4, 6, 4, 6, 5, 7, 6, 7,
+	 6, 8, 6, 8, 7, 9, 8,10, 8,12, 9,13,10,15,10,15,
+	11,14,
+};
+
+static static_codebook _huff_book_line_512x17_3sub2 = {
+	1, 50,
+	_huff_lengthlist_line_512x17_3sub2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_3sub3[] = {
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 4, 8, 4, 8, 4, 8, 4, 8, 5, 8, 5, 8, 6, 8,
+	 4, 8, 4, 8, 5, 8, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+};
+
+static static_codebook _huff_book_line_512x17_3sub3 = {
+	1, 128,
+	_huff_lengthlist_line_512x17_3sub3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_class1[] = {
+	 1, 2, 3, 6, 5, 4, 7, 7,
+};
+
+static static_codebook _huff_book_line_512x17_class1 = {
+	1, 8,
+	_huff_lengthlist_line_512x17_class1,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_class2[] = {
+	 3, 3, 3,14, 5, 4, 4,11, 8, 6, 6,10,17,12,11,17,
+	 6, 5, 5,15, 5, 3, 4,11, 8, 5, 5, 8,16, 9,10,14,
+	10, 8, 9,17, 8, 6, 6,13,10, 7, 7,10,16,11,13,14,
+	17,17,17,17,17,16,16,16,16,15,16,16,16,16,16,16,
+};
+
+static static_codebook _huff_book_line_512x17_class2 = {
+	1, 64,
+	_huff_lengthlist_line_512x17_class2,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist_line_512x17_class3[] = {
+	 2, 4, 6,17, 4, 5, 7,17, 8, 7,10,17,17,17,17,17,
+	 3, 4, 6,15, 3, 3, 6,15, 7, 6, 9,17,17,17,17,17,
+	 6, 8,10,17, 6, 6, 8,16, 9, 8,10,17,17,15,16,17,
+	17,17,17,17,12,15,15,16,12,15,15,16,16,16,16,16,
+};
+
+static static_codebook _huff_book_line_512x17_class3 = {
+	1, 64,
+	_huff_lengthlist_line_512x17_class3,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/books/uncoupled/res_books_uncoupled.h
@@ -1,0 +1,10907 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: static codebooks autogenerated by huff/huffbuld
+ last modified: $Id: res_books_uncoupled.h,v 1.2 2002/07/11 10:27:53 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "codebook.h"
+static long _vq_quantlist__16u0__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u0__p1_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 8, 5, 8, 8, 8,10,10, 8,
+	10,11, 5, 8, 8, 8,10,10, 8,10,10, 4, 9, 9, 9,12,
+	11, 8,11,11, 8,12,11,10,12,14,10,13,13, 7,11,11,
+	10,14,12,11,14,14, 4, 9, 9, 8,11,11, 9,11,12, 7,
+	11,11,10,13,14,10,12,14, 8,11,12,10,14,14,10,13,
+	12,
+};
+
+static float _vq_quantthresh__16u0__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16u0__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p1_0 = {
+	_vq_quantthresh__16u0__p1_0,
+	_vq_quantmap__16u0__p1_0,
+	3,
+	3
+};
+
+static static_codebook _16u0__p1_0 = {
+	4, 81,
+	_vq_lengthlist__16u0__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16u0__p1_0,
+	NULL,
+	&_vq_auxt__16u0__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u0__p2_0[] = {
+	 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 9, 7,
+	 8, 9, 5, 7, 7, 7, 9, 8, 7, 9, 7, 4, 7, 7, 7, 9,
+	 9, 7, 8, 8, 6, 9, 8, 7, 8,11, 9,11,10, 6, 8, 9,
+	 8,11, 8, 9,10,11, 4, 7, 7, 7, 8, 8, 7, 9, 9, 6,
+	 9, 8, 9,11,10, 8, 8,11, 6, 8, 9, 9,10,11, 8,11,
+	 8,
+};
+
+static float _vq_quantthresh__16u0__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16u0__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p2_0 = {
+	_vq_quantthresh__16u0__p2_0,
+	_vq_quantmap__16u0__p2_0,
+	3,
+	3
+};
+
+static static_codebook _16u0__p2_0 = {
+	4, 81,
+	_vq_lengthlist__16u0__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16u0__p2_0,
+	NULL,
+	&_vq_auxt__16u0__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u0__p3_0[] = {
+	 1, 5, 5, 7, 7, 6, 7, 7, 8, 8, 6, 7, 8, 8, 8, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 9, 8,10,10, 8,10,
+	10,11,11, 8,10,10,11,11,10,11,10,13,12, 9,11,10,
+	13,13, 6, 8, 9,10,10, 8,10,10,11,11, 8,10,10,11,
+	11, 9,10,11,13,12,10,10,11,12,12, 8,11,11,14,13,
+	10,12,11,15,13, 9,12,11,15,14,12,14,13,16,14,12,
+	13,13,17,14, 8,11,11,13,14, 9,11,12,14,15,10,11,
+	12,13,15,11,13,13,14,16,12,13,14,14,16, 5, 9, 9,
+	11,11, 9,11,11,12,12, 8,11,11,12,12,11,12,12,15,
+	14,10,12,12,15,15, 8,11,11,13,12,10,12,12,13,13,
+	10,12,12,14,13,12,12,13,14,15,11,13,13,17,16, 7,
+	11,11,13,13,10,12,12,14,13,10,12,12,13,14,12,13,
+	12,15,14,11,13,13,15,14, 9,12,12,16,15,11,13,13,
+	17,16,10,13,13,16,16,13,14,15,15,16,13,15,14,19,
+	17, 9,12,12,14,16,11,13,13,15,16,10,13,13,17,16,
+	13,14,13,17,15,12,15,15,16,17, 5, 9, 9,11,11, 8,
+	11,11,13,12, 9,11,11,12,12,10,12,12,14,15,11,12,
+	12,14,14, 7,11,10,13,12,10,12,12,14,13,10,11,12,
+	13,13,11,13,13,15,16,12,12,13,15,15, 7,11,11,13,
+	13,10,13,13,14,14,10,12,12,13,13,11,13,13,16,15,
+	12,13,13,15,14, 9,12,12,15,15,10,13,13,17,16,11,
+	12,13,15,15,12,15,14,18,18,13,14,14,16,17, 9,12,
+	12,15,16,10,13,13,15,16,11,13,13,15,16,13,15,15,
+	17,17,13,15,14,16,15, 7,11,11,15,16,10,13,12,16,
+	17,10,12,13,15,17,15,16,16,18,17,13,15,15,17,18,
+	 8,12,12,16,16,11,13,14,17,18,11,13,13,18,16,15,
+	17,16,17,19,14,15,15,17,16, 8,12,12,16,15,11,14,
+	13,18,17,11,13,14,18,17,15,16,16,18,17,13,16,16,
+	18,18,11,15,14,18,17,13,14,15,18, 0,12,15,15, 0,
+	17,17,16,17,17,18,14,16,18,18, 0,11,14,14,17, 0,
+	12,15,14,17,19,12,15,14,18, 0,15,18,16, 0,17,14,
+	18,16,18, 0, 7,11,11,16,15,10,12,12,18,16,10,13,
+	13,16,15,13,15,14,17,17,14,16,16,19,18, 8,12,12,
+	16,16,11,13,13,18,16,11,13,14,17,16,14,15,15,19,
+	18,15,16,16, 0,19, 8,12,12,16,17,11,13,13,17,17,
+	11,14,13,17,17,13,15,15,17,19,15,17,17,19, 0,11,
+	14,15,19,17,12,15,16,18,18,12,14,15,19,17,14,16,
+	17, 0,18,16,16,19,17, 0,11,14,14,18,19,12,15,14,
+	17,17,13,16,14,17,16,14,17,16,18,18,15,18,15, 0,
+	18,
+};
+
+static float _vq_quantthresh__16u0__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u0__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p3_0 = {
+	_vq_quantthresh__16u0__p3_0,
+	_vq_quantmap__16u0__p3_0,
+	5,
+	5
+};
+
+static static_codebook _16u0__p3_0 = {
+	4, 625,
+	_vq_lengthlist__16u0__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u0__p3_0,
+	NULL,
+	&_vq_auxt__16u0__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u0__p4_0[] = {
+	 3, 5, 5, 8, 8, 6, 6, 6, 9, 9, 6, 6, 6, 9, 9, 9,
+	10, 9,11,11, 9, 9, 9,11,11, 6, 7, 7,10,10, 7, 7,
+	 8,10,10, 7, 7, 8,10,10,10,10,10,11,12, 9,10,10,
+	11,12, 6, 7, 7,10,10, 7, 8, 7,10,10, 7, 8, 7,10,
+	10,10,11,10,12,11,10,10,10,13,10, 9,10,10,12,12,
+	10,11,10,14,12, 9,11,11,13,13,11,12,13,13,13,11,
+	12,12,15,13, 9,10,10,12,13, 9,11,10,12,13,10,10,
+	11,12,13,11,12,12,12,13,11,12,12,13,13, 5, 7, 7,
+	10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,10,12,
+	13,10,10,11,12,12, 6, 8, 8,11,10, 7, 8, 9,10,12,
+	 8, 9, 9,11,11,11,10,11,11,12,10,11,11,13,12, 7,
+	 8, 8,10,11, 8, 9, 8,11,10, 8, 9, 9,11,11,10,12,
+	10,13,11,10,11,11,13,13,10,11,10,14,13,10,10,11,
+	13,13,10,12,11,14,13,12,11,13,12,13,13,12,13,14,
+	14,10,11,11,13,13,10,11,10,12,13,10,12,12,12,14,
+	12,12,12,14,12,12,13,12,17,15, 5, 7, 7,10,10, 7,
+	 8, 8,10,10, 7, 8, 8,11,10,10,10,11,12,12,10,11,
+	11,12,13, 6, 8, 8,11,10, 8, 9, 9,11,11, 7, 8, 9,
+	10,11,11,11,11,12,12,10,10,11,12,13, 6, 8, 8,10,
+	11, 8, 9, 9,11,11, 7, 9, 7,11,10,10,12,12,13,13,
+	11,11,10,13,11, 9,11,10,14,13,11,11,11,15,13,10,
+	10,11,13,13,12,13,13,14,14,12,11,12,12,13,10,11,
+	11,12,13,10,11,12,13,13,10,11,10,13,12,12,12,13,
+	14, 0,12,13,11,13,11, 8,10,10,13,13,10,11,11,14,
+	13,10,11,11,13,12,13,14,14,14,15,12,12,12,15,14,
+	 9,11,10,13,12,10,10,11,13,14,11,11,11,15,12,13,
+	12,14,15,16,13,13,13,14,13, 9,11,11,12,12,10,12,
+	11,13,13,10,11,11,13,14,13,13,13,15,15,13,13,14,
+	17,15,11,12,12,14,14,10,11,12,13,15,12,13,13, 0,
+	15,13,11,14,12,16,14,16,14, 0,15,11,12,12,14,16,
+	11,13,12,16,15,12,13,13,14,15,12,14,12,15,13,15,
+	14,14,16,16, 8,10,10,13,13,10,11,10,13,14,10,11,
+	11,13,13,13,13,12,14,14,14,13,13,16,17, 9,10,10,
+	12,14,10,12,11,14,13,10,11,12,13,14,12,12,12,15,
+	15,13,13,13,14,14, 9,10,10,13,13,10,11,12,12,14,
+	10,11,10,13,13,13,13,13,14,16,13,13,13,14,14,11,
+	12,13,15,13,12,14,13,14,16,12,12,13,13,14,13,14,
+	14,17,15,13,12,17,13,16,11,12,13,14,15,12,13,14,
+	14,17,11,12,11,14,14,13,16,14,16, 0,14,15,11,15,
+	11,
+};
+
+static float _vq_quantthresh__16u0__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u0__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p4_0 = {
+	_vq_quantthresh__16u0__p4_0,
+	_vq_quantmap__16u0__p4_0,
+	5,
+	5
+};
+
+static static_codebook _16u0__p4_0 = {
+	4, 625,
+	_vq_lengthlist__16u0__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u0__p4_0,
+	NULL,
+	&_vq_auxt__16u0__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16u0__p5_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8,
+	 9, 9, 4, 6, 6, 8, 8, 8, 8, 9, 9, 7, 8, 8, 9, 9,
+	 9, 9,11,10, 7, 8, 8, 9, 9, 9, 9,10,11, 7, 8, 8,
+	 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9,
+	 9, 9,10,10,11,11,12,12, 9, 9, 9,10,10,11,11,12,
+	12,
+};
+
+static float _vq_quantthresh__16u0__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16u0__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p5_0 = {
+	_vq_quantthresh__16u0__p5_0,
+	_vq_quantmap__16u0__p5_0,
+	9,
+	9
+};
+
+static static_codebook _16u0__p5_0 = {
+	2, 81,
+	_vq_lengthlist__16u0__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16u0__p5_0,
+	NULL,
+	&_vq_auxt__16u0__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16u0__p6_0[] = {
+	 1, 4, 4, 7, 7,10,10,12,12,13,13,18,17, 3, 6, 6,
+	 9, 9,11,11,13,13,14,14,18,17, 3, 6, 6, 9, 9,11,
+	11,13,13,14,14,17,18, 7, 9, 9,11,11,13,13,14,14,
+	15,15, 0, 0, 7, 9, 9,11,11,13,13,14,14,15,16,19,
+	18,10,11,11,13,13,14,14,16,15,17,18, 0, 0,10,11,
+	11,13,13,14,14,15,15,16,18, 0, 0,11,13,13,14,14,
+	15,15,17,17, 0,19, 0, 0,11,13,13,14,14,14,15,16,
+	18, 0,19, 0, 0,13,14,14,15,15,18,17,18,18, 0,19,
+	 0, 0,13,14,14,15,16,16,16,18,18,19, 0, 0, 0,16,
+	17,17, 0,17,19,19, 0,19, 0, 0, 0, 0,16,19,16,17,
+	18, 0,19, 0, 0, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__16u0__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__16u0__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p6_0 = {
+	_vq_quantthresh__16u0__p6_0,
+	_vq_quantmap__16u0__p6_0,
+	13,
+	13
+};
+
+static static_codebook _16u0__p6_0 = {
+	2, 169,
+	_vq_lengthlist__16u0__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__16u0__p6_0,
+	NULL,
+	&_vq_auxt__16u0__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u0__p6_1[] = {
+	 1, 4, 5, 6, 6, 4, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6,
+	 6, 6, 7, 7, 6, 6, 6, 7, 7,
+};
+
+static float _vq_quantthresh__16u0__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u0__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p6_1 = {
+	_vq_quantthresh__16u0__p6_1,
+	_vq_quantmap__16u0__p6_1,
+	5,
+	5
+};
+
+static static_codebook _16u0__p6_1 = {
+	2, 25,
+	_vq_lengthlist__16u0__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u0__p6_1,
+	NULL,
+	&_vq_auxt__16u0__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u0__p7_0[] = {
+	 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__16u0__p7_0[] = {
+	-157.5, 157.5, 
+};
+
+static long _vq_quantmap__16u0__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p7_0 = {
+	_vq_quantthresh__16u0__p7_0,
+	_vq_quantmap__16u0__p7_0,
+	3,
+	3
+};
+
+static static_codebook _16u0__p7_0 = {
+	4, 81,
+	_vq_lengthlist__16u0__p7_0,
+	1, -518803456, 1628680192, 2, 0,
+	_vq_quantlist__16u0__p7_0,
+	NULL,
+	&_vq_auxt__16u0__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p7_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16u0__p7_1[] = {
+	 1, 5, 5, 6, 5, 9,10,11,11,10,10,10,10,10,10, 5,
+	 8, 8, 8,10,10,10,10,10,10,10,10,10,10,10, 5, 8,
+	 9, 9, 9,10,10,10,10,10,10,10,10,10,10, 5,10, 8,
+	10,10,10,10,10,10,10,10,10,10,10,10, 4, 8, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10, 9,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10, 9,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__16u0__p7_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__16u0__p7_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p7_1 = {
+	_vq_quantthresh__16u0__p7_1,
+	_vq_quantmap__16u0__p7_1,
+	15,
+	15
+};
+
+static static_codebook _16u0__p7_1 = {
+	2, 225,
+	_vq_lengthlist__16u0__p7_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__16u0__p7_1,
+	NULL,
+	&_vq_auxt__16u0__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u0__p7_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__16u0__p7_2[] = {
+	 1, 6, 6, 7, 8, 7, 7,10, 9,10, 9,11,10, 9,11,10,
+	 9, 9, 9, 9,10, 6, 8, 7, 9, 9, 8, 8,10,10, 9,11,
+	11,12,12,10, 9,11, 9,12,10, 9, 6, 9, 8, 9,12, 8,
+	 8,11, 9,11,11,12,11,12,12,10,11,11,10,10,11, 7,
+	10, 9, 9, 9, 9, 9,10, 9,10, 9,10,10,12,10,10,10,
+	11,12,10,10, 7, 9, 9, 9,10, 9, 9,10,10, 9, 9, 9,
+	11,11,10,10,10,10, 9, 9,12, 7, 9,10, 9,11, 9,10,
+	 9,10,11,11,11,10,11,12, 9,12,11,10,10,10, 7, 9,
+	 9, 9, 9,10,12,10, 9,11,12,10,11,12,12,11, 9,10,
+	11,10,11, 7, 9,10,10,11,10, 9,10,11,11,11,10,12,
+	12,12,11,11,10,11,11,12, 8, 9,10,12,11,10,10,12,
+	12,12,12,12,10,11,11, 9,11,10,12,11,11, 8, 9,10,
+	10,11,12,11,11,10,10,10,12,12,12, 9,10,12,12,12,
+	12,12, 8,10,11,10,10,12, 9,11,12,12,11,12,12,12,
+	12,10,12,10,10,10,10, 8,12,11,11,11,10,10,11,12,
+	12,12,12,11,12,12,12,11,11,11,12,10, 9,10,10,12,
+	10,12,10,12,12,10,10,10,11,12,12,12,11,12,12,12,
+	11,10,11,12,12,12,11,12,12,11,12,12,11,12,12,12,
+	12,11,12,12,10,10,10,10,11,11,12,11,12,12,12,12,
+	12,12,12,11,12,11,10,11,11,12,11,11, 9,10,10,10,
+	12,10,10,11, 9,11,12,11,12,11,12,12,10,11,10,12,
+	 9, 9, 9,12,11,10,11,10,12,10,12,10,12,12,12,11,
+	11,11,11,11,10, 9,10,10,11,10,11,11,12,11,10,11,
+	12,12,12,11,11, 9,12,10,12, 9,10,12,10,10,11,10,
+	11,11,12,11,10,11,10,11,11,11,11,12,11,11,10, 9,
+	10,10,10, 9,11,11,10, 9,12,10,11,12,11,12,12,11,
+	12,11,12,11,10,11,10,12,11,12,11,12,11,12,10,11,
+	10,10,12,11,10,11,11,11,10,
+};
+
+static float _vq_quantthresh__16u0__p7_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__16u0__p7_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u0__p7_2 = {
+	_vq_quantthresh__16u0__p7_2,
+	_vq_quantmap__16u0__p7_2,
+	21,
+	21
+};
+
+static static_codebook _16u0__p7_2 = {
+	2, 441,
+	_vq_lengthlist__16u0__p7_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__16u0__p7_2,
+	NULL,
+	&_vq_auxt__16u0__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16u0__single[] = {
+	 3, 5, 8, 7,14, 8, 9,19, 5, 2, 5, 5, 9, 6, 9,19,
+	 8, 4, 5, 7, 8, 9,13,19, 7, 4, 6, 5, 9, 6, 9,19,
+	12, 8, 7, 9,10,11,13,19, 8, 5, 8, 6, 9, 6, 7,19,
+	 8, 8,10, 7, 7, 4, 5,19,12,17,19,15,18,13,11,18,
+};
+
+static static_codebook _huff_book__16u0__single = {
+	2, 64,
+	_huff_lengthlist__16u0__single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16u1__long[] = {
+	 3, 6,10, 8,12, 8,14, 8,14,19, 5, 3, 5, 5, 7, 6,
+	11, 7,16,19, 7, 5, 6, 7, 7, 9,11,12,19,19, 6, 4,
+	 7, 5, 7, 6,10, 7,18,18, 8, 6, 7, 7, 7, 7, 8, 9,
+	18,18, 7, 5, 8, 5, 7, 5, 8, 6,18,18,12, 9,10, 9,
+	 9, 9, 8, 9,18,18, 8, 7,10, 6, 8, 5, 6, 4,11,18,
+	11,15,16,12,11, 8, 8, 6, 9,18,14,18,18,18,16,16,
+	16,13,16,18,
+};
+
+static static_codebook _huff_book__16u1__long = {
+	2, 100,
+	_huff_lengthlist__16u1__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u1__p1_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 7, 7,10,10, 7,
+	 9,10, 5, 7, 8, 7,10, 9, 7,10,10, 5, 8, 8, 8,10,
+	10, 8,10,10, 7,10,10,10,11,12,10,12,13, 7,10,10,
+	 9,13,11,10,12,13, 5, 8, 8, 8,10,10, 8,10,10, 7,
+	10,10,10,12,12, 9,11,12, 7,10,11,10,12,12,10,13,
+	11,
+};
+
+static float _vq_quantthresh__16u1__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16u1__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p1_0 = {
+	_vq_quantthresh__16u1__p1_0,
+	_vq_quantmap__16u1__p1_0,
+	3,
+	3
+};
+
+static static_codebook _16u1__p1_0 = {
+	4, 81,
+	_vq_lengthlist__16u1__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16u1__p1_0,
+	NULL,
+	&_vq_auxt__16u1__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u1__p2_0[] = {
+	 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 7, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 7, 5, 6, 6, 6, 8,
+	 8, 6, 8, 8, 6, 8, 8, 7, 7,10, 8, 9, 9, 6, 8, 8,
+	 7, 9, 8, 8, 9,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6,
+	 8, 8, 8,10, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 7,10,
+	 8,
+};
+
+static float _vq_quantthresh__16u1__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16u1__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p2_0 = {
+	_vq_quantthresh__16u1__p2_0,
+	_vq_quantmap__16u1__p2_0,
+	3,
+	3
+};
+
+static static_codebook _16u1__p2_0 = {
+	4, 81,
+	_vq_lengthlist__16u1__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16u1__p2_0,
+	NULL,
+	&_vq_auxt__16u1__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u1__p3_0[] = {
+	 1, 5, 5, 8, 8, 6, 7, 7, 9, 9, 5, 7, 7, 9, 9, 9,
+	10, 9,11,11, 9, 9,10,11,11, 6, 8, 8,10,10, 8, 9,
+	10,11,11, 8, 9,10,11,11,10,11,11,12,13,10,11,11,
+	13,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10, 9,11,
+	11,10,11,11,13,13,10,11,11,13,12, 9,11,11,14,13,
+	10,12,12,15,14,10,12,11,14,13,12,13,13,15,15,12,
+	13,13,16,14, 9,11,11,13,14,10,11,12,14,14,10,12,
+	12,14,15,12,13,13,14,15,12,13,14,15,16, 5, 8, 8,
+	11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,14,
+	14,11,12,12,14,14, 8,10,10,12,12, 9,11,12,12,13,
+	10,12,12,13,13,12,12,13,14,15,11,13,13,15,15, 7,
+	10,10,12,12, 9,12,11,13,12,10,11,12,13,13,12,13,
+	12,15,14,11,12,13,15,15,10,12,12,15,14,11,13,13,
+	16,15,11,13,13,16,15,14,13,14,15,16,13,15,15,17,
+	17,10,12,12,14,15,11,12,12,15,15,11,13,13,15,16,
+	13,15,13,16,15,13,15,15,16,17, 5, 8, 8,11,11, 8,
+	10,10,12,12, 8,10,10,12,12,11,12,12,14,14,11,12,
+	12,14,14, 7,10,10,12,12,10,12,12,14,13, 9,11,12,
+	12,13,12,13,13,15,15,12,12,13,13,15, 7,10,10,12,
+	13,10,11,12,13,13,10,12,11,13,13,11,13,13,15,15,
+	12,13,12,15,14, 9,12,12,15,14,11,13,13,15,15,11,
+	12,13,15,15,13,14,14,17,19,13,13,14,16,16,10,12,
+	12,14,15,11,13,13,15,16,11,13,12,16,15,13,15,15,
+	17,18,14,15,13,16,15, 8,11,11,15,14,10,12,12,16,
+	15,10,12,12,16,16,14,15,15,18,17,13,14,15,16,18,
+	 9,12,12,15,15,11,12,14,16,17,11,13,13,16,15,15,
+	15,15,17,18,14,15,16,17,17, 9,12,12,15,15,11,14,
+	13,16,16,11,13,13,16,16,15,16,15,17,18,14,16,15,
+	17,16,12,14,14,17,16,12,14,15,18,17,13,15,15,17,
+	17,15,15,18,16,20,15,16,17,18,18,11,14,14,16,17,
+	13,15,14,18,17,13,15,15,17,17,15,17,15,18,17,15,
+	17,16,19,18, 8,11,11,14,15,10,12,12,15,15,10,12,
+	12,16,16,13,14,14,17,16,14,15,15,17,17, 9,12,12,
+	15,16,11,13,13,16,16,11,12,13,16,16,14,16,15,20,
+	17,14,16,16,17,17, 9,12,12,15,16,11,13,13,16,17,
+	11,13,13,17,16,14,15,15,17,18,15,15,15,18,18,11,
+	14,14,17,16,13,15,15,17,17,13,14,14,18,17,15,16,
+	16,18,19,15,15,17,17,19,11,14,14,16,17,13,15,14,
+	17,19,13,15,14,18,17,15,17,16,18,18,15,17,15,18,
+	16,
+};
+
+static float _vq_quantthresh__16u1__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u1__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p3_0 = {
+	_vq_quantthresh__16u1__p3_0,
+	_vq_quantmap__16u1__p3_0,
+	5,
+	5
+};
+
+static static_codebook _16u1__p3_0 = {
+	4, 625,
+	_vq_lengthlist__16u1__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u1__p3_0,
+	NULL,
+	&_vq_auxt__16u1__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u1__p4_0[] = {
+	 4, 5, 5, 8, 8, 6, 6, 7, 9, 9, 6, 6, 6, 9, 9, 9,
+	10, 9,11,11, 9, 9,10,11,11, 6, 7, 7,10, 9, 7, 7,
+	 8, 9,10, 7, 7, 8,10,10,10,10,10,10,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 7, 8, 7,10,10, 7, 8, 7,10,
+	10, 9,10, 9,12,11,10,10, 9,12,10, 9,10,10,12,11,
+	10,10,10,12,12, 9,10,10,12,12,12,11,12,13,13,11,
+	11,12,12,13, 9,10,10,11,12, 9,10,10,12,12,10,10,
+	10,12,12,11,12,11,14,13,11,12,12,14,13, 5, 7, 7,
+	10,10, 7, 8, 8,10,10, 7, 8, 7,10,10,10,10,10,12,
+	12,10,10,10,12,12, 6, 8, 7,10,10, 7, 7, 9,10,11,
+	 8, 9, 9,11,10,10,10,11,11,13,10,10,11,12,13, 6,
+	 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,10,11,10,11,
+	10,13,11,10,11,10,12,12,10,11,10,12,11,10,10,10,
+	12,13,10,11,11,13,12,11,11,13,11,14,12,12,13,14,
+	14, 9,10,10,12,13,10,11,10,13,12,10,11,11,12,13,
+	11,12,11,14,12,12,13,13,15,14, 5, 7, 7,10,10, 7,
+	 7, 8,10,10, 7, 8, 8,10,10,10,10,10,11,12,10,10,
+	10,12,12, 7, 8, 8,10,10, 8, 9, 8,11,10, 7, 8, 9,
+	10,11,10,11,11,12,12,10,10,11,11,13, 7, 7, 8,10,
+	10, 8, 8, 9,10,11, 7, 9, 7,11,10,10,11,11,13,12,
+	11,11,10,13,11, 9,10,10,12,12,10,11,11,13,12,10,
+	10,11,12,12,12,13,13,14,14,11,11,12,12,14,10,10,
+	11,12,12,10,11,11,12,13,10,10,10,13,12,12,13,13,
+	15,14,12,13,10,14,11, 8,10,10,12,12,10,11,10,13,
+	13, 9,10,10,12,12,12,13,13,15,14,11,12,12,13,13,
+	 9,10,10,13,12,10,10,11,13,13,10,11,10,13,12,12,
+	12,13,14,15,12,13,12,15,13, 9,10,10,12,13,10,11,
+	10,13,12,10,10,11,12,13,12,14,12,15,13,12,12,13,
+	14,15,11,12,11,14,13,11,11,12,14,15,12,13,12,15,
+	14,13,11,15,11,16,13,14,14,16,15,11,12,12,14,14,
+	11,12,11,14,13,12,12,13,14,15,13,14,12,16,12,14,
+	14,14,15,15, 8,10,10,12,12, 9,10,10,12,12,10,10,
+	11,13,13,11,12,12,13,13,12,13,13,14,15, 9,10,10,
+	13,12,10,11,11,13,12,10,10,11,13,13,12,13,12,15,
+	14,12,12,13,13,16, 9, 9,10,12,13,10,10,11,12,13,
+	10,11,10,13,13,12,12,13,13,15,13,13,12,15,13,11,
+	12,12,14,14,12,13,12,15,14,11,11,12,13,14,14,14,
+	14,16,15,13,12,15,12,16,11,11,12,13,14,12,13,13,
+	14,15,10,12,11,14,13,14,15,14,16,16,13,14,11,15,
+	11,
+};
+
+static float _vq_quantthresh__16u1__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u1__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p4_0 = {
+	_vq_quantthresh__16u1__p4_0,
+	_vq_quantmap__16u1__p4_0,
+	5,
+	5
+};
+
+static static_codebook _16u1__p4_0 = {
+	4, 625,
+	_vq_lengthlist__16u1__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u1__p4_0,
+	NULL,
+	&_vq_auxt__16u1__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16u1__p5_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8,
+	10,10, 4, 5, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9,
+	 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 7, 8, 8,
+	10, 9,11,11,12,11, 7, 8, 8, 9, 9,11,11,12,12, 9,
+	10,10,11,11,12,12,13,12, 9,10,10,11,11,12,12,12,
+	13,
+};
+
+static float _vq_quantthresh__16u1__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16u1__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p5_0 = {
+	_vq_quantthresh__16u1__p5_0,
+	_vq_quantmap__16u1__p5_0,
+	9,
+	9
+};
+
+static static_codebook _16u1__p5_0 = {
+	2, 81,
+	_vq_lengthlist__16u1__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16u1__p5_0,
+	NULL,
+	&_vq_auxt__16u1__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p6_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16u1__p6_0[] = {
+	 3, 4, 4, 6, 6, 7, 7, 9, 9, 4, 4, 4, 6, 6, 8, 8,
+	 9, 9, 4, 4, 4, 6, 6, 7, 7, 9, 9, 6, 6, 6, 7, 7,
+	 8, 8,10, 9, 6, 6, 6, 7, 7, 8, 8, 9,10, 7, 8, 7,
+	 8, 8, 9, 9,10,10, 7, 8, 8, 8, 8, 9, 9,10,10, 9,
+	 9, 9,10,10,10,10,11,11, 9, 9, 9,10,10,10,10,11,
+	11,
+};
+
+static float _vq_quantthresh__16u1__p6_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16u1__p6_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p6_0 = {
+	_vq_quantthresh__16u1__p6_0,
+	_vq_quantmap__16u1__p6_0,
+	9,
+	9
+};
+
+static static_codebook _16u1__p6_0 = {
+	2, 81,
+	_vq_lengthlist__16u1__p6_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16u1__p6_0,
+	NULL,
+	&_vq_auxt__16u1__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u1__p7_0[] = {
+	 1, 4, 4, 4, 8, 8, 4, 8, 8, 5,11, 9, 8,12,11, 8,
+	12,11, 5,10,11, 8,11,12, 8,11,12, 4,11,11,11,14,
+	13,10,13,13, 8,14,13,12,14,16,12,16,15, 8,14,14,
+	13,16,14,12,15,16, 4,11,11,10,14,13,11,14,14, 8,
+	15,14,12,15,15,12,14,16, 8,14,14,11,16,15,12,15,
+	13,
+};
+
+static float _vq_quantthresh__16u1__p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__16u1__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p7_0 = {
+	_vq_quantthresh__16u1__p7_0,
+	_vq_quantmap__16u1__p7_0,
+	3,
+	3
+};
+
+static static_codebook _16u1__p7_0 = {
+	4, 81,
+	_vq_lengthlist__16u1__p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__16u1__p7_0,
+	NULL,
+	&_vq_auxt__16u1__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16u1__p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 6, 5, 7, 7,
+	 8, 8, 8, 8, 8, 8, 4, 5, 6, 7, 7, 8, 8, 8, 8, 8,
+	 8, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 7, 8, 8, 8, 8, 9, 9, 9,10,
+	 9,10, 7, 8, 8, 8, 8, 9, 9, 9, 9,10, 9, 8, 8, 8,
+	 9, 9,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9,10,
+	10,10,10, 8, 8, 8, 9, 9, 9,10,10,10,10,10, 8, 8,
+	 8, 9, 9,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__16u1__p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16u1__p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p7_1 = {
+	_vq_quantthresh__16u1__p7_1,
+	_vq_quantmap__16u1__p7_1,
+	11,
+	11
+};
+
+static static_codebook _16u1__p7_1 = {
+	2, 121,
+	_vq_lengthlist__16u1__p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16u1__p7_1,
+	NULL,
+	&_vq_auxt__16u1__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p8_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16u1__p8_0[] = {
+	 1, 4, 4, 5, 5, 8, 8,10,10,12,12, 4, 7, 7, 8, 8,
+	 9, 9,12,11,14,13, 4, 7, 7, 7, 8, 9,10,11,11,13,
+	12, 5, 8, 8, 9, 9,11,11,12,13,15,14, 5, 7, 8, 9,
+	 9,11,11,13,13,17,15, 8, 9,10,11,11,12,13,17,14,
+	17,16, 8,10, 9,11,11,12,12,13,15,15,17,10,11,11,
+	12,13,14,15,15,16,16,17, 9,11,11,12,12,14,15,17,
+	15,15,16,11,14,12,14,15,16,15,16,16,16,15,11,13,
+	13,14,14,15,15,16,16,15,16,
+};
+
+static float _vq_quantthresh__16u1__p8_0[] = {
+	-49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 27.5, 
+	38.5, 49.5, 
+};
+
+static long _vq_quantmap__16u1__p8_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p8_0 = {
+	_vq_quantthresh__16u1__p8_0,
+	_vq_quantmap__16u1__p8_0,
+	11,
+	11
+};
+
+static static_codebook _16u1__p8_0 = {
+	2, 121,
+	_vq_lengthlist__16u1__p8_0,
+	1, -524582912, 1618345984, 4, 0,
+	_vq_quantlist__16u1__p8_0,
+	NULL,
+	&_vq_auxt__16u1__p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p8_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16u1__p8_1[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 4, 6, 6, 7, 7,
+	 8, 7, 8, 8, 8, 8, 4, 6, 6, 7, 7, 7, 7, 8, 8, 8,
+	 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 6, 7, 7, 7,
+	 7, 8, 8, 8, 8, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8,
+	 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 8, 8,
+	 8, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__16u1__p8_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16u1__p8_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p8_1 = {
+	_vq_quantthresh__16u1__p8_1,
+	_vq_quantmap__16u1__p8_1,
+	11,
+	11
+};
+
+static static_codebook _16u1__p8_1 = {
+	2, 121,
+	_vq_lengthlist__16u1__p8_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16u1__p8_1,
+	NULL,
+	&_vq_auxt__16u1__p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p9_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16u1__p9_0[] = {
+	 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8,
+};
+
+static float _vq_quantthresh__16u1__p9_0[] = {
+	-1657.5, -1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 
+	382.5, 637.5, 892.5, 1147.5, 1402.5, 1657.5, 
+};
+
+static long _vq_quantmap__16u1__p9_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p9_0 = {
+	_vq_quantthresh__16u1__p9_0,
+	_vq_quantmap__16u1__p9_0,
+	15,
+	15
+};
+
+static static_codebook _16u1__p9_0 = {
+	2, 225,
+	_vq_lengthlist__16u1__p9_0,
+	1, -514071552, 1627381760, 4, 0,
+	_vq_quantlist__16u1__p9_0,
+	NULL,
+	&_vq_auxt__16u1__p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16u1__p9_1[] = {
+	 1, 6, 5, 9, 9,10,10, 6, 7, 9, 9,10,10,10,10, 5,
+	10, 8,10, 8,10,10, 8, 8,10, 9,10,10,10,10, 5, 8,
+	 9,10,10,10,10, 8,10,10,10,10,10,10,10, 9,10,10,
+	10,10,10,10, 9, 9,10,10,10,10,10,10, 9, 9, 8, 9,
+	10,10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10, 8,10,10,10,10,
+	10,10,10,10,10,10,10,10,10, 6, 8, 8,10,10,10, 8,
+	10,10,10,10,10,10,10,10, 5, 8, 8,10,10,10, 9, 9,
+	10,10,10,10,10,10,10,10, 9,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__16u1__p9_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__16u1__p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p9_1 = {
+	_vq_quantthresh__16u1__p9_1,
+	_vq_quantmap__16u1__p9_1,
+	15,
+	15
+};
+
+static static_codebook _16u1__p9_1 = {
+	2, 225,
+	_vq_lengthlist__16u1__p9_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__16u1__p9_1,
+	NULL,
+	&_vq_auxt__16u1__p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u1__p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16u1__p9_2[] = {
+	 1, 6, 6, 7, 8, 8,11,10, 9, 9,11, 9,10, 9,11,11,
+	 9, 6, 7, 6,11, 8,11, 9,10,10,11, 9,11,10,10,10,
+	11, 9, 5, 7, 7, 8, 8,10,11, 8, 8,11, 9, 9,10,11,
+	 9,10,11, 8, 9, 6, 8, 8, 9, 9,10,10,11,11,11, 9,
+	11,10, 9,11, 8, 8, 8, 9, 8, 9,10,11, 9, 9,11,11,
+	10, 9, 9,11,10, 8,11, 8, 9, 8,11, 9,10, 9,10,11,
+	11,10,10, 9,10,10, 8, 8, 9,10,10,10, 9,11, 9,10,
+	11,11,11,11,10, 9,11, 9, 9,11,11,10, 8,11,11,11,
+	 9,10,10,11,10,11,11, 9,11,10, 9,11,10,10,10,10,
+	 9,11,10,11,10, 9, 9,10,11, 9, 8,10,11,11,10,10,
+	11, 9,11,10,11,11,10,11, 9, 9, 8,10, 8, 9,11, 9,
+	 8,10,10, 9,11,10,11,10,11, 9,11, 8,10,11,11,11,
+	11,10,10,11,11,11,11,10,11,11,10, 9, 8,10,10, 9,
+	11,10,11,11,11, 9, 9, 9,11,11,11,10,10, 9, 9,10,
+	 9,11,11,11,11, 8,10,11,10,11,11,10,11,11, 9, 9,
+	 9,10, 9,11, 9,11,11,11,11,11,10,11,11,10,11,10,
+	11,11, 9,11,10,11,10, 9,10, 9,10,10,11,11,11,11,
+	 9,10, 9,10,11,11,10,11,11,11,11,11,11,10,11,11,
+	10,
+};
+
+static float _vq_quantthresh__16u1__p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__16u1__p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u1__p9_2 = {
+	_vq_quantthresh__16u1__p9_2,
+	_vq_quantmap__16u1__p9_2,
+	17,
+	17
+};
+
+static static_codebook _16u1__p9_2 = {
+	2, 289,
+	_vq_lengthlist__16u1__p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__16u1__p9_2,
+	NULL,
+	&_vq_auxt__16u1__p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16u1__short[] = {
+	 5, 7,10, 9,11,10,15,11,13,16, 6, 4, 6, 6, 7, 7,
+	10, 9,12,16,10, 6, 5, 6, 6, 7,10,11,16,16, 9, 6,
+	 7, 6, 7, 7,10, 8,14,16,11, 6, 5, 4, 5, 6, 8, 9,
+	15,16, 9, 6, 6, 5, 6, 6, 9, 8,14,16,12, 7, 6, 6,
+	 5, 6, 6, 7,13,16, 8, 6, 7, 6, 5, 5, 4, 4,11,16,
+	 9, 8, 9, 9, 7, 7, 6, 5,13,16,14,14,16,15,16,15,
+	16,16,16,16,
+};
+
+static static_codebook _huff_book__16u1__short = {
+	2, 100,
+	_huff_lengthlist__16u1__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16u2__long[] = {
+	 5, 7,10,10,10,11,11,13,18,19, 6, 5, 5, 6, 7, 8,
+	 9,12,19,19, 8, 5, 4, 4, 6, 7, 9,13,19,19, 8, 5,
+	 4, 4, 5, 6, 8,12,17,19, 7, 5, 5, 4, 4, 5, 7,12,
+	18,18, 8, 7, 7, 6, 5, 5, 6,10,18,18, 9, 9, 9, 8,
+	 6, 5, 6, 9,18,18,11,13,13,13, 8, 7, 7, 9,16,18,
+	13,17,18,16,11, 9, 9, 9,17,18,15,18,18,18,15,13,
+	13,14,18,18,
+};
+
+static static_codebook _huff_book__16u2__long = {
+	2, 100,
+	_huff_lengthlist__16u2__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__16u2__short[] = {
+	 8,11,12,12,14,15,16,16,16,16, 9, 7, 7, 8, 9,11,
+	13,14,16,16,13, 7, 6, 6, 7, 9,12,13,15,16,15, 7,
+	 6, 5, 4, 6,10,11,14,16,12, 8, 7, 4, 2, 4, 7,10,
+	14,16,11, 9, 7, 5, 3, 4, 6, 9,14,16,11,10, 9, 7,
+	 5, 5, 6, 9,16,16,10,10, 9, 8, 6, 6, 7,10,16,16,
+	11,11,11,10,10,10,11,14,16,16,16,14,14,13,14,16,
+	16,16,16,16,
+};
+
+static static_codebook _huff_book__16u2__short = {
+	2, 100,
+	_huff_lengthlist__16u2__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u2_p1_0[] = {
+	 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 9, 9, 7,
+	 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 9, 5, 7, 7, 8, 9,
+	 9, 7, 9, 9, 7, 9, 9, 9,10,10, 9,10,10, 7, 9, 9,
+	 9,10,10, 9,10,11, 5, 7, 8, 8, 9, 9, 8, 9, 9, 7,
+	 9, 9, 9,10,10, 9, 9,10, 7, 9, 9, 9,10,10, 9,11,
+	10,
+};
+
+static float _vq_quantthresh__16u2_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__16u2_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p1_0 = {
+	_vq_quantthresh__16u2_p1_0,
+	_vq_quantmap__16u2_p1_0,
+	3,
+	3
+};
+
+static static_codebook _16u2_p1_0 = {
+	4, 81,
+	_vq_lengthlist__16u2_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__16u2_p1_0,
+	NULL,
+	&_vq_auxt__16u2_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u2_p2_0[] = {
+	 3, 5, 5, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 9,
+	10, 9,11,11, 9, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 7, 8, 8,10,10,10,10,10,12,12, 9,10,10,
+	11,12, 5, 7, 7, 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,
+	10, 9,10,10,12,11,10,10,10,12,12, 9,10,10,12,12,
+	10,11,10,13,12, 9,10,10,12,12,12,12,12,14,14,11,
+	12,12,13,14, 9,10,10,12,12, 9,10,10,12,12,10,10,
+	10,12,12,11,12,12,14,13,12,13,12,14,14, 5, 7, 7,
+	 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,10,12,
+	12,10,10,11,12,12, 7, 8, 8,10,10, 8, 9, 9,11,11,
+	 8, 9, 9,11,11,11,11,11,12,13,10,11,11,12,13, 7,
+	 8, 8,10,10, 8, 9, 8,11,10, 8, 9, 9,11,11,10,11,
+	10,13,12,10,11,11,13,13, 9,11,10,13,13,10,11,11,
+	13,13,10,11,11,13,13,12,12,13,13,15,12,12,13,14,
+	15, 9,10,10,12,12,10,11,10,13,12,10,11,11,13,13,
+	11,13,11,14,13,12,13,13,15,15, 5, 7, 7, 9, 9, 7,
+	 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12,12,10,10,
+	11,12,12, 7, 8, 8,10,10, 8, 9, 9,11,11, 8, 8, 9,
+	10,11,10,11,11,13,13,10,10,11,12,13, 7, 8, 8,10,
+	11, 8, 9, 9,11,11, 8, 9, 9,11,11,10,11,11,13,12,
+	11,11,11,13,12, 9,10,10,12,12,10,11,11,13,13,10,
+	10,11,12,13,12,13,13,15,14,11,11,13,12,14,10,10,
+	11,13,13,10,11,11,13,13,10,11,11,13,13,12,13,13,
+	14,14,12,13,12,14,13, 8,10, 9,12,12, 9,11,10,13,
+	13, 9,10,10,12,13,12,13,13,14,14,12,12,13,14,14,
+	 9,11,10,13,13,10,11,11,13,13,10,11,11,13,13,12,
+	13,13,15,15,13,13,13,14,15, 9,10,10,12,13,10,11,
+	10,13,12,10,11,11,13,13,12,13,12,15,14,13,13,13,
+	14,15,11,12,12,15,14,12,12,13,15,15,12,13,13,15,
+	14,14,13,15,14,16,13,14,15,16,16,11,12,12,14,14,
+	11,12,12,15,14,12,13,13,15,15,13,14,13,16,14,14,
+	14,14,16,16, 8, 9, 9,12,12, 9,10,10,13,12, 9,10,
+	10,13,13,12,12,12,14,14,12,12,13,15,15, 9,10,10,
+	13,12,10,11,11,13,13,10,10,11,13,14,12,13,13,15,
+	15,12,12,13,14,15, 9,10,10,13,13,10,11,11,13,13,
+	10,11,11,13,13,12,13,13,14,14,13,14,13,15,14,11,
+	12,12,14,14,12,13,13,15,14,11,12,12,14,15,14,14,
+	14,16,15,13,12,14,14,16,11,12,13,14,15,12,13,13,
+	14,16,12,13,12,15,14,13,15,14,16,16,14,15,13,16,
+	13,
+};
+
+static float _vq_quantthresh__16u2_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u2_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p2_0 = {
+	_vq_quantthresh__16u2_p2_0,
+	_vq_quantmap__16u2_p2_0,
+	5,
+	5
+};
+
+static static_codebook _16u2_p2_0 = {
+	4, 625,
+	_vq_lengthlist__16u2_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u2_p2_0,
+	NULL,
+	&_vq_auxt__16u2_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__16u2_p3_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 9, 9, 4, 5, 5, 6, 6, 8, 7,
+	 9, 9, 4, 5, 5, 6, 6, 7, 8, 9, 9, 6, 6, 6, 7, 7,
+	 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8, 9,10, 7, 8, 7,
+	 8, 8, 9, 9,10,10, 7, 8, 8, 8, 8, 9, 9,10,10, 9,
+	 9, 9,10, 9,10,10,11,11, 9, 9, 9,10,10,10,10,11,
+	11,
+};
+
+static float _vq_quantthresh__16u2_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__16u2_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p3_0 = {
+	_vq_quantthresh__16u2_p3_0,
+	_vq_quantmap__16u2_p3_0,
+	9,
+	9
+};
+
+static static_codebook _16u2_p3_0 = {
+	2, 81,
+	_vq_lengthlist__16u2_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__16u2_p3_0,
+	NULL,
+	&_vq_auxt__16u2_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__16u2_p4_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,11,
+	11, 5, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11,
+	12,11, 5, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,
+	11,12,12, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,12,12, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10,
+	11,11,12,12,12,12, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,
+	10,11,11,11,12,12,12, 9, 9, 9, 9, 9, 9,10,10,10,
+	10,10,11,11,12,12,13,13, 8, 9, 9, 9, 9,10, 9,10,
+	10,10,10,11,11,12,12,13,13, 9, 9, 9, 9, 9,10,10,
+	10,10,11,11,11,12,12,12,13,13, 9, 9, 9, 9, 9,10,
+	10,10,10,11,11,12,11,12,12,13,13,10,10,10,10,10,
+	11,11,11,11,11,12,12,12,12,13,13,14,10,10,10,10,
+	10,11,11,11,11,12,11,12,12,13,12,13,13,11,11,11,
+	11,11,12,12,12,12,12,12,13,13,13,13,14,14,11,11,
+	11,11,11,12,12,12,12,12,12,13,12,13,13,14,14,11,
+	12,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14,
+	11,12,12,12,12,12,12,13,13,13,13,14,13,14,14,14,
+	14,
+};
+
+static float _vq_quantthresh__16u2_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__16u2_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p4_0 = {
+	_vq_quantthresh__16u2_p4_0,
+	_vq_quantmap__16u2_p4_0,
+	17,
+	17
+};
+
+static static_codebook _16u2_p4_0 = {
+	2, 289,
+	_vq_lengthlist__16u2_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__16u2_p4_0,
+	NULL,
+	&_vq_auxt__16u2_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__16u2_p5_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 7,10, 9, 7,
+	10, 9, 5, 8, 9, 7, 9,10, 7, 9,10, 4, 9, 9, 9,11,
+	11, 8,11,11, 7,11,11,10,10,13,10,14,13, 7,11,11,
+	10,13,11,10,13,14, 5, 9, 9, 8,11,11, 9,11,11, 7,
+	11,11,10,14,13,10,12,14, 7,11,11,10,13,13,10,13,
+	10,
+};
+
+static float _vq_quantthresh__16u2_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__16u2_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p5_0 = {
+	_vq_quantthresh__16u2_p5_0,
+	_vq_quantmap__16u2_p5_0,
+	3,
+	3
+};
+
+static static_codebook _16u2_p5_0 = {
+	4, 81,
+	_vq_lengthlist__16u2_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__16u2_p5_0,
+	NULL,
+	&_vq_auxt__16u2_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16u2_p5_1[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 5, 5, 5, 7, 7,
+	 7, 7, 8, 8, 8, 8, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8,
+	 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7,
+	 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8,
+	 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__16u2_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16u2_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p5_1 = {
+	_vq_quantthresh__16u2_p5_1,
+	_vq_quantmap__16u2_p5_1,
+	11,
+	11
+};
+
+static static_codebook _16u2_p5_1 = {
+	2, 121,
+	_vq_lengthlist__16u2_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16u2_p5_1,
+	NULL,
+	&_vq_auxt__16u2_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16u2_p6_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10,10, 4, 6, 6,
+	 8, 8, 9, 9, 9, 9,10,10,12,11, 4, 6, 6, 8, 8, 9,
+	 9, 9, 9,10,10,11,12, 7, 8, 8, 9, 9,10,10,10,10,
+	12,12,13,12, 7, 8, 8, 9, 9,10,10,10,10,11,12,12,
+	12, 8, 9, 9,10,10,11,11,11,11,12,12,13,13, 8, 9,
+	 9,10,10,11,11,11,11,12,13,13,13, 8, 9, 9,10,10,
+	11,11,12,12,13,13,14,14, 8, 9, 9,10,10,11,11,12,
+	12,13,13,14,14, 9,10,10,11,12,13,12,13,14,14,14,
+	14,14, 9,10,10,11,12,12,13,13,13,14,14,14,14,10,
+	11,11,12,12,13,13,14,14,15,15,15,15,10,11,11,12,
+	12,13,13,14,14,14,14,15,15,
+};
+
+static float _vq_quantthresh__16u2_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__16u2_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p6_0 = {
+	_vq_quantthresh__16u2_p6_0,
+	_vq_quantmap__16u2_p6_0,
+	13,
+	13
+};
+
+static static_codebook _16u2_p6_0 = {
+	2, 169,
+	_vq_lengthlist__16u2_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__16u2_p6_0,
+	NULL,
+	&_vq_auxt__16u2_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__16u2_p6_1[] = {
+	 2, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+	 5, 5, 6, 6, 5, 5, 5, 6, 6,
+};
+
+static float _vq_quantthresh__16u2_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__16u2_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p6_1 = {
+	_vq_quantthresh__16u2_p6_1,
+	_vq_quantmap__16u2_p6_1,
+	5,
+	5
+};
+
+static static_codebook _16u2_p6_1 = {
+	2, 25,
+	_vq_lengthlist__16u2_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__16u2_p6_1,
+	NULL,
+	&_vq_auxt__16u2_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__16u2_p7_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 8, 8, 9, 9,10,10, 4, 6, 6,
+	 9, 9, 9, 9, 9, 9,10,10,11,11, 4, 6, 6, 8, 9, 9,
+	 9, 9, 9,10,11,12,11, 7, 8, 9,10,10,10,10,11,10,
+	11,12,12,13, 7, 9, 9,10,10,10,10,10,10,11,12,13,
+	13, 7, 9, 8,10,10,11,11,11,12,12,13,13,14, 7, 9,
+	 9,10,10,11,11,11,12,13,13,13,13, 8, 9, 9,10,11,
+	11,12,12,12,13,13,13,13, 8, 9, 9,10,11,11,11,12,
+	12,13,13,14,14, 9,10,10,12,11,12,13,13,13,14,13,
+	13,13, 9,10,10,11,11,12,12,13,14,13,13,14,13,10,
+	11,11,12,13,14,14,14,15,14,14,14,14,10,11,11,12,
+	12,13,13,13,14,14,14,15,14,
+};
+
+static float _vq_quantthresh__16u2_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__16u2_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p7_0 = {
+	_vq_quantthresh__16u2_p7_0,
+	_vq_quantmap__16u2_p7_0,
+	13,
+	13
+};
+
+static static_codebook _16u2_p7_0 = {
+	2, 169,
+	_vq_lengthlist__16u2_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__16u2_p7_0,
+	NULL,
+	&_vq_auxt__16u2_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__16u2_p7_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7,
+	 7, 7, 7, 7, 8, 8, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
+	 8, 6, 6, 7, 7, 7, 8, 7, 8, 8, 8, 8, 6, 7, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7,
+	 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8,
+	 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__16u2_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__16u2_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p7_1 = {
+	_vq_quantthresh__16u2_p7_1,
+	_vq_quantmap__16u2_p7_1,
+	11,
+	11
+};
+
+static static_codebook _16u2_p7_1 = {
+	2, 121,
+	_vq_lengthlist__16u2_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__16u2_p7_1,
+	NULL,
+	&_vq_auxt__16u2_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__16u2_p8_0[] = {
+	 1, 5, 5, 7, 7, 8, 8, 7, 7, 8, 8,10, 9,11,11, 4,
+	 6, 6, 8, 8,10, 9, 9, 8, 9, 9,10,10,12,14, 4, 6,
+	 7, 8, 9, 9,10, 9, 8, 9, 9,10,12,12,11, 7, 8, 8,
+	10,10,10,10, 9, 9,10,10,11,13,13,12, 7, 8, 8, 9,
+	11,11,10, 9, 9,11,10,12,11,11,14, 8, 9, 9,11,10,
+	11,11,10,10,11,11,13,12,14,12, 8, 9, 9,11,12,11,
+	11,10,10,12,11,12,12,12,14, 7, 8, 8, 9, 9,10,10,
+	10,11,12,11,13,13,14,12, 7, 8, 9, 9, 9,10,10,11,
+	11,11,12,12,14,14,14, 8,10, 9,10,11,11,11,11,14,
+	12,12,13,14,14,13, 9, 9, 9,10,11,11,11,12,12,12,
+	14,12,14,13,14,10,10,10,12,11,12,11,14,13,14,13,
+	14,14,13,14, 9,10,10,11,12,11,13,12,13,13,14,14,
+	14,13,14,10,13,13,12,12,11,12,14,13,14,13,14,12,
+	14,13,10,11,11,12,11,12,12,14,14,14,13,14,14,14,
+	14,
+};
+
+static float _vq_quantthresh__16u2_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__16u2_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p8_0 = {
+	_vq_quantthresh__16u2_p8_0,
+	_vq_quantmap__16u2_p8_0,
+	15,
+	15
+};
+
+static static_codebook _16u2_p8_0 = {
+	2, 225,
+	_vq_lengthlist__16u2_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__16u2_p8_0,
+	NULL,
+	&_vq_auxt__16u2_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__16u2_p8_1[] = {
+	 2, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10, 9,10, 9, 9,
+	 9,10,10,10,10, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,
+	10, 9,10,10,10,10,10,10,11,10, 5, 6, 6, 7, 7, 8,
+	 8, 8, 9, 9,10,10,10,10,10,10,10,10,10,10,10, 7,
+	 7, 7, 8, 8, 9, 8, 9, 9,10, 9,10,10,10,10,10,10,
+	11,10,11,10, 7, 7, 7, 8, 8, 8, 9, 9, 9,10, 9,10,
+	10,10,10,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9,
+	10, 9,10,10,10,10,10,10,10,11,10,10,11,10, 8, 8,
+	 8, 8, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,11,
+	11,10,10, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,
+	11,10,11,10,11,10,11,10, 8, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,10,10,10,10,11,11,10,10,10, 9,10, 9,
+	 9,10,10,10,11,10,10,10,10,10,10,10,10,11,11,11,
+	11,11, 9, 9, 9,10, 9,10,10,10,10,10,10,11,10,11,
+	10,11,11,11,11,10,10, 9,10, 9,10,10,10,10,11,10,
+	10,10,10,10,11,10,11,10,11,10,10,11, 9,10,10,10,
+	10,10,10,10,10,10,11,10,10,11,11,10,11,11,11,11,
+	11, 9, 9,10,10,10,10,10,11,10,10,11,10,10,11,10,
+	10,11,11,11,11,11, 9,10,10,10,10,10,10,10,11,10,
+	11,10,11,10,11,11,11,11,11,10,11,10,10,10,10,10,
+	10,10,10,10,11,11,11,11,11,11,11,11,11,10,11,11,
+	10,10,10,10,10,11,10,10,10,11,10,11,11,11,11,10,
+	12,11,11,11,10,10,10,10,10,10,11,10,10,10,11,11,
+	12,11,11,11,11,11,11,11,11,11,10,10,10,11,10,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,
+	10,10,11,10,11,10,10,11,11,11,11,11,11,11,11,11,
+	11,11,11,10,10,10,10,10,10,10,11,11,10,11,11,10,
+	11,11,10,11,11,11,10,11,11,
+};
+
+static float _vq_quantthresh__16u2_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__16u2_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p8_1 = {
+	_vq_quantthresh__16u2_p8_1,
+	_vq_quantmap__16u2_p8_1,
+	21,
+	21
+};
+
+static static_codebook _16u2_p8_1 = {
+	2, 441,
+	_vq_lengthlist__16u2_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__16u2_p8_1,
+	NULL,
+	&_vq_auxt__16u2_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p9_0[] = {
+	5586,
+	4655,
+	6517,
+	3724,
+	7448,
+	2793,
+	8379,
+	1862,
+	9310,
+	931,
+	10241,
+	0,
+	11172,
+	5521,
+	5651,
+};
+
+static long _vq_lengthlist__16u2_p9_0[] = {
+	 1,10,10,10,10,10,10,10,10,10,10,10,10, 5, 4,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10, 4,10,10,10,10,10,10,10,10,10,10,10,10,
+	 6, 6, 5,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 5,
+	 5,
+};
+
+static float _vq_quantthresh__16u2_p9_0[] = {
+	-5120.5, -4189.5, -3258.5, -2327.5, -1396.5, -498, -32.5, 32.5, 
+	498, 1396.5, 2327.5, 3258.5, 4189.5, 5120.5, 
+};
+
+static long _vq_quantmap__16u2_p9_0[] = {
+	   11,    9,    7,    5,    3,    1,   13,    0,
+	   14,    2,    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p9_0 = {
+	_vq_quantthresh__16u2_p9_0,
+	_vq_quantmap__16u2_p9_0,
+	15,
+	15
+};
+
+static static_codebook _16u2_p9_0 = {
+	2, 225,
+	_vq_lengthlist__16u2_p9_0,
+	1, -510275072, 1611661312, 14, 0,
+	_vq_quantlist__16u2_p9_0,
+	NULL,
+	&_vq_auxt__16u2_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p9_1[] = {
+	392,
+	343,
+	441,
+	294,
+	490,
+	245,
+	539,
+	196,
+	588,
+	147,
+	637,
+	98,
+	686,
+	49,
+	735,
+	0,
+	784,
+	388,
+	396,
+};
+
+static long _vq_lengthlist__16u2_p9_1[] = {
+	 1,12,10,12,10,12,10,12,11,12,12,12,12,12,12,12,
+	12, 5, 5, 9,10,12,11,11,12,12,12,12,12,12,12,12,
+	12,12,12,12,10, 9, 9,11, 9,11,11,12,11,12,12,12,
+	12,12,12,12,12,12,12, 8, 8,10,11, 9,12,11,12,12,
+	12,12,12,12,12,12,12,12,12,12, 9, 8,10,11,12,11,
+	12,11,12,12,12,12,12,12,12,12,12,12,12, 8, 9,11,
+	11,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	 9,10,11,12,11,12,11,12,12,12,12,12,12,12,12,12,
+	12,12,12, 9, 9,11,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11, 5, 8, 9, 9, 8,11, 9,11,11,11,11,11,11,
+	11,11,11,11, 5, 5, 4, 8, 8, 8, 8,10, 9,10,10,11,
+	11,11,11,11,11,11,11, 5, 4,
+};
+
+static float _vq_quantthresh__16u2_p9_1[] = {
+	-367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, -26.5, 
+	-2, 2, 26.5, 73.5, 122.5, 171.5, 220.5, 269.5, 
+	318.5, 367.5, 
+};
+
+static long _vq_quantmap__16u2_p9_1[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	   17,    0,   18,    2,    4,    6,    8,   10,
+	   12,   14,   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p9_1 = {
+	_vq_quantthresh__16u2_p9_1,
+	_vq_quantmap__16u2_p9_1,
+	19,
+	19
+};
+
+static static_codebook _16u2_p9_1 = {
+	2, 361,
+	_vq_lengthlist__16u2_p9_1,
+	1, -518488064, 1611661312, 10, 0,
+	_vq_quantlist__16u2_p9_1,
+	NULL,
+	&_vq_auxt__16u2_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__16u2_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__16u2_p9_2[] = {
+	 1, 3, 3, 4, 7, 7, 7, 8, 7, 7, 7, 7, 8, 8, 8, 8,
+	 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 9, 9, 8, 9, 9,
+	 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,12,12,10,
+	11,
+};
+
+static float _vq_quantthresh__16u2_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__16u2_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__16u2_p9_2 = {
+	_vq_quantthresh__16u2_p9_2,
+	_vq_quantmap__16u2_p9_2,
+	49,
+	49
+};
+
+static static_codebook _16u2_p9_2 = {
+	1, 49,
+	_vq_lengthlist__16u2_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__16u2_p9_2,
+	NULL,
+	&_vq_auxt__16u2_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u0__long[] = {
+	 3, 7,12,10,15,10, 9,18, 5, 2, 5, 6, 8, 7, 9,20,
+	10, 4, 4, 6, 6, 8,11,20, 9, 5, 6, 5, 7, 6, 9,20,
+	11, 7, 5, 7, 5, 7,10,20,10, 6, 7, 6, 6, 6, 8,17,
+	 9, 8,10, 7, 7, 5, 5,17,11,18,19,14,13, 9, 8,19,
+};
+
+static static_codebook _huff_book__44u0__long = {
+	2, 64,
+	_huff_lengthlist__44u0__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u0__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8,
+	10,11, 5, 8, 8, 8,10,10, 8,11,11, 4, 8, 8, 8,11,
+	11, 8,11,11, 8,11,11,11,13,14,11,13,14, 7,11,11,
+	10,14,12,11,13,14, 4, 8, 8, 8,11,11, 8,11,11, 8,
+	11,11,11,14,13,10,12,13, 8,11,12,11,14,14,11,14,
+	13,
+};
+
+static float _vq_quantthresh__44u0__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u0__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p1_0 = {
+	_vq_quantthresh__44u0__p1_0,
+	_vq_quantmap__44u0__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u0__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u0__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u0__p1_0,
+	NULL,
+	&_vq_auxt__44u0__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u0__p2_0[] = {
+	 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 6, 7, 8, 8, 6,
+	 7, 8, 5, 6, 7, 6, 8, 7, 7, 8, 8, 5, 7, 7, 7, 8,
+	 8, 7, 8, 8, 7, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8,
+	 7,10, 8, 8,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 8, 6,
+	 8, 8, 8,10,10, 7, 8,10, 6, 8, 8, 8,10,10, 8,10,
+	 9,
+};
+
+static float _vq_quantthresh__44u0__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u0__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p2_0 = {
+	_vq_quantthresh__44u0__p2_0,
+	_vq_quantmap__44u0__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u0__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u0__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u0__p2_0,
+	NULL,
+	&_vq_auxt__44u0__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u0__p3_0[] = {
+	 1, 5, 5, 8, 8, 5, 7, 7, 9, 9, 5, 7, 8, 9, 9, 8,
+	10, 9,12,11, 8, 9,10,11,12, 6, 8, 8,10,10, 8,10,
+	10,11,11, 8, 9,10,11,11,10,12,11,13,13,10,11,11,
+	13,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10,10,11,
+	11,10,11,11,13,13,10,11,11,13,13, 9,11,11,15,14,
+	10,12,11,15,14,10,12,11,15,14,12,14,13,16,15,12,
+	13,13,17,15, 9,11,11,14,14,10,11,12,14,15,10,11,
+	12,14,17,12,13,14,15,16,13,13,14,15,17, 5, 8, 8,
+	11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,15,
+	14,11,12,12,14,15, 8,10,10,13,12,10,12,12,13,13,
+	10,12,12,14,14,12,13,13,15,15,11,13,13,15,16, 7,
+	10,10,12,12, 9,12,11,14,13,10,12,12,13,14,12,13,
+	12,15,15,12,13,13,16,17,10,12,12,15,16,12,13,13,
+	17,15,11,13,13,17,16,15,15,15,17,17,13,15,16,18,
+	18, 9,12,12,15,17,11,13,12,16,16,11,13,13,16,18,
+	14,15,14,16,16,13,15,15,17,18, 5, 8, 8,11,11, 8,
+	10,10,12,12, 8,10,10,12,12,10,12,12,15,15,11,12,
+	12,14,15, 7,10,10,12,12,10,12,12,14,14, 9,11,12,
+	13,13,12,13,13,16,16,12,12,13,15,15, 8,10,10,12,
+	13,10,12,12,13,14,10,12,12,13,13,12,13,13,16,16,
+	12,13,13,15,15,10,12,12,15,16,11,13,13,17,16,11,
+	12,13,17,16,13,15,15,18,19,14,14,14,17,16,10,12,
+	12,15,15,11,13,13,15,16,11,13,13,15,17,13,15,15,
+	18,20,14,15,15,17,17, 8,11,11,15,16,10,13,12,17,
+	16,10,12,13,16,17,15,16,15,20,19,14,15,16,18,19,
+	 9,12,12,15,17,11,13,14,18,18,11,13,14,17,17,16,
+	17,18,19,19,15,16,18,19,20, 9,12,12,16,16,11,14,
+	12,17,17,11,13,13,16,19,15,16,15,20,19,15,15,15,
+	19,17,12,14,14,18,19,14,15,15,19,18,13,15,15,18,
+	17,17,18,19,20, 0,15,16,17,20, 0,12,15,14,17,18,
+	13,16,14,20,20,13,16,15,19,18,16,20,17,20,19,16,
+	17,16, 0,19, 8,11,11,15,15,10,12,12,17,17,10,12,
+	13,16,16,13,14,15,17,17,15,16,17,19,19, 9,12,12,
+	16,17,11,13,13,18,16,11,13,13,16,17,14,15,16,19,
+	18,15,16,17,17,18, 9,12,12,17,16,11,14,13,16,16,
+	12,14,13,17,18,14,16,15,18,19,17,17,17,19,18,12,
+	14,14,19,17,13,15,15,17, 0,13,14,16, 0, 0,15,16,
+	16,19, 0,16,16,19,19, 0,12,15,14,19,18,13,15,15,
+	19, 0,14,16,15, 0,19,15,17,17, 0,19,17,18,17, 0,
+	19,
+};
+
+static float _vq_quantthresh__44u0__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u0__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p3_0 = {
+	_vq_quantthresh__44u0__p3_0,
+	_vq_quantmap__44u0__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u0__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u0__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u0__p3_0,
+	NULL,
+	&_vq_auxt__44u0__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u0__p4_0[] = {
+	 4, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 9,
+	 9, 9,11,11, 9, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 6, 7, 8, 9,10,10,10,10,11,12, 9,10,10,
+	11,12, 5, 7, 7, 9, 9, 6, 8, 7,10,10, 7, 8, 8,10,
+	10, 9,10,10,12,11,10,10,10,12,11, 9,10,10,12,12,
+	10,11,10,13,13, 9,10,10,13,13,12,12,12,14,14,11,
+	12,12,14,14, 9,10,10,12,12, 9,10,10,13,13,10,10,
+	10,12,13,11,12,12,14,14,12,13,12,14,14, 5, 7, 7,
+	10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,10,10,13,
+	12,10,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,10,11,
+	 8, 9, 9,11,11,10,10,11,12,13,10,11,11,13,14, 6,
+	 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11,
+	10,13,11,10,11,11,13,13,10,11,10,13,13,10,10,11,
+	13,14,10,11,11,14,13,12,11,13,12,14,12,13,13,15,
+	15, 9,10,10,13,13,10,11,10,13,13,10,11,11,13,14,
+	12,13,11,15,12,12,13,13,14,15, 5, 7, 7,10, 9, 7,
+	 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12,12,10,10,
+	10,12,13, 6, 8, 8,10,10, 8, 9, 9,11,11, 7, 8, 9,
+	10,11,10,11,11,13,13,10,10,11,11,14, 7, 8, 8,10,
+	10, 8, 9, 9,11,11, 8, 9, 8,11,10,10,11,11,13,13,
+	10,11,10,13,11, 9,10,10,13,13,10,11,11,14,13,10,
+	10,11,12,13,13,13,13,15,14,12,11,13,12,15, 9,10,
+	11,13,13,10,11,11,13,14,10,11,10,13,13,12,13,13,
+	15,15,12,13,11,15,12, 8,10,10,13,12,10,11,11,13,
+	13, 9,10,11,13,13,13,13,13,15,15,12,13,13,15,15,
+	 9,10,10,13,13,10,11,11,13,14,10,11,11,14,13,13,
+	13,14,14,15,13,13,13,14,15, 9,10,10,13,13,10,11,
+	10,14,13,10,11,11,13,14,13,14,13,15,14,12,13,13,
+	14,15,11,13,13,15,14,11,11,13,14,15,12,14,13,15,
+	15,13,12,15,12,16,14,14,15,17,16,11,12,12,14,15,
+	11,13,11,15,14,12,13,13,15,15,14,14,12,17,13,14,
+	15,15,18,16, 8,10,10,13,12, 9,10,10,13,13,10,10,
+	11,13,13,12,13,13,14,14,12,13,13,15,15, 9,10,10,
+	13,13,10,11,11,14,13,10,10,11,13,14,12,13,13,17,
+	15,12,12,13,14,16, 9,10,10,13,13,10,11,11,13,13,
+	10,11,10,14,13,13,13,13,14,15,13,14,13,15,15,11,
+	13,12,14,14,12,13,13,16,14,11,12,13,15,15,14,15,
+	16,17,18,14,12,15,14,16,11,12,13,14,15,12,13,13,
+	15,16,11,13,11,15,14,14,16,14,16,17,14,15,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u0__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u0__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p4_0 = {
+	_vq_quantthresh__44u0__p4_0,
+	_vq_quantmap__44u0__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u0__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u0__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u0__p4_0,
+	NULL,
+	&_vq_auxt__44u0__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u0__p5_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 9, 9, 4, 6, 5, 8, 8, 8, 8,
+	10,10, 4, 5, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9,
+	 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 8, 8, 8,
+	10, 9,10,11,12,12, 8, 8, 8, 9, 9,11,11,12,12, 9,
+	10,10,11,11,12,12,13,13, 9,10,10,11,11,12,12,13,
+	13,
+};
+
+static float _vq_quantthresh__44u0__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u0__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p5_0 = {
+	_vq_quantthresh__44u0__p5_0,
+	_vq_quantmap__44u0__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u0__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u0__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u0__p5_0,
+	NULL,
+	&_vq_auxt__44u0__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u0__p6_0[] = {
+	 1, 4, 4, 6, 6, 8, 8,10, 9,10,10,14,14, 4, 6, 5,
+	 8, 8, 9, 9,10,10,11,11,14,14, 4, 5, 6, 8, 8, 9,
+	 9,10,10,11,11,14,14, 7, 8, 8, 9, 9,10,10,11,11,
+	12,12,15,15, 7, 8, 8, 9, 9,10,10,11,11,12,12,14,
+	15, 9, 9, 9,10,10,11,11,12,11,12,12,15,16, 9, 9,
+	 9,10,10,11,11,11,11,12,12,15,15,10,10,10,11,11,
+	12,11,12,12,13,13,16,16,10,10,10,11,11,12,12,12,
+	12,13,13,16,17,11,11,12,12,12,13,13,14,13,14,14,
+	18,17,11,11,11,12,12,12,12,13,14,14,14,18,18,14,
+	14,14,15,15,15,16,16,16,17,17, 0,19,14,14,14,15,
+	15,16,17,16,17,17,17,19, 0,
+};
+
+static float _vq_quantthresh__44u0__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u0__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p6_0 = {
+	_vq_quantthresh__44u0__p6_0,
+	_vq_quantmap__44u0__p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u0__p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u0__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u0__p6_0,
+	NULL,
+	&_vq_auxt__44u0__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u0__p6_1[] = {
+	 2, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5,
+	 6, 6, 6, 6, 5, 6, 6, 6, 6,
+};
+
+static float _vq_quantthresh__44u0__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u0__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p6_1 = {
+	_vq_quantthresh__44u0__p6_1,
+	_vq_quantmap__44u0__p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u0__p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u0__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u0__p6_1,
+	NULL,
+	&_vq_auxt__44u0__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p7_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u0__p7_0[] = {
+	 1, 5, 5,11,11, 9,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11, 8,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11, 9,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11, 8,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44u0__p7_0[] = {
+	-253.5, -84.5, 84.5, 253.5, 
+};
+
+static long _vq_quantmap__44u0__p7_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p7_0 = {
+	_vq_quantthresh__44u0__p7_0,
+	_vq_quantmap__44u0__p7_0,
+	5,
+	5
+};
+
+static static_codebook _44u0__p7_0 = {
+	4, 625,
+	_vq_lengthlist__44u0__p7_0,
+	1, -518709248, 1626677248, 3, 0,
+	_vq_quantlist__44u0__p7_0,
+	NULL,
+	&_vq_auxt__44u0__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p7_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u0__p7_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 4, 7, 7,
+	 8, 8, 8, 8, 9, 9,11,10,12,11, 4, 6, 7, 8, 8, 7,
+	 8, 9, 9,10,11,12,11, 7, 8, 8, 9, 9,10,10,11,11,
+	12,11,13,13, 7, 8, 8, 9,10,10,10,11,11,12,12,12,
+	13, 7, 8, 8,10,10,12,12,13,12,16,13,13,14, 7, 8,
+	 8,10,11,12,12,13,12,13,13,14,14, 8, 9,10,12,12,
+	14,13,16,15,16,16,16,15, 8,10,10,12,12,14,13,14,
+	15,16,16,15,16,10,11,12,14,14,14,14,16,13,16,15,
+	16,16,10,11,12,13,13,15,14,14,15,16,16,14,14,13,
+	14,13,15,16,16,16,15,15,16,16,16,16,11,15,14,16,
+	16,14,14,16,15,16,14,16,15,
+};
+
+static float _vq_quantthresh__44u0__p7_1[] = {
+	-71.5, -58.5, -45.5, -32.5, -19.5, -6.5, 6.5, 19.5, 
+	32.5, 45.5, 58.5, 71.5, 
+};
+
+static long _vq_quantmap__44u0__p7_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p7_1 = {
+	_vq_quantthresh__44u0__p7_1,
+	_vq_quantmap__44u0__p7_1,
+	13,
+	13
+};
+
+static static_codebook _44u0__p7_1 = {
+	2, 169,
+	_vq_lengthlist__44u0__p7_1,
+	1, -523010048, 1618608128, 4, 0,
+	_vq_quantlist__44u0__p7_1,
+	NULL,
+	&_vq_auxt__44u0__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u0__p7_2[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u0__p7_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 5, 5, 6,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 5, 5, 5, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 7, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9,
+	 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 8, 9,
+	 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44u0__p7_2[] = {
+	-5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 
+	2.5, 3.5, 4.5, 5.5, 
+};
+
+static long _vq_quantmap__44u0__p7_2[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u0__p7_2 = {
+	_vq_quantthresh__44u0__p7_2,
+	_vq_quantmap__44u0__p7_2,
+	13,
+	13
+};
+
+static static_codebook _44u0__p7_2 = {
+	2, 169,
+	_vq_lengthlist__44u0__p7_2,
+	1, -531103744, 1611661312, 4, 0,
+	_vq_quantlist__44u0__p7_2,
+	NULL,
+	&_vq_auxt__44u0__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u0__short[] = {
+	 6,10,11,12,13,12,12,12, 4, 6, 6, 9, 9,10,11,13,
+	 3, 4, 3, 7, 6, 8,10,15, 5, 7, 7, 9, 8, 9,11,16,
+	 6, 7, 5, 8, 5, 7,10,16, 7, 8, 7, 9, 6, 7,10,16,
+	10, 6, 3, 5, 4, 5, 7,16,13, 8, 5, 7, 6, 7,10,15,
+};
+
+static static_codebook _huff_book__44u0__short = {
+	2, 64,
+	_huff_lengthlist__44u0__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u1__long[] = {
+	 4, 8,13,11,14,11,10,14, 6, 3, 5, 6, 8, 7, 9,14,
+	12, 4, 3, 6, 5, 7,10,18,11, 6, 6, 6, 6, 6, 8,16,
+	13, 7, 4, 6, 4, 6, 9,19,11, 6, 6, 5, 5, 5, 7,16,
+	10, 8, 9, 7, 9, 6, 4,12,11,16,18,19,18,10, 7,11,
+};
+
+static static_codebook _huff_book__44u1__long = {
+	2, 64,
+	_huff_lengthlist__44u1__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u1__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8,
+	10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11,
+	11, 8,11,11, 8,11,11,11,13,14,11,13,14, 8,11,11,
+	10,14,11,11,13,14, 4, 8, 8, 8,11,11, 8,11,11, 7,
+	11,11,11,14,13,10,12,13, 8,11,11,11,14,14,11,14,
+	13,
+};
+
+static float _vq_quantthresh__44u1__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u1__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p1_0 = {
+	_vq_quantthresh__44u1__p1_0,
+	_vq_quantmap__44u1__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u1__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u1__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u1__p1_0,
+	NULL,
+	&_vq_auxt__44u1__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u1__p2_0[] = {
+	 2, 5, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 7, 8, 8, 5, 6, 6, 7, 8,
+	 8, 6, 8, 8, 7, 8, 8, 8, 9,10, 8, 9, 9, 6, 8, 8,
+	 7, 9, 8, 8, 9,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6,
+	 8, 8, 8,10, 9, 7, 8, 9, 7, 8, 8, 8, 9, 9, 8,10,
+	 9,
+};
+
+static float _vq_quantthresh__44u1__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u1__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p2_0 = {
+	_vq_quantthresh__44u1__p2_0,
+	_vq_quantmap__44u1__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u1__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u1__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u1__p2_0,
+	NULL,
+	&_vq_auxt__44u1__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u1__p3_0[] = {
+	 2, 5, 4, 7, 7, 5, 7, 7, 9, 8, 5, 7, 7, 8, 9, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 5, 7, 7,10,10, 7, 9,
+	 9,11,10, 7, 9, 9,10,10, 9,11,10,13,12, 9,10,10,
+	12,13, 5, 7, 7,10, 9, 7, 9, 9,11,10, 7, 9, 9,10,
+	11, 9,10,10,12,12,10,10,11,12,13, 8,10,10,14,13,
+	 9,11,11,15,13, 9,11,11,15,13,12,14,12,16,14,12,
+	13,12,15,14, 8,10,10,13,14, 9,11,11,13,14,10,11,
+	11,13,15,12,12,13,14,15,12,13,14,14,16, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,12,10,11,11,14,
+	14,10,11,11,14,14, 7, 9, 9,12,12, 9,11,11,13,12,
+	 9,11,11,13,13,12,12,12,14,14,11,12,13,15,15, 7,
+	 9, 9,12,11, 9,11,10,12,12, 9,11,11,12,13,11,12,
+	11,14,14,11,12,12,15,16, 9,11,11,15,15,11,12,12,
+	16,15,10,12,12,16,15,14,15,15,17,16,13,14,14,17,
+	17, 9,11,11,14,15,10,12,11,15,15,10,12,12,15,17,
+	13,14,13,16,15,13,14,15,17,17, 5, 7, 7,10,10, 7,
+	 9, 9,12,11, 7, 9, 9,11,12,10,11,11,14,14,10,11,
+	11,13,14, 7, 9, 9,11,12, 9,11,11,13,13, 9,10,11,
+	12,12,11,12,12,15,15,11,12,12,13,14, 7,10, 9,12,
+	12, 9,11,11,13,13, 9,11,11,12,12,11,12,12,16,15,
+	11,12,12,14,14, 9,11,11,15,14,10,12,12,16,15,10,
+	11,12,15,15,13,14,14,17,18,13,13,14,15,16, 9,11,
+	11,15,16,10,12,12,15,15,11,12,12,14,17,13,14,14,
+	17,17,14,14,14,16,18, 7,10,10,14,15,10,12,12,16,
+	15,10,11,12,16,16,14,16,15,18,17,13,15,14,17,19,
+	 9,11,12,16,15,11,13,13,17,16,10,13,13,16,16,15,
+	16,16,17,19,13,15,15,17,17, 8,11,11,15,15,10,13,
+	11,16,16,10,13,13,16,17,14,16,15,18,19,13,15,15,
+	17,17,12,14,14,18,18,13,14,15,18,19,12,14,15,17,
+	18,16,18,18,19, 0,14,15,16,18,18,11,14,13,17,18,
+	12,16,14,19,19,12,15,14, 0,18,15,17,16,18,17,14,
+	17,16,18,18, 7,10,10,15,14,10,12,11,16,16,10,11,
+	12,16,16,13,15,14,19,18,14,15,16,18,18, 8,11,11,
+	15,15,10,13,12,17,16,10,12,13,16,17,14,14,15,19,
+	18,14,15,16,18, 0, 9,11,11,16,15,11,13,12,15,16,
+	11,13,13,16,16,14,15,14, 0,17,15,16,16,19,18,11,
+	14,14,18,17,12,14,15,17,17,12,13,15, 0,17,14,15,
+	16,18,17,16,17,18,17,19,11,14,13,17,19,12,15,14,
+	18,19,13,16,14, 0,19,14,17,15, 0,18,15,18,16, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44u1__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u1__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p3_0 = {
+	_vq_quantthresh__44u1__p3_0,
+	_vq_quantmap__44u1__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u1__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u1__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u1__p3_0,
+	NULL,
+	&_vq_auxt__44u1__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u1__p4_0[] = {
+	 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 9,
+	 9, 9,11,11, 9, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 6, 7, 8, 9,10,10,10,10,11,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 6, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,12,11,10,10,10,12,11, 9,10,10,12,12,
+	10,10,10,13,12, 9,10,10,12,12,12,12,12,14,14,11,
+	12,12,13,14, 9,10,10,12,12, 9,10,10,13,12,10,10,
+	10,12,13,12,12,12,14,13,12,12,12,14,14, 5, 7, 7,
+	 9, 9, 7, 8, 7,10,10, 7, 7, 8,10,10,10,10,10,12,
+	12,10,10,10,12,12, 7, 8, 8,10,10, 8, 8, 9,10,11,
+	 8, 8, 8,11,11,10,10,11,11,13,10,11,11,12,13, 6,
+	 7, 7,10,10, 7, 8, 8,11,10, 8, 8, 9,11,11,10,11,
+	10,13,11,10,11,11,13,12,10,11,10,13,12,10,10,11,
+	13,13,10,11,11,13,13,12,11,13,12,14,12,13,13,15,
+	15, 9,10,10,12,13,10,11,10,13,13,10,11,11,13,14,
+	12,13,11,14,12,12,13,13,14,15, 5, 7, 7, 9,10, 7,
+	 8, 7,10,10, 7, 7, 8,10,10,10,10,10,12,12,10,10,
+	10,12,12, 6, 7, 7,10,10, 8, 9, 8,11,11, 7, 8, 8,
+	10,11,10,11,11,12,13,10,10,11,11,13, 7, 8, 8,10,
+	10, 8, 8, 8,11,11, 8, 9, 8,11,10,10,11,10,13,12,
+	10,11,10,13,12, 9,10,10,13,12,10,11,11,13,13, 9,
+	10,10,12,13,13,13,13,15,14,12,11,13,12,15,10,10,
+	11,12,13,10,11,11,13,13,10,11,10,13,13,12,13,13,
+	15,15,12,13,11,14,12, 8,10, 9,12,12, 9,10,10,13,
+	13, 9,10,10,13,13,13,13,13,14,15,12,12,12,14,14,
+	 9,10,10,13,12,10,11,11,13,13,10,11,11,13,12,13,
+	13,14,14,16,12,13,13,15,14, 9,10,10,13,13,10,11,
+	10,13,13,10,11,11,13,13,13,14,12,15,14,12,13,13,
+	14,15,12,12,12,14,14,11,12,12,14,15,12,13,13,15,
+	14,14,12,15,12,16,14,14,15,17,16,11,12,12,14,14,
+	11,12,11,15,14,12,13,13,15,15,13,14,12,16,13,14,
+	14,15,17,16, 8,10,10,12,12, 9,10,10,13,12,10,10,
+	10,13,13,12,13,12,14,14,12,13,13,15,14, 9,10,10,
+	13,13,10,11,11,13,13,10,10,11,12,13,13,13,13,15,
+	15,12,12,13,14,15, 9,10,10,12,13,10,11,11,12,13,
+	10,11,10,13,13,12,13,13,14,15,13,14,13,15,14,11,
+	12,12,15,14,12,13,13,15,14,11,12,12,14,15,14,14,
+	14,17,15,13,12,15,13,16,12,12,12,14,15,12,13,13,
+	14,15,11,12,12,15,14,14,15,14,16,17,13,15,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u1__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u1__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p4_0 = {
+	_vq_quantthresh__44u1__p4_0,
+	_vq_quantmap__44u1__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u1__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u1__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u1__p4_0,
+	NULL,
+	&_vq_auxt__44u1__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u1__p5_0[] = {
+	 1, 4, 4, 7, 7, 8, 8,10,10, 4, 6, 5, 8, 8, 8, 8,
+	10,10, 4, 5, 6, 8, 8, 8, 8,10,10, 7, 8, 7, 9, 9,
+	 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 8, 8, 8,
+	 9, 9,10,11,12,12, 8, 8, 9, 9, 9,10,10,12,12,10,
+	10,10,11,11,12,12,13,13,10,10,10,11,11,12,12,13,
+	13,
+};
+
+static float _vq_quantthresh__44u1__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u1__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p5_0 = {
+	_vq_quantthresh__44u1__p5_0,
+	_vq_quantmap__44u1__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u1__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u1__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u1__p5_0,
+	NULL,
+	&_vq_auxt__44u1__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u1__p6_0[] = {
+	 1, 4, 4, 7, 7, 9, 8,10, 9,11,10,14,13, 4, 5, 5,
+	 8, 8, 9, 9,11,11,11,11,14,14, 4, 5, 5, 8, 8, 9,
+	 9,10,11,11,11,14,14, 7, 8, 8, 9, 9,11,10,11,11,
+	12,12,16,15, 7, 8, 8, 9, 9,10,11,11,11,12,12,15,
+	15, 9,10,10,11,11,11,11,12,12,13,13,16,16, 9,10,
+	10,11,11,11,11,12,12,12,13,16,15,10,11,11,11,11,
+	12,12,13,13,13,13,16,17,10,11,11,11,11,12,12,12,
+	12,13,14,16,16,11,12,12,12,12,13,13,14,14,14,15,
+	18,17,11,12,12,12,12,13,13,13,14,14,15,18,18,15,
+	14,15,15,15,16,16,17,17,18,17,20,20,14,15,15,15,
+	15,16,17,17,16,18, 0,19, 0,
+};
+
+static float _vq_quantthresh__44u1__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u1__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p6_0 = {
+	_vq_quantthresh__44u1__p6_0,
+	_vq_quantmap__44u1__p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u1__p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u1__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u1__p6_0,
+	NULL,
+	&_vq_auxt__44u1__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u1__p6_1[] = {
+	 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5,
+	 6, 5, 6, 6, 5, 5, 6, 6, 6,
+};
+
+static float _vq_quantthresh__44u1__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u1__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p6_1 = {
+	_vq_quantthresh__44u1__p6_1,
+	_vq_quantmap__44u1__p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u1__p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u1__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u1__p6_1,
+	NULL,
+	&_vq_auxt__44u1__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p7_0[] = {
+	3,
+	2,
+	4,
+	1,
+	5,
+	0,
+	6,
+};
+
+static long _vq_lengthlist__44u1__p7_0[] = {
+	 1, 3, 3, 9, 9, 9, 9, 5, 7, 7, 9, 9, 9, 9, 5, 6,
+	 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44u1__p7_0[] = {
+	-422.5, -253.5, -84.5, 84.5, 253.5, 422.5, 
+};
+
+static long _vq_quantmap__44u1__p7_0[] = {
+	    5,    3,    1,    0,    2,    4,    6,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p7_0 = {
+	_vq_quantthresh__44u1__p7_0,
+	_vq_quantmap__44u1__p7_0,
+	7,
+	7
+};
+
+static static_codebook _44u1__p7_0 = {
+	2, 49,
+	_vq_lengthlist__44u1__p7_0,
+	1, -518017024, 1626677248, 3, 0,
+	_vq_quantlist__44u1__p7_0,
+	NULL,
+	&_vq_auxt__44u1__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p7_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u1__p7_1[] = {
+	 1, 4, 4, 6, 6, 6, 7, 8, 8, 9, 9,11,10, 4, 7, 7,
+	 8, 8, 8, 8, 9, 9,11,10,12,11, 4, 6, 7, 8, 8, 8,
+	 8,10,10,10,11,12,11, 7, 8, 8, 9, 9,10,10,11,11,
+	12,12,13,13, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,
+	13, 7, 8, 8,10,10,13,12,13,13,16,13,13,14, 7, 8,
+	 8,10,11,12,12,13,13,14,14,14,14, 8,10,10,13,12,
+	13,13,16,14,15,15,16,15, 8,10,11,12,13,13,13,13,
+	16,15,16,16,14,10,12,13,14,15,15,14,14,14,15,16,
+	15,16,10,11,12,13,13,15,15,16,16,16,14,16,16,12,
+	13,13,15,14,15,14,15,15,14,15,16,16,11,14,14,15,
+	14,16,15,16,14,15,16,14,15,
+};
+
+static float _vq_quantthresh__44u1__p7_1[] = {
+	-71.5, -58.5, -45.5, -32.5, -19.5, -6.5, 6.5, 19.5, 
+	32.5, 45.5, 58.5, 71.5, 
+};
+
+static long _vq_quantmap__44u1__p7_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p7_1 = {
+	_vq_quantthresh__44u1__p7_1,
+	_vq_quantmap__44u1__p7_1,
+	13,
+	13
+};
+
+static static_codebook _44u1__p7_1 = {
+	2, 169,
+	_vq_lengthlist__44u1__p7_1,
+	1, -523010048, 1618608128, 4, 0,
+	_vq_quantlist__44u1__p7_1,
+	NULL,
+	&_vq_auxt__44u1__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u1__p7_2[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u1__p7_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 5, 6, 6,
+	 6, 7, 8, 7, 8, 8, 8, 9, 9, 9, 5, 6, 6, 7, 7, 8,
+	 8, 8, 8, 8, 8, 8, 9, 6, 7, 7, 7, 7, 8, 8, 8, 9,
+	 9, 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9,
+	 9, 7, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 7, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 9, 9, 9,
+	 8, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 8, 9,
+	 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44u1__p7_2[] = {
+	-5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 
+	2.5, 3.5, 4.5, 5.5, 
+};
+
+static long _vq_quantmap__44u1__p7_2[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u1__p7_2 = {
+	_vq_quantthresh__44u1__p7_2,
+	_vq_quantmap__44u1__p7_2,
+	13,
+	13
+};
+
+static static_codebook _44u1__p7_2 = {
+	2, 169,
+	_vq_lengthlist__44u1__p7_2,
+	1, -531103744, 1611661312, 4, 0,
+	_vq_quantlist__44u1__p7_2,
+	NULL,
+	&_vq_auxt__44u1__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u1__short[] = {
+	 7,12,12,14,16,13,12,15, 6, 9,10,13,11,11,12,12,
+	 4, 5, 5, 8, 5, 7, 9,12, 6, 7, 8,10, 8, 9,11,16,
+	 5, 5, 4, 7, 4, 5, 7,15, 6, 5, 5, 8, 5, 5, 6,15,
+	 8, 7, 4, 7, 3, 4, 5,16,15,11, 6, 8, 5, 6, 8,16,
+};
+
+static static_codebook _huff_book__44u1__short = {
+	2, 64,
+	_huff_lengthlist__44u1__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u2__long[] = {
+	 8,14,15,15,17,15,12,13,13, 3, 4, 7, 8, 7, 8,11,
+	20, 4, 3, 6, 5, 7, 9,16,15, 6, 5, 6, 6, 6, 8,15,
+	20, 7, 4, 6, 4, 5, 8,18,16, 7, 6, 6, 5, 5, 6,14,
+	11, 7, 8, 7, 7, 5, 4,10,10,13,15,16,19,10, 6,10,
+};
+
+static static_codebook _huff_book__44u2__long = {
+	2, 64,
+	_huff_lengthlist__44u2__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u2__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8,
+	10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11,
+	11, 8,11,11, 8,11,11,11,13,14,11,13,13, 8,11,11,
+	10,13,12,11,13,14, 4, 8, 8, 8,11,11, 8,11,11, 7,
+	11,11,11,14,13,10,12,13, 8,11,11,11,14,13,11,13,
+	13,
+};
+
+static float _vq_quantthresh__44u2__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u2__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p1_0 = {
+	_vq_quantthresh__44u2__p1_0,
+	_vq_quantmap__44u2__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u2__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u2__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u2__p1_0,
+	NULL,
+	&_vq_auxt__44u2__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u2__p2_0[] = {
+	 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8,
+	 7, 6, 7, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 8, 8,
+	 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 8, 6, 7, 8, 6,
+	 8, 8, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u2__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u2__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p2_0 = {
+	_vq_quantthresh__44u2__p2_0,
+	_vq_quantmap__44u2__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u2__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u2__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u2__p2_0,
+	NULL,
+	&_vq_auxt__44u2__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u2__p3_0[] = {
+	 2, 4, 4, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8,
+	 9, 9,12,12, 8, 9,10,11,12, 5, 7, 7,10,10, 7, 9,
+	 9,11,10, 7, 8, 9,10,11,10,11,10,14,13, 9,10,10,
+	12,13, 5, 7, 7,10,10, 7, 9, 8,11,10, 7, 9, 9,11,
+	11, 9,10,10,13,12,10,10,11,13,13, 8,10,10,15,13,
+	10,11,11,15,13, 9,11,11,14,13,13,14,13,17,15,12,
+	13,13,15,15, 8,10,10,13,14, 9,11,11,13,14,10,11,
+	12,13,16,12,13,13,15,15,13,13,14,15,17, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,12,10,11,11,14,
+	14,10,11,12,14,14, 7, 9, 9,12,12, 9,11,11,13,12,
+	 9,11,11,13,13,12,13,12,14,14,11,12,12,15,14, 7,
+	 9, 9,12,11, 9,11,10,13,11, 9,11,11,12,13,11,12,
+	11,14,13,11,12,12,15,15,10,12,12,16,15,11,13,13,
+	16,16,10,12,12,16,16,14,14,14,17,16,13,14,14,17,
+	18, 9,11,11,14,15,10,12,11,15,15,10,12,12,15,17,
+	13,15,13,17,16,13,14,15,17,19, 5, 7, 7,10,10, 7,
+	 9, 9,12,11, 7, 9, 9,11,11,10,11,11,15,14,10,11,
+	12,13,14, 7, 9, 9,12,12, 9,11,11,13,12, 8,10,11,
+	12,12,11,12,12,15,15,11,11,12,14,14, 7, 9, 9,12,
+	12, 9,11,11,13,13, 9,11,11,12,12,11,12,12,16,15,
+	11,12,13,14,14, 9,11,11,16,15,10,12,12,16,15,10,
+	11,12,14,14,13,14,15,18,17,13,13,14,16,16,10,12,
+	12,15,15,10,13,12,15,17,11,13,12,15,16,13,15,14,
+	17,18,14,15,14,15,17, 8,10,10,15,15,10,12,12,17,
+	15,10,12,12,17,16,14,16,15,17,17,13,14,15,16,16,
+	 9,11,12,16,16,11,13,13,16,17,11,13,13,16,16,15,
+	16,16, 0, 0,14,15,15,19,17, 9,11,11,17,16,10,13,
+	11,16,16,11,12,12,16,17,15,16,15,19,19,14,16,15,
+	 0,18,12,14,15, 0, 0,14,15,16,18,18,13,14,15,17,
+	17,16,18,18, 0, 0,15,16,16,19,18,11,14,13, 0,18,
+	13,16,13,17,17,13,15,14, 0, 0,17,17,15,19,18,14,
+	16,16,19, 0, 8,10,10,15,15,10,12,11,16,16,10,11,
+	12,17,16,14,15,15,17,18,15,15,16, 0, 0, 9,11,11,
+	15,15,11,13,12,16,18,10,12,13,17,17,13,15,15,17,
+	19,15,15,16,19,18, 9,12,11, 0,16,11,13,12,16,16,
+	11,13,13,16,17,14,16,15,19,19,15,15,16,18,18,12,
+	14,14,17,18,13,14,15,18, 0,13,14,15,18,19,15,17,
+	16, 0,19,16,15,18,17,19,12,14,14,19,19,13,15,15,
+	 0,18,13,17,15,18,18,15,16,17, 0,19,17,19,18,18,
+	 0,
+};
+
+static float _vq_quantthresh__44u2__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u2__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p3_0 = {
+	_vq_quantthresh__44u2__p3_0,
+	_vq_quantmap__44u2__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u2__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u2__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u2__p3_0,
+	NULL,
+	&_vq_auxt__44u2__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u2__p4_0[] = {
+	 4, 5, 5, 9, 9, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 9,
+	10, 9,12,11, 9, 9,10,11,12, 6, 7, 7,10,10, 7, 8,
+	 7,10,10, 7, 7, 8,10,10,10,10,10,12,12, 9,10,10,
+	11,12, 6, 7, 7,10,10, 7, 8, 7,10,10, 7, 7, 7,10,
+	10, 9,10,10,12,11,10,10,10,12,12, 9,10,10,13,12,
+	10,10,10,13,13,10,10,10,13,12,12,12,12,14,14,12,
+	12,12,14,14, 9,10,10,12,13, 9,10,10,13,13,10,10,
+	10,13,13,12,12,12,15,14,12,13,12,14,14, 5, 7, 7,
+	10,10, 7, 8, 7,10,10, 7, 7, 8,10,10,10,10,10,12,
+	12,10,10,10,12,12, 7, 8, 8,10,10, 8, 8, 8,10,11,
+	 8, 8, 8,11,10,10,10,11,11,13,10,10,11,12,13, 6,
+	 7, 7,10,10, 7, 8, 7,11,10, 8, 8, 8,10,11,10,11,
+	10,13,11,10,10,10,13,12,10,11,10,13,13,10,10,10,
+	12,13,10,11,11,13,13,12,11,13,11,14,12,13,13,14,
+	14, 9,10,10,12,13,10,10,10,13,12,10,10,11,13,13,
+	12,13,11,14,12,13,13,13,15,14, 5, 7, 7,10,10, 7,
+	 7, 7,10,10, 7, 7, 8,10,10,10,10,10,12,12,10,10,
+	10,12,13, 6, 7, 7,10,10, 8, 8, 8,11,10, 7, 7, 8,
+	10,11,10,10,10,12,12,10,10,11,11,13, 7, 8, 8,10,
+	10, 7, 8, 8,10,11, 8, 8, 8,11,10,10,11,10,13,12,
+	10,11,10,13,11, 9,10,10,13,13,10,11,11,13,13,10,
+	10,10,12,13,13,13,13,14,14,12,11,13,12,14,10,10,
+	11,13,13,10,11,11,13,13,10,10,10,13,12,12,13,13,
+	14,14,12,13,11,15,12, 9,10,10,13,13,10,10,10,13,
+	13,10,10,10,13,13,13,13,13,15,15,12,13,13,14,14,
+	 9,10,10,13,13,10,10,11,13,13,10,11,10,13,12,13,
+	12,13,14,15,13,13,13,15,14, 9,10,10,13,13,10,10,
+	10,13,12,10,10,11,12,13,13,13,12,15,14,13,13,13,
+	14,14,12,13,12,15,14,12,11,12,14,14,12,13,12,15,
+	14,14,12,15,12,16,14,14,15,16,16,12,12,12,14,15,
+	11,12,11,15,14,12,13,13,14,15,14,14,12,16,13,14,
+	14,15,16,16, 9,10,10,13,13,10,10,10,13,13,10,10,
+	10,13,13,12,13,12,14,14,13,13,13,15,15, 9,10,10,
+	13,13,10,11,10,13,12,10,10,10,12,13,13,13,13,14,
+	14,12,12,13,14,15, 9,10,10,13,13,10,10,11,12,13,
+	10,11,10,13,13,13,13,13,14,15,13,13,13,15,14,12,
+	12,12,15,14,12,13,12,15,14,11,11,12,14,15,14,14,
+	14,17,16,14,12,14,13,17,12,12,13,14,16,13,13,13,
+	13,15,12,12,11,14,14,14,15,14,16,16,14,14,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u2__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u2__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p4_0 = {
+	_vq_quantthresh__44u2__p4_0,
+	_vq_quantmap__44u2__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u2__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u2__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u2__p4_0,
+	NULL,
+	&_vq_auxt__44u2__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u2__p5_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 9, 9, 4, 5, 4, 7, 7, 8, 7,
+	 9, 9, 4, 4, 4, 7, 7, 7, 8, 9, 9, 6, 7, 7, 8, 8,
+	 8, 9,10,10, 6, 7, 7, 8, 8, 9, 8,10,10, 7, 8, 7,
+	 8, 9, 9,10,11,11, 7, 7, 8, 9, 9,10,10,11,11, 9,
+	 9, 9,10,10,11,11,12,12, 9, 9, 9,10,10,11,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44u2__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u2__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p5_0 = {
+	_vq_quantthresh__44u2__p5_0,
+	_vq_quantmap__44u2__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u2__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u2__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u2__p5_0,
+	NULL,
+	&_vq_auxt__44u2__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u2__p6_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9,10,11,11,14,14, 4, 6, 5,
+	 8, 8, 9, 9,11,11,11,11,14,14, 4, 5, 5, 8, 8, 9,
+	 9,10,11,11,12,14,14, 7, 8, 8, 9, 9,11,10,11,11,
+	12,12,15,15, 7, 8, 8, 9, 9,11,11,11,11,12,12,15,
+	14, 9,10,10,11,11,11,11,12,12,13,12,16,16, 9,10,
+	10,11,11,11,11,12,12,13,13,15,16,10,11,11,11,11,
+	12,12,13,13,13,13,17,16,10,11,11,12,12,12,12,12,
+	13,14,14,16,16,11,12,12,12,12,13,13,14,14,14,14,
+	17,17,11,12,12,12,12,13,13,14,14,15,14,18,17,15,
+	14,15,15,15,16,16,17,18,19,17,19, 0,15,15,15,15,
+	15,16,17,16,16,18,17, 0, 0,
+};
+
+static float _vq_quantthresh__44u2__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u2__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p6_0 = {
+	_vq_quantthresh__44u2__p6_0,
+	_vq_quantmap__44u2__p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u2__p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u2__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u2__p6_0,
+	NULL,
+	&_vq_auxt__44u2__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u2__p6_1[] = {
+	 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 5, 5,
+	 6, 6, 6, 6, 5, 5, 6, 6, 6,
+};
+
+static float _vq_quantthresh__44u2__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u2__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p6_1 = {
+	_vq_quantthresh__44u2__p6_1,
+	_vq_quantmap__44u2__p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u2__p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u2__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u2__p6_1,
+	NULL,
+	&_vq_auxt__44u2__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p7_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u2__p7_0[] = {
+	 1, 3, 3,10,10,10,10,10,10, 4,10,10,10,10,10,10,
+	10,10, 4,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u2__p7_0[] = {
+	-591.5, -422.5, -253.5, -84.5, 84.5, 253.5, 422.5, 591.5, 
+};
+
+static long _vq_quantmap__44u2__p7_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p7_0 = {
+	_vq_quantthresh__44u2__p7_0,
+	_vq_quantmap__44u2__p7_0,
+	9,
+	9
+};
+
+static static_codebook _44u2__p7_0 = {
+	2, 81,
+	_vq_lengthlist__44u2__p7_0,
+	1, -516612096, 1626677248, 4, 0,
+	_vq_quantlist__44u2__p7_0,
+	NULL,
+	&_vq_auxt__44u2__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p7_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u2__p7_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 9,10,10, 4, 7, 6,
+	 8, 8, 8, 8,10, 9,11,10,12,12, 4, 6, 7, 8, 8, 8,
+	 8,10,10,11,11,12,12, 7, 8, 8,10, 9,10,10,12,11,
+	13,12,13,13, 7, 8, 8, 9, 9,10,10,11,11,13,13,14,
+	15, 7, 8, 9,10,10,12,11,14,13,13,14,14,15, 7, 8,
+	 9,10,10,11,12,13,13,15,14,14,15, 8,10,10,12,11,
+	13,13,15,15,15,17,15,15, 8,10,10,11,12,14,13,14,
+	15,17,15,15,15,10,11,11,14,13,14,14,15,15,17,17,
+	16,17,10,11,12,13,13,14,14,14,15,16,15,15,17,11,
+	12,13,14,13,16,16,16,14,17,16,17,17,11,12,13,15,
+	15,15,15,16,15,15,15,15,17,
+};
+
+static float _vq_quantthresh__44u2__p7_1[] = {
+	-71.5, -58.5, -45.5, -32.5, -19.5, -6.5, 6.5, 19.5, 
+	32.5, 45.5, 58.5, 71.5, 
+};
+
+static long _vq_quantmap__44u2__p7_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p7_1 = {
+	_vq_quantthresh__44u2__p7_1,
+	_vq_quantmap__44u2__p7_1,
+	13,
+	13
+};
+
+static static_codebook _44u2__p7_1 = {
+	2, 169,
+	_vq_lengthlist__44u2__p7_1,
+	1, -523010048, 1618608128, 4, 0,
+	_vq_quantlist__44u2__p7_1,
+	NULL,
+	&_vq_auxt__44u2__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u2__p7_2[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u2__p7_2[] = {
+	 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 5, 6, 6, 7, 7, 8,
+	 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7, 7, 8, 8, 8, 8,
+	 9, 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 7, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44u2__p7_2[] = {
+	-5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 
+	2.5, 3.5, 4.5, 5.5, 
+};
+
+static long _vq_quantmap__44u2__p7_2[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u2__p7_2 = {
+	_vq_quantthresh__44u2__p7_2,
+	_vq_quantmap__44u2__p7_2,
+	13,
+	13
+};
+
+static static_codebook _44u2__p7_2 = {
+	2, 169,
+	_vq_lengthlist__44u2__p7_2,
+	1, -531103744, 1611661312, 4, 0,
+	_vq_quantlist__44u2__p7_2,
+	NULL,
+	&_vq_auxt__44u2__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u2__short[] = {
+	16,15,15,16,14,16,16,16,16, 9, 8,11,10,10,10,15,
+	16, 6, 3, 7, 5, 7, 9,16,16,11, 7,11, 9,10,12,16,
+	16, 9, 4, 8, 3, 5, 8,16,16,11, 6, 9, 4, 4, 7,16,
+	16,11, 5, 9, 3, 3, 5,12,16,15, 6,11, 5, 5, 6,14,
+};
+
+static static_codebook _huff_book__44u2__short = {
+	2, 64,
+	_huff_lengthlist__44u2__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u3__long[] = {
+	 7,11,14,13,14,12,12,12,12, 2, 5, 8, 9, 8, 9,11,
+	17, 4, 3, 6, 5, 7, 9,15,14, 6, 6, 7, 7, 7, 8,14,
+	17, 8, 5, 7, 4, 5, 7,15,13, 7, 6, 7, 5, 5, 6,14,
+	10, 8, 8, 7, 7, 5, 4, 9,10,12,15,14,16,10, 6, 9,
+};
+
+static static_codebook _huff_book__44u3__long = {
+	2, 64,
+	_huff_lengthlist__44u3__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u3__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8,
+	10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11,
+	11, 8,11,11, 8,11,11,11,13,14,11,13,14, 7,11,11,
+	10,13,11,11,13,14, 4, 8, 8, 8,11,11, 8,11,11, 8,
+	11,11,11,14,14,10,12,14, 8,11,11,11,14,13,11,14,
+	13,
+};
+
+static float _vq_quantthresh__44u3__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u3__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p1_0 = {
+	_vq_quantthresh__44u3__p1_0,
+	_vq_quantmap__44u3__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u3__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u3__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u3__p1_0,
+	NULL,
+	&_vq_auxt__44u3__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u3__p2_0[] = {
+	 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8,
+	 7, 6, 8, 8, 6, 8, 8, 8, 8, 9, 8, 9, 9, 6, 8, 7,
+	 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 8, 6, 8, 8, 6,
+	 8, 8, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9,
+	 8,
+};
+
+static float _vq_quantthresh__44u3__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u3__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p2_0 = {
+	_vq_quantthresh__44u3__p2_0,
+	_vq_quantmap__44u3__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u3__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u3__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u3__p2_0,
+	NULL,
+	&_vq_auxt__44u3__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u3__p3_0[] = {
+	 2, 4, 4, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8,
+	10, 9,12,12, 8, 9,10,12,12, 5, 7, 7,10,10, 7, 9,
+	 9,11,11, 7, 8, 9,10,11,10,11,10,14,13, 9,10,11,
+	13,13, 5, 7, 7,10,10, 7, 9, 8,11,10, 7, 9, 9,11,
+	11, 9,10,10,13,12,10,10,11,13,14, 8,10,10,14,13,
+	10,11,11,15,13, 9,11,11,14,13,13,14,13,17,15,12,
+	13,13,17,14, 8,10,10,14,14, 9,11,11,14,15,10,11,
+	12,14,16,12,13,13,14,17,13,13,14,14,17, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,11,11,15,
+	14,10,11,11,15,14, 7, 9, 9,12,12, 9,11,11,13,13,
+	 9,11,11,13,13,11,12,12,15,14,11,12,12,15,16, 7,
+	 9, 9,12,11, 8,11,10,13,12, 9,11,11,12,13,11,12,
+	11,16,14,11,12,13,15,16,10,12,12,17,15,11,12,13,
+	16,15,11,12,12,16,16,15,15,15,16,16,13,14,15, 0,
+	17, 9,11,11,15,15,10,12,11,16,15,11,12,12,15,17,
+	13,15,13,16,15,13,15,14, 0,18, 5, 7, 7,10,10, 7,
+	 9, 9,12,11, 7, 9, 9,11,11,10,11,11,14,14,10,11,
+	11,14,15, 7, 9, 9,12,11, 9,11,11,13,12, 8,10,11,
+	11,12,11,12,12,16,15,11,11,12,13,14, 7, 9, 9,12,
+	12, 9,11,11,13,13, 9,11,11,13,13,11,12,12,16,15,
+	12,12,12,15,15, 9,11,11,17,15,11,12,12,17,16,10,
+	11,12,15,15,13,14,15,18,17,13,13,14,15,15, 9,12,
+	12,15,14,11,13,12,16,16,11,12,12,15,15,13,15,14,
+	 0, 0,14,15,14,16,18, 8,10,10,15,15,10,12,12,16,
+	14,10,11,11,16,16,15,16,16,18,16,13,15,14,17,18,
+	 9,11,11,16,15,11,12,13,17,17,11,13,13,16,15,15,
+	16,16,18,18,14,16,15,18,17, 9,11,11,16,16,10,13,
+	12,16,16,11,12,12,16,16,14,16,16,17, 0,14,15,15,
+	18,16,12,14,14, 0, 0,14,15,16, 0, 0,14,15,15, 0,
+	 0,17,17,16, 0, 0,15,16,18,17, 0,11,14,14,18, 0,
+	12,15,13, 0,18,13,15,14,18, 0,15,16,15, 0,18,15,
+	18,17, 0,18, 8,10,10,15,15,10,12,11,15,15,10,11,
+	12,15,15,13,14,15,17, 0,14,15,16,17, 0, 9,11,11,
+	15,15,11,12,12,17,15,10,12,13,16,15,13,15,15,18,
+	18,15,16,17,18,18, 9,12,11,16,16,11,13,13,16,16,
+	11,13,13,18,15,14,15,15,18, 0,16,16,17, 0,17,12,
+	13,13,18,18,13,14,14,17,18,13,14,15,18,17,17,18,
+	18, 0,18,16,16,18,16, 0,12,15,13,18,18,13,14,15,
+	18,18,13,16,14,17,18,15,17,16, 0,18,17, 0,17, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44u3__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u3__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p3_0 = {
+	_vq_quantthresh__44u3__p3_0,
+	_vq_quantmap__44u3__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u3__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u3__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u3__p3_0,
+	NULL,
+	&_vq_auxt__44u3__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u3__p4_0[] = {
+	 4, 6, 6, 9, 9, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 9,
+	10, 9,12,11, 9, 9,10,11,12, 6, 7, 7, 9, 9, 7, 7,
+	 7,10,10, 6, 7, 7, 9,10,10,10,10,12,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 7, 7, 7,10, 9, 7, 7, 7,10,
+	10, 9,10, 9,12,11,10,10,10,12,12, 9,10,10,12,12,
+	10,10,10,13,12, 9,10,10,12,12,12,12,12,14,14,12,
+	12,12,13,14, 9,10,10,12,12, 9,10,10,12,12,10,10,
+	10,12,13,11,12,12,14,13,12,12,12,14,14, 6, 7, 7,
+	10, 9, 7, 8, 7,10,10, 7, 7, 7,10,10,10,10,10,12,
+	12,10,10,10,12,12, 7, 8, 8,10,10, 8, 8, 8,10,10,
+	 7, 8, 8,10,10,10,10,11,11,13,10,10,11,12,13, 6,
+	 7, 7,10,10, 7, 8, 7,10,10, 8, 8, 8,10,10,10,11,
+	10,13,11,10,10,10,12,12,10,10,10,13,12,10,10,10,
+	12,13,10,10,10,13,12,12,11,13,12,14,12,12,13,14,
+	14, 9,10,10,12,13, 9,10,10,12,12,10,10,11,12,13,
+	12,12,11,14,12,12,12,13,14,14, 6, 7, 7, 9, 9, 7,
+	 7, 7,10,10, 7, 7, 8,10,10,10,10,10,12,12,10,10,
+	10,12,12, 6, 7, 7,10,10, 8, 8, 8,10,10, 7, 7, 8,
+	10,10,10,10,10,12,12,10,10,11,11,13, 7, 8, 8,10,
+	10, 7, 8, 8,10,10, 8, 8, 8,10,10,10,10,10,12,12,
+	10,11,10,13,11, 9,10,10,13,12,10,11,10,13,12, 9,
+	10,10,12,13,12,13,12,14,14,12,11,12,12,14,10,10,
+	10,12,13,10,10,11,12,13,10,10,10,12,12,12,13,12,
+	14,14,12,12,11,14,12, 9,10, 9,12,12,10,10,10,13,
+	13, 9,10,10,13,13,12,13,13,15,14,12,12,13,14,14,
+	 9,10,10,13,13,10,10,10,12,13,10,10,10,13,12,13,
+	12,13,14,15,12,13,13,15,14, 9,10,10,13,12,10,10,
+	10,13,12,10,10,10,12,13,12,13,12,14,14,13,12,12,
+	14,14,12,12,12,15,14,12,11,12,14,14,12,13,12,14,
+	14,14,12,14,12,16,14,14,14,16,16,11,12,12,14,14,
+	11,12,11,15,13,12,12,12,14,15,13,14,12,16,13,14,
+	14,15,16,16, 9,10,10,12,12, 9,10,10,13,12, 9,10,
+	10,13,13,12,12,12,14,14,12,13,13,14,15, 9,10,10,
+	13,12,10,11,10,13,12,10,10,10,12,13,12,13,12,14,
+	14,12,12,13,14,15, 9,10,10,13,13,10,10,10,12,13,
+	10,10,10,13,13,12,13,13,14,15,13,13,12,14,14,11,
+	12,12,14,14,12,13,12,15,14,11,11,12,14,15,14,14,
+	14,16,16,14,12,14,13,16,12,12,12,14,15,12,12,13,
+	14,15,12,12,11,14,14,14,14,14,16,16,14,14,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u3__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u3__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p4_0 = {
+	_vq_quantthresh__44u3__p4_0,
+	_vq_quantmap__44u3__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u3__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u3__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u3__p4_0,
+	NULL,
+	&_vq_auxt__44u3__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u3__p5_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 9, 9, 4, 5, 4, 7, 6, 8, 8,
+	 9, 9, 4, 4, 4, 6, 7, 8, 8, 9, 9, 6, 7, 6, 8, 8,
+	 9, 9,10,10, 6, 6, 7, 8, 8, 9, 9,10,10, 8, 8, 8,
+	 9, 9,10,10,11,11, 8, 8, 8, 9, 9,10,10,11,11, 9,
+	 9, 9,10,10,11,11,12,12, 9, 9,10,10,10,11,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44u3__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u3__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p5_0 = {
+	_vq_quantthresh__44u3__p5_0,
+	_vq_quantmap__44u3__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u3__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u3__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u3__p5_0,
+	NULL,
+	&_vq_auxt__44u3__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u3__p6_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9,10,10,11,13,14, 4, 6, 5,
+	 8, 8, 9, 9,10,10,11,11,14,14, 4, 5, 6, 8, 8, 9,
+	 9,10,10,11,11,14,14, 7, 8, 8, 9, 9,10,10,11,11,
+	12,12,15,15, 7, 8, 8, 9, 9,10,10,11,11,12,12,14,
+	15, 8, 9, 9,10,10,11,11,12,12,13,12,16,16, 8, 9,
+	 9,10,10,11,11,12,12,12,12,16,16,10,11,10,11,11,
+	12,12,13,13,13,13,17,16,10,11,11,11,11,12,12,12,
+	12,13,13,17,17,11,11,12,12,12,13,13,13,14,14,14,
+	16,17,11,12,11,12,12,13,13,14,14,14,14,19,17,14,
+	14,14,16,15,16,16,16,17,17,17,20,19,14,15,15,15,
+	15,15,16,16,17,17,17,20,19,
+};
+
+static float _vq_quantthresh__44u3__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u3__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p6_0 = {
+	_vq_quantthresh__44u3__p6_0,
+	_vq_quantmap__44u3__p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u3__p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u3__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u3__p6_0,
+	NULL,
+	&_vq_auxt__44u3__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u3__p6_1[] = {
+	 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5,
+	 6, 5, 6, 6, 5, 5, 6, 6, 6,
+};
+
+static float _vq_quantthresh__44u3__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u3__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p6_1 = {
+	_vq_quantthresh__44u3__p6_1,
+	_vq_quantmap__44u3__p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u3__p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u3__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u3__p6_1,
+	NULL,
+	&_vq_auxt__44u3__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p7_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u3__p7_0[] = {
+	 1, 4, 4, 9, 9, 9, 9, 9, 9, 4, 9, 9, 9, 9, 9, 9,
+	 9, 9, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44u3__p7_0[] = {
+	-892.5, -637.5, -382.5, -127.5, 127.5, 382.5, 637.5, 892.5, 
+};
+
+static long _vq_quantmap__44u3__p7_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p7_0 = {
+	_vq_quantthresh__44u3__p7_0,
+	_vq_quantmap__44u3__p7_0,
+	9,
+	9
+};
+
+static static_codebook _44u3__p7_0 = {
+	2, 81,
+	_vq_lengthlist__44u3__p7_0,
+	1, -515907584, 1627381760, 4, 0,
+	_vq_quantlist__44u3__p7_0,
+	NULL,
+	&_vq_auxt__44u3__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p7_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u3__p7_1[] = {
+	 1, 4, 4, 6, 5, 7, 7, 9, 8,10,10,11,11,12,13, 4,
+	 7, 6, 7, 7, 9, 9,10,10,11,11,14,13,14,13, 4, 6,
+	 7, 7, 8, 9, 9,10,10,12,12,13,13,13,13, 6, 8, 8,
+	10, 9,11,11,12,12,13,13,14,14,15,14, 6, 8, 8, 9,
+	 9,11,11,12,12,14,14,14,15,15,15, 8, 9, 9,11,10,
+	13,12,14,14,14,14,15,16,15,15, 8, 9, 9,11,11,12,
+	12,14,14,15,14,15,15,14,17, 9,10,10,13,12,14,14,
+	15,14,14,17,15,15,16,15, 9,11,11,12,13,14,14,15,
+	15,15,16,15,17,16,17,11,12,12,14,14,15,14,16,16,
+	16,15,15,17,16,16,11,12,13,14,15,15,15,15,15,16,
+	16,17,17,16,17,12,13,13,15,14,15,15,15,15,16,16,
+	16,17,17,17,13,12,14,14,15,15,15,15,16,17,17,15,
+	17,17,17,12,14,14,16,15,17,16,17,16,17,16,17,17,
+	17,17,14,13,14,15,16,17,17,17,15,17,17,17,16,17,
+	16,
+};
+
+static float _vq_quantthresh__44u3__p7_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__44u3__p7_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p7_1 = {
+	_vq_quantthresh__44u3__p7_1,
+	_vq_quantmap__44u3__p7_1,
+	15,
+	15
+};
+
+static static_codebook _44u3__p7_1 = {
+	2, 225,
+	_vq_lengthlist__44u3__p7_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__44u3__p7_1,
+	NULL,
+	&_vq_auxt__44u3__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u3__p7_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u3__p7_2[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9,10, 9, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10, 9, 9, 9, 9, 9,
+	 9, 9,10, 9,10,10,10,10,10,10,10,10, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,
+	 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9,
+	 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9,10,10, 9,10, 9,10,10,10,10,10,10,10,10,10,10,
+	 9,10, 9,10, 9,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44u3__p7_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u3__p7_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u3__p7_2 = {
+	_vq_quantthresh__44u3__p7_2,
+	_vq_quantmap__44u3__p7_2,
+	17,
+	17
+};
+
+static static_codebook _44u3__p7_2 = {
+	2, 289,
+	_vq_lengthlist__44u3__p7_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u3__p7_2,
+	NULL,
+	&_vq_auxt__44u3__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u3__short[] = {
+	17,17,17,17,17,17,16,16,16,12,11,13,11,12,11,15,
+	16, 9, 4, 8, 5, 7, 9,15,16,14, 9,12,10,10,12,16,
+	16,11, 4, 9, 3, 4, 8,16,16,12, 6,10, 3, 4, 7,16,
+	16,12, 6,11, 3, 3, 4,12,16,16, 7,13, 5, 5, 6,13,
+};
+
+static static_codebook _huff_book__44u3__short = {
+	2, 64,
+	_huff_lengthlist__44u3__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u4__long[] = {
+	 3, 7,11,11,12,11,11,12, 5, 3, 5, 7, 8, 8, 9,11,
+	 9, 4, 4, 6, 6, 7, 9,15,10, 6, 6, 7, 7, 7, 8,14,
+	12, 7, 5, 6, 4, 5, 7,15,10, 7, 6, 7, 5, 5, 6,13,
+	 9, 8, 8, 7, 7, 5, 4, 8,10,12,14,13,14,10, 5, 7,
+};
+
+static static_codebook _huff_book__44u4__long = {
+	2, 64,
+	_huff_lengthlist__44u4__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u4__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8,
+	10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11,
+	11, 8,11,11, 8,11,11,11,13,14,11,14,14, 7,11,10,
+	10,14,12,11,14,14, 4, 8, 8, 8,11,11, 8,11,11, 8,
+	11,11,11,14,14,10,12,14, 8,11,11,11,14,14,11,14,
+	13,
+};
+
+static float _vq_quantthresh__44u4__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u4__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p1_0 = {
+	_vq_quantthresh__44u4__p1_0,
+	_vq_quantmap__44u4__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u4__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u4__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u4__p1_0,
+	NULL,
+	&_vq_auxt__44u4__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u4__p2_0[] = {
+	 2, 5, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 7, 8, 8, 5, 6, 6, 7, 8,
+	 8, 6, 8, 8, 7, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8,
+	 7, 9, 8, 8, 9,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6,
+	 8, 8, 8,10, 9, 8, 8, 9, 6, 8, 8, 8,10,10, 8,10,
+	 9,
+};
+
+static float _vq_quantthresh__44u4__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u4__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p2_0 = {
+	_vq_quantthresh__44u4__p2_0,
+	_vq_quantmap__44u4__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u4__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u4__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u4__p2_0,
+	NULL,
+	&_vq_auxt__44u4__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u4__p3_0[] = {
+	 2, 4, 4, 7, 7, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8,
+	10, 9,12,12, 8, 9, 9,12,12, 5, 7, 7,10, 9, 7, 9,
+	 9,11,11, 7, 8, 9,10,11,10,11,11,13,13, 9,10,11,
+	13,13, 5, 7, 7, 9,10, 7, 9, 9,11,11, 7, 9, 9,11,
+	11, 9,11,10,13,12,10,11,11,13,13, 8,10,10,13,13,
+	10,11,11,15,13, 9,11,11,14,13,13,15,13,16,15,12,
+	13,13,15,15, 8,10,10,13,14, 9,11,11,14,14,10,11,
+	12,14,16,12,13,13,14,16,13,14,14,15,17, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,11,11,15,
+	14,10,11,11,14,14, 7, 9, 9,12,12, 9,11,11,13,13,
+	 9,11,11,13,13,11,12,13,15,15,11,13,13,16,15, 7,
+	 9, 9,11,11, 9,11,10,13,12, 9,11,12,13,13,11,13,
+	12,16,14,11,13,13,15,16,10,12,12,18,15,11,12,13,
+	16,15,11,13,13,17,16,15,15,15,17,17,14,15,16,18,
+	19, 9,11,11,15,15,10,12,11,15,16,11,13,13,15,16,
+	13,15,13,18,15,14,15,15,17,19, 5, 7, 7,10,10, 7,
+	 9, 9,12,11, 7, 9, 9,11,12,10,12,11,14,14,10,11,
+	12,14,15, 7, 9, 9,11,11, 9,11,11,13,12, 9,10,11,
+	12,13,11,13,13,16,17,11,11,13,14,15, 7, 9, 9,12,
+	12, 9,11,11,13,13, 9,11,11,13,13,11,13,12,15,16,
+	11,13,13,16,15, 9,11,11,16,15,11,13,12,16,15,10,
+	12,12,16,15,14,15,16,19,17,13,14,15,15,16,10,11,
+	12,15,15,11,13,13,16,16,11,13,12,16,17,14,15,15,
+	18,17,14,16,14,16,19, 7,10,10,15,14,10,12,12,16,
+	15,10,11,11,16,15,14,16,16,19,18,13,15,14,17,17,
+	 9,11,11,17,16,11,13,14,18,17,11,13,13,16,16,15,
+	16,17,19, 0,14,15,18,16,19, 9,11,11,16,15,11,13,
+	12,18,16,11,13,13,17,16,14,16,16,17,19,15,16,15,
+	18, 0,12,14,15,18,19,13,15,16,19,17,14,16,15,18,
+	 0,17,16,19, 0,18,16,17,18, 0, 0,11,13,14,18,19,
+	13,15,13,19,19,14,15,15,17,17,15,17,15,19,17,16,
+	18,18,19, 0, 8,10,10,14,14,10,12,11,15,15,10,11,
+	12,15,17,13,15,15,17,16,14,15,15,18, 0, 9,11,11,
+	15,15,11,13,13,18,16,10,12,13,16,17,14,15,16,17,
+	18,14,15,17,19,19, 9,12,12,15,16,11,13,13,16,17,
+	11,14,13,19,16,14,16,15,18,19,15,16,18,19,18,12,
+	14,14,19,18,13,15,17,18,17,13,14,15,18, 0,16, 0,
+	 0,18,18,16,15, 0,17,19,12,15,14,17, 0,13,15,16,
+	19,18,13,16,15, 0,19,16,18,16,19,18,17,19,16, 0,
+	19,
+};
+
+static float _vq_quantthresh__44u4__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u4__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p3_0 = {
+	_vq_quantthresh__44u4__p3_0,
+	_vq_quantmap__44u4__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u4__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u4__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u4__p3_0,
+	NULL,
+	&_vq_auxt__44u4__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u4__p4_0[] = {
+	 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 9,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 6, 7, 8, 9,10, 9,10,10,11,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,12,11, 9,10,10,12,11, 9, 9, 9,12,11,
+	 9,10,10,12,12, 9,10,10,12,12,11,12,12,13,14,11,
+	11,12,13,14, 9, 9, 9,11,12, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,11,14,13,11,12,12,13,13, 5, 7, 7,
+	 9, 9, 7, 8, 8,10,10, 7, 7, 8,10,10, 9,10,10,12,
+	12, 9,10,10,12,12, 7, 8, 8,10,10, 8, 8, 9,10,11,
+	 8, 9, 9,11,11,10,10,11,11,13,10,10,11,12,13, 6,
+	 7, 8,10,10, 7, 9, 8,11,10, 8, 8, 9,10,11,10,11,
+	10,13,11,10,11,11,13,12, 9,10,10,12,12,10,10,11,
+	12,13,10,11,11,13,13,12,11,13,12,15,12,13,13,14,
+	14, 9,10,10,12,12, 9,11,10,13,12,10,11,11,13,13,
+	11,13,11,14,12,12,13,13,14,15, 5, 7, 7, 9, 9, 7,
+	 8, 7,10,10, 7, 8, 8,10,10, 9,10,10,12,12, 9,10,
+	10,12,12, 6, 8, 7,10,10, 8, 9, 8,11,10, 7, 8, 9,
+	10,11,10,11,11,12,13,10,10,11,11,13, 7, 8, 8,10,
+	10, 8, 9, 9,10,11, 8, 9, 8,11,10,10,11,11,13,12,
+	10,11,10,13,11, 9,10,10,13,12,10,11,11,13,13, 9,
+	10,10,12,13,12,13,13,15,14,11,11,13,12,14, 9,10,
+	10,12,12,10,11,11,13,13,10,11,10,13,12,12,13,13,
+	14,14,12,13,11,15,12, 8, 9, 9,12,12, 9,10,10,13,
+	12, 9,10,10,12,12,12,13,12,14,14,11,12,12,14,13,
+	 9,10,10,12,12,10,10,11,13,13,10,11,11,13,12,12,
+	13,13,14,15,12,13,13,15,14, 9,10,10,12,12, 9,11,
+	10,13,12,10,10,11,12,13,12,13,12,15,14,12,13,13,
+	14,14,11,12,12,14,13,11,11,12,13,14,12,13,13,15,
+	14,13,12,14,12,16,14,15,14,16,16,11,12,12,14,14,
+	11,12,11,15,13,12,13,13,14,15,13,14,12,16,13,14,
+	14,15,16,16, 8, 9, 9,12,12, 9,10,10,12,12, 9,10,
+	10,12,13,11,12,12,14,13,12,12,13,14,14, 9,10,10,
+	12,12,10,11,11,13,12,10,10,11,12,13,12,13,13,14,
+	14,12,12,13,14,15, 9,10,10,12,13,10,11,11,12,13,
+	10,11,10,13,13,12,13,13,14,15,12,13,13,15,14,11,
+	12,12,14,14,12,13,13,15,14,11,11,12,14,15,14,14,
+	14,17,16,13,12,14,13,16,11,12,12,13,15,12,13,13,
+	14,15,11,12,11,14,14,14,15,14,15,17,13,14,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u4__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u4__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p4_0 = {
+	_vq_quantthresh__44u4__p4_0,
+	_vq_quantmap__44u4__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u4__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u4__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u4__p4_0,
+	NULL,
+	&_vq_auxt__44u4__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u4__p5_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 9, 9, 4, 5, 4, 7, 6, 8, 7,
+	10, 9, 4, 4, 5, 6, 7, 7, 8, 9, 9, 6, 7, 6, 8, 8,
+	 8, 8,10,10, 6, 6, 7, 8, 8, 8, 9,10,10, 7, 8, 7,
+	 9, 8,10,10,11,11, 7, 7, 8, 8, 9,10,10,11,11, 9,
+	10, 9,10,10,11,11,12,12, 9, 9,10,10,10,11,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44u4__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u4__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p5_0 = {
+	_vq_quantthresh__44u4__p5_0,
+	_vq_quantmap__44u4__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u4__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u4__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u4__p5_0,
+	NULL,
+	&_vq_auxt__44u4__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u4__p6_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9,10,10,11,13,13, 4, 6, 5,
+	 8, 8, 9, 9,10,10,11,11,14,14, 4, 5, 6, 8, 8, 9,
+	 9,10,10,11,11,14,14, 7, 8, 8, 9, 9,10,10,11,11,
+	12,12,15,15, 7, 8, 8, 9, 9,10,10,11,11,12,12,15,
+	15, 8, 9, 9,10,10,11,11,12,12,13,13,16,16, 8, 9,
+	 9,10,10,11,11,12,12,13,13,16,16,10,10,10,11,11,
+	12,12,13,13,14,13,16,16,10,10,11,11,12,12,12,13,
+	13,13,14,16,17,11,12,11,12,12,13,13,13,14,14,14,
+	17,16,11,11,12,12,12,13,13,14,14,15,14,17,17,14,
+	14,14,15,15,16,16,17,17,17,19,19, 0,14,15,15,15,
+	15,16,16,16,17,17,19,20,20,
+};
+
+static float _vq_quantthresh__44u4__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u4__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p6_0 = {
+	_vq_quantthresh__44u4__p6_0,
+	_vq_quantmap__44u4__p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u4__p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u4__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u4__p6_0,
+	NULL,
+	&_vq_auxt__44u4__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u4__p6_1[] = {
+	 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5,
+	 6, 5, 6, 6, 5, 5, 6, 6, 6,
+};
+
+static float _vq_quantthresh__44u4__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u4__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p6_1 = {
+	_vq_quantthresh__44u4__p6_1,
+	_vq_quantmap__44u4__p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u4__p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u4__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u4__p6_1,
+	NULL,
+	&_vq_auxt__44u4__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u4__p7_0[] = {
+	 1, 3, 3,11,11,11,11,11,11,11,11,11,11, 4,10, 9,
+	11,11,11,11,11,11,11,11,11,11, 4,10,10,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44u4__p7_0[] = {
+	-1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 382.5, 
+	637.5, 892.5, 1147.5, 1402.5, 
+};
+
+static long _vq_quantmap__44u4__p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p7_0 = {
+	_vq_quantthresh__44u4__p7_0,
+	_vq_quantmap__44u4__p7_0,
+	13,
+	13
+};
+
+static static_codebook _44u4__p7_0 = {
+	2, 169,
+	_vq_lengthlist__44u4__p7_0,
+	1, -514332672, 1627381760, 4, 0,
+	_vq_quantlist__44u4__p7_0,
+	NULL,
+	&_vq_auxt__44u4__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p7_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u4__p7_1[] = {
+	 1, 4, 4, 6, 6, 7, 7, 9, 8,10,10,11,11,12,12, 4,
+	 7, 6, 8, 7, 9, 9,10,10,11,10,12,11,12,12, 4, 6,
+	 6, 7, 8, 9, 9,10,10,11,11,12,12,13,13, 6, 8, 8,
+	10, 9,11,10,11,11,12,12,14,13,13,13, 6, 8, 8, 9,
+	 9,11,11,12,12,12,12,13,14,13,14, 8, 9, 9,11,10,
+	12,12,13,12,13,14,14,14,14,14, 8, 9, 9,10,11,12,
+	11,12,13,13,14,14,13,14,14, 9,10,10,12,12,14,13,
+	14,14,15,15,16,15,15,15, 9,10,10,11,12,13,13,13,
+	14,15,15,18,16,17,15,10,12,12,13,13,15,14,15,14,
+	16,16,16,15,16,15,10,11,11,13,13,14,14,17,16,15,
+	16,18,16,15,16,11,12,13,14,13,15,14,15,16,17,15,
+	16,16,15,16,11,12,13,14,15,14,16,15,15,16,15,15,
+	17,17,17,12,13,13,14,14,14,15,16,14,15,15,16,16,
+	16,16,12,13,13,13,14,15,15,15,14,16,16,16,16,16,
+	17,
+};
+
+static float _vq_quantthresh__44u4__p7_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__44u4__p7_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p7_1 = {
+	_vq_quantthresh__44u4__p7_1,
+	_vq_quantmap__44u4__p7_1,
+	15,
+	15
+};
+
+static static_codebook _44u4__p7_1 = {
+	2, 225,
+	_vq_lengthlist__44u4__p7_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__44u4__p7_1,
+	NULL,
+	&_vq_auxt__44u4__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u4__p7_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u4__p7_2[] = {
+	 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 5, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10,10,10,10, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10, 9, 9, 9, 9, 9,
+	 9, 9,10, 9, 9,10,10,10,10,10,10,10, 9, 9, 9, 9,
+	 9, 9,10, 9,10,10,10,10,10,10,10,10,10, 9, 9, 9,
+	 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9,
+	 9, 9, 9,10, 9,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	 9, 9, 9,10, 9,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__44u4__p7_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u4__p7_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u4__p7_2 = {
+	_vq_quantthresh__44u4__p7_2,
+	_vq_quantmap__44u4__p7_2,
+	17,
+	17
+};
+
+static static_codebook _44u4__p7_2 = {
+	2, 289,
+	_vq_lengthlist__44u4__p7_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u4__p7_2,
+	NULL,
+	&_vq_auxt__44u4__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u4__short[] = {
+	 3, 9,14,12,17,13,13,13, 4, 7, 8, 9,12,10,11,12,
+	 6, 5, 4, 7, 6, 7, 9,14, 8, 8, 7, 9, 8, 9,10,13,
+	 9, 8, 5, 7, 3, 5, 8,15, 9, 9, 6, 8, 4, 5, 7,16,
+	11,10, 6, 9, 4, 3, 6,15,17,16, 8,11, 5, 5, 7,16,
+};
+
+static static_codebook _huff_book__44u4__short = {
+	2, 64,
+	_huff_lengthlist__44u4__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u5__long[] = {
+	 3, 8,13,12,14,13,16,11,12,13, 5, 4, 5, 6, 8, 9,
+	10, 9,12,12,10, 5, 4, 6, 6, 8, 9,10,14,16,10, 6,
+	 6, 6, 6, 7, 9, 8,12,13,13, 7, 5, 6, 4, 6, 6, 7,
+	11,16,10, 7, 7, 7, 6, 6, 7, 7,11,14,14, 9, 8, 8,
+	 5, 6, 6, 7,11,16, 9, 8, 8, 8, 6, 6, 6, 4, 7,12,
+	11,10,12,11,10, 9,10, 5, 6,10,10,13,15,15,15,15,
+	14, 8, 7, 9,
+};
+
+static static_codebook _huff_book__44u5__long = {
+	2, 100,
+	_huff_lengthlist__44u5__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u5__p1_0[] = {
+	 1, 4, 4, 5, 8, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7,
+	 9,10, 5, 8, 8, 7,10, 9, 8,10,10, 4, 8, 8, 8,11,
+	10, 8,10,10, 8,11,11,10,12,13,10,13,13, 7,10,10,
+	 9,13,11,10,13,13, 5, 8, 8, 8,10,10, 8,10,10, 7,
+	10,10,10,13,13,10,11,13, 8,10,11,10,13,13,10,13,
+	12,
+};
+
+static float _vq_quantthresh__44u5__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u5__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p1_0 = {
+	_vq_quantthresh__44u5__p1_0,
+	_vq_quantmap__44u5__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u5__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u5__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u5__p1_0,
+	NULL,
+	&_vq_auxt__44u5__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u5__p2_0[] = {
+	 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8,
+	 7, 6, 8, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 7, 8,
+	 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 8, 8, 6,
+	 8, 8, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u5__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u5__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p2_0 = {
+	_vq_quantthresh__44u5__p2_0,
+	_vq_quantmap__44u5__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u5__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u5__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u5__p2_0,
+	NULL,
+	&_vq_auxt__44u5__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u5__p3_0[] = {
+	 2, 4, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8,
+	10, 9,12,12, 8, 9,10,12,13, 5, 7, 7,10, 9, 7, 9,
+	 9,11,11, 7, 8, 9,10,11,10,11,11,13,14, 9,10,11,
+	13,13, 5, 7, 7, 9, 9, 7, 9, 8,11,10, 7, 9, 9,11,
+	11, 9,11,10,14,13,10,11,11,13,14, 8,10,10,13,13,
+	10,11,11,15,14, 9,11,11,14,14,13,15,14,18,16,12,
+	13,14,16,16, 8,10,10,13,13, 9,11,11,14,14,10,11,
+	12,14,15,12,13,13,16,16,13,14,14,15,17, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,11,11,15,
+	14,10,11,11,14,14, 7, 9, 9,12,11, 9,11,11,13,13,
+	 9,11,11,13,13,12,12,13,15,15,11,12,13,16,15, 6,
+	 9, 9,11,11, 8,11,10,13,12, 9,10,11,12,14,11,13,
+	11,16,14,11,13,13,15,16,10,11,11,15,15,11,12,13,
+	16,15,11,13,13,16,16,14,15,15,17,18,14,15,16,17,
+	18, 9,11,11,14,15,10,12,11,15,15,11,12,13,15,16,
+	13,15,13,17,15,14,15,16,18,19, 5, 7, 7,10,10, 7,
+	 9, 9,11,11, 7, 9, 9,11,11,10,11,11,15,14,10,11,
+	11,14,15, 6, 9, 9,11,11, 9,11,10,13,13, 8,10,11,
+	12,13,11,13,13,15,15,11,11,13,13,15, 7, 9, 9,11,
+	12, 9,11,11,13,13, 9,11,11,13,13,11,13,12,17,16,
+	11,13,12,16,15, 9,11,11,15,14,11,13,13,16,16,10,
+	11,12,15,15,14,15,15,17,17,13,13,15,15,17,10,11,
+	12,15,15,11,13,13,16,19,11,13,12,17,17,14,16,15,
+	19,17,14,15,15,18,18, 8,10,10,14,14,10,12,11,16,
+	15, 9,11,11,15,16,14,16,15,17,17,13,14,14,18,17,
+	 9,11,11,16,15,11,13,13,16,18,11,13,13,17,16,15,
+	16,17,18, 0,15,15,16, 0,18, 9,11,11,16,15,10,13,
+	12,17,15,11,13,13,16,17,14,18,15,19,18,15,16,16,
+	19,18,13,15,15,19,17,13,15,15,18,18,14,15,15,19,
+	 0,17,18, 0,19,19,16,17,17, 0,18,12,14,13,18,17,
+	13,15,13,19,18,14,15,15,19,19,16,17,15, 0,17,16,
+	19,17,19,18, 8,10,10,14,14,10,11,11,15,15,10,11,
+	11,16,16,13,15,15,17,16,14,15,15,18,19, 9,11,11,
+	16,15,11,13,13,19,16,10,12,13,15,17,15,15,15,19,
+	19,15,16,16,17, 0, 9,11,11,16,16,11,13,13,16,17,
+	11,13,13,18,18,14,16,15,18,18,15,17,16,19, 0,12,
+	14,14,17,18,13,16,16,18,18,13,14,15,17, 0,16,17,
+	17, 0, 0,16,15, 0,19,17,12,15,14,17,18,14,15,16,
+	 0,18,14,16,16,18, 0,16,17,17, 0, 0,17,19,17,19,
+	 0,
+};
+
+static float _vq_quantthresh__44u5__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u5__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p3_0 = {
+	_vq_quantthresh__44u5__p3_0,
+	_vq_quantmap__44u5__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u5__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u5__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u5__p3_0,
+	NULL,
+	&_vq_auxt__44u5__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u5__p4_0[] = {
+	 4, 6, 6, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 6, 7, 8, 9,10, 9,10,10,11,11, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 6, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,12,11,
+	 9,10,10,12,12, 9,10,10,12,12,11,12,12,13,13,11,
+	11,12,12,13, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,11,13,13,11,12,12,14,13, 6, 7, 7,
+	 9, 9, 7, 8, 7,10,10, 7, 7, 8, 9,10, 9,10,10,12,
+	11, 9,10,10,11,11, 7, 8, 8,10,10, 8, 8, 9,10,11,
+	 8, 8, 8,11,10,10,10,11,11,12,10,10,11,12,12, 6,
+	 7, 7,10,10, 7, 8, 8,11,10, 8, 8, 9,10,11,10,11,
+	10,13,11,10,10,11,12,12, 9,10,10,12,12,10,10,10,
+	12,13,10,11,11,13,13,12,11,12,11,14,12,12,13,13,
+	14, 9,10,10,12,12, 9,10,10,12,12,10,10,11,12,13,
+	11,12,11,14,12,12,12,12,14,14, 6, 7, 7, 9, 9, 7,
+	 8, 7,10,10, 7, 7, 8,10,10, 9,10,10,11,11, 9,10,
+	10,12,12, 6, 7, 7,10,10, 8, 9, 8,11,10, 7, 8, 8,
+	10,11,10,10,11,12,12,10,10,11,11,13, 7, 8, 8,10,
+	10, 8, 8, 8,10,11, 8, 9, 8,11,10,10,11,10,12,12,
+	10,11,10,12,11, 9,10,10,12,12,10,11,11,13,12, 9,
+	10,10,12,12,12,12,12,14,14,11,11,12,12,14, 9,10,
+	10,12,12,10,11,11,12,12,10,10,10,12,12,12,13,12,
+	14,14,11,12,11,14,11, 8, 9, 9,11,11, 9,10,10,12,
+	12, 9,10,10,12,12,11,12,12,14,14,11,12,12,13,13,
+	 9,10,10,12,12,10,10,11,12,13,10,11,10,13,12,12,
+	12,13,14,14,12,12,12,14,13, 9,10,10,12,12, 9,10,
+	10,13,12,10,10,11,12,13,12,13,12,14,13,12,12,13,
+	13,14,11,12,11,14,13,11,11,12,13,14,12,13,12,14,
+	14,13,12,14,11,16,13,14,14,16,15,11,11,11,13,13,
+	11,12,11,14,13,12,12,13,14,15,12,14,12,16,12,14,
+	14,14,16,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,12,13,13,12,12,12,14,14, 9,10,10,
+	12,12,10,11,10,13,12, 9,10,10,12,13,12,12,12,14,
+	13,12,12,13,13,15, 9,10,10,12,12,10,10,11,12,13,
+	10,11,10,13,12,12,13,12,14,14,12,13,12,14,13,11,
+	11,11,13,13,12,13,12,14,14,11,11,12,13,14,13,14,
+	14,16,15,13,12,14,12,15,11,12,12,13,14,12,12,13,
+	14,14,11,12,11,14,13,13,14,14,15,16,13,14,11,16,
+	11,
+};
+
+static float _vq_quantthresh__44u5__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u5__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p4_0 = {
+	_vq_quantthresh__44u5__p4_0,
+	_vq_quantmap__44u5__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u5__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u5__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u5__p4_0,
+	NULL,
+	&_vq_auxt__44u5__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u5__p5_0[] = {
+	 2, 4, 3, 6, 6, 8, 7,10,10, 3, 5, 5, 8, 7, 8, 8,
+	11,11, 3, 5, 5, 7, 8, 8, 8,10,11, 6, 8, 7, 9, 9,
+	10, 9,12,11, 7, 7, 8, 9, 9, 9,10,11,12, 8, 8, 8,
+	10, 9,11,11,13,12, 8, 8, 8, 9,10,11,12,12,13,10,
+	11,10,12,11,13,12,14,14,10,10,11,11,12,12,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44u5__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u5__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p5_0 = {
+	_vq_quantthresh__44u5__p5_0,
+	_vq_quantmap__44u5__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u5__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u5__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u5__p5_0,
+	NULL,
+	&_vq_auxt__44u5__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p6_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u5__p6_0[] = {
+	 3, 4, 4, 5, 6, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7,
+	 9, 9, 4, 4, 4, 6, 6, 7, 7, 9, 9, 6, 6, 6, 7, 7,
+	 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8,10,10, 7, 7, 7,
+	 8, 8, 9, 9,10,10, 7, 7, 7, 8, 8, 9, 9,10,11, 9,
+	 9, 9,10,10,11,10,11,11, 9, 9, 9,10,10,11,11,11,
+	11,
+};
+
+static float _vq_quantthresh__44u5__p6_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u5__p6_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p6_0 = {
+	_vq_quantthresh__44u5__p6_0,
+	_vq_quantmap__44u5__p6_0,
+	9,
+	9
+};
+
+static static_codebook _44u5__p6_0 = {
+	2, 81,
+	_vq_lengthlist__44u5__p6_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u5__p6_0,
+	NULL,
+	&_vq_auxt__44u5__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u5__p7_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 8,11,10, 7,
+	10,10, 5, 9, 9, 8,10,10, 8,10,11, 4, 9, 9, 9,11,
+	11, 9,12,11, 8,11,11,11,12,12,10,12,12, 7,11,11,
+	10,12,12,10,12,12, 4, 9, 9, 9,11,11, 9,11,11, 7,
+	11,11,10,12,12,10,11,12, 8,11,11,10,12,12,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44u5__p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44u5__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p7_0 = {
+	_vq_quantthresh__44u5__p7_0,
+	_vq_quantmap__44u5__p7_0,
+	3,
+	3
+};
+
+static static_codebook _44u5__p7_0 = {
+	4, 81,
+	_vq_lengthlist__44u5__p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44u5__p7_0,
+	NULL,
+	&_vq_auxt__44u5__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u5__p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 7, 7,
+	 8, 8, 9, 8, 9, 8, 4, 5, 5, 7, 7, 8, 8, 8, 9, 9,
+	 9, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 6, 7, 7, 8,
+	 8, 8, 9, 9, 9, 9, 9, 8, 8, 8, 9, 8, 9, 9, 9, 9,
+	 9, 9, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8,
+	 9, 9, 9, 9,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,10,
+	10,10,10, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, 8, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,
+};
+
+static float _vq_quantthresh__44u5__p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u5__p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p7_1 = {
+	_vq_quantthresh__44u5__p7_1,
+	_vq_quantmap__44u5__p7_1,
+	11,
+	11
+};
+
+static static_codebook _44u5__p7_1 = {
+	2, 121,
+	_vq_lengthlist__44u5__p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u5__p7_1,
+	NULL,
+	&_vq_auxt__44u5__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p8_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u5__p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7,
+	 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, 9,10,10,11,
+	11, 6, 8, 8, 9, 9,10,10,12,11,13,12, 6, 7, 8, 9,
+	 9,10,10,11,11,12,12, 8, 9, 9,10,10,11,12,12,12,
+	14,13, 8, 9, 9,10,10,11,11,12,13,14,13,10,11,10,
+	12,12,13,13,14,13,15,14,10,11,11,12,12,12,13,13,
+	13,15,15,11,12,12,13,12,13,14,14,14,15,14,11,11,
+	12,13,13,13,14,14,14,15,15,
+};
+
+static float _vq_quantthresh__44u5__p8_0[] = {
+	-49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 27.5, 
+	38.5, 49.5, 
+};
+
+static long _vq_quantmap__44u5__p8_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p8_0 = {
+	_vq_quantthresh__44u5__p8_0,
+	_vq_quantmap__44u5__p8_0,
+	11,
+	11
+};
+
+static static_codebook _44u5__p8_0 = {
+	2, 121,
+	_vq_lengthlist__44u5__p8_0,
+	1, -524582912, 1618345984, 4, 0,
+	_vq_quantlist__44u5__p8_0,
+	NULL,
+	&_vq_auxt__44u5__p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p8_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u5__p8_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 6, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8,
+	 8, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 6, 6, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u5__p8_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u5__p8_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p8_1 = {
+	_vq_quantthresh__44u5__p8_1,
+	_vq_quantmap__44u5__p8_1,
+	11,
+	11
+};
+
+static static_codebook _44u5__p8_1 = {
+	2, 121,
+	_vq_lengthlist__44u5__p8_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u5__p8_1,
+	NULL,
+	&_vq_auxt__44u5__p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p9_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u5__p9_0[] = {
+	 1, 3, 3,12,10,12,12,12,12,12,12,12,12, 3, 8, 9,
+	12,12,12,12,12,12,12,12,12,12, 4, 9, 9,12,12,12,
+	12,12,12,12,12,12,12,11,12,12,12,12,12,12,12,12,
+	12,12,12,12, 9,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,
+};
+
+static float _vq_quantthresh__44u5__p9_0[] = {
+	-1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 382.5, 
+	637.5, 892.5, 1147.5, 1402.5, 
+};
+
+static long _vq_quantmap__44u5__p9_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p9_0 = {
+	_vq_quantthresh__44u5__p9_0,
+	_vq_quantmap__44u5__p9_0,
+	13,
+	13
+};
+
+static static_codebook _44u5__p9_0 = {
+	2, 169,
+	_vq_lengthlist__44u5__p9_0,
+	1, -514332672, 1627381760, 4, 0,
+	_vq_quantlist__44u5__p9_0,
+	NULL,
+	&_vq_auxt__44u5__p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u5__p9_1[] = {
+	 1, 4, 4, 7, 7, 8, 9, 7, 7, 8, 8, 9, 9,10,10, 5,
+	 6, 6, 9, 8,10,10, 9, 8, 9, 9,10, 9,11,10, 4, 6,
+	 6, 8, 9, 9,10, 8, 9, 9,10,10,10,11,10, 7, 8, 8,
+	10,10,11,11,10,10,11,11,11,11,11,11, 7, 8, 8,10,
+	10,11,11,10,10,11,11,11,11,11,12, 8, 9,10,11,10,
+	12,12,11,11,11,11,12,12,12,13, 8, 9, 9,11,11,11,
+	12,11,11,11,11,12,12,12,12, 8, 9, 9,10,10,11,11,
+	12,11,12,12,12,13,13,13, 8, 9, 9,10,10,11,11,12,
+	11,12,12,13,13,12,13, 9,10,10,11,11,12,11,12,13,
+	14,14,15,15,15,14, 9,10,10,11,11,12,12,12,12,13,
+	13,14,14,14,14, 9,10,11,12,11,12,13,14,13,14,13,
+	14,14,14,14, 9,11,11,11,11,12,13,13,13,14,13,15,
+	15,14,14,10,11,11,12,12,13,13,13,13,14,14,14,15,
+	15,15,10,11,11,12,12,12,13,13,13,15,14,15,14,14,
+	14,
+};
+
+static float _vq_quantthresh__44u5__p9_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__44u5__p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p9_1 = {
+	_vq_quantthresh__44u5__p9_1,
+	_vq_quantmap__44u5__p9_1,
+	15,
+	15
+};
+
+static static_codebook _44u5__p9_1 = {
+	2, 225,
+	_vq_lengthlist__44u5__p9_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__44u5__p9_1,
+	NULL,
+	&_vq_auxt__44u5__p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u5__p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u5__p9_2[] = {
+	 3, 5, 5, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10, 9, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10,10,10, 9,10,10,10,10, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 9, 9, 9, 9,10,
+	 9, 9, 9, 9, 9, 9, 9,10, 9,10, 9, 9, 9,10,10, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u5__p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u5__p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u5__p9_2 = {
+	_vq_quantthresh__44u5__p9_2,
+	_vq_quantmap__44u5__p9_2,
+	17,
+	17
+};
+
+static static_codebook _44u5__p9_2 = {
+	2, 289,
+	_vq_lengthlist__44u5__p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u5__p9_2,
+	NULL,
+	&_vq_auxt__44u5__p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u5__short[] = {
+	 4,11,16,14,18,15,18,15,17,17, 4, 6, 9, 9,12, 9,
+	14,10,14,17, 6, 6, 5, 7, 6, 8,10,10,16,17, 7, 8,
+	 7, 9, 9,10,12,12,14,17, 8, 6, 5, 7, 4, 7, 5, 7,
+	14,17, 9, 9, 8, 9, 7,10, 8,10,14,17,11, 9, 7, 9,
+	 4, 7, 3, 6,15,17,11,10,10,10, 6, 9, 5, 6,14,17,
+	17,17,10,15, 4, 8, 3, 5,12,17,17,17,12,16, 7,11,
+	 6, 8,16,17,
+};
+
+static static_codebook _huff_book__44u5__short = {
+	2, 100,
+	_huff_lengthlist__44u5__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u6__long[] = {
+	 3, 9,14,13,15,13,16,12,12,12, 5, 4, 6, 7, 8, 9,
+	10,10,13,12,10, 5, 5, 6, 6, 9, 9,10,14,14,10, 6,
+	 6, 7, 6, 8, 9, 9,13,12,13, 7, 5, 6, 4, 6, 6, 7,
+	11,15,10, 8, 7, 7, 6, 7, 7, 7,11,13,16,10, 8, 8,
+	 5, 6, 4, 6,10,14, 9, 9, 9, 8, 6, 6, 5, 4, 7,11,
+	11,11,12,11,10, 9, 9, 5, 5, 9,10,13,14,14,14,14,
+	15, 8, 7, 8,
+};
+
+static static_codebook _huff_book__44u6__long = {
+	2, 100,
+	_huff_lengthlist__44u6__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u6__p1_0[] = {
+	 1, 4, 4, 4, 8, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7,
+	 9,10, 5, 8, 8, 7,10, 9, 8,10,10, 5, 8, 8, 8,11,
+	10, 8,10,10, 8,11,10,10,12,13,10,13,13, 7,10,10,
+	10,13,11,10,13,13, 5, 8, 8, 8,11,10, 8,10,10, 7,
+	10,10,10,13,13, 9,11,13, 8,10,11,10,13,13,10,13,
+	12,
+};
+
+static float _vq_quantthresh__44u6__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u6__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p1_0 = {
+	_vq_quantthresh__44u6__p1_0,
+	_vq_quantmap__44u6__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u6__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u6__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u6__p1_0,
+	NULL,
+	&_vq_auxt__44u6__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u6__p2_0[] = {
+	 3, 5, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 7, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 7, 5, 6, 6, 6, 8,
+	 7, 6, 7, 8, 6, 8, 8, 8, 8, 9, 8, 9, 9, 6, 7, 7,
+	 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 7, 8, 6,
+	 7, 7, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9,
+	 8,
+};
+
+static float _vq_quantthresh__44u6__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u6__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p2_0 = {
+	_vq_quantthresh__44u6__p2_0,
+	_vq_quantmap__44u6__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u6__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u6__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u6__p2_0,
+	NULL,
+	&_vq_auxt__44u6__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u6__p3_0[] = {
+	 2, 4, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8,
+	10, 9,13,12, 8, 9,10,12,13, 5, 7, 7,10, 9, 7, 9,
+	 9,11,11, 7, 8, 9,10,11,10,11,11,13,14, 9,10,11,
+	13,13, 5, 7, 7, 9, 9, 7, 9, 8,11,10, 7, 9, 9,11,
+	11, 9,11,10,14,13,10,11,11,14,13, 8,10,10,14,13,
+	10,12,11,15,14, 9,11,11,15,14,13,15,14,20,16,13,
+	13,14,16,16, 8,10,10,13,14, 9,11,11,14,15,10,11,
+	12,14,15,13,13,14,16,16,13,14,14,16,17, 5, 7, 7,
+	10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,11,11,15,
+	14,10,11,11,14,14, 7, 9, 9,12,11, 9,11,11,12,13,
+	 9,11,11,13,13,11,12,13,14,16,11,12,13,16,16, 6,
+	 9, 8,11,11, 8,11,10,13,12, 9,10,11,12,13,11,13,
+	11,15,14,11,13,13,15,15,10,12,11,15,14,11,12,13,
+	17,16,11,13,13,16,17,14,15,16,17,17,14,15,16,20,
+	 0, 9,11,11,14,15,10,13,12,16,16,11,13,13,17,17,
+	13,15,14,17,15,15,16,16, 0, 0, 5, 7, 7,10,10, 7,
+	 9, 9,11,11, 7, 8, 9,11,11,10,11,11,14,14,10,11,
+	11,14,14, 6, 9, 9,11,11, 9,11,11,14,12, 8,10,11,
+	12,13,11,13,13,16,16,11,11,13,14,16, 7, 9, 9,11,
+	12, 9,11,11,13,13, 9,11,11,13,12,11,13,12,16,16,
+	12,13,12,16,14, 9,11,11,16,15,11,13,13,17,15,10,
+	12,12,15,16,14,16,16, 0,17,13,14,15,15,17,10,11,
+	12,15,15,11,13,13,17,17,11,13,13,15,16,14,15,15,
+	19,18,14,15,15,19,16, 8,10,10,14,14,10,12,11,15,
+	16,10,11,11,15,17,13,16,15,19,19,13,15,14,17,17,
+	 9,11,12,15,16,11,13,13,18,19,11,13,13,16,17,16,
+	16,17, 0, 0,15,15,16, 0,19, 9,11,11,15,16,10,13,
+	12,17,15,11,13,13,16,17,14,17,15,18,17,15,16,15,
+	18, 0,13,14,15, 0,19,14,16,16, 0,17,15,16,16, 0,
+	17,16,17, 0, 0, 0,16,17,19, 0, 0,12,14,14,17,17,
+	13,15,13, 0,19,14,16,16,18,19,16,18,15,19,18,17,
+	18,17,19, 0, 8,10,10,14,13,10,11,11,16,15,10,11,
+	11,15,15,13,15,15,19,18,14,15,16, 0,18, 9,11,11,
+	15,14,11,13,13, 0,16,10,12,13,15,17,14,16,16, 0,
+	18,15,16,17,17, 0, 9,11,11,16,15,11,13,13,16,16,
+	11,14,13,18,18,15,17,15,18,17,15,16,18, 0, 0,12,
+	14,14,18,19,14,15,16, 0,18,13,14,15,18, 0,17,17,
+	17, 0, 0,16,15,18,17, 0,12,14,15,17,19,14,16,16,
+	19, 0,14,17,16, 0,18,17,19,17, 0, 0,16,18,17, 0,
+	17,
+};
+
+static float _vq_quantthresh__44u6__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u6__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p3_0 = {
+	_vq_quantthresh__44u6__p3_0,
+	_vq_quantmap__44u6__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u6__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u6__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u6__p3_0,
+	NULL,
+	&_vq_auxt__44u6__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u6__p4_0[] = {
+	 4, 6, 6, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 6, 7, 8, 9,10, 9,10,10,11,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,11,11,
+	 9,10,10,12,12, 9, 9,10,12,12,11,12,12,13,13,11,
+	11,12,12,13, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,11,13,13,11,12,12,13,13, 6, 7, 7,
+	 9, 9, 7, 8, 7,10, 9, 7, 7, 8, 9,10, 9,10,10,12,
+	11, 9,10,10,11,12, 7, 8, 8,10,10, 8, 8, 9,10,10,
+	 8, 8, 8,10,10,10,10,11,12,12,10,10,11,12,12, 6,
+	 7, 7,10,10, 7, 8, 8,11,10, 8, 8, 9,10,11,10,11,
+	10,12,11,10,10,11,12,12, 9,10,10,12,12,10,10,11,
+	12,12,10,11,10,13,12,12,12,12,12,14,12,12,12,13,
+	14, 9,10,10,12,12, 9,10,10,12,12,10,10,11,12,13,
+	11,12,11,14,12,12,12,13,14,14, 6, 7, 7, 9, 9, 7,
+	 8, 7,10, 9, 7, 7, 8,10,10, 9,10,10,12,11, 9,10,
+	10,11,12, 6, 7, 7,10,10, 8, 9, 8,11,10, 7, 8, 8,
+	10,10,10,10,11,12,12,10,10,10,11,12, 7, 8, 8,10,
+	10, 8, 8, 8,10,10, 8, 8, 8,10,10,10,11,10,12,12,
+	10,11,10,12,11, 9,10,10,12,12,10,11,10,13,12, 9,
+	10,10,12,12,12,12,12,14,14,11,11,12,12,13, 9,10,
+	10,12,12,10,11,11,12,12,10,11,10,12,12,12,12,12,
+	14,14,12,12,12,14,12, 8, 9, 9,11,11, 9,10,10,12,
+	12, 9,10,10,12,12,11,12,12,13,13,11,12,12,13,13,
+	 9,10,10,12,12,10,10,11,12,13,10,11,10,12,12,12,
+	12,13,13,14,12,12,12,14,14, 9,10,10,12,12, 9,10,
+	10,12,12,10,10,10,12,12,12,12,12,14,13,12,12,12,
+	14,14,11,12,12,13,13,11,12,12,14,14,12,12,12,14,
+	14,13,12,14,12,15,13,14,14,15,15,11,11,11,13,13,
+	11,12,11,14,13,12,12,12,14,14,12,14,12,15,12,13,
+	14,14,15,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,12,13,13,11,12,12,13,14, 9,10,10,
+	12,12,10,11,10,13,12, 9,10,10,12,13,12,12,12,15,
+	14,12,12,13,13,14, 9,10,10,12,12,10,10,11,12,12,
+	10,11,10,12,12,12,13,12,14,14,12,13,12,14,13,11,
+	11,11,13,13,12,12,12,14,13,11,11,12,13,14,13,14,
+	14,15,15,12,12,14,12,15,11,12,12,13,14,12,12,12,
+	14,14,11,12,12,14,14,13,14,14,15,15,13,14,12,16,
+	12,
+};
+
+static float _vq_quantthresh__44u6__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u6__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p4_0 = {
+	_vq_quantthresh__44u6__p4_0,
+	_vq_quantmap__44u6__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u6__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u6__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u6__p4_0,
+	NULL,
+	&_vq_auxt__44u6__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u6__p5_0[] = {
+	 2, 3, 3, 6, 6, 8, 8,10,10, 4, 5, 5, 8, 7, 8, 8,
+	11,11, 3, 5, 5, 7, 8, 8, 8,11,11, 6, 8, 7,10, 9,
+	10, 9,12,12, 6, 7, 8, 9,10, 9,10,12,12, 8, 8, 8,
+	10, 9,12,11,13,13, 8, 8, 8, 9,10,11,12,12,13,10,
+	11,11,12,11,13,12,14,14,10,10,11,11,12,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44u6__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u6__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p5_0 = {
+	_vq_quantthresh__44u6__p5_0,
+	_vq_quantmap__44u6__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u6__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u6__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u6__p5_0,
+	NULL,
+	&_vq_auxt__44u6__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p6_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u6__p6_0[] = {
+	 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7,
+	 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7,
+	 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8,10,10, 7, 7, 7,
+	 8, 8, 9, 9,10,10, 7, 7, 7, 8, 8, 9, 9,10,11, 9,
+	 9, 9,10,10,11,11,11,11, 9, 9, 9,10,10,10,11,11,
+	11,
+};
+
+static float _vq_quantthresh__44u6__p6_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u6__p6_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p6_0 = {
+	_vq_quantthresh__44u6__p6_0,
+	_vq_quantmap__44u6__p6_0,
+	9,
+	9
+};
+
+static static_codebook _44u6__p6_0 = {
+	2, 81,
+	_vq_lengthlist__44u6__p6_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u6__p6_0,
+	NULL,
+	&_vq_auxt__44u6__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u6__p7_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 8,11,10, 8,
+	11,10, 5, 8, 9, 7,10,10, 8,10,11, 4, 9, 9, 9,12,
+	11, 9,11,12, 8,11,12,11,12,13,10,13,12, 7,12,11,
+	10,12,12,10,13,13, 4, 9, 9, 8,11,11, 9,11,12, 7,
+	12,12,10,13,13,10,12,13, 8,12,12,10,13,13,11,13,
+	12,
+};
+
+static float _vq_quantthresh__44u6__p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44u6__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p7_0 = {
+	_vq_quantthresh__44u6__p7_0,
+	_vq_quantmap__44u6__p7_0,
+	3,
+	3
+};
+
+static static_codebook _44u6__p7_0 = {
+	4, 81,
+	_vq_lengthlist__44u6__p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44u6__p7_0,
+	NULL,
+	&_vq_auxt__44u6__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u6__p7_1[] = {
+	 3, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 6, 6,
+	 8, 7, 8, 8, 8, 8, 4, 5, 5, 6, 6, 7, 8, 8, 8, 8,
+	 8, 6, 7, 6, 7, 7, 8, 8, 9, 9, 9, 9, 6, 6, 7, 7,
+	 7, 8, 8, 9, 9, 9, 9, 7, 8, 7, 8, 8, 9, 9, 9, 9,
+	 9, 9, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8,
+	 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10, 8, 8,
+	 8, 9, 9, 9, 9, 9, 9,10,10,
+};
+
+static float _vq_quantthresh__44u6__p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u6__p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p7_1 = {
+	_vq_quantthresh__44u6__p7_1,
+	_vq_quantmap__44u6__p7_1,
+	11,
+	11
+};
+
+static static_codebook _44u6__p7_1 = {
+	2, 121,
+	_vq_lengthlist__44u6__p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u6__p7_1,
+	NULL,
+	&_vq_auxt__44u6__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p8_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u6__p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7,
+	 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, 9,10,10,11,
+	11, 6, 8, 8, 9, 9,10,10,11,11,12,12, 6, 8, 8, 9,
+	 9,10,10,11,11,12,12, 8, 9, 9,10,10,11,11,12,12,
+	13,13, 8, 9, 9,10,10,11,11,12,12,13,13,10,10,10,
+	11,11,12,12,13,13,14,14,10,10,10,11,11,12,13,13,
+	13,14,14,11,12,12,13,13,13,13,14,14,15,14,11,11,
+	11,13,13,14,13,14,14,15,14,
+};
+
+static float _vq_quantthresh__44u6__p8_0[] = {
+	-49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 27.5, 
+	38.5, 49.5, 
+};
+
+static long _vq_quantmap__44u6__p8_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p8_0 = {
+	_vq_quantthresh__44u6__p8_0,
+	_vq_quantmap__44u6__p8_0,
+	11,
+	11
+};
+
+static static_codebook _44u6__p8_0 = {
+	2, 121,
+	_vq_lengthlist__44u6__p8_0,
+	1, -524582912, 1618345984, 4, 0,
+	_vq_quantlist__44u6__p8_0,
+	NULL,
+	&_vq_auxt__44u6__p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p8_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u6__p8_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 6, 6, 7, 6,
+	 7, 7, 7, 7, 8, 8, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8,
+	 8, 6, 7, 6, 7, 7, 7, 7, 8, 8, 8, 8, 6, 6, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7,
+	 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u6__p8_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u6__p8_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p8_1 = {
+	_vq_quantthresh__44u6__p8_1,
+	_vq_quantmap__44u6__p8_1,
+	11,
+	11
+};
+
+static static_codebook _44u6__p8_1 = {
+	2, 121,
+	_vq_lengthlist__44u6__p8_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u6__p8_1,
+	NULL,
+	&_vq_auxt__44u6__p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p9_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u6__p9_0[] = {
+	 1, 3, 3,10,12,13,13,13,13,13,13,13,13,13,13, 3,
+	 9, 9,13,13,13,13,13,13,13,13,13,13,12,12, 4, 9,
+	 9,12,12,12,12,12,12,12,12,12,12,12,12, 9,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12, 9,11,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+	12,
+};
+
+static float _vq_quantthresh__44u6__p9_0[] = {
+	-1657.5, -1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 
+	382.5, 637.5, 892.5, 1147.5, 1402.5, 1657.5, 
+};
+
+static long _vq_quantmap__44u6__p9_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p9_0 = {
+	_vq_quantthresh__44u6__p9_0,
+	_vq_quantmap__44u6__p9_0,
+	15,
+	15
+};
+
+static static_codebook _44u6__p9_0 = {
+	2, 225,
+	_vq_lengthlist__44u6__p9_0,
+	1, -514071552, 1627381760, 4, 0,
+	_vq_quantlist__44u6__p9_0,
+	NULL,
+	&_vq_auxt__44u6__p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u6__p9_1[] = {
+	 1, 4, 4, 7, 7, 8, 8, 7, 7, 8, 8, 9, 9, 9, 9, 5,
+	 6, 6, 8, 8,10,10, 9, 9,10, 9,10, 9,10,10, 4, 6,
+	 6, 8, 9,10,10, 8, 9, 9,10,10,10,10,10, 7, 9, 8,
+	10,10,11,11,10,10,11,11,11,11,12,12, 7, 8, 8,10,
+	10,11,11,10,10,10,11,11,11,11,12, 8,10,10,11,11,
+	12,12,11,11,11,11,12,12,12,13, 8, 9, 9,11,11,12,
+	12,11,11,12,12,12,12,12,12, 8, 9, 9,10,10,11,11,
+	13,12,13,12,13,13,13,13, 8, 9, 9,10,10,11,11,12,
+	12,12,12,13,12,13,12, 9,10,10,11,11,12,12,13,13,
+	14,12,13,13,14,13, 9,10,10,11,11,12,12,12,12,13,
+	13,13,13,14,14, 9,11,10,11,11,12,13,13,12,13,13,
+	15,13,14,14, 9,10,10,11,12,12,13,13,13,13,13,14,
+	14,14,14,10,11,11,12,12,13,12,13,13,14,14,14,14,
+	14,15,10,11,11,11,12,13,13,13,13,14,14,14,14,14,
+	14,
+};
+
+static float _vq_quantthresh__44u6__p9_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__44u6__p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p9_1 = {
+	_vq_quantthresh__44u6__p9_1,
+	_vq_quantmap__44u6__p9_1,
+	15,
+	15
+};
+
+static static_codebook _44u6__p9_1 = {
+	2, 225,
+	_vq_lengthlist__44u6__p9_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__44u6__p9_1,
+	NULL,
+	&_vq_auxt__44u6__p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u6__p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u6__p9_2[] = {
+	 3, 5, 5, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9,10,10, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10, 9, 9, 9,10,
+	 9,
+};
+
+static float _vq_quantthresh__44u6__p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u6__p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u6__p9_2 = {
+	_vq_quantthresh__44u6__p9_2,
+	_vq_quantmap__44u6__p9_2,
+	17,
+	17
+};
+
+static static_codebook _44u6__p9_2 = {
+	2, 289,
+	_vq_lengthlist__44u6__p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u6__p9_2,
+	NULL,
+	&_vq_auxt__44u6__p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u6__short[] = {
+	 5,11,15,14,17,14,17,15,17,17, 4, 6, 9, 9,14, 9,
+	17,10,15,17, 6, 6, 5, 7, 7, 9,11,10,15,17, 6, 8,
+	 8,10, 9,11,14,13,16,17, 7, 6, 5, 7, 5, 7, 5, 8,
+	15,17, 9, 8, 8, 9, 8,10,10,11,14,17,10, 8, 7, 9,
+	 4, 7, 3, 5,11,17,10,10,10,10, 6, 9, 4, 5,11,17,
+	16,16,13,15, 5,10, 4, 3, 9,16,17,17,14,17, 7,11,
+	 6, 6,11,17,
+};
+
+static static_codebook _huff_book__44u6__short = {
+	2, 100,
+	_huff_lengthlist__44u6__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u7__long[] = {
+	 3, 9,15,13,16,13,16,12,12,12, 5, 5, 7, 8, 8,10,
+	11,10,13,13,10, 5, 5, 6, 6, 9, 9,10,14,14, 9, 6,
+	 6, 7, 6, 8, 9,10,13,12,13, 7, 5, 6, 4, 6, 6, 8,
+	12,13,11, 8, 7, 8, 6, 7, 7, 7,11,13,15,10, 8, 8,
+	 5, 6, 4, 5, 9,13, 9, 9, 8, 9, 7, 7, 4, 4, 6,11,
+	11,11,12,12,10,10, 8, 5, 5, 9,10,12,13,15,13,13,
+	12, 7, 6, 8,
+};
+
+static static_codebook _huff_book__44u7__long = {
+	2, 100,
+	_huff_lengthlist__44u7__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u7__p1_0[] = {
+	 1, 4, 4, 5, 7, 7, 4, 7, 7, 5, 8, 8, 8,10,10, 7,
+	10,10, 5, 8, 8, 7,10, 9, 8,10,10, 5, 8, 8, 8,11,
+	10, 8,10,10, 8,11,10,10,12,13,11,13,13, 7,10,10,
+	10,13,11,11,13,13, 5, 8, 8, 8,11,10, 8,10,10, 7,
+	10,10,11,13,13,10,11,13, 8,11,11,10,13,13,10,13,
+	12,
+};
+
+static float _vq_quantthresh__44u7__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u7__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p1_0 = {
+	_vq_quantthresh__44u7__p1_0,
+	_vq_quantmap__44u7__p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u7__p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u7__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u7__p1_0,
+	NULL,
+	&_vq_auxt__44u7__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u7__p2_0[] = {
+	 3, 5, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 7, 8, 6,
+	 7, 7, 5, 6, 6, 6, 7, 7, 6, 8, 8, 5, 6, 6, 6, 8,
+	 7, 6, 7, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 7, 7,
+	 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 7, 8, 6,
+	 7, 7, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u7__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u7__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p2_0 = {
+	_vq_quantthresh__44u7__p2_0,
+	_vq_quantmap__44u7__p2_0,
+	3,
+	3
+};
+
+static static_codebook _44u7__p2_0 = {
+	4, 81,
+	_vq_lengthlist__44u7__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u7__p2_0,
+	NULL,
+	&_vq_auxt__44u7__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u7__p3_0[] = {
+	 2, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8,
+	 9, 9,12,12, 8, 9, 9,12,12, 5, 7, 7,10, 9, 7, 9,
+	 9,11,11, 6, 8, 9,10,11,10,11,11,13,14, 9,10,11,
+	13,13, 5, 7, 7, 9, 9, 6, 9, 8,11,10, 7, 9, 9,11,
+	11, 9,11,10,13,13,10,11,11,14,13, 8,10,10,14,13,
+	10,11,11,16,14, 9,11,11,14,14,13,15,14,17,16,12,
+	13,14,16,15, 8, 9,10,13,14, 9,11,11,14,14,10,11,
+	11,14,15,13,13,14,17,17,13,14,15,16,17, 5, 7, 7,
+	10,10, 7, 9, 8,11,11, 7, 8, 9,11,11,10,11,11,14,
+	14,10,11,11,14,14, 7, 9, 9,11,11, 9,11,11,13,13,
+	 9,11,11,13,13,11,12,13,15,17,11,12,13,16,18, 6,
+	 8, 8,11,11, 8,10,10,13,12, 9,11,11,12,13,11,13,
+	11,16,14,11,13,12,16,16,10,11,11,15,15,11,13,13,
+	16,16,11,13,13,18,16,14,14,15,17,16,14,15,17,19,
+	 0, 9,11,11,14,15,10,12,12,15,17,11,13,13,15,17,
+	14,15,13, 0,15,15,17,16,18, 0, 5, 7, 7, 9,10, 7,
+	 9, 9,11,11, 7, 8, 9,11,11,10,11,11,14,14,10,11,
+	11,14,14, 6, 8, 9,11,11, 9,11,11,14,13, 8,10,10,
+	11,14,11,13,13,17,15,11,12,13,14,16, 7, 9, 9,11,
+	11, 9,11,11,13,12, 9,11,11,12,13,11,13,12,15,15,
+	11,13,12,16,15, 9,11,11,15,15,11,12,13,16,15,10,
+	11,12,16,15,15,16,16, 0, 0,14,13,15,16,19, 9,11,
+	12,15,15,11,13,13,17,16,11,13,12,15,17,14,16,16,
+	18, 0,15,15,16,18,17, 8,10,10,13,14,10,11,11,15,
+	16,10,11,11,15,16,14,15,15,17,19,14,14,15,19,19,
+	 9,11,11,16,15,11,13,13,17,17,11,13,13,17,17,15,
+	17,16, 0, 0,15,17,17, 0,17, 9,11,11,15,15,11,13,
+	12,16,16,11,13,13,18,17,15,16,15,19,19,14,16,18,
+	17,19,13,15,15, 0,18,14,16,17,17,18,14,16,16,19,
+	19,18,19,19, 0, 0,16,17,18,19, 0,12,14,14,16,18,
+	13,16,14, 0,19,14,16,17,19, 0,16,19,16,19,17,17,
+	18,18, 0, 0, 8,10,10,14,13, 9,11,11,15,14,10,11,
+	12,14,16,13,15,14,19,19,14,16,16,18,17, 9,11,11,
+	16,15,11,13,13, 0,17,10,12,13,15,16,15,18,16,19,
+	19,14,15,16,18,18, 9,11,12,15,15,11,13,13,17,19,
+	11,13,13,17,17,15,17,16,19,19,15,17,16, 0, 0,12,
+	14,14, 0,19,14,16,15, 0,19,13,14,16,19, 0,16,18,
+	18, 0, 0,16,16,17,17, 0,13,14,14,17, 0,14,17,16,
+	 0,19,14,16,16,19,18,17,19,17, 0, 0,18,18,17, 0,
+	 0,
+};
+
+static float _vq_quantthresh__44u7__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u7__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p3_0 = {
+	_vq_quantthresh__44u7__p3_0,
+	_vq_quantmap__44u7__p3_0,
+	5,
+	5
+};
+
+static static_codebook _44u7__p3_0 = {
+	4, 625,
+	_vq_lengthlist__44u7__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u7__p3_0,
+	NULL,
+	&_vq_auxt__44u7__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u7__p4_0[] = {
+	 5, 6, 6, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 7,10,10, 6, 7, 8, 9,10, 9,10,10,11,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 6, 7, 7,10, 9, 7, 7, 8,10,
+	10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,11,11,
+	 9,10,10,12,12, 9,10,10,11,12,11,12,12,13,13,11,
+	11,12,12,13, 8, 9, 9,11,11, 9,10,10,12,11, 9,10,
+	10,12,12,11,12,11,13,12,11,12,12,13,14, 6, 7, 7,
+	 9, 9, 7, 8, 7,10, 9, 7, 7, 8, 9,10, 9,10,10,12,
+	11, 9,10,10,11,12, 7, 8, 8,10,10, 8, 8, 8,10,10,
+	 8, 8, 8,10,10,10,10,11,12,12,10,10,11,12,12, 6,
+	 7, 7,10,10, 7, 8, 8,10,10, 8, 8, 8,10,11, 9,10,
+	10,12,11,10,10,11,12,12, 9,10,10,12,12,10,10,10,
+	12,12,10,11,10,12,12,12,12,12,13,14,12,12,12,13,
+	14, 9,10,10,11,12, 9,10,10,12,12,10,10,11,12,12,
+	11,12,11,14,12,12,12,12,14,14, 6, 7, 7, 9, 9, 7,
+	 8, 7,10, 9, 7, 7, 8, 9,10, 9,10,10,12,11, 9,10,
+	10,11,12, 6, 7, 7,10,10, 8, 8, 8,11,10, 7, 8, 8,
+	10,10,10,10,10,12,12,10,10,10,11,12, 7, 8, 8,10,
+	10, 8, 8, 8,10,10, 8, 8, 8,10,10,10,11,10,12,12,
+	10,11,10,12,12, 9,10,10,12,12,10,11,10,13,12, 9,
+	10,10,12,12,12,12,12,14,14,11,11,12,12,14, 9,10,
+	10,12,12,10,10,10,12,12,10,11,10,12,12,12,12,12,
+	14,14,12,12,12,14,13, 8, 9, 9,11,11, 9,10,10,12,
+	12, 9,10,10,12,12,11,12,12,14,13,11,12,12,13,13,
+	 9,10,10,12,12,10,10,10,12,12,10,11,11,12,12,12,
+	12,13,14,14,12,12,12,14,14, 9,10, 9,12,12, 9,10,
+	10,12,12,10,10,11,12,12,12,12,11,14,13,12,12,12,
+	13,14,11,12,12,13,13,12,12,12,14,14,12,13,12,14,
+	14,13,13,14,13,15,14,14,14,15,15,11,11,11,13,13,
+	11,12,11,14,13,12,12,12,14,14,12,13,12,15,12,13,
+	14,14,15,15, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,12,13,13,11,12,12,13,14, 9,10,10,
+	12,11,10,10,10,12,12, 9,10,10,12,12,12,13,12,14,
+	13,11,12,12,13,14, 9,10,10,12,12,10,10,10,12,12,
+	10,11,11,12,12,12,12,12,14,14,12,13,12,14,13,11,
+	11,11,13,13,12,12,12,14,13,11,11,12,13,14,13,14,
+	14,15,15,13,12,13,12,15,11,12,12,13,14,12,12,12,
+	14,14,11,12,12,14,14,13,14,14,15,15,13,14,13,15,
+	13,
+};
+
+static float _vq_quantthresh__44u7__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u7__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p4_0 = {
+	_vq_quantthresh__44u7__p4_0,
+	_vq_quantmap__44u7__p4_0,
+	5,
+	5
+};
+
+static static_codebook _44u7__p4_0 = {
+	4, 625,
+	_vq_lengthlist__44u7__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u7__p4_0,
+	NULL,
+	&_vq_auxt__44u7__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u7__p5_0[] = {
+	 2, 3, 3, 6, 6, 8, 8,10,10, 3, 5, 5, 8, 7, 8, 8,
+	11,11, 4, 5, 5, 7, 8, 8, 8,11,11, 6, 8, 7, 9, 9,
+	10, 9,12,12, 6, 7, 8, 9,10, 9,10,12,12, 8, 8, 8,
+	10, 9,12,11,13,13, 8, 8, 8, 9,10,11,12,13,13,10,
+	11,11,12,11,13,13,14,14,10,11,11,12,12,13,13,14,
+	14,
+};
+
+static float _vq_quantthresh__44u7__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u7__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p5_0 = {
+	_vq_quantthresh__44u7__p5_0,
+	_vq_quantmap__44u7__p5_0,
+	9,
+	9
+};
+
+static static_codebook _44u7__p5_0 = {
+	2, 81,
+	_vq_lengthlist__44u7__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u7__p5_0,
+	NULL,
+	&_vq_auxt__44u7__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p6_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u7__p6_0[] = {
+	 4, 4, 4, 5, 5, 7, 7, 9, 9, 4, 4, 4, 6, 6, 7, 7,
+	 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7,
+	 8, 8, 9, 9, 5, 6, 6, 6, 7, 8, 8, 9, 9, 7, 7, 7,
+	 8, 8, 9, 9,10,10, 7, 7, 7, 8, 8, 9, 9,10,10, 9,
+	 9, 9,10, 9,10,10,11,11, 9, 9, 9, 9,10,10,10,11,
+	11,
+};
+
+static float _vq_quantthresh__44u7__p6_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u7__p6_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p6_0 = {
+	_vq_quantthresh__44u7__p6_0,
+	_vq_quantmap__44u7__p6_0,
+	9,
+	9
+};
+
+static static_codebook _44u7__p6_0 = {
+	2, 81,
+	_vq_lengthlist__44u7__p6_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u7__p6_0,
+	NULL,
+	&_vq_auxt__44u7__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u7__p7_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 8,10,10, 8,
+	10,10, 5, 8, 9, 8,10,10, 8,10,10, 4, 9, 9, 9,11,
+	12, 8,12,11, 8,12,11,11,12,13,10,13,13, 7,12,11,
+	10,13,12,10,13,13, 4, 9, 9, 8,11,12, 9,11,12, 7,
+	11,12,10,13,13,10,12,13, 8,11,12,10,13,13,10,13,
+	12,
+};
+
+static float _vq_quantthresh__44u7__p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44u7__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p7_0 = {
+	_vq_quantthresh__44u7__p7_0,
+	_vq_quantmap__44u7__p7_0,
+	3,
+	3
+};
+
+static static_codebook _44u7__p7_0 = {
+	4, 81,
+	_vq_lengthlist__44u7__p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44u7__p7_0,
+	NULL,
+	&_vq_auxt__44u7__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u7__p7_1[] = {
+	 3, 5, 4, 6, 6, 7, 7, 8, 8, 8, 8, 5, 5, 5, 6, 6,
+	 7, 7, 8, 8, 8, 8, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8,
+	 8, 6, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 6, 6, 6, 7,
+	 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 8, 7, 8, 8, 9, 9,
+	 9, 9, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8,
+	 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9,
+	 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__44u7__p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u7__p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p7_1 = {
+	_vq_quantthresh__44u7__p7_1,
+	_vq_quantmap__44u7__p7_1,
+	11,
+	11
+};
+
+static static_codebook _44u7__p7_1 = {
+	2, 121,
+	_vq_lengthlist__44u7__p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u7__p7_1,
+	NULL,
+	&_vq_auxt__44u7__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p8_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u7__p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7,
+	 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, 9,10,10,11,
+	11, 6, 8, 8, 9, 9,10,10,11,11,12,12, 6, 8, 8, 9,
+	 9,10,10,11,11,12,12, 8, 9, 9,10,10,11,11,12,12,
+	14,13, 8, 9, 9,10,10,11,11,12,12,13,13,10,10,10,
+	11,11,12,12,13,13,14,14,10,10,10,11,11,12,13,13,
+	13,14,14,11,12,11,13,12,13,14,14,14,15,15,11,11,
+	12,13,13,13,13,14,14,15,15,
+};
+
+static float _vq_quantthresh__44u7__p8_0[] = {
+	-49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 27.5, 
+	38.5, 49.5, 
+};
+
+static long _vq_quantmap__44u7__p8_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p8_0 = {
+	_vq_quantthresh__44u7__p8_0,
+	_vq_quantmap__44u7__p8_0,
+	11,
+	11
+};
+
+static static_codebook _44u7__p8_0 = {
+	2, 121,
+	_vq_lengthlist__44u7__p8_0,
+	1, -524582912, 1618345984, 4, 0,
+	_vq_quantlist__44u7__p8_0,
+	NULL,
+	&_vq_auxt__44u7__p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p8_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u7__p8_1[] = {
+	 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 6, 6, 7, 6,
+	 7, 7, 7, 7, 8, 8, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8,
+	 8, 6, 7, 6, 7, 7, 7, 7, 8, 8, 8, 8, 6, 6, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7,
+	 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u7__p8_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u7__p8_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p8_1 = {
+	_vq_quantthresh__44u7__p8_1,
+	_vq_quantmap__44u7__p8_1,
+	11,
+	11
+};
+
+static static_codebook _44u7__p8_1 = {
+	2, 121,
+	_vq_lengthlist__44u7__p8_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u7__p8_1,
+	NULL,
+	&_vq_auxt__44u7__p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p9_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u7__p9_0[] = {
+	 1, 4, 4, 9, 9, 9, 9, 9, 9, 9, 9, 5, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u7__p9_0[] = {
+	-2866.5, -2229.5, -1592.5, -955.5, -318.5, 318.5, 955.5, 1592.5, 
+	2229.5, 2866.5, 
+};
+
+static long _vq_quantmap__44u7__p9_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p9_0 = {
+	_vq_quantthresh__44u7__p9_0,
+	_vq_quantmap__44u7__p9_0,
+	11,
+	11
+};
+
+static static_codebook _44u7__p9_0 = {
+	2, 121,
+	_vq_lengthlist__44u7__p9_0,
+	1, -512171520, 1630791680, 4, 0,
+	_vq_quantlist__44u7__p9_0,
+	NULL,
+	&_vq_auxt__44u7__p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p9_1[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u7__p9_1[] = {
+	 1, 4, 4, 5, 5, 7, 7,10, 9,11,11,12,12, 4, 7, 6,
+	 8, 8, 9, 9,11,10,13,12,13,13, 4, 6, 7, 8, 8, 9,
+	 9,10,11,13,13,12,13, 5, 8, 8,10, 9,12,11,12,12,
+	13,13,15,14, 6, 8, 8,10,10,11,11,13,12,13,14,14,
+	15, 8,10,10,12,11,13,13,14,15,15,16,15,16, 8, 9,
+	10,12,12,13,13,16,15,15,15,15,15,10,11,11,14,13,
+	14,14,16,16,15,16,16,16,10,12,12,12,14,14,14,15,
+	16,15,16,15,16,11,12,12,14,14,16,16,15,16,16,16,
+	16,16,12,12,13,13,15,15,14,15,16,16,16,16,16,12,
+	14,14,15,14,16,16,16,16,16,16,16,16,13,14,13,14,
+	15,16,15,16,16,16,16,16,16,
+};
+
+static float _vq_quantthresh__44u7__p9_1[] = {
+	-269.5, -220.5, -171.5, -122.5, -73.5, -24.5, 24.5, 73.5, 
+	122.5, 171.5, 220.5, 269.5, 
+};
+
+static long _vq_quantmap__44u7__p9_1[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p9_1 = {
+	_vq_quantthresh__44u7__p9_1,
+	_vq_quantmap__44u7__p9_1,
+	13,
+	13
+};
+
+static static_codebook _44u7__p9_1 = {
+	2, 169,
+	_vq_lengthlist__44u7__p9_1,
+	1, -518889472, 1622704128, 4, 0,
+	_vq_quantlist__44u7__p9_1,
+	NULL,
+	&_vq_auxt__44u7__p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u7__p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44u7__p9_2[] = {
+	 2, 4, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+	 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44u7__p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44u7__p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u7__p9_2 = {
+	_vq_quantthresh__44u7__p9_2,
+	_vq_quantmap__44u7__p9_2,
+	49,
+	49
+};
+
+static static_codebook _44u7__p9_2 = {
+	1, 49,
+	_vq_lengthlist__44u7__p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44u7__p9_2,
+	NULL,
+	&_vq_auxt__44u7__p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u7__short[] = {
+	 6,14,18,18,18,18,17,17,17,17, 4, 8,11,12,13,11,
+	13,11,16,17, 6, 7, 8, 9, 8, 9,12, 9,14,17, 6, 9,
+	11,12,12,12,15,12,17,17, 6, 6, 6, 8, 5, 7, 7, 8,
+	14,17, 7, 9, 9,11, 8,10,10,11,14,16, 8, 7, 7, 8,
+	 5, 7, 4, 5,11,17, 9, 8,10, 9, 7, 9, 4, 2, 9,16,
+	15,14,16,14, 8,14, 4, 3, 7,16,17,17,16,17, 9,15,
+	 6, 5,10,17,
+};
+
+static static_codebook _huff_book__44u7__short = {
+	2, 100,
+	_huff_lengthlist__44u7__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u8__long[] = {
+	 3, 9,13,13,14,13,13,13,13,14, 5, 4, 6, 8,10,12,
+	13,15,13,14, 9, 5, 3, 5, 8,10,12,14,13,13,11, 7,
+	 4, 3, 5, 7,10,11,12,14,11, 9, 7, 4, 4, 6, 8,10,
+	13,14,10,11, 9, 7, 6, 6, 7, 9,12,15,12,11,11, 8,
+	 7, 6, 6, 7,11,14,12,12,12,10, 8, 7, 6, 7, 9,13,
+	11,12,13,12,11, 8, 8, 7, 9,12,11,14,16,16,15,11,
+	10, 9, 9,11,
+};
+
+static static_codebook _huff_book__44u8__long = {
+	2, 100,
+	_huff_lengthlist__44u8__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u8__short[] = {
+	 7,15,18,18,18,18,18,18,18,18, 4, 6, 9,10,10,11,
+	16,15,18,18, 5, 6, 6, 6, 8,10,15,15,18,18, 5, 6,
+	 5, 4, 6, 9,12,15,17,18, 7, 6, 6, 5, 6, 5, 8,11,
+	15,18,10, 9, 9, 7, 4, 3, 6,10,16,17,13,12,12, 6,
+	 6, 4, 5, 9,14,16,16,17,13, 5, 5, 4, 5, 8,13,16,
+	17,17,14, 7, 7, 6, 7,10,15,17,17,17,17,11,12,12,
+	12,14,17,17,
+};
+
+static static_codebook _huff_book__44u8__short = {
+	2, 100,
+	_huff_lengthlist__44u8__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u8_p1_0[] = {
+	 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 8, 9, 9, 7,
+	 8, 9, 5, 7, 7, 7, 9, 8, 8, 9, 9, 5, 7, 7, 7, 9,
+	 9, 7, 9, 9, 8, 9, 9, 9,10,11, 9,10,10, 7, 9, 9,
+	 9,10, 9, 9,10,11, 5, 7, 7, 7, 9, 9, 8, 9, 9, 7,
+	 9, 9, 9,11,10, 9, 9,10, 8, 9, 9, 9,10,10, 9,11,
+	10,
+};
+
+static float _vq_quantthresh__44u8_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u8_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p1_0 = {
+	_vq_quantthresh__44u8_p1_0,
+	_vq_quantmap__44u8_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u8_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u8_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u8_p1_0,
+	NULL,
+	&_vq_auxt__44u8_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u8_p2_0[] = {
+	 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8,
+	 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 7, 7, 8, 9,10, 9,10,10,12,12, 9, 9,10,
+	11,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,12,11, 9,10,10,12,12, 8, 9, 9,11,11,
+	 9,10,10,12,12, 9,10,10,12,12,11,12,12,13,13,11,
+	11,12,13,13, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,11,13,13,11,12,12,14,13, 5, 7, 7,
+	 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,
+	12, 9,10,10,11,12, 7, 8, 8,10,10, 8, 9, 9,11,11,
+	 8, 9, 9,10,11,10,11,11,12,12,10,10,11,12,13, 6,
+	 8, 8,10,10, 7, 8, 8,11,10, 8, 8, 9,10,11,10,11,
+	10,12,11,10,11,11,12,12, 9,10,10,12,12,10,11,11,
+	13,13,10,11,11,13,13,12,12,13,13,14,12,12,13,14,
+	14, 9,10,10,12,12, 9,10,10,12,12,10,11,11,12,13,
+	11,12,11,14,12,12,12,12,14,14, 5, 7, 7, 9, 9, 7,
+	 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,11, 9,10,
+	10,12,12, 6, 8, 8,10,10, 8, 9, 8,11,10, 7, 8, 8,
+	10,11,10,11,11,13,12,10,10,11,11,13, 7, 8, 8,10,
+	10, 8, 9, 9,11,10, 8, 9, 9,11,11,10,11,10,13,12,
+	10,11,11,12,12, 9,10,10,12,12,10,11,11,13,12, 9,
+	10,10,12,12,12,13,13,14,14,11,11,12,12,14, 9,10,
+	10,12,12,10,11,11,13,13,10,11,11,13,12,12,13,12,
+	14,14,12,13,12,14,13, 8, 9, 9,11,11, 9,10,10,12,
+	12, 9,10,10,12,12,11,12,12,14,13,11,12,12,13,14,
+	 9,10,10,12,12,10,11,11,13,13,10,11,11,13,13,12,
+	13,13,14,15,12,12,13,14,14, 9,10,10,12,12, 9,11,
+	10,13,12,10,11,11,12,13,12,13,12,14,13,12,12,13,
+	14,14,11,12,12,14,14,12,12,12,14,14,12,13,13,14,
+	14,13,13,14,14,16,14,14,14,15,15,11,12,12,14,14,
+	11,12,11,14,13,12,12,13,14,14,13,14,12,15,13,14,
+	14,14,15,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10,
+	10,12,12,11,12,12,14,13,11,12,12,13,14, 9,10,10,
+	12,12,10,11,10,13,12, 9,10,11,12,13,12,13,12,14,
+	14,12,12,13,13,14, 9,10,10,12,12,10,11,11,13,13,
+	10,11,11,13,13,12,12,12,14,14,12,13,12,15,14,11,
+	12,11,14,13,12,13,12,14,14,11,11,12,13,14,13,14,
+	14,16,15,13,12,14,13,15,11,12,12,13,14,12,13,13,
+	14,14,12,13,12,14,14,14,14,14,15,16,13,14,13,15,
+	14,
+};
+
+static float _vq_quantthresh__44u8_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u8_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p2_0 = {
+	_vq_quantthresh__44u8_p2_0,
+	_vq_quantmap__44u8_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44u8_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44u8_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u8_p2_0,
+	NULL,
+	&_vq_auxt__44u8_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u8_p3_0[] = {
+	 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7,
+	 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7,
+	 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8, 9,10, 7, 7, 7,
+	 8, 8, 9, 9,11,10, 7, 7, 7, 8, 8, 9, 9,10,11, 9,
+	 9, 9,10,10,11,10,12,12, 9, 9, 9,10,10,10,11,12,
+	12,
+};
+
+static float _vq_quantthresh__44u8_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u8_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p3_0 = {
+	_vq_quantthresh__44u8_p3_0,
+	_vq_quantmap__44u8_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44u8_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44u8_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u8_p3_0,
+	NULL,
+	&_vq_auxt__44u8_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u8_p4_0[] = {
+	 4, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,11,11,11,
+	11, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,
+	12,12, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,
+	11,11,12, 6, 6, 6, 7, 7, 8, 7, 9, 9, 9, 9,10,10,
+	11,11,12,12, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9,10,
+	10,11,11,12,12, 7, 7, 7, 8, 7, 9, 8, 9, 9,10, 9,
+	11,10,11,11,12,12, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9,
+	10,10,10,11,11,12,12, 8, 8, 8, 9, 9, 9, 9,10,10,
+	10,10,11,11,11,11,12,12, 8, 8, 8, 8, 9, 9, 9,10,
+	10,10,10,11,11,11,12,12,12, 9, 9, 9, 9, 9,10, 9,
+	10,10,11,10,11,11,12,12,12,12, 9, 9, 9, 9, 9, 9,
+	10,10,10,11,11,11,11,12,12,12,13,10,10,10,10,10,
+	11,10,11,11,11,11,12,12,12,12,12,13,10,10,10,10,
+	10,10,11,11,11,11,11,12,12,12,12,13,12,11,11,11,
+	11,11,11,11,12,12,12,12,12,12,12,13,13,13,11,11,
+	11,11,11,11,11,12,12,12,12,12,12,13,12,13,13,11,
+	12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,
+	12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,
+	13,
+};
+
+static float _vq_quantthresh__44u8_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u8_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p4_0 = {
+	_vq_quantthresh__44u8_p4_0,
+	_vq_quantmap__44u8_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44u8_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44u8_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u8_p4_0,
+	NULL,
+	&_vq_auxt__44u8_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u8_p5_0[] = {
+	 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 8, 7, 7, 8, 9, 7,
+	 9, 9, 5, 7, 8, 7, 9, 9, 7, 9, 8, 5, 7, 7, 8, 9,
+	 9, 7, 9, 9, 7, 9, 9, 8, 9,11, 9,11,11, 7, 9, 9,
+	 9,11,10, 9,11,11, 5, 7, 8, 7, 9, 9, 8, 9, 9, 7,
+	 9, 9, 9,11,11, 9,10,11, 7, 9, 9, 9,11,11, 8,11,
+	 9,
+};
+
+static float _vq_quantthresh__44u8_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44u8_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p5_0 = {
+	_vq_quantthresh__44u8_p5_0,
+	_vq_quantmap__44u8_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44u8_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44u8_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44u8_p5_0,
+	NULL,
+	&_vq_auxt__44u8_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u8_p5_1[] = {
+	 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 5, 6, 6, 6, 6,
+	 7, 7, 7, 7, 8, 8, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
+	 8, 6, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 6, 6, 6, 7,
+	 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7,
+	 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u8_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u8_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p5_1 = {
+	_vq_quantthresh__44u8_p5_1,
+	_vq_quantmap__44u8_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44u8_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44u8_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u8_p5_1,
+	NULL,
+	&_vq_auxt__44u8_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u8_p6_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9,10,10,10, 5, 6, 6,
+	 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 6, 6, 7, 7, 8,
+	 9, 9, 9,10,10,11,11, 7, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,11,11, 7, 7, 7, 8, 8, 9, 9,10,10,10,11,11,
+	11, 8, 9, 9, 9, 9,10,10,10,10,11,11,12,12, 8, 9,
+	 9, 9, 9,10,10,10,11,11,11,12,12, 8, 9, 9,10,10,
+	11,10,11,11,12,12,12,12, 9, 9, 9,10,10,11,11,11,
+	11,12,12,12,12,10,10,10,11,11,11,11,12,12,12,12,
+	13,13,10,10,10,11,11,11,11,12,12,12,12,13,13,11,
+	11,11,12,12,12,12,12,12,13,13,13,13,11,11,11,12,
+	12,12,12,12,12,13,13,13,13,
+};
+
+static float _vq_quantthresh__44u8_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u8_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p6_0 = {
+	_vq_quantthresh__44u8_p6_0,
+	_vq_quantmap__44u8_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u8_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u8_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u8_p6_0,
+	NULL,
+	&_vq_auxt__44u8_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u8_p6_1[] = {
+	 3, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5,
+	 5, 5, 5, 5, 5, 5, 5, 5, 5,
+};
+
+static float _vq_quantthresh__44u8_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u8_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p6_1 = {
+	_vq_quantthresh__44u8_p6_1,
+	_vq_quantmap__44u8_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u8_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u8_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u8_p6_1,
+	NULL,
+	&_vq_auxt__44u8_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u8_p7_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10,10, 4, 6, 6,
+	 8, 8, 9, 8, 9, 9,10,10,11,11, 4, 6, 6, 8, 8, 8,
+	 9, 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,10,10,
+	11,11,12,12, 7, 8, 8, 9, 9,10,10,10,10,11,11,12,
+	12, 8, 9, 9,10,10,10,10,11,11,12,12,13,13, 8, 9,
+	 9,10,10,10,11,11,11,12,13,13,13, 9, 9, 9,10,10,
+	11,11,12,12,13,13,14,14, 9, 9, 9,10,10,11,11,12,
+	12,13,13,14,14,10,10,10,11,11,12,12,13,13,14,14,
+	14,14,10,10,11,11,12,12,12,13,13,13,14,14,15,11,
+	11,11,12,12,13,13,14,14,14,14,16,15,11,11,11,12,
+	12,13,13,14,14,14,14,16,15,
+};
+
+static float _vq_quantthresh__44u8_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44u8_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p7_0 = {
+	_vq_quantthresh__44u8_p7_0,
+	_vq_quantmap__44u8_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44u8_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44u8_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44u8_p7_0,
+	NULL,
+	&_vq_auxt__44u8_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u8_p7_1[] = {
+	 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7,
+	 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7,
+	 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 6, 7, 7, 7,
+	 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 8,
+	 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 7, 7, 7,
+	 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8,
+	 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7,
+	 7, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u8_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u8_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p7_1 = {
+	_vq_quantthresh__44u8_p7_1,
+	_vq_quantmap__44u8_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44u8_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44u8_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u8_p7_1,
+	NULL,
+	&_vq_auxt__44u8_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u8_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 7, 9, 8,10,10,11,11, 4,
+	 6, 6, 8, 8,10,10, 9, 9,10,10,11,10,12,12, 4, 6,
+	 6, 8, 8, 9,10, 9, 9,10,10,11,11,11,12, 7, 8, 8,
+	10,10,11,11,11,10,11,11,13,12,13,12, 7, 8, 8,10,
+	10,11,11,10,11,11,11,12,12,13,13, 8,10, 9,11,11,
+	12,12,11,11,12,12,13,13,14,14, 8, 9, 9,11,11,12,
+	12,11,11,12,12,14,13,13,13, 8, 9, 9,11,10,12,11,
+	12,12,13,13,14,13,14,13, 8, 9, 9,11,11,11,12,12,
+	12,13,13,13,14,14,14, 9,10,10,12,11,12,12,13,13,
+	14,14,15,13,14,14, 9,10,10,11,12,12,12,13,13,14,
+	14,15,14,14,14,10,11,11,12,12,13,13,14,13,14,14,
+	15,14,15,15,10,11,11,12,12,13,13,13,14,14,14,14,
+	15,16,15,11,12,12,13,12,14,14,14,13,15,14,16,15,
+	16,15,11,12,12,13,13,13,14,14,15,15,15,15,16,15,
+	15,
+};
+
+static float _vq_quantthresh__44u8_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44u8_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p8_0 = {
+	_vq_quantthresh__44u8_p8_0,
+	_vq_quantmap__44u8_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44u8_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44u8_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44u8_p8_0,
+	NULL,
+	&_vq_auxt__44u8_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44u8_p8_1[] = {
+	 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 7, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9,10, 9,10, 8, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9,10, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	10, 9,10,10, 9,10, 9,10, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9,10,10, 9,10,10, 9,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,
+	10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9,10, 9,10,10,10,10,10,10,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9,10, 9, 9,10,10,10,10,10,10,10,10,
+	10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,
+	10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,10,
+	10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,
+	10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,
+	10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44u8_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44u8_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p8_1 = {
+	_vq_quantthresh__44u8_p8_1,
+	_vq_quantmap__44u8_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44u8_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44u8_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44u8_p8_1,
+	NULL,
+	&_vq_auxt__44u8_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p9_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u8_p9_0[] = {
+	 1, 4, 4, 9, 9, 9, 9, 9, 9, 5, 9, 9, 8, 8, 8, 8,
+	 8, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8,
+};
+
+static float _vq_quantthresh__44u8_p9_0[] = {
+	-3258.5, -2327.5, -1396.5, -465.5, 465.5, 1396.5, 2327.5, 3258.5, 
+};
+
+static long _vq_quantmap__44u8_p9_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p9_0 = {
+	_vq_quantthresh__44u8_p9_0,
+	_vq_quantmap__44u8_p9_0,
+	9,
+	9
+};
+
+static static_codebook _44u8_p9_0 = {
+	2, 81,
+	_vq_lengthlist__44u8_p9_0,
+	1, -511895552, 1631393792, 4, 0,
+	_vq_quantlist__44u8_p9_0,
+	NULL,
+	&_vq_auxt__44u8_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p9_1[] = {
+	9,
+	8,
+	10,
+	7,
+	11,
+	6,
+	12,
+	5,
+	13,
+	4,
+	14,
+	3,
+	15,
+	2,
+	16,
+	1,
+	17,
+	0,
+	18,
+};
+
+static long _vq_lengthlist__44u8_p9_1[] = {
+	 1, 4, 4, 7, 7, 8, 8, 7, 8, 9, 9,10,10,11,11,12,
+	12,12,12, 4, 7, 6, 9, 9, 9, 9, 9, 8, 9, 9,11,10,
+	12,11,13,12,13,14, 4, 6, 6, 9, 9, 9, 9, 8, 9, 9,
+	10,10,11,12,12,12,12,13,12, 7, 9, 8,11,10,10,10,
+	10,10,11,11,12,11,14,12,13,14,14,13, 7, 8, 9,10,
+	10,10,10,10,10,11,11,12,13,13,13,14,15,15,13, 8,
+	 9, 9,11,11,11,11,11,12,13,12,14,14,14,14,14,14,
+	15,13, 8, 9, 9,10,11,11,11,12,12,13,12,13,14,13,
+	15,14,15,15,15, 8, 9, 9,10,10,12,11,13,12,13,13,
+	14,14,13,15,14,15,14,14, 8, 9, 9,10,11,12,12,13,
+	13,14,14,14,14,15,15,15,12,14,14, 9,11,10,11,11,
+	14,12,13,14,15,14,14,14,14,15,15,15,15,15, 9,10,
+	11,11,12,12,13,13,14,14,14,14,15,15,14,15,15,15,
+	15,10,11,11,12,12,14,14,13,14,14,15,15,15,15,15,
+	15,15,15,15,10,11,11,12,13,13,13,14,14,15,15,14,
+	14,15,15,15,15,14,15,11,12,13,15,13,14,15,15,15,
+	15,14,15,15,15,15,15,15,15,15,11,12,12,14,14,14,
+	13,14,15,15,14,15,15,15,15,15,15,15,15,13,13,14,
+	13,13,14,14,15,14,15,15,15,15,15,15,15,15,15,15,
+	11,14,13,14,14,15,14,14,15,15,15,15,15,15,15,15,
+	15,15,15,12,12,13,14,13,13,14,15,14,15,15,15,15,
+	15,15,15,15,15,15,13,13,14,14,13,15,14,14,15,15,
+	14,15,15,15,15,15,15,15,15,
+};
+
+static float _vq_quantthresh__44u8_p9_1[] = {
+	-416.5, -367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, 
+	-24.5, 24.5, 73.5, 122.5, 171.5, 220.5, 269.5, 318.5, 
+	367.5, 416.5, 
+};
+
+static long _vq_quantmap__44u8_p9_1[] = {
+	   17,   15,   13,   11,    9,    7,    5,    3,
+	    1,    0,    2,    4,    6,    8,   10,   12,
+	   14,   16,   18,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p9_1 = {
+	_vq_quantthresh__44u8_p9_1,
+	_vq_quantmap__44u8_p9_1,
+	19,
+	19
+};
+
+static static_codebook _44u8_p9_1 = {
+	2, 361,
+	_vq_lengthlist__44u8_p9_1,
+	1, -518287360, 1622704128, 5, 0,
+	_vq_quantlist__44u8_p9_1,
+	NULL,
+	&_vq_auxt__44u8_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u8_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44u8_p9_2[] = {
+	 2, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44u8_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44u8_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u8_p9_2 = {
+	_vq_quantthresh__44u8_p9_2,
+	_vq_quantmap__44u8_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44u8_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44u8_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44u8_p9_2,
+	NULL,
+	&_vq_auxt__44u8_p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u9__long[] = {
+	 3, 9,13,13,14,14,13,14,14,13, 5, 5, 9,10,12,13,
+	13,14,14,14, 9, 5, 6, 6, 8,11,12,14,14,14,11, 7,
+	 5, 3, 5, 8,10,12,13,12,12,10, 7, 4, 3, 5, 8,10,
+	12,13,10,12, 9, 7, 4, 4, 6, 8,11,13,12,12,11, 9,
+	 7, 5, 6, 7, 9,13,12,12,12,11, 8, 7, 6, 6, 8,12,
+	12,12,13,12,10, 9, 7, 7, 8,11,11,13,15,15,14,12,
+	10, 9, 9,10,
+};
+
+static static_codebook _huff_book__44u9__long = {
+	2, 100,
+	_huff_lengthlist__44u9__long,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__44u9__short[] = {
+	10,17,18,18,18,18,18,18,18,18, 5, 8,12,13,14,13,
+	16,17,16,17, 5, 6, 8, 8,10, 9,12,16,16,17, 5, 6,
+	 7, 5, 6, 9,12,15,16,16, 7, 6, 6, 4, 5, 7, 9,14,
+	15,17,10, 8, 8, 6, 6, 3, 5, 9,13,18,14,11,11,10,
+	 6, 3, 4, 7,13,17,15,16,16,10, 5, 6, 4, 4, 9,13,
+	18,18,18,11, 6, 8, 5, 6,10,15,18,18,18,14,10,11,
+	 9,10,16,18,
+};
+
+static static_codebook _huff_book__44u9__short = {
+	2, 100,
+	_huff_lengthlist__44u9__short,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u9_p1_0[] = {
+	 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 8, 9, 9, 7,
+	 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 9, 5, 7, 7, 7, 9,
+	 9, 7, 9, 9, 8, 9, 9, 9,10,11, 9,11,10, 7, 9, 9,
+	 9,11,10, 9,10,11, 5, 7, 7, 7, 9, 9, 7, 9, 9, 7,
+	 9, 9, 9,11,11, 9,10,11, 8, 9, 9, 9,10,10, 9,11,
+	10,
+};
+
+static float _vq_quantthresh__44u9_p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__44u9_p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p1_0 = {
+	_vq_quantthresh__44u9_p1_0,
+	_vq_quantmap__44u9_p1_0,
+	3,
+	3
+};
+
+static static_codebook _44u9_p1_0 = {
+	4, 81,
+	_vq_lengthlist__44u9_p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__44u9_p1_0,
+	NULL,
+	&_vq_auxt__44u9_p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p2_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u9_p2_0[] = {
+	 3, 6, 5, 8, 8, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8,
+	 9, 9,11,10, 8, 9, 9,10,11, 6, 7, 7, 9, 9, 7, 8,
+	 8,10,10, 7, 8, 8, 9,10, 9,10,10,11,11, 9, 9,10,
+	11,11, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 8,10,
+	10, 9,10, 9,11,11, 9,10,10,11,11, 8, 9, 9,11,11,
+	 9,10,10,12,11, 9,10,10,11,11,11,12,12,13,13,11,
+	11,11,12,13, 8, 9, 9,11,11, 9,10,10,11,11, 9,10,
+	10,12,12,11,11,11,13,12,11,11,11,13,13, 6, 7, 7,
+	 9, 9, 7, 8, 8,10, 9, 7, 8, 8, 9,10, 9,10,10,11,
+	11, 9,10,10,11,11, 7, 8, 8,10,10, 8, 9, 9,10,10,
+	 8, 9, 9,10,10,10,10,10,12,12,10,10,10,11,12, 7,
+	 8, 8,10,10, 8, 9, 8,10,10, 8, 9, 9,10,10, 9,10,
+	10,12,11,10,10,10,12,12, 9,10,10,12,11,10,10,10,
+	12,12,10,10,10,12,12,12,12,12,12,13,11,12,12,13,
+	13, 9,10,10,11,11, 9,10,10,12,11,10,10,10,12,12,
+	11,12,11,13,12,12,12,12,13,13, 6, 7, 7, 9, 9, 7,
+	 8, 8,10, 9, 7, 8, 8, 9,10, 9,10,10,12,11, 9,10,
+	10,11,11, 7, 8, 8,10, 9, 8, 9, 9,11,10, 8, 8, 9,
+	10,10,10,10,10,12,12,10,10,10,11,12, 7, 8, 8,10,
+	10, 8, 9, 9,10,10, 8, 9, 9,10,10,10,10,10,12,12,
+	10,10,10,12,12, 9,10,10,11,11,10,11,10,12,12, 9,
+	10,10,11,12,11,12,12,13,13,11,11,12,11,13, 9,10,
+	10,11,12,10,10,10,12,12,10,10,10,12,12,11,12,12,
+	13,13,12,12,12,13,13, 8, 9, 9,11,11, 9,10,10,12,
+	11, 9,10,10,11,12,11,12,12,13,13,11,11,12,13,13,
+	 9,10,10,12,12,10,10,10,12,12,10,11,10,12,12,12,
+	12,12,13,13,12,12,12,13,13, 9,10,10,12,11,10,10,
+	10,12,11,10,10,10,12,12,11,12,12,13,13,12,12,12,
+	13,14,11,12,12,13,13,11,12,12,13,13,11,12,12,13,
+	13,13,13,14,13,15,13,13,13,14,14,11,11,11,13,13,
+	11,12,11,13,13,11,12,12,13,13,12,13,12,14,12,13,
+	13,13,15,14, 8, 9, 9,11,11, 9,10,10,11,11, 9,10,
+	10,11,12,11,12,11,13,13,11,12,12,13,13, 9,10,10,
+	11,11,10,11,10,12,12, 9,10,10,12,12,12,12,12,13,
+	13,11,11,12,12,13, 9,10,10,12,12,10,10,11,12,12,
+	10,11,10,12,12,11,12,12,13,13,12,12,12,13,13,11,
+	11,11,13,13,11,12,12,13,13,11,11,12,13,13,13,13,
+	13,14,14,12,12,13,12,14,11,11,12,13,13,12,12,12,
+	14,13,11,12,12,13,13,13,13,13,14,14,13,13,13,14,
+	13,
+};
+
+static float _vq_quantthresh__44u9_p2_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u9_p2_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p2_0 = {
+	_vq_quantthresh__44u9_p2_0,
+	_vq_quantmap__44u9_p2_0,
+	5,
+	5
+};
+
+static static_codebook _44u9_p2_0 = {
+	4, 625,
+	_vq_lengthlist__44u9_p2_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u9_p2_0,
+	NULL,
+	&_vq_auxt__44u9_p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p3_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__44u9_p3_0[] = {
+	 3, 4, 4, 5, 5, 7, 7, 9, 8, 4, 5, 5, 6, 6, 7, 7,
+	 9, 9, 4, 5, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 6,
+	 8, 7, 9, 9, 5, 6, 6, 6, 7, 7, 8, 9, 9, 7, 7, 7,
+	 8, 7, 9, 8,10,10, 7, 7, 7, 7, 8, 8, 9,10,10, 9,
+	 9, 9, 9, 9,10,10,11,11, 9, 9, 9, 9, 9,10,10,11,
+	11,
+};
+
+static float _vq_quantthresh__44u9_p3_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__44u9_p3_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p3_0 = {
+	_vq_quantthresh__44u9_p3_0,
+	_vq_quantmap__44u9_p3_0,
+	9,
+	9
+};
+
+static static_codebook _44u9_p3_0 = {
+	2, 81,
+	_vq_lengthlist__44u9_p3_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__44u9_p3_0,
+	NULL,
+	&_vq_auxt__44u9_p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p4_0[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__44u9_p4_0[] = {
+	 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11,
+	11, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,10, 9,11,10,
+	12,11, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9,10,10,
+	11,11,11, 6, 6, 6, 7, 6, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,12, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,10,
+	10,11,11,12,12, 7, 7, 7, 7, 7, 8, 8, 9, 8, 9, 9,
+	10,10,11,11,12,12, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9,
+	 9,10,10,11,11,12,12, 8, 8, 8, 8, 8, 9, 8, 9, 9,
+	10,10,11,10,12,11,12,12, 8, 8, 8, 8, 8, 8, 9, 9,
+	 9,10,10,10,11,11,12,12,13, 8, 8, 8, 9, 9, 9, 9,
+	10,10,11,10,11,11,12,12,13,12, 8, 8, 9, 9, 9, 9,
+	 9,10,10,10,11,11,11,12,12,12,13, 9,10, 9,10,10,
+	10,10,11,10,11,11,12,11,13,12,13,13, 9, 9,10,10,
+	10,10,10,10,11,11,11,11,12,12,13,13,13,10,11,10,
+	11,11,11,11,12,11,12,12,13,12,13,13,14,13,10,10,
+	11,11,11,11,11,11,12,12,12,12,13,13,13,13,14,11,
+	12,11,12,12,12,12,12,12,13,13,13,13,14,13,14,14,
+	11,11,12,12,12,12,12,12,12,12,13,13,13,13,14,14,
+	14,
+};
+
+static float _vq_quantthresh__44u9_p4_0[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__44u9_p4_0[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p4_0 = {
+	_vq_quantthresh__44u9_p4_0,
+	_vq_quantmap__44u9_p4_0,
+	17,
+	17
+};
+
+static static_codebook _44u9_p4_0 = {
+	2, 289,
+	_vq_lengthlist__44u9_p4_0,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__44u9_p4_0,
+	NULL,
+	&_vq_auxt__44u9_p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p5_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__44u9_p5_0[] = {
+	 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 8, 7, 7, 8, 9, 7,
+	 8, 9, 5, 7, 8, 7, 9, 8, 7, 9, 8, 5, 8, 8, 8, 9,
+	 9, 7, 9, 9, 7, 9, 9, 8, 9,11, 9,11,10, 7, 9, 9,
+	 9,11, 9, 9,10,11, 5, 7, 8, 7, 9, 9, 8, 9, 9, 7,
+	 9, 9, 9,11,10, 9, 9,11, 7, 9, 9, 9,10,11, 8,11,
+	 9,
+};
+
+static float _vq_quantthresh__44u9_p5_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__44u9_p5_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p5_0 = {
+	_vq_quantthresh__44u9_p5_0,
+	_vq_quantmap__44u9_p5_0,
+	3,
+	3
+};
+
+static static_codebook _44u9_p5_0 = {
+	4, 81,
+	_vq_lengthlist__44u9_p5_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__44u9_p5_0,
+	NULL,
+	&_vq_auxt__44u9_p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p5_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u9_p5_1[] = {
+	 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6,
+	 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
+	 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8,
+	 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7,
+	 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8,
+	 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 7,
+	 7, 7, 7, 8, 8, 8, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u9_p5_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u9_p5_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p5_1 = {
+	_vq_quantthresh__44u9_p5_1,
+	_vq_quantmap__44u9_p5_1,
+	11,
+	11
+};
+
+static static_codebook _44u9_p5_1 = {
+	2, 121,
+	_vq_lengthlist__44u9_p5_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u9_p5_1,
+	NULL,
+	&_vq_auxt__44u9_p5_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u9_p6_0[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 4, 5, 5,
+	 7, 7, 8, 8, 8, 8,10,10,11,11, 4, 5, 5, 7, 7, 8,
+	 8, 8, 8,10,10,11,11, 6, 7, 7, 8, 7, 8, 8, 9, 9,
+	10,10,11,11, 6, 7, 7, 8, 7, 8, 8, 9, 9,10,10,11,
+	11, 7, 8, 8, 8, 8, 9, 9, 9,10,11,11,12,12, 7, 8,
+	 8, 8, 8, 9, 9,10, 9,11,11,12,12, 8, 9, 8, 9, 9,
+	10,10,10,10,11,11,12,12, 8, 8, 8, 9, 9,10, 9,10,
+	10,11,11,12,12, 9,10,10,10,10,11,11,11,11,12,12,
+	13,13, 9,10,10,10,10,11,11,11,11,12,12,13,12,10,
+	11,11,11,11,12,12,12,12,12,12,13,13,10,11,11,11,
+	11,12,12,12,12,13,12,13,13,
+};
+
+static float _vq_quantthresh__44u9_p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__44u9_p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p6_0 = {
+	_vq_quantthresh__44u9_p6_0,
+	_vq_quantmap__44u9_p6_0,
+	13,
+	13
+};
+
+static static_codebook _44u9_p6_0 = {
+	2, 169,
+	_vq_lengthlist__44u9_p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__44u9_p6_0,
+	NULL,
+	&_vq_auxt__44u9_p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__44u9_p6_1[] = {
+	 4, 4, 4, 5, 5, 4, 5, 4, 5, 5, 4, 4, 5, 5, 5, 5,
+	 5, 5, 5, 5, 5, 5, 5, 5, 5,
+};
+
+static float _vq_quantthresh__44u9_p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__44u9_p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p6_1 = {
+	_vq_quantthresh__44u9_p6_1,
+	_vq_quantmap__44u9_p6_1,
+	5,
+	5
+};
+
+static static_codebook _44u9_p6_1 = {
+	2, 25,
+	_vq_lengthlist__44u9_p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__44u9_p6_1,
+	NULL,
+	&_vq_auxt__44u9_p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p7_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__44u9_p7_0[] = {
+	 1, 5, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 5, 6, 6,
+	 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 6, 6, 7, 7, 8,
+	 8, 9, 9,10,10,11,11, 6, 7, 7, 8, 8, 9, 9,10,10,
+	11,11,12,12, 7, 7, 7, 8, 8, 9, 9,10,10,11,11,12,
+	12, 8, 8, 8, 9, 9,10,10,11,10,12,12,13,12, 8, 8,
+	 8, 9, 9,10,10,11,11,12,12,12,13, 9, 9, 9,10,10,
+	11,11,12,11,13,13,13,14, 9, 9, 9,10,10,11,11,11,
+	12,13,12,13,13,10,10,10,11,11,12,12,13,12,13,13,
+	14,14,10,10,10,11,11,11,12,12,12,13,13,14,14,11,
+	11,11,12,12,13,13,13,13,14,14,15,14,11,11,11,12,
+	12,13,13,13,14,14,15,15,15,
+};
+
+static float _vq_quantthresh__44u9_p7_0[] = {
+	-60.5, -49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 
+	27.5, 38.5, 49.5, 60.5, 
+};
+
+static long _vq_quantmap__44u9_p7_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p7_0 = {
+	_vq_quantthresh__44u9_p7_0,
+	_vq_quantmap__44u9_p7_0,
+	13,
+	13
+};
+
+static static_codebook _44u9_p7_0 = {
+	2, 169,
+	_vq_lengthlist__44u9_p7_0,
+	1, -523206656, 1618345984, 4, 0,
+	_vq_quantlist__44u9_p7_0,
+	NULL,
+	&_vq_auxt__44u9_p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__44u9_p7_1[] = {
+	 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 7, 7,
+	 7, 7, 7, 7, 7, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 8, 7, 7,
+	 7, 7, 7, 7, 7, 7, 8, 8, 8,
+};
+
+static float _vq_quantthresh__44u9_p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__44u9_p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p7_1 = {
+	_vq_quantthresh__44u9_p7_1,
+	_vq_quantmap__44u9_p7_1,
+	11,
+	11
+};
+
+static static_codebook _44u9_p7_1 = {
+	2, 121,
+	_vq_lengthlist__44u9_p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__44u9_p7_1,
+	NULL,
+	&_vq_auxt__44u9_p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p8_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u9_p8_0[] = {
+	 1, 4, 4, 7, 7, 8, 8, 8, 7, 9, 9,10,10,11,11, 4,
+	 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,10,12,11, 4, 6,
+	 6, 8, 8, 9,10, 9, 9,10,10,11,11,12,12, 7, 8, 8,
+	10,10,11,11,11,10,11,11,12,12,13,12, 7, 8, 8,10,
+	10,11,11,10,10,11,12,12,12,13,13, 8,10, 9,11,11,
+	12,12,11,12,12,12,13,13,14,14, 8, 9, 9,11,11,12,
+	12,11,12,12,13,13,13,14,14, 8, 9, 9,10,10,11,11,
+	13,12,13,13,14,14,15,14, 8, 9, 9,10,10,11,12,12,
+	13,13,13,14,14,14,15, 9,10,10,11,11,13,12,13,13,
+	14,14,15,15,15,15, 9,10,10,11,12,12,12,13,13,14,
+	15,14,15,15,15,10,11,11,12,12,13,13,14,14,15,15,
+	15,16,16,15,10,11,11,12,12,13,14,14,14,15,14,15,
+	16,16,17,11,12,12,13,13,14,14,15,14,16,15,15,16,
+	16,16,11,12,12,13,13,14,14,14,15,15,15,16,16,17,
+	16,
+};
+
+static float _vq_quantthresh__44u9_p8_0[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__44u9_p8_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p8_0 = {
+	_vq_quantthresh__44u9_p8_0,
+	_vq_quantmap__44u9_p8_0,
+	15,
+	15
+};
+
+static static_codebook _44u9_p8_0 = {
+	2, 225,
+	_vq_lengthlist__44u9_p8_0,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__44u9_p8_0,
+	NULL,
+	&_vq_auxt__44u9_p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p8_1[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__44u9_p8_1[] = {
+	 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 7, 7, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7,
+	 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 8, 8,
+	 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,
+	 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10, 9, 9,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9,10,
+	10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10,10,10, 9,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,10, 9,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,
+	10, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,
+	10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,
+	 9,10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,10,10,10,10,10,
+	10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,
+	 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10, 9, 9, 9, 9, 9, 9,10,10, 9,10,10,10,
+	10,10,10,10,10,10,10,10,10,
+};
+
+static float _vq_quantthresh__44u9_p8_1[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__44u9_p8_1[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p8_1 = {
+	_vq_quantthresh__44u9_p8_1,
+	_vq_quantmap__44u9_p8_1,
+	21,
+	21
+};
+
+static static_codebook _44u9_p8_1 = {
+	2, 441,
+	_vq_lengthlist__44u9_p8_1,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__44u9_p8_1,
+	NULL,
+	&_vq_auxt__44u9_p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p9_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__44u9_p9_0[] = {
+	 1, 5, 5,10,10,10,10,10,10,10,10,10,10,10,10, 5,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10, 5,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,
+};
+
+static float _vq_quantthresh__44u9_p9_0[] = {
+	-6051.5, -5120.5, -4189.5, -3258.5, -2327.5, -1396.5, -465.5, 465.5, 
+	1396.5, 2327.5, 3258.5, 4189.5, 5120.5, 6051.5, 
+};
+
+static long _vq_quantmap__44u9_p9_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p9_0 = {
+	_vq_quantthresh__44u9_p9_0,
+	_vq_quantmap__44u9_p9_0,
+	15,
+	15
+};
+
+static static_codebook _44u9_p9_0 = {
+	2, 225,
+	_vq_lengthlist__44u9_p9_0,
+	1, -510036736, 1631393792, 4, 0,
+	_vq_quantlist__44u9_p9_0,
+	NULL,
+	&_vq_auxt__44u9_p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p9_1[] = {
+	9,
+	8,
+	10,
+	7,
+	11,
+	6,
+	12,
+	5,
+	13,
+	4,
+	14,
+	3,
+	15,
+	2,
+	16,
+	1,
+	17,
+	0,
+	18,
+};
+
+static long _vq_lengthlist__44u9_p9_1[] = {
+	 1, 4, 4, 7, 7, 8, 8, 7, 7, 9, 9,10,10,12,11,12,
+	11,12,12, 4, 7, 6, 9, 9, 9, 9, 9, 9,10, 9,11, 9,
+	11,11,13,12,14,12, 4, 6, 6, 9, 9, 9, 9, 8, 9,10,
+	10,11,11,12,12,12,13,13,13, 7, 9, 8,11,11,11,11,
+	10,10,11,11,12,12,14,13,14,14,15,13, 7, 9, 9,10,
+	10,10,10,10,10,11,11,12,13,13,13,14,14,15,13, 8,
+	 9, 9,12,10,11,11,12,11,12,12,13,13,14,14,15,16,
+	15,14, 8, 9, 9,10,11,12,11,11,12,13,12,14,14,13,
+	15,16,15,14,16, 7, 9, 9,10,10,12,11,12,13,16,13,
+	14,16,14,15,15,15,15,15, 7, 9, 9,10,11,11,12,12,
+	13,14,16,14,14,16,16,14,14,14,15, 9,10,11,12,12,
+	12,13,13,13,16,15,16,15,14,15,15,15,16,16, 9,10,
+	11,12,13,13,14,13,14,15,14,14,16,16,16,16,16,16,
+	16,10,11,11,13,13,15,13,15,13,14,16,16,16,16,16,
+	16,15,14,16,11,11,12,12,13,13,15,13,15,14,15,16,
+	16,16,16,16,16,16,16,12,13,13,13,13,15,14,15,16,
+	16,16,16,14,16,16,16,16,16,16,13,12,12,14,14,13,
+	15,14,16,15,16,16,16,16,16,16,16,16,15,12,12,13,
+	13,14,16,15,16,15,16,16,16,16,16,16,16,16,16,16,
+	12,13,13,14,15,14,14,16,16,15,16,16,16,16,16,16,
+	15,16,16,13,14,14,13,14,14,15,16,15,16,16,16,16,
+	16,16,16,16,15,16,12,13,13,14,14,14,14,16,16,16,
+	16,16,16,15,16,16,16,16,16,
+};
+
+static float _vq_quantthresh__44u9_p9_1[] = {
+	-416.5, -367.5, -318.5, -269.5, -220.5, -171.5, -122.5, -73.5, 
+	-24.5, 24.5, 73.5, 122.5, 171.5, 220.5, 269.5, 318.5, 
+	367.5, 416.5, 
+};
+
+static long _vq_quantmap__44u9_p9_1[] = {
+	   17,   15,   13,   11,    9,    7,    5,    3,
+	    1,    0,    2,    4,    6,    8,   10,   12,
+	   14,   16,   18,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p9_1 = {
+	_vq_quantthresh__44u9_p9_1,
+	_vq_quantmap__44u9_p9_1,
+	19,
+	19
+};
+
+static static_codebook _44u9_p9_1 = {
+	2, 361,
+	_vq_lengthlist__44u9_p9_1,
+	1, -518287360, 1622704128, 5, 0,
+	_vq_quantlist__44u9_p9_1,
+	NULL,
+	&_vq_auxt__44u9_p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__44u9_p9_2[] = {
+	24,
+	23,
+	25,
+	22,
+	26,
+	21,
+	27,
+	20,
+	28,
+	19,
+	29,
+	18,
+	30,
+	17,
+	31,
+	16,
+	32,
+	15,
+	33,
+	14,
+	34,
+	13,
+	35,
+	12,
+	36,
+	11,
+	37,
+	10,
+	38,
+	9,
+	39,
+	8,
+	40,
+	7,
+	41,
+	6,
+	42,
+	5,
+	43,
+	4,
+	44,
+	3,
+	45,
+	2,
+	46,
+	1,
+	47,
+	0,
+	48,
+};
+
+static long _vq_lengthlist__44u9_p9_2[] = {
+	 2, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
+	 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__44u9_p9_2[] = {
+	-23.5, -22.5, -21.5, -20.5, -19.5, -18.5, -17.5, -16.5, 
+	-15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, 
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+	8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 
+	16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 
+};
+
+static long _vq_quantmap__44u9_p9_2[] = {
+	   47,   45,   43,   41,   39,   37,   35,   33,
+	   31,   29,   27,   25,   23,   21,   19,   17,
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,   18,   20,   22,   24,   26,   28,   30,
+	   32,   34,   36,   38,   40,   42,   44,   46,
+	   48,
+};
+
+static encode_aux_threshmatch _vq_auxt__44u9_p9_2 = {
+	_vq_quantthresh__44u9_p9_2,
+	_vq_quantmap__44u9_p9_2,
+	49,
+	49
+};
+
+static static_codebook _44u9_p9_2 = {
+	1, 49,
+	_vq_lengthlist__44u9_p9_2,
+	1, -526909440, 1611661312, 6, 0,
+	_vq_quantlist__44u9_p9_2,
+	NULL,
+	&_vq_auxt__44u9_p9_2,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u0__p1_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7,
+	10,10, 5, 8, 8, 7,10,10, 8,10,10, 4, 9, 8, 8,11,
+	11, 8,11,11, 7,11,11,10,11,13,10,13,13, 7,11,11,
+	10,13,12,10,13,13, 5, 9, 8, 8,11,11, 8,11,11, 7,
+	11,11, 9,13,13,10,12,13, 7,11,11,10,13,13,10,13,
+	11,
+};
+
+static float _vq_quantthresh__8u0__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8u0__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p1_0 = {
+	_vq_quantthresh__8u0__p1_0,
+	_vq_quantmap__8u0__p1_0,
+	3,
+	3
+};
+
+static static_codebook _8u0__p1_0 = {
+	4, 81,
+	_vq_lengthlist__8u0__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8u0__p1_0,
+	NULL,
+	&_vq_auxt__8u0__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u0__p2_0[] = {
+	 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 6, 7, 8, 6,
+	 7, 8, 5, 7, 7, 6, 8, 8, 7, 9, 7, 5, 7, 7, 7, 9,
+	 9, 7, 8, 8, 6, 9, 8, 7, 7,10, 8,10,10, 6, 8, 8,
+	 8,10, 8, 8,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 9, 6,
+	 8, 8, 8,10,10, 8, 8,10, 6, 8, 9, 8,10,10, 7,10,
+	 8,
+};
+
+static float _vq_quantthresh__8u0__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8u0__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p2_0 = {
+	_vq_quantthresh__8u0__p2_0,
+	_vq_quantmap__8u0__p2_0,
+	3,
+	3
+};
+
+static static_codebook _8u0__p2_0 = {
+	4, 81,
+	_vq_lengthlist__8u0__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8u0__p2_0,
+	NULL,
+	&_vq_auxt__8u0__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8u0__p3_0[] = {
+	 1, 5, 5, 7, 7, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8,
+	10, 9,11,11, 8, 9, 9,11,11, 6, 8, 8,10,10, 8,10,
+	10,11,11, 8,10,10,11,11,10,11,11,12,12,10,11,11,
+	12,13, 6, 8, 8,10,10, 8,10,10,11,11, 8,10,10,11,
+	11, 9,10,11,12,12,10,11,11,12,12, 8,11,11,14,13,
+	10,12,11,15,13,10,12,11,14,14,12,13,12,16,14,12,
+	14,12,16,15, 8,11,11,13,14,10,11,12,13,15,10,11,
+	12,13,15,11,12,13,14,15,12,12,14,14,16, 5, 8, 8,
+	11,11, 9,11,11,12,12, 8,10,11,12,12,11,12,12,15,
+	14,11,12,12,14,14, 7,11,10,13,12,10,11,12,13,14,
+	10,12,12,14,13,12,13,13,14,15,12,13,13,15,15, 7,
+	10,11,12,13,10,12,11,14,13,10,12,13,13,15,12,13,
+	12,14,14,11,13,13,15,16, 9,12,12,15,14,11,13,13,
+	15,16,11,13,13,16,16,13,14,15,15,15,12,14,15,17,
+	16, 9,12,12,14,15,11,13,13,15,16,11,13,13,16,18,
+	13,14,14,17,16,13,15,15,17,18, 5, 8, 9,11,11, 8,
+	11,11,12,12, 8,10,11,12,12,11,12,12,14,14,11,12,
+	12,14,15, 7,11,10,12,13,10,12,12,14,13,10,11,12,
+	13,14,11,13,13,15,14,12,13,13,14,15, 7,10,11,13,
+	13,10,12,12,13,14,10,12,12,13,13,11,13,13,16,16,
+	12,13,13,15,14, 9,12,12,16,15,10,13,13,15,15,11,
+	13,13,17,15,12,15,15,18,17,13,14,14,15,16, 9,12,
+	12,15,15,11,13,13,15,16,11,13,13,15,15,12,15,15,
+	16,16,13,15,14,17,15, 7,11,11,15,15,10,13,13,16,
+	15,10,13,13,15,16,14,15,15,17,19,13,15,14,15,18,
+	 9,12,12,16,16,11,13,14,17,16,11,13,13,17,16,15,
+	15,16,17,19,13,15,16, 0,18, 9,12,12,16,15,11,14,
+	13,17,17,11,13,14,16,16,15,16,16,19,18,13,15,15,
+	17,19,11,14,14,19,16,12,14,15, 0,18,12,16,15,18,
+	17,15,15,18,16,19,14,15,17,19,19,11,14,14,18,19,
+	13,15,14,19,19,12,16,15,18,17,15,17,15, 0,16,14,
+	17,16,19, 0, 7,11,11,14,14,10,12,12,15,15,10,13,
+	13,16,15,13,15,15,17, 0,14,15,15,16,19, 9,12,12,
+	16,16,11,14,14,16,16,11,13,13,16,16,14,17,16,19,
+	 0,14,18,17,17,19, 9,12,12,15,16,11,13,13,15,17,
+	12,14,13,19,16,13,15,15,17,19,15,17,16,17,19,11,
+	14,14,19,16,12,15,15,19,17,13,14,15,17,19,14,16,
+	17,19,19,16,15,16,17,19,11,15,14,16,16,12,15,15,
+	19, 0,12,14,15,19,19,14,16,16, 0,18,15,19,14,18,
+	16,
+};
+
+static float _vq_quantthresh__8u0__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8u0__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p3_0 = {
+	_vq_quantthresh__8u0__p3_0,
+	_vq_quantmap__8u0__p3_0,
+	5,
+	5
+};
+
+static static_codebook _8u0__p3_0 = {
+	4, 625,
+	_vq_lengthlist__8u0__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8u0__p3_0,
+	NULL,
+	&_vq_auxt__8u0__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8u0__p4_0[] = {
+	 3, 5, 5, 8, 8, 5, 6, 7, 9, 9, 6, 7, 6, 9, 9, 9,
+	 9, 9,10,11, 9, 9, 9,11,10, 6, 7, 7,10,10, 7, 7,
+	 8,10,10, 7, 8, 8,10,10,10,10,10,10,11, 9,10,10,
+	11,12, 6, 7, 7,10,10, 7, 8, 8,10,10, 7, 8, 7,10,
+	10, 9,10,10,12,11,10,10,10,11,10, 9,10,10,12,11,
+	10,10,10,13,11, 9,10,10,12,12,11,11,12,12,13,11,
+	11,11,12,13, 9,10,10,12,12,10,10,11,12,12,10,10,
+	11,12,12,11,11,11,13,13,11,12,12,13,13, 5, 7, 7,
+	10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,11,12,
+	12,10,11,10,12,12, 7, 8, 8,11,11, 7, 8, 9,10,11,
+	 8, 9, 9,11,11,11,10,11,10,12,10,11,11,12,13, 7,
+	 8, 8,10,11, 8, 9, 8,12,10, 8, 9, 9,11,12,10,11,
+	10,13,11,10,11,11,13,12, 9,11,10,13,12,10,10,11,
+	12,12,10,11,11,13,13,12,10,13,11,14,11,12,12,15,
+	13, 9,11,11,13,13,10,11,11,13,12,10,11,11,12,14,
+	12,13,11,14,12,12,12,12,14,14, 5, 7, 7,10,10, 7,
+	 8, 8,10,10, 7, 8, 8,11,10,10,11,11,12,12,10,11,
+	10,12,12, 7, 8, 8,10,11, 8, 9, 9,12,11, 8, 8, 9,
+	10,11,10,11,11,12,13,11,10,11,11,13, 6, 8, 8,10,
+	11, 8, 9, 9,11,11, 7, 9, 7,11,10,10,11,11,12,12,
+	10,11,10,13,10, 9,11,10,13,12,10,12,11,13,13,10,
+	10,11,12,13,11,12,13,15,14,11,11,13,12,13, 9,10,
+	11,12,13,10,11,11,12,13,10,11,10,13,12,12,13,13,
+	13,14,12,12,11,14,11, 8,10,10,12,13,10,11,11,13,
+	13,10,11,10,13,13,12,13,14,15,14,12,12,12,14,13,
+	 9,10,10,13,12,10,10,12,13,13,10,11,11,15,12,12,
+	12,13,15,14,12,13,13,15,13, 9,10,11,12,13,10,12,
+	10,13,12,10,11,11,12,13,12,14,12,15,13,12,12,12,
+	15,14,11,12,11,14,13,11,11,12,14,14,12,13,13,14,
+	13,13,11,15,11,15,14,14,14,16,15,11,12,12,13,14,
+	11,13,11,14,14,12,12,13,14,15,12,14,12,15,12,13,
+	15,14,16,15, 8,10,10,12,12,10,10,10,12,13,10,11,
+	11,13,13,12,12,12,13,14,13,13,13,15,15, 9,10,10,
+	12,12,10,11,11,13,12,10,10,11,13,13,12,12,12,14,
+	14,12,12,13,15,14, 9,10,10,13,12,10,10,12,12,13,
+	10,11,10,13,13,12,13,13,14,14,12,13,12,14,13,11,
+	12,12,14,13,12,13,12,14,14,10,12,12,14,14,14,14,
+	14,16,14,13,12,14,12,15,10,12,12,14,15,12,13,13,
+	14,16,11,12,11,15,14,13,14,14,14,15,13,14,11,14,
+	12,
+};
+
+static float _vq_quantthresh__8u0__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8u0__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p4_0 = {
+	_vq_quantthresh__8u0__p4_0,
+	_vq_quantmap__8u0__p4_0,
+	5,
+	5
+};
+
+static static_codebook _8u0__p4_0 = {
+	4, 625,
+	_vq_lengthlist__8u0__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8u0__p4_0,
+	NULL,
+	&_vq_auxt__8u0__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8u0__p5_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 7, 8, 8,
+	10,10, 4, 6, 6, 8, 8, 8, 8,10,10, 6, 8, 8, 9, 9,
+	 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 7, 8, 8,
+	 9, 9,10,10,12,11, 7, 8, 8, 9, 9,10,10,11,11, 9,
+	10,10,11,11,11,12,12,12, 9,10,10,11,11,12,12,12,
+	12,
+};
+
+static float _vq_quantthresh__8u0__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8u0__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p5_0 = {
+	_vq_quantthresh__8u0__p5_0,
+	_vq_quantmap__8u0__p5_0,
+	9,
+	9
+};
+
+static static_codebook _8u0__p5_0 = {
+	2, 81,
+	_vq_lengthlist__8u0__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8u0__p5_0,
+	NULL,
+	&_vq_auxt__8u0__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p6_0[] = {
+	6,
+	5,
+	7,
+	4,
+	8,
+	3,
+	9,
+	2,
+	10,
+	1,
+	11,
+	0,
+	12,
+};
+
+static long _vq_lengthlist__8u0__p6_0[] = {
+	 1, 4, 4, 7, 7, 9, 9,11,11,12,12,16,16, 3, 6, 6,
+	 9, 9,11,11,12,12,13,14,18,16, 3, 6, 7, 9, 9,11,
+	11,13,12,14,14,17,16, 7, 9, 9,11,11,12,12,14,14,
+	14,14,17,16, 7, 9, 9,11,11,13,12,13,13,14,14,17,
+	 0, 9,11,11,12,13,14,14,14,13,15,14,17,17, 9,11,
+	11,12,12,14,14,13,14,14,15, 0, 0,11,12,12,15,14,
+	15,14,15,14,15,16,17, 0,11,12,13,13,13,14,14,15,
+	14,15,15, 0, 0,12,14,14,15,15,14,16,15,15,17,16,
+	 0,18,13,14,14,15,14,15,14,15,16,17,16, 0, 0,17,
+	17,18, 0,16,18,16, 0, 0, 0,17, 0, 0,16, 0, 0,16,
+	16, 0,15, 0,17, 0, 0, 0, 0,
+};
+
+static float _vq_quantthresh__8u0__p6_0[] = {
+	-27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 
+	12.5, 17.5, 22.5, 27.5, 
+};
+
+static long _vq_quantmap__8u0__p6_0[] = {
+	   11,    9,    7,    5,    3,    1,    0,    2,
+	    4,    6,    8,   10,   12,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p6_0 = {
+	_vq_quantthresh__8u0__p6_0,
+	_vq_quantmap__8u0__p6_0,
+	13,
+	13
+};
+
+static static_codebook _8u0__p6_0 = {
+	2, 169,
+	_vq_lengthlist__8u0__p6_0,
+	1, -526516224, 1616117760, 4, 0,
+	_vq_quantlist__8u0__p6_0,
+	NULL,
+	&_vq_auxt__8u0__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p6_1[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8u0__p6_1[] = {
+	 1, 4, 4, 6, 6, 4, 6, 5, 7, 7, 4, 5, 6, 7, 7, 6,
+	 7, 7, 7, 7, 6, 7, 7, 7, 7,
+};
+
+static float _vq_quantthresh__8u0__p6_1[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8u0__p6_1[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p6_1 = {
+	_vq_quantthresh__8u0__p6_1,
+	_vq_quantmap__8u0__p6_1,
+	5,
+	5
+};
+
+static static_codebook _8u0__p6_1 = {
+	2, 25,
+	_vq_lengthlist__8u0__p6_1,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8u0__p6_1,
+	NULL,
+	&_vq_auxt__8u0__p6_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u0__p7_0[] = {
+	 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+	 7,
+};
+
+static float _vq_quantthresh__8u0__p7_0[] = {
+	-157.5, 157.5, 
+};
+
+static long _vq_quantmap__8u0__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p7_0 = {
+	_vq_quantthresh__8u0__p7_0,
+	_vq_quantmap__8u0__p7_0,
+	3,
+	3
+};
+
+static static_codebook _8u0__p7_0 = {
+	4, 81,
+	_vq_lengthlist__8u0__p7_0,
+	1, -518803456, 1628680192, 2, 0,
+	_vq_quantlist__8u0__p7_0,
+	NULL,
+	&_vq_auxt__8u0__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p7_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__8u0__p7_1[] = {
+	 1, 5, 5, 5, 5,10,10,11,11,11,11,11,11,11,11, 5,
+	 7, 6, 8, 8, 9,10,11,11,11,11,11,11,11,11, 6, 6,
+	 7, 9, 7,11,10,11,11,11,11,11,11,11,11, 5, 6, 6,
+	11, 8,11,11,11,11,11,11,11,11,11,11, 5, 6, 6, 9,
+	10,11,10,11,11,11,11,11,11,11,11, 7,10,10,11,11,
+	11,11,11,11,11,11,11,11,11,11, 7,11, 8,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__8u0__p7_1[] = {
+	-136.5, -115.5, -94.5, -73.5, -52.5, -31.5, -10.5, 10.5, 
+	31.5, 52.5, 73.5, 94.5, 115.5, 136.5, 
+};
+
+static long _vq_quantmap__8u0__p7_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p7_1 = {
+	_vq_quantthresh__8u0__p7_1,
+	_vq_quantmap__8u0__p7_1,
+	15,
+	15
+};
+
+static static_codebook _8u0__p7_1 = {
+	2, 225,
+	_vq_lengthlist__8u0__p7_1,
+	1, -520986624, 1620377600, 4, 0,
+	_vq_quantlist__8u0__p7_1,
+	NULL,
+	&_vq_auxt__8u0__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u0__p7_2[] = {
+	10,
+	9,
+	11,
+	8,
+	12,
+	7,
+	13,
+	6,
+	14,
+	5,
+	15,
+	4,
+	16,
+	3,
+	17,
+	2,
+	18,
+	1,
+	19,
+	0,
+	20,
+};
+
+static long _vq_lengthlist__8u0__p7_2[] = {
+	 1, 6, 5, 7, 7, 9, 9, 9, 9,10,12,12,10,11,11,10,
+	11,11,11,10,11, 6, 8, 8, 9, 9,10,10, 9,10,11,11,
+	10,11,11,11,11,10,11,11,11,11, 6, 7, 8, 9, 9, 9,
+	10,11,10,11,12,11,10,11,11,11,11,11,11,12,10, 8,
+	 9, 9,10, 9,10,10, 9,10,10,10,10,10, 9,10,10,10,
+	10, 9,10,10, 9, 9, 9, 9,10,10, 9, 9,10,10,11,10,
+	 9,12,10,11,10, 9,10,10,10, 8, 9, 9,10, 9,10, 9,
+	 9,10,10, 9,10, 9,11,10,10,10,10,10, 9,10, 8, 8,
+	 9, 9,10, 9,11, 9, 8, 9, 9,10,11,10,10,10,11,12,
+	 9, 9,11, 8, 9, 8,11,10,11,10,10, 9,11,10,10,10,
+	10,10,10,10,11,11,11,11, 8, 9, 9, 9,10,10,10,11,
+	11,12,11,12,11,10,10,10,12,11,11,11,10, 8,10, 9,
+	11,10,10,11,12,10,11,12,11,11,12,11,12,12,10,11,
+	11,10, 9, 9,10,11,12,10,10,10,11,10,11,11,10,12,
+	12,10,11,10,11,12,10, 9,10,10,11,10,11,11,11,11,
+	11,12,11,11,11, 9,11,10,11,10,11,10, 9, 9,10,11,
+	11,11,10,10,11,12,12,11,12,11,11,11,12,12,12,12,
+	11, 9,11,11,12,10,11,11,11,11,11,11,12,11,11,12,
+	11,11,11,10,11,11, 9,11,10,11,11,11,10,10,10,11,
+	11,11,12,10,11,10,11,11,11,11,12, 9,11,10,11,11,
+	10,10,11,11, 9,11,11,12,10,10,10,10,10,11,11,10,
+	 9,10,11,11,12,11,10,10,12,11,11,12,11,12,11,11,
+	10,10,11,11,10,12,11,10,11,10,11,10,10,10,11,11,
+	10,10,11,11,11,11,10,10,10,12,11,11,11,11,10, 9,
+	10,11,11,11,12,11,11,11,12,10,11,11,11, 9,10,11,
+	11,11,11,11,11,10,10,11,11,12,11,10,11,12,11,10,
+	10,11, 9,10,11,11,11,11,11,10,11,11,10,12,11,11,
+	11,12,11,11,11,10,10,11,11,
+};
+
+static float _vq_quantthresh__8u0__p7_2[] = {
+	-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, 
+	-1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 
+	6.5, 7.5, 8.5, 9.5, 
+};
+
+static long _vq_quantmap__8u0__p7_2[] = {
+	   19,   17,   15,   13,   11,    9,    7,    5,
+	    3,    1,    0,    2,    4,    6,    8,   10,
+	   12,   14,   16,   18,   20,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u0__p7_2 = {
+	_vq_quantthresh__8u0__p7_2,
+	_vq_quantmap__8u0__p7_2,
+	21,
+	21
+};
+
+static static_codebook _8u0__p7_2 = {
+	2, 441,
+	_vq_lengthlist__8u0__p7_2,
+	1, -529268736, 1611661312, 5, 0,
+	_vq_quantlist__8u0__p7_2,
+	NULL,
+	&_vq_auxt__8u0__p7_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__8u0__single[] = {
+	 4, 7,11, 9,12, 8, 7,10, 6, 4, 5, 5, 7, 5, 6,16,
+	 9, 5, 5, 6, 7, 7, 9,16, 7, 4, 6, 5, 7, 5, 7,17,
+	10, 7, 7, 8, 7, 7, 8,18, 7, 5, 6, 4, 5, 4, 5,15,
+	 7, 6, 7, 5, 6, 4, 5,15,12,13,18,12,17,11, 9,17,
+};
+
+static static_codebook _huff_book__8u0__single = {
+	2, 64,
+	_huff_lengthlist__8u0__single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p1_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u1__p1_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 7, 9,10, 7,
+	 9, 9, 5, 8, 8, 7,10, 9, 7, 9, 9, 5, 8, 8, 8,10,
+	10, 8,10,10, 7,10,10, 9,10,12,10,12,12, 7,10,10,
+	 9,12,11,10,12,12, 5, 8, 8, 8,10,10, 8,10,10, 7,
+	10,10,10,12,12, 9,11,12, 7,10,10,10,12,12, 9,12,
+	10,
+};
+
+static float _vq_quantthresh__8u1__p1_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8u1__p1_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p1_0 = {
+	_vq_quantthresh__8u1__p1_0,
+	_vq_quantmap__8u1__p1_0,
+	3,
+	3
+};
+
+static static_codebook _8u1__p1_0 = {
+	4, 81,
+	_vq_lengthlist__8u1__p1_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8u1__p1_0,
+	NULL,
+	&_vq_auxt__8u1__p1_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p2_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u1__p2_0[] = {
+	 3, 4, 5, 5, 6, 6, 5, 6, 6, 5, 7, 6, 6, 7, 8, 6,
+	 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 7, 5, 6, 6, 7, 8,
+	 8, 6, 7, 7, 6, 8, 7, 7, 7, 9, 8, 9, 9, 6, 7, 8,
+	 7, 9, 7, 8, 9, 9, 5, 6, 6, 6, 7, 7, 7, 8, 8, 6,
+	 8, 7, 8, 9, 9, 7, 7, 9, 6, 7, 8, 8, 9, 9, 7, 9,
+	 7,
+};
+
+static float _vq_quantthresh__8u1__p2_0[] = {
+	-0.5, 0.5, 
+};
+
+static long _vq_quantmap__8u1__p2_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p2_0 = {
+	_vq_quantthresh__8u1__p2_0,
+	_vq_quantmap__8u1__p2_0,
+	3,
+	3
+};
+
+static static_codebook _8u1__p2_0 = {
+	4, 81,
+	_vq_lengthlist__8u1__p2_0,
+	1, -535822336, 1611661312, 2, 0,
+	_vq_quantlist__8u1__p2_0,
+	NULL,
+	&_vq_auxt__8u1__p2_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p3_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8u1__p3_0[] = {
+	 1, 5, 5, 7, 7, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8,
+	10, 9,11,11, 9, 9, 9,11,11, 6, 8, 8,10,10, 8,10,
+	10,11,11, 8, 9,10,11,11,10,11,11,12,12,10,11,11,
+	12,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10, 9,11,
+	11,10,11,11,12,12,10,11,11,12,12, 9,11,11,14,13,
+	10,12,11,14,14,10,12,11,14,13,12,13,13,15,14,12,
+	13,13,15,14, 8,11,11,13,14,10,11,12,13,15,10,11,
+	12,14,14,12,13,13,14,15,12,13,13,14,15, 5, 8, 8,
+	11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,14,
+	13,11,12,12,13,14, 8,10,10,12,12, 9,11,12,13,14,
+	10,12,12,13,13,12,12,13,14,14,11,13,13,15,15, 7,
+	10,10,12,12, 9,12,11,14,12,10,11,12,13,14,12,13,
+	12,14,14,12,13,13,15,16,10,12,12,15,14,11,12,13,
+	15,15,11,13,13,15,16,14,14,15,15,16,13,14,15,17,
+	15, 9,12,12,14,15,11,13,12,15,15,11,13,13,15,15,
+	13,14,13,15,14,13,14,14,17, 0, 5, 8, 8,11,11, 8,
+	10,10,12,12, 8,10,10,12,12,11,12,12,14,14,11,12,
+	12,14,14, 7,10,10,12,12,10,12,12,13,13, 9,11,12,
+	12,13,11,12,13,15,15,11,12,13,14,15, 8,10,10,12,
+	12,10,12,11,13,13,10,12,11,13,13,11,13,13,15,14,
+	12,13,12,15,13, 9,12,12,14,14,11,13,13,16,15,11,
+	12,13,16,15,13,14,15,16,16,13,13,15,15,16,10,12,
+	12,15,14,11,13,13,14,16,11,13,13,15,16,13,15,15,
+	16,17,13,15,14,16,15, 8,11,11,14,15,10,12,12,15,
+	15,10,12,12,15,16,14,15,15,16,17,13,14,14,16,16,
+	 9,12,12,15,15,11,13,14,15,17,11,13,13,15,16,14,
+	15,16,19,17,13,15,15, 0,17, 9,12,12,15,15,11,14,
+	13,16,15,11,13,13,15,16,15,15,15,18,17,13,15,15,
+	17,17,11,15,14,18,16,12,14,15,17,17,12,15,15,18,
+	18,15,15,16,15,19,14,16,16, 0, 0,11,14,14,16,17,
+	12,15,14,18,17,12,15,15,18,18,15,17,15,18,16,14,
+	16,16,18,18, 7,11,11,14,14,10,12,12,15,15,10,12,
+	13,15,15,13,14,15,16,16,14,15,15,18,18, 9,12,12,
+	15,15,11,13,13,16,15,11,12,13,16,16,14,15,15,17,
+	16,15,16,16,17,17, 9,12,12,15,15,11,13,13,15,17,
+	11,14,13,16,15,13,15,15,17,17,15,15,15,18,17,11,
+	14,14,17,15,12,14,15,17,18,13,13,15,17,17,14,16,
+	16,19,18,16,15,17,17, 0,11,14,14,17,17,12,15,15,
+	18, 0,12,15,14,18,16,14,17,17,19, 0,16,18,15, 0,
+	16,
+};
+
+static float _vq_quantthresh__8u1__p3_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8u1__p3_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p3_0 = {
+	_vq_quantthresh__8u1__p3_0,
+	_vq_quantmap__8u1__p3_0,
+	5,
+	5
+};
+
+static static_codebook _8u1__p3_0 = {
+	4, 625,
+	_vq_lengthlist__8u1__p3_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8u1__p3_0,
+	NULL,
+	&_vq_auxt__8u1__p3_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p4_0[] = {
+	2,
+	1,
+	3,
+	0,
+	4,
+};
+
+static long _vq_lengthlist__8u1__p4_0[] = {
+	 4, 5, 5, 9, 9, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 9,
+	 9, 9,11,11, 9, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 7,
+	 8, 9,10, 7, 7, 8, 9,10, 9, 9,10,10,11, 9, 9,10,
+	10,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 7,10,
+	 9, 9,10, 9,12,11,10,10, 9,12,10, 9,10,10,12,11,
+	 9,10,10,12,11, 9,10,10,12,12,11,11,12,12,13,11,
+	11,12,12,13, 9, 9,10,12,11, 9,10,10,12,12,10,10,
+	10,12,12,11,12,11,13,12,11,12,11,13,12, 6, 7, 7,
+	 9, 9, 7, 8, 8,10,10, 7, 8, 7,10, 9,10,10,10,12,
+	12,10,10,10,12,11, 7, 8, 7,10,10, 7, 7, 9,10,11,
+	 8, 9, 9,11,10,10,10,11,10,12,10,10,11,12,12, 7,
+	 8, 8,10,10, 7, 9, 8,11,10, 8, 8, 9,11,11,10,11,
+	10,12,11,10,11,11,12,12, 9,10,10,12,12, 9,10,10,
+	12,12,10,11,11,13,12,11,10,12,10,14,12,12,12,13,
+	14, 9,10,10,12,12, 9,11,10,12,12,10,11,11,12,12,
+	11,12,11,14,12,12,12,12,14,14, 5, 7, 7, 9, 9, 7,
+	 7, 7, 9,10, 7, 8, 8,10,10,10,10,10,11,11,10,10,
+	10,12,12, 7, 8, 8,10,10, 8, 9, 8,11,10, 7, 8, 9,
+	10,11,10,10,10,11,12,10,10,11,11,13, 6, 7, 8,10,
+	10, 8, 9, 9,10,10, 7, 9, 7,11,10,10,11,10,12,12,
+	10,11,10,12,10, 9,10,10,12,12,10,11,11,13,12, 9,
+	10,10,12,12,12,12,12,14,13,11,11,12,11,14, 9,10,
+	10,11,12,10,11,11,12,13, 9,10,10,12,12,12,12,12,
+	14,13,11,12,10,14,11, 9, 9,10,11,12, 9,10,10,12,
+	12, 9,10,10,12,12,12,12,12,14,14,11,12,12,13,12,
+	 9,10, 9,12,12, 9,10,11,12,13,10,11,10,13,11,12,
+	12,13,13,14,12,12,12,13,13, 9,10,10,12,12,10,11,
+	10,13,12,10,10,11,12,13,12,13,12,14,13,12,12,12,
+	13,14,11,12,11,14,13,10,10,11,13,13,12,12,12,14,
+	13,12,10,14,10,15,13,14,14,14,14,11,11,12,13,14,
+	10,12,11,13,13,12,12,12,13,15,12,13,11,15,12,13,
+	13,14,14,14, 9,10, 9,12,12, 9,10,10,12,12,10,10,
+	10,12,12,11,11,12,12,13,12,12,12,14,14, 9,10,10,
+	12,12,10,11,10,13,12,10,10,11,12,13,12,12,12,14,
+	13,12,12,13,13,14, 9,10,10,12,13,10,10,11,11,12,
+	 9,11,10,13,12,12,12,12,13,14,12,13,12,14,13,11,
+	12,11,13,13,12,13,12,14,13,10,11,12,13,13,13,13,
+	13,14,15,12,11,14,12,14,11,11,12,12,13,12,12,12,
+	13,14,10,12,10,14,13,13,13,13,14,15,12,14,11,15,
+	10,
+};
+
+static float _vq_quantthresh__8u1__p4_0[] = {
+	-1.5, -0.5, 0.5, 1.5, 
+};
+
+static long _vq_quantmap__8u1__p4_0[] = {
+	    3,    1,    0,    2,    4,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p4_0 = {
+	_vq_quantthresh__8u1__p4_0,
+	_vq_quantmap__8u1__p4_0,
+	5,
+	5
+};
+
+static static_codebook _8u1__p4_0 = {
+	4, 625,
+	_vq_lengthlist__8u1__p4_0,
+	1, -533725184, 1611661312, 3, 0,
+	_vq_quantlist__8u1__p4_0,
+	NULL,
+	&_vq_auxt__8u1__p4_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p5_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8u1__p5_0[] = {
+	 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 5, 8, 7, 8, 8,
+	10,10, 4, 6, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9,
+	 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 8, 8, 8,
+	 9, 9,10,10,12,11, 8, 8, 8, 9, 9,10,10,11,11, 9,
+	10,10,11,11,11,11,13,12, 9,10,10,11,11,12,12,12,
+	13,
+};
+
+static float _vq_quantthresh__8u1__p5_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8u1__p5_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p5_0 = {
+	_vq_quantthresh__8u1__p5_0,
+	_vq_quantmap__8u1__p5_0,
+	9,
+	9
+};
+
+static static_codebook _8u1__p5_0 = {
+	2, 81,
+	_vq_lengthlist__8u1__p5_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8u1__p5_0,
+	NULL,
+	&_vq_auxt__8u1__p5_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p6_0[] = {
+	4,
+	3,
+	5,
+	2,
+	6,
+	1,
+	7,
+	0,
+	8,
+};
+
+static long _vq_lengthlist__8u1__p6_0[] = {
+	 3, 4, 4, 6, 6, 7, 7, 9, 9, 4, 4, 5, 6, 6, 7, 7,
+	 9, 9, 4, 4, 4, 6, 6, 7, 7, 9, 9, 6, 6, 6, 7, 7,
+	 8, 8, 9, 9, 6, 6, 6, 7, 7, 8, 8, 9, 9, 7, 7, 7,
+	 8, 8, 8, 9,10,10, 7, 7, 7, 8, 8, 9, 8,10,10, 9,
+	 9, 9, 9, 9,10,10,10,10, 9, 9, 9, 9, 9,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__8u1__p6_0[] = {
+	-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 
+};
+
+static long _vq_quantmap__8u1__p6_0[] = {
+	    7,    5,    3,    1,    0,    2,    4,    6,
+	    8,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p6_0 = {
+	_vq_quantthresh__8u1__p6_0,
+	_vq_quantmap__8u1__p6_0,
+	9,
+	9
+};
+
+static static_codebook _8u1__p6_0 = {
+	2, 81,
+	_vq_lengthlist__8u1__p6_0,
+	1, -531628032, 1611661312, 4, 0,
+	_vq_quantlist__8u1__p6_0,
+	NULL,
+	&_vq_auxt__8u1__p6_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p7_0[] = {
+	1,
+	0,
+	2,
+};
+
+static long _vq_lengthlist__8u1__p7_0[] = {
+	 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 9, 8,10,10, 8,
+	10,10, 5, 9, 9, 7,10,10, 8,10,10, 4,10,10, 9,12,
+	12, 9,11,11, 7,12,11,10,11,13,10,13,13, 7,12,12,
+	10,13,12,10,13,13, 4,10,10, 9,12,12, 9,12,12, 7,
+	12,12,10,13,13,10,12,13, 7,11,12,10,13,13,10,13,
+	11,
+};
+
+static float _vq_quantthresh__8u1__p7_0[] = {
+	-5.5, 5.5, 
+};
+
+static long _vq_quantmap__8u1__p7_0[] = {
+	    1,    0,    2,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p7_0 = {
+	_vq_quantthresh__8u1__p7_0,
+	_vq_quantmap__8u1__p7_0,
+	3,
+	3
+};
+
+static static_codebook _8u1__p7_0 = {
+	4, 81,
+	_vq_lengthlist__8u1__p7_0,
+	1, -529137664, 1618345984, 2, 0,
+	_vq_quantlist__8u1__p7_0,
+	NULL,
+	&_vq_auxt__8u1__p7_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p7_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__8u1__p7_1[] = {
+	 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 7, 7,
+	 8, 8, 9, 9, 9, 9, 4, 5, 5, 7, 7, 8, 8, 9, 9, 9,
+	 9, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8,
+	 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9,
+	 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 9, 9,
+	 9, 9, 9, 9,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,10,
+	10,10,10, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, 8, 9,
+	 9, 9, 9, 9, 9,10,10,10,10,
+};
+
+static float _vq_quantthresh__8u1__p7_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__8u1__p7_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p7_1 = {
+	_vq_quantthresh__8u1__p7_1,
+	_vq_quantmap__8u1__p7_1,
+	11,
+	11
+};
+
+static static_codebook _8u1__p7_1 = {
+	2, 121,
+	_vq_lengthlist__8u1__p7_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__8u1__p7_1,
+	NULL,
+	&_vq_auxt__8u1__p7_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p8_0[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__8u1__p8_0[] = {
+	 1, 4, 4, 6, 6, 8, 8,10,10,11,11, 4, 6, 6, 7, 7,
+	 9, 9,11,11,13,12, 4, 6, 6, 7, 7, 9, 9,11,11,12,
+	12, 6, 7, 7, 9, 9,11,11,12,12,13,13, 6, 7, 7, 9,
+	 9,11,11,12,12,13,13, 8, 9, 9,11,11,12,12,13,13,
+	14,14, 8, 9, 9,11,11,12,12,13,13,14,14, 9,11,11,
+	12,12,13,13,14,14,15,15, 9,11,11,12,12,13,13,14,
+	14,15,14,11,12,12,13,13,14,14,15,15,16,16,11,12,
+	12,13,13,14,14,15,15,15,15,
+};
+
+static float _vq_quantthresh__8u1__p8_0[] = {
+	-49.5, -38.5, -27.5, -16.5, -5.5, 5.5, 16.5, 27.5, 
+	38.5, 49.5, 
+};
+
+static long _vq_quantmap__8u1__p8_0[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p8_0 = {
+	_vq_quantthresh__8u1__p8_0,
+	_vq_quantmap__8u1__p8_0,
+	11,
+	11
+};
+
+static static_codebook _8u1__p8_0 = {
+	2, 121,
+	_vq_lengthlist__8u1__p8_0,
+	1, -524582912, 1618345984, 4, 0,
+	_vq_quantlist__8u1__p8_0,
+	NULL,
+	&_vq_auxt__8u1__p8_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p8_1[] = {
+	5,
+	4,
+	6,
+	3,
+	7,
+	2,
+	8,
+	1,
+	9,
+	0,
+	10,
+};
+
+static long _vq_lengthlist__8u1__p8_1[] = {
+	 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 6, 6, 7, 7,
+	 7, 7, 8, 8, 8, 8, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8,
+	 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7,
+	 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8,
+	 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+	 8, 8, 8, 8, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 9,
+	 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8,
+	 8, 8, 8, 8, 8, 9, 9, 9, 9,
+};
+
+static float _vq_quantthresh__8u1__p8_1[] = {
+	-4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 
+	3.5, 4.5, 
+};
+
+static long _vq_quantmap__8u1__p8_1[] = {
+	    9,    7,    5,    3,    1,    0,    2,    4,
+	    6,    8,   10,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p8_1 = {
+	_vq_quantthresh__8u1__p8_1,
+	_vq_quantmap__8u1__p8_1,
+	11,
+	11
+};
+
+static static_codebook _8u1__p8_1 = {
+	2, 121,
+	_vq_lengthlist__8u1__p8_1,
+	1, -531365888, 1611661312, 4, 0,
+	_vq_quantlist__8u1__p8_1,
+	NULL,
+	&_vq_auxt__8u1__p8_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p9_0[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__8u1__p9_0[] = {
+	 1, 4, 4,11,11,11,11,11,11,11,11,11,11,11,11, 3,
+	11, 8,11,11,11,11,11,11,11,11,11,11,11,11, 3, 9,
+	 9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+	11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__8u1__p9_0[] = {
+	-1657.5, -1402.5, -1147.5, -892.5, -637.5, -382.5, -127.5, 127.5, 
+	382.5, 637.5, 892.5, 1147.5, 1402.5, 1657.5, 
+};
+
+static long _vq_quantmap__8u1__p9_0[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p9_0 = {
+	_vq_quantthresh__8u1__p9_0,
+	_vq_quantmap__8u1__p9_0,
+	15,
+	15
+};
+
+static static_codebook _8u1__p9_0 = {
+	2, 225,
+	_vq_lengthlist__8u1__p9_0,
+	1, -514071552, 1627381760, 4, 0,
+	_vq_quantlist__8u1__p9_0,
+	NULL,
+	&_vq_auxt__8u1__p9_0,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p9_1[] = {
+	7,
+	6,
+	8,
+	5,
+	9,
+	4,
+	10,
+	3,
+	11,
+	2,
+	12,
+	1,
+	13,
+	0,
+	14,
+};
+
+static long _vq_lengthlist__8u1__p9_1[] = {
+	 1, 4, 4, 7, 7, 9, 9, 7, 7, 8, 8,10,10,11,11, 4,
+	 7, 7, 9, 9,10,10, 8, 8,10,10,10,11,10,11, 4, 7,
+	 7, 9, 9,10,10, 8, 8,10, 9,11,11,11,11, 7, 9, 9,
+	12,12,11,12,10,10,11,10,12,11,11,11, 7, 9, 9,11,
+	11,13,12, 9, 9,11,10,11,11,12,11, 9,10,10,12,12,
+	14,14,10,10,11,12,12,11,11,11, 9,10,11,11,13,14,
+	13,10,11,11,11,12,11,12,12, 7, 8, 8,10, 9,11,10,
+	11,12,12,11,12,14,12,13, 7, 8, 8, 9,10,10,11,12,
+	12,12,11,12,12,12,13, 9, 9, 9,11,11,13,12,12,12,
+	12,11,12,12,13,12, 8,10,10,11,10,11,12,12,12,12,
+	12,12,14,12,12, 9,11,11,11,12,12,12,12,13,13,12,
+	12,13,13,12,10,11,11,12,11,12,12,12,11,12,13,12,
+	12,12,13,11,11,12,12,12,13,12,12,11,12,13,13,12,
+	12,13,12,11,12,12,13,13,12,13,12,13,13,13,13,14,
+	13,
+};
+
+static float _vq_quantthresh__8u1__p9_1[] = {
+	-110.5, -93.5, -76.5, -59.5, -42.5, -25.5, -8.5, 8.5, 
+	25.5, 42.5, 59.5, 76.5, 93.5, 110.5, 
+};
+
+static long _vq_quantmap__8u1__p9_1[] = {
+	   13,   11,    9,    7,    5,    3,    1,    0,
+	    2,    4,    6,    8,   10,   12,   14,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p9_1 = {
+	_vq_quantthresh__8u1__p9_1,
+	_vq_quantmap__8u1__p9_1,
+	15,
+	15
+};
+
+static static_codebook _8u1__p9_1 = {
+	2, 225,
+	_vq_lengthlist__8u1__p9_1,
+	1, -522338304, 1620115456, 4, 0,
+	_vq_quantlist__8u1__p9_1,
+	NULL,
+	&_vq_auxt__8u1__p9_1,
+	NULL,
+	0
+};
+
+static long _vq_quantlist__8u1__p9_2[] = {
+	8,
+	7,
+	9,
+	6,
+	10,
+	5,
+	11,
+	4,
+	12,
+	3,
+	13,
+	2,
+	14,
+	1,
+	15,
+	0,
+	16,
+};
+
+static long _vq_lengthlist__8u1__p9_2[] = {
+	 2, 5, 4, 6, 6, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 5, 6, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	 9,10,10, 9, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9,
+	 9, 9, 9,10,10, 8, 8, 8, 9, 9, 9, 9,10,10,10, 9,
+	10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
+	10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10,10,10,
+	10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,10,
+	10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,
+	 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,
+	10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,10,
+	 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9,
+	10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+	10,
+};
+
+static float _vq_quantthresh__8u1__p9_2[] = {
+	-7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 
+	0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 
+};
+
+static long _vq_quantmap__8u1__p9_2[] = {
+	   15,   13,   11,    9,    7,    5,    3,    1,
+	    0,    2,    4,    6,    8,   10,   12,   14,
+	   16,
+};
+
+static encode_aux_threshmatch _vq_auxt__8u1__p9_2 = {
+	_vq_quantthresh__8u1__p9_2,
+	_vq_quantmap__8u1__p9_2,
+	17,
+	17
+};
+
+static static_codebook _8u1__p9_2 = {
+	2, 289,
+	_vq_lengthlist__8u1__p9_2,
+	1, -529530880, 1611661312, 5, 0,
+	_vq_quantlist__8u1__p9_2,
+	NULL,
+	&_vq_auxt__8u1__p9_2,
+	NULL,
+	0
+};
+
+static long _huff_lengthlist__8u1__single[] = {
+	 4, 7,13, 9,15, 9,16, 8,10,13, 7, 5, 8, 6, 9, 7,
+	10, 7,10,11,11, 6, 7, 8, 8, 9, 9, 9,12,16, 8, 5,
+	 8, 6, 8, 6, 9, 7,10,12,11, 7, 7, 7, 6, 7, 7, 7,
+	11,15, 7, 5, 8, 6, 7, 5, 7, 6, 9,13,13, 9, 9, 8,
+	 6, 6, 5, 5, 9,14, 8, 6, 8, 6, 6, 4, 5, 3, 5,13,
+	 9, 9,11, 8,10, 7, 8, 4, 5,12,11,16,17,15,17,12,
+	13, 8, 8,15,
+};
+
+static static_codebook _huff_book__8u1__single = {
+	2, 100,
+	_huff_lengthlist__8u1__single,
+	0, 0, 0, 0, 0,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	0
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/codebook.c
@@ -1,0 +1,620 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: basic codebook pack/unpack/code/decode operations
+ last mod: $Id: codebook.c,v 1.39 2002/06/28 22:19:35 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codebook.h"
+#include "scales.h"
+#include "misc.h"
+#include "os.h"
+
+/* packs the given codebook into the bitstream **************************/
+
+int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){
+  long i,j;
+  int ordered=0;
+
+  /* first the basic parameters */
+  oggpack_write(opb,0x564342,24);
+  oggpack_write(opb,c->dim,16);
+  oggpack_write(opb,c->entries,24);
+
+  /* pack the codewords.  There are two packings; length ordered and
+     length random.  Decide between the two now. */
+  
+  for(i=1;i<c->entries;i++)
+    if(c->lengthlist[i-1]==0 || c->lengthlist[i]<c->lengthlist[i-1])break;
+  if(i==c->entries)ordered=1;
+  
+  if(ordered){
+    /* length ordered.  We only need to say how many codewords of
+       each length.  The actual codewords are generated
+       deterministically */
+
+    long count=0;
+    oggpack_write(opb,1,1);  /* ordered */
+    oggpack_write(opb,c->lengthlist[0]-1,5); /* 1 to 32 */
+
+    for(i=1;i<c->entries;i++){
+      long this=c->lengthlist[i];
+      long last=c->lengthlist[i-1];
+      if(this>last){
+	for(j=last;j<this;j++){
+	  oggpack_write(opb,i-count,_ilog(c->entries-count));
+	  count=i;
+	}
+      }
+    }
+    oggpack_write(opb,i-count,_ilog(c->entries-count));
+    
+  }else{
+    /* length random.  Again, we don't code the codeword itself, just
+       the length.  This time, though, we have to encode each length */
+    oggpack_write(opb,0,1);   /* unordered */
+    
+    /* algortihmic mapping has use for 'unused entries', which we tag
+       here.  The algorithmic mapping happens as usual, but the unused
+       entry has no codeword. */
+    for(i=0;i<c->entries;i++)
+      if(c->lengthlist[i]==0)break;
+
+    if(i==c->entries){
+      oggpack_write(opb,0,1); /* no unused entries */
+      for(i=0;i<c->entries;i++)
+	oggpack_write(opb,c->lengthlist[i]-1,5);
+    }else{
+      oggpack_write(opb,1,1); /* we have unused entries; thus we tag */
+      for(i=0;i<c->entries;i++){
+	if(c->lengthlist[i]==0){
+	  oggpack_write(opb,0,1);
+	}else{
+	  oggpack_write(opb,1,1);
+	  oggpack_write(opb,c->lengthlist[i]-1,5);
+	}
+      }
+    }
+  }
+
+  /* is the entry number the desired return value, or do we have a
+     mapping? If we have a mapping, what type? */
+  oggpack_write(opb,c->maptype,4);
+  switch(c->maptype){
+  case 0:
+    /* no mapping */
+    break;
+  case 1:case 2:
+    /* implicitly populated value mapping */
+    /* explicitly populated value mapping */
+    
+    if(!c->quantlist){
+      /* no quantlist?  error */
+      return(-1);
+    }
+    
+    /* values that define the dequantization */
+    oggpack_write(opb,c->q_min,32);
+    oggpack_write(opb,c->q_delta,32);
+    oggpack_write(opb,c->q_quant-1,4);
+    oggpack_write(opb,c->q_sequencep,1);
+    
+    {
+      int quantvals;
+      switch(c->maptype){
+      case 1:
+	/* a single column of (c->entries/c->dim) quantized values for
+	   building a full value list algorithmically (square lattice) */
+	quantvals=_book_maptype1_quantvals(c);
+	break;
+      case 2:
+	/* every value (c->entries*c->dim total) specified explicitly */
+	quantvals=c->entries*c->dim;
+	break;
+      default: /* NOT_REACHABLE */
+	quantvals=-1;
+      }
+
+      /* quantized values */
+      for(i=0;i<quantvals;i++)
+	oggpack_write(opb,labs(c->quantlist[i]),c->q_quant);
+
+    }
+    break;
+  default:
+    /* error case; we don't have any other map types now */
+    return(-1);
+  }
+
+  return(0);
+}
+
+/* unpacks a codebook from the packet buffer into the codebook struct,
+   readies the codebook auxiliary structures for decode *************/
+int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
+  long i,j;
+  memset(s,0,sizeof(*s));
+  s->allocedp=1;
+
+  /* make sure alignment is correct */
+  if(oggpack_read(opb,24)!=0x564342)goto _eofout;
+
+  /* first the basic parameters */
+  s->dim=oggpack_read(opb,16);
+  s->entries=oggpack_read(opb,24);
+  if(s->entries==-1)goto _eofout;
+
+  /* codeword ordering.... length ordered or unordered? */
+  switch((int)oggpack_read(opb,1)){
+  case 0:
+    /* unordered */
+    s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries);
+
+    /* allocated but unused entries? */
+    if(oggpack_read(opb,1)){
+      /* yes, unused entries */
+
+      for(i=0;i<s->entries;i++){
+	if(oggpack_read(opb,1)){
+	  long num=oggpack_read(opb,5);
+	  if(num==-1)goto _eofout;
+	  s->lengthlist[i]=num+1;
+	}else
+	  s->lengthlist[i]=0;
+      }
+    }else{
+      /* all entries used; no tagging */
+      for(i=0;i<s->entries;i++){
+	long num=oggpack_read(opb,5);
+	if(num==-1)goto _eofout;
+	s->lengthlist[i]=num+1;
+      }
+    }
+    
+    break;
+  case 1:
+    /* ordered */
+    {
+      long length=oggpack_read(opb,5)+1;
+      s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries);
+
+      for(i=0;i<s->entries;){
+	long num=oggpack_read(opb,_ilog(s->entries-i));
+	if(num==-1)goto _eofout;
+	for(j=0;j<num && i<s->entries;j++,i++)
+	  s->lengthlist[i]=length;
+	length++;
+      }
+    }
+    break;
+  default:
+    /* EOF */
+    return(-1);
+  }
+  
+  /* Do we have a mapping to unpack? */
+  switch((s->maptype=oggpack_read(opb,4))){
+  case 0:
+    /* no mapping */
+    break;
+  case 1: case 2:
+    /* implicitly populated value mapping */
+    /* explicitly populated value mapping */
+
+    s->q_min=oggpack_read(opb,32);
+    s->q_delta=oggpack_read(opb,32);
+    s->q_quant=oggpack_read(opb,4)+1;
+    s->q_sequencep=oggpack_read(opb,1);
+
+    {
+      int quantvals=0;
+      switch(s->maptype){
+      case 1:
+	quantvals=_book_maptype1_quantvals(s);
+	break;
+      case 2:
+	quantvals=s->entries*s->dim;
+	break;
+      }
+      
+      /* quantized values */
+      s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
+      for(i=0;i<quantvals;i++)
+	s->quantlist[i]=oggpack_read(opb,s->q_quant);
+      
+      if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout;
+    }
+    break;
+  default:
+    goto _errout;
+  }
+
+  /* all set */
+  return(0);
+  
+ _errout:
+ _eofout:
+  vorbis_staticbook_clear(s);
+  return(-1); 
+}
+
+/* returns the number of bits ************************************************/
+int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b){
+  oggpack_write(b,book->codelist[a],book->c->lengthlist[a]);
+  return(book->c->lengthlist[a]);
+}
+
+/* One the encode side, our vector writers are each designed for a
+specific purpose, and the encoder is not flexible without modification:
+
+The LSP vector coder uses a single stage nearest-match with no
+interleave, so no step and no error return.  This is specced by floor0
+and doesn't change.
+
+Residue0 encoding interleaves, uses multiple stages, and each stage
+peels of a specific amount of resolution from a lattice (thus we want
+to match by threshold, not nearest match).  Residue doesn't *have* to
+be encoded that way, but to change it, one will need to add more
+infrastructure on the encode side (decode side is specced and simpler) */
+
+/* floor0 LSP (single stage, non interleaved, nearest match) */
+/* returns entry number and *modifies a* to the quantization value *****/
+int vorbis_book_errorv(codebook *book,float *a){
+  int dim=book->dim,k;
+  int best=_best(book,a,1);
+  for(k=0;k<dim;k++)
+    a[k]=(book->valuelist+best*dim)[k];
+  return(best);
+}
+
+/* returns the number of bits and *modifies a* to the quantization value *****/
+int vorbis_book_encodev(codebook *book,int best,float *a,oggpack_buffer *b){
+  int k,dim=book->dim;
+  for(k=0;k<dim;k++)
+    a[k]=(book->valuelist+best*dim)[k];
+  return(vorbis_book_encode(book,best,b));
+}
+
+/* the 'eliminate the decode tree' optimization actually requires the
+   codewords to be MSb first, not LSb.  This is an annoying inelegancy
+   (and one of the first places where carefully thought out design
+   turned out to be wrong; Vorbis II and future Ogg codecs should go
+   to an MSb bitpacker), but not actually the huge hit it appears to
+   be.  The first-stage decode table catches most words so that
+   bitreverse is not in the main execution path. */
+
+static ogg_uint32_t bitreverse(ogg_uint32_t x){
+  x=    ((x>>16)&0x0000ffff) | ((x<<16)&0xffff0000);
+  x=    ((x>> 8)&0x00ff00ff) | ((x<< 8)&0xff00ff00);
+  x=    ((x>> 4)&0x0f0f0f0f) | ((x<< 4)&0xf0f0f0f0);
+  x=    ((x>> 2)&0x33333333) | ((x<< 2)&0xcccccccc);
+  return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa);
+}
+
+STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){
+  int  read=book->dec_maxlength;
+  long lo,hi;
+  long lok = oggpack_look(b,book->dec_firsttablen);
+ 
+  if (lok >= 0) {
+    long entry = book->dec_firsttable[lok];
+    if(entry&0x80000000UL){
+      lo=(entry>>15)&0x7fff;
+      hi=book->used_entries-(entry&0x7fff);
+    }else{
+      oggpack_adv(b, book->dec_codelengths[entry-1]);
+      return(entry-1);
+    }
+  }else{
+    lo=0;
+    hi=book->used_entries;
+  }
+
+  lok = oggpack_look(b, read);
+
+  while(lok<0 && read>1)
+    lok = oggpack_look(b, --read);
+  if(lok<0)return -1;
+
+  /* bisect search for the codeword in the ordered list */
+  {
+    ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok);
+
+    while(hi-lo>1){
+      long p=(hi-lo)>>1;
+      long test=book->codelist[lo+p]>testword;    
+      lo+=p&(test-1);
+      hi-=p&(-test);
+    }
+
+    if(book->dec_codelengths[lo]<=read){
+      oggpack_adv(b, book->dec_codelengths[lo]);
+      return(lo);
+    }
+  }
+  
+  oggpack_adv(b, read);
+  return(-1);
+}
+
+/* Decode side is specced and easier, because we don't need to find
+   matches using different criteria; we simply read and map.  There are
+   two things we need to do 'depending':
+   
+   We may need to support interleave.  We don't really, but it's
+   convenient to do it here rather than rebuild the vector later.
+
+   Cascades may be additive or multiplicitive; this is not inherent in
+   the codebook, but set in the code using the codebook.  Like
+   interleaving, it's easiest to do it here.  
+   addmul==0 -> declarative (set the value)
+   addmul==1 -> additive
+   addmul==2 -> multiplicitive */
+
+/* returns the [original, not compacted] entry number or -1 on eof *********/
+long vorbis_book_decode(codebook *book, oggpack_buffer *b){
+  long packed_entry=decode_packed_entry_number(book,b);
+  if(packed_entry>=0)
+    return(book->dec_index[packed_entry]);
+  
+  /* if there's no dec_index, the codebook unpacking isn't collapsed */
+  return(packed_entry);
+}
+
+/* returns 0 on OK or -1 on eof *************************************/
+long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){
+  int step=n/book->dim;
+  long *entry = malloc(sizeof(*entry)*step);
+  float **t = malloc(sizeof(*t)*step);
+  int i,j,o;
+
+  for (i = 0; i < step; i++) {
+    entry[i]=decode_packed_entry_number(book,b);
+    if(entry[i]==-1){
+      free(entry); free(t);
+      return(-1);
+    }
+    t[i] = book->valuelist+entry[i]*book->dim;
+  }
+  for(i=0,o=0;i<book->dim;i++,o+=step)
+    for (j=0;j<step;j++)
+      a[o+j]+=t[j][i];
+
+  free(entry); free(t);
+  return(0);
+}
+
+long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
+  int i,j,entry;
+  float *t;
+
+  if(book->dim>8){
+    for(i=0;i<n;){
+      entry = decode_packed_entry_number(book,b);
+      if(entry==-1)return(-1);
+      t     = book->valuelist+entry*book->dim;
+      for (j=0;j<book->dim;)
+	a[i++]+=t[j++];
+    }
+  }else{
+    for(i=0;i<n;){
+      entry = decode_packed_entry_number(book,b);
+      if(entry==-1)return(-1);
+      t     = book->valuelist+entry*book->dim;
+      j=0;
+      switch((int)book->dim){
+      case 8:
+	a[i++]+=t[j++];
+      case 7:
+	a[i++]+=t[j++];
+      case 6:
+	a[i++]+=t[j++];
+      case 5:
+	a[i++]+=t[j++];
+      case 4:
+	a[i++]+=t[j++];
+      case 3:
+	a[i++]+=t[j++];
+      case 2:
+	a[i++]+=t[j++];
+      case 1:
+	a[i++]+=t[j++];
+      case 0:
+	break;
+      }
+    }
+  }    
+  return(0);
+}
+
+long vorbis_book_decodev_set(codebook *book,float *a,oggpack_buffer *b,int n){
+  int i,j,entry;
+  float *t;
+
+  for(i=0;i<n;){
+    entry = decode_packed_entry_number(book,b);
+    if(entry==-1)return(-1);
+    t     = book->valuelist+entry*book->dim;
+    for (j=0;j<book->dim;)
+      a[i++]=t[j++];
+  }
+  return(0);
+}
+
+long vorbis_book_decodevv_add(codebook *book,float **a,long offset,int ch,
+			      oggpack_buffer *b,int n){
+  long i,j,entry;
+  int chptr=0;
+
+  for(i=offset/ch;i<(offset+n)/ch;){
+    entry = decode_packed_entry_number(book,b);
+    if(entry==-1)return(-1);
+    {
+      const float *t = book->valuelist+entry*book->dim;
+      for (j=0;j<book->dim;j++){
+	a[chptr++][i]+=t[j];
+	if(chptr==ch){
+	  chptr=0;
+	  i++;
+	}
+      }
+    }
+  }
+  return(0);
+}
+
+#ifdef _V_SELFTEST
+/* Simple enough; pack a few candidate codebooks, unpack them.  Code a
+   number of vectors through (keeping track of the quantized values),
+   and decode using the unpacked book.  quantized version of in should
+   exactly equal out */
+
+#include <stdio.h>
+
+#include "vorbis/book/lsp20_0.vqh"
+#include "vorbis/book/res0a_13.vqh"
+#define TESTSIZE 40
+
+float test1[TESTSIZE]={
+  0.105939f,
+  0.215373f,
+  0.429117f,
+  0.587974f,
+
+  0.181173f,
+  0.296583f,
+  0.515707f,
+  0.715261f,
+
+  0.162327f,
+  0.263834f,
+  0.342876f,
+  0.406025f,
+
+  0.103571f,
+  0.223561f,
+  0.368513f,
+  0.540313f,
+
+  0.136672f,
+  0.395882f,
+  0.587183f,
+  0.652476f,
+
+  0.114338f,
+  0.417300f,
+  0.525486f,
+  0.698679f,
+
+  0.147492f,
+  0.324481f,
+  0.643089f,
+  0.757582f,
+
+  0.139556f,
+  0.215795f,
+  0.324559f,
+  0.399387f,
+
+  0.120236f,
+  0.267420f,
+  0.446940f,
+  0.608760f,
+
+  0.115587f,
+  0.287234f,
+  0.571081f,
+  0.708603f,
+};
+
+float test3[TESTSIZE]={
+  0,1,-2,3,4,-5,6,7,8,9,
+  8,-2,7,-1,4,6,8,3,1,-9,
+  10,11,12,13,14,15,26,17,18,19,
+  30,-25,-30,-1,-5,-32,4,3,-2,0};
+
+static_codebook *testlist[]={&_vq_book_lsp20_0,
+			     &_vq_book_res0a_13,NULL};
+float   *testvec[]={test1,test3};
+
+int main(){
+  oggpack_buffer write;
+  oggpack_buffer read;
+  long ptr=0,i;
+  oggpack_writeinit(&write);
+  
+  fprintf(stderr,"Testing codebook abstraction...:\n");
+
+  while(testlist[ptr]){
+    codebook c;
+    static_codebook s;
+    float *qv=alloca(sizeof(*qv)*TESTSIZE);
+    float *iv=alloca(sizeof(*iv)*TESTSIZE);
+    memcpy(qv,testvec[ptr],sizeof(*qv)*TESTSIZE);
+    memset(iv,0,sizeof(*iv)*TESTSIZE);
+
+    fprintf(stderr,"\tpacking/coding %ld... ",ptr);
+
+    /* pack the codebook, write the testvector */
+    oggpack_reset(&write);
+    vorbis_book_init_encode(&c,testlist[ptr]); /* get it into memory
+                                                  we can write */
+    vorbis_staticbook_pack(testlist[ptr],&write);
+    fprintf(stderr,"Codebook size %ld bytes... ",oggpack_bytes(&write));
+    for(i=0;i<TESTSIZE;i+=c.dim){
+      int best=_best(&c,qv+i,1);
+      vorbis_book_encodev(&c,best,qv+i,&write);
+    }
+    vorbis_book_clear(&c);
+    
+    fprintf(stderr,"OK.\n");
+    fprintf(stderr,"\tunpacking/decoding %ld... ",ptr);
+
+    /* transfer the write data to a read buffer and unpack/read */
+    oggpack_readinit(&read,oggpack_get_buffer(&write),oggpack_bytes(&write));
+    if(vorbis_staticbook_unpack(&read,&s)){
+      fprintf(stderr,"Error unpacking codebook.\n");
+      exit(1);
+    }
+    if(vorbis_book_init_decode(&c,&s)){
+      fprintf(stderr,"Error initializing codebook.\n");
+      exit(1);
+    }
+
+    for(i=0;i<TESTSIZE;i+=c.dim)
+      if(vorbis_book_decodev_set(&c,iv+i,&read,c.dim)==-1){
+	fprintf(stderr,"Error reading codebook test data (EOP).\n");
+	exit(1);
+      }
+    for(i=0;i<TESTSIZE;i++)
+      if(fabs(qv[i]-iv[i])>.000001){
+	fprintf(stderr,"read (%g) != written (%g) at position (%ld)\n",
+		iv[i],qv[i],i);
+	exit(1);
+      }
+	  
+    fprintf(stderr,"OK\n");
+    ptr++;
+  }
+
+  /* The above is the trivial stuff; now try unquantizing a log scale codebook */
+
+  exit(0);
+}
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/codebook.h
@@ -1,0 +1,160 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: basic shared codebook operations
+ last mod: $Id: codebook.h,v 1.13 2002/06/28 22:19:35 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_CODEBOOK_H_
+#define _V_CODEBOOK_H_
+
+#include <ogg/ogg.h>
+
+/* This structure encapsulates huffman and VQ style encoding books; it
+   doesn't do anything specific to either.
+
+   valuelist/quantlist are nonNULL (and q_* significant) only if
+   there's entry->value mapping to be done.
+
+   If encode-side mapping must be done (and thus the entry needs to be
+   hunted), the auxiliary encode pointer will point to a decision
+   tree.  This is true of both VQ and huffman, but is mostly useful
+   with VQ.
+
+*/
+
+typedef struct static_codebook{
+  long   dim;            /* codebook dimensions (elements per vector) */
+  long   entries;        /* codebook entries */
+  long  *lengthlist;     /* codeword lengths in bits */
+
+  /* mapping ***************************************************************/
+  int    maptype;        /* 0=none
+			    1=implicitly populated values from map column 
+			    2=listed arbitrary values */
+
+  /* The below does a linear, single monotonic sequence mapping. */
+  long     q_min;       /* packed 32 bit float; quant value 0 maps to minval */
+  long     q_delta;     /* packed 32 bit float; val 1 - val 0 == delta */
+  int      q_quant;     /* bits: 0 < quant <= 16 */
+  int      q_sequencep; /* bitflag */
+
+  long     *quantlist;  /* map == 1: (int)(entries^(1/dim)) element column map
+			   map == 2: list of dim*entries quantized entry vals
+			*/
+
+  /* encode helpers ********************************************************/
+  struct encode_aux_nearestmatch *nearest_tree;
+  struct encode_aux_threshmatch  *thresh_tree;
+  struct encode_aux_pigeonhole  *pigeon_tree;
+
+  int allocedp;
+} static_codebook;
+
+/* this structures an arbitrary trained book to quickly find the
+   nearest cell match */
+typedef struct encode_aux_nearestmatch{
+  /* pre-calculated partitioning tree */
+  long   *ptr0;
+  long   *ptr1;
+
+  long   *p;         /* decision points (each is an entry) */
+  long   *q;         /* decision points (each is an entry) */
+  long   aux;        /* number of tree entries */
+  long   alloc;       
+} encode_aux_nearestmatch;
+
+/* assumes a maptype of 1; encode side only, so that's OK */
+typedef struct encode_aux_threshmatch{
+  float *quantthresh;
+  long   *quantmap;
+  int     quantvals; 
+  int     threshvals; 
+} encode_aux_threshmatch;
+
+typedef struct encode_aux_pigeonhole{
+  float min;
+  float del;
+
+  int  mapentries;
+  int  quantvals;
+  long *pigeonmap;
+
+  long fittotal;
+  long *fitlist;
+  long *fitmap;
+  long *fitlength;
+} encode_aux_pigeonhole;
+
+typedef struct codebook{
+  long dim;           /* codebook dimensions (elements per vector) */
+  long entries;       /* codebook entries */
+  long used_entries;  /* populated codebook entries */
+  const static_codebook *c;
+
+  /* for encode, the below are entry-ordered, fully populated */
+  /* for decode, the below are ordered by bitreversed codeword and only
+     used entries are populated */
+  float        *valuelist;  /* list of dim*entries actual entry values */  
+  ogg_uint32_t *codelist;   /* list of bitstream codewords for each entry */
+
+  int          *dec_index;  /* only used if sparseness collapsed */
+  char         *dec_codelengths;
+  ogg_uint32_t *dec_firsttable;
+  int           dec_firsttablen;
+  int           dec_maxlength;
+
+} codebook;
+
+extern void vorbis_staticbook_clear(static_codebook *b);
+extern void vorbis_staticbook_destroy(static_codebook *b);
+extern int vorbis_book_init_encode(codebook *dest,const static_codebook *source);
+extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source);
+extern void vorbis_book_clear(codebook *b);
+
+extern float *_book_unquantize(const static_codebook *b,int n,int *map);
+extern float *_book_logdist(const static_codebook *b,float *vals);
+extern float _float32_unpack(long val);
+extern long   _float32_pack(float val);
+extern int  _best(codebook *book, float *a, int step);
+extern int _ilog(unsigned int v);
+extern long _book_maptype1_quantvals(const static_codebook *b);
+
+extern int vorbis_book_besterror(codebook *book,float *a,int step,int addmul);
+extern long vorbis_book_codeword(codebook *book,int entry);
+extern long vorbis_book_codelen(codebook *book,int entry);
+
+
+
+extern int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *b);
+extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c);
+
+extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b);
+extern int vorbis_book_errorv(codebook *book, float *a);
+extern int vorbis_book_encodev(codebook *book, int best,float *a, 
+			       oggpack_buffer *b);
+
+extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
+extern long vorbis_book_decodevs_add(codebook *book, float *a, 
+				     oggpack_buffer *b,int n);
+extern long vorbis_book_decodev_set(codebook *book, float *a, 
+				    oggpack_buffer *b,int n);
+extern long vorbis_book_decodev_add(codebook *book, float *a, 
+				    oggpack_buffer *b,int n);
+extern long vorbis_book_decodevv_add(codebook *book, float **a,
+				     long off,int ch, 
+				    oggpack_buffer *b,int n);
+
+
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/codec_internal.h
@@ -1,0 +1,133 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: libvorbis codec headers
+ last mod: $Id: codec_internal.h,v 1.15 2002/06/28 22:19:35 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_CODECI_H_
+#define _V_CODECI_H_
+
+#include "envelope.h"
+#include "codebook.h"
+
+#define BLOCKTYPE_IMPULSE    0
+#define BLOCKTYPE_PADDING    1
+#define BLOCKTYPE_TRANSITION 0 
+#define BLOCKTYPE_LONG       1
+
+#define PACKETBLOBS 15
+
+typedef struct vorbis_block_internal{
+  float  **pcmdelay;  /* this is a pointer into local storage */ 
+  float  ampmax;
+  int    blocktype;
+
+  ogg_uint32_t   packetblob_markers[PACKETBLOBS];
+} vorbis_block_internal;
+
+typedef void vorbis_look_floor;
+typedef void vorbis_look_residue;
+typedef void vorbis_look_transform;
+
+/* mode ************************************************************/
+typedef struct {
+  int blockflag;
+  int windowtype;
+  int transformtype;
+  int mapping;
+} vorbis_info_mode;
+
+typedef void vorbis_info_floor;
+typedef void vorbis_info_residue;
+typedef void vorbis_info_mapping;
+
+#include "psy.h"
+#include "bitrate.h"
+
+typedef struct backend_lookup_state {
+  /* local lookup storage */
+  envelope_lookup        *ve; /* envelope lookup */    
+  float                  *window[2];
+  vorbis_look_transform **transform[2];    /* block, type */
+  drft_lookup             fft_look[2];
+
+  int                     modebits;
+  vorbis_look_floor     **flr;
+  vorbis_look_residue   **residue;
+  vorbis_look_psy        *psy;
+  vorbis_look_psy_global *psy_g_look;
+
+  /* local storage, only used on the encoding side.  This way the
+     application does not need to worry about freeing some packets'
+     memory and not others'; packet storage is always tracked.
+     Cleared next call to a _dsp_ function */
+  unsigned char *header;
+  unsigned char *header1;
+  unsigned char *header2;
+
+  bitrate_manager_state bms;
+
+} backend_lookup_state;
+
+/* codec_setup_info contains all the setup information specific to the
+   specific compression/decompression mode in progress (eg,
+   psychoacoustic settings, channel setup, options, codebook
+   etc).  
+*********************************************************************/
+
+#include "highlevel.h"
+typedef struct codec_setup_info {
+
+  /* Vorbis supports only short and long blocks, but allows the
+     encoder to choose the sizes */
+
+  long blocksizes[2];
+
+  /* modes are the primary means of supporting on-the-fly different
+     blocksizes, different channel mappings (LR or M/A),
+     different residue backends, etc.  Each mode consists of a
+     blocksize flag and a mapping (along with the mapping setup */
+
+  int        modes;
+  int        maps;
+  int        floors;
+  int        residues;
+  int        books;
+  int        psys;     /* encode only */
+
+  vorbis_info_mode       *mode_param[64];
+  int                     map_type[64];
+  vorbis_info_mapping    *map_param[64];
+  int                     floor_type[64];
+  vorbis_info_floor      *floor_param[64];
+  int                     residue_type[64];
+  vorbis_info_residue    *residue_param[64];
+  static_codebook        *book_param[256];
+  codebook               *fullbooks;
+
+  vorbis_info_psy        *psy_param[4]; /* encode only */
+  vorbis_info_psy_global psy_g_param;
+
+  bitrate_manager_info   bi;
+  highlevel_encode_setup hi; /* used only by vorbisenc.c.  It's a
+                                highly redundant structure, but
+                                improves clarity of program flow. */
+  
+} codec_setup_info;
+
+extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi);
+extern void _vp_global_free(vorbis_look_psy_global *look);
+
+#endif
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/envelope.c
@@ -1,0 +1,382 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: PCM data envelope analysis 
+ last mod: $Id: envelope.c,v 1.52 2002/07/13 10:18:33 giles Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+
+#include "os.h"
+#include "scales.h"
+#include "envelope.h"
+#include "mdct.h"
+#include "misc.h"
+
+void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *gi=&ci->psy_g_param;
+  int ch=vi->channels;
+  int i,j;
+  int n=e->winlength=128;
+  e->searchstep=64; /* not random */
+
+  e->minenergy=gi->preecho_minenergy;
+  e->ch=ch;
+  e->storage=128;
+  e->cursor=ci->blocksizes[1]/2;
+  e->mdct_win=_ogg_calloc(n,sizeof(*e->mdct_win));
+  mdct_init(&e->mdct,n);
+
+  for(i=0;i<n;i++){
+    e->mdct_win[i]=sin(i/(n-1.)*M_PI);
+    e->mdct_win[i]*=e->mdct_win[i];
+  }
+
+  /* magic follows */
+  e->band[0].begin=2;  e->band[0].end=4;
+  e->band[1].begin=4;  e->band[1].end=5;
+  e->band[2].begin=6;  e->band[2].end=6;
+  e->band[3].begin=9;  e->band[3].end=8;
+  e->band[4].begin=13;  e->band[4].end=8;
+  e->band[5].begin=17;  e->band[5].end=8;
+  e->band[6].begin=22;  e->band[6].end=8;
+
+  for(j=0;j<VE_BANDS;j++){
+    n=e->band[j].end;
+    e->band[j].window=_ogg_malloc(n*sizeof(*e->band[0].window));
+    for(i=0;i<n;i++){
+      e->band[j].window[i]=sin((i+.5)/n*M_PI);
+      e->band[j].total+=e->band[j].window[i];
+    }
+    e->band[j].total=1./e->band[j].total;
+  }
+  
+  e->filter=_ogg_calloc(VE_BANDS*ch,sizeof(*e->filter));
+  e->mark=_ogg_calloc(e->storage,sizeof(*e->mark));
+
+}
+
+void _ve_envelope_clear(envelope_lookup *e){
+  int i;
+  mdct_clear(&e->mdct);
+  for(i=0;i<VE_BANDS;i++)
+    _ogg_free(e->band[i].window);
+  _ogg_free(e->mdct_win);
+  _ogg_free(e->filter);
+  _ogg_free(e->mark);
+  memset(e,0,sizeof(*e));
+}
+
+/* fairly straight threshhold-by-band based until we find something
+   that works better and isn't patented. */
+
+static int _ve_amp(envelope_lookup *ve,
+		   vorbis_info_psy_global *gi,
+		   float *data,
+		   envelope_band *bands,
+		   envelope_filter_state *filters,
+		   long pos){
+  long n=ve->winlength;
+  int ret=0;
+  long i,j;
+  float decay;
+
+  /* we want to have a 'minimum bar' for energy, else we're just
+     basing blocks on quantization noise that outweighs the signal
+     itself (for low power signals) */
+
+  float minV=ve->minenergy;
+  float *vec=malloc(n*sizeof(*vec));
+
+  /* stretch is used to gradually lengthen the number of windows
+     considered prevoius-to-potential-trigger */
+  int stretch=max(VE_MINSTRETCH,ve->stretch/2);
+  float penalty=gi->stretch_penalty-(ve->stretch/2-VE_MINSTRETCH);
+  if(penalty<0.f)penalty=0.f;
+  if(penalty>gi->stretch_penalty)penalty=gi->stretch_penalty;
+
+  /*_analysis_output_always("lpcm",seq2,data,n,0,0,
+    totalshift+pos*ve->searchstep);*/
+  
+ /* window and transform */
+  for(i=0;i<n;i++)
+    vec[i]=data[i]*ve->mdct_win[i];
+  mdct_forward(&ve->mdct,vec,vec);
+
+  /*_analysis_output_always("mdct",seq2,vec,n/2,0,1,0); */
+
+  /* near-DC spreading function; this has nothing to do with
+     psychoacoustics, just sidelobe leakage and window size */
+  {
+    float temp=vec[0]*vec[0]+.7*vec[1]*vec[1]+.2*vec[2]*vec[2];
+    int ptr=filters->nearptr;
+
+    /* the accumulation is regularly refreshed from scratch to avoid
+       floating point creep */
+    if(ptr==0){
+      decay=filters->nearDC_acc=filters->nearDC_partialacc+temp;
+      filters->nearDC_partialacc=temp;
+    }else{
+      decay=filters->nearDC_acc+=temp;
+      filters->nearDC_partialacc+=temp;
+    }
+    filters->nearDC_acc-=filters->nearDC[ptr];
+    filters->nearDC[ptr]=temp;
+
+    decay*=(1./(VE_NEARDC+1));
+    filters->nearptr++;
+    if(filters->nearptr>=VE_NEARDC)filters->nearptr=0;
+    decay=todB(&decay)*.5-15.f;
+  }
+
+  /* perform spreading and limiting, also smooth the spectrum.  yes,
+     the MDCT results in all real coefficients, but it still *behaves*
+     like real/imaginary pairs */
+  for(i=0;i<n/2;i+=2){
+    float val=vec[i]*vec[i]+vec[i+1]*vec[i+1];
+    val=todB(&val)*.5f;
+    if(val<decay)val=decay;
+    if(val<minV)val=minV;
+    vec[i>>1]=val;
+    decay-=8.;
+  }
+
+  /*_analysis_output_always("spread",seq2++,vec,n/4,0,0,0);*/
+
+  /* perform preecho/postecho triggering by band */
+  for(j=0;j<VE_BANDS;j++){
+    float acc=0.;
+    float valmax,valmin;
+
+    /* accumulate amplitude */
+    for(i=0;i<bands[j].end;i++)
+      acc+=vec[i+bands[j].begin]*bands[j].window[i];
+   
+    acc*=bands[j].total;
+
+    /* convert amplitude to delta */
+    {
+      int p,this=filters[j].ampptr;
+      float postmax,postmin,premax=-99999.f,premin=99999.f;
+      
+      p=this;
+      p--;
+      if(p<0)p+=VE_AMP;
+      postmax=max(acc,filters[j].ampbuf[p]);
+      postmin=min(acc,filters[j].ampbuf[p]);
+      
+      for(i=0;i<stretch;i++){
+	p--;
+	if(p<0)p+=VE_AMP;
+	premax=max(premax,filters[j].ampbuf[p]);
+	premin=min(premin,filters[j].ampbuf[p]);
+      }
+      
+      valmin=postmin-premin;
+      valmax=postmax-premax;
+
+      /*filters[j].markers[pos]=valmax;*/
+      filters[j].ampbuf[this]=acc;
+      filters[j].ampptr++;
+      if(filters[j].ampptr>=VE_AMP)filters[j].ampptr=0;
+    }
+
+    /* look at min/max, decide trigger */
+    if(valmax>gi->preecho_thresh[j]+penalty){
+      ret|=1;
+      ret|=4;
+    }
+    if(valmin<gi->postecho_thresh[j]-penalty)ret|=2;
+  }
+  free(vec);
+  return(ret);
+}
+
+#if 0
+static int seq=0;
+static ogg_int64_t totalshift=-1024;
+#endif
+
+long _ve_envelope_search(vorbis_dsp_state *v){
+  vorbis_info *vi=v->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *gi=&ci->psy_g_param;
+  envelope_lookup *ve=((backend_lookup_state *)(v->backend_state))->ve;
+  long i,j;
+
+  int first=ve->current/ve->searchstep;
+  int last=v->pcm_current/ve->searchstep-VE_WIN;
+  if(first<0)first=0;
+
+  /* make sure we have enough storage to match the PCM */
+  if(last+VE_WIN+VE_POST>ve->storage){
+    ve->storage=last+VE_WIN+VE_POST; /* be sure */
+    ve->mark=_ogg_realloc(ve->mark,ve->storage*sizeof(*ve->mark));
+  }
+  for(j=first;j<last;j++){
+    int ret=0;
+
+    ve->stretch++;
+    if(ve->stretch>VE_MAXSTRETCH*2)
+      ve->stretch=VE_MAXSTRETCH*2;
+    
+    for(i=0;i<ve->ch;i++){
+      float *pcm=v->pcm[i]+ve->searchstep*(j);
+      ret|=_ve_amp(ve,gi,pcm,ve->band,ve->filter+i*VE_BANDS,j);
+    }
+
+    ve->mark[j+VE_POST]=0;
+    if(ret&1){
+      ve->mark[j]=1;
+      ve->mark[j+1]=1;
+    }
+
+    if(ret&2){
+      ve->mark[j]=1;
+      if(j>0)ve->mark[j-1]=1;
+    }
+
+    if(ret&4)ve->stretch=-1;
+  }
+
+  ve->current=last*ve->searchstep;
+
+  {
+    long centerW=v->centerW;
+    long testW=
+      centerW+
+      ci->blocksizes[v->W]/4+
+      ci->blocksizes[1]/2+
+      ci->blocksizes[0]/4;
+    
+    j=ve->cursor;
+    
+    while(j<ve->current-(ve->searchstep)){/* account for postecho
+                                             working back one window */
+      if(j>=testW)return(1);
+ 
+      ve->cursor=j;
+
+      if(ve->mark[j/ve->searchstep]){
+	if(j>centerW){
+
+#if 0
+	  if(j>ve->curmark){
+	    float *marker=alloca(v->pcm_current*sizeof(*marker));
+	    int l,m;
+	    memset(marker,0,sizeof(*marker)*v->pcm_current);
+	    fprintf(stderr,"mark! seq=%d, cursor:%fs time:%fs\n",
+		    seq,
+		    (totalshift+ve->cursor)/44100.,
+		    (totalshift+j)/44100.);
+	    _analysis_output_always("pcmL",seq,v->pcm[0],v->pcm_current,0,0,totalshift);
+	    _analysis_output_always("pcmR",seq,v->pcm[1],v->pcm_current,0,0,totalshift);
+
+	    _analysis_output_always("markL",seq,v->pcm[0],j,0,0,totalshift);
+	    _analysis_output_always("markR",seq,v->pcm[1],j,0,0,totalshift);
+	    
+	    for(m=0;m<VE_BANDS;m++){
+	      char buf[80];
+	      sprintf(buf,"delL%d",m);
+	      for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->filter[m].markers[l]*.1;
+	      _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift);
+	    }
+
+	    for(m=0;m<VE_BANDS;m++){
+	      char buf[80];
+	      sprintf(buf,"delR%d",m);
+	      for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->filter[m+VE_BANDS].markers[l]*.1;
+	      _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift);
+	    }
+
+	    for(l=0;l<last;l++)marker[l*ve->searchstep]=ve->mark[l]*.4;
+	    _analysis_output_always("mark",seq,marker,v->pcm_current,0,0,totalshift);
+	   
+	    
+	    seq++;
+	    
+	  }
+#endif
+
+	  ve->curmark=j;
+	  if(j>=testW)return(1);
+	  return(0);
+	}
+      }
+      j+=ve->searchstep;
+    }
+  }
+  
+  return(-1);
+}
+
+int _ve_envelope_mark(vorbis_dsp_state *v){
+  envelope_lookup *ve=((backend_lookup_state *)(v->backend_state))->ve;
+  vorbis_info *vi=v->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  long centerW=v->centerW;
+  long beginW=centerW-ci->blocksizes[v->W]/4;
+  long endW=centerW+ci->blocksizes[v->W]/4;
+  if(v->W){
+    beginW-=ci->blocksizes[v->lW]/4;
+    endW+=ci->blocksizes[v->nW]/4;
+  }else{
+    beginW-=ci->blocksizes[0]/4;
+    endW+=ci->blocksizes[0]/4;
+  }
+
+  if(ve->curmark>=beginW && ve->curmark<endW)return(1);
+  {
+    long first=beginW/ve->searchstep;
+    long last=endW/ve->searchstep;
+    long i;
+    for(i=first;i<last;i++)
+      if(ve->mark[i])return(1);
+  }
+  return(0);
+}
+
+void _ve_envelope_shift(envelope_lookup *e,long shift){
+  int smallsize=e->current/e->searchstep+VE_POST; /* adjust for placing marks
+						     ahead of ve->current */
+  int smallshift=shift/e->searchstep;
+  int i;
+
+  memmove(e->mark,e->mark+smallshift,(smallsize-smallshift)*sizeof(*e->mark));
+  
+  #if 0
+  for(i=0;i<VE_BANDS*e->ch;i++)
+    memmove(e->filter[i].markers,
+	    e->filter[i].markers+smallshift,
+	    (1024-smallshift)*sizeof(*(*e->filter).markers));
+  totalshift+=shift;
+  #endif 
+
+  e->current-=shift;
+  if(e->curmark>=0)
+    e->curmark-=shift;
+  e->cursor-=shift;
+}
+
+
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/envelope.h
@@ -1,0 +1,81 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: PCM data envelope analysis and manipulation
+ last mod: $Id: envelope.h,v 1.25 2002/07/11 06:40:48 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_ENVELOPE_
+#define _V_ENVELOPE_
+
+#include "mdct.h"
+
+#define VE_PRE    16
+#define VE_WIN    4
+#define VE_POST   2
+#define VE_AMP    (VE_PRE+VE_POST-1)
+
+#define VE_BANDS  7
+#define VE_NEARDC 15
+
+#define VE_MINSTRETCH 2   /* a bit less than short block */
+#define VE_MAXSTRETCH 12  /* one-third full block */
+
+typedef struct {
+  float ampbuf[VE_AMP];
+  int   ampptr;
+
+  float nearDC[VE_NEARDC];
+  float nearDC_acc;
+  float nearDC_partialacc;
+  int   nearptr;
+
+} envelope_filter_state;
+
+typedef struct {
+  int begin;
+  int end;
+  float *window;
+  float total;
+} envelope_band;
+
+typedef struct {
+  int ch;
+  int winlength;
+  int searchstep;
+  float minenergy;
+
+  mdct_lookup  mdct;
+  float       *mdct_win;
+
+  envelope_band          band[VE_BANDS];
+  envelope_filter_state *filter;
+  int   stretch;
+
+  int                   *mark;
+
+  long storage;
+  long current;
+  long curmark;
+  long cursor;
+} envelope_lookup;
+
+extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi);
+extern void _ve_envelope_clear(envelope_lookup *e);
+extern long _ve_envelope_search(vorbis_dsp_state *v);
+extern void _ve_envelope_shift(envelope_lookup *e,long shift);
+extern int  _ve_envelope_mark(vorbis_dsp_state *v);
+
+
+#endif
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/floor0.c
@@ -1,0 +1,235 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: floor backend 0 implementation
+ last mod: $Id: floor0.c,v 1.53 2002/07/17 21:34:31 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "codebook.h"
+#include "scales.h"
+#include "misc.h"
+#include "os.h"
+
+#include "misc.h"
+#include <stdio.h>
+
+typedef struct {
+  int ln;
+  int  m;
+  int **linearmap;
+  int  n[2];
+
+  vorbis_info_floor0 *vi;
+  lpc_lookup lpclook;
+  float *lsp_look;
+
+  long bits;
+  long frames;
+} vorbis_look_floor0;
+
+
+/***********************************************/
+
+static void floor0_free_info(vorbis_info_floor *i){
+  vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+  if(info){
+    memset(info,0,sizeof(*info));
+    _ogg_free(info);
+  }
+}
+
+static void floor0_free_look(vorbis_look_floor *i){
+  vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
+  if(look){
+
+    if(look->linearmap){
+
+      if(look->linearmap[0])_ogg_free(look->linearmap[0]);
+      if(look->linearmap[1])_ogg_free(look->linearmap[1]);
+
+      _ogg_free(look->linearmap);
+    }
+    if(look->lsp_look)_ogg_free(look->lsp_look);
+    lpc_clear(&look->lpclook);
+    memset(look,0,sizeof(*look));
+    _ogg_free(look);
+  }
+}
+
+static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
+  codec_setup_info     *ci=vi->codec_setup;
+  int j;
+
+  vorbis_info_floor0 *info=_ogg_malloc(sizeof(*info));
+  info->order=oggpack_read(opb,8);
+  info->rate=oggpack_read(opb,16);
+  info->barkmap=oggpack_read(opb,16);
+  info->ampbits=oggpack_read(opb,6);
+  info->ampdB=oggpack_read(opb,8);
+  info->numbooks=oggpack_read(opb,4)+1;
+  
+  if(info->order<1)goto err_out;
+  if(info->rate<1)goto err_out;
+  if(info->barkmap<1)goto err_out;
+  if(info->numbooks<1)goto err_out;
+    
+  for(j=0;j<info->numbooks;j++){
+    info->books[j]=oggpack_read(opb,8);
+    if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out;
+  }
+  return(info);
+
+ err_out:
+  floor0_free_info(info);
+  return(NULL);
+}
+
+/* initialize Bark scale and normalization lookups.  We could do this
+   with static tables, but Vorbis allows a number of possible
+   combinations, so it's best to do it computationally.
+
+   The below is authoritative in terms of defining scale mapping.
+   Note that the scale depends on the sampling rate as well as the
+   linear block and mapping sizes */
+
+static void floor0_map_lazy_init(vorbis_block      *vb,
+				 vorbis_info_floor *infoX,
+				 vorbis_look_floor0 *look){
+  if(!look->linearmap[vb->W]){
+    vorbis_dsp_state   *vd=vb->vd;
+    vorbis_info        *vi=vd->vi;
+    codec_setup_info   *ci=vi->codec_setup;
+    vorbis_info_floor0 *info=(vorbis_info_floor0 *)infoX;
+    int W=vb->W;
+    int n=ci->blocksizes[W]/2,j;
+
+    /* we choose a scaling constant so that:
+       floor(bark(rate/2-1)*C)=mapped-1
+     floor(bark(rate/2)*C)=mapped */
+    float scale=look->ln/toBARK(info->rate/2.f);
+    
+    /* the mapping from a linear scale to a smaller bark scale is
+       straightforward.  We do *not* make sure that the linear mapping
+       does not skip bark-scale bins; the decoder simply skips them and
+       the encoder may do what it wishes in filling them.  They're
+       necessary in some mapping combinations to keep the scale spacing
+       accurate */
+    look->linearmap[W]=_ogg_malloc((n+1)*sizeof(**look->linearmap));
+    for(j=0;j<n;j++){
+      int val=floor( toBARK((info->rate/2.f)/n*j) 
+		     *scale); /* bark numbers represent band edges */
+      if(val>=look->ln)val=look->ln-1; /* guard against the approximation */
+      look->linearmap[W][j]=val;
+    }
+    look->linearmap[W][j]=-1;
+    look->n[W]=n;
+  }
+}
+
+static vorbis_look_floor *floor0_look(vorbis_dsp_state *vd,
+				      vorbis_info_floor *i){
+  int j;
+  vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
+  vorbis_look_floor0 *look=_ogg_calloc(1,sizeof(*look));
+  look->m=info->order;
+  look->ln=info->barkmap;
+  look->vi=info;
+
+  if(vd->analysisp)
+    lpc_init(&look->lpclook,look->ln,look->m);
+
+  look->linearmap=_ogg_calloc(2,sizeof(*look->linearmap));
+
+  look->lsp_look=_ogg_malloc(look->ln*sizeof(*look->lsp_look));
+  for(j=0;j<look->ln;j++)
+    look->lsp_look[j]=2*cos(M_PI/look->ln*j);
+
+  return look;
+}
+
+static void *floor0_inverse1(vorbis_block *vb,vorbis_look_floor *i){
+  vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
+  vorbis_info_floor0 *info=look->vi;
+  int j,k;
+
+  int ampraw=oggpack_read(&vb->opb,info->ampbits);
+  if(ampraw>0){ /* also handles the -1 out of data case */
+    long maxval=(1<<info->ampbits)-1;
+    float amp=(float)ampraw/maxval*info->ampdB;
+    int booknum=oggpack_read(&vb->opb,_ilog(info->numbooks));
+    
+    if(booknum!=-1 && booknum<info->numbooks){ /* be paranoid */
+      codec_setup_info  *ci=vb->vd->vi->codec_setup;
+      codebook *b=ci->fullbooks+info->books[booknum];
+      float last=0.f;
+
+      /* the additional b->dim is a guard against any possible stack
+         smash; b->dim is provably more than we can overflow the
+         vector */
+      float *lsp=_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+b->dim+1));
+            
+      for(j=0;j<look->m;j+=b->dim)
+	if(vorbis_book_decodev_set(b,lsp+j,&vb->opb,b->dim)==-1)goto eop;
+      for(j=0;j<look->m;){
+	for(k=0;k<b->dim;k++,j++)lsp[j]+=last;
+	last=lsp[j-1];
+      }
+      
+      lsp[look->m]=amp;
+      return(lsp);
+    }
+  }
+ eop:
+  return(NULL);
+}
+
+static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,
+			   void *memo,float *out){
+  vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
+  vorbis_info_floor0 *info=look->vi;
+  
+  floor0_map_lazy_init(vb,info,look);
+
+  if(memo){
+    float *lsp=(float *)memo;
+    float amp=lsp[look->m];
+
+    /* take the coefficients back to a spectral envelope curve */
+    vorbis_lsp_to_curve(out,
+			look->linearmap[vb->W],
+			look->n[vb->W],
+			look->ln,
+			lsp,look->m,amp,(float)info->ampdB);
+    return(1);
+  }
+  memset(out,0,sizeof(*out)*look->n[vb->W]);
+  return(0);
+}
+
+/* export hooks */
+vorbis_func_floor floor0_exportbundle={
+  NULL,&floor0_unpack,&floor0_look,&floor0_free_info,
+  &floor0_free_look,&floor0_inverse1,&floor0_inverse2
+};
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/floor1.c
@@ -1,0 +1,1087 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: floor backend 1 implementation
+ last mod: $Id: floor1.c,v 1.24 2002/07/18 01:41:59 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "codebook.h"
+#include "misc.h"
+#include "scales.h"
+
+#include <stdio.h>
+
+#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
+
+typedef struct {
+  int sorted_index[VIF_POSIT+2];
+  int forward_index[VIF_POSIT+2];
+  int reverse_index[VIF_POSIT+2];
+  
+  int hineighbor[VIF_POSIT];
+  int loneighbor[VIF_POSIT];
+  int posts;
+
+  int n;
+  int quant_q;
+  vorbis_info_floor1 *vi;
+
+  long phrasebits;
+  long postbits;
+  long frames;
+} vorbis_look_floor1;
+
+typedef struct lsfit_acc{
+  long x0;
+  long x1;
+
+  long xa;
+  long ya;
+  long x2a;
+  long y2a;
+  long xya; 
+  long n;
+  long an;
+} lsfit_acc;
+
+/***********************************************/
+ 
+static void floor1_free_info(vorbis_info_floor *i){
+  vorbis_info_floor1 *info=(vorbis_info_floor1 *)i;
+  if(info){
+    memset(info,0,sizeof(*info));
+    _ogg_free(info);
+  }
+}
+
+static void floor1_free_look(vorbis_look_floor *i){
+  vorbis_look_floor1 *look=(vorbis_look_floor1 *)i;
+  if(look){
+    /*fprintf(stderr,"floor 1 bit usage %f:%f (%f total)\n",
+	    (float)look->phrasebits/look->frames,
+	    (float)look->postbits/look->frames,
+	    (float)(look->postbits+look->phrasebits)/look->frames);*/
+
+    memset(look,0,sizeof(*look));
+    _ogg_free(look);
+  }
+}
+
+static int ilog(unsigned int v){
+  int ret=0;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+static int ilog2(unsigned int v){
+  int ret=0;
+  if(v)--v;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+static void floor1_pack (vorbis_info_floor *i,oggpack_buffer *opb){
+  vorbis_info_floor1 *info=(vorbis_info_floor1 *)i;
+  int j,k;
+  int count=0;
+  int rangebits;
+  int maxposit=info->postlist[1];
+  int maxclass=-1;
+
+  /* save out partitions */
+  oggpack_write(opb,info->partitions,5); /* only 0 to 31 legal */
+  for(j=0;j<info->partitions;j++){
+    oggpack_write(opb,info->partitionclass[j],4); /* only 0 to 15 legal */
+    if(maxclass<info->partitionclass[j])maxclass=info->partitionclass[j];
+  }
+
+  /* save out partition classes */
+  for(j=0;j<maxclass+1;j++){
+    oggpack_write(opb,info->class_dim[j]-1,3); /* 1 to 8 */
+    oggpack_write(opb,info->class_subs[j],2); /* 0 to 3 */
+    if(info->class_subs[j])oggpack_write(opb,info->class_book[j],8);
+    for(k=0;k<(1<<info->class_subs[j]);k++)
+      oggpack_write(opb,info->class_subbook[j][k]+1,8);
+  }
+
+  /* save out the post list */
+  oggpack_write(opb,info->mult-1,2);     /* only 1,2,3,4 legal now */ 
+  oggpack_write(opb,ilog2(maxposit),4);
+  rangebits=ilog2(maxposit);
+
+  for(j=0,k=0;j<info->partitions;j++){
+    count+=info->class_dim[info->partitionclass[j]]; 
+    for(;k<count;k++)
+      oggpack_write(opb,info->postlist[k+2],rangebits);
+  }
+}
+
+
+static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){
+  codec_setup_info     *ci=vi->codec_setup;
+  int j,k,count=0,maxclass=-1,rangebits;
+
+  vorbis_info_floor1 *info=_ogg_calloc(1,sizeof(*info));
+  /* read partitions */
+  info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */
+  for(j=0;j<info->partitions;j++){
+    info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */
+    if(maxclass<info->partitionclass[j])maxclass=info->partitionclass[j];
+  }
+
+  /* read partition classes */
+  for(j=0;j<maxclass+1;j++){
+    info->class_dim[j]=oggpack_read(opb,3)+1; /* 1 to 8 */
+    info->class_subs[j]=oggpack_read(opb,2); /* 0,1,2,3 bits */
+    if(info->class_subs[j]<0)
+      goto err_out;
+    if(info->class_subs[j])info->class_book[j]=oggpack_read(opb,8);
+    if(info->class_book[j]<0 || info->class_book[j]>=ci->books)
+      goto err_out;
+    for(k=0;k<(1<<info->class_subs[j]);k++){
+      info->class_subbook[j][k]=oggpack_read(opb,8)-1;
+      if(info->class_subbook[j][k]<-1 || info->class_subbook[j][k]>=ci->books)
+	goto err_out;
+    }
+  }
+
+  /* read the post list */
+  info->mult=oggpack_read(opb,2)+1;     /* only 1,2,3,4 legal now */ 
+  rangebits=oggpack_read(opb,4);
+
+  for(j=0,k=0;j<info->partitions;j++){
+    count+=info->class_dim[info->partitionclass[j]]; 
+    for(;k<count;k++){
+      int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
+      if(t<0 || t>=(1<<rangebits))
+	goto err_out;
+    }
+  }
+  info->postlist[0]=0;
+  info->postlist[1]=1<<rangebits;
+
+  return(info);
+  
+ err_out:
+  floor1_free_info(info);
+  return(NULL);
+}
+
+static int icomp(const void *a,const void *b){
+  return(**(int **)a-**(int **)b);
+}
+
+static vorbis_look_floor *floor1_look(vorbis_dsp_state *vd,
+				      vorbis_info_floor *in){
+
+  int *sortpointer[VIF_POSIT+2];
+  vorbis_info_floor1 *info=(vorbis_info_floor1 *)in;
+  vorbis_look_floor1 *look=_ogg_calloc(1,sizeof(*look));
+  int i,j,n=0;
+
+  look->vi=info;
+  look->n=info->postlist[1];
+ 
+  /* we drop each position value in-between already decoded values,
+     and use linear interpolation to predict each new value past the
+     edges.  The positions are read in the order of the position
+     list... we precompute the bounding positions in the lookup.  Of
+     course, the neighbors can change (if a position is declined), but
+     this is an initial mapping */
+
+  for(i=0;i<info->partitions;i++)n+=info->class_dim[info->partitionclass[i]];
+  n+=2;
+  look->posts=n;
+
+  /* also store a sorted position index */
+  for(i=0;i<n;i++)sortpointer[i]=info->postlist+i;
+  qsort(sortpointer,n,sizeof(*sortpointer),icomp);
+
+  /* points from sort order back to range number */
+  for(i=0;i<n;i++)look->forward_index[i]=sortpointer[i]-info->postlist;
+  /* points from range order to sorted position */
+  for(i=0;i<n;i++)look->reverse_index[look->forward_index[i]]=i;
+  /* we actually need the post values too */
+  for(i=0;i<n;i++)look->sorted_index[i]=info->postlist[look->forward_index[i]];
+  
+  /* quantize values to multiplier spec */
+  switch(info->mult){
+  case 1: /* 1024 -> 256 */
+    look->quant_q=256;
+    break;
+  case 2: /* 1024 -> 128 */
+    look->quant_q=128;
+    break;
+  case 3: /* 1024 -> 86 */
+    look->quant_q=86;
+    break;
+  case 4: /* 1024 -> 64 */
+    look->quant_q=64;
+    break;
+  }
+
+  /* discover our neighbors for decode where we don't use fit flags
+     (that would push the neighbors outward) */
+  for(i=0;i<n-2;i++){
+    int lo=0;
+    int hi=1;
+    int lx=0;
+    int hx=look->n;
+    int currentx=info->postlist[i+2];
+    for(j=0;j<i+2;j++){
+      int x=info->postlist[j];
+      if(x>lx && x<currentx){
+	lo=j;
+	lx=x;
+      }
+      if(x<hx && x>currentx){
+	hi=j;
+	hx=x;
+      }
+    }
+    look->loneighbor[i]=lo;
+    look->hineighbor[i]=hi;
+  }
+
+  return(look);
+}
+
+static int render_point(int x0,int x1,int y0,int y1,int x){
+  y0&=0x7fff; /* mask off flag */
+  y1&=0x7fff;
+    
+  {
+    int dy=y1-y0;
+    int adx=x1-x0;
+    int ady=abs(dy);
+    int err=ady*(x-x0);
+    
+    int off=err/adx;
+    if(dy<0)return(y0-off);
+    return(y0+off);
+  }
+}
+
+static int vorbis_dBquant(const float *x){
+  int i= *x*7.3142857f+1023.5f;
+  if(i>1023)return(1023);
+  if(i<0)return(0);
+  return i;
+}
+
+static float FLOOR1_fromdB_LOOKUP[256]={
+  1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, 
+  1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, 
+  1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, 
+  2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, 
+  2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, 
+  3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, 
+  4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, 
+  6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, 
+  7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, 
+  1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, 
+  1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, 
+  1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, 
+  2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, 
+  2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, 
+  3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, 
+  4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, 
+  5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, 
+  7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, 
+  9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, 
+  1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, 
+  1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, 
+  2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, 
+  2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, 
+  3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, 
+  4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, 
+  5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, 
+  7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, 
+  9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, 
+  0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, 
+  0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, 
+  0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, 
+  0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, 
+  0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, 
+  0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, 
+  0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, 
+  0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, 
+  0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, 
+  0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 
+  0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 
+  0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 
+  0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, 
+  0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, 
+  0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, 
+  0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, 
+  0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, 
+  0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, 
+  0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 
+  0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, 
+  0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, 
+  0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, 
+  0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, 
+  0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, 
+  0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, 
+  0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, 
+  0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, 
+  0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 
+  0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, 
+  0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, 
+  0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, 
+  0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, 
+  0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, 
+  0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, 
+  0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, 
+  0.82788260F, 0.88168307F, 0.9389798F, 1.F, 
+};
+
+static void render_line(int x0,int x1,int y0,int y1,float *d){
+  int dy=y1-y0;
+  int adx=x1-x0;
+  int ady=abs(dy);
+  int base=dy/adx;
+  int sy=(dy<0?base-1:base+1);
+  int x=x0;
+  int y=y0;
+  int err=0;
+
+  ady-=abs(base*adx);
+
+  d[x]*=FLOOR1_fromdB_LOOKUP[y];
+  while(++x<x1){
+    err=err+ady;
+    if(err>=adx){
+      err-=adx;
+      y+=sy;
+    }else{
+      y+=base;
+    }
+    d[x]*=FLOOR1_fromdB_LOOKUP[y];
+  }
+}
+
+static void render_line0(int x0,int x1,int y0,int y1,int *d){
+  int dy=y1-y0;
+  int adx=x1-x0;
+  int ady=abs(dy);
+  int base=dy/adx;
+  int sy=(dy<0?base-1:base+1);
+  int x=x0;
+  int y=y0;
+  int err=0;
+
+  ady-=abs(base*adx);
+
+  d[x]=y;
+  while(++x<x1){
+    err=err+ady;
+    if(err>=adx){
+      err-=adx;
+      y+=sy;
+    }else{
+      y+=base;
+    }
+    d[x]=y;
+  }
+}
+
+/* the floor has already been filtered to only include relevant sections */
+static int accumulate_fit(const float *flr,const float *mdct,
+			  int x0, int x1,lsfit_acc *a,
+			  int n,vorbis_info_floor1 *info){
+  long i;
+  int quantized=vorbis_dBquant(flr+x0);
+
+  long xa=0,ya=0,x2a=0,y2a=0,xya=0,na=0, xb=0,yb=0,x2b=0,y2b=0,xyb=0,nb=0;
+
+  memset(a,0,sizeof(*a));
+  a->x0=x0;
+  a->x1=x1;
+  if(x1>=n)x1=n-1;
+
+  for(i=x0;i<=x1;i++){
+    int quantized=vorbis_dBquant(flr+i);
+    if(quantized){
+      if(mdct[i]+info->twofitatten>=flr[i]){
+	xa  += i;
+	ya  += quantized;
+	x2a += i*i;
+	y2a += quantized*quantized;
+	xya += i*quantized;
+	na++;
+      }else{
+	xb  += i;
+	yb  += quantized;
+	x2b += i*i;
+	y2b += quantized*quantized;
+	xyb += i*quantized;
+	nb++;
+      }
+    }
+  }
+
+  xb+=xa;
+  yb+=ya;
+  x2b+=x2a;
+  y2b+=y2a;
+  xyb+=xya;
+  nb+=na;
+
+  /* weight toward the actually used frequencies if we meet the threshhold */
+  {
+    int weight=nb*info->twofitweight/(na+1);
+
+    a->xa=xa*weight+xb;
+    a->ya=ya*weight+yb;
+    a->x2a=x2a*weight+x2b;
+    a->y2a=y2a*weight+y2b;
+    a->xya=xya*weight+xyb;
+    a->an=na*weight+nb;
+    a->n=nb;
+  }
+
+  return(na);
+}
+
+static void fit_line(lsfit_acc *a,int fits,int *y0,int *y1){
+  long x=0,y=0,x2=0,y2=0,xy=0,n=0,an=0,i;
+  long x0=a[0].x0;
+  long x1=a[fits-1].x1;
+
+  for(i=0;i<fits;i++){
+    x+=a[i].xa;
+    y+=a[i].ya;
+    x2+=a[i].x2a;
+    y2+=a[i].y2a;
+    xy+=a[i].xya;
+    n+=a[i].n;
+    an+=a[i].an;
+  }
+
+  if(*y0>=0){
+    x+=   x0;
+    y+=  *y0;
+    x2+=  x0 *  x0;
+    y2+= *y0 * *y0;
+    xy+= *y0 *  x0;
+    n++;
+    an++;
+  }
+
+  if(*y1>=0){
+    x+=   x1;
+    y+=  *y1;
+    x2+=  x1 *  x1;
+    y2+= *y1 * *y1;
+    xy+= *y1 *  x1;
+    n++;
+    an++;
+  }
+  
+  {
+    /* need 64 bit multiplies, which C doesn't give portably as int */
+    double fx=x;
+    double fy=y;
+    double fx2=x2;
+    double fxy=xy;
+    double denom=1./(an*fx2-fx*fx);
+    double a=(fy*fx2-fxy*fx)*denom;
+    double b=(an*fxy-fx*fy)*denom;
+    *y0=rint(a+b*x0);
+    *y1=rint(a+b*x1);
+
+    /* limit to our range! */
+    if(*y0>1023)*y0=1023;
+    if(*y1>1023)*y1=1023;
+    if(*y0<0)*y0=0;
+    if(*y1<0)*y1=0;
+
+  }
+}
+
+/*static void fit_line_point(lsfit_acc *a,int fits,int *y0,int *y1){
+  long y=0;
+  int i;
+
+  for(i=0;i<fits && y==0;i++)
+    y+=a[i].ya;
+  
+  *y0=*y1=y;
+  }*/
+
+static int inspect_error(int x0,int x1,int y0,int y1,const float *mask,
+			 const float *mdct,
+			 vorbis_info_floor1 *info){
+  int dy=y1-y0;
+  int adx=x1-x0;
+  int ady=abs(dy);
+  int base=dy/adx;
+  int sy=(dy<0?base-1:base+1);
+  int x=x0;
+  int y=y0;
+  int err=0;
+  int val=vorbis_dBquant(mask+x);
+  int mse=0;
+  int n=0;
+
+  ady-=abs(base*adx);
+  
+  mse=(y-val);
+  mse*=mse;
+  n++;
+  if(mdct[x]+info->twofitatten>=mask[x]){
+    if(y+info->maxover<val)return(1);
+    if(y-info->maxunder>val)return(1);
+  }
+
+  while(++x<x1){
+    err=err+ady;
+    if(err>=adx){
+      err-=adx;
+      y+=sy;
+    }else{
+      y+=base;
+    }
+
+    val=vorbis_dBquant(mask+x);
+    mse+=((y-val)*(y-val));
+    n++;
+    if(mdct[x]+info->twofitatten>=mask[x]){
+      if(val){
+	if(y+info->maxover<val)return(1);
+	if(y-info->maxunder>val)return(1);
+      }
+    }
+  }
+  
+  if(info->maxover*info->maxover/n>info->maxerr)return(0);
+  if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
+  if(mse/n>info->maxerr)return(1);
+  return(0);
+}
+
+static int post_Y(int *A,int *B,int pos){
+  if(A[pos]<0)
+    return B[pos];
+  if(B[pos]<0)
+    return A[pos];
+
+  return (A[pos]+B[pos])>>1;
+}
+
+static int seq=0;
+
+int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
+			  const float *logmdct,   /* in */
+			  const float *logmask){
+  long i,j;
+  vorbis_info_floor1 *info=look->vi;
+  long n=look->n;
+  long posts=look->posts;
+  long nonzero=0;
+  lsfit_acc fits[VIF_POSIT+1];
+  int fit_valueA[VIF_POSIT+2]; /* index by range list position */
+  int fit_valueB[VIF_POSIT+2]; /* index by range list position */
+
+  int loneighbor[VIF_POSIT+2]; /* sorted index of range list position (+2) */
+  int hineighbor[VIF_POSIT+2]; 
+  int *output=NULL;
+  int memo[VIF_POSIT+2];
+
+  for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
+  for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
+  for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
+  for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
+  for(i=0;i<posts;i++)memo[i]=-1;      /* no neighbor yet */
+
+  /* quantize the relevant floor points and collect them into line fit
+     structures (one per minimal division) at the same time */
+  if(posts==0){
+    nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
+  }else{
+    for(i=0;i<posts-1;i++)
+      nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
+			      look->sorted_index[i+1],fits+i,
+			      n,info);
+  }
+  
+  if(nonzero){
+    /* start by fitting the implicit base case.... */
+    int y0=-200;
+    int y1=-200;
+    fit_line(fits,posts-1,&y0,&y1);
+
+    fit_valueA[0]=y0;
+    fit_valueB[0]=y0;
+    fit_valueB[1]=y1;
+    fit_valueA[1]=y1;
+
+    /* Non degenerate case */
+    /* start progressive splitting.  This is a greedy, non-optimal
+       algorithm, but simple and close enough to the best
+       answer. */
+    for(i=2;i<posts;i++){
+      int sortpos=look->reverse_index[i];
+      int ln=loneighbor[sortpos];
+      int hn=hineighbor[sortpos];
+      
+      /* eliminate repeat searches of a particular range with a memo */
+      if(memo[ln]!=hn){
+	/* haven't performed this error search yet */
+	int lsortpos=look->reverse_index[ln];
+	int hsortpos=look->reverse_index[hn];
+	memo[ln]=hn;
+		
+	{
+	  /* A note: we want to bound/minimize *local*, not global, error */
+	  int lx=info->postlist[ln];
+	  int hx=info->postlist[hn];	  
+	  int ly=post_Y(fit_valueA,fit_valueB,ln);
+	  int hy=post_Y(fit_valueA,fit_valueB,hn);
+	  
+	  if(inspect_error(lx,hx,ly,hy,logmask,logmdct,info)){
+	    /* outside error bounds/begin search area.  Split it. */
+	    int ly0=-200;
+	    int ly1=-200;
+	    int hy0=-200;
+	    int hy1=-200;
+	    fit_line(fits+lsortpos,sortpos-lsortpos,&ly0,&ly1);
+	    fit_line(fits+sortpos,hsortpos-sortpos,&hy0,&hy1);
+	    
+	    /* store new edge values */
+	    fit_valueB[ln]=ly0;
+	    if(ln==0)fit_valueA[ln]=ly0;
+	    fit_valueA[i]=ly1;
+	    fit_valueB[i]=hy0;
+	    fit_valueA[hn]=hy1;
+	    if(hn==1)fit_valueB[hn]=hy1;
+	    
+	    if(ly1>=0 || hy0>=0){
+	      /* store new neighbor values */
+	      for(j=sortpos-1;j>=0;j--)
+		if(hineighbor[j]==hn)
+		  hineighbor[j]=i;
+		else
+		  break;
+	      for(j=sortpos+1;j<posts;j++)
+		if(loneighbor[j]==ln)
+		  loneighbor[j]=i;
+		else
+		  break;
+	      
+	    }
+	  }else{
+	    
+	    fit_valueA[i]=-200;
+	    fit_valueB[i]=-200;
+	  }
+	}
+      }
+    }
+  
+    output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
+    
+    output[0]=post_Y(fit_valueA,fit_valueB,0);
+    output[1]=post_Y(fit_valueA,fit_valueB,1);
+    
+    /* fill in posts marked as not using a fit; we will zero
+       back out to 'unused' when encoding them so long as curve
+       interpolation doesn't force them into use */
+    for(i=2;i<posts;i++){
+      int ln=look->loneighbor[i-2];
+      int hn=look->hineighbor[i-2];
+      int x0=info->postlist[ln];
+      int x1=info->postlist[hn];
+      int y0=output[ln];
+      int y1=output[hn];
+      
+      int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
+      int vx=post_Y(fit_valueA,fit_valueB,i);
+      
+      if(vx>=0 && predicted!=vx){ 
+	output[i]=vx;
+      }else{
+	output[i]= predicted|0x8000;
+      }
+    }
+  }
+
+  return(output);
+  
+}
+		
+int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor1 *look,
+			  int *A,int *B,
+			  int del){
+
+  long i;
+  long posts=look->posts;
+  int *output=NULL;
+  
+  if(A && B){
+    output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
+    
+    for(i=0;i<posts;i++){
+      output[i]=((65536-del)*(A[i]&0x7fff)+del*(B[i]&0x7fff)+32768)>>16;
+      if(A[i]&0x8000 && B[i]&0x8000)output[i]|=0x8000;
+    }
+  }
+
+  return(output);
+}
+
+
+int floor1_encode(vorbis_block *vb,vorbis_look_floor1 *look,
+		  int *post,int *ilogmask){
+
+  long i,j;
+  vorbis_info_floor1 *info=look->vi;
+  long n=look->n;
+  long posts=look->posts;
+  codec_setup_info *ci=vb->vd->vi->codec_setup;
+  int out[VIF_POSIT+2];
+  static_codebook **sbooks=ci->book_param;
+  codebook *books=ci->fullbooks;
+  static long seq=0; 
+
+  /* quantize values to multiplier spec */
+  if(post){
+    for(i=0;i<posts;i++){
+      int val=post[i]&0x7fff;
+      switch(info->mult){
+      case 1: /* 1024 -> 256 */
+	val>>=2;
+	break;
+      case 2: /* 1024 -> 128 */
+	val>>=3;
+	break;
+      case 3: /* 1024 -> 86 */
+	val/=12;
+	break;
+      case 4: /* 1024 -> 64 */
+	val>>=4;
+	break;
+      }
+      post[i]=val | (post[i]&0x8000);
+    }
+
+    out[0]=post[0];
+    out[1]=post[1];
+
+    /* find prediction values for each post and subtract them */
+    for(i=2;i<posts;i++){
+      int ln=look->loneighbor[i-2];
+      int hn=look->hineighbor[i-2];
+      int x0=info->postlist[ln];
+      int x1=info->postlist[hn];
+      int y0=post[ln];
+      int y1=post[hn];
+      
+      int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
+      
+      if((post[i]&0x8000) || (predicted==post[i])){
+	post[i]=predicted|0x8000; /* in case there was roundoff jitter
+				     in interpolation */
+	out[i]=0;
+      }else{
+	int headroom=(look->quant_q-predicted<predicted?
+		      look->quant_q-predicted:predicted);
+	
+	int val=post[i]-predicted;
+	
+	/* at this point the 'deviation' value is in the range +/- max
+	   range, but the real, unique range can always be mapped to
+	   only [0-maxrange).  So we want to wrap the deviation into
+	   this limited range, but do it in the way that least screws
+	   an essentially gaussian probability distribution. */
+	
+	if(val<0)
+	  if(val<-headroom)
+	    val=headroom-val-1;
+	  else
+	    val=-1-(val<<1);
+	else
+	  if(val>=headroom)
+	    val= val+headroom;
+	  else
+	    val<<=1;
+	
+	out[i]=val;
+	post[ln]&=0x7fff;
+	post[hn]&=0x7fff;
+      }
+    }
+    
+    /* we have everything we need. pack it out */
+    /* mark nontrivial floor */
+    oggpack_write(&vb->opb,1,1);
+      
+    /* beginning/end post */
+    look->frames++;
+    look->postbits+=ilog(look->quant_q-1)*2;
+    oggpack_write(&vb->opb,out[0],ilog(look->quant_q-1));
+    oggpack_write(&vb->opb,out[1],ilog(look->quant_q-1));
+      
+      
+    /* partition by partition */
+    for(i=0,j=2;i<info->partitions;i++){
+      int class=info->partitionclass[i];
+      int cdim=info->class_dim[class];
+      int csubbits=info->class_subs[class];
+      int csub=1<<csubbits;
+      int bookas[8]={0,0,0,0,0,0,0,0};
+      int cval=0;
+      int cshift=0;
+      int k,l;
+
+      /* generate the partition's first stage cascade value */
+      if(csubbits){
+	int maxval[8];
+	for(k=0;k<csub;k++){
+	  int booknum=info->class_subbook[class][k];
+	  if(booknum<0){
+	    maxval[k]=1;
+	  }else{
+	    maxval[k]=sbooks[info->class_subbook[class][k]]->entries;
+	  }
+	}
+	for(k=0;k<cdim;k++){
+	  for(l=0;l<csub;l++){
+	    int val=out[j+k];
+	    if(val<maxval[l]){
+	      bookas[k]=l;
+	      break;
+	    }
+	  }
+	  cval|= bookas[k]<<cshift;
+	  cshift+=csubbits;
+	}
+	/* write it */
+	look->phrasebits+=
+	  vorbis_book_encode(books+info->class_book[class],cval,&vb->opb);
+	
+#ifdef TRAIN_FLOOR1
+	{
+	  FILE *of;
+	  char buffer[80];
+	  sprintf(buffer,"line_%dx%ld_class%d.vqd",
+		  vb->pcmend/2,posts-2,class);
+	  of=fopen(buffer,"a");
+	  fprintf(of,"%d\n",cval);
+	  fclose(of);
+	}
+#endif
+      }
+	
+      /* write post values */
+      for(k=0;k<cdim;k++){
+	int book=info->class_subbook[class][bookas[k]];
+	if(book>=0){
+	  /* hack to allow training with 'bad' books */
+	  if(out[j+k]<(books+book)->entries)
+	    look->postbits+=vorbis_book_encode(books+book,
+					       out[j+k],&vb->opb);
+	  /*else
+	    fprintf(stderr,"+!");*/
+	  
+#ifdef TRAIN_FLOOR1
+	  {
+	    FILE *of;
+	    char buffer[80];
+	    sprintf(buffer,"line_%dx%ld_%dsub%d.vqd",
+		    vb->pcmend/2,posts-2,class,bookas[k]);
+	    of=fopen(buffer,"a");
+	    fprintf(of,"%d\n",out[j+k]);
+	    fclose(of);
+	  }
+#endif
+	}
+      }
+      j+=cdim;
+    }
+    
+    {
+      /* generate quantized floor equivalent to what we'd unpack in decode */
+      /* render the lines */
+      int hx=0;
+      int lx=0;
+      int ly=post[0]*info->mult;
+      for(j=1;j<look->posts;j++){
+	int current=look->forward_index[j];
+	int hy=post[current]&0x7fff;
+	if(hy==post[current]){
+	  
+	  hy*=info->mult;
+	  hx=info->postlist[current];
+	
+	  render_line0(lx,hx,ly,hy,ilogmask);
+	
+	  lx=hx;
+	  ly=hy;
+	}
+      }
+      for(j=hx;j<vb->pcmend/2;j++)ilogmask[j]=ly; /* be certain */    
+      seq++;
+      return(1);
+    }
+  }else{
+    oggpack_write(&vb->opb,0,1);
+    memset(ilogmask,0,vb->pcmend/2*sizeof(*ilogmask));
+    seq++;
+    return(0);
+  }
+}
+
+static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){
+  vorbis_look_floor1 *look=(vorbis_look_floor1 *)in;
+  vorbis_info_floor1 *info=look->vi;
+  codec_setup_info   *ci=vb->vd->vi->codec_setup;
+  
+  int i,j,k;
+  codebook *books=ci->fullbooks;   
+
+  /* unpack wrapped/predicted values from stream */
+  if(oggpack_read(&vb->opb,1)==1){
+    int *fit_value=_vorbis_block_alloc(vb,(look->posts)*sizeof(*fit_value));
+
+    fit_value[0]=oggpack_read(&vb->opb,ilog(look->quant_q-1));
+    fit_value[1]=oggpack_read(&vb->opb,ilog(look->quant_q-1));
+
+    /* partition by partition */
+    for(i=0,j=2;i<info->partitions;i++){
+      int class=info->partitionclass[i];
+      int cdim=info->class_dim[class];
+      int csubbits=info->class_subs[class];
+      int csub=1<<csubbits;
+      int cval=0;
+
+      /* decode the partition's first stage cascade value */
+      if(csubbits){
+	cval=vorbis_book_decode(books+info->class_book[class],&vb->opb);
+
+	if(cval==-1)goto eop;
+      }
+
+      for(k=0;k<cdim;k++){
+	int book=info->class_subbook[class][cval&(csub-1)];
+	cval>>=csubbits;
+	if(book>=0){
+	  if((fit_value[j+k]=vorbis_book_decode(books+book,&vb->opb))==-1)
+	    goto eop;
+	}else{
+	  fit_value[j+k]=0;
+	}
+      }
+      j+=cdim;
+    }
+
+    /* unwrap positive values and reconsitute via linear interpolation */
+    for(i=2;i<look->posts;i++){
+      int predicted=render_point(info->postlist[look->loneighbor[i-2]],
+				 info->postlist[look->hineighbor[i-2]],
+				 fit_value[look->loneighbor[i-2]],
+				 fit_value[look->hineighbor[i-2]],
+				 info->postlist[i]);
+      int hiroom=look->quant_q-predicted;
+      int loroom=predicted;
+      int room=(hiroom<loroom?hiroom:loroom)<<1;
+      int val=fit_value[i];
+
+      if(val){
+	if(val>=room){
+	  if(hiroom>loroom){
+	    val = val-loroom;
+	  }else{
+	    val = -1-(val-hiroom);
+	  }
+	}else{
+	  if(val&1){
+	    val= -((val+1)>>1);
+	  }else{
+	    val>>=1;
+	  }
+	}
+
+	fit_value[i]=val+predicted;
+	fit_value[look->loneighbor[i-2]]&=0x7fff;
+	fit_value[look->hineighbor[i-2]]&=0x7fff;
+
+      }else{
+	fit_value[i]=predicted|0x8000;
+      }
+	
+    }
+
+    return(fit_value);
+  }
+ eop:
+  return(NULL);
+}
+
+static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
+			  float *out){
+  vorbis_look_floor1 *look=(vorbis_look_floor1 *)in;
+  vorbis_info_floor1 *info=look->vi;
+
+  codec_setup_info   *ci=vb->vd->vi->codec_setup;
+  int                  n=ci->blocksizes[vb->W]/2;
+  int j;
+
+  if(memo){
+    /* render the lines */
+    int *fit_value=(int *)memo;
+    int hx=0;
+    int lx=0;
+    int ly=fit_value[0]*info->mult;
+    for(j=1;j<look->posts;j++){
+      int current=look->forward_index[j];
+      int hy=fit_value[current]&0x7fff;
+      if(hy==fit_value[current]){
+	
+	hy*=info->mult;
+	hx=info->postlist[current];
+	
+	render_line(lx,hx,ly,hy,out);
+	
+	lx=hx;
+	ly=hy;
+      }
+    }
+    for(j=hx;j<n;j++)out[j]*=FLOOR1_fromdB_LOOKUP[ly]; /* be certain */    
+    return(1);
+  }
+  memset(out,0,sizeof(*out)*n);
+  return(0);
+}
+
+/* export hooks */
+vorbis_func_floor floor1_exportbundle={
+  &floor1_pack,&floor1_unpack,&floor1_look,&floor1_free_info,
+  &floor1_free_look,&floor1_inverse1,&floor1_inverse2
+};
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/highlevel.h
@@ -1,0 +1,58 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: highlevel encoder setup struct seperated out for vorbisenc clarity
+ last mod: $Id: highlevel.h,v 1.4 2002/07/01 11:20:11 xiphmont Exp $
+
+ ********************************************************************/
+
+typedef struct highlevel_byblocktype {
+  double tone_mask_setting;
+  double tone_peaklimit_setting;
+  double noise_bias_setting;
+  double noise_compand_setting;
+} highlevel_byblocktype;
+  
+typedef struct highlevel_encode_setup {
+  void *setup;
+  int   set_in_stone;
+
+  double base_setting;
+  double long_setting;
+  double short_setting;
+  double impulse_noisetune;
+
+  int    managed;
+  long   bitrate_min;
+  long   bitrate_av_lo;
+  long   bitrate_av_hi;
+  long   bitrate_max;
+  double bitrate_limit_window;
+  double bitrate_av_window;
+  double bitrate_av_window_center;
+  
+  int impulse_block_p;
+  int noise_normalize_p;
+
+  double stereo_point_setting;
+  double lowpass_kHz;
+
+  double ath_floating_dB;
+  double ath_absolute_dB;
+
+  double amplitude_track_dBpersec;
+  double trigger_setting;
+  
+  highlevel_byblocktype block[4]; /* padding, impulse, transition, long */
+
+} highlevel_encode_setup;
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/info.c
@@ -1,0 +1,602 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: maintain the info structure, info <-> header packets
+ last mod: $Id: info.c,v 1.59 2002/07/18 01:43:09 xiphmont Exp $
+
+ ********************************************************************/
+
+/* general handling of the header and the vorbis_info structure (and
+   substructures) */
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "codebook.h"
+#include "registry.h"
+#include "window.h"
+#include "psy.h"
+#include "misc.h"
+#include "os.h"
+
+/* helpers */
+static int ilog2(unsigned int v){
+  int ret=0;
+  if(v)--v;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+static void _v_writestring(oggpack_buffer *o,char *s, int bytes){
+
+  while(bytes--){
+    oggpack_write(o,*s++,8);
+  }
+}
+
+static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){
+  while(bytes--){
+    *buf++=oggpack_read(o,8);
+  }
+}
+
+void vorbis_comment_init(vorbis_comment *vc){
+  memset(vc,0,sizeof(*vc));
+}
+
+void vorbis_comment_add(vorbis_comment *vc,char *comment){
+  vc->user_comments=_ogg_realloc(vc->user_comments,
+			    (vc->comments+2)*sizeof(*vc->user_comments));
+  vc->comment_lengths=_ogg_realloc(vc->comment_lengths,
+      			    (vc->comments+2)*sizeof(*vc->comment_lengths));
+  vc->comment_lengths[vc->comments]=strlen(comment);
+  vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1);
+  strcpy(vc->user_comments[vc->comments], comment);
+  vc->comments++;
+  vc->user_comments[vc->comments]=NULL;
+}
+
+void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents){
+  char *comment=malloc(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */
+  strcpy(comment, tag);
+  strcat(comment, "=");
+  strcat(comment, contents);
+  vorbis_comment_add(vc, comment);
+  free(comment);
+}
+
+/* This is more or less the same as strncasecmp - but that doesn't exist
+ * everywhere, and this is a fairly trivial function, so we include it */
+static int tagcompare(const char *s1, const char *s2, int n){
+  int c=0;
+  while(c < n){
+    if(toupper(s1[c]) != toupper(s2[c]))
+      return !0;
+    c++;
+  }
+  return 0;
+}
+
+char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){
+  long i;
+  int found = 0;
+  int taglen = strlen(tag)+1; /* +1 for the = we append */
+  char *fulltag = malloc(taglen+ 1);
+
+  strcpy(fulltag, tag);
+  strcat(fulltag, "=");
+  
+  for(i=0;i<vc->comments;i++){
+    if(!tagcompare(vc->user_comments[i], fulltag, taglen)){
+      if(count == found) {
+	/* We return a pointer to the data, not a copy */
+         free(fulltag);
+      	return vc->user_comments[i] + taglen;
+      } else
+	found++;
+    }
+  }
+  free(fulltag);
+  return NULL; /* didn't find anything */
+}
+
+int vorbis_comment_query_count(vorbis_comment *vc, char *tag){
+  int i,count=0;
+  int taglen = strlen(tag)+1; /* +1 for the = we append */
+  char *fulltag = malloc(taglen+1);
+  strcpy(fulltag,tag);
+  strcat(fulltag, "=");
+
+  for(i=0;i<vc->comments;i++){
+    if(!tagcompare(vc->user_comments[i], fulltag, taglen))
+      count++;
+  }
+
+  free(fulltag);
+  return count;
+}
+
+void vorbis_comment_clear(vorbis_comment *vc){
+  if(vc){
+    long i;
+    for(i=0;i<vc->comments;i++)
+      if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
+    if(vc->user_comments)_ogg_free(vc->user_comments);
+	if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
+    if(vc->vendor)_ogg_free(vc->vendor);
+  }
+  memset(vc,0,sizeof(*vc));
+}
+
+/* blocksize 0 is guaranteed to be short, 1 is guarantted to be long.
+   They may be equal, but short will never ge greater than long */
+int vorbis_info_blocksize(vorbis_info *vi,int zo){
+  codec_setup_info *ci = vi->codec_setup;
+  return ci ? ci->blocksizes[zo] : -1;
+}
+
+/* used by synthesis, which has a full, alloced vi */
+void vorbis_info_init(vorbis_info *vi){
+  memset(vi,0,sizeof(*vi));
+  vi->codec_setup=_ogg_calloc(1,sizeof(codec_setup_info));
+}
+
+void vorbis_info_clear(vorbis_info *vi){
+  codec_setup_info     *ci=vi->codec_setup;
+  int i;
+
+  if(ci){
+
+    for(i=0;i<ci->modes;i++)
+      if(ci->mode_param[i])_ogg_free(ci->mode_param[i]);
+
+    for(i=0;i<ci->maps;i++) /* unpack does the range checking */
+      _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]);
+
+    for(i=0;i<ci->floors;i++) /* unpack does the range checking */
+      _floor_P[ci->floor_type[i]]->free_info(ci->floor_param[i]);
+    
+    for(i=0;i<ci->residues;i++) /* unpack does the range checking */
+      _residue_P[ci->residue_type[i]]->free_info(ci->residue_param[i]);
+
+    for(i=0;i<ci->books;i++){
+      if(ci->book_param[i]){
+	/* knows if the book was not alloced */
+	vorbis_staticbook_destroy(ci->book_param[i]);
+      }
+      if(ci->fullbooks)
+	vorbis_book_clear(ci->fullbooks+i);
+    }
+    if(ci->fullbooks)
+	_ogg_free(ci->fullbooks);
+    
+    for(i=0;i<ci->psys;i++)
+      _vi_psy_free(ci->psy_param[i]);
+
+    _ogg_free(ci);
+  }
+
+  memset(vi,0,sizeof(*vi));
+}
+
+/* Header packing/unpacking ********************************************/
+
+static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
+  codec_setup_info     *ci=vi->codec_setup;
+  if(!ci)return(OV_EFAULT);
+
+  vi->version=oggpack_read(opb,32);
+  if(vi->version!=0)return(OV_EVERSION);
+
+  vi->channels=oggpack_read(opb,8);
+  vi->rate=oggpack_read(opb,32);
+
+  vi->bitrate_upper=oggpack_read(opb,32);
+  vi->bitrate_nominal=oggpack_read(opb,32);
+  vi->bitrate_lower=oggpack_read(opb,32);
+
+  ci->blocksizes[0]=1<<oggpack_read(opb,4);
+  ci->blocksizes[1]=1<<oggpack_read(opb,4);
+  
+  if(vi->rate<1)goto err_out;
+  if(vi->channels<1)goto err_out;
+  if(ci->blocksizes[0]<8)goto err_out; 
+  if(ci->blocksizes[1]<ci->blocksizes[0])goto err_out;
+  
+  if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */
+
+  return(0);
+ err_out:
+  vorbis_info_clear(vi);
+  return(OV_EBADHEADER);
+}
+
+static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
+  int i;
+  int vendorlen=oggpack_read(opb,32);
+  if(vendorlen<0)goto err_out;
+  vc->vendor=_ogg_calloc(vendorlen+1,1);
+  _v_readstring(opb,vc->vendor,vendorlen);
+  vc->comments=oggpack_read(opb,32);
+  if(vc->comments<0)goto err_out;
+  vc->user_comments=_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments));
+  vc->comment_lengths=_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths));
+	    
+  for(i=0;i<vc->comments;i++){
+    int len=oggpack_read(opb,32);
+    if(len<0)goto err_out;
+	vc->comment_lengths[i]=len;
+    vc->user_comments[i]=_ogg_calloc(len+1,1);
+    _v_readstring(opb,vc->user_comments[i],len);
+  }	  
+  if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */
+
+  return(0);
+ err_out:
+  vorbis_comment_clear(vc);
+  return(OV_EBADHEADER);
+}
+
+/* all of the real encoding details are here.  The modes, books,
+   everything */
+static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
+  codec_setup_info     *ci=vi->codec_setup;
+  int i;
+  if(!ci)return(OV_EFAULT);
+
+  /* codebooks */
+  ci->books=oggpack_read(opb,8)+1;
+  /*ci->book_param=_ogg_calloc(ci->books,sizeof(*ci->book_param));*/
+  for(i=0;i<ci->books;i++){
+    ci->book_param[i]=_ogg_calloc(1,sizeof(*ci->book_param[i]));
+    if(vorbis_staticbook_unpack(opb,ci->book_param[i]))goto err_out;
+  }
+
+  /* time backend settings; hooks are unused */
+  {
+    int times=oggpack_read(opb,6)+1;
+    for(i=0;i<times;i++){
+      int test=oggpack_read(opb,16);
+      if(test<0 || test>=VI_TIMEB)goto err_out;
+    }
+  }
+
+  /* floor backend settings */
+  ci->floors=oggpack_read(opb,6)+1;
+  /*ci->floor_type=_ogg_malloc(ci->floors*sizeof(*ci->floor_type));*/
+  /*ci->floor_param=_ogg_calloc(ci->floors,sizeof(void *));*/
+  for(i=0;i<ci->floors;i++){
+    ci->floor_type[i]=oggpack_read(opb,16);
+    if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out;
+    ci->floor_param[i]=_floor_P[ci->floor_type[i]]->unpack(vi,opb);
+    if(!ci->floor_param[i])goto err_out;
+  }
+
+  /* residue backend settings */
+  ci->residues=oggpack_read(opb,6)+1;
+  /*ci->residue_type=_ogg_malloc(ci->residues*sizeof(*ci->residue_type));*/
+  /*ci->residue_param=_ogg_calloc(ci->residues,sizeof(void *));*/
+  for(i=0;i<ci->residues;i++){
+    ci->residue_type[i]=oggpack_read(opb,16);
+    if(ci->residue_type[i]<0 || ci->residue_type[i]>=VI_RESB)goto err_out;
+    ci->residue_param[i]=_residue_P[ci->residue_type[i]]->unpack(vi,opb);
+    if(!ci->residue_param[i])goto err_out;
+  }
+
+  /* map backend settings */
+  ci->maps=oggpack_read(opb,6)+1;
+  /*ci->map_type=_ogg_malloc(ci->maps*sizeof(*ci->map_type));*/
+  /*ci->map_param=_ogg_calloc(ci->maps,sizeof(void *));*/
+  for(i=0;i<ci->maps;i++){
+    ci->map_type[i]=oggpack_read(opb,16);
+    if(ci->map_type[i]<0 || ci->map_type[i]>=VI_MAPB)goto err_out;
+    ci->map_param[i]=_mapping_P[ci->map_type[i]]->unpack(vi,opb);
+    if(!ci->map_param[i])goto err_out;
+  }
+  
+  /* mode settings */
+  ci->modes=oggpack_read(opb,6)+1;
+  /*vi->mode_param=_ogg_calloc(vi->modes,sizeof(void *));*/
+  for(i=0;i<ci->modes;i++){
+    ci->mode_param[i]=_ogg_calloc(1,sizeof(*ci->mode_param[i]));
+    ci->mode_param[i]->blockflag=oggpack_read(opb,1);
+    ci->mode_param[i]->windowtype=oggpack_read(opb,16);
+    ci->mode_param[i]->transformtype=oggpack_read(opb,16);
+    ci->mode_param[i]->mapping=oggpack_read(opb,8);
+
+    if(ci->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out;
+    if(ci->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out;
+    if(ci->mode_param[i]->mapping>=ci->maps)goto err_out;
+  }
+  
+  if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */
+
+  return(0);
+ err_out:
+  vorbis_info_clear(vi);
+  return(OV_EBADHEADER);
+}
+
+/* The Vorbis header is in three packets; the initial small packet in
+   the first page that identifies basic parameters, a second packet
+   with bitstream comments and a third packet that holds the
+   codebook. */
+
+int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){
+  oggpack_buffer opb;
+  
+  if(op){
+    oggpack_readinit(&opb,op->packet,op->bytes);
+
+    /* Which of the three types of header is this? */
+    /* Also verify header-ness, vorbis */
+    {
+      char buffer[6];
+      int packtype=oggpack_read(&opb,8);
+      memset(buffer,0,6);
+      _v_readstring(&opb,buffer,6);
+      if(memcmp(buffer,"vorbis",6)){
+	/* not a vorbis header */
+	return(OV_ENOTVORBIS);
+      }
+      switch(packtype){
+      case 0x01: /* least significant *bit* is read first */
+	if(!op->b_o_s){
+	  /* Not the initial packet */
+	  return(OV_EBADHEADER);
+	}
+	if(vi->rate!=0){
+	  /* previously initialized info header */
+	  return(OV_EBADHEADER);
+	}
+
+	return(_vorbis_unpack_info(vi,&opb));
+
+      case 0x03: /* least significant *bit* is read first */
+	if(vi->rate==0){
+	  /* um... we didn't get the initial header */
+	  return(OV_EBADHEADER);
+	}
+
+	return(_vorbis_unpack_comment(vc,&opb));
+
+      case 0x05: /* least significant *bit* is read first */
+	if(vi->rate==0 || vc->vendor==NULL){
+	  /* um... we didn;t get the initial header or comments yet */
+	  return(OV_EBADHEADER);
+	}
+
+	return(_vorbis_unpack_books(vi,&opb));
+
+      default:
+	/* Not a valid vorbis header type */
+	return(OV_EBADHEADER);
+	break;
+      }
+    }
+  }
+  return(OV_EBADHEADER);
+}
+
+/* pack side **********************************************************/
+
+static int _vorbis_pack_info(oggpack_buffer *opb,vorbis_info *vi){
+  codec_setup_info     *ci=vi->codec_setup;
+  if(!ci)return(OV_EFAULT);
+
+  /* preamble */  
+  oggpack_write(opb,0x01,8);
+  _v_writestring(opb,"vorbis", 6);
+
+  /* basic information about the stream */
+  oggpack_write(opb,0x00,32);
+  oggpack_write(opb,vi->channels,8);
+  oggpack_write(opb,vi->rate,32);
+
+  oggpack_write(opb,vi->bitrate_upper,32);
+  oggpack_write(opb,vi->bitrate_nominal,32);
+  oggpack_write(opb,vi->bitrate_lower,32);
+
+  oggpack_write(opb,ilog2(ci->blocksizes[0]),4);
+  oggpack_write(opb,ilog2(ci->blocksizes[1]),4);
+  oggpack_write(opb,1,1);
+
+  return(0);
+}
+
+static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){
+  char temp[]="Xiph.Org libVorbis I 20020717";
+  int bytes = strlen(temp);
+
+  /* preamble */  
+  oggpack_write(opb,0x03,8);
+  _v_writestring(opb,"vorbis", 6);
+
+  /* vendor */
+  oggpack_write(opb,bytes,32);
+  _v_writestring(opb,temp, bytes);
+  
+  /* comments */
+
+  oggpack_write(opb,vc->comments,32);
+  if(vc->comments){
+    int i;
+    for(i=0;i<vc->comments;i++){
+      if(vc->user_comments[i]){
+	oggpack_write(opb,vc->comment_lengths[i],32);
+	_v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]);
+      }else{
+	oggpack_write(opb,0,32);
+      }
+    }
+  }
+  oggpack_write(opb,1,1);
+
+  return(0);
+}
+ 
+static int _vorbis_pack_books(oggpack_buffer *opb,vorbis_info *vi){
+  codec_setup_info     *ci=vi->codec_setup;
+  int i;
+  if(!ci)return(OV_EFAULT);
+
+  oggpack_write(opb,0x05,8);
+  _v_writestring(opb,"vorbis", 6);
+
+  /* books */
+  oggpack_write(opb,ci->books-1,8);
+  for(i=0;i<ci->books;i++)
+    if(vorbis_staticbook_pack(ci->book_param[i],opb))goto err_out;
+
+  /* times; hook placeholders */
+  oggpack_write(opb,0,6);
+  oggpack_write(opb,0,16);
+
+  /* floors */
+  oggpack_write(opb,ci->floors-1,6);
+  for(i=0;i<ci->floors;i++){
+    oggpack_write(opb,ci->floor_type[i],16);
+    if(_floor_P[ci->floor_type[i]]->pack)
+      _floor_P[ci->floor_type[i]]->pack(ci->floor_param[i],opb);
+    else
+      goto err_out;
+  }
+
+  /* residues */
+  oggpack_write(opb,ci->residues-1,6);
+  for(i=0;i<ci->residues;i++){
+    oggpack_write(opb,ci->residue_type[i],16);
+    _residue_P[ci->residue_type[i]]->pack(ci->residue_param[i],opb);
+  }
+
+  /* maps */
+  oggpack_write(opb,ci->maps-1,6);
+  for(i=0;i<ci->maps;i++){
+    oggpack_write(opb,ci->map_type[i],16);
+    _mapping_P[ci->map_type[i]]->pack(vi,ci->map_param[i],opb);
+  }
+
+  /* modes */
+  oggpack_write(opb,ci->modes-1,6);
+  for(i=0;i<ci->modes;i++){
+    oggpack_write(opb,ci->mode_param[i]->blockflag,1);
+    oggpack_write(opb,ci->mode_param[i]->windowtype,16);
+    oggpack_write(opb,ci->mode_param[i]->transformtype,16);
+    oggpack_write(opb,ci->mode_param[i]->mapping,8);
+  }
+  oggpack_write(opb,1,1);
+
+  return(0);
+err_out:
+  return(-1);
+} 
+
+int vorbis_commentheader_out(vorbis_comment *vc,
+    				      ogg_packet *op){
+
+  oggpack_buffer opb;
+
+  oggpack_writeinit(&opb);
+  if(_vorbis_pack_comment(&opb,vc)) return OV_EIMPL;
+
+  op->packet = _ogg_malloc(oggpack_bytes(&opb));
+  memcpy(op->packet, opb.buffer, oggpack_bytes(&opb));
+
+  op->bytes=oggpack_bytes(&opb);
+  op->b_o_s=0;
+  op->e_o_s=0;
+  op->granulepos=0;
+
+  return 0;
+}
+
+int vorbis_analysis_headerout(vorbis_dsp_state *v,
+			      vorbis_comment *vc,
+			      ogg_packet *op,
+			      ogg_packet *op_comm,
+			      ogg_packet *op_code){
+  int ret=OV_EIMPL;
+  vorbis_info *vi=v->vi;
+  oggpack_buffer opb;
+  backend_lookup_state *b=v->backend_state;
+
+  if(!b){
+    ret=OV_EFAULT;
+    goto err_out;
+  }
+
+  /* first header packet **********************************************/
+
+  oggpack_writeinit(&opb);
+  if(_vorbis_pack_info(&opb,vi))goto err_out;
+
+  /* build the packet */
+  if(b->header)_ogg_free(b->header);
+  b->header=_ogg_malloc(oggpack_bytes(&opb));
+  memcpy(b->header,opb.buffer,oggpack_bytes(&opb));
+  op->packet=b->header;
+  op->bytes=oggpack_bytes(&opb);
+  op->b_o_s=1;
+  op->e_o_s=0;
+  op->granulepos=0;
+
+  /* second header packet (comments) **********************************/
+
+  oggpack_reset(&opb);
+  if(_vorbis_pack_comment(&opb,vc))goto err_out;
+
+  if(b->header1)_ogg_free(b->header1);
+  b->header1=_ogg_malloc(oggpack_bytes(&opb));
+  memcpy(b->header1,opb.buffer,oggpack_bytes(&opb));
+  op_comm->packet=b->header1;
+  op_comm->bytes=oggpack_bytes(&opb);
+  op_comm->b_o_s=0;
+  op_comm->e_o_s=0;
+  op_comm->granulepos=0;
+
+  /* third header packet (modes/codebooks) ****************************/
+
+  oggpack_reset(&opb);
+  if(_vorbis_pack_books(&opb,vi))goto err_out;
+
+  if(b->header2)_ogg_free(b->header2);
+  b->header2=_ogg_malloc(oggpack_bytes(&opb));
+  memcpy(b->header2,opb.buffer,oggpack_bytes(&opb));
+  op_code->packet=b->header2;
+  op_code->bytes=oggpack_bytes(&opb);
+  op_code->b_o_s=0;
+  op_code->e_o_s=0;
+  op_code->granulepos=0;
+
+  oggpack_writeclear(&opb);
+  return(0);
+ err_out:
+  oggpack_writeclear(&opb);
+  memset(op,0,sizeof(*op));
+  memset(op_comm,0,sizeof(*op_comm));
+  memset(op_code,0,sizeof(*op_code));
+
+  if(b->header)_ogg_free(b->header);
+  if(b->header1)_ogg_free(b->header1);
+  if(b->header2)_ogg_free(b->header2);
+  b->header=NULL;
+  b->header1=NULL;
+  b->header2=NULL;
+  return(ret);
+}
+
binary files /dev/null b/sys/src/cmd/audio/libvorbis/libvorbis.au differ
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lookup.c
@@ -1,0 +1,94 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: lookup based functions
+  last mod: $Id: lookup.c,v 1.9 2002/01/22 08:06:07 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <math.h>
+#include "lookup.h"
+#include "lookup_data.h"
+#include "os.h"
+#include "misc.h"
+
+#ifdef FLOAT_LOOKUP
+
+/* interpolated lookup based cos function, domain 0 to PI only */
+float vorbis_coslook(float a){
+  double d=a*(.31830989*(float)COS_LOOKUP_SZ);
+  int i=vorbis_ftoi(d-.5);
+
+  return COS_LOOKUP[i]+ (d-i)*(COS_LOOKUP[i+1]-COS_LOOKUP[i]);
+}
+
+/* interpolated 1./sqrt(p) where .5 <= p < 1. */
+float vorbis_invsqlook(float a){
+  double d=a*(2.f*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ;
+  int i=vorbis_ftoi(d-.5f);
+  return INVSQ_LOOKUP[i]+ (d-i)*(INVSQ_LOOKUP[i+1]-INVSQ_LOOKUP[i]);
+}
+
+/* interpolated 1./sqrt(p) where .5 <= p < 1. */
+float vorbis_invsq2explook(int a){
+  return INVSQ2EXP_LOOKUP[a-INVSQ2EXP_LOOKUP_MIN];
+}
+
+#include <stdio.h>
+/* interpolated lookup based fromdB function, domain -140dB to 0dB only */
+float vorbis_fromdBlook(float a){
+  int i=vorbis_ftoi(a*((float)(-(1<<FROMdB2_SHIFT)))-.5f);
+  return (i<0)?1.f:
+    ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.f:
+     FROMdB_LOOKUP[i>>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]);
+}
+
+#endif
+
+#ifdef INT_LOOKUP
+/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in
+   16.16 format 
+
+   returns in m.8 format */
+long vorbis_invsqlook_i(long a,long e){
+  long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); 
+  long d=(a&INVSQ_LOOKUP_I_MASK)<<(16-INVSQ_LOOKUP_I_SHIFT); /*  0.16 */
+  long val=INVSQ_LOOKUP_I[i]-                                /*  1.16 */
+    (((INVSQ_LOOKUP_I[i]-INVSQ_LOOKUP_I[i+1])*               /*  0.16 */
+      d)>>16);                                               /* result 1.16 */
+  
+  e+=32;
+  if(e&1)val=(val*5792)>>13; /* multiply val by 1/sqrt(2) */
+  e=(e>>1)-8;
+
+  return(val>>e);
+}
+
+/* interpolated lookup based fromdB function, domain -140dB to 0dB only */
+/* a is in n.12 format */
+float vorbis_fromdBlook_i(long a){
+  int i=(-a)>>(12-FROMdB2_SHIFT);
+  return (i<0)?1.f:
+    ((i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))?0.f:
+     FROMdB_LOOKUP[i>>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]);
+}
+
+/* interpolated lookup based cos function, domain 0 to PI only */
+/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */
+long vorbis_coslook_i(long a){
+  int i=a>>COS_LOOKUP_I_SHIFT;
+  int d=a&COS_LOOKUP_I_MASK;
+  return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>>
+			   COS_LOOKUP_I_SHIFT);
+}
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lookup.h
@@ -1,0 +1,32 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: lookup based functions
+  last mod: $Id: lookup.h,v 1.7 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_LOOKUP_H_
+
+#ifdef FLOAT_LOOKUP
+extern float vorbis_coslook(float a);
+extern float vorbis_invsqlook(float a);
+extern float vorbis_invsq2explook(int a);
+extern float vorbis_fromdBlook(float a);
+#endif
+#ifdef INT_LOOKUP
+extern long vorbis_invsqlook_i(long a,long e);
+extern long vorbis_coslook_i(long a);
+extern float vorbis_fromdBlook_i(long a);
+#endif 
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lookup_data.h
@@ -1,0 +1,189 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: lookup data; generated by lookups.pl; edit there
+  last mod: $Id: lookup_data.h,v 1.9 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_LOOKUP_DATA_H_
+
+#ifdef FLOAT_LOOKUP
+#define COS_LOOKUP_SZ 128
+static float COS_LOOKUP[COS_LOOKUP_SZ+1]={
+	+1.0000000000000f,+0.9996988186962f,+0.9987954562052f,+0.9972904566787f,
+	+0.9951847266722f,+0.9924795345987f,+0.9891765099648f,+0.9852776423889f,
+	+0.9807852804032f,+0.9757021300385f,+0.9700312531945f,+0.9637760657954f,
+	+0.9569403357322f,+0.9495281805930f,+0.9415440651830f,+0.9329927988347f,
+	+0.9238795325113f,+0.9142097557035f,+0.9039892931234f,+0.8932243011955f,
+	+0.8819212643484f,+0.8700869911087f,+0.8577286100003f,+0.8448535652497f,
+	+0.8314696123025f,+0.8175848131516f,+0.8032075314806f,+0.7883464276266f,
+	+0.7730104533627f,+0.7572088465065f,+0.7409511253550f,+0.7242470829515f,
+	+0.7071067811865f,+0.6895405447371f,+0.6715589548470f,+0.6531728429538f,
+	+0.6343932841636f,+0.6152315905806f,+0.5956993044924f,+0.5758081914178f,
+	+0.5555702330196f,+0.5349976198871f,+0.5141027441932f,+0.4928981922298f,
+	+0.4713967368260f,+0.4496113296546f,+0.4275550934303f,+0.4052413140050f,
+	+0.3826834323651f,+0.3598950365350f,+0.3368898533922f,+0.3136817403989f,
+	+0.2902846772545f,+0.2667127574749f,+0.2429801799033f,+0.2191012401569f,
+	+0.1950903220161f,+0.1709618887603f,+0.1467304744554f,+0.1224106751992f,
+	+0.0980171403296f,+0.0735645635997f,+0.0490676743274f,+0.0245412285229f,
+	+0.0000000000000f,-0.0245412285229f,-0.0490676743274f,-0.0735645635997f,
+	-0.0980171403296f,-0.1224106751992f,-0.1467304744554f,-0.1709618887603f,
+	-0.1950903220161f,-0.2191012401569f,-0.2429801799033f,-0.2667127574749f,
+	-0.2902846772545f,-0.3136817403989f,-0.3368898533922f,-0.3598950365350f,
+	-0.3826834323651f,-0.4052413140050f,-0.4275550934303f,-0.4496113296546f,
+	-0.4713967368260f,-0.4928981922298f,-0.5141027441932f,-0.5349976198871f,
+	-0.5555702330196f,-0.5758081914178f,-0.5956993044924f,-0.6152315905806f,
+	-0.6343932841636f,-0.6531728429538f,-0.6715589548470f,-0.6895405447371f,
+	-0.7071067811865f,-0.7242470829515f,-0.7409511253550f,-0.7572088465065f,
+	-0.7730104533627f,-0.7883464276266f,-0.8032075314806f,-0.8175848131516f,
+	-0.8314696123025f,-0.8448535652497f,-0.8577286100003f,-0.8700869911087f,
+	-0.8819212643484f,-0.8932243011955f,-0.9039892931234f,-0.9142097557035f,
+	-0.9238795325113f,-0.9329927988347f,-0.9415440651830f,-0.9495281805930f,
+	-0.9569403357322f,-0.9637760657954f,-0.9700312531945f,-0.9757021300385f,
+	-0.9807852804032f,-0.9852776423889f,-0.9891765099648f,-0.9924795345987f,
+	-0.9951847266722f,-0.9972904566787f,-0.9987954562052f,-0.9996988186962f,
+	-1.0000000000000f,
+};
+
+#define INVSQ_LOOKUP_SZ 32
+static float INVSQ_LOOKUP[INVSQ_LOOKUP_SZ+1]={
+	1.414213562373f,1.392621247646f,1.371988681140f,1.352246807566f,
+	1.333333333333f,1.315191898443f,1.297771369046f,1.281025230441f,
+	1.264911064067f,1.249390095109f,1.234426799697f,1.219988562661f,
+	1.206045378311f,1.192569588000f,1.179535649239f,1.166919931983f,
+	1.154700538379f,1.142857142857f,1.131370849898f,1.120224067222f,
+	1.109400392450f,1.098884511590f,1.088662107904f,1.078719779941f,
+	1.069044967650f,1.059625885652f,1.050451462878f,1.041511287847f,
+	1.032795558989f,1.024295039463f,1.016001016002f,1.007905261358f,
+	1.000000000000f,
+};
+
+#define INVSQ2EXP_LOOKUP_MIN -32
+#define INVSQ2EXP_LOOKUP_MAX 32
+static float INVSQ2EXP_LOOKUP[INVSQ2EXP_LOOKUP_MAX-\
+                              INVSQ2EXP_LOOKUP_MIN+1]={
+	         65536.f,    46340.95001f,         32768.f,    23170.47501f,
+	         16384.f,     11585.2375f,          8192.f,    5792.618751f,
+	          4096.f,    2896.309376f,          2048.f,    1448.154688f,
+	          1024.f,    724.0773439f,           512.f,     362.038672f,
+	           256.f,     181.019336f,           128.f,    90.50966799f,
+	            64.f,      45.254834f,            32.f,      22.627417f,
+	            16.f,     11.3137085f,             8.f,    5.656854249f,
+	             4.f,    2.828427125f,             2.f,    1.414213562f,
+	             1.f,   0.7071067812f,            0.5f,   0.3535533906f,
+	           0.25f,   0.1767766953f,          0.125f,  0.08838834765f,
+	         0.0625f,  0.04419417382f,        0.03125f,  0.02209708691f,
+	       0.015625f,  0.01104854346f,      0.0078125f, 0.005524271728f,
+	     0.00390625f, 0.002762135864f,    0.001953125f, 0.001381067932f,
+	   0.0009765625f, 0.000690533966f,  0.00048828125f, 0.000345266983f,
+	 0.000244140625f,0.0001726334915f,0.0001220703125f,8.631674575e-05f,
+	6.103515625e-05f,4.315837288e-05f,3.051757812e-05f,2.157918644e-05f,
+	1.525878906e-05f,
+};
+
+#endif
+
+#define FROMdB_LOOKUP_SZ 35
+#define FROMdB2_LOOKUP_SZ 32
+#define FROMdB_SHIFT 5
+#define FROMdB2_SHIFT 3
+#define FROMdB2_MASK 31
+static float FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={
+	             1.f,   0.6309573445f,   0.3981071706f,   0.2511886432f,
+	   0.1584893192f,            0.1f,  0.06309573445f,  0.03981071706f,
+	  0.02511886432f,  0.01584893192f,           0.01f, 0.006309573445f,
+	 0.003981071706f, 0.002511886432f, 0.001584893192f,          0.001f,
+	0.0006309573445f,0.0003981071706f,0.0002511886432f,0.0001584893192f,
+	         0.0001f,6.309573445e-05f,3.981071706e-05f,2.511886432e-05f,
+	1.584893192e-05f,          1e-05f,6.309573445e-06f,3.981071706e-06f,
+	2.511886432e-06f,1.584893192e-06f,          1e-06f,6.309573445e-07f,
+	3.981071706e-07f,2.511886432e-07f,1.584893192e-07f,
+};
+
+static float FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={
+	   0.9928302478f,   0.9786445908f,   0.9646616199f,   0.9508784391f,
+	   0.9372921937f,     0.92390007f,   0.9106992942f,   0.8976871324f,
+	   0.8848608897f,   0.8722179097f,   0.8597555737f,   0.8474713009f,
+	    0.835362547f,   0.8234268041f,   0.8116616003f,   0.8000644989f,
+	   0.7886330981f,   0.7773650302f,   0.7662579617f,    0.755309592f,
+	   0.7445176537f,   0.7338799116f,   0.7233941627f,   0.7130582353f,
+	   0.7028699885f,   0.6928273125f,   0.6829281272f,   0.6731703824f,
+	   0.6635520573f,   0.6540711597f,   0.6447257262f,   0.6355138211f,
+};
+
+#ifdef INT_LOOKUP
+
+#define INVSQ_LOOKUP_I_SHIFT 10
+#define INVSQ_LOOKUP_I_MASK 1023
+static long INVSQ_LOOKUP_I[64+1]={
+	   92682l,   91966l,   91267l,   90583l,
+	   89915l,   89261l,   88621l,   87995l,
+	   87381l,   86781l,   86192l,   85616l,
+	   85051l,   84497l,   83953l,   83420l,
+	   82897l,   82384l,   81880l,   81385l,
+	   80899l,   80422l,   79953l,   79492l,
+	   79039l,   78594l,   78156l,   77726l,
+	   77302l,   76885l,   76475l,   76072l,
+	   75674l,   75283l,   74898l,   74519l,
+	   74146l,   73778l,   73415l,   73058l,
+	   72706l,   72359l,   72016l,   71679l,
+	   71347l,   71019l,   70695l,   70376l,
+	   70061l,   69750l,   69444l,   69141l,
+	   68842l,   68548l,   68256l,   67969l,
+	   67685l,   67405l,   67128l,   66855l,
+	   66585l,   66318l,   66054l,   65794l,
+	   65536l,
+};
+
+#define COS_LOOKUP_I_SHIFT 9
+#define COS_LOOKUP_I_MASK 511
+#define COS_LOOKUP_I_SZ 128
+static long COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
+	   16384l,   16379l,   16364l,   16340l,
+	   16305l,   16261l,   16207l,   16143l,
+	   16069l,   15986l,   15893l,   15791l,
+	   15679l,   15557l,   15426l,   15286l,
+	   15137l,   14978l,   14811l,   14635l,
+	   14449l,   14256l,   14053l,   13842l,
+	   13623l,   13395l,   13160l,   12916l,
+	   12665l,   12406l,   12140l,   11866l,
+	   11585l,   11297l,   11003l,   10702l,
+	   10394l,   10080l,    9760l,    9434l,
+	    9102l,    8765l,    8423l,    8076l,
+	    7723l,    7366l,    7005l,    6639l,
+	    6270l,    5897l,    5520l,    5139l,
+	    4756l,    4370l,    3981l,    3590l,
+	    3196l,    2801l,    2404l,    2006l,
+	    1606l,    1205l,     804l,     402l,
+	       0l,    -401l,    -803l,   -1204l,
+	   -1605l,   -2005l,   -2403l,   -2800l,
+	   -3195l,   -3589l,   -3980l,   -4369l,
+	   -4755l,   -5138l,   -5519l,   -5896l,
+	   -6269l,   -6638l,   -7004l,   -7365l,
+	   -7722l,   -8075l,   -8422l,   -8764l,
+	   -9101l,   -9433l,   -9759l,  -10079l,
+	  -10393l,  -10701l,  -11002l,  -11296l,
+	  -11584l,  -11865l,  -12139l,  -12405l,
+	  -12664l,  -12915l,  -13159l,  -13394l,
+	  -13622l,  -13841l,  -14052l,  -14255l,
+	  -14448l,  -14634l,  -14810l,  -14977l,
+	  -15136l,  -15285l,  -15425l,  -15556l,
+	  -15678l,  -15790l,  -15892l,  -15985l,
+	  -16068l,  -16142l,  -16206l,  -16260l,
+	  -16304l,  -16339l,  -16363l,  -16378l,
+	  -16383l,
+};
+
+#endif
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lookups.pl
@@ -1,0 +1,142 @@
+#!/usr/bin/perl
+print <<'EOD';
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: lookup data; generated by lookups.pl; edit there
+  last mod: $Id: lookups.pl,v 1.7 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_LOOKUP_DATA_H_
+
+#ifdef FLOAT_LOOKUP
+EOD
+
+$cos_sz=128;
+$invsq_sz=32;
+$invsq2exp_min=-32;
+$invsq2exp_max=32;
+
+$fromdB_sz=35;
+$fromdB_shift=5;
+$fromdB2_shift=3;
+
+$invsq_i_shift=10;
+$cos_i_shift=9;
+$delta_shift=6;
+
+print "#define COS_LOOKUP_SZ $cos_sz\n";
+print "static float COS_LOOKUP[COS_LOOKUP_SZ+1]={\n";
+
+for($i=0;$i<=$cos_sz;){
+    print "\t";
+    for($j=0;$j<4 && $i<=$cos_sz;$j++){
+	printf "%+.13f,", cos(3.14159265358979323846*($i++)/$cos_sz) ;
+    }
+    print "\n";
+}
+print "};\n\n";
+
+print "#define INVSQ_LOOKUP_SZ $invsq_sz\n";
+print "static float INVSQ_LOOKUP[INVSQ_LOOKUP_SZ+1]={\n";
+
+for($i=0;$i<=$invsq_sz;){
+    print "\t";
+    for($j=0;$j<4 && $i<=$invsq_sz;$j++){
+	my$indexmap=$i++/$invsq_sz*.5+.5;
+	printf "%.12f,", 1./sqrt($indexmap);
+    }
+    print "\n";
+}
+print "};\n\n";
+
+print "#define INVSQ2EXP_LOOKUP_MIN $invsq2exp_min\n";
+print "#define INVSQ2EXP_LOOKUP_MAX $invsq2exp_max\n";
+print "static float INVSQ2EXP_LOOKUP[INVSQ2EXP_LOOKUP_MAX-\\\n".
+      "                              INVSQ2EXP_LOOKUP_MIN+1]={\n";
+
+for($i=$invsq2exp_min;$i<=$invsq2exp_max;){
+    print "\t";
+    for($j=0;$j<4 && $i<=$invsq2exp_max;$j++){
+	printf "%15.10g,", 2**($i++*-.5);
+    }
+    print "\n";
+}
+print "};\n\n#endif\n\n";
+
+
+# 0 to -140 dB
+$fromdB2_sz=1<<$fromdB_shift;
+$fromdB_gran=1<<($fromdB_shift-$fromdB2_shift);
+print "#define FROMdB_LOOKUP_SZ $fromdB_sz\n";
+print "#define FROMdB2_LOOKUP_SZ $fromdB2_sz\n";
+print "#define FROMdB_SHIFT $fromdB_shift\n";
+print "#define FROMdB2_SHIFT $fromdB2_shift\n";
+print "#define FROMdB2_MASK ".((1<<$fromdB_shift)-1)."\n";
+
+print "static float FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={\n";
+
+for($i=0;$i<$fromdB_sz;){
+    print "\t";
+    for($j=0;$j<4 && $i<$fromdB_sz;$j++){
+	printf "%15.10g,", 10**(.05*(-$fromdB_gran*$i++));
+    }
+    print "\n";
+}
+print "};\n\n";
+
+print "static float FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={\n";
+
+for($i=0;$i<$fromdB2_sz;){
+    print "\t";
+    for($j=0;$j<4 && $i<$fromdB_sz;$j++){
+	printf "%15.10g,", 10**(.05*(-$fromdB_gran/$fromdB2_sz*(.5+$i++)));
+    }
+    print "\n";
+}
+print "};\n\n#ifdef INT_LOOKUP\n\n";
+
+
+$iisz=0x10000>>$invsq_i_shift;
+print "#define INVSQ_LOOKUP_I_SHIFT $invsq_i_shift\n";
+print "#define INVSQ_LOOKUP_I_MASK ".(0x0ffff>>(16-$invsq_i_shift))."\n";
+print "static long INVSQ_LOOKUP_I[$iisz+1]={\n";
+for($i=0;$i<=$iisz;){
+    print "\t";
+    for($j=0;$j<4 && $i<=$iisz;$j++){
+	my$indexmap=$i++/$iisz*.5+.5;
+	printf "%8d,", int(1./sqrt($indexmap)*65536.+.5);
+    }
+    print "\n";
+}
+print "};\n\n";
+
+$cisz=0x10000>>$cos_i_shift;
+print "#define COS_LOOKUP_I_SHIFT $cos_i_shift\n";
+print "#define COS_LOOKUP_I_MASK ".(0x0ffff>>(16-$cos_i_shift))."\n";
+print "#define COS_LOOKUP_I_SZ $cisz\n";
+print "static long COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={\n";
+
+for($i=0;$i<=$cisz;){
+    print "\t";
+    for($j=0;$j<4 && $i<=$cisz;$j++){
+	printf "%8d,", int(cos(3.14159265358979323846*($i++)/$cos_sz)*16384.+.5) ;
+    }
+    print "\n";
+}
+print "};\n\n";
+
+
+print "#endif\n\n#endif\n";
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lpc.c
@@ -1,0 +1,200 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: LPC low level routines
+  last mod: $Id: lpc.c,v 1.35 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+/* Some of these routines (autocorrelator, LPC coefficient estimator)
+   are derived from code written by Jutta Degener and Carsten Bormann;
+   thus we include their copyright below.  The entirety of this file
+   is freely redistributable on the condition that both of these
+   copyright notices are preserved without modification.  */
+
+/* Preserved Copyright: *********************************************/
+
+/* Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
+Technische Universita"t Berlin
+
+Any use of this software is permitted provided that this notice is not
+removed and that neither the authors nor the Technische Universita"t
+Berlin are deemed to have made any representations as to the
+suitability of this software for any purpose nor are held responsible
+for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR
+THIS SOFTWARE.
+
+As a matter of courtesy, the authors request to be informed about uses
+this software has found, about bugs in this software, and about any
+improvements that may be of general interest.
+
+Berlin, 28.11.1994
+Jutta Degener
+Carsten Bormann
+
+*********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "os.h"
+#include "smallft.h"
+#include "lpc.h"
+#include "scales.h"
+#include "misc.h"
+
+/* Autocorrelation LPC coeff generation algorithm invented by
+   N. Levinson in 1947, modified by J. Durbin in 1959. */
+
+/* Input : n elements of time doamin data
+   Output: m lpc coefficients, excitation energy */
+
+float vorbis_lpc_from_data(float *data,float *lpc,int n,int m){
+  float *aut=malloc(sizeof(*aut)*(m+1));
+  float error;
+  int i,j;
+
+  /* autocorrelation, p+1 lag coefficients */
+
+  j=m+1;
+  while(j--){
+    double d=0; /* double needed for accumulator depth */
+    for(i=j;i<n;i++)d+=data[i]*data[i-j];
+    aut[j]=d;
+  }
+  
+  /* Generate lpc coefficients from autocorr values */
+
+  error=aut[0];
+  
+  for(i=0;i<m;i++){
+    float r= -aut[i+1];
+
+    if(error==0){
+      memset(lpc,0,m*sizeof(*lpc));
+      free(aut);
+      return 0;
+    }
+
+    /* Sum up this iteration's reflection coefficient; note that in
+       Vorbis we don't save it.  If anyone wants to recycle this code
+       and needs reflection coefficients, save the results of 'r' from
+       each iteration. */
+
+    for(j=0;j<i;j++)r-=lpc[j]*aut[i-j];
+    r/=error; 
+
+    /* Update LPC coefficients and total error */
+    
+    lpc[i]=r;
+    for(j=0;j<i/2;j++){
+      float tmp=lpc[j];
+      lpc[j]+=r*lpc[i-1-j];
+      lpc[i-1-j]+=r*tmp;
+    }
+    if(i%2)lpc[j]+=lpc[j]*r;
+    
+    error*=1.f-r*r;
+  }
+  
+  /* we need the error value to know how big an impulse to hit the
+     filter with later */
+  free(aut);
+  return error;
+}
+
+/* Input : n element envelope spectral curve
+   Output: m lpc coefficients, excitation energy */
+
+float vorbis_lpc_from_curve(float *curve,float *lpc,lpc_lookup *l){
+  int n=l->ln;
+  int m=l->m;
+  float *work=malloc(sizeof(*work)*(n+n));
+  float fscale=.5f/n;
+  float tmp;
+  int i,j;
+  
+  /* input is a real curve. make it complex-real */
+  /* This mixes phase, but the LPC generation doesn't care. */
+  for(i=0;i<n;i++){
+    work[i*2]=curve[i]*fscale;
+    work[i*2+1]=0;
+  }
+  work[n*2-1]=curve[n-1]*fscale;
+  
+  n*=2;
+  drft_backward(&l->fft,work);
+
+  /* The autocorrelation will not be circular.  Shift, else we lose
+     most of the power in the edges. */
+  
+  for(i=0,j=n/2;i<n/2;){
+    float temp=work[i];
+    work[i++]=work[j];
+    work[j++]=temp;
+  }
+  
+  /* we *could* shave speed here by skimping on the edges (thus
+     speeding up the autocorrelation in vorbis_lpc_from_data) but we
+     don't right now. */
+  tmp = vorbis_lpc_from_data(work,lpc,n,m);
+  free(work);
+  return(tmp);
+}
+
+void lpc_init(lpc_lookup *l,long mapped, int m){
+  memset(l,0,sizeof(*l));
+
+  l->ln=mapped;
+  l->m=m;
+
+  /* we cheat decoding the LPC spectrum via FFTs */  
+  drft_init(&l->fft,mapped*2);
+
+}
+
+void lpc_clear(lpc_lookup *l){
+  if(l){
+    drft_clear(&l->fft);
+  }
+}
+
+void vorbis_lpc_predict(float *coeff,float *prime,int m,
+                     float *data,long n){
+
+  /* in: coeff[0...m-1] LPC coefficients 
+         prime[0...m-1] initial values (allocated size of n+m-1)
+    out: data[0...n-1] data samples */
+
+  long i,j,o,p;
+  float y;
+  float *work=malloc(sizeof(*work)*(m+n));
+
+  if(!prime)
+    for(i=0;i<m;i++)
+      work[i]=0.f;
+  else
+    for(i=0;i<m;i++)
+      work[i]=prime[i];
+
+  for(i=0;i<n;i++){
+    y=0;
+    o=i;
+    p=m;
+    for(j=0;j<m;j++)
+      y-=work[o++]*coeff[--p];
+    
+    data[i]=work[o]=y;
+  }
+  free(work);
+  return;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lpc.h
@@ -1,0 +1,43 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: LPC low level routines
+  last mod: $Id: lpc.h,v 1.19 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_LPC_H_
+#define _V_LPC_H_
+
+#include "vorbis/codec.h"
+#include "smallft.h"
+
+typedef struct lpclook{
+  /* en/decode lookups */
+  drft_lookup fft;
+
+  int ln;
+  int m;
+
+} lpc_lookup;
+
+extern void lpc_init(lpc_lookup *l,long mapped, int m);
+extern void lpc_clear(lpc_lookup *l);
+
+/* simple linear scale LPC code */
+extern float vorbis_lpc_from_data(float *data,float *lpc,int n,int m);
+extern float vorbis_lpc_from_curve(float *curve,float *lpc,lpc_lookup *l);
+
+extern void vorbis_lpc_predict(float *coeff,float *prime,int m,
+			       float *data,long n);
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lsp.c
@@ -1,0 +1,467 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: LSP (also called LSF) conversion routines
+  last mod: $Id: lsp.c,v 1.22 2002/07/17 21:28:37 xiphmont Exp $
+
+  The LSP generation code is taken (with minimal modification and a
+  few bugfixes) from "On the Computation of the LSP Frequencies" by
+  Joseph Rothweiler <[email protected]>, available at:
+  
+  http://www2.xtdl.com/~rothwlr/lsfpaper/lsfpage.html 
+
+ ********************************************************************/
+
+/* Note that the lpc-lsp conversion finds the roots of polynomial with
+   an iterative root polisher (CACM algorithm 283).  It *is* possible
+   to confuse this algorithm into not converging; that should only
+   happen with absurdly closely spaced roots (very sharp peaks in the
+   LPC f response) which in turn should be impossible in our use of
+   the code.  If this *does* happen anyway, it's a bug in the floor
+   finder; find the cause of the confusion (probably a single bin
+   spike or accidental near-float-limit resolution problems) and
+   correct it. */
+
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include "lsp.h"
+#include "os.h"
+#include "misc.h"
+#include "lookup.h"
+#include "scales.h"
+
+/* three possible LSP to f curve functions; the exact computation
+   (float), a lookup based float implementation, and an integer
+   implementation.  The float lookup is likely the optimal choice on
+   any machine with an FPU.  The integer implementation is *not* fixed
+   point (due to the need for a large dynamic range and thus a
+   seperately tracked exponent) and thus much more complex than the
+   relatively simple float implementations. It's mostly for future
+   work on a fully fixed point implementation for processors like the
+   ARM family. */
+
+/* undefine both for the 'old' but more precise implementation */
+#define   FLOAT_LOOKUP
+#undef    INT_LOOKUP
+
+#ifdef FLOAT_LOOKUP
+#include "lookup.c" /* catch this in the build system; we #include for
+                       compilers (like gcc) that can't inline across
+                       modules */
+
+/* side effect: changes *lsp to cosines of lsp */
+void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m,
+			    float amp,float ampoffset){
+  int i;
+  float wdel=M_PI/ln;
+  vorbis_fpu_control fpu;
+  
+  vorbis_fpu_setround(&fpu);
+  for(i=0;i<m;i++)lsp[i]=vorbis_coslook(lsp[i]);
+
+  i=0;
+  while(i<n){
+    int k=map[i];
+    int qexp;
+    float p=.7071067812f;
+    float q=.7071067812f;
+    float w=vorbis_coslook(wdel*k);
+    float *ftmp=lsp;
+    int c=m>>1;
+
+    do{
+      q*=ftmp[0]-w;
+      p*=ftmp[1]-w;
+      ftmp+=2;
+    }while(--c);
+
+    if(m&1){
+      /* odd order filter; slightly assymetric */
+      /* the last coefficient */
+      q*=ftmp[0]-w;
+      q*=q;
+      p*=p*(1.f-w*w);
+    }else{
+      /* even order filter; still symmetric */
+      q*=q*(1.f+w);
+      p*=p*(1.f-w);
+    }
+
+    q=frexp(p+q,&qexp);
+    q=vorbis_fromdBlook(amp*             
+			vorbis_invsqlook(q)*
+			vorbis_invsq2explook(qexp+m)- 
+			ampoffset);
+
+    do{
+      curve[i++]*=q;
+    }while(map[i]==k);
+  }
+  vorbis_fpu_restore(fpu);
+}
+
+#else
+
+#ifdef INT_LOOKUP
+#include "lookup.c" /* catch this in the build system; we #include for
+                       compilers (like gcc) that can't inline across
+                       modules */
+
+static int MLOOP_1[64]={
+   0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13,
+  14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14,
+  15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+  15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
+};
+
+static int MLOOP_2[64]={
+  0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7,
+  8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8,
+  9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
+  9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
+};
+
+static int MLOOP_3[8]={0,1,2,2,3,3,3,3};
+
+
+/* side effect: changes *lsp to cosines of lsp */
+void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m,
+			    float amp,float ampoffset){
+
+  /* 0 <= m < 256 */
+
+  /* set up for using all int later */
+  int i;
+  int ampoffseti=rint(ampoffset*4096.f);
+  int ampi=rint(amp*16.f);
+  long *ilsp=alloca(m*sizeof(*ilsp));
+  for(i=0;i<m;i++)ilsp[i]=vorbis_coslook_i(lsp[i]/M_PI*65536.f+.5f);
+
+  i=0;
+  while(i<n){
+    int j,k=map[i];
+    unsigned long pi=46341; /* 2**-.5 in 0.16 */
+    unsigned long qi=46341;
+    int qexp=0,shift;
+    long wi=vorbis_coslook_i(k*65536/ln);
+
+    qi*=labs(ilsp[0]-wi);
+    pi*=labs(ilsp[1]-wi);
+
+    for(j=3;j<m;j+=2){
+      if(!(shift=MLOOP_1[(pi|qi)>>25]))
+	if(!(shift=MLOOP_2[(pi|qi)>>19]))
+	  shift=MLOOP_3[(pi|qi)>>16];
+      qi=(qi>>shift)*labs(ilsp[j-1]-wi);
+      pi=(pi>>shift)*labs(ilsp[j]-wi);
+      qexp+=shift;
+    }
+    if(!(shift=MLOOP_1[(pi|qi)>>25]))
+      if(!(shift=MLOOP_2[(pi|qi)>>19]))
+	shift=MLOOP_3[(pi|qi)>>16];
+
+    /* pi,qi normalized collectively, both tracked using qexp */
+
+    if(m&1){
+      /* odd order filter; slightly assymetric */
+      /* the last coefficient */
+      qi=(qi>>shift)*labs(ilsp[j-1]-wi);
+      pi=(pi>>shift)<<14;
+      qexp+=shift;
+
+      if(!(shift=MLOOP_1[(pi|qi)>>25]))
+	if(!(shift=MLOOP_2[(pi|qi)>>19]))
+	  shift=MLOOP_3[(pi|qi)>>16];
+      
+      pi>>=shift;
+      qi>>=shift;
+      qexp+=shift-14*((m+1)>>1);
+
+      pi=((pi*pi)>>16);
+      qi=((qi*qi)>>16);
+      qexp=qexp*2+m;
+
+      pi*=(1<<14)-((wi*wi)>>14);
+      qi+=pi>>14;
+
+    }else{
+      /* even order filter; still symmetric */
+
+      /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't
+	 worth tracking step by step */
+      
+      pi>>=shift;
+      qi>>=shift;
+      qexp+=shift-7*m;
+
+      pi=((pi*pi)>>16);
+      qi=((qi*qi)>>16);
+      qexp=qexp*2+m;
+      
+      pi*=(1<<14)-wi;
+      qi*=(1<<14)+wi;
+      qi=(qi+pi)>>14;
+      
+    }
+    
+
+    /* we've let the normalization drift because it wasn't important;
+       however, for the lookup, things must be normalized again.  We
+       need at most one right shift or a number of left shifts */
+
+    if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */
+      qi>>=1; qexp++; 
+    }else
+      while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/
+	qi<<=1; qexp--; 
+      }
+
+    amp=vorbis_fromdBlook_i(ampi*                     /*  n.4         */
+			    vorbis_invsqlook_i(qi,qexp)- 
+			                              /*  m.8, m+n<=8 */
+			    ampoffseti);              /*  8.12[0]     */
+
+    curve[i]*=amp;
+    while(map[++i]==k)curve[i]*=amp;
+  }
+}
+
+#else 
+
+/* old, nonoptimized but simple version for any poor sap who needs to
+   figure out what the hell this code does, or wants the other
+   fraction of a dB precision */
+
+/* side effect: changes *lsp to cosines of lsp */
+void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m,
+			    float amp,float ampoffset){
+  int i;
+  float wdel=M_PI/ln;
+  for(i=0;i<m;i++)lsp[i]=2.f*cos(lsp[i]);
+
+  i=0;
+  while(i<n){
+    int j,k=map[i];
+    float p=.5f;
+    float q=.5f;
+    float w=2.f*cos(wdel*k);
+    for(j=1;j<m;j+=2){
+      q *= w-lsp[j-1];
+      p *= w-lsp[j];
+    }
+    if(j==m){
+      /* odd order filter; slightly assymetric */
+      /* the last coefficient */
+      q*=w-lsp[j-1];
+      p*=p*(4.f-w*w);
+      q*=q;
+    }else{
+      /* even order filter; still symmetric */
+      p*=p*(2.f-w);
+      q*=q*(2.f+w);
+    }
+
+    q=fromdB(amp/sqrt(p+q)-ampoffset);
+
+    curve[i]*=q;
+    while(map[++i]==k)curve[i]*=q;
+  }
+}
+
+#endif
+#endif
+
+static void cheby(float *g, int ord) {
+  int i, j;
+
+  g[0] *= .5f;
+  for(i=2; i<= ord; i++) {
+    for(j=ord; j >= i; j--) {
+      g[j-2] -= g[j];
+      g[j] += g[j]; 
+    }
+  }
+}
+
+static int comp(const void *a,const void *b){
+  if(*(float *)a<*(float *)b)
+    return(1);
+  else
+    return(-1);
+}
+
+/* Newton-Raphson-Maehly actually functioned as a decent root finder,
+   but there are root sets for which it gets into limit cycles
+   (exacerbated by zero suppression) and fails.  We can't afford to
+   fail, even if the failure is 1 in 100,000,000, so we now use
+   Laguerre and later polish with Newton-Raphson (which can then
+   afford to fail) */
+
+#define EPSILON 10e-7
+static int Laguerre_With_Deflation(float *a,int ord,float *r){
+  int i,m;
+  double lastdelta=0.f;
+  double *defl=malloc(sizeof(*defl)*(ord+1));
+  for(i=0;i<=ord;i++)defl[i]=a[i];
+
+  for(m=ord;m>0;m--){
+    double new=0.f,delta;
+
+    /* iterate a root */
+    while(1){
+      double p=defl[m],pp=0.f,ppp=0.f,denom;
+      
+      /* eval the polynomial and its first two derivatives */
+      for(i=m;i>0;i--){
+	ppp = new*ppp + pp;
+	pp  = new*pp  + p;
+	p   = new*p   + defl[i-1];
+      }
+      
+      /* Laguerre's method */
+      denom=(m-1) * ((m-1)*pp*pp - m*p*ppp);
+      if(denom<0) {
+         free(defl);
+	return(-1);  /* complex root!  The LPC generator handed us a bad filter */
+      }
+
+      if(pp>0){
+	denom = pp + sqrt(denom);
+	if(denom<EPSILON)denom=EPSILON;
+      }else{
+	denom = pp - sqrt(denom);
+	if(denom>-(EPSILON))denom=-(EPSILON);
+      }
+
+      delta  = m*p/denom;
+      new   -= delta;
+
+      if(delta<0.f)delta*=-1;
+
+      if(fabs(delta/new)<10e-12)break; 
+      lastdelta=delta;
+    }
+
+    r[m-1]=new;
+
+    /* forward deflation */
+    
+    for(i=m;i>0;i--)
+      defl[i-1]+=new*defl[i];
+    defl++;
+
+  }
+  free(defl);
+  return(0);
+}
+
+
+/* for spit-and-polish only */
+static int Newton_Raphson(float *a,int ord,float *r){
+  int i, k, count=0;
+  double error=1.f;
+  double *root=malloc(ord*sizeof(*root));
+
+  for(i=0; i<ord;i++) root[i] = r[i];
+  
+  while(error>1e-20){
+    error=0;
+    
+    for(i=0; i<ord; i++) { /* Update each point. */
+      double pp=0.,delta;
+      double rooti=root[i];
+      double p=a[ord];
+      for(k=ord-1; k>= 0; k--) {
+
+	pp= pp* rooti + p;
+	p = p * rooti + a[k];
+      }
+
+      delta = p/pp;
+      root[i] -= delta;
+      error+= delta*delta;
+    }
+    
+    if(count>40) {
+        free(root);
+        return(-1);
+    }
+    count++;
+  }
+
+  /* Replaced the original bubble sort with a real sort.  With your
+     help, we can eliminate the bubble sort in our lifetime. --Monty */
+
+  for(i=0; i<ord;i++) r[i] = root[i];
+  free(root);
+  return(0);
+}
+
+
+/* Convert lpc coefficients to lsp coefficients */
+int vorbis_lpc_to_lsp(float *lpc,float *lsp,int m){
+  int order2=(m+1)>>1;
+  int g1_order,g2_order;
+  float *g1=malloc(sizeof(*g1)*(order2+1));
+  float *g2=malloc(sizeof(*g2)*(order2+1));
+  float *g1r=malloc(sizeof(*g1r)*(order2+1));
+  float *g2r=malloc(sizeof(*g2r)*(order2+1));
+  int i;
+
+  /* even and odd are slightly different base cases */
+  g1_order=(m+1)>>1;
+  g2_order=(m)  >>1;
+
+  /* Compute the lengths of the x polynomials. */
+  /* Compute the first half of K & R F1 & F2 polynomials. */
+  /* Compute half of the symmetric and antisymmetric polynomials. */
+  /* Remove the roots at +1 and -1. */
+  
+  g1[g1_order] = 1.f;
+  for(i=1;i<=g1_order;i++) g1[g1_order-i] = lpc[i-1]+lpc[m-i];
+  g2[g2_order] = 1.f;
+  for(i=1;i<=g2_order;i++) g2[g2_order-i] = lpc[i-1]-lpc[m-i];
+  
+  if(g1_order>g2_order){
+    for(i=2; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+2];
+  }else{
+    for(i=1; i<=g1_order;i++) g1[g1_order-i] -= g1[g1_order-i+1];
+    for(i=1; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+1];
+  }
+
+  /* Convert into polynomials in cos(alpha) */
+  cheby(g1,g1_order);
+  cheby(g2,g2_order);
+
+  /* Find the roots of the 2 even polynomials.*/
+  if(Laguerre_With_Deflation(g1,g1_order,g1r) ||
+     Laguerre_With_Deflation(g2,g2_order,g2r)) {
+    free(g1); free(g2); free(g1r); free(g2r);
+    return(-1);
+  }
+  Newton_Raphson(g1,g1_order,g1r); /* if it fails, it leaves g1r alone */
+  Newton_Raphson(g2,g2_order,g2r); /* if it fails, it leaves g2r alone */
+
+  qsort(g1r,g1_order,sizeof(*g1r),comp);
+  qsort(g2r,g2_order,sizeof(*g2r),comp);
+
+  for(i=0;i<g1_order;i++)
+    lsp[i*2] = acos(g1r[i]);
+
+  for(i=0;i<g2_order;i++)
+    lsp[i*2+1] = acos(g2r[i]);
+
+  free(g1); free(g2); free(g1r); free(g2r);
+
+  return(0);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/lsp.h
@@ -1,0 +1,28 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+  function: LSP (also called LSF) conversion routines
+  last mod: $Id: lsp.h,v 1.11 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+
+#ifndef _V_LSP_H_
+#define _V_LSP_H_
+
+extern int vorbis_lpc_to_lsp(float *lpc,float *lsp,int m);
+
+extern void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,
+				float *lsp,int m,
+				float amp,float ampoffset);
+  
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/mapping0.c
@@ -1,0 +1,786 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: channel mapping 0 implementation
+ last mod: $Id: mapping0.c,v 1.53 2002/07/13 06:12:46 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "codebook.h"
+#include "window.h"
+#include "registry.h"
+#include "psy.h"
+#include "misc.h"
+
+/* simplistic, wasteful way of doing this (unique lookup for each
+   mode/submapping); there should be a central repository for
+   identical lookups.  That will require minor work, so I'm putting it
+   off as low priority.
+
+   Why a lookup for each backend in a given mode?  Because the
+   blocksize is set by the mode, and low backend lookups may require
+   parameters from other areas of the mode/mapping */
+
+static void mapping0_free_info(vorbis_info_mapping *i){
+  vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)i;
+  if(info){
+    memset(info,0,sizeof(*info));
+    _ogg_free(info);
+  }
+}
+
+static int ilog(unsigned int v){
+  int ret=0;
+  if(v)--v;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+static void mapping0_pack(vorbis_info *vi,vorbis_info_mapping *vm,
+			  oggpack_buffer *opb){
+  int i;
+  vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)vm;
+
+  /* another 'we meant to do it this way' hack...  up to beta 4, we
+     packed 4 binary zeros here to signify one submapping in use.  We
+     now redefine that to mean four bitflags that indicate use of
+     deeper features; bit0:submappings, bit1:coupling,
+     bit2,3:reserved. This is backward compatable with all actual uses
+     of the beta code. */
+
+  if(info->submaps>1){
+    oggpack_write(opb,1,1);
+    oggpack_write(opb,info->submaps-1,4);
+  }else
+    oggpack_write(opb,0,1);
+
+  if(info->coupling_steps>0){
+    oggpack_write(opb,1,1);
+    oggpack_write(opb,info->coupling_steps-1,8);
+    
+    for(i=0;i<info->coupling_steps;i++){
+      oggpack_write(opb,info->coupling_mag[i],ilog(vi->channels));
+      oggpack_write(opb,info->coupling_ang[i],ilog(vi->channels));
+    }
+  }else
+    oggpack_write(opb,0,1);
+  
+  oggpack_write(opb,0,2); /* 2,3:reserved */
+
+  /* we don't write the channel submappings if we only have one... */
+  if(info->submaps>1){
+    for(i=0;i<vi->channels;i++)
+      oggpack_write(opb,info->chmuxlist[i],4);
+  }
+  for(i=0;i<info->submaps;i++){
+    oggpack_write(opb,0,8); /* time submap unused */
+    oggpack_write(opb,info->floorsubmap[i],8);
+    oggpack_write(opb,info->residuesubmap[i],8);
+  }
+}
+
+/* also responsible for range checking */
+static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb){
+  int i;
+  vorbis_info_mapping0 *info=_ogg_calloc(1,sizeof(*info));
+  codec_setup_info     *ci=vi->codec_setup;
+  memset(info,0,sizeof(*info));
+
+  if(oggpack_read(opb,1))
+    info->submaps=oggpack_read(opb,4)+1;
+  else
+    info->submaps=1;
+
+  if(oggpack_read(opb,1)){
+    info->coupling_steps=oggpack_read(opb,8)+1;
+
+    for(i=0;i<info->coupling_steps;i++){
+      int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels));
+      int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels));
+
+      if(testM<0 || 
+	 testA<0 || 
+	 testM==testA || 
+	 testM>=vi->channels ||
+	 testA>=vi->channels) goto err_out;
+    }
+
+  }
+
+  if(oggpack_read(opb,2)>0)goto err_out; /* 2,3:reserved */
+    
+  if(info->submaps>1){
+    for(i=0;i<vi->channels;i++){
+      info->chmuxlist[i]=oggpack_read(opb,4);
+      if(info->chmuxlist[i]>=info->submaps)goto err_out;
+    }
+  }
+  for(i=0;i<info->submaps;i++){
+    oggpack_read(opb,8); /* time submap unused */
+    info->floorsubmap[i]=oggpack_read(opb,8);
+    if(info->floorsubmap[i]>=ci->floors)goto err_out;
+    info->residuesubmap[i]=oggpack_read(opb,8);
+    if(info->residuesubmap[i]>=ci->residues)goto err_out;
+  }
+
+  return info;
+
+ err_out:
+  mapping0_free_info(info);
+  return(NULL);
+}
+
+#include "os.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "envelope.h"
+#include "mdct.h"
+#include "psy.h"
+#include "scales.h"
+
+#if 0
+static long seq=0;
+static ogg_int64_t total=0;
+static float FLOOR1_fromdB_LOOKUP[256]={
+  1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, 
+  1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, 
+  1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, 
+  2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, 
+  2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, 
+  3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, 
+  4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, 
+  6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, 
+  7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, 
+  1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, 
+  1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, 
+  1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, 
+  2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, 
+  2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, 
+  3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, 
+  4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, 
+  5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, 
+  7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, 
+  9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, 
+  1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, 
+  1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, 
+  2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, 
+  2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, 
+  3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, 
+  4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, 
+  5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, 
+  7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, 
+  9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, 
+  0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, 
+  0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, 
+  0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, 
+  0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, 
+  0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, 
+  0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, 
+  0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, 
+  0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, 
+  0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, 
+  0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 
+  0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 
+  0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 
+  0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, 
+  0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, 
+  0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, 
+  0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, 
+  0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, 
+  0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, 
+  0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 
+  0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, 
+  0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, 
+  0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, 
+  0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, 
+  0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, 
+  0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, 
+  0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, 
+  0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, 
+  0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 
+  0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, 
+  0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, 
+  0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, 
+  0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, 
+  0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, 
+  0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, 
+  0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, 
+  0.82788260F, 0.88168307F, 0.9389798F, 1.F, 
+};
+
+#endif 
+
+extern int *floor1_fit(vorbis_block *vb,vorbis_look_floor *look,
+		       const float *logmdct,   /* in */
+		       const float *logmask);
+extern int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor *look,
+				   int *A,int *B,
+				   int del);
+extern int floor1_encode(vorbis_block *vb,vorbis_look_floor *look,
+			 int *post,int *ilogmask);
+
+
+static int mapping0_forward(vorbis_block *vb){
+  vorbis_dsp_state      *vd=vb->vd;
+  vorbis_info           *vi=vd->vi;
+  codec_setup_info      *ci=vi->codec_setup;
+  backend_lookup_state  *b=vb->vd->backend_state;
+  vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal;
+  int                    n=vb->pcmend;
+  int i,j,k;
+
+  int    *nonzero    = malloc(sizeof(*nonzero)*vi->channels);
+  float *local_ampmax=malloc(sizeof(*local_ampmax)*vi->channels);
+
+  float  **gmdct     = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct));
+  int    **ilogmaskch= _vorbis_block_alloc(vb,vi->channels*sizeof(*ilogmaskch));
+  int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts));
+  
+  float global_ampmax=vbi->ampmax;
+  int blocktype=vbi->blocktype;
+
+  int modenumber=vb->W;
+  vorbis_info_mapping0 *info=ci->map_param[modenumber];
+  vorbis_look_psy *psy_look=
+    b->psy+blocktype+(vb->W?2:0);
+
+  vb->mode=modenumber;
+
+  for(i=0;i<vi->channels;i++){
+    float scale=4.f/n;
+    float scale_dB;
+
+    float *pcm     =vb->pcm[i]; 
+    float *logfft  =pcm;
+
+    gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct));
+
+    scale_dB=todB(&scale);
+
+#if 0
+    if(vi->channels==2)
+      if(i==0)
+	_analysis_output("pcmL",seq,pcm,n,0,0,total-n/2);
+      else
+	_analysis_output("pcmR",seq,pcm,n,0,0,total-n/2);
+#endif
+  
+    /* window the PCM data */
+    _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW);
+
+#if 0
+    if(vi->channels==2)
+      if(i==0)
+	_analysis_output("windowedL",seq,pcm,n,0,0,total-n/2);
+      else
+	_analysis_output("windowedR",seq,pcm,n,0,0,total-n/2);
+#endif
+
+    /* transform the PCM data */
+    /* only MDCT right now.... */
+    mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]);
+    
+    /* FFT yields more accurate tonal estimation (not phase sensitive) */
+    drft_forward(&b->fft_look[vb->W],pcm);
+    logfft[0]=scale_dB+todB(pcm);
+    local_ampmax[i]=logfft[0];
+    for(j=1;j<n-1;j+=2){
+      float temp=pcm[j]*pcm[j]+pcm[j+1]*pcm[j+1];
+      temp=logfft[(j+1)>>1]=scale_dB+.5f*todB(&temp);
+      if(temp>local_ampmax[i])local_ampmax[i]=temp;
+    }
+
+    if(local_ampmax[i]>0.f)local_ampmax[i]=0.f;
+    if(local_ampmax[i]>global_ampmax)global_ampmax=local_ampmax[i];
+
+#if 0
+    if(vi->channels==2)
+      if(i==0)
+	_analysis_output("fftL",seq,logfft,n/2,1,0,0);
+      else
+	_analysis_output("fftR",seq,logfft,n/2,1,0,0);
+#endif
+
+  }
+  
+  {
+    float   *noise        = _vorbis_block_alloc(vb,n/2*sizeof(*noise));
+    float   *tone         = _vorbis_block_alloc(vb,n/2*sizeof(*tone));
+    
+    for(i=0;i<vi->channels;i++){
+      /* the encoder setup assumes that all the modes used by any
+	 specific bitrate tweaking use the same floor */
+      
+      int submap=info->chmuxlist[i];
+      
+      /* the following makes things clearer to *me* anyway */
+      float *mdct    =gmdct[i];
+      float *logfft  =vb->pcm[i];
+      
+      float *logmdct =logfft+n/2;
+      float *logmask =logfft;
+
+      vb->mode=modenumber;
+
+      floor_posts[i]=_vorbis_block_alloc(vb,PACKETBLOBS*sizeof(**floor_posts));
+      memset(floor_posts[i],0,sizeof(**floor_posts)*PACKETBLOBS);
+      
+      for(j=0;j<n/2;j++)
+	logmdct[j]=todB(mdct+j);
+
+#if 0
+      if(vi->channels==2){
+	if(i==0)
+	  _analysis_output("mdctL",seq,logmdct,n/2,1,0,0);
+	else
+	  _analysis_output("mdctR",seq,logmdct,n/2,1,0,0);
+      }else{
+	_analysis_output("mdct",seq,logmdct,n/2,1,0,0);
+      }
+#endif 
+      
+      /* first step; noise masking.  Not only does 'noise masking'
+         give us curves from which we can decide how much resolution
+         to give noise parts of the spectrum, it also implicitly hands
+         us a tonality estimate (the larger the value in the
+         'noise_depth' vector, the more tonal that area is) */
+
+      _vp_noisemask(psy_look,
+		    logmdct,
+		    noise); /* noise does not have by-frequency offset
+                               bias applied yet */
+#if 0
+      if(vi->channels==2){
+	if(i==0)
+	  _analysis_output("noiseL",seq,noise,n/2,1,0,0);
+	else
+	  _analysis_output("noiseR",seq,noise,n/2,1,0,0);
+      }
+#endif
+
+      /* second step: 'all the other crap'; all the stuff that isn't
+         computed/fit for bitrate management goes in the second psy
+         vector.  This includes tone masking, peak limiting and ATH */
+
+      _vp_tonemask(psy_look,
+		   logfft,
+		   tone,
+		   global_ampmax,
+		   local_ampmax[i]);
+
+#if 0
+      if(vi->channels==2){
+	if(i==0)
+	  _analysis_output("toneL",seq,tone,n/2,1,0,0);
+	else
+	  _analysis_output("toneR",seq,tone,n/2,1,0,0);
+      }
+#endif
+
+      /* third step; we offset the noise vectors, overlay tone
+	 masking.  We then do a floor1-specific line fit.  If we're
+	 performing bitrate management, the line fit is performed
+	 multiple times for up/down tweakage on demand. */
+      
+      _vp_offset_and_mix(psy_look,
+			 noise,
+			 tone,
+			 1,
+			 logmask);
+
+#if 0
+      if(vi->channels==2){
+	if(i==0)
+	  _analysis_output("mask1L",seq,logmask,n/2,1,0,0);
+	else
+	  _analysis_output("mask1R",seq,logmask,n/2,1,0,0);
+      }
+#endif
+
+      /* this algorithm is hardwired to floor 1 for now; abort out if
+         we're *not* floor1.  This won't happen unless someone has
+         broken the encode setup lib.  Guard it anyway. */
+      if(ci->floor_type[info->floorsubmap[submap]]!=1) {
+        free(nonzero);
+        free(local_ampmax);
+        return(-1);
+      }
+      floor_posts[i][PACKETBLOBS/2]=
+	floor1_fit(vb,b->flr[info->floorsubmap[submap]],
+		   logmdct,
+		   logmask);
+      
+      /* are we managing bitrate?  If so, perform two more fits for
+         later rate tweaking (fits represent hi/lo) */
+      if(vorbis_bitrate_managed(vb) && floor_posts[i][PACKETBLOBS/2]){
+	/* higher rate by way of lower noise curve */
+
+	_vp_offset_and_mix(psy_look,
+			   noise,
+			   tone,
+			   2,
+			   logmask);
+
+#if 0
+	if(vi->channels==2){
+	  if(i==0)
+	    _analysis_output("mask2L",seq,logmask,n/2,1,0,0);
+	  else
+	    _analysis_output("mask2R",seq,logmask,n/2,1,0,0);
+	}
+#endif
+	
+	floor_posts[i][PACKETBLOBS-1]=
+	  floor1_fit(vb,b->flr[info->floorsubmap[submap]],
+		     logmdct,
+		     logmask);
+      
+	/* lower rate by way of higher noise curve */
+	_vp_offset_and_mix(psy_look,
+			   noise,
+			   tone,
+			   0,
+			   logmask);
+
+#if 0
+	if(vi->channels==2)
+	  if(i==0)
+	    _analysis_output("mask0L",seq,logmask,n/2,1,0,0);
+	  else
+	    _analysis_output("mask0R",seq,logmask,n/2,1,0,0);
+#endif
+
+	floor_posts[i][0]=
+	  floor1_fit(vb,b->flr[info->floorsubmap[submap]],
+		     logmdct,
+		     logmask);
+	
+	/* we also interpolate a range of intermediate curves for
+           intermediate rates */
+	for(k=1;k<PACKETBLOBS/2;k++)
+	  floor_posts[i][k]=
+	    floor1_interpolate_fit(vb,b->flr[info->floorsubmap[submap]],
+				   floor_posts[i][0],
+				   floor_posts[i][PACKETBLOBS/2],
+				   k*65536/(PACKETBLOBS/2));
+	for(k=PACKETBLOBS/2+1;k<PACKETBLOBS-1;k++)
+	  floor_posts[i][k]=
+	    floor1_interpolate_fit(vb,b->flr[info->floorsubmap[submap]],
+				   floor_posts[i][PACKETBLOBS/2],
+				   floor_posts[i][PACKETBLOBS-1],
+				   (k-PACKETBLOBS/2)*65536/(PACKETBLOBS/2));
+      }
+    }
+  }
+  vbi->ampmax=global_ampmax;
+
+  /*
+    the next phases are performed once for vbr-only and PACKETBLOB
+    times for bitrate managed modes.
+    
+    1) encode actual mode being used
+    2) encode the floor for each channel, compute coded mask curve/res
+    3) normalize and couple.
+    4) encode residue
+    5) save packet bytes to the packetblob vector
+    
+  */
+
+  /* iterate over the many masking curve fits we've created */
+  {
+    float **res_bundle=malloc(sizeof(*res_bundle)*vi->channels);
+    float **couple_bundle=malloc(sizeof(*couple_bundle)*vi->channels);
+    int *zerobundle=malloc(sizeof(*zerobundle)*vi->channels);
+    int **sortindex=malloc(sizeof(*sortindex)*vi->channels);
+    float **mag_memo;
+    int **mag_sort;
+    int sortindexes_allocated = 0;
+
+    if(info->coupling_steps){
+      mag_memo=_vp_quantize_couple_memo(vb,
+					&ci->psy_g_param,
+					psy_look,
+					info,
+					gmdct);    
+      
+      mag_sort=_vp_quantize_couple_sort(vb,
+					psy_look,
+					info,
+					mag_memo);    
+    }
+
+    memset(sortindex,0,sizeof(*sortindex)*vi->channels);
+    if(psy_look->vi->normal_channel_p){
+      sortindexes_allocated = vi->channels;
+      for(i=0;i<vi->channels;i++){
+	float *mdct    =gmdct[i];
+	sortindex[i]=malloc(sizeof(**sortindex)*n/2);
+	_vp_noise_normalize_sort(psy_look,mdct,sortindex[i]);
+      }
+    }
+
+    for(k=(vorbis_bitrate_managed(vb)?0:PACKETBLOBS/2);
+	k<=(vorbis_bitrate_managed(vb)?PACKETBLOBS-1:PACKETBLOBS/2);
+	k++){
+
+      /* start out our new packet blob with packet type and mode */
+      /* Encode the packet type */
+      oggpack_write(&vb->opb,0,1);
+      /* Encode the modenumber */
+      /* Encode frame mode, pre,post windowsize, then dispatch */
+      oggpack_write(&vb->opb,modenumber,b->modebits);
+      if(vb->W){
+	oggpack_write(&vb->opb,vb->lW,1);
+	oggpack_write(&vb->opb,vb->nW,1);
+      }
+
+      /* encode floor, compute masking curve, sep out residue */
+      for(i=0;i<vi->channels;i++){
+	int submap=info->chmuxlist[i];
+	float *mdct    =gmdct[i];
+	float *res     =vb->pcm[i];
+	int   *ilogmask=ilogmaskch[i]=
+	  _vorbis_block_alloc(vb,n/2*sizeof(**gmdct));
+      
+	nonzero[i]=floor1_encode(vb,b->flr[info->floorsubmap[submap]],
+				 floor_posts[i][k],
+				 ilogmask);
+#if 0
+	{
+	  char buf[80];
+	  sprintf(buf,"maskI%c%d",i?'R':'L',k);
+	  float work[n/2];
+	  for(j=0;j<n/2;j++)
+	    work[j]=FLOOR1_fromdB_LOOKUP[ilogmask[j]];
+	  _analysis_output(buf,seq,work,n/2,1,1,0);
+	}
+#endif
+	_vp_remove_floor(psy_look,
+			 mdct,
+			 ilogmask,
+			 res,
+			 ci->psy_g_param.sliding_lowpass[vb->W][k]);
+
+	_vp_noise_normalize(psy_look,res,res+n/2,sortindex[i]);
+
+	
+#if 0
+	{
+	  char buf[80];
+	  float work[n/2];
+	  for(j=0;j<n/2;j++)
+	    work[j]=FLOOR1_fromdB_LOOKUP[ilogmask[j]]*(res+n/2)[j];
+	  sprintf(buf,"resI%c%d",i?'R':'L',k);
+	  _analysis_output(buf,seq,work,n/2,1,1,0);
+
+	}
+#endif
+      }
+      
+      /* our iteration is now based on masking curve, not prequant and
+	 coupling.  Only one prequant/coupling step */
+      
+      /* quantize/couple */
+      /* incomplete implementation that assumes the tree is all depth
+         one, or no tree at all */
+      if(info->coupling_steps){
+	_vp_couple(k,
+		   &ci->psy_g_param,
+		   psy_look,
+		   info,
+		   vb->pcm,
+		   mag_memo,
+		   mag_sort,
+		   ilogmaskch,
+		   nonzero,
+		   ci->psy_g_param.sliding_lowpass[vb->W][k]);
+      }
+      
+      /* classify and encode by submap */
+      for(i=0;i<info->submaps;i++){
+	int ch_in_bundle=0;
+	long **classifications;
+	int resnum=info->residuesubmap[i];
+
+	for(j=0;j<vi->channels;j++){
+	  if(info->chmuxlist[j]==i){
+	    zerobundle[ch_in_bundle]=0;
+	    if(nonzero[j])zerobundle[ch_in_bundle]=1;
+	    res_bundle[ch_in_bundle]=vb->pcm[j];
+	    couple_bundle[ch_in_bundle++]=vb->pcm[j]+n/2;
+	  }
+	}
+	
+	classifications=_residue_P[ci->residue_type[resnum]]->
+	  class(vb,b->residue[resnum],couple_bundle,zerobundle,ch_in_bundle);
+	
+	_residue_P[ci->residue_type[resnum]]->
+	  forward(vb,b->residue[resnum],
+		  couple_bundle,NULL,zerobundle,ch_in_bundle,classifications);
+      }
+      
+      /* ok, done encoding.  Mark this protopacket and prepare next. */
+      oggpack_writealign(&vb->opb);
+      vbi->packetblob_markers[k]=oggpack_bytes(&vb->opb);
+      
+    }
+
+    for (i=0;i<sortindexes_allocated;++i)
+      free(sortindex[i]);
+
+    free(res_bundle); free(couple_bundle); free(zerobundle); free(sortindex);
+  }
+
+#if 0
+  seq++;
+  total+=ci->blocksizes[vb->W]/4+ci->blocksizes[vb->nW]/4;
+#endif
+
+
+  free(local_ampmax);
+  free(nonzero);
+  return(0);
+}
+
+static int mapping0_inverse(vorbis_block *vb,vorbis_info_mapping *l){
+  vorbis_dsp_state     *vd=vb->vd;
+  vorbis_info          *vi=vd->vi;
+  codec_setup_info     *ci=vi->codec_setup;
+  backend_lookup_state *b=vd->backend_state;
+  vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)l;
+  int                   i,j;
+  long                  n=vb->pcmend=ci->blocksizes[vb->W];
+  float **pcmbundle=malloc(sizeof(*pcmbundle)*vi->channels);
+  int    *zerobundle=malloc(sizeof(*zerobundle)*vi->channels);
+
+  int   *nonzero  =malloc(sizeof(*nonzero)*vi->channels);
+  void **floormemo=malloc(sizeof(*floormemo)*vi->channels);
+  
+  /* recover the spectral envelope; store it in the PCM vector for now */
+  for(i=0;i<vi->channels;i++){
+    int submap=info->chmuxlist[i];
+    floormemo[i]=_floor_P[ci->floor_type[info->floorsubmap[submap]]]->
+      inverse1(vb,b->flr[info->floorsubmap[submap]]);
+    if(floormemo[i])
+      nonzero[i]=1;
+    else
+      nonzero[i]=0;      
+    memset(vb->pcm[i],0,sizeof(*vb->pcm[i])*n/2);
+  }
+
+  /* channel coupling can 'dirty' the nonzero listing */
+  for(i=0;i<info->coupling_steps;i++){
+    if(nonzero[info->coupling_mag[i]] ||
+       nonzero[info->coupling_ang[i]]){
+      nonzero[info->coupling_mag[i]]=1; 
+      nonzero[info->coupling_ang[i]]=1; 
+    }
+  }
+
+  /* recover the residue into our working vectors */
+  for(i=0;i<info->submaps;i++){
+    int ch_in_bundle=0;
+    for(j=0;j<vi->channels;j++){
+      if(info->chmuxlist[j]==i){
+	if(nonzero[j])
+	  zerobundle[ch_in_bundle]=1;
+	else
+	  zerobundle[ch_in_bundle]=0;
+	pcmbundle[ch_in_bundle++]=vb->pcm[j];
+      }
+    }
+
+    _residue_P[ci->residue_type[info->residuesubmap[i]]]->
+      inverse(vb,b->residue[info->residuesubmap[i]],
+	      pcmbundle,zerobundle,ch_in_bundle);
+  }
+
+  /* channel coupling */
+  for(i=info->coupling_steps-1;i>=0;i--){
+    float *pcmM=vb->pcm[info->coupling_mag[i]];
+    float *pcmA=vb->pcm[info->coupling_ang[i]];
+
+    for(j=0;j<n/2;j++){
+      float mag=pcmM[j];
+      float ang=pcmA[j];
+
+      if(mag>0)
+	if(ang>0){
+	  pcmM[j]=mag;
+	  pcmA[j]=mag-ang;
+	}else{
+	  pcmA[j]=mag;
+	  pcmM[j]=mag+ang;
+	}
+      else
+	if(ang>0){
+	  pcmM[j]=mag;
+	  pcmA[j]=mag+ang;
+	}else{
+	  pcmA[j]=mag;
+	  pcmM[j]=mag-ang;
+	}
+    }
+  }
+
+  /* compute and apply spectral envelope */
+  for(i=0;i<vi->channels;i++){
+    float *pcm=vb->pcm[i];
+    int submap=info->chmuxlist[i];
+    _floor_P[ci->floor_type[info->floorsubmap[submap]]]->
+      inverse2(vb,b->flr[info->floorsubmap[submap]],
+	       floormemo[i],pcm);
+  }
+
+  /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */
+  /* only MDCT right now.... */
+  for(i=0;i<vi->channels;i++){
+    float *pcm=vb->pcm[i];
+    mdct_backward(b->transform[vb->W][0],pcm,pcm);
+  }
+
+  /* window the data */
+  for(i=0;i<vi->channels;i++){
+    float *pcm=vb->pcm[i];
+    if(nonzero[i])
+      _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW);
+    else
+      for(j=0;j<n;j++)
+	pcm[j]=0.f;
+
+  }
+
+  /* all done! */
+  free(pcmbundle); free(zerobundle); free(nonzero); free(floormemo);
+
+  return(0);
+}
+
+/* export hooks */
+vorbis_func_mapping mapping0_exportbundle={
+  &mapping0_pack,
+  &mapping0_unpack,
+  &mapping0_free_info,
+  &mapping0_forward,
+  &mapping0_inverse
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/masking.h
@@ -1,0 +1,785 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: masking curve data for psychoacoustics
+ last mod: $Id: masking.h,v 1.24 2002/07/01 11:20:11 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_MASKING_H_
+#define _V_MASKING_H_
+
+/* more detailed ATH; the bass if flat to save stressing the floor
+   overly for only a bin or two of savings. */
+
+#define MAX_ATH 88
+static float ATH[]={
+  /*15*/  -51, -52, -53, -54, -55, -56, -57, -58,  
+  /*31*/  -59, -60, -61, -62, -63, -64, -65, -66,
+  /*63*/  -67, -68, -69, -70, -71, -72, -73, -74, 
+  /*125*/ -75, -76, -77, -78, -80, -81, -82, -83,
+  /*250*/ -84, -85, -86, -87, -88, -88, -89, -89, 
+  /*500*/ -90, -91, -91, -92, -93, -94, -95, -96,
+  /*1k*/  -96, -97, -98, -98, -99, -99,-100,-100,
+  /*2k*/ -101,-102,-103,-104,-106,-107,-107,-107,
+  /*4k*/ -107,-105,-103,-102,-101, -99, -98, -96,
+  /*8k*/  -95, -95, -96, -97, -96, -95, -93, -90,
+  /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30
+};
+
+/* The tone masking curves from Ehmer's and Fielder's papers have been
+   replaced by an empirically collected data set.  The previously
+   published values were, far too often, simply on crack. */
+
+#define EHMER_OFFSET 16
+#define EHMER_MAX 56
+
+/* masking tones from -50 to 0dB, 62.5 through 16kHz at half octaves
+   test tones from -2 octaves to +5 octaves sampled at eighth octaves */
+/* (Vorbis 0dB, the loudest possible tone, is assumed to be ~100dB SPL
+   for collection of these curves) */
+
+static float tonemasks[P_BANDS][6][EHMER_MAX]={
+  /* 62.5 Hz */
+  {{ -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60, 
+     -60,  -60,  -60,  -60,  -62,  -62,  -65,  -73, 
+     -69,  -68,  -68,  -67,  -70,  -70,  -72,  -74, 
+     -75,  -79,  -79,  -80,  -83,  -88,  -93, -100, 
+     -110, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48, 
+     -48,  -48,  -48,  -48,  -48,  -53,  -61,  -66, 
+     -66,  -68,  -67,  -70,  -76,  -76,  -72,  -73, 
+     -75,  -76,  -78,  -79,  -83,  -88,  -93, -100, 
+     -110, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37, 
+     -38,  -40,  -42,  -46,  -48,  -53,  -55,  -62, 
+     -65,  -58,  -56,  -56,  -61,  -60,  -65,  -67, 
+     -69,  -71,  -77,  -77,  -78,  -80,  -82,  -84, 
+     -88,  -93,  -98, -106, -112, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25, 
+     -25,  -26,  -27,  -29,  -32,  -38,  -48,  -52, 
+     -52,  -50,  -48,  -48,  -51,  -52,  -54,  -60, 
+     -67,  -67,  -66,  -68,  -69,  -73,  -73,  -76, 
+     -80,  -81,  -81,  -85,  -85,  -86,  -88,  -93, 
+     -100, -110, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16, 
+     -17,  -19,  -20,  -22,  -26,  -28,  -31,  -40, 
+     -47,  -39,  -39,  -40,  -42,  -43,  -47,  -51, 
+     -57,  -52,  -55,  -55,  -60,  -58,  -62,  -63, 
+     -70,  -67,  -69,  -72,  -73,  -77,  -80,  -82, 
+     -83,  -87,  -90,  -94,  -98, -104, -115, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   {  -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8, 
+      -8,   -8,  -10,  -11,  -15,  -19,  -25,  -30, 
+      -34,  -31,  -30,  -31,  -29,  -32,  -35,  -42, 
+      -48,  -42,  -44,  -46,  -50,  -50,  -51,  -52, 
+      -59,  -54,  -55,  -55,  -58,  -62,  -63,  -66, 
+      -72,  -73,  -76,  -75,  -78,  -80,  -80,  -81, 
+      -84,  -88,  -90,  -94,  -98, -101, -106, -110}}, 
+  /* 88Hz */
+  {{ -66,  -66,  -66,  -66,  -66,  -66,  -66,  -66, 
+     -66,  -66,  -66,  -66,  -66,  -67,  -67,  -67, 
+     -76,  -72,  -71,  -74,  -76,  -76,  -75,  -78, 
+     -79,  -79,  -81,  -83,  -86,  -89,  -93,  -97, 
+     -100, -105, -110, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47, 
+     -47,  -47,  -47,  -48,  -51,  -55,  -59,  -66, 
+     -66,  -66,  -67,  -66,  -68,  -69,  -70,  -74, 
+     -79,  -77,  -77,  -78,  -80,  -81,  -82,  -84, 
+     -86,  -88,  -91,  -95, -100, -108, -116, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36, 
+     -36,  -37,  -37,  -41,  -44,  -48,  -51,  -58, 
+     -62,  -60,  -57,  -59,  -59,  -60,  -63,  -65, 
+     -72,  -71,  -70,  -72,  -74,  -77,  -76,  -78, 
+     -81,  -81,  -80,  -83,  -86,  -91,  -96, -100, 
+     -105, -110, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28, 
+     -28,  -30,  -32,  -32,  -33,  -35,  -41,  -49, 
+     -50,  -49,  -47,  -48,  -48,  -52,  -51,  -57, 
+     -65,  -61,  -59,  -61,  -64,  -69,  -70,  -74, 
+     -77,  -77,  -78,  -81,  -84,  -85,  -87,  -90, 
+     -92,  -96, -100, -107, -112, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   { -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19, 
+     -20,  -21,  -23,  -27,  -30,  -35,  -36,  -41, 
+     -46,  -44,  -42,  -40,  -41,  -41,  -43,  -48, 
+     -55,  -53,  -52,  -53,  -56,  -59,  -58,  -60, 
+     -67,  -66,  -69,  -71,  -72,  -75,  -79,  -81, 
+     -84,  -87,  -90,  -93,  -97, -101, -107, -114, 
+     -999, -999, -999, -999, -999, -999, -999, -999},
+   {  -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9, 
+      -11,  -12,  -12,  -15,  -16,  -20,  -23,  -30, 
+      -37,  -34,  -33,  -34,  -31,  -32,  -32,  -38, 
+      -47,  -44,  -41,  -40,  -47,  -49,  -46,  -46, 
+      -58,  -50,  -50,  -54,  -58,  -62,  -64,  -67, 
+      -67,  -70,  -72,  -76,  -79,  -83,  -87,  -91, 
+      -96, -100, -104, -110, -999, -999, -999, -999}}, 
+  /* 125 Hz */
+  {{ -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62, 
+     -62,  -62,  -63,  -64,  -66,  -67,  -66,  -68, 
+     -75,  -72,  -76,  -75,  -76,  -78,  -79,  -82, 
+     -84,  -85,  -90,  -94, -101, -110, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59, 
+     -59,  -59,  -59,  -60,  -60,  -61,  -63,  -66, 
+     -71,  -68,  -70,  -70,  -71,  -72,  -72,  -75, 
+     -81,  -78,  -79,  -82,  -83,  -86,  -90,  -97, 
+     -103, -113, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53, 
+     -53,  -54,  -55,  -57,  -56,  -57,  -55,  -61, 
+     -65,  -60,  -60,  -62,  -63,  -63,  -66,  -68, 
+     -74,  -73,  -75,  -75,  -78,  -80,  -80,  -82, 
+     -85,  -90,  -96, -101, -108, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46, 
+     -46,  -46,  -47,  -47,  -47,  -47,  -48,  -51, 
+     -57,  -51,  -49,  -50,  -51,  -53,  -54,  -59, 
+     -66,  -60,  -62,  -67,  -67,  -70,  -72,  -75, 
+     -76,  -78,  -81,  -85,  -88,  -94,  -97, -104, 
+     -112, -999, -999, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36, 
+     -39,  -41,  -42,  -42,  -39,  -38,  -41,  -43, 
+     -52,  -44,  -40,  -39,  -37,  -37,  -40,  -47, 
+     -54,  -50,  -48,  -50,  -55,  -61,  -59,  -62, 
+     -66,  -66,  -66,  -69,  -69,  -73,  -74,  -74, 
+     -75,  -77,  -79,  -82,  -87,  -91,  -95, -100, 
+     -108, -115, -999, -999, -999, -999, -999, -999}, 
+   { -28,  -26,  -24,  -22,  -20,  -20,  -23,  -29, 
+     -30,  -31,  -28,  -27,  -28,  -28,  -28,  -35, 
+     -40,  -33,  -32,  -29,  -30,  -30,  -30,  -37, 
+     -45,  -41,  -37,  -38,  -45,  -47,  -47,  -48, 
+     -53,  -49,  -48,  -50,  -49,  -49,  -51,  -52, 
+     -58,  -56,  -57,  -56,  -60,  -61,  -62,  -70, 
+     -72,  -74,  -78,  -83,  -88,  -93, -100, -106}}, 
+  /* 177 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -110, -105, -100,  -95,  -91,  -87,  -83, 
+    -80,  -78,  -76,  -78,  -78,  -81,  -83,  -85, 
+    -86,  -85,  -86,  -87,  -90,  -97, -107, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -110, -105, -100,  -95,  -90, 
+    -85,  -81,  -77,  -73,  -70,  -67,  -67,  -68, 
+    -75,  -73,  -70,  -69,  -70,  -72,  -75,  -79, 
+    -84,  -83,  -84,  -86,  -88,  -89,  -89,  -93, 
+    -98, -105, -112, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-105, -100,  -95,  -90,  -85,  -80,  -76,  -71, 
+    -68,  -68,  -65,  -63,  -63,  -62,  -62,  -64, 
+    -65,  -64,  -61,  -62,  -63,  -64,  -66,  -68, 
+    -73,  -73,  -74,  -75,  -76,  -81,  -83,  -85, 
+    -88,  -89,  -92,  -95, -100, -108, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -80,  -75,  -71,  -68,  -65,  -63,  -62,  -61, 
+     -61,  -61,  -61,  -59,  -56,  -57,  -53,  -50, 
+     -58,  -52,  -50,  -50,  -52,  -53,  -54,  -58, 
+     -67,  -63,  -67,  -68,  -72,  -75,  -78,  -80, 
+     -81,  -81,  -82,  -85,  -89,  -90,  -93,  -97, 
+     -101, -107, -114, -999, -999, -999, -999, -999, 
+     -999, -999, -999, -999, -999, -999, -999, -999}, 
+   { -65,  -61,  -59,  -57,  -56,  -55,  -55,  -56, 
+     -56,  -57,  -55,  -53,  -52,  -47,  -44,  -44, 
+     -50,  -44,  -41,  -39,  -39,  -42,  -40,  -46, 
+     -51,  -49,  -50,  -53,  -54,  -63,  -60,  -61, 
+     -62,  -66,  -66,  -66,  -70,  -73,  -74,  -75, 
+     -76,  -75,  -79,  -85,  -89,  -91,  -96, -102, 
+     -110, -999, -999, -999, -999, -999, -999, -999}, 
+   { -52,  -50,  -49,  -49,  -48,  -48,  -48,  -49, 
+     -50,  -50,  -49,  -46,  -43,  -39,  -35,  -33, 
+     -38,  -36,  -32,  -29,  -32,  -32,  -32,  -35, 
+     -44,  -39,  -38,  -38,  -46,  -50,  -45,  -46, 
+     -53,  -50,  -50,  -50,  -54,  -54,  -53,  -53, 
+     -56,  -57,  -59,  -66,  -70,  -72,  -74,  -79, 
+     -83,  -85,  -90, -97, -114, -999, -999, -999}}, 
+  /* 250 Hz */
+  {{-999, -999, -999, -999, -999, -999, -110, -105, 
+    -100,  -95,  -90,  -86,  -80,  -75,  -75,  -79, 
+    -80,  -79,  -80,  -81,  -82,  -88,  -95, -103, 
+    -110, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -108, -103,  -98,  -93, 
+    -88,  -83,  -79,  -78,  -75,  -71,  -67,  -68, 
+    -73,  -73,  -72,  -73,  -75,  -77,  -80,  -82, 
+    -88,  -93, -100, -107, -114, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -110, -105, -101,  -96,  -90, 
+    -86,  -81,  -77,  -73,  -69,  -66,  -61,  -62, 
+    -66,  -64,  -62,  -65,  -66,  -70,  -72,  -76, 
+    -81,  -80,  -84,  -90,  -95, -102, -110, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -107, -103,  -97,  -92,  -88, 
+    -83,  -79,  -74,  -70,  -66,  -59,  -53,  -58, 
+    -62,  -55,  -54,  -54,  -54,  -58,  -61,  -62, 
+    -72,  -70,  -72,  -75,  -78,  -80,  -81,  -80, 
+    -83,  -83,  -88,  -93, -100, -107, -115, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -105, -100,  -95,  -90,  -85, 
+    -80,  -75,  -70,  -66,  -62,  -56,  -48,  -44, 
+    -48,  -46,  -46,  -43,  -46,  -48,  -48,  -51, 
+    -58,  -58,  -59,  -60,  -62,  -62,  -61,  -61, 
+    -65,  -64,  -65,  -68,  -70,  -74,  -75,  -78, 
+    -81,  -86,  -95, -110, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999,  -999, -105, -100,  -95,  -90,  -85,  -80, 
+    -75,  -70,  -65,  -61,  -55,  -49,  -39,  -33, 
+    -40,  -35,  -32,  -38,  -40,  -33,  -35,  -37, 
+    -46,  -41,  -45,  -44,  -46,  -42,  -45,  -46, 
+    -52,  -50,  -50,  -50,  -54,  -54,  -55,  -57, 
+    -62,  -64,  -66,  -68,  -70,  -76,  -81,  -90, 
+    -100, -110, -999, -999, -999, -999, -999, -999}}, 
+  /* 354 hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -105,  -98,  -90,  -85,  -82,  -83,  -80,  -78, 
+    -84,  -79,  -80,  -83,  -87,  -89,  -91,  -93, 
+    -99, -106, -117, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -105,  -98,  -90,  -85,  -80,  -75,  -70,  -68, 
+    -74,  -72,  -74,  -77,  -80,  -82,  -85,  -87, 
+    -92,  -89,  -91,  -95, -100, -106, -112, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -105,  -98,  -90,  -83,  -75,  -71,  -63,  -64, 
+    -67,  -62,  -64,  -67,  -70,  -73,  -77,  -81, 
+    -84,  -83,  -85,  -89,  -90,  -93,  -98, -104, 
+    -109, -114, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -103,  -96,  -88,  -81,  -75,  -68,  -58,  -54, 
+    -56,  -54,  -56,  -56,  -58,  -60,  -63,  -66, 
+    -74,  -69,  -72,  -72,  -75,  -74,  -77,  -81, 
+    -81,  -82,  -84,  -87,  -93,  -96,  -99, -104, 
+    -110, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -108, -102,  -96, 
+    -91,  -85,  -80,  -74,  -68,  -60,  -51,  -46, 
+    -48,  -46,  -43,  -45,  -47,  -47,  -49,  -48, 
+    -56,  -53,  -55,  -58,  -57,  -63,  -58,  -60, 
+    -66,  -64,  -67,  -70,  -70,  -74,  -77,  -84, 
+    -86,  -89,  -91,  -93,  -94, -101, -109, -118, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -108, -103,  -98,  -93,  -88, 
+    -83,  -78,  -73,  -68,  -60,  -53,  -44,  -35, 
+    -38,  -38,  -34,  -34,  -36,  -40,  -41,  -44, 
+    -51,  -45,  -46,  -47,  -46,  -54,  -50,  -49, 
+    -50,  -50,  -50,  -51,  -54,  -57,  -58,  -60, 
+    -66,  -66,  -66,  -64,  -65,  -68,  -77,  -82, 
+    -87,  -95, -110, -999, -999, -999, -999, -999}}, 
+  /* 500 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -107, -102,  -97,  -92,  -87,  -83,  -78,  -75, 
+    -82,  -79,  -83,  -85,  -89,  -92,  -95,  -98, 
+    -101, -105, -109, -113, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -106, 
+    -100,  -95,  -90,  -86,  -81,  -78,  -74,  -69, 
+    -74,  -74,  -76,  -79,  -83,  -84,  -86,  -89, 
+    -92,  -97,  -93, -100, -103, -107, -110, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -106, -100, 
+    -95, -90, -87, -83, -80, -75, -69, -60, 
+    -66, -66, -68, -70, -74, -78, -79, -81, 
+    -81, -83, -84, -87, -93, -96, -99, -103, 
+    -107, -110, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -108, -103, -98, 
+    -93, -89, -85, -82, -78, -71, -62, -55, 
+    -58, -58, -54, -54, -55, -59, -61, -62, 
+    -70, -66, -66, -67, -70, -72, -75, -78, 
+    -84, -84, -84, -88, -91, -90, -95, -98, 
+    -102, -103, -106, -110, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -108, -103,  -98,  -94, 
+    -90,  -87,  -82,  -79,  -73,  -67,  -58,  -47, 
+    -50,  -45,  -41,  -45,  -48,  -44,  -44,  -49, 
+    -54,  -51,  -48,  -47,  -49,  -50,  -51,  -57, 
+    -58,  -60,  -63,  -69,  -70,  -69,  -71,  -74, 
+    -78,  -82,  -90,  -95, -101, -105, -110, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -105, -101, -97, -93, -90, 
+    -85, -80, -77, -72, -65, -56, -48, -37, 
+    -40, -36, -34, -40, -50, -47, -38, -41, 
+    -47, -38, -35, -39, -38, -43, -40, -45, 
+    -50, -45, -44, -47, -50, -55, -48, -48, 
+    -52, -66, -70, -76, -82, -90, -97, -105, 
+    -110, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 707 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -108, -103,  -98,  -93,  -86,  -79,  -76, 
+    -83,  -81,  -85,  -87,  -89,  -93,  -98, -102, 
+    -107, -112, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -108, -103,  -98,  -93,  -86,  -79,  -71, 
+    -77,  -74,  -77,  -79,  -81,  -84,  -85,  -90, 
+    -92,  -93,  -92,  -98, -101, -108, -112, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -108, -103,  -98,  -93,  -87,  -78,  -68,  -65, 
+    -66,  -62,  -65,  -67,  -70,  -73,  -75,  -78, 
+    -82,  -82,  -83,  -84,  -91,  -93,  -98, -102, 
+    -106, -110, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -105, -100, -95, -90, -82, -74, -62, -57, 
+    -58, -56, -51, -52, -52, -54, -54, -58, 
+    -66, -59, -60, -63, -66, -69, -73, -79, 
+    -83, -84, -80, -81, -81, -82, -88, -92, 
+    -98, -105, -113, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -107, 
+    -102,  -97,  -92,  -84,  -79,  -69,  -57,  -47, 
+    -52,  -47,  -44,  -45,  -50,  -52,  -42,  -42, 
+    -53,  -43,  -43,  -48,  -51,  -56,  -55,  -52, 
+    -57,  -59,  -61,  -62,  -67,  -71,  -78,  -83, 
+    -86,  -94,  -98, -103, -110, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -105, -100, 
+    -95,  -90,  -84,  -78,  -70,  -61,  -51,  -41, 
+    -40,  -38,  -40,  -46,  -52,  -51,  -41,  -40, 
+    -46,  -40,  -38,  -38,  -41,  -46,  -41,  -46, 
+    -47,  -43,  -43,  -45,  -41,  -45,  -56,  -67, 
+    -68,  -83,  -87,  -90,  -95, -102, -107, -113, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 1000 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -109, -105, -101,  -96,  -91,  -84,  -77, 
+    -82,  -82,  -85,  -89,  -94, -100, -106, -110, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -106, -103,  -98,  -92,  -85,  -80,  -71, 
+    -75,  -72,  -76,  -80,  -84,  -86,  -89,  -93, 
+    -100, -107, -113, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -107, 
+    -104, -101,  -97,  -92,  -88,  -84,  -80,  -64, 
+    -66,  -63,  -64,  -66,  -69,  -73,  -77,  -83, 
+    -83,  -86,  -91,  -98, -104, -111, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -107, 
+    -104, -101,  -97,  -92,  -90,  -84,  -74,  -57, 
+    -58,  -52,  -55,  -54,  -50,  -52,  -50,  -52, 
+    -63,  -62,  -69,  -76,  -77,  -78,  -78,  -79, 
+    -82,  -88,  -94, -100, -106, -111, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -106, -102, 
+    -98,  -95,  -90,  -85,  -83,  -78,  -70,  -50, 
+    -50,  -41,  -44,  -49,  -47,  -50,  -50,  -44, 
+    -55,  -46,  -47,  -48,  -48,  -54,  -49,  -49, 
+    -58,  -62,  -71,  -81,  -87,  -92,  -97, -102, 
+    -108, -114, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -106, -102, 
+    -98,  -95,  -90,  -85,  -83,  -78,  -70,  -45, 
+    -43,  -41,  -47,  -50,  -51,  -50,  -49,  -45, 
+    -47,  -41,  -44,  -41,  -39,  -43,  -38,  -37, 
+    -40,  -41,  -44,  -50,  -58,  -65,  -73,  -79, 
+    -85,  -92,  -97, -101, -105, -109, -113, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 1414 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -107, -100,  -95,  -87,  -81, 
+    -85,  -83,  -88,  -93, -100, -107, -114, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -107, -101,  -95,  -88,  -83,  -76, 
+    -73,  -72,  -79,  -84,  -90,  -95, -100, -105, 
+    -110, -115, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -104,  -98,  -92,  -87,  -81,  -70, 
+    -65,  -62,  -67,  -71,  -74,  -80,  -85,  -91, 
+    -95,  -99, -103, -108, -111, -114, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -103,  -97,  -90,  -85,  -76,  -60, 
+    -56,  -54,  -60,  -62,  -61,  -56,  -63,  -65, 
+    -73,  -74,  -77,  -75,  -78,  -81,  -86,  -87, 
+    -88,  -91,  -94,  -98, -103, -110, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -105, 
+    -100,  -97,  -92,  -86,  -81,  -79,  -70,  -57, 
+    -51,  -47,  -51,  -58,  -60,  -56,  -53,  -50, 
+    -58,  -52,  -50,  -50,  -53,  -55,  -64,  -69, 
+    -71,  -85,  -82,  -78,  -81,  -85,  -95, -102, 
+    -112, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -105, 
+    -100,  -97,  -92,  -85,  -83,  -79,  -72,  -49, 
+    -40,  -43,  -43,  -54,  -56,  -51,  -50,  -40, 
+    -43,  -38,  -36,  -35,  -37,  -38,  -37,  -44, 
+    -54,  -60,  -57,  -60,  -70,  -75,  -84,  -92, 
+    -103, -112, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 2000 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -102,  -95,  -89,  -82, 
+    -83,  -84,  -90,  -92,  -99, -107, -113, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -107, -101,  -95,  -89,  -83,  -72, 
+    -74,  -78,  -85,  -88,  -88,  -90,  -92,  -98, 
+    -105, -111, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -109, -103, -97, -93, -87, -81, -70, 
+    -70, -67, -75, -73, -76, -79, -81, -83, 
+    -88, -89, -97, -103, -110, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -107, -100,  -94,  -88,  -83,  -75,  -63, 
+    -59,  -59,  -63,  -66,  -60,  -62,  -67,  -67, 
+    -77,  -76,  -81,  -88,  -86,  -92,  -96, -102, 
+    -109, -116, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -105,  -98,  -92,  -86,  -81,  -73,  -56, 
+    -52,  -47,  -55,  -60,  -58,  -52,  -51,  -45, 
+    -49,  -50,  -53,  -54,  -61,  -71,  -70,  -69, 
+    -78,  -79,  -87,  -90,  -96, -104, -112, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -103,  -96,  -90,  -86,  -78,  -70,  -51, 
+    -42,  -47,  -48,  -55,  -54,  -54,  -53,  -42, 
+    -35,  -28,  -33,  -38,  -37,  -44,  -47,  -49, 
+    -54,  -63,  -68,  -78,  -82,  -89,  -94,  -99, 
+    -104, -109, -114, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 2828 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -110, -100,  -90,  -79, 
+    -85,  -81,  -82,  -82,  -89,  -94,  -99, -103, 
+    -109, -115, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -105,  -97,  -85,  -72, 
+    -74,  -70,  -70,  -70,  -76,  -85,  -91,  -93, 
+    -97, -103, -109, -115, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -112,  -93,  -81,  -68, 
+    -62,  -60,  -60,  -57,  -63,  -70,  -77,  -82, 
+    -90,  -93,  -98, -104, -109, -113, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -113, -100,  -93,  -84,  -63, 
+    -58,  -48,  -53,  -54,  -52,  -52,  -57,  -64, 
+    -66,  -76,  -83,  -81,  -85,  -85,  -90,  -95, 
+    -98, -101, -103, -106, -108, -111, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -105,  -95,  -86,  -74,  -53, 
+    -50,  -38,  -43,  -49,  -43,  -42,  -39,  -39, 
+    -46,  -52,  -57,  -56,  -72,  -69,  -74,  -81, 
+    -87,  -92,  -94,  -97,  -99, -102, -105, -108, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -108,  -99,  -90,  -76,  -66,  -45, 
+    -43,  -41,  -44,  -47,  -43,  -47,  -40,  -30, 
+    -31,  -31,  -39,  -33,  -40,  -41,  -43,  -53, 
+    -59,  -70,  -73,  -77,  -79,  -82,  -84,  -87, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 4000 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110,  -91,  -76, 
+    -75,  -85,  -93,  -98, -104, -110, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999},
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110,  -91,  -70, 
+    -70,  -75,  -86,  -89,  -94,  -98, -101, -106, 
+    -110, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -110,  -95,  -80,  -60, 
+    -65,  -64,  -74,  -83,  -88,  -91,  -95,  -99, 
+    -103, -107, -110, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -110,  -95,  -80,  -58, 
+    -55,  -49,  -66,  -68,  -71,  -78,  -78,  -80, 
+    -88,  -85,  -89,  -97, -100, -105, -110, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -110,  -95,  -80,  -53, 
+    -52,  -41,  -59,  -59,  -49,  -58,  -56,  -63, 
+    -86,  -79,  -90,  -93,  -98, -103, -107, -112, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110,  -97,  -91,  -73,  -45, 
+    -40,  -33,  -53,  -61,  -49,  -54,  -50,  -50, 
+    -60,  -52,  -67,  -74,  -81,  -92,  -96, -100, 
+    -105, -110, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 5657 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -113, -106,  -99,  -92,  -77, 
+    -80,  -88,  -97, -106, -115, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -116, -109, -102,  -95,  -89,  -74, 
+    -72,  -88,  -87,  -95, -102, -109, -116, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -116, -109, -102,  -95,  -89,  -75, 
+    -66,  -74,  -77,  -78,  -86,  -87,  -90,  -96, 
+    -105, -115, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -115, -108, -101,  -94,  -88,  -66, 
+    -56,  -61,  -70,  -65,  -78,  -72,  -83,  -84, 
+    -93,  -98, -105, -110, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -110, -105,  -95,  -89,  -82,  -57, 
+    -52,  -52,  -59,  -56,  -59,  -58,  -69,  -67, 
+    -88,  -82,  -82,  -89,  -94, -100, -108, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -110, -101,  -96,  -90,  -83,  -77,  -54, 
+    -43,  -38,  -50,  -48,  -52,  -48,  -42,  -42, 
+    -51,  -52,  -53,  -59,  -65,  -71,  -78,  -85, 
+    -95, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 8000 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -120, -105,  -86,  -68, 
+    -78,  -79,  -90, -100, -110, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -120, -105,  -86,  -66, 
+    -73,  -77,  -88,  -96, -105, -115, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -120, -105,  -92,  -80,  -61, 
+    -64,  -68,  -80,  -87,  -92, -100, -110, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -120, -104,  -91,  -79,  -52, 
+    -60,  -54,  -64,  -69,  -77,  -80,  -82,  -84, 
+    -85,  -87,  -88,  -90, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -118, -100,  -87,  -77,  -49, 
+    -50,  -44,  -58,  -61,  -61,  -67,  -65,  -62, 
+    -62,  -62,  -65,  -68, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -115,  -98,  -84,  -62,  -49, 
+    -44,  -38,  -46,  -49,  -49,  -46,  -39,  -37, 
+    -39,  -40,  -42,  -43, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 11314 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110,  -88,  -74, 
+    -77,  -82,  -82,  -85,  -90,  -94,  -99, -104, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110,  -88,  -66, 
+    -70,  -81,  -80,  -81,  -84,  -88,  -91,  -93, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110,  -88,  -61, 
+    -63,  -70,  -71,  -74,  -77,  -80,  -83,  -85, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -110, -86, -62, 
+    -63,  -62,  -62,  -58,  -52,  -50,  -50,  -52, 
+    -54, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -118, -108,  -84,  -53, 
+    -50,  -50,  -50,  -55,  -47,  -45,  -40,  -40, 
+    -40, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -118, -100,  -73,  -43, 
+    -37,  -42,  -43,  -53,  -38,  -37,  -35,  -35, 
+    -38, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}, 
+  /* 16000 Hz */
+  {{-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -91,  -84,  -74, 
+    -80,  -80,  -80,  -80,  -80, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -91,  -84,  -74, 
+    -68,  -68,  -68,  -68,  -68, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -86,  -78,  -70, 
+    -60,  -45,  -30,  -21, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -87,  -78,  -67, 
+    -48,  -38,  -29,  -21, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -86,  -69,  -56, 
+    -45,  -35,  -33,  -29, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}, 
+   {-999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -110, -100,  -83,  -71,  -48, 
+    -27,  -38,  -37,  -34, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999, 
+    -999, -999, -999, -999, -999, -999, -999, -999}}
+}; 
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/mdct.c
@@ -1,0 +1,571 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: normalized modified discrete cosine transform
+           power of two length transform only [64 <= n ]
+ last mod: $Id: mdct.c,v 1.31 2002/06/28 22:19:36 xiphmont Exp $
+
+ Original algorithm adapted long ago from _The use of multirate filter
+ banks for coding of high quality digital audio_, by T. Sporer,
+ K. Brandenburg and B. Edler, collection of the European Signal
+ Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp
+ 211-214
+
+ The below code implements an algorithm that no longer looks much like
+ that presented in the paper, but the basic structure remains if you
+ dig deep enough to see it.
+
+ This module DOES NOT INCLUDE code to generate/apply the window
+ function.  Everybody has their own weird favorite including me... I
+ happen to like the properties of y=sin(2PI*sin^2(x)), but others may
+ vehemently disagree.
+
+ ********************************************************************/
+
+/* this can also be run as an integer transform by uncommenting a
+   define in mdct.h; the integerization is a first pass and although
+   it's likely stable for Vorbis, the dynamic range is constrained and
+   roundoff isn't done (so it's noisy).  Consider it functional, but
+   only a starting point.  There's no point on a machine with an FPU */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "vorbis/codec.h"
+#include "mdct.h"
+#include "os.h"
+#include "misc.h"
+
+/* build lookups for trig functions; also pre-figure scaling and
+   some window function algebra. */
+
+void mdct_init(mdct_lookup *lookup,int n){
+  int   *bitrev=_ogg_malloc(sizeof(*bitrev)*(n/4));
+  DATA_TYPE *T=_ogg_malloc(sizeof(*T)*(n+n/4));
+  
+  int i;
+  int n2=n>>1;
+  int log2n=lookup->log2n=rint(log((float)n)/log(2.f));
+  lookup->n=n;
+  lookup->trig=T;
+  lookup->bitrev=bitrev;
+
+/* trig lookups... */
+
+  for(i=0;i<n/4;i++){
+    T[i*2]=FLOAT_CONV(cos((M_PI/n)*(4*i)));
+    T[i*2+1]=FLOAT_CONV(-sin((M_PI/n)*(4*i)));
+    T[n2+i*2]=FLOAT_CONV(cos((M_PI/(2*n))*(2*i+1)));
+    T[n2+i*2+1]=FLOAT_CONV(sin((M_PI/(2*n))*(2*i+1)));
+  }
+  for(i=0;i<n/8;i++){
+    T[n+i*2]=FLOAT_CONV(cos((M_PI/n)*(4*i+2))*.5);
+    T[n+i*2+1]=FLOAT_CONV(-sin((M_PI/n)*(4*i+2))*.5);
+  }
+
+  /* bitreverse lookup... */
+
+  {
+    int mask=(1<<(log2n-1))-1,i,j;
+    int msb=1<<(log2n-2);
+    for(i=0;i<n/8;i++){
+      int acc=0;
+      for(j=0;msb>>j;j++)
+	if((msb>>j)&i)acc|=1<<j;
+      bitrev[i*2]=((~acc)&mask)-1;
+      bitrev[i*2+1]=acc;
+
+    }
+  }
+  lookup->scale=FLOAT_CONV(4.f/n);
+}
+
+/* 8 point butterfly (in place, 4 register) */
+STIN void mdct_butterfly_8(DATA_TYPE *x){
+  REG_TYPE r0   = x[6] + x[2];
+  REG_TYPE r1   = x[6] - x[2];
+  REG_TYPE r2   = x[4] + x[0];
+  REG_TYPE r3   = x[4] - x[0];
+
+	   x[6] = r0   + r2;
+	   x[4] = r0   - r2;
+	   
+	   r0   = x[5] - x[1];
+	   r2   = x[7] - x[3];
+	   x[0] = r1   + r0;
+	   x[2] = r1   - r0;
+	   
+	   r0   = x[5] + x[1];
+	   r1   = x[7] + x[3];
+	   x[3] = r2   + r3;
+	   x[1] = r2   - r3;
+	   x[7] = r1   + r0;
+	   x[5] = r1   - r0;
+	   
+}
+
+/* 16 point butterfly (in place, 4 register) */
+STIN void mdct_butterfly_16(DATA_TYPE *x){
+  REG_TYPE r0     = x[1]  - x[9];
+  REG_TYPE r1     = x[0]  - x[8];
+
+           x[8]  += x[0];
+           x[9]  += x[1];
+           x[0]   = MULT_NORM((r0   + r1) * cPI2_8);
+           x[1]   = MULT_NORM((r0   - r1) * cPI2_8);
+
+           r0     = x[3]  - x[11];
+           r1     = x[10] - x[2];
+           x[10] += x[2];
+           x[11] += x[3];
+           x[2]   = r0;
+           x[3]   = r1;
+
+           r0     = x[12] - x[4];
+           r1     = x[13] - x[5];
+           x[12] += x[4];
+           x[13] += x[5];
+           x[4]   = MULT_NORM((r0   - r1) * cPI2_8);
+           x[5]   = MULT_NORM((r0   + r1) * cPI2_8);
+
+           r0     = x[14] - x[6];
+           r1     = x[15] - x[7];
+           x[14] += x[6];
+           x[15] += x[7];
+           x[6]  = r0;
+           x[7]  = r1;
+
+	   mdct_butterfly_8(x);
+	   mdct_butterfly_8(x+8);
+}
+
+/* 32 point butterfly (in place, 4 register) */
+STIN void mdct_butterfly_32(DATA_TYPE *x){
+  REG_TYPE r0     = x[30] - x[14];
+  REG_TYPE r1     = x[31] - x[15];
+
+           x[30] +=         x[14];           
+	   x[31] +=         x[15];
+           x[14]  =         r0;              
+	   x[15]  =         r1;
+
+           r0     = x[28] - x[12];   
+	   r1     = x[29] - x[13];
+           x[28] +=         x[12];           
+	   x[29] +=         x[13];
+           x[12]  = MULT_NORM( r0 * cPI1_8  -  r1 * cPI3_8 );
+	   x[13]  = MULT_NORM( r0 * cPI3_8  +  r1 * cPI1_8 );
+
+           r0     = x[26] - x[10];
+	   r1     = x[27] - x[11];
+	   x[26] +=         x[10];
+	   x[27] +=         x[11];
+	   x[10]  = MULT_NORM(( r0  - r1 ) * cPI2_8);
+	   x[11]  = MULT_NORM(( r0  + r1 ) * cPI2_8);
+
+	   r0     = x[24] - x[8];
+	   r1     = x[25] - x[9];
+	   x[24] += x[8];
+	   x[25] += x[9];
+	   x[8]   = MULT_NORM( r0 * cPI3_8  -  r1 * cPI1_8 );
+	   x[9]   = MULT_NORM( r1 * cPI3_8  +  r0 * cPI1_8 );
+
+	   r0     = x[22] - x[6];
+	   r1     = x[7]  - x[23];
+	   x[22] += x[6];
+	   x[23] += x[7];
+	   x[6]   = r1;
+	   x[7]   = r0;
+
+	   r0     = x[4]  - x[20];
+	   r1     = x[5]  - x[21];
+	   x[20] += x[4];
+	   x[21] += x[5];
+	   x[4]   = MULT_NORM( r1 * cPI1_8  +  r0 * cPI3_8 );
+	   x[5]   = MULT_NORM( r1 * cPI3_8  -  r0 * cPI1_8 );
+
+	   r0     = x[2]  - x[18];
+	   r1     = x[3]  - x[19];
+	   x[18] += x[2];
+	   x[19] += x[3];
+	   x[2]   = MULT_NORM(( r1  + r0 ) * cPI2_8);
+	   x[3]   = MULT_NORM(( r1  - r0 ) * cPI2_8);
+
+	   r0     = x[0]  - x[16];
+	   r1     = x[1]  - x[17];
+	   x[16] += x[0];
+	   x[17] += x[1];
+	   x[0]   = MULT_NORM( r1 * cPI3_8  +  r0 * cPI1_8 );
+	   x[1]   = MULT_NORM( r1 * cPI1_8  -  r0 * cPI3_8 );
+
+	   mdct_butterfly_16(x);
+	   mdct_butterfly_16(x+16);
+
+}
+
+/* N point first stage butterfly (in place, 2 register) */
+STIN void mdct_butterfly_first(DATA_TYPE *T,
+					DATA_TYPE *x,
+					int points){
+  
+  DATA_TYPE *x1        = x          + points      - 8;
+  DATA_TYPE *x2        = x          + (points>>1) - 8;
+  REG_TYPE   r0;
+  REG_TYPE   r1;
+
+  do{
+    
+               r0      = x1[6]      -  x2[6];
+	       r1      = x1[7]      -  x2[7];
+	       x1[6]  += x2[6];
+	       x1[7]  += x2[7];
+	       x2[6]   = MULT_NORM(r1 * T[1]  +  r0 * T[0]);
+	       x2[7]   = MULT_NORM(r1 * T[0]  -  r0 * T[1]);
+	       
+	       r0      = x1[4]      -  x2[4];
+	       r1      = x1[5]      -  x2[5];
+	       x1[4]  += x2[4];
+	       x1[5]  += x2[5];
+	       x2[4]   = MULT_NORM(r1 * T[5]  +  r0 * T[4]);
+	       x2[5]   = MULT_NORM(r1 * T[4]  -  r0 * T[5]);
+	       
+	       r0      = x1[2]      -  x2[2];
+	       r1      = x1[3]      -  x2[3];
+	       x1[2]  += x2[2];
+	       x1[3]  += x2[3];
+	       x2[2]   = MULT_NORM(r1 * T[9]  +  r0 * T[8]);
+	       x2[3]   = MULT_NORM(r1 * T[8]  -  r0 * T[9]);
+	       
+	       r0      = x1[0]      -  x2[0];
+	       r1      = x1[1]      -  x2[1];
+	       x1[0]  += x2[0];
+	       x1[1]  += x2[1];
+	       x2[0]   = MULT_NORM(r1 * T[13] +  r0 * T[12]);
+	       x2[1]   = MULT_NORM(r1 * T[12] -  r0 * T[13]);
+	       
+    x1-=8;
+    x2-=8;
+    T+=16;
+
+  }while(x2>=x);
+}
+
+/* N/stage point generic N stage butterfly (in place, 2 register) */
+STIN void mdct_butterfly_generic(DATA_TYPE *T,
+					  DATA_TYPE *x,
+					  int points,
+					  int trigint){
+  
+  DATA_TYPE *x1        = x          + points      - 8;
+  DATA_TYPE *x2        = x          + (points>>1) - 8;
+  REG_TYPE   r0;
+  REG_TYPE   r1;
+
+  do{
+    
+               r0      = x1[6]      -  x2[6];
+	       r1      = x1[7]      -  x2[7];
+	       x1[6]  += x2[6];
+	       x1[7]  += x2[7];
+	       x2[6]   = MULT_NORM(r1 * T[1]  +  r0 * T[0]);
+	       x2[7]   = MULT_NORM(r1 * T[0]  -  r0 * T[1]);
+	       
+	       T+=trigint;
+	       
+	       r0      = x1[4]      -  x2[4];
+	       r1      = x1[5]      -  x2[5];
+	       x1[4]  += x2[4];
+	       x1[5]  += x2[5];
+	       x2[4]   = MULT_NORM(r1 * T[1]  +  r0 * T[0]);
+	       x2[5]   = MULT_NORM(r1 * T[0]  -  r0 * T[1]);
+	       
+	       T+=trigint;
+	       
+	       r0      = x1[2]      -  x2[2];
+	       r1      = x1[3]      -  x2[3];
+	       x1[2]  += x2[2];
+	       x1[3]  += x2[3];
+	       x2[2]   = MULT_NORM(r1 * T[1]  +  r0 * T[0]);
+	       x2[3]   = MULT_NORM(r1 * T[0]  -  r0 * T[1]);
+	       
+	       T+=trigint;
+	       
+	       r0      = x1[0]      -  x2[0];
+	       r1      = x1[1]      -  x2[1];
+	       x1[0]  += x2[0];
+	       x1[1]  += x2[1];
+	       x2[0]   = MULT_NORM(r1 * T[1]  +  r0 * T[0]);
+	       x2[1]   = MULT_NORM(r1 * T[0]  -  r0 * T[1]);
+
+	       T+=trigint;
+    x1-=8;
+    x2-=8;
+
+  }while(x2>=x);
+}
+
+STIN void mdct_butterflies(mdct_lookup *init,
+			     DATA_TYPE *x,
+			     int points){
+  
+  DATA_TYPE *T=init->trig;
+  int stages=init->log2n-5;
+  int i,j;
+  
+  if(--stages>0){
+    mdct_butterfly_first(T,x,points);
+  }
+
+  for(i=1;--stages>0;i++){
+    for(j=0;j<(1<<i);j++)
+      mdct_butterfly_generic(T,x+(points>>i)*j,points>>i,4<<i);
+  }
+
+  for(j=0;j<points;j+=32)
+    mdct_butterfly_32(x+j);
+
+}
+
+void mdct_clear(mdct_lookup *l){
+  if(l){
+    if(l->trig)_ogg_free(l->trig);
+    if(l->bitrev)_ogg_free(l->bitrev);
+    memset(l,0,sizeof(*l));
+  }
+}
+
+STIN void mdct_bitreverse(mdct_lookup *init, 
+			    DATA_TYPE *x){
+  int        n       = init->n;
+  int       *bit     = init->bitrev;
+  DATA_TYPE *w0      = x;
+  DATA_TYPE *w1      = x = w0+(n>>1);
+  DATA_TYPE *T       = init->trig+n;
+
+  do{
+    DATA_TYPE *x0    = x+bit[0];
+    DATA_TYPE *x1    = x+bit[1];
+
+    REG_TYPE  r0     = x0[1]  - x1[1];
+    REG_TYPE  r1     = x0[0]  + x1[0];
+    REG_TYPE  r2     = MULT_NORM(r1     * T[0]   + r0 * T[1]);
+    REG_TYPE  r3     = MULT_NORM(r1     * T[1]   - r0 * T[0]);
+
+	      w1    -= 4;
+
+              r0     = HALVE(x0[1] + x1[1]);
+              r1     = HALVE(x0[0] - x1[0]);
+      
+	      w0[0]  = r0     + r2;
+	      w1[2]  = r0     - r2;
+	      w0[1]  = r1     + r3;
+	      w1[3]  = r3     - r1;
+
+              x0     = x+bit[2];
+              x1     = x+bit[3];
+
+              r0     = x0[1]  - x1[1];
+              r1     = x0[0]  + x1[0];
+              r2     = MULT_NORM(r1     * T[2]   + r0 * T[3]);
+              r3     = MULT_NORM(r1     * T[3]   - r0 * T[2]);
+
+              r0     = HALVE(x0[1] + x1[1]);
+              r1     = HALVE(x0[0] - x1[0]);
+      
+	      w0[2]  = r0     + r2;
+	      w1[0]  = r0     - r2;
+	      w0[3]  = r1     + r3;
+	      w1[1]  = r3     - r1;
+
+	      T     += 4;
+	      bit   += 4;
+	      w0    += 4;
+
+  }while(w0<w1);
+}
+
+void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){
+  int n=init->n;
+  int n2=n>>1;
+  int n4=n>>2;
+
+  /* rotate */
+
+  DATA_TYPE *iX = in+n2-7;
+  DATA_TYPE *oX = out+n2+n4;
+  DATA_TYPE *T  = init->trig+n4;
+
+  do{
+    oX         -= 4;
+    oX[0]       = MULT_NORM(-iX[2] * T[3] - iX[0]  * T[2]);
+    oX[1]       = MULT_NORM (iX[0] * T[3] - iX[2]  * T[2]);
+    oX[2]       = MULT_NORM(-iX[6] * T[1] - iX[4]  * T[0]);
+    oX[3]       = MULT_NORM (iX[4] * T[1] - iX[6]  * T[0]);
+    iX         -= 8;
+    T          += 4;
+  }while(iX>=in);
+
+  iX            = in+n2-8;
+  oX            = out+n2+n4;
+  T             = init->trig+n4;
+
+  do{
+    T          -= 4;
+    oX[0]       =  MULT_NORM (iX[4] * T[3] + iX[6] * T[2]);
+    oX[1]       =  MULT_NORM (iX[4] * T[2] - iX[6] * T[3]);
+    oX[2]       =  MULT_NORM (iX[0] * T[1] + iX[2] * T[0]);
+    oX[3]       =  MULT_NORM (iX[0] * T[0] - iX[2] * T[1]);
+    iX         -= 8;
+    oX         += 4;
+  }while(iX>=in);
+
+  mdct_butterflies(init,out+n2,n2);
+  mdct_bitreverse(init,out);
+
+  /* roatate + window */
+
+  {
+    DATA_TYPE *oX1=out+n2+n4;
+    DATA_TYPE *oX2=out+n2+n4;
+    DATA_TYPE *iX =out;
+    T             =init->trig+n2;
+    
+    do{
+      oX1-=4;
+
+      oX1[3]  =  MULT_NORM (iX[0] * T[1] - iX[1] * T[0]);
+      oX2[0]  = -MULT_NORM (iX[0] * T[0] + iX[1] * T[1]);
+
+      oX1[2]  =  MULT_NORM (iX[2] * T[3] - iX[3] * T[2]);
+      oX2[1]  = -MULT_NORM (iX[2] * T[2] + iX[3] * T[3]);
+
+      oX1[1]  =  MULT_NORM (iX[4] * T[5] - iX[5] * T[4]);
+      oX2[2]  = -MULT_NORM (iX[4] * T[4] + iX[5] * T[5]);
+
+      oX1[0]  =  MULT_NORM (iX[6] * T[7] - iX[7] * T[6]);
+      oX2[3]  = -MULT_NORM (iX[6] * T[6] + iX[7] * T[7]);
+
+      oX2+=4;
+      iX    +=   8;
+      T     +=   8;
+    }while(iX<oX1);
+
+    iX=out+n2+n4;
+    oX1=out+n4;
+    oX2=oX1;
+
+    do{
+      oX1-=4;
+      iX-=4;
+
+      oX2[0] = -(oX1[3] = iX[3]);
+      oX2[1] = -(oX1[2] = iX[2]);
+      oX2[2] = -(oX1[1] = iX[1]);
+      oX2[3] = -(oX1[0] = iX[0]);
+
+      oX2+=4;
+    }while(oX2<iX);
+
+    iX=out+n2+n4;
+    oX1=out+n2+n4;
+    oX2=out+n2;
+    do{
+      oX1-=4;
+      oX1[0]= iX[3];
+      oX1[1]= iX[2];
+      oX1[2]= iX[1];
+      oX1[3]= iX[0];
+      iX+=4;
+    }while(oX1>oX2);
+  }
+}
+
+void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){
+  int n=init->n;
+  int n2=n>>1;
+  int n4=n>>2;
+  int n8=n>>3;
+  DATA_TYPE *w=malloc(n*sizeof(*w)); /* forward needs working space */
+  DATA_TYPE *w2=w+n2;
+  DATA_TYPE *free_me;
+
+
+  /* rotate */
+
+  /* window + rotate + step 1 */
+  
+  REG_TYPE r0;
+  REG_TYPE r1;
+  DATA_TYPE *x0=in+n2+n4;
+  DATA_TYPE *x1=x0+1;
+  DATA_TYPE *T=init->trig+n2;
+
+  int i=0;
+
+  free_me = w;
+
+  for(i=0;i<n8;i+=2){
+    x0 -=4;
+    T-=2;
+    r0= x0[2] + x1[0];
+    r1= x0[0] + x1[2];       
+    w2[i]=   MULT_NORM(r1*T[1] + r0*T[0]);
+    w2[i+1]= MULT_NORM(r1*T[0] - r0*T[1]);
+    x1 +=4;
+  }
+
+  x1=in+1;
+  
+  for(;i<n2-n8;i+=2){
+    T-=2;
+    x0 -=4;
+    r0= x0[2] - x1[0];
+    r1= x0[0] - x1[2];       
+    w2[i]=   MULT_NORM(r1*T[1] + r0*T[0]);
+    w2[i+1]= MULT_NORM(r1*T[0] - r0*T[1]);
+    x1 +=4;
+  }
+    
+  x0=in+n;
+
+  for(;i<n2;i+=2){
+    T-=2;
+    x0 -=4;
+    r0= -x0[2] - x1[0];
+    r1= -x0[0] - x1[2];       
+    w2[i]=   MULT_NORM(r1*T[1] + r0*T[0]);
+    w2[i+1]= MULT_NORM(r1*T[0] - r0*T[1]);
+    x1 +=4;
+  }
+
+
+  mdct_butterflies(init,w+n2,n2);
+  mdct_bitreverse(init,w);
+
+  /* roatate + window */
+
+  T=init->trig+n2;
+  x0=out+n2;
+
+  for(i=0;i<n4;i++){
+    x0--;
+    out[i] =MULT_NORM((w[0]*T[0]+w[1]*T[1])*init->scale);
+    x0[0]  =MULT_NORM((w[0]*T[1]-w[1]*T[0])*init->scale);
+    w+=2;
+    T+=2;
+  }
+
+  free(free_me);
+
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/mdct.h
@@ -1,0 +1,83 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: modified discrete cosine transform prototypes
+ last mod: $Id: mdct.h,v 1.20 2002/01/22 11:59:00 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _OGG_mdct_H_
+#define _OGG_mdct_H_
+
+#include "vorbis/codec.h"
+
+
+
+
+
+/*#define MDCT_INTEGERIZED  <- be warned there could be some hurt left here*/
+#ifdef MDCT_INTEGERIZED
+
+#define DATA_TYPE int
+#define REG_TYPE  register int
+#define TRIGBITS 14
+#define cPI3_8 6270
+#define cPI2_8 11585
+#define cPI1_8 15137
+
+#define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
+#define MULT_NORM(x) ((x)>>TRIGBITS)
+#define HALVE(x) ((x)>>1)
+
+#else
+
+#define DATA_TYPE float
+#define REG_TYPE  float
+#define cPI3_8 .38268343236508977175F
+#define cPI2_8 .70710678118654752441F
+#define cPI1_8 .92387953251128675613F
+
+#define FLOAT_CONV(x) (x)
+#define MULT_NORM(x) (x)
+#define HALVE(x) ((x)*.5f)
+
+#endif
+
+
+typedef struct {
+  int n;
+  int log2n;
+  
+  DATA_TYPE *trig;
+  int       *bitrev;
+
+  DATA_TYPE scale;
+} mdct_lookup;
+
+extern void mdct_init(mdct_lookup *lookup,int n);
+extern void mdct_clear(mdct_lookup *l);
+extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
+extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/misc.h
@@ -1,0 +1,52 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: miscellaneous prototypes
+ last mod: $Id: misc.h,v 1.12 2002/06/28 22:19:37 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_RANDOM_H_
+#define _V_RANDOM_H_
+#include "vorbis/codec.h"
+
+extern int analysis_noisy;
+
+extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
+extern void _vorbis_block_ripcord(vorbis_block *vb);
+extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB,
+			     ogg_int64_t off);
+
+#ifdef DEBUG_MALLOC
+
+#define _VDBG_GRAPHFILE "malloc.m"
+extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); 
+extern void _VDBG_free(void *ptr,char *file,long line); 
+
+#ifndef MISC_C 
+#undef _ogg_malloc
+#undef _ogg_calloc
+#undef _ogg_realloc
+#undef _ogg_free
+
+#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
+#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
+#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
+#define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__)
+#endif
+#endif
+
+#endif
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/mkfile
@@ -1,0 +1,43 @@
+</$objtype/mkfile
+
+CC=pcc
+CFLAGS=-I. -I../libogg -c
+LIB=libvorbis.a$O
+
+OFILES=\
+	mdct.$O\
+	smallft.$O\
+	block.$O\
+	envelope.$O\
+	window.$O\
+	lsp.$O\
+	lpc.$O\
+	analysis.$O\
+	synthesis.$O\
+	psy.$O\
+	info.$O\
+	floor1.$O\
+	floor0.$O\
+	res0.$O\
+	mapping0.$O\
+	registry.$O\
+	codebook.$O\
+	sharedbook.$O\
+	lookup.$O\
+	bitrate.$O\
+	vorbisfile.$O\
+	vorbisenc.$O\
+
+HFILES=\
+
+UPDATE=\
+	mkfile\
+	$HFILES\
+	${OFILES:%.$O=%.c}\
+	${LIB:/$objtype/%=/386/%}\
+
+</sys/src/cmd/mklib
+
+nuke:V:
+	mk clean
+	rm -f libvorbis.a[$OS]
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/floor_all.h
@@ -1,0 +1,226 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: key floor settings
+ last mod: $Id: floor_all.h,v 1.1 2002/07/11 06:41:04 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "vorbis/codec.h"
+#include "backends.h"
+#include "books/floor/floor_books.h"
+
+static static_codebook *_floor_128x4_books[]={
+  &_huff_book_line_128x4_class0,
+  &_huff_book_line_128x4_0sub0,
+  &_huff_book_line_128x4_0sub1,
+  &_huff_book_line_128x4_0sub2,
+  &_huff_book_line_128x4_0sub3,
+};
+static static_codebook *_floor_256x4_books[]={
+  &_huff_book_line_256x4_class0,
+  &_huff_book_line_256x4_0sub0,
+  &_huff_book_line_256x4_0sub1,
+  &_huff_book_line_256x4_0sub2,
+  &_huff_book_line_256x4_0sub3,
+};
+static static_codebook *_floor_128x7_books[]={
+  &_huff_book_line_128x7_class0,
+  &_huff_book_line_128x7_class1,
+  
+  &_huff_book_line_128x7_0sub1,
+  &_huff_book_line_128x7_0sub2,
+  &_huff_book_line_128x7_0sub3,
+  &_huff_book_line_128x7_1sub1,
+  &_huff_book_line_128x7_1sub2,
+  &_huff_book_line_128x7_1sub3, 
+};
+static static_codebook *_floor_256x7_books[]={
+  &_huff_book_line_256x7_class0,
+  &_huff_book_line_256x7_class1,
+  
+  &_huff_book_line_256x7_0sub1,
+  &_huff_book_line_256x7_0sub2,
+  &_huff_book_line_256x7_0sub3,
+  &_huff_book_line_256x7_1sub1,
+  &_huff_book_line_256x7_1sub2,
+  &_huff_book_line_256x7_1sub3, 
+};
+static static_codebook *_floor_128x11_books[]={
+  &_huff_book_line_128x11_class1,
+  &_huff_book_line_128x11_class2,
+  &_huff_book_line_128x11_class3,
+  
+  &_huff_book_line_128x11_0sub0,
+  &_huff_book_line_128x11_1sub0,
+  &_huff_book_line_128x11_1sub1,
+  &_huff_book_line_128x11_2sub1,
+  &_huff_book_line_128x11_2sub2,
+  &_huff_book_line_128x11_2sub3, 
+  &_huff_book_line_128x11_3sub1,
+  &_huff_book_line_128x11_3sub2,
+  &_huff_book_line_128x11_3sub3, 
+};
+static static_codebook *_floor_128x17_books[]={
+  &_huff_book_line_128x17_class1,
+  &_huff_book_line_128x17_class2,
+  &_huff_book_line_128x17_class3,
+  
+  &_huff_book_line_128x17_0sub0,
+  &_huff_book_line_128x17_1sub0,
+  &_huff_book_line_128x17_1sub1,
+  &_huff_book_line_128x17_2sub1,
+  &_huff_book_line_128x17_2sub2,
+  &_huff_book_line_128x17_2sub3, 
+  &_huff_book_line_128x17_3sub1,
+  &_huff_book_line_128x17_3sub2,
+  &_huff_book_line_128x17_3sub3, 
+};
+static static_codebook *_floor_512x17_books[]={
+  &_huff_book_line_512x17_class1,
+  &_huff_book_line_512x17_class2,
+  &_huff_book_line_512x17_class3,
+  
+  &_huff_book_line_512x17_0sub0,
+  &_huff_book_line_512x17_1sub0,
+  &_huff_book_line_512x17_1sub1,
+  &_huff_book_line_512x17_2sub1,
+  &_huff_book_line_512x17_2sub2,
+  &_huff_book_line_512x17_2sub3, 
+  &_huff_book_line_512x17_3sub1,
+  &_huff_book_line_512x17_3sub2,
+  &_huff_book_line_512x17_3sub3, 
+};
+static static_codebook *_floor_1024x27_books[]={
+  &_huff_book_line_1024x27_class1,
+  &_huff_book_line_1024x27_class2,
+  &_huff_book_line_1024x27_class3,
+  &_huff_book_line_1024x27_class4,
+  
+  &_huff_book_line_1024x27_0sub0,
+  &_huff_book_line_1024x27_1sub0,
+  &_huff_book_line_1024x27_1sub1,
+  &_huff_book_line_1024x27_2sub0,
+  &_huff_book_line_1024x27_2sub1,
+  &_huff_book_line_1024x27_3sub1,
+  &_huff_book_line_1024x27_3sub2,
+  &_huff_book_line_1024x27_3sub3,
+  &_huff_book_line_1024x27_4sub1,
+  &_huff_book_line_1024x27_4sub2,
+  &_huff_book_line_1024x27_4sub3,
+};
+
+static static_codebook **_floor_books[10]={
+  _floor_128x4_books,
+  _floor_256x4_books,
+  _floor_128x7_books,
+  _floor_256x7_books,
+  _floor_128x11_books,
+  _floor_128x17_books,
+  _floor_128x17_books,
+  _floor_1024x27_books,
+  _floor_1024x27_books,
+  _floor_512x17_books,
+};
+
+static vorbis_info_floor1 _floor[10]={
+  /* 128 x 4 */
+  {
+    1,{0},{4},{2},{0},
+    {{1,2,3,4}},
+    4,{0,128, 33,8,16,70},
+
+    60,30,500,   1.,18.,  -1
+  },
+  /* 256 x 4 */
+  {
+    1,{0},{4},{2},{0},
+    {{1,2,3,4}},
+    4,{0,256, 66,16,32,140},
+
+    60,30,500,   1.,18.,  -1
+  },
+  /* 128 x 7 */
+  {
+    2,{0,1},{3,4},{2,2},{0,1},
+    {{-1,2,3,4},{-1,5,6,7}},
+    4,{0,128, 14,4,58, 2,8,28,90},
+    
+    60,30,500,   1.,18.,  -1
+  },
+  /* 256 x 7 */
+  {
+    2,{0,1},{3,4},{2,2},{0,1},
+    {{-1,2,3,4},{-1,5,6,7}},
+    4,{0,256, 28,8,116, 4,16,56,180},
+    
+    60,30,500,   1.,18.,  -1
+  },
+
+  /* 128 x 11 */
+  {
+    4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
+    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
+    
+    2,{0,128,  8,33,  4,16,70,  2,6,12,  23,46,90},
+    
+     60,30,500,   1,18.,  -1
+  },
+    
+  /* 128 x 17 */
+  {
+    6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
+    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
+    2,{0,128,  12,46,  4,8,16,  23,33,70,  2,6,10,  14,19,28,  39,58,90},
+
+    60,30,500,    1,18.,  -1 
+  },
+  
+  /* 1024 x 17 */
+  {
+    6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
+    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
+    2,{0,1024,  93,372,  33,65,130,  186,260,556,  
+       14,46,79,  111,158,220,  312,464,720},
+    
+    60,30,500,    1,18.,  -1 /* lowpass! */
+  },
+  /* 1024 x 27 */
+  {
+    8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
+    {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
+    2,{0,1024,   93,23,372, 6,46,186,750,  14,33,65, 130,260,556,
+       3,10,18,28,  39,55,79,111,  158,220,312,  464,650,850},
+    
+    60,30,500,    3,18.,  -1 /* lowpass */
+  },
+  /* 2048 x 27 */
+  {
+    8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
+    {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
+    2,{0,2048,   186,46,744, 12,92,372,1500,  28,66,130, 260,520,1112,
+       6,20,36,56,  78,110,158,222,  316,440,624,  928,1300,1700},
+    
+    60,30,500,    3,18.,  -1 /* lowpass */
+  },
+  /* 512 x 17 */
+  {
+    6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
+    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
+    2,{0,512,  46,186,  16,33,65,  93,130,278,  
+       7,23,39,  55,79,110,  156,232,360},
+    
+    60,30,500,    1,18.,  -1 /* lowpass! */
+  },
+
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/psych_11.h
@@ -1,0 +1,51 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 11kHz settings 
+ last mod: $Id: psych_11.h,v 1.1 2002/07/10 03:04:22 xiphmont Exp $
+
+ ********************************************************************/
+
+static double _psy_lowpass_11[3]={4.5,5.5,30.,};
+
+static att3 _psy_tone_masteratt_11[3]={
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 20,   0, -14},  0,  1.}, /* 0 */
+};
+
+static vp_adjblock _vp_tonemask_adj_11[3]={
+  /* adjust for mode zero */
+  /* 63     125     250     500     1     2     4     8    16 */
+  {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */
+  {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */
+  {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */
+};
+
+
+static noise3 _psy_noisebias_11[3]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4, 10, 10, 12, 12, 12, 99, 99, 99},
+    {-15,-15,-15,-15,-10,-10, -5,  0,  0,  4,  4,  5,  5, 10, 99, 99, 99},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
+
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4, 10, 10, 12, 12, 12, 99, 99, 99},
+    {-15,-15,-15,-15,-10,-10, -5, -5, -5,  0,  0,  0,  0,  0, 99, 99, 99},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5, 99, 99, 99},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
+};
+
+static double _noise_thresh_11[3]={ .3,.5,.5 };
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/psych_16.h
@@ -1,0 +1,130 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 16kHz settings 
+ last mod: $Id: psych_16.h,v 1.1 2002/07/10 03:04:22 xiphmont Exp $
+
+ ********************************************************************/
+
+/* stereo mode by base quality level */
+static adj_stereo _psy_stereo_modes_16[4]={
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  */
+  {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   {  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  4,  4},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   {  2,  2,  2,  2,  2,  2,  2,  2,  2,  3,  4,  4,  4,  4,  4},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  {{  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  5,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+};
+
+static double _psy_lowpass_16[4]={6.5,8,30.,99.};
+
+static att3 _psy_tone_masteratt_16[4]={
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 25,  22,  12},  0,   0},  /* 0 */
+  {{ 20,  12,   0},  0,   0},  /* 0 */
+  {{ 15,   0, -14},  0,   0}, /* 0 */
+};
+
+static vp_adjblock _vp_tonemask_adj_16[4]={
+  /* adjust for mode zero */
+  /* 63     125     250     500       1     2     4     8    16 */
+  {{-20,-20,-20,-20,-20,-16,-10,  0,  0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
+  {{-20,-20,-20,-20,-20,-16,-10,  0,  0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */
+  {{-20,-20,-20,-20,-20,-16,-10,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
+  {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
+};
+
+
+static noise3 _psy_noisebias_16_short[4]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  {{{-15,-15,-15,-15,-15,-10,-10,-5,   4, 10, 10, 10, 10, 12, 12, 14, 20},
+    {-15,-15,-15,-15,-15,-10,-10, -5,  0,  0,  4,  5,  5,  6,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
+
+  {{{-15,-15,-15,-15,-15,-10,-10,-5,   4,  6,  6,  6,  6,  8, 10, 12, 20},
+    {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5,  4,  5,  6,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8, 12},
+    {-20,-20,-20,-20,-16,-12,-20,-14,-10,-10, -8,  0,  0,  0,  0,  2,  5},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5,  0,  0,  0,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+};
+
+static noise3 _psy_noisebias_16_impulse[4]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  {{{-15,-15,-15,-15,-15,-10,-10,-5,   4, 10, 10, 10, 10, 12, 12, 14, 20},
+    {-15,-15,-15,-15,-15,-10,-10, -5,  0,  0,  4,  5,  5,  6,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
+
+  {{{-15,-15,-15,-15,-15,-10,-10,-5,   4,  4,  4,  4,  5,  5,  6,  8, 15},
+    {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5,  0,  0,  0,  0,  4, 10},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  4, 10},
+    {-20,-20,-20,-20,-16,-12,-20,-14,-10,-10,-10,-10,-10,-10,-10, -7, -5},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5,  0,  0,  0,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-18,-18,-18,-20,-20,-20,-20,-20,-20,-16},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+};
+
+static noise3 _psy_noisebias_16[4]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  6,  8,  8, 10, 10, 10, 14, 20},
+    {-10,-10,-10,-10,-10, -5, -2, -2,  0,  0,  0,  4,  5,  6,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
+
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  6,  6,  6,  6,  8, 10, 12, 20},
+    {-15,-15,-15,-15,-15,-10, -5, -5,  0,  0,  0,  4,  5,  6,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8, 12},
+    {-20,-20,-20,-20,-16,-12,-20,-10, -5, -5,  0,  0,  0,  0,  0,  2,  5},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5,  0,  0,  0,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
+};
+
+static double _noise_thresh_16[4]={ .3,.5,.5,.5 };
+
+static int _noise_start_16_short[3]={ 256,128,9999 };
+static int _noise_start_16[3]={ 256,256,9999 };
+static int _noise_part_16[4]={ 8,8,8,8 };
+
+static int _psy_ath_floater_16[4]={
+  -100,-100,-100,-105,
+};
+
+static int _psy_ath_abs_16[4]={
+  -110,-110,-120,-140,
+};
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/psych_44.h
@@ -1,0 +1,532 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: key psychoacoustic settings for 44.1/48kHz
+ last mod: $Id: psych_44.h,v 1.26 2002/07/13 06:12:49 xiphmont Exp $
+
+ ********************************************************************/
+
+
+/* preecho trigger settings *****************************************/
+
+static vorbis_info_psy_global _psy_global_44[5]={
+
+  {8,   /* lines per eighth octave */
+   {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, 
+   {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f,
+   -6.f,
+   {99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
+  },
+  {8,   /* lines per eighth octave */
+   {14.f,10.f,10.f,10.f,10.f,10.f,10.f}, 
+   {-40.f,-30.f,-25.f,-25.f,-25.f,-25.f,-25.f}, 2,-80.f,
+   -6.f,
+   {99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
+  },
+  {8,   /* lines per eighth octave */
+   {12.f,10.f,10.f,10.f,10.f,10.f,10.f}, 
+   {-20.f,-20.f,-15.f,-15.f,-15.f,-15.f,-15.f}, 0,-80.f,
+   -6.f,
+   {99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
+  },
+  {8,   /* lines per eighth octave */
+   {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, 
+   {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f,
+   -6.f,
+   {99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
+  },
+  {8,   /* lines per eighth octave */
+   {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, 
+   {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f,
+   -6.f,
+   {99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
+  },
+};
+
+/* noise compander lookups * low, mid, high quality ****************/
+static compandblock _psy_compand_44[6]={
+  /* sub-mode Z short */
+  {{
+    0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
+    8, 9,10,11,12,13,14, 15,     /* 15dB */
+    16,17,18,19,20,21,22, 23,     /* 23dB */
+    24,25,26,27,28,29,30, 31,     /* 31dB */
+    32,33,34,35,36,37,38, 39,     /* 39dB */
+  }},
+  /* mode_Z nominal short*/
+  {{
+     0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
+     7, 7, 7, 7, 6, 6, 6,  7,     /* 15dB */
+     7, 8, 9,10,11,12,13, 14,     /* 23dB */
+    15,16,17,17,17,18,18, 19,     /* 31dB */
+    19,19,20,21,22,23,24, 25,     /* 39dB */
+  }},
+  /* mode A short */
+  {{
+    0, 1, 2, 3, 4, 5, 5,  5,     /* 7dB */
+    6, 6, 6, 5, 4, 4, 4,  4,     /* 15dB */
+    4, 4, 5, 5, 5, 6, 6,  6,     /* 23dB */
+    7, 7, 7, 8, 8, 8, 9, 10,     /* 31dB */
+    11,12,13,14,15,16,17, 18,     /* 39dB */
+  }},
+  /* sub-mode Z long */
+  {{
+     0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
+     8, 9,10,11,12,13,14, 15,     /* 15dB */
+    16,17,18,19,20,21,22, 23,     /* 23dB */
+    24,25,26,27,28,29,30, 31,     /* 31dB */
+    32,33,34,35,36,37,38, 39,     /* 39dB */
+  }},
+  /* mode_Z nominal long */
+  {{
+    0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
+    8, 9,10,11,12,12,13, 13,     /* 15dB */
+    13,14,14,14,15,15,15, 15,     /* 23dB */
+    16,16,17,17,17,18,18, 19,     /* 31dB */
+    19,19,20,21,22,23,24, 25,     /* 39dB */
+  }},
+  /* mode A long */
+  {{
+    0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
+    8, 8, 7, 6, 5, 4, 4,  4,     /* 15dB */
+    4, 4, 5, 5, 5, 6, 6,  6,     /* 23dB */
+    7, 7, 7, 8, 8, 8, 9, 10,     /* 31dB */
+    11,12,13,14,15,16,17, 18,     /* 39dB */
+  }}
+};
+
+/* tonal masking curve level adjustments *************************/
+static vp_adjblock _vp_tonemask_adj_longblock[11]={
+  /* adjust for mode zero */
+  /* 63     125     250     500     1     2     4     8    16 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, /* 1 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 3 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 4 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 5 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 6 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 7 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 8 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 9 */
+  {{-15,-15,-15,-15,-15,-12,-10,-8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */
+};
+static vp_adjblock _vp_tonemask_adj_otherblock[11]={
+  /* adjust for mode zero */
+  /* 63     125     250     500       1     2     4     8    16 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, /* 1 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 3 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 4 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 5 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 6 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 7 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 8 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 9 */
+  {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */
+};
+
+static noise3 _psy_noisebias_trans_low[2]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  /* 0 */
+  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
+    {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2,  2,  2,  4,  8,  8, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
+  /* 1 */
+  {{{-15,-15,-15,-15,-15,-10, -5,  0,  2,  2,  6,  6,  6,  8, 10, 12, 15},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2,  0,  0,  0,  2,  4,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4,  -2}}},
+};
+static noise3 _psy_noisebias_long_low[2]={
+    /*63     125     250     500      1k       2k      4k      8k     16k*/
+  /* 0 */
+  {{{-10,-10,-10,-10,-10, -4,  0,  0,  0,  6,  6,  6,  6, 10, 10, 12,  20},
+    {-20,-20,-20,-20,-20,-20,-10, -2,  0,  0,  0,  0,  0,  2,  4,  6,  15},
+    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
+  /* 1 */
+  {{{-10,-10,-10,-10,-10,-10, -8, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2,  0,  0,  0,  0,  2,  4,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
+};
+
+static noise3 _psy_noisebias_trans[11]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  /* 0 */
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2,  0,  0,  2,  4,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4,  -2}}},
+  /* 1 */
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2,  0,  2,  8},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},
+  /* 2 */
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  2,  2,  4,  4,  5,  6,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2,  0,  2,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 3 */
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  2,  2,  4,  4,  4,  5,  8},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1,  1,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 4 */
+  {{{-20,-20,-20,-20,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1,  1,  5},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 5 */
+  {{{-24,-24,-24,-24,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1,  2},
+    {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},
+  /* 6 */
+  {{{-24,-24,-24,-24,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2,  1},
+    {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},
+  /* 7 */
+  {{{-24,-24,-24,-24,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4, 7},
+    {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4,  0},
+    {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},
+  /* 8 */
+  {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2,  0,  0,  0,  1,  2,  3,  7},
+    {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2},
+    {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
+  /* 9 */
+  {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2,  2},
+    {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7},
+    {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},
+  /* 10 */
+  {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
+};
+
+static noise3 _psy_noisebias_long[11]={
+    /*63     125     250     500      1k       2k      4k      8k     16k*/
+  /* 0 */
+  {{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-20,-20,-20,-20,-20,-20,-10, -6, -4, -2, -2, -2,  0,  0,  2,  4,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
+  /* 1 */
+  {{{-10,-10,-10,-10,-10,-10, -8, -4,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2,  0,  2,  8},
+    {-20,-20,-20,-20,-20,-20,-20,-14, -8, -8, -8, -8, -8, -6, -6, -6, -4}}},
+  /* 2 */
+  {{{-10,-10,-10,-10,-10,-10,-10, -8,  0,  2,  2,  2,  4,  4,  5,  6,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2,  0,  2,  6},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 3 */
+  {{{-10,-10,-10,-10,-10,-10,-10, -8,  0,  2,  2,  2,  4,  4,  4,  5,  8},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1,  1,  6},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 4 */
+  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1,  1,  5},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
+  /* 5 */
+  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1,  2},
+    {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},
+  /* 6 */
+  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2,  1},
+    {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},
+  /* 7 */
+  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
+    {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4,  0},
+    {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}},
+  /* 8 */
+  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  0,  0,  0,  0,  1,  2,  3,  7},
+    {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -8, -6, -2},
+    {-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
+  /* 9 */
+  {{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2,  2},
+    {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-12,-10, -7},
+    {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},
+  /* 10 */
+  {{{-24,-24,-24,-24,-24,-24,-24,-24,-24,-18,-14,-14,-14,-14,-14,-12,-10},
+    {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-20},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
+};
+
+static noise3 _psy_noisebias_impulse[11]={
+  /*  63     125     250     500      1k      2k      4k      8k     16k*/
+  /* 0 */
+  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  4,  8,  8,  8, 10, 12, 14, 20},
+    {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2,  0,  0,  0,  0,  2,  4,  10},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
+  /* 1 */
+  {{{-12,-12,-12,-12,-12, -8, -6, -4,  0,  4,  4,  4,  4, 10, 12, 14, 20},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2,  2},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}},
+  /* 2 */
+  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  8, 10, 10, 16},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2,  0},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
+  /* 3 */
+  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  6,  8,  8, 14},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2,  0},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
+  /* 4 */
+  {{{-16,-16,-16,-16,-16,-12,-10, -6, -2,  0,  0,  0,  0,  4,  6,  6, 12},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2,  0},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
+  /* 5 */
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  4,  6, 11},
+    {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2},
+    {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}},
+  /* 6 */
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  4,  6, 11},
+    {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4},
+    {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},
+  /* 7 */
+  {{{-22,-22,-22,-22,-22,-20,-14,-10, -6,  0,  0,  0,  0,  4,  4,  6, 11},
+    {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10},
+    {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},
+  /* 8 */
+  {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1,  3,  3,  5, 10},
+    {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14},
+    {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
+  /* 9 */
+  {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2,  2},
+    {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18},
+    {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},
+  /* 10 */
+  {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-26},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
+};
+
+
+static noise3 _psy_noisebias_padding[11]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  /* 0 */
+  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2,  2,  3,  6,  6,  8, 10},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2,  0,  2}}},
+  /* 1 */
+  {{{-12,-12,-12,-12,-12, -8, -6, -4,  0,  4,  4,  4,  4, 10, 12, 14, 20},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4,  0,  0,  0,  2,  2,  4,  8},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2,  0}}},
+  /* 2 */
+  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  8, 10, 10, 16},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4,  0,  0,  0,  2,  2,  4,  8},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
+  /* 3 */
+  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  6,  8,  8, 14},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1,  0,  0,  2,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
+  /* 4 */
+  {{{-16,-16,-16,-16,-16,-12,-10, -6, -2,  0,  0,  0,  0,  4,  6,  6, 12},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1,  0,  2,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
+  /* 5 */
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  6,  6, 12},
+    {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -3, -3, -3, -3, -2,  0,  4},
+    {-34,-34,-34,-34,-30,-26,-24,-18,-14,-10,-10,-10,-10,-10, -8, -5, -3}}},
+  /* 6 */
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  6,  6, 12},
+    {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1,  4},
+    {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}},
+  /* 7 */
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  6,  6, 12},
+    {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3,  1},
+    {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}},
+  /* 8 */
+  {{{-22,-22,-22,-22,-22,-20,-14,-10, -4,  0,  0,  0,  0,  3,  5,  5, 11},
+    {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2},
+    {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}},
+  /* 9 */
+  {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2,  0,  2,  6},
+    {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5},
+    {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}},
+  /* 10 */
+  {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-25,-25,-25,-25,-25,-25,-15},
+    {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
+};
+
+static noiseguard _psy_noiseguards_44[4]={
+  {4,4,15},
+  {4,4,15},
+  {10,10,100},
+  {10,10,100},
+};
+
+static int _psy_tone_suppress[11]={
+  -20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45,
+};
+
+static int _psy_tone_0dB[11]={
+  95,95,95,95,95,105,105,105,105,105,105,
+};
+
+static int _psy_noise_suppress[11]={
+ -24,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
+};
+
+static vorbis_info_psy _psy_info_template={
+  -1,
+  -110.,-140.,
+  /* tonemask att boost/decay,suppr,curves */
+  {0.f,0.f,0.f},     0.,0.,    -40.f, {0.},  
+  
+  /*noisemaskp,supp, low/high window, low/hi guard, minimum */
+  1,          -0.f,         .5f, .5f,         0,0,0,
+  {{-1},{-1},{-1}},{-1},105.f,
+
+  0,0,-1,-1,0.,
+};
+
+/* ath ****************/
+
+static int _psy_ath_floater[11]={
+  -100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
+};
+
+static int _psy_ath_abs[11]={
+  -110,-110,-120,-130,-140,-140,-140,-140,-140,-140,-150,
+};
+
+/* stereo setup.  These don't map directly to quality level, there's
+   an additional indirection as several of the below may be used in a
+   single bitmanaged stream
+
+****************/
+
+/* various stereo possibilities */
+
+/* stereo mode by base quality level */
+static adj_stereo _psy_stereo_modes_44_low[2]={
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         0  */
+  {{  4,  4,  4,  4,  4,  4,  4,  3,  2,  2,  1,  0,  0,  0,  0},
+   {  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  5,  4,  3},
+   {  1,  2,  3,  4,  4,  4,  4,  4,  4,  5,  6,  7,  8,  8,  8},
+   { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         1  */
+  {{  4,  4,  4,  4,  4,  4,  4,  3,  2,  2,  1,  0,  0,  0,  0},
+   {  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  5,  4,  3},
+   {  1,  2,  3,  4,  5,  5,  6,  6,  6,  6,  6,  7,  8,  8,  8},
+   { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},
+};
+
+static adj_stereo _psy_stereo_modes_44[11]={
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         0  */
+  {{  4,  4,  4,  4,  4,  4,  4,  3,  2,  2,  1,  0,  0,  0,  0},
+   {  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  5,  4,  3},
+   {  1,  2,  3,  4,  5,  5,  6,  6,  6,  6,  6,  7,  8,  8,  8},
+   { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         1  */
+  {{  3,  3,  3,  3,  3,  3,  3,  3,  2,  1,  0,  0,  0,  0,  0},
+   {  8,  8,  8,  8,  6,  6,  5,  5,  5,  5,  5,  5,  5,  4,  3},
+   {  1,  2,  3,  4,  4,  5,  6,  6,  6,  6,  6,  8,  8,  8,  8},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         2  */
+  {{  3,  3,  3,  3,  3,  3,  2,  2,  2,  1,  0,  0,  0,  0,  0},
+   {  8,  8,  8,  6,  5,  5,  5,  5,  5,  5,  5,  4,  3,  2,  1},
+   {  3,  4,  4,  4,  5,  6,  6,  6,  6,  6,  6,  8,  8,  8,  8},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         3  */
+  {{  2,  2,  2,  2,  2,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0},
+   {  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  3,  2,  1},
+   {  4,  4,  5,  6,  6,  6,  6,  6,  8,  8, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         4  */
+  {{  2,  2,  2,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  3,  3,  2,  1,  0},
+   {  6,  6,  6,  8,  8,  8,  8,  8,  8,  8, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         5  */
+  {{  2,  2,  2,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  3,  3,  3,  3,  3,  2,  2,  2,  2,  2,  2,  0,  0,  0,  0},
+   {  6,  6,  8,  8,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         6  */
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  3,  3,  3,  2,  2,  2,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  8,  8,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         7  */
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  3,  3,  3,  2,  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  8,  8,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         8  */
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  2,  2,  2,  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         9  */
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14        10  */
+  {{  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0},
+   {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+};
+
+/* tone master attenuation by base quality mode and bitrate tweak */
+
+static att3 _psy_tone_masteratt_44_low[2]={
+  {{ 34,  20,   8},  0, 1.25}, /* 0 */
+  {{ 34,  20,   8}, -2, 1.25}, /* 1 */
+};
+static att3 _psy_tone_masteratt_44[11]={
+  {{ 30,  20,   8}, -2, 1.25}, /* 0 */
+  {{ 25,  14,   4},  0,    0}, /* 1 */
+  {{ 20,  10,  -2},  0,    0}, /* 2 */
+  {{ 20,   9,  -4},  0,    0}, /* 3 */
+  {{ 20,   9,  -4},  0,    0}, /* 4 */
+  {{ 20,   6,  -6},  0,    0}, /* 5 */
+  {{ 20,   3, -10},  0,    0}, /* 6 */
+  {{ 18,   1, -14},  0,    0}, /* 7 */
+  {{ 18,   0, -16},  0,    0}, /* 8 */
+  {{ 18,  -2, -16},  0,    0}, /* 9 */
+  {{ 12,  -2, -20},  0,    0}, /* 10 */
+};
+
+/* lowpass by mode **************/
+static double _psy_lowpass_44_low[2]={
+  15.1,15.1,
+};
+static double _psy_lowpass_44[11]={
+  15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999.
+};
+
+/* noise normalization **********/
+
+static int _noise_start_short_44[10]={
+  16,16,16,16,32,32,9999,9999,9999,9999
+};
+static int _noise_start_long_44[10]={
+  128,128,128,256,512,512,9999,9999,9999,9999
+};
+static int _noise_part_short_44[10]={
+  8,8,8,8,8,8,8,8,8,8
+};
+static int _noise_part_long_44[10]={
+  32,32,32,32,32,32,32,32,32,32
+};
+static double _noise_thresh_44[10]={
+  .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999.,
+};
+static double _noise_thresh_44_2[2]={
+  .5,.5,
+};
+
+
+static int _noise_start_short_44_low[2]={
+  32,32
+};
+static int _noise_start_long_44_low[2]={
+  256,256
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/psych_8.h
@@ -1,0 +1,102 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 8kHz psychoacoustic settings 
+ last mod: $Id: psych_8.h,v 1.2 2002/07/11 08:57:29 xiphmont Exp $
+
+ ********************************************************************/
+
+static att3 _psy_tone_masteratt_8[3]={
+  {{ 32,  25,  12},  0,   0},  /* 0 */
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 20,   0, -14},  0,   0}, /* 0 */
+};
+
+static vp_adjblock _vp_tonemask_adj_8[3]={
+  /* adjust for mode zero */
+  /* 63     125     250     500     1     2     4     8    16 */
+  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
+  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
+  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */
+};
+
+
+static noise3 _psy_noisebias_8[3]={
+  /*  63     125     250     500      1k       2k      4k      8k     16k*/
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  8,  8,  8, 10, 10, 99, 99, 99},
+    {-10,-10,-10,-10, -5, -5, -5,  0,  0,  4,  4,  4,  4,  4, 99, 99, 99},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
+
+  {{{-10,-10,-10,-10, -5, -5, -5,  0,  4,  8,  8,  8, 10, 10, 99, 99, 99},
+    {-10,-10,-10,-10,-10,-10, -5, -5, -5,  0,  0,  0,  0,  0, 99, 99, 99},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
+
+  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5, 99, 99, 99},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
+    {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
+};
+
+/* stereo mode by base quality level */
+static adj_stereo _psy_stereo_modes_8[3]={
+  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  */
+  {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  {{  4,  4,  4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  6,  5,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+  {{  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3},
+   {  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4},
+   {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1},
+   { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
+};
+
+static noiseguard _psy_noiseguards_8[2]={
+  {10,10,-1},
+  {10,10,-1},
+};
+
+static compandblock _psy_compand_8[2]={
+  {{
+     0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
+     8, 8, 9, 9,10,10,11, 11,     /* 15dB */
+    12,12,13,13,14,14,15, 15,     /* 23dB */
+    16,16,17,17,17,18,18, 19,     /* 31dB */
+    19,19,20,21,22,23,24, 25,     /* 39dB */
+  }},
+  {{
+     0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
+     7, 7, 6, 6, 5, 5, 4,  4,     /* 15dB */
+     3, 3, 3, 4, 5, 6, 7,  8,     /* 23dB */
+     9,10,11,12,13,14,15, 16,     /* 31dB */
+    17,18,19,20,21,22,23, 24,     /* 39dB */
+  }},
+};
+
+static double _psy_lowpass_8[3]={3.,4.,4.};
+static int _noise_start_8[2]={
+  64,64,
+};
+static int _noise_part_8[2]={
+  8,8,
+};
+
+static int _psy_ath_floater_8[3]={
+  -100,-100,-105,
+};
+
+static int _psy_ath_abs_8[3]={
+  -110,-110,-140,
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/residue_16.h
@@ -1,0 +1,163 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel residue templates 16/22kHz
+ last mod: $Id: residue_16.h,v 1.3 2002/07/11 10:27:55 xiphmont Exp $
+
+ ********************************************************************/
+
+/***** residue backends *********************************************/
+
+static static_bookblock _resbook_16s_0={
+  {
+    {0},
+    {0,0,&_16c0_s_p1_0},
+    {0,0,&_16c0_s_p2_0},
+    {0,0,&_16c0_s_p3_0},
+    {0,0,&_16c0_s_p4_0},
+    {0,0,&_16c0_s_p5_0},
+    {0,0,&_16c0_s_p6_0},
+    {&_16c0_s_p7_0,&_16c0_s_p7_1},
+    {&_16c0_s_p8_0,&_16c0_s_p8_1},
+    {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2}
+   }
+};
+static static_bookblock _resbook_16s_1={
+  {
+    {0},
+    {0,0,&_16c1_s_p1_0},
+    {0,0,&_16c1_s_p2_0},
+    {0,0,&_16c1_s_p3_0},
+    {0,0,&_16c1_s_p4_0},
+    {0,0,&_16c1_s_p5_0},
+    {0,0,&_16c1_s_p6_0},
+    {&_16c1_s_p7_0,&_16c1_s_p7_1},
+    {&_16c1_s_p8_0,&_16c1_s_p8_1},
+    {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2}
+   }
+};
+static static_bookblock _resbook_16s_2={
+  {
+    {0},
+    {0,0,&_16c2_s_p1_0},
+    {0,0,&_16c2_s_p2_0},
+    {0,0,&_16c2_s_p3_0},
+    {0,0,&_16c2_s_p4_0},
+    {&_16c2_s_p5_0,&_16c2_s_p5_1},
+    {&_16c2_s_p6_0,&_16c2_s_p6_1},
+    {&_16c2_s_p7_0,&_16c2_s_p7_1},
+    {&_16c2_s_p8_0,&_16c2_s_p8_1},
+    {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2}
+   }
+};
+
+static vorbis_residue_template _res_16s_0[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__16c0_s_single,&_huff_book__16c0_s_single,
+   &_resbook_16s_0,&_resbook_16s_0},
+};
+static vorbis_residue_template _res_16s_1[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__16c1_s_short,&_huff_book__16c1_s_short,
+   &_resbook_16s_1,&_resbook_16s_1},
+  
+  {2,0,  &_residue_44_mid,
+   &_huff_book__16c1_s_long,&_huff_book__16c1_s_long,
+   &_resbook_16s_1,&_resbook_16s_1}
+};
+static vorbis_residue_template _res_16s_2[]={
+  {2,0,  &_residue_44_high,
+   &_huff_book__16c2_s_short,&_huff_book__16c2_s_short,
+   &_resbook_16s_2,&_resbook_16s_2},
+  
+  {2,0,  &_residue_44_high,
+   &_huff_book__16c2_s_long,&_huff_book__16c2_s_long,
+   &_resbook_16s_2,&_resbook_16s_2}
+};
+
+static vorbis_mapping_template _mapres_template_16_stereo[3]={
+  { _map_nominal, _res_16s_0 }, /* 0 */
+  { _map_nominal, _res_16s_1 }, /* 1 */
+  { _map_nominal, _res_16s_2 }, /* 2 */
+};
+
+static static_bookblock _resbook_16u_0={
+  {
+    {0},
+    {0,0,&_16u0__p1_0},
+    {0,0,&_16u0__p2_0},
+    {0,0,&_16u0__p3_0},
+    {0,0,&_16u0__p4_0},
+    {0,0,&_16u0__p5_0},
+    {&_16u0__p6_0,&_16u0__p6_1},
+    {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2}
+   }
+};
+static static_bookblock _resbook_16u_1={
+  {
+    {0},
+    {0,0,&_16u1__p1_0},
+    {0,0,&_16u1__p2_0},
+    {0,0,&_16u1__p3_0},
+    {0,0,&_16u1__p4_0},
+    {0,0,&_16u1__p5_0},
+    {0,0,&_16u1__p6_0},
+    {&_16u1__p7_0,&_16u1__p7_1},
+    {&_16u1__p8_0,&_16u1__p8_1},
+    {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2}
+   }
+};
+static static_bookblock _resbook_16u_2={
+  {
+    {0},
+    {0,0,&_16u2_p1_0},
+    {0,0,&_16u2_p2_0},
+    {0,0,&_16u2_p3_0},
+    {0,0,&_16u2_p4_0},
+    {&_16u2_p5_0,&_16u2_p5_1},
+    {&_16u2_p6_0,&_16u2_p6_1},
+    {&_16u2_p7_0,&_16u2_p7_1},
+    {&_16u2_p8_0,&_16u2_p8_1},
+    {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2}
+   }
+};
+
+static vorbis_residue_template _res_16u_0[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__16u0__single,&_huff_book__16u0__single,
+   &_resbook_16u_0,&_resbook_16u_0},
+};
+static vorbis_residue_template _res_16u_1[]={
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__16u1__short,&_huff_book__16u1__short,
+   &_resbook_16u_1,&_resbook_16u_1},
+  
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__16u1__long,&_huff_book__16u1__long,
+   &_resbook_16u_1,&_resbook_16u_1}
+};
+static vorbis_residue_template _res_16u_2[]={
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__16u2__short,&_huff_book__16u2__short,
+   &_resbook_16u_2,&_resbook_16u_2},
+  
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__16u2__long,&_huff_book__16u2__long,
+   &_resbook_16u_2,&_resbook_16u_2}
+};
+
+
+static vorbis_mapping_template _mapres_template_16_uncoupled[3]={
+  { _map_nominal_u, _res_16u_0 }, /* 0 */
+  { _map_nominal_u, _res_16u_1 }, /* 1 */
+  { _map_nominal_u, _res_16u_2 }, /* 2 */
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/residue_44.h
@@ -1,0 +1,254 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel residue templates for 32/44.1/48kHz
+ last mod: $Id: residue_44.h,v 1.16 2002/07/11 06:41:04 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "vorbis/codec.h"
+#include "backends.h"
+#include "books/coupled/res_books_stereo.h"
+
+/***** residue backends *********************************************/
+
+static vorbis_info_residue0 _residue_44_mid={
+  0,-1, -1, 10,-1,
+  /*  0     1     2     3     4     5     6     7     8  */
+  {0},
+  {-1},
+  {  .5,  1.5,  1.5,  2.5,  2.5,  4.5,  8.5,  16.5, 32.5},
+  {  .5,   .5, 999.,   .5,  999., 4.5,  8.5,  16.5, 32.5},
+};
+
+static vorbis_info_residue0 _residue_44_high={
+  0,-1, -1, 10,-1,
+  /*  0     1     2     3     4     5     6     7     8  */
+  {0},
+  {-1},
+  {  .5,  1.5,  2.5,  4.5,  8.5, 16.5, 32.5, 71.5,157.5},
+  {  .5,  1.5,  2.5,  3.5,  4.5,  8.5, 16.5, 71.5,157.5},
+};
+
+static static_bookblock _resbook_44s_0={
+  {
+    {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},{0,0,&_44c0_s_p3_0},
+    {0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},{0,0,&_44c0_s_p6_0},
+    {&_44c0_s_p7_0,&_44c0_s_p7_1},{&_44c0_s_p8_0,&_44c0_s_p8_1},
+    {&_44c0_s_p9_0,&_44c0_s_p9_1,&_44c0_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44sm_0={
+  {
+    {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},{0,0,&_44c0_sm_p3_0},
+    {0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},{0,0,&_44c0_sm_p6_0},
+    {&_44c0_sm_p7_0,&_44c0_sm_p7_1},{&_44c0_sm_p8_0,&_44c0_sm_p8_1},
+    {&_44c0_sm_p9_0,&_44c0_sm_p9_1,&_44c0_sm_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_1={
+  {
+    {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},{0,0,&_44c1_s_p3_0},
+    {0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},{0,0,&_44c1_s_p6_0},
+    {&_44c1_s_p7_0,&_44c1_s_p7_1},{&_44c1_s_p8_0,&_44c1_s_p8_1},
+    {&_44c1_s_p9_0,&_44c1_s_p9_1,&_44c1_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44sm_1={
+  {
+    {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},{0,0,&_44c1_sm_p3_0},
+    {0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},{0,0,&_44c1_sm_p6_0},
+    {&_44c1_sm_p7_0,&_44c1_sm_p7_1},{&_44c1_sm_p8_0,&_44c1_sm_p8_1},
+    {&_44c1_sm_p9_0,&_44c1_sm_p9_1,&_44c1_sm_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_2={
+  {
+    {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},
+    {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},
+    {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},
+    {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_3={
+  {
+    {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},
+    {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},
+    {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},
+    {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_4={
+  {
+    {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},
+    {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},
+    {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},
+    {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_5={
+  {
+    {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},
+    {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},
+    {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},
+    {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_6={
+  {
+    {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},
+    {0,0,&_44c6_s_p4_0},
+    {&_44c6_s_p5_0,&_44c6_s_p5_1},
+    {&_44c6_s_p6_0,&_44c6_s_p6_1},
+    {&_44c6_s_p7_0,&_44c6_s_p7_1},
+    {&_44c6_s_p8_0,&_44c6_s_p8_1},
+    {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_7={
+  {
+    {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},
+    {0,0,&_44c7_s_p4_0},
+    {&_44c7_s_p5_0,&_44c7_s_p5_1},
+    {&_44c7_s_p6_0,&_44c7_s_p6_1},
+    {&_44c7_s_p7_0,&_44c7_s_p7_1},
+    {&_44c7_s_p8_0,&_44c7_s_p8_1},
+    {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_8={
+  {
+    {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},
+    {0,0,&_44c8_s_p4_0},
+    {&_44c8_s_p5_0,&_44c8_s_p5_1},
+    {&_44c8_s_p6_0,&_44c8_s_p6_1},
+    {&_44c8_s_p7_0,&_44c8_s_p7_1},
+    {&_44c8_s_p8_0,&_44c8_s_p8_1},
+    {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}
+   }
+};
+static static_bookblock _resbook_44s_9={
+  {
+    {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},
+    {0,0,&_44c9_s_p4_0},
+    {&_44c9_s_p5_0,&_44c9_s_p5_1},
+    {&_44c9_s_p6_0,&_44c9_s_p6_1},
+    {&_44c9_s_p7_0,&_44c9_s_p7_1},
+    {&_44c9_s_p8_0,&_44c9_s_p8_1},
+    {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}
+   }
+};
+
+
+static vorbis_residue_template _res_44s_0[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
+   &_resbook_44s_0,&_resbook_44sm_0},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,
+   &_resbook_44s_0,&_resbook_44sm_0}
+};
+static vorbis_residue_template _res_44s_1[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,
+   &_resbook_44s_1,&_resbook_44sm_1},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,
+   &_resbook_44s_1,&_resbook_44sm_1}
+};
+static vorbis_residue_template _res_44s_2[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c2_s_short,&_huff_book__44c2_s_short,
+   &_resbook_44s_2,&_resbook_44s_2},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c2_s_long,&_huff_book__44c2_s_long,
+   &_resbook_44s_2,&_resbook_44s_2}
+};
+static vorbis_residue_template _res_44s_3[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c3_s_short,&_huff_book__44c3_s_short,
+   &_resbook_44s_3,&_resbook_44s_3},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c3_s_long,&_huff_book__44c3_s_long,
+   &_resbook_44s_3,&_resbook_44s_3}
+};
+static vorbis_residue_template _res_44s_4[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
+   &_resbook_44s_4,&_resbook_44s_4},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
+   &_resbook_44s_4,&_resbook_44s_4}
+};
+static vorbis_residue_template _res_44s_5[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
+   &_resbook_44s_5,&_resbook_44s_5},
+
+  {2,0,  &_residue_44_mid,
+   &_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
+   &_resbook_44s_5,&_resbook_44s_5}
+};
+static vorbis_residue_template _res_44s_6[]={
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
+   &_resbook_44s_6,&_resbook_44s_6},
+
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
+   &_resbook_44s_6,&_resbook_44s_6}
+};
+static vorbis_residue_template _res_44s_7[]={
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
+   &_resbook_44s_7,&_resbook_44s_7},
+
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
+   &_resbook_44s_7,&_resbook_44s_7}
+};
+static vorbis_residue_template _res_44s_8[]={
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
+   &_resbook_44s_8,&_resbook_44s_8},
+
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
+   &_resbook_44s_8,&_resbook_44s_8}
+};
+static vorbis_residue_template _res_44s_9[]={
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
+   &_resbook_44s_9,&_resbook_44s_9},
+
+  {2,0,  &_residue_44_high,
+   &_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
+   &_resbook_44s_9,&_resbook_44s_9}
+};
+
+static vorbis_mapping_template _mapres_template_44_stereo[]={
+  { _map_nominal, _res_44s_0 }, /* 0 */
+  { _map_nominal, _res_44s_1 }, /* 1 */
+  { _map_nominal, _res_44s_2 }, /* 2 */
+  { _map_nominal, _res_44s_3 }, /* 3 */
+  { _map_nominal, _res_44s_4 }, /* 4 */
+  { _map_nominal, _res_44s_5 }, /* 5 */
+  { _map_nominal, _res_44s_6 }, /* 6 */
+  { _map_nominal, _res_44s_7 }, /* 7 */
+  { _map_nominal, _res_44s_8 }, /* 8 */
+  { _map_nominal, _res_44s_9 }, /* 9 */
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/residue_44u.h
@@ -1,0 +1,296 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel residue templates for 32/44.1/48kHz uncoupled
+ last mod: $Id: residue_44u.h,v 1.3 2002/07/11 06:41:04 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "vorbis/codec.h"
+#include "backends.h"
+#include "books/uncoupled/res_books_uncoupled.h"
+
+/***** residue backends *********************************************/
+
+
+static vorbis_info_residue0 _residue_44_low_un={
+  0,-1, -1, 8,-1,
+  {0},
+  {-1},
+  {  .5,  1.5,  1.5,  2.5,  2.5,  4.5, 28.5},
+  {  -1,   25,   -1,   45,   -1,   -1,   -1}
+};
+
+static vorbis_info_residue0 _residue_44_mid_un={
+  0,-1, -1, 10,-1,
+  /*  0     1     2     3     4     5     6     7     8     9 */
+  {0},
+  {-1},
+  {  .5,  1.5,  1.5,  2.5,  2.5,  4.5,  4.5, 16.5, 60.5},
+  {  -1,   30,   -1,   50,   -1,   80,   -1,   -1,   -1}
+};
+
+static vorbis_info_residue0 _residue_44_hi_un={
+  0,-1, -1, 10,-1,
+  /*  0     1     2     3     4     5     6     7     8     9 */
+  {0},
+  {-1},
+  {  .5,  1.5,  2.5,  4.5,  8.5, 16.5, 32.5, 71.5,157.5},
+  {  -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1}
+};
+
+/* mapping conventions:
+   only one submap (this would change for efficient 5.1 support for example)*/
+/* Four psychoacoustic profiles are used, one for each blocktype */
+static vorbis_info_mapping0 _map_nominal_u[2]={
+  {1, {0,0}, {0}, {0}, 0,{0},{0}},
+  {1, {0,0}, {1}, {1}, 0,{0},{0}}
+};
+
+static static_bookblock _resbook_44u_0={
+  {
+    {0},
+    {0,0,&_44u0__p1_0},
+    {0,0,&_44u0__p2_0},
+    {0,0,&_44u0__p3_0},
+    {0,0,&_44u0__p4_0},
+    {0,0,&_44u0__p5_0},
+    {&_44u0__p6_0,&_44u0__p6_1},
+    {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2}
+   }
+};
+static static_bookblock _resbook_44u_1={
+  {
+    {0},
+    {0,0,&_44u1__p1_0},
+    {0,0,&_44u1__p2_0},
+    {0,0,&_44u1__p3_0},
+    {0,0,&_44u1__p4_0},
+    {0,0,&_44u1__p5_0},
+    {&_44u1__p6_0,&_44u1__p6_1},
+    {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2}
+   }
+};
+static static_bookblock _resbook_44u_2={
+  {
+    {0},
+    {0,0,&_44u2__p1_0},
+    {0,0,&_44u2__p2_0},
+    {0,0,&_44u2__p3_0},
+    {0,0,&_44u2__p4_0},
+    {0,0,&_44u2__p5_0},
+    {&_44u2__p6_0,&_44u2__p6_1},
+    {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2}
+   }
+};
+static static_bookblock _resbook_44u_3={
+  {
+    {0},
+    {0,0,&_44u3__p1_0},
+    {0,0,&_44u3__p2_0},
+    {0,0,&_44u3__p3_0},
+    {0,0,&_44u3__p4_0},
+    {0,0,&_44u3__p5_0},
+    {&_44u3__p6_0,&_44u3__p6_1},
+    {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2}
+   }
+};
+static static_bookblock _resbook_44u_4={
+  {
+    {0},
+    {0,0,&_44u4__p1_0},
+    {0,0,&_44u4__p2_0},
+    {0,0,&_44u4__p3_0},
+    {0,0,&_44u4__p4_0},
+    {0,0,&_44u4__p5_0},
+    {&_44u4__p6_0,&_44u4__p6_1},
+    {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2}
+   }
+};
+static static_bookblock _resbook_44u_5={
+  {
+    {0},
+    {0,0,&_44u5__p1_0},
+    {0,0,&_44u5__p2_0},
+    {0,0,&_44u5__p3_0},
+    {0,0,&_44u5__p4_0},
+    {0,0,&_44u5__p5_0},
+    {0,0,&_44u5__p6_0},
+    {&_44u5__p7_0,&_44u5__p7_1},
+    {&_44u5__p8_0,&_44u5__p8_1},
+    {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2}
+   }
+};
+static static_bookblock _resbook_44u_6={
+  {
+    {0},
+    {0,0,&_44u6__p1_0},
+    {0,0,&_44u6__p2_0},
+    {0,0,&_44u6__p3_0},
+    {0,0,&_44u6__p4_0},
+    {0,0,&_44u6__p5_0},
+    {0,0,&_44u6__p6_0},
+    {&_44u6__p7_0,&_44u6__p7_1},
+    {&_44u6__p8_0,&_44u6__p8_1},
+    {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2}
+   }
+};
+static static_bookblock _resbook_44u_7={
+  {
+    {0},
+    {0,0,&_44u7__p1_0},
+    {0,0,&_44u7__p2_0},
+    {0,0,&_44u7__p3_0},
+    {0,0,&_44u7__p4_0},
+    {0,0,&_44u7__p5_0},
+    {0,0,&_44u7__p6_0},
+    {&_44u7__p7_0,&_44u7__p7_1},
+    {&_44u7__p8_0,&_44u7__p8_1},
+    {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2}
+   }
+};
+static static_bookblock _resbook_44u_8={
+  {
+    {0},
+    {0,0,&_44u8_p1_0},
+    {0,0,&_44u8_p2_0},
+    {0,0,&_44u8_p3_0},
+    {0,0,&_44u8_p4_0},
+    {&_44u8_p5_0,&_44u8_p5_1},
+    {&_44u8_p6_0,&_44u8_p6_1},
+    {&_44u8_p7_0,&_44u8_p7_1},
+    {&_44u8_p8_0,&_44u8_p8_1},
+    {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2}
+   }
+};
+static static_bookblock _resbook_44u_9={
+  {
+    {0},
+    {0,0,&_44u9_p1_0},
+    {0,0,&_44u9_p2_0},
+    {0,0,&_44u9_p3_0},
+    {0,0,&_44u9_p4_0},
+    {&_44u9_p5_0,&_44u9_p5_1},
+    {&_44u9_p6_0,&_44u9_p6_1},
+    {&_44u9_p7_0,&_44u9_p7_1},
+    {&_44u9_p8_0,&_44u9_p8_1},
+    {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2}
+   }
+};
+
+static vorbis_residue_template _res_44u_0[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u0__short,&_huff_book__44u0__short,
+   &_resbook_44u_0,&_resbook_44u_0},
+
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u0__long,&_huff_book__44u0__long,
+   &_resbook_44u_0,&_resbook_44u_0}
+};
+static vorbis_residue_template _res_44u_1[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u1__short,&_huff_book__44u1__short,
+   &_resbook_44u_1,&_resbook_44u_1},
+
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u1__long,&_huff_book__44u1__long,
+   &_resbook_44u_1,&_resbook_44u_1}
+};
+static vorbis_residue_template _res_44u_2[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u2__short,&_huff_book__44u2__short,
+   &_resbook_44u_2,&_resbook_44u_2},
+
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u2__long,&_huff_book__44u2__long,
+   &_resbook_44u_2,&_resbook_44u_2}
+};
+static vorbis_residue_template _res_44u_3[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u3__short,&_huff_book__44u3__short,
+   &_resbook_44u_3,&_resbook_44u_3},
+
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u3__long,&_huff_book__44u3__long,
+   &_resbook_44u_3,&_resbook_44u_3}
+};
+static vorbis_residue_template _res_44u_4[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u4__short,&_huff_book__44u4__short,
+   &_resbook_44u_4,&_resbook_44u_4},
+
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__44u4__long,&_huff_book__44u4__long,
+   &_resbook_44u_4,&_resbook_44u_4}
+};
+
+static vorbis_residue_template _res_44u_5[]={
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u5__short,&_huff_book__44u5__short,
+   &_resbook_44u_5,&_resbook_44u_5},
+
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u5__long,&_huff_book__44u5__long,
+   &_resbook_44u_5,&_resbook_44u_5}
+};
+
+static vorbis_residue_template _res_44u_6[]={
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u6__short,&_huff_book__44u6__short,
+   &_resbook_44u_6,&_resbook_44u_6},
+
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u6__long,&_huff_book__44u6__long,
+   &_resbook_44u_6,&_resbook_44u_6}
+};
+
+static vorbis_residue_template _res_44u_7[]={
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u7__short,&_huff_book__44u7__short,
+   &_resbook_44u_7,&_resbook_44u_7},
+
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__44u7__long,&_huff_book__44u7__long,
+   &_resbook_44u_7,&_resbook_44u_7}
+};
+
+static vorbis_residue_template _res_44u_8[]={
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__44u8__short,&_huff_book__44u8__short,
+   &_resbook_44u_8,&_resbook_44u_8},
+
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__44u8__long,&_huff_book__44u8__long,
+   &_resbook_44u_8,&_resbook_44u_8}
+};
+static vorbis_residue_template _res_44u_9[]={
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__44u9__short,&_huff_book__44u9__short,
+   &_resbook_44u_9,&_resbook_44u_9},
+
+  {1,0,  &_residue_44_hi_un,
+   &_huff_book__44u9__long,&_huff_book__44u9__long,
+   &_resbook_44u_9,&_resbook_44u_9}
+};
+
+static vorbis_mapping_template _mapres_template_44_uncoupled[]={
+  { _map_nominal_u, _res_44u_0 }, /* 0 */
+  { _map_nominal_u, _res_44u_1 }, /* 1 */
+  { _map_nominal_u, _res_44u_2 }, /* 2 */
+  { _map_nominal_u, _res_44u_3 }, /* 3 */
+  { _map_nominal_u, _res_44u_4 }, /* 4 */
+  { _map_nominal_u, _res_44u_5 }, /* 5 */
+  { _map_nominal_u, _res_44u_6 }, /* 6 */
+  { _map_nominal_u, _res_44u_7 }, /* 7 */
+  { _map_nominal_u, _res_44u_8 }, /* 8 */
+  { _map_nominal_u, _res_44u_9 }, /* 9 */
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/residue_8.h
@@ -1,0 +1,97 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel residue templates 8/11kHz
+ last mod: $Id: residue_8.h,v 1.2 2002/07/11 06:41:04 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "vorbis/codec.h"
+#include "backends.h"
+
+/***** residue backends *********************************************/
+
+static static_bookblock _resbook_8s_0={
+  {
+    {0},{0,0,&_8c0_s_p1_0},{0,0,&_8c0_s_p2_0},{0,0,&_8c0_s_p3_0},
+    {0,0,&_8c0_s_p4_0},{0,0,&_8c0_s_p5_0},{0,0,&_8c0_s_p6_0},
+    {&_8c0_s_p7_0,&_8c0_s_p7_1},{&_8c0_s_p8_0,&_8c0_s_p8_1},
+    {&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2}
+   }
+};
+static static_bookblock _resbook_8s_1={
+  {
+    {0},{0,0,&_8c1_s_p1_0},{0,0,&_8c1_s_p2_0},{0,0,&_8c1_s_p3_0},
+    {0,0,&_8c1_s_p4_0},{0,0,&_8c1_s_p5_0},{0,0,&_8c1_s_p6_0},
+    {&_8c1_s_p7_0,&_8c1_s_p7_1},{&_8c1_s_p8_0,&_8c1_s_p8_1},
+    {&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2}
+   }
+};
+
+static vorbis_residue_template _res_8s_0[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__8c0_s_single,&_huff_book__8c0_s_single,
+   &_resbook_8s_0,&_resbook_8s_0},
+};
+static vorbis_residue_template _res_8s_1[]={
+  {2,0,  &_residue_44_mid,
+   &_huff_book__8c1_s_single,&_huff_book__8c1_s_single,
+   &_resbook_8s_1,&_resbook_8s_1},
+};
+
+static vorbis_mapping_template _mapres_template_8_stereo[2]={
+  { _map_nominal, _res_8s_0 }, /* 0 */
+  { _map_nominal, _res_8s_1 }, /* 1 */
+};
+
+static static_bookblock _resbook_8u_0={
+  {
+    {0},
+    {0,0,&_8u0__p1_0},
+    {0,0,&_8u0__p2_0},
+    {0,0,&_8u0__p3_0},
+    {0,0,&_8u0__p4_0},
+    {0,0,&_8u0__p5_0},
+    {&_8u0__p6_0,&_8u0__p6_1},
+    {&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2}
+   }
+};
+static static_bookblock _resbook_8u_1={
+  {
+    {0},
+    {0,0,&_8u1__p1_0},
+    {0,0,&_8u1__p2_0},
+    {0,0,&_8u1__p3_0},
+    {0,0,&_8u1__p4_0},
+    {0,0,&_8u1__p5_0},
+    {0,0,&_8u1__p6_0},
+    {&_8u1__p7_0,&_8u1__p7_1},
+    {&_8u1__p8_0,&_8u1__p8_1},
+    {&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2}
+   }
+};
+
+static vorbis_residue_template _res_8u_0[]={
+  {1,0,  &_residue_44_low_un,
+   &_huff_book__8u0__single,&_huff_book__8u0__single,
+   &_resbook_8u_0,&_resbook_8u_0},
+};
+static vorbis_residue_template _res_8u_1[]={
+  {1,0,  &_residue_44_mid_un,
+   &_huff_book__8u1__single,&_huff_book__8u1__single,
+   &_resbook_8u_1,&_resbook_8u_1},
+};
+
+static vorbis_mapping_template _mapres_template_8_uncoupled[2]={
+  { _map_nominal_u, _res_8u_0 }, /* 0 */
+  { _map_nominal_u, _res_8u_1 }, /* 1 */
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_11.h
@@ -1,0 +1,141 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 11kHz settings 
+ last mod: $Id: setup_11.h,v 1.2 2002/07/11 06:41:04 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "psych_11.h"
+
+static int blocksize_11[2]={
+  512,512
+};
+
+static int _floor_mapping_11[2]={
+  1,1,
+};
+
+static double rate_mapping_11[3]={
+  8000.,13000.,44000.,
+};
+
+static double rate_mapping_11_uncoupled[3]={
+  12000.,20000.,50000.,
+};
+
+static double quality_mapping_11[3]={
+  -.1,.0,1.
+};
+
+ve_setup_data_template ve_setup_11_stereo={
+  2,
+  rate_mapping_11,
+  quality_mapping_11,
+  2,
+  9000,
+  15000,
+  
+  blocksize_11,
+  blocksize_11,
+
+  _psy_tone_masteratt_11,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_11,
+  NULL,
+  _vp_tonemask_adj_11,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_11,
+  _psy_noisebias_11,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_11,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_11,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_11,
+  NULL,
+
+  _mapres_template_8_stereo
+};
+
+ve_setup_data_template ve_setup_11_uncoupled={
+  2,
+  rate_mapping_11_uncoupled,
+  quality_mapping_11,
+  -1,
+  9000,
+  15000,
+  
+  blocksize_11,
+  blocksize_11,
+
+  _psy_tone_masteratt_11,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_11,
+  NULL,
+  _vp_tonemask_adj_11,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_11,
+  _psy_noisebias_11,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_11,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_11,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_11,
+  NULL,
+
+  _mapres_template_8_uncoupled
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_16.h
@@ -1,0 +1,149 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 16kHz settings 
+ last mod: $Id: setup_16.h,v 1.4 2002/07/11 10:02:29 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "psych_16.h"
+#include "residue_16.h"
+
+static int blocksize_16_short[3]={
+  1024,512,512
+};
+static int blocksize_16_long[3]={
+  1024,1024,1024
+};
+
+static int _floor_mapping_16_short[3]={
+  9,3,3
+};
+static int _floor_mapping_16[3]={
+  9,9,9
+};
+
+static double rate_mapping_16[4]={
+  12000.,20000.,44000.,86000.
+};
+
+static double rate_mapping_16_uncoupled[4]={
+  16000.,28000.,64000.,100000.
+};
+
+static double _global_mapping_16[4]={ 1., 2., 3., 4. };
+
+static double quality_mapping_16[4]={ -.1,.05,.5,1. };
+
+static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.};
+
+ve_setup_data_template ve_setup_16_stereo={
+  3,
+  rate_mapping_16,
+  quality_mapping_16,
+  2,
+  15000,
+  19000,
+  
+  blocksize_16_short,
+  blocksize_16_long,
+
+  _psy_tone_masteratt_16,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_16_impulse,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  _psy_compand_8_mapping,
+
+  {_noise_start_16,_noise_start_16},
+  { _noise_part_16, _noise_part_16},
+  _noise_thresh_16,
+
+  _psy_ath_floater_16,
+  _psy_ath_abs_16,
+  
+  _psy_lowpass_16,
+
+  _psy_global_44,
+  _global_mapping_16,
+  _psy_stereo_modes_16,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_16_short,
+  _floor_mapping_16,
+
+  _mapres_template_16_stereo
+};
+
+ve_setup_data_template ve_setup_16_uncoupled={
+  3,
+  rate_mapping_16_uncoupled,
+  quality_mapping_16,
+  -1,
+  15000,
+  19000,
+  
+  blocksize_16_short,
+  blocksize_16_long,
+
+  _psy_tone_masteratt_16,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_16_impulse,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  _psy_compand_8_mapping,
+
+  {_noise_start_16,_noise_start_16},
+  { _noise_part_16, _noise_part_16},
+  _noise_thresh_16,
+
+  _psy_ath_floater_16,
+  _psy_ath_abs_16,
+  
+  _psy_lowpass_16,
+
+  _psy_global_44,
+  _global_mapping_16,
+  _psy_stereo_modes_16,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_16_short,
+  _floor_mapping_16,
+
+  _mapres_template_16_uncoupled
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_22.h
@@ -1,0 +1,128 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 22kHz settings 
+ last mod: $Id: setup_22.h,v 1.3 2002/07/11 10:02:29 xiphmont Exp $
+
+ ********************************************************************/
+
+static double rate_mapping_22[4]={
+  15000.,20000.,44000.,86000.
+};
+
+static double rate_mapping_22_uncoupled[4]={
+  16000.,28000.,50000.,90000.
+};
+
+static double _psy_lowpass_22[4]={9.5,11.,30.,99.};
+
+ve_setup_data_template ve_setup_22_stereo={
+  3,
+  rate_mapping_22,
+  quality_mapping_16,
+  2,
+  19000,
+  26000,
+  
+  blocksize_16_short,
+  blocksize_16_long,
+
+  _psy_tone_masteratt_16,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_16_impulse,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  _psy_compand_8_mapping,
+
+  {_noise_start_16,_noise_start_16},
+  { _noise_part_16, _noise_part_16},
+  _noise_thresh_16,
+
+  _psy_ath_floater_16,
+  _psy_ath_abs_16,
+  
+  _psy_lowpass_22,
+
+  _psy_global_44,
+  _global_mapping_16,
+  _psy_stereo_modes_16,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_16_short,
+  _floor_mapping_16,
+
+  _mapres_template_16_stereo
+};
+
+ve_setup_data_template ve_setup_22_uncoupled={
+  3,
+  rate_mapping_22_uncoupled,
+  quality_mapping_16,
+  -1,
+  19000,
+  26000,
+  
+  blocksize_16_short,
+  blocksize_16_long,
+
+  _psy_tone_masteratt_16,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+  _vp_tonemask_adj_16,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_16_impulse,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16_short,
+  _psy_noisebias_16,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  _psy_compand_8_mapping,
+
+  {_noise_start_16,_noise_start_16},
+  { _noise_part_16, _noise_part_16},
+  _noise_thresh_16,
+
+  _psy_ath_floater_16,
+  _psy_ath_abs_16,
+  
+  _psy_lowpass_22,
+
+  _psy_global_44,
+  _global_mapping_16,
+  _psy_stereo_modes_16,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_16_short,
+  _floor_mapping_16,
+
+  _mapres_template_16_uncoupled
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_32.h
@@ -1,0 +1,246 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel settings for 32kHz
+ last mod: $Id: setup_32.h,v 1.4 2002/07/13 06:12:49 xiphmont Exp $
+
+ ********************************************************************/
+
+static double rate_mapping_32[11]={
+  28000.,35000.,45000.,56000.,60000.,
+  75000.,90000.,100000.,115000.,150000.,190000.,
+};
+
+static double rate_mapping_32_un[11]={
+  42000.,52000.,64000.,72000.,78000.,
+  86000.,92000.,110000.,120000.,140000.,190000.,
+};
+
+static double rate_mapping_32_low[2]={
+  20000.,28000.
+};
+
+static double rate_mapping_32_un_low[2]={
+  24000.,42000.,
+};
+
+static double _psy_lowpass_32_low[2]={
+  13.,13.,
+};
+static double _psy_lowpass_32[11]={
+  13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
+};
+
+ve_setup_data_template ve_setup_32_stereo={
+  10,
+  rate_mapping_32,
+  quality_mapping_44,
+  2,
+  26000,
+  40000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_32,
+
+  _psy_global_44,
+  _global_mapping_44,
+  _psy_stereo_modes_44,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_stereo
+};
+
+ve_setup_data_template ve_setup_32_uncoupled={
+  10,
+  rate_mapping_32_un,
+  quality_mapping_44,
+  -1,
+  26000,
+  40000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_32,
+
+  _psy_global_44,
+  _global_mapping_44,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_uncoupled
+};
+
+ve_setup_data_template ve_setup_32_stereo_low={
+  1,
+  rate_mapping_32_low,
+  quality_mapping_44_stereo_low,
+  2,
+  26000,
+  40000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_32_low,
+
+  _psy_global_44,
+  _global_mapping_44,
+  _psy_stereo_modes_44_low,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_stereo
+};
+
+
+ve_setup_data_template ve_setup_32_uncoupled_low={
+  1,
+  rate_mapping_32_un_low,
+  quality_mapping_44_stereo_low,
+  -1,
+  26000,
+  40000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_32_low,
+
+  _psy_global_44,
+  _global_mapping_44,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_uncoupled
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_44.h
@@ -1,0 +1,176 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel settings for 44.1/48kHz
+ last mod: $Id: setup_44.h,v 1.9 2002/07/11 08:57:29 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "modes/floor_all.h"
+#include "modes/residue_44.h"
+#include "modes/psych_44.h"
+
+static double rate_mapping_44_stereo_low[2]={
+  22500.,32000.
+};
+
+static double rate_mapping_44_stereo[11]={
+  32000.,40000.,48000.,56000.,64000.,
+  80000.,96000.,112000.,128000.,160000.,250001.
+};
+static double quality_mapping_44_stereo_low[2]={
+  -.1,.0,
+};
+static double quality_mapping_44[11]={
+  .0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
+};
+
+static int blocksize_short_44_low[1]={
+  512
+};
+static int blocksize_long_44_low[1]={
+  4096
+};
+
+static int blocksize_short_44[10]={
+  256,256,256,256,256,256,256,256,256,256
+};
+static int blocksize_long_44[10]={
+  2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
+};
+static double _psy_compand_short_mapping[11]={
+  1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
+};
+static double _psy_compand_long_mapping[11]={
+  4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
+};
+static double _global_mapping_44[11]={
+  1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4.
+};
+static double _global_mapping_44_low[2]={
+  0., 1.,
+};
+static int _floor_short_mapping_44_low[1]={
+  1,
+};
+static int _floor_long_mapping_44_low[1]={
+  8
+};
+static int _floor_short_mapping_44[10]={
+  0,0,2,2,4,5,5,5,5,5
+};
+static int _floor_long_mapping_44[10]={
+  7,7,7,7,7,7,7,7,7,7
+};
+
+ve_setup_data_template ve_setup_44_stereo={
+  10,
+  rate_mapping_44_stereo,
+  quality_mapping_44,
+  2,
+  40000,
+  50000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44,
+
+  _psy_global_44,
+  _global_mapping_44,
+  _psy_stereo_modes_44,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_stereo
+};
+
+ve_setup_data_template ve_setup_44_stereo_low={
+  1,
+  rate_mapping_44_stereo_low,
+  quality_mapping_44_stereo_low,
+  2,
+  40000,
+  50000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44_low,
+
+  _psy_global_44,
+  _global_mapping_44_low,
+  _psy_stereo_modes_44_low,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_stereo
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_44u.h
@@ -1,0 +1,129 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: toplevel settings for 44.1/48kHz uncoupled modes
+ last mod: $Id: setup_44u.h,v 1.3 2002/07/11 06:41:05 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "modes/residue_44u.h"
+
+static double rate_mapping_44_un[11]={
+  48000.,60000.,70000.,80000.,86000.,
+  96000.,110000.,120000.,140000.,160000.,240001.
+};
+
+static double rate_mapping_44_un_low[2]={
+  32000.,48000.
+};
+
+ve_setup_data_template ve_setup_44_uncoupled={
+  10,
+  rate_mapping_44_un,
+  quality_mapping_44,
+  -1,
+  40000,
+  50000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44,
+
+  _psy_global_44,
+  _global_mapping_44,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_uncoupled
+};
+
+ve_setup_data_template ve_setup_44_uncoupled_low={
+  1,
+  rate_mapping_44_un_low,
+  quality_mapping_44_stereo_low,
+  -1,
+  40000,
+  50000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44_low,
+
+  _psy_global_44,
+  _global_mapping_44_low,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_uncoupled
+};
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_8.h
@@ -1,0 +1,146 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: 8kHz settings 
+ last mod: $Id: setup_8.h,v 1.2 2002/07/11 06:41:05 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "psych_8.h"
+#include "residue_8.h"
+
+static int blocksize_8[2]={
+  512,512
+};
+
+static int _floor_mapping_8[2]={
+  1,1,
+};
+
+static double rate_mapping_8[3]={
+  6000.,9000.,32000.,
+};
+
+static double rate_mapping_8_uncoupled[3]={
+  8000.,14000.,42000.,
+};
+
+static double quality_mapping_8[3]={
+  -.1,.0,1.
+};
+
+static double _psy_compand_8_mapping[3]={ 0., 1., 1.};
+
+static double _global_mapping_8[3]={ 1., 2., 3. };
+
+ve_setup_data_template ve_setup_8_stereo={
+  2,
+  rate_mapping_8,
+  quality_mapping_8,
+  2,
+  8000,
+  9000,
+  
+  blocksize_8,
+  blocksize_8,
+
+  _psy_tone_masteratt_8,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_8,
+  NULL,
+  _vp_tonemask_adj_8,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_8,
+  _psy_noisebias_8,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_8,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_8,
+  NULL,
+
+  _mapres_template_8_stereo
+};
+
+ve_setup_data_template ve_setup_8_uncoupled={
+  2,
+  rate_mapping_8_uncoupled,
+  quality_mapping_8,
+  -1,
+  8000,
+  9000,
+  
+  blocksize_8,
+  blocksize_8,
+
+  _psy_tone_masteratt_8,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_8,
+  NULL,
+  _vp_tonemask_adj_8,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_8,
+  _psy_noisebias_8,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_8,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_8,
+  NULL,
+
+  _mapres_template_8_uncoupled
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/modes/setup_X.h
@@ -1,0 +1,329 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: catch-all toplevel settings for q modes only
+ last mod: $Id: setup_X.h,v 1.3 2002/07/11 06:41:05 xiphmont Exp $
+
+ ********************************************************************/
+
+static double rate_mapping_X[11]={
+  -1.,-1.,-1.,-1.,-1.,
+  -1.,-1.,-1.,-1.,-1.,-1.
+};
+
+ve_setup_data_template ve_setup_X_stereo={
+  10,
+  rate_mapping_X,
+  quality_mapping_44,
+  2,
+  50000,
+  200000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44,
+
+  _psy_global_44,
+  _global_mapping_44,
+  _psy_stereo_modes_44,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_stereo
+};
+
+ve_setup_data_template ve_setup_X_uncoupled={
+  10,
+  rate_mapping_X,
+  quality_mapping_44,
+  -1,
+  50000,
+  200000,
+  
+  blocksize_short_44,
+  blocksize_long_44,
+
+  _psy_tone_masteratt_44,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_impulse,
+  _psy_noisebias_padding,
+  _psy_noisebias_trans,
+  _psy_noisebias_long,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44,_noise_start_long_44},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44,
+
+  _psy_global_44,
+  _global_mapping_44,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44,
+  _floor_long_mapping_44,
+
+  _mapres_template_44_uncoupled
+};
+
+ve_setup_data_template ve_setup_X_stereo_low={
+  1,
+  rate_mapping_X,
+  quality_mapping_44_stereo_low,
+  2,
+  50000,
+  200000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44_low,
+
+  _psy_global_44,
+  _global_mapping_44,
+  _psy_stereo_modes_44_low,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_stereo
+};
+
+
+ve_setup_data_template ve_setup_X_uncoupled_low={
+  1,
+  rate_mapping_X,
+  quality_mapping_44_stereo_low,
+  -1,
+  50000,
+  200000,
+  
+  blocksize_short_44_low,
+  blocksize_long_44_low,
+
+  _psy_tone_masteratt_44_low,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_otherblock,
+  _vp_tonemask_adj_longblock,
+  _vp_tonemask_adj_otherblock,
+
+  _psy_noiseguards_44,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_trans_low,
+  _psy_noisebias_long_low,
+  _psy_noise_suppress,
+  
+  _psy_compand_44,
+  _psy_compand_short_mapping,
+  _psy_compand_long_mapping,
+
+  {_noise_start_short_44_low,_noise_start_long_44_low},
+  {_noise_part_short_44,_noise_part_long_44},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater,
+  _psy_ath_abs,
+  
+  _psy_lowpass_44_low,
+
+  _psy_global_44,
+  _global_mapping_44,
+  NULL,
+
+  _floor_books,
+  _floor,
+  _floor_short_mapping_44_low,
+  _floor_long_mapping_44_low,
+
+  _mapres_template_44_uncoupled
+};
+
+ve_setup_data_template ve_setup_XX_stereo={
+  2,
+  rate_mapping_X,
+  quality_mapping_8,
+  2,
+  0,
+  8000,
+  
+  blocksize_8,
+  blocksize_8,
+
+  _psy_tone_masteratt_8,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_8,
+  NULL,
+  _vp_tonemask_adj_8,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_8,
+  _psy_noisebias_8,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_8,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_8,
+  NULL,
+
+  _mapres_template_8_stereo
+};
+
+ve_setup_data_template ve_setup_XX_uncoupled={
+  2,
+  rate_mapping_X,
+  quality_mapping_8,
+  -1,
+  0,
+  8000,
+  
+  blocksize_8,
+  blocksize_8,
+
+  _psy_tone_masteratt_8,
+  _psy_tone_0dB,
+  _psy_tone_suppress,
+
+  _vp_tonemask_adj_8,
+  NULL,
+  _vp_tonemask_adj_8,
+
+  _psy_noiseguards_8,
+  _psy_noisebias_8,
+  _psy_noisebias_8,
+  NULL,
+  NULL,
+  _psy_noise_suppress,
+  
+  _psy_compand_8,
+  _psy_compand_8_mapping,
+  NULL,
+
+  {_noise_start_8,_noise_start_8},
+  {_noise_part_8,_noise_part_8},
+  _noise_thresh_44_2,
+
+  _psy_ath_floater_8,
+  _psy_ath_abs_8,
+  
+  _psy_lowpass_8,
+
+  _psy_global_44,
+  _global_mapping_8,
+  _psy_stereo_modes_8,
+
+  _floor_books,
+  _floor,
+  _floor_mapping_8,
+  NULL,
+
+  _mapres_template_8_uncoupled
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/os.h
@@ -1,0 +1,147 @@
+#ifndef _OS_H
+#define _OS_H
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: #ifdef jail to whip a few platforms into the UNIX ideal.
+ last mod: $Id: os.h,v 1.32 2002/07/11 06:40:49 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <math.h>
+#include <ogg/os_types.h>
+
+#include "misc.h"
+
+#ifndef _V_IFDEFJAIL_H_
+#  define _V_IFDEFJAIL_H_
+
+#  ifdef __GNUC__
+#    define STIN static __inline__
+#  elif _WIN32
+#    define STIN static __inline
+#else
+#  define STIN static
+#endif
+
+#ifndef M_PI
+#  define M_PI (3.1415926536f)
+#endif
+
+#ifndef rint
+#define rint(x)   (floor((x)+0.5f))
+#endif
+
+#ifdef _WIN32
+#  include <malloc.h>
+#  define rint(x)   (floor((x)+0.5f)) 
+#  define NO_FLOAT_MATH_LIB
+#  define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
+#endif
+
+#ifndef FAST_HYPOT
+#  define FAST_HYPOT hypot
+#endif
+
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#  include <alloca.h>
+#endif
+
+#ifdef USE_MEMORY_H
+#  include <memory.h>
+#endif
+
+#ifndef min
+#  define min(x,y)  ((x)>(y)?(y):(x))
+#endif
+
+#ifndef max
+#  define max(x,y)  ((x)<(y)?(y):(x))
+#endif
+
+#if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__)
+#  define VORBIS_FPU_CONTROL
+/* both GCC and MSVC are kinda stupid about rounding/casting to int.
+   Because of encapsulation constraints (GCC can't see inside the asm
+   block and so we end up doing stupid things like a store/load that
+   is collectively a noop), we do it this way */
+
+/* we must set up the fpu before this works!! */
+
+typedef ogg_int16_t vorbis_fpu_control;
+
+static inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
+  ogg_int16_t ret;
+  ogg_int16_t temp;
+  __asm__ __volatile__("fnstcw %0\n\t"
+	  "movw %0,%%dx\n\t"
+	  "orw $62463,%%dx\n\t"
+	  "movw %%dx,%1\n\t"
+	  "fldcw %1\n\t":"=m"(ret):"m"(temp): "dx");
+  *fpu=ret;
+}
+
+static inline void vorbis_fpu_restore(vorbis_fpu_control fpu){
+  __asm__ __volatile__("fldcw %0":: "m"(fpu));
+}
+
+/* assumes the FPU is in round mode! */
+static inline int vorbis_ftoi(double f){  /* yes, double!  Otherwise,
+                                             we get extra fst/fld to
+                                             truncate precision */
+  int i;
+  __asm__("fistl %0": "=m"(i) : "t"(f));
+  return(i);
+}
+#endif
+
+
+#if defined(_WIN32) && !defined(__GNUC__) && !defined(__BORLANDC__)
+#  define VORBIS_FPU_CONTROL
+
+typedef ogg_int16_t vorbis_fpu_control;
+
+static __inline int vorbis_ftoi(double f){
+	int i;
+	__asm{
+		fld f
+		fistp i
+	}
+	return i;
+}
+
+static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
+}
+
+static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){
+}
+
+#endif
+
+
+#ifndef VORBIS_FPU_CONTROL
+
+typedef int vorbis_fpu_control;
+
+static int vorbis_ftoi(double f){
+  return (int)(f+.5);
+}
+
+/* We don't have special code for this compiler/arch, so do it the slow way */
+#  define vorbis_fpu_setround(vorbis_fpu_control) {}
+#  define vorbis_fpu_restore(vorbis_fpu_control) {}
+
+#endif
+
+#endif /* _OS_H */
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/psy.c
@@ -1,0 +1,1144 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: psychoacoustics not including preecho
+ last mod: $Id: psy.c,v 1.74 2002/07/13 10:18:33 giles Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+
+#include "masking.h"
+#include "psy.h"
+#include "os.h"
+#include "lpc.h"
+#include "smallft.h"
+#include "scales.h"
+#include "misc.h"
+
+#define NEGINF -9999.f
+static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10};
+
+vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *gi=&ci->psy_g_param;
+  vorbis_look_psy_global *look=_ogg_calloc(1,sizeof(*look));
+
+  look->channels=vi->channels;
+
+  look->ampmax=-9999.;
+  look->gi=gi;
+  return(look);
+}
+
+void _vp_global_free(vorbis_look_psy_global *look){
+  if(look){
+    memset(look,0,sizeof(*look));
+    _ogg_free(look);
+  }
+}
+
+void _vi_gpsy_free(vorbis_info_psy_global *i){
+  if(i){
+    memset(i,0,sizeof(*i));
+    _ogg_free(i);
+  }
+}
+
+void _vi_psy_free(vorbis_info_psy *i){
+  if(i){
+    memset(i,0,sizeof(*i));
+    _ogg_free(i);
+  }
+}
+
+static void min_curve(float *c,
+		       float *c2){
+  int i;  
+  for(i=0;i<EHMER_MAX;i++)if(c2[i]<c[i])c[i]=c2[i];
+}
+static void max_curve(float *c,
+		       float *c2){
+  int i;  
+  for(i=0;i<EHMER_MAX;i++)if(c2[i]>c[i])c[i]=c2[i];
+}
+
+static void attenuate_curve(float *c,float att){
+  int i;
+  for(i=0;i<EHMER_MAX;i++)
+    c[i]+=att;
+}
+
+static float ***setup_tone_curves(float curveatt_dB[P_BANDS],float binHz,int n,
+				  float center_boost, float center_decay_rate){
+  int i,j,k,m;
+  float ath[EHMER_MAX];
+  float workc[P_BANDS][P_LEVELS][EHMER_MAX];
+  float athc[P_LEVELS][EHMER_MAX];
+  float *brute_buffer=malloc(n*sizeof(*brute_buffer));
+
+  float ***ret=_ogg_malloc(sizeof(*ret)*P_BANDS);
+
+  memset(workc,0,sizeof(workc));
+
+  for(i=0;i<P_BANDS;i++){
+    /* we add back in the ATH to avoid low level curves falling off to
+       -infinity and unnecessarily cutting off high level curves in the
+       curve limiting (last step). */
+
+    /* A half-band's settings must be valid over the whole band, and
+       it's better to mask too little than too much */  
+    int ath_offset=i*4;
+    for(j=0;j<EHMER_MAX;j++){
+      float min=999.;
+      for(k=0;k<4;k++)
+	if(j+k+ath_offset<MAX_ATH){
+	  if(min>ATH[j+k+ath_offset])min=ATH[j+k+ath_offset];
+	}else{
+	  if(min>ATH[MAX_ATH-1])min=ATH[MAX_ATH-1];
+	}
+      ath[j]=min;
+    }
+
+    /* copy curves into working space, replicate the 50dB curve to 30
+       and 40, replicate the 100dB curve to 110 */
+    for(j=0;j<6;j++)
+      memcpy(workc[i][j+2],tonemasks[i][j],EHMER_MAX*sizeof(*tonemasks[i][j]));
+    memcpy(workc[i][0],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0]));
+    memcpy(workc[i][1],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0]));
+    
+    /* apply centered curve boost/decay */
+    for(j=0;j<P_LEVELS;j++){
+      for(k=0;k<EHMER_MAX;k++){
+	float adj=center_boost+abs(EHMER_OFFSET-k)*center_decay_rate;
+	if(adj<0. && center_boost>0)adj=0.;
+	if(adj>0. && center_boost<0)adj=0.;
+	workc[i][j][k]+=adj;
+      }
+    }
+
+    /* normalize curves so the driving amplitude is 0dB */
+    /* make temp curves with the ATH overlayed */
+    for(j=0;j<P_LEVELS;j++){
+      attenuate_curve(workc[i][j],curveatt_dB[i]+100.-(j<2?2:j)*10.-P_LEVEL_0);
+      memcpy(athc[j],ath,EHMER_MAX*sizeof(**athc));
+      attenuate_curve(athc[j],+100.-j*10.f-P_LEVEL_0);
+      max_curve(athc[j],workc[i][j]);
+    }
+
+    /* Now limit the louder curves.
+       
+       the idea is this: We don't know what the playback attenuation
+       will be; 0dB SL moves every time the user twiddles the volume
+       knob. So that means we have to use a single 'most pessimal' curve
+       for all masking amplitudes, right?  Wrong.  The *loudest* sound
+       can be in (we assume) a range of ...+100dB] SL.  However, sounds
+       20dB down will be in a range ...+80], 40dB down is from ...+60],
+       etc... */
+    
+    for(j=1;j<P_LEVELS;j++){
+      min_curve(athc[j],athc[j-1]);
+      min_curve(workc[i][j],athc[j]);
+    }
+  }
+
+  for(i=0;i<P_BANDS;i++){
+    int hi_curve,lo_curve,bin;
+    ret[i]=_ogg_malloc(sizeof(**ret)*P_LEVELS);
+
+    /* low frequency curves are measured with greater resolution than
+       the MDCT/FFT will actually give us; we want the curve applied
+       to the tone data to be pessimistic and thus apply the minimum
+       masking possible for a given bin.  That means that a single bin
+       could span more than one octave and that the curve will be a
+       composite of multiple octaves.  It also may mean that a single
+       bin may span > an eighth of an octave and that the eighth
+       octave values may also be composited. */
+    
+    /* which octave curves will we be compositing? */
+    bin=floor(fromOC(i*.5)/binHz);
+    lo_curve=  ceil(toOC(bin*binHz+1)*2);
+    hi_curve=  floor(toOC((bin+1)*binHz)*2);
+    if(lo_curve>i)lo_curve=i;
+    if(lo_curve<0)lo_curve=0;
+    if(hi_curve>=P_BANDS)hi_curve=P_BANDS-1;
+
+    for(m=0;m<P_LEVELS;m++){
+      ret[i][m]=_ogg_malloc(sizeof(***ret)*(EHMER_MAX+2));
+      
+      for(j=0;j<n;j++)brute_buffer[j]=999.;
+      
+      /* render the curve into bins, then pull values back into curve.
+	 The point is that any inherent subsampling aliasing results in
+	 a safe minimum */
+      for(k=lo_curve;k<=hi_curve;k++){
+	int l=0;
+
+	for(j=0;j<EHMER_MAX;j++){
+	  int lo_bin= fromOC(j*.125+k*.5-2.0625)/binHz;
+	  int hi_bin= fromOC(j*.125+k*.5-1.9375)/binHz+1;
+	  
+	  if(lo_bin<0)lo_bin=0;
+	  if(lo_bin>n)lo_bin=n;
+	  if(lo_bin<l)l=lo_bin;
+	  if(hi_bin<0)hi_bin=0;
+	  if(hi_bin>n)hi_bin=n;
+
+	  for(;l<hi_bin && l<n;l++)
+	    if(brute_buffer[l]>workc[k][m][j])
+	      brute_buffer[l]=workc[k][m][j];
+	}
+
+	for(;l<n;l++)
+	  if(brute_buffer[l]>workc[k][m][EHMER_MAX-1])
+	    brute_buffer[l]=workc[k][m][EHMER_MAX-1];
+
+      }
+
+      /* be equally paranoid about being valid up to next half ocatve */
+      if(i+1<P_BANDS){
+	int l=0;
+	k=i+1;
+	for(j=0;j<EHMER_MAX;j++){
+	  int lo_bin= fromOC(j*.125+i*.5-2.0625)/binHz;
+	  int hi_bin= fromOC(j*.125+i*.5-1.9375)/binHz+1;
+	  
+	  if(lo_bin<0)lo_bin=0;
+	  if(lo_bin>n)lo_bin=n;
+	  if(lo_bin<l)l=lo_bin;
+	  if(hi_bin<0)hi_bin=0;
+	  if(hi_bin>n)hi_bin=n;
+
+	  for(;l<hi_bin && l<n;l++)
+	    if(brute_buffer[l]>workc[k][m][j])
+	      brute_buffer[l]=workc[k][m][j];
+	}
+
+	for(;l<n;l++)
+	  if(brute_buffer[l]>workc[k][m][EHMER_MAX-1])
+	    brute_buffer[l]=workc[k][m][EHMER_MAX-1];
+
+      }
+
+
+      for(j=0;j<EHMER_MAX;j++){
+	int bin=fromOC(j*.125+i*.5-2.)/binHz;
+	if(bin<0){
+	  ret[i][m][j+2]=-999.;
+	}else{
+	  if(bin>=n){
+	    ret[i][m][j+2]=-999.;
+	  }else{
+	    ret[i][m][j+2]=brute_buffer[bin];
+	  }
+	}
+      }
+
+      /* add fenceposts */
+      for(j=0;j<EHMER_OFFSET;j++)
+	if(ret[i][m][j+2]>-200.f)break;  
+      ret[i][m][0]=j;
+      
+      for(j=EHMER_MAX-1;j>EHMER_OFFSET+1;j--)
+	if(ret[i][m][j+2]>-200.f)
+	  break;
+      ret[i][m][1]=j;
+
+    }
+  }
+  free(brute_buffer);
+  return(ret);
+}
+
+void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,
+		  vorbis_info_psy_global *gi,int n,long rate){
+  long i,j,lo=-99,hi=0;
+  long maxoc;
+  memset(p,0,sizeof(*p));
+
+  p->eighth_octave_lines=gi->eighth_octave_lines;
+  p->shiftoc=rint(log(gi->eighth_octave_lines*8.f)/log(2.f))-1;
+
+  p->firstoc=toOC(.25f*rate*.5/n)*(1<<(p->shiftoc+1))-gi->eighth_octave_lines;
+  maxoc=toOC((n+.25f)*rate*.5/n)*(1<<(p->shiftoc+1))+.5f;
+  p->total_octave_lines=maxoc-p->firstoc+1;
+  p->ath=_ogg_malloc(n*sizeof(*p->ath));
+
+  p->octave=_ogg_malloc(n*sizeof(*p->octave));
+  p->bark=_ogg_malloc(n*sizeof(*p->bark));
+  p->vi=vi;
+  p->n=n;
+  p->rate=rate;
+
+  /* set up the lookups for a given blocksize and sample rate */
+
+  for(i=0,j=0;i<MAX_ATH-1;i++){
+    int endpos=rint(fromOC((i+1)*.125-2.)*2*n/rate);
+    float base=ATH[i];
+    if(j<endpos){
+      float delta=(ATH[i+1]-base)/(endpos-j);
+      for(;j<endpos && j<n;j++){
+        p->ath[j]=base+100.;
+        base+=delta;
+      }
+    }
+  }
+
+  for(i=0;i<n;i++){
+    float bark=toBARK(rate/(2*n)*i); 
+
+    for(;lo+vi->noisewindowlomin<i && 
+	  toBARK(rate/(2*n)*lo)<(bark-vi->noisewindowlo);lo++);
+    
+    for(;hi<n && (hi<i+vi->noisewindowhimin ||
+	  toBARK(rate/(2*n)*hi)<(bark+vi->noisewindowhi));hi++);
+    
+    p->bark[i]=(lo<<16)+hi;
+
+  }
+
+  for(i=0;i<n;i++)
+    p->octave[i]=toOC((i+.25f)*.5*rate/n)*(1<<(p->shiftoc+1))+.5f;
+
+  p->tonecurves=setup_tone_curves(vi->toneatt,rate*.5/n,n,
+				  vi->tone_centerboost,vi->tone_decay);
+  
+  /* set up rolling noise median */
+  p->noiseoffset=_ogg_malloc(P_NOISECURVES*sizeof(*p->noiseoffset));
+  for(i=0;i<P_NOISECURVES;i++)
+    p->noiseoffset[i]=_ogg_malloc(n*sizeof(**p->noiseoffset));
+  
+  for(i=0;i<n;i++){
+    float halfoc=toOC((i+.5)*rate/(2.*n))*2.;
+    int inthalfoc;
+    float del;
+    
+    if(halfoc<0)halfoc=0;
+    if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1;
+    inthalfoc=(int)halfoc;
+    del=halfoc-inthalfoc;
+    
+    for(j=0;j<P_NOISECURVES;j++)
+      p->noiseoffset[j][i]=
+	p->vi->noiseoff[j][inthalfoc]*(1.-del) + 
+	p->vi->noiseoff[j][inthalfoc+1]*del;
+    
+  }
+#if 0
+  {
+    static int ls=0;
+    _analysis_output_always("noiseoff0",ls,p->noiseoffset[0],n,1,0,0);
+    _analysis_output_always("noiseoff1",ls,p->noiseoffset[1],n,1,0,0);
+    _analysis_output_always("noiseoff2",ls++,p->noiseoffset[2],n,1,0,0);
+  }
+#endif
+}
+
+void _vp_psy_clear(vorbis_look_psy *p){
+  int i,j;
+  if(p){
+    if(p->ath)_ogg_free(p->ath);
+    if(p->octave)_ogg_free(p->octave);
+    if(p->bark)_ogg_free(p->bark);
+    if(p->tonecurves){
+      for(i=0;i<P_BANDS;i++){
+	for(j=0;j<P_LEVELS;j++){
+	  _ogg_free(p->tonecurves[i][j]);
+	}
+	_ogg_free(p->tonecurves[i]);
+      }
+      _ogg_free(p->tonecurves);
+    }
+    if(p->noiseoffset){
+      for(i=0;i<P_NOISECURVES;i++){
+        _ogg_free(p->noiseoffset[i]);
+      }
+      _ogg_free(p->noiseoffset);
+    }
+    memset(p,0,sizeof(*p));
+  }
+}
+
+/* octave/(8*eighth_octave_lines) x scale and dB y scale */
+static void seed_curve(float *seed,
+		       const float **curves,
+		       float amp,
+		       int oc, int n,
+		       int linesper,float dBoffset){
+  int i,post1;
+  int seedptr;
+  const float *posts,*curve;
+
+  int choice=(int)((amp+dBoffset-P_LEVEL_0)*.1f);
+  choice=max(choice,0);
+  choice=min(choice,P_LEVELS-1);
+  posts=curves[choice];
+  curve=posts+2;
+  post1=(int)posts[1];
+  seedptr=oc+(posts[0]-EHMER_OFFSET)*linesper-(linesper>>1);
+
+  for(i=posts[0];i<post1;i++){
+    if(seedptr>0){
+      float lin=amp+curve[i];
+      if(seed[seedptr]<lin)seed[seedptr]=lin;
+    }
+    seedptr+=linesper;
+    if(seedptr>=n)break;
+  }
+}
+
+static void seed_loop(vorbis_look_psy *p,
+		      const float ***curves,
+		      const float *f, 
+		      const float *flr,
+		      float *seed,
+		      float specmax){
+  vorbis_info_psy *vi=p->vi;
+  long n=p->n,i;
+  float dBoffset=vi->max_curve_dB-specmax;
+
+  /* prime the working vector with peak values */
+
+  for(i=0;i<n;i++){
+    float max=f[i];
+    long oc=p->octave[i];
+    while(i+1<n && p->octave[i+1]==oc){
+      i++;
+      if(f[i]>max)max=f[i];
+    }
+    
+    if(max+6.f>flr[i]){
+      oc=oc>>p->shiftoc;
+
+      if(oc>=P_BANDS)oc=P_BANDS-1;
+      if(oc<0)oc=0;
+
+      seed_curve(seed,
+		 curves[oc],
+		 max,
+		 p->octave[i]-p->firstoc,
+		 p->total_octave_lines,
+		 p->eighth_octave_lines,
+		 dBoffset);
+    }
+  }
+}
+
+static void seed_chase(float *seeds, int linesper, long n){
+  long  *posstack=malloc(n*sizeof(*posstack));
+  float *ampstack=malloc(n*sizeof(*ampstack));
+  long   stack=0;
+  long   pos=0;
+  long   i;
+
+  for(i=0;i<n;i++){
+    if(stack<2){
+      posstack[stack]=i;
+      ampstack[stack++]=seeds[i];
+    }else{
+      while(1){
+	if(seeds[i]<ampstack[stack-1]){
+	  posstack[stack]=i;
+	  ampstack[stack++]=seeds[i];
+	  break;
+	}else{
+	  if(i<posstack[stack-1]+linesper){
+	    if(stack>1 && ampstack[stack-1]<=ampstack[stack-2] &&
+	       i<posstack[stack-2]+linesper){
+	      /* we completely overlap, making stack-1 irrelevant.  pop it */
+	      stack--;
+	      continue;
+	    }
+	  }
+	  posstack[stack]=i;
+	  ampstack[stack++]=seeds[i];
+	  break;
+
+	}
+      }
+    }
+  }
+
+  /* the stack now contains only the positions that are relevant. Scan
+     'em straight through */
+
+  for(i=0;i<stack;i++){
+    long endpos;
+    if(i<stack-1 && ampstack[i+1]>ampstack[i]){
+      endpos=posstack[i+1];
+    }else{
+      endpos=posstack[i]+linesper+1; /* +1 is important, else bin 0 is
+					discarded in short frames */
+    }
+    if(endpos>n)endpos=n;
+    for(;pos<endpos;pos++)
+      seeds[pos]=ampstack[i];
+  }
+  
+  /* there.  Linear time.  I now remember this was on a problem set I
+     had in Grad Skool... I didn't solve it at the time ;-) */
+  free(ampstack);
+  free(posstack);
+  return;
+}
+
+/* bleaugh, this is more complicated than it needs to be */
+#include<stdio.h>
+static void max_seeds(vorbis_look_psy *p,
+		      float *seed,
+		      float *flr){
+  long   n=p->total_octave_lines;
+  int    linesper=p->eighth_octave_lines;
+  long   linpos=0;
+  long   pos;
+
+  seed_chase(seed,linesper,n); /* for masking */
+ 
+  pos=p->octave[0]-p->firstoc-(linesper>>1);
+
+  while(linpos+1<p->n){
+    float minV=seed[pos];
+    long end=((p->octave[linpos]+p->octave[linpos+1])>>1)-p->firstoc;
+    if(minV>p->vi->tone_abs_limit)minV=p->vi->tone_abs_limit;
+    while(pos+1<=end){
+      pos++;
+      if((seed[pos]>NEGINF && seed[pos]<minV) || minV==NEGINF)
+	minV=seed[pos];
+    }
+    
+    end=pos+p->firstoc;
+    for(;linpos<p->n && p->octave[linpos]<=end;linpos++)
+      if(flr[linpos]<minV)flr[linpos]=minV;
+  }
+  
+  {
+    float minV=seed[p->total_octave_lines-1];
+    for(;linpos<p->n;linpos++)
+      if(flr[linpos]<minV)flr[linpos]=minV;
+  }
+  
+}
+
+static void bark_noise_hybridmp(int n,const long *b,
+                                const float *f,
+                                float *noise,
+                                const float offset,
+                                const int fixed){
+  
+  float *N=malloc((n+1)*sizeof(*N));
+  float *X=malloc((n+1)*sizeof(*N));
+  float *XX=malloc((n+1)*sizeof(*N));
+  float *Y=malloc((n+1)*sizeof(*N));
+  float *XY=malloc((n+1)*sizeof(*N));
+
+  float tN, tX, tXX, tY, tXY;
+  float fi;
+  int i;
+
+  int lo, hi;
+  float R, A, B, D;
+  
+  tN = tX = tXX = tY = tXY = 0.f;
+  for (i = 0, fi = 0.f; i < n; i++, fi += 1.f) {
+    float w, x, y;
+    
+    x = fi;
+    y = f[i] + offset;
+    if (y < 1.f) y = 1.f;
+    w = y * y;
+    N[i] = tN;
+    X[i] = tX;
+    XX[i] = tXX;
+    Y[i] = tY;
+    XY[i] = tXY;
+    tN += w;
+    tX += w * x;
+    tXX += w * x * x;
+    tY += w * y;
+    tXY += w * x * y;
+  }
+  N[i] = tN;
+  X[i] = tX;
+  XX[i] = tXX;
+  Y[i] = tY;
+  XY[i] = tXY;
+  
+  for (i = 0, fi = 0.f;; i++, fi += 1.f) {
+    
+    lo = b[i] >> 16;
+    if( lo>=0 ) break;
+    hi = b[i] & 0xffff;
+    
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];    
+    tXY = XY[hi] - XY[-lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + fi * B) / D;
+    if (R < 0.f)
+      R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  for ( ; hi < n; i++, fi += 1.f) {
+    
+    lo = b[i] >> 16;
+    hi = b[i] & 0xffff;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + fi * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, fi += 1.f) {
+    
+    R = (A + fi * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  if (fixed <= 0) {
+    free(N); free(X); free(XX); free(Y); free(XY);
+    return;
+  }
+  for (i = 0, fi = 0.f; i < (fixed + 1) / 2; i++, fi += 1.f) {
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];
+    tXY = XY[hi] - XY[-lo];
+    
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + fi * B) / D;
+
+    if (R > 0.f && R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ; hi < n; i++, fi += 1.f) {
+    
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + fi * B) / D;
+    
+    if (R > 0.f && R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, fi += 1.f) {
+    R = (A + fi * B) / D;
+    if (R > 0.f && R - offset < noise[i]) noise[i] = R - offset;
+  }
+  free(N); free(X); free(XX); free(Y); free(XY);
+  return;
+}
+
+static float FLOOR1_fromdB_INV_LOOKUP[256]={
+  0.F, 8.81683e+06F, 8.27882e+06F, 7.77365e+06F, 
+  7.29930e+06F, 6.85389e+06F, 6.43567e+06F, 6.04296e+06F, 
+  5.67422e+06F, 5.32798e+06F, 5.00286e+06F, 4.69759e+06F, 
+  4.41094e+06F, 4.14178e+06F, 3.88905e+06F, 3.65174e+06F, 
+  3.42891e+06F, 3.21968e+06F, 3.02321e+06F, 2.83873e+06F, 
+  2.66551e+06F, 2.50286e+06F, 2.35014e+06F, 2.20673e+06F, 
+  2.07208e+06F, 1.94564e+06F, 1.82692e+06F, 1.71544e+06F, 
+  1.61076e+06F, 1.51247e+06F, 1.42018e+06F, 1.33352e+06F, 
+  1.25215e+06F, 1.17574e+06F, 1.10400e+06F, 1.03663e+06F, 
+  973377.F, 913981.F, 858210.F, 805842.F, 
+  756669.F, 710497.F, 667142.F, 626433.F, 
+  588208.F, 552316.F, 518613.F, 486967.F, 
+  457252.F, 429351.F, 403152.F, 378551.F, 
+  355452.F, 333762.F, 313396.F, 294273.F, 
+  276316.F, 259455.F, 243623.F, 228757.F, 
+  214798.F, 201691.F, 189384.F, 177828.F, 
+  166977.F, 156788.F, 147221.F, 138237.F, 
+  129802.F, 121881.F, 114444.F, 107461.F, 
+  100903.F, 94746.3F, 88964.9F, 83536.2F, 
+  78438.8F, 73652.5F, 69158.2F, 64938.1F, 
+  60975.6F, 57254.9F, 53761.2F, 50480.6F, 
+  47400.3F, 44507.9F, 41792.0F, 39241.9F, 
+  36847.3F, 34598.9F, 32487.7F, 30505.3F, 
+  28643.8F, 26896.0F, 25254.8F, 23713.7F, 
+  22266.7F, 20908.0F, 19632.2F, 18434.2F, 
+  17309.4F, 16253.1F, 15261.4F, 14330.1F, 
+  13455.7F, 12634.6F, 11863.7F, 11139.7F, 
+  10460.0F, 9821.72F, 9222.39F, 8659.64F, 
+  8131.23F, 7635.06F, 7169.17F, 6731.70F, 
+  6320.93F, 5935.23F, 5573.06F, 5232.99F, 
+  4913.67F, 4613.84F, 4332.30F, 4067.94F, 
+  3819.72F, 3586.64F, 3367.78F, 3162.28F, 
+  2969.31F, 2788.13F, 2617.99F, 2458.24F, 
+  2308.24F, 2167.39F, 2035.14F, 1910.95F, 
+  1794.35F, 1684.85F, 1582.04F, 1485.51F, 
+  1394.86F, 1309.75F, 1229.83F, 1154.78F, 
+  1084.32F, 1018.15F, 956.024F, 897.687F, 
+  842.910F, 791.475F, 743.179F, 697.830F, 
+  655.249F, 615.265F, 577.722F, 542.469F, 
+  509.367F, 478.286F, 449.101F, 421.696F, 
+  395.964F, 371.803F, 349.115F, 327.812F, 
+  307.809F, 289.026F, 271.390F, 254.830F, 
+  239.280F, 224.679F, 210.969F, 198.096F, 
+  186.008F, 174.658F, 164.000F, 153.993F, 
+  144.596F, 135.773F, 127.488F, 119.708F, 
+  112.404F, 105.545F, 99.1046F, 93.0572F, 
+  87.3788F, 82.0469F, 77.0404F, 72.3394F, 
+  67.9252F, 63.7804F, 59.8885F, 56.2341F, 
+  52.8027F, 49.5807F, 46.5553F, 43.7144F, 
+  41.0470F, 38.5423F, 36.1904F, 33.9821F, 
+  31.9085F, 29.9614F, 28.1332F, 26.4165F, 
+  24.8045F, 23.2910F, 21.8697F, 20.5352F, 
+  19.2822F, 18.1056F, 17.0008F, 15.9634F, 
+  14.9893F, 14.0746F, 13.2158F, 12.4094F, 
+  11.6522F, 10.9411F, 10.2735F, 9.64662F, 
+  9.05798F, 8.50526F, 7.98626F, 7.49894F, 
+  7.04135F, 6.61169F, 6.20824F, 5.82941F, 
+  5.47370F, 5.13970F, 4.82607F, 4.53158F, 
+  4.25507F, 3.99542F, 3.75162F, 3.52269F, 
+  3.30774F, 3.10590F, 2.91638F, 2.73842F, 
+  2.57132F, 2.41442F, 2.26709F, 2.12875F, 
+  1.99885F, 1.87688F, 1.76236F, 1.65482F, 
+  1.55384F, 1.45902F, 1.36999F, 1.28640F, 
+  1.20790F, 1.13419F, 1.06499F, 1.F
+};
+
+void _vp_remove_floor(vorbis_look_psy *p,
+		      float *mdct,
+		      int *codedflr,
+		      float *residue,
+		      int sliding_lowpass){ 
+
+  int i,n=p->n;
+ 
+  if(sliding_lowpass>n)sliding_lowpass=n;
+  
+  for(i=0;i<sliding_lowpass;i++){
+    residue[i]=
+      mdct[i]*FLOOR1_fromdB_INV_LOOKUP[codedflr[i]];
+  }
+
+  for(;i<n;i++)
+    residue[i]=0.;
+}
+
+void _vp_noisemask(vorbis_look_psy *p,
+		   float *logmdct, 
+		   float *logmask){
+
+  int i,n=p->n;
+  float *work=malloc(n*sizeof(*work));
+
+  bark_noise_hybridmp(n,p->bark,logmdct,logmask,
+		      140.,-1);
+
+  for(i=0;i<n;i++)work[i]=logmdct[i]-logmask[i];
+
+  bark_noise_hybridmp(n,p->bark,work,logmask,0.,
+		      p->vi->noisewindowfixed);
+
+  for(i=0;i<n;i++)work[i]=logmdct[i]-work[i];
+  
+#if 0
+  {
+    static int seq=0;
+
+    float work2[n];
+    for(i=0;i<n;i++){
+      work2[i]=logmask[i]+work[i];
+    }
+    
+    if(seq&1)
+      _analysis_output("medianR",seq/2,work,n,1,0,0);
+    else
+      _analysis_output("medianL",seq/2,work,n,1,0,0);
+    
+    if(seq&1)
+      _analysis_output("envelopeR",seq/2,work2,n,1,0,0);
+    else
+      _analysis_output("enveloperL",seq/2,work2,n,1,0,0);
+    seq++;
+  }
+#endif
+
+  for(i=0;i<n;i++){
+    int dB=logmask[i]+.5;
+    if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
+    logmask[i]= work[i]+p->vi->noisecompand[dB];
+  }
+  free(work);
+  return;
+}
+
+void _vp_tonemask(vorbis_look_psy *p,
+		  float *logfft,
+		  float *logmask,
+		  float global_specmax,
+		  float local_specmax){
+
+  int i,n=p->n;
+
+  float *seed=malloc(sizeof(*seed)*p->total_octave_lines);
+  float att=local_specmax+p->vi->ath_adjatt;
+  for(i=0;i<p->total_octave_lines;i++)seed[i]=NEGINF;
+  
+  /* set the ATH (floating below localmax, not global max by a
+     specified att) */
+  if(att<p->vi->ath_maxatt)att=p->vi->ath_maxatt;
+  
+  for(i=0;i<n;i++)
+    logmask[i]=p->ath[i]+att;
+
+  /* tone masking */
+  seed_loop(p,(const float ***)p->tonecurves,logfft,logmask,seed,global_specmax);
+  max_seeds(p,seed,logmask);
+
+  free(seed);
+  return;
+}
+
+void _vp_offset_and_mix(vorbis_look_psy *p,
+			float *noise,
+			float *tone,
+			int offset_select,
+			float *logmask){
+  int i,n=p->n;
+  float toneatt=p->vi->tone_masteratt[offset_select];
+  
+  for(i=0;i<n;i++){
+    float val= noise[i]+p->noiseoffset[offset_select][i];
+    if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp;
+    logmask[i]=max(val,tone[i]+toneatt);
+  }
+}
+
+float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){
+  vorbis_info *vi=vd->vi;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *gi=&ci->psy_g_param;
+
+  int n=ci->blocksizes[vd->W]/2;
+  float secs=(float)n/vi->rate;
+
+  amp+=secs*gi->ampmax_att_per_sec;
+  if(amp<-9999)amp=-9999;
+  return(amp);
+}
+
+static void couple_lossless(float A, float B, 
+			    float *qA, float *qB){
+  int test1=fabs(*qA)>fabs(*qB);
+  test1-= fabs(*qA)<fabs(*qB);
+  
+  if(!test1)test1=((fabs(A)>fabs(B))<<1)-1;
+  if(test1==1){
+    *qB=(*qA>0.f?*qA-*qB:*qB-*qA);
+  }else{
+    float temp=*qB;  
+    *qB=(*qB>0.f?*qA-*qB:*qB-*qA);
+    *qA=temp;
+  }
+
+  if(*qB>fabs(*qA)*1.9999f){
+    *qB= -fabs(*qA)*2.f;
+    *qA= -*qA;
+  }
+}
+
+static float hypot_lookup[32]={
+  -0.009935, -0.011245, -0.012726, -0.014397, 
+  -0.016282, -0.018407, -0.020800, -0.023494, 
+  -0.026522, -0.029923, -0.033737, -0.038010, 
+  -0.042787, -0.048121, -0.054064, -0.060671, 
+  -0.068000, -0.076109, -0.085054, -0.094892, 
+  -0.105675, -0.117451, -0.130260, -0.144134, 
+  -0.159093, -0.175146, -0.192286, -0.210490, 
+  -0.229718, -0.249913, -0.271001, -0.292893};
+
+static void precomputed_couple_point(float premag,
+				     int floorA,int floorB,
+				     float *mag, float *ang){
+  
+  int test=(floorA>floorB)-1;
+  int offset=31-abs(floorA-floorB);
+  float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f;
+
+  floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))];
+
+  *mag=premag*floormag;
+  *ang=0.f;
+}
+
+/* just like below, this is currently set up to only do
+   single-step-depth coupling.  Otherwise, we'd have to do more
+   copying (which will be inevitable later) */
+
+/* doing the real circular magnitude calculation is audibly superior
+   to (A+B)/sqrt(2) */
+static float dipole_hypot(float a, float b){
+  if(a>0.){
+    if(b>0.)return sqrt(a*a+b*b);
+    if(a>-b)return sqrt(a*a-b*b);
+    return -sqrt(b*b-a*a);
+  }
+  if(b<0.)return -sqrt(a*a+b*b);
+  if(-a>b)return -sqrt(a*a-b*b);
+  return sqrt(b*b-a*a);
+}
+static float round_hypot(float a, float b){
+  if(a>0.){
+    if(b>0.)return sqrt(a*a+b*b);
+    if(a>-b)return sqrt(a*a+b*b);
+    return -sqrt(b*b+a*a);
+  }
+  if(b<0.)return -sqrt(a*a+b*b);
+  if(-a>b)return -sqrt(a*a+b*b);
+  return sqrt(b*b+a*a);
+}
+
+/* revert to round hypot for now */
+float **_vp_quantize_couple_memo(vorbis_block *vb,
+				 vorbis_info_psy_global *g,
+				 vorbis_look_psy *p,
+				 vorbis_info_mapping0 *vi,
+				 float **mdct){
+  
+  int i,j,n=p->n;
+  float **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret));
+  int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2];
+  
+  for(i=0;i<vi->coupling_steps;i++){
+    float *mdctM=mdct[vi->coupling_mag[i]];
+    float *mdctA=mdct[vi->coupling_ang[i]];
+    ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret));
+    for(j=0;j<limit;j++)
+      ret[i][j]=dipole_hypot(mdctM[j],mdctA[j]);
+    for(;j<n;j++)
+      ret[i][j]=round_hypot(mdctM[j],mdctA[j]);
+  }
+
+  return(ret);
+}
+
+/* this is for per-channel noise normalization */
+static int apsort(const void *a, const void *b){
+  if(fabs(**(float **)a)>fabs(**(float **)b))return -1;
+  return 1;
+}
+
+int **_vp_quantize_couple_sort(vorbis_block *vb,
+			       vorbis_look_psy *p,
+			       vorbis_info_mapping0 *vi,
+			       float **mags){
+
+
+  if(p->vi->normal_point_p){
+    int i,j,k,n=p->n;
+    int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret));
+    int partition=p->vi->normal_partition;
+    float **work=malloc(sizeof(*work)*partition);
+    
+    for(i=0;i<vi->coupling_steps;i++){
+      ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret));
+      
+      for(j=0;j<n;j+=partition){
+	for(k=0;k<partition;k++)work[k]=mags[i]+k+j;
+	qsort(work,partition,sizeof(*work),apsort);
+	for(k=0;k<partition;k++)ret[i][k+j]=work[k]-mags[i];
+      }
+    }
+    free(work);
+    return(ret);
+  }
+  return(NULL);
+}
+
+void _vp_noise_normalize_sort(vorbis_look_psy *p,
+			      float *magnitudes,int *sortedindex){
+  int i,j,n=p->n;
+  vorbis_info_psy *vi=p->vi;
+  int partition=vi->normal_partition;
+  float **work=malloc(sizeof(*work)*partition);
+  int start=vi->normal_start;
+
+  for(j=start;j<n;j+=partition){
+    if(j+partition>n)partition=n-j;
+    for(i=0;i<partition;i++)work[i]=magnitudes+i+j;
+    qsort(work,partition,sizeof(*work),apsort);
+    for(i=0;i<partition;i++){
+      sortedindex[i+j-start]=work[i]-magnitudes;
+    }
+  }
+
+  free(work);
+  return;
+}
+
+void _vp_noise_normalize(vorbis_look_psy *p,
+			 float *in,float *out,int *sortedindex){
+  int flag=0,i,j=0,n=p->n;
+  vorbis_info_psy *vi=p->vi;
+  int partition=vi->normal_partition;
+  int start=vi->normal_start;
+
+  if(start>n)start=n;
+
+  if(vi->normal_channel_p){
+    for(;j<start;j++)
+      out[j]=rint(in[j]);
+    
+    for(;j+partition<=n;j+=partition){
+      float acc=0.;
+      int k;
+      
+      for(i=j;i<j+partition;i++)
+	acc+=in[i]*in[i];
+      
+      for(i=0;i<partition;i++){
+	k=sortedindex[i+j-start];
+	
+	if(in[k]*in[k]>=.25f){
+	  out[k]=rint(in[k]);
+	  acc-=in[k]*in[k];
+	  flag=1;
+	}else{
+	  if(acc<vi->normal_thresh)break;
+	  out[k]=unitnorm(in[k]);
+	  acc-=1.;
+	}
+      }
+      
+      for(;i<partition;i++){
+	k=sortedindex[i+j-start];
+	out[k]=0.;
+      }
+    }
+  }
+  
+  for(;j<n;j++)
+    out[j]=rint(in[j]);
+  
+}
+
+void _vp_couple(int blobno,
+		vorbis_info_psy_global *g,
+		vorbis_look_psy *p,
+		vorbis_info_mapping0 *vi,
+		float **res,
+		float **mag_memo,
+		int   **mag_sort,
+		int   **ifloor,
+		int   *nonzero,
+		int  sliding_lowpass){
+
+  int i,j,k,n=p->n;
+
+  /* perform any requested channel coupling */
+  /* point stereo can only be used in a first stage (in this encoder)
+     because of the dependency on floor lookups */
+  for(i=0;i<vi->coupling_steps;i++){
+
+    /* once we're doing multistage coupling in which a channel goes
+       through more than one coupling step, the floor vector
+       magnitudes will also have to be recalculated an propogated
+       along with PCM.  Right now, we're not (that will wait until 5.1
+       most likely), so the code isn't here yet. The memory management
+       here is all assuming single depth couplings anyway. */
+
+    /* make sure coupling a zero and a nonzero channel results in two
+       nonzero channels. */
+    if(nonzero[vi->coupling_mag[i]] ||
+       nonzero[vi->coupling_ang[i]]){
+     
+
+      float *rM=res[vi->coupling_mag[i]];
+      float *rA=res[vi->coupling_ang[i]];
+      float *qM=rM+n;
+      float *qA=rA+n;
+      int *floorM=ifloor[vi->coupling_mag[i]];
+      int *floorA=ifloor[vi->coupling_ang[i]];
+      float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]];
+      float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]];
+      int partition=(p->vi->normal_point_p?p->vi->normal_partition:p->n);
+      int limit=g->coupling_pointlimit[p->vi->blockflag][blobno];
+      int pointlimit=limit;
+
+      nonzero[vi->coupling_mag[i]]=1; 
+      nonzero[vi->coupling_ang[i]]=1; 
+
+      for(j=0;j<p->n;j+=partition){
+	float acc=0.f;
+
+	for(k=0;k<partition;k++){
+	  int l=k+j;
+
+	  if(l<sliding_lowpass){
+	    if((l>=limit && fabs(rM[l])<postpoint && fabs(rA[l])<postpoint) ||
+	       (fabs(rM[l])<prepoint && fabs(rA[l])<prepoint)){
+
+
+	      precomputed_couple_point(mag_memo[i][l],
+				       floorM[l],floorA[l],
+				       qM+l,qA+l);
+
+	      if(rint(qM[l])==0.f)acc+=qM[l]*qM[l];
+	    }else{
+	      couple_lossless(rM[l],rA[l],qM+l,qA+l);
+	    }
+	  }else{
+	    qM[l]=0.;
+	    qA[l]=0.;
+	  }
+	}
+	
+	if(p->vi->normal_point_p){
+	  for(k=0;k<partition && acc>=p->vi->normal_thresh;k++){
+	    int l=mag_sort[i][j+k];
+	    if(l<sliding_lowpass && l>=pointlimit && rint(qM[l])==0.f){
+	      qM[l]=unitnorm(qM[l]);
+	      acc-=1.f;
+	    }
+	  } 
+	}
+      }
+    }
+  }
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/psy.h
@@ -1,0 +1,175 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: random psychoacoustics (not including preecho)
+ last mod: $Id: psy.h,v 1.32 2002/07/13 06:12:47 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_PSY_H_
+#define _V_PSY_H_
+#include "smallft.h"
+
+#include "backends.h"
+#include "envelope.h"
+
+#ifndef EHMER_MAX
+#define EHMER_MAX 56
+#endif
+
+/* psychoacoustic setup ********************************************/
+#define P_BANDS 17      /* 62Hz to 16kHz */
+#define P_LEVELS 8      /* 30dB to 100dB */
+#define P_LEVEL_0 30.    /* 30 dB */
+#define P_NOISECURVES 3
+
+#define NOISE_COMPAND_LEVELS 40
+typedef struct vorbis_info_psy{
+  int   blockflag;
+
+  float ath_adjatt;
+  float ath_maxatt;
+
+  float tone_masteratt[P_NOISECURVES];
+  float tone_centerboost;
+  float tone_decay;
+  float tone_abs_limit;
+  float toneatt[P_BANDS];
+
+  int noisemaskp;
+  float noisemaxsupp;
+  float noisewindowlo;
+  float noisewindowhi;
+  int   noisewindowlomin;
+  int   noisewindowhimin;
+  int   noisewindowfixed;
+  float noiseoff[P_NOISECURVES][P_BANDS];
+  float noisecompand[NOISE_COMPAND_LEVELS];
+
+  float max_curve_dB;
+
+  int normal_channel_p;
+  int normal_point_p;
+  int normal_start;
+  int normal_partition;
+  double normal_thresh;
+} vorbis_info_psy;
+
+typedef struct{
+  int   eighth_octave_lines;
+
+  /* for block long/short tuning; encode only */
+  float preecho_thresh[VE_BANDS];
+  float postecho_thresh[VE_BANDS];
+  float stretch_penalty;
+  float preecho_minenergy;
+
+  float ampmax_att_per_sec;
+
+  /* channel coupling config */
+  int   coupling_pkHz[PACKETBLOBS];  
+  int   coupling_pointlimit[2][PACKETBLOBS];  
+  int   coupling_prepointamp[PACKETBLOBS];  
+  int   coupling_postpointamp[PACKETBLOBS];  
+  int   sliding_lowpass[2][PACKETBLOBS];  
+
+} vorbis_info_psy_global;
+
+typedef struct {
+  float ampmax;
+  int   channels;
+
+  vorbis_info_psy_global *gi;
+  int   coupling_pointlimit[2][P_NOISECURVES];  
+} vorbis_look_psy_global;
+
+
+typedef struct {
+  int n;
+  struct vorbis_info_psy *vi;
+
+  float ***tonecurves;
+  float **noiseoffset;
+
+  float *ath;
+  long  *octave;             /* in n.ocshift format */
+  long  *bark;
+
+  long  firstoc;
+  long  shiftoc;
+  int   eighth_octave_lines; /* power of two, please */
+  int   total_octave_lines;  
+  long  rate; /* cache it */
+} vorbis_look_psy;
+
+extern void   _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,
+			   vorbis_info_psy_global *gi,int n,long rate);
+extern void   _vp_psy_clear(vorbis_look_psy *p);
+extern void  *_vi_psy_dup(void *source);
+
+extern void   _vi_psy_free(vorbis_info_psy *i);
+extern vorbis_info_psy *_vi_psy_copy(vorbis_info_psy *i);
+
+extern void _vp_remove_floor(vorbis_look_psy *p,
+			     float *mdct,
+			     int *icodedflr,
+			     float *residue,
+			     int sliding_lowpass);
+
+extern void _vp_noisemask(vorbis_look_psy *p,
+			  float *logmdct, 
+			  float *logmask);
+
+extern void _vp_tonemask(vorbis_look_psy *p,
+			 float *logfft,
+			 float *logmask,
+			 float global_specmax,
+			 float local_specmax);
+
+extern void _vp_offset_and_mix(vorbis_look_psy *p,
+			       float *noise,
+			       float *tone,
+			       int offset_select,
+			       float *logmask);
+
+extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);
+
+extern float **_vp_quantize_couple_memo(vorbis_block *vb,
+					vorbis_info_psy_global *g,
+					vorbis_look_psy *p,
+					vorbis_info_mapping0 *vi,
+					float **mdct);
+
+extern void _vp_couple(int blobno,
+		       vorbis_info_psy_global *g,
+		       vorbis_look_psy *p,
+		       vorbis_info_mapping0 *vi,
+		       float **res,
+		       float **mag_memo,
+		       int   **mag_sort,
+		       int   **ifloor,
+		       int   *nonzero,
+		       int   sliding_lowpass);
+
+extern void _vp_noise_normalize(vorbis_look_psy *p,
+				float *in,float *out,int *sortedindex);
+
+extern void _vp_noise_normalize_sort(vorbis_look_psy *p,
+				     float *magnitudes,int *sortedindex);
+
+extern int **_vp_quantize_couple_sort(vorbis_block *vb,
+				      vorbis_look_psy *p,
+				      vorbis_info_mapping0 *vi,
+				      float **mags);
+
+#endif
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/psytune.c
@@ -1,0 +1,521 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: simple utility that runs audio through the psychoacoustics
+           without encoding
+ last mod: $Id: psytune.c,v 1.19 2002/01/22 08:06:07 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "os.h"
+#include "misc.h"
+#include "psy.h"
+#include "mdct.h"
+#include "smallft.h"
+#include "window.h"
+#include "scales.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "masking.h"
+#include "registry.h"
+
+static vorbis_info_psy_global _psy_set0G={
+  0,   /* decaydBpms */
+  8,   /* lines per eighth octave */
+  
+  /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
+  256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
+  -6.f, 
+  
+  0,
+
+  0.,
+  0.,
+};
+
+static vp_part _vp_part0[]={
+  {    1,9e10f, 9e10f,       1.f,9999.f},
+  { 9999,  .75f, 9e10f,       .5f,9999.f},
+/*{ 9999, 1.5f, 9e10f,       .5f,9999.f},*/
+  {   18,9e10f, 9e10f,       .5f,  30.f},
+  { 9999,9e10f, 9e10f,       .5f,  30.f}
+};
+
+static vp_couple _vp_couple0[]={
+  {    1,  {9e10f,9e10f,0}, {   0.f,   0.f,0}, {   0.f, 0.f,0}, {0.f,0.f,0}},
+  {   18,  {9e10f,9e10f,0}, {   0.f,   0.f,0}, {   0.f, 0.f,0}, {0.f,0.f,0}},
+  { 9999,  {9e10f,9e10f,0}, {   0.f, 9e10f,0}, {   0.f,22.f,1}, {0.f,0.f,0}}
+};
+
+static vorbis_info_psy _psy_set0={
+  ATH_Bark_dB_lineaggressive,
+  
+  -100.f,
+  -140.f,
+  6.f, /* floor master att */
+
+  /*     0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15   16   */
+  /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
+  /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
+   1,  /* tonemaskp */
+  0.f, /* tone master att */
+  /*  0   10   20   30   40   50   60   70   80   90   100 */
+  {
+   {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*63*/
+   {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*88*/
+   {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*125*/
+
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
+   {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
+   {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
+   {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
+   {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
+
+   {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
+
+   {-30.f,-30.f,-33.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
+   {-30.f,-30.f,-33.f,-35.f,-40.f,-45.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*11500*/
+   {-24.f,-24.f,-26.f,-32.f,-32.f,-42.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*16000*/
+
+  },
+
+  1,/* peakattp */
+  {{-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*63*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*88*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*125*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*175*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*250*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*350*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*500*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*700*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*1000*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*1400*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*2000*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*2800*/
+   {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*4000*/
+   {-10.f,-12.f,-14.f,-16.f,-16.f,-20.f,-24.f,-30.f,-32.f,-40.f,-40.f},/*5600*/
+   {-10.f,-12.f,-14.f,-16.f,-16.f,-20.f,-24.f,-30.f,-32.f,-40.f,-40.f},/*8000*/
+   {-10.f,-10.f,-10.f,-12.f,-14.f,-18.f,-22.f,-28.f,-32.f,-40.f,-40.f},/*11500*/
+   {-10.f,-10.f,-10.f,-12.f,-14.f,-18.f,-22.f,-28.f,-32.f,-40.f,-40.f},/*16000*/
+  },
+
+  1,/*noisemaskp */
+  -10.f,  /* suppress any noise curve over maxspec+n */
+  .5f,   /* low window */
+  .5f,   /* high window */
+  10,
+  10,
+  25,
+  {.000f, 0.f, /*63*/
+   .000f, 0.f, /*88*/
+   .000f, 0.f, /*125*/
+   .000f, 0.f, /*175*/
+   .000f, 0.f, /*250*/
+   .000f, 0.f, /*350*/
+   .000f, 0.f, /*500*/
+   .000f, 0.f, /*700*/
+   .000f, 0.f, /*1000*/
+   .300f, 0.f, /*1400*/
+   .300f, 0.f, /*2000*/
+   .300f, 0.f, /*2800*/
+   .500f, 0.f, /*4000*/
+   .700f, 0.f, /*5600*/
+   .850f, 0.f, /*8000*/
+   .900f, 0.f, /*11500*/
+   .900f, 1.f, /*16000*/
+  },
+ 
+  95.f,  /* even decade + 5 is important; saves an rint() later in a
+            tight loop) */
+  -44.,
+
+  32,
+  _vp_part0,_vp_couple0
+};
+
+static vorbis_info_floor1 _floor_set0={1,
+					{0},
+					
+					{32},
+					{0},
+					{0},
+					{{-1}},
+
+					2,
+					{0,1024,
+
+					 88,31,243,
+
+					 14,54,143,460,
+					 
+					 6,3,10, 22,18,26, 41,36,47, 
+					 69,61,78, 112,99,126, 185,162,211,  
+					 329,282,387, 672,553,825
+					 },
+					
+					60,30,400,
+					20,8,1,18.,
+					20,600,
+					960};
+
+
+static vorbis_info_mapping0 mapping_info={1,{0,1},{0},{0},{0},0, 1, {0},{1}};
+static codec_setup_info codec_setup0={ {0,0}, 
+				       1,1,1,1,1,0,1,	
+				       {NULL},
+				       {0},{&mapping_info},
+				       {0},{NULL},
+				       {1},{&_floor_set0},
+				       {2},{NULL},
+				       {NULL},
+				       {&_psy_set0},
+				       &_psy_set0G};
+				       
+static int noisy=0;
+void analysis(char *base,int i,float *v,int n,int bark,int dB){
+  if(noisy){
+    int j;
+    FILE *of;
+    char buffer[80];
+    sprintf(buffer,"%s_%d.m",base,i);
+    of=fopen(buffer,"w");
+
+    for(j=0;j<n;j++){
+      if(dB && v[j]==0)
+	  fprintf(of,"\n\n");
+      else{
+	if(bark)
+	  fprintf(of,"%g ",toBARK(22050.f*j/n));
+	else
+	  fprintf(of,"%g ",(float)j);
+      
+	if(dB){
+	  fprintf(of,"%g\n",todB(v+j));
+	}else{
+	  fprintf(of,"%g\n",v[j]);
+	}
+      }
+    }
+    fclose(of);
+  }
+}
+
+long frameno=0;
+
+/****************************************************************/
+
+int main(int argc,char *argv[]){
+  int eos=0;
+  float nonz=0.f;
+  float acc=0.f;
+  float tot=0.f;
+  float ampmax=-9999,newmax;
+  float local_ampmax[2];
+
+  int framesize=2048;
+  float ampmax_att_per_sec=-6.;
+
+  float *pcm[2],*out[2],*window,*flr[2],*mask[2],*work[2];
+  signed char *buffer,*buffer2;
+  mdct_lookup m_look;
+  drft_lookup f_look;
+  vorbis_look_psy p_look;
+  vorbis_look_psy_global *pg_look;
+  vorbis_look_floor *floor_look;
+  vorbis_info vi;
+  long i,j,k;
+
+  int ath=0;
+  int decayp=0;
+
+  argv++;
+  while(*argv){
+    if(*argv[0]=='-'){
+      /* option */
+      if(argv[0][1]=='v'){
+	noisy=0;
+      }
+    }else
+      if(*argv[0]=='+'){
+	/* option */
+	if(argv[0][1]=='v'){
+	  noisy=1;
+	}
+      }else
+	framesize=atoi(argv[0]);
+    argv++;
+  }
+  
+  vi.channels=2;
+  vi.codec_setup=&codec_setup0;
+
+  pcm[0]=_ogg_malloc(framesize*sizeof(float));
+  pcm[1]=_ogg_malloc(framesize*sizeof(float));
+  out[0]=_ogg_calloc(framesize/2,sizeof(float));
+  out[1]=_ogg_calloc(framesize/2,sizeof(float));
+  work[0]=_ogg_calloc(framesize,sizeof(float));
+  work[1]=_ogg_calloc(framesize,sizeof(float));
+  flr[0]=_ogg_calloc(framesize/2,sizeof(float));
+  flr[1]=_ogg_calloc(framesize/2,sizeof(float));
+  buffer=_ogg_malloc(framesize*4);
+  buffer2=buffer+framesize*2;
+  window=_vorbis_window(0,framesize,framesize/2,framesize/2);
+  mdct_init(&m_look,framesize);
+  drft_init(&f_look,framesize);
+  _vp_psy_init(&p_look,&_psy_set0,&_psy_set0G,framesize/2,44100);
+  pg_look=_vp_global_look(&vi);
+  floor_look=_floor_P[1]->look(NULL,NULL,&_floor_set0);
+
+  /* we cheat on the WAV header; we just bypass 44 bytes and never
+     verify that it matches 16bit/stereo/44.1kHz. */
+  
+  fread(buffer,1,44,stdin);
+  fwrite(buffer,1,44,stdout);
+  memset(buffer,0,framesize*2);
+
+  analysis("window",0,window,framesize,0,0);
+
+  fprintf(stderr,"Processing for frame size %d...\n",framesize);
+
+  while(!eos){
+    long bytes=fread(buffer2,1,framesize*2,stdin); 
+    if(bytes<framesize*2)
+      memset(buffer2+bytes,0,framesize*2-bytes);
+    
+    if(bytes!=0){
+      int nonzero[2];
+
+      /* uninterleave samples */
+      for(i=0;i<framesize;i++){
+        pcm[0][i]=((buffer[i*4+1]<<8)|
+                      (0x00ff&(int)buffer[i*4]))/32768.f;
+        pcm[1][i]=((buffer[i*4+3]<<8)|
+		   (0x00ff&(int)buffer[i*4+2]))/32768.f;
+      }
+      
+      {
+	float secs=framesize/44100.;
+	
+	ampmax+=secs*ampmax_att_per_sec;
+	if(ampmax<-9999)ampmax=-9999;
+      }
+
+      for(i=0;i<2;i++){
+	float scale=4.f/framesize;
+	float *fft=work[i];
+	float *mdct=pcm[i];
+	float *logmdct=mdct+framesize/2;
+
+	analysis("pre",frameno+i,pcm[i],framesize,0,0);
+	
+	/* fft and mdct transforms  */
+	for(j=0;j<framesize;j++)
+	  fft[j]=pcm[i][j]*=window[j];
+	
+	drft_forward(&f_look,fft);
+
+	local_ampmax[i]=-9999.f;
+	fft[0]*=scale;
+	fft[0]=todB(fft);
+	for(j=1;j<framesize-1;j+=2){
+	  float temp=scale*FAST_HYPOT(fft[j],fft[j+1]);
+	  temp=fft[(j+1)>>1]=todB(&temp);
+	  if(temp>local_ampmax[i])local_ampmax[i]=temp;
+	}
+	if(local_ampmax[i]>ampmax)ampmax=local_ampmax[i];
+	
+	mdct_forward(&m_look,pcm[i],mdct);
+	for(j=0;j<framesize/2;j++)
+	  logmdct[j]=todB(mdct+j);
+
+	analysis("mdct",frameno+i,logmdct,framesize/2,1,0);
+	analysis("fft",frameno+i,fft,framesize/2,1,0);
+      }
+
+      for(i=0;i<2;i++){
+	float amp;
+	float *fft=work[i];
+	float *logmax=fft;
+	float *mdct=pcm[i];
+	float *logmdct=mdct+framesize/2;
+	float *mask=fft+framesize/2;
+
+	/* floor psychoacoustics */
+	_vp_compute_mask(&p_look,
+			 pg_look,
+			 i,
+			 fft,
+			 logmdct,
+			 mask,
+			 ampmax,
+			 local_ampmax[i],
+			 framesize/2);
+
+	analysis("mask",frameno+i,mask,framesize/2,1,0);
+
+	{
+	  vorbis_block vb;
+	  vorbis_dsp_state vd;
+	  memset(&vd,0,sizeof(vd));
+	  vd.vi=&vi;
+	  vb.vd=&vd;
+	  vb.pcmend=framesize;
+
+	  /* floor quantization/application */
+	  nonzero[i]=_floor_P[1]->forward(&vb,floor_look,
+					  mdct,
+					  logmdct,
+					  mask,
+					  logmax,
+					  
+					  flr[i]);
+	}
+
+	_vp_remove_floor(&p_look,
+			 pg_look,
+			 logmdct,
+			 mdct,
+			 flr[i],
+			 pcm[i],
+			 local_ampmax[i]);
+
+	for(j=0;j<framesize/2;j++)
+	  if(fabs(pcm[i][j])>1500)
+	    fprintf(stderr,"%ld ",frameno+i);
+	
+	analysis("res",frameno+i,pcm[i],framesize/2,1,0);
+	analysis("codedflr",frameno+i,flr[i],framesize/2,1,1);
+      }
+
+      /* residue prequantization */
+      _vp_partition_prequant(&p_look,
+			     &vi,
+			     pcm,
+			     nonzero);
+	
+      for(i=0;i<2;i++)
+	analysis("quant",frameno+i,pcm[i],framesize/2,1,0);
+
+      /* channel coupling / stereo quantization */
+
+      _vp_couple(&p_look,
+		 &mapping_info,
+		 pcm,
+		 nonzero);
+  
+      for(i=0;i<2;i++)
+	analysis("coupled",frameno+i,pcm[i],framesize/2,1,0);
+
+      /* decoupling */
+      for(i=mapping_info.coupling_steps-1;i>=0;i--){
+	float *pcmM=pcm[mapping_info.coupling_mag[i]];
+	float *pcmA=pcm[mapping_info.coupling_ang[i]];
+	
+	for(j=0;j<framesize/2;j++){
+	  float mag=pcmM[j];
+	  float ang=pcmA[j];
+	  
+	  if(mag>0)
+	    if(ang>0){
+	      pcmM[j]=mag;
+	      pcmA[j]=mag-ang;
+	    }else{
+	      pcmA[j]=mag;
+	      pcmM[j]=mag+ang;
+	    }
+	  else
+	    if(ang>0){
+	      pcmM[j]=mag;
+	      pcmA[j]=mag+ang;
+	    }else{
+	      pcmA[j]=mag;
+	      pcmM[j]=mag-ang;
+	    }
+	}
+      }
+    
+      for(i=0;i<2;i++)
+	analysis("decoupled",frameno+i,pcm[i],framesize/2,1,0);
+
+      for(i=0;i<2;i++){
+	float amp;
+
+	for(j=0;j<framesize/2;j++)
+	  pcm[i][j]*=flr[i][j];
+
+	analysis("final",frameno+i,pcm[i],framesize/2,1,1);
+
+	/* take it back to time */
+	mdct_backward(&m_look,pcm[i],pcm[i]);
+
+	for(j=0;j<framesize/2;j++)
+	  out[i][j]+=pcm[i][j]*window[j];
+
+	analysis("out",frameno+i,out[i],framesize/2,0,0);
+
+
+      }
+           
+      /* write data.  Use the part of buffer we're about to shift out */
+      for(i=0;i<2;i++){
+	char  *ptr=buffer+i*2;
+	float *mono=out[i];
+	int flag=0;
+	for(j=0;j<framesize/2;j++){
+	  int val=mono[j]*32767.;
+	  /* might as well guard against clipping */
+	  if(val>32767){
+	    if(!flag)fprintf(stderr,"clipping in frame %ld ",frameno+i);
+	    flag=1;
+	    val=32767;
+	  }
+	  if(val<-32768){
+	    if(!flag)fprintf(stderr,"clipping in frame %ld ",frameno+i);
+	    flag=1;
+	    val=-32768;
+	  }
+	  ptr[0]=val&0xff;
+	  ptr[1]=(val>>8)&0xff;
+	  ptr+=4;
+	}
+      }
+ 
+      fprintf(stderr,"*");
+      fwrite(buffer,1,framesize*2,stdout);
+      memmove(buffer,buffer2,framesize*2);
+
+      for(i=0;i<2;i++){
+	for(j=0,k=framesize/2;j<framesize/2;j++,k++)
+	  out[i][j]=pcm[i][k]*window[k];
+      }
+      frameno+=2;
+    }else
+      eos=1;
+  }
+  fprintf(stderr,"average raw bits of entropy: %.03g/sample\n",acc/tot);
+  fprintf(stderr,"average nonzero samples: %.03g/%d\n",nonz/tot*framesize/2,
+	  framesize/2);
+  fprintf(stderr,"Done\n\n");
+  return 0;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/registry.c
@@ -1,0 +1,46 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: registry for time, floor, res backends and channel mappings
+ last mod: $Id: registry.c,v 1.15 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "misc.h"
+/* seems like major overkill now; the backend numbers will grow into
+   the infrastructure soon enough */
+
+extern vorbis_func_floor     floor0_exportbundle;
+extern vorbis_func_floor     floor1_exportbundle;
+extern vorbis_func_residue   residue0_exportbundle;
+extern vorbis_func_residue   residue1_exportbundle;
+extern vorbis_func_residue   residue2_exportbundle;
+extern vorbis_func_mapping   mapping0_exportbundle;
+
+vorbis_func_floor     *_floor_P[]={
+  &floor0_exportbundle,
+  &floor1_exportbundle,
+};
+
+vorbis_func_residue   *_residue_P[]={
+  &residue0_exportbundle,
+  &residue1_exportbundle,
+  &residue2_exportbundle,
+};
+
+vorbis_func_mapping   *_mapping_P[]={
+  &mapping0_exportbundle,
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/registry.h
@@ -1,0 +1,32 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: registry for time, floor, res backends and channel mappings
+ last mod: $Id: registry.h,v 1.13 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_REG_H_
+#define _V_REG_H_
+
+#define VI_TRANSFORMB 1
+#define VI_WINDOWB 1
+#define VI_TIMEB 1
+#define VI_FLOORB 2
+#define VI_RESB 3
+#define VI_MAPB 1
+
+extern vorbis_func_floor     *_floor_P[];
+extern vorbis_func_residue   *_residue_P[];
+extern vorbis_func_mapping   *_mapping_P[];
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/res0.c
@@ -1,0 +1,907 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: residue backend 0, 1 and 2 implementation
+ last mod: $Id: res0.c,v 1.48 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+/* Slow, slow, slow, simpleminded and did I mention it was slow?  The
+   encode/decode loops are coded for clarity and performance is not
+   yet even a nagging little idea lurking in the shadows.  Oh and BTW,
+   it's slow. */
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "codebook.h"
+#include "misc.h"
+#include "os.h"
+
+#ifdef TRAIN_RES
+#include <stdio.h>
+#endif 
+
+typedef struct {
+  vorbis_info_residue0 *info;
+  
+  int         parts;
+  int         stages;
+  codebook   *fullbooks;
+  codebook   *phrasebook;
+  codebook ***partbooks;
+
+  int         partvals;
+  int       **decodemap;
+
+  long      postbits;
+  long      phrasebits;
+  long      frames;
+
+#ifdef TRAIN_RES
+  int        train_seq;
+  long      *training_data[8][64];
+  float      training_max[8][64];
+  float      training_min[8][64];
+  float     tmin;
+  float     tmax;
+#endif
+
+} vorbis_look_residue0;
+
+void res0_free_info(vorbis_info_residue *i){
+  vorbis_info_residue0 *info=(vorbis_info_residue0 *)i;
+  if(info){
+    memset(info,0,sizeof(*info));
+    _ogg_free(info);
+  }
+}
+
+void res0_free_look(vorbis_look_residue *i){
+  int j;
+  if(i){
+
+    vorbis_look_residue0 *look=(vorbis_look_residue0 *)i;
+
+#ifdef TRAIN_RES
+    {
+      int j,k,l;
+      for(j=0;j<look->parts;j++){
+	/*fprintf(stderr,"partition %d: ",j);*/
+	for(k=0;k<8;k++)
+	  if(look->training_data[k][j]){
+	    char buffer[80];
+	    FILE *of;
+	    codebook *statebook=look->partbooks[j][k];
+	    
+	    /* long and short into the same bucket by current convention */
+	    sprintf(buffer,"res_part%d_pass%d.vqd",j,k);
+	    of=fopen(buffer,"a");
+
+	    for(l=0;l<statebook->entries;l++)
+	      fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]);
+	    
+	    fclose(of);
+	    
+	    /*fprintf(stderr,"%d(%.2f|%.2f) ",k,
+	      look->training_min[k][j],look->training_max[k][j]);*/
+
+	    _ogg_free(look->training_data[k][j]);
+	  }
+	/*fprintf(stderr,"\n");*/
+      }
+    }
+    fprintf(stderr,"min/max residue: %g::%g\n",look->tmin,look->tmax);
+
+    /*fprintf(stderr,"residue bit usage %f:%f (%f total)\n",
+	    (float)look->phrasebits/look->frames,
+	    (float)look->postbits/look->frames,
+	    (float)(look->postbits+look->phrasebits)/look->frames);*/
+#endif
+
+
+    /*vorbis_info_residue0 *info=look->info;
+
+    fprintf(stderr,
+	    "%ld frames encoded in %ld phrasebits and %ld residue bits "
+	    "(%g/frame) \n",look->frames,look->phrasebits,
+	    look->resbitsflat,
+	    (look->phrasebits+look->resbitsflat)/(float)look->frames);
+    
+    for(j=0;j<look->parts;j++){
+      long acc=0;
+      fprintf(stderr,"\t[%d] == ",j);
+      for(k=0;k<look->stages;k++)
+	if((info->secondstages[j]>>k)&1){
+	  fprintf(stderr,"%ld,",look->resbits[j][k]);
+	  acc+=look->resbits[j][k];
+	}
+
+      fprintf(stderr,":: (%ld vals) %1.2fbits/sample\n",look->resvals[j],
+	      acc?(float)acc/(look->resvals[j]*info->grouping):0);
+    }
+    fprintf(stderr,"\n");*/
+
+    for(j=0;j<look->parts;j++)
+      if(look->partbooks[j])_ogg_free(look->partbooks[j]);
+    _ogg_free(look->partbooks);
+    for(j=0;j<look->partvals;j++)
+      _ogg_free(look->decodemap[j]);
+    _ogg_free(look->decodemap);
+
+    memset(look,0,sizeof(*look));
+    _ogg_free(look);
+  }
+}
+
+static int ilog(unsigned int v){
+  int ret=0;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+static int icount(unsigned int v){
+  int ret=0;
+  while(v){
+    ret+=v&1;
+    v>>=1;
+  }
+  return(ret);
+}
+
+
+void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){
+  vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr;
+  int j,acc=0;
+  oggpack_write(opb,info->begin,24);
+  oggpack_write(opb,info->end,24);
+
+  oggpack_write(opb,info->grouping-1,24);  /* residue vectors to group and 
+					     code with a partitioned book */
+  oggpack_write(opb,info->partitions-1,6); /* possible partition choices */
+  oggpack_write(opb,info->groupbook,8);  /* group huffman book */
+
+  /* secondstages is a bitmask; as encoding progresses pass by pass, a
+     bitmask of one indicates this partition class has bits to write
+     this pass */
+  for(j=0;j<info->partitions;j++){
+    if(ilog(info->secondstages[j])>3){
+      /* yes, this is a minor hack due to not thinking ahead */
+      oggpack_write(opb,info->secondstages[j],3); 
+      oggpack_write(opb,1,1);
+      oggpack_write(opb,info->secondstages[j]>>3,5); 
+    }else
+      oggpack_write(opb,info->secondstages[j],4); /* trailing zero */
+    acc+=icount(info->secondstages[j]);
+  }
+  for(j=0;j<acc;j++)
+    oggpack_write(opb,info->booklist[j],8);
+
+}
+
+/* vorbis_info is for range checking */
+vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){
+  int j,acc=0;
+  vorbis_info_residue0 *info=_ogg_calloc(1,sizeof(*info));
+  codec_setup_info     *ci=vi->codec_setup;
+
+  info->begin=oggpack_read(opb,24);
+  info->end=oggpack_read(opb,24);
+  info->grouping=oggpack_read(opb,24)+1;
+  info->partitions=oggpack_read(opb,6)+1;
+  info->groupbook=oggpack_read(opb,8);
+
+  for(j=0;j<info->partitions;j++){
+    int cascade=oggpack_read(opb,3);
+    if(oggpack_read(opb,1))
+      cascade|=(oggpack_read(opb,5)<<3);
+    info->secondstages[j]=cascade;
+
+    acc+=icount(cascade);
+  }
+  for(j=0;j<acc;j++)
+    info->booklist[j]=oggpack_read(opb,8);
+
+  if(info->groupbook>=ci->books)goto errout;
+  for(j=0;j<acc;j++)
+    if(info->booklist[j]>=ci->books)goto errout;
+
+  return(info);
+ errout:
+  res0_free_info(info);
+  return(NULL);
+}
+
+vorbis_look_residue *res0_look(vorbis_dsp_state *vd,
+			       vorbis_info_residue *vr){
+  vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr;
+  vorbis_look_residue0 *look=_ogg_calloc(1,sizeof(*look));
+  codec_setup_info     *ci=vd->vi->codec_setup;
+
+  int j,k,acc=0;
+  int dim;
+  int maxstage=0;
+  look->info=info;
+
+  look->parts=info->partitions;
+  look->fullbooks=ci->fullbooks;
+  look->phrasebook=ci->fullbooks+info->groupbook;
+  dim=look->phrasebook->dim;
+
+  look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks));
+
+  for(j=0;j<look->parts;j++){
+    int stages=ilog(info->secondstages[j]);
+    if(stages){
+      if(stages>maxstage)maxstage=stages;
+      look->partbooks[j]=_ogg_calloc(stages,sizeof(*look->partbooks[j]));
+      for(k=0;k<stages;k++)
+	if(info->secondstages[j]&(1<<k)){
+	  look->partbooks[j][k]=ci->fullbooks+info->booklist[acc++];
+#ifdef TRAIN_RES
+	  look->training_data[k][j]=calloc(look->partbooks[j][k]->entries,
+					   sizeof(***look->training_data));
+#endif
+	}
+    }
+  }
+
+  look->partvals=rint(pow((float)look->parts,(float)dim));
+  look->stages=maxstage;
+  look->decodemap=_ogg_malloc(look->partvals*sizeof(*look->decodemap));
+  for(j=0;j<look->partvals;j++){
+    long val=j;
+    long mult=look->partvals/look->parts;
+    look->decodemap[j]=_ogg_malloc(dim*sizeof(*look->decodemap[j]));
+    for(k=0;k<dim;k++){
+      long deco=val/mult;
+      val-=deco*mult;
+      mult/=look->parts;
+      look->decodemap[j][k]=deco;
+    }
+  }
+#ifdef TRAIN_RES
+  {
+    static int train_seq=0;
+    look->train_seq=train_seq++;
+  }
+#endif
+  return(look);
+}
+
+/* break an abstraction and copy some code for performance purposes */
+static int local_book_besterror(codebook *book,float *a){
+  int dim=book->dim,i,k,o;
+  int best=0;
+  encode_aux_threshmatch *tt=book->c->thresh_tree;
+
+  /* find the quant val of each scalar */
+  for(k=0,o=dim;k<dim;++k){
+    float val=a[--o];
+    i=tt->threshvals>>1;
+
+    if(val<tt->quantthresh[i]){      
+      if(val<tt->quantthresh[i-1]){
+	for(--i;i>0;--i)
+	  if(val>=tt->quantthresh[i-1])
+	    break;
+      }
+    }else{
+      
+      for(++i;i<tt->threshvals-1;++i)
+	if(val<tt->quantthresh[i])break;
+      
+    }
+    
+    best=(best*tt->quantvals)+tt->quantmap[i];
+  }
+  /* regular lattices are easy :-) */
+  
+  if(book->c->lengthlist[best]<=0){
+    const static_codebook *c=book->c;
+    int i,j;
+    float bestf=0.f;
+    float *e=book->valuelist;
+    best=-1;
+    for(i=0;i<book->entries;i++){
+      if(c->lengthlist[i]>0){
+	float this=0.f;
+	for(j=0;j<dim;j++){
+	  float val=(e[j]-a[j]);
+	  this+=val*val;
+	}
+	if(best==-1 || this<bestf){
+	  bestf=this;
+	  best=i;
+	}
+      }
+      e++;
+    }
+  }
+
+  {
+    float *ptr=book->valuelist+best*dim;
+    for(i=0;i<dim;i++)
+      *a++ -= *ptr++;
+  }
+
+  return(best);
+}
+
+static int _encodepart(oggpack_buffer *opb,float *vec, int n,
+		       codebook *book,long *acc){
+  int i,bits=0;
+  int dim=book->dim;
+  int step=n/dim;
+
+  for(i=0;i<step;i++){
+    int entry=local_book_besterror(book,vec+i*dim);
+
+#ifdef TRAIN_RES
+    acc[entry]++;
+#endif
+
+    bits+=vorbis_book_encode(book,entry,opb);
+  }
+
+  return(bits);
+}
+
+static long **_01class(vorbis_block *vb,vorbis_look_residue *vl,
+		       float **in,int ch){
+  long i,j,k;
+  vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
+  vorbis_info_residue0 *info=look->info;
+  vorbis_info           *vi=vb->vd->vi;
+  codec_setup_info      *ci=vi->codec_setup;
+
+  /* move all this setup out later */
+  int samples_per_partition=info->grouping;
+  int possible_partitions=info->partitions;
+  int n=info->end-info->begin;
+  
+  int partvals=n/samples_per_partition;
+  long **partword=_vorbis_block_alloc(vb,ch*sizeof(*partword));
+  float scale=100./samples_per_partition;
+
+  /* we find the partition type for each partition of each
+     channel.  We'll go back and do the interleaved encoding in a
+     bit.  For now, clarity */
+ 
+  for(i=0;i<ch;i++){
+    partword[i]=_vorbis_block_alloc(vb,n/samples_per_partition*sizeof(*partword[i]));
+    memset(partword[i],0,n/samples_per_partition*sizeof(*partword[i]));
+  }
+  
+  for(i=0;i<partvals;i++){
+    int offset=i*samples_per_partition+info->begin;
+    for(j=0;j<ch;j++){
+      float max=0.;
+      float ent=0.;
+      for(k=0;k<samples_per_partition;k++){
+	if(fabs(in[j][offset+k])>max)max=fabs(in[j][offset+k]);
+	ent+=fabs(rint(in[j][offset+k]));
+      }
+      ent*=scale;
+      
+      for(k=0;k<possible_partitions-1;k++)
+	if(max<=info->classmetric1[k] &&
+	   (info->classmetric2[k]<0 || (int)ent<info->classmetric2[k]))
+	  break;
+      
+      partword[j][i]=k;  
+    }
+  }
+
+#ifdef TRAIN_RESAUX
+  {
+    FILE *of;
+    char buffer[80];
+  
+    for(i=0;i<ch;i++){
+      sprintf(buffer,"resaux_%d.vqd",look->train_seq);
+      of=fopen(buffer,"a");
+      for(j=0;j<partvals;j++)
+	fprintf(of,"%ld, ",partword[i][j]);
+      fprintf(of,"\n");
+      fclose(of);
+    }
+  }
+#endif
+  look->frames++;
+
+  return(partword);
+}
+
+/* designed for stereo or other modes where the partition size is an
+   integer multiple of the number of channels encoded in the current
+   submap */
+static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,float **in,
+		      int ch){
+  long i,j,k,l;
+  vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
+  vorbis_info_residue0 *info=look->info;
+
+  /* move all this setup out later */
+  int samples_per_partition=info->grouping;
+  int possible_partitions=info->partitions;
+  int n=info->end-info->begin;
+
+  int partvals=n/samples_per_partition;
+  long **partword=_vorbis_block_alloc(vb,sizeof(*partword));
+
+#ifdef TRAIN_RES
+  FILE *of;
+  char buffer[80];
+#endif
+  
+  partword[0]=_vorbis_block_alloc(vb,n*ch/samples_per_partition*sizeof(*partword[0]));
+  memset(partword[0],0,n*ch/samples_per_partition*sizeof(*partword[0]));
+
+  for(i=0,l=info->begin/ch;i<partvals;i++){
+    float magmax=0.f;
+    float angmax=0.f;
+    for(j=0;j<samples_per_partition;j+=ch){
+      if(fabs(in[0][l])>magmax)magmax=fabs(in[0][l]);
+      for(k=1;k<ch;k++)
+	if(fabs(in[k][l])>angmax)angmax=fabs(in[k][l]);
+      l++;
+    }
+
+    for(j=0;j<possible_partitions-1;j++)
+      if(magmax<=info->classmetric1[j] &&
+	 angmax<=info->classmetric2[j])
+	break;
+
+    partword[0][i]=j;
+
+  }  
+  
+#ifdef TRAIN_RESAUX
+  sprintf(buffer,"resaux_%d.vqd",look->train_seq);
+  of=fopen(buffer,"a");
+  for(i=0;i<partvals;i++)
+    fprintf(of,"%ld, ",partword[0][i]);
+  fprintf(of,"\n");
+  fclose(of);
+#endif
+
+  look->frames++;
+
+  return(partword);
+}
+
+static int _01forward(vorbis_block *vb,vorbis_look_residue *vl,
+		      float **in,int ch,
+		      long **partword,
+		      int (*encode)(oggpack_buffer *,float *,int,
+				    codebook *,long *)){
+  long i,j,k,s;
+  vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
+  vorbis_info_residue0 *info=look->info;
+
+  vorbis_dsp_state      *vd=vb->vd;
+
+  /* move all this setup out later */
+  int samples_per_partition=info->grouping;
+  int possible_partitions=info->partitions;
+  int partitions_per_word=look->phrasebook->dim;
+  int n=info->end-info->begin;
+
+  int partvals=n/samples_per_partition;
+  long resbits[128];
+  long resvals[128];
+
+#ifdef TRAIN_RES
+  for(i=0;i<ch;i++)
+    for(j=info->begin;j<info->end;j++){
+      if(in[i][j]>look->tmax)look->tmax=in[i][j];
+      if(in[i][j]<look->tmin)look->tmin=in[i][j];
+    }
+#endif
+
+  memset(resbits,0,sizeof(resbits));
+  memset(resvals,0,sizeof(resvals));
+  
+  /* we code the partition words for each channel, then the residual
+     words for a partition per channel until we've written all the
+     residual words for that partition word.  Then write the next
+     partition channel words... */
+
+  for(s=0;s<look->stages;s++){
+
+    for(i=0;i<partvals;){
+
+      /* first we encode a partition codeword for each channel */
+      if(s==0){
+	for(j=0;j<ch;j++){
+	  long val=partword[j][i];
+	  for(k=1;k<partitions_per_word;k++){
+	    val*=possible_partitions;
+	    if(i+k<partvals)
+	      val+=partword[j][i+k];
+	  }	
+
+	  /* training hack */
+	  if(val<look->phrasebook->entries)
+	    look->phrasebits+=vorbis_book_encode(look->phrasebook,val,&vb->opb);
+#if 0 /*def TRAIN_RES*/
+	  else
+	    fprintf(stderr,"!");
+#endif
+	
+	}
+      }
+      
+      /* now we encode interleaved residual values for the partitions */
+      for(k=0;k<partitions_per_word && i<partvals;k++,i++){
+	long offset=i*samples_per_partition+info->begin;
+	
+	for(j=0;j<ch;j++){
+	  if(s==0)resvals[partword[j][i]]+=samples_per_partition;
+	  if(info->secondstages[partword[j][i]]&(1<<s)){
+	    codebook *statebook=look->partbooks[partword[j][i]][s];
+	    if(statebook){
+	      int ret;
+	      long *accumulator=NULL;
+
+#ifdef TRAIN_RES
+	      accumulator=look->training_data[s][partword[j][i]];
+	      {
+		int l;
+		float *samples=in[j]+offset;
+		for(l=0;l<samples_per_partition;l++){
+		  if(samples[l]<look->training_min[s][partword[j][i]])
+		    look->training_min[s][partword[j][i]]=samples[l];
+		  if(samples[l]>look->training_max[s][partword[j][i]])
+		    look->training_max[s][partword[j][i]]=samples[l];
+		}
+	      }
+#endif
+	      
+	      ret=encode(&vb->opb,in[j]+offset,samples_per_partition,
+			 statebook,accumulator);
+
+	      look->postbits+=ret;
+	      resbits[partword[j][i]]+=ret;
+	    }
+	  }
+	}
+      }
+    }
+  }
+
+  /*{
+    long total=0;
+    long totalbits=0;
+    fprintf(stderr,"%d :: ",vb->mode);
+    for(k=0;k<possible_partitions;k++){
+      fprintf(stderr,"%ld/%1.2g, ",resvals[k],(float)resbits[k]/resvals[k]);
+      total+=resvals[k];
+      totalbits+=resbits[k];
+      }
+    
+    fprintf(stderr,":: %ld:%1.2g\n",total,(double)totalbits/total);
+    }*/
+  return(0);
+}
+
+/* a truncated packet here just means 'stop working'; it's not an error */
+static int _01inverse(vorbis_block *vb,vorbis_look_residue *vl,
+		      float **in,int ch,
+		      long (*decodepart)(codebook *, float *, 
+					 oggpack_buffer *,int)){
+
+  long i,j,k,l,s;
+  vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
+  vorbis_info_residue0 *info=look->info;
+
+  /* move all this setup out later */
+  int samples_per_partition=info->grouping;
+  int partitions_per_word=look->phrasebook->dim;
+  int n=info->end-info->begin;
+  
+  int partvals=n/samples_per_partition;
+  int partwords=(partvals+partitions_per_word-1)/partitions_per_word;
+  int ***partword=malloc(ch*sizeof(*partword));
+
+  for(j=0;j<ch;j++)
+    partword[j]=_vorbis_block_alloc(vb,partwords*sizeof(*partword[j]));
+
+  for(s=0;s<look->stages;s++){
+
+    /* each loop decodes on partition codeword containing 
+       partitions_pre_word partitions */
+    for(i=0,l=0;i<partvals;l++){
+      if(s==0){
+	/* fetch the partition word for each channel */
+	for(j=0;j<ch;j++){
+	  int temp=vorbis_book_decode(look->phrasebook,&vb->opb);
+	  if(temp==-1)goto eopbreak;
+	  partword[j][l]=look->decodemap[temp];
+	  if(partword[j][l]==NULL)goto errout;
+	}
+      }
+      
+      /* now we decode residual values for the partitions */
+      for(k=0;k<partitions_per_word && i<partvals;k++,i++)
+	for(j=0;j<ch;j++){
+	  long offset=info->begin+i*samples_per_partition;
+	  if(info->secondstages[partword[j][l][k]]&(1<<s)){
+	    codebook *stagebook=look->partbooks[partword[j][l][k]][s];
+	    if(stagebook){
+	      if(decodepart(stagebook,in[j]+offset,&vb->opb,
+			    samples_per_partition)==-1)goto eopbreak;
+	    }
+	  }
+	}
+    } 
+  }
+  
+ errout:
+ eopbreak:
+  free(partword);
+  return(0);
+}
+
+#if 0
+/* residue 0 and 1 are just slight variants of one another. 0 is
+   interleaved, 1 is not */
+long **res0_class(vorbis_block *vb,vorbis_look_residue *vl,
+		  float **in,int *nonzero,int ch){
+  /* we encode only the nonzero parts of a bundle */
+  int i,used=0;
+  for(i=0;i<ch;i++)
+    if(nonzero[i])
+      in[used++]=in[i];
+  if(used)
+    /*return(_01class(vb,vl,in,used,_interleaved_testhack));*/
+    return(_01class(vb,vl,in,used));
+  else
+    return(0);
+}
+
+int res0_forward(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,float **out,int *nonzero,int ch,
+		 long **partword){
+  /* we encode only the nonzero parts of a bundle */
+  int i,j,used=0,n=vb->pcmend/2;
+  for(i=0;i<ch;i++)
+    if(nonzero[i]){
+      if(out)
+	for(j=0;j<n;j++)
+	  out[i][j]+=in[i][j];
+      in[used++]=in[i];
+    }
+  if(used){
+    int ret=_01forward(vb,vl,in,used,partword,
+		      _interleaved_encodepart);
+    if(out){
+      used=0;
+      for(i=0;i<ch;i++)
+	if(nonzero[i]){
+	  for(j=0;j<n;j++)
+	    out[i][j]-=in[used][j];
+	  used++;
+	}
+    }
+    return(ret);
+  }else{
+    return(0);
+  }
+}
+#endif
+
+int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,int *nonzero,int ch){
+  int i,used=0;
+  for(i=0;i<ch;i++)
+    if(nonzero[i])
+      in[used++]=in[i];
+  if(used)
+    return(_01inverse(vb,vl,in,used,vorbis_book_decodevs_add));
+  else
+    return(0);
+}
+
+int res1_forward(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,float **out,int *nonzero,int ch,
+		 long **partword){
+  int i,j,used=0,n=vb->pcmend/2;
+  for(i=0;i<ch;i++)
+    if(nonzero[i]){
+      if(out)
+	for(j=0;j<n;j++)
+	  out[i][j]+=in[i][j];
+      in[used++]=in[i];
+    }
+
+  if(used){
+    int ret=_01forward(vb,vl,in,used,partword,_encodepart);
+    if(out){
+      used=0;
+      for(i=0;i<ch;i++)
+	if(nonzero[i]){
+	  for(j=0;j<n;j++)
+	    out[i][j]-=in[used][j];
+	  used++;
+	}
+    }
+    return(ret);
+  }else{
+    return(0);
+  }
+}
+
+long **res1_class(vorbis_block *vb,vorbis_look_residue *vl,
+		  float **in,int *nonzero,int ch){
+  int i,used=0;
+  for(i=0;i<ch;i++)
+    if(nonzero[i])
+      in[used++]=in[i];
+  if(used)
+    return(_01class(vb,vl,in,used));
+  else
+    return(0);
+}
+
+int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,int *nonzero,int ch){
+  int i,used=0;
+  for(i=0;i<ch;i++)
+    if(nonzero[i])
+      in[used++]=in[i];
+  if(used)
+    return(_01inverse(vb,vl,in,used,vorbis_book_decodev_add));
+  else
+    return(0);
+}
+
+long **res2_class(vorbis_block *vb,vorbis_look_residue *vl,
+		  float **in,int *nonzero,int ch){
+  int i,used=0;
+  for(i=0;i<ch;i++)
+    if(nonzero[i])used++;
+  if(used)
+    return(_2class(vb,vl,in,ch));
+  else
+    return(0);
+}
+
+/* res2 is slightly more different; all the channels are interleaved
+   into a single vector and encoded. */
+
+int res2_forward(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,float **out,int *nonzero,int ch,
+		 long **partword){
+  long i,j,k,n=vb->pcmend/2,used=0;
+
+  /* don't duplicate the code; use a working vector hack for now and
+     reshape ourselves into a single channel res1 */
+  /* ugly; reallocs for each coupling pass :-( */
+  float *work=_vorbis_block_alloc(vb,ch*n*sizeof(*work));
+  for(i=0;i<ch;i++){
+    float *pcm=in[i];
+    if(nonzero[i])used++;
+    for(j=0,k=i;j<n;j++,k+=ch)
+      work[k]=pcm[j];
+  }
+  
+  if(used){
+    int ret=_01forward(vb,vl,&work,1,partword,_encodepart);
+    /* update the sofar vector */
+    if(out){
+      for(i=0;i<ch;i++){
+	float *pcm=in[i];
+	float *sofar=out[i];
+	for(j=0,k=i;j<n;j++,k+=ch)
+	  sofar[j]+=pcm[j]-work[k];
+	
+      }
+    }
+    return(ret);
+  }else{
+    return(0);
+  }
+}
+
+/* duplicate code here as speed is somewhat more important */
+int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+		 float **in,int *nonzero,int ch){
+  long i,k,l,s;
+  vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
+  vorbis_info_residue0 *info=look->info;
+
+  /* move all this setup out later */
+  int samples_per_partition=info->grouping;
+  int partitions_per_word=look->phrasebook->dim;
+  int n=info->end-info->begin;
+
+  int partvals=n/samples_per_partition;
+  int partwords=(partvals+partitions_per_word-1)/partitions_per_word;
+  int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword));
+
+  for(i=0;i<ch;i++)if(nonzero[i])break;
+  if(i==ch)return(0); /* no nonzero vectors */
+
+  for(s=0;s<look->stages;s++){
+    for(i=0,l=0;i<partvals;l++){
+
+      if(s==0){
+	/* fetch the partition word */
+	int temp=vorbis_book_decode(look->phrasebook,&vb->opb);
+	if(temp==-1)goto eopbreak;
+	partword[l]=look->decodemap[temp];
+	if(partword[l]==NULL)goto errout;
+      }
+
+      /* now we decode residual values for the partitions */
+      for(k=0;k<partitions_per_word && i<partvals;k++,i++)
+	if(info->secondstages[partword[l][k]]&(1<<s)){
+	  codebook *stagebook=look->partbooks[partword[l][k]][s];
+	  
+	  if(stagebook){
+	    if(vorbis_book_decodevv_add(stagebook,in,
+					i*samples_per_partition+info->begin,ch,
+					&vb->opb,samples_per_partition)==-1)
+	      goto eopbreak;
+	  }
+	}
+    } 
+  }
+  
+ errout:
+ eopbreak:
+  return(0);
+}
+
+
+vorbis_func_residue residue0_exportbundle={
+  NULL,
+  &res0_unpack,
+  &res0_look,
+  &res0_free_info,
+  &res0_free_look,
+  NULL,
+  NULL,
+  &res0_inverse
+};
+
+vorbis_func_residue residue1_exportbundle={
+  &res0_pack,
+  &res0_unpack,
+  &res0_look,
+  &res0_free_info,
+  &res0_free_look,
+  &res1_class,
+  &res1_forward,
+  &res1_inverse
+};
+
+vorbis_func_residue residue2_exportbundle={
+  &res0_pack,
+  &res0_unpack,
+  &res0_look,
+  &res0_free_info,
+  &res0_free_look,
+  &res2_class,
+  &res2_forward,
+  &res2_inverse
+};
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/scales.h
@@ -1,0 +1,88 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: linear scale -> dB, Bark and Mel scales
+ last mod: $Id: scales.h,v 1.26 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_SCALES_H_
+#define _V_SCALES_H_
+
+#include <math.h>
+#include "os.h"
+
+/* 20log10(x) */
+#define VORBIS_IEEE_FLOAT32 1
+#ifdef VORBIS_IEEE_FLOAT32
+
+static float unitnorm(float x){
+  ogg_uint32_t *ix=(ogg_uint32_t *)&x;
+  *ix=(*ix&0x80000000UL)|(0x3f800000UL);
+  return(x);
+}
+
+static float FABS(float *x){
+  ogg_uint32_t *ix=(ogg_uint32_t *)x;
+  *ix&=0x7fffffffUL;
+  return(*x);
+}
+
+static float todB(const float *x){
+  float calc;
+  ogg_int32_t *i=(ogg_int32_t *)x;
+  calc = ((*i) & 0x7fffffff);
+  calc *= 7.1771144e-7f;
+  calc += -764.27118f;
+  return calc;
+}
+
+#define todB_nn(x) todB(x)
+
+#else
+
+static float unitnorm(float x){
+  if(x<0)return(-1.f);
+  return(1.f);
+}
+
+#define FABS(x) fabs(*(x))
+
+#define todB(x)   (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f)
+#define todB_nn(x)   (*(x)==0.f?-400.f:log(*(x))*8.6858896f)
+
+#endif 
+
+#define fromdB(x) (exp((x)*.11512925f))  
+
+/* The bark scale equations are approximations, since the original
+   table was somewhat hand rolled.  The below are chosen to have the
+   best possible fit to the rolled tables, thus their somewhat odd
+   appearance (these are more accurate and over a longer range than
+   the oft-quoted bark equations found in the texts I have).  The
+   approximations are valid from 0 - 30kHz (nyquist) or so.
+
+   all f in Hz, z in Bark */
+
+#define toBARK(n)   (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
+#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
+#define toMEL(n)    (log(1.f+(n)*.001f)*1442.695f)
+#define fromMEL(m)  (1000.f*exp((m)/1442.695f)-1000.f)
+
+/* Frequency to octave.  We arbitrarily declare 63.5 Hz to be octave
+   0.0 */
+
+#define toOC(n)     (log(n)*1.442695f-5.965784f)
+#define fromOC(o)   (exp(((o)+5.965784f)*.693147f))
+
+#endif
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/sharedbook.c
@@ -1,0 +1,737 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: basic shared codebook operations
+ last mod: $Id: sharedbook.c,v 1.28 2002/06/28 22:19:37 xiphmont Exp $
+
+ ********************************************************************/
+
+#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"
+
+/**** pack/unpack helpers ******************************************/
+int _ilog(unsigned int v){
+  int ret=0;
+  while(v){
+    ret++;
+    v>>=1;
+  }
+  return(ret);
+}
+
+/* 32 bit float (not IEEE; nonnormalized mantissa +
+   biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm 
+   Why not IEEE?  It's just not that important here. */
+
+#define VQ_FEXP 10
+#define VQ_FMAN 21
+#define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */
+
+/* doesn't currently guard under/overflow */
+long _float32_pack(float val){
+  int sign=0;
+  long exp;
+  long mant;
+  if(val<0){
+    sign=0x80000000;
+    val= -val;
+  }
+  exp= floor(log(val)/log(2.f));
+  mant=rint(ldexp(val,(VQ_FMAN-1)-exp));
+  exp=(exp+VQ_FEXP_BIAS)<<VQ_FMAN;
+
+  return(sign|exp|mant);
+}
+
+float _float32_unpack(long val){
+  double mant=val&0x1fffff;
+  int    sign=val&0x80000000;
+  long   exp =(val&0x7fe00000L)>>VQ_FMAN;
+  if(sign)mant= -mant;
+  return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS));
+}
+
+/* given a list of word lengths, generate a list of codewords.  Works
+   for length ordered or unordered, always assigns the lowest valued
+   codewords first.  Extended to handle unused entries (length 0) */
+ogg_uint32_t *_make_words(long *l,long n,long sparsecount){
+  long i,j,count=0;
+  ogg_uint32_t marker[33];
+  ogg_uint32_t *r=_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r));
+  memset(marker,0,sizeof(marker));
+
+  for(i=0;i<n;i++){
+    long length=l[i];
+    if(length>0){
+      ogg_uint32_t entry=marker[length];
+      
+      /* when we claim a node for an entry, we also claim the nodes
+	 below it (pruning off the imagined tree that may have dangled
+	 from it) as well as blocking the use of any nodes directly
+	 above for leaves */
+      
+      /* update ourself */
+      if(length<32 && (entry>>length)){
+	/* error condition; the lengths must specify an overpopulated tree */
+	_ogg_free(r);
+	return(NULL);
+      }
+      r[count++]=entry;
+    
+      /* Look to see if the next shorter marker points to the node
+	 above. if so, update it and repeat.  */
+      {
+	for(j=length;j>0;j--){
+	  
+	  if(marker[j]&1){
+	    /* have to jump branches */
+	    if(j==1)
+	      marker[1]++;
+	    else
+	      marker[j]=marker[j-1]<<1;
+	    break; /* invariant says next upper marker would already
+		      have been moved if it was on the same path */
+	  }
+	  marker[j]++;
+	}
+      }
+      
+      /* prune the tree; the implicit invariant says all the longer
+	 markers were dangling from our just-taken node.  Dangle them
+	 from our *new* node. */
+      for(j=length+1;j<33;j++)
+	if((marker[j]>>1) == entry){
+	  entry=marker[j];
+	  marker[j]=marker[j-1]<<1;
+	}else
+	  break;
+    }else
+      if(sparsecount==0)count++;
+  }
+    
+  /* bitreverse the words because our bitwise packer/unpacker is LSb
+     endian */
+  for(i=0,count=0;i<n;i++){
+    ogg_uint32_t temp=0;
+    for(j=0;j<l[i];j++){
+      temp<<=1;
+      temp|=(r[count]>>j)&1;
+    }
+
+    if(sparsecount){
+      if(l[i])
+	r[count++]=temp;
+    }else
+      r[count++]=temp;
+  }
+
+  return(r);
+}
+
+/* there might be a straightforward one-line way to do the below
+   that's portable and totally safe against roundoff, but I haven't
+   thought of it.  Therefore, we opt on the side of caution */
+long _book_maptype1_quantvals(const static_codebook *b){
+  long vals=floor(pow((float)b->entries,1.f/b->dim));
+
+  /* the above *should* be reliable, but we'll not assume that FP is
+     ever reliable when bitstream sync is at stake; verify via integer
+     means that vals really is the greatest value of dim for which
+     vals^b->bim <= b->entries */
+  /* treat the above as an initial guess */
+  while(1){
+    long acc=1;
+    long acc1=1;
+    int i;
+    for(i=0;i<b->dim;i++){
+      acc*=vals;
+      acc1*=vals+1;
+    }
+    if(acc<=b->entries && acc1>b->entries){
+      return(vals);
+    }else{
+      if(acc>b->entries){
+	vals--;
+      }else{
+	vals++;
+      }
+    }
+  }
+}
+
+/* unpack the quantized list of values for encode/decode ***********/
+/* we need to deal with two map types: in map type 1, the values are
+   generated algorithmically (each column of the vector counts through
+   the values in the quant vector). in map type 2, all the values came
+   in in an explicit list.  Both value lists must be unpacked */
+float *_book_unquantize(const static_codebook *b,int n,int *sparsemap){
+  long j,k,count=0;
+  if(b->maptype==1 || b->maptype==2){
+    int quantvals;
+    float mindel=_float32_unpack(b->q_min);
+    float delta=_float32_unpack(b->q_delta);
+    float *r=_ogg_calloc(n*b->dim,sizeof(*r));
+
+    /* maptype 1 and 2 both use a quantized value vector, but
+       different sizes */
+    switch(b->maptype){
+    case 1:
+      /* most of the time, entries%dimensions == 0, but we need to be
+	 well defined.  We define that the possible vales at each
+	 scalar is values == entries/dim.  If entries%dim != 0, we'll
+	 have 'too few' values (values*dim<entries), which means that
+	 we'll have 'left over' entries; left over entries use zeroed
+	 values (and are wasted).  So don't generate codebooks like
+	 that */
+      quantvals=_book_maptype1_quantvals(b);
+      for(j=0;j<b->entries;j++){
+	if((sparsemap && b->lengthlist[j]) || !sparsemap){
+	  float last=0.f;
+	  int indexdiv=1;
+	  for(k=0;k<b->dim;k++){
+	    int index= (j/indexdiv)%quantvals;
+	    float val=b->quantlist[index];
+	    val=fabs(val)*delta+mindel+last;
+	    if(b->q_sequencep)last=val;	  
+	    if(sparsemap)
+	      r[sparsemap[count]*b->dim+k]=val;
+	    else
+	      r[count*b->dim+k]=val;
+	    indexdiv*=quantvals;
+	  }
+	  count++;
+	}
+
+      }
+      break;
+    case 2:
+      for(j=0;j<b->entries;j++){
+	if((sparsemap && b->lengthlist[j]) || !sparsemap){
+	  float last=0.f;
+	  
+	  for(k=0;k<b->dim;k++){
+	    float val=b->quantlist[j*b->dim+k];
+	    val=fabs(val)*delta+mindel+last;
+	    if(b->q_sequencep)last=val;	  
+	    if(sparsemap)
+	      r[sparsemap[count]*b->dim+k]=val;
+	    else
+	      r[count*b->dim+k]=val;
+	  }
+	  count++;
+	}
+      }
+      break;
+    }
+
+    return(r);
+  }
+  return(NULL);
+}
+
+void vorbis_staticbook_clear(static_codebook *b){
+  if(b->allocedp){
+    if(b->quantlist)_ogg_free(b->quantlist);
+    if(b->lengthlist)_ogg_free(b->lengthlist);
+    if(b->nearest_tree){
+      _ogg_free(b->nearest_tree->ptr0);
+      _ogg_free(b->nearest_tree->ptr1);
+      _ogg_free(b->nearest_tree->p);
+      _ogg_free(b->nearest_tree->q);
+      memset(b->nearest_tree,0,sizeof(*b->nearest_tree));
+      _ogg_free(b->nearest_tree);
+    }
+    if(b->thresh_tree){
+      _ogg_free(b->thresh_tree->quantthresh);
+      _ogg_free(b->thresh_tree->quantmap);
+      memset(b->thresh_tree,0,sizeof(*b->thresh_tree));
+      _ogg_free(b->thresh_tree);
+    }
+
+    memset(b,0,sizeof(*b));
+  }
+}
+
+void vorbis_staticbook_destroy(static_codebook *b){
+  if(b->allocedp){
+    vorbis_staticbook_clear(b);
+    _ogg_free(b);
+  }
+}
+
+void vorbis_book_clear(codebook *b){
+  /* static book is not cleared; we're likely called on the lookup and
+     the static codebook belongs to the info struct */
+  if(b->valuelist)_ogg_free(b->valuelist);
+  if(b->codelist)_ogg_free(b->codelist);
+
+  if(b->dec_index)_ogg_free(b->dec_index);
+  if(b->dec_codelengths)_ogg_free(b->dec_codelengths);
+  if(b->dec_firsttable)_ogg_free(b->dec_firsttable);
+
+  memset(b,0,sizeof(*b));
+}
+
+int vorbis_book_init_encode(codebook *c,const static_codebook *s){
+
+  memset(c,0,sizeof(*c));
+  c->c=s;
+  c->entries=s->entries;
+  c->used_entries=s->entries;
+  c->dim=s->dim;
+  c->codelist=_make_words(s->lengthlist,s->entries,0);
+  c->valuelist=_book_unquantize(s,s->entries,NULL);
+
+  return(0);
+}
+
+static ogg_uint32_t bitreverse(ogg_uint32_t x){
+  x=    ((x>>16)&0x0000ffffUL) | ((x<<16)&0xffff0000UL);
+  x=    ((x>> 8)&0x00ff00ffUL) | ((x<< 8)&0xff00ff00UL);
+  x=    ((x>> 4)&0x0f0f0f0fUL) | ((x<< 4)&0xf0f0f0f0UL);
+  x=    ((x>> 2)&0x33333333UL) | ((x<< 2)&0xccccccccUL);
+  return((x>> 1)&0x55555555UL) | ((x<< 1)&0xaaaaaaaaUL);
+}
+
+static int sort32a(const void *a,const void *b){
+  return ( (**(ogg_uint32_t **)a>**(ogg_uint32_t **)b)<<1)-1;
+}
+
+/* decode codebook arrangement is more heavily optimized than encode */
+int vorbis_book_init_decode(codebook *c,const static_codebook *s){
+  int i,j,n=0,tabn;
+  int *sortindex;
+  memset(c,0,sizeof(*c));
+  
+  /* count actually used entries */
+  for(i=0;i<s->entries;i++)
+    if(s->lengthlist[i]>0)
+      n++;
+
+  c->entries=s->entries;
+  c->used_entries=n;
+  c->dim=s->dim;
+
+  /* two different remappings go on here.  
+
+     First, we collapse the likely sparse codebook down only to
+     actually represented values/words.  This collapsing needs to be
+     indexed as map-valueless books are used to encode original entry
+     positions as integers.
+
+     Second, we reorder all vectors, including the entry index above,
+     by sorted bitreversed codeword to allow treeless decode. */
+
+  {
+    /* perform sort */
+    ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
+    ogg_uint32_t **codep;
+    if(codes==NULL) goto err_out;
+
+    codep=malloc(sizeof(*codep)*n);
+
+    for(i=0;i<n;i++){
+      codes[i]=bitreverse(codes[i]);
+      codep[i]=codes+i;
+    }
+
+    qsort(codep,n,sizeof(*codep),sort32a);
+
+    sortindex=malloc(n*sizeof(*sortindex));
+    c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
+    /* the index is a reverse index */
+    for(i=0;i<n;i++){
+      int position=codep[i]-codes;
+      sortindex[position]=i;
+    }
+
+    for(i=0;i<n;i++)
+      c->codelist[sortindex[i]]=codes[i];
+    _ogg_free(codes);
+    free(codep);
+  }
+
+  c->valuelist=_book_unquantize(s,n,sortindex);
+  c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
+
+  for(n=0,i=0;i<s->entries;i++)
+    if(s->lengthlist[i]>0)
+      c->dec_index[sortindex[n++]]=i;
+  
+  c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
+  for(n=0,i=0;i<s->entries;i++)
+    if(s->lengthlist[i]>0)
+      c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
+
+  c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */
+  if(c->dec_firsttablen<5)c->dec_firsttablen=5;
+  if(c->dec_firsttablen>8)c->dec_firsttablen=8;
+
+  tabn=1<<c->dec_firsttablen;
+  c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
+  c->dec_maxlength=0;
+
+  for(i=0;i<n;i++){
+    if(c->dec_maxlength<c->dec_codelengths[i])
+      c->dec_maxlength=c->dec_codelengths[i];
+    if(c->dec_codelengths[i]<=c->dec_firsttablen){
+      ogg_uint32_t orig=bitreverse(c->codelist[i]);
+      for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
+	c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
+    }
+  }
+
+  /* now fill in 'unused' entries in the firsttable with hi/lo search
+     hints for the non-direct-hits */
+  {
+    ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
+    long lo=0,hi=0;
+
+    for(i=0;i<tabn;i++){
+      ogg_uint32_t word=i<<(32-c->dec_firsttablen);
+      if(c->dec_firsttable[bitreverse(word)]==0){
+	while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
+	while(    hi<n && word>=(c->codelist[hi]&mask))hi++;
+	
+	/* we only actually have 15 bits per hint to play with here.
+           In order to overflow gracefully (nothing breaks, efficiency
+           just drops), encode as the difference from the extremes. */
+	{
+	  unsigned long loval=lo;
+	  unsigned long hival=n-hi;
+
+	  if(loval>0x7fff)loval=0x7fff;
+	  if(hival>0x7fff)hival=0x7fff;
+	  c->dec_firsttable[bitreverse(word)]=
+	    0x80000000UL | (loval<<15) | hival;
+	}
+      }
+    }
+  }
+  
+
+  free(sortindex);
+  return(0);
+ err_out:
+  vorbis_book_clear(c);
+  free(sortindex);
+  return(-1);
+}
+
+static float _dist(int el,float *ref, float *b,int step){
+  int i;
+  float acc=0.f;
+  for(i=0;i<el;i++){
+    float val=(ref[i]-b[i*step]);
+    acc+=val*val;
+  }
+  return(acc);
+}
+
+int _best(codebook *book, float *a, int step){
+  encode_aux_threshmatch *tt=book->c->thresh_tree;
+
+#if 0
+  encode_aux_nearestmatch *nt=book->c->nearest_tree;
+  encode_aux_pigeonhole *pt=book->c->pigeon_tree;
+#endif
+  int dim=book->dim;
+  int k,o;
+  /*int savebest=-1;
+    float saverr;*/
+
+  /* do we have a threshhold encode hint? */
+  if(tt){
+    int index=0,i;
+    /* find the quant val of each scalar */
+    for(k=0,o=step*(dim-1);k<dim;k++,o-=step){
+
+      i=tt->threshvals>>1;
+      if(a[o]<tt->quantthresh[i]){
+
+	for(;i>0;i--)
+	  if(a[o]>=tt->quantthresh[i-1])
+	    break;
+	
+      }else{
+
+	for(i++;i<tt->threshvals-1;i++)
+	  if(a[o]<tt->quantthresh[i])break;
+
+      }
+
+      index=(index*tt->quantvals)+tt->quantmap[i];
+    }
+    /* regular lattices are easy :-) */
+    if(book->c->lengthlist[index]>0) /* is this unused?  If so, we'll
+					use a decision tree after all
+					and fall through*/
+      return(index);
+  }
+
+#if 0
+  /* do we have a pigeonhole encode hint? */
+  if(pt){
+    const static_codebook *c=book->c;
+    int i,besti=-1;
+    float best=0.f;
+    int entry=0;
+
+    /* dealing with sequentialness is a pain in the ass */
+    if(c->q_sequencep){
+      int pv;
+      long mul=1;
+      float qlast=0;
+      for(k=0,o=0;k<dim;k++,o+=step){
+	pv=(int)((a[o]-qlast-pt->min)/pt->del);
+	if(pv<0 || pv>=pt->mapentries)break;
+	entry+=pt->pigeonmap[pv]*mul;
+	mul*=pt->quantvals;
+	qlast+=pv*pt->del+pt->min;
+      }
+    }else{
+      for(k=0,o=step*(dim-1);k<dim;k++,o-=step){
+	int pv=(int)((a[o]-pt->min)/pt->del);
+	if(pv<0 || pv>=pt->mapentries)break;
+	entry=entry*pt->quantvals+pt->pigeonmap[pv];
+      }
+    }
+
+    /* must be within the pigeonholable range; if we quant outside (or
+       in an entry that we define no list for), brute force it */
+    if(k==dim && pt->fitlength[entry]){
+      /* search the abbreviated list */
+      long *list=pt->fitlist+pt->fitmap[entry];
+      for(i=0;i<pt->fitlength[entry];i++){
+	float this=_dist(dim,book->valuelist+list[i]*dim,a,step);
+	if(besti==-1 || this<best){
+	  best=this;
+	  besti=list[i];
+	}
+      }
+
+      return(besti); 
+    }
+  }
+
+  if(nt){
+    /* optimized using the decision tree */
+    while(1){
+      float c=0.f;
+      float *p=book->valuelist+nt->p[ptr];
+      float *q=book->valuelist+nt->q[ptr];
+      
+      for(k=0,o=0;k<dim;k++,o+=step)
+	c+=(p[k]-q[k])*(a[o]-(p[k]+q[k])*.5);
+      
+      if(c>0.f) /* in A */
+	ptr= -nt->ptr0[ptr];
+      else     /* in B */
+	ptr= -nt->ptr1[ptr];
+      if(ptr<=0)break;
+    }
+    return(-ptr);
+  }
+#endif 
+
+  /* brute force it! */
+  {
+    const static_codebook *c=book->c;
+    int i,besti=-1;
+    float best=0.f;
+    float *e=book->valuelist;
+    for(i=0;i<book->entries;i++){
+      if(c->lengthlist[i]>0){
+	float this=_dist(dim,e,a,step);
+	if(besti==-1 || this<best){
+	  best=this;
+	  besti=i;
+	}
+      }
+      e+=dim;
+    }
+
+    /*if(savebest!=-1 && savebest!=besti){
+      fprintf(stderr,"brute force/pigeonhole disagreement:\n"
+	      "original:");
+      for(i=0;i<dim*step;i+=step)fprintf(stderr,"%g,",a[i]);
+      fprintf(stderr,"\n"
+	      "pigeonhole (entry %d, err %g):",savebest,saverr);
+      for(i=0;i<dim;i++)fprintf(stderr,"%g,",
+				(book->valuelist+savebest*dim)[i]);
+      fprintf(stderr,"\n"
+	      "bruteforce (entry %d, err %g):",besti,best);
+      for(i=0;i<dim;i++)fprintf(stderr,"%g,",
+				(book->valuelist+besti*dim)[i]);
+      fprintf(stderr,"\n");
+      }*/
+    return(besti);
+  }
+}
+
+long vorbis_book_codeword(codebook *book,int entry){
+  if(book->c) /* only use with encode; decode optimizations are
+                 allowed to break this */
+    return book->codelist[entry];
+  return -1;
+}
+
+long vorbis_book_codelen(codebook *book,int entry){
+  if(book->c) /* only use with encode; decode optimizations are
+                 allowed to break this */
+    return book->c->lengthlist[entry];
+  return -1;
+}
+
+#ifdef _V_SELFTEST
+
+/* Unit tests of the dequantizer; this stuff will be OK
+   cross-platform, I simply want to be sure that special mapping cases
+   actually work properly; a bug could go unnoticed for a while */
+
+#include <stdio.h>
+
+/* cases:
+
+   no mapping
+   full, explicit mapping
+   algorithmic mapping
+
+   nonsequential
+   sequential
+*/
+
+static long full_quantlist1[]={0,1,2,3,    4,5,6,7, 8,3,6,1};
+static long partial_quantlist1[]={0,7,2};
+
+/* no mapping */
+static_codebook test1={
+  4,16,
+  NULL,
+  0,
+  0,0,0,0,
+  NULL,
+  NULL,NULL
+};
+static float *test1_result=NULL;
+  
+/* linear, full mapping, nonsequential */
+static_codebook test2={
+  4,3,
+  NULL,
+  2,
+  -533200896,1611661312,4,0,
+  full_quantlist1,
+  NULL,NULL
+};
+static float test2_result[]={-3,-2,-1,0, 1,2,3,4, 5,0,3,-2};
+
+/* linear, full mapping, sequential */
+static_codebook test3={
+  4,3,
+  NULL,
+  2,
+  -533200896,1611661312,4,1,
+  full_quantlist1,
+  NULL,NULL
+};
+static float test3_result[]={-3,-5,-6,-6, 1,3,6,10, 5,5,8,6};
+
+/* linear, algorithmic mapping, nonsequential */
+static_codebook test4={
+  3,27,
+  NULL,
+  1,
+  -533200896,1611661312,4,0,
+  partial_quantlist1,
+  NULL,NULL
+};
+static float test4_result[]={-3,-3,-3, 4,-3,-3, -1,-3,-3,
+			      -3, 4,-3, 4, 4,-3, -1, 4,-3,
+			      -3,-1,-3, 4,-1,-3, -1,-1,-3, 
+			      -3,-3, 4, 4,-3, 4, -1,-3, 4,
+			      -3, 4, 4, 4, 4, 4, -1, 4, 4,
+			      -3,-1, 4, 4,-1, 4, -1,-1, 4,
+			      -3,-3,-1, 4,-3,-1, -1,-3,-1,
+			      -3, 4,-1, 4, 4,-1, -1, 4,-1,
+			      -3,-1,-1, 4,-1,-1, -1,-1,-1};
+
+/* linear, algorithmic mapping, sequential */
+static_codebook test5={
+  3,27,
+  NULL,
+  1,
+  -533200896,1611661312,4,1,
+  partial_quantlist1,
+  NULL,NULL
+};
+static float test5_result[]={-3,-6,-9, 4, 1,-2, -1,-4,-7,
+			      -3, 1,-2, 4, 8, 5, -1, 3, 0,
+			      -3,-4,-7, 4, 3, 0, -1,-2,-5, 
+			      -3,-6,-2, 4, 1, 5, -1,-4, 0,
+			      -3, 1, 5, 4, 8,12, -1, 3, 7,
+			      -3,-4, 0, 4, 3, 7, -1,-2, 2,
+			      -3,-6,-7, 4, 1, 0, -1,-4,-5,
+			      -3, 1, 0, 4, 8, 7, -1, 3, 2,
+			      -3,-4,-5, 4, 3, 2, -1,-2,-3};
+
+void run_test(static_codebook *b,float *comp){
+  float *out=_book_unquantize(b,b->entries,NULL);
+  int i;
+
+  if(comp){
+    if(!out){
+      fprintf(stderr,"_book_unquantize incorrectly returned NULL\n");
+      exit(1);
+    }
+
+    for(i=0;i<b->entries*b->dim;i++)
+      if(fabs(out[i]-comp[i])>.0001){
+	fprintf(stderr,"disagreement in unquantized and reference data:\n"
+		"position %d, %g != %g\n",i,out[i],comp[i]);
+	exit(1);
+      }
+
+  }else{
+    if(out){
+      fprintf(stderr,"_book_unquantize returned a value array: \n"
+	      " correct result should have been NULL\n");
+      exit(1);
+    }
+  }
+}
+
+int main(){
+  /* run the nine dequant tests, and compare to the hand-rolled results */
+  fprintf(stderr,"Dequant test 1... ");
+  run_test(&test1,test1_result);
+  fprintf(stderr,"OK\nDequant test 2... ");
+  run_test(&test2,test2_result);
+  fprintf(stderr,"OK\nDequant test 3... ");
+  run_test(&test3,test3_result);
+  fprintf(stderr,"OK\nDequant test 4... ");
+  run_test(&test4,test4_result);
+  fprintf(stderr,"OK\nDequant test 5... ");
+  run_test(&test5,test5_result);
+  fprintf(stderr,"OK\n\n");
+  
+  return(0);
+}
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/smallft.c
@@ -1,0 +1,1254 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: *unnormalized* fft transform
+ last mod: $Id: smallft.c,v 1.17 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+/* FFT implementation from OggSquish, minus cosine transforms,
+ * minus all but radix 2/4 case.  In Vorbis we only need this
+ * cut-down version.
+ *
+ * To do more than just power-of-two sized vectors, see the full
+ * version I wrote for NetLib.
+ *
+ * Note that the packing is a little strange; rather than the FFT r/i
+ * packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1,
+ * it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the
+ * FORTRAN version
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "smallft.h"
+#include "misc.h"
+
+static void drfti1(int n, float *wa, int *ifac){
+  static int ntryh[4] = { 4,2,3,5 };
+  static float tpi = 6.28318530717958648f;
+  float arg,argh,argld,fi;
+  int ntry=0,i,j=-1;
+  int k1, l1, l2, ib;
+  int ld, ii, ip, is, nq, nr;
+  int ido, ipm, nfm1;
+  int nl=n;
+  int nf=0;
+
+ L101:
+  j++;
+  if (j < 4)
+    ntry=ntryh[j];
+  else
+    ntry+=2;
+
+ L104:
+  nq=nl/ntry;
+  nr=nl-ntry*nq;
+  if (nr!=0) goto L101;
+
+  nf++;
+  ifac[nf+1]=ntry;
+  nl=nq;
+  if(ntry!=2)goto L107;
+  if(nf==1)goto L107;
+
+  for (i=1;i<nf;i++){
+    ib=nf-i+1;
+    ifac[ib+1]=ifac[ib];
+  }
+  ifac[2] = 2;
+
+ L107:
+  if(nl!=1)goto L104;
+  ifac[0]=n;
+  ifac[1]=nf;
+  argh=tpi/n;
+  is=0;
+  nfm1=nf-1;
+  l1=1;
+
+  if(nfm1==0)return;
+
+  for (k1=0;k1<nfm1;k1++){
+    ip=ifac[k1+2];
+    ld=0;
+    l2=l1*ip;
+    ido=n/l2;
+    ipm=ip-1;
+
+    for (j=0;j<ipm;j++){
+      ld+=l1;
+      i=is;
+      argld=(float)ld*argh;
+      fi=0.f;
+      for (ii=2;ii<ido;ii+=2){
+	fi+=1.f;
+	arg=fi*argld;
+	wa[i++]=cos(arg);
+	wa[i++]=sin(arg);
+      }
+      is+=ido;
+    }
+    l1=l2;
+  }
+}
+
+static void fdrffti(int n, float *wsave, int *ifac){
+
+  if (n == 1) return;
+  drfti1(n, wsave+n, ifac);
+}
+
+static void dradf2(int ido,int l1,float *cc,float *ch,float *wa1){
+  int i,k;
+  float ti2,tr2;
+  int t0,t1,t2,t3,t4,t5,t6;
+
+  t1=0;
+  t0=(t2=l1*ido);
+  t3=ido<<1;
+  for(k=0;k<l1;k++){
+    ch[t1<<1]=cc[t1]+cc[t2];
+    ch[(t1<<1)+t3-1]=cc[t1]-cc[t2];
+    t1+=ido;
+    t2+=ido;
+  }
+    
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  t2=t0;
+  for(k=0;k<l1;k++){
+    t3=t2;
+    t4=(t1<<1)+(ido<<1);
+    t5=t1;
+    t6=t1+t1;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4-=2;
+      t5+=2;
+      t6+=2;
+      tr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+      ti2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+      ch[t6]=cc[t5]+ti2;
+      ch[t4]=ti2-cc[t5];
+      ch[t6-1]=cc[t5-1]+tr2;
+      ch[t4-1]=cc[t5-1]-tr2;
+    }
+    t1+=ido;
+    t2+=ido;
+  }
+
+  if(ido%2==1)return;
+
+ L105:
+  t3=(t2=(t1=ido)-1);
+  t2+=t0;
+  for(k=0;k<l1;k++){
+    ch[t1]=-cc[t2];
+    ch[t1-1]=cc[t3];
+    t1+=ido<<1;
+    t2+=ido;
+    t3+=ido;
+  }
+}
+
+static void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
+	    float *wa2,float *wa3){
+  static float hsqt2 = .70710678118654752f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6;
+  float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+  t0=l1*ido;
+  
+  t1=t0;
+  t4=t1<<1;
+  t2=t1+(t1<<1);
+  t3=0;
+
+  for(k=0;k<l1;k++){
+    tr1=cc[t1]+cc[t2];
+    tr2=cc[t3]+cc[t4];
+
+    ch[t5=t3<<2]=tr1+tr2;
+    ch[(ido<<2)+t5-1]=tr2-tr1;
+    ch[(t5+=(ido<<1))-1]=cc[t3]-cc[t4];
+    ch[t5]=cc[t2]-cc[t1];
+
+    t1+=ido;
+    t2+=ido;
+    t3+=ido;
+    t4+=ido;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+
+  t1=0;
+  for(k=0;k<l1;k++){
+    t2=t1;
+    t4=t1<<2;
+    t5=(t6=ido<<1)+t4;
+    for(i=2;i<ido;i+=2){
+      t3=(t2+=2);
+      t4+=2;
+      t5-=2;
+
+      t3+=t0;
+      cr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+      ci2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+      t3+=t0;
+      cr3=wa2[i-2]*cc[t3-1]+wa2[i-1]*cc[t3];
+      ci3=wa2[i-2]*cc[t3]-wa2[i-1]*cc[t3-1];
+      t3+=t0;
+      cr4=wa3[i-2]*cc[t3-1]+wa3[i-1]*cc[t3];
+      ci4=wa3[i-2]*cc[t3]-wa3[i-1]*cc[t3-1];
+
+      tr1=cr2+cr4;
+      tr4=cr4-cr2;
+      ti1=ci2+ci4;
+      ti4=ci2-ci4;
+
+      ti2=cc[t2]+ci3;
+      ti3=cc[t2]-ci3;
+      tr2=cc[t2-1]+cr3;
+      tr3=cc[t2-1]-cr3;
+
+      ch[t4-1]=tr1+tr2;
+      ch[t4]=ti1+ti2;
+
+      ch[t5-1]=tr3-ti4;
+      ch[t5]=tr4-ti3;
+
+      ch[t4+t6-1]=ti4+tr3;
+      ch[t4+t6]=tr4+ti3;
+
+      ch[t5+t6-1]=tr2-tr1;
+      ch[t5+t6]=ti1-ti2;
+    }
+    t1+=ido;
+  }
+  if(ido&1)return;
+
+ L105:
+  
+  t2=(t1=t0+ido-1)+(t0<<1);
+  t3=ido<<2;
+  t4=ido;
+  t5=ido<<1;
+  t6=ido;
+
+  for(k=0;k<l1;k++){
+    ti1=-hsqt2*(cc[t1]+cc[t2]);
+    tr1=hsqt2*(cc[t1]-cc[t2]);
+
+    ch[t4-1]=tr1+cc[t6-1];
+    ch[t4+t5-1]=cc[t6-1]-tr1;
+
+    ch[t4]=ti1-cc[t1+t0];
+    ch[t4+t5]=ti1+cc[t1+t0];
+
+    t1+=ido;
+    t2+=ido;
+    t4+=t3;
+    t6+=ido;
+  }
+}
+
+static void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+                          float *c2,float *ch,float *ch2,float *wa){
+
+  static float tpi=6.283185307179586f;
+  int idij,ipph,i,j,k,l,ic,ik,is;
+  int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+  float dc2,ai1,ai2,ar1,ar2,ds2;
+  int nbd;
+  float dcp,arg,dsp,ar1h,ar2h;
+  int idp2,ipp2;
+  
+  arg=tpi/(float)ip;
+  dcp=cos(arg);
+  dsp=sin(arg);
+  ipph=(ip+1)>>1;
+  ipp2=ip;
+  idp2=ido;
+  nbd=(ido-1)>>1;
+  t0=l1*ido;
+  t10=ip*ido;
+
+  if(ido==1)goto L119;
+  for(ik=0;ik<idl1;ik++)ch2[ik]=c2[ik];
+
+  t1=0;
+  for(j=1;j<ip;j++){
+    t1+=t0;
+    t2=t1;
+    for(k=0;k<l1;k++){
+      ch[t2]=c1[t2];
+      t2+=ido;
+    }
+  }
+
+  is=-ido;
+  t1=0;
+  if(nbd>l1){
+    for(j=1;j<ip;j++){
+      t1+=t0;
+      is+=ido;
+      t2= -ido+t1;
+      for(k=0;k<l1;k++){
+        idij=is-1;
+        t2+=ido;
+        t3=t2;
+        for(i=2;i<ido;i+=2){
+          idij+=2;
+          t3+=2;
+          ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+          ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+        }
+      }
+    }
+  }else{
+
+    for(j=1;j<ip;j++){
+      is+=ido;
+      idij=is-1;
+      t1+=t0;
+      t2=t1;
+      for(i=2;i<ido;i+=2){
+        idij+=2;
+        t2+=2;
+        t3=t2;
+        for(k=0;k<l1;k++){
+          ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+          ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+          t3+=ido;
+        }
+      }
+    }
+  }
+
+  t1=0;
+  t2=ipp2*t0;
+  if(nbd<l1){
+    for(j=1;j<ipph;j++){
+      t1+=t0;
+      t2-=t0;
+      t3=t1;
+      t4=t2;
+      for(i=2;i<ido;i+=2){
+        t3+=2;
+        t4+=2;
+        t5=t3-ido;
+        t6=t4-ido;
+        for(k=0;k<l1;k++){
+          t5+=ido;
+          t6+=ido;
+          c1[t5-1]=ch[t5-1]+ch[t6-1];
+          c1[t6-1]=ch[t5]-ch[t6];
+          c1[t5]=ch[t5]+ch[t6];
+          c1[t6]=ch[t6-1]-ch[t5-1];
+        }
+      }
+    }
+  }else{
+    for(j=1;j<ipph;j++){
+      t1+=t0;
+      t2-=t0;
+      t3=t1;
+      t4=t2;
+      for(k=0;k<l1;k++){
+        t5=t3;
+        t6=t4;
+        for(i=2;i<ido;i+=2){
+          t5+=2;
+          t6+=2;
+          c1[t5-1]=ch[t5-1]+ch[t6-1];
+          c1[t6-1]=ch[t5]-ch[t6];
+          c1[t5]=ch[t5]+ch[t6];
+          c1[t6]=ch[t6-1]-ch[t5-1];
+        }
+        t3+=ido;
+        t4+=ido;
+      }
+    }
+  }
+
+L119:
+  for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+  t1=0;
+  t2=ipp2*idl1;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1-ido;
+    t4=t2-ido;
+    for(k=0;k<l1;k++){
+      t3+=ido;
+      t4+=ido;
+      c1[t3]=ch[t3]+ch[t4];
+      c1[t4]=ch[t4]-ch[t3];
+    }
+  }
+
+  ar1=1.f;
+  ai1=0.f;
+  t1=0;
+  t2=ipp2*idl1;
+  t3=(ip-1)*idl1;
+  for(l=1;l<ipph;l++){
+    t1+=idl1;
+    t2-=idl1;
+    ar1h=dcp*ar1-dsp*ai1;
+    ai1=dcp*ai1+dsp*ar1;
+    ar1=ar1h;
+    t4=t1;
+    t5=t2;
+    t6=t3;
+    t7=idl1;
+
+    for(ik=0;ik<idl1;ik++){
+      ch2[t4++]=c2[ik]+ar1*c2[t7++];
+      ch2[t5++]=ai1*c2[t6++];
+    }
+
+    dc2=ar1;
+    ds2=ai1;
+    ar2=ar1;
+    ai2=ai1;
+
+    t4=idl1;
+    t5=(ipp2-1)*idl1;
+    for(j=2;j<ipph;j++){
+      t4+=idl1;
+      t5-=idl1;
+
+      ar2h=dc2*ar2-ds2*ai2;
+      ai2=dc2*ai2+ds2*ar2;
+      ar2=ar2h;
+
+      t6=t1;
+      t7=t2;
+      t8=t4;
+      t9=t5;
+      for(ik=0;ik<idl1;ik++){
+        ch2[t6++]+=ar2*c2[t8++];
+        ch2[t7++]+=ai2*c2[t9++];
+      }
+    }
+  }
+
+  t1=0;
+  for(j=1;j<ipph;j++){
+    t1+=idl1;
+    t2=t1;
+    for(ik=0;ik<idl1;ik++)ch2[ik]+=c2[t2++];
+  }
+
+  if(ido<l1)goto L132;
+
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t4=t2;
+    for(i=0;i<ido;i++)cc[t4++]=ch[t3++];
+    t1+=ido;
+    t2+=t10;
+  }
+
+  goto L135;
+
+ L132:
+  for(i=0;i<ido;i++){
+    t1=i;
+    t2=i;
+    for(k=0;k<l1;k++){
+      cc[t2]=ch[t1];
+      t1+=ido;
+      t2+=t10;
+    }
+  }
+
+ L135:
+  t1=0;
+  t2=ido<<1;
+  t3=0;
+  t4=ipp2*t0;
+  for(j=1;j<ipph;j++){
+
+    t1+=t2;
+    t3+=t0;
+    t4-=t0;
+
+    t5=t1;
+    t6=t3;
+    t7=t4;
+
+    for(k=0;k<l1;k++){
+      cc[t5-1]=ch[t6];
+      cc[t5]=ch[t7];
+      t5+=t10;
+      t6+=ido;
+      t7+=ido;
+    }
+  }
+
+  if(ido==1)return;
+  if(nbd<l1)goto L141;
+
+  t1=-ido;
+  t3=0;
+  t4=0;
+  t5=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t2;
+    t3+=t2;
+    t4+=t0;
+    t5-=t0;
+    t6=t1;
+    t7=t3;
+    t8=t4;
+    t9=t5;
+    for(k=0;k<l1;k++){
+      for(i=2;i<ido;i+=2){
+        ic=idp2-i;
+        cc[i+t7-1]=ch[i+t8-1]+ch[i+t9-1];
+        cc[ic+t6-1]=ch[i+t8-1]-ch[i+t9-1];
+        cc[i+t7]=ch[i+t8]+ch[i+t9];
+        cc[ic+t6]=ch[i+t9]-ch[i+t8];
+      }
+      t6+=t10;
+      t7+=t10;
+      t8+=ido;
+      t9+=ido;
+    }
+  }
+  return;
+
+ L141:
+
+  t1=-ido;
+  t3=0;
+  t4=0;
+  t5=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t2;
+    t3+=t2;
+    t4+=t0;
+    t5-=t0;
+    for(i=2;i<ido;i+=2){
+      t6=idp2+t1-i;
+      t7=i+t3;
+      t8=i+t4;
+      t9=i+t5;
+      for(k=0;k<l1;k++){
+        cc[t7-1]=ch[t8-1]+ch[t9-1];
+        cc[t6-1]=ch[t8-1]-ch[t9-1];
+        cc[t7]=ch[t8]+ch[t9];
+        cc[t6]=ch[t9]-ch[t8];
+        t6+=t10;
+        t7+=t10;
+        t8+=ido;
+        t9+=ido;
+      }
+    }
+  }
+}
+
+static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
+  int i,k1,l1,l2;
+  int na,kh,nf;
+  int ip,iw,ido,idl1,ix2,ix3;
+
+  nf=ifac[1];
+  na=1;
+  l2=n;
+  iw=n;
+
+  for(k1=0;k1<nf;k1++){
+    kh=nf-k1;
+    ip=ifac[kh+1];
+    l1=l2/ip;
+    ido=n/l2;
+    idl1=ido*l1;
+    iw-=(ip-1)*ido;
+    na=1-na;
+
+    if(ip!=4)goto L102;
+
+    ix2=iw+ido;
+    ix3=ix2+ido;
+    if(na!=0)
+      dradf4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    else
+      dradf4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    goto L110;
+
+ L102:
+    if(ip!=2)goto L104;
+    if(na!=0)goto L103;
+
+    dradf2(ido,l1,c,ch,wa+iw-1);
+    goto L110;
+
+  L103:
+    dradf2(ido,l1,ch,c,wa+iw-1);
+    goto L110;
+
+  L104:
+    if(ido==1)na=1-na;
+    if(na!=0)goto L109;
+
+    dradfg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+    na=1;
+    goto L110;
+
+  L109:
+    dradfg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+    na=0;
+
+  L110:
+    l2=l1;
+  }
+
+  if(na==1)return;
+
+  for(i=0;i<n;i++)c[i]=ch[i];
+}
+
+static void dradb2(int ido,int l1,float *cc,float *ch,float *wa1){
+  int i,k,t0,t1,t2,t3,t4,t5,t6;
+  float ti2,tr2;
+
+  t0=l1*ido;
+  
+  t1=0;
+  t2=0;
+  t3=(ido<<1)-1;
+  for(k=0;k<l1;k++){
+    ch[t1]=cc[t2]+cc[t3+t2];
+    ch[t1+t0]=cc[t2]-cc[t3+t2];
+    t2=(t1+=ido)<<1;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t5=(t4=t2)+(ido<<1);
+    t6=t0+t1;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t5-=2;
+      t6+=2;
+      ch[t3-1]=cc[t4-1]+cc[t5-1];
+      tr2=cc[t4-1]-cc[t5-1];
+      ch[t3]=cc[t4]-cc[t5];
+      ti2=cc[t4]+cc[t5];
+      ch[t6-1]=wa1[i-2]*tr2-wa1[i-1]*ti2;
+      ch[t6]=wa1[i-2]*ti2+wa1[i-1]*tr2;
+    }
+    t2=(t1+=ido)<<1;
+  }
+
+  if(ido%2==1)return;
+
+L105:
+  t1=ido-1;
+  t2=ido-1;
+  for(k=0;k<l1;k++){
+    ch[t1]=cc[t2]+cc[t2];
+    ch[t1+t0]=-(cc[t2+1]+cc[t2+1]);
+    t1+=ido;
+    t2+=ido<<1;
+  }
+}
+
+static void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
+                          float *wa2){
+  static float taur = -.5f;
+  static float taui = .8660254037844386f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+  float ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2;
+  t0=l1*ido;
+
+  t1=0;
+  t2=t0<<1;
+  t3=ido<<1;
+  t4=ido+(ido<<1);
+  t5=0;
+  for(k=0;k<l1;k++){
+    tr2=cc[t3-1]+cc[t3-1];
+    cr2=cc[t5]+(taur*tr2);
+    ch[t1]=cc[t5]+tr2;
+    ci3=taui*(cc[t3]+cc[t3]);
+    ch[t1+t0]=cr2-ci3;
+    ch[t1+t2]=cr2+ci3;
+    t1+=ido;
+    t3+=t4;
+    t5+=t4;
+  }
+
+  if(ido==1)return;
+
+  t1=0;
+  t3=ido<<1;
+  for(k=0;k<l1;k++){
+    t7=t1+(t1<<1);
+    t6=(t5=t7+t3);
+    t8=t1;
+    t10=(t9=t1+t0)+t0;
+
+    for(i=2;i<ido;i+=2){
+      t5+=2;
+      t6-=2;
+      t7+=2;
+      t8+=2;
+      t9+=2;
+      t10+=2;
+      tr2=cc[t5-1]+cc[t6-1];
+      cr2=cc[t7-1]+(taur*tr2);
+      ch[t8-1]=cc[t7-1]+tr2;
+      ti2=cc[t5]-cc[t6];
+      ci2=cc[t7]+(taur*ti2);
+      ch[t8]=cc[t7]+ti2;
+      cr3=taui*(cc[t5-1]-cc[t6-1]);
+      ci3=taui*(cc[t5]+cc[t6]);
+      dr2=cr2-ci3;
+      dr3=cr2+ci3;
+      di2=ci2+cr3;
+      di3=ci2-cr3;
+      ch[t9-1]=wa1[i-2]*dr2-wa1[i-1]*di2;
+      ch[t9]=wa1[i-2]*di2+wa1[i-1]*dr2;
+      ch[t10-1]=wa2[i-2]*dr3-wa2[i-1]*di3;
+      ch[t10]=wa2[i-2]*di3+wa2[i-1]*dr3;
+    }
+    t1+=ido;
+  }
+}
+
+static void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
+			  float *wa2,float *wa3){
+  static float sqrt2=1.414213562373095f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+  float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+  t0=l1*ido;
+  
+  t1=0;
+  t2=ido<<2;
+  t3=0;
+  t6=ido<<1;
+  for(k=0;k<l1;k++){
+    t4=t3+t6;
+    t5=t1;
+    tr3=cc[t4-1]+cc[t4-1];
+    tr4=cc[t4]+cc[t4]; 
+    tr1=cc[t3]-cc[(t4+=t6)-1];
+    tr2=cc[t3]+cc[t4-1];
+    ch[t5]=tr2+tr3;
+    ch[t5+=t0]=tr1-tr4;
+    ch[t5+=t0]=tr2-tr3;
+    ch[t5+=t0]=tr1+tr4;
+    t1+=ido;
+    t3+=t2;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  for(k=0;k<l1;k++){
+    t5=(t4=(t3=(t2=t1<<2)+t6))+t6;
+    t7=t1;
+    for(i=2;i<ido;i+=2){
+      t2+=2;
+      t3+=2;
+      t4-=2;
+      t5-=2;
+      t7+=2;
+      ti1=cc[t2]+cc[t5];
+      ti2=cc[t2]-cc[t5];
+      ti3=cc[t3]-cc[t4];
+      tr4=cc[t3]+cc[t4];
+      tr1=cc[t2-1]-cc[t5-1];
+      tr2=cc[t2-1]+cc[t5-1];
+      ti4=cc[t3-1]-cc[t4-1];
+      tr3=cc[t3-1]+cc[t4-1];
+      ch[t7-1]=tr2+tr3;
+      cr3=tr2-tr3;
+      ch[t7]=ti2+ti3;
+      ci3=ti2-ti3;
+      cr2=tr1-tr4;
+      cr4=tr1+tr4;
+      ci2=ti1+ti4;
+      ci4=ti1-ti4;
+
+      ch[(t8=t7+t0)-1]=wa1[i-2]*cr2-wa1[i-1]*ci2;
+      ch[t8]=wa1[i-2]*ci2+wa1[i-1]*cr2;
+      ch[(t8+=t0)-1]=wa2[i-2]*cr3-wa2[i-1]*ci3;
+      ch[t8]=wa2[i-2]*ci3+wa2[i-1]*cr3;
+      ch[(t8+=t0)-1]=wa3[i-2]*cr4-wa3[i-1]*ci4;
+      ch[t8]=wa3[i-2]*ci4+wa3[i-1]*cr4;
+    }
+    t1+=ido;
+  }
+
+  if(ido%2 == 1)return;
+
+ L105:
+
+  t1=ido;
+  t2=ido<<2;
+  t3=ido-1;
+  t4=ido+(ido<<1);
+  for(k=0;k<l1;k++){
+    t5=t3;
+    ti1=cc[t1]+cc[t4];
+    ti2=cc[t4]-cc[t1];
+    tr1=cc[t1-1]-cc[t4-1];
+    tr2=cc[t1-1]+cc[t4-1];
+    ch[t5]=tr2+tr2;
+    ch[t5+=t0]=sqrt2*(tr1-ti1);
+    ch[t5+=t0]=ti2+ti2;
+    ch[t5+=t0]=-sqrt2*(tr1+ti1);
+
+    t3+=ido;
+    t1+=t2;
+    t4+=t2;
+  }
+}
+
+static void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+            float *c2,float *ch,float *ch2,float *wa){
+  static float tpi=6.283185307179586f;
+  int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,
+      t11,t12;
+  float dc2,ai1,ai2,ar1,ar2,ds2;
+  int nbd;
+  float dcp,arg,dsp,ar1h,ar2h;
+  int ipp2;
+
+  t10=ip*ido;
+  t0=l1*ido;
+  arg=tpi/(float)ip;
+  dcp=cos(arg);
+  dsp=sin(arg);
+  nbd=(ido-1)>>1;
+  ipp2=ip;
+  ipph=(ip+1)>>1;
+  if(ido<l1)goto L103;
+  
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t4=t2;
+    for(i=0;i<ido;i++){
+      ch[t3]=cc[t4];
+      t3++;
+      t4++;
+    }
+    t1+=ido;
+    t2+=t10;
+  }
+  goto L106;
+
+ L103:
+  t1=0;
+  for(i=0;i<ido;i++){
+    t2=t1;
+    t3=t1;
+    for(k=0;k<l1;k++){
+      ch[t2]=cc[t3];
+      t2+=ido;
+      t3+=t10;
+    }
+    t1++;
+  }
+
+ L106:
+  t1=0;
+  t2=ipp2*t0;
+  t7=(t5=ido<<1);
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    t6=t5;
+    for(k=0;k<l1;k++){
+      ch[t3]=cc[t6-1]+cc[t6-1];
+      ch[t4]=cc[t6]+cc[t6];
+      t3+=ido;
+      t4+=ido;
+      t6+=t10;
+    }
+    t5+=t7;
+  }
+
+  if (ido == 1)goto L116;
+  if(nbd<l1)goto L112;
+
+  t1=0;
+  t2=ipp2*t0;
+  t7=0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+
+    t7+=(ido<<1);
+    t8=t7;
+    for(k=0;k<l1;k++){
+      t5=t3;
+      t6=t4;
+      t9=t8;
+      t11=t8;
+      for(i=2;i<ido;i+=2){
+        t5+=2;
+        t6+=2;
+        t9+=2;
+        t11-=2;
+        ch[t5-1]=cc[t9-1]+cc[t11-1];
+        ch[t6-1]=cc[t9-1]-cc[t11-1];
+        ch[t5]=cc[t9]-cc[t11];
+        ch[t6]=cc[t9]+cc[t11];
+      }
+      t3+=ido;
+      t4+=ido;
+      t8+=t10;
+    }
+  }
+  goto L116;
+
+ L112:
+  t1=0;
+  t2=ipp2*t0;
+  t7=0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    t7+=(ido<<1);
+    t8=t7;
+    t9=t7;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t8+=2;
+      t9-=2;
+      t5=t3;
+      t6=t4;
+      t11=t8;
+      t12=t9;
+      for(k=0;k<l1;k++){
+        ch[t5-1]=cc[t11-1]+cc[t12-1];
+        ch[t6-1]=cc[t11-1]-cc[t12-1];
+        ch[t5]=cc[t11]-cc[t12];
+        ch[t6]=cc[t11]+cc[t12];
+        t5+=ido;
+        t6+=ido;
+        t11+=t10;
+        t12+=t10;
+      }
+    }
+  }
+
+L116:
+  ar1=1.f;
+  ai1=0.f;
+  t1=0;
+  t9=(t2=ipp2*idl1);
+  t3=(ip-1)*idl1;
+  for(l=1;l<ipph;l++){
+    t1+=idl1;
+    t2-=idl1;
+
+    ar1h=dcp*ar1-dsp*ai1;
+    ai1=dcp*ai1+dsp*ar1;
+    ar1=ar1h;
+    t4=t1;
+    t5=t2;
+    t6=0;
+    t7=idl1;
+    t8=t3;
+    for(ik=0;ik<idl1;ik++){
+      c2[t4++]=ch2[t6++]+ar1*ch2[t7++];
+      c2[t5++]=ai1*ch2[t8++];
+    }
+    dc2=ar1;
+    ds2=ai1;
+    ar2=ar1;
+    ai2=ai1;
+
+    t6=idl1;
+    t7=t9-idl1;
+    for(j=2;j<ipph;j++){
+      t6+=idl1;
+      t7-=idl1;
+      ar2h=dc2*ar2-ds2*ai2;
+      ai2=dc2*ai2+ds2*ar2;
+      ar2=ar2h;
+      t4=t1;
+      t5=t2;
+      t11=t6;
+      t12=t7;
+      for(ik=0;ik<idl1;ik++){
+        c2[t4++]+=ar2*ch2[t11++];
+        c2[t5++]+=ai2*ch2[t12++];
+      }
+    }
+  }
+
+  t1=0;
+  for(j=1;j<ipph;j++){
+    t1+=idl1;
+    t2=t1;
+    for(ik=0;ik<idl1;ik++)ch2[ik]+=ch2[t2++];
+  }
+
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(k=0;k<l1;k++){
+      ch[t3]=c1[t3]-c1[t4];
+      ch[t4]=c1[t3]+c1[t4];
+      t3+=ido;
+      t4+=ido;
+    }
+  }
+
+  if(ido==1)goto L132;
+  if(nbd<l1)goto L128;
+
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(k=0;k<l1;k++){
+      t5=t3;
+      t6=t4;
+      for(i=2;i<ido;i+=2){
+        t5+=2;
+        t6+=2;
+        ch[t5-1]=c1[t5-1]-c1[t6];
+        ch[t6-1]=c1[t5-1]+c1[t6];
+        ch[t5]=c1[t5]+c1[t6-1];
+        ch[t6]=c1[t5]-c1[t6-1];
+      }
+      t3+=ido;
+      t4+=ido;
+    }
+  }
+  goto L132;
+
+ L128:
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t5=t3;
+      t6=t4;
+      for(k=0;k<l1;k++){
+        ch[t5-1]=c1[t5-1]-c1[t6];
+        ch[t6-1]=c1[t5-1]+c1[t6];
+        ch[t5]=c1[t5]+c1[t6-1];
+        ch[t6]=c1[t5]-c1[t6-1];
+        t5+=ido;
+        t6+=ido;
+      }
+    }
+  }
+
+L132:
+  if(ido==1)return;
+
+  for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+  t1=0;
+  for(j=1;j<ip;j++){
+    t2=(t1+=t0);
+    for(k=0;k<l1;k++){
+      c1[t2]=ch[t2];
+      t2+=ido;
+    }
+  }
+
+  if(nbd>l1)goto L139;
+
+  is= -ido-1;
+  t1=0;
+  for(j=1;j<ip;j++){
+    is+=ido;
+    t1+=t0;
+    idij=is;
+    t2=t1;
+    for(i=2;i<ido;i+=2){
+      t2+=2;
+      idij+=2;
+      t3=t2;
+      for(k=0;k<l1;k++){
+        c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+        c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+        t3+=ido;
+      }
+    }
+  }
+  return;
+
+ L139:
+  is= -ido-1;
+  t1=0;
+  for(j=1;j<ip;j++){
+    is+=ido;
+    t1+=t0;
+    t2=t1;
+    for(k=0;k<l1;k++){
+      idij=is;
+      t3=t2;
+      for(i=2;i<ido;i+=2){
+        idij+=2;
+        t3+=2;
+        c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+        c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+      }
+      t2+=ido;
+    }
+  }
+}
+
+static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
+  int i,k1,l1,l2;
+  int na;
+  int nf,ip,iw,ix2,ix3,ido,idl1;
+
+  nf=ifac[1];
+  na=0;
+  l1=1;
+  iw=1;
+
+  for(k1=0;k1<nf;k1++){
+    ip=ifac[k1 + 2];
+    l2=ip*l1;
+    ido=n/l2;
+    idl1=ido*l1;
+    if(ip!=4)goto L103;
+    ix2=iw+ido;
+    ix3=ix2+ido;
+
+    if(na!=0)
+      dradb4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    else
+      dradb4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    na=1-na;
+    goto L115;
+
+  L103:
+    if(ip!=2)goto L106;
+
+    if(na!=0)
+      dradb2(ido,l1,ch,c,wa+iw-1);
+    else
+      dradb2(ido,l1,c,ch,wa+iw-1);
+    na=1-na;
+    goto L115;
+
+  L106:
+    if(ip!=3)goto L109;
+
+    ix2=iw+ido;
+    if(na!=0)
+      dradb3(ido,l1,ch,c,wa+iw-1,wa+ix2-1);
+    else
+      dradb3(ido,l1,c,ch,wa+iw-1,wa+ix2-1);
+    na=1-na;
+    goto L115;
+
+  L109:
+/*    The radix five case can be translated later..... */
+/*    if(ip!=5)goto L112;
+
+    ix2=iw+ido;
+    ix3=ix2+ido;
+    ix4=ix3+ido;
+    if(na!=0)
+      dradb5(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+    else
+      dradb5(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+    na=1-na;
+    goto L115;
+
+  L112:*/
+    if(na!=0)
+      dradbg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+    else
+      dradbg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+    if(ido==1)na=1-na;
+
+  L115:
+    l1=l2;
+    iw+=(ip-1)*ido;
+  }
+
+  if(na==0)return;
+
+  for(i=0;i<n;i++)c[i]=ch[i];
+}
+
+void drft_forward(drft_lookup *l,float *data){
+  if(l->n==1)return;
+  drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
+}
+
+void drft_backward(drft_lookup *l,float *data){
+  if (l->n==1)return;
+  drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
+}
+
+void drft_init(drft_lookup *l,int n){
+  l->n=n;
+  l->trigcache=_ogg_calloc(3*n,sizeof(*l->trigcache));
+  l->splitcache=_ogg_calloc(32,sizeof(*l->splitcache));
+  fdrffti(n, l->trigcache, l->splitcache);
+}
+
+void drft_clear(drft_lookup *l){
+  if(l){
+    if(l->trigcache)_ogg_free(l->trigcache);
+    if(l->splitcache)_ogg_free(l->splitcache);
+    memset(l,0,sizeof(*l));
+  }
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/smallft.h
@@ -1,0 +1,34 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: fft transform
+ last mod: $Id: smallft.h,v 1.12 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_SMFT_H_
+#define _V_SMFT_H_
+
+#include "vorbis/codec.h"
+
+typedef struct {
+  int n;
+  float *trigcache;
+  int *splitcache;
+} drft_lookup;
+
+extern void drft_forward(drft_lookup *l,float *data);
+extern void drft_backward(drft_lookup *l,float *data);
+extern void drft_init(drft_lookup *l,int n);
+extern void drft_clear(drft_lookup *l);
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/synthesis.c
@@ -1,0 +1,155 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: single-block PCM synthesis
+ last mod: $Id: synthesis.c,v 1.28 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdio.h>
+#include <ogg/ogg.h>
+#include "vorbis/codec.h"
+#include "codec_internal.h"
+#include "registry.h"
+#include "misc.h"
+#include "os.h"
+
+int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
+  vorbis_dsp_state     *vd=vb->vd;
+  backend_lookup_state *b=vd->backend_state;
+  vorbis_info          *vi=vd->vi;
+  codec_setup_info     *ci=vi->codec_setup;
+  oggpack_buffer       *opb=&vb->opb;
+  int                   type,mode,i;
+ 
+  /* first things first.  Make sure decode is ready */
+  _vorbis_block_ripcord(vb);
+  oggpack_readinit(opb,op->packet,op->bytes);
+
+  /* Check the packet type */
+  if(oggpack_read(opb,1)!=0){
+    /* Oops.  This is not an audio data packet */
+    return(OV_ENOTAUDIO);
+  }
+
+  /* read our mode and pre/post windowsize */
+  mode=oggpack_read(opb,b->modebits);
+  if(mode==-1)return(OV_EBADPACKET);
+  
+  vb->mode=mode;
+  vb->W=ci->mode_param[mode]->blockflag;
+  if(vb->W){
+
+    /* this doesn;t get mapped through mode selection as it's used
+       only for window selection */
+    vb->lW=oggpack_read(opb,1);
+    vb->nW=oggpack_read(opb,1);
+    if(vb->nW==-1)   return(OV_EBADPACKET);
+  }else{
+    vb->lW=0;
+    vb->nW=0;
+  }
+  
+  /* more setup */
+  vb->granulepos=op->granulepos;
+  vb->sequence=op->packetno-3; /* first block is third packet */
+  vb->eofflag=op->e_o_s;
+
+  /* alloc pcm passback storage */
+  vb->pcmend=ci->blocksizes[vb->W];
+  vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels);
+  for(i=0;i<vi->channels;i++)
+    vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i]));
+
+  /* unpack_header enforces range checking */
+  type=ci->map_type[ci->mode_param[mode]->mapping];
+
+  return(_mapping_P[type]->inverse(vb,ci->map_param[ci->mode_param[mode]->
+						   mapping]));
+}
+
+/* used to track pcm position without actually performing decode.
+   Useful for sequential 'fast forward' */
+int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){
+  vorbis_dsp_state     *vd=vb->vd;
+  backend_lookup_state *b=vd->backend_state;
+  vorbis_info          *vi=vd->vi;
+  codec_setup_info     *ci=vi->codec_setup;
+  oggpack_buffer       *opb=&vb->opb;
+  int                   mode;
+ 
+  /* first things first.  Make sure decode is ready */
+  _vorbis_block_ripcord(vb);
+  oggpack_readinit(opb,op->packet,op->bytes);
+
+  /* Check the packet type */
+  if(oggpack_read(opb,1)!=0){
+    /* Oops.  This is not an audio data packet */
+    return(OV_ENOTAUDIO);
+  }
+
+  /* read our mode and pre/post windowsize */
+  mode=oggpack_read(opb,b->modebits);
+  if(mode==-1)return(OV_EBADPACKET);
+  
+  vb->mode=mode;
+  vb->W=ci->mode_param[mode]->blockflag;
+  if(vb->W){
+    vb->lW=oggpack_read(opb,1);
+    vb->nW=oggpack_read(opb,1);
+    if(vb->nW==-1)   return(OV_EBADPACKET);
+  }else{
+    vb->lW=0;
+    vb->nW=0;
+  }
+  
+  /* more setup */
+  vb->granulepos=op->granulepos;
+  vb->sequence=op->packetno-3; /* first block is third packet */
+  vb->eofflag=op->e_o_s;
+
+  /* no pcm */
+  vb->pcmend=0;
+  vb->pcm=NULL;
+
+  return(0);
+}
+
+long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){
+  codec_setup_info     *ci=vi->codec_setup;
+  oggpack_buffer       opb;
+  int                  mode;
+ 
+  oggpack_readinit(&opb,op->packet,op->bytes);
+
+  /* Check the packet type */
+  if(oggpack_read(&opb,1)!=0){
+    /* Oops.  This is not an audio data packet */
+    return(OV_ENOTAUDIO);
+  }
+
+  {
+    int modebits=0;
+    int v=ci->modes;
+    while(v>1){
+      modebits++;
+      v>>=1;
+    }
+
+    /* read our mode and pre/post windowsize */
+    mode=oggpack_read(&opb,modebits);
+  }
+  if(mode==-1)return(OV_EBADPACKET);
+  return(ci->blocksizes[ci->mode_param[mode]->blockflag]);
+}
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/tone.c
@@ -1,0 +1,54 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+void usage(){
+  fprintf(stderr,"tone <frequency_Hz>,[<amplitude>] [<frequency_Hz>,[<amplitude>]...]\n");
+  exit(1);
+}
+
+int main (int argc,char *argv[]){
+  int i,j;
+  double *f;
+  double *amp;
+  
+  if(argc<2)usage();
+
+  f=alloca(sizeof(*f)*(argc-1));
+  amp=alloca(sizeof(*amp)*(argc-1));
+
+  i=0;
+  while(argv[i+1]){
+    char *pos=strchr(argv[i+1],',');
+    
+    f[i]=atof(argv[i+1]);
+    if(pos)
+      amp[i]=atof(pos+1)*32767.f;
+    else
+      amp[i]=32767.f;
+
+    fprintf(stderr,"%g Hz, %g amp\n",f[i],amp[i]);
+
+    i++;
+  }
+
+  for(i=0;i<44100*10;i++){
+    float val=0;
+    int ival;
+    for(j=0;j<argc-1;j++)
+      val+=amp[j]*sin(i/44100.f*f[j]*2*M_PI);
+    ival=rint(val);
+
+    if(ival>32767.f)ival=32767.f;
+    if(ival<-32768.f)ival=-32768.f;
+
+    fprintf(stdout,"%c%c%c%c",
+	    (char)(ival&0xff),
+	    (char)((ival>>8)&0xff),
+	    (char)(ival&0xff),
+	    (char)((ival>>8)&0xff));
+  }
+  return(0);
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/vorbis/codec.h
@@ -1,0 +1,235 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+
+ ********************************************************************
+
+ function: libvorbis codec headers
+ last mod: $Id: codec.h,v 1.40 2002/02/28 04:12:47 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _vorbis_codec_h_
+#define _vorbis_codec_h_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#pragma lib "/sys/src/cmd/audio/libvorbis/libvorbis.a$O"
+
+#include <ogg/ogg.h>
+
+typedef struct vorbis_info{
+  int version;
+  int channels;
+  long rate;
+
+  /* The below bitrate declarations are *hints*.
+     Combinations of the three values carry the following implications:
+     
+     all three set to the same value: 
+       implies a fixed rate bitstream
+     only nominal set: 
+       implies a VBR stream that averages the nominal bitrate.  No hard 
+       upper/lower limit
+     upper and or lower set: 
+       implies a VBR bitstream that obeys the bitrate limits. nominal 
+       may also be set to give a nominal rate.
+     none set:
+       the coder does not care to speculate.
+  */
+
+  long bitrate_upper;
+  long bitrate_nominal;
+  long bitrate_lower;
+  long bitrate_window;
+
+  void *codec_setup;
+} vorbis_info;
+
+/* vorbis_dsp_state buffers the current vorbis audio
+   analysis/synthesis state.  The DSP state belongs to a specific
+   logical bitstream ****************************************************/
+typedef struct vorbis_dsp_state{
+  int analysisp;
+  vorbis_info *vi;
+
+  float **pcm;
+  float **pcmret;
+  int      pcm_storage;
+  int      pcm_current;
+  int      pcm_returned;
+
+  int  preextrapolate;
+  int  eofflag;
+
+  long lW;
+  long W;
+  long nW;
+  long centerW;
+
+  ogg_int64_t granulepos;
+  ogg_int64_t sequence;
+
+  ogg_int64_t glue_bits;
+  ogg_int64_t time_bits;
+  ogg_int64_t floor_bits;
+  ogg_int64_t res_bits;
+
+  void       *backend_state;
+} vorbis_dsp_state;
+
+typedef struct vorbis_block{
+  /* necessary stream state for linking to the framing abstraction */
+  float  **pcm;       /* this is a pointer into local storage */ 
+  oggpack_buffer opb;
+  
+  long  lW;
+  long  W;
+  long  nW;
+  int   pcmend;
+  int   mode;
+
+  int         eofflag;
+  ogg_int64_t granulepos;
+  ogg_int64_t sequence;
+  vorbis_dsp_state *vd; /* For read-only access of configuration */
+
+  /* local storage to avoid remallocing; it's up to the mapping to
+     structure it */
+  void               *localstore;
+  long                localtop;
+  long                localalloc;
+  long                totaluse;
+  struct alloc_chain *reap;
+
+  /* bitmetrics for the frame */
+  long glue_bits;
+  long time_bits;
+  long floor_bits;
+  long res_bits;
+
+  void *internal;
+
+} vorbis_block;
+
+/* vorbis_block is a single block of data to be processed as part of
+the analysis/synthesis stream; it belongs to a specific logical
+bitstream, but is independant from other vorbis_blocks belonging to
+that logical bitstream. *************************************************/
+
+struct alloc_chain{
+  void *ptr;
+  struct alloc_chain *next;
+};
+
+/* vorbis_info contains all the setup information specific to the
+   specific compression/decompression mode in progress (eg,
+   psychoacoustic settings, channel setup, options, codebook
+   etc). vorbis_info and substructures are in backends.h.
+*********************************************************************/
+
+/* the comments are not part of vorbis_info so that vorbis_info can be
+   static storage */
+typedef struct vorbis_comment{
+  /* unlimited user comment fields.  libvorbis writes 'libvorbis'
+     whatever vendor is set to in encode */
+  char **user_comments;
+  int   *comment_lengths;
+  int    comments;
+  char  *vendor;
+
+} vorbis_comment;
+
+
+/* libvorbis encodes in two abstraction layers; first we perform DSP
+   and produce a packet (see docs/analysis.txt).  The packet is then
+   coded into a framed OggSquish bitstream by the second layer (see
+   docs/framing.txt).  Decode is the reverse process; we sync/frame
+   the bitstream and extract individual packets, then decode the
+   packet back into PCM audio.
+
+   The extra framing/packetizing is used in streaming formats, such as
+   files.  Over the net (such as with UDP), the framing and
+   packetization aren't necessary as they're provided by the transport
+   and the streaming layer is not used */
+
+/* Vorbis PRIMITIVES: general ***************************************/
+
+extern void     vorbis_info_init(vorbis_info *vi);
+extern void     vorbis_info_clear(vorbis_info *vi);
+extern int      vorbis_info_blocksize(vorbis_info *vi,int zo);
+extern void     vorbis_comment_init(vorbis_comment *vc);
+extern void     vorbis_comment_add(vorbis_comment *vc, char *comment); 
+extern void     vorbis_comment_add_tag(vorbis_comment *vc, 
+				       char *tag, char *contents);
+extern char    *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
+extern int      vorbis_comment_query_count(vorbis_comment *vc, char *tag);
+extern void     vorbis_comment_clear(vorbis_comment *vc);
+
+extern int      vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
+extern int      vorbis_block_clear(vorbis_block *vb);
+extern void     vorbis_dsp_clear(vorbis_dsp_state *v);
+
+/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
+
+extern int      vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
+extern int      vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
+extern int      vorbis_analysis_headerout(vorbis_dsp_state *v,
+					  vorbis_comment *vc,
+					  ogg_packet *op,
+					  ogg_packet *op_comm,
+					  ogg_packet *op_code);
+extern float  **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
+extern int      vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
+extern int      vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
+extern int      vorbis_analysis(vorbis_block *vb,ogg_packet *op);
+
+extern int      vorbis_bitrate_addblock(vorbis_block *vb);
+extern int      vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
+					   ogg_packet *op);
+
+/* Vorbis PRIMITIVES: synthesis layer *******************************/
+extern int      vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
+					  ogg_packet *op);
+
+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_trackonly(vorbis_block *vb,ogg_packet *op);
+extern int      vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
+extern int      vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
+extern int      vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
+extern long     vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
+
+/* Vorbis ERRORS and return codes ***********************************/
+
+#define OV_FALSE      -1  
+#define OV_EOF        -2
+#define OV_HOLE       -3
+
+#define OV_EREAD      -128
+#define OV_EFAULT     -129
+#define OV_EIMPL      -130
+#define OV_EINVAL     -131
+#define OV_ENOTVORBIS -132
+#define OV_EBADHEADER -133
+#define OV_EVERSION   -134
+#define OV_ENOTAUDIO  -135
+#define OV_EBADPACKET -136
+#define OV_EBADLINK   -137
+#define OV_ENOSEEK    -138
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/vorbis/vorbisenc.h
@@ -1,0 +1,93 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: vorbis encode-engine setup
+ last mod: $Id: vorbisenc.h,v 1.10 2002/07/01 11:20:10 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _OV_ENC_H_
+#define _OV_ENC_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include "codec.h"
+
+extern int vorbis_encode_init(vorbis_info *vi,
+			      long channels,
+			      long rate,
+			      
+			      long max_bitrate,
+			      long nominal_bitrate,
+			      long min_bitrate);
+
+extern int vorbis_encode_setup_managed(vorbis_info *vi,
+				       long channels,
+				       long rate,
+				       
+				       long max_bitrate,
+				       long nominal_bitrate,
+				       long min_bitrate);
+  
+extern int vorbis_encode_setup_vbr(vorbis_info *vi,
+				  long channels,
+				  long rate,
+				  
+				  float /* quality level from 0. (lo) to 1. (hi) */
+				  );
+
+extern int vorbis_encode_init_vbr(vorbis_info *vi,
+				  long channels,
+				  long rate,
+				  
+				  float base_quality /* quality level from 0. (lo) to 1. (hi) */
+				  );
+
+extern int vorbis_encode_setup_init(vorbis_info *vi);
+
+extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
+
+#define OV_ECTL_RATEMANAGE_GET       0x10
+
+#define OV_ECTL_RATEMANAGE_SET       0x11
+#define OV_ECTL_RATEMANAGE_AVG       0x12
+#define OV_ECTL_RATEMANAGE_HARD      0x13
+
+#define OV_ECTL_LOWPASS_GET          0x20
+#define OV_ECTL_LOWPASS_SET          0x21
+
+#define OV_ECTL_IBLOCK_GET           0x30
+#define OV_ECTL_IBLOCK_SET           0x31
+
+struct ovectl_ratemanage_arg {
+  int    management_active;
+
+  long   bitrate_hard_min;
+  long   bitrate_hard_max;
+  double bitrate_hard_window;
+
+  long   bitrate_av_lo;
+  long   bitrate_av_hi;
+  double bitrate_av_window;
+  double bitrate_av_window_center;
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/vorbis/vorbisfile.h
@@ -1,0 +1,133 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: stdio-based convenience library for opening/seeking/decoding
+ last mod: $Id: vorbisfile.h,v 1.17 2002/03/07 03:41:03 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _OV_FILE_H_
+#define _OV_FILE_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include <stdio.h>
+#include "codec.h"
+
+/* The function prototypes for the callbacks are basically the same as for
+ * the stdio functions fread, fseek, fclose, ftell. 
+ * The one difference is that the FILE * arguments have been replaced with
+ * a void * - this is to be used as a pointer to whatever internal data these
+ * functions might need. In the stdio case, it's just a FILE * cast to a void *
+ * 
+ * If you use other functions, check the docs for these functions and return
+ * the right values. For seek_func(), you *MUST* return -1 if the stream is
+ * unseekable
+ */
+typedef struct {
+  size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
+  int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
+  int    (*close_func) (void *datasource);
+  long   (*tell_func)  (void *datasource);
+} ov_callbacks;
+
+#define  NOTOPEN   0
+#define  PARTOPEN  1
+#define  OPENED    2
+#define  STREAMSET 3
+#define  INITSET   4
+
+typedef struct OggVorbis_File {
+  void            *datasource; /* Pointer to a FILE *, etc. */
+  int              seekable;
+  ogg_int64_t      offset;
+  ogg_int64_t      end;
+  ogg_sync_state   oy; 
+
+  /* If the FILE handle isn't seekable (eg, a pipe), only the current
+     stream appears */
+  int              links;
+  ogg_int64_t     *offsets;
+  ogg_int64_t     *dataoffsets;
+  long            *serialnos;
+  ogg_int64_t     *pcmlengths; /* overloaded to maintain binary
+				  compatability; x2 size, stores both
+				  beginning and end values */
+  vorbis_info     *vi;
+  vorbis_comment  *vc;
+
+  /* Decoding working state local storage */
+  ogg_int64_t      pcm_offset;
+  int              ready_state;
+  long             current_serialno;
+  int              current_link;
+
+  double           bittrack;
+  double           samptrack;
+
+  ogg_stream_state os; /* take physical pages, weld into a logical
+                          stream of packets */
+  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+  vorbis_block     vb; /* local working space for packet->PCM decode */
+
+  ov_callbacks callbacks;
+
+} OggVorbis_File;
+
+extern int ov_clear(OggVorbis_File *vf);
+extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
+		char *initial, long ibytes, ov_callbacks callbacks);
+
+extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
+		char *initial, long ibytes, ov_callbacks callbacks);
+extern int ov_test_open(OggVorbis_File *vf);
+
+extern long ov_bitrate(OggVorbis_File *vf,int i);
+extern long ov_bitrate_instant(OggVorbis_File *vf);
+extern long ov_streams(OggVorbis_File *vf);
+extern long ov_seekable(OggVorbis_File *vf);
+extern long ov_serialnumber(OggVorbis_File *vf,int i);
+
+extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
+extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
+extern double ov_time_total(OggVorbis_File *vf,int i);
+
+extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
+extern int ov_time_seek(OggVorbis_File *vf,double pos);
+extern int ov_time_seek_page(OggVorbis_File *vf,double pos);
+
+extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
+extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
+extern double ov_time_tell(OggVorbis_File *vf);
+
+extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
+extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
+
+extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
+			  int *bitstream);
+extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
+		    int bigendianp,int word,int sgned,int *bitstream);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/vorbisenc.c
@@ -1,0 +1,1134 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: simple programmatic interface for encoder mode setup
+ last mod: $Id: vorbisenc.c,v 1.47 2002/07/11 06:40:50 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "vorbis/codec.h"
+#include "vorbis/vorbisenc.h"
+
+#include "codec_internal.h"
+
+#include "os.h"
+#include "misc.h"
+
+/* careful with this; it's using static array sizing to make managing
+   all the modes a little less annoying.  If we use a residue backend
+   with > 12 partition types, or a different division of iteration,
+   this needs to be updated. */
+typedef struct {
+  static_codebook *books[12][3];
+} static_bookblock;
+
+typedef struct {
+  int res_type;
+  int limit_type; /* 0 lowpass limited, 1 point stereo limited */
+  vorbis_info_residue0 *res;
+  static_codebook  *book_aux;
+  static_codebook  *book_aux_managed;
+  static_bookblock *books_base;
+  static_bookblock *books_base_managed;
+} vorbis_residue_template;
+
+typedef struct {
+  vorbis_info_mapping0    *map;
+  vorbis_residue_template *res;
+} vorbis_mapping_template;
+
+typedef struct vp_adjblock{
+  int block[P_BANDS];
+} vp_adjblock;
+
+typedef struct {
+  int data[NOISE_COMPAND_LEVELS];
+} compandblock;
+
+/* high level configuration information for setting things up
+   step-by-step with the detailed vorbis_encode_ctl interface.
+   There's a fair amount of redundancy such that interactive setup
+   does not directly deal with any vorbis_info or codec_setup_info
+   initialization; it's all stored (until full init) in this highlevel
+   setup, then flushed out to the real codec setup structs later. */
+
+typedef struct {
+  int att[P_NOISECURVES];
+  float boost;
+  float decay;
+} att3;
+typedef struct { int data[P_NOISECURVES]; } adj3; 
+
+typedef struct {
+  int   pre[PACKETBLOBS];
+  int   post[PACKETBLOBS];
+  float kHz[PACKETBLOBS];
+  float lowpasskHz[PACKETBLOBS];
+} adj_stereo;
+
+typedef struct {
+  int lo;
+  int hi;
+  int fixed;
+} noiseguard;
+typedef struct {
+  int data[P_NOISECURVES][17];
+} noise3;
+
+typedef struct {
+  int      mappings;
+  double  *rate_mapping;
+  double  *quality_mapping;
+  int      coupling_restriction;
+  long     samplerate_min_restriction;
+  long     samplerate_max_restriction;
+
+
+  int     *blocksize_short;
+  int     *blocksize_long;
+
+  att3    *psy_tone_masteratt;
+  int     *psy_tone_0dB;
+  int     *psy_tone_dBsuppress;
+
+  vp_adjblock *psy_tone_adj_impulse;
+  vp_adjblock *psy_tone_adj_long;
+  vp_adjblock *psy_tone_adj_other;
+
+  noiseguard  *psy_noiseguards;
+  noise3      *psy_noise_bias_impulse;
+  noise3      *psy_noise_bias_padding;
+  noise3      *psy_noise_bias_trans;
+  noise3      *psy_noise_bias_long;
+  int         *psy_noise_dBsuppress;
+
+  compandblock  *psy_noise_compand;
+  double        *psy_noise_compand_short_mapping;
+  double        *psy_noise_compand_long_mapping;
+
+  int      *psy_noise_normal_start[2];
+  int      *psy_noise_normal_partition[2];
+  double   *psy_noise_normal_thresh;
+
+  int      *psy_ath_float;
+  int      *psy_ath_abs;
+
+  double   *psy_lowpass;
+
+  vorbis_info_psy_global *global_params;
+  double     *global_mapping;
+  adj_stereo *stereo_modes;
+
+  static_codebook ***floor_books;
+  vorbis_info_floor1 *floor_params;
+  int *floor_short_mapping;
+  int *floor_long_mapping;
+
+  vorbis_mapping_template *maps;
+} ve_setup_data_template;
+
+/* a few static coder conventions */
+static vorbis_info_mode _mode_template[2]={
+  {0,0,0,0},
+  {1,0,0,1}
+};
+
+static vorbis_info_mapping0 _map_nominal[2]={
+  {1, {0,0}, {0}, {0}, 1,{0},{1}},
+  {1, {0,0}, {1}, {1}, 1,{0},{1}}
+};
+
+#include "modes/setup_44.h"
+#include "modes/setup_44u.h"
+#include "modes/setup_32.h"
+#include "modes/setup_8.h"
+#include "modes/setup_11.h"
+#include "modes/setup_16.h"
+#include "modes/setup_22.h"
+#include "modes/setup_X.h"
+
+static ve_setup_data_template *setup_list[]={
+  &ve_setup_44_stereo,
+  &ve_setup_44_stereo_low,
+  &ve_setup_44_uncoupled,
+  &ve_setup_44_uncoupled_low,
+
+  &ve_setup_32_stereo,
+  &ve_setup_32_stereo_low,
+  &ve_setup_32_uncoupled,
+  &ve_setup_32_uncoupled_low,
+
+  &ve_setup_22_stereo,
+  &ve_setup_22_uncoupled,
+  &ve_setup_16_stereo,
+  &ve_setup_16_uncoupled,
+
+  &ve_setup_11_stereo,
+  &ve_setup_11_uncoupled,
+  &ve_setup_8_stereo,
+  &ve_setup_8_uncoupled,
+
+  &ve_setup_X_stereo,
+  &ve_setup_X_uncoupled,
+  &ve_setup_X_stereo_low,
+  &ve_setup_X_uncoupled_low,
+  &ve_setup_XX_stereo,
+  &ve_setup_XX_uncoupled,
+  0
+};
+
+static int vorbis_encode_toplevel_setup(vorbis_info *vi,int ch,long rate){
+  if(vi && vi->codec_setup){
+
+    vi->version=0;
+    vi->channels=ch;
+    vi->rate=rate;
+
+    return(0);
+  }
+  return(OV_EINVAL);
+}
+
+static void vorbis_encode_floor_setup(vorbis_info *vi,double s,int block,
+				     static_codebook    ***books, 
+				     vorbis_info_floor1 *in, 
+				     int *x){
+  int i,k,is=s;
+  vorbis_info_floor1 *f=_ogg_calloc(1,sizeof(*f));
+  codec_setup_info *ci=vi->codec_setup;
+
+  memcpy(f,in+x[is],sizeof(*f));
+  /* fill in the lowpass field, even if it's temporary */
+  f->n=ci->blocksizes[block]>>1;
+
+  /* books */
+  {
+    int partitions=f->partitions;
+    int maxclass=-1;
+    int maxbook=-1;
+    for(i=0;i<partitions;i++)
+      if(f->partitionclass[i]>maxclass)maxclass=f->partitionclass[i];
+    for(i=0;i<=maxclass;i++){
+      if(f->class_book[i]>maxbook)maxbook=f->class_book[i];
+      f->class_book[i]+=ci->books;
+      for(k=0;k<(1<<f->class_subs[i]);k++){
+	if(f->class_subbook[i][k]>maxbook)maxbook=f->class_subbook[i][k];
+	if(f->class_subbook[i][k]>=0)f->class_subbook[i][k]+=ci->books;
+      }
+    }
+
+    for(i=0;i<=maxbook;i++)
+      ci->book_param[ci->books++]=books[x[is]][i];
+  }
+
+  /* for now, we're only using floor 1 */
+  ci->floor_type[ci->floors]=1;
+  ci->floor_param[ci->floors]=f;
+  ci->floors++;
+
+  return;
+}
+
+static void vorbis_encode_global_psych_setup(vorbis_info *vi,double s,
+					    vorbis_info_psy_global *in, 
+					    double *x){
+  int i,is=s;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *g=&ci->psy_g_param;
+  
+  memcpy(g,in+(int)x[is],sizeof(*g));
+  
+  ds=x[is]*(1.-ds)+x[is+1]*ds;
+  is=(int)ds;
+  ds-=is;
+  if(ds==0 && is>0){
+    is--;
+    ds=1.;
+  }
+  
+  /* interpolate the trigger threshholds */
+  for(i=0;i<4;i++){
+    g->preecho_thresh[i]=in[is].preecho_thresh[i]*(1.-ds)+in[is+1].preecho_thresh[i]*ds;
+    g->postecho_thresh[i]=in[is].postecho_thresh[i]*(1.-ds)+in[is+1].postecho_thresh[i]*ds;
+  }
+  g->ampmax_att_per_sec=ci->hi.amplitude_track_dBpersec;
+  return;
+}
+
+static void vorbis_encode_global_stereo(vorbis_info *vi,
+				       highlevel_encode_setup *hi,
+				       adj_stereo *p){
+  float s=hi->stereo_point_setting;
+  int i,is=s;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy_global *g=&ci->psy_g_param;
+
+  if(p){
+    memcpy(g->coupling_prepointamp,p[is].pre,sizeof(*p[is].pre)*PACKETBLOBS);
+    memcpy(g->coupling_postpointamp,p[is].post,sizeof(*p[is].post)*PACKETBLOBS);
+
+    if(hi->managed){
+      /* interpolate the kHz threshholds */
+      for(i=0;i<PACKETBLOBS;i++){
+	float kHz=p[is].kHz[i]*(1.-ds)+p[is+1].kHz[i]*ds;
+	g->coupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0];
+	g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1];
+	g->coupling_pkHz[i]=kHz;
+	
+	kHz=p[is].lowpasskHz[i]*(1.-ds)+p[is+1].lowpasskHz[i]*ds;
+	g->sliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0];
+	g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1];
+	
+      }
+    }else{
+      float kHz=p[is].kHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].kHz[PACKETBLOBS/2]*ds;
+      for(i=0;i<PACKETBLOBS;i++){
+	g->coupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0];
+	g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1];
+	g->coupling_pkHz[i]=kHz;
+      }
+      
+      kHz=p[is].lowpasskHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].lowpasskHz[PACKETBLOBS/2]*ds;
+      for(i=0;i<PACKETBLOBS;i++){
+	g->sliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0];
+	g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1];
+      }
+    }
+  }else{
+    for(i=0;i<PACKETBLOBS;i++){
+      g->sliding_lowpass[0][i]=ci->blocksizes[0];
+      g->sliding_lowpass[1][i]=ci->blocksizes[1];
+    }
+  }
+  return;
+}
+
+static void vorbis_encode_psyset_setup(vorbis_info *vi,double s,
+				      int *nn_start,
+				      int *nn_partition,
+				      double *nn_thresh,
+				      int block){
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+  highlevel_encode_setup *hi=&ci->hi;
+  int is=s;
+  
+  if(block>=ci->psys)
+    ci->psys=block+1;
+  if(!p){
+    p=_ogg_calloc(1,sizeof(*p));
+    ci->psy_param[block]=p;
+  }
+  
+  memcpy(p,&_psy_info_template,sizeof(*p));
+  p->blockflag=block>>1;
+
+  if(hi->noise_normalize_p){
+    p->normal_channel_p=1;
+    p->normal_point_p=1;
+    p->normal_start=nn_start[is];
+    p->normal_partition=nn_partition[is];
+    p->normal_thresh=nn_thresh[is];
+  }
+    
+  return;
+}
+
+static void vorbis_encode_tonemask_setup(vorbis_info *vi,double s,int block,
+					 att3 *att,
+					 int  *max,
+					 vp_adjblock *in){
+  int i,is=s;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+
+  /* 0 and 2 are only used by bitmanagement, but there's no harm to always
+     filling the values in here */
+  p->tone_masteratt[0]=att[is].att[0]*(1.-ds)+att[is+1].att[0]*ds;
+  p->tone_masteratt[1]=att[is].att[1]*(1.-ds)+att[is+1].att[1]*ds;
+  p->tone_masteratt[2]=att[is].att[2]*(1.-ds)+att[is+1].att[2]*ds;
+  p->tone_centerboost=att[is].boost*(1.-ds)+att[is+1].boost*ds;
+  p->tone_decay=att[is].decay*(1.-ds)+att[is+1].decay*ds;
+
+  p->max_curve_dB=max[is]*(1.-ds)+max[is+1]*ds;
+
+  for(i=0;i<P_BANDS;i++)
+    p->toneatt[i]=in[is].block[i]*(1.-ds)+in[is+1].block[i]*ds;
+  return;
+}
+
+
+static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block,
+				       compandblock *in, double *x){
+  int i,is=s;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+
+  ds=x[is]*(1.-ds)+x[is+1]*ds;
+  is=(int)ds;
+  ds-=is;
+  if(ds==0 && is>0){
+    is--;
+    ds=1.;
+  }
+
+  /* interpolate the compander settings */
+  for(i=0;i<NOISE_COMPAND_LEVELS;i++)
+    p->noisecompand[i]=in[is].data[i]*(1.-ds)+in[is+1].data[i]*ds;
+  return;
+}
+
+static void vorbis_encode_peak_setup(vorbis_info *vi,double s,int block,
+				    int *suppress){
+  int is=s;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+
+  p->tone_abs_limit=suppress[is]*(1.-ds)+suppress[is+1]*ds;
+
+  return;
+}
+
+static void vorbis_encode_noisebias_setup(vorbis_info *vi,double s,int block,
+					 int *suppress,
+					 noise3 *in,
+					 noiseguard *guard,
+					 double userbias){
+  int i,is=s,j;
+  double ds=s-is;
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+
+  p->noisemaxsupp=suppress[is]*(1.-ds)+suppress[is+1]*ds;
+  p->noisewindowlomin=guard[block].lo;
+  p->noisewindowhimin=guard[block].hi;
+  p->noisewindowfixed=guard[block].fixed;
+
+  for(j=0;j<P_NOISECURVES;j++)
+    for(i=0;i<P_BANDS;i++)
+      p->noiseoff[j][i]=in[is].data[j][i]*(1.-ds)+in[is+1].data[j][i]*ds;
+
+  /* impulse blocks may take a user specified bias to boost the
+     nominal/high noise encoding depth */
+  for(j=0;j<P_NOISECURVES;j++){
+    float min=p->noiseoff[j][0]+6; /* the lowest it can go */
+    for(i=0;i<P_BANDS;i++){
+      p->noiseoff[j][i]+=userbias;
+      if(p->noiseoff[j][i]<min)p->noiseoff[j][i]=min;
+    }
+  }
+
+  return;
+}
+
+static void vorbis_encode_ath_setup(vorbis_info *vi,int block){
+  codec_setup_info *ci=vi->codec_setup;
+  vorbis_info_psy *p=ci->psy_param[block];
+
+  p->ath_adjatt=ci->hi.ath_floating_dB;
+  p->ath_maxatt=ci->hi.ath_absolute_dB;
+  return;
+}
+
+
+static int book_dup_or_new(codec_setup_info *ci,static_codebook *book){
+  int i;
+  for(i=0;i<ci->books;i++)
+    if(ci->book_param[i]==book)return(i);
+  
+  return(ci->books++);
+}
+
+static void vorbis_encode_blocksize_setup(vorbis_info *vi,double s,
+					 int *shortb,int *longb){
+
+  codec_setup_info *ci=vi->codec_setup;
+  int is=s;
+  
+  int blockshort=shortb[is];
+  int blocklong=longb[is];
+  ci->blocksizes[0]=blockshort;
+  ci->blocksizes[1]=blocklong;
+
+}
+
+static void vorbis_encode_residue_setup(vorbis_info *vi,
+				       int number, int block,
+				       vorbis_residue_template *res){
+
+  codec_setup_info *ci=vi->codec_setup;
+  int i,n;
+  
+  vorbis_info_residue0 *r=ci->residue_param[number]=
+    _ogg_malloc(sizeof(*r));
+  
+  memcpy(r,res->res,sizeof(*r));
+  if(ci->residues<=number)ci->residues=number+1;
+
+  switch(ci->blocksizes[block]){
+  case 64:case 128:case 256:
+    r->grouping=16;
+    break;
+  default:
+    r->grouping=32;
+    break;
+  }
+  ci->residue_type[number]=res->res_type;
+
+  /* to be adjusted by lowpass/pointlimit later */
+  n=r->end=ci->blocksizes[block]>>1; 
+  if(res->res_type==2)
+    n=r->end*=vi->channels;
+  
+  /* fill in all the books */
+  {
+    int booklist=0,k;
+    
+    if(ci->hi.managed){
+      for(i=0;i<r->partitions;i++)
+	for(k=0;k<3;k++)
+	  if(res->books_base_managed->books[i][k])
+	    r->secondstages[i]|=(1<<k);
+
+      r->groupbook=book_dup_or_new(ci,res->book_aux_managed);
+      ci->book_param[r->groupbook]=res->book_aux_managed;      
+    
+      for(i=0;i<r->partitions;i++){
+	for(k=0;k<3;k++){
+	  if(res->books_base_managed->books[i][k]){
+	    int bookid=book_dup_or_new(ci,res->books_base_managed->books[i][k]);
+	    r->booklist[booklist++]=bookid;
+	    ci->book_param[bookid]=res->books_base_managed->books[i][k];
+	  }
+	}
+      }
+
+    }else{
+
+      for(i=0;i<r->partitions;i++)
+	for(k=0;k<3;k++)
+	  if(res->books_base->books[i][k])
+	    r->secondstages[i]|=(1<<k);
+  
+      r->groupbook=book_dup_or_new(ci,res->book_aux);
+      ci->book_param[r->groupbook]=res->book_aux;
+      
+      for(i=0;i<r->partitions;i++){
+	for(k=0;k<3;k++){
+	  if(res->books_base->books[i][k]){
+	    int bookid=book_dup_or_new(ci,res->books_base->books[i][k]);
+	    r->booklist[booklist++]=bookid;
+	    ci->book_param[bookid]=res->books_base->books[i][k];
+	  }
+	}
+      }
+    }
+  }
+  
+  /* lowpass setup/pointlimit */
+  {
+    double freq=ci->hi.lowpass_kHz*1000.;
+    vorbis_info_floor1 *f=ci->floor_param[block]; /* by convention */
+    double nyq=vi->rate/2.;
+    long blocksize=ci->blocksizes[block]>>1;
+
+    /* lowpass needs to be set in the floor and the residue. */    
+    if(freq>nyq)freq=nyq;
+    /* in the floor, the granularity can be very fine; it doesn't alter
+       the encoding structure, only the samples used to fit the floor
+       approximation */
+    f->n=freq/nyq*blocksize; 
+
+    /* this res may by limited by the maximum pointlimit of the mode,
+       not the lowpass. the floor is always lowpass limited. */
+    if(res->limit_type){
+      if(ci->hi.managed)
+	freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS-1]*1000.;
+      else
+	freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS/2]*1000.;
+      if(freq>nyq)freq=nyq;
+    }
+    
+    /* in the residue, we're constrained, physically, by partition
+       boundaries.  We still lowpass 'wherever', but we have to round up
+       here to next boundary, or the vorbis spec will round it *down* to
+       previous boundary in encode/decode */
+    if(ci->residue_type[block]==2)
+      r->end=(int)((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */
+	r->grouping;
+    else
+      r->end=(int)((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */
+	r->grouping;
+  }
+}      
+
+/* we assume two maps in this encoder */
+static void vorbis_encode_map_n_res_setup(vorbis_info *vi,double s,
+					  vorbis_mapping_template *maps){
+
+  codec_setup_info *ci=vi->codec_setup;
+  int i,j,is=s,modes=2;
+  vorbis_info_mapping0 *map=maps[is].map;
+  vorbis_info_mode *mode=_mode_template;
+  vorbis_residue_template *res=maps[is].res;
+
+  if(ci->blocksizes[0]==ci->blocksizes[1])modes=1;
+
+  for(i=0;i<modes;i++){
+
+    ci->map_param[i]=_ogg_calloc(1,sizeof(*map));
+    ci->mode_param[i]=_ogg_calloc(1,sizeof(*mode));
+  
+    memcpy(ci->mode_param[i],mode+i,sizeof(*_mode_template));
+    if(i>=ci->modes)ci->modes=i+1;
+
+    ci->map_type[i]=0;
+    memcpy(ci->map_param[i],map+i,sizeof(*map));
+    if(i>=ci->maps)ci->maps=i+1;
+    
+    for(j=0;j<map[i].submaps;j++)
+      vorbis_encode_residue_setup(vi,map[i].residuesubmap[j],i
+				  ,res+map[i].residuesubmap[j]);
+  }
+}
+
+static double setting_to_approx_bitrate(vorbis_info *vi){
+  codec_setup_info *ci=vi->codec_setup;
+  highlevel_encode_setup *hi=&ci->hi;
+  ve_setup_data_template *setup=(ve_setup_data_template *)hi->setup;
+  int is=hi->base_setting;
+  double ds=hi->base_setting-is;
+  int ch=vi->channels;
+  double *r=setup->rate_mapping;
+
+  if(r==NULL)
+    return(-1);
+  
+  return((r[is]*(1.-ds)+r[is+1]*ds)*ch);  
+}
+
+static void get_setup_template(vorbis_info *vi,
+			       long ch,long srate,
+			       double req,int q_or_bitrate){
+  int i=0,j;
+  codec_setup_info *ci=vi->codec_setup;
+  highlevel_encode_setup *hi=&ci->hi;
+  if(q_or_bitrate)req/=ch;
+
+  while(setup_list[i]){
+    if(setup_list[i]->coupling_restriction==-1 ||
+       setup_list[i]->coupling_restriction==ch){
+      if(srate>=setup_list[i]->samplerate_min_restriction &&
+	 srate<=setup_list[i]->samplerate_max_restriction){
+	int mappings=setup_list[i]->mappings;
+	double *map=(q_or_bitrate?
+		     setup_list[i]->rate_mapping:
+		     setup_list[i]->quality_mapping);
+
+	/* the template matches.  Does the requested quality mode
+	   fall within this template's modes? */
+	if(req<map[0]){++i;continue;}
+	if(req>map[setup_list[i]->mappings]){++i;continue;}
+	for(j=0;j<mappings;j++)
+	  if(req>=map[j] && req<map[j+1])break;
+	/* an all-points match */
+	hi->setup=setup_list[i];
+	if(j==mappings)
+	  hi->base_setting=j-.001;
+	else{
+	  float low=map[j];
+	  float high=map[j+1];
+	  float del=(req-low)/(high-low);
+	  hi->base_setting=j+del;
+	}
+	return;
+      }
+    }
+    i++;
+  }
+  
+  hi->setup=NULL;
+}
+
+/* encoders will need to use vorbis_info_init beforehand and call
+   vorbis_info clear when all done */
+
+/* two interfaces; this, more detailed one, and later a convenience
+   layer on top */
+
+/* the final setup call */
+int vorbis_encode_setup_init(vorbis_info *vi){
+  int i0=0,singleblock=0;
+  codec_setup_info *ci=vi->codec_setup;
+  ve_setup_data_template *setup=NULL;
+  highlevel_encode_setup *hi=&ci->hi;
+
+  if(ci==NULL)return(OV_EINVAL);
+  if(!hi->impulse_block_p)i0=1;
+
+  /* too low/high an ATH floater is nonsensical, but doesn't break anything */
+  if(hi->ath_floating_dB>-80)hi->ath_floating_dB=-80;
+  if(hi->ath_floating_dB<-200)hi->ath_floating_dB=-200;
+
+  /* again, bound this to avoid the app shooting itself int he foot
+     too badly */
+  if(hi->amplitude_track_dBpersec>0.)hi->amplitude_track_dBpersec=0.;
+  if(hi->amplitude_track_dBpersec<-99999.)hi->amplitude_track_dBpersec=-99999.;
+  
+  /* get the appropriate setup template; matches the fetch in previous
+     stages */
+  setup=(ve_setup_data_template *)hi->setup;
+  if(setup==NULL)return(OV_EINVAL);
+
+  hi->set_in_stone=1;
+  /* choose block sizes from configured sizes as well as paying
+     attention to long_block_p and short_block_p.  If the configured
+     short and long blocks are the same length, we set long_block_p
+     and unset short_block_p */
+  vorbis_encode_blocksize_setup(vi,hi->base_setting,
+				setup->blocksize_short,
+				setup->blocksize_long);
+  if(ci->blocksizes[0]==ci->blocksizes[1])singleblock=1;
+  
+  /* floor setup; choose proper floor params.  Allocated on the floor
+     stack in order; if we alloc only long floor, it's 0 */
+  vorbis_encode_floor_setup(vi,hi->short_setting,0,
+			    setup->floor_books,
+			    setup->floor_params,
+			    setup->floor_short_mapping);
+  if(!singleblock)
+    vorbis_encode_floor_setup(vi,hi->long_setting,1,
+			      setup->floor_books,
+			      setup->floor_params,
+			      setup->floor_long_mapping);
+  
+  /* setup of [mostly] short block detection and stereo*/
+  vorbis_encode_global_psych_setup(vi,hi->trigger_setting,
+				   setup->global_params,
+				   setup->global_mapping);
+  vorbis_encode_global_stereo(vi,hi,setup->stereo_modes);
+
+  /* basic psych setup and noise normalization */
+  vorbis_encode_psyset_setup(vi,hi->short_setting,
+			     setup->psy_noise_normal_start[0],
+			     setup->psy_noise_normal_partition[0],  
+			     setup->psy_noise_normal_thresh,  
+			     0);
+  vorbis_encode_psyset_setup(vi,hi->short_setting,
+			     setup->psy_noise_normal_start[0],
+			     setup->psy_noise_normal_partition[0],  
+			     setup->psy_noise_normal_thresh,  
+			     1);
+  if(!singleblock){
+    vorbis_encode_psyset_setup(vi,hi->long_setting,
+			       setup->psy_noise_normal_start[1],
+			       setup->psy_noise_normal_partition[1],  
+				    setup->psy_noise_normal_thresh,  
+			       2);
+    vorbis_encode_psyset_setup(vi,hi->long_setting,
+			       setup->psy_noise_normal_start[1],
+			       setup->psy_noise_normal_partition[1],  
+			       setup->psy_noise_normal_thresh,  
+			       3);
+  }
+
+  /* tone masking setup */
+  vorbis_encode_tonemask_setup(vi,hi->block[i0].tone_mask_setting,0,
+			       setup->psy_tone_masteratt,
+			       setup->psy_tone_0dB,
+			       setup->psy_tone_adj_impulse);
+  vorbis_encode_tonemask_setup(vi,hi->block[1].tone_mask_setting,1,
+			       setup->psy_tone_masteratt,
+			       setup->psy_tone_0dB,
+			       setup->psy_tone_adj_other);
+  if(!singleblock){
+    vorbis_encode_tonemask_setup(vi,hi->block[2].tone_mask_setting,2,
+				 setup->psy_tone_masteratt,
+				 setup->psy_tone_0dB,
+				 setup->psy_tone_adj_other);
+    vorbis_encode_tonemask_setup(vi,hi->block[3].tone_mask_setting,3,
+				 setup->psy_tone_masteratt,
+				 setup->psy_tone_0dB,
+				 setup->psy_tone_adj_long);
+  }
+
+  /* noise companding setup */
+  vorbis_encode_compand_setup(vi,hi->block[i0].noise_compand_setting,0,
+			      setup->psy_noise_compand,
+			      setup->psy_noise_compand_short_mapping);
+  vorbis_encode_compand_setup(vi,hi->block[1].noise_compand_setting,1,
+			      setup->psy_noise_compand,
+			      setup->psy_noise_compand_short_mapping);
+  if(!singleblock){
+    vorbis_encode_compand_setup(vi,hi->block[2].noise_compand_setting,2,
+				setup->psy_noise_compand,
+				setup->psy_noise_compand_long_mapping);
+    vorbis_encode_compand_setup(vi,hi->block[3].noise_compand_setting,3,
+				setup->psy_noise_compand,
+				setup->psy_noise_compand_long_mapping);
+  }
+
+  /* peak guarding setup  */
+  vorbis_encode_peak_setup(vi,hi->block[i0].tone_peaklimit_setting,0,
+			   setup->psy_tone_dBsuppress);
+  vorbis_encode_peak_setup(vi,hi->block[1].tone_peaklimit_setting,1,
+			   setup->psy_tone_dBsuppress);
+  if(!singleblock){
+    vorbis_encode_peak_setup(vi,hi->block[2].tone_peaklimit_setting,2,
+			     setup->psy_tone_dBsuppress);
+    vorbis_encode_peak_setup(vi,hi->block[3].tone_peaklimit_setting,3,
+			     setup->psy_tone_dBsuppress);
+  }
+
+  /* noise bias setup */
+  vorbis_encode_noisebias_setup(vi,hi->block[i0].noise_bias_setting,0,
+				setup->psy_noise_dBsuppress,
+				setup->psy_noise_bias_impulse,
+				setup->psy_noiseguards,
+				(i0==0?hi->impulse_noisetune:0.));
+  vorbis_encode_noisebias_setup(vi,hi->block[1].noise_bias_setting,1,
+				setup->psy_noise_dBsuppress,
+				setup->psy_noise_bias_padding,
+				setup->psy_noiseguards,0.);
+  if(!singleblock){
+    vorbis_encode_noisebias_setup(vi,hi->block[2].noise_bias_setting,2,
+				  setup->psy_noise_dBsuppress,
+				  setup->psy_noise_bias_trans,
+				  setup->psy_noiseguards,0.);
+    vorbis_encode_noisebias_setup(vi,hi->block[3].noise_bias_setting,3,
+				  setup->psy_noise_dBsuppress,
+				  setup->psy_noise_bias_long,
+				  setup->psy_noiseguards,0.);
+  }
+
+  vorbis_encode_ath_setup(vi,0);
+  vorbis_encode_ath_setup(vi,1);
+  if(!singleblock){
+    vorbis_encode_ath_setup(vi,2);
+    vorbis_encode_ath_setup(vi,3);
+  }
+
+  vorbis_encode_map_n_res_setup(vi,hi->base_setting,setup->maps);
+
+  /* set bitrate readonlies and management */
+  vi->bitrate_nominal=setting_to_approx_bitrate(vi);
+  vi->bitrate_lower=hi->bitrate_min;
+  vi->bitrate_upper=hi->bitrate_max;
+  vi->bitrate_window=hi->bitrate_limit_window;
+
+  if(hi->managed){
+    ci->bi.queue_avg_time=hi->bitrate_av_window;
+    ci->bi.queue_avg_center=hi->bitrate_av_window_center;
+    ci->bi.queue_minmax_time=hi->bitrate_limit_window;
+    ci->bi.queue_hardmin=hi->bitrate_min;
+    ci->bi.queue_hardmax=hi->bitrate_max;
+    ci->bi.queue_avgmin=hi->bitrate_av_lo;
+    ci->bi.queue_avgmax=hi->bitrate_av_hi;
+    ci->bi.avgfloat_downslew_max=-999999.f;
+    ci->bi.avgfloat_upslew_max=999999.f;
+  }
+
+  return(0);
+  
+}
+
+static int vorbis_encode_setup_setting(vorbis_info *vi,
+				       long  channels,
+				       long  rate){
+  int ret=0,i,is;
+  codec_setup_info *ci=vi->codec_setup;
+  highlevel_encode_setup *hi=&ci->hi;
+  ve_setup_data_template *setup=hi->setup;
+  double ds;
+
+  ret=vorbis_encode_toplevel_setup(vi,channels,rate);
+  if(ret)return(ret);
+
+  is=hi->base_setting;
+  ds=hi->base_setting-is;
+
+  hi->short_setting=hi->base_setting;
+  hi->long_setting=hi->base_setting;
+
+  hi->managed=0;
+
+  hi->impulse_block_p=1;
+  hi->noise_normalize_p=1;
+
+  hi->stereo_point_setting=hi->base_setting;
+  hi->lowpass_kHz=
+    setup->psy_lowpass[is]*(1.-ds)+setup->psy_lowpass[is+1]*ds;  
+  
+  hi->ath_floating_dB=setup->psy_ath_float[is]*(1.-ds)+
+    setup->psy_ath_float[is+1]*ds;
+  hi->ath_absolute_dB=setup->psy_ath_abs[is]*(1.-ds)+
+    setup->psy_ath_abs[is+1]*ds;
+
+  hi->amplitude_track_dBpersec=-6.;
+  hi->trigger_setting=hi->base_setting;
+
+  for(i=0;i<4;i++){
+    hi->block[i].tone_mask_setting=hi->base_setting;
+    hi->block[i].tone_peaklimit_setting=hi->base_setting;
+    hi->block[i].noise_bias_setting=hi->base_setting;
+    hi->block[i].noise_compand_setting=hi->base_setting;
+  }
+
+  return(ret);
+}
+
+int vorbis_encode_setup_vbr(vorbis_info *vi,
+			    long  channels,
+			    long  rate,			    
+			    float quality){
+  codec_setup_info *ci=vi->codec_setup;
+  highlevel_encode_setup *hi=&ci->hi;
+
+  quality+=.00001;
+  if(quality>=1.)quality=.9999;
+
+  get_setup_template(vi,channels,rate,quality,0);
+  if(!hi->setup)return OV_EIMPL;
+  
+  return vorbis_encode_setup_setting(vi,channels,rate);
+}
+
+int vorbis_encode_init_vbr(vorbis_info *vi,
+			   long channels,
+			   long rate,
+			   
+			   float base_quality /* 0. to 1. */
+			   ){
+  int ret=0;
+
+  ret=vorbis_encode_setup_vbr(vi,channels,rate,base_quality);
+  
+  if(ret){
+    vorbis_info_clear(vi);
+    return ret; 
+  }
+  ret=vorbis_encode_setup_init(vi);
+  if(ret)
+    vorbis_info_clear(vi);
+  return(ret);
+}
+
+int vorbis_encode_setup_managed(vorbis_info *vi,
+				long channels,
+				long rate,
+				
+				long max_bitrate,
+				long nominal_bitrate,
+				long min_bitrate){
+
+  codec_setup_info *ci=vi->codec_setup;
+  highlevel_encode_setup *hi=&ci->hi;
+  double tnominal=nominal_bitrate;
+  int ret=0;
+
+  if(nominal_bitrate<=0.){
+    if(max_bitrate>0.){
+      nominal_bitrate=max_bitrate*.875;
+    }else{
+      if(min_bitrate>0.){
+	nominal_bitrate=min_bitrate;
+      }else{
+	return(OV_EINVAL);
+      }
+    }
+  }
+
+  get_setup_template(vi,channels,rate,nominal_bitrate,1);
+  if(!hi->setup)return OV_EIMPL;
+  
+  ret=vorbis_encode_setup_setting(vi,channels,rate);
+  if(ret){
+    vorbis_info_clear(vi);
+    return ret; 
+  }
+
+  /* initialize management with sane defaults */
+      /* initialize management with sane defaults */
+  hi->managed=1;
+  hi->bitrate_av_window=4.;
+  hi->bitrate_av_window_center=.5;
+  hi->bitrate_limit_window=2.;
+  hi->bitrate_min=min_bitrate;
+  hi->bitrate_max=max_bitrate;
+  hi->bitrate_av_lo=tnominal;
+  hi->bitrate_av_hi=tnominal;
+
+  return(ret);
+
+}
+
+int vorbis_encode_init(vorbis_info *vi,
+		       long channels,
+		       long rate,
+
+		       long max_bitrate,
+		       long nominal_bitrate,
+		       long min_bitrate){
+
+  int ret=vorbis_encode_setup_managed(vi,channels,rate,
+				      max_bitrate,
+				      nominal_bitrate,
+				      min_bitrate);
+  if(ret){
+    vorbis_info_clear(vi);
+    return(ret);
+  }
+
+  ret=vorbis_encode_setup_init(vi);
+  if(ret)
+    vorbis_info_clear(vi);
+  return(ret);
+}
+
+int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){
+  if(vi){
+    codec_setup_info *ci=vi->codec_setup;
+    highlevel_encode_setup *hi=&ci->hi;
+    int setp=(number&0xf); /* a read request has a low nibble of 0 */
+
+    if(setp && hi->set_in_stone)return(OV_EINVAL);
+
+    switch(number){
+    case OV_ECTL_RATEMANAGE_GET:
+      {
+	
+	struct ovectl_ratemanage_arg *ai=
+	  (struct ovectl_ratemanage_arg *)arg;
+	
+	ai->management_active=hi->managed;
+	ai->bitrate_av_window=hi->bitrate_av_window;
+	ai->bitrate_av_window_center=hi->bitrate_av_window_center;
+	ai->bitrate_hard_window=hi->bitrate_limit_window;
+	ai->bitrate_hard_min=hi->bitrate_min;
+	ai->bitrate_hard_max=hi->bitrate_max;
+	ai->bitrate_av_lo=hi->bitrate_av_lo;
+	ai->bitrate_av_hi=hi->bitrate_av_hi;
+	
+      }
+      return(0);
+    
+    case OV_ECTL_RATEMANAGE_SET:
+      {
+	struct ovectl_ratemanage_arg *ai=
+	  (struct ovectl_ratemanage_arg *)arg;
+	if(ai==NULL){
+	  hi->managed=0;
+	}else{
+	  hi->managed=ai->management_active;
+	  vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_AVG,arg);
+	  vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_HARD,arg);
+	}
+      }
+      return 0;
+
+    case OV_ECTL_RATEMANAGE_AVG:
+      {
+	struct ovectl_ratemanage_arg *ai=
+	  (struct ovectl_ratemanage_arg *)arg;
+	if(ai==NULL){
+	  hi->bitrate_av_lo=0;
+	  hi->bitrate_av_hi=0;
+	  hi->bitrate_av_window=0;
+	}else{
+	  hi->bitrate_av_window=ai->bitrate_av_window;
+	  hi->bitrate_av_window_center=ai->bitrate_av_window_center;
+	  hi->bitrate_av_lo=ai->bitrate_av_lo;
+	  hi->bitrate_av_hi=ai->bitrate_av_hi;
+	}
+
+	if(hi->bitrate_av_window<.25)hi->bitrate_av_window=.25;
+	if(hi->bitrate_av_window>10.)hi->bitrate_av_window=10.;
+	if(hi->bitrate_av_window_center<0.)hi->bitrate_av_window=0.;
+	if(hi->bitrate_av_window_center>1.)hi->bitrate_av_window=1.;
+	
+	if( ( (hi->bitrate_av_lo<=0 && hi->bitrate_av_hi<=0)||
+	      (hi->bitrate_av_window<=0) ) &&
+	    ( (hi->bitrate_min<=0 && hi->bitrate_max<=0)||
+	      (hi->bitrate_limit_window<=0) ))
+	  hi->managed=0;
+      }
+      return(0);
+    case OV_ECTL_RATEMANAGE_HARD:
+      {
+	struct ovectl_ratemanage_arg *ai=
+	  (struct ovectl_ratemanage_arg *)arg;
+	if(ai==NULL){
+	  hi->bitrate_min=0;
+	  hi->bitrate_max=0;
+	  hi->bitrate_limit_window=0;
+	}else{
+	  hi->bitrate_limit_window=ai->bitrate_hard_window;
+	  hi->bitrate_min=ai->bitrate_hard_min;
+	  hi->bitrate_max=ai->bitrate_hard_max;
+	}
+	if(hi->bitrate_limit_window<0.)hi->bitrate_limit_window=0.;
+	if(hi->bitrate_limit_window>10.)hi->bitrate_limit_window=10.;
+	
+	if( ( (hi->bitrate_av_lo<=0 && hi->bitrate_av_hi<=0)||
+	      (hi->bitrate_av_window<=0) ) &&
+	    ( (hi->bitrate_min<=0 && hi->bitrate_max<=0)||
+	      (hi->bitrate_limit_window<=0) ))
+	  hi->managed=0;
+      }
+      return(0);
+
+    case OV_ECTL_LOWPASS_GET:
+      {
+	double *farg=(double *)arg;
+	*farg=hi->lowpass_kHz;
+      }
+      return(0);
+    case OV_ECTL_LOWPASS_SET:
+      {
+	double *farg=(double *)arg;
+	hi->lowpass_kHz=*farg;
+
+	if(hi->lowpass_kHz<2.)hi->lowpass_kHz=2.;
+	if(hi->lowpass_kHz>99.)hi->lowpass_kHz=99.;
+      }
+      return(0);
+    case OV_ECTL_IBLOCK_GET:
+      {
+	double *farg=(double *)arg;
+	*farg=hi->impulse_noisetune;
+      }
+      return(0);
+    case OV_ECTL_IBLOCK_SET:
+      {
+	double *farg=(double *)arg;
+	hi->impulse_noisetune=*farg;
+
+	if(hi->impulse_noisetune>0.)hi->impulse_noisetune=0.;
+	if(hi->impulse_noisetune<-15.)hi->impulse_noisetune=-15.;
+      }
+      return(0);      
+    }
+
+
+    return(OV_EIMPL);
+  }
+  return(OV_EINVAL);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/vorbisfile.c
@@ -1,0 +1,1619 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: stdio-based convenience library for opening/seeking/decoding
+ last mod: $Id: vorbisfile.c,v 1.62 2002/07/06 04:20:03 msmith Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <math.h>
+
+#include "vorbis/codec.h"
+#include "vorbis/vorbisfile.h"
+
+#include "os.h"
+#include "misc.h"
+
+/* A 'chained bitstream' is a Vorbis bitstream that contains more than
+   one logical bitstream arranged end to end (the only form of Ogg
+   multiplexing allowed in a Vorbis bitstream; grouping [parallel
+   multiplexing] is not allowed in Vorbis) */
+
+/* A Vorbis file can be played beginning to end (streamed) without
+   worrying ahead of time about chaining (see decoder_example.c).  If
+   we have the whole file, however, and want random access
+   (seeking/scrubbing) or desire to know the total length/time of a
+   file, we need to account for the possibility of chaining. */
+
+/* We can handle things a number of ways; we can determine the entire
+   bitstream structure right off the bat, or find pieces on demand.
+   This example determines and caches structure for the entire
+   bitstream, but builds a virtual decoder on the fly when moving
+   between links in the chain. */
+
+/* There are also different ways to implement seeking.  Enough
+   information exists in an Ogg bitstream to seek to
+   sample-granularity positions in the output.  Or, one can seek by
+   picking some portion of the stream roughly in the desired area if
+   we only want coarse navigation through the stream. */
+
+/*************************************************************************
+ * Many, many internal helpers.  The intention is not to be confusing; 
+ * rampant duplication and monolithic function implementation would be 
+ * harder to understand anyway.  The high level functions are last.  Begin
+ * grokking near the end of the file */
+
+/* read a little more data from the file/pipe into the ogg_sync framer
+*/
+#define CHUNKSIZE 8500 /* a shade over 8k; anyone using pages well
+                          over 8k gets what they deserve */
+static long _get_data(OggVorbis_File *vf){
+  errno=0;
+  if(vf->datasource){
+    char *buffer=ogg_sync_buffer(&vf->oy,CHUNKSIZE);
+    long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
+    if(bytes>0)ogg_sync_wrote(&vf->oy,bytes);
+    if(bytes==0 && errno)return(-1);
+    return(bytes);
+  }else
+    return(0);
+}
+
+/* save a tiny smidge of verbosity to make the code more readable */
+static void _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){
+  if(vf->datasource){ 
+    (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET);
+    vf->offset=offset;
+    ogg_sync_reset(&vf->oy);
+  }else{
+    /* shouldn't happen unless someone writes a broken callback */
+    return;
+  }
+}
+
+/* The read/seek functions track absolute position within the stream */
+
+/* from the head of the stream, get the next page.  boundary specifies
+   if the function is allowed to fetch more data from the stream (and
+   how much) or only use internally buffered data.
+
+   boundary: -1) unbounded search
+              0) read no additional data; use cached only
+	      n) search for a new page beginning for n bytes
+
+   return:   <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD)
+              n) found a page at absolute offset n */
+
+static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og,
+				  ogg_int64_t boundary){
+  if(boundary>0)boundary+=vf->offset;
+  while(1){
+    long more;
+
+    if(boundary>0 && vf->offset>=boundary)return(OV_FALSE);
+    more=ogg_sync_pageseek(&vf->oy,og);
+    
+    if(more<0){
+      /* skipped n bytes */
+      vf->offset-=more;
+    }else{
+      if(more==0){
+	/* send more paramedics */
+	if(!boundary)return(OV_FALSE);
+	{
+	  long ret=_get_data(vf);
+	  if(ret==0)return(OV_EOF);
+	  if(ret<0)return(OV_EREAD);
+	}
+      }else{
+	/* got a page.  Return the offset at the page beginning,
+           advance the internal offset past the page end */
+	ogg_int64_t ret=vf->offset;
+	vf->offset+=more;
+	return(ret);
+	
+      }
+    }
+  }
+}
+
+/* find the latest page beginning before the current stream cursor
+   position. Much dirtier than the above as Ogg doesn't have any
+   backward search linkage.  no 'readp' as it will certainly have to
+   read. */
+/* returns offset or OV_EREAD, OV_FAULT */
+static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){
+  ogg_int64_t begin=vf->offset;
+  ogg_int64_t end=begin;
+  ogg_int64_t ret;
+  ogg_int64_t offset=-1;
+
+  while(offset==-1){
+    begin-=CHUNKSIZE;
+    if(begin<0)
+      begin=0;
+    _seek_helper(vf,begin);
+    while(vf->offset<end){
+      ret=_get_next_page(vf,og,end-vf->offset);
+      if(ret==OV_EREAD)return(OV_EREAD);
+      if(ret<0){
+	break;
+      }else{
+	offset=ret;
+      }
+    }
+  }
+
+  /* we have the offset.  Actually snork and hold the page now */
+  _seek_helper(vf,offset);
+  ret=_get_next_page(vf,og,CHUNKSIZE);
+  if(ret<0)
+    /* this shouldn't be possible */
+    return(OV_EFAULT);
+
+  return(offset);
+}
+
+/* finds each bitstream link one at a time using a bisection search
+   (has to begin by knowing the offset of the lb's initial page).
+   Recurses for each link so it can alloc the link storage after
+   finding them all, then unroll and fill the cache at the same time */
+static int _bisect_forward_serialno(OggVorbis_File *vf,
+				    ogg_int64_t begin,
+				    ogg_int64_t searched,
+				    ogg_int64_t end,
+				    long currentno,
+				    long m){
+  ogg_int64_t endsearched=end;
+  ogg_int64_t next=end;
+  ogg_page og;
+  ogg_int64_t ret;
+  
+  /* the below guards against garbage seperating the last and
+     first pages of two links. */
+  while(searched<endsearched){
+    ogg_int64_t bisect;
+    
+    if(endsearched-searched<CHUNKSIZE){
+      bisect=searched;
+    }else{
+      bisect=(searched+endsearched)/2;
+    }
+    
+    _seek_helper(vf,bisect);
+    ret=_get_next_page(vf,&og,-1);
+    if(ret==OV_EREAD)return(OV_EREAD);
+    if(ret<0 || ogg_page_serialno(&og)!=currentno){
+      endsearched=bisect;
+      if(ret>=0)next=ret;
+    }else{
+      searched=ret+og.header_len+og.body_len;
+    }
+  }
+
+  _seek_helper(vf,next);
+  ret=_get_next_page(vf,&og,-1);
+  if(ret==OV_EREAD)return(OV_EREAD);
+  
+  if(searched>=end || ret<0){
+    vf->links=m+1;
+    vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets));
+    vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos));
+    vf->offsets[m+1]=searched;
+  }else{
+    ret=_bisect_forward_serialno(vf,next,vf->offset,
+				 end,ogg_page_serialno(&og),m+1);
+    if(ret==OV_EREAD)return(OV_EREAD);
+  }
+  
+  vf->offsets[m]=begin;
+  vf->serialnos[m]=currentno;
+  return(0);
+}
+
+/* uses the local ogg_stream storage in vf; this is important for
+   non-streaming input sources */
+static int _fetch_headers(OggVorbis_File *vf,vorbis_info *vi,vorbis_comment *vc,
+			  long *serialno,ogg_page *og_ptr){
+  ogg_page og;
+  ogg_packet op;
+  int i,ret;
+  
+  if(!og_ptr){
+    ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE);
+    if(llret==OV_EREAD)return(OV_EREAD);
+    if(llret<0)return OV_ENOTVORBIS;
+    og_ptr=&og;
+  }
+
+  ogg_stream_reset_serialno(&vf->os,ogg_page_serialno(og_ptr));
+  if(serialno)*serialno=vf->os.serialno;
+  vf->ready_state=STREAMSET;
+  
+  /* extract the initial header from the first page and verify that the
+     Ogg bitstream is in fact Vorbis data */
+  
+  vorbis_info_init(vi);
+  vorbis_comment_init(vc);
+  
+  i=0;
+  while(i<3){
+    ogg_stream_pagein(&vf->os,og_ptr);
+    while(i<3){
+      int result=ogg_stream_packetout(&vf->os,&op);
+      if(result==0)break;
+      if(result==-1){
+	ret=OV_EBADHEADER;
+	goto bail_header;
+      }
+      if((ret=vorbis_synthesis_headerin(vi,vc,&op))){
+	goto bail_header;
+      }
+      i++;
+    }
+    if(i<3)
+      if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){
+	ret=OV_EBADHEADER;
+	goto bail_header;
+      }
+  }
+  return 0; 
+
+ bail_header:
+  vorbis_info_clear(vi);
+  vorbis_comment_clear(vc);
+  vf->ready_state=OPENED;
+
+  return ret;
+}
+
+/* last step of the OggVorbis_File initialization; get all the
+   vorbis_info structs and PCM positions.  Only called by the seekable
+   initialization (local stream storage is hacked slightly; pay
+   attention to how that's done) */
+
+/* this is void and does not propogate errors up because we want to be
+   able to open and use damaged bitstreams as well as we can.  Just
+   watch out for missing information for links in the OggVorbis_File
+   struct */
+static void _prefetch_all_headers(OggVorbis_File *vf, ogg_int64_t dataoffset){
+  ogg_page og;
+  int i;
+  ogg_int64_t ret;
+  
+  vf->vi=_ogg_realloc(vf->vi,vf->links*sizeof(*vf->vi));
+  vf->vc=_ogg_realloc(vf->vc,vf->links*sizeof(*vf->vc));
+  vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets));
+  vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths));
+  
+  for(i=0;i<vf->links;i++){
+    if(i==0){
+      /* we already grabbed the initial header earlier.  Just set the offset */
+      vf->dataoffsets[i]=dataoffset;
+      _seek_helper(vf,dataoffset);
+
+    }else{
+
+      /* seek to the location of the initial header */
+
+      _seek_helper(vf,vf->offsets[i]);
+      if(_fetch_headers(vf,vf->vi+i,vf->vc+i,NULL,NULL)<0){
+    	vf->dataoffsets[i]=-1;
+      }else{
+	vf->dataoffsets[i]=vf->offset;
+      }
+    }
+
+    /* fetch beginning PCM offset */
+
+    if(vf->dataoffsets[i]!=-1){
+      ogg_int64_t accumulated=0;
+      long        lastblock=-1;
+      int         result;
+
+      ogg_stream_reset_serialno(&vf->os,vf->serialnos[i]);
+
+      while(1){
+	ogg_packet op;
+
+	ret=_get_next_page(vf,&og,-1);
+	if(ret<0)
+	  /* this should not be possible unless the file is
+             truncated/mangled */
+	  break;
+       
+	if(ogg_page_serialno(&og)!=vf->serialnos[i])
+	  break;
+	
+	/* count blocksizes of all frames in the page */
+	ogg_stream_pagein(&vf->os,&og);
+	while((result=ogg_stream_packetout(&vf->os,&op))){
+	  if(result>0){ /* ignore holes */
+	    long thisblock=vorbis_packet_blocksize(vf->vi+i,&op);
+	    if(lastblock!=-1)
+	      accumulated+=(lastblock+thisblock)>>2;
+	    lastblock=thisblock;
+	  }
+	}
+
+	if(ogg_page_granulepos(&og)!=-1){
+	  /* pcm offset of last packet on the first audio page */
+	  accumulated= ogg_page_granulepos(&og)-accumulated;
+	  break;
+	}
+      }
+
+      /* less than zero?  This is a stream with samples trimmed off
+         the beginning, a normal occurrence; set the offset to zero */
+      if(accumulated<0)accumulated=0;
+
+      vf->pcmlengths[i*2]=accumulated;
+    }
+
+    /* get the PCM length of this link. To do this,
+       get the last page of the stream */
+    {
+      ogg_int64_t end=vf->offsets[i+1];
+      _seek_helper(vf,end);
+
+      while(1){
+	ret=_get_prev_page(vf,&og);
+	if(ret<0){
+	  /* this should not be possible */
+	  vorbis_info_clear(vf->vi+i);
+	  vorbis_comment_clear(vf->vc+i);
+	  break;
+	}
+	if(ogg_page_granulepos(&og)!=-1){
+	  vf->pcmlengths[i*2+1]=ogg_page_granulepos(&og)-vf->pcmlengths[i*2];
+	  break;
+	}
+	vf->offset=ret;
+      }
+    }
+  }
+}
+
+static void _make_decode_ready(OggVorbis_File *vf){
+  if(vf->ready_state!=STREAMSET)return;
+  if(vf->seekable){
+    vorbis_synthesis_init(&vf->vd,vf->vi+vf->current_link);
+  }else{
+    vorbis_synthesis_init(&vf->vd,vf->vi);
+  }    
+  vorbis_block_init(&vf->vd,&vf->vb);
+  vf->ready_state=INITSET;
+  return;
+}
+
+static int _open_seekable2(OggVorbis_File *vf){
+  long serialno=vf->current_serialno;
+  ogg_int64_t dataoffset=vf->offset, end;
+  ogg_page og;
+
+  /* we're partially open and have a first link header state in
+     storage in vf */
+  /* we can seek, so set out learning all about this file */
+  (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END);
+  vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource);
+  
+  /* We get the offset for the last page of the physical bitstream.
+     Most OggVorbis files will contain a single logical bitstream */
+  end=_get_prev_page(vf,&og);
+  if(end<0)return(end);
+
+  /* more than one logical bitstream? */
+  if(ogg_page_serialno(&og)!=serialno){
+
+    /* Chained bitstream. Bisect-search each logical bitstream
+       section.  Do so based on serial number only */
+    if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0)return(OV_EREAD);
+
+  }else{
+
+    /* Only one logical bitstream */
+    if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0))return(OV_EREAD);
+
+  }
+
+  /* the initial header memory is referenced by vf after; don't free it */
+  _prefetch_all_headers(vf,dataoffset);
+  return(ov_raw_seek(vf,0));
+}
+
+/* clear out the current logical bitstream decoder */ 
+static void _decode_clear(OggVorbis_File *vf){
+  vorbis_dsp_clear(&vf->vd);
+  vorbis_block_clear(&vf->vb);
+  vf->ready_state=OPENED;
+
+  vf->bittrack=0.f;
+  vf->samptrack=0.f;
+}
+
+/* fetch and process a packet.  Handles the case where we're at a
+   bitstream boundary and dumps the decoding machine.  If the decoding
+   machine is unloaded, it loads it.  It also keeps pcm_offset up to
+   date (seek and read both use this.  seek uses a special hack with
+   readp). 
+
+   return: <0) error, OV_HOLE (lost packet) or OV_EOF
+            0) need more data (only if readp==0)
+	    1) got a packet 
+*/
+
+static int _fetch_and_process_packet(OggVorbis_File *vf,
+				     ogg_packet *op_in,
+				     int readp){
+  ogg_page og;
+
+  /* handle one packet.  Try to fetch it from current stream state */
+  /* extract packets from page */
+  while(1){
+    
+    /* process a packet if we can.  If the machine isn't loaded,
+       neither is a page */
+    if(vf->ready_state==INITSET){
+      while(1) {
+      	ogg_packet op;
+      	ogg_packet *op_ptr=(op_in?op_in:&op);
+	int result=ogg_stream_packetout(&vf->os,op_ptr);
+	ogg_int64_t granulepos;
+
+	op_in=NULL;
+	if(result==-1)return(OV_HOLE); /* hole in the data. */
+	if(result>0){
+	  /* got a packet.  process it */
+	  granulepos=op_ptr->granulepos;
+	  if(!vorbis_synthesis(&vf->vb,op_ptr)){ /* lazy check for lazy
+						    header handling.  The
+						    header packets aren't
+						    audio, so if/when we
+						    submit them,
+						    vorbis_synthesis will
+						    reject them */
+
+	    /* suck in the synthesis data and track bitrate */
+	    {
+	      int oldsamples=vorbis_synthesis_pcmout(&vf->vd,NULL);
+	      /* for proper use of libvorbis within libvorbisfile,
+                 oldsamples will always be zero. */
+	      if(oldsamples)return(OV_EFAULT);
+	      
+	      vorbis_synthesis_blockin(&vf->vd,&vf->vb);
+	      vf->samptrack+=vorbis_synthesis_pcmout(&vf->vd,NULL)-oldsamples;
+	      vf->bittrack+=op_ptr->bytes*8;
+	    }
+	  
+	    /* update the pcm offset. */
+	    if(granulepos!=-1 && !op_ptr->e_o_s){
+	      int link=(vf->seekable?vf->current_link:0);
+	      int i,samples;
+	    
+	      /* this packet has a pcm_offset on it (the last packet
+	         completed on a page carries the offset) After processing
+	         (above), we know the pcm position of the *last* sample
+	         ready to be returned. Find the offset of the *first*
+
+	         As an aside, this trick is inaccurate if we begin
+	         reading anew right at the last page; the end-of-stream
+	         granulepos declares the last frame in the stream, and the
+	         last packet of the last page may be a partial frame.
+	         So, we need a previous granulepos from an in-sequence page
+	         to have a reference point.  Thus the !op_ptr->e_o_s clause
+	         above */
+
+	      if(vf->seekable && link>0)
+		granulepos-=vf->pcmlengths[link*2];
+	      if(granulepos<0)granulepos=0; /* actually, this
+					       shouldn't be possible
+					       here unless the stream
+					       is very broken */
+
+	      samples=vorbis_synthesis_pcmout(&vf->vd,NULL);
+	    
+	      granulepos-=samples;
+	      for(i=0;i<link;i++)
+	        granulepos+=vf->pcmlengths[i*2+1];
+	      vf->pcm_offset=granulepos;
+	    }
+	    return(1);
+	  }
+	}
+	else 
+	  break;
+      }
+    }
+
+    if(vf->ready_state>=OPENED){
+      if(!readp)return(0);
+      if(_get_next_page(vf,&og,-1)<0)return(OV_EOF); /* eof. 
+							leave unitialized */
+      /* bitrate tracking; add the header's bytes here, the body bytes
+	 are done by packet above */
+      vf->bittrack+=og.header_len*8;
+      
+      /* has our decoding just traversed a bitstream boundary? */
+      if(vf->ready_state==INITSET){
+	if(vf->current_serialno!=ogg_page_serialno(&og)){
+	  _decode_clear(vf);
+	  
+	  if(!vf->seekable){
+	    vorbis_info_clear(vf->vi);
+	    vorbis_comment_clear(vf->vc);
+	  }
+	}
+      }
+    }
+
+    /* Do we need to load a new machine before submitting the page? */
+    /* This is different in the seekable and non-seekable cases.  
+
+       In the seekable case, we already have all the header
+       information loaded and cached; we just initialize the machine
+       with it and continue on our merry way.
+
+       In the non-seekable (streaming) case, we'll only be at a
+       boundary if we just left the previous logical bitstream and
+       we're now nominally at the header of the next bitstream
+    */
+
+    if(vf->ready_state!=INITSET){ 
+      int link;
+
+      if(vf->ready_state<STREAMSET){
+	if(vf->seekable){
+	  vf->current_serialno=ogg_page_serialno(&og);
+	  
+	  /* match the serialno to bitstream section.  We use this rather than
+	     offset positions to avoid problems near logical bitstream
+	     boundaries */
+	  for(link=0;link<vf->links;link++)
+	    if(vf->serialnos[link]==vf->current_serialno)break;
+	  if(link==vf->links)return(OV_EBADLINK); /* sign of a bogus
+						     stream.  error out,
+						     leave machine
+						     uninitialized */
+	  
+	  vf->current_link=link;
+	  
+	  ogg_stream_reset_serialno(&vf->os,vf->current_serialno);
+	  vf->ready_state=STREAMSET;
+	  
+	}else{
+	  /* we're streaming */
+	  /* fetch the three header packets, build the info struct */
+	  
+	  int ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,&og);
+	  if(ret)return(ret);
+	  vf->current_link++;
+	  link=0;
+	}
+      }
+      
+      _make_decode_ready(vf);
+    }
+    ogg_stream_pagein(&vf->os,&og);
+  }
+}
+
+/* if, eg, 64 bit stdio is configured by default, this will build with
+   fseek64 */
+static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
+  if(f==NULL)return(-1);
+  return fseek(f,off,whence);
+}
+
+static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
+		     long ibytes, ov_callbacks callbacks){
+  int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR):-1);
+  int ret;
+
+  memset(vf,0,sizeof(*vf));
+  vf->datasource=f;
+  vf->callbacks = callbacks;
+
+  /* init the framing state */
+  ogg_sync_init(&vf->oy);
+
+  /* perhaps some data was previously read into a buffer for testing
+     against other stream types.  Allow initialization from this
+     previously read data (as we may be reading from a non-seekable
+     stream) */
+  if(initial){
+    char *buffer=ogg_sync_buffer(&vf->oy,ibytes);
+    memcpy(buffer,initial,ibytes);
+    ogg_sync_wrote(&vf->oy,ibytes);
+  }
+
+  /* can we seek? Stevens suggests the seek test was portable */
+  if(offsettest!=-1)vf->seekable=1;
+
+  /* No seeking yet; Set up a 'single' (current) logical bitstream
+     entry for partial open */
+  vf->links=1;
+  vf->vi=_ogg_calloc(vf->links,sizeof(*vf->vi));
+  vf->vc=_ogg_calloc(vf->links,sizeof(*vf->vc));
+  ogg_stream_init(&vf->os,-1); /* fill in the serialno later */
+
+  /* Try to fetch the headers, maintaining all the storage */
+  if((ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,NULL))<0){
+    vf->datasource=NULL;
+    ov_clear(vf);
+  }else if(vf->ready_state < PARTOPEN)
+    vf->ready_state=PARTOPEN;
+  return(ret);
+}
+
+static int _ov_open2(OggVorbis_File *vf){
+  if(vf->ready_state < OPENED)
+    vf->ready_state=OPENED;
+  if(vf->seekable){
+    int ret=_open_seekable2(vf);
+    if(ret){
+      vf->datasource=NULL;
+      ov_clear(vf);
+    }
+    return(ret);
+  }
+  return 0;
+}
+
+
+/* clear out the OggVorbis_File struct */
+int ov_clear(OggVorbis_File *vf){
+  if(vf){
+    vorbis_block_clear(&vf->vb);
+    vorbis_dsp_clear(&vf->vd);
+    ogg_stream_clear(&vf->os);
+    
+    if(vf->vi && vf->links){
+      int i;
+      for(i=0;i<vf->links;i++){
+	vorbis_info_clear(vf->vi+i);
+	vorbis_comment_clear(vf->vc+i);
+      }
+      _ogg_free(vf->vi);
+      _ogg_free(vf->vc);
+    }
+    if(vf->dataoffsets)_ogg_free(vf->dataoffsets);
+    if(vf->pcmlengths)_ogg_free(vf->pcmlengths);
+    if(vf->serialnos)_ogg_free(vf->serialnos);
+    if(vf->offsets)_ogg_free(vf->offsets);
+    ogg_sync_clear(&vf->oy);
+    if(vf->datasource)(vf->callbacks.close_func)(vf->datasource);
+    memset(vf,0,sizeof(*vf));
+  }
+#ifdef DEBUG_LEAKS
+  _VDBG_dump();
+#endif
+  return(0);
+}
+
+/* inspects the OggVorbis file and finds/documents all the logical
+   bitstreams contained in it.  Tries to be tolerant of logical
+   bitstream sections that are truncated/woogie. 
+
+   return: -1) error
+            0) OK
+*/
+
+int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
+    ov_callbacks callbacks){
+  int ret=_ov_open1(f,vf,initial,ibytes,callbacks);
+  if(ret)return ret;
+  return _ov_open2(vf);
+}
+
+int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+  ov_callbacks callbacks = {
+    (size_t (*)(void *, size_t, size_t, void *))  fread,
+    (int (*)(void *, ogg_int64_t, int))              _fseek64_wrap,
+    (int (*)(void *))                             fclose,
+    (long (*)(void *))                            ftell
+  };
+
+  return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks);
+}
+  
+/* Only partially open the vorbis file; test for Vorbisness, and load
+   the headers for the first chain.  Do not seek (although test for
+   seekability).  Use ov_test_open to finish opening the file, else
+   ov_clear to close/free it. Same return codes as open. */
+
+int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
+    ov_callbacks callbacks)
+{
+  return _ov_open1(f,vf,initial,ibytes,callbacks);
+}
+
+int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+  ov_callbacks callbacks = {
+    (size_t (*)(void *, size_t, size_t, void *))  fread,
+    (int (*)(void *, ogg_int64_t, int))              _fseek64_wrap,
+    (int (*)(void *))                             fclose,
+    (long (*)(void *))                            ftell
+  };
+
+  return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks);
+}
+  
+int ov_test_open(OggVorbis_File *vf){
+  if(vf->ready_state!=PARTOPEN)return(OV_EINVAL);
+  return _ov_open2(vf);
+}
+
+/* How many logical bitstreams in this physical bitstream? */
+long ov_streams(OggVorbis_File *vf){
+  return vf->links;
+}
+
+/* Is the FILE * associated with vf seekable? */
+long ov_seekable(OggVorbis_File *vf){
+  return vf->seekable;
+}
+
+/* returns the bitrate for a given logical bitstream or the entire
+   physical bitstream.  If the file is open for random access, it will
+   find the *actual* average bitrate.  If the file is streaming, it
+   returns the nominal bitrate (if set) else the average of the
+   upper/lower bounds (if set) else -1 (unset).
+
+   If you want the actual bitrate field settings, get them from the
+   vorbis_info structs */
+
+long ov_bitrate(OggVorbis_File *vf,int i){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(i>=vf->links)return(OV_EINVAL);
+  if(!vf->seekable && i!=0)return(ov_bitrate(vf,0));
+  if(i<0){
+    ogg_int64_t bits=0;
+    int i;
+    for(i=0;i<vf->links;i++)
+      bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8;
+    return(rint(bits/ov_time_total(vf,-1)));
+  }else{
+    if(vf->seekable){
+      /* return the actual bitrate */
+      return(rint((vf->offsets[i+1]-vf->dataoffsets[i])*8/ov_time_total(vf,i)));
+    }else{
+      /* return nominal if set */
+      if(vf->vi[i].bitrate_nominal>0){
+	return vf->vi[i].bitrate_nominal;
+      }else{
+	if(vf->vi[i].bitrate_upper>0){
+	  if(vf->vi[i].bitrate_lower>0){
+	    return (vf->vi[i].bitrate_upper+vf->vi[i].bitrate_lower)/2;
+	  }else{
+	    return vf->vi[i].bitrate_upper;
+	  }
+	}
+	return(OV_FALSE);
+      }
+    }
+  }
+}
+
+/* returns the actual bitrate since last call.  returns -1 if no
+   additional data to offer since last call (or at beginning of stream),
+   EINVAL if stream is only partially open 
+*/
+long ov_bitrate_instant(OggVorbis_File *vf){
+  int link=(vf->seekable?vf->current_link:0);
+  long ret;
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(vf->samptrack==0)return(OV_FALSE);
+  ret=vf->bittrack/vf->samptrack*vf->vi[link].rate+.5;
+  vf->bittrack=0.f;
+  vf->samptrack=0.f;
+  return(ret);
+}
+
+/* Guess */
+long ov_serialnumber(OggVorbis_File *vf,int i){
+  if(i>=vf->links)return(ov_serialnumber(vf,vf->links-1));
+  if(!vf->seekable && i>=0)return(ov_serialnumber(vf,-1));
+  if(i<0){
+    return(vf->current_serialno);
+  }else{
+    return(vf->serialnos[i]);
+  }
+}
+
+/* returns: total raw (compressed) length of content if i==-1
+            raw (compressed) length of that logical bitstream for i==0 to n
+	    OV_EINVAL if the stream is not seekable (we can't know the length)
+	    or if stream is only partially open
+*/
+ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable || i>=vf->links)return(OV_EINVAL);
+  if(i<0){
+    ogg_int64_t acc=0;
+    int i;
+    for(i=0;i<vf->links;i++)
+      acc+=ov_raw_total(vf,i);
+    return(acc);
+  }else{
+    return(vf->offsets[i+1]-vf->offsets[i]);
+  }
+}
+
+/* returns: total PCM length (samples) of content if i==-1 PCM length
+	    (samples) of that logical bitstream for i==0 to n
+	    OV_EINVAL if the stream is not seekable (we can't know the
+	    length) or only partially open 
+*/
+ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable || i>=vf->links)return(OV_EINVAL);
+  if(i<0){
+    ogg_int64_t acc=0;
+    int i;
+    for(i=0;i<vf->links;i++)
+      acc+=ov_pcm_total(vf,i);
+    return(acc);
+  }else{
+    return(vf->pcmlengths[i*2+1]);
+  }
+}
+
+/* returns: total seconds of content if i==-1
+            seconds in that logical bitstream for i==0 to n
+	    OV_EINVAL if the stream is not seekable (we can't know the
+	    length) or only partially open 
+*/
+double ov_time_total(OggVorbis_File *vf,int i){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable || i>=vf->links)return(OV_EINVAL);
+  if(i<0){
+    double acc=0;
+    int i;
+    for(i=0;i<vf->links;i++)
+      acc+=ov_time_total(vf,i);
+    return(acc);
+  }else{
+    return((double)(vf->pcmlengths[i*2+1])/vf->vi[i].rate);
+  }
+}
+
+/* seek to an offset relative to the *compressed* data. This also
+   scans packets to update the PCM cursor. It will cross a logical
+   bitstream boundary, but only if it can't get any packets out of the
+   tail of the bitstream we seek to (so no surprises).
+
+   returns zero on success, nonzero on failure */
+
+int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){
+  ogg_stream_state work_os;
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable)
+    return(OV_ENOSEEK); /* don't dump machine if we can't seek */
+
+  if(pos<0 || pos>vf->end)return(OV_EINVAL);
+
+  /* clear out decoding machine state */
+  vf->pcm_offset=-1;
+  _decode_clear(vf);
+  
+  _seek_helper(vf,pos);
+
+  /* we need to make sure the pcm_offset is set, but we don't want to
+     advance the raw cursor past good packets just to get to the first
+     with a granulepos.  That's not equivalent behavior to beginning
+     decoding as immediately after the seek position as possible.
+
+     So, a hack.  We use two stream states; a local scratch state and
+     a the shared vf->os stream state.  We use the local state to
+     scan, and the shared state as a buffer for later decode. 
+
+     Unfortuantely, on the last page we still advance to last packet
+     because the granulepos on the last page is not necessarily on a
+     packet boundary, and we need to make sure the granpos is
+     correct. 
+  */
+
+  {
+    ogg_page og;
+    ogg_packet op;
+    int lastblock=0;
+    int accblock=0;
+    int thisblock;
+    int eosflag;
+
+    ogg_stream_init(&work_os,-1); /* get the memory ready */
+
+    while(1){
+      if(vf->ready_state==STREAMSET){
+	/* snarf/scan a packet if we can */
+	int result=ogg_stream_packetout(&work_os,&op);
+      
+	if(result>0){
+
+	  if(vf->vi[vf->current_link].codec_setup)
+	    thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op);
+	  if(eosflag)
+	    ogg_stream_packetout(&vf->os,NULL);
+	  else
+	    if(lastblock)accblock+=(lastblock+thisblock)>>2;
+
+	  if(op.granulepos!=-1){
+	    int i,link=vf->current_link;
+	    ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2];
+	    if(granulepos<0)granulepos=0;
+	    
+	    for(i=0;i<link;i++)
+	      granulepos+=vf->pcmlengths[i*2+1];
+	    vf->pcm_offset=granulepos-accblock;
+	    break;
+	  }
+	  lastblock=thisblock;
+	  continue;
+	}
+      }
+      
+      if(!lastblock){
+	if(_get_next_page(vf,&og,-1)<0){
+	  vf->pcm_offset=ov_pcm_total(vf,-1);
+	  break;
+	}
+      }else{
+	/* huh?  Bogus stream with packets but no granulepos */
+	vf->pcm_offset=-1;
+	break;
+      }
+      
+      /* has our decoding just traversed a bitstream boundary? */
+      if(vf->ready_state==STREAMSET)
+	if(vf->current_serialno!=ogg_page_serialno(&og)){
+	_decode_clear(vf); /* clear out stream state */
+	ogg_stream_clear(&work_os);
+      }
+
+      if(vf->ready_state<STREAMSET){
+	int link;
+	
+	vf->current_serialno=ogg_page_serialno(&og);
+	for(link=0;link<vf->links;link++)
+	  if(vf->serialnos[link]==vf->current_serialno)break;
+	if(link==vf->links)goto seek_error; /* sign of a bogus stream.
+					       error out, leave
+					       machine uninitialized */
+	vf->current_link=link;
+	
+	ogg_stream_reset_serialno(&vf->os,vf->current_serialno);
+	ogg_stream_reset_serialno(&work_os,vf->current_serialno); 
+	vf->ready_state=STREAMSET;
+	
+      }
+    
+      ogg_stream_pagein(&vf->os,&og);
+      ogg_stream_pagein(&work_os,&og);
+      eosflag=ogg_page_eos(&og);
+    }
+  }
+
+  ogg_stream_clear(&work_os);
+  return(0);
+
+ seek_error:
+  /* dump the machine so we're in a known state */
+  vf->pcm_offset=-1;
+  ogg_stream_clear(&work_os);
+  _decode_clear(vf);
+  return OV_EBADLINK;
+}
+
+/* Page granularity seek (faster than sample granularity because we
+   don't do the last bit of decode to find a specific sample).
+
+   Seek to the last [granule marked] page preceeding the specified pos
+   location, such that decoding past the returned point will quickly
+   arrive at the requested position. */
+int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){
+  int link=-1;
+  ogg_int64_t result=0;
+  ogg_int64_t total=ov_pcm_total(vf,-1);
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable)return(OV_ENOSEEK);
+
+  if(pos<0 || pos>total)return(OV_EINVAL);
+ 
+  /* which bitstream section does this pcm offset occur in? */
+  for(link=vf->links-1;link>=0;link--){
+    total-=vf->pcmlengths[link*2+1];
+    if(pos>=total)break;
+  }
+
+  /* search within the logical bitstream for the page with the highest
+     pcm_pos preceeding (or equal to) pos.  There is a danger here;
+     missing pages or incorrect frame number information in the
+     bitstream could make our task impossible.  Account for that (it
+     would be an error condition) */
+
+  /* new search algorithm by HB (Nicholas Vinen) */
+  {
+    ogg_int64_t end=vf->offsets[link+1];
+    ogg_int64_t begin=vf->offsets[link];
+    ogg_int64_t begintime = vf->pcmlengths[link*2];
+    ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime;
+    ogg_int64_t target=pos-total+begintime;
+    ogg_int64_t best=begin;
+    
+    ogg_page og;
+    while(begin<end){
+      ogg_int64_t bisect;
+      
+      if(end-begin<CHUNKSIZE){
+	bisect=begin;
+      }else{
+	/* take a (pretty decent) guess. */
+	bisect=begin + 
+	  (target-begintime)*(end-begin)/(endtime-begintime) - CHUNKSIZE;
+	if(bisect<=begin)
+	  bisect=begin+1;
+      }
+      
+      _seek_helper(vf,bisect);
+    
+      while(begin<end){
+	result=_get_next_page(vf,&og,end-vf->offset);
+	if(result==OV_EREAD) goto seek_error;
+	if(result<0){
+	  if(bisect<=begin+1)
+	    end=begin; /* found it */
+	  else{
+	    if(bisect==0) goto seek_error;
+	    bisect-=CHUNKSIZE;
+	    if(bisect<=begin)bisect=begin+1;
+	    _seek_helper(vf,bisect);
+	  }
+	}else{
+	  ogg_int64_t granulepos=ogg_page_granulepos(&og);
+	  if(granulepos==-1)continue;
+	  if(granulepos<target){
+	    best=result;  /* raw offset of packet with granulepos */ 
+	    begin=vf->offset; /* raw offset of next page */
+	    begintime=granulepos;
+	    
+	    if(target-begintime>44100)break;
+	    bisect=begin; /* *not* begin + 1 */
+	  }else{
+	    if(bisect<=begin+1)
+	      end=begin;  /* found it */
+	    else{
+	      if(end==vf->offset){ /* we're pretty close - we'd be stuck in */
+		end=result;
+		bisect-=CHUNKSIZE; /* an endless loop otherwise. */
+		if(bisect<=begin)bisect=begin+1;
+		_seek_helper(vf,bisect);
+	      }else{
+		end=result;
+		endtime=granulepos;
+		break;
+	      }
+	    }
+	  }
+	}
+      }
+    }
+
+    /* found our page. seek to it, update pcm offset. Easier case than
+       raw_seek, don't keep packets preceeding granulepos. */
+    {
+      ogg_page og;
+      ogg_packet op;
+      /* clear out decoding machine state */
+      _decode_clear(vf);  
+      /* seek */
+      _seek_helper(vf,best);
+      
+      if(_get_next_page(vf,&og,-1)<0)return(OV_EOF); /* shouldn't happen */
+      vf->current_serialno=ogg_page_serialno(&og);
+      vf->current_link=link;
+      
+      ogg_stream_reset_serialno(&vf->os,vf->current_serialno);
+      vf->ready_state=STREAMSET;
+      ogg_stream_pagein(&vf->os,&og);
+
+      /* pull out all but last packet; the one with granulepos */
+      while(1){
+	result=ogg_stream_packetpeek(&vf->os,&op);
+	if(result==0){
+	  /* !!! the packet finishing this page originated on a
+             preceeding page. Keep fetching previous pages until we
+             get one with a granulepos or without the 'continued' flag
+             set.  Then just use raw_seek for simplicity. */
+
+	  _decode_clear(vf);  
+	  _seek_helper(vf,best);
+
+	  while(1){
+	    result=_get_prev_page(vf,&og);
+	    if(result<0) goto seek_error;
+	    if(ogg_page_granulepos(&og)>-1 ||
+	       !ogg_page_continued(&og)){
+	      return ov_raw_seek(vf,result);
+	    }
+	    vf->offset=result;
+	  }
+	}
+	if(result<0){
+      result = OV_EBADPACKET; 
+      goto seek_error;
+    }
+	if(op.granulepos!=-1){
+	  vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2];
+	  if(vf->pcm_offset<0)vf->pcm_offset=0;
+	  vf->pcm_offset+=total;
+	  break;
+	}else
+	  result=ogg_stream_packetout(&vf->os,NULL);
+      }
+    }
+  }
+  
+  /* verify result */
+  if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){
+    result=OV_EFAULT;
+    goto seek_error;
+  }
+  return(0);
+  
+ seek_error:
+  /* dump machine so we're in a known state */
+  vf->pcm_offset=-1;
+  _decode_clear(vf);
+  return (int)result;
+}
+
+/* seek to a sample offset relative to the decompressed pcm stream 
+   returns zero on success, nonzero on failure */
+
+int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){
+  int thisblock,lastblock=0;
+  int ret=ov_pcm_seek_page(vf,pos);
+  if(ret<0)return(ret);
+  _make_decode_ready(vf);
+
+  /* discard leading packets we don't need for the lapping of the
+     position we want; don't decode them */
+
+  while(1){
+    ogg_packet op;
+    ogg_page og;
+
+    int ret=ogg_stream_packetpeek(&vf->os,&op);
+    if(ret>0){
+      thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op);
+      if(thisblock<0)thisblock=0; /* non audio packet */
+      if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2;
+      
+      if(vf->pcm_offset+((thisblock+
+			  vorbis_info_blocksize(vf->vi,1))>>2)>=pos)break;
+      
+      /* remove the packet from packet queue and track its granulepos */
+      ogg_stream_packetout(&vf->os,NULL);
+      vorbis_synthesis_trackonly(&vf->vb,&op);  /* set up a vb with
+                                                   only tracking, no
+                                                   pcm_decode */
+      vorbis_synthesis_blockin(&vf->vd,&vf->vb); 
+      
+      /* end of logical stream case is hard, especially with exact
+	 length positioning. */
+      
+      if(op.granulepos>-1){
+	int i;
+	/* always believe the stream markers */
+	vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2];
+	if(vf->pcm_offset<0)vf->pcm_offset=0;
+	for(i=0;i<vf->current_link;i++)
+	  vf->pcm_offset+=vf->pcmlengths[i*2+1];
+      }
+	
+      lastblock=thisblock;
+      
+    }else{
+      if(ret<0 && ret!=OV_HOLE)break;
+      
+      /* suck in a new page */
+      if(_get_next_page(vf,&og,-1)<0)break;
+      if(vf->current_serialno!=ogg_page_serialno(&og))_decode_clear(vf);
+      
+      if(vf->ready_state<STREAMSET){
+	int link;
+	
+	vf->current_serialno=ogg_page_serialno(&og);
+	for(link=0;link<vf->links;link++)
+	  if(vf->serialnos[link]==vf->current_serialno)break;
+	if(link==vf->links)return(OV_EBADLINK);
+	vf->current_link=link;
+	
+	ogg_stream_reset_serialno(&vf->os,vf->current_serialno); 
+	vf->ready_state=STREAMSET;      
+	_make_decode_ready(vf);
+	lastblock=0;
+      }
+
+      ogg_stream_pagein(&vf->os,&og);
+    }
+  }
+
+  /* discard samples until we reach the desired position. Crossing a
+     logical bitstream boundary with abandon is OK. */
+  while(vf->pcm_offset<pos){
+    float **pcm;
+    ogg_int64_t target=pos-vf->pcm_offset;
+    long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
+
+    if(samples>target)samples=target;
+    vorbis_synthesis_read(&vf->vd,samples);
+    vf->pcm_offset+=samples;
+    
+    if(samples<target)
+      if(_fetch_and_process_packet(vf,NULL,1)<=0)
+	vf->pcm_offset=ov_pcm_total(vf,-1); /* eof */
+  }
+  return 0;
+}
+
+/* seek to a playback time relative to the decompressed pcm stream 
+   returns zero on success, nonzero on failure */
+int ov_time_seek(OggVorbis_File *vf,double seconds){
+  /* translate time to PCM position and call ov_pcm_seek */
+
+  int link=-1;
+  ogg_int64_t pcm_total=ov_pcm_total(vf,-1);
+  double time_total=ov_time_total(vf,-1);
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable)return(OV_ENOSEEK);
+  if(seconds<0 || seconds>time_total)return(OV_EINVAL);
+  
+  /* which bitstream section does this time offset occur in? */
+  for(link=vf->links-1;link>=0;link--){
+    pcm_total-=vf->pcmlengths[link*2+1];
+    time_total-=ov_time_total(vf,link);
+    if(seconds>=time_total)break;
+  }
+
+  /* enough information to convert time offset to pcm offset */
+  {
+    ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate;
+    return(ov_pcm_seek(vf,target));
+  }
+}
+
+/* page-granularity version of ov_time_seek 
+   returns zero on success, nonzero on failure */
+int ov_time_seek_page(OggVorbis_File *vf,double seconds){
+  /* translate time to PCM position and call ov_pcm_seek */
+
+  int link=-1;
+  ogg_int64_t pcm_total=ov_pcm_total(vf,-1);
+  double time_total=ov_time_total(vf,-1);
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(!vf->seekable)return(OV_ENOSEEK);
+  if(seconds<0 || seconds>time_total)return(OV_EINVAL);
+  
+  /* which bitstream section does this time offset occur in? */
+  for(link=vf->links-1;link>=0;link--){
+    pcm_total-=vf->pcmlengths[link*2+1];
+    time_total-=ov_time_total(vf,link);
+    if(seconds>=time_total)break;
+  }
+
+  /* enough information to convert time offset to pcm offset */
+  {
+    ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate;
+    return(ov_pcm_seek_page(vf,target));
+  }
+}
+
+/* tell the current stream offset cursor.  Note that seek followed by
+   tell will likely not give the set offset due to caching */
+ogg_int64_t ov_raw_tell(OggVorbis_File *vf){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  return(vf->offset);
+}
+
+/* return PCM offset (sample) of next PCM sample to be read */
+ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  return(vf->pcm_offset);
+}
+
+/* return time offset (seconds) of next PCM sample to be read */
+double ov_time_tell(OggVorbis_File *vf){
+  /* translate time to PCM position and call ov_pcm_seek */
+
+  int link=-1;
+  ogg_int64_t pcm_total=0;
+  double time_total=0.f;
+  
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+  if(vf->seekable){
+    pcm_total=ov_pcm_total(vf,-1);
+    time_total=ov_time_total(vf,-1);
+  
+    /* which bitstream section does this time offset occur in? */
+    for(link=vf->links-1;link>=0;link--){
+      pcm_total-=vf->pcmlengths[link*2+1];
+      time_total-=ov_time_total(vf,link);
+      if(vf->pcm_offset>=pcm_total)break;
+    }
+  }
+
+  return((double)time_total+(double)(vf->pcm_offset-pcm_total)/vf->vi[link].rate);
+}
+
+/*  link:   -1) return the vorbis_info struct for the bitstream section
+                currently being decoded
+           0-n) to request information for a specific bitstream section
+    
+    In the case of a non-seekable bitstream, any call returns the
+    current bitstream.  NULL in the case that the machine is not
+    initialized */
+
+vorbis_info *ov_info(OggVorbis_File *vf,int link){
+  if(vf->seekable){
+    if(link<0)
+      if(vf->ready_state>=STREAMSET)
+	return vf->vi+vf->current_link;
+      else
+      return vf->vi;
+    else
+      if(link>=vf->links)
+	return NULL;
+      else
+	return vf->vi+link;
+  }else{
+    return vf->vi;
+  }
+}
+
+/* grr, strong typing, grr, no templates/inheritence, grr */
+vorbis_comment *ov_comment(OggVorbis_File *vf,int link){
+  if(vf->seekable){
+    if(link<0)
+      if(vf->ready_state>=STREAMSET)
+	return vf->vc+vf->current_link;
+      else
+	return vf->vc;
+    else
+      if(link>=vf->links)
+	return NULL;
+      else
+	return vf->vc+link;
+  }else{
+    return vf->vc;
+  }
+}
+
+static int host_is_big_endian(void) {
+  ogg_int32_t pattern = 0xfeedface; /* deadbeef */
+  unsigned char *bytewise = (unsigned char *)&pattern;
+  if (bytewise[0] == 0xfe) return 1;
+  return 0;
+}
+
+/* up to this point, everything could more or less hide the multiple
+   logical bitstream nature of chaining from the toplevel application
+   if the toplevel application didn't particularly care.  However, at
+   the point that we actually read audio back, the multiple-section
+   nature must surface: Multiple bitstream sections do not necessarily
+   have to have the same number of channels or sampling rate.
+
+   ov_read returns the sequential logical bitstream number currently
+   being decoded along with the PCM data in order that the toplevel
+   application can take action on channel/sample rate changes.  This
+   number will be incremented even for streamed (non-seekable) streams
+   (for seekable streams, it represents the actual logical bitstream
+   index within the physical bitstream.  Note that the accessor
+   functions above are aware of this dichotomy).
+
+   input values: buffer) a buffer to hold packed PCM data for return
+		 length) the byte length requested to be placed into buffer
+		 bigendianp) should the data be packed LSB first (0) or
+		             MSB first (1)
+		 word) word size for output.  currently 1 (byte) or 
+		       2 (16 bit short)
+
+   return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL)
+                   0) EOF
+		   n) number of bytes of PCM actually returned.  The
+		   below works on a packet-by-packet basis, so the
+		   return length is not related to the 'length' passed
+		   in, just guaranteed to fit.
+
+	    *section) set to the logical bitstream number */
+
+long ov_read(OggVorbis_File *vf,char *buffer,int length,
+		    int bigendianp,int word,int sgned,int *bitstream){
+  int i,j;
+  int host_endian = host_is_big_endian();
+
+  float **pcm;
+  long samples;
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+
+  while(1){
+    if(vf->ready_state>=STREAMSET){
+      samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
+      if(samples)break;
+    }
+
+    /* suck in another packet */
+    {
+      int ret=_fetch_and_process_packet(vf,NULL,1);
+      if(ret==OV_EOF)return(0);
+      if(ret<=0)return(ret);
+    }
+
+  }
+
+  if(samples>0){
+  
+    /* yay! proceed to pack data into the byte buffer */
+    
+    long channels=ov_info(vf,-1)->channels;
+    long bytespersample=word * channels;
+    vorbis_fpu_control fpu;
+    if(samples>length/bytespersample)samples=length/bytespersample;
+
+    if(samples <= 0)
+      return OV_EINVAL;
+    
+    /* a tight loop to pack each size */
+    {
+      int val;
+      if(word==1){
+	int off=(sgned?0:128);
+	vorbis_fpu_setround(&fpu);
+	for(j=0;j<samples;j++)
+	  for(i=0;i<channels;i++){
+	    val=vorbis_ftoi(pcm[i][j]*128.f);
+	    if(val>127)val=127;
+	    else if(val<-128)val=-128;
+	    *buffer++=val+off;
+	  }
+	vorbis_fpu_restore(fpu);
+      }else{
+	int off=(sgned?0:32768);
+	
+	if(host_endian==bigendianp){
+	  if(sgned){
+	    
+	    vorbis_fpu_setround(&fpu);
+	    for(i=0;i<channels;i++) { /* It's faster in this order */
+	      float *src=pcm[i];
+	      short *dest=((short *)buffer)+i;
+	      for(j=0;j<samples;j++) {
+		val=vorbis_ftoi(src[j]*32768.f);
+		if(val>32767)val=32767;
+		else if(val<-32768)val=-32768;
+		*dest=val;
+		dest+=channels;
+	      }
+	    }
+	    vorbis_fpu_restore(fpu);
+	    
+	  }else{
+	    
+	    vorbis_fpu_setround(&fpu);
+	    for(i=0;i<channels;i++) {
+	      float *src=pcm[i];
+	      short *dest=((short *)buffer)+i;
+	      for(j=0;j<samples;j++) {
+		val=vorbis_ftoi(src[j]*32768.f);
+		if(val>32767)val=32767;
+		else if(val<-32768)val=-32768;
+		*dest=val+off;
+		dest+=channels;
+	      }
+	    }
+	    vorbis_fpu_restore(fpu);
+	    
+	  }
+	}else if(bigendianp){
+	  
+	  vorbis_fpu_setround(&fpu);
+	  for(j=0;j<samples;j++)
+	    for(i=0;i<channels;i++){
+	      val=vorbis_ftoi(pcm[i][j]*32768.f);
+	      if(val>32767)val=32767;
+	      else if(val<-32768)val=-32768;
+	      val+=off;
+	      *buffer++=(val>>8);
+	      *buffer++=(val&0xff);
+	    }
+	  vorbis_fpu_restore(fpu);
+	  
+	}else{
+	  int val;
+	  vorbis_fpu_setround(&fpu);
+	  for(j=0;j<samples;j++)
+	    for(i=0;i<channels;i++){
+	      val=vorbis_ftoi(pcm[i][j]*32768.f);
+	      if(val>32767)val=32767;
+	      else if(val<-32768)val=-32768;
+	      val+=off;
+	      *buffer++=(val&0xff);
+	      *buffer++=(val>>8);
+	  	}
+	  vorbis_fpu_restore(fpu);  
+	  
+	}
+      }
+    }
+    
+    vorbis_synthesis_read(&vf->vd,samples);
+    vf->pcm_offset+=samples;
+    if(bitstream)*bitstream=vf->current_link;
+    return(samples*bytespersample);
+  }else{
+    return(samples);
+  }
+}
+
+/* input values: pcm_channels) a float vector per channel of output
+		 length) the sample length being read by the app
+
+   return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL)
+                   0) EOF
+		   n) number of samples of PCM actually returned.  The
+		   below works on a packet-by-packet basis, so the
+		   return length is not related to the 'length' passed
+		   in, just guaranteed to fit.
+
+	    *section) set to the logical bitstream number */
+
+
+
+long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int length,
+		   int *bitstream){
+
+  if(vf->ready_state<OPENED)return(OV_EINVAL);
+
+  while(1){
+    if(vf->ready_state>=STREAMSET){
+      float **pcm;
+      long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
+      if(samples){
+	if(pcm_channels)*pcm_channels=pcm;
+	if(samples>length)samples=length;
+	vorbis_synthesis_read(&vf->vd,samples);
+	vf->pcm_offset+=samples;
+	if(bitstream)*bitstream=vf->current_link;
+	return samples;
+
+      }
+    }
+
+    /* suck in another packet */
+    {
+      int ret=_fetch_and_process_packet(vf,NULL,1);
+      if(ret==OV_EOF)return(0);
+      if(ret<=0)return(ret);
+    }
+
+  }
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/window.c
@@ -1,0 +1,79 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: window functions
+ last mod: $Id: window.c,v 1.17 2002/03/23 03:17:34 xiphmont Exp $
+
+ ********************************************************************/
+
+#include <stdlib.h>
+#include <math.h>
+#include "os.h"
+#include "misc.h"
+
+float *_vorbis_window(int type, int left){
+  float *ret=_ogg_calloc(left,sizeof(*ret));
+  int i;
+
+  switch(type){
+  case 0:
+    /* The 'vorbis window' (window 0) is sin(sin(x)*sin(x)*2pi) */
+    {
+    
+      for(i=0;i<left;i++){
+	float x=(i+.5f)/left*M_PI/2.;
+	x=sin(x);
+	x*=x;
+	x*=M_PI/2.f;
+	x=sin(x);
+	ret[i]=x;
+      }
+    }
+    break;
+  default:
+    _ogg_free(ret);
+    return(NULL);
+  }
+  return(ret);
+}
+
+void _vorbis_apply_window(float *d,float *window[2],long *blocksizes,
+			  int lW,int W,int nW){
+  lW=(W?lW:0);
+  nW=(W?nW:0);
+
+  {
+    long n=blocksizes[W];
+    long ln=blocksizes[lW];
+    long rn=blocksizes[nW];
+    
+    long leftbegin=n/4-ln/4;
+    long leftend=leftbegin+ln/2;
+    
+    long rightbegin=n/2+n/4-rn/4;
+    long rightend=rightbegin+rn/2;
+    
+    int i,p;
+    
+    for(i=0;i<leftbegin;i++)
+      d[i]=0.f;
+    
+    for(p=0;i<leftend;i++,p++)
+      d[i]*=window[lW][p];
+    
+    for(i=rightbegin,p=rn/2-1;i<rightend;i++,p--)
+      d[i]*=window[nW][p];
+    
+    for(;i<n;i++)
+      d[i]=0.f;
+  }
+}
--- /dev/null
+++ b/sys/src/cmd/audio/libvorbis/window.h
@@ -1,0 +1,26 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: window functions
+ last mod: $Id: window.h,v 1.10 2002/01/22 11:59:00 xiphmont Exp $
+
+ ********************************************************************/
+
+#ifndef _V_WINDOW_
+#define _V_WINDOW_
+
+extern float *_vorbis_window(int type,int left);
+extern void _vorbis_apply_window(float *d,float *window[2],long *blocksizes,
+				 int lW,int W,int nW);
+
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mkfile
@@ -1,0 +1,62 @@
+</$objtype/mkfile
+
+LIBS=libogg libvorbis
+PROGS=oggdec oggenc mp3dec mp3enc 
+#libs must be made first
+DIRS=$LIBS $PROGS
+
+UPDATE=\
+	mkfile\
+
+all:V:
+	for (i in $DIRS) @{
+		cd $i
+		mk all
+	}
+
+clean:V:
+	for (i in $DIRS) @{
+		cd $i
+		mk clean
+	}
+
+nuke:V:
+	for (i in $LIBS) @{
+		cd $i
+		mk nuke
+	}
+	for (i in $PROGS) @{
+		cd $i
+		mk clean
+	}
+
+install:V:
+	mkdir -p $BIN
+	for (i in $DIRS) @{
+		cd $i
+		mk install
+	}
+
+installall:V:
+	for (i in $DIRS) @{
+		cd $i
+		mk installall
+	}
+	for (i in $DIRS) @{
+		cd $i
+		mk clean
+	}
+
+safeinstallall:V:
+	for (i in $LIBS) @{
+		cd $i
+		mk installall
+	}
+	for (i in $PROGS) @{
+		cd $i
+		mk safeinstallall
+	}
+	for (i in $DIRS) @{
+		cd $i
+		mk clean
+	}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/COPYING
@@ -1,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/COPYRIGHT
@@ -1,0 +1,21 @@
+
+ libmad - MPEG audio decoder library
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ If you would like to negotiate alternate licensing terms, you may do
+ so by contacting: Underbit Technologies, Inc. <[email protected]>
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/D.dat
@@ -1,0 +1,607 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: D.dat,v 1.9 2004/01/23 09:41:32 rob Exp $
+ */
+
+/*
+ * These are the coefficients for the subband synthesis window. This is a
+ * reordered version of Table B.3 from ISO/IEC 11172-3.
+ *
+ * Every value is parameterized so that shift optimizations can be made at
+ * compile-time. For example, every value can be right-shifted 12 bits to
+ * minimize multiply instruction times without any loss of accuracy.
+ */
+
+  {  PRESHIFT(0x00000000) /*  0.000000000 */,	/*  0 */
+    -PRESHIFT(0x0001d000) /* -0.000442505 */,
+     PRESHIFT(0x000d5000) /*  0.003250122 */,
+    -PRESHIFT(0x001cb000) /* -0.007003784 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+    -PRESHIFT(0x01421000) /* -0.078628540 */,
+     PRESHIFT(0x019ae000) /*  0.100311279 */,
+    -PRESHIFT(0x09271000) /* -0.572036743 */,
+     PRESHIFT(0x1251e000) /*  1.144989014 */,
+     PRESHIFT(0x09271000) /*  0.572036743 */,
+     PRESHIFT(0x019ae000) /*  0.100311279 */,
+     PRESHIFT(0x01421000) /*  0.078628540 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+     PRESHIFT(0x001cb000) /*  0.007003784 */,
+     PRESHIFT(0x000d5000) /*  0.003250122 */,
+     PRESHIFT(0x0001d000) /*  0.000442505 */,
+
+     PRESHIFT(0x00000000) /*  0.000000000 */,
+    -PRESHIFT(0x0001d000) /* -0.000442505 */,
+     PRESHIFT(0x000d5000) /*  0.003250122 */,
+    -PRESHIFT(0x001cb000) /* -0.007003784 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+    -PRESHIFT(0x01421000) /* -0.078628540 */,
+     PRESHIFT(0x019ae000) /*  0.100311279 */,
+    -PRESHIFT(0x09271000) /* -0.572036743 */,
+     PRESHIFT(0x1251e000) /*  1.144989014 */,
+     PRESHIFT(0x09271000) /*  0.572036743 */,
+     PRESHIFT(0x019ae000) /*  0.100311279 */,
+     PRESHIFT(0x01421000) /*  0.078628540 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+     PRESHIFT(0x001cb000) /*  0.007003784 */,
+     PRESHIFT(0x000d5000) /*  0.003250122 */,
+     PRESHIFT(0x0001d000) /*  0.000442505 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  1 */
+    -PRESHIFT(0x0001f000) /* -0.000473022 */,
+     PRESHIFT(0x000da000) /*  0.003326416 */,
+    -PRESHIFT(0x00207000) /* -0.007919312 */,
+     PRESHIFT(0x007d0000) /*  0.030517578 */,
+    -PRESHIFT(0x0158d000) /* -0.084182739 */,
+     PRESHIFT(0x01747000) /*  0.090927124 */,
+    -PRESHIFT(0x099a8000) /* -0.600219727 */,
+     PRESHIFT(0x124f0000) /*  1.144287109 */,
+     PRESHIFT(0x08b38000) /*  0.543823242 */,
+     PRESHIFT(0x01bde000) /*  0.108856201 */,
+     PRESHIFT(0x012b4000) /*  0.073059082 */,
+     PRESHIFT(0x0080f000) /*  0.031478882 */,
+     PRESHIFT(0x00191000) /*  0.006118774 */,
+     PRESHIFT(0x000d0000) /*  0.003173828 */,
+     PRESHIFT(0x0001a000) /*  0.000396729 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x0001f000) /* -0.000473022 */,
+     PRESHIFT(0x000da000) /*  0.003326416 */,
+    -PRESHIFT(0x00207000) /* -0.007919312 */,
+     PRESHIFT(0x007d0000) /*  0.030517578 */,
+    -PRESHIFT(0x0158d000) /* -0.084182739 */,
+     PRESHIFT(0x01747000) /*  0.090927124 */,
+    -PRESHIFT(0x099a8000) /* -0.600219727 */,
+     PRESHIFT(0x124f0000) /*  1.144287109 */,
+     PRESHIFT(0x08b38000) /*  0.543823242 */,
+     PRESHIFT(0x01bde000) /*  0.108856201 */,
+     PRESHIFT(0x012b4000) /*  0.073059082 */,
+     PRESHIFT(0x0080f000) /*  0.031478882 */,
+     PRESHIFT(0x00191000) /*  0.006118774 */,
+     PRESHIFT(0x000d0000) /*  0.003173828 */,
+     PRESHIFT(0x0001a000) /*  0.000396729 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  2 */
+    -PRESHIFT(0x00023000) /* -0.000534058 */,
+     PRESHIFT(0x000de000) /*  0.003387451 */,
+    -PRESHIFT(0x00245000) /* -0.008865356 */,
+     PRESHIFT(0x007a0000) /*  0.029785156 */,
+    -PRESHIFT(0x016f7000) /* -0.089706421 */,
+     PRESHIFT(0x014a8000) /*  0.080688477 */,
+    -PRESHIFT(0x0a0d8000) /* -0.628295898 */,
+     PRESHIFT(0x12468000) /*  1.142211914 */,
+     PRESHIFT(0x083ff000) /*  0.515609741 */,
+     PRESHIFT(0x01dd8000) /*  0.116577148 */,
+     PRESHIFT(0x01149000) /*  0.067520142 */,
+     PRESHIFT(0x00820000) /*  0.031738281 */,
+     PRESHIFT(0x0015b000) /*  0.005294800 */,
+     PRESHIFT(0x000ca000) /*  0.003082275 */,
+     PRESHIFT(0x00018000) /*  0.000366211 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x00023000) /* -0.000534058 */,
+     PRESHIFT(0x000de000) /*  0.003387451 */,
+    -PRESHIFT(0x00245000) /* -0.008865356 */,
+     PRESHIFT(0x007a0000) /*  0.029785156 */,
+    -PRESHIFT(0x016f7000) /* -0.089706421 */,
+     PRESHIFT(0x014a8000) /*  0.080688477 */,
+    -PRESHIFT(0x0a0d8000) /* -0.628295898 */,
+     PRESHIFT(0x12468000) /*  1.142211914 */,
+     PRESHIFT(0x083ff000) /*  0.515609741 */,
+     PRESHIFT(0x01dd8000) /*  0.116577148 */,
+     PRESHIFT(0x01149000) /*  0.067520142 */,
+     PRESHIFT(0x00820000) /*  0.031738281 */,
+     PRESHIFT(0x0015b000) /*  0.005294800 */,
+     PRESHIFT(0x000ca000) /*  0.003082275 */,
+     PRESHIFT(0x00018000) /*  0.000366211 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  3 */
+    -PRESHIFT(0x00026000) /* -0.000579834 */,
+     PRESHIFT(0x000e1000) /*  0.003433228 */,
+    -PRESHIFT(0x00285000) /* -0.009841919 */,
+     PRESHIFT(0x00765000) /*  0.028884888 */,
+    -PRESHIFT(0x0185d000) /* -0.095169067 */,
+     PRESHIFT(0x011d1000) /*  0.069595337 */,
+    -PRESHIFT(0x0a7fe000) /* -0.656219482 */,
+     PRESHIFT(0x12386000) /*  1.138763428 */,
+     PRESHIFT(0x07ccb000) /*  0.487472534 */,
+     PRESHIFT(0x01f9c000) /*  0.123474121 */,
+     PRESHIFT(0x00fdf000) /*  0.061996460 */,
+     PRESHIFT(0x00827000) /*  0.031845093 */,
+     PRESHIFT(0x00126000) /*  0.004486084 */,
+     PRESHIFT(0x000c4000) /*  0.002990723 */,
+     PRESHIFT(0x00015000) /*  0.000320435 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x00026000) /* -0.000579834 */,
+     PRESHIFT(0x000e1000) /*  0.003433228 */,
+    -PRESHIFT(0x00285000) /* -0.009841919 */,
+     PRESHIFT(0x00765000) /*  0.028884888 */,
+    -PRESHIFT(0x0185d000) /* -0.095169067 */,
+     PRESHIFT(0x011d1000) /*  0.069595337 */,
+    -PRESHIFT(0x0a7fe000) /* -0.656219482 */,
+     PRESHIFT(0x12386000) /*  1.138763428 */,
+     PRESHIFT(0x07ccb000) /*  0.487472534 */,
+     PRESHIFT(0x01f9c000) /*  0.123474121 */,
+     PRESHIFT(0x00fdf000) /*  0.061996460 */,
+     PRESHIFT(0x00827000) /*  0.031845093 */,
+     PRESHIFT(0x00126000) /*  0.004486084 */,
+     PRESHIFT(0x000c4000) /*  0.002990723 */,
+     PRESHIFT(0x00015000) /*  0.000320435 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  4 */
+    -PRESHIFT(0x00029000) /* -0.000625610 */,
+     PRESHIFT(0x000e3000) /*  0.003463745 */,
+    -PRESHIFT(0x002c7000) /* -0.010848999 */,
+     PRESHIFT(0x0071e000) /*  0.027801514 */,
+    -PRESHIFT(0x019bd000) /* -0.100540161 */,
+     PRESHIFT(0x00ec0000) /*  0.057617187 */,
+    -PRESHIFT(0x0af15000) /* -0.683914185 */,
+     PRESHIFT(0x12249000) /*  1.133926392 */,
+     PRESHIFT(0x075a0000) /*  0.459472656 */,
+     PRESHIFT(0x0212c000) /*  0.129577637 */,
+     PRESHIFT(0x00e79000) /*  0.056533813 */,
+     PRESHIFT(0x00825000) /*  0.031814575 */,
+     PRESHIFT(0x000f4000) /*  0.003723145 */,
+     PRESHIFT(0x000be000) /*  0.002899170 */,
+     PRESHIFT(0x00013000) /*  0.000289917 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x00029000) /* -0.000625610 */,
+     PRESHIFT(0x000e3000) /*  0.003463745 */,
+    -PRESHIFT(0x002c7000) /* -0.010848999 */,
+     PRESHIFT(0x0071e000) /*  0.027801514 */,
+    -PRESHIFT(0x019bd000) /* -0.100540161 */,
+     PRESHIFT(0x00ec0000) /*  0.057617187 */,
+    -PRESHIFT(0x0af15000) /* -0.683914185 */,
+     PRESHIFT(0x12249000) /*  1.133926392 */,
+     PRESHIFT(0x075a0000) /*  0.459472656 */,
+     PRESHIFT(0x0212c000) /*  0.129577637 */,
+     PRESHIFT(0x00e79000) /*  0.056533813 */,
+     PRESHIFT(0x00825000) /*  0.031814575 */,
+     PRESHIFT(0x000f4000) /*  0.003723145 */,
+     PRESHIFT(0x000be000) /*  0.002899170 */,
+     PRESHIFT(0x00013000) /*  0.000289917 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  5 */
+    -PRESHIFT(0x0002d000) /* -0.000686646 */,
+     PRESHIFT(0x000e4000) /*  0.003479004 */,
+    -PRESHIFT(0x0030b000) /* -0.011886597 */,
+     PRESHIFT(0x006cb000) /*  0.026535034 */,
+    -PRESHIFT(0x01b17000) /* -0.105819702 */,
+     PRESHIFT(0x00b77000) /*  0.044784546 */,
+    -PRESHIFT(0x0b619000) /* -0.711318970 */,
+     PRESHIFT(0x120b4000) /*  1.127746582 */,
+     PRESHIFT(0x06e81000) /*  0.431655884 */,
+     PRESHIFT(0x02288000) /*  0.134887695 */,
+     PRESHIFT(0x00d17000) /*  0.051132202 */,
+     PRESHIFT(0x0081b000) /*  0.031661987 */,
+     PRESHIFT(0x000c5000) /*  0.003005981 */,
+     PRESHIFT(0x000b7000) /*  0.002792358 */,
+     PRESHIFT(0x00011000) /*  0.000259399 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x0002d000) /* -0.000686646 */,
+     PRESHIFT(0x000e4000) /*  0.003479004 */,
+    -PRESHIFT(0x0030b000) /* -0.011886597 */,
+     PRESHIFT(0x006cb000) /*  0.026535034 */,
+    -PRESHIFT(0x01b17000) /* -0.105819702 */,
+     PRESHIFT(0x00b77000) /*  0.044784546 */,
+    -PRESHIFT(0x0b619000) /* -0.711318970 */,
+     PRESHIFT(0x120b4000) /*  1.127746582 */,
+     PRESHIFT(0x06e81000) /*  0.431655884 */,
+     PRESHIFT(0x02288000) /*  0.134887695 */,
+     PRESHIFT(0x00d17000) /*  0.051132202 */,
+     PRESHIFT(0x0081b000) /*  0.031661987 */,
+     PRESHIFT(0x000c5000) /*  0.003005981 */,
+     PRESHIFT(0x000b7000) /*  0.002792358 */,
+     PRESHIFT(0x00011000) /*  0.000259399 */ },
+
+  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  6 */
+    -PRESHIFT(0x00031000) /* -0.000747681 */,
+     PRESHIFT(0x000e4000) /*  0.003479004 */,
+    -PRESHIFT(0x00350000) /* -0.012939453 */,
+     PRESHIFT(0x0066c000) /*  0.025085449 */,
+    -PRESHIFT(0x01c67000) /* -0.110946655 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+    -PRESHIFT(0x0bd06000) /* -0.738372803 */,
+     PRESHIFT(0x11ec7000) /*  1.120223999 */,
+     PRESHIFT(0x06772000) /*  0.404083252 */,
+     PRESHIFT(0x023b3000) /*  0.139450073 */,
+     PRESHIFT(0x00bbc000) /*  0.045837402 */,
+     PRESHIFT(0x00809000) /*  0.031387329 */,
+     PRESHIFT(0x00099000) /*  0.002334595 */,
+     PRESHIFT(0x000b0000) /*  0.002685547 */,
+     PRESHIFT(0x00010000) /*  0.000244141 */,
+
+    -PRESHIFT(0x00001000) /* -0.000015259 */,
+    -PRESHIFT(0x00031000) /* -0.000747681 */,
+     PRESHIFT(0x000e4000) /*  0.003479004 */,
+    -PRESHIFT(0x00350000) /* -0.012939453 */,
+     PRESHIFT(0x0066c000) /*  0.025085449 */,
+    -PRESHIFT(0x01c67000) /* -0.110946655 */,
+     PRESHIFT(0x007f5000) /*  0.031082153 */,
+    -PRESHIFT(0x0bd06000) /* -0.738372803 */,
+     PRESHIFT(0x11ec7000) /*  1.120223999 */,
+     PRESHIFT(0x06772000) /*  0.404083252 */,
+     PRESHIFT(0x023b3000) /*  0.139450073 */,
+     PRESHIFT(0x00bbc000) /*  0.045837402 */,
+     PRESHIFT(0x00809000) /*  0.031387329 */,
+     PRESHIFT(0x00099000) /*  0.002334595 */,
+     PRESHIFT(0x000b0000) /*  0.002685547 */,
+     PRESHIFT(0x00010000) /*  0.000244141 */ },
+
+  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  7 */
+    -PRESHIFT(0x00035000) /* -0.000808716 */,
+     PRESHIFT(0x000e3000) /*  0.003463745 */,
+    -PRESHIFT(0x00397000) /* -0.014022827 */,
+     PRESHIFT(0x005ff000) /*  0.023422241 */,
+    -PRESHIFT(0x01dad000) /* -0.115921021 */,
+     PRESHIFT(0x0043a000) /*  0.016510010 */,
+    -PRESHIFT(0x0c3d9000) /* -0.765029907 */,
+     PRESHIFT(0x11c83000) /*  1.111373901 */,
+     PRESHIFT(0x06076000) /*  0.376800537 */,
+     PRESHIFT(0x024ad000) /*  0.143264771 */,
+     PRESHIFT(0x00a67000) /*  0.040634155 */,
+     PRESHIFT(0x007f0000) /*  0.031005859 */,
+     PRESHIFT(0x0006f000) /*  0.001693726 */,
+     PRESHIFT(0x000a9000) /*  0.002578735 */,
+     PRESHIFT(0x0000e000) /*  0.000213623 */,
+
+    -PRESHIFT(0x00002000) /* -0.000030518 */,
+    -PRESHIFT(0x00035000) /* -0.000808716 */,
+     PRESHIFT(0x000e3000) /*  0.003463745 */,
+    -PRESHIFT(0x00397000) /* -0.014022827 */,
+     PRESHIFT(0x005ff000) /*  0.023422241 */,
+    -PRESHIFT(0x01dad000) /* -0.115921021 */,
+     PRESHIFT(0x0043a000) /*  0.016510010 */,
+    -PRESHIFT(0x0c3d9000) /* -0.765029907 */,
+     PRESHIFT(0x11c83000) /*  1.111373901 */,
+     PRESHIFT(0x06076000) /*  0.376800537 */,
+     PRESHIFT(0x024ad000) /*  0.143264771 */,
+     PRESHIFT(0x00a67000) /*  0.040634155 */,
+     PRESHIFT(0x007f0000) /*  0.031005859 */,
+     PRESHIFT(0x0006f000) /*  0.001693726 */,
+     PRESHIFT(0x000a9000) /*  0.002578735 */,
+     PRESHIFT(0x0000e000) /*  0.000213623 */ },
+
+  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  8 */
+    -PRESHIFT(0x0003a000) /* -0.000885010 */,
+     PRESHIFT(0x000e0000) /*  0.003417969 */,
+    -PRESHIFT(0x003df000) /* -0.015121460 */,
+     PRESHIFT(0x00586000) /*  0.021575928 */,
+    -PRESHIFT(0x01ee6000) /* -0.120697021 */,
+     PRESHIFT(0x00046000) /*  0.001068115 */,
+    -PRESHIFT(0x0ca8d000) /* -0.791213989 */,
+     PRESHIFT(0x119e9000) /*  1.101211548 */,
+     PRESHIFT(0x05991000) /*  0.349868774 */,
+     PRESHIFT(0x02578000) /*  0.146362305 */,
+     PRESHIFT(0x0091a000) /*  0.035552979 */,
+     PRESHIFT(0x007d1000) /*  0.030532837 */,
+     PRESHIFT(0x00048000) /*  0.001098633 */,
+     PRESHIFT(0x000a1000) /*  0.002456665 */,
+     PRESHIFT(0x0000d000) /*  0.000198364 */,
+
+    -PRESHIFT(0x00002000) /* -0.000030518 */,
+    -PRESHIFT(0x0003a000) /* -0.000885010 */,
+     PRESHIFT(0x000e0000) /*  0.003417969 */,
+    -PRESHIFT(0x003df000) /* -0.015121460 */,
+     PRESHIFT(0x00586000) /*  0.021575928 */,
+    -PRESHIFT(0x01ee6000) /* -0.120697021 */,
+     PRESHIFT(0x00046000) /*  0.001068115 */,
+    -PRESHIFT(0x0ca8d000) /* -0.791213989 */,
+     PRESHIFT(0x119e9000) /*  1.101211548 */,
+     PRESHIFT(0x05991000) /*  0.349868774 */,
+     PRESHIFT(0x02578000) /*  0.146362305 */,
+     PRESHIFT(0x0091a000) /*  0.035552979 */,
+     PRESHIFT(0x007d1000) /*  0.030532837 */,
+     PRESHIFT(0x00048000) /*  0.001098633 */,
+     PRESHIFT(0x000a1000) /*  0.002456665 */,
+     PRESHIFT(0x0000d000) /*  0.000198364 */ },
+
+  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  9 */
+    -PRESHIFT(0x0003f000) /* -0.000961304 */,
+     PRESHIFT(0x000dd000) /*  0.003372192 */,
+    -PRESHIFT(0x00428000) /* -0.016235352 */,
+     PRESHIFT(0x00500000) /*  0.019531250 */,
+    -PRESHIFT(0x02011000) /* -0.125259399 */,
+    -PRESHIFT(0x003e6000) /* -0.015228271 */,
+    -PRESHIFT(0x0d11e000) /* -0.816864014 */,
+     PRESHIFT(0x116fc000) /*  1.089782715 */,
+     PRESHIFT(0x052c5000) /*  0.323318481 */,
+     PRESHIFT(0x02616000) /*  0.148773193 */,
+     PRESHIFT(0x007d6000) /*  0.030609131 */,
+     PRESHIFT(0x007aa000) /*  0.029937744 */,
+     PRESHIFT(0x00024000) /*  0.000549316 */,
+     PRESHIFT(0x0009a000) /*  0.002349854 */,
+     PRESHIFT(0x0000b000) /*  0.000167847 */,
+
+    -PRESHIFT(0x00002000) /* -0.000030518 */,
+    -PRESHIFT(0x0003f000) /* -0.000961304 */,
+     PRESHIFT(0x000dd000) /*  0.003372192 */,
+    -PRESHIFT(0x00428000) /* -0.016235352 */,
+     PRESHIFT(0x00500000) /*  0.019531250 */,
+    -PRESHIFT(0x02011000) /* -0.125259399 */,
+    -PRESHIFT(0x003e6000) /* -0.015228271 */,
+    -PRESHIFT(0x0d11e000) /* -0.816864014 */,
+     PRESHIFT(0x116fc000) /*  1.089782715 */,
+     PRESHIFT(0x052c5000) /*  0.323318481 */,
+     PRESHIFT(0x02616000) /*  0.148773193 */,
+     PRESHIFT(0x007d6000) /*  0.030609131 */,
+     PRESHIFT(0x007aa000) /*  0.029937744 */,
+     PRESHIFT(0x00024000) /*  0.000549316 */,
+     PRESHIFT(0x0009a000) /*  0.002349854 */,
+     PRESHIFT(0x0000b000) /*  0.000167847 */ },
+
+  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/* 10 */
+    -PRESHIFT(0x00044000) /* -0.001037598 */,
+     PRESHIFT(0x000d7000) /*  0.003280640 */,
+    -PRESHIFT(0x00471000) /* -0.017349243 */,
+     PRESHIFT(0x0046b000) /*  0.017257690 */,
+    -PRESHIFT(0x0212b000) /* -0.129562378 */,
+    -PRESHIFT(0x0084a000) /* -0.032379150 */,
+    -PRESHIFT(0x0d78a000) /* -0.841949463 */,
+     PRESHIFT(0x113be000) /*  1.077117920 */,
+     PRESHIFT(0x04c16000) /*  0.297210693 */,
+     PRESHIFT(0x02687000) /*  0.150497437 */,
+     PRESHIFT(0x0069c000) /*  0.025817871 */,
+     PRESHIFT(0x0077f000) /*  0.029281616 */,
+     PRESHIFT(0x00002000) /*  0.000030518 */,
+     PRESHIFT(0x00093000) /*  0.002243042 */,
+     PRESHIFT(0x0000a000) /*  0.000152588 */,
+
+    -PRESHIFT(0x00002000) /* -0.000030518 */,
+    -PRESHIFT(0x00044000) /* -0.001037598 */,
+     PRESHIFT(0x000d7000) /*  0.003280640 */,
+    -PRESHIFT(0x00471000) /* -0.017349243 */,
+     PRESHIFT(0x0046b000) /*  0.017257690 */,
+    -PRESHIFT(0x0212b000) /* -0.129562378 */,
+    -PRESHIFT(0x0084a000) /* -0.032379150 */,
+    -PRESHIFT(0x0d78a000) /* -0.841949463 */,
+     PRESHIFT(0x113be000) /*  1.077117920 */,
+     PRESHIFT(0x04c16000) /*  0.297210693 */,
+     PRESHIFT(0x02687000) /*  0.150497437 */,
+     PRESHIFT(0x0069c000) /*  0.025817871 */,
+     PRESHIFT(0x0077f000) /*  0.029281616 */,
+     PRESHIFT(0x00002000) /*  0.000030518 */,
+     PRESHIFT(0x00093000) /*  0.002243042 */,
+     PRESHIFT(0x0000a000) /*  0.000152588 */ },
+
+  { -PRESHIFT(0x00003000) /* -0.000045776 */,	/* 11 */
+    -PRESHIFT(0x00049000) /* -0.001113892 */,
+     PRESHIFT(0x000d0000) /*  0.003173828 */,
+    -PRESHIFT(0x004ba000) /* -0.018463135 */,
+     PRESHIFT(0x003ca000) /*  0.014801025 */,
+    -PRESHIFT(0x02233000) /* -0.133590698 */,
+    -PRESHIFT(0x00ce4000) /* -0.050354004 */,
+    -PRESHIFT(0x0ddca000) /* -0.866363525 */,
+     PRESHIFT(0x1102f000) /*  1.063217163 */,
+     PRESHIFT(0x04587000) /*  0.271591187 */,
+     PRESHIFT(0x026cf000) /*  0.151596069 */,
+     PRESHIFT(0x0056c000) /*  0.021179199 */,
+     PRESHIFT(0x0074e000) /*  0.028533936 */,
+    -PRESHIFT(0x0001d000) /* -0.000442505 */,
+     PRESHIFT(0x0008b000) /*  0.002120972 */,
+     PRESHIFT(0x00009000) /*  0.000137329 */,
+
+    -PRESHIFT(0x00003000) /* -0.000045776 */,
+    -PRESHIFT(0x00049000) /* -0.001113892 */,
+     PRESHIFT(0x000d0000) /*  0.003173828 */,
+    -PRESHIFT(0x004ba000) /* -0.018463135 */,
+     PRESHIFT(0x003ca000) /*  0.014801025 */,
+    -PRESHIFT(0x02233000) /* -0.133590698 */,
+    -PRESHIFT(0x00ce4000) /* -0.050354004 */,
+    -PRESHIFT(0x0ddca000) /* -0.866363525 */,
+     PRESHIFT(0x1102f000) /*  1.063217163 */,
+     PRESHIFT(0x04587000) /*  0.271591187 */,
+     PRESHIFT(0x026cf000) /*  0.151596069 */,
+     PRESHIFT(0x0056c000) /*  0.021179199 */,
+     PRESHIFT(0x0074e000) /*  0.028533936 */,
+    -PRESHIFT(0x0001d000) /* -0.000442505 */,
+     PRESHIFT(0x0008b000) /*  0.002120972 */,
+     PRESHIFT(0x00009000) /*  0.000137329 */ },
+
+  { -PRESHIFT(0x00003000) /* -0.000045776 */,	/* 12 */
+    -PRESHIFT(0x0004f000) /* -0.001205444 */,
+     PRESHIFT(0x000c8000) /*  0.003051758 */,
+    -PRESHIFT(0x00503000) /* -0.019577026 */,
+     PRESHIFT(0x0031a000) /*  0.012115479 */,
+    -PRESHIFT(0x02326000) /* -0.137298584 */,
+    -PRESHIFT(0x011b5000) /* -0.069168091 */,
+    -PRESHIFT(0x0e3dd000) /* -0.890090942 */,
+     PRESHIFT(0x10c54000) /*  1.048156738 */,
+     PRESHIFT(0x03f1b000) /*  0.246505737 */,
+     PRESHIFT(0x026ee000) /*  0.152069092 */,
+     PRESHIFT(0x00447000) /*  0.016708374 */,
+     PRESHIFT(0x00719000) /*  0.027725220 */,
+    -PRESHIFT(0x00039000) /* -0.000869751 */,
+     PRESHIFT(0x00084000) /*  0.002014160 */,
+     PRESHIFT(0x00008000) /*  0.000122070 */,
+
+    -PRESHIFT(0x00003000) /* -0.000045776 */,
+    -PRESHIFT(0x0004f000) /* -0.001205444 */,
+     PRESHIFT(0x000c8000) /*  0.003051758 */,
+    -PRESHIFT(0x00503000) /* -0.019577026 */,
+     PRESHIFT(0x0031a000) /*  0.012115479 */,
+    -PRESHIFT(0x02326000) /* -0.137298584 */,
+    -PRESHIFT(0x011b5000) /* -0.069168091 */,
+    -PRESHIFT(0x0e3dd000) /* -0.890090942 */,
+     PRESHIFT(0x10c54000) /*  1.048156738 */,
+     PRESHIFT(0x03f1b000) /*  0.246505737 */,
+     PRESHIFT(0x026ee000) /*  0.152069092 */,
+     PRESHIFT(0x00447000) /*  0.016708374 */,
+     PRESHIFT(0x00719000) /*  0.027725220 */,
+    -PRESHIFT(0x00039000) /* -0.000869751 */,
+     PRESHIFT(0x00084000) /*  0.002014160 */,
+     PRESHIFT(0x00008000) /*  0.000122070 */ },
+
+  { -PRESHIFT(0x00004000) /* -0.000061035 */,	/* 13 */
+    -PRESHIFT(0x00055000) /* -0.001296997 */,
+     PRESHIFT(0x000bd000) /*  0.002883911 */,
+    -PRESHIFT(0x0054c000) /* -0.020690918 */,
+     PRESHIFT(0x0025d000) /*  0.009231567 */,
+    -PRESHIFT(0x02403000) /* -0.140670776 */,
+    -PRESHIFT(0x016ba000) /* -0.088775635 */,
+    -PRESHIFT(0x0e9be000) /* -0.913055420 */,
+     PRESHIFT(0x1082d000) /*  1.031936646 */,
+     PRESHIFT(0x038d4000) /*  0.221984863 */,
+     PRESHIFT(0x026e7000) /*  0.151962280 */,
+     PRESHIFT(0x0032e000) /*  0.012420654 */,
+     PRESHIFT(0x006df000) /*  0.026840210 */,
+    -PRESHIFT(0x00053000) /* -0.001266479 */,
+     PRESHIFT(0x0007d000) /*  0.001907349 */,
+     PRESHIFT(0x00007000) /*  0.000106812 */,
+
+    -PRESHIFT(0x00004000) /* -0.000061035 */,
+    -PRESHIFT(0x00055000) /* -0.001296997 */,
+     PRESHIFT(0x000bd000) /*  0.002883911 */,
+    -PRESHIFT(0x0054c000) /* -0.020690918 */,
+     PRESHIFT(0x0025d000) /*  0.009231567 */,
+    -PRESHIFT(0x02403000) /* -0.140670776 */,
+    -PRESHIFT(0x016ba000) /* -0.088775635 */,
+    -PRESHIFT(0x0e9be000) /* -0.913055420 */,
+     PRESHIFT(0x1082d000) /*  1.031936646 */,
+     PRESHIFT(0x038d4000) /*  0.221984863 */,
+     PRESHIFT(0x026e7000) /*  0.151962280 */,
+     PRESHIFT(0x0032e000) /*  0.012420654 */,
+     PRESHIFT(0x006df000) /*  0.026840210 */,
+    -PRESHIFT(0x00053000) /* -0.001266479 */,
+     PRESHIFT(0x0007d000) /*  0.001907349 */,
+     PRESHIFT(0x00007000) /*  0.000106812 */ },
+
+  { -PRESHIFT(0x00004000) /* -0.000061035 */,	/* 14 */
+    -PRESHIFT(0x0005b000) /* -0.001388550 */,
+     PRESHIFT(0x000b1000) /*  0.002700806 */,
+    -PRESHIFT(0x00594000) /* -0.021789551 */,
+     PRESHIFT(0x00192000) /*  0.006134033 */,
+    -PRESHIFT(0x024c8000) /* -0.143676758 */,
+    -PRESHIFT(0x01bf2000) /* -0.109161377 */,
+    -PRESHIFT(0x0ef69000) /* -0.935195923 */,
+     PRESHIFT(0x103be000) /*  1.014617920 */,
+     PRESHIFT(0x032b4000) /*  0.198059082 */,
+     PRESHIFT(0x026bc000) /*  0.151306152 */,
+     PRESHIFT(0x00221000) /*  0.008316040 */,
+     PRESHIFT(0x006a2000) /*  0.025909424 */,
+    -PRESHIFT(0x0006a000) /* -0.001617432 */,
+     PRESHIFT(0x00075000) /*  0.001785278 */,
+     PRESHIFT(0x00007000) /*  0.000106812 */,
+
+    -PRESHIFT(0x00004000) /* -0.000061035 */,
+    -PRESHIFT(0x0005b000) /* -0.001388550 */,
+     PRESHIFT(0x000b1000) /*  0.002700806 */,
+    -PRESHIFT(0x00594000) /* -0.021789551 */,
+     PRESHIFT(0x00192000) /*  0.006134033 */,
+    -PRESHIFT(0x024c8000) /* -0.143676758 */,
+    -PRESHIFT(0x01bf2000) /* -0.109161377 */,
+    -PRESHIFT(0x0ef69000) /* -0.935195923 */,
+     PRESHIFT(0x103be000) /*  1.014617920 */,
+     PRESHIFT(0x032b4000) /*  0.198059082 */,
+     PRESHIFT(0x026bc000) /*  0.151306152 */,
+     PRESHIFT(0x00221000) /*  0.008316040 */,
+     PRESHIFT(0x006a2000) /*  0.025909424 */,
+    -PRESHIFT(0x0006a000) /* -0.001617432 */,
+     PRESHIFT(0x00075000) /*  0.001785278 */,
+     PRESHIFT(0x00007000) /*  0.000106812 */ },
+
+  { -PRESHIFT(0x00005000) /* -0.000076294 */,	/* 15 */
+    -PRESHIFT(0x00061000) /* -0.001480103 */,
+     PRESHIFT(0x000a3000) /*  0.002487183 */,
+    -PRESHIFT(0x005da000) /* -0.022857666 */,
+     PRESHIFT(0x000b9000) /*  0.002822876 */,
+    -PRESHIFT(0x02571000) /* -0.146255493 */,
+    -PRESHIFT(0x0215c000) /* -0.130310059 */,
+    -PRESHIFT(0x0f4dc000) /* -0.956481934 */,
+     PRESHIFT(0x0ff0a000) /*  0.996246338 */,
+     PRESHIFT(0x02cbf000) /*  0.174789429 */,
+     PRESHIFT(0x0266e000) /*  0.150115967 */,
+     PRESHIFT(0x00120000) /*  0.004394531 */,
+     PRESHIFT(0x00662000) /*  0.024932861 */,
+    -PRESHIFT(0x0007f000) /* -0.001937866 */,
+     PRESHIFT(0x0006f000) /*  0.001693726 */,
+     PRESHIFT(0x00006000) /*  0.000091553 */,
+
+    -PRESHIFT(0x00005000) /* -0.000076294 */,
+    -PRESHIFT(0x00061000) /* -0.001480103 */,
+     PRESHIFT(0x000a3000) /*  0.002487183 */,
+    -PRESHIFT(0x005da000) /* -0.022857666 */,
+     PRESHIFT(0x000b9000) /*  0.002822876 */,
+    -PRESHIFT(0x02571000) /* -0.146255493 */,
+    -PRESHIFT(0x0215c000) /* -0.130310059 */,
+    -PRESHIFT(0x0f4dc000) /* -0.956481934 */,
+     PRESHIFT(0x0ff0a000) /*  0.996246338 */,
+     PRESHIFT(0x02cbf000) /*  0.174789429 */,
+     PRESHIFT(0x0266e000) /*  0.150115967 */,
+     PRESHIFT(0x00120000) /*  0.004394531 */,
+     PRESHIFT(0x00662000) /*  0.024932861 */,
+    -PRESHIFT(0x0007f000) /* -0.001937866 */,
+     PRESHIFT(0x0006f000) /*  0.001693726 */,
+     PRESHIFT(0x00006000) /*  0.000091553 */ },
+
+  { -PRESHIFT(0x00005000) /* -0.000076294 */,	/* 16 */
+    -PRESHIFT(0x00068000) /* -0.001586914 */,
+     PRESHIFT(0x00092000) /*  0.002227783 */,
+    -PRESHIFT(0x0061f000) /* -0.023910522 */,
+    -PRESHIFT(0x0002d000) /* -0.000686646 */,
+    -PRESHIFT(0x025ff000) /* -0.148422241 */,
+    -PRESHIFT(0x026f7000) /* -0.152206421 */,
+    -PRESHIFT(0x0fa13000) /* -0.976852417 */,
+     PRESHIFT(0x0fa13000) /*  0.976852417 */,
+     PRESHIFT(0x026f7000) /*  0.152206421 */,
+     PRESHIFT(0x025ff000) /*  0.148422241 */,
+     PRESHIFT(0x0002d000) /*  0.000686646 */,
+     PRESHIFT(0x0061f000) /*  0.023910522 */,
+    -PRESHIFT(0x00092000) /* -0.002227783 */,
+     PRESHIFT(0x00068000) /*  0.001586914 */,
+     PRESHIFT(0x00005000) /*  0.000076294 */,
+
+    -PRESHIFT(0x00005000) /* -0.000076294 */,
+    -PRESHIFT(0x00068000) /* -0.001586914 */,
+     PRESHIFT(0x00092000) /*  0.002227783 */,
+    -PRESHIFT(0x0061f000) /* -0.023910522 */,
+    -PRESHIFT(0x0002d000) /* -0.000686646 */,
+    -PRESHIFT(0x025ff000) /* -0.148422241 */,
+    -PRESHIFT(0x026f7000) /* -0.152206421 */,
+    -PRESHIFT(0x0fa13000) /* -0.976852417 */,
+     PRESHIFT(0x0fa13000) /*  0.976852417 */,
+     PRESHIFT(0x026f7000) /*  0.152206421 */,
+     PRESHIFT(0x025ff000) /*  0.148422241 */,
+     PRESHIFT(0x0002d000) /*  0.000686646 */,
+     PRESHIFT(0x0061f000) /*  0.023910522 */,
+    -PRESHIFT(0x00092000) /* -0.002227783 */,
+     PRESHIFT(0x00068000) /*  0.001586914 */,
+     PRESHIFT(0x00005000) /*  0.000076294 */ }
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/README
@@ -1,0 +1,1 @@
+This is a copy of libmad-0.15.1b minimally ported to Plan 9.
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/bit.c
@@ -1,0 +1,237 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: bit.c,v 1.12 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# ifdef HAVE_LIMITS_H
+#  include <limits.h>
+# else
+#  define CHAR_BIT  8
+# endif
+
+# include "bit.h"
+
+/*
+ * This is the lookup table for computing the CRC-check word.
+ * As described in section 2.4.3.1 and depicted in Figure A.9
+ * of ISO/IEC 11172-3, the generator polynomial is:
+ *
+ * G(X) = X^16 + X^15 + X^2 + 1
+ */
+static
+unsigned short const crc_table[256] = {
+  0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011,
+  0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022,
+  0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072,
+  0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041,
+  0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2,
+  0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1,
+  0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1,
+  0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082,
+
+  0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192,
+  0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1,
+  0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1,
+  0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2,
+  0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151,
+  0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162,
+  0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132,
+  0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101,
+
+  0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312,
+  0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321,
+  0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371,
+  0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342,
+  0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1,
+  0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2,
+  0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2,
+  0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381,
+
+  0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291,
+  0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2,
+  0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2,
+  0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1,
+  0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252,
+  0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261,
+  0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231,
+  0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202
+};
+
+# define CRC_POLY  0x8005
+
+/*
+ * NAME:	bit->init()
+ * DESCRIPTION:	initialize bit pointer struct
+ */
+void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte)
+{
+  bitptr->byte  = byte;
+  bitptr->cache = 0;
+  bitptr->left  = CHAR_BIT;
+}
+
+/*
+ * NAME:	bit->length()
+ * DESCRIPTION:	return number of bits between start and end points
+ */
+unsigned int mad_bit_length(struct mad_bitptr const *begin,
+			    struct mad_bitptr const *end)
+{
+  return begin->left +
+    CHAR_BIT * (end->byte - (begin->byte + 1)) + (CHAR_BIT - end->left);
+}
+
+/*
+ * NAME:	bit->nextbyte()
+ * DESCRIPTION:	return pointer to next unprocessed byte
+ */
+unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr)
+{
+  return bitptr->left == CHAR_BIT ? bitptr->byte : bitptr->byte + 1;
+}
+
+/*
+ * NAME:	bit->skip()
+ * DESCRIPTION:	advance bit pointer
+ */
+void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len)
+{
+  bitptr->byte += len / CHAR_BIT;
+  bitptr->left -= len % CHAR_BIT;
+
+  if (bitptr->left > CHAR_BIT) {
+    bitptr->byte++;
+    bitptr->left += CHAR_BIT;
+  }
+
+  if (bitptr->left < CHAR_BIT)
+    bitptr->cache = *bitptr->byte;
+}
+
+/*
+ * NAME:	bit->read()
+ * DESCRIPTION:	read an arbitrary number of bits and return their UIMSBF value
+ */
+unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len)
+{
+  register unsigned long value;
+
+  if (bitptr->left == CHAR_BIT)
+    bitptr->cache = *bitptr->byte;
+
+  if (len < bitptr->left) {
+    value = (bitptr->cache & ((1 << bitptr->left) - 1)) >>
+      (bitptr->left - len);
+    bitptr->left -= len;
+
+    return value;
+  }
+
+  /* remaining bits in current byte */
+
+  value = bitptr->cache & ((1 << bitptr->left) - 1);
+  len  -= bitptr->left;
+
+  bitptr->byte++;
+  bitptr->left = CHAR_BIT;
+
+  /* more bytes */
+
+  while (len >= CHAR_BIT) {
+    value = (value << CHAR_BIT) | *bitptr->byte++;
+    len  -= CHAR_BIT;
+  }
+
+  if (len > 0) {
+    bitptr->cache = *bitptr->byte;
+
+    value = (value << len) | (bitptr->cache >> (CHAR_BIT - len));
+    bitptr->left -= len;
+  }
+
+  return value;
+}
+
+# if 0
+/*
+ * NAME:	bit->write()
+ * DESCRIPTION:	write an arbitrary number of bits
+ */
+void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len,
+		   unsigned long value)
+{
+  unsigned char *ptr;
+
+  ptr = (unsigned char *) bitptr->byte;
+
+  /* ... */
+}
+# endif
+
+/*
+ * NAME:	bit->crc()
+ * DESCRIPTION:	compute CRC-check word
+ */
+unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len,
+			   unsigned short init)
+{
+  register unsigned int crc;
+
+  for (crc = init; len >= 32; len -= 32) {
+    register unsigned long data;
+
+    data = mad_bit_read(&bitptr, 32);
+
+    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 24)) & 0xff];
+    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 16)) & 0xff];
+    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >>  8)) & 0xff];
+    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >>  0)) & 0xff];
+  }
+
+  switch (len / 8) {
+  case 3: crc = (crc << 8) ^
+	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
+  case 2: crc = (crc << 8) ^
+	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
+  case 1: crc = (crc << 8) ^
+	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
+
+  len %= 8;
+
+  case 0: break;
+  }
+
+  while (len--) {
+    register unsigned int msb;
+
+    msb = mad_bit_read(&bitptr, 1) ^ (crc >> 15);
+
+    crc <<= 1;
+    if (msb & 1)
+      crc ^= CRC_POLY;
+  }
+
+  return crc & 0xffff;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/bit.h
@@ -1,0 +1,47 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBMAD_BIT_H
+# define LIBMAD_BIT_H
+
+struct mad_bitptr {
+  unsigned char const *byte;
+  unsigned short cache;
+  unsigned short left;
+};
+
+void mad_bit_init(struct mad_bitptr *, unsigned char const *);
+
+# define mad_bit_finish(bitptr)		/* nothing */
+
+unsigned int mad_bit_length(struct mad_bitptr const *,
+			    struct mad_bitptr const *);
+
+# define mad_bit_bitsleft(bitptr)  ((bitptr)->left)
+unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
+
+void mad_bit_skip(struct mad_bitptr *, unsigned int);
+unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
+void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
+
+unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/decoder.c
@@ -1,0 +1,580 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: decoder.c,v 1.22 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+# endif
+
+# ifdef HAVE_SYS_WAIT_H
+#  include <sys/wait.h>
+# endif
+
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+# ifdef HAVE_FCNTL_H
+#  include <fcntl.h>
+# endif
+
+# ifdef HAVE_ERRNO_H
+#  include <errno.h>
+# endif
+
+# include "stream.h"
+# include "frame.h"
+# include "synth.h"
+# include "decoder.h"
+
+/*
+ * NAME:	decoder->init()
+ * DESCRIPTION:	initialize a decoder object with callback routines
+ */
+void mad_decoder_init(struct mad_decoder *decoder, void *data,
+		      enum mad_flow (*input_func)(void *,
+						  struct mad_stream *),
+		      enum mad_flow (*header_func)(void *,
+						   struct mad_header const *),
+		      enum mad_flow (*filter_func)(void *,
+						   struct mad_stream const *,
+						   struct mad_frame *),
+		      enum mad_flow (*output_func)(void *,
+						   struct mad_header const *,
+						   struct mad_pcm *),
+		      enum mad_flow (*error_func)(void *,
+						  struct mad_stream *,
+						  struct mad_frame *),
+		      enum mad_flow (*message_func)(void *,
+						    void *, unsigned int *))
+{
+  decoder->mode         = -1;
+
+  decoder->options      = 0;
+
+  decoder->async.pid    = 0;
+  decoder->async.in     = -1;
+  decoder->async.out    = -1;
+
+  decoder->sync         = 0;
+
+  decoder->cb_data      = data;
+
+  decoder->input_func   = input_func;
+  decoder->header_func  = header_func;
+  decoder->filter_func  = filter_func;
+  decoder->output_func  = output_func;
+  decoder->error_func   = error_func;
+  decoder->message_func = message_func;
+}
+
+int mad_decoder_finish(struct mad_decoder *decoder)
+{
+# if defined(USE_ASYNC)
+  if (decoder->mode == MAD_DECODER_MODE_ASYNC && decoder->async.pid) {
+    pid_t pid;
+    int status;
+
+    close(decoder->async.in);
+
+    do
+      pid = waitpid(decoder->async.pid, &status, 0);
+    while (pid == -1 && errno == EINTR);
+
+    decoder->mode = -1;
+
+    close(decoder->async.out);
+
+    decoder->async.pid = 0;
+    decoder->async.in  = -1;
+    decoder->async.out = -1;
+
+    if (pid == -1)
+      return -1;
+
+    return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0;
+  }
+# endif
+
+  return 0;
+}
+
+# if defined(USE_ASYNC)
+static
+enum mad_flow send_io(int fd, void const *data, size_t len)
+{
+  char const *ptr = data;
+  ssize_t count;
+
+  while (len) {
+    do
+      count = write(fd, ptr, len);
+    while (count == -1 && errno == EINTR);
+
+    if (count == -1)
+      return MAD_FLOW_BREAK;
+
+    len -= count;
+    ptr += count;
+  }
+
+  return MAD_FLOW_CONTINUE;
+}
+
+static
+enum mad_flow receive_io(int fd, void *buffer, size_t len)
+{
+  char *ptr = buffer;
+  ssize_t count;
+
+  while (len) {
+    do
+      count = read(fd, ptr, len);
+    while (count == -1 && errno == EINTR);
+
+    if (count == -1)
+      return (errno == EAGAIN) ? MAD_FLOW_IGNORE : MAD_FLOW_BREAK;
+    else if (count == 0)
+      return MAD_FLOW_STOP;
+
+    len -= count;
+    ptr += count;
+  }
+
+  return MAD_FLOW_CONTINUE;
+}
+
+static
+enum mad_flow receive_io_blocking(int fd, void *buffer, size_t len)
+{
+  int flags, blocking;
+  enum mad_flow result;
+
+  flags = fcntl(fd, F_GETFL);
+  if (flags == -1)
+    return MAD_FLOW_BREAK;
+
+  blocking = flags & ~O_NONBLOCK;
+
+  if (blocking != flags &&
+      fcntl(fd, F_SETFL, blocking) == -1)
+    return MAD_FLOW_BREAK;
+
+  result = receive_io(fd, buffer, len);
+
+  if (flags != blocking &&
+      fcntl(fd, F_SETFL, flags) == -1)
+    return MAD_FLOW_BREAK;
+
+  return result;
+}
+
+static
+enum mad_flow send(int fd, void const *message, unsigned int size)
+{
+  enum mad_flow result;
+
+  /* send size */
+
+  result = send_io(fd, &size, sizeof(size));
+
+  /* send message */
+
+  if (result == MAD_FLOW_CONTINUE)
+    result = send_io(fd, message, size);
+
+  return result;
+}
+
+static
+enum mad_flow receive(int fd, void **message, unsigned int *size)
+{
+  enum mad_flow result;
+  unsigned int actual;
+
+  if (*message == 0)
+    *size = 0;
+
+  /* receive size */
+
+  result = receive_io(fd, &actual, sizeof(actual));
+
+  /* receive message */
+
+  if (result == MAD_FLOW_CONTINUE) {
+    if (actual > *size)
+      actual -= *size;
+    else {
+      *size  = actual;
+      actual = 0;
+    }
+
+    if (*size > 0) {
+      if (*message == 0) {
+	*message = malloc(*size);
+	if (*message == 0)
+	  return MAD_FLOW_BREAK;
+      }
+
+      result = receive_io_blocking(fd, *message, *size);
+    }
+
+    /* throw away remainder of message */
+
+    while (actual && result == MAD_FLOW_CONTINUE) {
+      char sink[256];
+      unsigned int len;
+
+      len = actual > sizeof(sink) ? sizeof(sink) : actual;
+
+      result = receive_io_blocking(fd, sink, len);
+
+      actual -= len;
+    }
+  }
+
+  return result;
+}
+
+static
+enum mad_flow check_message(struct mad_decoder *decoder)
+{
+  enum mad_flow result;
+  void *message = 0;
+  unsigned int size;
+
+  result = receive(decoder->async.in, &message, &size);
+
+  if (result == MAD_FLOW_CONTINUE) {
+    if (decoder->message_func == 0)
+      size = 0;
+    else {
+      result = decoder->message_func(decoder->cb_data, message, &size);
+
+      if (result == MAD_FLOW_IGNORE ||
+	  result == MAD_FLOW_BREAK)
+	size = 0;
+    }
+
+    if (send(decoder->async.out, message, size) != MAD_FLOW_CONTINUE)
+      result = MAD_FLOW_BREAK;
+  }
+
+  if (message)
+    free(message);
+
+  return result;
+}
+# endif
+
+static
+enum mad_flow error_default(void *data, struct mad_stream *stream,
+			    struct mad_frame *frame)
+{
+  int *bad_last_frame = data;
+
+  switch (stream->error) {
+  case MAD_ERROR_BADCRC:
+    if (*bad_last_frame)
+      mad_frame_mute(frame);
+    else
+      *bad_last_frame = 1;
+
+    return MAD_FLOW_IGNORE;
+
+  default:
+    return MAD_FLOW_CONTINUE;
+  }
+}
+
+static
+int run_sync(struct mad_decoder *decoder)
+{
+  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
+  void *error_data;
+  int bad_last_frame = 0;
+  struct mad_stream *stream;
+  struct mad_frame *frame;
+  struct mad_synth *synth;
+  int result = 0;
+
+  if (decoder->input_func == 0)
+    return 0;
+
+  if (decoder->error_func) {
+    error_func = decoder->error_func;
+    error_data = decoder->cb_data;
+  }
+  else {
+    error_func = error_default;
+    error_data = &bad_last_frame;
+  }
+
+  stream = &decoder->sync->stream;
+  frame  = &decoder->sync->frame;
+  synth  = &decoder->sync->synth;
+
+  mad_stream_init(stream);
+  mad_frame_init(frame);
+  mad_synth_init(synth);
+
+  mad_stream_options(stream, decoder->options);
+
+  do {
+    switch (decoder->input_func(decoder->cb_data, stream)) {
+    case MAD_FLOW_STOP:
+      goto done;
+    case MAD_FLOW_BREAK:
+      goto fail;
+    case MAD_FLOW_IGNORE:
+      continue;
+    case MAD_FLOW_CONTINUE:
+      break;
+    }
+
+    while (1) {
+# if defined(USE_ASYNC)
+      if (decoder->mode == MAD_DECODER_MODE_ASYNC) {
+	switch (check_message(decoder)) {
+	case MAD_FLOW_IGNORE:
+	case MAD_FLOW_CONTINUE:
+	  break;
+	case MAD_FLOW_BREAK:
+	  goto fail;
+	case MAD_FLOW_STOP:
+	  goto done;
+	}
+      }
+# endif
+
+      if (decoder->header_func) {
+	if (mad_header_decode(&frame->header, stream) == -1) {
+	  if (!MAD_RECOVERABLE(stream->error))
+	    break;
+
+	  switch (error_func(error_data, stream, frame)) {
+	  case MAD_FLOW_STOP:
+	    goto done;
+	  case MAD_FLOW_BREAK:
+	    goto fail;
+	  case MAD_FLOW_IGNORE:
+	  case MAD_FLOW_CONTINUE:
+	  default:
+	    continue;
+	  }
+	}
+
+	switch (decoder->header_func(decoder->cb_data, &frame->header)) {
+	case MAD_FLOW_STOP:
+	  goto done;
+	case MAD_FLOW_BREAK:
+	  goto fail;
+	case MAD_FLOW_IGNORE:
+	  continue;
+	case MAD_FLOW_CONTINUE:
+	  break;
+	}
+      }
+
+      if (mad_frame_decode(frame, stream) == -1) {
+	if (!MAD_RECOVERABLE(stream->error))
+	  break;
+
+	switch (error_func(error_data, stream, frame)) {
+	case MAD_FLOW_STOP:
+	  goto done;
+	case MAD_FLOW_BREAK:
+	  goto fail;
+	case MAD_FLOW_IGNORE:
+	  break;
+	case MAD_FLOW_CONTINUE:
+	default:
+	  continue;
+	}
+      }
+      else
+	bad_last_frame = 0;
+
+      if (decoder->filter_func) {
+	switch (decoder->filter_func(decoder->cb_data, stream, frame)) {
+	case MAD_FLOW_STOP:
+	  goto done;
+	case MAD_FLOW_BREAK:
+	  goto fail;
+	case MAD_FLOW_IGNORE:
+	  continue;
+	case MAD_FLOW_CONTINUE:
+	  break;
+	}
+      }
+
+      mad_synth_frame(synth, frame);
+
+      if (decoder->output_func) {
+	switch (decoder->output_func(decoder->cb_data,
+				     &frame->header, &synth->pcm)) {
+	case MAD_FLOW_STOP:
+	  goto done;
+	case MAD_FLOW_BREAK:
+	  goto fail;
+	case MAD_FLOW_IGNORE:
+	case MAD_FLOW_CONTINUE:
+	  break;
+	}
+      }
+    }
+  }
+  while (stream->error == MAD_ERROR_BUFLEN);
+
+ fail:
+  result = -1;
+
+ done:
+  mad_synth_finish(synth);
+  mad_frame_finish(frame);
+  mad_stream_finish(stream);
+
+  return result;
+}
+
+# if defined(USE_ASYNC)
+static
+int run_async(struct mad_decoder *decoder)
+{
+  pid_t pid;
+  int ptoc[2], ctop[2], flags;
+
+  if (pipe(ptoc) == -1)
+    return -1;
+
+  if (pipe(ctop) == -1) {
+    close(ptoc[0]);
+    close(ptoc[1]);
+    return -1;
+  }
+
+  flags = fcntl(ptoc[0], F_GETFL);
+  if (flags == -1 ||
+      fcntl(ptoc[0], F_SETFL, flags | O_NONBLOCK) == -1) {
+    close(ctop[0]);
+    close(ctop[1]);
+    close(ptoc[0]);
+    close(ptoc[1]);
+    return -1;
+  }
+
+  pid = fork();
+  if (pid == -1) {
+    close(ctop[0]);
+    close(ctop[1]);
+    close(ptoc[0]);
+    close(ptoc[1]);
+    return -1;
+  }
+
+  decoder->async.pid = pid;
+
+  if (pid) {
+    /* parent */
+
+    close(ptoc[0]);
+    close(ctop[1]);
+
+    decoder->async.in  = ctop[0];
+    decoder->async.out = ptoc[1];
+
+    return 0;
+  }
+
+  /* child */
+
+  close(ptoc[1]);
+  close(ctop[0]);
+
+  decoder->async.in  = ptoc[0];
+  decoder->async.out = ctop[1];
+
+  _exit(run_sync(decoder));
+
+  /* not reached */
+  return -1;
+}
+# endif
+
+/*
+ * NAME:	decoder->run()
+ * DESCRIPTION:	run the decoder thread either synchronously or asynchronously
+ */
+int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode)
+{
+  int result;
+  int (*run)(struct mad_decoder *) = 0;
+
+  switch (decoder->mode = mode) {
+  case MAD_DECODER_MODE_SYNC:
+    run = run_sync;
+    break;
+
+  case MAD_DECODER_MODE_ASYNC:
+# if defined(USE_ASYNC)
+    run = run_async;
+# endif
+    break;
+  }
+
+  if (run == 0)
+    return -1;
+
+  decoder->sync = malloc(sizeof(*decoder->sync));
+  if (decoder->sync == 0)
+    return -1;
+
+  result = run(decoder);
+
+  free(decoder->sync);
+  decoder->sync = 0;
+
+  return result;
+}
+
+/*
+ * NAME:	decoder->message()
+ * DESCRIPTION:	send a message to and receive a reply from the decoder process
+ */
+int mad_decoder_message(struct mad_decoder *decoder,
+			void *message, unsigned int *len)
+{
+# if defined(USE_ASYNC)
+  if (decoder->mode != MAD_DECODER_MODE_ASYNC ||
+      send(decoder->async.out, message, *len) != MAD_FLOW_CONTINUE ||
+      receive(decoder->async.in, &message, len) != MAD_FLOW_CONTINUE)
+    return -1;
+
+  return 0;
+# else
+  return -1;
+# endif
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/decoder.h
@@ -1,0 +1,91 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBMAD_DECODER_H
+# define LIBMAD_DECODER_H
+
+# include "stream.h"
+# include "frame.h"
+# include "synth.h"
+
+enum mad_decoder_mode {
+  MAD_DECODER_MODE_SYNC  = 0,
+  MAD_DECODER_MODE_ASYNC
+};
+
+enum mad_flow {
+  MAD_FLOW_CONTINUE = 0x0000,	/* continue normally */
+  MAD_FLOW_STOP     = 0x0010,	/* stop decoding normally */
+  MAD_FLOW_BREAK    = 0x0011,	/* stop decoding and signal an error */
+  MAD_FLOW_IGNORE   = 0x0020	/* ignore the current frame */
+};
+
+struct mad_decoder {
+  enum mad_decoder_mode mode;
+
+  int options;
+
+  struct {
+    long pid;
+    int in;
+    int out;
+  } async;
+
+  struct {
+    struct mad_stream stream;
+    struct mad_frame frame;
+    struct mad_synth synth;
+  } *sync;
+
+  void *cb_data;
+
+  enum mad_flow (*input_func)(void *, struct mad_stream *);
+  enum mad_flow (*header_func)(void *, struct mad_header const *);
+  enum mad_flow (*filter_func)(void *,
+			       struct mad_stream const *, struct mad_frame *);
+  enum mad_flow (*output_func)(void *,
+			       struct mad_header const *, struct mad_pcm *);
+  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
+  enum mad_flow (*message_func)(void *, void *, unsigned int *);
+};
+
+void mad_decoder_init(struct mad_decoder *, void *,
+		      enum mad_flow (*)(void *, struct mad_stream *),
+		      enum mad_flow (*)(void *, struct mad_header const *),
+		      enum mad_flow (*)(void *,
+					struct mad_stream const *,
+					struct mad_frame *),
+		      enum mad_flow (*)(void *,
+					struct mad_header const *,
+					struct mad_pcm *),
+		      enum mad_flow (*)(void *,
+					struct mad_stream *,
+					struct mad_frame *),
+		      enum mad_flow (*)(void *, void *, unsigned int *));
+int mad_decoder_finish(struct mad_decoder *);
+
+# define mad_decoder_options(decoder, opts)  \
+    ((void) ((decoder)->options = (opts)))
+
+int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode);
+int mad_decoder_message(struct mad_decoder *, void *, unsigned int *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/fixed.c
@@ -1,0 +1,81 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "fixed.h"
+
+/*
+ * NAME:	fixed->abs()
+ * DESCRIPTION:	return absolute value of a fixed-point number
+ */
+mad_fixed_t mad_f_abs(mad_fixed_t x)
+{
+  return x < 0 ? -x : x;
+}
+
+/*
+ * NAME:	fixed->div()
+ * DESCRIPTION:	perform division using fixed-point math
+ */
+mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y)
+{
+  mad_fixed_t q, r;
+  unsigned int bits;
+
+  q = mad_f_abs(x / y);
+
+  if (x < 0) {
+    x = -x;
+    y = -y;
+  }
+
+  r = x % y;
+
+  if (y < 0) {
+    x = -x;
+    y = -y;
+  }
+
+  if (q > mad_f_intpart(MAD_F_MAX) &&
+      !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0)))
+    return 0;
+
+  for (bits = MAD_F_FRACBITS; bits && r; --bits) {
+    q <<= 1, r <<= 1;
+    if (r >= y)
+      r -= y, ++q;
+  }
+
+  /* round */
+  if (2 * r >= y)
+    ++q;
+
+  /* fix sign */
+  if ((x < 0) != (y < 0))
+    q = -q;
+
+  return q << bits;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/fixed.h
@@ -1,0 +1,472 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp $
+ */
+
+# ifndef LIBMAD_FIXED_H
+# define LIBMAD_FIXED_H
+
+typedef int mad_fixed_t;	// must be 32 bits
+typedef int mad_fixed64hi_t;	// must be 32 bits
+typedef u32int mad_fixed64lo_t;	// must be 32 bits
+typedef vlong mad_fixed64_t;
+
+# if defined(FPM_FLOAT)
+typedef double mad_sample_t;
+# else
+typedef mad_fixed_t mad_sample_t;
+# endif
+
+/*
+ * Fixed-point format: 0xABBBBBBB
+ * A == whole part      (sign + 3 bits)
+ * B == fractional part (28 bits)
+ *
+ * Values are signed two's complement, so the effective range is:
+ * 0x80000000 to 0x7fffffff
+ *       -8.0 to +7.9999999962747097015380859375
+ *
+ * The smallest representable value is:
+ * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
+ *
+ * 28 bits of fractional accuracy represent about
+ * 8.6 digits of decimal accuracy.
+ *
+ * Fixed-point numbers can be added or subtracted as normal
+ * integers, but multiplication requires shifting the 64-bit result
+ * from 56 fractional bits back to 28 (and rounding.)
+ *
+ * Changing the definition of MAD_F_FRACBITS is only partially
+ * supported, and must be done with care.
+ */
+
+# define MAD_F_FRACBITS		28
+
+#  define MAD_F(x)		((mad_fixed_t) (x))
+
+# define MAD_F_MIN		((mad_fixed_t) -0x80000000L)
+# define MAD_F_MAX		((mad_fixed_t) +0x7fffffffL)
+
+# define MAD_F_ONE		MAD_F(0x10000000)
+
+# define mad_f_tofixed(x)	((mad_fixed_t)  \
+				 ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5))
+# define mad_f_todouble(x)	((double)  \
+				 ((x) / (double) (1L << MAD_F_FRACBITS)))
+
+# define mad_f_intpart(x)	((x) >> MAD_F_FRACBITS)
+# define mad_f_fracpart(x)	((x) & ((1L << MAD_F_FRACBITS) - 1))
+				/* (x should be positive) */
+
+# define mad_f_fromint(x)	((x) << MAD_F_FRACBITS)
+
+# define mad_f_add(x, y)	((x) + (y))
+# define mad_f_sub(x, y)	((x) - (y))
+
+# if defined(FPM_FLOAT)
+#  error "FPM_FLOAT not yet supported"
+
+#  undef MAD_F
+#  define MAD_F(x)		mad_f_todouble(x)
+
+#  define mad_f_mul(x, y)	((x) * (y))
+#  define mad_f_scale64
+
+#  undef ASO_ZEROCHECK
+
+# elif defined(FPM_64BIT)
+
+/*
+ * This version should be the most accurate if 64-bit types are supported by
+ * the compiler, although it may not be the most efficient.
+ */
+#  if defined(OPT_ACCURACY)
+#   define mad_f_mul(x, y)  \
+    ((mad_fixed_t)  \
+     ((((mad_fixed64_t) (x) * (y)) +  \
+       (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS))
+#  else
+#   define mad_f_mul(x, y)  \
+    ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS))
+#  endif
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- Intel --------------------------------------------------------------- */
+
+# elif defined(FPM_INTEL)
+
+#  if defined(_MSC_VER)
+#   pragma warning(push)
+#   pragma warning(disable: 4035)  /* no return value */
+static __forceinline
+mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
+{
+  enum {
+    fracbits = MAD_F_FRACBITS
+  };
+
+  __asm {
+    mov eax, x
+    imul y
+    shrd eax, edx, fracbits
+  }
+
+  /* implicit return of eax */
+}
+#   pragma warning(pop)
+
+#   define mad_f_mul		mad_f_mul_inline
+#   define mad_f_scale64
+#  else
+/*
+ * This Intel version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#   define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("imull %3"  \
+	 : "=a" (lo), "=d" (hi)  \
+	 : "%a" (x), "rm" (y)  \
+	 : "cc")
+
+#   if defined(OPT_ACCURACY)
+/*
+ * This gives best accuracy but is not very fast.
+ */
+#    define MAD_F_MLA(hi, lo, x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       asm ("addl %2,%0\n\t"  \
+	    "adcl %3,%1"  \
+	    : "=rm" (lo), "=rm" (hi)  \
+	    : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi)  \
+	    : "cc");  \
+    })
+#   endif  /* OPT_ACCURACY */
+
+#   if defined(OPT_ACCURACY)
+/*
+ * Surprisingly, this is faster than SHRD followed by ADC.
+ */
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed64hi_t __hi_;  \
+       mad_fixed64lo_t __lo_;  \
+       mad_fixed_t __result;  \
+       asm ("addl %4,%2\n\t"  \
+	    "adcl %5,%3"  \
+	    : "=rm" (__lo_), "=rm" (__hi_)  \
+	    : "0" (lo), "1" (hi),  \
+	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
+	    : "cc");  \
+       asm ("shrdl %3,%2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   elif defined(OPT_INTEL)
+/*
+ * Alternate Intel scaling that may or may not perform better.
+ */
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("shrl %3,%1\n\t"  \
+	    "shll %4,%2\n\t"  \
+	    "orl %2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (lo), "r" (hi),  \
+	      "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   else
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("shrdl %3,%2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   endif  /* OPT_ACCURACY */
+
+#   define MAD_F_SCALEBITS  MAD_F_FRACBITS
+#  endif
+
+/* --- ARM ----------------------------------------------------------------- */
+
+# elif defined(FPM_ARM)
+
+/* 
+ * This ARM V4 version is as accurate as FPM_64BIT but much faster. The
+ * least significant bit is properly rounded at no CPU cycle cost!
+ */
+# if 1
+/*
+ * This is faster than the default implementation via MAD_F_MLX() and
+ * mad_f_scale64().
+ */
+#  define mad_f_mul(x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       mad_fixed_t __result;  \
+       asm ("smull	%0, %1, %3, %4\n\t"  \
+	    "movs	%0, %0, lsr %5\n\t"  \
+	    "adc	%2, %0, %1, lsl %6"  \
+	    : "=&r" (__lo), "=&r" (__hi), "=r" (__result)  \
+	    : "%r" (x), "r" (y),  \
+	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+# endif
+
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("smull	%0, %1, %2, %3"  \
+	 : "=&r" (lo), "=&r" (hi)  \
+	 : "%r" (x), "r" (y))
+
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("smlal	%0, %1, %2, %3"  \
+	 : "+r" (lo), "+r" (hi)  \
+	 : "%r" (x), "r" (y))
+
+#  define MAD_F_MLN(hi, lo)  \
+    asm ("rsbs	%0, %2, #0\n\t"  \
+	 "rsc	%1, %3, #0"  \
+	 : "=r" (lo), "=r" (hi)  \
+	 : "0" (lo), "1" (hi)  \
+	 : "cc")
+
+#  define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("movs	%0, %1, lsr %3\n\t"  \
+	    "adc	%0, %0, %2, lsl %4"  \
+	    : "=&r" (__result)  \
+	    : "r" (lo), "r" (hi),  \
+	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- MIPS ---------------------------------------------------------------- */
+
+# elif defined(FPM_MIPS)
+
+/*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("mult	%2,%3"  \
+	 : "=l" (lo), "=h" (hi)  \
+	 : "%r" (x), "r" (y))
+
+# if defined(HAVE_MADD_ASM)
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("madd	%2,%3"  \
+	 : "+l" (lo), "+h" (hi)  \
+	 : "%r" (x), "r" (y))
+# elif defined(HAVE_MADD16_ASM)
+/*
+ * This loses significant accuracy due to the 16-bit integer limit in the
+ * multiply/accumulate instruction.
+ */
+#  define MAD_F_ML0(hi, lo, x, y)  \
+    asm ("mult	%2,%3"  \
+	 : "=l" (lo), "=h" (hi)  \
+	 : "%r" ((x) >> 12), "r" ((y) >> 16))
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("madd16	%2,%3"  \
+	 : "+l" (lo), "+h" (hi)  \
+	 : "%r" ((x) >> 12), "r" ((y) >> 16))
+#  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
+# endif
+
+# if defined(OPT_SPEED)
+#  define mad_f_scale64(hi, lo)  \
+    ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS)))
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+# endif
+
+/* --- SPARC --------------------------------------------------------------- */
+
+# elif defined(FPM_SPARC)
+
+/*
+ * This SPARC V8 version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("smul %2, %3, %0\n\t"  \
+	 "rd %%y, %1"  \
+	 : "=r" (lo), "=r" (hi)  \
+	 : "%r" (x), "rI" (y))
+
+/* --- PowerPC ------------------------------------------------------------- */
+
+# elif defined(FPM_PPC)
+
+/*
+ * This PowerPC version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    do {  \
+      asm ("mullw %0,%1,%2"  \
+	   : "=r" (lo)  \
+	   : "%r" (x), "r" (y));  \
+      asm ("mulhw %0,%1,%2"  \
+	   : "=r" (hi)  \
+	   : "%r" (x), "r" (y));  \
+    }  \
+    while (0)
+
+#  if defined(OPT_ACCURACY)
+/*
+ * This gives best accuracy but is not very fast.
+ */
+#   define MAD_F_MLA(hi, lo, x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       asm ("addc %0,%2,%3\n\t"  \
+	    "adde %1,%4,%5"  \
+	    : "=r" (lo), "=r" (hi)  \
+	    : "%r" (lo), "r" (__lo),  \
+	      "%r" (hi), "r" (__hi)  \
+	    : "xer");  \
+    })
+#  endif
+
+#  if defined(OPT_ACCURACY)
+/*
+ * This is slower than the truncating version below it.
+ */
+#   define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result, __round;  \
+       asm ("rotrwi %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
+       asm ("extrwi %0,%1,1,0"  \
+	    : "=r" (__round)  \
+	    : "r" (__result));  \
+       asm ("insrwi %0,%1,%2,0"  \
+	    : "+r" (__result)  \
+	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
+       asm ("add %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "%r" (__result), "r" (__round));  \
+       __result;  \
+    })
+#  else
+#   define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("rotrwi %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
+       asm ("insrwi %0,%1,%2,0"  \
+	    : "+r" (__result)  \
+	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
+       __result;  \
+    })
+#  endif
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- Default ------------------------------------------------------------- */
+
+# elif defined(FPM_DEFAULT)
+
+/*
+ * This version is the most portable but it loses significant accuracy.
+ * Furthermore, accuracy is biased against the second argument, so care
+ * should be taken when ordering operands.
+ *
+ * The scale factors are constant as this is not used with SSO.
+ *
+ * Pre-rounding is required to stay within the limits of compliance.
+ */
+#  if defined(OPT_SPEED)
+#   define mad_f_mul(x, y)	(((x) >> 12) * ((y) >> 16))
+#  else
+#   define mad_f_mul(x, y)	((((x) + (1L << 11)) >> 12) *  \
+				 (((y) + (1L << 15)) >> 16))
+#  endif
+
+/* ------------------------------------------------------------------------- */
+
+# else
+#  error "no FPM selected"
+# endif
+
+/* default implementations */
+
+# if !defined(mad_f_mul)
+#  define mad_f_mul(x, y)  \
+    ({ register mad_fixed64hi_t __hi;  \
+       register mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       mad_f_scale64(__hi, __lo);  \
+    })
+# endif
+
+# if !defined(MAD_F_MLA)
+#  define MAD_F_ML0(hi, lo, x, y)	((lo)  = mad_f_mul((x), (y)))
+#  define MAD_F_MLA(hi, lo, x, y)	((lo) += mad_f_mul((x), (y)))
+#  define MAD_F_MLN(hi, lo)		((lo)  = -(lo))
+#  define MAD_F_MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
+# endif
+
+# if !defined(MAD_F_ML0)
+#  define MAD_F_ML0(hi, lo, x, y)	MAD_F_MLX((hi), (lo), (x), (y))
+# endif
+
+# if !defined(MAD_F_MLN)
+#  define MAD_F_MLN(hi, lo)		((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi))
+# endif
+
+# if !defined(MAD_F_MLZ)
+#  define MAD_F_MLZ(hi, lo)		mad_f_scale64((hi), (lo))
+# endif
+
+# if !defined(mad_f_scale64)
+#  if defined(OPT_ACCURACY)
+#   define mad_f_scale64(hi, lo)  \
+    ((((mad_fixed_t)  \
+       (((hi) << (32 - (MAD_F_SCALEBITS - 1))) |  \
+	((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1)
+#  else
+#   define mad_f_scale64(hi, lo)  \
+    ((mad_fixed_t)  \
+     (((hi) << (32 - MAD_F_SCALEBITS)) |  \
+      ((lo) >> MAD_F_SCALEBITS)))
+#  endif
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+# endif
+
+/* C routines */
+
+mad_fixed_t mad_f_abs(mad_fixed_t);
+mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/frame.c
@@ -1,0 +1,494 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "bit.h"
+# include "stream.h"
+# include "frame.h"
+# include "layer12.h"
+# include "layer3.h"
+
+static
+unsigned long const bitrate_table[5][15] = {
+  /* MPEG-1 */
+  { 0,  32000,  64000,  96000, 128000, 160000, 192000, 224000,  /* Layer I   */
+       256000, 288000, 320000, 352000, 384000, 416000, 448000 },
+  { 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  /* Layer II  */
+       128000, 160000, 192000, 224000, 256000, 320000, 384000 },
+  { 0,  32000,  40000,  48000,  56000,  64000,  80000,  96000,  /* Layer III */
+       112000, 128000, 160000, 192000, 224000, 256000, 320000 },
+
+  /* MPEG-2 LSF */
+  { 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  /* Layer I   */
+       128000, 144000, 160000, 176000, 192000, 224000, 256000 },
+  { 0,   8000,  16000,  24000,  32000,  40000,  48000,  56000,  /* Layers    */
+        64000,  80000,  96000, 112000, 128000, 144000, 160000 } /* II & III  */
+};
+
+static
+unsigned int const samplerate_table[3] = { 44100, 48000, 32000 };
+
+static
+int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = {
+  mad_layer_I,
+  mad_layer_II,
+  mad_layer_III
+};
+
+/*
+ * NAME:	header->init()
+ * DESCRIPTION:	initialize header struct
+ */
+void mad_header_init(struct mad_header *header)
+{
+  header->layer          = 0;
+  header->mode           = 0;
+  header->mode_extension = 0;
+  header->emphasis       = 0;
+
+  header->bitrate        = 0;
+  header->samplerate     = 0;
+
+  header->crc_check      = 0;
+  header->crc_target     = 0;
+
+  header->flags          = 0;
+  header->private_bits   = 0;
+}
+
+/*
+ * NAME:	frame->init()
+ * DESCRIPTION:	initialize frame struct
+ */
+void mad_frame_init(struct mad_frame *frame)
+{
+  mad_header_init(&frame->header);
+
+  frame->options = 0;
+
+  frame->overlap = 0;
+  mad_frame_mute(frame);
+}
+
+/*
+ * NAME:	frame->finish()
+ * DESCRIPTION:	deallocate any dynamic memory associated with frame
+ */
+void mad_frame_finish(struct mad_frame *frame)
+{
+  mad_header_finish(&frame->header);
+
+  if (frame->overlap) {
+    free(frame->overlap);
+    frame->overlap = 0;
+  }
+}
+
+/*
+ * NAME:	decode_header()
+ * DESCRIPTION:	read header data and following CRC word
+ */
+static
+int decode_header(struct mad_header *header, struct mad_stream *stream)
+{
+  unsigned int index;
+
+  header->flags        = 0;
+  header->private_bits = 0;
+
+  /* header() */
+
+  /* syncword */
+  mad_bit_skip(&stream->ptr, 11);
+
+  /* MPEG 2.5 indicator (really part of syncword) */
+  if (mad_bit_read(&stream->ptr, 1) == 0)
+    header->flags |= MAD_FLAG_MPEG_2_5_EXT;
+
+  /* ID */
+  if (mad_bit_read(&stream->ptr, 1) == 0)
+    header->flags |= MAD_FLAG_LSF_EXT;
+  else if (header->flags & MAD_FLAG_MPEG_2_5_EXT) {
+    stream->error = MAD_ERROR_LOSTSYNC;
+    return -1;
+  }
+
+  /* layer */
+  header->layer = 4 - mad_bit_read(&stream->ptr, 2);
+
+  if (header->layer == 4) {
+    stream->error = MAD_ERROR_BADLAYER;
+    return -1;
+  }
+
+  /* protection_bit */
+  if (mad_bit_read(&stream->ptr, 1) == 0) {
+    header->flags    |= MAD_FLAG_PROTECTION;
+    header->crc_check = mad_bit_crc(stream->ptr, 16, 0xffff);
+  }
+
+  /* bitrate_index */
+  index = mad_bit_read(&stream->ptr, 4);
+
+  if (index == 15) {
+    stream->error = MAD_ERROR_BADBITRATE;
+    return -1;
+  }
+
+  if (header->flags & MAD_FLAG_LSF_EXT)
+    header->bitrate = bitrate_table[3 + (header->layer >> 1)][index];
+  else
+    header->bitrate = bitrate_table[header->layer - 1][index];
+
+  /* sampling_frequency */
+  index = mad_bit_read(&stream->ptr, 2);
+
+  if (index == 3) {
+    stream->error = MAD_ERROR_BADSAMPLERATE;
+    return -1;
+  }
+
+  header->samplerate = samplerate_table[index];
+
+  if (header->flags & MAD_FLAG_LSF_EXT) {
+    header->samplerate /= 2;
+
+    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
+      header->samplerate /= 2;
+  }
+
+  /* padding_bit */
+  if (mad_bit_read(&stream->ptr, 1))
+    header->flags |= MAD_FLAG_PADDING;
+
+  /* private_bit */
+  if (mad_bit_read(&stream->ptr, 1))
+    header->private_bits |= MAD_PRIVATE_HEADER;
+
+  /* mode */
+  header->mode = 3 - mad_bit_read(&stream->ptr, 2);
+
+  /* mode_extension */
+  header->mode_extension = mad_bit_read(&stream->ptr, 2);
+
+  /* copyright */
+  if (mad_bit_read(&stream->ptr, 1))
+    header->flags |= MAD_FLAG_COPYRIGHT;
+
+  /* original/copy */
+  if (mad_bit_read(&stream->ptr, 1))
+    header->flags |= MAD_FLAG_ORIGINAL;
+
+  /* emphasis */
+  header->emphasis = mad_bit_read(&stream->ptr, 2);
+
+# if defined(OPT_STRICT)
+  /*
+   * ISO/IEC 11172-3 says this is a reserved emphasis value, but
+   * streams exist which use it anyway. Since the value is not important
+   * to the decoder proper, we allow it unless OPT_STRICT is defined.
+   */
+  if (header->emphasis == MAD_EMPHASIS_RESERVED) {
+    stream->error = MAD_ERROR_BADEMPHASIS;
+    return -1;
+  }
+# endif
+
+  /* error_check() */
+
+  /* crc_check */
+  if (header->flags & MAD_FLAG_PROTECTION)
+    header->crc_target = mad_bit_read(&stream->ptr, 16);
+
+  return 0;
+}
+
+/*
+ * NAME:	free_bitrate()
+ * DESCRIPTION:	attempt to discover the bitstream's free bitrate
+ */
+static
+int free_bitrate(struct mad_stream *stream, struct mad_header const *header)
+{
+  struct mad_bitptr keep_ptr;
+  unsigned long rate = 0;
+  unsigned int pad_slot, slots_per_frame;
+  unsigned char const *ptr = 0;
+
+  keep_ptr = stream->ptr;
+
+  pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
+  slots_per_frame = (header->layer == MAD_LAYER_III &&
+		     (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
+
+  while (mad_stream_sync(stream) == 0) {
+    struct mad_stream peek_stream;
+    struct mad_header peek_header;
+
+    peek_stream = *stream;
+    peek_header = *header;
+
+    if (decode_header(&peek_header, &peek_stream) == 0 &&
+	peek_header.layer == header->layer &&
+	peek_header.samplerate == header->samplerate) {
+      unsigned int N;
+
+      ptr = mad_bit_nextbyte(&stream->ptr);
+
+      N = ptr - stream->this_frame;
+
+      if (header->layer == MAD_LAYER_I) {
+	rate = (unsigned long) header->samplerate *
+	  (N - 4 * pad_slot + 4) / 48 / 1000;
+      }
+      else {
+	rate = (unsigned long) header->samplerate *
+	  (N - pad_slot + 1) / slots_per_frame / 1000;
+      }
+
+      if (rate >= 8)
+	break;
+    }
+
+    mad_bit_skip(&stream->ptr, 8);
+  }
+
+  stream->ptr = keep_ptr;
+
+  if (rate < 8 || (header->layer == MAD_LAYER_III && rate > 640)) {
+    stream->error = MAD_ERROR_LOSTSYNC;
+    return -1;
+  }
+
+  stream->freerate = rate * 1000;
+
+  return 0;
+}
+
+/*
+ * NAME:	header->decode()
+ * DESCRIPTION:	read the next frame header from the stream
+ */
+int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
+{
+  register unsigned char const *ptr, *end;
+  unsigned int pad_slot, N;
+
+  ptr = stream->next_frame;
+  end = stream->bufend;
+
+  if (ptr == 0) {
+    stream->error = MAD_ERROR_BUFPTR;
+    goto fail;
+  }
+
+  /* stream skip */
+  if (stream->skiplen) {
+    if (!stream->sync)
+      ptr = stream->this_frame;
+
+    if (end - ptr < stream->skiplen) {
+      stream->skiplen   -= end - ptr;
+      stream->next_frame = end;
+
+      stream->error = MAD_ERROR_BUFLEN;
+      goto fail;
+    }
+
+    ptr += stream->skiplen;
+    stream->skiplen = 0;
+
+    stream->sync = 1;
+  }
+
+ sync:
+  /* synchronize */
+  if (stream->sync) {
+    if (end - ptr < MAD_BUFFER_GUARD) {
+      stream->next_frame = ptr;
+
+      stream->error = MAD_ERROR_BUFLEN;
+      goto fail;
+    }
+    else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
+      /* mark point where frame sync word was expected */
+      stream->this_frame = ptr;
+      stream->next_frame = ptr + 1;
+
+      stream->error = MAD_ERROR_LOSTSYNC;
+      goto fail;
+    }
+  }
+  else {
+    mad_bit_init(&stream->ptr, ptr);
+
+    if (mad_stream_sync(stream) == -1) {
+      if (end - stream->next_frame >= MAD_BUFFER_GUARD)
+	stream->next_frame = end - MAD_BUFFER_GUARD;
+
+      stream->error = MAD_ERROR_BUFLEN;
+      goto fail;
+    }
+
+    ptr = mad_bit_nextbyte(&stream->ptr);
+  }
+
+  /* begin processing */
+  stream->this_frame = ptr;
+  stream->next_frame = ptr + 1;  /* possibly bogus sync word */
+
+  mad_bit_init(&stream->ptr, stream->this_frame);
+
+  if (decode_header(header, stream) == -1)
+    goto fail;
+
+  /* calculate free bit rate */
+  if (header->bitrate == 0) {
+    if ((stream->freerate == 0 || !stream->sync ||
+	 (header->layer == MAD_LAYER_III && stream->freerate > 640000)) &&
+	free_bitrate(stream, header) == -1)
+      goto fail;
+
+    header->bitrate = stream->freerate;
+    header->flags  |= MAD_FLAG_FREEFORMAT;
+  }
+
+  /* calculate beginning of next frame */
+  pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
+
+  if (header->layer == MAD_LAYER_I)
+    N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4;
+  else {
+    unsigned int slots_per_frame;
+
+    slots_per_frame = (header->layer == MAD_LAYER_III &&
+		       (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
+
+    N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot;
+  }
+
+  /* verify there is enough data left in buffer to decode this frame */
+  if (N + MAD_BUFFER_GUARD > end - stream->this_frame) {
+    stream->next_frame = stream->this_frame;
+
+    stream->error = MAD_ERROR_BUFLEN;
+    goto fail;
+  }
+
+  stream->next_frame = stream->this_frame + N;
+
+  if (!stream->sync) {
+    /* check that a valid frame header follows this frame */
+
+    ptr = stream->next_frame;
+    if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
+      ptr = stream->next_frame = stream->this_frame + 1;
+      goto sync;
+    }
+
+    stream->sync = 1;
+  }
+
+  header->flags |= MAD_FLAG_INCOMPLETE;
+
+  return 0;
+
+ fail:
+  stream->sync = 0;
+
+  return -1;
+}
+
+/*
+ * NAME:	frame->decode()
+ * DESCRIPTION:	decode a single frame from a bitstream
+ */
+int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream)
+{
+  frame->options = stream->options;
+
+  /* header() */
+  /* error_check() */
+
+  if (!(frame->header.flags & MAD_FLAG_INCOMPLETE) &&
+      mad_header_decode(&frame->header, stream) == -1)
+    goto fail;
+
+  /* audio_data() */
+
+  frame->header.flags &= ~MAD_FLAG_INCOMPLETE;
+
+  if (decoder_table[frame->header.layer - 1](stream, frame) == -1) {
+    if (!MAD_RECOVERABLE(stream->error))
+      stream->next_frame = stream->this_frame;
+
+    goto fail;
+  }
+
+  /* ancillary_data() */
+
+  if (frame->header.layer != MAD_LAYER_III) {
+    struct mad_bitptr next_frame;
+
+    mad_bit_init(&next_frame, stream->next_frame);
+
+    stream->anc_ptr    = stream->ptr;
+    stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame);
+
+    mad_bit_finish(&next_frame);
+  }
+
+  return 0;
+
+ fail:
+  stream->anc_bitlen = 0;
+  return -1;
+}
+
+/*
+ * NAME:	frame->mute()
+ * DESCRIPTION:	zero all subband values so the frame becomes silent
+ */
+void mad_frame_mute(struct mad_frame *frame)
+{
+  unsigned int s, sb;
+
+  for (s = 0; s < 36; ++s) {
+    for (sb = 0; sb < 32; ++sb) {
+      frame->sbsample[0][s][sb] =
+      frame->sbsample[1][s][sb] = 0;
+    }
+  }
+
+  if (frame->overlap) {
+    for (s = 0; s < 18; ++s) {
+      for (sb = 0; sb < 32; ++sb) {
+	(*frame->overlap)[0][sb][s] =
+	(*frame->overlap)[1][sb][s] = 0;
+      }
+    }
+  }
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/frame.h
@@ -1,0 +1,115 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBMAD_FRAME_H
+# define LIBMAD_FRAME_H
+
+# include "fixed.h"
+# include "stream.h"
+
+enum mad_layer {
+  MAD_LAYER_I   = 1,			/* Layer I */
+  MAD_LAYER_II  = 2,			/* Layer II */
+  MAD_LAYER_III = 3			/* Layer III */
+};
+
+enum mad_mode {
+  MAD_MODE_SINGLE_CHANNEL = 0,		/* single channel */
+  MAD_MODE_DUAL_CHANNEL	  = 1,		/* dual channel */
+  MAD_MODE_JOINT_STEREO	  = 2,		/* joint (MS/intensity) stereo */
+  MAD_MODE_STEREO	  = 3		/* normal LR stereo */
+};
+
+enum mad_emphasis {
+  MAD_EMPHASIS_NONE	  = 0,		/* no emphasis */
+  MAD_EMPHASIS_50_15_US	  = 1,		/* 50/15 microseconds emphasis */
+  MAD_EMPHASIS_CCITT_J_17 = 3,		/* CCITT J.17 emphasis */
+  MAD_EMPHASIS_RESERVED   = 2		/* unknown emphasis */
+};
+
+struct mad_header {
+  enum mad_layer layer;			/* audio layer (1, 2, or 3) */
+  enum mad_mode mode;			/* channel mode (see above) */
+  int mode_extension;			/* additional mode info */
+  enum mad_emphasis emphasis;		/* de-emphasis to use (see above) */
+
+  unsigned long bitrate;		/* stream bitrate (bps) */
+  unsigned int samplerate;		/* sampling frequency (Hz) */
+
+  unsigned short crc_check;		/* frame CRC accumulator */
+  unsigned short crc_target;		/* final target CRC checksum */
+
+  int flags;				/* flags (see below) */
+  int private_bits;			/* private bits (see below) */
+};
+
+struct mad_frame {
+  struct mad_header header;		/* MPEG audio header */
+
+  int options;				/* decoding options (from stream) */
+
+  mad_fixed_t sbsample[2][36][32];	/* synthesis subband filter samples */
+  mad_fixed_t (*overlap)[2][32][18];	/* Layer III block overlap data */
+};
+
+# define MAD_NCHANNELS(header)		((header)->mode ? 2 : 1)
+# define MAD_NSBSAMPLES(header)  \
+  ((header)->layer == MAD_LAYER_I ? 12 :  \
+   (((header)->layer == MAD_LAYER_III &&  \
+     ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
+
+enum {
+  MAD_FLAG_NPRIVATE_III	= 0x0007,	/* number of Layer III private bits */
+  MAD_FLAG_INCOMPLETE	= 0x0008,	/* header but not data is decoded */
+
+  MAD_FLAG_PROTECTION	= 0x0010,	/* frame has CRC protection */
+  MAD_FLAG_COPYRIGHT	= 0x0020,	/* frame is copyright */
+  MAD_FLAG_ORIGINAL	= 0x0040,	/* frame is original (else copy) */
+  MAD_FLAG_PADDING	= 0x0080,	/* frame has additional slot */
+
+  MAD_FLAG_I_STEREO	= 0x0100,	/* uses intensity joint stereo */
+  MAD_FLAG_MS_STEREO	= 0x0200,	/* uses middle/side joint stereo */
+  MAD_FLAG_FREEFORMAT	= 0x0400,	/* uses free format bitrate */
+
+  MAD_FLAG_LSF_EXT	= 0x1000,	/* lower sampling freq. extension */
+  MAD_FLAG_MC_EXT	= 0x2000,	/* multichannel audio extension */
+  MAD_FLAG_MPEG_2_5_EXT	= 0x4000	/* MPEG 2.5 (unofficial) extension */
+};
+
+enum {
+  MAD_PRIVATE_HEADER	= 0x0100,	/* header private bit */
+  MAD_PRIVATE_III	= 0x001f	/* Layer III private bits (up to 5) */
+};
+
+void mad_header_init(struct mad_header *);
+
+# define mad_header_finish(header)  /* nothing */
+
+int mad_header_decode(struct mad_header *, struct mad_stream *);
+
+void mad_frame_init(struct mad_frame *);
+void mad_frame_finish(struct mad_frame *);
+
+int mad_frame_decode(struct mad_frame *, struct mad_stream *);
+
+void mad_frame_mute(struct mad_frame *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/global.h
@@ -1,0 +1,33 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $
+ */
+
+#include <u.h>
+#include <libc.h>
+
+/* conditional features */
+
+# if defined(OPT_SPEED) && defined(OPT_ACCURACY)
+#  error "cannot optimize for both speed and accuracy"
+# endif
+
+# if defined(OPT_SPEED) && !defined(OPT_SSO)
+#  define OPT_SSO
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/huffman.c
@@ -1,0 +1,3087 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "huffman.h"
+
+/*
+ * These are the Huffman code words for Layer III.
+ * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
+ *
+ * These tables support decoding up to 4 Huffman code bits at a time.
+ */
+
+#define PTR(OFFS, BITS) { .ptr = { .bits=BITS, .offset=OFFS } }
+#define V(V, W, X, Y, HLEN) { .final = 1, .value = { .v=V, .w=W, .x=X, .y=Y, .hlen=HLEN } }
+
+static
+struct huffquad const hufftabA[] = {
+  /* 0000 */ PTR(16, 2),
+  /* 0001 */ PTR(20, 2),
+  /* 0010 */ PTR(24, 1),
+  /* 0011 */ PTR(26, 1),
+  /* 0100 */ V(0, 0, 1, 0, 4),
+  /* 0101 */ V(0, 0, 0, 1, 4),
+  /* 0110 */ V(0, 1, 0, 0, 4),
+  /* 0111 */ V(1, 0, 0, 0, 4),
+  /* 1000 */ V(0, 0, 0, 0, 1),
+  /* 1001 */ V(0, 0, 0, 0, 1),
+  /* 1010 */ V(0, 0, 0, 0, 1),
+  /* 1011 */ V(0, 0, 0, 0, 1),
+  /* 1100 */ V(0, 0, 0, 0, 1),
+  /* 1101 */ V(0, 0, 0, 0, 1),
+  /* 1110 */ V(0, 0, 0, 0, 1),
+  /* 1111 */ V(0, 0, 0, 0, 1),
+
+  /* 0000 ... */
+  /* 00   */ V(1, 0, 1, 1, 2),	/* 16 */
+  /* 01   */ V(1, 1, 1, 1, 2),
+  /* 10   */ V(1, 1, 0, 1, 2),
+  /* 11   */ V(1, 1, 1, 0, 2),
+
+  /* 0001 ... */
+  /* 00   */ V(0, 1, 1, 1, 2),	/* 20 */
+  /* 01   */ V(0, 1, 0, 1, 2),
+  /* 10   */ V(1, 0, 0, 1, 1),
+  /* 11   */ V(1, 0, 0, 1, 1),
+
+  /* 0010 ... */
+  /* 0    */ V(0, 1, 1, 0, 1),	/* 24 */
+  /* 1    */ V(0, 0, 1, 1, 1),
+
+  /* 0011 ... */
+  /* 0    */ V(1, 0, 1, 0, 1),	/* 26 */
+  /* 1    */ V(1, 1, 0, 0, 1)
+};
+
+static
+struct huffquad const hufftabB[] = {
+  /* 0000 */ V(1, 1, 1, 1, 4),
+  /* 0001 */ V(1, 1, 1, 0, 4),
+  /* 0010 */ V(1, 1, 0, 1, 4),
+  /* 0011 */ V(1, 1, 0, 0, 4),
+  /* 0100 */ V(1, 0, 1, 1, 4),
+  /* 0101 */ V(1, 0, 1, 0, 4),
+  /* 0110 */ V(1, 0, 0, 1, 4),
+  /* 0111 */ V(1, 0, 0, 0, 4),
+  /* 1000 */ V(0, 1, 1, 1, 4),
+  /* 1001 */ V(0, 1, 1, 0, 4),
+  /* 1010 */ V(0, 1, 0, 1, 4),
+  /* 1011 */ V(0, 1, 0, 0, 4),
+  /* 1100 */ V(0, 0, 1, 1, 4),
+  /* 1101 */ V(0, 0, 1, 0, 4),
+  /* 1110 */ V(0, 0, 0, 1, 4),
+  /* 1111 */ V(0, 0, 0, 0, 4)
+};
+
+# undef V
+# undef PTR
+
+#define PTR(OFFS, BITS) { .ptr = { .bits=BITS, .offset=OFFS } }
+#define V(X, Y, HLEN) { .final = 1, .value = { .x=X, .y=Y, .hlen=HLEN } }
+
+static
+struct huffpair const hufftab0[] = {
+  /*      */ V(0, 0, 0)
+};
+
+static
+struct huffpair const hufftab1[] = {
+  /* 000  */ V(1, 1, 3),
+  /* 001  */ V(0, 1, 3),
+  /* 010  */ V(1, 0, 2),
+  /* 011  */ V(1, 0, 2),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1)
+};
+
+static
+struct huffpair const hufftab2[] = {
+  /* 000  */ PTR(8, 3),
+  /* 001  */ V(1, 1, 3),
+  /* 010  */ V(0, 1, 3),
+  /* 011  */ V(1, 0, 3),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1),
+
+  /* 000 ... */
+  /* 000  */ V(2, 2, 3),	/* 8 */
+  /* 001  */ V(0, 2, 3),
+  /* 010  */ V(1, 2, 2),
+  /* 011  */ V(1, 2, 2),
+  /* 100  */ V(2, 1, 2),
+  /* 101  */ V(2, 1, 2),
+  /* 110  */ V(2, 0, 2),
+  /* 111  */ V(2, 0, 2)
+};
+
+static
+struct huffpair const hufftab3[] = {
+  /* 000  */ PTR(8, 3),
+  /* 001  */ V(1, 0, 3),
+  /* 010  */ V(1, 1, 2),
+  /* 011  */ V(1, 1, 2),
+  /* 100  */ V(0, 1, 2),
+  /* 101  */ V(0, 1, 2),
+  /* 110  */ V(0, 0, 2),
+  /* 111  */ V(0, 0, 2),
+
+  /* 000 ... */
+  /* 000  */ V(2, 2, 3),	/* 8 */
+  /* 001  */ V(0, 2, 3),
+  /* 010  */ V(1, 2, 2),
+  /* 011  */ V(1, 2, 2),
+  /* 100  */ V(2, 1, 2),
+  /* 101  */ V(2, 1, 2),
+  /* 110  */ V(2, 0, 2),
+  /* 111  */ V(2, 0, 2)
+};
+
+static
+struct huffpair const hufftab5[] = {
+  /* 000  */ PTR(8, 4),
+  /* 001  */ V(1, 1, 3),
+  /* 010  */ V(0, 1, 3),
+  /* 011  */ V(1, 0, 3),
+  /* 100  */ V(0, 0, 1),
+  /* 101  */ V(0, 0, 1),
+  /* 110  */ V(0, 0, 1),
+  /* 111  */ V(0, 0, 1),
+
+  /* 000 ... */
+  /* 0000 */ PTR(24, 1),	/* 8 */
+  /* 0001 */ V(3, 2, 4),
+  /* 0010 */ V(3, 1, 3),
+  /* 0011 */ V(3, 1, 3),
+  /* 0100 */ V(1, 3, 4),
+  /* 0101 */ V(0, 3, 4),
+  /* 0110 */ V(3, 0, 4),
+  /* 0111 */ V(2, 2, 4),
+  /* 1000 */ V(1, 2, 3),
+  /* 1001 */ V(1, 2, 3),
+  /* 1010 */ V(2, 1, 3),
+  /* 1011 */ V(2, 1, 3),
+  /* 1100 */ V(0, 2, 3),
+  /* 1101 */ V(0, 2, 3),
+  /* 1110 */ V(2, 0, 3),
+  /* 1111 */ V(2, 0, 3),
+
+  /* 000 0000 ... */
+  /* 0    */ V(3, 3, 1),	/* 24 */
+  /* 1    */ V(2, 3, 1)
+};
+
+static
+struct huffpair const hufftab6[] = {
+  /* 0000 */ PTR(16, 3),
+  /* 0001 */ PTR(24, 1),
+  /* 0010 */ PTR(26, 1),
+  /* 0011 */ V(1, 2, 4),
+  /* 0100 */ V(2, 1, 4),
+  /* 0101 */ V(2, 0, 4),
+  /* 0110 */ V(0, 1, 3),
+  /* 0111 */ V(0, 1, 3),
+  /* 1000 */ V(1, 1, 2),
+  /* 1001 */ V(1, 1, 2),
+  /* 1010 */ V(1, 1, 2),
+  /* 1011 */ V(1, 1, 2),
+  /* 1100 */ V(1, 0, 3),
+  /* 1101 */ V(1, 0, 3),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 000  */ V(3, 3, 3),	/* 16 */
+  /* 001  */ V(0, 3, 3),
+  /* 010  */ V(2, 3, 2),
+  /* 011  */ V(2, 3, 2),
+  /* 100  */ V(3, 2, 2),
+  /* 101  */ V(3, 2, 2),
+  /* 110  */ V(3, 0, 2),
+  /* 111  */ V(3, 0, 2),
+
+  /* 0001 ... */
+  /* 0    */ V(1, 3, 1),	/* 24 */
+  /* 1    */ V(3, 1, 1),
+
+  /* 0010 ... */
+  /* 0    */ V(2, 2, 1),	/* 26 */
+  /* 1    */ V(0, 2, 1)
+};
+
+static
+struct huffpair const hufftab7[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 2),
+  /* 0011 */ V(1, 1, 4),
+  /* 0100 */ V(0, 1, 3),
+  /* 0101 */ V(0, 1, 3),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(52, 2),	/* 16 */
+  /* 0001 */ PTR(56, 1),
+  /* 0010 */ PTR(58, 1),
+  /* 0011 */ V(1, 5, 4),
+  /* 0100 */ V(5, 1, 4),
+  /* 0101 */ PTR(60, 1),
+  /* 0110 */ V(5, 0, 4),
+  /* 0111 */ PTR(62, 1),
+  /* 1000 */ V(2, 4, 4),
+  /* 1001 */ V(4, 2, 4),
+  /* 1010 */ V(1, 4, 3),
+  /* 1011 */ V(1, 4, 3),
+  /* 1100 */ V(4, 1, 3),
+  /* 1101 */ V(4, 1, 3),
+  /* 1110 */ V(4, 0, 3),
+  /* 1111 */ V(4, 0, 3),
+
+  /* 0001 ... */
+  /* 0000 */ V(0, 4, 4),	/* 32 */
+  /* 0001 */ V(2, 3, 4),
+  /* 0010 */ V(3, 2, 4),
+  /* 0011 */ V(0, 3, 4),
+  /* 0100 */ V(1, 3, 3),
+  /* 0101 */ V(1, 3, 3),
+  /* 0110 */ V(3, 1, 3),
+  /* 0111 */ V(3, 1, 3),
+  /* 1000 */ V(3, 0, 3),
+  /* 1001 */ V(3, 0, 3),
+  /* 1010 */ V(2, 2, 3),
+  /* 1011 */ V(2, 2, 3),
+  /* 1100 */ V(1, 2, 2),
+  /* 1101 */ V(1, 2, 2),
+  /* 1110 */ V(1, 2, 2),
+  /* 1111 */ V(1, 2, 2),
+
+  /* 0010 ... */
+  /* 00   */ V(2, 1, 1),	/* 48 */
+  /* 01   */ V(2, 1, 1),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(5, 5, 2),	/* 52 */
+  /* 01   */ V(4, 5, 2),
+  /* 10   */ V(5, 4, 2),
+  /* 11   */ V(5, 3, 2),
+
+  /* 0000 0001 ... */
+  /* 0    */ V(3, 5, 1),	/* 56 */
+  /* 1    */ V(4, 4, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(2, 5, 1),	/* 58 */
+  /* 1    */ V(5, 2, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(0, 5, 1),	/* 60 */
+  /* 1    */ V(3, 4, 1),
+
+  /* 0000 0111 ... */
+  /* 0    */ V(4, 3, 1),	/* 62 */
+  /* 1    */ V(3, 3, 1)
+};
+
+# if 0
+/* this version saves 8 entries (16 bytes) at the expense of
+   an extra lookup in 4 out of 36 cases */
+static
+struct huffpair const hufftab8[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 2),
+  /* 0010 */ V(1, 2, 4),
+  /* 0011 */ V(2, 1, 4),
+  /* 0100 */ V(1, 1, 2),
+  /* 0101 */ V(1, 1, 2),
+  /* 0110 */ V(1, 1, 2),
+  /* 0111 */ V(1, 1, 2),
+  /* 1000 */ V(0, 1, 3),
+  /* 1001 */ V(0, 1, 3),
+  /* 1010 */ V(1, 0, 3),
+  /* 1011 */ V(1, 0, 3),
+  /* 1100 */ V(0, 0, 2),
+  /* 1101 */ V(0, 0, 2),
+  /* 1110 */ V(0, 0, 2),
+  /* 1111 */ V(0, 0, 2),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(36, 3),	/* 16 */
+  /* 0001 */ PTR(44, 2),
+  /* 0010 */ PTR(48, 1),
+  /* 0011 */ V(1, 5, 4),
+  /* 0100 */ V(5, 1, 4),
+  /* 0101 */ PTR(50, 1),
+  /* 0110 */ PTR(52, 1),
+  /* 0111 */ V(2, 4, 4),
+  /* 1000 */ V(4, 2, 4),
+  /* 1001 */ V(1, 4, 4),
+  /* 1010 */ V(4, 1, 3),
+  /* 1011 */ V(4, 1, 3),
+  /* 1100 */ V(0, 4, 4),
+  /* 1101 */ V(4, 0, 4),
+  /* 1110 */ V(2, 3, 4),
+  /* 1111 */ V(3, 2, 4),
+
+  /* 0001 ... */
+  /* 00   */ PTR(54, 2),	/* 32 */
+  /* 01   */ V(2, 2, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(5, 5, 3),	/* 36 */
+  /* 001  */ V(5, 4, 3),
+  /* 010  */ V(4, 5, 2),
+  /* 011  */ V(4, 5, 2),
+  /* 100  */ V(5, 3, 1),
+  /* 101  */ V(5, 3, 1),
+  /* 110  */ V(5, 3, 1),
+  /* 111  */ V(5, 3, 1),
+
+  /* 0000 0001 ... */
+  /* 00   */ V(3, 5, 2),	/* 44 */
+  /* 01   */ V(4, 4, 2),
+  /* 10   */ V(2, 5, 1),
+  /* 11   */ V(2, 5, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(5, 2, 1),	/* 48 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(3, 4, 1),	/* 50 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0000 0110 ... */
+  /* 0    */ V(5, 0, 1),	/* 52 */
+  /* 1    */ V(3, 3, 1),
+
+  /* 0001 00 ... */
+  /* 00   */ V(1, 3, 2),	/* 54 */
+  /* 01   */ V(3, 1, 2),
+  /* 10   */ V(0, 3, 2),
+  /* 11   */ V(3, 0, 2),
+};
+# else
+static
+struct huffpair const hufftab8[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ V(1, 2, 4),
+  /* 0011 */ V(2, 1, 4),
+  /* 0100 */ V(1, 1, 2),
+  /* 0101 */ V(1, 1, 2),
+  /* 0110 */ V(1, 1, 2),
+  /* 0111 */ V(1, 1, 2),
+  /* 1000 */ V(0, 1, 3),
+  /* 1001 */ V(0, 1, 3),
+  /* 1010 */ V(1, 0, 3),
+  /* 1011 */ V(1, 0, 3),
+  /* 1100 */ V(0, 0, 2),
+  /* 1101 */ V(0, 0, 2),
+  /* 1110 */ V(0, 0, 2),
+  /* 1111 */ V(0, 0, 2),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(48, 3),	/* 16 */
+  /* 0001 */ PTR(56, 2),
+  /* 0010 */ PTR(60, 1),
+  /* 0011 */ V(1, 5, 4),
+  /* 0100 */ V(5, 1, 4),
+  /* 0101 */ PTR(62, 1),
+  /* 0110 */ PTR(64, 1),
+  /* 0111 */ V(2, 4, 4),
+  /* 1000 */ V(4, 2, 4),
+  /* 1001 */ V(1, 4, 4),
+  /* 1010 */ V(4, 1, 3),
+  /* 1011 */ V(4, 1, 3),
+  /* 1100 */ V(0, 4, 4),
+  /* 1101 */ V(4, 0, 4),
+  /* 1110 */ V(2, 3, 4),
+  /* 1111 */ V(3, 2, 4),
+
+  /* 0001 ... */
+  /* 0000 */ V(1, 3, 4),	/* 32 */
+  /* 0001 */ V(3, 1, 4),
+  /* 0010 */ V(0, 3, 4),
+  /* 0011 */ V(3, 0, 4),
+  /* 0100 */ V(2, 2, 2),
+  /* 0101 */ V(2, 2, 2),
+  /* 0110 */ V(2, 2, 2),
+  /* 0111 */ V(2, 2, 2),
+  /* 1000 */ V(0, 2, 2),
+  /* 1001 */ V(0, 2, 2),
+  /* 1010 */ V(0, 2, 2),
+  /* 1011 */ V(0, 2, 2),
+  /* 1100 */ V(2, 0, 2),
+  /* 1101 */ V(2, 0, 2),
+  /* 1110 */ V(2, 0, 2),
+  /* 1111 */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(5, 5, 3),	/* 48 */
+  /* 001  */ V(5, 4, 3),
+  /* 010  */ V(4, 5, 2),
+  /* 011  */ V(4, 5, 2),
+  /* 100  */ V(5, 3, 1),
+  /* 101  */ V(5, 3, 1),
+  /* 110  */ V(5, 3, 1),
+  /* 111  */ V(5, 3, 1),
+
+  /* 0000 0001 ... */
+  /* 00   */ V(3, 5, 2),	/* 56 */
+  /* 01   */ V(4, 4, 2),
+  /* 10   */ V(2, 5, 1),
+  /* 11   */ V(2, 5, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(5, 2, 1),	/* 60 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(3, 4, 1),	/* 62 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0000 0110 ... */
+  /* 0    */ V(5, 0, 1),	/* 64 */
+  /* 1    */ V(3, 3, 1)
+};
+# endif
+
+static
+struct huffpair const hufftab9[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 3),
+  /* 0010 */ PTR(40, 2),
+  /* 0011 */ PTR(44, 2),
+  /* 0100 */ PTR(48, 1),
+  /* 0101 */ V(1, 2, 4),
+  /* 0110 */ V(2, 1, 4),
+  /* 0111 */ V(2, 0, 4),
+  /* 1000 */ V(1, 1, 3),
+  /* 1001 */ V(1, 1, 3),
+  /* 1010 */ V(0, 1, 3),
+  /* 1011 */ V(0, 1, 3),
+  /* 1100 */ V(1, 0, 3),
+  /* 1101 */ V(1, 0, 3),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(50, 1),	/* 16 */
+  /* 0001 */ V(3, 5, 4),
+  /* 0010 */ V(5, 3, 4),
+  /* 0011 */ PTR(52, 1),
+  /* 0100 */ V(4, 4, 4),
+  /* 0101 */ V(2, 5, 4),
+  /* 0110 */ V(5, 2, 4),
+  /* 0111 */ V(1, 5, 4),
+  /* 1000 */ V(5, 1, 3),
+  /* 1001 */ V(5, 1, 3),
+  /* 1010 */ V(3, 4, 3),
+  /* 1011 */ V(3, 4, 3),
+  /* 1100 */ V(4, 3, 3),
+  /* 1101 */ V(4, 3, 3),
+  /* 1110 */ V(5, 0, 4),
+  /* 1111 */ V(0, 4, 4),
+
+  /* 0001 ... */
+  /* 000  */ V(2, 4, 3),	/* 32 */
+  /* 001  */ V(4, 2, 3),
+  /* 010  */ V(3, 3, 3),
+  /* 011  */ V(4, 0, 3),
+  /* 100  */ V(1, 4, 2),
+  /* 101  */ V(1, 4, 2),
+  /* 110  */ V(4, 1, 2),
+  /* 111  */ V(4, 1, 2),
+
+  /* 0010 ... */
+  /* 00   */ V(2, 3, 2),	/* 40 */
+  /* 01   */ V(3, 2, 2),
+  /* 10   */ V(1, 3, 1),
+  /* 11   */ V(1, 3, 1),
+
+  /* 0011 ... */
+  /* 00   */ V(3, 1, 1),	/* 44 */
+  /* 01   */ V(3, 1, 1),
+  /* 10   */ V(0, 3, 2),
+  /* 11   */ V(3, 0, 2),
+
+  /* 0100 ... */
+  /* 0    */ V(2, 2, 1),	/* 48 */
+  /* 1    */ V(0, 2, 1),
+
+  /* 0000 0000 ... */
+  /* 0    */ V(5, 5, 1),	/* 50 */
+  /* 1    */ V(4, 5, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(5, 4, 1),	/* 52 */
+  /* 1    */ V(0, 5, 1)
+};
+
+static
+struct huffpair const hufftab10[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 2),
+  /* 0011 */ V(1, 1, 4),
+  /* 0100 */ V(0, 1, 3),
+  /* 0101 */ V(0, 1, 3),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(52, 3),	/* 16 */
+  /* 0001 */ PTR(60, 2),
+  /* 0010 */ PTR(64, 3),
+  /* 0011 */ PTR(72, 1),
+  /* 0100 */ PTR(74, 2),
+  /* 0101 */ PTR(78, 2),
+  /* 0110 */ PTR(82, 2),
+  /* 0111 */ V(1, 7, 4),
+  /* 1000 */ V(7, 1, 4),
+  /* 1001 */ PTR(86, 1),
+  /* 1010 */ PTR(88, 2),
+  /* 1011 */ PTR(92, 2),
+  /* 1100 */ V(1, 6, 4),
+  /* 1101 */ V(6, 1, 4),
+  /* 1110 */ V(6, 0, 4),
+  /* 1111 */ PTR(96, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(98, 1),	/* 32 */
+  /* 0001 */ PTR(100, 1),
+  /* 0010 */ V(1, 4, 4),
+  /* 0011 */ V(4, 1, 4),
+  /* 0100 */ V(4, 0, 4),
+  /* 0101 */ V(2, 3, 4),
+  /* 0110 */ V(3, 2, 4),
+  /* 0111 */ V(0, 3, 4),
+  /* 1000 */ V(1, 3, 3),
+  /* 1001 */ V(1, 3, 3),
+  /* 1010 */ V(3, 1, 3),
+  /* 1011 */ V(3, 1, 3),
+  /* 1100 */ V(3, 0, 3),
+  /* 1101 */ V(3, 0, 3),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0010 ... */
+  /* 00   */ V(1, 2, 2),	/* 48 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(7, 7, 3),	/* 52 */
+  /* 001  */ V(6, 7, 3),
+  /* 010  */ V(7, 6, 3),
+  /* 011  */ V(5, 7, 3),
+  /* 100  */ V(7, 5, 3),
+  /* 101  */ V(6, 6, 3),
+  /* 110  */ V(4, 7, 2),
+  /* 111  */ V(4, 7, 2),
+
+  /* 0000 0001 ... */
+  /* 00   */ V(7, 4, 2),	/* 60 */
+  /* 01   */ V(5, 6, 2),
+  /* 10   */ V(6, 5, 2),
+  /* 11   */ V(3, 7, 2),
+
+  /* 0000 0010 ... */
+  /* 000  */ V(7, 3, 2),	/* 64 */
+  /* 001  */ V(7, 3, 2),
+  /* 010  */ V(4, 6, 2),
+  /* 011  */ V(4, 6, 2),
+  /* 100  */ V(5, 5, 3),
+  /* 101  */ V(5, 4, 3),
+  /* 110  */ V(6, 3, 2),
+  /* 111  */ V(6, 3, 2),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(2, 7, 1),	/* 72 */
+  /* 1    */ V(7, 2, 1),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(6, 4, 2),	/* 74 */
+  /* 01   */ V(0, 7, 2),
+  /* 10   */ V(7, 0, 1),
+  /* 11   */ V(7, 0, 1),
+
+  /* 0000 0101 ... */
+  /* 00   */ V(6, 2, 1),	/* 78 */
+  /* 01   */ V(6, 2, 1),
+  /* 10   */ V(4, 5, 2),
+  /* 11   */ V(3, 5, 2),
+
+  /* 0000 0110 ... */
+  /* 00   */ V(0, 6, 1),	/* 82 */
+  /* 01   */ V(0, 6, 1),
+  /* 10   */ V(5, 3, 2),
+  /* 11   */ V(4, 4, 2),
+
+  /* 0000 1001 ... */
+  /* 0    */ V(3, 6, 1),	/* 86 */
+  /* 1    */ V(2, 6, 1),
+
+  /* 0000 1010 ... */
+  /* 00   */ V(2, 5, 2),	/* 88 */
+  /* 01   */ V(5, 2, 2),
+  /* 10   */ V(1, 5, 1),
+  /* 11   */ V(1, 5, 1),
+
+  /* 0000 1011 ... */
+  /* 00   */ V(5, 1, 1),	/* 92 */
+  /* 01   */ V(5, 1, 1),
+  /* 10   */ V(3, 4, 2),
+  /* 11   */ V(4, 3, 2),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(0, 5, 1),	/* 96 */
+  /* 1    */ V(5, 0, 1),
+
+  /* 0001 0000 ... */
+  /* 0    */ V(2, 4, 1),	/* 98 */
+  /* 1    */ V(4, 2, 1),
+
+  /* 0001 0001 ... */
+  /* 0    */ V(3, 3, 1),	/* 100 */
+  /* 1    */ V(0, 4, 1)
+};
+
+static
+struct huffpair const hufftab11[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 3),
+  /* 0100 */ V(1, 2, 4),
+  /* 0101 */ PTR(72, 1),
+  /* 0110 */ V(1, 1, 3),
+  /* 0111 */ V(1, 1, 3),
+  /* 1000 */ V(0, 1, 3),
+  /* 1001 */ V(0, 1, 3),
+  /* 1010 */ V(1, 0, 3),
+  /* 1011 */ V(1, 0, 3),
+  /* 1100 */ V(0, 0, 2),
+  /* 1101 */ V(0, 0, 2),
+  /* 1110 */ V(0, 0, 2),
+  /* 1111 */ V(0, 0, 2),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(74, 2),	/* 16 */
+  /* 0001 */ PTR(78, 3),
+  /* 0010 */ PTR(86, 2),
+  /* 0011 */ PTR(90, 1),
+  /* 0100 */ PTR(92, 2),
+  /* 0101 */ V(2, 7, 4),
+  /* 0110 */ V(7, 2, 4),
+  /* 0111 */ PTR(96, 1),
+  /* 1000 */ V(7, 1, 3),
+  /* 1001 */ V(7, 1, 3),
+  /* 1010 */ V(1, 7, 4),
+  /* 1011 */ V(7, 0, 4),
+  /* 1100 */ V(3, 6, 4),
+  /* 1101 */ V(6, 3, 4),
+  /* 1110 */ V(6, 0, 4),
+  /* 1111 */ PTR(98, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(100, 1),	/* 32 */
+  /* 0001 */ V(1, 5, 4),
+  /* 0010 */ V(6, 2, 3),
+  /* 0011 */ V(6, 2, 3),
+  /* 0100 */ V(2, 6, 4),
+  /* 0101 */ V(0, 6, 4),
+  /* 0110 */ V(1, 6, 3),
+  /* 0111 */ V(1, 6, 3),
+  /* 1000 */ V(6, 1, 3),
+  /* 1001 */ V(6, 1, 3),
+  /* 1010 */ V(5, 1, 4),
+  /* 1011 */ V(3, 4, 4),
+  /* 1100 */ V(5, 0, 4),
+  /* 1101 */ PTR(102, 1),
+  /* 1110 */ V(2, 4, 4),
+  /* 1111 */ V(4, 2, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(1, 4, 4),	/* 48 */
+  /* 0001 */ V(4, 1, 4),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 3),
+  /* 0101 */ V(2, 3, 3),
+  /* 0110 */ V(3, 2, 3),
+  /* 0111 */ V(3, 2, 3),
+  /* 1000 */ V(1, 3, 2),
+  /* 1001 */ V(1, 3, 2),
+  /* 1010 */ V(1, 3, 2),
+  /* 1011 */ V(1, 3, 2),
+  /* 1100 */ V(3, 1, 2),
+  /* 1101 */ V(3, 1, 2),
+  /* 1110 */ V(3, 1, 2),
+  /* 1111 */ V(3, 1, 2),
+
+  /* 0011 ... */
+  /* 000  */ V(0, 3, 3),	/* 64 */
+  /* 001  */ V(3, 0, 3),
+  /* 010  */ V(2, 2, 2),
+  /* 011  */ V(2, 2, 2),
+  /* 100  */ V(2, 1, 1),
+  /* 101  */ V(2, 1, 1),
+  /* 110  */ V(2, 1, 1),
+  /* 111  */ V(2, 1, 1),
+
+  /* 0101 ... */
+  /* 0    */ V(0, 2, 1),	/* 72 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(7, 7, 2),	/* 74 */
+  /* 01   */ V(6, 7, 2),
+  /* 10   */ V(7, 6, 2),
+  /* 11   */ V(7, 5, 2),
+
+  /* 0000 0001 ... */
+  /* 000  */ V(6, 6, 2),	/* 78 */
+  /* 001  */ V(6, 6, 2),
+  /* 010  */ V(4, 7, 2),
+  /* 011  */ V(4, 7, 2),
+  /* 100  */ V(7, 4, 2),
+  /* 101  */ V(7, 4, 2),
+  /* 110  */ V(5, 7, 3),
+  /* 111  */ V(5, 5, 3),
+
+  /* 0000 0010 ... */
+  /* 00   */ V(5, 6, 2),	/* 86 */
+  /* 01   */ V(6, 5, 2),
+  /* 10   */ V(3, 7, 1),
+  /* 11   */ V(3, 7, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(7, 3, 1),	/* 90 */
+  /* 1    */ V(4, 6, 1),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(4, 5, 2),	/* 92 */
+  /* 01   */ V(5, 4, 2),
+  /* 10   */ V(3, 5, 2),
+  /* 11   */ V(5, 3, 2),
+
+  /* 0000 0111 ... */
+  /* 0    */ V(6, 4, 1),	/* 96 */
+  /* 1    */ V(0, 7, 1),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(4, 4, 1),	/* 98 */
+  /* 1    */ V(2, 5, 1),
+
+  /* 0001 0000 ... */
+  /* 0    */ V(5, 2, 1),	/* 100 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(4, 3, 1),	/* 102 */
+  /* 1    */ V(3, 3, 1)
+};
+
+static
+struct huffpair const hufftab12[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ PTR(68, 3),
+  /* 0101 */ PTR(76, 1),
+  /* 0110 */ V(1, 2, 4),
+  /* 0111 */ V(2, 1, 4),
+  /* 1000 */ PTR(78, 1),
+  /* 1001 */ V(0, 0, 4),
+  /* 1010 */ V(1, 1, 3),
+  /* 1011 */ V(1, 1, 3),
+  /* 1100 */ V(0, 1, 3),
+  /* 1101 */ V(0, 1, 3),
+  /* 1110 */ V(1, 0, 3),
+  /* 1111 */ V(1, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(80, 2),	/* 16 */
+  /* 0001 */ PTR(84, 1),
+  /* 0010 */ PTR(86, 1),
+  /* 0011 */ PTR(88, 1),
+  /* 0100 */ V(5, 6, 4),
+  /* 0101 */ V(3, 7, 4),
+  /* 0110 */ PTR(90, 1),
+  /* 0111 */ V(2, 7, 4),
+  /* 1000 */ V(7, 2, 4),
+  /* 1001 */ V(4, 6, 4),
+  /* 1010 */ V(6, 4, 4),
+  /* 1011 */ V(1, 7, 4),
+  /* 1100 */ V(7, 1, 4),
+  /* 1101 */ PTR(92, 1),
+  /* 1110 */ V(3, 6, 4),
+  /* 1111 */ V(6, 3, 4),
+
+  /* 0001 ... */
+  /* 0000 */ V(4, 5, 4),	/* 32 */
+  /* 0001 */ V(5, 4, 4),
+  /* 0010 */ V(4, 4, 4),
+  /* 0011 */ PTR(94, 1),
+  /* 0100 */ V(2, 6, 3),
+  /* 0101 */ V(2, 6, 3),
+  /* 0110 */ V(6, 2, 3),
+  /* 0111 */ V(6, 2, 3),
+  /* 1000 */ V(6, 1, 3),
+  /* 1001 */ V(6, 1, 3),
+  /* 1010 */ V(1, 6, 4),
+  /* 1011 */ V(6, 0, 4),
+  /* 1100 */ V(3, 5, 4),
+  /* 1101 */ V(5, 3, 4),
+  /* 1110 */ V(2, 5, 4),
+  /* 1111 */ V(5, 2, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(1, 5, 3),	/* 48 */
+  /* 0001 */ V(1, 5, 3),
+  /* 0010 */ V(5, 1, 3),
+  /* 0011 */ V(5, 1, 3),
+  /* 0100 */ V(3, 4, 3),
+  /* 0101 */ V(3, 4, 3),
+  /* 0110 */ V(4, 3, 3),
+  /* 0111 */ V(4, 3, 3),
+  /* 1000 */ V(5, 0, 4),
+  /* 1001 */ V(0, 4, 4),
+  /* 1010 */ V(2, 4, 3),
+  /* 1011 */ V(2, 4, 3),
+  /* 1100 */ V(4, 2, 3),
+  /* 1101 */ V(4, 2, 3),
+  /* 1110 */ V(1, 4, 3),
+  /* 1111 */ V(1, 4, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(3, 3, 2),	/* 64 */
+  /* 01   */ V(4, 1, 2),
+  /* 10   */ V(2, 3, 2),
+  /* 11   */ V(3, 2, 2),
+
+  /* 0100 ... */
+  /* 000  */ V(4, 0, 3),	/* 68 */
+  /* 001  */ V(0, 3, 3),
+  /* 010  */ V(3, 0, 2),
+  /* 011  */ V(3, 0, 2),
+  /* 100  */ V(1, 3, 1),
+  /* 101  */ V(1, 3, 1),
+  /* 110  */ V(1, 3, 1),
+  /* 111  */ V(1, 3, 1),
+
+  /* 0101 ... */
+  /* 0    */ V(3, 1, 1),	/* 76 */
+  /* 1    */ V(2, 2, 1),
+
+  /* 1000 ... */
+  /* 0    */ V(0, 2, 1),	/* 78 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 00   */ V(7, 7, 2),	/* 80 */
+  /* 01   */ V(6, 7, 2),
+  /* 10   */ V(7, 6, 1),
+  /* 11   */ V(7, 6, 1),
+
+  /* 0000 0001 ... */
+  /* 0    */ V(5, 7, 1),	/* 84 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0000 0010 ... */
+  /* 0    */ V(6, 6, 1),	/* 86 */
+  /* 1    */ V(4, 7, 1),
+
+  /* 0000 0011 ... */
+  /* 0    */ V(7, 4, 1),	/* 88 */
+  /* 1    */ V(6, 5, 1),
+
+  /* 0000 0110 ... */
+  /* 0    */ V(7, 3, 1),	/* 90 */
+  /* 1    */ V(5, 5, 1),
+
+  /* 0000 1101 ... */
+  /* 0    */ V(0, 7, 1),	/* 92 */
+  /* 1    */ V(7, 0, 1),
+
+  /* 0001 0011 ... */
+  /* 0    */ V(0, 6, 1),	/* 94 */
+  /* 1    */ V(0, 5, 1)
+};
+
+static
+struct huffpair const hufftab13[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ V(1, 1, 4),
+  /* 0101 */ V(0, 1, 4),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(68, 4),	/* 16 */
+  /* 0001 */ PTR(84, 4),
+  /* 0010 */ PTR(100, 4),
+  /* 0011 */ PTR(116, 4),
+  /* 0100 */ PTR(132, 4),
+  /* 0101 */ PTR(148, 4),
+  /* 0110 */ PTR(164, 3),
+  /* 0111 */ PTR(172, 3),
+  /* 1000 */ PTR(180, 3),
+  /* 1001 */ PTR(188, 3),
+  /* 1010 */ PTR(196, 3),
+  /* 1011 */ PTR(204, 3),
+  /* 1100 */ PTR(212, 1),
+  /* 1101 */ PTR(214, 2),
+  /* 1110 */ PTR(218, 3),
+  /* 1111 */ PTR(226, 1),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(228, 2),	/* 32 */
+  /* 0001 */ PTR(232, 2),
+  /* 0010 */ PTR(236, 2),
+  /* 0011 */ PTR(240, 2),
+  /* 0100 */ V(8, 1, 4),
+  /* 0101 */ PTR(244, 1),
+  /* 0110 */ PTR(246, 1),
+  /* 0111 */ PTR(248, 1),
+  /* 1000 */ PTR(250, 2),
+  /* 1001 */ PTR(254, 1),
+  /* 1010 */ V(1, 5, 4),
+  /* 1011 */ V(5, 1, 4),
+  /* 1100 */ PTR(256, 1),
+  /* 1101 */ PTR(258, 1),
+  /* 1110 */ PTR(260, 1),
+  /* 1111 */ V(1, 4, 4),
+
+  /* 0010 ... */
+  /* 0000 */ V(4, 1, 3),	/* 48 */
+  /* 0001 */ V(4, 1, 3),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 4),
+  /* 0101 */ V(3, 2, 4),
+  /* 0110 */ V(1, 3, 3),
+  /* 0111 */ V(1, 3, 3),
+  /* 1000 */ V(3, 1, 3),
+  /* 1001 */ V(3, 1, 3),
+  /* 1010 */ V(0, 3, 3),
+  /* 1011 */ V(0, 3, 3),
+  /* 1100 */ V(3, 0, 3),
+  /* 1101 */ V(3, 0, 3),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(1, 2, 2),	/* 64 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 0000 */ PTR(262, 4),	/* 68 */
+  /* 0001 */ PTR(278, 4),
+  /* 0010 */ PTR(294, 4),
+  /* 0011 */ PTR(310, 3),
+  /* 0100 */ PTR(318, 2),
+  /* 0101 */ PTR(322, 2),
+  /* 0110 */ PTR(326, 3),
+  /* 0111 */ PTR(334, 2),
+  /* 1000 */ PTR(338, 1),
+  /* 1001 */ PTR(340, 2),
+  /* 1010 */ PTR(344, 2),
+  /* 1011 */ PTR(348, 2),
+  /* 1100 */ PTR(352, 2),
+  /* 1101 */ PTR(356, 2),
+  /* 1110 */ V(1, 15, 4),
+  /* 1111 */ V(15, 1, 4),
+
+  /* 0000 0001 ... */
+  /* 0000 */ V(15, 0, 4),	/* 84 */
+  /* 0001 */ PTR(360, 1),
+  /* 0010 */ PTR(362, 1),
+  /* 0011 */ PTR(364, 1),
+  /* 0100 */ V(14, 2, 4),
+  /* 0101 */ PTR(366, 1),
+  /* 0110 */ V(1, 14, 4),
+  /* 0111 */ V(14, 1, 4),
+  /* 1000 */ PTR(368, 1),
+  /* 1001 */ PTR(370, 1),
+  /* 1010 */ PTR(372, 1),
+  /* 1011 */ PTR(374, 1),
+  /* 1100 */ PTR(376, 1),
+  /* 1101 */ PTR(378, 1),
+  /* 1110 */ V(12, 6, 4),
+  /* 1111 */ V(3, 13, 4),
+
+  /* 0000 0010 ... */
+  /* 0000 */ PTR(380, 1),	/* 100 */
+  /* 0001 */ V(2, 13, 4),
+  /* 0010 */ V(13, 2, 4),
+  /* 0011 */ V(1, 13, 4),
+  /* 0100 */ V(11, 7, 4),
+  /* 0101 */ PTR(382, 1),
+  /* 0110 */ PTR(384, 1),
+  /* 0111 */ V(12, 3, 4),
+  /* 1000 */ PTR(386, 1),
+  /* 1001 */ V(4, 11, 4),
+  /* 1010 */ V(13, 1, 3),
+  /* 1011 */ V(13, 1, 3),
+  /* 1100 */ V(0, 13, 4),
+  /* 1101 */ V(13, 0, 4),
+  /* 1110 */ V(8, 10, 4),
+  /* 1111 */ V(10, 8, 4),
+
+  /* 0000 0011 ... */
+  /* 0000 */ V(4, 12, 4),	/* 116 */
+  /* 0001 */ V(12, 4, 4),
+  /* 0010 */ V(6, 11, 4),
+  /* 0011 */ V(11, 6, 4),
+  /* 0100 */ V(3, 12, 3),
+  /* 0101 */ V(3, 12, 3),
+  /* 0110 */ V(2, 12, 3),
+  /* 0111 */ V(2, 12, 3),
+  /* 1000 */ V(12, 2, 3),
+  /* 1001 */ V(12, 2, 3),
+  /* 1010 */ V(5, 11, 3),
+  /* 1011 */ V(5, 11, 3),
+  /* 1100 */ V(11, 5, 4),
+  /* 1101 */ V(8, 9, 4),
+  /* 1110 */ V(1, 12, 3),
+  /* 1111 */ V(1, 12, 3),
+
+  /* 0000 0100 ... */
+  /* 0000 */ V(12, 1, 3),	/* 132 */
+  /* 0001 */ V(12, 1, 3),
+  /* 0010 */ V(9, 8, 4),
+  /* 0011 */ V(0, 12, 4),
+  /* 0100 */ V(12, 0, 3),
+  /* 0101 */ V(12, 0, 3),
+  /* 0110 */ V(11, 4, 4),
+  /* 0111 */ V(6, 10, 4),
+  /* 1000 */ V(10, 6, 4),
+  /* 1001 */ V(7, 9, 4),
+  /* 1010 */ V(3, 11, 3),
+  /* 1011 */ V(3, 11, 3),
+  /* 1100 */ V(11, 3, 3),
+  /* 1101 */ V(11, 3, 3),
+  /* 1110 */ V(8, 8, 4),
+  /* 1111 */ V(5, 10, 4),
+
+  /* 0000 0101 ... */
+  /* 0000 */ V(2, 11, 3),	/* 148 */
+  /* 0001 */ V(2, 11, 3),
+  /* 0010 */ V(10, 5, 4),
+  /* 0011 */ V(6, 9, 4),
+  /* 0100 */ V(10, 4, 3),
+  /* 0101 */ V(10, 4, 3),
+  /* 0110 */ V(7, 8, 4),
+  /* 0111 */ V(8, 7, 4),
+  /* 1000 */ V(9, 4, 3),
+  /* 1001 */ V(9, 4, 3),
+  /* 1010 */ V(7, 7, 4),
+  /* 1011 */ V(7, 6, 4),
+  /* 1100 */ V(11, 2, 2),
+  /* 1101 */ V(11, 2, 2),
+  /* 1110 */ V(11, 2, 2),
+  /* 1111 */ V(11, 2, 2),
+
+  /* 0000 0110 ... */
+  /* 000  */ V(1, 11, 2),	/* 164 */
+  /* 001  */ V(1, 11, 2),
+  /* 010  */ V(11, 1, 2),
+  /* 011  */ V(11, 1, 2),
+  /* 100  */ V(0, 11, 3),
+  /* 101  */ V(11, 0, 3),
+  /* 110  */ V(9, 6, 3),
+  /* 111  */ V(4, 10, 3),
+
+  /* 0000 0111 ... */
+  /* 000  */ V(3, 10, 3),	/* 172 */
+  /* 001  */ V(10, 3, 3),
+  /* 010  */ V(5, 9, 3),
+  /* 011  */ V(9, 5, 3),
+  /* 100  */ V(2, 10, 2),
+  /* 101  */ V(2, 10, 2),
+  /* 110  */ V(10, 2, 2),
+  /* 111  */ V(10, 2, 2),
+
+  /* 0000 1000 ... */
+  /* 000  */ V(1, 10, 2),	/* 180 */
+  /* 001  */ V(1, 10, 2),
+  /* 010  */ V(10, 1, 2),
+  /* 011  */ V(10, 1, 2),
+  /* 100  */ V(0, 10, 3),
+  /* 101  */ V(6, 8, 3),
+  /* 110  */ V(10, 0, 2),
+  /* 111  */ V(10, 0, 2),
+
+  /* 0000 1001 ... */
+  /* 000  */ V(8, 6, 3),	/* 188 */
+  /* 001  */ V(4, 9, 3),
+  /* 010  */ V(9, 3, 2),
+  /* 011  */ V(9, 3, 2),
+  /* 100  */ V(3, 9, 3),
+  /* 101  */ V(5, 8, 3),
+  /* 110  */ V(8, 5, 3),
+  /* 111  */ V(6, 7, 3),
+
+  /* 0000 1010 ... */
+  /* 000  */ V(2, 9, 2),	/* 196 */
+  /* 001  */ V(2, 9, 2),
+  /* 010  */ V(9, 2, 2),
+  /* 011  */ V(9, 2, 2),
+  /* 100  */ V(5, 7, 3),
+  /* 101  */ V(7, 5, 3),
+  /* 110  */ V(3, 8, 2),
+  /* 111  */ V(3, 8, 2),
+
+  /* 0000 1011 ... */
+  /* 000  */ V(8, 3, 2),	/* 204 */
+  /* 001  */ V(8, 3, 2),
+  /* 010  */ V(6, 6, 3),
+  /* 011  */ V(4, 7, 3),
+  /* 100  */ V(7, 4, 3),
+  /* 101  */ V(5, 6, 3),
+  /* 110  */ V(6, 5, 3),
+  /* 111  */ V(7, 3, 3),
+
+  /* 0000 1100 ... */
+  /* 0    */ V(1, 9, 1),	/* 212 */
+  /* 1    */ V(9, 1, 1),
+
+  /* 0000 1101 ... */
+  /* 00   */ V(0, 9, 2),	/* 214 */
+  /* 01   */ V(9, 0, 2),
+  /* 10   */ V(4, 8, 2),
+  /* 11   */ V(8, 4, 2),
+
+  /* 0000 1110 ... */
+  /* 000  */ V(7, 2, 2),	/* 218 */
+  /* 001  */ V(7, 2, 2),
+  /* 010  */ V(4, 6, 3),
+  /* 011  */ V(6, 4, 3),
+  /* 100  */ V(2, 8, 1),
+  /* 101  */ V(2, 8, 1),
+  /* 110  */ V(2, 8, 1),
+  /* 111  */ V(2, 8, 1),
+
+  /* 0000 1111 ... */
+  /* 0    */ V(8, 2, 1),	/* 226 */
+  /* 1    */ V(1, 8, 1),
+
+  /* 0001 0000 ... */
+  /* 00   */ V(3, 7, 2),	/* 228 */
+  /* 01   */ V(2, 7, 2),
+  /* 10   */ V(1, 7, 1),
+  /* 11   */ V(1, 7, 1),
+
+  /* 0001 0001 ... */
+  /* 00   */ V(7, 1, 1),	/* 232 */
+  /* 01   */ V(7, 1, 1),
+  /* 10   */ V(5, 5, 2),
+  /* 11   */ V(0, 7, 2),
+
+  /* 0001 0010 ... */
+  /* 00   */ V(7, 0, 2),	/* 236 */
+  /* 01   */ V(3, 6, 2),
+  /* 10   */ V(6, 3, 2),
+  /* 11   */ V(4, 5, 2),
+
+  /* 0001 0011 ... */
+  /* 00   */ V(5, 4, 2),	/* 240 */
+  /* 01   */ V(2, 6, 2),
+  /* 10   */ V(6, 2, 2),
+  /* 11   */ V(3, 5, 2),
+
+  /* 0001 0101 ... */
+  /* 0    */ V(0, 8, 1),	/* 244 */
+  /* 1    */ V(8, 0, 1),
+
+  /* 0001 0110 ... */
+  /* 0    */ V(1, 6, 1),	/* 246 */
+  /* 1    */ V(6, 1, 1),
+
+  /* 0001 0111 ... */
+  /* 0    */ V(0, 6, 1),	/* 248 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 0001 1000 ... */
+  /* 00   */ V(5, 3, 2),	/* 250 */
+  /* 01   */ V(4, 4, 2),
+  /* 10   */ V(2, 5, 1),
+  /* 11   */ V(2, 5, 1),
+
+  /* 0001 1001 ... */
+  /* 0    */ V(5, 2, 1),	/* 254 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0001 1100 ... */
+  /* 0    */ V(3, 4, 1),	/* 256 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(5, 0, 1),	/* 258 */
+  /* 1    */ V(2, 4, 1),
+
+  /* 0001 1110 ... */
+  /* 0    */ V(4, 2, 1),	/* 260 */
+  /* 1    */ V(3, 3, 1),
+
+  /* 0000 0000 0000 ... */
+  /* 0000 */ PTR(388, 3),	/* 262 */
+  /* 0001 */ V(15, 15, 4),
+  /* 0010 */ V(14, 15, 4),
+  /* 0011 */ V(13, 15, 4),
+  /* 0100 */ V(14, 14, 4),
+  /* 0101 */ V(12, 15, 4),
+  /* 0110 */ V(13, 14, 4),
+  /* 0111 */ V(11, 15, 4),
+  /* 1000 */ V(15, 11, 4),
+  /* 1001 */ V(12, 14, 4),
+  /* 1010 */ V(13, 12, 4),
+  /* 1011 */ PTR(396, 1),
+  /* 1100 */ V(14, 12, 3),
+  /* 1101 */ V(14, 12, 3),
+  /* 1110 */ V(13, 13, 3),
+  /* 1111 */ V(13, 13, 3),
+
+  /* 0000 0000 0001 ... */
+  /* 0000 */ V(15, 10, 4),	/* 278 */
+  /* 0001 */ V(12, 13, 4),
+  /* 0010 */ V(11, 14, 3),
+  /* 0011 */ V(11, 14, 3),
+  /* 0100 */ V(14, 11, 3),
+  /* 0101 */ V(14, 11, 3),
+  /* 0110 */ V(9, 15, 3),
+  /* 0111 */ V(9, 15, 3),
+  /* 1000 */ V(15, 9, 3),
+  /* 1001 */ V(15, 9, 3),
+  /* 1010 */ V(14, 10, 3),
+  /* 1011 */ V(14, 10, 3),
+  /* 1100 */ V(11, 13, 3),
+  /* 1101 */ V(11, 13, 3),
+  /* 1110 */ V(13, 11, 3),
+  /* 1111 */ V(13, 11, 3),
+
+  /* 0000 0000 0010 ... */
+  /* 0000 */ V(8, 15, 3),	/* 294 */
+  /* 0001 */ V(8, 15, 3),
+  /* 0010 */ V(15, 8, 3),
+  /* 0011 */ V(15, 8, 3),
+  /* 0100 */ V(12, 12, 3),
+  /* 0101 */ V(12, 12, 3),
+  /* 0110 */ V(10, 14, 4),
+  /* 0111 */ V(9, 14, 4),
+  /* 1000 */ V(8, 14, 3),
+  /* 1001 */ V(8, 14, 3),
+  /* 1010 */ V(7, 15, 4),
+  /* 1011 */ V(7, 14, 4),
+  /* 1100 */ V(15, 7, 2),
+  /* 1101 */ V(15, 7, 2),
+  /* 1110 */ V(15, 7, 2),
+  /* 1111 */ V(15, 7, 2),
+
+  /* 0000 0000 0011 ... */
+  /* 000  */ V(13, 10, 2),	/* 310 */
+  /* 001  */ V(13, 10, 2),
+  /* 010  */ V(10, 13, 3),
+  /* 011  */ V(11, 12, 3),
+  /* 100  */ V(12, 11, 3),
+  /* 101  */ V(15, 6, 3),
+  /* 110  */ V(6, 15, 2),
+  /* 111  */ V(6, 15, 2),
+
+  /* 0000 0000 0100 ... */
+  /* 00   */ V(14, 8, 2),	/* 318 */
+  /* 01   */ V(5, 15, 2),
+  /* 10   */ V(9, 13, 2),
+  /* 11   */ V(13, 9, 2),
+
+  /* 0000 0000 0101 ... */
+  /* 00   */ V(15, 5, 2),	/* 322 */
+  /* 01   */ V(14, 7, 2),
+  /* 10   */ V(10, 12, 2),
+  /* 11   */ V(11, 11, 2),
+
+  /* 0000 0000 0110 ... */
+  /* 000  */ V(4, 15, 2),	/* 326 */
+  /* 001  */ V(4, 15, 2),
+  /* 010  */ V(15, 4, 2),
+  /* 011  */ V(15, 4, 2),
+  /* 100  */ V(12, 10, 3),
+  /* 101  */ V(14, 6, 3),
+  /* 110  */ V(15, 3, 2),
+  /* 111  */ V(15, 3, 2),
+
+  /* 0000 0000 0111 ... */
+  /* 00   */ V(3, 15, 1),	/* 334 */
+  /* 01   */ V(3, 15, 1),
+  /* 10   */ V(8, 13, 2),
+  /* 11   */ V(13, 8, 2),
+
+  /* 0000 0000 1000 ... */
+  /* 0    */ V(2, 15, 1),	/* 338 */
+  /* 1    */ V(15, 2, 1),
+
+  /* 0000 0000 1001 ... */
+  /* 00   */ V(6, 14, 2),	/* 340 */
+  /* 01   */ V(9, 12, 2),
+  /* 10   */ V(0, 15, 1),
+  /* 11   */ V(0, 15, 1),
+
+  /* 0000 0000 1010 ... */
+  /* 00   */ V(12, 9, 2),	/* 344 */
+  /* 01   */ V(5, 14, 2),
+  /* 10   */ V(10, 11, 1),
+  /* 11   */ V(10, 11, 1),
+
+  /* 0000 0000 1011 ... */
+  /* 00   */ V(7, 13, 2),	/* 348 */
+  /* 01   */ V(13, 7, 2),
+  /* 10   */ V(4, 14, 1),
+  /* 11   */ V(4, 14, 1),
+
+  /* 0000 0000 1100 ... */
+  /* 00   */ V(12, 8, 2),	/* 352 */
+  /* 01   */ V(13, 6, 2),
+  /* 10   */ V(3, 14, 1),
+  /* 11   */ V(3, 14, 1),
+
+  /* 0000 0000 1101 ... */
+  /* 00   */ V(11, 9, 1),	/* 356 */
+  /* 01   */ V(11, 9, 1),
+  /* 10   */ V(9, 11, 2),
+  /* 11   */ V(10, 10, 2),
+
+  /* 0000 0001 0001 ... */
+  /* 0    */ V(11, 10, 1),	/* 360 */
+  /* 1    */ V(14, 5, 1),
+
+  /* 0000 0001 0010 ... */
+  /* 0    */ V(14, 4, 1),	/* 362 */
+  /* 1    */ V(8, 12, 1),
+
+  /* 0000 0001 0011 ... */
+  /* 0    */ V(6, 13, 1),	/* 364 */
+  /* 1    */ V(14, 3, 1),
+
+  /* 0000 0001 0101 ... */
+  /* 0    */ V(2, 14, 1),	/* 366 */
+  /* 1    */ V(0, 14, 1),
+
+  /* 0000 0001 1000 ... */
+  /* 0    */ V(14, 0, 1),	/* 368 */
+  /* 1    */ V(5, 13, 1),
+
+  /* 0000 0001 1001 ... */
+  /* 0    */ V(13, 5, 1),	/* 370 */
+  /* 1    */ V(7, 12, 1),
+
+  /* 0000 0001 1010 ... */
+  /* 0    */ V(12, 7, 1),	/* 372 */
+  /* 1    */ V(4, 13, 1),
+
+  /* 0000 0001 1011 ... */
+  /* 0    */ V(8, 11, 1),	/* 374 */
+  /* 1    */ V(11, 8, 1),
+
+  /* 0000 0001 1100 ... */
+  /* 0    */ V(13, 4, 1),	/* 376 */
+  /* 1    */ V(9, 10, 1),
+
+  /* 0000 0001 1101 ... */
+  /* 0    */ V(10, 9, 1),	/* 378 */
+  /* 1    */ V(6, 12, 1),
+
+  /* 0000 0010 0000 ... */
+  /* 0    */ V(13, 3, 1),	/* 380 */
+  /* 1    */ V(7, 11, 1),
+
+  /* 0000 0010 0101 ... */
+  /* 0    */ V(5, 12, 1),	/* 382 */
+  /* 1    */ V(12, 5, 1),
+
+  /* 0000 0010 0110 ... */
+  /* 0    */ V(9, 9, 1),	/* 384 */
+  /* 1    */ V(7, 10, 1),
+
+  /* 0000 0010 1000 ... */
+  /* 0    */ V(10, 7, 1),	/* 386 */
+  /* 1    */ V(9, 7, 1),
+
+  /* 0000 0000 0000 0000 ... */
+  /* 000  */ V(15, 14, 3),	/* 388 */
+  /* 001  */ V(15, 12, 3),
+  /* 010  */ V(15, 13, 2),
+  /* 011  */ V(15, 13, 2),
+  /* 100  */ V(14, 13, 1),
+  /* 101  */ V(14, 13, 1),
+  /* 110  */ V(14, 13, 1),
+  /* 111  */ V(14, 13, 1),
+
+  /* 0000 0000 0000 1011 ... */
+  /* 0    */ V(10, 15, 1),	/* 396 */
+  /* 1    */ V(14, 9, 1)
+};
+
+static
+struct huffpair const hufftab15[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 4),
+  /* 0100 */ PTR(80, 4),
+  /* 0101 */ PTR(96, 3),
+  /* 0110 */ PTR(104, 3),
+  /* 0111 */ PTR(112, 2),
+  /* 1000 */ PTR(116, 1),
+  /* 1001 */ PTR(118, 1),
+  /* 1010 */ V(1, 1, 3),
+  /* 1011 */ V(1, 1, 3),
+  /* 1100 */ V(0, 1, 4),
+  /* 1101 */ V(1, 0, 4),
+  /* 1110 */ V(0, 0, 3),
+  /* 1111 */ V(0, 0, 3),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(120, 4),	/* 16 */
+  /* 0001 */ PTR(136, 4),
+  /* 0010 */ PTR(152, 4),
+  /* 0011 */ PTR(168, 4),
+  /* 0100 */ PTR(184, 4),
+  /* 0101 */ PTR(200, 3),
+  /* 0110 */ PTR(208, 3),
+  /* 0111 */ PTR(216, 4),
+  /* 1000 */ PTR(232, 3),
+  /* 1001 */ PTR(240, 3),
+  /* 1010 */ PTR(248, 3),
+  /* 1011 */ PTR(256, 3),
+  /* 1100 */ PTR(264, 2),
+  /* 1101 */ PTR(268, 3),
+  /* 1110 */ PTR(276, 3),
+  /* 1111 */ PTR(284, 2),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(288, 2),	/* 32 */
+  /* 0001 */ PTR(292, 2),
+  /* 0010 */ PTR(296, 2),
+  /* 0011 */ PTR(300, 2),
+  /* 0100 */ PTR(304, 2),
+  /* 0101 */ PTR(308, 2),
+  /* 0110 */ PTR(312, 2),
+  /* 0111 */ PTR(316, 2),
+  /* 1000 */ PTR(320, 1),
+  /* 1001 */ PTR(322, 1),
+  /* 1010 */ PTR(324, 1),
+  /* 1011 */ PTR(326, 2),
+  /* 1100 */ PTR(330, 1),
+  /* 1101 */ PTR(332, 1),
+  /* 1110 */ PTR(334, 2),
+  /* 1111 */ PTR(338, 1),
+
+  /* 0010 ... */
+  /* 0000 */ PTR(340, 1),	/* 48 */
+  /* 0001 */ PTR(342, 1),
+  /* 0010 */ V(9, 1, 4),
+  /* 0011 */ PTR(344, 1),
+  /* 0100 */ PTR(346, 1),
+  /* 0101 */ PTR(348, 1),
+  /* 0110 */ PTR(350, 1),
+  /* 0111 */ PTR(352, 1),
+  /* 1000 */ V(2, 8, 4),
+  /* 1001 */ V(8, 2, 4),
+  /* 1010 */ V(1, 8, 4),
+  /* 1011 */ V(8, 1, 4),
+  /* 1100 */ PTR(354, 1),
+  /* 1101 */ PTR(356, 1),
+  /* 1110 */ PTR(358, 1),
+  /* 1111 */ PTR(360, 1),
+
+  /* 0011 ... */
+  /* 0000 */ V(2, 7, 4),	/* 64 */
+  /* 0001 */ V(7, 2, 4),
+  /* 0010 */ V(6, 4, 4),
+  /* 0011 */ V(1, 7, 4),
+  /* 0100 */ V(5, 5, 4),
+  /* 0101 */ V(7, 1, 4),
+  /* 0110 */ PTR(362, 1),
+  /* 0111 */ V(3, 6, 4),
+  /* 1000 */ V(6, 3, 4),
+  /* 1001 */ V(4, 5, 4),
+  /* 1010 */ V(5, 4, 4),
+  /* 1011 */ V(2, 6, 4),
+  /* 1100 */ V(6, 2, 4),
+  /* 1101 */ V(1, 6, 4),
+  /* 1110 */ PTR(364, 1),
+  /* 1111 */ V(3, 5, 4),
+
+  /* 0100 ... */
+  /* 0000 */ V(6, 1, 3),	/* 80 */
+  /* 0001 */ V(6, 1, 3),
+  /* 0010 */ V(5, 3, 4),
+  /* 0011 */ V(4, 4, 4),
+  /* 0100 */ V(2, 5, 3),
+  /* 0101 */ V(2, 5, 3),
+  /* 0110 */ V(5, 2, 3),
+  /* 0111 */ V(5, 2, 3),
+  /* 1000 */ V(1, 5, 3),
+  /* 1001 */ V(1, 5, 3),
+  /* 1010 */ V(5, 1, 3),
+  /* 1011 */ V(5, 1, 3),
+  /* 1100 */ V(0, 5, 4),
+  /* 1101 */ V(5, 0, 4),
+  /* 1110 */ V(3, 4, 3),
+  /* 1111 */ V(3, 4, 3),
+
+  /* 0101 ... */
+  /* 000  */ V(4, 3, 3),	/* 96 */
+  /* 001  */ V(2, 4, 3),
+  /* 010  */ V(4, 2, 3),
+  /* 011  */ V(3, 3, 3),
+  /* 100  */ V(4, 1, 2),
+  /* 101  */ V(4, 1, 2),
+  /* 110  */ V(1, 4, 3),
+  /* 111  */ V(0, 4, 3),
+
+  /* 0110 ... */
+  /* 000  */ V(2, 3, 2),	/* 104 */
+  /* 001  */ V(2, 3, 2),
+  /* 010  */ V(3, 2, 2),
+  /* 011  */ V(3, 2, 2),
+  /* 100  */ V(4, 0, 3),
+  /* 101  */ V(0, 3, 3),
+  /* 110  */ V(1, 3, 2),
+  /* 111  */ V(1, 3, 2),
+
+  /* 0111 ... */
+  /* 00   */ V(3, 1, 2),	/* 112 */
+  /* 01   */ V(3, 0, 2),
+  /* 10   */ V(2, 2, 1),
+  /* 11   */ V(2, 2, 1),
+
+  /* 1000 ... */
+  /* 0    */ V(1, 2, 1),	/* 116 */
+  /* 1    */ V(2, 1, 1),
+
+  /* 1001 ... */
+  /* 0    */ V(0, 2, 1),	/* 118 */
+  /* 1    */ V(2, 0, 1),
+
+  /* 0000 0000 ... */
+  /* 0000 */ PTR(366, 1),	/* 120 */
+  /* 0001 */ PTR(368, 1),
+  /* 0010 */ V(14, 14, 4),
+  /* 0011 */ PTR(370, 1),
+  /* 0100 */ PTR(372, 1),
+  /* 0101 */ PTR(374, 1),
+  /* 0110 */ V(15, 11, 4),
+  /* 0111 */ PTR(376, 1),
+  /* 1000 */ V(13, 13, 4),
+  /* 1001 */ V(10, 15, 4),
+  /* 1010 */ V(15, 10, 4),
+  /* 1011 */ V(11, 14, 4),
+  /* 1100 */ V(14, 11, 4),
+  /* 1101 */ V(12, 13, 4),
+  /* 1110 */ V(13, 12, 4),
+  /* 1111 */ V(9, 15, 4),
+
+  /* 0000 0001 ... */
+  /* 0000 */ V(15, 9, 4),	/* 136 */
+  /* 0001 */ V(14, 10, 4),
+  /* 0010 */ V(11, 13, 4),
+  /* 0011 */ V(13, 11, 4),
+  /* 0100 */ V(8, 15, 4),
+  /* 0101 */ V(15, 8, 4),
+  /* 0110 */ V(12, 12, 4),
+  /* 0111 */ V(9, 14, 4),
+  /* 1000 */ V(14, 9, 4),
+  /* 1001 */ V(7, 15, 4),
+  /* 1010 */ V(15, 7, 4),
+  /* 1011 */ V(10, 13, 4),
+  /* 1100 */ V(13, 10, 4),
+  /* 1101 */ V(11, 12, 4),
+  /* 1110 */ V(6, 15, 4),
+  /* 1111 */ PTR(378, 1),
+
+  /* 0000 0010 ... */
+  /* 0000 */ V(12, 11, 3),	/* 152 */
+  /* 0001 */ V(12, 11, 3),
+  /* 0010 */ V(15, 6, 3),
+  /* 0011 */ V(15, 6, 3),
+  /* 0100 */ V(8, 14, 4),
+  /* 0101 */ V(14, 8, 4),
+  /* 0110 */ V(5, 15, 4),
+  /* 0111 */ V(9, 13, 4),
+  /* 1000 */ V(15, 5, 3),
+  /* 1001 */ V(15, 5, 3),
+  /* 1010 */ V(7, 14, 3),
+  /* 1011 */ V(7, 14, 3),
+  /* 1100 */ V(14, 7, 3),
+  /* 1101 */ V(14, 7, 3),
+  /* 1110 */ V(10, 12, 3),
+  /* 1111 */ V(10, 12, 3),
+
+  /* 0000 0011 ... */
+  /* 0000 */ V(12, 10, 3),	/* 168 */
+  /* 0001 */ V(12, 10, 3),
+  /* 0010 */ V(11, 11, 3),
+  /* 0011 */ V(11, 11, 3),
+  /* 0100 */ V(13, 9, 4),
+  /* 0101 */ V(8, 13, 4),
+  /* 0110 */ V(4, 15, 3),
+  /* 0111 */ V(4, 15, 3),
+  /* 1000 */ V(15, 4, 3),
+  /* 1001 */ V(15, 4, 3),
+  /* 1010 */ V(3, 15, 3),
+  /* 1011 */ V(3, 15, 3),
+  /* 1100 */ V(15, 3, 3),
+  /* 1101 */ V(15, 3, 3),
+  /* 1110 */ V(13, 8, 3),
+  /* 1111 */ V(13, 8, 3),
+
+  /* 0000 0100 ... */
+  /* 0000 */ V(14, 6, 3),	/* 184 */
+  /* 0001 */ V(14, 6, 3),
+  /* 0010 */ V(2, 15, 3),
+  /* 0011 */ V(2, 15, 3),
+  /* 0100 */ V(15, 2, 3),
+  /* 0101 */ V(15, 2, 3),
+  /* 0110 */ V(6, 14, 4),
+  /* 0111 */ V(15, 0, 4),
+  /* 1000 */ V(1, 15, 3),
+  /* 1001 */ V(1, 15, 3),
+  /* 1010 */ V(15, 1, 3),
+  /* 1011 */ V(15, 1, 3),
+  /* 1100 */ V(9, 12, 3),
+  /* 1101 */ V(9, 12, 3),
+  /* 1110 */ V(12, 9, 3),
+  /* 1111 */ V(12, 9, 3),
+
+  /* 0000 0101 ... */
+  /* 000  */ V(5, 14, 3),	/* 200 */
+  /* 001  */ V(10, 11, 3),
+  /* 010  */ V(11, 10, 3),
+  /* 011  */ V(14, 5, 3),
+  /* 100  */ V(7, 13, 3),
+  /* 101  */ V(13, 7, 3),
+  /* 110  */ V(4, 14, 3),
+  /* 111  */ V(14, 4, 3),
+
+  /* 0000 0110 ... */
+  /* 000  */ V(8, 12, 3),	/* 208 */
+  /* 001  */ V(12, 8, 3),
+  /* 010  */ V(3, 14, 3),
+  /* 011  */ V(6, 13, 3),
+  /* 100  */ V(13, 6, 3),
+  /* 101  */ V(14, 3, 3),
+  /* 110  */ V(9, 11, 3),
+  /* 111  */ V(11, 9, 3),
+
+  /* 0000 0111 ... */
+  /* 0000 */ V(2, 14, 3),	/* 216 */
+  /* 0001 */ V(2, 14, 3),
+  /* 0010 */ V(10, 10, 3),
+  /* 0011 */ V(10, 10, 3),
+  /* 0100 */ V(14, 2, 3),
+  /* 0101 */ V(14, 2, 3),
+  /* 0110 */ V(1, 14, 3),
+  /* 0111 */ V(1, 14, 3),
+  /* 1000 */ V(14, 1, 3),
+  /* 1001 */ V(14, 1, 3),
+  /* 1010 */ V(0, 14, 4),
+  /* 1011 */ V(14, 0, 4),
+  /* 1100 */ V(5, 13, 3),
+  /* 1101 */ V(5, 13, 3),
+  /* 1110 */ V(13, 5, 3),
+  /* 1111 */ V(13, 5, 3),
+
+  /* 0000 1000 ... */
+  /* 000  */ V(7, 12, 3),	/* 232 */
+  /* 001  */ V(12, 7, 3),
+  /* 010  */ V(4, 13, 3),
+  /* 011  */ V(8, 11, 3),
+  /* 100  */ V(13, 4, 2),
+  /* 101  */ V(13, 4, 2),
+  /* 110  */ V(11, 8, 3),
+  /* 111  */ V(9, 10, 3),
+
+  /* 0000 1001 ... */
+  /* 000  */ V(10, 9, 3),	/* 240 */
+  /* 001  */ V(6, 12, 3),
+  /* 010  */ V(12, 6, 3),
+  /* 011  */ V(3, 13, 3),
+  /* 100  */ V(13, 3, 2),
+  /* 101  */ V(13, 3, 2),
+  /* 110  */ V(13, 2, 2),
+  /* 111  */ V(13, 2, 2),
+
+  /* 0000 1010 ... */
+  /* 000  */ V(2, 13, 3),	/* 248 */
+  /* 001  */ V(0, 13, 3),
+  /* 010  */ V(1, 13, 2),
+  /* 011  */ V(1, 13, 2),
+  /* 100  */ V(7, 11, 2),
+  /* 101  */ V(7, 11, 2),
+  /* 110  */ V(11, 7, 2),
+  /* 111  */ V(11, 7, 2),
+
+  /* 0000 1011 ... */
+  /* 000  */ V(13, 1, 2),	/* 256 */
+  /* 001  */ V(13, 1, 2),
+  /* 010  */ V(5, 12, 3),
+  /* 011  */ V(13, 0, 3),
+  /* 100  */ V(12, 5, 2),
+  /* 101  */ V(12, 5, 2),
+  /* 110  */ V(8, 10, 2),
+  /* 111  */ V(8, 10, 2),
+
+  /* 0000 1100 ... */
+  /* 00   */ V(10, 8, 2),	/* 264 */
+  /* 01   */ V(4, 12, 2),
+  /* 10   */ V(12, 4, 2),
+  /* 11   */ V(6, 11, 2),
+
+  /* 0000 1101 ... */
+  /* 000  */ V(11, 6, 2),	/* 268 */
+  /* 001  */ V(11, 6, 2),
+  /* 010  */ V(9, 9, 3),
+  /* 011  */ V(0, 12, 3),
+  /* 100  */ V(3, 12, 2),
+  /* 101  */ V(3, 12, 2),
+  /* 110  */ V(12, 3, 2),
+  /* 111  */ V(12, 3, 2),
+
+  /* 0000 1110 ... */
+  /* 000  */ V(7, 10, 2),	/* 276 */
+  /* 001  */ V(7, 10, 2),
+  /* 010  */ V(10, 7, 2),
+  /* 011  */ V(10, 7, 2),
+  /* 100  */ V(10, 6, 2),
+  /* 101  */ V(10, 6, 2),
+  /* 110  */ V(12, 0, 3),
+  /* 111  */ V(0, 11, 3),
+
+  /* 0000 1111 ... */
+  /* 00   */ V(12, 2, 1),	/* 284 */
+  /* 01   */ V(12, 2, 1),
+  /* 10   */ V(2, 12, 2),
+  /* 11   */ V(5, 11, 2),
+
+  /* 0001 0000 ... */
+  /* 00   */ V(11, 5, 2),	/* 288 */
+  /* 01   */ V(1, 12, 2),
+  /* 10   */ V(8, 9, 2),
+  /* 11   */ V(9, 8, 2),
+
+  /* 0001 0001 ... */
+  /* 00   */ V(12, 1, 2),	/* 292 */
+  /* 01   */ V(4, 11, 2),
+  /* 10   */ V(11, 4, 2),
+  /* 11   */ V(6, 10, 2),
+
+  /* 0001 0010 ... */
+  /* 00   */ V(3, 11, 2),	/* 296 */
+  /* 01   */ V(7, 9, 2),
+  /* 10   */ V(11, 3, 1),
+  /* 11   */ V(11, 3, 1),
+
+  /* 0001 0011 ... */
+  /* 00   */ V(9, 7, 2),	/* 300 */
+  /* 01   */ V(8, 8, 2),
+  /* 10   */ V(2, 11, 2),
+  /* 11   */ V(5, 10, 2),
+
+  /* 0001 0100 ... */
+  /* 00   */ V(11, 2, 1),	/* 304 */
+  /* 01   */ V(11, 2, 1),
+  /* 10   */ V(10, 5, 2),
+  /* 11   */ V(1, 11, 2),
+
+  /* 0001 0101 ... */
+  /* 00   */ V(11, 1, 1),	/* 308 */
+  /* 01   */ V(11, 1, 1),
+  /* 10   */ V(11, 0, 2),
+  /* 11   */ V(6, 9, 2),
+
+  /* 0001 0110 ... */
+  /* 00   */ V(9, 6, 2),	/* 312 */
+  /* 01   */ V(4, 10, 2),
+  /* 10   */ V(10, 4, 2),
+  /* 11   */ V(7, 8, 2),
+
+  /* 0001 0111 ... */
+  /* 00   */ V(8, 7, 2),	/* 316 */
+  /* 01   */ V(3, 10, 2),
+  /* 10   */ V(10, 3, 1),
+  /* 11   */ V(10, 3, 1),
+
+  /* 0001 1000 ... */
+  /* 0    */ V(5, 9, 1),	/* 320 */
+  /* 1    */ V(9, 5, 1),
+
+  /* 0001 1001 ... */
+  /* 0    */ V(2, 10, 1),	/* 322 */
+  /* 1    */ V(10, 2, 1),
+
+  /* 0001 1010 ... */
+  /* 0    */ V(1, 10, 1),	/* 324 */
+  /* 1    */ V(10, 1, 1),
+
+  /* 0001 1011 ... */
+  /* 00   */ V(0, 10, 2),	/* 326 */
+  /* 01   */ V(10, 0, 2),
+  /* 10   */ V(6, 8, 1),
+  /* 11   */ V(6, 8, 1),
+
+  /* 0001 1100 ... */
+  /* 0    */ V(8, 6, 1),	/* 330 */
+  /* 1    */ V(4, 9, 1),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(9, 4, 1),	/* 332 */
+  /* 1    */ V(3, 9, 1),
+
+  /* 0001 1110 ... */
+  /* 00   */ V(9, 3, 1),	/* 334 */
+  /* 01   */ V(9, 3, 1),
+  /* 10   */ V(7, 7, 2),
+  /* 11   */ V(0, 9, 2),
+
+  /* 0001 1111 ... */
+  /* 0    */ V(5, 8, 1),	/* 338 */
+  /* 1    */ V(8, 5, 1),
+
+  /* 0010 0000 ... */
+  /* 0    */ V(2, 9, 1),	/* 340 */
+  /* 1    */ V(6, 7, 1),
+
+  /* 0010 0001 ... */
+  /* 0    */ V(7, 6, 1),	/* 342 */
+  /* 1    */ V(9, 2, 1),
+
+  /* 0010 0011 ... */
+  /* 0    */ V(1, 9, 1),	/* 344 */
+  /* 1    */ V(9, 0, 1),
+
+  /* 0010 0100 ... */
+  /* 0    */ V(4, 8, 1),	/* 346 */
+  /* 1    */ V(8, 4, 1),
+
+  /* 0010 0101 ... */
+  /* 0    */ V(5, 7, 1),	/* 348 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0010 0110 ... */
+  /* 0    */ V(3, 8, 1),	/* 350 */
+  /* 1    */ V(8, 3, 1),
+
+  /* 0010 0111 ... */
+  /* 0    */ V(6, 6, 1),	/* 352 */
+  /* 1    */ V(4, 7, 1),
+
+  /* 0010 1100 ... */
+  /* 0    */ V(7, 4, 1),	/* 354 */
+  /* 1    */ V(0, 8, 1),
+
+  /* 0010 1101 ... */
+  /* 0    */ V(8, 0, 1),	/* 356 */
+  /* 1    */ V(5, 6, 1),
+
+  /* 0010 1110 ... */
+  /* 0    */ V(6, 5, 1),	/* 358 */
+  /* 1    */ V(3, 7, 1),
+
+  /* 0010 1111 ... */
+  /* 0    */ V(7, 3, 1),	/* 360 */
+  /* 1    */ V(4, 6, 1),
+
+  /* 0011 0110 ... */
+  /* 0    */ V(0, 7, 1),	/* 362 */
+  /* 1    */ V(7, 0, 1),
+
+  /* 0011 1110 ... */
+  /* 0    */ V(0, 6, 1),	/* 364 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 0000 0000 0000 ... */
+  /* 0    */ V(15, 15, 1),	/* 366 */
+  /* 1    */ V(14, 15, 1),
+
+  /* 0000 0000 0001 ... */
+  /* 0    */ V(15, 14, 1),	/* 368 */
+  /* 1    */ V(13, 15, 1),
+
+  /* 0000 0000 0011 ... */
+  /* 0    */ V(15, 13, 1),	/* 370 */
+  /* 1    */ V(12, 15, 1),
+
+  /* 0000 0000 0100 ... */
+  /* 0    */ V(15, 12, 1),	/* 372 */
+  /* 1    */ V(13, 14, 1),
+
+  /* 0000 0000 0101 ... */
+  /* 0    */ V(14, 13, 1),	/* 374 */
+  /* 1    */ V(11, 15, 1),
+
+  /* 0000 0000 0111 ... */
+  /* 0    */ V(12, 14, 1),	/* 376 */
+  /* 1    */ V(14, 12, 1),
+
+  /* 0000 0001 1111 ... */
+  /* 0    */ V(10, 14, 1),	/* 378 */
+  /* 1    */ V(0, 15, 1)
+};
+
+static
+struct huffpair const hufftab16[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ PTR(64, 2),
+  /* 0100 */ V(1, 1, 4),
+  /* 0101 */ V(0, 1, 4),
+  /* 0110 */ V(1, 0, 3),
+  /* 0111 */ V(1, 0, 3),
+  /* 1000 */ V(0, 0, 1),
+  /* 1001 */ V(0, 0, 1),
+  /* 1010 */ V(0, 0, 1),
+  /* 1011 */ V(0, 0, 1),
+  /* 1100 */ V(0, 0, 1),
+  /* 1101 */ V(0, 0, 1),
+  /* 1110 */ V(0, 0, 1),
+  /* 1111 */ V(0, 0, 1),
+
+  /* 0000 ... */
+  /* 0000 */ PTR(68, 3),	/* 16 */
+  /* 0001 */ PTR(76, 3),
+  /* 0010 */ PTR(84, 2),
+  /* 0011 */ V(15, 15, 4),
+  /* 0100 */ PTR(88, 2),
+  /* 0101 */ PTR(92, 1),
+  /* 0110 */ PTR(94, 4),
+  /* 0111 */ V(15, 2, 4),
+  /* 1000 */ PTR(110, 1),
+  /* 1001 */ V(1, 15, 4),
+  /* 1010 */ V(15, 1, 4),
+  /* 1011 */ PTR(112, 4),
+  /* 1100 */ PTR(128, 4),
+  /* 1101 */ PTR(144, 4),
+  /* 1110 */ PTR(160, 4),
+  /* 1111 */ PTR(176, 4),
+
+  /* 0001 ... */
+  /* 0000 */ PTR(192, 4),	/* 32 */
+  /* 0001 */ PTR(208, 3),
+  /* 0010 */ PTR(216, 3),
+  /* 0011 */ PTR(224, 3),
+  /* 0100 */ PTR(232, 3),
+  /* 0101 */ PTR(240, 3),
+  /* 0110 */ PTR(248, 3),
+  /* 0111 */ PTR(256, 3),
+  /* 1000 */ PTR(264, 2),
+  /* 1001 */ PTR(268, 2),
+  /* 1010 */ PTR(272, 1),
+  /* 1011 */ PTR(274, 2),
+  /* 1100 */ PTR(278, 2),
+  /* 1101 */ PTR(282, 1),
+  /* 1110 */ V(5, 1, 4),
+  /* 1111 */ PTR(284, 1),
+
+  /* 0010 ... */
+  /* 0000 */ PTR(286, 1),	/* 48 */
+  /* 0001 */ PTR(288, 1),
+  /* 0010 */ PTR(290, 1),
+  /* 0011 */ V(1, 4, 4),
+  /* 0100 */ V(4, 1, 4),
+  /* 0101 */ PTR(292, 1),
+  /* 0110 */ V(2, 3, 4),
+  /* 0111 */ V(3, 2, 4),
+  /* 1000 */ V(1, 3, 3),
+  /* 1001 */ V(1, 3, 3),
+  /* 1010 */ V(3, 1, 3),
+  /* 1011 */ V(3, 1, 3),
+  /* 1100 */ V(0, 3, 4),
+  /* 1101 */ V(3, 0, 4),
+  /* 1110 */ V(2, 2, 3),
+  /* 1111 */ V(2, 2, 3),
+
+  /* 0011 ... */
+  /* 00   */ V(1, 2, 2),	/* 64 */
+  /* 01   */ V(2, 1, 2),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0000 0000 ... */
+  /* 000  */ V(14, 15, 3),	/* 68 */
+  /* 001  */ V(15, 14, 3),
+  /* 010  */ V(13, 15, 3),
+  /* 011  */ V(15, 13, 3),
+  /* 100  */ V(12, 15, 3),
+  /* 101  */ V(15, 12, 3),
+  /* 110  */ V(11, 15, 3),
+  /* 111  */ V(15, 11, 3),
+
+  /* 0000 0001 ... */
+  /* 000  */ V(10, 15, 2),	/* 76 */
+  /* 001  */ V(10, 15, 2),
+  /* 010  */ V(15, 10, 3),
+  /* 011  */ V(9, 15, 3),
+  /* 100  */ V(15, 9, 3),
+  /* 101  */ V(15, 8, 3),
+  /* 110  */ V(8, 15, 2),
+  /* 111  */ V(8, 15, 2),
+
+  /* 0000 0010 ... */
+  /* 00   */ V(7, 15, 2),	/* 84 */
+  /* 01   */ V(15, 7, 2),
+  /* 10   */ V(6, 15, 2),
+  /* 11   */ V(15, 6, 2),
+
+  /* 0000 0100 ... */
+  /* 00   */ V(5, 15, 2),	/* 88 */
+  /* 01   */ V(15, 5, 2),
+  /* 10   */ V(4, 15, 1),
+  /* 11   */ V(4, 15, 1),
+
+  /* 0000 0101 ... */
+  /* 0    */ V(15, 4, 1),	/* 92 */
+  /* 1    */ V(15, 3, 1),
+
+  /* 0000 0110 ... */
+  /* 0000 */ V(15, 0, 1),	/* 94 */
+  /* 0001 */ V(15, 0, 1),
+  /* 0010 */ V(15, 0, 1),
+  /* 0011 */ V(15, 0, 1),
+  /* 0100 */ V(15, 0, 1),
+  /* 0101 */ V(15, 0, 1),
+  /* 0110 */ V(15, 0, 1),
+  /* 0111 */ V(15, 0, 1),
+  /* 1000 */ V(3, 15, 2),
+  /* 1001 */ V(3, 15, 2),
+  /* 1010 */ V(3, 15, 2),
+  /* 1011 */ V(3, 15, 2),
+  /* 1100 */ PTR(294, 4),
+  /* 1101 */ PTR(310, 3),
+  /* 1110 */ PTR(318, 3),
+  /* 1111 */ PTR(326, 3),
+
+  /* 0000 1000 ... */
+  /* 0    */ V(2, 15, 1),	/* 110 */
+  /* 1    */ V(0, 15, 1),
+
+  /* 0000 1011 ... */
+  /* 0000 */ PTR(334, 2),	/* 112 */
+  /* 0001 */ PTR(338, 2),
+  /* 0010 */ PTR(342, 2),
+  /* 0011 */ PTR(346, 1),
+  /* 0100 */ PTR(348, 2),
+  /* 0101 */ PTR(352, 2),
+  /* 0110 */ PTR(356, 1),
+  /* 0111 */ PTR(358, 2),
+  /* 1000 */ PTR(362, 2),
+  /* 1001 */ PTR(366, 2),
+  /* 1010 */ PTR(370, 2),
+  /* 1011 */ V(14, 3, 4),
+  /* 1100 */ PTR(374, 1),
+  /* 1101 */ PTR(376, 1),
+  /* 1110 */ PTR(378, 1),
+  /* 1111 */ PTR(380, 1),
+
+  /* 0000 1100 ... */
+  /* 0000 */ PTR(382, 1),	/* 128 */
+  /* 0001 */ PTR(384, 1),
+  /* 0010 */ PTR(386, 1),
+  /* 0011 */ V(0, 13, 4),
+  /* 0100 */ PTR(388, 1),
+  /* 0101 */ PTR(390, 1),
+  /* 0110 */ PTR(392, 1),
+  /* 0111 */ V(3, 12, 4),
+  /* 1000 */ PTR(394, 1),
+  /* 1001 */ V(1, 12, 4),
+  /* 1010 */ V(12, 0, 4),
+  /* 1011 */ PTR(396, 1),
+  /* 1100 */ V(14, 2, 3),
+  /* 1101 */ V(14, 2, 3),
+  /* 1110 */ V(2, 14, 4),
+  /* 1111 */ V(1, 14, 4),
+
+  /* 0000 1101 ... */
+  /* 0000 */ V(13, 3, 4),	/* 144 */
+  /* 0001 */ V(2, 13, 4),
+  /* 0010 */ V(13, 2, 4),
+  /* 0011 */ V(13, 1, 4),
+  /* 0100 */ V(3, 11, 4),
+  /* 0101 */ PTR(398, 1),
+  /* 0110 */ V(1, 13, 3),
+  /* 0111 */ V(1, 13, 3),
+  /* 1000 */ V(12, 4, 4),
+  /* 1001 */ V(6, 11, 4),
+  /* 1010 */ V(12, 3, 4),
+  /* 1011 */ V(10, 7, 4),
+  /* 1100 */ V(2, 12, 3),
+  /* 1101 */ V(2, 12, 3),
+  /* 1110 */ V(12, 2, 4),
+  /* 1111 */ V(11, 5, 4),
+
+  /* 0000 1110 ... */
+  /* 0000 */ V(12, 1, 4),	/* 160 */
+  /* 0001 */ V(0, 12, 4),
+  /* 0010 */ V(4, 11, 4),
+  /* 0011 */ V(11, 4, 4),
+  /* 0100 */ V(6, 10, 4),
+  /* 0101 */ V(10, 6, 4),
+  /* 0110 */ V(11, 3, 3),
+  /* 0111 */ V(11, 3, 3),
+  /* 1000 */ V(5, 10, 4),
+  /* 1001 */ V(10, 5, 4),
+  /* 1010 */ V(2, 11, 3),
+  /* 1011 */ V(2, 11, 3),
+  /* 1100 */ V(11, 2, 3),
+  /* 1101 */ V(11, 2, 3),
+  /* 1110 */ V(1, 11, 3),
+  /* 1111 */ V(1, 11, 3),
+
+  /* 0000 1111 ... */
+  /* 0000 */ V(11, 1, 3),	/* 176 */
+  /* 0001 */ V(11, 1, 3),
+  /* 0010 */ V(0, 11, 4),
+  /* 0011 */ V(11, 0, 4),
+  /* 0100 */ V(6, 9, 4),
+  /* 0101 */ V(9, 6, 4),
+  /* 0110 */ V(4, 10, 4),
+  /* 0111 */ V(10, 4, 4),
+  /* 1000 */ V(7, 8, 4),
+  /* 1001 */ V(8, 7, 4),
+  /* 1010 */ V(10, 3, 3),
+  /* 1011 */ V(10, 3, 3),
+  /* 1100 */ V(3, 10, 4),
+  /* 1101 */ V(5, 9, 4),
+  /* 1110 */ V(2, 10, 3),
+  /* 1111 */ V(2, 10, 3),
+
+  /* 0001 0000 ... */
+  /* 0000 */ V(9, 5, 4),	/* 192 */
+  /* 0001 */ V(6, 8, 4),
+  /* 0010 */ V(10, 1, 3),
+  /* 0011 */ V(10, 1, 3),
+  /* 0100 */ V(8, 6, 4),
+  /* 0101 */ V(7, 7, 4),
+  /* 0110 */ V(9, 4, 3),
+  /* 0111 */ V(9, 4, 3),
+  /* 1000 */ V(4, 9, 4),
+  /* 1001 */ V(5, 7, 4),
+  /* 1010 */ V(6, 7, 3),
+  /* 1011 */ V(6, 7, 3),
+  /* 1100 */ V(10, 2, 2),
+  /* 1101 */ V(10, 2, 2),
+  /* 1110 */ V(10, 2, 2),
+  /* 1111 */ V(10, 2, 2),
+
+  /* 0001 0001 ... */
+  /* 000  */ V(1, 10, 2),	/* 208 */
+  /* 001  */ V(1, 10, 2),
+  /* 010  */ V(0, 10, 3),
+  /* 011  */ V(10, 0, 3),
+  /* 100  */ V(3, 9, 3),
+  /* 101  */ V(9, 3, 3),
+  /* 110  */ V(5, 8, 3),
+  /* 111  */ V(8, 5, 3),
+
+  /* 0001 0010 ... */
+  /* 000  */ V(2, 9, 2),	/* 216 */
+  /* 001  */ V(2, 9, 2),
+  /* 010  */ V(9, 2, 2),
+  /* 011  */ V(9, 2, 2),
+  /* 100  */ V(7, 6, 3),
+  /* 101  */ V(0, 9, 3),
+  /* 110  */ V(1, 9, 2),
+  /* 111  */ V(1, 9, 2),
+
+  /* 0001 0011 ... */
+  /* 000  */ V(9, 1, 2),	/* 224 */
+  /* 001  */ V(9, 1, 2),
+  /* 010  */ V(9, 0, 3),
+  /* 011  */ V(4, 8, 3),
+  /* 100  */ V(8, 4, 3),
+  /* 101  */ V(7, 5, 3),
+  /* 110  */ V(3, 8, 3),
+  /* 111  */ V(8, 3, 3),
+
+  /* 0001 0100 ... */
+  /* 000  */ V(6, 6, 3),	/* 232 */
+  /* 001  */ V(2, 8, 3),
+  /* 010  */ V(8, 2, 2),
+  /* 011  */ V(8, 2, 2),
+  /* 100  */ V(4, 7, 3),
+  /* 101  */ V(7, 4, 3),
+  /* 110  */ V(1, 8, 2),
+  /* 111  */ V(1, 8, 2),
+
+  /* 0001 0101 ... */
+  /* 000  */ V(8, 1, 2),	/* 240 */
+  /* 001  */ V(8, 1, 2),
+  /* 010  */ V(8, 0, 2),
+  /* 011  */ V(8, 0, 2),
+  /* 100  */ V(0, 8, 3),
+  /* 101  */ V(5, 6, 3),
+  /* 110  */ V(3, 7, 2),
+  /* 111  */ V(3, 7, 2),
+
+  /* 0001 0110 ... */
+  /* 000  */ V(7, 3, 2),	/* 248 */
+  /* 001  */ V(7, 3, 2),
+  /* 010  */ V(6, 5, 3),
+  /* 011  */ V(4, 6, 3),
+  /* 100  */ V(2, 7, 2),
+  /* 101  */ V(2, 7, 2),
+  /* 110  */ V(7, 2, 2),
+  /* 111  */ V(7, 2, 2),
+
+  /* 0001 0111 ... */
+  /* 000  */ V(6, 4, 3),	/* 256 */
+  /* 001  */ V(5, 5, 3),
+  /* 010  */ V(0, 7, 2),
+  /* 011  */ V(0, 7, 2),
+  /* 100  */ V(1, 7, 1),
+  /* 101  */ V(1, 7, 1),
+  /* 110  */ V(1, 7, 1),
+  /* 111  */ V(1, 7, 1),
+
+  /* 0001 1000 ... */
+  /* 00   */ V(7, 1, 1),	/* 264  */
+  /* 01   */ V(7, 1, 1),
+  /* 10   */ V(7, 0, 2),
+  /* 11   */ V(3, 6, 2),
+
+  /* 0001 1001 ... */
+  /* 00   */ V(6, 3, 2),	/* 268 */
+  /* 01   */ V(4, 5, 2),
+  /* 10   */ V(5, 4, 2),
+  /* 11   */ V(2, 6, 2),
+
+  /* 0001 1010 ... */
+  /* 0    */ V(6, 2, 1),	/* 272 */
+  /* 1    */ V(1, 6, 1),
+
+  /* 0001 1011 ... */
+  /* 00   */ V(6, 1, 1),	/* 274 */
+  /* 01   */ V(6, 1, 1),
+  /* 10   */ V(0, 6, 2),
+  /* 11   */ V(6, 0, 2),
+
+  /* 0001 1100 ... */
+  /* 00   */ V(5, 3, 1),	/* 278 */
+  /* 01   */ V(5, 3, 1),
+  /* 10   */ V(3, 5, 2),
+  /* 11   */ V(4, 4, 2),
+
+  /* 0001 1101 ... */
+  /* 0    */ V(2, 5, 1),	/* 282 */
+  /* 1    */ V(5, 2, 1),
+
+  /* 0001 1111 ... */
+  /* 0    */ V(1, 5, 1),	/* 284 */
+  /* 1    */ V(0, 5, 1),
+
+  /* 0010 0000 ... */
+  /* 0    */ V(3, 4, 1),	/* 286 */
+  /* 1    */ V(4, 3, 1),
+
+  /* 0010 0001 ... */
+  /* 0    */ V(5, 0, 1),	/* 288 */
+  /* 1    */ V(2, 4, 1),
+
+  /* 0010 0010 ... */
+  /* 0    */ V(4, 2, 1),	/* 290 */
+  /* 1    */ V(3, 3, 1),
+
+  /* 0010 0101 ... */
+  /* 0    */ V(0, 4, 1),	/* 292 */
+  /* 1    */ V(4, 0, 1),
+
+  /* 0000 0110 1100 ... */
+  /* 0000 */ V(12, 14, 4),	/* 294 */
+  /* 0001 */ PTR(400, 1),
+  /* 0010 */ V(13, 14, 3),
+  /* 0011 */ V(13, 14, 3),
+  /* 0100 */ V(14, 9, 3),
+  /* 0101 */ V(14, 9, 3),
+  /* 0110 */ V(14, 10, 4),
+  /* 0111 */ V(13, 9, 4),
+  /* 1000 */ V(14, 14, 2),
+  /* 1001 */ V(14, 14, 2),
+  /* 1010 */ V(14, 14, 2),
+  /* 1011 */ V(14, 14, 2),
+  /* 1100 */ V(14, 13, 3),
+  /* 1101 */ V(14, 13, 3),
+  /* 1110 */ V(14, 11, 3),
+  /* 1111 */ V(14, 11, 3),
+
+  /* 0000 0110 1101 ... */
+  /* 000  */ V(11, 14, 2),	/* 310 */
+  /* 001  */ V(11, 14, 2),
+  /* 010  */ V(12, 13, 2),
+  /* 011  */ V(12, 13, 2),
+  /* 100  */ V(13, 12, 3),
+  /* 101  */ V(13, 11, 3),
+  /* 110  */ V(10, 14, 2),
+  /* 111  */ V(10, 14, 2),
+
+  /* 0000 0110 1110 ... */
+  /* 000  */ V(12, 12, 2),	/* 318 */
+  /* 001  */ V(12, 12, 2),
+  /* 010  */ V(10, 13, 3),
+  /* 011  */ V(13, 10, 3),
+  /* 100  */ V(7, 14, 3),
+  /* 101  */ V(10, 12, 3),
+  /* 110  */ V(12, 10, 2),
+  /* 111  */ V(12, 10, 2),
+
+  /* 0000 0110 1111 ... */
+  /* 000  */ V(12, 9, 3),	/* 326 */
+  /* 001  */ V(7, 13, 3),
+  /* 010  */ V(5, 14, 2),
+  /* 011  */ V(5, 14, 2),
+  /* 100  */ V(11, 13, 1),
+  /* 101  */ V(11, 13, 1),
+  /* 110  */ V(11, 13, 1),
+  /* 111  */ V(11, 13, 1),
+
+  /* 0000 1011 0000 ... */
+  /* 00   */ V(9, 14, 1),	/* 334 */
+  /* 01   */ V(9, 14, 1),
+  /* 10   */ V(11, 12, 2),
+  /* 11   */ V(12, 11, 2),
+
+  /* 0000 1011 0001 ... */
+  /* 00   */ V(8, 14, 2),	/* 338 */
+  /* 01   */ V(14, 8, 2),
+  /* 10   */ V(9, 13, 2),
+  /* 11   */ V(14, 7, 2),
+
+  /* 0000 1011 0010 ... */
+  /* 00   */ V(11, 11, 2),	/* 342 */
+  /* 01   */ V(8, 13, 2),
+  /* 10   */ V(13, 8, 2),
+  /* 11   */ V(6, 14, 2),
+
+  /* 0000 1011 0011 ... */
+  /* 0    */ V(14, 6, 1),	/* 346 */
+  /* 1    */ V(9, 12, 1),
+
+  /* 0000 1011 0100 ... */
+  /* 00   */ V(10, 11, 2),	/* 348 */
+  /* 01   */ V(11, 10, 2),
+  /* 10   */ V(14, 5, 2),
+  /* 11   */ V(13, 7, 2),
+
+  /* 0000 1011 0101 ... */
+  /* 00   */ V(4, 14, 1),	/* 352 */
+  /* 01   */ V(4, 14, 1),
+  /* 10   */ V(14, 4, 2),
+  /* 11   */ V(8, 12, 2),
+
+  /* 0000 1011 0110 ... */
+  /* 0    */ V(12, 8, 1),	/* 356 */
+  /* 1    */ V(3, 14, 1),
+
+  /* 0000 1011 0111 ... */
+  /* 00   */ V(6, 13, 1),	/* 358 */
+  /* 01   */ V(6, 13, 1),
+  /* 10   */ V(13, 6, 2),
+  /* 11   */ V(9, 11, 2),
+
+  /* 0000 1011 1000 ... */
+  /* 00   */ V(11, 9, 2),	/* 362 */
+  /* 01   */ V(10, 10, 2),
+  /* 10   */ V(14, 1, 1),
+  /* 11   */ V(14, 1, 1),
+
+  /* 0000 1011 1001 ... */
+  /* 00   */ V(13, 4, 1),	/* 366 */
+  /* 01   */ V(13, 4, 1),
+  /* 10   */ V(11, 8, 2),
+  /* 11   */ V(10, 9, 2),
+
+  /* 0000 1011 1010 ... */
+  /* 00   */ V(7, 11, 1),	/* 370 */
+  /* 01   */ V(7, 11, 1),
+  /* 10   */ V(11, 7, 2),
+  /* 11   */ V(13, 0, 2),
+
+  /* 0000 1011 1100 ... */
+  /* 0    */ V(0, 14, 1),	/* 374 */
+  /* 1    */ V(14, 0, 1),
+
+  /* 0000 1011 1101 ... */
+  /* 0    */ V(5, 13, 1),	/* 376 */
+  /* 1    */ V(13, 5, 1),
+
+  /* 0000 1011 1110 ... */
+  /* 0    */ V(7, 12, 1),	/* 378 */
+  /* 1    */ V(12, 7, 1),
+
+  /* 0000 1011 1111 ... */
+  /* 0    */ V(4, 13, 1),	/* 380 */
+  /* 1    */ V(8, 11, 1),
+
+  /* 0000 1100 0000 ... */
+  /* 0    */ V(9, 10, 1),	/* 382 */
+  /* 1    */ V(6, 12, 1),
+
+  /* 0000 1100 0001 ... */
+  /* 0    */ V(12, 6, 1),	/* 384 */
+  /* 1    */ V(3, 13, 1),
+
+  /* 0000 1100 0010 ... */
+  /* 0    */ V(5, 12, 1),	/* 386 */
+  /* 1    */ V(12, 5, 1),
+
+  /* 0000 1100 0100 ... */
+  /* 0    */ V(8, 10, 1),	/* 388 */
+  /* 1    */ V(10, 8, 1),
+
+  /* 0000 1100 0101 ... */
+  /* 0    */ V(9, 9, 1),	/* 390 */
+  /* 1    */ V(4, 12, 1),
+
+  /* 0000 1100 0110 ... */
+  /* 0    */ V(11, 6, 1),	/* 392 */
+  /* 1    */ V(7, 10, 1),
+
+  /* 0000 1100 1000 ... */
+  /* 0    */ V(5, 11, 1),	/* 394 */
+  /* 1    */ V(8, 9, 1),
+
+  /* 0000 1100 1011 ... */
+  /* 0    */ V(9, 8, 1),	/* 396 */
+  /* 1    */ V(7, 9, 1),
+
+  /* 0000 1101 0101 ... */
+  /* 0    */ V(9, 7, 1),	/* 398 */
+  /* 1    */ V(8, 8, 1),
+
+  /* 0000 0110 1100 0001 ... */
+  /* 0    */ V(14, 12, 1),	/* 400 */
+  /* 1    */ V(13, 13, 1)
+};
+
+static
+struct huffpair const hufftab24[] = {
+  /* 0000 */ PTR(16, 4),
+  /* 0001 */ PTR(32, 4),
+  /* 0010 */ PTR(48, 4),
+  /* 0011 */ V(15, 15, 4),
+  /* 0100 */ PTR(64, 4),
+  /* 0101 */ PTR(80, 4),
+  /* 0110 */ PTR(96, 4),
+  /* 0111 */ PTR(112, 4),
+  /* 1000 */ PTR(128, 4),
+  /* 1001 */ PTR(144, 4),
+  /* 1010 */ PTR(160, 3),
+  /* 1011 */ PTR(168, 2),
+  /* 1100 */ V(1, 1, 4),
+  /* 1101 */ V(0, 1, 4),
+  /* 1110 */ V(1, 0, 4),
+  /* 1111 */ V(0, 0, 4),
+
+  /* 0000 ... */
+  /* 0000 */ V(14, 15, 4),	/* 16 */
+  /* 0001 */ V(15, 14, 4),
+  /* 0010 */ V(13, 15, 4),
+  /* 0011 */ V(15, 13, 4),
+  /* 0100 */ V(12, 15, 4),
+  /* 0101 */ V(15, 12, 4),
+  /* 0110 */ V(11, 15, 4),
+  /* 0111 */ V(15, 11, 4),
+  /* 1000 */ V(15, 10, 3),
+  /* 1001 */ V(15, 10, 3),
+  /* 1010 */ V(10, 15, 4),
+  /* 1011 */ V(9, 15, 4),
+  /* 1100 */ V(15, 9, 3),
+  /* 1101 */ V(15, 9, 3),
+  /* 1110 */ V(15, 8, 3),
+  /* 1111 */ V(15, 8, 3),
+
+  /* 0001 ... */
+  /* 0000 */ V(8, 15, 4),	/* 32 */
+  /* 0001 */ V(7, 15, 4),
+  /* 0010 */ V(15, 7, 3),
+  /* 0011 */ V(15, 7, 3),
+  /* 0100 */ V(6, 15, 3),
+  /* 0101 */ V(6, 15, 3),
+  /* 0110 */ V(15, 6, 3),
+  /* 0111 */ V(15, 6, 3),
+  /* 1000 */ V(5, 15, 3),
+  /* 1001 */ V(5, 15, 3),
+  /* 1010 */ V(15, 5, 3),
+  /* 1011 */ V(15, 5, 3),
+  /* 1100 */ V(4, 15, 3),
+  /* 1101 */ V(4, 15, 3),
+  /* 1110 */ V(15, 4, 3),
+  /* 1111 */ V(15, 4, 3),
+
+  /* 0010 ... */
+  /* 0000 */ V(3, 15, 3),	/* 48 */
+  /* 0001 */ V(3, 15, 3),
+  /* 0010 */ V(15, 3, 3),
+  /* 0011 */ V(15, 3, 3),
+  /* 0100 */ V(2, 15, 3),
+  /* 0101 */ V(2, 15, 3),
+  /* 0110 */ V(15, 2, 3),
+  /* 0111 */ V(15, 2, 3),
+  /* 1000 */ V(15, 1, 3),
+  /* 1001 */ V(15, 1, 3),
+  /* 1010 */ V(1, 15, 4),
+  /* 1011 */ V(15, 0, 4),
+  /* 1100 */ PTR(172, 3),
+  /* 1101 */ PTR(180, 3),
+  /* 1110 */ PTR(188, 3),
+  /* 1111 */ PTR(196, 3),
+
+  /* 0100 ... */
+  /* 0000 */ PTR(204, 4),	/* 64 */
+  /* 0001 */ PTR(220, 3),
+  /* 0010 */ PTR(228, 3),
+  /* 0011 */ PTR(236, 3),
+  /* 0100 */ PTR(244, 2),
+  /* 0101 */ PTR(248, 2),
+  /* 0110 */ PTR(252, 2),
+  /* 0111 */ PTR(256, 2),
+  /* 1000 */ PTR(260, 2),
+  /* 1001 */ PTR(264, 2),
+  /* 1010 */ PTR(268, 2),
+  /* 1011 */ PTR(272, 2),
+  /* 1100 */ PTR(276, 2),
+  /* 1101 */ PTR(280, 3),
+  /* 1110 */ PTR(288, 2),
+  /* 1111 */ PTR(292, 2),
+
+  /* 0101 ... */
+  /* 0000 */ PTR(296, 2),	/* 80 */
+  /* 0001 */ PTR(300, 3),
+  /* 0010 */ PTR(308, 2),
+  /* 0011 */ PTR(312, 3),
+  /* 0100 */ PTR(320, 1),
+  /* 0101 */ PTR(322, 2),
+  /* 0110 */ PTR(326, 2),
+  /* 0111 */ PTR(330, 1),
+  /* 1000 */ PTR(332, 2),
+  /* 1001 */ PTR(336, 1),
+  /* 1010 */ PTR(338, 1),
+  /* 1011 */ PTR(340, 1),
+  /* 1100 */ PTR(342, 1),
+  /* 1101 */ PTR(344, 1),
+  /* 1110 */ PTR(346, 1),
+  /* 1111 */ PTR(348, 1),
+
+  /* 0110 ... */
+  /* 0000 */ PTR(350, 1),	/* 96 */
+  /* 0001 */ PTR(352, 1),
+  /* 0010 */ PTR(354, 1),
+  /* 0011 */ PTR(356, 1),
+  /* 0100 */ PTR(358, 1),
+  /* 0101 */ PTR(360, 1),
+  /* 0110 */ PTR(362, 1),
+  /* 0111 */ PTR(364, 1),
+  /* 1000 */ PTR(366, 1),
+  /* 1001 */ PTR(368, 1),
+  /* 1010 */ PTR(370, 2),
+  /* 1011 */ PTR(374, 1),
+  /* 1100 */ PTR(376, 2),
+  /* 1101 */ V(7, 3, 4),
+  /* 1110 */ PTR(380, 1),
+  /* 1111 */ V(7, 2, 4),
+
+  /* 0111 ... */
+  /* 0000 */ V(4, 6, 4),	/* 112 */
+  /* 0001 */ V(6, 4, 4),
+  /* 0010 */ V(5, 5, 4),
+  /* 0011 */ V(7, 1, 4),
+  /* 0100 */ V(3, 6, 4),
+  /* 0101 */ V(6, 3, 4),
+  /* 0110 */ V(4, 5, 4),
+  /* 0111 */ V(5, 4, 4),
+  /* 1000 */ V(2, 6, 4),
+  /* 1001 */ V(6, 2, 4),
+  /* 1010 */ V(1, 6, 4),
+  /* 1011 */ V(6, 1, 4),
+  /* 1100 */ PTR(382, 1),
+  /* 1101 */ V(3, 5, 4),
+  /* 1110 */ V(5, 3, 4),
+  /* 1111 */ V(4, 4, 4),
+
+  /* 1000 ... */
+  /* 0000 */ V(2, 5, 4),	/* 128 */
+  /* 0001 */ V(5, 2, 4),
+  /* 0010 */ V(1, 5, 4),
+  /* 0011 */ PTR(384, 1),
+  /* 0100 */ V(5, 1, 3),
+  /* 0101 */ V(5, 1, 3),
+  /* 0110 */ V(3, 4, 4),
+  /* 0111 */ V(4, 3, 4),
+  /* 1000 */ V(2, 4, 3),
+  /* 1001 */ V(2, 4, 3),
+  /* 1010 */ V(4, 2, 3),
+  /* 1011 */ V(4, 2, 3),
+  /* 1100 */ V(3, 3, 3),
+  /* 1101 */ V(3, 3, 3),
+  /* 1110 */ V(1, 4, 3),
+  /* 1111 */ V(1, 4, 3),
+
+  /* 1001 ... */
+  /* 0000 */ V(4, 1, 3),	/* 144 */
+  /* 0001 */ V(4, 1, 3),
+  /* 0010 */ V(0, 4, 4),
+  /* 0011 */ V(4, 0, 4),
+  /* 0100 */ V(2, 3, 3),
+  /* 0101 */ V(2, 3, 3),
+  /* 0110 */ V(3, 2, 3),
+  /* 0111 */ V(3, 2, 3),
+  /* 1000 */ V(1, 3, 2),
+  /* 1001 */ V(1, 3, 2),
+  /* 1010 */ V(1, 3, 2),
+  /* 1011 */ V(1, 3, 2),
+  /* 1100 */ V(3, 1, 2),
+  /* 1101 */ V(3, 1, 2),
+  /* 1110 */ V(3, 1, 2),
+  /* 1111 */ V(3, 1, 2),
+
+  /* 1010 ... */
+  /* 000  */ V(0, 3, 3),	/* 160 */
+  /* 001  */ V(3, 0, 3),
+  /* 010  */ V(2, 2, 2),
+  /* 011  */ V(2, 2, 2),
+  /* 100  */ V(1, 2, 1),
+  /* 101  */ V(1, 2, 1),
+  /* 110  */ V(1, 2, 1),
+  /* 111  */ V(1, 2, 1),
+
+  /* 1011 ... */
+  /* 00   */ V(2, 1, 1),	/* 168 */
+  /* 01   */ V(2, 1, 1),
+  /* 10   */ V(0, 2, 2),
+  /* 11   */ V(2, 0, 2),
+
+  /* 0010 1100 ... */
+  /* 000  */ V(0, 15, 1),	/* 172 */
+  /* 001  */ V(0, 15, 1),
+  /* 010  */ V(0, 15, 1),
+  /* 011  */ V(0, 15, 1),
+  /* 100  */ V(14, 14, 3),
+  /* 101  */ V(13, 14, 3),
+  /* 110  */ V(14, 13, 3),
+  /* 111  */ V(12, 14, 3),
+
+  /* 0010 1101 ... */
+  /* 000  */ V(14, 12, 3),	/* 180 */
+  /* 001  */ V(13, 13, 3),
+  /* 010  */ V(11, 14, 3),
+  /* 011  */ V(14, 11, 3),
+  /* 100  */ V(12, 13, 3),
+  /* 101  */ V(13, 12, 3),
+  /* 110  */ V(10, 14, 3),
+  /* 111  */ V(14, 10, 3),
+
+  /* 0010 1110 ... */
+  /* 000  */ V(11, 13, 3),	/* 188 */
+  /* 001  */ V(13, 11, 3),
+  /* 010  */ V(12, 12, 3),
+  /* 011  */ V(9, 14, 3),
+  /* 100  */ V(14, 9, 3),
+  /* 101  */ V(10, 13, 3),
+  /* 110  */ V(13, 10, 3),
+  /* 111  */ V(11, 12, 3),
+
+  /* 0010 1111 ... */
+  /* 000  */ V(12, 11, 3),	/* 196 */
+  /* 001  */ V(8, 14, 3),
+  /* 010  */ V(14, 8, 3),
+  /* 011  */ V(9, 13, 3),
+  /* 100  */ V(13, 9, 3),
+  /* 101  */ V(7, 14, 3),
+  /* 110  */ V(14, 7, 3),
+  /* 111  */ V(10, 12, 3),
+
+  /* 0100 0000 ... */
+  /* 0000 */ V(12, 10, 3),	/* 204 */
+  /* 0001 */ V(12, 10, 3),
+  /* 0010 */ V(11, 11, 3),
+  /* 0011 */ V(11, 11, 3),
+  /* 0100 */ V(8, 13, 3),
+  /* 0101 */ V(8, 13, 3),
+  /* 0110 */ V(13, 8, 3),
+  /* 0111 */ V(13, 8, 3),
+  /* 1000 */ V(0, 14, 4),
+  /* 1001 */ V(14, 0, 4),
+  /* 1010 */ V(0, 13, 3),
+  /* 1011 */ V(0, 13, 3),
+  /* 1100 */ V(14, 6, 2),
+  /* 1101 */ V(14, 6, 2),
+  /* 1110 */ V(14, 6, 2),
+  /* 1111 */ V(14, 6, 2),
+
+  /* 0100 0001 ... */
+  /* 000  */ V(6, 14, 3),	/* 220 */
+  /* 001  */ V(9, 12, 3),
+  /* 010  */ V(12, 9, 2),
+  /* 011  */ V(12, 9, 2),
+  /* 100  */ V(5, 14, 2),
+  /* 101  */ V(5, 14, 2),
+  /* 110  */ V(11, 10, 2),
+  /* 111  */ V(11, 10, 2),
+
+  /* 0100 0010 ... */
+  /* 000  */ V(14, 5, 2),	/* 228 */
+  /* 001  */ V(14, 5, 2),
+  /* 010  */ V(10, 11, 3),
+  /* 011  */ V(7, 13, 3),
+  /* 100  */ V(13, 7, 2),
+  /* 101  */ V(13, 7, 2),
+  /* 110  */ V(14, 4, 2),
+  /* 111  */ V(14, 4, 2),
+
+  /* 0100 0011 ... */
+  /* 000  */ V(8, 12, 2),	/* 236 */
+  /* 001  */ V(8, 12, 2),
+  /* 010  */ V(12, 8, 2),
+  /* 011  */ V(12, 8, 2),
+  /* 100  */ V(4, 14, 3),
+  /* 101  */ V(2, 14, 3),
+  /* 110  */ V(3, 14, 2),
+  /* 111  */ V(3, 14, 2),
+
+  /* 0100 0100 ... */
+  /* 00   */ V(6, 13, 2),	/* 244 */
+  /* 01   */ V(13, 6, 2),
+  /* 10   */ V(14, 3, 2),
+  /* 11   */ V(9, 11, 2),
+
+  /* 0100 0101 ... */
+  /* 00   */ V(11, 9, 2),	/* 248 */
+  /* 01   */ V(10, 10, 2),
+  /* 10   */ V(14, 2, 2),
+  /* 11   */ V(1, 14, 2),
+
+  /* 0100 0110 ... */
+  /* 00   */ V(14, 1, 2),	/* 252 */
+  /* 01   */ V(5, 13, 2),
+  /* 10   */ V(13, 5, 2),
+  /* 11   */ V(7, 12, 2),
+
+  /* 0100 0111 ... */
+  /* 00   */ V(12, 7, 2),	/* 256 */
+  /* 01   */ V(4, 13, 2),
+  /* 10   */ V(8, 11, 2),
+  /* 11   */ V(11, 8, 2),
+
+  /* 0100 1000 ... */
+  /* 00   */ V(13, 4, 2),	/* 260 */
+  /* 01   */ V(9, 10, 2),
+  /* 10   */ V(10, 9, 2),
+  /* 11   */ V(6, 12, 2),
+
+  /* 0100 1001 ... */
+  /* 00   */ V(12, 6, 2),	/* 264 */
+  /* 01   */ V(3, 13, 2),
+  /* 10   */ V(13, 3, 2),
+  /* 11   */ V(2, 13, 2),
+
+  /* 0100 1010 ... */
+  /* 00   */ V(13, 2, 2),	/* 268 */
+  /* 01   */ V(1, 13, 2),
+  /* 10   */ V(7, 11, 2),
+  /* 11   */ V(11, 7, 2),
+
+  /* 0100 1011 ... */
+  /* 00   */ V(13, 1, 2),	/* 272 */
+  /* 01   */ V(5, 12, 2),
+  /* 10   */ V(12, 5, 2),
+  /* 11   */ V(8, 10, 2),
+
+  /* 0100 1100 ... */
+  /* 00   */ V(10, 8, 2),	/* 276 */
+  /* 01   */ V(9, 9, 2),
+  /* 10   */ V(4, 12, 2),
+  /* 11   */ V(12, 4, 2),
+
+  /* 0100 1101 ... */
+  /* 000  */ V(6, 11, 2),	/* 280 */
+  /* 001  */ V(6, 11, 2),
+  /* 010  */ V(11, 6, 2),
+  /* 011  */ V(11, 6, 2),
+  /* 100  */ V(13, 0, 3),
+  /* 101  */ V(0, 12, 3),
+  /* 110  */ V(3, 12, 2),
+  /* 111  */ V(3, 12, 2),
+
+  /* 0100 1110 ... */
+  /* 00   */ V(12, 3, 2),	/* 288 */
+  /* 01   */ V(7, 10, 2),
+  /* 10   */ V(10, 7, 2),
+  /* 11   */ V(2, 12, 2),
+
+  /* 0100 1111 ... */
+  /* 00   */ V(12, 2, 2),	/* 292 */
+  /* 01   */ V(5, 11, 2),
+  /* 10   */ V(11, 5, 2),
+  /* 11   */ V(1, 12, 2),
+
+  /* 0101 0000 ... */
+  /* 00   */ V(8, 9, 2),	/* 296 */
+  /* 01   */ V(9, 8, 2),
+  /* 10   */ V(12, 1, 2),
+  /* 11   */ V(4, 11, 2),
+
+  /* 0101 0001 ... */
+  /* 000  */ V(12, 0, 3),	/* 300 */
+  /* 001  */ V(0, 11, 3),
+  /* 010  */ V(3, 11, 2),
+  /* 011  */ V(3, 11, 2),
+  /* 100  */ V(11, 0, 3),
+  /* 101  */ V(0, 10, 3),
+  /* 110  */ V(1, 10, 2),
+  /* 111  */ V(1, 10, 2),
+
+  /* 0101 0010 ... */
+  /* 00   */ V(11, 4, 1),	/* 308 */
+  /* 01   */ V(11, 4, 1),
+  /* 10   */ V(6, 10, 2),
+  /* 11   */ V(10, 6, 2),
+
+  /* 0101 0011 ... */
+  /* 000  */ V(7, 9, 2),	/* 312 */
+  /* 001  */ V(7, 9, 2),
+  /* 010  */ V(9, 7, 2),
+  /* 011  */ V(9, 7, 2),
+  /* 100  */ V(10, 0, 3),
+  /* 101  */ V(0, 9, 3),
+  /* 110  */ V(9, 0, 2),
+  /* 111  */ V(9, 0, 2),
+
+  /* 0101 0100 ... */
+  /* 0    */ V(11, 3, 1),	/* 320 */
+  /* 1    */ V(8, 8, 1),
+
+  /* 0101 0101 ... */
+  /* 00   */ V(2, 11, 2),	/* 322 */
+  /* 01   */ V(5, 10, 2),
+  /* 10   */ V(11, 2, 1),
+  /* 11   */ V(11, 2, 1),
+
+  /* 0101 0110 ... */
+  /* 00   */ V(10, 5, 2),	/* 326 */
+  /* 01   */ V(1, 11, 2),
+  /* 10   */ V(11, 1, 2),
+  /* 11   */ V(6, 9, 2),
+
+  /* 0101 0111 ... */
+  /* 0    */ V(9, 6, 1),	/* 330 */
+  /* 1    */ V(10, 4, 1),
+
+  /* 0101 1000 ... */
+  /* 00   */ V(4, 10, 2),	/* 332 */
+  /* 01   */ V(7, 8, 2),
+  /* 10   */ V(8, 7, 1),
+  /* 11   */ V(8, 7, 1),
+
+  /* 0101 1001 ... */
+  /* 0    */ V(3, 10, 1),	/* 336 */
+  /* 1    */ V(10, 3, 1),
+
+  /* 0101 1010 ... */
+  /* 0    */ V(5, 9, 1),	/* 338 */
+  /* 1    */ V(9, 5, 1),
+
+  /* 0101 1011 ... */
+  /* 0    */ V(2, 10, 1),	/* 340 */
+  /* 1    */ V(10, 2, 1),
+
+  /* 0101 1100 ... */
+  /* 0    */ V(10, 1, 1),	/* 342 */
+  /* 1    */ V(6, 8, 1),
+
+  /* 0101 1101 ... */
+  /* 0    */ V(8, 6, 1),	/* 344 */
+  /* 1    */ V(7, 7, 1),
+
+  /* 0101 1110 ... */
+  /* 0    */ V(4, 9, 1),	/* 346 */
+  /* 1    */ V(9, 4, 1),
+
+  /* 0101 1111 ... */
+  /* 0    */ V(3, 9, 1),	/* 348 */
+  /* 1    */ V(9, 3, 1),
+
+  /* 0110 0000 ... */
+  /* 0    */ V(5, 8, 1),	/* 350 */
+  /* 1    */ V(8, 5, 1),
+
+  /* 0110 0001 ... */
+  /* 0    */ V(2, 9, 1),	/* 352 */
+  /* 1    */ V(6, 7, 1),
+
+  /* 0110 0010 ... */
+  /* 0    */ V(7, 6, 1),	/* 354 */
+  /* 1    */ V(9, 2, 1),
+
+  /* 0110 0011 ... */
+  /* 0    */ V(1, 9, 1),	/* 356 */
+  /* 1    */ V(9, 1, 1),
+
+  /* 0110 0100 ... */
+  /* 0    */ V(4, 8, 1),	/* 358 */
+  /* 1    */ V(8, 4, 1),
+
+  /* 0110 0101 ... */
+  /* 0    */ V(5, 7, 1),	/* 360 */
+  /* 1    */ V(7, 5, 1),
+
+  /* 0110 0110 ... */
+  /* 0    */ V(3, 8, 1),	/* 362 */
+  /* 1    */ V(8, 3, 1),
+
+  /* 0110 0111 ... */
+  /* 0    */ V(6, 6, 1),	/* 364 */
+  /* 1    */ V(2, 8, 1),
+
+  /* 0110 1000 ... */
+  /* 0    */ V(8, 2, 1),	/* 366 */
+  /* 1    */ V(1, 8, 1),
+
+  /* 0110 1001 ... */
+  /* 0    */ V(4, 7, 1),	/* 368 */
+  /* 1    */ V(7, 4, 1),
+
+  /* 0110 1010 ... */
+  /* 00   */ V(8, 1, 1),	/* 370 */
+  /* 01   */ V(8, 1, 1),
+  /* 10   */ V(0, 8, 2),
+  /* 11   */ V(8, 0, 2),
+
+  /* 0110 1011 ... */
+  /* 0    */ V(5, 6, 1),	/* 374 */
+  /* 1    */ V(6, 5, 1),
+
+  /* 0110 1100 ... */
+  /* 00   */ V(1, 7, 1),	/* 376 */
+  /* 01   */ V(1, 7, 1),
+  /* 10   */ V(0, 7, 2),
+  /* 11   */ V(7, 0, 2),
+
+  /* 0110 1110 ... */
+  /* 0    */ V(3, 7, 1),	/* 380  */
+  /* 1    */ V(2, 7, 1),
+
+  /* 0111 1100 ... */
+  /* 0    */ V(0, 6, 1),	/* 382 */
+  /* 1    */ V(6, 0, 1),
+
+  /* 1000 0011 ... */
+  /* 0    */ V(0, 5, 1),	/* 384 */
+  /* 1    */ V(5, 0, 1)
+};
+
+# undef V
+# undef PTR
+
+/* external tables */
+
+struct huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB };
+
+struct hufftable const mad_huff_pair_table[32] = {
+  /*  0 */ { hufftab0,   0, 0 },
+  /*  1 */ { hufftab1,   0, 3 },
+  /*  2 */ { hufftab2,   0, 3 },
+  /*  3 */ { hufftab3,   0, 3 },
+  /*  4 */ { 0 /* not used */ },
+  /*  5 */ { hufftab5,   0, 3 },
+  /*  6 */ { hufftab6,   0, 4 },
+  /*  7 */ { hufftab7,   0, 4 },
+  /*  8 */ { hufftab8,   0, 4 },
+  /*  9 */ { hufftab9,   0, 4 },
+  /* 10 */ { hufftab10,  0, 4 },
+  /* 11 */ { hufftab11,  0, 4 },
+  /* 12 */ { hufftab12,  0, 4 },
+  /* 13 */ { hufftab13,  0, 4 },
+  /* 14 */ { 0 /* not used */ },
+  /* 15 */ { hufftab15,  0, 4 },
+  /* 16 */ { hufftab16,  1, 4 },
+  /* 17 */ { hufftab16,  2, 4 },
+  /* 18 */ { hufftab16,  3, 4 },
+  /* 19 */ { hufftab16,  4, 4 },
+  /* 20 */ { hufftab16,  6, 4 },
+  /* 21 */ { hufftab16,  8, 4 },
+  /* 22 */ { hufftab16, 10, 4 },
+  /* 23 */ { hufftab16, 13, 4 },
+  /* 24 */ { hufftab24,  4, 4 },
+  /* 25 */ { hufftab24,  5, 4 },
+  /* 26 */ { hufftab24,  6, 4 },
+  /* 27 */ { hufftab24,  7, 4 },
+  /* 28 */ { hufftab24,  8, 4 },
+  /* 29 */ { hufftab24,  9, 4 },
+  /* 30 */ { hufftab24, 11, 4 },
+  /* 31 */ { hufftab24, 13, 4 }
+};
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/huffman.h
@@ -1,0 +1,59 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id; //  huffman.h,v 1.11 2004/01/23 09; // 41; // 32 rob Exp $
+ */
+
+# ifndef LIBMAD_HUFFMAN_H
+# define LIBMAD_HUFFMAN_H
+
+struct huffquad {
+  unsigned char final;
+  struct {
+    unsigned char bits;
+    unsigned short offset;
+  } ptr;
+  struct {
+    unsigned char hlen;
+    unsigned char v, w, x, y;
+  } value;
+};
+
+struct huffpair {
+  unsigned char final;
+  struct {
+    unsigned char bits;
+    unsigned short offset;
+  } ptr;
+  struct {
+    unsigned char hlen;
+    unsigned char x;
+    unsigned char y;
+  } value;
+};
+
+struct hufftable {
+  struct huffpair const *table;
+  unsigned short linbits;
+  unsigned short startbits;
+};
+
+extern struct huffquad const *const mad_huff_quad_table[2];
+extern struct hufftable const mad_huff_pair_table[32];
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/imdct_s.dat
@@ -1,0 +1,62 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $
+ */
+
+  /*  0 */  {  MAD_F(0x09bd7ca0) /*  0.608761429 */,
+	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
+	      -MAD_F(0x0216a2a2) /* -0.130526192 */,
+	       MAD_F(0x0fdcf549) /*  0.991444861 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	      -MAD_F(0x0cb19346) /* -0.793353340 */ },
+
+  /*  6 */  { -MAD_F(0x0cb19346) /* -0.793353340 */,
+	       MAD_F(0x061f78aa) /*  0.382683432 */,
+	       MAD_F(0x0fdcf549) /*  0.991444861 */,
+	       MAD_F(0x0216a2a2) /*  0.130526192 */,
+	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
+	      -MAD_F(0x09bd7ca0) /* -0.608761429 */ },
+
+  /*  1 */  {  MAD_F(0x061f78aa) /*  0.382683432 */,
+	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
+	       MAD_F(0x0ec835e8) /*  0.923879533 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	       MAD_F(0x0ec835e8) /*  0.923879533 */ },
+
+  /*  7 */  { -MAD_F(0x0ec835e8) /* -0.923879533 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	       MAD_F(0x061f78aa) /*  0.382683432 */,
+	       MAD_F(0x0ec835e8) /*  0.923879533 */,
+	       MAD_F(0x0ec835e8) /*  0.923879533 */,
+	       MAD_F(0x061f78aa) /*  0.382683432 */ },
+
+  /*  2 */  {  MAD_F(0x0216a2a2) /*  0.130526192 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	       MAD_F(0x09bd7ca0) /*  0.608761429 */,
+	      -MAD_F(0x0cb19346) /* -0.793353340 */,
+	       MAD_F(0x0ec835e8) /*  0.923879533 */,
+	      -MAD_F(0x0fdcf549) /* -0.991444861 */ },
+
+  /*  8 */  { -MAD_F(0x0fdcf549) /* -0.991444861 */,
+	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
+	      -MAD_F(0x0cb19346) /* -0.793353340 */,
+	      -MAD_F(0x09bd7ca0) /* -0.608761429 */,
+	      -MAD_F(0x061f78aa) /* -0.382683432 */,
+	      -MAD_F(0x0216a2a2) /* -0.130526192 */ }
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/layer12.c
@@ -1,0 +1,534 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: layer12.c,v 1.17 2004/02/05 09:02:39 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# ifdef HAVE_LIMITS_H
+#  include <limits.h>
+# else
+#  define CHAR_BIT  8
+# endif
+
+# include "fixed.h"
+# include "bit.h"
+# include "stream.h"
+# include "frame.h"
+# include "layer12.h"
+
+/*
+ * scalefactor table
+ * used in both Layer I and Layer II decoding
+ */
+static
+mad_fixed_t const sf_table[64] = {
+# include "sf_table.dat"
+};
+
+/* --- Layer I ------------------------------------------------------------- */
+
+/* linear scaling table */
+static
+mad_fixed_t const linear_table[14] = {
+  MAD_F(0x15555555),  /* 2^2  / (2^2  - 1) == 1.33333333333333 */
+  MAD_F(0x12492492),  /* 2^3  / (2^3  - 1) == 1.14285714285714 */
+  MAD_F(0x11111111),  /* 2^4  / (2^4  - 1) == 1.06666666666667 */
+  MAD_F(0x10842108),  /* 2^5  / (2^5  - 1) == 1.03225806451613 */
+  MAD_F(0x10410410),  /* 2^6  / (2^6  - 1) == 1.01587301587302 */
+  MAD_F(0x10204081),  /* 2^7  / (2^7  - 1) == 1.00787401574803 */
+  MAD_F(0x10101010),  /* 2^8  / (2^8  - 1) == 1.00392156862745 */
+  MAD_F(0x10080402),  /* 2^9  / (2^9  - 1) == 1.00195694716243 */
+  MAD_F(0x10040100),  /* 2^10 / (2^10 - 1) == 1.00097751710655 */
+  MAD_F(0x10020040),  /* 2^11 / (2^11 - 1) == 1.00048851978505 */
+  MAD_F(0x10010010),  /* 2^12 / (2^12 - 1) == 1.00024420024420 */
+  MAD_F(0x10008004),  /* 2^13 / (2^13 - 1) == 1.00012208521548 */
+  MAD_F(0x10004001),  /* 2^14 / (2^14 - 1) == 1.00006103888177 */
+  MAD_F(0x10002000)   /* 2^15 / (2^15 - 1) == 1.00003051850948 */
+};
+
+/*
+ * NAME:	I_sample()
+ * DESCRIPTION:	decode one requantized Layer I sample from a bitstream
+ */
+static
+mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb)
+{
+  mad_fixed_t sample;
+
+  sample = mad_bit_read(ptr, nb);
+
+  /* invert most significant bit, extend sign, then scale to fixed format */
+
+  sample ^= 1 << (nb - 1);
+  sample |= -(sample & (1 << (nb - 1)));
+
+  sample <<= MAD_F_FRACBITS - (nb - 1);
+
+  /* requantize the sample */
+
+  /* s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1)) */
+
+  sample += MAD_F_ONE >> (nb - 1);
+
+  return mad_f_mul(sample, linear_table[nb - 2]);
+
+  /* s' = factor * s'' */
+  /* (to be performed by caller) */
+}
+
+/*
+ * NAME:	layer->I()
+ * DESCRIPTION:	decode a single Layer I frame
+ */
+int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
+{
+  struct mad_header *header = &frame->header;
+  unsigned int nch, bound, ch, s, sb, nb;
+  unsigned char allocation[2][32], scalefactor[2][32];
+
+  nch = MAD_NCHANNELS(header);
+
+  bound = 32;
+  if (header->mode == MAD_MODE_JOINT_STEREO) {
+    header->flags |= MAD_FLAG_I_STEREO;
+    bound = 4 + header->mode_extension * 4;
+  }
+
+  /* check CRC word */
+
+  if (header->flags & MAD_FLAG_PROTECTION) {
+    header->crc_check =
+      mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)),
+		  header->crc_check);
+
+    if (header->crc_check != header->crc_target &&
+	!(frame->options & MAD_OPTION_IGNORECRC)) {
+      stream->error = MAD_ERROR_BADCRC;
+      return -1;
+    }
+  }
+
+  /* decode bit allocations */
+
+  for (sb = 0; sb < bound; ++sb) {
+    for (ch = 0; ch < nch; ++ch) {
+      nb = mad_bit_read(&stream->ptr, 4);
+
+      if (nb == 15) {
+	stream->error = MAD_ERROR_BADBITALLOC;
+	return -1;
+      }
+
+      allocation[ch][sb] = nb ? nb + 1 : 0;
+    }
+  }
+
+  for (sb = bound; sb < 32; ++sb) {
+    nb = mad_bit_read(&stream->ptr, 4);
+
+    if (nb == 15) {
+      stream->error = MAD_ERROR_BADBITALLOC;
+      return -1;
+    }
+
+    allocation[0][sb] =
+    allocation[1][sb] = nb ? nb + 1 : 0;
+  }
+
+  /* decode scalefactors */
+
+  for (sb = 0; sb < 32; ++sb) {
+    for (ch = 0; ch < nch; ++ch) {
+      if (allocation[ch][sb]) {
+	scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6);
+
+# if defined(OPT_STRICT)
+	/*
+	 * Scalefactor index 63 does not appear in Table B.1 of
+	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
+	 * so we only reject it if OPT_STRICT is defined.
+	 */
+	if (scalefactor[ch][sb] == 63) {
+	  stream->error = MAD_ERROR_BADSCALEFACTOR;
+	  return -1;
+	}
+# endif
+      }
+    }
+  }
+
+  /* decode samples */
+
+  for (s = 0; s < 12; ++s) {
+    for (sb = 0; sb < bound; ++sb) {
+      for (ch = 0; ch < nch; ++ch) {
+	nb = allocation[ch][sb];
+	frame->sbsample[ch][s][sb] = nb ?
+	  mad_f_mul(I_sample(&stream->ptr, nb),
+		    sf_table[scalefactor[ch][sb]]) : 0;
+      }
+    }
+
+    for (sb = bound; sb < 32; ++sb) {
+      if ((nb = allocation[0][sb])) {
+	mad_fixed_t sample;
+
+	sample = I_sample(&stream->ptr, nb);
+
+	for (ch = 0; ch < nch; ++ch) {
+	  frame->sbsample[ch][s][sb] =
+	    mad_f_mul(sample, sf_table[scalefactor[ch][sb]]);
+	}
+      }
+      else {
+	for (ch = 0; ch < nch; ++ch)
+	  frame->sbsample[ch][s][sb] = 0;
+      }
+    }
+  }
+
+  return 0;
+}
+
+/* --- Layer II ------------------------------------------------------------ */
+
+/* possible quantization per subband table */
+static
+struct {
+  unsigned int sblimit;
+  unsigned char const offsets[30];
+} const sbquant_table[5] = {
+  /* ISO/IEC 11172-3 Table B.2a */
+  { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3,	/* 0 */
+	  3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } },
+  /* ISO/IEC 11172-3 Table B.2b */
+  { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3,	/* 1 */
+	  3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } },
+  /* ISO/IEC 11172-3 Table B.2c */
+  {  8, { 5, 5, 2, 2, 2, 2, 2, 2 } },				/* 2 */
+  /* ISO/IEC 11172-3 Table B.2d */
+  { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } },		/* 3 */
+  /* ISO/IEC 13818-3 Table B.1 */
+  { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,	/* 4 */
+	  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
+};
+
+/* bit allocation table */
+static
+struct {
+  unsigned short nbal;
+  unsigned short offset;
+} const bitalloc_table[8] = {
+  { 2, 0 },  /* 0 */
+  { 2, 3 },  /* 1 */
+  { 3, 3 },  /* 2 */
+  { 3, 1 },  /* 3 */
+  { 4, 2 },  /* 4 */
+  { 4, 3 },  /* 5 */
+  { 4, 4 },  /* 6 */
+  { 4, 5 }   /* 7 */
+};
+
+/* offsets into quantization class table */
+static
+unsigned char const offset_table[6][15] = {
+  { 0, 1, 16                                             },  /* 0 */
+  { 0, 1,  2, 3, 4, 5, 16                                },  /* 1 */
+  { 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14 },  /* 2 */
+  { 0, 1,  3, 4, 5, 6,  7, 8,  9, 10, 11, 12, 13, 14, 15 },  /* 3 */
+  { 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 16 },  /* 4 */
+  { 0, 2,  4, 5, 6, 7,  8, 9, 10, 11, 12, 13, 14, 15, 16 }   /* 5 */
+};
+
+/* quantization class table */
+static
+struct quantclass {
+  unsigned short nlevels;
+  unsigned char group;
+  unsigned char bits;
+  mad_fixed_t C;
+  mad_fixed_t D;
+} const qc_table[17] = {
+# include "qc_table.dat"
+};
+
+/*
+ * NAME:	II_samples()
+ * DESCRIPTION:	decode three requantized Layer II samples from a bitstream
+ */
+static
+void II_samples(struct mad_bitptr *ptr,
+		struct quantclass const *quantclass,
+		mad_fixed_t output[3])
+{
+  unsigned int nb, s, sample[3];
+
+  if ((nb = quantclass->group)) {
+    unsigned int c, nlevels;
+
+    /* degrouping */
+    c = mad_bit_read(ptr, quantclass->bits);
+    nlevels = quantclass->nlevels;
+
+    for (s = 0; s < 3; ++s) {
+      sample[s] = c % nlevels;
+      c /= nlevels;
+    }
+  }
+  else {
+    nb = quantclass->bits;
+
+    for (s = 0; s < 3; ++s)
+      sample[s] = mad_bit_read(ptr, nb);
+  }
+
+  for (s = 0; s < 3; ++s) {
+    mad_fixed_t requantized;
+
+    /* invert most significant bit, extend sign, then scale to fixed format */
+
+    requantized  = sample[s] ^ (1 << (nb - 1));
+    requantized |= -(requantized & (1 << (nb - 1)));
+
+    requantized <<= MAD_F_FRACBITS - (nb - 1);
+
+    /* requantize the sample */
+
+    /* s'' = C * (s''' + D) */
+
+    output[s] = mad_f_mul(requantized + quantclass->D, quantclass->C);
+
+    /* s' = factor * s'' */
+    /* (to be performed by caller) */
+  }
+}
+
+/*
+ * NAME:	layer->II()
+ * DESCRIPTION:	decode a single Layer II frame
+ */
+int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
+{
+  struct mad_header *header = &frame->header;
+  struct mad_bitptr start;
+  unsigned int index, sblimit, nbal, nch, bound, gr, ch, s, sb;
+  unsigned char const *offsets;
+  unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3];
+  mad_fixed_t samples[3];
+
+  nch = MAD_NCHANNELS(header);
+
+  if (header->flags & MAD_FLAG_LSF_EXT)
+    index = 4;
+  else if (header->flags & MAD_FLAG_FREEFORMAT)
+    goto freeformat;
+  else {
+    unsigned long bitrate_per_channel;
+
+    bitrate_per_channel = header->bitrate;
+    if (nch == 2) {
+      bitrate_per_channel /= 2;
+
+# if defined(OPT_STRICT)
+      /*
+       * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and
+       * 80 kbps bitrates in Layer II, but some encoders ignore this
+       * restriction. We enforce it if OPT_STRICT is defined.
+       */
+      if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) {
+	stream->error = MAD_ERROR_BADMODE;
+	return -1;
+      }
+# endif
+    }
+    else {  /* nch == 1 */
+      if (bitrate_per_channel > 192000) {
+	/*
+	 * ISO/IEC 11172-3 does not allow single channel mode for 224, 256,
+	 * 320, or 384 kbps bitrates in Layer II.
+	 */
+	stream->error = MAD_ERROR_BADMODE;
+	return -1;
+      }
+    }
+
+    if (bitrate_per_channel <= 48000)
+      index = (header->samplerate == 32000) ? 3 : 2;
+    else if (bitrate_per_channel <= 80000)
+      index = 0;
+    else {
+    freeformat:
+      index = (header->samplerate == 48000) ? 0 : 1;
+    }
+  }
+
+  sblimit = sbquant_table[index].sblimit;
+  offsets = sbquant_table[index].offsets;
+
+  bound = 32;
+  if (header->mode == MAD_MODE_JOINT_STEREO) {
+    header->flags |= MAD_FLAG_I_STEREO;
+    bound = 4 + header->mode_extension * 4;
+  }
+
+  if (bound > sblimit)
+    bound = sblimit;
+
+  start = stream->ptr;
+
+  /* decode bit allocations */
+
+  for (sb = 0; sb < bound; ++sb) {
+    nbal = bitalloc_table[offsets[sb]].nbal;
+
+    for (ch = 0; ch < nch; ++ch)
+      allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal);
+  }
+
+  for (sb = bound; sb < sblimit; ++sb) {
+    nbal = bitalloc_table[offsets[sb]].nbal;
+
+    allocation[0][sb] =
+    allocation[1][sb] = mad_bit_read(&stream->ptr, nbal);
+  }
+
+  /* decode scalefactor selection info */
+
+  for (sb = 0; sb < sblimit; ++sb) {
+    for (ch = 0; ch < nch; ++ch) {
+      if (allocation[ch][sb])
+	scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2);
+    }
+  }
+
+  /* check CRC word */
+
+  if (header->flags & MAD_FLAG_PROTECTION) {
+    header->crc_check =
+      mad_bit_crc(start, mad_bit_length(&start, &stream->ptr),
+		  header->crc_check);
+
+    if (header->crc_check != header->crc_target &&
+	!(frame->options & MAD_OPTION_IGNORECRC)) {
+      stream->error = MAD_ERROR_BADCRC;
+      return -1;
+    }
+  }
+
+  /* decode scalefactors */
+
+  for (sb = 0; sb < sblimit; ++sb) {
+    for (ch = 0; ch < nch; ++ch) {
+      if (allocation[ch][sb]) {
+	scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6);
+
+	switch (scfsi[ch][sb]) {
+	case 2:
+	  scalefactor[ch][sb][2] =
+	  scalefactor[ch][sb][1] =
+	  scalefactor[ch][sb][0];
+	  break;
+
+	case 0:
+	  scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6);
+	  /* fall through */
+
+	case 1:
+	case 3:
+	  scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6);
+	}
+
+	if (scfsi[ch][sb] & 1)
+	  scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1];
+
+# if defined(OPT_STRICT)
+	/*
+	 * Scalefactor index 63 does not appear in Table B.1 of
+	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
+	 * so we only reject it if OPT_STRICT is defined.
+	 */
+	if (scalefactor[ch][sb][0] == 63 ||
+	    scalefactor[ch][sb][1] == 63 ||
+	    scalefactor[ch][sb][2] == 63) {
+	  stream->error = MAD_ERROR_BADSCALEFACTOR;
+	  return -1;
+	}
+# endif
+      }
+    }
+  }
+
+  /* decode samples */
+
+  for (gr = 0; gr < 12; ++gr) {
+    for (sb = 0; sb < bound; ++sb) {
+      for (ch = 0; ch < nch; ++ch) {
+	if ((index = allocation[ch][sb])) {
+	  index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
+
+	  II_samples(&stream->ptr, &qc_table[index], samples);
+
+	  for (s = 0; s < 3; ++s) {
+	    frame->sbsample[ch][3 * gr + s][sb] =
+	      mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
+	  }
+	}
+	else {
+	  for (s = 0; s < 3; ++s)
+	    frame->sbsample[ch][3 * gr + s][sb] = 0;
+	}
+      }
+    }
+
+    for (sb = bound; sb < sblimit; ++sb) {
+      if ((index = allocation[0][sb])) {
+	index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
+
+	II_samples(&stream->ptr, &qc_table[index], samples);
+
+	for (ch = 0; ch < nch; ++ch) {
+	  for (s = 0; s < 3; ++s) {
+	    frame->sbsample[ch][3 * gr + s][sb] =
+	      mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
+	  }
+	}
+      }
+      else {
+	for (ch = 0; ch < nch; ++ch) {
+	  for (s = 0; s < 3; ++s)
+	    frame->sbsample[ch][3 * gr + s][sb] = 0;
+	}
+      }
+    }
+
+    for (ch = 0; ch < nch; ++ch) {
+      for (s = 0; s < 3; ++s) {
+	for (sb = sblimit; sb < 32; ++sb)
+	  frame->sbsample[ch][3 * gr + s][sb] = 0;
+      }
+    }
+  }
+
+  return 0;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/layer12.h
@@ -1,0 +1,31 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBMAD_LAYER12_H
+# define LIBMAD_LAYER12_H
+
+# include "stream.h"
+# include "frame.h"
+
+int mad_layer_I(struct mad_stream *, struct mad_frame *);
+int mad_layer_II(struct mad_stream *, struct mad_frame *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/layer3.c
@@ -1,0 +1,2687 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: layer3.c,v 1.43 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "fixed.h"
+# include "bit.h"
+# include "stream.h"
+# include "frame.h"
+# include "huffman.h"
+# include "layer3.h"
+
+#define CHAR_BIT 8 /* duh */
+
+/* --- Layer III ----------------------------------------------------------- */
+
+enum {
+  count1table_select = 0x01,
+  scalefac_scale     = 0x02,
+  preflag	     = 0x04,
+  mixed_block_flag   = 0x08
+};
+
+enum {
+  I_STEREO  = 0x1,
+  MS_STEREO = 0x2
+};
+
+struct sideinfo {
+  unsigned int main_data_begin;
+  unsigned int private_bits;
+
+  unsigned char scfsi[2];
+
+  struct granule {
+    struct channel {
+      /* from side info */
+      unsigned short part2_3_length;
+      unsigned short big_values;
+      unsigned short global_gain;
+      unsigned short scalefac_compress;
+
+      unsigned char flags;
+      unsigned char block_type;
+      unsigned char table_select[3];
+      unsigned char subblock_gain[3];
+      unsigned char region0_count;
+      unsigned char region1_count;
+
+      /* from main_data */
+      unsigned char scalefac[39];	/* scalefac_l and/or scalefac_s */
+    } ch[2];
+  } gr[2];
+};
+
+/*
+ * scalefactor bit lengths
+ * derived from section 2.4.2.7 of ISO/IEC 11172-3
+ */
+static
+struct {
+  unsigned char slen1;
+  unsigned char slen2;
+} const sflen_table[16] = {
+  { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 },
+  { 3, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 },
+  { 2, 1 }, { 2, 2 }, { 2, 3 }, { 3, 1 },
+  { 3, 2 }, { 3, 3 }, { 4, 2 }, { 4, 3 }
+};
+
+/*
+ * number of LSF scalefactor band values
+ * derived from section 2.4.3.2 of ISO/IEC 13818-3
+ */
+static
+unsigned char const nsfb_table[6][3][4] = {
+  { {  6,  5,  5, 5 },
+    {  9,  9,  9, 9 },
+    {  6,  9,  9, 9 } },
+
+  { {  6,  5,  7, 3 },
+    {  9,  9, 12, 6 },
+    {  6,  9, 12, 6 } },
+
+  { { 11, 10,  0, 0 },
+    { 18, 18,  0, 0 },
+    { 15, 18,  0, 0 } },
+
+  { {  7,  7,  7, 0 },
+    { 12, 12, 12, 0 },
+    {  6, 15, 12, 0 } },
+
+  { {  6,  6,  6, 3 },
+    { 12,  9,  9, 6 },
+    {  6, 12,  9, 6 } },
+
+  { {  8,  8,  5, 0 },
+    { 15, 12,  9, 0 },
+    {  6, 18,  9, 0 } }
+};
+
+/*
+ * MPEG-1 scalefactor band widths
+ * derived from Table B.8 of ISO/IEC 11172-3
+ */
+static
+unsigned char const sfb_48000_long[] = {
+   4,  4,  4,  4,  4,  4,  6,  6,  6,   8,  10,
+  12, 16, 18, 22, 28, 34, 40, 46, 54,  54, 192
+};
+
+static
+unsigned char const sfb_44100_long[] = {
+   4,  4,  4,  4,  4,  4,  6,  6,  8,   8,  10,
+  12, 16, 20, 24, 28, 34, 42, 50, 54,  76, 158
+};
+
+static
+unsigned char const sfb_32000_long[] = {
+   4,  4,  4,  4,  4,  4,  6,  6,  8,  10,  12,
+  16, 20, 24, 30, 38, 46, 56, 68, 84, 102,  26
+};
+
+static
+unsigned char const sfb_48000_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+   6,  6,  6,  6,  6, 10, 10, 10, 12, 12, 12, 14, 14,
+  14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66
+};
+
+static
+unsigned char const sfb_44100_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+   6,  6,  8,  8,  8, 10, 10, 10, 12, 12, 12, 14, 14,
+  14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56
+};
+
+static
+unsigned char const sfb_32000_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
+   6,  6,  8,  8,  8, 12, 12, 12, 16, 16, 16, 20, 20,
+  20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12
+};
+
+static
+unsigned char const sfb_48000_mixed[] = {
+  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+  /* short */  4,  4,  4,  6,  6,  6,  6,  6,  6, 10,
+              10, 10, 12, 12, 12, 14, 14, 14, 16, 16,
+              16, 20, 20, 20, 26, 26, 26, 66, 66, 66
+};
+
+static
+unsigned char const sfb_44100_mixed[] = {
+  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+  /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,
+              10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+              18, 22, 22, 22, 30, 30, 30, 56, 56, 56
+};
+
+static
+unsigned char const sfb_32000_mixed[] = {
+  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
+  /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 12,
+              12, 12, 16, 16, 16, 20, 20, 20, 26, 26,
+              26, 34, 34, 34, 42, 42, 42, 12, 12, 12
+};
+
+/*
+ * MPEG-2 scalefactor band widths
+ * derived from Table B.2 of ISO/IEC 13818-3
+ */
+static
+unsigned char const sfb_24000_long[] = {
+   6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
+  18, 22, 26, 32, 38, 46, 54, 62, 70,  76,  36
+};
+
+static
+unsigned char const sfb_22050_long[] = {
+   6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
+  20, 24, 28, 32, 38, 46, 52, 60, 68,  58,  54
+};
+
+# define sfb_16000_long  sfb_22050_long
+
+static
+unsigned char const sfb_24000_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
+   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+  18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12
+};
+
+static
+unsigned char const sfb_22050_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  6,
+   6,  6,  8,  8,  8, 10, 10, 10, 14, 14, 14, 18, 18,
+  18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18
+};
+
+static
+unsigned char const sfb_16000_short[] = {
+   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
+   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
+  18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18
+};
+
+static
+unsigned char const sfb_24000_mixed[] = {
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
+              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
+              24, 32, 32, 32, 44, 44, 44, 12, 12, 12
+};
+
+static
+unsigned char const sfb_22050_mixed[] = {
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  6,  6,  6,  8,  8,  8, 10,
+              10, 10, 14, 14, 14, 18, 18, 18, 26, 26,
+              26, 32, 32, 32, 42, 42, 42, 18, 18, 18
+};
+
+static
+unsigned char const sfb_16000_mixed[] = {
+  /* long */   6,  6,  6,  6,  6,  6,
+  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
+              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
+              24, 30, 30, 30, 40, 40, 40, 18, 18, 18
+};
+
+/*
+ * MPEG 2.5 scalefactor band widths
+ * derived from public sources
+ */
+# define sfb_12000_long  sfb_16000_long
+# define sfb_11025_long  sfb_12000_long
+
+static
+unsigned char const sfb_8000_long[] = {
+  12, 12, 12, 12, 12, 12, 16, 20, 24,  28,  32,
+  40, 48, 56, 64, 76, 90,  2,  2,  2,   2,   2
+};
+
+# define sfb_12000_short  sfb_16000_short
+# define sfb_11025_short  sfb_12000_short
+
+static
+unsigned char const sfb_8000_short[] = {
+   8,  8,  8,  8,  8,  8,  8,  8,  8, 12, 12, 12, 16,
+  16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36,
+  36,  2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
+};
+
+# define sfb_12000_mixed  sfb_16000_mixed
+# define sfb_11025_mixed  sfb_12000_mixed
+
+/* the 8000 Hz short block scalefactor bands do not break after
+   the first 36 frequency lines, so this is probably wrong */
+static
+unsigned char const sfb_8000_mixed[] = {
+  /* long */  12, 12, 12,
+  /* short */  4,  4,  4,  8,  8,  8, 12, 12, 12, 16, 16, 16,
+              20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36,
+               2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
+};
+
+static
+struct {
+  unsigned char const *l;
+  unsigned char const *s;
+  unsigned char const *m;
+} const sfbwidth_table[9] = {
+  { sfb_48000_long, sfb_48000_short, sfb_48000_mixed },
+  { sfb_44100_long, sfb_44100_short, sfb_44100_mixed },
+  { sfb_32000_long, sfb_32000_short, sfb_32000_mixed },
+  { sfb_24000_long, sfb_24000_short, sfb_24000_mixed },
+  { sfb_22050_long, sfb_22050_short, sfb_22050_mixed },
+  { sfb_16000_long, sfb_16000_short, sfb_16000_mixed },
+  { sfb_12000_long, sfb_12000_short, sfb_12000_mixed },
+  { sfb_11025_long, sfb_11025_short, sfb_11025_mixed },
+  {  sfb_8000_long,  sfb_8000_short,  sfb_8000_mixed }
+};
+
+/*
+ * scalefactor band preemphasis (used only when preflag is set)
+ * derived from Table B.6 of ISO/IEC 11172-3
+ */
+static
+unsigned char const pretab[22] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0
+};
+
+/*
+ * table for requantization
+ *
+ * rq_table[x].mantissa * 2^(rq_table[x].exponent) = x^(4/3)
+ */
+static
+struct fixedfloat {
+  unsigned long mantissa; //   : 27;
+  unsigned short exponent; // :  5;
+} const rq_table[8207] = {
+# include "rq_table.dat"
+};
+
+/*
+ * fractional powers of two
+ * used for requantization and joint stereo decoding
+ *
+ * root_table[3 + x] = 2^(x/4)
+ */
+static
+mad_fixed_t const root_table[7] = {
+  MAD_F(0x09837f05) /* 2^(-3/4) == 0.59460355750136 */,
+  MAD_F(0x0b504f33) /* 2^(-2/4) == 0.70710678118655 */,
+  MAD_F(0x0d744fcd) /* 2^(-1/4) == 0.84089641525371 */,
+  MAD_F(0x10000000) /* 2^( 0/4) == 1.00000000000000 */,
+  MAD_F(0x1306fe0a) /* 2^(+1/4) == 1.18920711500272 */,
+  MAD_F(0x16a09e66) /* 2^(+2/4) == 1.41421356237310 */,
+  MAD_F(0x1ae89f99) /* 2^(+3/4) == 1.68179283050743 */
+};
+
+/*
+ * coefficients for aliasing reduction
+ * derived from Table B.9 of ISO/IEC 11172-3
+ *
+ *  c[]  = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 }
+ * cs[i] =    1 / sqrt(1 + c[i]^2)
+ * ca[i] = c[i] / sqrt(1 + c[i]^2)
+ */
+static
+mad_fixed_t const cs[8] = {
+  +MAD_F(0x0db84a81) /* +0.857492926 */, +MAD_F(0x0e1b9d7f) /* +0.881741997 */,
+  +MAD_F(0x0f31adcf) /* +0.949628649 */, +MAD_F(0x0fbba815) /* +0.983314592 */,
+  +MAD_F(0x0feda417) /* +0.995517816 */, +MAD_F(0x0ffc8fc8) /* +0.999160558 */,
+  +MAD_F(0x0fff964c) /* +0.999899195 */, +MAD_F(0x0ffff8d3) /* +0.999993155 */
+};
+
+static
+mad_fixed_t const ca[8] = {
+  -MAD_F(0x083b5fe7) /* -0.514495755 */, -MAD_F(0x078c36d2) /* -0.471731969 */,
+  -MAD_F(0x05039814) /* -0.313377454 */, -MAD_F(0x02e91dd1) /* -0.181913200 */,
+  -MAD_F(0x0183603a) /* -0.094574193 */, -MAD_F(0x00a7cb87) /* -0.040965583 */,
+  -MAD_F(0x003a2847) /* -0.014198569 */, -MAD_F(0x000f27b4) /* -0.003699975 */
+};
+
+/*
+ * IMDCT coefficients for short blocks
+ * derived from section 2.4.3.4.10.2 of ISO/IEC 11172-3
+ *
+ * imdct_s[i/even][k] = cos((PI / 24) * (2 *       (i / 2) + 7) * (2 * k + 1))
+ * imdct_s[i /odd][k] = cos((PI / 24) * (2 * (6 + (i-1)/2) + 7) * (2 * k + 1))
+ */
+static
+mad_fixed_t const imdct_s[6][6] = {
+# include "imdct_s.dat"
+};
+
+# if !defined(ASO_IMDCT)
+/*
+ * windowing coefficients for long blocks
+ * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
+ *
+ * window_l[i] = sin((PI / 36) * (i + 1/2))
+ */
+static
+mad_fixed_t const window_l[36] = {
+  MAD_F(0x00b2aa3e) /* 0.043619387 */, MAD_F(0x0216a2a2) /* 0.130526192 */,
+  MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x04cfb0e2) /* 0.300705800 */,
+  MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x07635284) /* 0.461748613 */,
+  MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x09bd7ca0) /* 0.608761429 */,
+  MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x0bcbe352) /* 0.737277337 */,
+  MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0d7e8807) /* 0.843391446 */,
+
+  MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0ec835e8) /* 0.923879533 */,
+  MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0f9ee890) /* 0.976296007 */,
+  MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ffc19fd) /* 0.999048222 */,
+  MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0fdcf549) /* 0.991444861 */,
+  MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0f426cb5) /* 0.953716951 */,
+  MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0e313245) /* 0.887010833 */,
+
+  MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0cb19346) /* 0.793353340 */,
+  MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0acf37ad) /* 0.675590208 */,
+  MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0898c779) /* 0.537299608 */,
+  MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x061f78aa) /* 0.382683432 */,
+  MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x03768962) /* 0.216439614 */,
+  MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x00b2aa3e) /* 0.043619387 */,
+};
+# endif  /* ASO_IMDCT */
+
+/*
+ * windowing coefficients for short blocks
+ * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
+ *
+ * window_s[i] = sin((PI / 12) * (i + 1/2))
+ */
+static
+mad_fixed_t const window_s[12] = {
+  MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x061f78aa) /* 0.382683432 */,
+  MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0cb19346) /* 0.793353340 */,
+  MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0fdcf549) /* 0.991444861 */,
+  MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ec835e8) /* 0.923879533 */,
+  MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x09bd7ca0) /* 0.608761429 */,
+  MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0216a2a2) /* 0.130526192 */,
+};
+
+/*
+ * coefficients for intensity stereo processing
+ * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3
+ *
+ * is_ratio[i] = tan(i * (PI / 12))
+ * is_table[i] = is_ratio[i] / (1 + is_ratio[i])
+ */
+static
+mad_fixed_t const is_table[7] = {
+  MAD_F(0x00000000) /* 0.000000000 */,
+  MAD_F(0x0361962f) /* 0.211324865 */,
+  MAD_F(0x05db3d74) /* 0.366025404 */,
+  MAD_F(0x08000000) /* 0.500000000 */,
+  MAD_F(0x0a24c28c) /* 0.633974596 */,
+  MAD_F(0x0c9e69d1) /* 0.788675135 */,
+  MAD_F(0x10000000) /* 1.000000000 */
+};
+
+/*
+ * coefficients for LSF intensity stereo processing
+ * derived from section 2.4.3.2 of ISO/IEC 13818-3
+ *
+ * is_lsf_table[0][i] = (1 / sqrt(sqrt(2)))^(i + 1)
+ * is_lsf_table[1][i] = (1 /      sqrt(2)) ^(i + 1)
+ */
+static
+mad_fixed_t const is_lsf_table[2][15] = {
+  {
+    MAD_F(0x0d744fcd) /* 0.840896415 */,
+    MAD_F(0x0b504f33) /* 0.707106781 */,
+    MAD_F(0x09837f05) /* 0.594603558 */,
+    MAD_F(0x08000000) /* 0.500000000 */,
+    MAD_F(0x06ba27e6) /* 0.420448208 */,
+    MAD_F(0x05a8279a) /* 0.353553391 */,
+    MAD_F(0x04c1bf83) /* 0.297301779 */,
+    MAD_F(0x04000000) /* 0.250000000 */,
+    MAD_F(0x035d13f3) /* 0.210224104 */,
+    MAD_F(0x02d413cd) /* 0.176776695 */,
+    MAD_F(0x0260dfc1) /* 0.148650889 */,
+    MAD_F(0x02000000) /* 0.125000000 */,
+    MAD_F(0x01ae89fa) /* 0.105112052 */,
+    MAD_F(0x016a09e6) /* 0.088388348 */,
+    MAD_F(0x01306fe1) /* 0.074325445 */
+  }, {
+    MAD_F(0x0b504f33) /* 0.707106781 */,
+    MAD_F(0x08000000) /* 0.500000000 */,
+    MAD_F(0x05a8279a) /* 0.353553391 */,
+    MAD_F(0x04000000) /* 0.250000000 */,
+    MAD_F(0x02d413cd) /* 0.176776695 */,
+    MAD_F(0x02000000) /* 0.125000000 */,
+    MAD_F(0x016a09e6) /* 0.088388348 */,
+    MAD_F(0x01000000) /* 0.062500000 */,
+    MAD_F(0x00b504f3) /* 0.044194174 */,
+    MAD_F(0x00800000) /* 0.031250000 */,
+    MAD_F(0x005a827a) /* 0.022097087 */,
+    MAD_F(0x00400000) /* 0.015625000 */,
+    MAD_F(0x002d413d) /* 0.011048543 */,
+    MAD_F(0x00200000) /* 0.007812500 */,
+    MAD_F(0x0016a09e) /* 0.005524272 */
+  }
+};
+
+/*
+ * NAME:	III_sideinfo()
+ * DESCRIPTION:	decode frame side information from a bitstream
+ */
+static
+enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch,
+			    int lsf, struct sideinfo *si,
+			    unsigned int *data_bitlen,
+			    unsigned int *priv_bitlen)
+{
+  unsigned int ngr, gr, ch, i;
+  enum mad_error result = MAD_ERROR_NONE;
+
+  *data_bitlen = 0;
+  *priv_bitlen = lsf ? ((nch == 1) ? 1 : 2) : ((nch == 1) ? 5 : 3);
+
+  si->main_data_begin = mad_bit_read(ptr, lsf ? 8 : 9);
+  si->private_bits    = mad_bit_read(ptr, *priv_bitlen);
+
+  ngr = 1;
+  if (!lsf) {
+    ngr = 2;
+
+    for (ch = 0; ch < nch; ++ch)
+      si->scfsi[ch] = mad_bit_read(ptr, 4);
+  }
+
+  for (gr = 0; gr < ngr; ++gr) {
+    struct granule *granule = &si->gr[gr];
+
+    for (ch = 0; ch < nch; ++ch) {
+      struct channel *channel = &granule->ch[ch];
+
+      channel->part2_3_length    = mad_bit_read(ptr, 12);
+      channel->big_values        = mad_bit_read(ptr, 9);
+      channel->global_gain       = mad_bit_read(ptr, 8);
+      channel->scalefac_compress = mad_bit_read(ptr, lsf ? 9 : 4);
+
+      *data_bitlen += channel->part2_3_length;
+
+      if (channel->big_values > 288 && result == 0)
+	result = MAD_ERROR_BADBIGVALUES;
+
+      channel->flags = 0;
+
+      /* window_switching_flag */
+      if (mad_bit_read(ptr, 1)) {
+	channel->block_type = mad_bit_read(ptr, 2);
+
+	if (channel->block_type == 0 && result == 0)
+	  result = MAD_ERROR_BADBLOCKTYPE;
+
+	if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0)
+	  result = MAD_ERROR_BADSCFSI;
+
+	channel->region0_count = 7;
+	channel->region1_count = 36;
+
+	if (mad_bit_read(ptr, 1))
+	  channel->flags |= mixed_block_flag;
+	else if (channel->block_type == 2)
+	  channel->region0_count = 8;
+
+	for (i = 0; i < 2; ++i)
+	  channel->table_select[i] = mad_bit_read(ptr, 5);
+
+# if defined(DEBUG)
+	channel->table_select[2] = 4;  /* not used */
+# endif
+
+	for (i = 0; i < 3; ++i)
+	  channel->subblock_gain[i] = mad_bit_read(ptr, 3);
+      }
+      else {
+	channel->block_type = 0;
+
+	for (i = 0; i < 3; ++i)
+	  channel->table_select[i] = mad_bit_read(ptr, 5);
+
+	channel->region0_count = mad_bit_read(ptr, 4);
+	channel->region1_count = mad_bit_read(ptr, 3);
+      }
+
+      /* [preflag,] scalefac_scale, count1table_select */
+      channel->flags |= mad_bit_read(ptr, lsf ? 2 : 3);
+    }
+  }
+
+  return result;
+}
+
+/*
+ * NAME:	III_scalefactors_lsf()
+ * DESCRIPTION:	decode channel scalefactors for LSF from a bitstream
+ */
+static
+unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
+				  struct channel *channel,
+				  struct channel *gr1ch, int mode_extension)
+{
+  struct mad_bitptr start;
+  unsigned int scalefac_compress, index, slen[4], part, n, i;
+  unsigned char const *nsfb;
+
+  start = *ptr;
+
+  scalefac_compress = channel->scalefac_compress;
+  index = (channel->block_type == 2) ?
+    ((channel->flags & mixed_block_flag) ? 2 : 1) : 0;
+
+  if (!((mode_extension & I_STEREO) && gr1ch)) {
+    if (scalefac_compress < 400) {
+      slen[0] = (scalefac_compress >> 4) / 5;
+      slen[1] = (scalefac_compress >> 4) % 5;
+      slen[2] = (scalefac_compress % 16) >> 2;
+      slen[3] =  scalefac_compress %  4;
+
+      nsfb = nsfb_table[0][index];
+    }
+    else if (scalefac_compress < 500) {
+      scalefac_compress -= 400;
+
+      slen[0] = (scalefac_compress >> 2) / 5;
+      slen[1] = (scalefac_compress >> 2) % 5;
+      slen[2] =  scalefac_compress %  4;
+      slen[3] = 0;
+
+      nsfb = nsfb_table[1][index];
+    }
+    else {
+      scalefac_compress -= 500;
+
+      slen[0] = scalefac_compress / 3;
+      slen[1] = scalefac_compress % 3;
+      slen[2] = 0;
+      slen[3] = 0;
+
+      channel->flags |= preflag;
+
+      nsfb = nsfb_table[2][index];
+    }
+
+    n = 0;
+    for (part = 0; part < 4; ++part) {
+      for (i = 0; i < nsfb[part]; ++i)
+	channel->scalefac[n++] = mad_bit_read(ptr, slen[part]);
+    }
+
+    while (n < 39)
+      channel->scalefac[n++] = 0;
+  }
+  else {  /* (mode_extension & I_STEREO) && gr1ch (i.e. ch == 1) */
+    scalefac_compress >>= 1;
+
+    if (scalefac_compress < 180) {
+      slen[0] =  scalefac_compress / 36;
+      slen[1] = (scalefac_compress % 36) / 6;
+      slen[2] = (scalefac_compress % 36) % 6;
+      slen[3] = 0;
+
+      nsfb = nsfb_table[3][index];
+    }
+    else if (scalefac_compress < 244) {
+      scalefac_compress -= 180;
+
+      slen[0] = (scalefac_compress % 64) >> 4;
+      slen[1] = (scalefac_compress % 16) >> 2;
+      slen[2] =  scalefac_compress %  4;
+      slen[3] = 0;
+
+      nsfb = nsfb_table[4][index];
+    }
+    else {
+      scalefac_compress -= 244;
+
+      slen[0] = scalefac_compress / 3;
+      slen[1] = scalefac_compress % 3;
+      slen[2] = 0;
+      slen[3] = 0;
+
+      nsfb = nsfb_table[5][index];
+    }
+
+    n = 0;
+    for (part = 0; part < 4; ++part) {
+      unsigned int max, is_pos;
+
+      max = (1 << slen[part]) - 1;
+
+      for (i = 0; i < nsfb[part]; ++i) {
+	is_pos = mad_bit_read(ptr, slen[part]);
+
+	channel->scalefac[n] = is_pos;
+	gr1ch->scalefac[n++] = (is_pos == max);
+      }
+    }
+
+    while (n < 39) {
+      channel->scalefac[n] = 0;
+      gr1ch->scalefac[n++] = 0;  /* apparently not illegal */
+    }
+  }
+
+  return mad_bit_length(&start, ptr);
+}
+
+/*
+ * NAME:	III_scalefactors()
+ * DESCRIPTION:	decode channel scalefactors of one granule from a bitstream
+ */
+static
+unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
+			      struct channel const *gr0ch, unsigned int scfsi)
+{
+  struct mad_bitptr start;
+  unsigned int slen1, slen2, sfbi;
+
+  start = *ptr;
+
+  slen1 = sflen_table[channel->scalefac_compress].slen1;
+  slen2 = sflen_table[channel->scalefac_compress].slen2;
+
+  if (channel->block_type == 2) {
+    unsigned int nsfb;
+
+    sfbi = 0;
+
+    nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3;
+    while (nsfb--)
+      channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1);
+
+    nsfb = 6 * 3;
+    while (nsfb--)
+      channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2);
+
+    nsfb = 1 * 3;
+    while (nsfb--)
+      channel->scalefac[sfbi++] = 0;
+  }
+  else {  /* channel->block_type != 2 */
+    if (scfsi & 0x8) {
+      for (sfbi = 0; sfbi < 6; ++sfbi)
+	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
+    }
+    else {
+      for (sfbi = 0; sfbi < 6; ++sfbi)
+	channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
+    }
+
+    if (scfsi & 0x4) {
+      for (sfbi = 6; sfbi < 11; ++sfbi)
+	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
+    }
+    else {
+      for (sfbi = 6; sfbi < 11; ++sfbi)
+	channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
+    }
+
+    if (scfsi & 0x2) {
+      for (sfbi = 11; sfbi < 16; ++sfbi)
+	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
+    }
+    else {
+      for (sfbi = 11; sfbi < 16; ++sfbi)
+	channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
+    }
+
+    if (scfsi & 0x1) {
+      for (sfbi = 16; sfbi < 21; ++sfbi)
+	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
+    }
+    else {
+      for (sfbi = 16; sfbi < 21; ++sfbi)
+	channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
+    }
+
+    channel->scalefac[21] = 0;
+  }
+
+  return mad_bit_length(&start, ptr);
+}
+
+/*
+ * The Layer III formula for requantization and scaling is defined by
+ * section 2.4.3.4.7.1 of ISO/IEC 11172-3, as follows:
+ *
+ *   long blocks:
+ *   xr[i] = sign(is[i]) * abs(is[i])^(4/3) *
+ *           2^((1/4) * (global_gain - 210)) *
+ *           2^-(scalefac_multiplier *
+ *               (scalefac_l[sfb] + preflag * pretab[sfb]))
+ *
+ *   short blocks:
+ *   xr[i] = sign(is[i]) * abs(is[i])^(4/3) *
+ *           2^((1/4) * (global_gain - 210 - 8 * subblock_gain[w])) *
+ *           2^-(scalefac_multiplier * scalefac_s[sfb][w])
+ *
+ *   where:
+ *   scalefac_multiplier = (scalefac_scale + 1) / 2
+ *
+ * The routines III_exponents() and III_requantize() facilitate this
+ * calculation.
+ */
+
+/*
+ * NAME:	III_exponents()
+ * DESCRIPTION:	calculate scalefactor exponents
+ */
+static
+void III_exponents(struct channel const *channel,
+		   unsigned char const *sfbwidth, signed int exponents[39])
+{
+  signed int gain;
+  unsigned int scalefac_multiplier, sfbi;
+
+  gain = (signed int) channel->global_gain - 210;
+  scalefac_multiplier = (channel->flags & scalefac_scale) ? 2 : 1;
+
+  if (channel->block_type == 2) {
+    unsigned int l;
+    signed int gain0, gain1, gain2;
+
+    sfbi = l = 0;
+
+    if (channel->flags & mixed_block_flag) {
+      unsigned int premask;
+
+      premask = (channel->flags & preflag) ? ~0 : 0;
+
+      /* long block subbands 0-1 */
+
+      while (l < 36) {
+	exponents[sfbi] = gain -
+	  (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) <<
+			scalefac_multiplier);
+
+	l += sfbwidth[sfbi++];
+      }
+    }
+
+    /* this is probably wrong for 8000 Hz short/mixed blocks */
+
+    gain0 = gain - 8 * (signed int) channel->subblock_gain[0];
+    gain1 = gain - 8 * (signed int) channel->subblock_gain[1];
+    gain2 = gain - 8 * (signed int) channel->subblock_gain[2];
+
+    while (l < 576) {
+      exponents[sfbi + 0] = gain0 -
+	(signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier);
+      exponents[sfbi + 1] = gain1 -
+	(signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier);
+      exponents[sfbi + 2] = gain2 -
+	(signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier);
+
+      l    += 3 * sfbwidth[sfbi];
+      sfbi += 3;
+    }
+  }
+  else {  /* channel->block_type != 2 */
+    if (channel->flags & preflag) {
+      for (sfbi = 0; sfbi < 22; ++sfbi) {
+	exponents[sfbi] = gain -
+	  (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) <<
+			scalefac_multiplier);
+      }
+    }
+    else {
+      for (sfbi = 0; sfbi < 22; ++sfbi) {
+	exponents[sfbi] = gain -
+	  (signed int) (channel->scalefac[sfbi] << scalefac_multiplier);
+      }
+    }
+  }
+}
+
+/*
+ * NAME:	III_requantize()
+ * DESCRIPTION:	requantize one (positive) value
+ */
+static
+mad_fixed_t III_requantize(unsigned int value, signed int exp)
+{
+  mad_fixed_t requantized;
+  signed int frac;
+  struct fixedfloat const *power;
+
+  frac = exp % 4;  /* assumes sign(frac) == sign(exp) */
+  exp /= 4;
+
+  power = &rq_table[value];
+  requantized = power->mantissa;
+  exp += power->exponent;
+
+  if (exp < 0) {
+    if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) {
+      /* underflow */
+      requantized = 0;
+    }
+    else {
+      requantized += 1L << (-exp - 1);
+      requantized >>= -exp;
+    }
+  }
+  else {
+    if (exp >= 5) {
+      /* overflow */
+# if defined(DEBUG)
+      fprintf(stderr, "requantize overflow (%f * 2^%d)\n",
+	      mad_f_todouble(requantized), exp);
+# endif
+      requantized = MAD_F_MAX;
+    }
+    else
+      requantized <<= exp;
+  }
+
+  return frac ? mad_f_mul(requantized, root_table[3 + frac]) : requantized;
+}
+
+/* we must take care that sz >= bits and sz < sizeof(long) lest bits == 0 */
+# define MASK(cache, sz, bits)	\
+    (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1))
+# define MASK1BIT(cache, sz)  \
+    ((cache) & (1 << ((sz) - 1)))
+
+/*
+ * NAME:	III_huffdecode()
+ * DESCRIPTION:	decode Huffman code words of one channel of one granule
+ */
+static
+enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
+			      struct channel *channel,
+			      unsigned char const *sfbwidth,
+			      unsigned int part2_length)
+{
+  signed int exponents[39], exp;
+  signed int const *expptr;
+  struct mad_bitptr peek;
+  signed int bits_left, cachesz;
+  register mad_fixed_t *xrptr;
+  mad_fixed_t const *sfbound;
+  register unsigned long bitcache;
+
+  bits_left = (signed) channel->part2_3_length - (signed) part2_length;
+  if (bits_left < 0)
+    return MAD_ERROR_BADPART3LEN;
+
+  III_exponents(channel, sfbwidth, exponents);
+
+  peek = *ptr;
+  mad_bit_skip(ptr, bits_left);
+
+  /* align bit reads to byte boundaries */
+  cachesz  = mad_bit_bitsleft(&peek);
+  cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7;
+
+  bitcache   = mad_bit_read(&peek, cachesz);
+  bits_left -= cachesz;
+
+  xrptr = &xr[0];
+
+  /* big_values */
+  {
+    unsigned int region, rcount;
+    struct hufftable const *entry;
+    struct huffpair const *table;
+    unsigned int linbits, startbits, big_values, reqhits;
+    mad_fixed_t reqcache[16];
+
+    sfbound = xrptr + *sfbwidth++;
+    rcount  = channel->region0_count + 1;
+
+    entry     = &mad_huff_pair_table[channel->table_select[region = 0]];
+    table     = entry->table;
+    linbits   = entry->linbits;
+    startbits = entry->startbits;
+
+    if (table == 0)
+      return MAD_ERROR_BADHUFFTABLE;
+
+    expptr  = &exponents[0];
+    exp     = *expptr++;
+    reqhits = 0;
+
+    big_values = channel->big_values;
+
+    while (big_values-- && cachesz + bits_left > 0) {
+      struct huffpair const *pair;
+      unsigned int clumpsz, value;
+      register mad_fixed_t requantized;
+
+      if (xrptr == sfbound) {
+	sfbound += *sfbwidth++;
+
+	/* change table if region boundary */
+
+	if (--rcount == 0) {
+	  if (region == 0)
+	    rcount = channel->region1_count + 1;
+	  else
+	    rcount = 0;  /* all remaining */
+
+	  entry     = &mad_huff_pair_table[channel->table_select[++region]];
+	  table     = entry->table;
+	  linbits   = entry->linbits;
+	  startbits = entry->startbits;
+
+	  if (table == 0)
+	    return MAD_ERROR_BADHUFFTABLE;
+	}
+
+	if (exp != *expptr) {
+	  exp = *expptr;
+	  reqhits = 0;
+	}
+
+	++expptr;
+      }
+
+      if (cachesz < 21) {
+	unsigned int bits;
+
+	bits       = ((32 - 1 - 21) + (21 - cachesz)) & ~7;
+	bitcache   = (bitcache << bits) | mad_bit_read(&peek, bits);
+	cachesz   += bits;
+	bits_left -= bits;
+      }
+
+      /* hcod (0..19) */
+
+      clumpsz = startbits;
+      pair    = &table[MASK(bitcache, cachesz, clumpsz)];
+
+      while (!pair->final) {
+	cachesz -= clumpsz;
+
+	clumpsz = pair->ptr.bits;
+	pair    = &table[pair->ptr.offset + MASK(bitcache, cachesz, clumpsz)];
+      }
+
+      cachesz -= pair->value.hlen;
+
+      if (linbits) {
+	/* x (0..14) */
+
+	value = pair->value.x;
+
+	switch (value) {
+	case 0:
+	  xrptr[0] = 0;
+	  break;
+
+	case 15:
+	  if (cachesz < linbits + 2) {
+	    bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
+	    cachesz   += 16;
+	    bits_left -= 16;
+	  }
+
+	  value += MASK(bitcache, cachesz, linbits);
+	  cachesz -= linbits;
+
+	  requantized = III_requantize(value, exp);
+	  goto x_final;
+
+	default:
+	  if (reqhits & (1 << value))
+	    requantized = reqcache[value];
+	  else {
+	    reqhits |= (1 << value);
+	    requantized = reqcache[value] = III_requantize(value, exp);
+	  }
+
+	x_final:
+	  xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
+	    -requantized : requantized;
+	}
+
+	/* y (0..14) */
+
+	value = pair->value.y;
+
+	switch (value) {
+	case 0:
+	  xrptr[1] = 0;
+	  break;
+
+	case 15:
+	  if (cachesz < linbits + 1) {
+	    bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
+	    cachesz   += 16;
+	    bits_left -= 16;
+	  }
+
+	  value += MASK(bitcache, cachesz, linbits);
+	  cachesz -= linbits;
+
+	  requantized = III_requantize(value, exp);
+	  goto y_final;
+
+	default:
+	  if (reqhits & (1 << value))
+	    requantized = reqcache[value];
+	  else {
+	    reqhits |= (1 << value);
+	    requantized = reqcache[value] = III_requantize(value, exp);
+	  }
+
+	y_final:
+	  xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
+	    -requantized : requantized;
+	}
+      }
+      else {
+	/* x (0..1) */
+
+	value = pair->value.x;
+
+	if (value == 0)
+	  xrptr[0] = 0;
+	else {
+	  if (reqhits & (1 << value))
+	    requantized = reqcache[value];
+	  else {
+	    reqhits |= (1 << value);
+	    requantized = reqcache[value] = III_requantize(value, exp);
+	  }
+
+	  xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
+	    -requantized : requantized;
+	}
+
+	/* y (0..1) */
+
+	value = pair->value.y;
+
+	if (value == 0)
+	  xrptr[1] = 0;
+	else {
+	  if (reqhits & (1 << value))
+	    requantized = reqcache[value];
+	  else {
+	    reqhits |= (1 << value);
+	    requantized = reqcache[value] = III_requantize(value, exp);
+	  }
+
+	  xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
+	    -requantized : requantized;
+	}
+      }
+
+      xrptr += 2;
+    }
+  }
+
+  if (cachesz + bits_left < 0)
+    return MAD_ERROR_BADHUFFDATA;  /* big_values overrun */
+
+  /* count1 */
+  {
+    struct huffquad const *table;
+    register mad_fixed_t requantized;
+
+    table = mad_huff_quad_table[channel->flags & count1table_select];
+
+    requantized = III_requantize(1, exp);
+
+    while (cachesz + bits_left > 0 && xrptr <= &xr[572]) {
+      struct huffquad const *quad;
+
+      /* hcod (1..6) */
+
+      if (cachesz < 10) {
+	bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
+	cachesz   += 16;
+	bits_left -= 16;
+      }
+
+      quad = &table[MASK(bitcache, cachesz, 4)];
+
+      /* quad tables guaranteed to have at most one extra lookup */
+      if (!quad->final) {
+	cachesz -= 4;
+
+	quad = &table[quad->ptr.offset +
+		      MASK(bitcache, cachesz, quad->ptr.bits)];
+      }
+
+      cachesz -= quad->value.hlen;
+
+      if (xrptr == sfbound) {
+	sfbound += *sfbwidth++;
+
+	if (exp != *expptr) {
+	  exp = *expptr;
+	  requantized = III_requantize(1, exp);
+	}
+
+	++expptr;
+      }
+
+      /* v (0..1) */
+
+      xrptr[0] = quad->value.v ?
+	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
+
+      /* w (0..1) */
+
+      xrptr[1] = quad->value.w ?
+	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
+
+      xrptr += 2;
+
+      if (xrptr == sfbound) {
+	sfbound += *sfbwidth++;
+
+	if (exp != *expptr) {
+	  exp = *expptr;
+	  requantized = III_requantize(1, exp);
+	}
+
+	++expptr;
+      }
+
+      /* x (0..1) */
+
+      xrptr[0] = quad->value.x ?
+	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
+
+      /* y (0..1) */
+
+      xrptr[1] = quad->value.y ?
+	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
+
+      xrptr += 2;
+    }
+
+    if (cachesz + bits_left < 0) {
+# if 0 && defined(DEBUG)
+      fprintf(stderr, "huffman count1 overrun (%d bits)\n",
+	      -(cachesz + bits_left));
+# endif
+
+      /* technically the bitstream is misformatted, but apparently
+	 some encoders are just a bit sloppy with stuffing bits */
+
+      xrptr -= 4;
+    }
+  }
+
+  assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT);
+
+# if 0 && defined(DEBUG)
+  if (bits_left < 0)
+    fprintf(stderr, "read %d bits too many\n", -bits_left);
+  else if (cachesz + bits_left > 0)
+    fprintf(stderr, "%d stuffing bits\n", cachesz + bits_left);
+# endif
+
+  /* rzero */
+  while (xrptr < &xr[576]) {
+    xrptr[0] = 0;
+    xrptr[1] = 0;
+
+    xrptr += 2;
+  }
+
+  return MAD_ERROR_NONE;
+}
+
+# undef MASK
+# undef MASK1BIT
+
+/*
+ * NAME:	III_reorder()
+ * DESCRIPTION:	reorder frequency lines of a short block into subband order
+ */
+static
+void III_reorder(mad_fixed_t xr[576], struct channel const *channel,
+		 unsigned char const sfbwidth[39])
+{
+  mad_fixed_t tmp[32][3][6];
+  unsigned int sb, l, f, w, sbw[3], sw[3];
+
+  /* this is probably wrong for 8000 Hz mixed blocks */
+
+  sb = 0;
+  if (channel->flags & mixed_block_flag) {
+    sb = 2;
+
+    l = 0;
+    while (l < 36)
+      l += *sfbwidth++;
+  }
+
+  for (w = 0; w < 3; ++w) {
+    sbw[w] = sb;
+    sw[w]  = 0;
+  }
+
+  f = *sfbwidth++;
+  w = 0;
+
+  for (l = 18 * sb; l < 576; ++l) {
+    if (f-- == 0) {
+      f = *sfbwidth++ - 1;
+      w = (w + 1) % 3;
+    }
+
+    tmp[sbw[w]][w][sw[w]++] = xr[l];
+
+    if (sw[w] == 6) {
+      sw[w] = 0;
+      ++sbw[w];
+    }
+  }
+
+  memcpy(&xr[18 * sb], &tmp[sb], (576 - 18 * sb) * sizeof(mad_fixed_t));
+}
+
+/*
+ * NAME:	III_stereo()
+ * DESCRIPTION:	perform joint stereo processing on a granule
+ */
+static
+enum mad_error III_stereo(mad_fixed_t xr[2][576],
+			  struct granule const *granule,
+			  struct mad_header *header,
+			  unsigned char const *sfbwidth)
+{
+  short modes[39];
+  unsigned int sfbi, l, n, i;
+
+  if (granule->ch[0].block_type !=
+      granule->ch[1].block_type ||
+      (granule->ch[0].flags & mixed_block_flag) !=
+      (granule->ch[1].flags & mixed_block_flag))
+    return MAD_ERROR_BADSTEREO;
+
+  for (i = 0; i < 39; ++i)
+    modes[i] = header->mode_extension;
+
+  /* intensity stereo */
+
+  if (header->mode_extension & I_STEREO) {
+    struct channel const *right_ch = &granule->ch[1];
+    mad_fixed_t const *right_xr = xr[1];
+    unsigned int is_pos;
+
+    header->flags |= MAD_FLAG_I_STEREO;
+
+    /* first determine which scalefactor bands are to be processed */
+
+    if (right_ch->block_type == 2) {
+      unsigned int lower, start, max, bound[3], w;
+
+      lower = start = max = bound[0] = bound[1] = bound[2] = 0;
+
+      sfbi = l = 0;
+
+      if (right_ch->flags & mixed_block_flag) {
+	while (l < 36) {
+	  n = sfbwidth[sfbi++];
+
+	  for (i = 0; i < n; ++i) {
+	    if (right_xr[i]) {
+	      lower = sfbi;
+	      break;
+	    }
+	  }
+
+	  right_xr += n;
+	  l += n;
+	}
+
+	start = sfbi;
+      }
+
+      w = 0;
+      while (l < 576) {
+	n = sfbwidth[sfbi++];
+
+	for (i = 0; i < n; ++i) {
+	  if (right_xr[i]) {
+	    max = bound[w] = sfbi;
+	    break;
+	  }
+	}
+
+	right_xr += n;
+	l += n;
+	w = (w + 1) % 3;
+      }
+
+      if (max)
+	lower = start;
+
+      /* long blocks */
+
+      for (i = 0; i < lower; ++i)
+	modes[i] = header->mode_extension & ~I_STEREO;
+
+      /* short blocks */
+
+      w = 0;
+      for (i = start; i < max; ++i) {
+	if (i < bound[w])
+	  modes[i] = header->mode_extension & ~I_STEREO;
+
+	w = (w + 1) % 3;
+      }
+    }
+    else {  /* right_ch->block_type != 2 */
+      unsigned int bound;
+
+      bound = 0;
+      for (sfbi = l = 0; l < 576; l += n) {
+	n = sfbwidth[sfbi++];
+
+	for (i = 0; i < n; ++i) {
+	  if (right_xr[i]) {
+	    bound = sfbi;
+	    break;
+	  }
+	}
+
+	right_xr += n;
+      }
+
+      for (i = 0; i < bound; ++i)
+	modes[i] = header->mode_extension & ~I_STEREO;
+    }
+
+    /* now do the actual processing */
+
+    if (header->flags & MAD_FLAG_LSF_EXT) {
+      unsigned char const *illegal_pos = granule[1].ch[1].scalefac;
+      mad_fixed_t const *lsf_scale;
+
+      /* intensity_scale */
+      lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1];
+
+      for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+	n = sfbwidth[sfbi];
+
+	if (!(modes[sfbi] & I_STEREO))
+	  continue;
+
+	if (illegal_pos[sfbi]) {
+	  modes[sfbi] &= ~I_STEREO;
+	  continue;
+	}
+
+	is_pos = right_ch->scalefac[sfbi];
+
+	for (i = 0; i < n; ++i) {
+	  register mad_fixed_t left;
+
+	  left = xr[0][l + i];
+
+	  if (is_pos == 0)
+	    xr[1][l + i] = left;
+	  else {
+	    register mad_fixed_t opposite;
+
+	    opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]);
+
+	    if (is_pos & 1) {
+	      xr[0][l + i] = opposite;
+	      xr[1][l + i] = left;
+	    }
+	    else
+	      xr[1][l + i] = opposite;
+	  }
+	}
+      }
+    }
+    else {  /* !(header->flags & MAD_FLAG_LSF_EXT) */
+      for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+	n = sfbwidth[sfbi];
+
+	if (!(modes[sfbi] & I_STEREO))
+	  continue;
+
+	is_pos = right_ch->scalefac[sfbi];
+
+	if (is_pos >= 7) {  /* illegal intensity position */
+	  modes[sfbi] &= ~I_STEREO;
+	  continue;
+	}
+
+	for (i = 0; i < n; ++i) {
+	  register mad_fixed_t left;
+
+	  left = xr[0][l + i];
+
+	  xr[0][l + i] = mad_f_mul(left, is_table[    is_pos]);
+	  xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]);
+	}
+      }
+    }
+  }
+
+  /* middle/side stereo */
+
+  if (header->mode_extension & MS_STEREO) {
+    register mad_fixed_t invsqrt2;
+
+    header->flags |= MAD_FLAG_MS_STEREO;
+
+    invsqrt2 = root_table[3 + -2];
+
+    for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
+      n = sfbwidth[sfbi];
+
+      if (modes[sfbi] != MS_STEREO)
+	continue;
+
+      for (i = 0; i < n; ++i) {
+	register mad_fixed_t m, s;
+
+	m = xr[0][l + i];
+	s = xr[1][l + i];
+
+	xr[0][l + i] = mad_f_mul(m + s, invsqrt2);  /* l = (m + s) / sqrt(2) */
+	xr[1][l + i] = mad_f_mul(m - s, invsqrt2);  /* r = (m - s) / sqrt(2) */
+      }
+    }
+  }
+
+  return MAD_ERROR_NONE;
+}
+
+/*
+ * NAME:	III_aliasreduce()
+ * DESCRIPTION:	perform frequency line alias reduction
+ */
+static
+void III_aliasreduce(mad_fixed_t xr[576], int lines)
+{
+  mad_fixed_t const *bound;
+  int i;
+
+  bound = &xr[lines];
+  for (xr += 18; xr < bound; xr += 18) {
+    for (i = 0; i < 8; ++i) {
+      register mad_fixed_t a, b;
+      register mad_fixed64hi_t hi;
+      register mad_fixed64lo_t lo;
+
+      a = xr[-1 - i];
+      b = xr[     i];
+
+# if defined(ASO_ZEROCHECK)
+      if (a | b) {
+# endif
+	MAD_F_ML0(hi, lo,  a, cs[i]);
+	MAD_F_MLA(hi, lo, -b, ca[i]);
+
+	xr[-1 - i] = MAD_F_MLZ(hi, lo);
+
+	MAD_F_ML0(hi, lo,  b, cs[i]);
+	MAD_F_MLA(hi, lo,  a, ca[i]);
+
+	xr[     i] = MAD_F_MLZ(hi, lo);
+# if defined(ASO_ZEROCHECK)
+      }
+# endif
+    }
+  }
+}
+
+# if defined(ASO_IMDCT)
+void III_imdct_l(mad_fixed_t const [18], mad_fixed_t [36], unsigned int);
+# else
+#  if 1
+static
+void fastsdct(mad_fixed_t const x[9], mad_fixed_t y[18])
+{
+  mad_fixed_t a0,  a1,  a2,  a3,  a4,  a5,  a6,  a7,  a8,  a9,  a10, a11, a12;
+  mad_fixed_t a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25;
+  mad_fixed_t m0,  m1,  m2,  m3,  m4,  m5,  m6,  m7;
+
+  enum {
+    c0 =  MAD_F(0x1f838b8d),  /* 2 * cos( 1 * PI / 18) */
+    c1 =  MAD_F(0x1bb67ae8),  /* 2 * cos( 3 * PI / 18) */
+    c2 =  MAD_F(0x18836fa3),  /* 2 * cos( 4 * PI / 18) */
+    c3 =  MAD_F(0x1491b752),  /* 2 * cos( 5 * PI / 18) */
+    c4 =  MAD_F(0x0af1d43a),  /* 2 * cos( 7 * PI / 18) */
+    c5 =  MAD_F(0x058e86a0),  /* 2 * cos( 8 * PI / 18) */
+    c6 = -MAD_F(0x1e11f642)   /* 2 * cos(16 * PI / 18) */
+  };
+
+  a0 = x[3] + x[5];
+  a1 = x[3] - x[5];
+  a2 = x[6] + x[2];
+  a3 = x[6] - x[2];
+  a4 = x[1] + x[7];
+  a5 = x[1] - x[7];
+  a6 = x[8] + x[0];
+  a7 = x[8] - x[0];
+
+  a8  = a0  + a2;
+  a9  = a0  - a2;
+  a10 = a0  - a6;
+  a11 = a2  - a6;
+  a12 = a8  + a6;
+  a13 = a1  - a3;
+  a14 = a13 + a7;
+  a15 = a3  + a7;
+  a16 = a1  - a7;
+  a17 = a1  + a3;
+
+  m0 = mad_f_mul(a17, -c3);
+  m1 = mad_f_mul(a16, -c0);
+  m2 = mad_f_mul(a15, -c4);
+  m3 = mad_f_mul(a14, -c1);
+  m4 = mad_f_mul(a5,  -c1);
+  m5 = mad_f_mul(a11, -c6);
+  m6 = mad_f_mul(a10, -c5);
+  m7 = mad_f_mul(a9,  -c2);
+
+  a18 =     x[4] + a4;
+  a19 = 2 * x[4] - a4;
+  a20 = a19 + m5;
+  a21 = a19 - m5;
+  a22 = a19 + m6;
+  a23 = m4  + m2;
+  a24 = m4  - m2;
+  a25 = m4  + m1;
+
+  /* output to every other slot for convenience */
+
+  y[ 0] = a18 + a12;
+  y[ 2] = m0  - a25;
+  y[ 4] = m7  - a20;
+  y[ 6] = m3;
+  y[ 8] = a21 - m6;
+  y[10] = a24 - m1;
+  y[12] = a12 - 2 * a18;
+  y[14] = a23 + m0;
+  y[16] = a22 + m7;
+}
+
+static inline
+void sdctII(mad_fixed_t const x[18], mad_fixed_t X[18])
+{
+  mad_fixed_t tmp[9];
+  int i;
+
+  /* scale[i] = 2 * cos(PI * (2 * i + 1) / (2 * 18)) */
+  static mad_fixed_t const scale[9] = {
+    MAD_F(0x1fe0d3b4), MAD_F(0x1ee8dd47), MAD_F(0x1d007930),
+    MAD_F(0x1a367e59), MAD_F(0x16a09e66), MAD_F(0x125abcf8),
+    MAD_F(0x0d8616bc), MAD_F(0x08483ee1), MAD_F(0x02c9fad7)
+  };
+
+  /* divide the 18-point SDCT-II into two 9-point SDCT-IIs */
+
+  /* even input butterfly */
+
+  for (i = 0; i < 9; i += 3) {
+    tmp[i + 0] = x[i + 0] + x[18 - (i + 0) - 1];
+    tmp[i + 1] = x[i + 1] + x[18 - (i + 1) - 1];
+    tmp[i + 2] = x[i + 2] + x[18 - (i + 2) - 1];
+  }
+
+  fastsdct(tmp, &X[0]);
+
+  /* odd input butterfly and scaling */
+
+  for (i = 0; i < 9; i += 3) {
+    tmp[i + 0] = mad_f_mul(x[i + 0] - x[18 - (i + 0) - 1], scale[i + 0]);
+    tmp[i + 1] = mad_f_mul(x[i + 1] - x[18 - (i + 1) - 1], scale[i + 1]);
+    tmp[i + 2] = mad_f_mul(x[i + 2] - x[18 - (i + 2) - 1], scale[i + 2]);
+  }
+
+  fastsdct(tmp, &X[1]);
+
+  /* output accumulation */
+
+  for (i = 3; i < 18; i += 8) {
+    X[i + 0] -= X[(i + 0) - 2];
+    X[i + 2] -= X[(i + 2) - 2];
+    X[i + 4] -= X[(i + 4) - 2];
+    X[i + 6] -= X[(i + 6) - 2];
+  }
+}
+
+static inline
+void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18])
+{
+  mad_fixed_t tmp[18];
+  int i;
+
+  /* scale[i] = 2 * cos(PI * (2 * i + 1) / (4 * 18)) */
+  static mad_fixed_t const scale[18] = {
+    MAD_F(0x1ff833fa), MAD_F(0x1fb9ea93), MAD_F(0x1f3dd120),
+    MAD_F(0x1e84d969), MAD_F(0x1d906bcf), MAD_F(0x1c62648b),
+    MAD_F(0x1afd100f), MAD_F(0x1963268b), MAD_F(0x1797c6a4),
+    MAD_F(0x159e6f5b), MAD_F(0x137af940), MAD_F(0x11318ef3),
+    MAD_F(0x0ec6a507), MAD_F(0x0c3ef153), MAD_F(0x099f61c5),
+    MAD_F(0x06ed12c5), MAD_F(0x042d4544), MAD_F(0x0165547c)
+  };
+
+  /* scaling */
+
+  for (i = 0; i < 18; i += 3) {
+    tmp[i + 0] = mad_f_mul(y[i + 0], scale[i + 0]);
+    tmp[i + 1] = mad_f_mul(y[i + 1], scale[i + 1]);
+    tmp[i + 2] = mad_f_mul(y[i + 2], scale[i + 2]);
+  }
+
+  /* SDCT-II */
+
+  sdctII(tmp, X);
+
+  /* scale reduction and output accumulation */
+
+  X[0] /= 2;
+  for (i = 1; i < 17; i += 4) {
+    X[i + 0] = X[i + 0] / 2 - X[(i + 0) - 1];
+    X[i + 1] = X[i + 1] / 2 - X[(i + 1) - 1];
+    X[i + 2] = X[i + 2] / 2 - X[(i + 2) - 1];
+    X[i + 3] = X[i + 3] / 2 - X[(i + 3) - 1];
+  }
+  X[17] = X[17] / 2 - X[16];
+}
+
+/*
+ * NAME:	imdct36
+ * DESCRIPTION:	perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm
+ */
+static inline
+void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36])
+{
+  mad_fixed_t tmp[18];
+  int i;
+
+  /* DCT-IV */
+
+  dctIV(x, tmp);
+
+  /* convert 18-point DCT-IV to 36-point IMDCT */
+
+  for (i =  0; i <  9; i += 3) {
+    y[i + 0] =  tmp[9 + (i + 0)];
+    y[i + 1] =  tmp[9 + (i + 1)];
+    y[i + 2] =  tmp[9 + (i + 2)];
+  }
+  for (i =  9; i < 27; i += 3) {
+    y[i + 0] = -tmp[36 - (9 + (i + 0)) - 1];
+    y[i + 1] = -tmp[36 - (9 + (i + 1)) - 1];
+    y[i + 2] = -tmp[36 - (9 + (i + 2)) - 1];
+  }
+  for (i = 27; i < 36; i += 3) {
+    y[i + 0] = -tmp[(i + 0) - 27];
+    y[i + 1] = -tmp[(i + 1) - 27];
+    y[i + 2] = -tmp[(i + 2) - 27];
+  }
+}
+#  else
+/*
+ * NAME:	imdct36
+ * DESCRIPTION:	perform X[18]->x[36] IMDCT
+ */
+static inline
+void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36])
+{
+  mad_fixed_t t0, t1, t2,  t3,  t4,  t5,  t6,  t7;
+  mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15;
+  register mad_fixed64hi_t hi;
+  register mad_fixed64lo_t lo;
+
+  MAD_F_ML0(hi, lo, X[4],  MAD_F(0x0ec835e8));
+  MAD_F_MLA(hi, lo, X[13], MAD_F(0x061f78aa));
+
+  t6 = MAD_F_MLZ(hi, lo);
+
+  MAD_F_MLA(hi, lo, (t14 = X[1] - X[10]), -MAD_F(0x061f78aa));
+  MAD_F_MLA(hi, lo, (t15 = X[7] + X[16]), -MAD_F(0x0ec835e8));
+
+  t0 = MAD_F_MLZ(hi, lo);
+
+  MAD_F_MLA(hi, lo, (t8  = X[0] - X[11] - X[12]),  MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, (t9  = X[2] - X[9]  - X[14]),  MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, (t10 = X[3] - X[8]  - X[15]), -MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, (t11 = X[5] - X[6]  - X[17]), -MAD_F(0x0fdcf549));
+
+  x[7]  = MAD_F_MLZ(hi, lo);
+  x[10] = -x[7];
+
+  MAD_F_ML0(hi, lo, t8,  -MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, t9,   MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, t10,  MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, t11, -MAD_F(0x09bd7ca0));
+
+  x[19] = x[34] = MAD_F_MLZ(hi, lo) - t0;
+
+  t12 = X[0] - X[3] + X[8] - X[11] - X[12] + X[15];
+  t13 = X[2] + X[5] - X[6] - X[9]  - X[14] - X[17];
+
+  MAD_F_ML0(hi, lo, t12, -MAD_F(0x0ec835e8));
+  MAD_F_MLA(hi, lo, t13,  MAD_F(0x061f78aa));
+
+  x[22] = x[31] = MAD_F_MLZ(hi, lo) + t0;
+
+  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, X[7],   MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, X[10], -MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, X[16],  MAD_F(0x0cb19346));
+
+  t1 = MAD_F_MLZ(hi, lo) + t6;
+
+  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0f9ee890));
+
+  x[6]  = MAD_F_MLZ(hi, lo) + t1;
+  x[11] = -x[6];
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x04cfb0e2));
+
+  x[23] = x[30] = MAD_F_MLZ(hi, lo) + t1;
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0acf37ad));
+
+  x[18] = x[35] = MAD_F_MLZ(hi, lo) - t1;
+
+  MAD_F_ML0(hi, lo, X[4],   MAD_F(0x061f78aa));
+  MAD_F_MLA(hi, lo, X[13], -MAD_F(0x0ec835e8));
+
+  t7 = MAD_F_MLZ(hi, lo);
+
+  MAD_F_MLA(hi, lo, X[1],  -MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, X[7],   MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, X[10],  MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, X[16], -MAD_F(0x09bd7ca0));
+
+  t2 = MAD_F_MLZ(hi, lo);
+
+  MAD_F_MLA(hi, lo, X[0],   MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x0f426cb5));
+
+  x[5]  = MAD_F_MLZ(hi, lo);
+  x[12] = -x[5];
+
+  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0bcbe352));
+
+  x[0]  = MAD_F_MLZ(hi, lo) + t2;
+  x[17] = -x[0];
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x03768962));
+
+  x[24] = x[29] = MAD_F_MLZ(hi, lo) + t2;
+
+  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, X[7],  -MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, X[10],  MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, X[16],  MAD_F(0x0fdcf549));
+
+  t3 = MAD_F_MLZ(hi, lo) + t7;
+
+  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0ffc19fd));
+
+  x[8] = MAD_F_MLZ(hi, lo) + t3;
+  x[9] = -x[8];
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x07635284));
+
+  x[21] = x[32] = MAD_F_MLZ(hi, lo) + t3;
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0898c779));
+
+  x[20] = x[33] = MAD_F_MLZ(hi, lo) - t3;
+
+  MAD_F_ML0(hi, lo, t14, -MAD_F(0x0ec835e8));
+  MAD_F_MLA(hi, lo, t15,  MAD_F(0x061f78aa));
+
+  t4 = MAD_F_MLZ(hi, lo) - t7;
+
+  MAD_F_ML0(hi, lo, t12, MAD_F(0x061f78aa));
+  MAD_F_MLA(hi, lo, t13, MAD_F(0x0ec835e8));
+
+  x[4]  = MAD_F_MLZ(hi, lo) + t4;
+  x[13] = -x[4];
+
+  MAD_F_ML0(hi, lo, t8,   MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, t9,  -MAD_F(0x0216a2a2));
+  MAD_F_MLA(hi, lo, t10,  MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, t11, -MAD_F(0x0cb19346));
+
+  x[1]  = MAD_F_MLZ(hi, lo) + t4;
+  x[16] = -x[1];
+
+  MAD_F_ML0(hi, lo, t8,  -MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, t9,  -MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, t10, -MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, t11, -MAD_F(0x0216a2a2));
+
+  x[25] = x[28] = MAD_F_MLZ(hi, lo) + t4;
+
+  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x0fdcf549));
+  MAD_F_MLA(hi, lo, X[7],  -MAD_F(0x0cb19346));
+  MAD_F_MLA(hi, lo, X[10], -MAD_F(0x09bd7ca0));
+  MAD_F_MLA(hi, lo, X[16], -MAD_F(0x0216a2a2));
+
+  t5 = MAD_F_MLZ(hi, lo) - t6;
+
+  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0d7e8807));
+
+  x[2]  = MAD_F_MLZ(hi, lo) + t5;
+  x[15] = -x[2];
+
+  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x00b2aa3e));
+  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x0e313245));
+
+  x[3]  = MAD_F_MLZ(hi, lo) + t5;
+  x[14] = -x[3];
+
+  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0ffc19fd));
+  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x0f9ee890));
+  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0f426cb5));
+  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0e313245));
+  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0d7e8807));
+  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0bcbe352));
+  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0acf37ad));
+  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0898c779));
+  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x07635284));
+  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x04cfb0e2));
+  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x03768962));
+  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x00b2aa3e));
+
+  x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5;
+}
+#  endif
+
+/*
+ * NAME:	III_imdct_l()
+ * DESCRIPTION:	perform IMDCT and windowing for long blocks
+ */
+static
+void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36],
+		 unsigned int block_type)
+{
+  unsigned int i;
+
+  /* IMDCT */
+
+  imdct36(X, z);
+
+  /* windowing */
+
+  switch (block_type) {
+  case 0:  /* normal window */
+# if defined(ASO_INTERLEAVE1)
+    {
+      register mad_fixed_t tmp1, tmp2;
+
+      tmp1 = window_l[0];
+      tmp2 = window_l[1];
+
+      for (i = 0; i < 34; i += 2) {
+	z[i + 0] = mad_f_mul(z[i + 0], tmp1);
+	tmp1 = window_l[i + 2];
+	z[i + 1] = mad_f_mul(z[i + 1], tmp2);
+	tmp2 = window_l[i + 3];
+      }
+
+      z[34] = mad_f_mul(z[34], tmp1);
+      z[35] = mad_f_mul(z[35], tmp2);
+    }
+# elif defined(ASO_INTERLEAVE2)
+    {
+      register mad_fixed_t tmp1, tmp2;
+
+      tmp1 = z[0];
+      tmp2 = window_l[0];
+
+      for (i = 0; i < 35; ++i) {
+	z[i] = mad_f_mul(tmp1, tmp2);
+	tmp1 = z[i + 1];
+	tmp2 = window_l[i + 1];
+      }
+
+      z[35] = mad_f_mul(tmp1, tmp2);
+    }
+# elif 1
+    for (i = 0; i < 36; i += 4) {
+      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
+      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
+      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
+      z[i + 3] = mad_f_mul(z[i + 3], window_l[i + 3]);
+    }
+# else
+    for (i =  0; i < 36; ++i) z[i] = mad_f_mul(z[i], window_l[i]);
+# endif
+    break;
+
+  case 1:  /* start block */
+    for (i =  0; i < 18; i += 3) {
+      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
+      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
+      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
+    }
+    /*  (i = 18; i < 24; ++i) z[i] unchanged */
+    for (i = 24; i < 30; ++i) z[i] = mad_f_mul(z[i], window_s[i - 18]);
+    for (i = 30; i < 36; ++i) z[i] = 0;
+    break;
+
+  case 3:  /* stop block */
+    for (i =  0; i <  6; ++i) z[i] = 0;
+    for (i =  6; i < 12; ++i) z[i] = mad_f_mul(z[i], window_s[i - 6]);
+    /*  (i = 12; i < 18; ++i) z[i] unchanged */
+    for (i = 18; i < 36; i += 3) {
+      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
+      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
+      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
+    }
+    break;
+  }
+}
+# endif  /* ASO_IMDCT */
+
+/*
+ * NAME:	III_imdct_s()
+ * DESCRIPTION:	perform IMDCT and windowing for short blocks
+ */
+static
+void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36])
+{
+  mad_fixed_t y[36], *yptr;
+  mad_fixed_t const *wptr;
+  int w, i;
+  register mad_fixed64hi_t hi;
+  register mad_fixed64lo_t lo;
+
+  /* IMDCT */
+
+  yptr = &y[0];
+
+  for (w = 0; w < 3; ++w) {
+    register mad_fixed_t const (*s)[6];
+
+    s = imdct_s;
+
+    for (i = 0; i < 3; ++i) {
+      MAD_F_ML0(hi, lo, X[0], (*s)[0]);
+      MAD_F_MLA(hi, lo, X[1], (*s)[1]);
+      MAD_F_MLA(hi, lo, X[2], (*s)[2]);
+      MAD_F_MLA(hi, lo, X[3], (*s)[3]);
+      MAD_F_MLA(hi, lo, X[4], (*s)[4]);
+      MAD_F_MLA(hi, lo, X[5], (*s)[5]);
+
+      yptr[i + 0] = MAD_F_MLZ(hi, lo);
+      yptr[5 - i] = -yptr[i + 0];
+
+      ++s;
+
+      MAD_F_ML0(hi, lo, X[0], (*s)[0]);
+      MAD_F_MLA(hi, lo, X[1], (*s)[1]);
+      MAD_F_MLA(hi, lo, X[2], (*s)[2]);
+      MAD_F_MLA(hi, lo, X[3], (*s)[3]);
+      MAD_F_MLA(hi, lo, X[4], (*s)[4]);
+      MAD_F_MLA(hi, lo, X[5], (*s)[5]);
+
+      yptr[ i + 6] = MAD_F_MLZ(hi, lo);
+      yptr[11 - i] = yptr[i + 6];
+
+      ++s;
+    }
+
+    yptr += 12;
+    X    += 6;
+  }
+
+  /* windowing, overlapping and concatenation */
+
+  yptr = &y[0];
+  wptr = &window_s[0];
+
+  for (i = 0; i < 6; ++i) {
+    z[i +  0] = 0;
+    z[i +  6] = mad_f_mul(yptr[ 0 + 0], wptr[0]);
+
+    MAD_F_ML0(hi, lo, yptr[ 0 + 6], wptr[6]);
+    MAD_F_MLA(hi, lo, yptr[12 + 0], wptr[0]);
+
+    z[i + 12] = MAD_F_MLZ(hi, lo);
+
+    MAD_F_ML0(hi, lo, yptr[12 + 6], wptr[6]);
+    MAD_F_MLA(hi, lo, yptr[24 + 0], wptr[0]);
+
+    z[i + 18] = MAD_F_MLZ(hi, lo);
+
+    z[i + 24] = mad_f_mul(yptr[24 + 6], wptr[6]);
+    z[i + 30] = 0;
+
+    ++yptr;
+    ++wptr;
+  }
+}
+
+/*
+ * NAME:	III_overlap()
+ * DESCRIPTION:	perform overlap-add of windowed IMDCT outputs
+ */
+static
+void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18],
+		 mad_fixed_t sample[18][32], unsigned int sb)
+{
+  unsigned int i;
+
+# if defined(ASO_INTERLEAVE2)
+  {
+    register mad_fixed_t tmp1, tmp2;
+
+    tmp1 = overlap[0];
+    tmp2 = overlap[1];
+
+    for (i = 0; i < 16; i += 2) {
+      sample[i + 0][sb] = output[i + 0 +  0] + tmp1;
+      overlap[i + 0]    = output[i + 0 + 18];
+      tmp1 = overlap[i + 2];
+
+      sample[i + 1][sb] = output[i + 1 +  0] + tmp2;
+      overlap[i + 1]    = output[i + 1 + 18];
+      tmp2 = overlap[i + 3];
+    }
+
+    sample[16][sb] = output[16 +  0] + tmp1;
+    overlap[16]    = output[16 + 18];
+    sample[17][sb] = output[17 +  0] + tmp2;
+    overlap[17]    = output[17 + 18];
+  }
+# elif 0
+  for (i = 0; i < 18; i += 2) {
+    sample[i + 0][sb] = output[i + 0 +  0] + overlap[i + 0];
+    overlap[i + 0]    = output[i + 0 + 18];
+
+    sample[i + 1][sb] = output[i + 1 +  0] + overlap[i + 1];
+    overlap[i + 1]    = output[i + 1 + 18];
+  }
+# else
+  for (i = 0; i < 18; ++i) {
+    sample[i][sb] = output[i +  0] + overlap[i];
+    overlap[i]    = output[i + 18];
+  }
+# endif
+}
+
+/*
+ * NAME:	III_overlap_z()
+ * DESCRIPTION:	perform "overlap-add" of zero IMDCT outputs
+ */
+static inline
+void III_overlap_z(mad_fixed_t overlap[18],
+		   mad_fixed_t sample[18][32], unsigned int sb)
+{
+  unsigned int i;
+
+# if defined(ASO_INTERLEAVE2)
+  {
+    register mad_fixed_t tmp1, tmp2;
+
+    tmp1 = overlap[0];
+    tmp2 = overlap[1];
+
+    for (i = 0; i < 16; i += 2) {
+      sample[i + 0][sb] = tmp1;
+      overlap[i + 0]    = 0;
+      tmp1 = overlap[i + 2];
+
+      sample[i + 1][sb] = tmp2;
+      overlap[i + 1]    = 0;
+      tmp2 = overlap[i + 3];
+    }
+
+    sample[16][sb] = tmp1;
+    overlap[16]    = 0;
+    sample[17][sb] = tmp2;
+    overlap[17]    = 0;
+  }
+# else
+  for (i = 0; i < 18; ++i) {
+    sample[i][sb] = overlap[i];
+    overlap[i]    = 0;
+  }
+# endif
+}
+
+/*
+ * NAME:	III_freqinver()
+ * DESCRIPTION:	perform subband frequency inversion for odd sample lines
+ */
+static
+void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb)
+{
+  unsigned int i;
+
+# if 1 || defined(ASO_INTERLEAVE1) || defined(ASO_INTERLEAVE2)
+  {
+    register mad_fixed_t tmp1, tmp2;
+
+    tmp1 = sample[1][sb];
+    tmp2 = sample[3][sb];
+
+    for (i = 1; i < 13; i += 4) {
+      sample[i + 0][sb] = -tmp1;
+      tmp1 = sample[i + 4][sb];
+      sample[i + 2][sb] = -tmp2;
+      tmp2 = sample[i + 6][sb];
+    }
+
+    sample[13][sb] = -tmp1;
+    tmp1 = sample[17][sb];
+    sample[15][sb] = -tmp2;
+    sample[17][sb] = -tmp1;
+  }
+# else
+  for (i = 1; i < 18; i += 2)
+    sample[i][sb] = -sample[i][sb];
+# endif
+}
+
+/*
+ * NAME:	III_decode()
+ * DESCRIPTION:	decode frame main_data
+ */
+static
+enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame,
+			  struct sideinfo *si, unsigned int nch)
+{
+  struct mad_header *header = &frame->header;
+  unsigned int sfreqi, ngr, gr;
+
+  {
+    unsigned int sfreq;
+
+    sfreq = header->samplerate;
+    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
+      sfreq *= 2;
+
+    /* 48000 => 0, 44100 => 1, 32000 => 2,
+       24000 => 3, 22050 => 4, 16000 => 5 */
+    sfreqi = ((sfreq >>  7) & 0x000f) +
+             ((sfreq >> 15) & 0x0001) - 8;
+
+    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
+      sfreqi += 3;
+  }
+
+  /* scalefactors, Huffman decoding, requantization */
+
+  ngr = (header->flags & MAD_FLAG_LSF_EXT) ? 1 : 2;
+
+  for (gr = 0; gr < ngr; ++gr) {
+    struct granule *granule = &si->gr[gr];
+    unsigned char const *sfbwidth[2];
+    mad_fixed_t xr[2][576];
+    unsigned int ch;
+    enum mad_error error;
+
+    for (ch = 0; ch < nch; ++ch) {
+      struct channel *channel = &granule->ch[ch];
+      unsigned int part2_length;
+
+      sfbwidth[ch] = sfbwidth_table[sfreqi].l;
+      if (channel->block_type == 2) {
+	sfbwidth[ch] = (channel->flags & mixed_block_flag) ?
+	  sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s;
+      }
+
+      if (header->flags & MAD_FLAG_LSF_EXT) {
+	part2_length = III_scalefactors_lsf(ptr, channel,
+					    ch == 0 ? 0 : &si->gr[1].ch[1],
+					    header->mode_extension);
+      }
+      else {
+	part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch],
+					gr == 0 ? 0 : si->scfsi[ch]);
+      }
+
+      error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length);
+      if (error)
+	return error;
+    }
+
+    /* joint stereo processing */
+
+    if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) {
+      error = III_stereo(xr, granule, header, sfbwidth[0]);
+      if (error)
+	return error;
+    }
+
+    /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */
+
+    for (ch = 0; ch < nch; ++ch) {
+      struct channel const *channel = &granule->ch[ch];
+      mad_fixed_t (*sample)[32] = &frame->sbsample[ch][18 * gr];
+      unsigned int sb, l, i, sblimit;
+      mad_fixed_t output[36];
+
+      if (channel->block_type == 2) {
+	III_reorder(xr[ch], channel, sfbwidth[ch]);
+
+# if !defined(OPT_STRICT)
+	/*
+	 * According to ISO/IEC 11172-3, "Alias reduction is not applied for
+	 * granules with block_type == 2 (short block)." However, other
+	 * sources suggest alias reduction should indeed be performed on the
+	 * lower two subbands of mixed blocks. Most other implementations do
+	 * this, so by default we will too.
+	 */
+	if (channel->flags & mixed_block_flag)
+	  III_aliasreduce(xr[ch], 36);
+# endif
+      }
+      else
+	III_aliasreduce(xr[ch], 576);
+
+      l = 0;
+
+      /* subbands 0-1 */
+
+      if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) {
+	unsigned int block_type;
+
+	block_type = channel->block_type;
+	if (channel->flags & mixed_block_flag)
+	  block_type = 0;
+
+	/* long blocks */
+	for (sb = 0; sb < 2; ++sb, l += 18) {
+	  III_imdct_l(&xr[ch][l], output, block_type);
+	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
+	}
+      }
+      else {
+	/* short blocks */
+	for (sb = 0; sb < 2; ++sb, l += 18) {
+	  III_imdct_s(&xr[ch][l], output);
+	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
+	}
+      }
+
+      III_freqinver(sample, 1);
+
+      /* (nonzero) subbands 2-31 */
+
+      i = 576;
+      while (i > 36 && xr[ch][i - 1] == 0)
+	--i;
+
+      sblimit = 32 - (576 - i) / 18;
+
+      if (channel->block_type != 2) {
+	/* long blocks */
+	for (sb = 2; sb < sblimit; ++sb, l += 18) {
+	  III_imdct_l(&xr[ch][l], output, channel->block_type);
+	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
+
+	  if (sb & 1)
+	    III_freqinver(sample, sb);
+	}
+      }
+      else {
+	/* short blocks */
+	for (sb = 2; sb < sblimit; ++sb, l += 18) {
+	  III_imdct_s(&xr[ch][l], output);
+	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
+
+	  if (sb & 1)
+	    III_freqinver(sample, sb);
+	}
+      }
+
+      /* remaining (zero) subbands */
+
+      for (sb = sblimit; sb < 32; ++sb) {
+	III_overlap_z((*frame->overlap)[ch][sb], sample, sb);
+
+	if (sb & 1)
+	  III_freqinver(sample, sb);
+      }
+    }
+  }
+
+  return MAD_ERROR_NONE;
+}
+
+/*
+ * NAME:	layer->III()
+ * DESCRIPTION:	decode a single Layer III frame
+ */
+int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
+{
+  struct mad_header *header = &frame->header;
+  unsigned int nch, priv_bitlen, next_md_begin = 0;
+  unsigned int si_len, data_bitlen, md_len;
+  unsigned int frame_space, frame_used, frame_free;
+  struct mad_bitptr ptr;
+  struct sideinfo si;
+  enum mad_error error;
+  int result = 0;
+
+  /* allocate Layer III dynamic structures */
+
+  if (stream->main_data == 0) {
+    stream->main_data = malloc(MAD_BUFFER_MDLEN);
+    if (stream->main_data == 0) {
+      stream->error = MAD_ERROR_NOMEM;
+      return -1;
+    }
+  }
+
+  if (frame->overlap == 0) {
+    frame->overlap = calloc(2 * 32 * 18, sizeof(mad_fixed_t));
+    if (frame->overlap == 0) {
+      stream->error = MAD_ERROR_NOMEM;
+      return -1;
+    }
+  }
+
+  nch = MAD_NCHANNELS(header);
+  si_len = (header->flags & MAD_FLAG_LSF_EXT) ?
+    (nch == 1 ? 9 : 17) : (nch == 1 ? 17 : 32);
+
+  /* check frame sanity */
+
+  if (stream->next_frame - mad_bit_nextbyte(&stream->ptr) <
+      (signed int) si_len) {
+    stream->error = MAD_ERROR_BADFRAMELEN;
+    stream->md_len = 0;
+    return -1;
+  }
+
+  /* check CRC word */
+
+  if (header->flags & MAD_FLAG_PROTECTION) {
+    header->crc_check =
+      mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check);
+
+    if (header->crc_check != header->crc_target &&
+	!(frame->options & MAD_OPTION_IGNORECRC)) {
+      stream->error = MAD_ERROR_BADCRC;
+      result = -1;
+    }
+  }
+
+  /* decode frame side information */
+
+  error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT,
+		       &si, &data_bitlen, &priv_bitlen);
+  if (error && result == 0) {
+    stream->error = error;
+    result = -1;
+  }
+
+  header->flags        |= priv_bitlen;
+  header->private_bits |= si.private_bits;
+
+  /* find main_data of next frame */
+
+  {
+    struct mad_bitptr peek;
+    unsigned long header;
+
+    mad_bit_init(&peek, stream->next_frame);
+
+    header = mad_bit_read(&peek, 32);
+    if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) {
+      if (!(header & 0x00010000L))  /* protection_bit */
+	mad_bit_skip(&peek, 16);  /* crc_check */
+
+      next_md_begin =
+	mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8);
+    }
+
+    mad_bit_finish(&peek);
+  }
+
+  /* find main_data of this frame */
+
+  frame_space = stream->next_frame - mad_bit_nextbyte(&stream->ptr);
+
+  if (next_md_begin > si.main_data_begin + frame_space)
+    next_md_begin = 0;
+
+  md_len = si.main_data_begin + frame_space - next_md_begin;
+
+  frame_used = 0;
+
+  if (si.main_data_begin == 0) {
+    ptr = stream->ptr;
+    stream->md_len = 0;
+
+    frame_used = md_len;
+  }
+  else {
+    if (si.main_data_begin > stream->md_len) {
+      if (result == 0) {
+	stream->error = MAD_ERROR_BADDATAPTR;
+	result = -1;
+      }
+    }
+    else {
+      mad_bit_init(&ptr,
+		   *stream->main_data + stream->md_len - si.main_data_begin);
+
+      if (md_len > si.main_data_begin) {
+	assert(stream->md_len + md_len -
+	       si.main_data_begin <= MAD_BUFFER_MDLEN);
+
+	memcpy(*stream->main_data + stream->md_len,
+	       mad_bit_nextbyte(&stream->ptr),
+	       frame_used = md_len - si.main_data_begin);
+	stream->md_len += frame_used;
+      }
+    }
+  }
+
+  frame_free = frame_space - frame_used;
+
+  /* decode main_data */
+
+  if (result == 0) {
+    error = III_decode(&ptr, frame, &si, nch);
+    if (error) {
+      stream->error = error;
+      result = -1;
+    }
+
+    /* designate ancillary bits */
+
+    stream->anc_ptr    = ptr;
+    stream->anc_bitlen = md_len * CHAR_BIT - data_bitlen;
+  }
+
+# if 0 && defined(DEBUG)
+  fprintf(stderr,
+	  "main_data_begin:%u, md_len:%u, frame_free:%u, "
+	  "data_bitlen:%u, anc_bitlen: %u\n",
+	  si.main_data_begin, md_len, frame_free,
+	  data_bitlen, stream->anc_bitlen);
+# endif
+
+  /* preload main_data buffer with up to 511 bytes for next frame(s) */
+
+  if (frame_free >= next_md_begin) {
+    memcpy(*stream->main_data,
+	   stream->next_frame - next_md_begin, next_md_begin);
+    stream->md_len = next_md_begin;
+  }
+  else {
+    if (md_len < si.main_data_begin) {
+      unsigned int extra;
+
+      extra = si.main_data_begin - md_len;
+      if (extra + frame_free > next_md_begin)
+	extra = next_md_begin - frame_free;
+
+      if (extra < stream->md_len) {
+	memmove(*stream->main_data,
+		*stream->main_data + stream->md_len - extra, extra);
+	stream->md_len = extra;
+      }
+    }
+    else
+      stream->md_len = 0;
+
+    memcpy(*stream->main_data + stream->md_len,
+	   stream->next_frame - frame_free, frame_free);
+    stream->md_len += frame_free;
+  }
+
+  return result;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/layer3.h
@@ -1,0 +1,30 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBMAD_LAYER3_H
+# define LIBMAD_LAYER3_H
+
+# include "stream.h"
+# include "frame.h"
+
+int mad_layer_III(struct mad_stream *, struct mad_frame *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/mad.h
@@ -1,0 +1,950 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * If you would like to negotiate alternate licensing terms, you may do
+ * so by contacting: Underbit Technologies, Inc. <[email protected]>
+ */
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# define FPM_INTEL
+
+
+
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 4
+# define SIZEOF_LONG_LONG 8
+
+
+/* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */
+
+# ifndef LIBMAD_VERSION_H
+# define LIBMAD_VERSION_H
+
+# define MAD_VERSION_MAJOR	0
+# define MAD_VERSION_MINOR	15
+# define MAD_VERSION_PATCH	1
+# define MAD_VERSION_EXTRA	" (beta)"
+
+# define MAD_VERSION_STRINGIZE(str)	#str
+# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)
+
+# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) "."  \
+				MAD_VERSION_STRING(MAD_VERSION_MINOR) "."  \
+				MAD_VERSION_STRING(MAD_VERSION_PATCH)  \
+				MAD_VERSION_EXTRA
+
+# define MAD_PUBLISHYEAR	"2000-2004"
+# define MAD_AUTHOR		"Underbit Technologies, Inc."
+# define MAD_EMAIL		"[email protected]"
+
+extern char const mad_version[];
+extern char const mad_copyright[];
+extern char const mad_author[];
+extern char const mad_build[];
+
+# endif
+
+/* Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp */
+
+# ifndef LIBMAD_FIXED_H
+# define LIBMAD_FIXED_H
+
+# if SIZEOF_INT >= 4
+typedef   signed int mad_fixed_t;
+
+typedef   signed int mad_fixed64hi_t;
+typedef unsigned int mad_fixed64lo_t;
+# else
+typedef   signed long mad_fixed_t;
+
+typedef   signed long mad_fixed64hi_t;
+typedef unsigned long mad_fixed64lo_t;
+# endif
+
+# if defined(_MSC_VER)
+#  define mad_fixed64_t  signed __int64
+# elif 1 || defined(__GNUC__)
+#  define mad_fixed64_t  signed long long
+# endif
+
+# if defined(FPM_FLOAT)
+typedef double mad_sample_t;
+# else
+typedef mad_fixed_t mad_sample_t;
+# endif
+
+/*
+ * Fixed-point format: 0xABBBBBBB
+ * A == whole part      (sign + 3 bits)
+ * B == fractional part (28 bits)
+ *
+ * Values are signed two's complement, so the effective range is:
+ * 0x80000000 to 0x7fffffff
+ *       -8.0 to +7.9999999962747097015380859375
+ *
+ * The smallest representable value is:
+ * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
+ *
+ * 28 bits of fractional accuracy represent about
+ * 8.6 digits of decimal accuracy.
+ *
+ * Fixed-point numbers can be added or subtracted as normal
+ * integers, but multiplication requires shifting the 64-bit result
+ * from 56 fractional bits back to 28 (and rounding.)
+ *
+ * Changing the definition of MAD_F_FRACBITS is only partially
+ * supported, and must be done with care.
+ */
+
+# define MAD_F_FRACBITS		28
+
+#  define MAD_F(x)		((mad_fixed_t) (x##L))
+
+# define MAD_F_MIN		((mad_fixed_t) -0x80000000L)
+# define MAD_F_MAX		((mad_fixed_t) +0x7fffffffL)
+
+# define MAD_F_ONE		MAD_F(0x10000000)
+
+# define mad_f_tofixed(x)	((mad_fixed_t)  \
+				 ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5))
+# define mad_f_todouble(x)	((double)  \
+				 ((x) / (double) (1L << MAD_F_FRACBITS)))
+
+# define mad_f_intpart(x)	((x) >> MAD_F_FRACBITS)
+# define mad_f_fracpart(x)	((x) & ((1L << MAD_F_FRACBITS) - 1))
+				/* (x should be positive) */
+
+# define mad_f_fromint(x)	((x) << MAD_F_FRACBITS)
+
+# define mad_f_add(x, y)	((x) + (y))
+# define mad_f_sub(x, y)	((x) - (y))
+
+# if defined(FPM_FLOAT)
+#  error "FPM_FLOAT not yet supported"
+
+#  undef MAD_F
+#  define MAD_F(x)		mad_f_todouble(x)
+
+#  define mad_f_mul(x, y)	((x) * (y))
+#  define mad_f_scale64
+
+#  undef ASO_ZEROCHECK
+
+# elif defined(FPM_64BIT)
+
+/*
+ * This version should be the most accurate if 64-bit types are supported by
+ * the compiler, although it may not be the most efficient.
+ */
+#  if defined(OPT_ACCURACY)
+#   define mad_f_mul(x, y)  \
+    ((mad_fixed_t)  \
+     ((((mad_fixed64_t) (x) * (y)) +  \
+       (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS))
+#  else
+#   define mad_f_mul(x, y)  \
+    ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS))
+#  endif
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- Intel --------------------------------------------------------------- */
+
+# elif defined(FPM_INTEL)
+
+#  if defined(_MSC_VER)
+#   pragma warning(push)
+#   pragma warning(disable: 4035)  /* no return value */
+static __forceinline
+mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
+{
+  enum {
+    fracbits = MAD_F_FRACBITS
+  };
+
+  __asm {
+    mov eax, x
+    imul y
+    shrd eax, edx, fracbits
+  }
+
+  /* implicit return of eax */
+}
+#   pragma warning(pop)
+
+#   define mad_f_mul		mad_f_mul_inline
+#   define mad_f_scale64
+#  else
+/*
+ * This Intel version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#   define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("imull %3"  \
+	 : "=a" (lo), "=d" (hi)  \
+	 : "%a" (x), "rm" (y)  \
+	 : "cc")
+
+#   if defined(OPT_ACCURACY)
+/*
+ * This gives best accuracy but is not very fast.
+ */
+#    define MAD_F_MLA(hi, lo, x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       asm ("addl %2,%0\n\t"  \
+	    "adcl %3,%1"  \
+	    : "=rm" (lo), "=rm" (hi)  \
+	    : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi)  \
+	    : "cc");  \
+    })
+#   endif  /* OPT_ACCURACY */
+
+#   if defined(OPT_ACCURACY)
+/*
+ * Surprisingly, this is faster than SHRD followed by ADC.
+ */
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed64hi_t __hi_;  \
+       mad_fixed64lo_t __lo_;  \
+       mad_fixed_t __result;  \
+       asm ("addl %4,%2\n\t"  \
+	    "adcl %5,%3"  \
+	    : "=rm" (__lo_), "=rm" (__hi_)  \
+	    : "0" (lo), "1" (hi),  \
+	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
+	    : "cc");  \
+       asm ("shrdl %3,%2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   elif defined(OPT_INTEL)
+/*
+ * Alternate Intel scaling that may or may not perform better.
+ */
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("shrl %3,%1\n\t"  \
+	    "shll %4,%2\n\t"  \
+	    "orl %2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (lo), "r" (hi),  \
+	      "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   else
+#    define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("shrdl %3,%2,%1"  \
+	    : "=rm" (__result)  \
+	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+#   endif  /* OPT_ACCURACY */
+
+#   define MAD_F_SCALEBITS  MAD_F_FRACBITS
+#  endif
+
+/* --- ARM ----------------------------------------------------------------- */
+
+# elif defined(FPM_ARM)
+
+/* 
+ * This ARM V4 version is as accurate as FPM_64BIT but much faster. The
+ * least significant bit is properly rounded at no CPU cycle cost!
+ */
+# if 1
+/*
+ * This is faster than the default implementation via MAD_F_MLX() and
+ * mad_f_scale64().
+ */
+#  define mad_f_mul(x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       mad_fixed_t __result;  \
+       asm ("smull	%0, %1, %3, %4\n\t"  \
+	    "movs	%0, %0, lsr %5\n\t"  \
+	    "adc	%2, %0, %1, lsl %6"  \
+	    : "=&r" (__lo), "=&r" (__hi), "=r" (__result)  \
+	    : "%r" (x), "r" (y),  \
+	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+# endif
+
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("smull	%0, %1, %2, %3"  \
+	 : "=&r" (lo), "=&r" (hi)  \
+	 : "%r" (x), "r" (y))
+
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("smlal	%0, %1, %2, %3"  \
+	 : "+r" (lo), "+r" (hi)  \
+	 : "%r" (x), "r" (y))
+
+#  define MAD_F_MLN(hi, lo)  \
+    asm ("rsbs	%0, %2, #0\n\t"  \
+	 "rsc	%1, %3, #0"  \
+	 : "=r" (lo), "=r" (hi)  \
+	 : "0" (lo), "1" (hi)  \
+	 : "cc")
+
+#  define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("movs	%0, %1, lsr %3\n\t"  \
+	    "adc	%0, %0, %2, lsl %4"  \
+	    : "=&r" (__result)  \
+	    : "r" (lo), "r" (hi),  \
+	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
+	    : "cc");  \
+       __result;  \
+    })
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- MIPS ---------------------------------------------------------------- */
+
+# elif defined(FPM_MIPS)
+
+/*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("mult	%2,%3"  \
+	 : "=l" (lo), "=h" (hi)  \
+	 : "%r" (x), "r" (y))
+
+# if defined(HAVE_MADD_ASM)
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("madd	%2,%3"  \
+	 : "+l" (lo), "+h" (hi)  \
+	 : "%r" (x), "r" (y))
+# elif defined(HAVE_MADD16_ASM)
+/*
+ * This loses significant accuracy due to the 16-bit integer limit in the
+ * multiply/accumulate instruction.
+ */
+#  define MAD_F_ML0(hi, lo, x, y)  \
+    asm ("mult	%2,%3"  \
+	 : "=l" (lo), "=h" (hi)  \
+	 : "%r" ((x) >> 12), "r" ((y) >> 16))
+#  define MAD_F_MLA(hi, lo, x, y)  \
+    asm ("madd16	%2,%3"  \
+	 : "+l" (lo), "+h" (hi)  \
+	 : "%r" ((x) >> 12), "r" ((y) >> 16))
+#  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
+# endif
+
+# if defined(OPT_SPEED)
+#  define mad_f_scale64(hi, lo)  \
+    ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS)))
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+# endif
+
+/* --- SPARC --------------------------------------------------------------- */
+
+# elif defined(FPM_SPARC)
+
+/*
+ * This SPARC V8 version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    asm ("smul %2, %3, %0\n\t"  \
+	 "rd %%y, %1"  \
+	 : "=r" (lo), "=r" (hi)  \
+	 : "%r" (x), "rI" (y))
+
+/* --- PowerPC ------------------------------------------------------------- */
+
+# elif defined(FPM_PPC)
+
+/*
+ * This PowerPC version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+ */
+#  define MAD_F_MLX(hi, lo, x, y)  \
+    do {  \
+      asm ("mullw %0,%1,%2"  \
+	   : "=r" (lo)  \
+	   : "%r" (x), "r" (y));  \
+      asm ("mulhw %0,%1,%2"  \
+	   : "=r" (hi)  \
+	   : "%r" (x), "r" (y));  \
+    }  \
+    while (0)
+
+#  if defined(OPT_ACCURACY)
+/*
+ * This gives best accuracy but is not very fast.
+ */
+#   define MAD_F_MLA(hi, lo, x, y)  \
+    ({ mad_fixed64hi_t __hi;  \
+       mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       asm ("addc %0,%2,%3\n\t"  \
+	    "adde %1,%4,%5"  \
+	    : "=r" (lo), "=r" (hi)  \
+	    : "%r" (lo), "r" (__lo),  \
+	      "%r" (hi), "r" (__hi)  \
+	    : "xer");  \
+    })
+#  endif
+
+#  if defined(OPT_ACCURACY)
+/*
+ * This is slower than the truncating version below it.
+ */
+#   define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result, __round;  \
+       asm ("rotrwi %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
+       asm ("extrwi %0,%1,1,0"  \
+	    : "=r" (__round)  \
+	    : "r" (__result));  \
+       asm ("insrwi %0,%1,%2,0"  \
+	    : "+r" (__result)  \
+	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
+       asm ("add %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "%r" (__result), "r" (__round));  \
+       __result;  \
+    })
+#  else
+#   define mad_f_scale64(hi, lo)  \
+    ({ mad_fixed_t __result;  \
+       asm ("rotrwi %0,%1,%2"  \
+	    : "=r" (__result)  \
+	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
+       asm ("insrwi %0,%1,%2,0"  \
+	    : "+r" (__result)  \
+	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
+       __result;  \
+    })
+#  endif
+
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+
+/* --- Default ------------------------------------------------------------- */
+
+# elif defined(FPM_DEFAULT)
+
+/*
+ * This version is the most portable but it loses significant accuracy.
+ * Furthermore, accuracy is biased against the second argument, so care
+ * should be taken when ordering operands.
+ *
+ * The scale factors are constant as this is not used with SSO.
+ *
+ * Pre-rounding is required to stay within the limits of compliance.
+ */
+#  if defined(OPT_SPEED)
+#   define mad_f_mul(x, y)	(((x) >> 12) * ((y) >> 16))
+#  else
+#   define mad_f_mul(x, y)	((((x) + (1L << 11)) >> 12) *  \
+				 (((y) + (1L << 15)) >> 16))
+#  endif
+
+/* ------------------------------------------------------------------------- */
+
+# else
+#  error "no FPM selected"
+# endif
+
+/* default implementations */
+
+# if !defined(mad_f_mul)
+#  define mad_f_mul(x, y)  \
+    ({ register mad_fixed64hi_t __hi;  \
+       register mad_fixed64lo_t __lo;  \
+       MAD_F_MLX(__hi, __lo, (x), (y));  \
+       mad_f_scale64(__hi, __lo);  \
+    })
+# endif
+
+# if !defined(MAD_F_MLA)
+#  define MAD_F_ML0(hi, lo, x, y)	((lo)  = mad_f_mul((x), (y)))
+#  define MAD_F_MLA(hi, lo, x, y)	((lo) += mad_f_mul((x), (y)))
+#  define MAD_F_MLN(hi, lo)		((lo)  = -(lo))
+#  define MAD_F_MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
+# endif
+
+# if !defined(MAD_F_ML0)
+#  define MAD_F_ML0(hi, lo, x, y)	MAD_F_MLX((hi), (lo), (x), (y))
+# endif
+
+# if !defined(MAD_F_MLN)
+#  define MAD_F_MLN(hi, lo)		((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi))
+# endif
+
+# if !defined(MAD_F_MLZ)
+#  define MAD_F_MLZ(hi, lo)		mad_f_scale64((hi), (lo))
+# endif
+
+# if !defined(mad_f_scale64)
+#  if defined(OPT_ACCURACY)
+#   define mad_f_scale64(hi, lo)  \
+    ((((mad_fixed_t)  \
+       (((hi) << (32 - (MAD_F_SCALEBITS - 1))) |  \
+	((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1)
+#  else
+#   define mad_f_scale64(hi, lo)  \
+    ((mad_fixed_t)  \
+     (((hi) << (32 - MAD_F_SCALEBITS)) |  \
+      ((lo) >> MAD_F_SCALEBITS)))
+#  endif
+#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
+# endif
+
+/* C routines */
+
+mad_fixed_t mad_f_abs(mad_fixed_t);
+mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t);
+
+# endif
+
+/* Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp */
+
+# ifndef LIBMAD_BIT_H
+# define LIBMAD_BIT_H
+
+struct mad_bitptr {
+  unsigned char const *byte;
+  unsigned short cache;
+  unsigned short left;
+};
+
+void mad_bit_init(struct mad_bitptr *, unsigned char const *);
+
+# define mad_bit_finish(bitptr)		/* nothing */
+
+unsigned int mad_bit_length(struct mad_bitptr const *,
+			    struct mad_bitptr const *);
+
+# define mad_bit_bitsleft(bitptr)  ((bitptr)->left)
+unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
+
+void mad_bit_skip(struct mad_bitptr *, unsigned int);
+unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
+void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
+
+unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
+
+# endif
+
+/* Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp */
+
+# ifndef LIBMAD_TIMER_H
+# define LIBMAD_TIMER_H
+
+typedef struct {
+  signed long seconds;		/* whole seconds */
+  unsigned long fraction;	/* 1/MAD_TIMER_RESOLUTION seconds */
+} mad_timer_t;
+
+extern mad_timer_t const mad_timer_zero;
+
+# define MAD_TIMER_RESOLUTION	352800000UL
+
+enum mad_units {
+  MAD_UNITS_HOURS	 =    -2,
+  MAD_UNITS_MINUTES	 =    -1,
+  MAD_UNITS_SECONDS	 =     0,
+
+  /* metric units */
+
+  MAD_UNITS_DECISECONDS	 =    10,
+  MAD_UNITS_CENTISECONDS =   100,
+  MAD_UNITS_MILLISECONDS =  1000,
+
+  /* audio sample units */
+
+  MAD_UNITS_8000_HZ	 =  8000,
+  MAD_UNITS_11025_HZ	 = 11025,
+  MAD_UNITS_12000_HZ	 = 12000,
+
+  MAD_UNITS_16000_HZ	 = 16000,
+  MAD_UNITS_22050_HZ	 = 22050,
+  MAD_UNITS_24000_HZ	 = 24000,
+
+  MAD_UNITS_32000_HZ	 = 32000,
+  MAD_UNITS_44100_HZ	 = 44100,
+  MAD_UNITS_48000_HZ	 = 48000,
+
+  /* video frame/field units */
+
+  MAD_UNITS_24_FPS	 =    24,
+  MAD_UNITS_25_FPS	 =    25,
+  MAD_UNITS_30_FPS	 =    30,
+  MAD_UNITS_48_FPS	 =    48,
+  MAD_UNITS_50_FPS	 =    50,
+  MAD_UNITS_60_FPS	 =    60,
+
+  /* CD audio frames */
+
+  MAD_UNITS_75_FPS	 =    75,
+
+  /* video drop-frame units */
+
+  MAD_UNITS_23_976_FPS	 =   -24,
+  MAD_UNITS_24_975_FPS	 =   -25,
+  MAD_UNITS_29_97_FPS	 =   -30,
+  MAD_UNITS_47_952_FPS	 =   -48,
+  MAD_UNITS_49_95_FPS	 =   -50,
+  MAD_UNITS_59_94_FPS	 =   -60
+};
+
+# define mad_timer_reset(timer)	((void) (*(timer) = mad_timer_zero))
+
+int mad_timer_compare(mad_timer_t, mad_timer_t);
+
+# define mad_timer_sign(timer)	mad_timer_compare((timer), mad_timer_zero)
+
+void mad_timer_negate(mad_timer_t *);
+mad_timer_t mad_timer_abs(mad_timer_t);
+
+void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long);
+void mad_timer_add(mad_timer_t *, mad_timer_t);
+void mad_timer_multiply(mad_timer_t *, signed long);
+
+signed long mad_timer_count(mad_timer_t, enum mad_units);
+unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
+void mad_timer_string(mad_timer_t, char *, char const *,
+		      enum mad_units, enum mad_units, unsigned long);
+
+# endif
+
+/* Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp */
+
+# ifndef LIBMAD_STREAM_H
+# define LIBMAD_STREAM_H
+
+
+# define MAD_BUFFER_GUARD	8
+# define MAD_BUFFER_MDLEN	(511 + 2048 + MAD_BUFFER_GUARD)
+
+enum mad_error {
+  MAD_ERROR_NONE	   = 0x0000,	/* no error */
+
+  MAD_ERROR_BUFLEN	   = 0x0001,	/* input buffer too small (or EOF) */
+  MAD_ERROR_BUFPTR	   = 0x0002,	/* invalid (null) buffer pointer */
+
+  MAD_ERROR_NOMEM	   = 0x0031,	/* not enough memory */
+
+  MAD_ERROR_LOSTSYNC	   = 0x0101,	/* lost synchronization */
+  MAD_ERROR_BADLAYER	   = 0x0102,	/* reserved header layer value */
+  MAD_ERROR_BADBITRATE	   = 0x0103,	/* forbidden bitrate value */
+  MAD_ERROR_BADSAMPLERATE  = 0x0104,	/* reserved sample frequency value */
+  MAD_ERROR_BADEMPHASIS	   = 0x0105,	/* reserved emphasis value */
+
+  MAD_ERROR_BADCRC	   = 0x0201,	/* CRC check failed */
+  MAD_ERROR_BADBITALLOC	   = 0x0211,	/* forbidden bit allocation value */
+  MAD_ERROR_BADSCALEFACTOR = 0x0221,	/* bad scalefactor index */
+  MAD_ERROR_BADMODE        = 0x0222,	/* bad bitrate/mode combination */
+  MAD_ERROR_BADFRAMELEN	   = 0x0231,	/* bad frame length */
+  MAD_ERROR_BADBIGVALUES   = 0x0232,	/* bad big_values count */
+  MAD_ERROR_BADBLOCKTYPE   = 0x0233,	/* reserved block_type */
+  MAD_ERROR_BADSCFSI	   = 0x0234,	/* bad scalefactor selection info */
+  MAD_ERROR_BADDATAPTR	   = 0x0235,	/* bad main_data_begin pointer */
+  MAD_ERROR_BADPART3LEN	   = 0x0236,	/* bad audio data length */
+  MAD_ERROR_BADHUFFTABLE   = 0x0237,	/* bad Huffman table select */
+  MAD_ERROR_BADHUFFDATA	   = 0x0238,	/* Huffman data overrun */
+  MAD_ERROR_BADSTEREO	   = 0x0239	/* incompatible block_type for JS */
+};
+
+# define MAD_RECOVERABLE(error)	((error) & 0xff00)
+
+struct mad_stream {
+  unsigned char const *buffer;		/* input bitstream buffer */
+  unsigned char const *bufend;		/* end of buffer */
+  unsigned long skiplen;		/* bytes to skip before next frame */
+
+  int sync;				/* stream sync found */
+  unsigned long freerate;		/* free bitrate (fixed) */
+
+  unsigned char const *this_frame;	/* start of current frame */
+  unsigned char const *next_frame;	/* start of next frame */
+  struct mad_bitptr ptr;		/* current processing bit pointer */
+
+  struct mad_bitptr anc_ptr;		/* ancillary bits pointer */
+  unsigned int anc_bitlen;		/* number of ancillary bits */
+
+  unsigned char (*main_data)[MAD_BUFFER_MDLEN];
+					/* Layer III main_data() */
+  unsigned int md_len;			/* bytes in main_data */
+
+  int options;				/* decoding options (see below) */
+  enum mad_error error;			/* error code (see above) */
+};
+
+enum {
+  MAD_OPTION_IGNORECRC      = 0x0001,	/* ignore CRC errors */
+  MAD_OPTION_HALFSAMPLERATE = 0x0002	/* generate PCM at 1/2 sample rate */
+# if 0  /* not yet implemented */
+  MAD_OPTION_LEFTCHANNEL    = 0x0010,	/* decode left channel only */
+  MAD_OPTION_RIGHTCHANNEL   = 0x0020,	/* decode right channel only */
+  MAD_OPTION_SINGLECHANNEL  = 0x0030	/* combine channels */
+# endif
+};
+
+void mad_stream_init(struct mad_stream *);
+void mad_stream_finish(struct mad_stream *);
+
+# define mad_stream_options(stream, opts)  \
+    ((void) ((stream)->options = (opts)))
+
+void mad_stream_buffer(struct mad_stream *,
+		       unsigned char const *, unsigned long);
+void mad_stream_skip(struct mad_stream *, unsigned long);
+
+int mad_stream_sync(struct mad_stream *);
+
+char const *mad_stream_errorstr(struct mad_stream const *);
+
+# endif
+
+/* Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp */
+
+# ifndef LIBMAD_FRAME_H
+# define LIBMAD_FRAME_H
+
+
+enum mad_layer {
+  MAD_LAYER_I   = 1,			/* Layer I */
+  MAD_LAYER_II  = 2,			/* Layer II */
+  MAD_LAYER_III = 3			/* Layer III */
+};
+
+enum mad_mode {
+  MAD_MODE_SINGLE_CHANNEL = 0,		/* single channel */
+  MAD_MODE_DUAL_CHANNEL	  = 1,		/* dual channel */
+  MAD_MODE_JOINT_STEREO	  = 2,		/* joint (MS/intensity) stereo */
+  MAD_MODE_STEREO	  = 3		/* normal LR stereo */
+};
+
+enum mad_emphasis {
+  MAD_EMPHASIS_NONE	  = 0,		/* no emphasis */
+  MAD_EMPHASIS_50_15_US	  = 1,		/* 50/15 microseconds emphasis */
+  MAD_EMPHASIS_CCITT_J_17 = 3,		/* CCITT J.17 emphasis */
+  MAD_EMPHASIS_RESERVED   = 2		/* unknown emphasis */
+};
+
+struct mad_header {
+  enum mad_layer layer;			/* audio layer (1, 2, or 3) */
+  enum mad_mode mode;			/* channel mode (see above) */
+  int mode_extension;			/* additional mode info */
+  enum mad_emphasis emphasis;		/* de-emphasis to use (see above) */
+
+  unsigned long bitrate;		/* stream bitrate (bps) */
+  unsigned int samplerate;		/* sampling frequency (Hz) */
+
+  unsigned short crc_check;		/* frame CRC accumulator */
+  unsigned short crc_target;		/* final target CRC checksum */
+
+  int flags;				/* flags (see below) */
+  int private_bits;			/* private bits (see below) */
+
+  mad_timer_t duration;			/* audio playing time of frame */
+};
+
+struct mad_frame {
+  struct mad_header header;		/* MPEG audio header */
+
+  int options;				/* decoding options (from stream) */
+
+  mad_fixed_t sbsample[2][36][32];	/* synthesis subband filter samples */
+  mad_fixed_t (*overlap)[2][32][18];	/* Layer III block overlap data */
+};
+
+# define MAD_NCHANNELS(header)		((header)->mode ? 2 : 1)
+# define MAD_NSBSAMPLES(header)  \
+  ((header)->layer == MAD_LAYER_I ? 12 :  \
+   (((header)->layer == MAD_LAYER_III &&  \
+     ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
+
+enum {
+  MAD_FLAG_NPRIVATE_III	= 0x0007,	/* number of Layer III private bits */
+  MAD_FLAG_INCOMPLETE	= 0x0008,	/* header but not data is decoded */
+
+  MAD_FLAG_PROTECTION	= 0x0010,	/* frame has CRC protection */
+  MAD_FLAG_COPYRIGHT	= 0x0020,	/* frame is copyright */
+  MAD_FLAG_ORIGINAL	= 0x0040,	/* frame is original (else copy) */
+  MAD_FLAG_PADDING	= 0x0080,	/* frame has additional slot */
+
+  MAD_FLAG_I_STEREO	= 0x0100,	/* uses intensity joint stereo */
+  MAD_FLAG_MS_STEREO	= 0x0200,	/* uses middle/side joint stereo */
+  MAD_FLAG_FREEFORMAT	= 0x0400,	/* uses free format bitrate */
+
+  MAD_FLAG_LSF_EXT	= 0x1000,	/* lower sampling freq. extension */
+  MAD_FLAG_MC_EXT	= 0x2000,	/* multichannel audio extension */
+  MAD_FLAG_MPEG_2_5_EXT	= 0x4000	/* MPEG 2.5 (unofficial) extension */
+};
+
+enum {
+  MAD_PRIVATE_HEADER	= 0x0100,	/* header private bit */
+  MAD_PRIVATE_III	= 0x001f	/* Layer III private bits (up to 5) */
+};
+
+void mad_header_init(struct mad_header *);
+
+# define mad_header_finish(header)  /* nothing */
+
+int mad_header_decode(struct mad_header *, struct mad_stream *);
+
+void mad_frame_init(struct mad_frame *);
+void mad_frame_finish(struct mad_frame *);
+
+int mad_frame_decode(struct mad_frame *, struct mad_stream *);
+
+void mad_frame_mute(struct mad_frame *);
+
+# endif
+
+/* Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp */
+
+# ifndef LIBMAD_SYNTH_H
+# define LIBMAD_SYNTH_H
+
+
+struct mad_pcm {
+  unsigned int samplerate;		/* sampling frequency (Hz) */
+  unsigned short channels;		/* number of channels */
+  unsigned short length;		/* number of samples per channel */
+  mad_fixed_t samples[2][1152];		/* PCM output samples [ch][sample] */
+};
+
+struct mad_synth {
+  mad_fixed_t filter[2][2][2][16][8];	/* polyphase filterbank outputs */
+  					/* [ch][eo][peo][s][v] */
+
+  unsigned int phase;			/* current processing phase */
+
+  struct mad_pcm pcm;			/* PCM output */
+};
+
+/* single channel PCM selector */
+enum {
+  MAD_PCM_CHANNEL_SINGLE = 0
+};
+
+/* dual channel PCM selector */
+enum {
+  MAD_PCM_CHANNEL_DUAL_1 = 0,
+  MAD_PCM_CHANNEL_DUAL_2 = 1
+};
+
+/* stereo PCM selector */
+enum {
+  MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
+  MAD_PCM_CHANNEL_STEREO_RIGHT = 1
+};
+
+void mad_synth_init(struct mad_synth *);
+
+# define mad_synth_finish(synth)  /* nothing */
+
+void mad_synth_mute(struct mad_synth *);
+
+void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
+
+# endif
+
+/* Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp */
+
+# ifndef LIBMAD_DECODER_H
+# define LIBMAD_DECODER_H
+
+
+enum mad_decoder_mode {
+  MAD_DECODER_MODE_SYNC  = 0,
+  MAD_DECODER_MODE_ASYNC
+};
+
+enum mad_flow {
+  MAD_FLOW_CONTINUE = 0x0000,	/* continue normally */
+  MAD_FLOW_STOP     = 0x0010,	/* stop decoding normally */
+  MAD_FLOW_BREAK    = 0x0011,	/* stop decoding and signal an error */
+  MAD_FLOW_IGNORE   = 0x0020	/* ignore the current frame */
+};
+
+struct mad_decoder {
+  enum mad_decoder_mode mode;
+
+  int options;
+
+  struct {
+    long pid;
+    int in;
+    int out;
+  } async;
+
+  struct {
+    struct mad_stream stream;
+    struct mad_frame frame;
+    struct mad_synth synth;
+  } *sync;
+
+  void *cb_data;
+
+  enum mad_flow (*input_func)(void *, struct mad_stream *);
+  enum mad_flow (*header_func)(void *, struct mad_header const *);
+  enum mad_flow (*filter_func)(void *,
+			       struct mad_stream const *, struct mad_frame *);
+  enum mad_flow (*output_func)(void *,
+			       struct mad_header const *, struct mad_pcm *);
+  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
+  enum mad_flow (*message_func)(void *, void *, unsigned int *);
+};
+
+void mad_decoder_init(struct mad_decoder *, void *,
+		      enum mad_flow (*)(void *, struct mad_stream *),
+		      enum mad_flow (*)(void *, struct mad_header const *),
+		      enum mad_flow (*)(void *,
+					struct mad_stream const *,
+					struct mad_frame *),
+		      enum mad_flow (*)(void *,
+					struct mad_header const *,
+					struct mad_pcm *),
+		      enum mad_flow (*)(void *,
+					struct mad_stream *,
+					struct mad_frame *),
+		      enum mad_flow (*)(void *, void *, unsigned int *));
+int mad_decoder_finish(struct mad_decoder *);
+
+# define mad_decoder_options(decoder, opts)  \
+    ((void) ((decoder)->options = (opts)))
+
+int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode);
+int mad_decoder_message(struct mad_decoder *, void *, unsigned int *);
+
+# endif
+
+# ifdef __cplusplus
+}
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/main.c
@@ -1,0 +1,182 @@
+/*
+ * Simple mp3 player.  Derived from libmad's example minimad.c.
+ */
+#include <u.h>
+#include <libc.h>
+#include "mad.h"
+
+/* Current input file */
+vlong offset;
+int rate = 44100;
+int debug = 0;
+
+static enum mad_flow
+input(void *, struct mad_stream *stream)
+{
+	int fd, n, m;
+	static uchar buf[32768];
+
+	n = stream->bufend - stream->next_frame;
+	memmove(buf, stream->next_frame, n);
+	m = read(0, buf+n, sizeof buf-n);
+	offset += m;
+	if(m < 0)
+		sysfatal("reading input: %r");
+	if(m == 0)
+		return MAD_FLOW_STOP;
+	n += m;
+	mad_stream_buffer(stream, buf, n);
+	return MAD_FLOW_CONTINUE;
+}
+
+/*
+ * Dither 28-bit down to 16-bit.  From mpg321. 
+ * I'm skeptical, but it's supposed to make the
+ * samples sound better than just truncation.
+ */
+typedef struct Dither Dither;
+struct Dither
+{
+	mad_fixed_t error[3];
+	mad_fixed_t random;
+};
+
+#define PRNG(x) (((x)*0x19660dL + 0x3c6ef35fL) & 0xffffffffL)
+
+enum
+{
+	FracBits = MAD_F_FRACBITS,
+	OutBits = 16,
+	Round = 1 << (FracBits+1-OutBits-1),	// sic
+	ScaleBits = FracBits + 1 - OutBits,
+	LowMask  = (1<<ScaleBits) - 1,
+	Min = -MAD_F_ONE,
+	Max = MAD_F_ONE - 1,
+};
+
+int
+audiodither(mad_fixed_t v, Dither *d)
+{
+	int out;
+	mad_fixed_t random;
+
+	/* noise shape */
+	v += d->error[0] - d->error[1] + d->error[2];
+	d->error[2] = d->error[1];
+	d->error[1] = d->error[0] / 2;
+	
+	/* bias */
+	out = v + Round;
+	
+	/* dither */
+	random = PRNG(d->random);
+	out += (random & LowMask) - (d->random & LowMask);
+	d->random = random;
+	
+	/* clip */
+	if(out > Max){
+		out = Max;
+		if(v > Max)
+			v = Max;
+	}else if(out < Min){
+		out = Min;
+		if(v < Min)
+			v = Min;
+	}
+	
+	/* quantize */
+	out &= ~LowMask;
+	
+	/* error feedback */
+	d->error[0] = v - out;
+	
+	/* scale */
+	return out >> ScaleBits;
+}
+
+static enum mad_flow
+output(void *, struct mad_header const* header, struct mad_pcm *pcm)
+{
+	int i, n, v;
+	mad_fixed_t const *left, *right;
+	static Dither d;
+	static uchar buf[16384], *p;
+
+	if(pcm->samplerate != rate){
+		rate = pcm->samplerate;
+		fprint(2, "warning: audio sample rate is %d Hz\n", rate);
+	}
+	p = buf;
+	memset(&d, 0, sizeof d);
+	n = pcm->length;
+	switch(pcm->channels){
+	case 1:
+		left = pcm->samples[0];
+		for(i=0; i<n; i++){
+			v = audiodither(*left++, &d);
+			/* stereoize */
+			*p++ = v;
+			*p++ = v>>8;
+			*p++ = v;
+			*p++ = v>>8;
+		}
+		break;
+	case 2:
+		left = pcm->samples[0];
+		right = pcm->samples[1];
+		for(i=0; i<n; i++){
+			v = audiodither(*left++, &d);
+			*p++ = v;
+			*p++ = v>>8;
+			v = audiodither(*right++, &d);
+			*p++ = v;
+			*p++ = v>>8;
+		}
+		break;
+	}
+	assert(p<=buf+sizeof buf);
+	write(1, buf, p-buf);
+	return MAD_FLOW_CONTINUE;
+}
+
+static enum mad_flow
+error(void *, struct mad_stream *stream, struct mad_frame *frame)
+{
+	if(stream->error == MAD_ERROR_LOSTSYNC){
+		if(memcmp(stream->this_frame, "TAG", 3)==0){
+			mad_stream_skip(stream, 128);
+			return MAD_FLOW_CONTINUE;
+		}
+	}
+	if(debug)
+		fprint(2, "#%lld: %s\n",
+			offset-(stream->bufend-stream->next_frame),
+			mad_stream_errorstr(stream));
+	return MAD_FLOW_CONTINUE;
+}
+
+void
+usage(void)
+{
+	fprint(2, "usage: %s [ -d ]\n", argv0);
+	exits("usage");
+}
+
+void
+main(int argc, char **argv)
+{
+	struct mad_decoder decoder;
+
+	ARGBEGIN{
+	case 'd':
+		debug++;
+		break;
+	default:
+		usage();
+	}ARGEND
+
+	mad_decoder_init(&decoder, nil, input, nil, nil, output, error, nil);
+	mad_decoder_run(&decoder, MAD_DECODER_MODE_SYNC);
+	mad_decoder_finish(&decoder);
+	exits(0);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/mkfile
@@ -1,0 +1,21 @@
+</$objtype/mkfile
+<../config
+
+OFILES=\
+	bit.$O\
+	decoder.$O\
+	fixed.$O\
+	frame.$O\
+	huffman.$O\
+	layer12.$O\
+	layer3.$O\
+	stream.$O\
+	synth.$O\
+	version.$O\
+	main.$O\
+
+TARG=mp3dec
+
+</sys/src/cmd/mkone
+
+CFLAGS=-FVp -DFPM_DEFAULT
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/qc_table.dat
@@ -1,0 +1,77 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: qc_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
+ */
+
+/*
+ * These are the Layer II classes of quantization.
+ * The table is derived from Table B.4 of ISO/IEC 11172-3.
+ */
+
+  {     3, 2,  5,
+    MAD_F(0x15555555) /* 1.33333333333 => 1.33333333209, e  0.00000000124 */,
+    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
+  {     5, 3,  7,
+    MAD_F(0x1999999a) /* 1.60000000000 => 1.60000000149, e -0.00000000149 */,
+    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
+  {     7, 0,  3,
+    MAD_F(0x12492492) /* 1.14285714286 => 1.14285714179, e  0.00000000107 */,
+    MAD_F(0x04000000) /* 0.25000000000 => 0.25000000000, e  0.00000000000 */ },
+  {     9, 4, 10,
+    MAD_F(0x1c71c71c) /* 1.77777777777 => 1.77777777612, e  0.00000000165 */,
+    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
+  {    15, 0,  4,
+    MAD_F(0x11111111) /* 1.06666666666 => 1.06666666642, e  0.00000000024 */,
+    MAD_F(0x02000000) /* 0.12500000000 => 0.12500000000, e  0.00000000000 */ },
+  {    31, 0,  5,
+    MAD_F(0x10842108) /* 1.03225806452 => 1.03225806355, e  0.00000000097 */,
+    MAD_F(0x01000000) /* 0.06250000000 => 0.06250000000, e  0.00000000000 */ },
+  {    63, 0,  6,
+    MAD_F(0x10410410) /* 1.01587301587 => 1.01587301493, e  0.00000000094 */,
+    MAD_F(0x00800000) /* 0.03125000000 => 0.03125000000, e  0.00000000000 */ },
+  {   127, 0,  7,
+    MAD_F(0x10204081) /* 1.00787401575 => 1.00787401572, e  0.00000000003 */,
+    MAD_F(0x00400000) /* 0.01562500000 => 0.01562500000, e  0.00000000000 */ },
+  {   255, 0,  8,
+    MAD_F(0x10101010) /* 1.00392156863 => 1.00392156839, e  0.00000000024 */,
+    MAD_F(0x00200000) /* 0.00781250000 => 0.00781250000, e  0.00000000000 */ },
+  {   511, 0,  9,
+    MAD_F(0x10080402) /* 1.00195694716 => 1.00195694715, e  0.00000000001 */,
+    MAD_F(0x00100000) /* 0.00390625000 => 0.00390625000, e  0.00000000000 */ },
+  {  1023, 0, 10,
+    MAD_F(0x10040100) /* 1.00097751711 => 1.00097751617, e  0.00000000094 */,
+    MAD_F(0x00080000) /* 0.00195312500 => 0.00195312500, e  0.00000000000 */ },
+  {  2047, 0, 11,
+    MAD_F(0x10020040) /* 1.00048851979 => 1.00048851967, e  0.00000000012 */,
+    MAD_F(0x00040000) /* 0.00097656250 => 0.00097656250, e  0.00000000000 */ },
+  {  4095, 0, 12,
+    MAD_F(0x10010010) /* 1.00024420024 => 1.00024420023, e  0.00000000001 */,
+    MAD_F(0x00020000) /* 0.00048828125 => 0.00048828125, e  0.00000000000 */ },
+  {  8191, 0, 13,
+    MAD_F(0x10008004) /* 1.00012208522 => 1.00012208521, e  0.00000000001 */,
+    MAD_F(0x00010000) /* 0.00024414063 => 0.00024414062, e  0.00000000000 */ },
+  { 16383, 0, 14,
+    MAD_F(0x10004001) /* 1.00006103888 => 1.00006103888, e -0.00000000000 */,
+    MAD_F(0x00008000) /* 0.00012207031 => 0.00012207031, e -0.00000000000 */ },
+  { 32767, 0, 15,
+    MAD_F(0x10002000) /* 1.00003051851 => 1.00003051758, e  0.00000000093 */,
+    MAD_F(0x00004000) /* 0.00006103516 => 0.00006103516, e  0.00000000000 */ },
+  { 65535, 0, 16,
+    MAD_F(0x10001000) /* 1.00001525902 => 1.00001525879, e  0.00000000023 */,
+    MAD_F(0x00002000) /* 0.00003051758 => 0.00003051758, e  0.00000000000 */ }
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/rq_table.dat
@@ -1,0 +1,8747 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: rq_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
+ */
+
+/*
+ * This is the lookup table used to compute x^(4/3) for Layer III
+ * requantization. To maintain the best possible accuracy, the value is
+ * stored as a normalized mantissa with exponent. The requantization
+ * algorithm recombines these parts with appropriate scaling.
+ */
+
+  /*    0 */  { MAD_F(0x00000000) /* 0.000000000 */,  0 },
+  /*    1 */  { MAD_F(0x04000000) /* 0.250000000 */,  2 },
+  /*    2 */  { MAD_F(0x050a28be) /* 0.314980262 */,  3 },
+  /*    3 */  { MAD_F(0x0453a5cd) /* 0.270421794 */,  4 },
+  /*    4 */  { MAD_F(0x06597fa9) /* 0.396850263 */,  4 },
+  /*    5 */  { MAD_F(0x04466275) /* 0.267183742 */,  5 },
+  /*    6 */  { MAD_F(0x05738c72) /* 0.340710111 */,  5 },
+  /*    7 */  { MAD_F(0x06b1fc81) /* 0.418453696 */,  5 },
+  /*    8 */  { MAD_F(0x04000000) /* 0.250000000 */,  6 },
+  /*    9 */  { MAD_F(0x04ae20d7) /* 0.292511788 */,  6 },
+  /*   10 */  { MAD_F(0x0562d694) /* 0.336630420 */,  6 },
+  /*   11 */  { MAD_F(0x061dae96) /* 0.382246578 */,  6 },
+  /*   12 */  { MAD_F(0x06de47f4) /* 0.429267841 */,  6 },
+  /*   13 */  { MAD_F(0x07a44f7a) /* 0.477614858 */,  6 },
+  /*   14 */  { MAD_F(0x0437be65) /* 0.263609310 */,  7 },
+  /*   15 */  { MAD_F(0x049fc824) /* 0.289009227 */,  7 },
+
+  /*   16 */  { MAD_F(0x050a28be) /* 0.314980262 */,  7 },
+  /*   17 */  { MAD_F(0x0576c6f5) /* 0.341498336 */,  7 },
+  /*   18 */  { MAD_F(0x05e58c0b) /* 0.368541759 */,  7 },
+  /*   19 */  { MAD_F(0x06566361) /* 0.396090870 */,  7 },
+  /*   20 */  { MAD_F(0x06c93a2e) /* 0.424127753 */,  7 },
+  /*   21 */  { MAD_F(0x073dff3e) /* 0.452635998 */,  7 },
+  /*   22 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */,  7 },
+  /*   23 */  { MAD_F(0x04168b05) /* 0.255503674 */,  8 },
+  /*   24 */  { MAD_F(0x0453a5cd) /* 0.270421794 */,  8 },
+  /*   25 */  { MAD_F(0x04919b6a) /* 0.285548607 */,  8 },
+  /*   26 */  { MAD_F(0x04d065fb) /* 0.300878507 */,  8 },
+  /*   27 */  { MAD_F(0x05100000) /* 0.316406250 */,  8 },
+  /*   28 */  { MAD_F(0x05506451) /* 0.332126919 */,  8 },
+  /*   29 */  { MAD_F(0x05918e15) /* 0.348035890 */,  8 },
+  /*   30 */  { MAD_F(0x05d378bb) /* 0.364128809 */,  8 },
+  /*   31 */  { MAD_F(0x06161ff3) /* 0.380401563 */,  8 },
+
+  /*   32 */  { MAD_F(0x06597fa9) /* 0.396850263 */,  8 },
+  /*   33 */  { MAD_F(0x069d9400) /* 0.413471222 */,  8 },
+  /*   34 */  { MAD_F(0x06e2594c) /* 0.430260942 */,  8 },
+  /*   35 */  { MAD_F(0x0727cc11) /* 0.447216097 */,  8 },
+  /*   36 */  { MAD_F(0x076de8fc) /* 0.464333519 */,  8 },
+  /*   37 */  { MAD_F(0x07b4ace3) /* 0.481610189 */,  8 },
+  /*   38 */  { MAD_F(0x07fc14bf) /* 0.499043224 */,  8 },
+  /*   39 */  { MAD_F(0x04220ed7) /* 0.258314934 */,  9 },
+  /*   40 */  { MAD_F(0x04466275) /* 0.267183742 */,  9 },
+  /*   41 */  { MAD_F(0x046b03e7) /* 0.276126771 */,  9 },
+  /*   42 */  { MAD_F(0x048ff1e8) /* 0.285142811 */,  9 },
+  /*   43 */  { MAD_F(0x04b52b3f) /* 0.294230696 */,  9 },
+  /*   44 */  { MAD_F(0x04daaec0) /* 0.303389310 */,  9 },
+  /*   45 */  { MAD_F(0x05007b49) /* 0.312617576 */,  9 },
+  /*   46 */  { MAD_F(0x05268fc6) /* 0.321914457 */,  9 },
+  /*   47 */  { MAD_F(0x054ceb2a) /* 0.331278957 */,  9 },
+
+  /*   48 */  { MAD_F(0x05738c72) /* 0.340710111 */,  9 },
+  /*   49 */  { MAD_F(0x059a72a5) /* 0.350206992 */,  9 },
+  /*   50 */  { MAD_F(0x05c19cd3) /* 0.359768701 */,  9 },
+  /*   51 */  { MAD_F(0x05e90a12) /* 0.369394372 */,  9 },
+  /*   52 */  { MAD_F(0x0610b982) /* 0.379083164 */,  9 },
+  /*   53 */  { MAD_F(0x0638aa48) /* 0.388834268 */,  9 },
+  /*   54 */  { MAD_F(0x0660db91) /* 0.398646895 */,  9 },
+  /*   55 */  { MAD_F(0x06894c90) /* 0.408520284 */,  9 },
+  /*   56 */  { MAD_F(0x06b1fc81) /* 0.418453696 */,  9 },
+  /*   57 */  { MAD_F(0x06daeaa1) /* 0.428446415 */,  9 },
+  /*   58 */  { MAD_F(0x07041636) /* 0.438497744 */,  9 },
+  /*   59 */  { MAD_F(0x072d7e8b) /* 0.448607009 */,  9 },
+  /*   60 */  { MAD_F(0x075722ef) /* 0.458773552 */,  9 },
+  /*   61 */  { MAD_F(0x078102b8) /* 0.468996735 */,  9 },
+  /*   62 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */,  9 },
+  /*   63 */  { MAD_F(0x07d571e0) /* 0.489610555 */,  9 },
+
+  /*   64 */  { MAD_F(0x04000000) /* 0.250000000 */, 10 },
+  /*   65 */  { MAD_F(0x04156381) /* 0.255221850 */, 10 },
+  /*   66 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 10 },
+  /*   67 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 10 },
+  /*   68 */  { MAD_F(0x045635cf) /* 0.271047409 */, 10 },
+  /*   69 */  { MAD_F(0x046c083e) /* 0.276375048 */, 10 },
+  /*   70 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 10 },
+  /*   71 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 10 },
+  /*   72 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 10 },
+  /*   73 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 10 },
+  /*   74 */  { MAD_F(0x04dab524) /* 0.303395408 */, 10 },
+  /*   75 */  { MAD_F(0x04f12624) /* 0.308874267 */, 10 },
+  /*   76 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 10 },
+  /*   77 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 10 },
+  /*   78 */  { MAD_F(0x053511cb) /* 0.325456423 */, 10 },
+  /*   79 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 10 },
+
+  /*   80 */  { MAD_F(0x0562d694) /* 0.336630420 */, 10 },
+  /*   81 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 10 },
+  /*   82 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 10 },
+  /*   83 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 10 },
+  /*   84 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 10 },
+  /*   85 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 10 },
+  /*   86 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 10 },
+  /*   87 */  { MAD_F(0x0606012b) /* 0.376465960 */, 10 },
+  /*   88 */  { MAD_F(0x061dae96) /* 0.382246578 */, 10 },
+  /*   89 */  { MAD_F(0x06357302) /* 0.388049134 */, 10 },
+  /*   90 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 10 },
+  /*   91 */  { MAD_F(0x0665402d) /* 0.399719406 */, 10 },
+  /*   92 */  { MAD_F(0x067d4896) /* 0.405586801 */, 10 },
+  /*   93 */  { MAD_F(0x06956753) /* 0.411475493 */, 10 },
+  /*   94 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 10 },
+  /*   95 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 10 },
+
+  /*   96 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 10 },
+  /*   97 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 10 },
+  /*   98 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 10 },
+  /*   99 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 10 },
+  /*  100 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 10 },
+  /*  101 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 10 },
+  /*  102 */  { MAD_F(0x07724f64) /* 0.465407744 */, 10 },
+  /*  103 */  { MAD_F(0x078b4514) /* 0.471501425 */, 10 },
+  /*  104 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 10 },
+  /*  105 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 10 },
+  /*  106 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 10 },
+  /*  107 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 10 },
+  /*  108 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 11 },
+  /*  109 */  { MAD_F(0x04115aca) /* 0.254236974 */, 11 },
+  /*  110 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 11 },
+  /*  111 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 11 },
+
+  /*  112 */  { MAD_F(0x0437be65) /* 0.263609310 */, 11 },
+  /*  113 */  { MAD_F(0x04449dee) /* 0.266752177 */, 11 },
+  /*  114 */  { MAD_F(0x04518733) /* 0.269904329 */, 11 },
+  /*  115 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 11 },
+  /*  116 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 11 },
+  /*  117 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 11 },
+  /*  118 */  { MAD_F(0x04858c83) /* 0.282604707 */, 11 },
+  /*  119 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 11 },
+  /*  120 */  { MAD_F(0x049fc824) /* 0.289009227 */, 11 },
+  /*  121 */  { MAD_F(0x04acf402) /* 0.292224893 */, 11 },
+  /*  122 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 11 },
+  /*  123 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 11 },
+  /*  124 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 11 },
+  /*  125 */  { MAD_F(0x04e20000) /* 0.305175781 */, 11 },
+  /*  126 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 11 },
+  /*  127 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 11 },
+
+  /*  128 */  { MAD_F(0x050a28be) /* 0.314980262 */, 11 },
+  /*  129 */  { MAD_F(0x05179da4) /* 0.318265572 */, 11 },
+  /*  130 */  { MAD_F(0x05251b73) /* 0.321559381 */, 11 },
+  /*  131 */  { MAD_F(0x0532a220) /* 0.324861647 */, 11 },
+  /*  132 */  { MAD_F(0x054031a0) /* 0.328172327 */, 11 },
+  /*  133 */  { MAD_F(0x054dc9e7) /* 0.331491377 */, 11 },
+  /*  134 */  { MAD_F(0x055b6ae9) /* 0.334818756 */, 11 },
+  /*  135 */  { MAD_F(0x0569149c) /* 0.338154423 */, 11 },
+  /*  136 */  { MAD_F(0x0576c6f5) /* 0.341498336 */, 11 },
+  /*  137 */  { MAD_F(0x058481e9) /* 0.344850455 */, 11 },
+  /*  138 */  { MAD_F(0x0592456d) /* 0.348210741 */, 11 },
+  /*  139 */  { MAD_F(0x05a01176) /* 0.351579152 */, 11 },
+  /*  140 */  { MAD_F(0x05ade5fa) /* 0.354955651 */, 11 },
+  /*  141 */  { MAD_F(0x05bbc2ef) /* 0.358340200 */, 11 },
+  /*  142 */  { MAD_F(0x05c9a84a) /* 0.361732758 */, 11 },
+  /*  143 */  { MAD_F(0x05d79601) /* 0.365133291 */, 11 },
+
+  /*  144 */  { MAD_F(0x05e58c0b) /* 0.368541759 */, 11 },
+  /*  145 */  { MAD_F(0x05f38a5d) /* 0.371958126 */, 11 },
+  /*  146 */  { MAD_F(0x060190ee) /* 0.375382356 */, 11 },
+  /*  147 */  { MAD_F(0x060f9fb3) /* 0.378814413 */, 11 },
+  /*  148 */  { MAD_F(0x061db6a5) /* 0.382254261 */, 11 },
+  /*  149 */  { MAD_F(0x062bd5b8) /* 0.385701865 */, 11 },
+  /*  150 */  { MAD_F(0x0639fce4) /* 0.389157191 */, 11 },
+  /*  151 */  { MAD_F(0x06482c1f) /* 0.392620204 */, 11 },
+  /*  152 */  { MAD_F(0x06566361) /* 0.396090870 */, 11 },
+  /*  153 */  { MAD_F(0x0664a2a0) /* 0.399569155 */, 11 },
+  /*  154 */  { MAD_F(0x0672e9d4) /* 0.403055027 */, 11 },
+  /*  155 */  { MAD_F(0x068138f3) /* 0.406548452 */, 11 },
+  /*  156 */  { MAD_F(0x068f8ff5) /* 0.410049398 */, 11 },
+  /*  157 */  { MAD_F(0x069deed1) /* 0.413557833 */, 11 },
+  /*  158 */  { MAD_F(0x06ac557f) /* 0.417073724 */, 11 },
+  /*  159 */  { MAD_F(0x06bac3f6) /* 0.420597041 */, 11 },
+
+  /*  160 */  { MAD_F(0x06c93a2e) /* 0.424127753 */, 11 },
+  /*  161 */  { MAD_F(0x06d7b81f) /* 0.427665827 */, 11 },
+  /*  162 */  { MAD_F(0x06e63dc0) /* 0.431211234 */, 11 },
+  /*  163 */  { MAD_F(0x06f4cb09) /* 0.434763944 */, 11 },
+  /*  164 */  { MAD_F(0x07035ff3) /* 0.438323927 */, 11 },
+  /*  165 */  { MAD_F(0x0711fc75) /* 0.441891153 */, 11 },
+  /*  166 */  { MAD_F(0x0720a087) /* 0.445465593 */, 11 },
+  /*  167 */  { MAD_F(0x072f4c22) /* 0.449047217 */, 11 },
+  /*  168 */  { MAD_F(0x073dff3e) /* 0.452635998 */, 11 },
+  /*  169 */  { MAD_F(0x074cb9d3) /* 0.456231906 */, 11 },
+  /*  170 */  { MAD_F(0x075b7bdb) /* 0.459834914 */, 11 },
+  /*  171 */  { MAD_F(0x076a454c) /* 0.463444993 */, 11 },
+  /*  172 */  { MAD_F(0x07791620) /* 0.467062117 */, 11 },
+  /*  173 */  { MAD_F(0x0787ee50) /* 0.470686258 */, 11 },
+  /*  174 */  { MAD_F(0x0796cdd4) /* 0.474317388 */, 11 },
+  /*  175 */  { MAD_F(0x07a5b4a5) /* 0.477955481 */, 11 },
+
+  /*  176 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */, 11 },
+  /*  177 */  { MAD_F(0x07c39812) /* 0.485252449 */, 11 },
+  /*  178 */  { MAD_F(0x07d294a0) /* 0.488911273 */, 11 },
+  /*  179 */  { MAD_F(0x07e1985f) /* 0.492576954 */, 11 },
+  /*  180 */  { MAD_F(0x07f0a348) /* 0.496249468 */, 11 },
+  /*  181 */  { MAD_F(0x07ffb554) /* 0.499928790 */, 11 },
+  /*  182 */  { MAD_F(0x0407673f) /* 0.251807447 */, 12 },
+  /*  183 */  { MAD_F(0x040ef75e) /* 0.253653877 */, 12 },
+  /*  184 */  { MAD_F(0x04168b05) /* 0.255503674 */, 12 },
+  /*  185 */  { MAD_F(0x041e2230) /* 0.257356825 */, 12 },
+  /*  186 */  { MAD_F(0x0425bcdd) /* 0.259213318 */, 12 },
+  /*  187 */  { MAD_F(0x042d5b07) /* 0.261073141 */, 12 },
+  /*  188 */  { MAD_F(0x0434fcad) /* 0.262936282 */, 12 },
+  /*  189 */  { MAD_F(0x043ca1c9) /* 0.264802730 */, 12 },
+  /*  190 */  { MAD_F(0x04444a5a) /* 0.266672472 */, 12 },
+  /*  191 */  { MAD_F(0x044bf65d) /* 0.268545497 */, 12 },
+
+  /*  192 */  { MAD_F(0x0453a5cd) /* 0.270421794 */, 12 },
+  /*  193 */  { MAD_F(0x045b58a9) /* 0.272301352 */, 12 },
+  /*  194 */  { MAD_F(0x04630eed) /* 0.274184158 */, 12 },
+  /*  195 */  { MAD_F(0x046ac896) /* 0.276070203 */, 12 },
+  /*  196 */  { MAD_F(0x047285a2) /* 0.277959474 */, 12 },
+  /*  197 */  { MAD_F(0x047a460c) /* 0.279851960 */, 12 },
+  /*  198 */  { MAD_F(0x048209d3) /* 0.281747652 */, 12 },
+  /*  199 */  { MAD_F(0x0489d0f4) /* 0.283646538 */, 12 },
+  /*  200 */  { MAD_F(0x04919b6a) /* 0.285548607 */, 12 },
+  /*  201 */  { MAD_F(0x04996935) /* 0.287453849 */, 12 },
+  /*  202 */  { MAD_F(0x04a13a50) /* 0.289362253 */, 12 },
+  /*  203 */  { MAD_F(0x04a90eba) /* 0.291273810 */, 12 },
+  /*  204 */  { MAD_F(0x04b0e66e) /* 0.293188507 */, 12 },
+  /*  205 */  { MAD_F(0x04b8c16c) /* 0.295106336 */, 12 },
+  /*  206 */  { MAD_F(0x04c09faf) /* 0.297027285 */, 12 },
+  /*  207 */  { MAD_F(0x04c88135) /* 0.298951346 */, 12 },
+
+  /*  208 */  { MAD_F(0x04d065fb) /* 0.300878507 */, 12 },
+  /*  209 */  { MAD_F(0x04d84dff) /* 0.302808759 */, 12 },
+  /*  210 */  { MAD_F(0x04e0393e) /* 0.304742092 */, 12 },
+  /*  211 */  { MAD_F(0x04e827b6) /* 0.306678497 */, 12 },
+  /*  212 */  { MAD_F(0x04f01963) /* 0.308617963 */, 12 },
+  /*  213 */  { MAD_F(0x04f80e44) /* 0.310560480 */, 12 },
+  /*  214 */  { MAD_F(0x05000655) /* 0.312506041 */, 12 },
+  /*  215 */  { MAD_F(0x05080195) /* 0.314454634 */, 12 },
+  /*  216 */  { MAD_F(0x05100000) /* 0.316406250 */, 12 },
+  /*  217 */  { MAD_F(0x05180194) /* 0.318360880 */, 12 },
+  /*  218 */  { MAD_F(0x0520064f) /* 0.320318516 */, 12 },
+  /*  219 */  { MAD_F(0x05280e2d) /* 0.322279147 */, 12 },
+  /*  220 */  { MAD_F(0x0530192e) /* 0.324242764 */, 12 },
+  /*  221 */  { MAD_F(0x0538274e) /* 0.326209359 */, 12 },
+  /*  222 */  { MAD_F(0x0540388a) /* 0.328178922 */, 12 },
+  /*  223 */  { MAD_F(0x05484ce2) /* 0.330151445 */, 12 },
+
+  /*  224 */  { MAD_F(0x05506451) /* 0.332126919 */, 12 },
+  /*  225 */  { MAD_F(0x05587ed5) /* 0.334105334 */, 12 },
+  /*  226 */  { MAD_F(0x05609c6e) /* 0.336086683 */, 12 },
+  /*  227 */  { MAD_F(0x0568bd17) /* 0.338070956 */, 12 },
+  /*  228 */  { MAD_F(0x0570e0cf) /* 0.340058145 */, 12 },
+  /*  229 */  { MAD_F(0x05790793) /* 0.342048241 */, 12 },
+  /*  230 */  { MAD_F(0x05813162) /* 0.344041237 */, 12 },
+  /*  231 */  { MAD_F(0x05895e39) /* 0.346037122 */, 12 },
+  /*  232 */  { MAD_F(0x05918e15) /* 0.348035890 */, 12 },
+  /*  233 */  { MAD_F(0x0599c0f4) /* 0.350037532 */, 12 },
+  /*  234 */  { MAD_F(0x05a1f6d5) /* 0.352042040 */, 12 },
+  /*  235 */  { MAD_F(0x05aa2fb5) /* 0.354049405 */, 12 },
+  /*  236 */  { MAD_F(0x05b26b92) /* 0.356059619 */, 12 },
+  /*  237 */  { MAD_F(0x05baaa69) /* 0.358072674 */, 12 },
+  /*  238 */  { MAD_F(0x05c2ec39) /* 0.360088563 */, 12 },
+  /*  239 */  { MAD_F(0x05cb3100) /* 0.362107278 */, 12 },
+
+  /*  240 */  { MAD_F(0x05d378bb) /* 0.364128809 */, 12 },
+  /*  241 */  { MAD_F(0x05dbc368) /* 0.366153151 */, 12 },
+  /*  242 */  { MAD_F(0x05e41105) /* 0.368180294 */, 12 },
+  /*  243 */  { MAD_F(0x05ec6190) /* 0.370210231 */, 12 },
+  /*  244 */  { MAD_F(0x05f4b507) /* 0.372242955 */, 12 },
+  /*  245 */  { MAD_F(0x05fd0b68) /* 0.374278458 */, 12 },
+  /*  246 */  { MAD_F(0x060564b1) /* 0.376316732 */, 12 },
+  /*  247 */  { MAD_F(0x060dc0e0) /* 0.378357769 */, 12 },
+  /*  248 */  { MAD_F(0x06161ff3) /* 0.380401563 */, 12 },
+  /*  249 */  { MAD_F(0x061e81e8) /* 0.382448106 */, 12 },
+  /*  250 */  { MAD_F(0x0626e6bc) /* 0.384497391 */, 12 },
+  /*  251 */  { MAD_F(0x062f4e6f) /* 0.386549409 */, 12 },
+  /*  252 */  { MAD_F(0x0637b8fd) /* 0.388604155 */, 12 },
+  /*  253 */  { MAD_F(0x06402666) /* 0.390661620 */, 12 },
+  /*  254 */  { MAD_F(0x064896a7) /* 0.392721798 */, 12 },
+  /*  255 */  { MAD_F(0x065109be) /* 0.394784681 */, 12 },
+
+  /*  256 */  { MAD_F(0x06597fa9) /* 0.396850263 */, 12 },
+  /*  257 */  { MAD_F(0x0661f867) /* 0.398918536 */, 12 },
+  /*  258 */  { MAD_F(0x066a73f5) /* 0.400989493 */, 12 },
+  /*  259 */  { MAD_F(0x0672f252) /* 0.403063128 */, 12 },
+  /*  260 */  { MAD_F(0x067b737c) /* 0.405139433 */, 12 },
+  /*  261 */  { MAD_F(0x0683f771) /* 0.407218402 */, 12 },
+  /*  262 */  { MAD_F(0x068c7e2f) /* 0.409300027 */, 12 },
+  /*  263 */  { MAD_F(0x069507b5) /* 0.411384303 */, 12 },
+  /*  264 */  { MAD_F(0x069d9400) /* 0.413471222 */, 12 },
+  /*  265 */  { MAD_F(0x06a6230f) /* 0.415560778 */, 12 },
+  /*  266 */  { MAD_F(0x06aeb4e0) /* 0.417652964 */, 12 },
+  /*  267 */  { MAD_F(0x06b74971) /* 0.419747773 */, 12 },
+  /*  268 */  { MAD_F(0x06bfe0c0) /* 0.421845199 */, 12 },
+  /*  269 */  { MAD_F(0x06c87acc) /* 0.423945235 */, 12 },
+  /*  270 */  { MAD_F(0x06d11794) /* 0.426047876 */, 12 },
+  /*  271 */  { MAD_F(0x06d9b714) /* 0.428153114 */, 12 },
+
+  /*  272 */  { MAD_F(0x06e2594c) /* 0.430260942 */, 12 },
+  /*  273 */  { MAD_F(0x06eafe3a) /* 0.432371356 */, 12 },
+  /*  274 */  { MAD_F(0x06f3a5dc) /* 0.434484348 */, 12 },
+  /*  275 */  { MAD_F(0x06fc5030) /* 0.436599912 */, 12 },
+  /*  276 */  { MAD_F(0x0704fd35) /* 0.438718042 */, 12 },
+  /*  277 */  { MAD_F(0x070dacea) /* 0.440838732 */, 12 },
+  /*  278 */  { MAD_F(0x07165f4b) /* 0.442961975 */, 12 },
+  /*  279 */  { MAD_F(0x071f1459) /* 0.445087765 */, 12 },
+  /*  280 */  { MAD_F(0x0727cc11) /* 0.447216097 */, 12 },
+  /*  281 */  { MAD_F(0x07308671) /* 0.449346964 */, 12 },
+  /*  282 */  { MAD_F(0x07394378) /* 0.451480360 */, 12 },
+  /*  283 */  { MAD_F(0x07420325) /* 0.453616280 */, 12 },
+  /*  284 */  { MAD_F(0x074ac575) /* 0.455754717 */, 12 },
+  /*  285 */  { MAD_F(0x07538a67) /* 0.457895665 */, 12 },
+  /*  286 */  { MAD_F(0x075c51fa) /* 0.460039119 */, 12 },
+  /*  287 */  { MAD_F(0x07651c2c) /* 0.462185072 */, 12 },
+
+  /*  288 */  { MAD_F(0x076de8fc) /* 0.464333519 */, 12 },
+  /*  289 */  { MAD_F(0x0776b867) /* 0.466484455 */, 12 },
+  /*  290 */  { MAD_F(0x077f8a6d) /* 0.468637872 */, 12 },
+  /*  291 */  { MAD_F(0x07885f0b) /* 0.470793767 */, 12 },
+  /*  292 */  { MAD_F(0x07913641) /* 0.472952132 */, 12 },
+  /*  293 */  { MAD_F(0x079a100c) /* 0.475112962 */, 12 },
+  /*  294 */  { MAD_F(0x07a2ec6c) /* 0.477276252 */, 12 },
+  /*  295 */  { MAD_F(0x07abcb5f) /* 0.479441997 */, 12 },
+  /*  296 */  { MAD_F(0x07b4ace3) /* 0.481610189 */, 12 },
+  /*  297 */  { MAD_F(0x07bd90f6) /* 0.483780825 */, 12 },
+  /*  298 */  { MAD_F(0x07c67798) /* 0.485953899 */, 12 },
+  /*  299 */  { MAD_F(0x07cf60c7) /* 0.488129404 */, 12 },
+  /*  300 */  { MAD_F(0x07d84c81) /* 0.490307336 */, 12 },
+  /*  301 */  { MAD_F(0x07e13ac5) /* 0.492487690 */, 12 },
+  /*  302 */  { MAD_F(0x07ea2b92) /* 0.494670459 */, 12 },
+  /*  303 */  { MAD_F(0x07f31ee6) /* 0.496855639 */, 12 },
+
+  /*  304 */  { MAD_F(0x07fc14bf) /* 0.499043224 */, 12 },
+  /*  305 */  { MAD_F(0x0402868e) /* 0.250616605 */, 13 },
+  /*  306 */  { MAD_F(0x040703ff) /* 0.251712795 */, 13 },
+  /*  307 */  { MAD_F(0x040b82b0) /* 0.252810180 */, 13 },
+  /*  308 */  { MAD_F(0x041002a1) /* 0.253908756 */, 13 },
+  /*  309 */  { MAD_F(0x041483d1) /* 0.255008523 */, 13 },
+  /*  310 */  { MAD_F(0x04190640) /* 0.256109476 */, 13 },
+  /*  311 */  { MAD_F(0x041d89ed) /* 0.257211614 */, 13 },
+  /*  312 */  { MAD_F(0x04220ed7) /* 0.258314934 */, 13 },
+  /*  313 */  { MAD_F(0x042694fe) /* 0.259419433 */, 13 },
+  /*  314 */  { MAD_F(0x042b1c60) /* 0.260525110 */, 13 },
+  /*  315 */  { MAD_F(0x042fa4fe) /* 0.261631960 */, 13 },
+  /*  316 */  { MAD_F(0x04342ed7) /* 0.262739982 */, 13 },
+  /*  317 */  { MAD_F(0x0438b9e9) /* 0.263849174 */, 13 },
+  /*  318 */  { MAD_F(0x043d4635) /* 0.264959533 */, 13 },
+  /*  319 */  { MAD_F(0x0441d3b9) /* 0.266071056 */, 13 },
+
+  /*  320 */  { MAD_F(0x04466275) /* 0.267183742 */, 13 },
+  /*  321 */  { MAD_F(0x044af269) /* 0.268297587 */, 13 },
+  /*  322 */  { MAD_F(0x044f8393) /* 0.269412589 */, 13 },
+  /*  323 */  { MAD_F(0x045415f3) /* 0.270528746 */, 13 },
+  /*  324 */  { MAD_F(0x0458a989) /* 0.271646056 */, 13 },
+  /*  325 */  { MAD_F(0x045d3e53) /* 0.272764515 */, 13 },
+  /*  326 */  { MAD_F(0x0461d451) /* 0.273884123 */, 13 },
+  /*  327 */  { MAD_F(0x04666b83) /* 0.275004875 */, 13 },
+  /*  328 */  { MAD_F(0x046b03e7) /* 0.276126771 */, 13 },
+  /*  329 */  { MAD_F(0x046f9d7e) /* 0.277249808 */, 13 },
+  /*  330 */  { MAD_F(0x04743847) /* 0.278373983 */, 13 },
+  /*  331 */  { MAD_F(0x0478d440) /* 0.279499294 */, 13 },
+  /*  332 */  { MAD_F(0x047d716a) /* 0.280625739 */, 13 },
+  /*  333 */  { MAD_F(0x04820fc3) /* 0.281753315 */, 13 },
+  /*  334 */  { MAD_F(0x0486af4c) /* 0.282882021 */, 13 },
+  /*  335 */  { MAD_F(0x048b5003) /* 0.284011853 */, 13 },
+
+  /*  336 */  { MAD_F(0x048ff1e8) /* 0.285142811 */, 13 },
+  /*  337 */  { MAD_F(0x049494fb) /* 0.286274891 */, 13 },
+  /*  338 */  { MAD_F(0x0499393a) /* 0.287408091 */, 13 },
+  /*  339 */  { MAD_F(0x049ddea5) /* 0.288542409 */, 13 },
+  /*  340 */  { MAD_F(0x04a2853c) /* 0.289677844 */, 13 },
+  /*  341 */  { MAD_F(0x04a72cfe) /* 0.290814392 */, 13 },
+  /*  342 */  { MAD_F(0x04abd5ea) /* 0.291952051 */, 13 },
+  /*  343 */  { MAD_F(0x04b08000) /* 0.293090820 */, 13 },
+  /*  344 */  { MAD_F(0x04b52b3f) /* 0.294230696 */, 13 },
+  /*  345 */  { MAD_F(0x04b9d7a7) /* 0.295371678 */, 13 },
+  /*  346 */  { MAD_F(0x04be8537) /* 0.296513762 */, 13 },
+  /*  347 */  { MAD_F(0x04c333ee) /* 0.297656947 */, 13 },
+  /*  348 */  { MAD_F(0x04c7e3cc) /* 0.298801231 */, 13 },
+  /*  349 */  { MAD_F(0x04cc94d1) /* 0.299946611 */, 13 },
+  /*  350 */  { MAD_F(0x04d146fb) /* 0.301093085 */, 13 },
+  /*  351 */  { MAD_F(0x04d5fa4b) /* 0.302240653 */, 13 },
+
+  /*  352 */  { MAD_F(0x04daaec0) /* 0.303389310 */, 13 },
+  /*  353 */  { MAD_F(0x04df6458) /* 0.304539056 */, 13 },
+  /*  354 */  { MAD_F(0x04e41b14) /* 0.305689888 */, 13 },
+  /*  355 */  { MAD_F(0x04e8d2f3) /* 0.306841804 */, 13 },
+  /*  356 */  { MAD_F(0x04ed8bf5) /* 0.307994802 */, 13 },
+  /*  357 */  { MAD_F(0x04f24618) /* 0.309148880 */, 13 },
+  /*  358 */  { MAD_F(0x04f7015d) /* 0.310304037 */, 13 },
+  /*  359 */  { MAD_F(0x04fbbdc3) /* 0.311460269 */, 13 },
+  /*  360 */  { MAD_F(0x05007b49) /* 0.312617576 */, 13 },
+  /*  361 */  { MAD_F(0x050539ef) /* 0.313775954 */, 13 },
+  /*  362 */  { MAD_F(0x0509f9b4) /* 0.314935403 */, 13 },
+  /*  363 */  { MAD_F(0x050eba98) /* 0.316095920 */, 13 },
+  /*  364 */  { MAD_F(0x05137c9a) /* 0.317257503 */, 13 },
+  /*  365 */  { MAD_F(0x05183fba) /* 0.318420150 */, 13 },
+  /*  366 */  { MAD_F(0x051d03f7) /* 0.319583859 */, 13 },
+  /*  367 */  { MAD_F(0x0521c950) /* 0.320748629 */, 13 },
+
+  /*  368 */  { MAD_F(0x05268fc6) /* 0.321914457 */, 13 },
+  /*  369 */  { MAD_F(0x052b5757) /* 0.323081342 */, 13 },
+  /*  370 */  { MAD_F(0x05302003) /* 0.324249281 */, 13 },
+  /*  371 */  { MAD_F(0x0534e9ca) /* 0.325418273 */, 13 },
+  /*  372 */  { MAD_F(0x0539b4ab) /* 0.326588316 */, 13 },
+  /*  373 */  { MAD_F(0x053e80a6) /* 0.327759407 */, 13 },
+  /*  374 */  { MAD_F(0x05434db9) /* 0.328931546 */, 13 },
+  /*  375 */  { MAD_F(0x05481be5) /* 0.330104730 */, 13 },
+  /*  376 */  { MAD_F(0x054ceb2a) /* 0.331278957 */, 13 },
+  /*  377 */  { MAD_F(0x0551bb85) /* 0.332454225 */, 13 },
+  /*  378 */  { MAD_F(0x05568cf8) /* 0.333630533 */, 13 },
+  /*  379 */  { MAD_F(0x055b5f81) /* 0.334807879 */, 13 },
+  /*  380 */  { MAD_F(0x05603321) /* 0.335986261 */, 13 },
+  /*  381 */  { MAD_F(0x056507d6) /* 0.337165677 */, 13 },
+  /*  382 */  { MAD_F(0x0569dda0) /* 0.338346125 */, 13 },
+  /*  383 */  { MAD_F(0x056eb47f) /* 0.339527604 */, 13 },
+
+  /*  384 */  { MAD_F(0x05738c72) /* 0.340710111 */, 13 },
+  /*  385 */  { MAD_F(0x05786578) /* 0.341893646 */, 13 },
+  /*  386 */  { MAD_F(0x057d3f92) /* 0.343078205 */, 13 },
+  /*  387 */  { MAD_F(0x05821abf) /* 0.344263788 */, 13 },
+  /*  388 */  { MAD_F(0x0586f6fd) /* 0.345450393 */, 13 },
+  /*  389 */  { MAD_F(0x058bd44e) /* 0.346638017 */, 13 },
+  /*  390 */  { MAD_F(0x0590b2b0) /* 0.347826659 */, 13 },
+  /*  391 */  { MAD_F(0x05959222) /* 0.349016318 */, 13 },
+  /*  392 */  { MAD_F(0x059a72a5) /* 0.350206992 */, 13 },
+  /*  393 */  { MAD_F(0x059f5438) /* 0.351398678 */, 13 },
+  /*  394 */  { MAD_F(0x05a436da) /* 0.352591376 */, 13 },
+  /*  395 */  { MAD_F(0x05a91a8c) /* 0.353785083 */, 13 },
+  /*  396 */  { MAD_F(0x05adff4c) /* 0.354979798 */, 13 },
+  /*  397 */  { MAD_F(0x05b2e51a) /* 0.356175519 */, 13 },
+  /*  398 */  { MAD_F(0x05b7cbf5) /* 0.357372244 */, 13 },
+  /*  399 */  { MAD_F(0x05bcb3de) /* 0.358569972 */, 13 },
+
+  /*  400 */  { MAD_F(0x05c19cd3) /* 0.359768701 */, 13 },
+  /*  401 */  { MAD_F(0x05c686d5) /* 0.360968429 */, 13 },
+  /*  402 */  { MAD_F(0x05cb71e2) /* 0.362169156 */, 13 },
+  /*  403 */  { MAD_F(0x05d05dfb) /* 0.363370878 */, 13 },
+  /*  404 */  { MAD_F(0x05d54b1f) /* 0.364573594 */, 13 },
+  /*  405 */  { MAD_F(0x05da394d) /* 0.365777304 */, 13 },
+  /*  406 */  { MAD_F(0x05df2885) /* 0.366982004 */, 13 },
+  /*  407 */  { MAD_F(0x05e418c7) /* 0.368187694 */, 13 },
+  /*  408 */  { MAD_F(0x05e90a12) /* 0.369394372 */, 13 },
+  /*  409 */  { MAD_F(0x05edfc66) /* 0.370602036 */, 13 },
+  /*  410 */  { MAD_F(0x05f2efc2) /* 0.371810684 */, 13 },
+  /*  411 */  { MAD_F(0x05f7e426) /* 0.373020316 */, 13 },
+  /*  412 */  { MAD_F(0x05fcd992) /* 0.374230929 */, 13 },
+  /*  413 */  { MAD_F(0x0601d004) /* 0.375442522 */, 13 },
+  /*  414 */  { MAD_F(0x0606c77d) /* 0.376655093 */, 13 },
+  /*  415 */  { MAD_F(0x060bbffd) /* 0.377868641 */, 13 },
+
+  /*  416 */  { MAD_F(0x0610b982) /* 0.379083164 */, 13 },
+  /*  417 */  { MAD_F(0x0615b40c) /* 0.380298661 */, 13 },
+  /*  418 */  { MAD_F(0x061aaf9c) /* 0.381515130 */, 13 },
+  /*  419 */  { MAD_F(0x061fac2f) /* 0.382732569 */, 13 },
+  /*  420 */  { MAD_F(0x0624a9c7) /* 0.383950977 */, 13 },
+  /*  421 */  { MAD_F(0x0629a863) /* 0.385170352 */, 13 },
+  /*  422 */  { MAD_F(0x062ea802) /* 0.386390694 */, 13 },
+  /*  423 */  { MAD_F(0x0633a8a3) /* 0.387611999 */, 13 },
+  /*  424 */  { MAD_F(0x0638aa48) /* 0.388834268 */, 13 },
+  /*  425 */  { MAD_F(0x063dacee) /* 0.390057497 */, 13 },
+  /*  426 */  { MAD_F(0x0642b096) /* 0.391281687 */, 13 },
+  /*  427 */  { MAD_F(0x0647b53f) /* 0.392506834 */, 13 },
+  /*  428 */  { MAD_F(0x064cbae9) /* 0.393732939 */, 13 },
+  /*  429 */  { MAD_F(0x0651c193) /* 0.394959999 */, 13 },
+  /*  430 */  { MAD_F(0x0656c93d) /* 0.396188012 */, 13 },
+  /*  431 */  { MAD_F(0x065bd1e7) /* 0.397416978 */, 13 },
+
+  /*  432 */  { MAD_F(0x0660db91) /* 0.398646895 */, 13 },
+  /*  433 */  { MAD_F(0x0665e639) /* 0.399877761 */, 13 },
+  /*  434 */  { MAD_F(0x066af1df) /* 0.401109575 */, 13 },
+  /*  435 */  { MAD_F(0x066ffe84) /* 0.402342335 */, 13 },
+  /*  436 */  { MAD_F(0x06750c26) /* 0.403576041 */, 13 },
+  /*  437 */  { MAD_F(0x067a1ac6) /* 0.404810690 */, 13 },
+  /*  438 */  { MAD_F(0x067f2a62) /* 0.406046281 */, 13 },
+  /*  439 */  { MAD_F(0x06843afb) /* 0.407282813 */, 13 },
+  /*  440 */  { MAD_F(0x06894c90) /* 0.408520284 */, 13 },
+  /*  441 */  { MAD_F(0x068e5f21) /* 0.409758693 */, 13 },
+  /*  442 */  { MAD_F(0x069372ae) /* 0.410998038 */, 13 },
+  /*  443 */  { MAD_F(0x06988735) /* 0.412238319 */, 13 },
+  /*  444 */  { MAD_F(0x069d9cb7) /* 0.413479532 */, 13 },
+  /*  445 */  { MAD_F(0x06a2b333) /* 0.414721679 */, 13 },
+  /*  446 */  { MAD_F(0x06a7caa9) /* 0.415964756 */, 13 },
+  /*  447 */  { MAD_F(0x06ace318) /* 0.417208762 */, 13 },
+
+  /*  448 */  { MAD_F(0x06b1fc81) /* 0.418453696 */, 13 },
+  /*  449 */  { MAD_F(0x06b716e2) /* 0.419699557 */, 13 },
+  /*  450 */  { MAD_F(0x06bc323b) /* 0.420946343 */, 13 },
+  /*  451 */  { MAD_F(0x06c14e8d) /* 0.422194054 */, 13 },
+  /*  452 */  { MAD_F(0x06c66bd6) /* 0.423442686 */, 13 },
+  /*  453 */  { MAD_F(0x06cb8a17) /* 0.424692240 */, 13 },
+  /*  454 */  { MAD_F(0x06d0a94e) /* 0.425942714 */, 13 },
+  /*  455 */  { MAD_F(0x06d5c97c) /* 0.427194106 */, 13 },
+  /*  456 */  { MAD_F(0x06daeaa1) /* 0.428446415 */, 13 },
+  /*  457 */  { MAD_F(0x06e00cbb) /* 0.429699640 */, 13 },
+  /*  458 */  { MAD_F(0x06e52fca) /* 0.430953779 */, 13 },
+  /*  459 */  { MAD_F(0x06ea53cf) /* 0.432208832 */, 13 },
+  /*  460 */  { MAD_F(0x06ef78c8) /* 0.433464796 */, 13 },
+  /*  461 */  { MAD_F(0x06f49eb6) /* 0.434721671 */, 13 },
+  /*  462 */  { MAD_F(0x06f9c597) /* 0.435979455 */, 13 },
+  /*  463 */  { MAD_F(0x06feed6d) /* 0.437238146 */, 13 },
+
+  /*  464 */  { MAD_F(0x07041636) /* 0.438497744 */, 13 },
+  /*  465 */  { MAD_F(0x07093ff2) /* 0.439758248 */, 13 },
+  /*  466 */  { MAD_F(0x070e6aa0) /* 0.441019655 */, 13 },
+  /*  467 */  { MAD_F(0x07139641) /* 0.442281965 */, 13 },
+  /*  468 */  { MAD_F(0x0718c2d3) /* 0.443545176 */, 13 },
+  /*  469 */  { MAD_F(0x071df058) /* 0.444809288 */, 13 },
+  /*  470 */  { MAD_F(0x07231ecd) /* 0.446074298 */, 13 },
+  /*  471 */  { MAD_F(0x07284e34) /* 0.447340205 */, 13 },
+  /*  472 */  { MAD_F(0x072d7e8b) /* 0.448607009 */, 13 },
+  /*  473 */  { MAD_F(0x0732afd2) /* 0.449874708 */, 13 },
+  /*  474 */  { MAD_F(0x0737e209) /* 0.451143300 */, 13 },
+  /*  475 */  { MAD_F(0x073d1530) /* 0.452412785 */, 13 },
+  /*  476 */  { MAD_F(0x07424946) /* 0.453683161 */, 13 },
+  /*  477 */  { MAD_F(0x07477e4b) /* 0.454954427 */, 13 },
+  /*  478 */  { MAD_F(0x074cb43e) /* 0.456226581 */, 13 },
+  /*  479 */  { MAD_F(0x0751eb20) /* 0.457499623 */, 13 },
+
+  /*  480 */  { MAD_F(0x075722ef) /* 0.458773552 */, 13 },
+  /*  481 */  { MAD_F(0x075c5bac) /* 0.460048365 */, 13 },
+  /*  482 */  { MAD_F(0x07619557) /* 0.461324062 */, 13 },
+  /*  483 */  { MAD_F(0x0766cfee) /* 0.462600642 */, 13 },
+  /*  484 */  { MAD_F(0x076c0b72) /* 0.463878102 */, 13 },
+  /*  485 */  { MAD_F(0x077147e2) /* 0.465156443 */, 13 },
+  /*  486 */  { MAD_F(0x0776853e) /* 0.466435663 */, 13 },
+  /*  487 */  { MAD_F(0x077bc385) /* 0.467715761 */, 13 },
+  /*  488 */  { MAD_F(0x078102b8) /* 0.468996735 */, 13 },
+  /*  489 */  { MAD_F(0x078642d6) /* 0.470278584 */, 13 },
+  /*  490 */  { MAD_F(0x078b83de) /* 0.471561307 */, 13 },
+  /*  491 */  { MAD_F(0x0790c5d1) /* 0.472844904 */, 13 },
+  /*  492 */  { MAD_F(0x079608ae) /* 0.474129372 */, 13 },
+  /*  493 */  { MAD_F(0x079b4c74) /* 0.475414710 */, 13 },
+  /*  494 */  { MAD_F(0x07a09124) /* 0.476700918 */, 13 },
+  /*  495 */  { MAD_F(0x07a5d6bd) /* 0.477987994 */, 13 },
+
+  /*  496 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */, 13 },
+  /*  497 */  { MAD_F(0x07b064a8) /* 0.480564746 */, 13 },
+  /*  498 */  { MAD_F(0x07b5acfb) /* 0.481854420 */, 13 },
+  /*  499 */  { MAD_F(0x07baf635) /* 0.483144957 */, 13 },
+  /*  500 */  { MAD_F(0x07c04056) /* 0.484436356 */, 13 },
+  /*  501 */  { MAD_F(0x07c58b5f) /* 0.485728617 */, 13 },
+  /*  502 */  { MAD_F(0x07cad74e) /* 0.487021738 */, 13 },
+  /*  503 */  { MAD_F(0x07d02424) /* 0.488315717 */, 13 },
+  /*  504 */  { MAD_F(0x07d571e0) /* 0.489610555 */, 13 },
+  /*  505 */  { MAD_F(0x07dac083) /* 0.490906249 */, 13 },
+  /*  506 */  { MAD_F(0x07e0100a) /* 0.492202799 */, 13 },
+  /*  507 */  { MAD_F(0x07e56078) /* 0.493500203 */, 13 },
+  /*  508 */  { MAD_F(0x07eab1ca) /* 0.494798460 */, 13 },
+  /*  509 */  { MAD_F(0x07f00401) /* 0.496097570 */, 13 },
+  /*  510 */  { MAD_F(0x07f5571d) /* 0.497397530 */, 13 },
+  /*  511 */  { MAD_F(0x07faab1c) /* 0.498698341 */, 13 },
+
+  /*  512 */  { MAD_F(0x04000000) /* 0.250000000 */, 14 },
+  /*  513 */  { MAD_F(0x0402aae3) /* 0.250651254 */, 14 },
+  /*  514 */  { MAD_F(0x04055638) /* 0.251302930 */, 14 },
+  /*  515 */  { MAD_F(0x040801ff) /* 0.251955030 */, 14 },
+  /*  516 */  { MAD_F(0x040aae37) /* 0.252607552 */, 14 },
+  /*  517 */  { MAD_F(0x040d5ae0) /* 0.253260495 */, 14 },
+  /*  518 */  { MAD_F(0x041007fa) /* 0.253913860 */, 14 },
+  /*  519 */  { MAD_F(0x0412b586) /* 0.254567645 */, 14 },
+  /*  520 */  { MAD_F(0x04156381) /* 0.255221850 */, 14 },
+  /*  521 */  { MAD_F(0x041811ee) /* 0.255876475 */, 14 },
+  /*  522 */  { MAD_F(0x041ac0cb) /* 0.256531518 */, 14 },
+  /*  523 */  { MAD_F(0x041d7018) /* 0.257186980 */, 14 },
+  /*  524 */  { MAD_F(0x04201fd5) /* 0.257842860 */, 14 },
+  /*  525 */  { MAD_F(0x0422d003) /* 0.258499157 */, 14 },
+  /*  526 */  { MAD_F(0x042580a0) /* 0.259155872 */, 14 },
+  /*  527 */  { MAD_F(0x042831ad) /* 0.259813002 */, 14 },
+
+  /*  528 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 14 },
+  /*  529 */  { MAD_F(0x042d9516) /* 0.261128510 */, 14 },
+  /*  530 */  { MAD_F(0x04304772) /* 0.261786886 */, 14 },
+  /*  531 */  { MAD_F(0x0432fa3d) /* 0.262445676 */, 14 },
+  /*  532 */  { MAD_F(0x0435ad76) /* 0.263104880 */, 14 },
+  /*  533 */  { MAD_F(0x0438611f) /* 0.263764497 */, 14 },
+  /*  534 */  { MAD_F(0x043b1536) /* 0.264424527 */, 14 },
+  /*  535 */  { MAD_F(0x043dc9bc) /* 0.265084969 */, 14 },
+  /*  536 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 14 },
+  /*  537 */  { MAD_F(0x04433414) /* 0.266407088 */, 14 },
+  /*  538 */  { MAD_F(0x0445e9e5) /* 0.267068763 */, 14 },
+  /*  539 */  { MAD_F(0x0448a024) /* 0.267730848 */, 14 },
+  /*  540 */  { MAD_F(0x044b56d1) /* 0.268393343 */, 14 },
+  /*  541 */  { MAD_F(0x044e0dec) /* 0.269056248 */, 14 },
+  /*  542 */  { MAD_F(0x0450c575) /* 0.269719560 */, 14 },
+  /*  543 */  { MAD_F(0x04537d6b) /* 0.270383281 */, 14 },
+
+  /*  544 */  { MAD_F(0x045635cf) /* 0.271047409 */, 14 },
+  /*  545 */  { MAD_F(0x0458ee9f) /* 0.271711944 */, 14 },
+  /*  546 */  { MAD_F(0x045ba7dd) /* 0.272376886 */, 14 },
+  /*  547 */  { MAD_F(0x045e6188) /* 0.273042234 */, 14 },
+  /*  548 */  { MAD_F(0x04611ba0) /* 0.273707988 */, 14 },
+  /*  549 */  { MAD_F(0x0463d625) /* 0.274374147 */, 14 },
+  /*  550 */  { MAD_F(0x04669116) /* 0.275040710 */, 14 },
+  /*  551 */  { MAD_F(0x04694c74) /* 0.275707677 */, 14 },
+  /*  552 */  { MAD_F(0x046c083e) /* 0.276375048 */, 14 },
+  /*  553 */  { MAD_F(0x046ec474) /* 0.277042822 */, 14 },
+  /*  554 */  { MAD_F(0x04718116) /* 0.277710999 */, 14 },
+  /*  555 */  { MAD_F(0x04743e25) /* 0.278379578 */, 14 },
+  /*  556 */  { MAD_F(0x0476fb9f) /* 0.279048558 */, 14 },
+  /*  557 */  { MAD_F(0x0479b984) /* 0.279717940 */, 14 },
+  /*  558 */  { MAD_F(0x047c77d6) /* 0.280387722 */, 14 },
+  /*  559 */  { MAD_F(0x047f3693) /* 0.281057905 */, 14 },
+
+  /*  560 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 14 },
+  /*  561 */  { MAD_F(0x0484b54e) /* 0.282399469 */, 14 },
+  /*  562 */  { MAD_F(0x0487754c) /* 0.283070849 */, 14 },
+  /*  563 */  { MAD_F(0x048a35b6) /* 0.283742628 */, 14 },
+  /*  564 */  { MAD_F(0x048cf68a) /* 0.284414805 */, 14 },
+  /*  565 */  { MAD_F(0x048fb7c8) /* 0.285087379 */, 14 },
+  /*  566 */  { MAD_F(0x04927972) /* 0.285760350 */, 14 },
+  /*  567 */  { MAD_F(0x04953b85) /* 0.286433717 */, 14 },
+  /*  568 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 14 },
+  /*  569 */  { MAD_F(0x049ac0eb) /* 0.287781640 */, 14 },
+  /*  570 */  { MAD_F(0x049d843e) /* 0.288456194 */, 14 },
+  /*  571 */  { MAD_F(0x04a047fa) /* 0.289131142 */, 14 },
+  /*  572 */  { MAD_F(0x04a30c20) /* 0.289806485 */, 14 },
+  /*  573 */  { MAD_F(0x04a5d0af) /* 0.290482221 */, 14 },
+  /*  574 */  { MAD_F(0x04a895a8) /* 0.291158351 */, 14 },
+  /*  575 */  { MAD_F(0x04ab5b0b) /* 0.291834873 */, 14 },
+
+  /*  576 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 14 },
+  /*  577 */  { MAD_F(0x04b0e70c) /* 0.293189094 */, 14 },
+  /*  578 */  { MAD_F(0x04b3adaa) /* 0.293866792 */, 14 },
+  /*  579 */  { MAD_F(0x04b674b1) /* 0.294544881 */, 14 },
+  /*  580 */  { MAD_F(0x04b93c21) /* 0.295223360 */, 14 },
+  /*  581 */  { MAD_F(0x04bc03fa) /* 0.295902229 */, 14 },
+  /*  582 */  { MAD_F(0x04becc3b) /* 0.296581488 */, 14 },
+  /*  583 */  { MAD_F(0x04c194e4) /* 0.297261136 */, 14 },
+  /*  584 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 14 },
+  /*  585 */  { MAD_F(0x04c72771) /* 0.298621598 */, 14 },
+  /*  586 */  { MAD_F(0x04c9f153) /* 0.299302411 */, 14 },
+  /*  587 */  { MAD_F(0x04ccbb9d) /* 0.299983611 */, 14 },
+  /*  588 */  { MAD_F(0x04cf864f) /* 0.300665198 */, 14 },
+  /*  589 */  { MAD_F(0x04d25169) /* 0.301347172 */, 14 },
+  /*  590 */  { MAD_F(0x04d51ceb) /* 0.302029532 */, 14 },
+  /*  591 */  { MAD_F(0x04d7e8d4) /* 0.302712277 */, 14 },
+
+  /*  592 */  { MAD_F(0x04dab524) /* 0.303395408 */, 14 },
+  /*  593 */  { MAD_F(0x04dd81dc) /* 0.304078923 */, 14 },
+  /*  594 */  { MAD_F(0x04e04efb) /* 0.304762823 */, 14 },
+  /*  595 */  { MAD_F(0x04e31c81) /* 0.305447106 */, 14 },
+  /*  596 */  { MAD_F(0x04e5ea6e) /* 0.306131773 */, 14 },
+  /*  597 */  { MAD_F(0x04e8b8c2) /* 0.306816823 */, 14 },
+  /*  598 */  { MAD_F(0x04eb877c) /* 0.307502256 */, 14 },
+  /*  599 */  { MAD_F(0x04ee569d) /* 0.308188071 */, 14 },
+  /*  600 */  { MAD_F(0x04f12624) /* 0.308874267 */, 14 },
+  /*  601 */  { MAD_F(0x04f3f612) /* 0.309560845 */, 14 },
+  /*  602 */  { MAD_F(0x04f6c666) /* 0.310247804 */, 14 },
+  /*  603 */  { MAD_F(0x04f99721) /* 0.310935143 */, 14 },
+  /*  604 */  { MAD_F(0x04fc6841) /* 0.311622862 */, 14 },
+  /*  605 */  { MAD_F(0x04ff39c7) /* 0.312310961 */, 14 },
+  /*  606 */  { MAD_F(0x05020bb3) /* 0.312999439 */, 14 },
+  /*  607 */  { MAD_F(0x0504de05) /* 0.313688296 */, 14 },
+
+  /*  608 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 14 },
+  /*  609 */  { MAD_F(0x050a83d8) /* 0.315067145 */, 14 },
+  /*  610 */  { MAD_F(0x050d575b) /* 0.315757136 */, 14 },
+  /*  611 */  { MAD_F(0x05102b42) /* 0.316447504 */, 14 },
+  /*  612 */  { MAD_F(0x0512ff8e) /* 0.317138249 */, 14 },
+  /*  613 */  { MAD_F(0x0515d440) /* 0.317829370 */, 14 },
+  /*  614 */  { MAD_F(0x0518a956) /* 0.318520867 */, 14 },
+  /*  615 */  { MAD_F(0x051b7ed1) /* 0.319212739 */, 14 },
+  /*  616 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 14 },
+  /*  617 */  { MAD_F(0x05212af5) /* 0.320597609 */, 14 },
+  /*  618 */  { MAD_F(0x0524019e) /* 0.321290606 */, 14 },
+  /*  619 */  { MAD_F(0x0526d8ab) /* 0.321983976 */, 14 },
+  /*  620 */  { MAD_F(0x0529b01d) /* 0.322677720 */, 14 },
+  /*  621 */  { MAD_F(0x052c87f2) /* 0.323371837 */, 14 },
+  /*  622 */  { MAD_F(0x052f602c) /* 0.324066327 */, 14 },
+  /*  623 */  { MAD_F(0x053238ca) /* 0.324761189 */, 14 },
+
+  /*  624 */  { MAD_F(0x053511cb) /* 0.325456423 */, 14 },
+  /*  625 */  { MAD_F(0x0537eb30) /* 0.326152028 */, 14 },
+  /*  626 */  { MAD_F(0x053ac4f9) /* 0.326848005 */, 14 },
+  /*  627 */  { MAD_F(0x053d9f25) /* 0.327544352 */, 14 },
+  /*  628 */  { MAD_F(0x054079b5) /* 0.328241070 */, 14 },
+  /*  629 */  { MAD_F(0x054354a8) /* 0.328938157 */, 14 },
+  /*  630 */  { MAD_F(0x05462ffe) /* 0.329635614 */, 14 },
+  /*  631 */  { MAD_F(0x05490bb7) /* 0.330333440 */, 14 },
+  /*  632 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 14 },
+  /*  633 */  { MAD_F(0x054ec453) /* 0.331730198 */, 14 },
+  /*  634 */  { MAD_F(0x0551a134) /* 0.332429129 */, 14 },
+  /*  635 */  { MAD_F(0x05547e79) /* 0.333128427 */, 14 },
+  /*  636 */  { MAD_F(0x05575c20) /* 0.333828093 */, 14 },
+  /*  637 */  { MAD_F(0x055a3a2a) /* 0.334528126 */, 14 },
+  /*  638 */  { MAD_F(0x055d1896) /* 0.335228525 */, 14 },
+  /*  639 */  { MAD_F(0x055ff764) /* 0.335929290 */, 14 },
+
+  /*  640 */  { MAD_F(0x0562d694) /* 0.336630420 */, 14 },
+  /*  641 */  { MAD_F(0x0565b627) /* 0.337331916 */, 14 },
+  /*  642 */  { MAD_F(0x0568961b) /* 0.338033777 */, 14 },
+  /*  643 */  { MAD_F(0x056b7671) /* 0.338736002 */, 14 },
+  /*  644 */  { MAD_F(0x056e5729) /* 0.339438592 */, 14 },
+  /*  645 */  { MAD_F(0x05713843) /* 0.340141545 */, 14 },
+  /*  646 */  { MAD_F(0x057419be) /* 0.340844862 */, 14 },
+  /*  647 */  { MAD_F(0x0576fb9a) /* 0.341548541 */, 14 },
+  /*  648 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 14 },
+  /*  649 */  { MAD_F(0x057cc077) /* 0.342956988 */, 14 },
+  /*  650 */  { MAD_F(0x057fa378) /* 0.343661754 */, 14 },
+  /*  651 */  { MAD_F(0x058286d9) /* 0.344366882 */, 14 },
+  /*  652 */  { MAD_F(0x05856a9b) /* 0.345072371 */, 14 },
+  /*  653 */  { MAD_F(0x05884ebe) /* 0.345778221 */, 14 },
+  /*  654 */  { MAD_F(0x058b3342) /* 0.346484431 */, 14 },
+  /*  655 */  { MAD_F(0x058e1827) /* 0.347191002 */, 14 },
+
+  /*  656 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 14 },
+  /*  657 */  { MAD_F(0x0593e311) /* 0.348605221 */, 14 },
+  /*  658 */  { MAD_F(0x0596c917) /* 0.349312869 */, 14 },
+  /*  659 */  { MAD_F(0x0599af7d) /* 0.350020876 */, 14 },
+  /*  660 */  { MAD_F(0x059c9643) /* 0.350729240 */, 14 },
+  /*  661 */  { MAD_F(0x059f7d6a) /* 0.351437963 */, 14 },
+  /*  662 */  { MAD_F(0x05a264f0) /* 0.352147044 */, 14 },
+  /*  663 */  { MAD_F(0x05a54cd6) /* 0.352856481 */, 14 },
+  /*  664 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 14 },
+  /*  665 */  { MAD_F(0x05ab1dc2) /* 0.354276426 */, 14 },
+  /*  666 */  { MAD_F(0x05ae06c7) /* 0.354986932 */, 14 },
+  /*  667 */  { MAD_F(0x05b0f02b) /* 0.355697795 */, 14 },
+  /*  668 */  { MAD_F(0x05b3d9f0) /* 0.356409012 */, 14 },
+  /*  669 */  { MAD_F(0x05b6c413) /* 0.357120585 */, 14 },
+  /*  670 */  { MAD_F(0x05b9ae95) /* 0.357832512 */, 14 },
+  /*  671 */  { MAD_F(0x05bc9977) /* 0.358544794 */, 14 },
+
+  /*  672 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 14 },
+  /*  673 */  { MAD_F(0x05c27057) /* 0.359970419 */, 14 },
+  /*  674 */  { MAD_F(0x05c55c56) /* 0.360683761 */, 14 },
+  /*  675 */  { MAD_F(0x05c848b3) /* 0.361397456 */, 14 },
+  /*  676 */  { MAD_F(0x05cb356e) /* 0.362111504 */, 14 },
+  /*  677 */  { MAD_F(0x05ce2289) /* 0.362825904 */, 14 },
+  /*  678 */  { MAD_F(0x05d11001) /* 0.363540655 */, 14 },
+  /*  679 */  { MAD_F(0x05d3fdd8) /* 0.364255759 */, 14 },
+  /*  680 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 14 },
+  /*  681 */  { MAD_F(0x05d9daa1) /* 0.365687018 */, 14 },
+  /*  682 */  { MAD_F(0x05dcc993) /* 0.366403174 */, 14 },
+  /*  683 */  { MAD_F(0x05dfb8e2) /* 0.367119680 */, 14 },
+  /*  684 */  { MAD_F(0x05e2a890) /* 0.367836535 */, 14 },
+  /*  685 */  { MAD_F(0x05e5989b) /* 0.368553740 */, 14 },
+  /*  686 */  { MAD_F(0x05e88904) /* 0.369271294 */, 14 },
+  /*  687 */  { MAD_F(0x05eb79cb) /* 0.369989197 */, 14 },
+
+  /*  688 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 14 },
+  /*  689 */  { MAD_F(0x05f15c70) /* 0.371426047 */, 14 },
+  /*  690 */  { MAD_F(0x05f44e4f) /* 0.372144994 */, 14 },
+  /*  691 */  { MAD_F(0x05f7408b) /* 0.372864289 */, 14 },
+  /*  692 */  { MAD_F(0x05fa3324) /* 0.373583930 */, 14 },
+  /*  693 */  { MAD_F(0x05fd261b) /* 0.374303918 */, 14 },
+  /*  694 */  { MAD_F(0x0600196e) /* 0.375024253 */, 14 },
+  /*  695 */  { MAD_F(0x06030d1e) /* 0.375744934 */, 14 },
+  /*  696 */  { MAD_F(0x0606012b) /* 0.376465960 */, 14 },
+  /*  697 */  { MAD_F(0x0608f595) /* 0.377187332 */, 14 },
+  /*  698 */  { MAD_F(0x060bea5c) /* 0.377909049 */, 14 },
+  /*  699 */  { MAD_F(0x060edf7f) /* 0.378631110 */, 14 },
+  /*  700 */  { MAD_F(0x0611d4fe) /* 0.379353516 */, 14 },
+  /*  701 */  { MAD_F(0x0614cada) /* 0.380076266 */, 14 },
+  /*  702 */  { MAD_F(0x0617c112) /* 0.380799360 */, 14 },
+  /*  703 */  { MAD_F(0x061ab7a6) /* 0.381522798 */, 14 },
+
+  /*  704 */  { MAD_F(0x061dae96) /* 0.382246578 */, 14 },
+  /*  705 */  { MAD_F(0x0620a5e3) /* 0.382970701 */, 14 },
+  /*  706 */  { MAD_F(0x06239d8b) /* 0.383695167 */, 14 },
+  /*  707 */  { MAD_F(0x0626958f) /* 0.384419975 */, 14 },
+  /*  708 */  { MAD_F(0x06298def) /* 0.385145124 */, 14 },
+  /*  709 */  { MAD_F(0x062c86aa) /* 0.385870615 */, 14 },
+  /*  710 */  { MAD_F(0x062f7fc1) /* 0.386596448 */, 14 },
+  /*  711 */  { MAD_F(0x06327934) /* 0.387322621 */, 14 },
+  /*  712 */  { MAD_F(0x06357302) /* 0.388049134 */, 14 },
+  /*  713 */  { MAD_F(0x06386d2b) /* 0.388775988 */, 14 },
+  /*  714 */  { MAD_F(0x063b67b0) /* 0.389503182 */, 14 },
+  /*  715 */  { MAD_F(0x063e6290) /* 0.390230715 */, 14 },
+  /*  716 */  { MAD_F(0x06415dcb) /* 0.390958588 */, 14 },
+  /*  717 */  { MAD_F(0x06445960) /* 0.391686799 */, 14 },
+  /*  718 */  { MAD_F(0x06475551) /* 0.392415349 */, 14 },
+  /*  719 */  { MAD_F(0x064a519c) /* 0.393144238 */, 14 },
+
+  /*  720 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 14 },
+  /*  721 */  { MAD_F(0x06504b44) /* 0.394603028 */, 14 },
+  /*  722 */  { MAD_F(0x0653489f) /* 0.395332930 */, 14 },
+  /*  723 */  { MAD_F(0x06564655) /* 0.396063168 */, 14 },
+  /*  724 */  { MAD_F(0x06594465) /* 0.396793743 */, 14 },
+  /*  725 */  { MAD_F(0x065c42d0) /* 0.397524655 */, 14 },
+  /*  726 */  { MAD_F(0x065f4195) /* 0.398255903 */, 14 },
+  /*  727 */  { MAD_F(0x066240b4) /* 0.398987487 */, 14 },
+  /*  728 */  { MAD_F(0x0665402d) /* 0.399719406 */, 14 },
+  /*  729 */  { MAD_F(0x06684000) /* 0.400451660 */, 14 },
+  /*  730 */  { MAD_F(0x066b402d) /* 0.401184249 */, 14 },
+  /*  731 */  { MAD_F(0x066e40b3) /* 0.401917173 */, 14 },
+  /*  732 */  { MAD_F(0x06714194) /* 0.402650431 */, 14 },
+  /*  733 */  { MAD_F(0x067442ce) /* 0.403384024 */, 14 },
+  /*  734 */  { MAD_F(0x06774462) /* 0.404117949 */, 14 },
+  /*  735 */  { MAD_F(0x067a464f) /* 0.404852209 */, 14 },
+
+  /*  736 */  { MAD_F(0x067d4896) /* 0.405586801 */, 14 },
+  /*  737 */  { MAD_F(0x06804b36) /* 0.406321726 */, 14 },
+  /*  738 */  { MAD_F(0x06834e2f) /* 0.407056983 */, 14 },
+  /*  739 */  { MAD_F(0x06865181) /* 0.407792573 */, 14 },
+  /*  740 */  { MAD_F(0x0689552c) /* 0.408528495 */, 14 },
+  /*  741 */  { MAD_F(0x068c5931) /* 0.409264748 */, 14 },
+  /*  742 */  { MAD_F(0x068f5d8e) /* 0.410001332 */, 14 },
+  /*  743 */  { MAD_F(0x06926245) /* 0.410738247 */, 14 },
+  /*  744 */  { MAD_F(0x06956753) /* 0.411475493 */, 14 },
+  /*  745 */  { MAD_F(0x06986cbb) /* 0.412213070 */, 14 },
+  /*  746 */  { MAD_F(0x069b727b) /* 0.412950976 */, 14 },
+  /*  747 */  { MAD_F(0x069e7894) /* 0.413689213 */, 14 },
+  /*  748 */  { MAD_F(0x06a17f05) /* 0.414427779 */, 14 },
+  /*  749 */  { MAD_F(0x06a485cf) /* 0.415166674 */, 14 },
+  /*  750 */  { MAD_F(0x06a78cf1) /* 0.415905897 */, 14 },
+  /*  751 */  { MAD_F(0x06aa946b) /* 0.416645450 */, 14 },
+
+  /*  752 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 14 },
+  /*  753 */  { MAD_F(0x06b0a468) /* 0.418125540 */, 14 },
+  /*  754 */  { MAD_F(0x06b3acea) /* 0.418866076 */, 14 },
+  /*  755 */  { MAD_F(0x06b6b5c4) /* 0.419606940 */, 14 },
+  /*  756 */  { MAD_F(0x06b9bef6) /* 0.420348132 */, 14 },
+  /*  757 */  { MAD_F(0x06bcc880) /* 0.421089650 */, 14 },
+  /*  758 */  { MAD_F(0x06bfd261) /* 0.421831494 */, 14 },
+  /*  759 */  { MAD_F(0x06c2dc9a) /* 0.422573665 */, 14 },
+  /*  760 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 14 },
+  /*  761 */  { MAD_F(0x06c8f213) /* 0.424058985 */, 14 },
+  /*  762 */  { MAD_F(0x06cbfd52) /* 0.424802133 */, 14 },
+  /*  763 */  { MAD_F(0x06cf08e9) /* 0.425545607 */, 14 },
+  /*  764 */  { MAD_F(0x06d214d7) /* 0.426289405 */, 14 },
+  /*  765 */  { MAD_F(0x06d5211c) /* 0.427033528 */, 14 },
+  /*  766 */  { MAD_F(0x06d82db8) /* 0.427777975 */, 14 },
+  /*  767 */  { MAD_F(0x06db3aaa) /* 0.428522746 */, 14 },
+
+  /*  768 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 14 },
+  /*  769 */  { MAD_F(0x06e15595) /* 0.430013259 */, 14 },
+  /*  770 */  { MAD_F(0x06e4638d) /* 0.430759001 */, 14 },
+  /*  771 */  { MAD_F(0x06e771db) /* 0.431505065 */, 14 },
+  /*  772 */  { MAD_F(0x06ea807f) /* 0.432251452 */, 14 },
+  /*  773 */  { MAD_F(0x06ed8f7b) /* 0.432998162 */, 14 },
+  /*  774 */  { MAD_F(0x06f09ecc) /* 0.433745193 */, 14 },
+  /*  775 */  { MAD_F(0x06f3ae75) /* 0.434492546 */, 14 },
+  /*  776 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 14 },
+  /*  777 */  { MAD_F(0x06f9cec8) /* 0.435988217 */, 14 },
+  /*  778 */  { MAD_F(0x06fcdf72) /* 0.436736534 */, 14 },
+  /*  779 */  { MAD_F(0x06fff073) /* 0.437485172 */, 14 },
+  /*  780 */  { MAD_F(0x070301ca) /* 0.438234130 */, 14 },
+  /*  781 */  { MAD_F(0x07061377) /* 0.438983408 */, 14 },
+  /*  782 */  { MAD_F(0x0709257a) /* 0.439733006 */, 14 },
+  /*  783 */  { MAD_F(0x070c37d2) /* 0.440482924 */, 14 },
+
+  /*  784 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 14 },
+  /*  785 */  { MAD_F(0x07125d84) /* 0.441983717 */, 14 },
+  /*  786 */  { MAD_F(0x071570de) /* 0.442734592 */, 14 },
+  /*  787 */  { MAD_F(0x0718848d) /* 0.443485785 */, 14 },
+  /*  788 */  { MAD_F(0x071b9891) /* 0.444237296 */, 14 },
+  /*  789 */  { MAD_F(0x071eaceb) /* 0.444989126 */, 14 },
+  /*  790 */  { MAD_F(0x0721c19a) /* 0.445741273 */, 14 },
+  /*  791 */  { MAD_F(0x0724d69e) /* 0.446493738 */, 14 },
+  /*  792 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 14 },
+  /*  793 */  { MAD_F(0x072b01a6) /* 0.447999618 */, 14 },
+  /*  794 */  { MAD_F(0x072e17a9) /* 0.448753033 */, 14 },
+  /*  795 */  { MAD_F(0x07312e01) /* 0.449506765 */, 14 },
+  /*  796 */  { MAD_F(0x073444ae) /* 0.450260813 */, 14 },
+  /*  797 */  { MAD_F(0x07375bb0) /* 0.451015176 */, 14 },
+  /*  798 */  { MAD_F(0x073a7307) /* 0.451769856 */, 14 },
+  /*  799 */  { MAD_F(0x073d8ab2) /* 0.452524850 */, 14 },
+
+  /*  800 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 14 },
+  /*  801 */  { MAD_F(0x0743bb06) /* 0.454035784 */, 14 },
+  /*  802 */  { MAD_F(0x0746d3af) /* 0.454791723 */, 14 },
+  /*  803 */  { MAD_F(0x0749ecac) /* 0.455547976 */, 14 },
+  /*  804 */  { MAD_F(0x074d05fe) /* 0.456304543 */, 14 },
+  /*  805 */  { MAD_F(0x07501fa3) /* 0.457061423 */, 14 },
+  /*  806 */  { MAD_F(0x0753399d) /* 0.457818618 */, 14 },
+  /*  807 */  { MAD_F(0x075653eb) /* 0.458576125 */, 14 },
+  /*  808 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 14 },
+  /*  809 */  { MAD_F(0x075c8983) /* 0.460092079 */, 14 },
+  /*  810 */  { MAD_F(0x075fa4cc) /* 0.460850524 */, 14 },
+  /*  811 */  { MAD_F(0x0762c06a) /* 0.461609282 */, 14 },
+  /*  812 */  { MAD_F(0x0765dc5b) /* 0.462368352 */, 14 },
+  /*  813 */  { MAD_F(0x0768f8a0) /* 0.463127733 */, 14 },
+  /*  814 */  { MAD_F(0x076c1538) /* 0.463887426 */, 14 },
+  /*  815 */  { MAD_F(0x076f3224) /* 0.464647430 */, 14 },
+
+  /*  816 */  { MAD_F(0x07724f64) /* 0.465407744 */, 14 },
+  /*  817 */  { MAD_F(0x07756cf7) /* 0.466168370 */, 14 },
+  /*  818 */  { MAD_F(0x07788add) /* 0.466929306 */, 14 },
+  /*  819 */  { MAD_F(0x077ba916) /* 0.467690552 */, 14 },
+  /*  820 */  { MAD_F(0x077ec7a3) /* 0.468452108 */, 14 },
+  /*  821 */  { MAD_F(0x0781e683) /* 0.469213973 */, 14 },
+  /*  822 */  { MAD_F(0x078505b5) /* 0.469976148 */, 14 },
+  /*  823 */  { MAD_F(0x0788253b) /* 0.470738632 */, 14 },
+  /*  824 */  { MAD_F(0x078b4514) /* 0.471501425 */, 14 },
+  /*  825 */  { MAD_F(0x078e653f) /* 0.472264527 */, 14 },
+  /*  826 */  { MAD_F(0x079185be) /* 0.473027937 */, 14 },
+  /*  827 */  { MAD_F(0x0794a68f) /* 0.473791655 */, 14 },
+  /*  828 */  { MAD_F(0x0797c7b2) /* 0.474555681 */, 14 },
+  /*  829 */  { MAD_F(0x079ae929) /* 0.475320014 */, 14 },
+  /*  830 */  { MAD_F(0x079e0af1) /* 0.476084655 */, 14 },
+  /*  831 */  { MAD_F(0x07a12d0c) /* 0.476849603 */, 14 },
+
+  /*  832 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 14 },
+  /*  833 */  { MAD_F(0x07a7723a) /* 0.478380420 */, 14 },
+  /*  834 */  { MAD_F(0x07aa954c) /* 0.479146288 */, 14 },
+  /*  835 */  { MAD_F(0x07adb8b0) /* 0.479912463 */, 14 },
+  /*  836 */  { MAD_F(0x07b0dc67) /* 0.480678943 */, 14 },
+  /*  837 */  { MAD_F(0x07b4006f) /* 0.481445729 */, 14 },
+  /*  838 */  { MAD_F(0x07b724ca) /* 0.482212820 */, 14 },
+  /*  839 */  { MAD_F(0x07ba4976) /* 0.482980216 */, 14 },
+  /*  840 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 14 },
+  /*  841 */  { MAD_F(0x07c093c5) /* 0.484515924 */, 14 },
+  /*  842 */  { MAD_F(0x07c3b967) /* 0.485284235 */, 14 },
+  /*  843 */  { MAD_F(0x07c6df5a) /* 0.486052849 */, 14 },
+  /*  844 */  { MAD_F(0x07ca059f) /* 0.486821768 */, 14 },
+  /*  845 */  { MAD_F(0x07cd2c36) /* 0.487590991 */, 14 },
+  /*  846 */  { MAD_F(0x07d0531e) /* 0.488360517 */, 14 },
+  /*  847 */  { MAD_F(0x07d37a57) /* 0.489130346 */, 14 },
+
+  /*  848 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 14 },
+  /*  849 */  { MAD_F(0x07d9c9be) /* 0.490670914 */, 14 },
+  /*  850 */  { MAD_F(0x07dcf1ec) /* 0.491441651 */, 14 },
+  /*  851 */  { MAD_F(0x07e01a6a) /* 0.492212691 */, 14 },
+  /*  852 */  { MAD_F(0x07e3433a) /* 0.492984033 */, 14 },
+  /*  853 */  { MAD_F(0x07e66c5a) /* 0.493755677 */, 14 },
+  /*  854 */  { MAD_F(0x07e995cc) /* 0.494527623 */, 14 },
+  /*  855 */  { MAD_F(0x07ecbf8e) /* 0.495299870 */, 14 },
+  /*  856 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 14 },
+  /*  857 */  { MAD_F(0x07f31405) /* 0.496845266 */, 14 },
+  /*  858 */  { MAD_F(0x07f63eba) /* 0.497618416 */, 14 },
+  /*  859 */  { MAD_F(0x07f969c0) /* 0.498391866 */, 14 },
+  /*  860 */  { MAD_F(0x07fc9516) /* 0.499165616 */, 14 },
+  /*  861 */  { MAD_F(0x07ffc0bc) /* 0.499939666 */, 14 },
+  /*  862 */  { MAD_F(0x04017659) /* 0.250357008 */, 15 },
+  /*  863 */  { MAD_F(0x04030c7d) /* 0.250744333 */, 15 },
+
+  /*  864 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 15 },
+  /*  865 */  { MAD_F(0x0406393d) /* 0.251519431 */, 15 },
+  /*  866 */  { MAD_F(0x0407cfd9) /* 0.251907204 */, 15 },
+  /*  867 */  { MAD_F(0x0409669d) /* 0.252295127 */, 15 },
+  /*  868 */  { MAD_F(0x040afd89) /* 0.252683198 */, 15 },
+  /*  869 */  { MAD_F(0x040c949e) /* 0.253071419 */, 15 },
+  /*  870 */  { MAD_F(0x040e2bda) /* 0.253459789 */, 15 },
+  /*  871 */  { MAD_F(0x040fc33e) /* 0.253848307 */, 15 },
+  /*  872 */  { MAD_F(0x04115aca) /* 0.254236974 */, 15 },
+  /*  873 */  { MAD_F(0x0412f27e) /* 0.254625790 */, 15 },
+  /*  874 */  { MAD_F(0x04148a5a) /* 0.255014755 */, 15 },
+  /*  875 */  { MAD_F(0x0416225d) /* 0.255403867 */, 15 },
+  /*  876 */  { MAD_F(0x0417ba89) /* 0.255793128 */, 15 },
+  /*  877 */  { MAD_F(0x041952dc) /* 0.256182537 */, 15 },
+  /*  878 */  { MAD_F(0x041aeb57) /* 0.256572095 */, 15 },
+  /*  879 */  { MAD_F(0x041c83fa) /* 0.256961800 */, 15 },
+
+  /*  880 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 15 },
+  /*  881 */  { MAD_F(0x041fb5b6) /* 0.257741653 */, 15 },
+  /*  882 */  { MAD_F(0x04214ed0) /* 0.258131801 */, 15 },
+  /*  883 */  { MAD_F(0x0422e811) /* 0.258522097 */, 15 },
+  /*  884 */  { MAD_F(0x04248179) /* 0.258912540 */, 15 },
+  /*  885 */  { MAD_F(0x04261b0a) /* 0.259303130 */, 15 },
+  /*  886 */  { MAD_F(0x0427b4c2) /* 0.259693868 */, 15 },
+  /*  887 */  { MAD_F(0x04294ea1) /* 0.260084752 */, 15 },
+  /*  888 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 15 },
+  /*  889 */  { MAD_F(0x042c82d6) /* 0.260866961 */, 15 },
+  /*  890 */  { MAD_F(0x042e1d2b) /* 0.261258286 */, 15 },
+  /*  891 */  { MAD_F(0x042fb7a8) /* 0.261649758 */, 15 },
+  /*  892 */  { MAD_F(0x0431524c) /* 0.262041376 */, 15 },
+  /*  893 */  { MAD_F(0x0432ed17) /* 0.262433140 */, 15 },
+  /*  894 */  { MAD_F(0x0434880a) /* 0.262825051 */, 15 },
+  /*  895 */  { MAD_F(0x04362324) /* 0.263217107 */, 15 },
+
+  /*  896 */  { MAD_F(0x0437be65) /* 0.263609310 */, 15 },
+  /*  897 */  { MAD_F(0x043959cd) /* 0.264001659 */, 15 },
+  /*  898 */  { MAD_F(0x043af55d) /* 0.264394153 */, 15 },
+  /*  899 */  { MAD_F(0x043c9113) /* 0.264786794 */, 15 },
+  /*  900 */  { MAD_F(0x043e2cf1) /* 0.265179580 */, 15 },
+  /*  901 */  { MAD_F(0x043fc8f6) /* 0.265572511 */, 15 },
+  /*  902 */  { MAD_F(0x04416522) /* 0.265965588 */, 15 },
+  /*  903 */  { MAD_F(0x04430174) /* 0.266358810 */, 15 },
+  /*  904 */  { MAD_F(0x04449dee) /* 0.266752177 */, 15 },
+  /*  905 */  { MAD_F(0x04463a8f) /* 0.267145689 */, 15 },
+  /*  906 */  { MAD_F(0x0447d756) /* 0.267539347 */, 15 },
+  /*  907 */  { MAD_F(0x04497445) /* 0.267933149 */, 15 },
+  /*  908 */  { MAD_F(0x044b115a) /* 0.268327096 */, 15 },
+  /*  909 */  { MAD_F(0x044cae96) /* 0.268721187 */, 15 },
+  /*  910 */  { MAD_F(0x044e4bf9) /* 0.269115423 */, 15 },
+  /*  911 */  { MAD_F(0x044fe983) /* 0.269509804 */, 15 },
+
+  /*  912 */  { MAD_F(0x04518733) /* 0.269904329 */, 15 },
+  /*  913 */  { MAD_F(0x0453250a) /* 0.270298998 */, 15 },
+  /*  914 */  { MAD_F(0x0454c308) /* 0.270693811 */, 15 },
+  /*  915 */  { MAD_F(0x0456612d) /* 0.271088768 */, 15 },
+  /*  916 */  { MAD_F(0x0457ff78) /* 0.271483869 */, 15 },
+  /*  917 */  { MAD_F(0x04599dea) /* 0.271879114 */, 15 },
+  /*  918 */  { MAD_F(0x045b3c82) /* 0.272274503 */, 15 },
+  /*  919 */  { MAD_F(0x045cdb41) /* 0.272670035 */, 15 },
+  /*  920 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 15 },
+  /*  921 */  { MAD_F(0x04601932) /* 0.273461530 */, 15 },
+  /*  922 */  { MAD_F(0x0461b864) /* 0.273857492 */, 15 },
+  /*  923 */  { MAD_F(0x046357bd) /* 0.274253597 */, 15 },
+  /*  924 */  { MAD_F(0x0464f73c) /* 0.274649846 */, 15 },
+  /*  925 */  { MAD_F(0x046696e2) /* 0.275046238 */, 15 },
+  /*  926 */  { MAD_F(0x046836ae) /* 0.275442772 */, 15 },
+  /*  927 */  { MAD_F(0x0469d6a0) /* 0.275839449 */, 15 },
+
+  /*  928 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 15 },
+  /*  929 */  { MAD_F(0x046d16f7) /* 0.276633232 */, 15 },
+  /*  930 */  { MAD_F(0x046eb75c) /* 0.277030337 */, 15 },
+  /*  931 */  { MAD_F(0x047057e8) /* 0.277427584 */, 15 },
+  /*  932 */  { MAD_F(0x0471f899) /* 0.277824973 */, 15 },
+  /*  933 */  { MAD_F(0x04739971) /* 0.278222505 */, 15 },
+  /*  934 */  { MAD_F(0x04753a6f) /* 0.278620179 */, 15 },
+  /*  935 */  { MAD_F(0x0476db92) /* 0.279017995 */, 15 },
+  /*  936 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 15 },
+  /*  937 */  { MAD_F(0x047a1e4c) /* 0.279814051 */, 15 },
+  /*  938 */  { MAD_F(0x047bbfe2) /* 0.280212292 */, 15 },
+  /*  939 */  { MAD_F(0x047d619e) /* 0.280610675 */, 15 },
+  /*  940 */  { MAD_F(0x047f0380) /* 0.281009199 */, 15 },
+  /*  941 */  { MAD_F(0x0480a588) /* 0.281407864 */, 15 },
+  /*  942 */  { MAD_F(0x048247b6) /* 0.281806670 */, 15 },
+  /*  943 */  { MAD_F(0x0483ea0a) /* 0.282205618 */, 15 },
+
+  /*  944 */  { MAD_F(0x04858c83) /* 0.282604707 */, 15 },
+  /*  945 */  { MAD_F(0x04872f22) /* 0.283003936 */, 15 },
+  /*  946 */  { MAD_F(0x0488d1e8) /* 0.283403307 */, 15 },
+  /*  947 */  { MAD_F(0x048a74d3) /* 0.283802818 */, 15 },
+  /*  948 */  { MAD_F(0x048c17e3) /* 0.284202470 */, 15 },
+  /*  949 */  { MAD_F(0x048dbb1a) /* 0.284602263 */, 15 },
+  /*  950 */  { MAD_F(0x048f5e76) /* 0.285002195 */, 15 },
+  /*  951 */  { MAD_F(0x049101f8) /* 0.285402269 */, 15 },
+  /*  952 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 15 },
+  /*  953 */  { MAD_F(0x0494496c) /* 0.286202836 */, 15 },
+  /*  954 */  { MAD_F(0x0495ed5f) /* 0.286603329 */, 15 },
+  /*  955 */  { MAD_F(0x04979177) /* 0.287003963 */, 15 },
+  /*  956 */  { MAD_F(0x049935b5) /* 0.287404737 */, 15 },
+  /*  957 */  { MAD_F(0x049ada19) /* 0.287805650 */, 15 },
+  /*  958 */  { MAD_F(0x049c7ea1) /* 0.288206703 */, 15 },
+  /*  959 */  { MAD_F(0x049e2350) /* 0.288607895 */, 15 },
+
+  /*  960 */  { MAD_F(0x049fc824) /* 0.289009227 */, 15 },
+  /*  961 */  { MAD_F(0x04a16d1d) /* 0.289410699 */, 15 },
+  /*  962 */  { MAD_F(0x04a3123b) /* 0.289812309 */, 15 },
+  /*  963 */  { MAD_F(0x04a4b77f) /* 0.290214059 */, 15 },
+  /*  964 */  { MAD_F(0x04a65ce8) /* 0.290615948 */, 15 },
+  /*  965 */  { MAD_F(0x04a80277) /* 0.291017976 */, 15 },
+  /*  966 */  { MAD_F(0x04a9a82b) /* 0.291420143 */, 15 },
+  /*  967 */  { MAD_F(0x04ab4e04) /* 0.291822449 */, 15 },
+  /*  968 */  { MAD_F(0x04acf402) /* 0.292224893 */, 15 },
+  /*  969 */  { MAD_F(0x04ae9a26) /* 0.292627476 */, 15 },
+  /*  970 */  { MAD_F(0x04b0406e) /* 0.293030197 */, 15 },
+  /*  971 */  { MAD_F(0x04b1e6dc) /* 0.293433057 */, 15 },
+  /*  972 */  { MAD_F(0x04b38d6f) /* 0.293836055 */, 15 },
+  /*  973 */  { MAD_F(0x04b53427) /* 0.294239192 */, 15 },
+  /*  974 */  { MAD_F(0x04b6db05) /* 0.294642466 */, 15 },
+  /*  975 */  { MAD_F(0x04b88207) /* 0.295045879 */, 15 },
+
+  /*  976 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 15 },
+  /*  977 */  { MAD_F(0x04bbd07a) /* 0.295853118 */, 15 },
+  /*  978 */  { MAD_F(0x04bd77ec) /* 0.296256944 */, 15 },
+  /*  979 */  { MAD_F(0x04bf1f82) /* 0.296660907 */, 15 },
+  /*  980 */  { MAD_F(0x04c0c73d) /* 0.297065009 */, 15 },
+  /*  981 */  { MAD_F(0x04c26f1d) /* 0.297469248 */, 15 },
+  /*  982 */  { MAD_F(0x04c41722) /* 0.297873624 */, 15 },
+  /*  983 */  { MAD_F(0x04c5bf4c) /* 0.298278137 */, 15 },
+  /*  984 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 15 },
+  /*  985 */  { MAD_F(0x04c9100d) /* 0.299087576 */, 15 },
+  /*  986 */  { MAD_F(0x04cab8a6) /* 0.299492500 */, 15 },
+  /*  987 */  { MAD_F(0x04cc6163) /* 0.299897562 */, 15 },
+  /*  988 */  { MAD_F(0x04ce0a44) /* 0.300302761 */, 15 },
+  /*  989 */  { MAD_F(0x04cfb34b) /* 0.300708096 */, 15 },
+  /*  990 */  { MAD_F(0x04d15c76) /* 0.301113568 */, 15 },
+  /*  991 */  { MAD_F(0x04d305c5) /* 0.301519176 */, 15 },
+
+  /*  992 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 15 },
+  /*  993 */  { MAD_F(0x04d658d2) /* 0.302330802 */, 15 },
+  /*  994 */  { MAD_F(0x04d80290) /* 0.302736820 */, 15 },
+  /*  995 */  { MAD_F(0x04d9ac72) /* 0.303142973 */, 15 },
+  /*  996 */  { MAD_F(0x04db5679) /* 0.303549263 */, 15 },
+  /*  997 */  { MAD_F(0x04dd00a4) /* 0.303955689 */, 15 },
+  /*  998 */  { MAD_F(0x04deaaf3) /* 0.304362251 */, 15 },
+  /*  999 */  { MAD_F(0x04e05567) /* 0.304768948 */, 15 },
+  /* 1000 */  { MAD_F(0x04e20000) /* 0.305175781 */, 15 },
+  /* 1001 */  { MAD_F(0x04e3aabd) /* 0.305582750 */, 15 },
+  /* 1002 */  { MAD_F(0x04e5559e) /* 0.305989854 */, 15 },
+  /* 1003 */  { MAD_F(0x04e700a3) /* 0.306397094 */, 15 },
+  /* 1004 */  { MAD_F(0x04e8abcd) /* 0.306804470 */, 15 },
+  /* 1005 */  { MAD_F(0x04ea571c) /* 0.307211980 */, 15 },
+  /* 1006 */  { MAD_F(0x04ec028e) /* 0.307619626 */, 15 },
+  /* 1007 */  { MAD_F(0x04edae25) /* 0.308027406 */, 15 },
+
+  /* 1008 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 15 },
+  /* 1009 */  { MAD_F(0x04f105bf) /* 0.308843373 */, 15 },
+  /* 1010 */  { MAD_F(0x04f2b1c3) /* 0.309251558 */, 15 },
+  /* 1011 */  { MAD_F(0x04f45dea) /* 0.309659879 */, 15 },
+  /* 1012 */  { MAD_F(0x04f60a36) /* 0.310068333 */, 15 },
+  /* 1013 */  { MAD_F(0x04f7b6a6) /* 0.310476923 */, 15 },
+  /* 1014 */  { MAD_F(0x04f9633a) /* 0.310885647 */, 15 },
+  /* 1015 */  { MAD_F(0x04fb0ff2) /* 0.311294505 */, 15 },
+  /* 1016 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 15 },
+  /* 1017 */  { MAD_F(0x04fe69ce) /* 0.312112625 */, 15 },
+  /* 1018 */  { MAD_F(0x050016f3) /* 0.312521885 */, 15 },
+  /* 1019 */  { MAD_F(0x0501c43b) /* 0.312931280 */, 15 },
+  /* 1020 */  { MAD_F(0x050371a7) /* 0.313340809 */, 15 },
+  /* 1021 */  { MAD_F(0x05051f37) /* 0.313750472 */, 15 },
+  /* 1022 */  { MAD_F(0x0506cceb) /* 0.314160269 */, 15 },
+  /* 1023 */  { MAD_F(0x05087ac2) /* 0.314570199 */, 15 },
+
+  /* 1024 */  { MAD_F(0x050a28be) /* 0.314980262 */, 15 },
+  /* 1025 */  { MAD_F(0x050bd6de) /* 0.315390460 */, 15 },
+  /* 1026 */  { MAD_F(0x050d8521) /* 0.315800790 */, 15 },
+  /* 1027 */  { MAD_F(0x050f3388) /* 0.316211255 */, 15 },
+  /* 1028 */  { MAD_F(0x0510e213) /* 0.316621852 */, 15 },
+  /* 1029 */  { MAD_F(0x051290c2) /* 0.317032582 */, 15 },
+  /* 1030 */  { MAD_F(0x05143f94) /* 0.317443446 */, 15 },
+  /* 1031 */  { MAD_F(0x0515ee8a) /* 0.317854442 */, 15 },
+  /* 1032 */  { MAD_F(0x05179da4) /* 0.318265572 */, 15 },
+  /* 1033 */  { MAD_F(0x05194ce1) /* 0.318676834 */, 15 },
+  /* 1034 */  { MAD_F(0x051afc42) /* 0.319088229 */, 15 },
+  /* 1035 */  { MAD_F(0x051cabc7) /* 0.319499756 */, 15 },
+  /* 1036 */  { MAD_F(0x051e5b6f) /* 0.319911417 */, 15 },
+  /* 1037 */  { MAD_F(0x05200b3a) /* 0.320323209 */, 15 },
+  /* 1038 */  { MAD_F(0x0521bb2a) /* 0.320735134 */, 15 },
+  /* 1039 */  { MAD_F(0x05236b3d) /* 0.321147192 */, 15 },
+
+  /* 1040 */  { MAD_F(0x05251b73) /* 0.321559381 */, 15 },
+  /* 1041 */  { MAD_F(0x0526cbcd) /* 0.321971703 */, 15 },
+  /* 1042 */  { MAD_F(0x05287c4a) /* 0.322384156 */, 15 },
+  /* 1043 */  { MAD_F(0x052a2cea) /* 0.322796742 */, 15 },
+  /* 1044 */  { MAD_F(0x052bddae) /* 0.323209460 */, 15 },
+  /* 1045 */  { MAD_F(0x052d8e96) /* 0.323622309 */, 15 },
+  /* 1046 */  { MAD_F(0x052f3fa1) /* 0.324035290 */, 15 },
+  /* 1047 */  { MAD_F(0x0530f0cf) /* 0.324448403 */, 15 },
+  /* 1048 */  { MAD_F(0x0532a220) /* 0.324861647 */, 15 },
+  /* 1049 */  { MAD_F(0x05345395) /* 0.325275023 */, 15 },
+  /* 1050 */  { MAD_F(0x0536052d) /* 0.325688530 */, 15 },
+  /* 1051 */  { MAD_F(0x0537b6e8) /* 0.326102168 */, 15 },
+  /* 1052 */  { MAD_F(0x053968c6) /* 0.326515938 */, 15 },
+  /* 1053 */  { MAD_F(0x053b1ac8) /* 0.326929839 */, 15 },
+  /* 1054 */  { MAD_F(0x053ccced) /* 0.327343870 */, 15 },
+  /* 1055 */  { MAD_F(0x053e7f35) /* 0.327758033 */, 15 },
+
+  /* 1056 */  { MAD_F(0x054031a0) /* 0.328172327 */, 15 },
+  /* 1057 */  { MAD_F(0x0541e42e) /* 0.328586751 */, 15 },
+  /* 1058 */  { MAD_F(0x054396df) /* 0.329001306 */, 15 },
+  /* 1059 */  { MAD_F(0x054549b4) /* 0.329415992 */, 15 },
+  /* 1060 */  { MAD_F(0x0546fcab) /* 0.329830808 */, 15 },
+  /* 1061 */  { MAD_F(0x0548afc6) /* 0.330245755 */, 15 },
+  /* 1062 */  { MAD_F(0x054a6303) /* 0.330660832 */, 15 },
+  /* 1063 */  { MAD_F(0x054c1663) /* 0.331076039 */, 15 },
+  /* 1064 */  { MAD_F(0x054dc9e7) /* 0.331491377 */, 15 },
+  /* 1065 */  { MAD_F(0x054f7d8d) /* 0.331906845 */, 15 },
+  /* 1066 */  { MAD_F(0x05513156) /* 0.332322443 */, 15 },
+  /* 1067 */  { MAD_F(0x0552e542) /* 0.332738170 */, 15 },
+  /* 1068 */  { MAD_F(0x05549951) /* 0.333154028 */, 15 },
+  /* 1069 */  { MAD_F(0x05564d83) /* 0.333570016 */, 15 },
+  /* 1070 */  { MAD_F(0x055801d8) /* 0.333986133 */, 15 },
+  /* 1071 */  { MAD_F(0x0559b64f) /* 0.334402380 */, 15 },
+
+  /* 1072 */  { MAD_F(0x055b6ae9) /* 0.334818756 */, 15 },
+  /* 1073 */  { MAD_F(0x055d1fa6) /* 0.335235262 */, 15 },
+  /* 1074 */  { MAD_F(0x055ed486) /* 0.335651898 */, 15 },
+  /* 1075 */  { MAD_F(0x05608988) /* 0.336068662 */, 15 },
+  /* 1076 */  { MAD_F(0x05623ead) /* 0.336485556 */, 15 },
+  /* 1077 */  { MAD_F(0x0563f3f5) /* 0.336902579 */, 15 },
+  /* 1078 */  { MAD_F(0x0565a960) /* 0.337319732 */, 15 },
+  /* 1079 */  { MAD_F(0x05675eed) /* 0.337737013 */, 15 },
+  /* 1080 */  { MAD_F(0x0569149c) /* 0.338154423 */, 15 },
+  /* 1081 */  { MAD_F(0x056aca6f) /* 0.338571962 */, 15 },
+  /* 1082 */  { MAD_F(0x056c8064) /* 0.338989630 */, 15 },
+  /* 1083 */  { MAD_F(0x056e367b) /* 0.339407426 */, 15 },
+  /* 1084 */  { MAD_F(0x056fecb5) /* 0.339825351 */, 15 },
+  /* 1085 */  { MAD_F(0x0571a311) /* 0.340243405 */, 15 },
+  /* 1086 */  { MAD_F(0x05735990) /* 0.340661587 */, 15 },
+  /* 1087 */  { MAD_F(0x05751032) /* 0.341079898 */, 15 },
+
+  /* 1088 */  { MAD_F(0x0576c6f5) /* 0.341498336 */, 15 },
+  /* 1089 */  { MAD_F(0x05787ddc) /* 0.341916903 */, 15 },
+  /* 1090 */  { MAD_F(0x057a34e4) /* 0.342335598 */, 15 },
+  /* 1091 */  { MAD_F(0x057bec0f) /* 0.342754421 */, 15 },
+  /* 1092 */  { MAD_F(0x057da35d) /* 0.343173373 */, 15 },
+  /* 1093 */  { MAD_F(0x057f5acc) /* 0.343592452 */, 15 },
+  /* 1094 */  { MAD_F(0x0581125e) /* 0.344011659 */, 15 },
+  /* 1095 */  { MAD_F(0x0582ca12) /* 0.344430993 */, 15 },
+  /* 1096 */  { MAD_F(0x058481e9) /* 0.344850455 */, 15 },
+  /* 1097 */  { MAD_F(0x058639e2) /* 0.345270045 */, 15 },
+  /* 1098 */  { MAD_F(0x0587f1fd) /* 0.345689763 */, 15 },
+  /* 1099 */  { MAD_F(0x0589aa3a) /* 0.346109608 */, 15 },
+  /* 1100 */  { MAD_F(0x058b629a) /* 0.346529580 */, 15 },
+  /* 1101 */  { MAD_F(0x058d1b1b) /* 0.346949679 */, 15 },
+  /* 1102 */  { MAD_F(0x058ed3bf) /* 0.347369906 */, 15 },
+  /* 1103 */  { MAD_F(0x05908c85) /* 0.347790260 */, 15 },
+
+  /* 1104 */  { MAD_F(0x0592456d) /* 0.348210741 */, 15 },
+  /* 1105 */  { MAD_F(0x0593fe77) /* 0.348631348 */, 15 },
+  /* 1106 */  { MAD_F(0x0595b7a3) /* 0.349052083 */, 15 },
+  /* 1107 */  { MAD_F(0x059770f1) /* 0.349472945 */, 15 },
+  /* 1108 */  { MAD_F(0x05992a61) /* 0.349893933 */, 15 },
+  /* 1109 */  { MAD_F(0x059ae3f3) /* 0.350315048 */, 15 },
+  /* 1110 */  { MAD_F(0x059c9da8) /* 0.350736290 */, 15 },
+  /* 1111 */  { MAD_F(0x059e577e) /* 0.351157658 */, 15 },
+  /* 1112 */  { MAD_F(0x05a01176) /* 0.351579152 */, 15 },
+  /* 1113 */  { MAD_F(0x05a1cb90) /* 0.352000773 */, 15 },
+  /* 1114 */  { MAD_F(0x05a385cc) /* 0.352422520 */, 15 },
+  /* 1115 */  { MAD_F(0x05a5402a) /* 0.352844394 */, 15 },
+  /* 1116 */  { MAD_F(0x05a6faa9) /* 0.353266393 */, 15 },
+  /* 1117 */  { MAD_F(0x05a8b54b) /* 0.353688519 */, 15 },
+  /* 1118 */  { MAD_F(0x05aa700e) /* 0.354110771 */, 15 },
+  /* 1119 */  { MAD_F(0x05ac2af3) /* 0.354533148 */, 15 },
+
+  /* 1120 */  { MAD_F(0x05ade5fa) /* 0.354955651 */, 15 },
+  /* 1121 */  { MAD_F(0x05afa123) /* 0.355378281 */, 15 },
+  /* 1122 */  { MAD_F(0x05b15c6d) /* 0.355801035 */, 15 },
+  /* 1123 */  { MAD_F(0x05b317d9) /* 0.356223916 */, 15 },
+  /* 1124 */  { MAD_F(0x05b4d367) /* 0.356646922 */, 15 },
+  /* 1125 */  { MAD_F(0x05b68f16) /* 0.357070053 */, 15 },
+  /* 1126 */  { MAD_F(0x05b84ae7) /* 0.357493310 */, 15 },
+  /* 1127 */  { MAD_F(0x05ba06da) /* 0.357916692 */, 15 },
+  /* 1128 */  { MAD_F(0x05bbc2ef) /* 0.358340200 */, 15 },
+  /* 1129 */  { MAD_F(0x05bd7f25) /* 0.358763832 */, 15 },
+  /* 1130 */  { MAD_F(0x05bf3b7c) /* 0.359187590 */, 15 },
+  /* 1131 */  { MAD_F(0x05c0f7f5) /* 0.359611472 */, 15 },
+  /* 1132 */  { MAD_F(0x05c2b490) /* 0.360035480 */, 15 },
+  /* 1133 */  { MAD_F(0x05c4714c) /* 0.360459613 */, 15 },
+  /* 1134 */  { MAD_F(0x05c62e2a) /* 0.360883870 */, 15 },
+  /* 1135 */  { MAD_F(0x05c7eb29) /* 0.361308252 */, 15 },
+
+  /* 1136 */  { MAD_F(0x05c9a84a) /* 0.361732758 */, 15 },
+  /* 1137 */  { MAD_F(0x05cb658c) /* 0.362157390 */, 15 },
+  /* 1138 */  { MAD_F(0x05cd22ef) /* 0.362582145 */, 15 },
+  /* 1139 */  { MAD_F(0x05cee074) /* 0.363007026 */, 15 },
+  /* 1140 */  { MAD_F(0x05d09e1b) /* 0.363432030 */, 15 },
+  /* 1141 */  { MAD_F(0x05d25be2) /* 0.363857159 */, 15 },
+  /* 1142 */  { MAD_F(0x05d419cb) /* 0.364282412 */, 15 },
+  /* 1143 */  { MAD_F(0x05d5d7d5) /* 0.364707789 */, 15 },
+  /* 1144 */  { MAD_F(0x05d79601) /* 0.365133291 */, 15 },
+  /* 1145 */  { MAD_F(0x05d9544e) /* 0.365558916 */, 15 },
+  /* 1146 */  { MAD_F(0x05db12bc) /* 0.365984665 */, 15 },
+  /* 1147 */  { MAD_F(0x05dcd14c) /* 0.366410538 */, 15 },
+  /* 1148 */  { MAD_F(0x05de8ffc) /* 0.366836535 */, 15 },
+  /* 1149 */  { MAD_F(0x05e04ece) /* 0.367262655 */, 15 },
+  /* 1150 */  { MAD_F(0x05e20dc1) /* 0.367688900 */, 15 },
+  /* 1151 */  { MAD_F(0x05e3ccd5) /* 0.368115267 */, 15 },
+
+  /* 1152 */  { MAD_F(0x05e58c0b) /* 0.368541759 */, 15 },
+  /* 1153 */  { MAD_F(0x05e74b61) /* 0.368968373 */, 15 },
+  /* 1154 */  { MAD_F(0x05e90ad9) /* 0.369395111 */, 15 },
+  /* 1155 */  { MAD_F(0x05eaca72) /* 0.369821973 */, 15 },
+  /* 1156 */  { MAD_F(0x05ec8a2b) /* 0.370248957 */, 15 },
+  /* 1157 */  { MAD_F(0x05ee4a06) /* 0.370676065 */, 15 },
+  /* 1158 */  { MAD_F(0x05f00a02) /* 0.371103295 */, 15 },
+  /* 1159 */  { MAD_F(0x05f1ca1f) /* 0.371530649 */, 15 },
+  /* 1160 */  { MAD_F(0x05f38a5d) /* 0.371958126 */, 15 },
+  /* 1161 */  { MAD_F(0x05f54abc) /* 0.372385725 */, 15 },
+  /* 1162 */  { MAD_F(0x05f70b3c) /* 0.372813448 */, 15 },
+  /* 1163 */  { MAD_F(0x05f8cbdc) /* 0.373241292 */, 15 },
+  /* 1164 */  { MAD_F(0x05fa8c9e) /* 0.373669260 */, 15 },
+  /* 1165 */  { MAD_F(0x05fc4d81) /* 0.374097350 */, 15 },
+  /* 1166 */  { MAD_F(0x05fe0e84) /* 0.374525563 */, 15 },
+  /* 1167 */  { MAD_F(0x05ffcfa8) /* 0.374953898 */, 15 },
+
+  /* 1168 */  { MAD_F(0x060190ee) /* 0.375382356 */, 15 },
+  /* 1169 */  { MAD_F(0x06035254) /* 0.375810936 */, 15 },
+  /* 1170 */  { MAD_F(0x060513da) /* 0.376239638 */, 15 },
+  /* 1171 */  { MAD_F(0x0606d582) /* 0.376668462 */, 15 },
+  /* 1172 */  { MAD_F(0x0608974a) /* 0.377097408 */, 15 },
+  /* 1173 */  { MAD_F(0x060a5934) /* 0.377526476 */, 15 },
+  /* 1174 */  { MAD_F(0x060c1b3d) /* 0.377955667 */, 15 },
+  /* 1175 */  { MAD_F(0x060ddd68) /* 0.378384979 */, 15 },
+  /* 1176 */  { MAD_F(0x060f9fb3) /* 0.378814413 */, 15 },
+  /* 1177 */  { MAD_F(0x0611621f) /* 0.379243968 */, 15 },
+  /* 1178 */  { MAD_F(0x061324ac) /* 0.379673646 */, 15 },
+  /* 1179 */  { MAD_F(0x0614e759) /* 0.380103444 */, 15 },
+  /* 1180 */  { MAD_F(0x0616aa27) /* 0.380533365 */, 15 },
+  /* 1181 */  { MAD_F(0x06186d16) /* 0.380963407 */, 15 },
+  /* 1182 */  { MAD_F(0x061a3025) /* 0.381393570 */, 15 },
+  /* 1183 */  { MAD_F(0x061bf354) /* 0.381823855 */, 15 },
+
+  /* 1184 */  { MAD_F(0x061db6a5) /* 0.382254261 */, 15 },
+  /* 1185 */  { MAD_F(0x061f7a15) /* 0.382684788 */, 15 },
+  /* 1186 */  { MAD_F(0x06213da7) /* 0.383115436 */, 15 },
+  /* 1187 */  { MAD_F(0x06230158) /* 0.383546205 */, 15 },
+  /* 1188 */  { MAD_F(0x0624c52a) /* 0.383977096 */, 15 },
+  /* 1189 */  { MAD_F(0x0626891d) /* 0.384408107 */, 15 },
+  /* 1190 */  { MAD_F(0x06284d30) /* 0.384839239 */, 15 },
+  /* 1191 */  { MAD_F(0x062a1164) /* 0.385270492 */, 15 },
+  /* 1192 */  { MAD_F(0x062bd5b8) /* 0.385701865 */, 15 },
+  /* 1193 */  { MAD_F(0x062d9a2c) /* 0.386133359 */, 15 },
+  /* 1194 */  { MAD_F(0x062f5ec1) /* 0.386564974 */, 15 },
+  /* 1195 */  { MAD_F(0x06312376) /* 0.386996709 */, 15 },
+  /* 1196 */  { MAD_F(0x0632e84b) /* 0.387428565 */, 15 },
+  /* 1197 */  { MAD_F(0x0634ad41) /* 0.387860541 */, 15 },
+  /* 1198 */  { MAD_F(0x06367257) /* 0.388292637 */, 15 },
+  /* 1199 */  { MAD_F(0x0638378d) /* 0.388724854 */, 15 },
+
+  /* 1200 */  { MAD_F(0x0639fce4) /* 0.389157191 */, 15 },
+  /* 1201 */  { MAD_F(0x063bc25b) /* 0.389589648 */, 15 },
+  /* 1202 */  { MAD_F(0x063d87f2) /* 0.390022225 */, 15 },
+  /* 1203 */  { MAD_F(0x063f4da9) /* 0.390454922 */, 15 },
+  /* 1204 */  { MAD_F(0x06411380) /* 0.390887739 */, 15 },
+  /* 1205 */  { MAD_F(0x0642d978) /* 0.391320675 */, 15 },
+  /* 1206 */  { MAD_F(0x06449f8f) /* 0.391753732 */, 15 },
+  /* 1207 */  { MAD_F(0x064665c7) /* 0.392186908 */, 15 },
+  /* 1208 */  { MAD_F(0x06482c1f) /* 0.392620204 */, 15 },
+  /* 1209 */  { MAD_F(0x0649f297) /* 0.393053619 */, 15 },
+  /* 1210 */  { MAD_F(0x064bb92f) /* 0.393487154 */, 15 },
+  /* 1211 */  { MAD_F(0x064d7fe8) /* 0.393920808 */, 15 },
+  /* 1212 */  { MAD_F(0x064f46c0) /* 0.394354582 */, 15 },
+  /* 1213 */  { MAD_F(0x06510db8) /* 0.394788475 */, 15 },
+  /* 1214 */  { MAD_F(0x0652d4d0) /* 0.395222488 */, 15 },
+  /* 1215 */  { MAD_F(0x06549c09) /* 0.395656619 */, 15 },
+
+  /* 1216 */  { MAD_F(0x06566361) /* 0.396090870 */, 15 },
+  /* 1217 */  { MAD_F(0x06582ad9) /* 0.396525239 */, 15 },
+  /* 1218 */  { MAD_F(0x0659f271) /* 0.396959728 */, 15 },
+  /* 1219 */  { MAD_F(0x065bba29) /* 0.397394336 */, 15 },
+  /* 1220 */  { MAD_F(0x065d8201) /* 0.397829062 */, 15 },
+  /* 1221 */  { MAD_F(0x065f49f9) /* 0.398263907 */, 15 },
+  /* 1222 */  { MAD_F(0x06611211) /* 0.398698871 */, 15 },
+  /* 1223 */  { MAD_F(0x0662da49) /* 0.399133954 */, 15 },
+  /* 1224 */  { MAD_F(0x0664a2a0) /* 0.399569155 */, 15 },
+  /* 1225 */  { MAD_F(0x06666b17) /* 0.400004475 */, 15 },
+  /* 1226 */  { MAD_F(0x066833ae) /* 0.400439913 */, 15 },
+  /* 1227 */  { MAD_F(0x0669fc65) /* 0.400875470 */, 15 },
+  /* 1228 */  { MAD_F(0x066bc53c) /* 0.401311145 */, 15 },
+  /* 1229 */  { MAD_F(0x066d8e32) /* 0.401746938 */, 15 },
+  /* 1230 */  { MAD_F(0x066f5748) /* 0.402182850 */, 15 },
+  /* 1231 */  { MAD_F(0x0671207e) /* 0.402618879 */, 15 },
+
+  /* 1232 */  { MAD_F(0x0672e9d4) /* 0.403055027 */, 15 },
+  /* 1233 */  { MAD_F(0x0674b349) /* 0.403491293 */, 15 },
+  /* 1234 */  { MAD_F(0x06767cde) /* 0.403927676 */, 15 },
+  /* 1235 */  { MAD_F(0x06784692) /* 0.404364178 */, 15 },
+  /* 1236 */  { MAD_F(0x067a1066) /* 0.404800797 */, 15 },
+  /* 1237 */  { MAD_F(0x067bda5a) /* 0.405237535 */, 15 },
+  /* 1238 */  { MAD_F(0x067da46d) /* 0.405674390 */, 15 },
+  /* 1239 */  { MAD_F(0x067f6ea0) /* 0.406111362 */, 15 },
+  /* 1240 */  { MAD_F(0x068138f3) /* 0.406548452 */, 15 },
+  /* 1241 */  { MAD_F(0x06830365) /* 0.406985660 */, 15 },
+  /* 1242 */  { MAD_F(0x0684cdf6) /* 0.407422985 */, 15 },
+  /* 1243 */  { MAD_F(0x068698a8) /* 0.407860427 */, 15 },
+  /* 1244 */  { MAD_F(0x06886378) /* 0.408297987 */, 15 },
+  /* 1245 */  { MAD_F(0x068a2e68) /* 0.408735664 */, 15 },
+  /* 1246 */  { MAD_F(0x068bf978) /* 0.409173458 */, 15 },
+  /* 1247 */  { MAD_F(0x068dc4a7) /* 0.409611370 */, 15 },
+
+  /* 1248 */  { MAD_F(0x068f8ff5) /* 0.410049398 */, 15 },
+  /* 1249 */  { MAD_F(0x06915b63) /* 0.410487544 */, 15 },
+  /* 1250 */  { MAD_F(0x069326f0) /* 0.410925806 */, 15 },
+  /* 1251 */  { MAD_F(0x0694f29c) /* 0.411364185 */, 15 },
+  /* 1252 */  { MAD_F(0x0696be68) /* 0.411802681 */, 15 },
+  /* 1253 */  { MAD_F(0x06988a54) /* 0.412241294 */, 15 },
+  /* 1254 */  { MAD_F(0x069a565e) /* 0.412680024 */, 15 },
+  /* 1255 */  { MAD_F(0x069c2288) /* 0.413118870 */, 15 },
+  /* 1256 */  { MAD_F(0x069deed1) /* 0.413557833 */, 15 },
+  /* 1257 */  { MAD_F(0x069fbb3a) /* 0.413996912 */, 15 },
+  /* 1258 */  { MAD_F(0x06a187c1) /* 0.414436108 */, 15 },
+  /* 1259 */  { MAD_F(0x06a35468) /* 0.414875420 */, 15 },
+  /* 1260 */  { MAD_F(0x06a5212f) /* 0.415314849 */, 15 },
+  /* 1261 */  { MAD_F(0x06a6ee14) /* 0.415754393 */, 15 },
+  /* 1262 */  { MAD_F(0x06a8bb18) /* 0.416194054 */, 15 },
+  /* 1263 */  { MAD_F(0x06aa883c) /* 0.416633831 */, 15 },
+
+  /* 1264 */  { MAD_F(0x06ac557f) /* 0.417073724 */, 15 },
+  /* 1265 */  { MAD_F(0x06ae22e1) /* 0.417513734 */, 15 },
+  /* 1266 */  { MAD_F(0x06aff062) /* 0.417953859 */, 15 },
+  /* 1267 */  { MAD_F(0x06b1be03) /* 0.418394100 */, 15 },
+  /* 1268 */  { MAD_F(0x06b38bc2) /* 0.418834457 */, 15 },
+  /* 1269 */  { MAD_F(0x06b559a1) /* 0.419274929 */, 15 },
+  /* 1270 */  { MAD_F(0x06b7279e) /* 0.419715518 */, 15 },
+  /* 1271 */  { MAD_F(0x06b8f5bb) /* 0.420156222 */, 15 },
+  /* 1272 */  { MAD_F(0x06bac3f6) /* 0.420597041 */, 15 },
+  /* 1273 */  { MAD_F(0x06bc9251) /* 0.421037977 */, 15 },
+  /* 1274 */  { MAD_F(0x06be60cb) /* 0.421479027 */, 15 },
+  /* 1275 */  { MAD_F(0x06c02f63) /* 0.421920193 */, 15 },
+  /* 1276 */  { MAD_F(0x06c1fe1b) /* 0.422361475 */, 15 },
+  /* 1277 */  { MAD_F(0x06c3ccf1) /* 0.422802871 */, 15 },
+  /* 1278 */  { MAD_F(0x06c59be7) /* 0.423244383 */, 15 },
+  /* 1279 */  { MAD_F(0x06c76afb) /* 0.423686010 */, 15 },
+
+  /* 1280 */  { MAD_F(0x06c93a2e) /* 0.424127753 */, 15 },
+  /* 1281 */  { MAD_F(0x06cb0981) /* 0.424569610 */, 15 },
+  /* 1282 */  { MAD_F(0x06ccd8f2) /* 0.425011582 */, 15 },
+  /* 1283 */  { MAD_F(0x06cea881) /* 0.425453669 */, 15 },
+  /* 1284 */  { MAD_F(0x06d07830) /* 0.425895871 */, 15 },
+  /* 1285 */  { MAD_F(0x06d247fe) /* 0.426338188 */, 15 },
+  /* 1286 */  { MAD_F(0x06d417ea) /* 0.426780620 */, 15 },
+  /* 1287 */  { MAD_F(0x06d5e7f5) /* 0.427223166 */, 15 },
+  /* 1288 */  { MAD_F(0x06d7b81f) /* 0.427665827 */, 15 },
+  /* 1289 */  { MAD_F(0x06d98868) /* 0.428108603 */, 15 },
+  /* 1290 */  { MAD_F(0x06db58cf) /* 0.428551493 */, 15 },
+  /* 1291 */  { MAD_F(0x06dd2955) /* 0.428994497 */, 15 },
+  /* 1292 */  { MAD_F(0x06def9fa) /* 0.429437616 */, 15 },
+  /* 1293 */  { MAD_F(0x06e0cabe) /* 0.429880849 */, 15 },
+  /* 1294 */  { MAD_F(0x06e29ba0) /* 0.430324197 */, 15 },
+  /* 1295 */  { MAD_F(0x06e46ca1) /* 0.430767659 */, 15 },
+
+  /* 1296 */  { MAD_F(0x06e63dc0) /* 0.431211234 */, 15 },
+  /* 1297 */  { MAD_F(0x06e80efe) /* 0.431654924 */, 15 },
+  /* 1298 */  { MAD_F(0x06e9e05b) /* 0.432098728 */, 15 },
+  /* 1299 */  { MAD_F(0x06ebb1d6) /* 0.432542647 */, 15 },
+  /* 1300 */  { MAD_F(0x06ed8370) /* 0.432986678 */, 15 },
+  /* 1301 */  { MAD_F(0x06ef5529) /* 0.433430824 */, 15 },
+  /* 1302 */  { MAD_F(0x06f12700) /* 0.433875084 */, 15 },
+  /* 1303 */  { MAD_F(0x06f2f8f5) /* 0.434319457 */, 15 },
+  /* 1304 */  { MAD_F(0x06f4cb09) /* 0.434763944 */, 15 },
+  /* 1305 */  { MAD_F(0x06f69d3c) /* 0.435208545 */, 15 },
+  /* 1306 */  { MAD_F(0x06f86f8d) /* 0.435653259 */, 15 },
+  /* 1307 */  { MAD_F(0x06fa41fd) /* 0.436098087 */, 15 },
+  /* 1308 */  { MAD_F(0x06fc148b) /* 0.436543029 */, 15 },
+  /* 1309 */  { MAD_F(0x06fde737) /* 0.436988083 */, 15 },
+  /* 1310 */  { MAD_F(0x06ffba02) /* 0.437433251 */, 15 },
+  /* 1311 */  { MAD_F(0x07018ceb) /* 0.437878533 */, 15 },
+
+  /* 1312 */  { MAD_F(0x07035ff3) /* 0.438323927 */, 15 },
+  /* 1313 */  { MAD_F(0x07053319) /* 0.438769435 */, 15 },
+  /* 1314 */  { MAD_F(0x0707065d) /* 0.439215056 */, 15 },
+  /* 1315 */  { MAD_F(0x0708d9c0) /* 0.439660790 */, 15 },
+  /* 1316 */  { MAD_F(0x070aad41) /* 0.440106636 */, 15 },
+  /* 1317 */  { MAD_F(0x070c80e1) /* 0.440552596 */, 15 },
+  /* 1318 */  { MAD_F(0x070e549f) /* 0.440998669 */, 15 },
+  /* 1319 */  { MAD_F(0x0710287b) /* 0.441444855 */, 15 },
+  /* 1320 */  { MAD_F(0x0711fc75) /* 0.441891153 */, 15 },
+  /* 1321 */  { MAD_F(0x0713d08d) /* 0.442337564 */, 15 },
+  /* 1322 */  { MAD_F(0x0715a4c4) /* 0.442784088 */, 15 },
+  /* 1323 */  { MAD_F(0x07177919) /* 0.443230724 */, 15 },
+  /* 1324 */  { MAD_F(0x07194d8c) /* 0.443677473 */, 15 },
+  /* 1325 */  { MAD_F(0x071b221e) /* 0.444124334 */, 15 },
+  /* 1326 */  { MAD_F(0x071cf6ce) /* 0.444571308 */, 15 },
+  /* 1327 */  { MAD_F(0x071ecb9b) /* 0.445018394 */, 15 },
+
+  /* 1328 */  { MAD_F(0x0720a087) /* 0.445465593 */, 15 },
+  /* 1329 */  { MAD_F(0x07227591) /* 0.445912903 */, 15 },
+  /* 1330 */  { MAD_F(0x07244ab9) /* 0.446360326 */, 15 },
+  /* 1331 */  { MAD_F(0x07262000) /* 0.446807861 */, 15 },
+  /* 1332 */  { MAD_F(0x0727f564) /* 0.447255509 */, 15 },
+  /* 1333 */  { MAD_F(0x0729cae7) /* 0.447703268 */, 15 },
+  /* 1334 */  { MAD_F(0x072ba087) /* 0.448151139 */, 15 },
+  /* 1335 */  { MAD_F(0x072d7646) /* 0.448599122 */, 15 },
+  /* 1336 */  { MAD_F(0x072f4c22) /* 0.449047217 */, 15 },
+  /* 1337 */  { MAD_F(0x0731221d) /* 0.449495424 */, 15 },
+  /* 1338 */  { MAD_F(0x0732f835) /* 0.449943742 */, 15 },
+  /* 1339 */  { MAD_F(0x0734ce6c) /* 0.450392173 */, 15 },
+  /* 1340 */  { MAD_F(0x0736a4c1) /* 0.450840715 */, 15 },
+  /* 1341 */  { MAD_F(0x07387b33) /* 0.451289368 */, 15 },
+  /* 1342 */  { MAD_F(0x073a51c4) /* 0.451738133 */, 15 },
+  /* 1343 */  { MAD_F(0x073c2872) /* 0.452187010 */, 15 },
+
+  /* 1344 */  { MAD_F(0x073dff3e) /* 0.452635998 */, 15 },
+  /* 1345 */  { MAD_F(0x073fd628) /* 0.453085097 */, 15 },
+  /* 1346 */  { MAD_F(0x0741ad30) /* 0.453534308 */, 15 },
+  /* 1347 */  { MAD_F(0x07438456) /* 0.453983630 */, 15 },
+  /* 1348 */  { MAD_F(0x07455b9a) /* 0.454433063 */, 15 },
+  /* 1349 */  { MAD_F(0x074732fc) /* 0.454882607 */, 15 },
+  /* 1350 */  { MAD_F(0x07490a7b) /* 0.455332262 */, 15 },
+  /* 1351 */  { MAD_F(0x074ae218) /* 0.455782029 */, 15 },
+  /* 1352 */  { MAD_F(0x074cb9d3) /* 0.456231906 */, 15 },
+  /* 1353 */  { MAD_F(0x074e91ac) /* 0.456681894 */, 15 },
+  /* 1354 */  { MAD_F(0x075069a3) /* 0.457131993 */, 15 },
+  /* 1355 */  { MAD_F(0x075241b7) /* 0.457582203 */, 15 },
+  /* 1356 */  { MAD_F(0x075419e9) /* 0.458032524 */, 15 },
+  /* 1357 */  { MAD_F(0x0755f239) /* 0.458482956 */, 15 },
+  /* 1358 */  { MAD_F(0x0757caa7) /* 0.458933498 */, 15 },
+  /* 1359 */  { MAD_F(0x0759a332) /* 0.459384151 */, 15 },
+
+  /* 1360 */  { MAD_F(0x075b7bdb) /* 0.459834914 */, 15 },
+  /* 1361 */  { MAD_F(0x075d54a1) /* 0.460285788 */, 15 },
+  /* 1362 */  { MAD_F(0x075f2d85) /* 0.460736772 */, 15 },
+  /* 1363 */  { MAD_F(0x07610687) /* 0.461187867 */, 15 },
+  /* 1364 */  { MAD_F(0x0762dfa6) /* 0.461639071 */, 15 },
+  /* 1365 */  { MAD_F(0x0764b8e3) /* 0.462090387 */, 15 },
+  /* 1366 */  { MAD_F(0x0766923e) /* 0.462541812 */, 15 },
+  /* 1367 */  { MAD_F(0x07686bb6) /* 0.462993348 */, 15 },
+  /* 1368 */  { MAD_F(0x076a454c) /* 0.463444993 */, 15 },
+  /* 1369 */  { MAD_F(0x076c1eff) /* 0.463896749 */, 15 },
+  /* 1370 */  { MAD_F(0x076df8d0) /* 0.464348615 */, 15 },
+  /* 1371 */  { MAD_F(0x076fd2be) /* 0.464800591 */, 15 },
+  /* 1372 */  { MAD_F(0x0771acca) /* 0.465252676 */, 15 },
+  /* 1373 */  { MAD_F(0x077386f3) /* 0.465704872 */, 15 },
+  /* 1374 */  { MAD_F(0x0775613a) /* 0.466157177 */, 15 },
+  /* 1375 */  { MAD_F(0x07773b9e) /* 0.466609592 */, 15 },
+
+  /* 1376 */  { MAD_F(0x07791620) /* 0.467062117 */, 15 },
+  /* 1377 */  { MAD_F(0x077af0bf) /* 0.467514751 */, 15 },
+  /* 1378 */  { MAD_F(0x077ccb7c) /* 0.467967495 */, 15 },
+  /* 1379 */  { MAD_F(0x077ea656) /* 0.468420349 */, 15 },
+  /* 1380 */  { MAD_F(0x0780814d) /* 0.468873312 */, 15 },
+  /* 1381 */  { MAD_F(0x07825c62) /* 0.469326384 */, 15 },
+  /* 1382 */  { MAD_F(0x07843794) /* 0.469779566 */, 15 },
+  /* 1383 */  { MAD_F(0x078612e3) /* 0.470232857 */, 15 },
+  /* 1384 */  { MAD_F(0x0787ee50) /* 0.470686258 */, 15 },
+  /* 1385 */  { MAD_F(0x0789c9da) /* 0.471139767 */, 15 },
+  /* 1386 */  { MAD_F(0x078ba581) /* 0.471593386 */, 15 },
+  /* 1387 */  { MAD_F(0x078d8146) /* 0.472047114 */, 15 },
+  /* 1388 */  { MAD_F(0x078f5d28) /* 0.472500951 */, 15 },
+  /* 1389 */  { MAD_F(0x07913927) /* 0.472954896 */, 15 },
+  /* 1390 */  { MAD_F(0x07931543) /* 0.473408951 */, 15 },
+  /* 1391 */  { MAD_F(0x0794f17d) /* 0.473863115 */, 15 },
+
+  /* 1392 */  { MAD_F(0x0796cdd4) /* 0.474317388 */, 15 },
+  /* 1393 */  { MAD_F(0x0798aa48) /* 0.474771769 */, 15 },
+  /* 1394 */  { MAD_F(0x079a86d9) /* 0.475226259 */, 15 },
+  /* 1395 */  { MAD_F(0x079c6388) /* 0.475680858 */, 15 },
+  /* 1396 */  { MAD_F(0x079e4053) /* 0.476135565 */, 15 },
+  /* 1397 */  { MAD_F(0x07a01d3c) /* 0.476590381 */, 15 },
+  /* 1398 */  { MAD_F(0x07a1fa42) /* 0.477045306 */, 15 },
+  /* 1399 */  { MAD_F(0x07a3d765) /* 0.477500339 */, 15 },
+  /* 1400 */  { MAD_F(0x07a5b4a5) /* 0.477955481 */, 15 },
+  /* 1401 */  { MAD_F(0x07a79202) /* 0.478410731 */, 15 },
+  /* 1402 */  { MAD_F(0x07a96f7d) /* 0.478866089 */, 15 },
+  /* 1403 */  { MAD_F(0x07ab4d14) /* 0.479321555 */, 15 },
+  /* 1404 */  { MAD_F(0x07ad2ac8) /* 0.479777130 */, 15 },
+  /* 1405 */  { MAD_F(0x07af089a) /* 0.480232813 */, 15 },
+  /* 1406 */  { MAD_F(0x07b0e688) /* 0.480688604 */, 15 },
+  /* 1407 */  { MAD_F(0x07b2c494) /* 0.481144503 */, 15 },
+
+  /* 1408 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */, 15 },
+  /* 1409 */  { MAD_F(0x07b68102) /* 0.482056625 */, 15 },
+  /* 1410 */  { MAD_F(0x07b85f64) /* 0.482512848 */, 15 },
+  /* 1411 */  { MAD_F(0x07ba3de4) /* 0.482969179 */, 15 },
+  /* 1412 */  { MAD_F(0x07bc1c80) /* 0.483425618 */, 15 },
+  /* 1413 */  { MAD_F(0x07bdfb39) /* 0.483882164 */, 15 },
+  /* 1414 */  { MAD_F(0x07bfda0f) /* 0.484338818 */, 15 },
+  /* 1415 */  { MAD_F(0x07c1b902) /* 0.484795580 */, 15 },
+  /* 1416 */  { MAD_F(0x07c39812) /* 0.485252449 */, 15 },
+  /* 1417 */  { MAD_F(0x07c5773f) /* 0.485709426 */, 15 },
+  /* 1418 */  { MAD_F(0x07c75689) /* 0.486166511 */, 15 },
+  /* 1419 */  { MAD_F(0x07c935ef) /* 0.486623703 */, 15 },
+  /* 1420 */  { MAD_F(0x07cb1573) /* 0.487081002 */, 15 },
+  /* 1421 */  { MAD_F(0x07ccf513) /* 0.487538409 */, 15 },
+  /* 1422 */  { MAD_F(0x07ced4d0) /* 0.487995923 */, 15 },
+  /* 1423 */  { MAD_F(0x07d0b4aa) /* 0.488453544 */, 15 },
+
+  /* 1424 */  { MAD_F(0x07d294a0) /* 0.488911273 */, 15 },
+  /* 1425 */  { MAD_F(0x07d474b3) /* 0.489369108 */, 15 },
+  /* 1426 */  { MAD_F(0x07d654e4) /* 0.489827051 */, 15 },
+  /* 1427 */  { MAD_F(0x07d83530) /* 0.490285101 */, 15 },
+  /* 1428 */  { MAD_F(0x07da159a) /* 0.490743258 */, 15 },
+  /* 1429 */  { MAD_F(0x07dbf620) /* 0.491201522 */, 15 },
+  /* 1430 */  { MAD_F(0x07ddd6c3) /* 0.491659892 */, 15 },
+  /* 1431 */  { MAD_F(0x07dfb783) /* 0.492118370 */, 15 },
+  /* 1432 */  { MAD_F(0x07e1985f) /* 0.492576954 */, 15 },
+  /* 1433 */  { MAD_F(0x07e37958) /* 0.493035645 */, 15 },
+  /* 1434 */  { MAD_F(0x07e55a6e) /* 0.493494443 */, 15 },
+  /* 1435 */  { MAD_F(0x07e73ba0) /* 0.493953348 */, 15 },
+  /* 1436 */  { MAD_F(0x07e91cef) /* 0.494412359 */, 15 },
+  /* 1437 */  { MAD_F(0x07eafe5a) /* 0.494871476 */, 15 },
+  /* 1438 */  { MAD_F(0x07ecdfe2) /* 0.495330701 */, 15 },
+  /* 1439 */  { MAD_F(0x07eec187) /* 0.495790031 */, 15 },
+
+  /* 1440 */  { MAD_F(0x07f0a348) /* 0.496249468 */, 15 },
+  /* 1441 */  { MAD_F(0x07f28526) /* 0.496709012 */, 15 },
+  /* 1442 */  { MAD_F(0x07f46720) /* 0.497168662 */, 15 },
+  /* 1443 */  { MAD_F(0x07f64937) /* 0.497628418 */, 15 },
+  /* 1444 */  { MAD_F(0x07f82b6a) /* 0.498088280 */, 15 },
+  /* 1445 */  { MAD_F(0x07fa0dba) /* 0.498548248 */, 15 },
+  /* 1446 */  { MAD_F(0x07fbf026) /* 0.499008323 */, 15 },
+  /* 1447 */  { MAD_F(0x07fdd2af) /* 0.499468503 */, 15 },
+  /* 1448 */  { MAD_F(0x07ffb554) /* 0.499928790 */, 15 },
+  /* 1449 */  { MAD_F(0x0400cc0b) /* 0.250194591 */, 16 },
+  /* 1450 */  { MAD_F(0x0401bd7a) /* 0.250424840 */, 16 },
+  /* 1451 */  { MAD_F(0x0402aef7) /* 0.250655143 */, 16 },
+  /* 1452 */  { MAD_F(0x0403a083) /* 0.250885498 */, 16 },
+  /* 1453 */  { MAD_F(0x0404921c) /* 0.251115906 */, 16 },
+  /* 1454 */  { MAD_F(0x040583c4) /* 0.251346367 */, 16 },
+  /* 1455 */  { MAD_F(0x0406757a) /* 0.251576880 */, 16 },
+
+  /* 1456 */  { MAD_F(0x0407673f) /* 0.251807447 */, 16 },
+  /* 1457 */  { MAD_F(0x04085911) /* 0.252038066 */, 16 },
+  /* 1458 */  { MAD_F(0x04094af1) /* 0.252268738 */, 16 },
+  /* 1459 */  { MAD_F(0x040a3ce0) /* 0.252499463 */, 16 },
+  /* 1460 */  { MAD_F(0x040b2edd) /* 0.252730240 */, 16 },
+  /* 1461 */  { MAD_F(0x040c20e8) /* 0.252961071 */, 16 },
+  /* 1462 */  { MAD_F(0x040d1301) /* 0.253191953 */, 16 },
+  /* 1463 */  { MAD_F(0x040e0529) /* 0.253422889 */, 16 },
+  /* 1464 */  { MAD_F(0x040ef75e) /* 0.253653877 */, 16 },
+  /* 1465 */  { MAD_F(0x040fe9a1) /* 0.253884918 */, 16 },
+  /* 1466 */  { MAD_F(0x0410dbf3) /* 0.254116011 */, 16 },
+  /* 1467 */  { MAD_F(0x0411ce53) /* 0.254347157 */, 16 },
+  /* 1468 */  { MAD_F(0x0412c0c1) /* 0.254578356 */, 16 },
+  /* 1469 */  { MAD_F(0x0413b33d) /* 0.254809606 */, 16 },
+  /* 1470 */  { MAD_F(0x0414a5c7) /* 0.255040910 */, 16 },
+  /* 1471 */  { MAD_F(0x0415985f) /* 0.255272266 */, 16 },
+
+  /* 1472 */  { MAD_F(0x04168b05) /* 0.255503674 */, 16 },
+  /* 1473 */  { MAD_F(0x04177db9) /* 0.255735135 */, 16 },
+  /* 1474 */  { MAD_F(0x0418707c) /* 0.255966648 */, 16 },
+  /* 1475 */  { MAD_F(0x0419634c) /* 0.256198213 */, 16 },
+  /* 1476 */  { MAD_F(0x041a562a) /* 0.256429831 */, 16 },
+  /* 1477 */  { MAD_F(0x041b4917) /* 0.256661501 */, 16 },
+  /* 1478 */  { MAD_F(0x041c3c11) /* 0.256893223 */, 16 },
+  /* 1479 */  { MAD_F(0x041d2f1a) /* 0.257124998 */, 16 },
+  /* 1480 */  { MAD_F(0x041e2230) /* 0.257356825 */, 16 },
+  /* 1481 */  { MAD_F(0x041f1555) /* 0.257588704 */, 16 },
+  /* 1482 */  { MAD_F(0x04200888) /* 0.257820635 */, 16 },
+  /* 1483 */  { MAD_F(0x0420fbc8) /* 0.258052619 */, 16 },
+  /* 1484 */  { MAD_F(0x0421ef17) /* 0.258284654 */, 16 },
+  /* 1485 */  { MAD_F(0x0422e273) /* 0.258516742 */, 16 },
+  /* 1486 */  { MAD_F(0x0423d5de) /* 0.258748882 */, 16 },
+  /* 1487 */  { MAD_F(0x0424c956) /* 0.258981074 */, 16 },
+
+  /* 1488 */  { MAD_F(0x0425bcdd) /* 0.259213318 */, 16 },
+  /* 1489 */  { MAD_F(0x0426b071) /* 0.259445614 */, 16 },
+  /* 1490 */  { MAD_F(0x0427a414) /* 0.259677962 */, 16 },
+  /* 1491 */  { MAD_F(0x042897c4) /* 0.259910362 */, 16 },
+  /* 1492 */  { MAD_F(0x04298b83) /* 0.260142814 */, 16 },
+  /* 1493 */  { MAD_F(0x042a7f4f) /* 0.260375318 */, 16 },
+  /* 1494 */  { MAD_F(0x042b7329) /* 0.260607874 */, 16 },
+  /* 1495 */  { MAD_F(0x042c6711) /* 0.260840481 */, 16 },
+  /* 1496 */  { MAD_F(0x042d5b07) /* 0.261073141 */, 16 },
+  /* 1497 */  { MAD_F(0x042e4f0b) /* 0.261305852 */, 16 },
+  /* 1498 */  { MAD_F(0x042f431d) /* 0.261538616 */, 16 },
+  /* 1499 */  { MAD_F(0x0430373d) /* 0.261771431 */, 16 },
+  /* 1500 */  { MAD_F(0x04312b6b) /* 0.262004297 */, 16 },
+  /* 1501 */  { MAD_F(0x04321fa6) /* 0.262237216 */, 16 },
+  /* 1502 */  { MAD_F(0x043313f0) /* 0.262470186 */, 16 },
+  /* 1503 */  { MAD_F(0x04340847) /* 0.262703208 */, 16 },
+
+  /* 1504 */  { MAD_F(0x0434fcad) /* 0.262936282 */, 16 },
+  /* 1505 */  { MAD_F(0x0435f120) /* 0.263169407 */, 16 },
+  /* 1506 */  { MAD_F(0x0436e5a1) /* 0.263402584 */, 16 },
+  /* 1507 */  { MAD_F(0x0437da2f) /* 0.263635813 */, 16 },
+  /* 1508 */  { MAD_F(0x0438cecc) /* 0.263869093 */, 16 },
+  /* 1509 */  { MAD_F(0x0439c377) /* 0.264102425 */, 16 },
+  /* 1510 */  { MAD_F(0x043ab82f) /* 0.264335808 */, 16 },
+  /* 1511 */  { MAD_F(0x043bacf5) /* 0.264569243 */, 16 },
+  /* 1512 */  { MAD_F(0x043ca1c9) /* 0.264802730 */, 16 },
+  /* 1513 */  { MAD_F(0x043d96ab) /* 0.265036267 */, 16 },
+  /* 1514 */  { MAD_F(0x043e8b9b) /* 0.265269857 */, 16 },
+  /* 1515 */  { MAD_F(0x043f8098) /* 0.265503498 */, 16 },
+  /* 1516 */  { MAD_F(0x044075a3) /* 0.265737190 */, 16 },
+  /* 1517 */  { MAD_F(0x04416abc) /* 0.265970933 */, 16 },
+  /* 1518 */  { MAD_F(0x04425fe3) /* 0.266204728 */, 16 },
+  /* 1519 */  { MAD_F(0x04435518) /* 0.266438574 */, 16 },
+
+  /* 1520 */  { MAD_F(0x04444a5a) /* 0.266672472 */, 16 },
+  /* 1521 */  { MAD_F(0x04453fab) /* 0.266906421 */, 16 },
+  /* 1522 */  { MAD_F(0x04463508) /* 0.267140421 */, 16 },
+  /* 1523 */  { MAD_F(0x04472a74) /* 0.267374472 */, 16 },
+  /* 1524 */  { MAD_F(0x04481fee) /* 0.267608575 */, 16 },
+  /* 1525 */  { MAD_F(0x04491575) /* 0.267842729 */, 16 },
+  /* 1526 */  { MAD_F(0x044a0b0a) /* 0.268076934 */, 16 },
+  /* 1527 */  { MAD_F(0x044b00ac) /* 0.268311190 */, 16 },
+  /* 1528 */  { MAD_F(0x044bf65d) /* 0.268545497 */, 16 },
+  /* 1529 */  { MAD_F(0x044cec1b) /* 0.268779856 */, 16 },
+  /* 1530 */  { MAD_F(0x044de1e7) /* 0.269014265 */, 16 },
+  /* 1531 */  { MAD_F(0x044ed7c0) /* 0.269248726 */, 16 },
+  /* 1532 */  { MAD_F(0x044fcda8) /* 0.269483238 */, 16 },
+  /* 1533 */  { MAD_F(0x0450c39c) /* 0.269717800 */, 16 },
+  /* 1534 */  { MAD_F(0x0451b99f) /* 0.269952414 */, 16 },
+  /* 1535 */  { MAD_F(0x0452afaf) /* 0.270187079 */, 16 },
+
+  /* 1536 */  { MAD_F(0x0453a5cd) /* 0.270421794 */, 16 },
+  /* 1537 */  { MAD_F(0x04549bf9) /* 0.270656561 */, 16 },
+  /* 1538 */  { MAD_F(0x04559232) /* 0.270891379 */, 16 },
+  /* 1539 */  { MAD_F(0x04568879) /* 0.271126247 */, 16 },
+  /* 1540 */  { MAD_F(0x04577ece) /* 0.271361166 */, 16 },
+  /* 1541 */  { MAD_F(0x04587530) /* 0.271596136 */, 16 },
+  /* 1542 */  { MAD_F(0x04596ba0) /* 0.271831157 */, 16 },
+  /* 1543 */  { MAD_F(0x045a621e) /* 0.272066229 */, 16 },
+  /* 1544 */  { MAD_F(0x045b58a9) /* 0.272301352 */, 16 },
+  /* 1545 */  { MAD_F(0x045c4f42) /* 0.272536525 */, 16 },
+  /* 1546 */  { MAD_F(0x045d45e9) /* 0.272771749 */, 16 },
+  /* 1547 */  { MAD_F(0x045e3c9d) /* 0.273007024 */, 16 },
+  /* 1548 */  { MAD_F(0x045f335e) /* 0.273242350 */, 16 },
+  /* 1549 */  { MAD_F(0x04602a2e) /* 0.273477726 */, 16 },
+  /* 1550 */  { MAD_F(0x0461210b) /* 0.273713153 */, 16 },
+  /* 1551 */  { MAD_F(0x046217f5) /* 0.273948630 */, 16 },
+
+  /* 1552 */  { MAD_F(0x04630eed) /* 0.274184158 */, 16 },
+  /* 1553 */  { MAD_F(0x046405f3) /* 0.274419737 */, 16 },
+  /* 1554 */  { MAD_F(0x0464fd06) /* 0.274655366 */, 16 },
+  /* 1555 */  { MAD_F(0x0465f427) /* 0.274891046 */, 16 },
+  /* 1556 */  { MAD_F(0x0466eb55) /* 0.275126776 */, 16 },
+  /* 1557 */  { MAD_F(0x0467e291) /* 0.275362557 */, 16 },
+  /* 1558 */  { MAD_F(0x0468d9db) /* 0.275598389 */, 16 },
+  /* 1559 */  { MAD_F(0x0469d132) /* 0.275834270 */, 16 },
+  /* 1560 */  { MAD_F(0x046ac896) /* 0.276070203 */, 16 },
+  /* 1561 */  { MAD_F(0x046bc009) /* 0.276306185 */, 16 },
+  /* 1562 */  { MAD_F(0x046cb788) /* 0.276542218 */, 16 },
+  /* 1563 */  { MAD_F(0x046daf15) /* 0.276778302 */, 16 },
+  /* 1564 */  { MAD_F(0x046ea6b0) /* 0.277014435 */, 16 },
+  /* 1565 */  { MAD_F(0x046f9e58) /* 0.277250619 */, 16 },
+  /* 1566 */  { MAD_F(0x0470960e) /* 0.277486854 */, 16 },
+  /* 1567 */  { MAD_F(0x04718dd1) /* 0.277723139 */, 16 },
+
+  /* 1568 */  { MAD_F(0x047285a2) /* 0.277959474 */, 16 },
+  /* 1569 */  { MAD_F(0x04737d80) /* 0.278195859 */, 16 },
+  /* 1570 */  { MAD_F(0x0474756c) /* 0.278432294 */, 16 },
+  /* 1571 */  { MAD_F(0x04756d65) /* 0.278668780 */, 16 },
+  /* 1572 */  { MAD_F(0x0476656b) /* 0.278905316 */, 16 },
+  /* 1573 */  { MAD_F(0x04775d7f) /* 0.279141902 */, 16 },
+  /* 1574 */  { MAD_F(0x047855a1) /* 0.279378538 */, 16 },
+  /* 1575 */  { MAD_F(0x04794dd0) /* 0.279615224 */, 16 },
+  /* 1576 */  { MAD_F(0x047a460c) /* 0.279851960 */, 16 },
+  /* 1577 */  { MAD_F(0x047b3e56) /* 0.280088747 */, 16 },
+  /* 1578 */  { MAD_F(0x047c36ae) /* 0.280325583 */, 16 },
+  /* 1579 */  { MAD_F(0x047d2f12) /* 0.280562470 */, 16 },
+  /* 1580 */  { MAD_F(0x047e2784) /* 0.280799406 */, 16 },
+  /* 1581 */  { MAD_F(0x047f2004) /* 0.281036393 */, 16 },
+  /* 1582 */  { MAD_F(0x04801891) /* 0.281273429 */, 16 },
+  /* 1583 */  { MAD_F(0x0481112b) /* 0.281510516 */, 16 },
+
+  /* 1584 */  { MAD_F(0x048209d3) /* 0.281747652 */, 16 },
+  /* 1585 */  { MAD_F(0x04830288) /* 0.281984838 */, 16 },
+  /* 1586 */  { MAD_F(0x0483fb4b) /* 0.282222075 */, 16 },
+  /* 1587 */  { MAD_F(0x0484f41b) /* 0.282459361 */, 16 },
+  /* 1588 */  { MAD_F(0x0485ecf8) /* 0.282696697 */, 16 },
+  /* 1589 */  { MAD_F(0x0486e5e3) /* 0.282934082 */, 16 },
+  /* 1590 */  { MAD_F(0x0487dedb) /* 0.283171518 */, 16 },
+  /* 1591 */  { MAD_F(0x0488d7e1) /* 0.283409003 */, 16 },
+  /* 1592 */  { MAD_F(0x0489d0f4) /* 0.283646538 */, 16 },
+  /* 1593 */  { MAD_F(0x048aca14) /* 0.283884123 */, 16 },
+  /* 1594 */  { MAD_F(0x048bc341) /* 0.284121757 */, 16 },
+  /* 1595 */  { MAD_F(0x048cbc7c) /* 0.284359441 */, 16 },
+  /* 1596 */  { MAD_F(0x048db5c4) /* 0.284597175 */, 16 },
+  /* 1597 */  { MAD_F(0x048eaf1a) /* 0.284834959 */, 16 },
+  /* 1598 */  { MAD_F(0x048fa87d) /* 0.285072792 */, 16 },
+  /* 1599 */  { MAD_F(0x0490a1ed) /* 0.285310675 */, 16 },
+
+  /* 1600 */  { MAD_F(0x04919b6a) /* 0.285548607 */, 16 },
+  /* 1601 */  { MAD_F(0x049294f5) /* 0.285786589 */, 16 },
+  /* 1602 */  { MAD_F(0x04938e8d) /* 0.286024621 */, 16 },
+  /* 1603 */  { MAD_F(0x04948833) /* 0.286262702 */, 16 },
+  /* 1604 */  { MAD_F(0x049581e5) /* 0.286500832 */, 16 },
+  /* 1605 */  { MAD_F(0x04967ba5) /* 0.286739012 */, 16 },
+  /* 1606 */  { MAD_F(0x04977573) /* 0.286977242 */, 16 },
+  /* 1607 */  { MAD_F(0x04986f4d) /* 0.287215521 */, 16 },
+  /* 1608 */  { MAD_F(0x04996935) /* 0.287453849 */, 16 },
+  /* 1609 */  { MAD_F(0x049a632a) /* 0.287692227 */, 16 },
+  /* 1610 */  { MAD_F(0x049b5d2c) /* 0.287930654 */, 16 },
+  /* 1611 */  { MAD_F(0x049c573c) /* 0.288169131 */, 16 },
+  /* 1612 */  { MAD_F(0x049d5159) /* 0.288407657 */, 16 },
+  /* 1613 */  { MAD_F(0x049e4b83) /* 0.288646232 */, 16 },
+  /* 1614 */  { MAD_F(0x049f45ba) /* 0.288884857 */, 16 },
+  /* 1615 */  { MAD_F(0x04a03ffe) /* 0.289123530 */, 16 },
+
+  /* 1616 */  { MAD_F(0x04a13a50) /* 0.289362253 */, 16 },
+  /* 1617 */  { MAD_F(0x04a234af) /* 0.289601026 */, 16 },
+  /* 1618 */  { MAD_F(0x04a32f1b) /* 0.289839847 */, 16 },
+  /* 1619 */  { MAD_F(0x04a42995) /* 0.290078718 */, 16 },
+  /* 1620 */  { MAD_F(0x04a5241b) /* 0.290317638 */, 16 },
+  /* 1621 */  { MAD_F(0x04a61eaf) /* 0.290556607 */, 16 },
+  /* 1622 */  { MAD_F(0x04a71950) /* 0.290795626 */, 16 },
+  /* 1623 */  { MAD_F(0x04a813fe) /* 0.291034693 */, 16 },
+  /* 1624 */  { MAD_F(0x04a90eba) /* 0.291273810 */, 16 },
+  /* 1625 */  { MAD_F(0x04aa0982) /* 0.291512975 */, 16 },
+  /* 1626 */  { MAD_F(0x04ab0458) /* 0.291752190 */, 16 },
+  /* 1627 */  { MAD_F(0x04abff3b) /* 0.291991453 */, 16 },
+  /* 1628 */  { MAD_F(0x04acfa2b) /* 0.292230766 */, 16 },
+  /* 1629 */  { MAD_F(0x04adf528) /* 0.292470128 */, 16 },
+  /* 1630 */  { MAD_F(0x04aef032) /* 0.292709539 */, 16 },
+  /* 1631 */  { MAD_F(0x04afeb4a) /* 0.292948998 */, 16 },
+
+  /* 1632 */  { MAD_F(0x04b0e66e) /* 0.293188507 */, 16 },
+  /* 1633 */  { MAD_F(0x04b1e1a0) /* 0.293428065 */, 16 },
+  /* 1634 */  { MAD_F(0x04b2dcdf) /* 0.293667671 */, 16 },
+  /* 1635 */  { MAD_F(0x04b3d82b) /* 0.293907326 */, 16 },
+  /* 1636 */  { MAD_F(0x04b4d384) /* 0.294147031 */, 16 },
+  /* 1637 */  { MAD_F(0x04b5ceea) /* 0.294386784 */, 16 },
+  /* 1638 */  { MAD_F(0x04b6ca5e) /* 0.294626585 */, 16 },
+  /* 1639 */  { MAD_F(0x04b7c5de) /* 0.294866436 */, 16 },
+  /* 1640 */  { MAD_F(0x04b8c16c) /* 0.295106336 */, 16 },
+  /* 1641 */  { MAD_F(0x04b9bd06) /* 0.295346284 */, 16 },
+  /* 1642 */  { MAD_F(0x04bab8ae) /* 0.295586281 */, 16 },
+  /* 1643 */  { MAD_F(0x04bbb463) /* 0.295826327 */, 16 },
+  /* 1644 */  { MAD_F(0x04bcb024) /* 0.296066421 */, 16 },
+  /* 1645 */  { MAD_F(0x04bdabf3) /* 0.296306564 */, 16 },
+  /* 1646 */  { MAD_F(0x04bea7cf) /* 0.296546756 */, 16 },
+  /* 1647 */  { MAD_F(0x04bfa3b8) /* 0.296786996 */, 16 },
+
+  /* 1648 */  { MAD_F(0x04c09faf) /* 0.297027285 */, 16 },
+  /* 1649 */  { MAD_F(0x04c19bb2) /* 0.297267623 */, 16 },
+  /* 1650 */  { MAD_F(0x04c297c2) /* 0.297508009 */, 16 },
+  /* 1651 */  { MAD_F(0x04c393df) /* 0.297748444 */, 16 },
+  /* 1652 */  { MAD_F(0x04c49009) /* 0.297988927 */, 16 },
+  /* 1653 */  { MAD_F(0x04c58c41) /* 0.298229459 */, 16 },
+  /* 1654 */  { MAD_F(0x04c68885) /* 0.298470039 */, 16 },
+  /* 1655 */  { MAD_F(0x04c784d6) /* 0.298710668 */, 16 },
+  /* 1656 */  { MAD_F(0x04c88135) /* 0.298951346 */, 16 },
+  /* 1657 */  { MAD_F(0x04c97da0) /* 0.299192071 */, 16 },
+  /* 1658 */  { MAD_F(0x04ca7a18) /* 0.299432846 */, 16 },
+  /* 1659 */  { MAD_F(0x04cb769e) /* 0.299673668 */, 16 },
+  /* 1660 */  { MAD_F(0x04cc7330) /* 0.299914539 */, 16 },
+  /* 1661 */  { MAD_F(0x04cd6fcf) /* 0.300155459 */, 16 },
+  /* 1662 */  { MAD_F(0x04ce6c7b) /* 0.300396426 */, 16 },
+  /* 1663 */  { MAD_F(0x04cf6935) /* 0.300637443 */, 16 },
+
+  /* 1664 */  { MAD_F(0x04d065fb) /* 0.300878507 */, 16 },
+  /* 1665 */  { MAD_F(0x04d162ce) /* 0.301119620 */, 16 },
+  /* 1666 */  { MAD_F(0x04d25fae) /* 0.301360781 */, 16 },
+  /* 1667 */  { MAD_F(0x04d35c9b) /* 0.301601990 */, 16 },
+  /* 1668 */  { MAD_F(0x04d45995) /* 0.301843247 */, 16 },
+  /* 1669 */  { MAD_F(0x04d5569c) /* 0.302084553 */, 16 },
+  /* 1670 */  { MAD_F(0x04d653b0) /* 0.302325907 */, 16 },
+  /* 1671 */  { MAD_F(0x04d750d1) /* 0.302567309 */, 16 },
+  /* 1672 */  { MAD_F(0x04d84dff) /* 0.302808759 */, 16 },
+  /* 1673 */  { MAD_F(0x04d94b3a) /* 0.303050257 */, 16 },
+  /* 1674 */  { MAD_F(0x04da4881) /* 0.303291804 */, 16 },
+  /* 1675 */  { MAD_F(0x04db45d6) /* 0.303533399 */, 16 },
+  /* 1676 */  { MAD_F(0x04dc4337) /* 0.303775041 */, 16 },
+  /* 1677 */  { MAD_F(0x04dd40a6) /* 0.304016732 */, 16 },
+  /* 1678 */  { MAD_F(0x04de3e21) /* 0.304258471 */, 16 },
+  /* 1679 */  { MAD_F(0x04df3ba9) /* 0.304500257 */, 16 },
+
+  /* 1680 */  { MAD_F(0x04e0393e) /* 0.304742092 */, 16 },
+  /* 1681 */  { MAD_F(0x04e136e0) /* 0.304983975 */, 16 },
+  /* 1682 */  { MAD_F(0x04e2348f) /* 0.305225906 */, 16 },
+  /* 1683 */  { MAD_F(0x04e3324b) /* 0.305467885 */, 16 },
+  /* 1684 */  { MAD_F(0x04e43013) /* 0.305709911 */, 16 },
+  /* 1685 */  { MAD_F(0x04e52de9) /* 0.305951986 */, 16 },
+  /* 1686 */  { MAD_F(0x04e62bcb) /* 0.306194108 */, 16 },
+  /* 1687 */  { MAD_F(0x04e729ba) /* 0.306436279 */, 16 },
+  /* 1688 */  { MAD_F(0x04e827b6) /* 0.306678497 */, 16 },
+  /* 1689 */  { MAD_F(0x04e925bf) /* 0.306920763 */, 16 },
+  /* 1690 */  { MAD_F(0x04ea23d4) /* 0.307163077 */, 16 },
+  /* 1691 */  { MAD_F(0x04eb21f7) /* 0.307405438 */, 16 },
+  /* 1692 */  { MAD_F(0x04ec2026) /* 0.307647848 */, 16 },
+  /* 1693 */  { MAD_F(0x04ed1e62) /* 0.307890305 */, 16 },
+  /* 1694 */  { MAD_F(0x04ee1cab) /* 0.308132810 */, 16 },
+  /* 1695 */  { MAD_F(0x04ef1b01) /* 0.308375362 */, 16 },
+
+  /* 1696 */  { MAD_F(0x04f01963) /* 0.308617963 */, 16 },
+  /* 1697 */  { MAD_F(0x04f117d3) /* 0.308860611 */, 16 },
+  /* 1698 */  { MAD_F(0x04f2164f) /* 0.309103306 */, 16 },
+  /* 1699 */  { MAD_F(0x04f314d8) /* 0.309346050 */, 16 },
+  /* 1700 */  { MAD_F(0x04f4136d) /* 0.309588841 */, 16 },
+  /* 1701 */  { MAD_F(0x04f51210) /* 0.309831679 */, 16 },
+  /* 1702 */  { MAD_F(0x04f610bf) /* 0.310074565 */, 16 },
+  /* 1703 */  { MAD_F(0x04f70f7b) /* 0.310317499 */, 16 },
+  /* 1704 */  { MAD_F(0x04f80e44) /* 0.310560480 */, 16 },
+  /* 1705 */  { MAD_F(0x04f90d19) /* 0.310803509 */, 16 },
+  /* 1706 */  { MAD_F(0x04fa0bfc) /* 0.311046586 */, 16 },
+  /* 1707 */  { MAD_F(0x04fb0aeb) /* 0.311289710 */, 16 },
+  /* 1708 */  { MAD_F(0x04fc09e7) /* 0.311532881 */, 16 },
+  /* 1709 */  { MAD_F(0x04fd08ef) /* 0.311776100 */, 16 },
+  /* 1710 */  { MAD_F(0x04fe0805) /* 0.312019366 */, 16 },
+  /* 1711 */  { MAD_F(0x04ff0727) /* 0.312262680 */, 16 },
+
+  /* 1712 */  { MAD_F(0x05000655) /* 0.312506041 */, 16 },
+  /* 1713 */  { MAD_F(0x05010591) /* 0.312749449 */, 16 },
+  /* 1714 */  { MAD_F(0x050204d9) /* 0.312992905 */, 16 },
+  /* 1715 */  { MAD_F(0x0503042e) /* 0.313236408 */, 16 },
+  /* 1716 */  { MAD_F(0x0504038f) /* 0.313479959 */, 16 },
+  /* 1717 */  { MAD_F(0x050502fe) /* 0.313723556 */, 16 },
+  /* 1718 */  { MAD_F(0x05060279) /* 0.313967202 */, 16 },
+  /* 1719 */  { MAD_F(0x05070200) /* 0.314210894 */, 16 },
+  /* 1720 */  { MAD_F(0x05080195) /* 0.314454634 */, 16 },
+  /* 1721 */  { MAD_F(0x05090136) /* 0.314698420 */, 16 },
+  /* 1722 */  { MAD_F(0x050a00e3) /* 0.314942255 */, 16 },
+  /* 1723 */  { MAD_F(0x050b009e) /* 0.315186136 */, 16 },
+  /* 1724 */  { MAD_F(0x050c0065) /* 0.315430064 */, 16 },
+  /* 1725 */  { MAD_F(0x050d0039) /* 0.315674040 */, 16 },
+  /* 1726 */  { MAD_F(0x050e0019) /* 0.315918063 */, 16 },
+  /* 1727 */  { MAD_F(0x050f0006) /* 0.316162133 */, 16 },
+
+  /* 1728 */  { MAD_F(0x05100000) /* 0.316406250 */, 16 },
+  /* 1729 */  { MAD_F(0x05110006) /* 0.316650414 */, 16 },
+  /* 1730 */  { MAD_F(0x05120019) /* 0.316894625 */, 16 },
+  /* 1731 */  { MAD_F(0x05130039) /* 0.317138884 */, 16 },
+  /* 1732 */  { MAD_F(0x05140065) /* 0.317383189 */, 16 },
+  /* 1733 */  { MAD_F(0x0515009e) /* 0.317627541 */, 16 },
+  /* 1734 */  { MAD_F(0x051600e3) /* 0.317871941 */, 16 },
+  /* 1735 */  { MAD_F(0x05170135) /* 0.318116387 */, 16 },
+  /* 1736 */  { MAD_F(0x05180194) /* 0.318360880 */, 16 },
+  /* 1737 */  { MAD_F(0x051901ff) /* 0.318605421 */, 16 },
+  /* 1738 */  { MAD_F(0x051a0277) /* 0.318850008 */, 16 },
+  /* 1739 */  { MAD_F(0x051b02fc) /* 0.319094642 */, 16 },
+  /* 1740 */  { MAD_F(0x051c038d) /* 0.319339323 */, 16 },
+  /* 1741 */  { MAD_F(0x051d042a) /* 0.319584051 */, 16 },
+  /* 1742 */  { MAD_F(0x051e04d4) /* 0.319828826 */, 16 },
+  /* 1743 */  { MAD_F(0x051f058b) /* 0.320073647 */, 16 },
+
+  /* 1744 */  { MAD_F(0x0520064f) /* 0.320318516 */, 16 },
+  /* 1745 */  { MAD_F(0x0521071f) /* 0.320563431 */, 16 },
+  /* 1746 */  { MAD_F(0x052207fb) /* 0.320808393 */, 16 },
+  /* 1747 */  { MAD_F(0x052308e4) /* 0.321053402 */, 16 },
+  /* 1748 */  { MAD_F(0x052409da) /* 0.321298457 */, 16 },
+  /* 1749 */  { MAD_F(0x05250adc) /* 0.321543560 */, 16 },
+  /* 1750 */  { MAD_F(0x05260bea) /* 0.321788709 */, 16 },
+  /* 1751 */  { MAD_F(0x05270d06) /* 0.322033904 */, 16 },
+  /* 1752 */  { MAD_F(0x05280e2d) /* 0.322279147 */, 16 },
+  /* 1753 */  { MAD_F(0x05290f62) /* 0.322524436 */, 16 },
+  /* 1754 */  { MAD_F(0x052a10a3) /* 0.322769771 */, 16 },
+  /* 1755 */  { MAD_F(0x052b11f0) /* 0.323015154 */, 16 },
+  /* 1756 */  { MAD_F(0x052c134a) /* 0.323260583 */, 16 },
+  /* 1757 */  { MAD_F(0x052d14b0) /* 0.323506058 */, 16 },
+  /* 1758 */  { MAD_F(0x052e1623) /* 0.323751580 */, 16 },
+  /* 1759 */  { MAD_F(0x052f17a2) /* 0.323997149 */, 16 },
+
+  /* 1760 */  { MAD_F(0x0530192e) /* 0.324242764 */, 16 },
+  /* 1761 */  { MAD_F(0x05311ac6) /* 0.324488426 */, 16 },
+  /* 1762 */  { MAD_F(0x05321c6b) /* 0.324734134 */, 16 },
+  /* 1763 */  { MAD_F(0x05331e1c) /* 0.324979889 */, 16 },
+  /* 1764 */  { MAD_F(0x05341fda) /* 0.325225690 */, 16 },
+  /* 1765 */  { MAD_F(0x053521a4) /* 0.325471538 */, 16 },
+  /* 1766 */  { MAD_F(0x0536237b) /* 0.325717432 */, 16 },
+  /* 1767 */  { MAD_F(0x0537255e) /* 0.325963372 */, 16 },
+  /* 1768 */  { MAD_F(0x0538274e) /* 0.326209359 */, 16 },
+  /* 1769 */  { MAD_F(0x0539294a) /* 0.326455392 */, 16 },
+  /* 1770 */  { MAD_F(0x053a2b52) /* 0.326701472 */, 16 },
+  /* 1771 */  { MAD_F(0x053b2d67) /* 0.326947598 */, 16 },
+  /* 1772 */  { MAD_F(0x053c2f89) /* 0.327193770 */, 16 },
+  /* 1773 */  { MAD_F(0x053d31b6) /* 0.327439989 */, 16 },
+  /* 1774 */  { MAD_F(0x053e33f1) /* 0.327686254 */, 16 },
+  /* 1775 */  { MAD_F(0x053f3637) /* 0.327932565 */, 16 },
+
+  /* 1776 */  { MAD_F(0x0540388a) /* 0.328178922 */, 16 },
+  /* 1777 */  { MAD_F(0x05413aea) /* 0.328425326 */, 16 },
+  /* 1778 */  { MAD_F(0x05423d56) /* 0.328671776 */, 16 },
+  /* 1779 */  { MAD_F(0x05433fce) /* 0.328918272 */, 16 },
+  /* 1780 */  { MAD_F(0x05444253) /* 0.329164814 */, 16 },
+  /* 1781 */  { MAD_F(0x054544e4) /* 0.329411403 */, 16 },
+  /* 1782 */  { MAD_F(0x05464781) /* 0.329658038 */, 16 },
+  /* 1783 */  { MAD_F(0x05474a2b) /* 0.329904718 */, 16 },
+  /* 1784 */  { MAD_F(0x05484ce2) /* 0.330151445 */, 16 },
+  /* 1785 */  { MAD_F(0x05494fa4) /* 0.330398218 */, 16 },
+  /* 1786 */  { MAD_F(0x054a5273) /* 0.330645037 */, 16 },
+  /* 1787 */  { MAD_F(0x054b554e) /* 0.330891903 */, 16 },
+  /* 1788 */  { MAD_F(0x054c5836) /* 0.331138814 */, 16 },
+  /* 1789 */  { MAD_F(0x054d5b2a) /* 0.331385771 */, 16 },
+  /* 1790 */  { MAD_F(0x054e5e2b) /* 0.331632774 */, 16 },
+  /* 1791 */  { MAD_F(0x054f6138) /* 0.331879824 */, 16 },
+
+  /* 1792 */  { MAD_F(0x05506451) /* 0.332126919 */, 16 },
+  /* 1793 */  { MAD_F(0x05516776) /* 0.332374060 */, 16 },
+  /* 1794 */  { MAD_F(0x05526aa8) /* 0.332621247 */, 16 },
+  /* 1795 */  { MAD_F(0x05536de6) /* 0.332868480 */, 16 },
+  /* 1796 */  { MAD_F(0x05547131) /* 0.333115759 */, 16 },
+  /* 1797 */  { MAD_F(0x05557487) /* 0.333363084 */, 16 },
+  /* 1798 */  { MAD_F(0x055677ea) /* 0.333610455 */, 16 },
+  /* 1799 */  { MAD_F(0x05577b5a) /* 0.333857872 */, 16 },
+  /* 1800 */  { MAD_F(0x05587ed5) /* 0.334105334 */, 16 },
+  /* 1801 */  { MAD_F(0x0559825e) /* 0.334352843 */, 16 },
+  /* 1802 */  { MAD_F(0x055a85f2) /* 0.334600397 */, 16 },
+  /* 1803 */  { MAD_F(0x055b8992) /* 0.334847997 */, 16 },
+  /* 1804 */  { MAD_F(0x055c8d3f) /* 0.335095642 */, 16 },
+  /* 1805 */  { MAD_F(0x055d90f9) /* 0.335343334 */, 16 },
+  /* 1806 */  { MAD_F(0x055e94be) /* 0.335591071 */, 16 },
+  /* 1807 */  { MAD_F(0x055f9890) /* 0.335838854 */, 16 },
+
+  /* 1808 */  { MAD_F(0x05609c6e) /* 0.336086683 */, 16 },
+  /* 1809 */  { MAD_F(0x0561a058) /* 0.336334557 */, 16 },
+  /* 1810 */  { MAD_F(0x0562a44f) /* 0.336582477 */, 16 },
+  /* 1811 */  { MAD_F(0x0563a851) /* 0.336830443 */, 16 },
+  /* 1812 */  { MAD_F(0x0564ac60) /* 0.337078454 */, 16 },
+  /* 1813 */  { MAD_F(0x0565b07c) /* 0.337326511 */, 16 },
+  /* 1814 */  { MAD_F(0x0566b4a3) /* 0.337574614 */, 16 },
+  /* 1815 */  { MAD_F(0x0567b8d7) /* 0.337822762 */, 16 },
+  /* 1816 */  { MAD_F(0x0568bd17) /* 0.338070956 */, 16 },
+  /* 1817 */  { MAD_F(0x0569c163) /* 0.338319195 */, 16 },
+  /* 1818 */  { MAD_F(0x056ac5bc) /* 0.338567480 */, 16 },
+  /* 1819 */  { MAD_F(0x056bca20) /* 0.338815811 */, 16 },
+  /* 1820 */  { MAD_F(0x056cce91) /* 0.339064186 */, 16 },
+  /* 1821 */  { MAD_F(0x056dd30e) /* 0.339312608 */, 16 },
+  /* 1822 */  { MAD_F(0x056ed798) /* 0.339561075 */, 16 },
+  /* 1823 */  { MAD_F(0x056fdc2d) /* 0.339809587 */, 16 },
+
+  /* 1824 */  { MAD_F(0x0570e0cf) /* 0.340058145 */, 16 },
+  /* 1825 */  { MAD_F(0x0571e57d) /* 0.340306748 */, 16 },
+  /* 1826 */  { MAD_F(0x0572ea37) /* 0.340555397 */, 16 },
+  /* 1827 */  { MAD_F(0x0573eefd) /* 0.340804091 */, 16 },
+  /* 1828 */  { MAD_F(0x0574f3d0) /* 0.341052830 */, 16 },
+  /* 1829 */  { MAD_F(0x0575f8ae) /* 0.341301615 */, 16 },
+  /* 1830 */  { MAD_F(0x0576fd99) /* 0.341550445 */, 16 },
+  /* 1831 */  { MAD_F(0x05780290) /* 0.341799321 */, 16 },
+  /* 1832 */  { MAD_F(0x05790793) /* 0.342048241 */, 16 },
+  /* 1833 */  { MAD_F(0x057a0ca3) /* 0.342297207 */, 16 },
+  /* 1834 */  { MAD_F(0x057b11be) /* 0.342546219 */, 16 },
+  /* 1835 */  { MAD_F(0x057c16e6) /* 0.342795275 */, 16 },
+  /* 1836 */  { MAD_F(0x057d1c1a) /* 0.343044377 */, 16 },
+  /* 1837 */  { MAD_F(0x057e2159) /* 0.343293524 */, 16 },
+  /* 1838 */  { MAD_F(0x057f26a6) /* 0.343542717 */, 16 },
+  /* 1839 */  { MAD_F(0x05802bfe) /* 0.343791954 */, 16 },
+
+  /* 1840 */  { MAD_F(0x05813162) /* 0.344041237 */, 16 },
+  /* 1841 */  { MAD_F(0x058236d2) /* 0.344290564 */, 16 },
+  /* 1842 */  { MAD_F(0x05833c4f) /* 0.344539937 */, 16 },
+  /* 1843 */  { MAD_F(0x058441d8) /* 0.344789356 */, 16 },
+  /* 1844 */  { MAD_F(0x0585476c) /* 0.345038819 */, 16 },
+  /* 1845 */  { MAD_F(0x05864d0d) /* 0.345288327 */, 16 },
+  /* 1846 */  { MAD_F(0x058752ba) /* 0.345537880 */, 16 },
+  /* 1847 */  { MAD_F(0x05885873) /* 0.345787479 */, 16 },
+  /* 1848 */  { MAD_F(0x05895e39) /* 0.346037122 */, 16 },
+  /* 1849 */  { MAD_F(0x058a640a) /* 0.346286811 */, 16 },
+  /* 1850 */  { MAD_F(0x058b69e7) /* 0.346536545 */, 16 },
+  /* 1851 */  { MAD_F(0x058c6fd1) /* 0.346786323 */, 16 },
+  /* 1852 */  { MAD_F(0x058d75c6) /* 0.347036147 */, 16 },
+  /* 1853 */  { MAD_F(0x058e7bc8) /* 0.347286015 */, 16 },
+  /* 1854 */  { MAD_F(0x058f81d5) /* 0.347535929 */, 16 },
+  /* 1855 */  { MAD_F(0x059087ef) /* 0.347785887 */, 16 },
+
+  /* 1856 */  { MAD_F(0x05918e15) /* 0.348035890 */, 16 },
+  /* 1857 */  { MAD_F(0x05929447) /* 0.348285939 */, 16 },
+  /* 1858 */  { MAD_F(0x05939a84) /* 0.348536032 */, 16 },
+  /* 1859 */  { MAD_F(0x0594a0ce) /* 0.348786170 */, 16 },
+  /* 1860 */  { MAD_F(0x0595a724) /* 0.349036353 */, 16 },
+  /* 1861 */  { MAD_F(0x0596ad86) /* 0.349286580 */, 16 },
+  /* 1862 */  { MAD_F(0x0597b3f4) /* 0.349536853 */, 16 },
+  /* 1863 */  { MAD_F(0x0598ba6e) /* 0.349787170 */, 16 },
+  /* 1864 */  { MAD_F(0x0599c0f4) /* 0.350037532 */, 16 },
+  /* 1865 */  { MAD_F(0x059ac786) /* 0.350287939 */, 16 },
+  /* 1866 */  { MAD_F(0x059bce25) /* 0.350538391 */, 16 },
+  /* 1867 */  { MAD_F(0x059cd4cf) /* 0.350788887 */, 16 },
+  /* 1868 */  { MAD_F(0x059ddb85) /* 0.351039428 */, 16 },
+  /* 1869 */  { MAD_F(0x059ee247) /* 0.351290014 */, 16 },
+  /* 1870 */  { MAD_F(0x059fe915) /* 0.351540645 */, 16 },
+  /* 1871 */  { MAD_F(0x05a0efef) /* 0.351791320 */, 16 },
+
+  /* 1872 */  { MAD_F(0x05a1f6d5) /* 0.352042040 */, 16 },
+  /* 1873 */  { MAD_F(0x05a2fdc7) /* 0.352292804 */, 16 },
+  /* 1874 */  { MAD_F(0x05a404c5) /* 0.352543613 */, 16 },
+  /* 1875 */  { MAD_F(0x05a50bcf) /* 0.352794467 */, 16 },
+  /* 1876 */  { MAD_F(0x05a612e5) /* 0.353045365 */, 16 },
+  /* 1877 */  { MAD_F(0x05a71a07) /* 0.353296308 */, 16 },
+  /* 1878 */  { MAD_F(0x05a82135) /* 0.353547296 */, 16 },
+  /* 1879 */  { MAD_F(0x05a9286f) /* 0.353798328 */, 16 },
+  /* 1880 */  { MAD_F(0x05aa2fb5) /* 0.354049405 */, 16 },
+  /* 1881 */  { MAD_F(0x05ab3707) /* 0.354300526 */, 16 },
+  /* 1882 */  { MAD_F(0x05ac3e65) /* 0.354551691 */, 16 },
+  /* 1883 */  { MAD_F(0x05ad45ce) /* 0.354802901 */, 16 },
+  /* 1884 */  { MAD_F(0x05ae4d44) /* 0.355054156 */, 16 },
+  /* 1885 */  { MAD_F(0x05af54c6) /* 0.355305455 */, 16 },
+  /* 1886 */  { MAD_F(0x05b05c53) /* 0.355556799 */, 16 },
+  /* 1887 */  { MAD_F(0x05b163ed) /* 0.355808187 */, 16 },
+
+  /* 1888 */  { MAD_F(0x05b26b92) /* 0.356059619 */, 16 },
+  /* 1889 */  { MAD_F(0x05b37343) /* 0.356311096 */, 16 },
+  /* 1890 */  { MAD_F(0x05b47b00) /* 0.356562617 */, 16 },
+  /* 1891 */  { MAD_F(0x05b582c9) /* 0.356814182 */, 16 },
+  /* 1892 */  { MAD_F(0x05b68a9e) /* 0.357065792 */, 16 },
+  /* 1893 */  { MAD_F(0x05b7927f) /* 0.357317446 */, 16 },
+  /* 1894 */  { MAD_F(0x05b89a6c) /* 0.357569145 */, 16 },
+  /* 1895 */  { MAD_F(0x05b9a265) /* 0.357820887 */, 16 },
+  /* 1896 */  { MAD_F(0x05baaa69) /* 0.358072674 */, 16 },
+  /* 1897 */  { MAD_F(0x05bbb27a) /* 0.358324506 */, 16 },
+  /* 1898 */  { MAD_F(0x05bcba96) /* 0.358576381 */, 16 },
+  /* 1899 */  { MAD_F(0x05bdc2be) /* 0.358828301 */, 16 },
+  /* 1900 */  { MAD_F(0x05becaf2) /* 0.359080265 */, 16 },
+  /* 1901 */  { MAD_F(0x05bfd332) /* 0.359332273 */, 16 },
+  /* 1902 */  { MAD_F(0x05c0db7e) /* 0.359584326 */, 16 },
+  /* 1903 */  { MAD_F(0x05c1e3d6) /* 0.359836423 */, 16 },
+
+  /* 1904 */  { MAD_F(0x05c2ec39) /* 0.360088563 */, 16 },
+  /* 1905 */  { MAD_F(0x05c3f4a9) /* 0.360340748 */, 16 },
+  /* 1906 */  { MAD_F(0x05c4fd24) /* 0.360592977 */, 16 },
+  /* 1907 */  { MAD_F(0x05c605ab) /* 0.360845251 */, 16 },
+  /* 1908 */  { MAD_F(0x05c70e3e) /* 0.361097568 */, 16 },
+  /* 1909 */  { MAD_F(0x05c816dd) /* 0.361349929 */, 16 },
+  /* 1910 */  { MAD_F(0x05c91f87) /* 0.361602335 */, 16 },
+  /* 1911 */  { MAD_F(0x05ca283e) /* 0.361854784 */, 16 },
+  /* 1912 */  { MAD_F(0x05cb3100) /* 0.362107278 */, 16 },
+  /* 1913 */  { MAD_F(0x05cc39ce) /* 0.362359815 */, 16 },
+  /* 1914 */  { MAD_F(0x05cd42a8) /* 0.362612397 */, 16 },
+  /* 1915 */  { MAD_F(0x05ce4b8d) /* 0.362865022 */, 16 },
+  /* 1916 */  { MAD_F(0x05cf547f) /* 0.363117692 */, 16 },
+  /* 1917 */  { MAD_F(0x05d05d7c) /* 0.363370405 */, 16 },
+  /* 1918 */  { MAD_F(0x05d16685) /* 0.363623163 */, 16 },
+  /* 1919 */  { MAD_F(0x05d26f9a) /* 0.363875964 */, 16 },
+
+  /* 1920 */  { MAD_F(0x05d378bb) /* 0.364128809 */, 16 },
+  /* 1921 */  { MAD_F(0x05d481e7) /* 0.364381698 */, 16 },
+  /* 1922 */  { MAD_F(0x05d58b1f) /* 0.364634632 */, 16 },
+  /* 1923 */  { MAD_F(0x05d69463) /* 0.364887608 */, 16 },
+  /* 1924 */  { MAD_F(0x05d79db3) /* 0.365140629 */, 16 },
+  /* 1925 */  { MAD_F(0x05d8a70f) /* 0.365393694 */, 16 },
+  /* 1926 */  { MAD_F(0x05d9b076) /* 0.365646802 */, 16 },
+  /* 1927 */  { MAD_F(0x05dab9e9) /* 0.365899955 */, 16 },
+  /* 1928 */  { MAD_F(0x05dbc368) /* 0.366153151 */, 16 },
+  /* 1929 */  { MAD_F(0x05dcccf2) /* 0.366406390 */, 16 },
+  /* 1930 */  { MAD_F(0x05ddd689) /* 0.366659674 */, 16 },
+  /* 1931 */  { MAD_F(0x05dee02b) /* 0.366913001 */, 16 },
+  /* 1932 */  { MAD_F(0x05dfe9d8) /* 0.367166372 */, 16 },
+  /* 1933 */  { MAD_F(0x05e0f392) /* 0.367419787 */, 16 },
+  /* 1934 */  { MAD_F(0x05e1fd57) /* 0.367673246 */, 16 },
+  /* 1935 */  { MAD_F(0x05e30728) /* 0.367926748 */, 16 },
+
+  /* 1936 */  { MAD_F(0x05e41105) /* 0.368180294 */, 16 },
+  /* 1937 */  { MAD_F(0x05e51aed) /* 0.368433883 */, 16 },
+  /* 1938 */  { MAD_F(0x05e624e1) /* 0.368687517 */, 16 },
+  /* 1939 */  { MAD_F(0x05e72ee1) /* 0.368941193 */, 16 },
+  /* 1940 */  { MAD_F(0x05e838ed) /* 0.369194914 */, 16 },
+  /* 1941 */  { MAD_F(0x05e94304) /* 0.369448678 */, 16 },
+  /* 1942 */  { MAD_F(0x05ea4d27) /* 0.369702485 */, 16 },
+  /* 1943 */  { MAD_F(0x05eb5756) /* 0.369956336 */, 16 },
+  /* 1944 */  { MAD_F(0x05ec6190) /* 0.370210231 */, 16 },
+  /* 1945 */  { MAD_F(0x05ed6bd6) /* 0.370464169 */, 16 },
+  /* 1946 */  { MAD_F(0x05ee7628) /* 0.370718151 */, 16 },
+  /* 1947 */  { MAD_F(0x05ef8085) /* 0.370972177 */, 16 },
+  /* 1948 */  { MAD_F(0x05f08aee) /* 0.371226245 */, 16 },
+  /* 1949 */  { MAD_F(0x05f19563) /* 0.371480358 */, 16 },
+  /* 1950 */  { MAD_F(0x05f29fe3) /* 0.371734513 */, 16 },
+  /* 1951 */  { MAD_F(0x05f3aa6f) /* 0.371988712 */, 16 },
+
+  /* 1952 */  { MAD_F(0x05f4b507) /* 0.372242955 */, 16 },
+  /* 1953 */  { MAD_F(0x05f5bfab) /* 0.372497241 */, 16 },
+  /* 1954 */  { MAD_F(0x05f6ca5a) /* 0.372751570 */, 16 },
+  /* 1955 */  { MAD_F(0x05f7d514) /* 0.373005943 */, 16 },
+  /* 1956 */  { MAD_F(0x05f8dfdb) /* 0.373260359 */, 16 },
+  /* 1957 */  { MAD_F(0x05f9eaad) /* 0.373514819 */, 16 },
+  /* 1958 */  { MAD_F(0x05faf58a) /* 0.373769322 */, 16 },
+  /* 1959 */  { MAD_F(0x05fc0073) /* 0.374023868 */, 16 },
+  /* 1960 */  { MAD_F(0x05fd0b68) /* 0.374278458 */, 16 },
+  /* 1961 */  { MAD_F(0x05fe1669) /* 0.374533091 */, 16 },
+  /* 1962 */  { MAD_F(0x05ff2175) /* 0.374787767 */, 16 },
+  /* 1963 */  { MAD_F(0x06002c8d) /* 0.375042486 */, 16 },
+  /* 1964 */  { MAD_F(0x060137b0) /* 0.375297249 */, 16 },
+  /* 1965 */  { MAD_F(0x060242df) /* 0.375552055 */, 16 },
+  /* 1966 */  { MAD_F(0x06034e19) /* 0.375806904 */, 16 },
+  /* 1967 */  { MAD_F(0x0604595f) /* 0.376061796 */, 16 },
+
+  /* 1968 */  { MAD_F(0x060564b1) /* 0.376316732 */, 16 },
+  /* 1969 */  { MAD_F(0x0606700f) /* 0.376571710 */, 16 },
+  /* 1970 */  { MAD_F(0x06077b77) /* 0.376826732 */, 16 },
+  /* 1971 */  { MAD_F(0x060886ec) /* 0.377081797 */, 16 },
+  /* 1972 */  { MAD_F(0x0609926c) /* 0.377336905 */, 16 },
+  /* 1973 */  { MAD_F(0x060a9df8) /* 0.377592057 */, 16 },
+  /* 1974 */  { MAD_F(0x060ba98f) /* 0.377847251 */, 16 },
+  /* 1975 */  { MAD_F(0x060cb532) /* 0.378102489 */, 16 },
+  /* 1976 */  { MAD_F(0x060dc0e0) /* 0.378357769 */, 16 },
+  /* 1977 */  { MAD_F(0x060ecc9a) /* 0.378613093 */, 16 },
+  /* 1978 */  { MAD_F(0x060fd860) /* 0.378868460 */, 16 },
+  /* 1979 */  { MAD_F(0x0610e431) /* 0.379123870 */, 16 },
+  /* 1980 */  { MAD_F(0x0611f00d) /* 0.379379322 */, 16 },
+  /* 1981 */  { MAD_F(0x0612fbf5) /* 0.379634818 */, 16 },
+  /* 1982 */  { MAD_F(0x061407e9) /* 0.379890357 */, 16 },
+  /* 1983 */  { MAD_F(0x061513e8) /* 0.380145939 */, 16 },
+
+  /* 1984 */  { MAD_F(0x06161ff3) /* 0.380401563 */, 16 },
+  /* 1985 */  { MAD_F(0x06172c09) /* 0.380657231 */, 16 },
+  /* 1986 */  { MAD_F(0x0618382b) /* 0.380912942 */, 16 },
+  /* 1987 */  { MAD_F(0x06194458) /* 0.381168695 */, 16 },
+  /* 1988 */  { MAD_F(0x061a5091) /* 0.381424492 */, 16 },
+  /* 1989 */  { MAD_F(0x061b5cd5) /* 0.381680331 */, 16 },
+  /* 1990 */  { MAD_F(0x061c6925) /* 0.381936213 */, 16 },
+  /* 1991 */  { MAD_F(0x061d7581) /* 0.382192138 */, 16 },
+  /* 1992 */  { MAD_F(0x061e81e8) /* 0.382448106 */, 16 },
+  /* 1993 */  { MAD_F(0x061f8e5a) /* 0.382704117 */, 16 },
+  /* 1994 */  { MAD_F(0x06209ad8) /* 0.382960171 */, 16 },
+  /* 1995 */  { MAD_F(0x0621a761) /* 0.383216267 */, 16 },
+  /* 1996 */  { MAD_F(0x0622b3f6) /* 0.383472406 */, 16 },
+  /* 1997 */  { MAD_F(0x0623c096) /* 0.383728588 */, 16 },
+  /* 1998 */  { MAD_F(0x0624cd42) /* 0.383984813 */, 16 },
+  /* 1999 */  { MAD_F(0x0625d9f9) /* 0.384241080 */, 16 },
+
+  /* 2000 */  { MAD_F(0x0626e6bc) /* 0.384497391 */, 16 },
+  /* 2001 */  { MAD_F(0x0627f38a) /* 0.384753744 */, 16 },
+  /* 2002 */  { MAD_F(0x06290064) /* 0.385010139 */, 16 },
+  /* 2003 */  { MAD_F(0x062a0d49) /* 0.385266578 */, 16 },
+  /* 2004 */  { MAD_F(0x062b1a3a) /* 0.385523059 */, 16 },
+  /* 2005 */  { MAD_F(0x062c2736) /* 0.385779582 */, 16 },
+  /* 2006 */  { MAD_F(0x062d343d) /* 0.386036149 */, 16 },
+  /* 2007 */  { MAD_F(0x062e4150) /* 0.386292758 */, 16 },
+  /* 2008 */  { MAD_F(0x062f4e6f) /* 0.386549409 */, 16 },
+  /* 2009 */  { MAD_F(0x06305b99) /* 0.386806104 */, 16 },
+  /* 2010 */  { MAD_F(0x063168ce) /* 0.387062840 */, 16 },
+  /* 2011 */  { MAD_F(0x0632760f) /* 0.387319620 */, 16 },
+  /* 2012 */  { MAD_F(0x0633835b) /* 0.387576442 */, 16 },
+  /* 2013 */  { MAD_F(0x063490b2) /* 0.387833306 */, 16 },
+  /* 2014 */  { MAD_F(0x06359e15) /* 0.388090213 */, 16 },
+  /* 2015 */  { MAD_F(0x0636ab83) /* 0.388347163 */, 16 },
+
+  /* 2016 */  { MAD_F(0x0637b8fd) /* 0.388604155 */, 16 },
+  /* 2017 */  { MAD_F(0x0638c682) /* 0.388861190 */, 16 },
+  /* 2018 */  { MAD_F(0x0639d413) /* 0.389118267 */, 16 },
+  /* 2019 */  { MAD_F(0x063ae1af) /* 0.389375386 */, 16 },
+  /* 2020 */  { MAD_F(0x063bef56) /* 0.389632548 */, 16 },
+  /* 2021 */  { MAD_F(0x063cfd09) /* 0.389889752 */, 16 },
+  /* 2022 */  { MAD_F(0x063e0ac7) /* 0.390146999 */, 16 },
+  /* 2023 */  { MAD_F(0x063f1891) /* 0.390404289 */, 16 },
+  /* 2024 */  { MAD_F(0x06402666) /* 0.390661620 */, 16 },
+  /* 2025 */  { MAD_F(0x06413446) /* 0.390918994 */, 16 },
+  /* 2026 */  { MAD_F(0x06424232) /* 0.391176411 */, 16 },
+  /* 2027 */  { MAD_F(0x06435029) /* 0.391433869 */, 16 },
+  /* 2028 */  { MAD_F(0x06445e2b) /* 0.391691371 */, 16 },
+  /* 2029 */  { MAD_F(0x06456c39) /* 0.391948914 */, 16 },
+  /* 2030 */  { MAD_F(0x06467a52) /* 0.392206500 */, 16 },
+  /* 2031 */  { MAD_F(0x06478877) /* 0.392464128 */, 16 },
+
+  /* 2032 */  { MAD_F(0x064896a7) /* 0.392721798 */, 16 },
+  /* 2033 */  { MAD_F(0x0649a4e2) /* 0.392979511 */, 16 },
+  /* 2034 */  { MAD_F(0x064ab328) /* 0.393237266 */, 16 },
+  /* 2035 */  { MAD_F(0x064bc17a) /* 0.393495063 */, 16 },
+  /* 2036 */  { MAD_F(0x064ccfd8) /* 0.393752902 */, 16 },
+  /* 2037 */  { MAD_F(0x064dde40) /* 0.394010784 */, 16 },
+  /* 2038 */  { MAD_F(0x064eecb4) /* 0.394268707 */, 16 },
+  /* 2039 */  { MAD_F(0x064ffb33) /* 0.394526673 */, 16 },
+  /* 2040 */  { MAD_F(0x065109be) /* 0.394784681 */, 16 },
+  /* 2041 */  { MAD_F(0x06521854) /* 0.395042732 */, 16 },
+  /* 2042 */  { MAD_F(0x065326f5) /* 0.395300824 */, 16 },
+  /* 2043 */  { MAD_F(0x065435a1) /* 0.395558959 */, 16 },
+  /* 2044 */  { MAD_F(0x06554459) /* 0.395817135 */, 16 },
+  /* 2045 */  { MAD_F(0x0656531c) /* 0.396075354 */, 16 },
+  /* 2046 */  { MAD_F(0x065761ea) /* 0.396333615 */, 16 },
+  /* 2047 */  { MAD_F(0x065870c4) /* 0.396591918 */, 16 },
+
+  /* 2048 */  { MAD_F(0x06597fa9) /* 0.396850263 */, 16 },
+  /* 2049 */  { MAD_F(0x065a8e99) /* 0.397108650 */, 16 },
+  /* 2050 */  { MAD_F(0x065b9d95) /* 0.397367079 */, 16 },
+  /* 2051 */  { MAD_F(0x065cac9c) /* 0.397625550 */, 16 },
+  /* 2052 */  { MAD_F(0x065dbbae) /* 0.397884063 */, 16 },
+  /* 2053 */  { MAD_F(0x065ecacb) /* 0.398142619 */, 16 },
+  /* 2054 */  { MAD_F(0x065fd9f4) /* 0.398401216 */, 16 },
+  /* 2055 */  { MAD_F(0x0660e928) /* 0.398659855 */, 16 },
+  /* 2056 */  { MAD_F(0x0661f867) /* 0.398918536 */, 16 },
+  /* 2057 */  { MAD_F(0x066307b1) /* 0.399177259 */, 16 },
+  /* 2058 */  { MAD_F(0x06641707) /* 0.399436024 */, 16 },
+  /* 2059 */  { MAD_F(0x06652668) /* 0.399694831 */, 16 },
+  /* 2060 */  { MAD_F(0x066635d4) /* 0.399953679 */, 16 },
+  /* 2061 */  { MAD_F(0x0667454c) /* 0.400212570 */, 16 },
+  /* 2062 */  { MAD_F(0x066854ce) /* 0.400471503 */, 16 },
+  /* 2063 */  { MAD_F(0x0669645c) /* 0.400730477 */, 16 },
+
+  /* 2064 */  { MAD_F(0x066a73f5) /* 0.400989493 */, 16 },
+  /* 2065 */  { MAD_F(0x066b839a) /* 0.401248551 */, 16 },
+  /* 2066 */  { MAD_F(0x066c9349) /* 0.401507651 */, 16 },
+  /* 2067 */  { MAD_F(0x066da304) /* 0.401766793 */, 16 },
+  /* 2068 */  { MAD_F(0x066eb2ca) /* 0.402025976 */, 16 },
+  /* 2069 */  { MAD_F(0x066fc29b) /* 0.402285202 */, 16 },
+  /* 2070 */  { MAD_F(0x0670d278) /* 0.402544469 */, 16 },
+  /* 2071 */  { MAD_F(0x0671e25f) /* 0.402803777 */, 16 },
+  /* 2072 */  { MAD_F(0x0672f252) /* 0.403063128 */, 16 },
+  /* 2073 */  { MAD_F(0x06740250) /* 0.403322520 */, 16 },
+  /* 2074 */  { MAD_F(0x0675125a) /* 0.403581954 */, 16 },
+  /* 2075 */  { MAD_F(0x0676226e) /* 0.403841430 */, 16 },
+  /* 2076 */  { MAD_F(0x0677328e) /* 0.404100947 */, 16 },
+  /* 2077 */  { MAD_F(0x067842b9) /* 0.404360506 */, 16 },
+  /* 2078 */  { MAD_F(0x067952ef) /* 0.404620107 */, 16 },
+  /* 2079 */  { MAD_F(0x067a6330) /* 0.404879749 */, 16 },
+
+  /* 2080 */  { MAD_F(0x067b737c) /* 0.405139433 */, 16 },
+  /* 2081 */  { MAD_F(0x067c83d4) /* 0.405399159 */, 16 },
+  /* 2082 */  { MAD_F(0x067d9436) /* 0.405658926 */, 16 },
+  /* 2083 */  { MAD_F(0x067ea4a4) /* 0.405918735 */, 16 },
+  /* 2084 */  { MAD_F(0x067fb51d) /* 0.406178585 */, 16 },
+  /* 2085 */  { MAD_F(0x0680c5a2) /* 0.406438477 */, 16 },
+  /* 2086 */  { MAD_F(0x0681d631) /* 0.406698410 */, 16 },
+  /* 2087 */  { MAD_F(0x0682e6cb) /* 0.406958385 */, 16 },
+  /* 2088 */  { MAD_F(0x0683f771) /* 0.407218402 */, 16 },
+  /* 2089 */  { MAD_F(0x06850822) /* 0.407478460 */, 16 },
+  /* 2090 */  { MAD_F(0x068618de) /* 0.407738559 */, 16 },
+  /* 2091 */  { MAD_F(0x068729a5) /* 0.407998700 */, 16 },
+  /* 2092 */  { MAD_F(0x06883a77) /* 0.408258883 */, 16 },
+  /* 2093 */  { MAD_F(0x06894b55) /* 0.408519107 */, 16 },
+  /* 2094 */  { MAD_F(0x068a5c3d) /* 0.408779372 */, 16 },
+  /* 2095 */  { MAD_F(0x068b6d31) /* 0.409039679 */, 16 },
+
+  /* 2096 */  { MAD_F(0x068c7e2f) /* 0.409300027 */, 16 },
+  /* 2097 */  { MAD_F(0x068d8f39) /* 0.409560417 */, 16 },
+  /* 2098 */  { MAD_F(0x068ea04e) /* 0.409820848 */, 16 },
+  /* 2099 */  { MAD_F(0x068fb16e) /* 0.410081321 */, 16 },
+  /* 2100 */  { MAD_F(0x0690c299) /* 0.410341834 */, 16 },
+  /* 2101 */  { MAD_F(0x0691d3cf) /* 0.410602390 */, 16 },
+  /* 2102 */  { MAD_F(0x0692e511) /* 0.410862986 */, 16 },
+  /* 2103 */  { MAD_F(0x0693f65d) /* 0.411123624 */, 16 },
+  /* 2104 */  { MAD_F(0x069507b5) /* 0.411384303 */, 16 },
+  /* 2105 */  { MAD_F(0x06961917) /* 0.411645024 */, 16 },
+  /* 2106 */  { MAD_F(0x06972a85) /* 0.411905785 */, 16 },
+  /* 2107 */  { MAD_F(0x06983bfe) /* 0.412166588 */, 16 },
+  /* 2108 */  { MAD_F(0x06994d82) /* 0.412427433 */, 16 },
+  /* 2109 */  { MAD_F(0x069a5f11) /* 0.412688318 */, 16 },
+  /* 2110 */  { MAD_F(0x069b70ab) /* 0.412949245 */, 16 },
+  /* 2111 */  { MAD_F(0x069c8250) /* 0.413210213 */, 16 },
+
+  /* 2112 */  { MAD_F(0x069d9400) /* 0.413471222 */, 16 },
+  /* 2113 */  { MAD_F(0x069ea5bb) /* 0.413732273 */, 16 },
+  /* 2114 */  { MAD_F(0x069fb781) /* 0.413993364 */, 16 },
+  /* 2115 */  { MAD_F(0x06a0c953) /* 0.414254497 */, 16 },
+  /* 2116 */  { MAD_F(0x06a1db2f) /* 0.414515671 */, 16 },
+  /* 2117 */  { MAD_F(0x06a2ed16) /* 0.414776886 */, 16 },
+  /* 2118 */  { MAD_F(0x06a3ff09) /* 0.415038142 */, 16 },
+  /* 2119 */  { MAD_F(0x06a51106) /* 0.415299440 */, 16 },
+  /* 2120 */  { MAD_F(0x06a6230f) /* 0.415560778 */, 16 },
+  /* 2121 */  { MAD_F(0x06a73522) /* 0.415822157 */, 16 },
+  /* 2122 */  { MAD_F(0x06a84741) /* 0.416083578 */, 16 },
+  /* 2123 */  { MAD_F(0x06a9596a) /* 0.416345040 */, 16 },
+  /* 2124 */  { MAD_F(0x06aa6b9f) /* 0.416606542 */, 16 },
+  /* 2125 */  { MAD_F(0x06ab7ddf) /* 0.416868086 */, 16 },
+  /* 2126 */  { MAD_F(0x06ac9029) /* 0.417129671 */, 16 },
+  /* 2127 */  { MAD_F(0x06ada27f) /* 0.417391297 */, 16 },
+
+  /* 2128 */  { MAD_F(0x06aeb4e0) /* 0.417652964 */, 16 },
+  /* 2129 */  { MAD_F(0x06afc74b) /* 0.417914672 */, 16 },
+  /* 2130 */  { MAD_F(0x06b0d9c2) /* 0.418176420 */, 16 },
+  /* 2131 */  { MAD_F(0x06b1ec43) /* 0.418438210 */, 16 },
+  /* 2132 */  { MAD_F(0x06b2fed0) /* 0.418700041 */, 16 },
+  /* 2133 */  { MAD_F(0x06b41168) /* 0.418961912 */, 16 },
+  /* 2134 */  { MAD_F(0x06b5240a) /* 0.419223825 */, 16 },
+  /* 2135 */  { MAD_F(0x06b636b8) /* 0.419485778 */, 16 },
+  /* 2136 */  { MAD_F(0x06b74971) /* 0.419747773 */, 16 },
+  /* 2137 */  { MAD_F(0x06b85c34) /* 0.420009808 */, 16 },
+  /* 2138 */  { MAD_F(0x06b96f03) /* 0.420271884 */, 16 },
+  /* 2139 */  { MAD_F(0x06ba81dc) /* 0.420534001 */, 16 },
+  /* 2140 */  { MAD_F(0x06bb94c1) /* 0.420796159 */, 16 },
+  /* 2141 */  { MAD_F(0x06bca7b0) /* 0.421058358 */, 16 },
+  /* 2142 */  { MAD_F(0x06bdbaaa) /* 0.421320597 */, 16 },
+  /* 2143 */  { MAD_F(0x06becdb0) /* 0.421582878 */, 16 },
+
+  /* 2144 */  { MAD_F(0x06bfe0c0) /* 0.421845199 */, 16 },
+  /* 2145 */  { MAD_F(0x06c0f3db) /* 0.422107561 */, 16 },
+  /* 2146 */  { MAD_F(0x06c20702) /* 0.422369964 */, 16 },
+  /* 2147 */  { MAD_F(0x06c31a33) /* 0.422632407 */, 16 },
+  /* 2148 */  { MAD_F(0x06c42d6f) /* 0.422894891 */, 16 },
+  /* 2149 */  { MAD_F(0x06c540b6) /* 0.423157416 */, 16 },
+  /* 2150 */  { MAD_F(0x06c65408) /* 0.423419982 */, 16 },
+  /* 2151 */  { MAD_F(0x06c76765) /* 0.423682588 */, 16 },
+  /* 2152 */  { MAD_F(0x06c87acc) /* 0.423945235 */, 16 },
+  /* 2153 */  { MAD_F(0x06c98e3f) /* 0.424207923 */, 16 },
+  /* 2154 */  { MAD_F(0x06caa1bd) /* 0.424470652 */, 16 },
+  /* 2155 */  { MAD_F(0x06cbb545) /* 0.424733421 */, 16 },
+  /* 2156 */  { MAD_F(0x06ccc8d9) /* 0.424996230 */, 16 },
+  /* 2157 */  { MAD_F(0x06cddc77) /* 0.425259081 */, 16 },
+  /* 2158 */  { MAD_F(0x06cef020) /* 0.425521972 */, 16 },
+  /* 2159 */  { MAD_F(0x06d003d4) /* 0.425784903 */, 16 },
+
+  /* 2160 */  { MAD_F(0x06d11794) /* 0.426047876 */, 16 },
+  /* 2161 */  { MAD_F(0x06d22b5e) /* 0.426310889 */, 16 },
+  /* 2162 */  { MAD_F(0x06d33f32) /* 0.426573942 */, 16 },
+  /* 2163 */  { MAD_F(0x06d45312) /* 0.426837036 */, 16 },
+  /* 2164 */  { MAD_F(0x06d566fd) /* 0.427100170 */, 16 },
+  /* 2165 */  { MAD_F(0x06d67af2) /* 0.427363345 */, 16 },
+  /* 2166 */  { MAD_F(0x06d78ef3) /* 0.427626561 */, 16 },
+  /* 2167 */  { MAD_F(0x06d8a2fe) /* 0.427889817 */, 16 },
+  /* 2168 */  { MAD_F(0x06d9b714) /* 0.428153114 */, 16 },
+  /* 2169 */  { MAD_F(0x06dacb35) /* 0.428416451 */, 16 },
+  /* 2170 */  { MAD_F(0x06dbdf61) /* 0.428679828 */, 16 },
+  /* 2171 */  { MAD_F(0x06dcf398) /* 0.428943246 */, 16 },
+  /* 2172 */  { MAD_F(0x06de07d9) /* 0.429206704 */, 16 },
+  /* 2173 */  { MAD_F(0x06df1c26) /* 0.429470203 */, 16 },
+  /* 2174 */  { MAD_F(0x06e0307d) /* 0.429733743 */, 16 },
+  /* 2175 */  { MAD_F(0x06e144df) /* 0.429997322 */, 16 },
+
+  /* 2176 */  { MAD_F(0x06e2594c) /* 0.430260942 */, 16 },
+  /* 2177 */  { MAD_F(0x06e36dc4) /* 0.430524603 */, 16 },
+  /* 2178 */  { MAD_F(0x06e48246) /* 0.430788304 */, 16 },
+  /* 2179 */  { MAD_F(0x06e596d4) /* 0.431052045 */, 16 },
+  /* 2180 */  { MAD_F(0x06e6ab6c) /* 0.431315826 */, 16 },
+  /* 2181 */  { MAD_F(0x06e7c00f) /* 0.431579648 */, 16 },
+  /* 2182 */  { MAD_F(0x06e8d4bd) /* 0.431843511 */, 16 },
+  /* 2183 */  { MAD_F(0x06e9e976) /* 0.432107413 */, 16 },
+  /* 2184 */  { MAD_F(0x06eafe3a) /* 0.432371356 */, 16 },
+  /* 2185 */  { MAD_F(0x06ec1308) /* 0.432635339 */, 16 },
+  /* 2186 */  { MAD_F(0x06ed27e2) /* 0.432899362 */, 16 },
+  /* 2187 */  { MAD_F(0x06ee3cc6) /* 0.433163426 */, 16 },
+  /* 2188 */  { MAD_F(0x06ef51b4) /* 0.433427530 */, 16 },
+  /* 2189 */  { MAD_F(0x06f066ae) /* 0.433691674 */, 16 },
+  /* 2190 */  { MAD_F(0x06f17bb3) /* 0.433955859 */, 16 },
+  /* 2191 */  { MAD_F(0x06f290c2) /* 0.434220083 */, 16 },
+
+  /* 2192 */  { MAD_F(0x06f3a5dc) /* 0.434484348 */, 16 },
+  /* 2193 */  { MAD_F(0x06f4bb01) /* 0.434748653 */, 16 },
+  /* 2194 */  { MAD_F(0x06f5d030) /* 0.435012998 */, 16 },
+  /* 2195 */  { MAD_F(0x06f6e56b) /* 0.435277383 */, 16 },
+  /* 2196 */  { MAD_F(0x06f7fab0) /* 0.435541809 */, 16 },
+  /* 2197 */  { MAD_F(0x06f91000) /* 0.435806274 */, 16 },
+  /* 2198 */  { MAD_F(0x06fa255a) /* 0.436070780 */, 16 },
+  /* 2199 */  { MAD_F(0x06fb3ac0) /* 0.436335326 */, 16 },
+  /* 2200 */  { MAD_F(0x06fc5030) /* 0.436599912 */, 16 },
+  /* 2201 */  { MAD_F(0x06fd65ab) /* 0.436864538 */, 16 },
+  /* 2202 */  { MAD_F(0x06fe7b31) /* 0.437129204 */, 16 },
+  /* 2203 */  { MAD_F(0x06ff90c2) /* 0.437393910 */, 16 },
+  /* 2204 */  { MAD_F(0x0700a65d) /* 0.437658657 */, 16 },
+  /* 2205 */  { MAD_F(0x0701bc03) /* 0.437923443 */, 16 },
+  /* 2206 */  { MAD_F(0x0702d1b4) /* 0.438188269 */, 16 },
+  /* 2207 */  { MAD_F(0x0703e76f) /* 0.438453136 */, 16 },
+
+  /* 2208 */  { MAD_F(0x0704fd35) /* 0.438718042 */, 16 },
+  /* 2209 */  { MAD_F(0x07061306) /* 0.438982988 */, 16 },
+  /* 2210 */  { MAD_F(0x070728e2) /* 0.439247975 */, 16 },
+  /* 2211 */  { MAD_F(0x07083ec9) /* 0.439513001 */, 16 },
+  /* 2212 */  { MAD_F(0x070954ba) /* 0.439778067 */, 16 },
+  /* 2213 */  { MAD_F(0x070a6ab6) /* 0.440043173 */, 16 },
+  /* 2214 */  { MAD_F(0x070b80bc) /* 0.440308320 */, 16 },
+  /* 2215 */  { MAD_F(0x070c96ce) /* 0.440573506 */, 16 },
+  /* 2216 */  { MAD_F(0x070dacea) /* 0.440838732 */, 16 },
+  /* 2217 */  { MAD_F(0x070ec310) /* 0.441103997 */, 16 },
+  /* 2218 */  { MAD_F(0x070fd942) /* 0.441369303 */, 16 },
+  /* 2219 */  { MAD_F(0x0710ef7e) /* 0.441634649 */, 16 },
+  /* 2220 */  { MAD_F(0x071205c5) /* 0.441900034 */, 16 },
+  /* 2221 */  { MAD_F(0x07131c17) /* 0.442165460 */, 16 },
+  /* 2222 */  { MAD_F(0x07143273) /* 0.442430925 */, 16 },
+  /* 2223 */  { MAD_F(0x071548da) /* 0.442696430 */, 16 },
+
+  /* 2224 */  { MAD_F(0x07165f4b) /* 0.442961975 */, 16 },
+  /* 2225 */  { MAD_F(0x071775c8) /* 0.443227559 */, 16 },
+  /* 2226 */  { MAD_F(0x07188c4f) /* 0.443493184 */, 16 },
+  /* 2227 */  { MAD_F(0x0719a2e0) /* 0.443758848 */, 16 },
+  /* 2228 */  { MAD_F(0x071ab97d) /* 0.444024552 */, 16 },
+  /* 2229 */  { MAD_F(0x071bd024) /* 0.444290296 */, 16 },
+  /* 2230 */  { MAD_F(0x071ce6d6) /* 0.444556079 */, 16 },
+  /* 2231 */  { MAD_F(0x071dfd92) /* 0.444821902 */, 16 },
+  /* 2232 */  { MAD_F(0x071f1459) /* 0.445087765 */, 16 },
+  /* 2233 */  { MAD_F(0x07202b2b) /* 0.445353668 */, 16 },
+  /* 2234 */  { MAD_F(0x07214207) /* 0.445619610 */, 16 },
+  /* 2235 */  { MAD_F(0x072258ee) /* 0.445885592 */, 16 },
+  /* 2236 */  { MAD_F(0x07236fe0) /* 0.446151614 */, 16 },
+  /* 2237 */  { MAD_F(0x072486dc) /* 0.446417675 */, 16 },
+  /* 2238 */  { MAD_F(0x07259de3) /* 0.446683776 */, 16 },
+  /* 2239 */  { MAD_F(0x0726b4f4) /* 0.446949917 */, 16 },
+
+  /* 2240 */  { MAD_F(0x0727cc11) /* 0.447216097 */, 16 },
+  /* 2241 */  { MAD_F(0x0728e338) /* 0.447482317 */, 16 },
+  /* 2242 */  { MAD_F(0x0729fa69) /* 0.447748576 */, 16 },
+  /* 2243 */  { MAD_F(0x072b11a5) /* 0.448014875 */, 16 },
+  /* 2244 */  { MAD_F(0x072c28ec) /* 0.448281214 */, 16 },
+  /* 2245 */  { MAD_F(0x072d403d) /* 0.448547592 */, 16 },
+  /* 2246 */  { MAD_F(0x072e5799) /* 0.448814010 */, 16 },
+  /* 2247 */  { MAD_F(0x072f6f00) /* 0.449080467 */, 16 },
+  /* 2248 */  { MAD_F(0x07308671) /* 0.449346964 */, 16 },
+  /* 2249 */  { MAD_F(0x07319ded) /* 0.449613501 */, 16 },
+  /* 2250 */  { MAD_F(0x0732b573) /* 0.449880076 */, 16 },
+  /* 2251 */  { MAD_F(0x0733cd04) /* 0.450146692 */, 16 },
+  /* 2252 */  { MAD_F(0x0734e4a0) /* 0.450413347 */, 16 },
+  /* 2253 */  { MAD_F(0x0735fc46) /* 0.450680041 */, 16 },
+  /* 2254 */  { MAD_F(0x073713f7) /* 0.450946775 */, 16 },
+  /* 2255 */  { MAD_F(0x07382bb2) /* 0.451213548 */, 16 },
+
+  /* 2256 */  { MAD_F(0x07394378) /* 0.451480360 */, 16 },
+  /* 2257 */  { MAD_F(0x073a5b49) /* 0.451747213 */, 16 },
+  /* 2258 */  { MAD_F(0x073b7324) /* 0.452014104 */, 16 },
+  /* 2259 */  { MAD_F(0x073c8b0a) /* 0.452281035 */, 16 },
+  /* 2260 */  { MAD_F(0x073da2fa) /* 0.452548005 */, 16 },
+  /* 2261 */  { MAD_F(0x073ebaf5) /* 0.452815015 */, 16 },
+  /* 2262 */  { MAD_F(0x073fd2fa) /* 0.453082064 */, 16 },
+  /* 2263 */  { MAD_F(0x0740eb0a) /* 0.453349152 */, 16 },
+  /* 2264 */  { MAD_F(0x07420325) /* 0.453616280 */, 16 },
+  /* 2265 */  { MAD_F(0x07431b4a) /* 0.453883447 */, 16 },
+  /* 2266 */  { MAD_F(0x0744337a) /* 0.454150653 */, 16 },
+  /* 2267 */  { MAD_F(0x07454bb4) /* 0.454417899 */, 16 },
+  /* 2268 */  { MAD_F(0x074663f8) /* 0.454685184 */, 16 },
+  /* 2269 */  { MAD_F(0x07477c48) /* 0.454952508 */, 16 },
+  /* 2270 */  { MAD_F(0x074894a2) /* 0.455219872 */, 16 },
+  /* 2271 */  { MAD_F(0x0749ad06) /* 0.455487275 */, 16 },
+
+  /* 2272 */  { MAD_F(0x074ac575) /* 0.455754717 */, 16 },
+  /* 2273 */  { MAD_F(0x074bddee) /* 0.456022198 */, 16 },
+  /* 2274 */  { MAD_F(0x074cf672) /* 0.456289719 */, 16 },
+  /* 2275 */  { MAD_F(0x074e0f01) /* 0.456557278 */, 16 },
+  /* 2276 */  { MAD_F(0x074f279a) /* 0.456824877 */, 16 },
+  /* 2277 */  { MAD_F(0x0750403e) /* 0.457092516 */, 16 },
+  /* 2278 */  { MAD_F(0x075158ec) /* 0.457360193 */, 16 },
+  /* 2279 */  { MAD_F(0x075271a4) /* 0.457627909 */, 16 },
+  /* 2280 */  { MAD_F(0x07538a67) /* 0.457895665 */, 16 },
+  /* 2281 */  { MAD_F(0x0754a335) /* 0.458163460 */, 16 },
+  /* 2282 */  { MAD_F(0x0755bc0d) /* 0.458431294 */, 16 },
+  /* 2283 */  { MAD_F(0x0756d4f0) /* 0.458699167 */, 16 },
+  /* 2284 */  { MAD_F(0x0757eddd) /* 0.458967079 */, 16 },
+  /* 2285 */  { MAD_F(0x075906d5) /* 0.459235030 */, 16 },
+  /* 2286 */  { MAD_F(0x075a1fd7) /* 0.459503021 */, 16 },
+  /* 2287 */  { MAD_F(0x075b38e3) /* 0.459771050 */, 16 },
+
+  /* 2288 */  { MAD_F(0x075c51fa) /* 0.460039119 */, 16 },
+  /* 2289 */  { MAD_F(0x075d6b1c) /* 0.460307226 */, 16 },
+  /* 2290 */  { MAD_F(0x075e8448) /* 0.460575373 */, 16 },
+  /* 2291 */  { MAD_F(0x075f9d7f) /* 0.460843559 */, 16 },
+  /* 2292 */  { MAD_F(0x0760b6c0) /* 0.461111783 */, 16 },
+  /* 2293 */  { MAD_F(0x0761d00b) /* 0.461380047 */, 16 },
+  /* 2294 */  { MAD_F(0x0762e961) /* 0.461648350 */, 16 },
+  /* 2295 */  { MAD_F(0x076402c1) /* 0.461916691 */, 16 },
+  /* 2296 */  { MAD_F(0x07651c2c) /* 0.462185072 */, 16 },
+  /* 2297 */  { MAD_F(0x076635a2) /* 0.462453492 */, 16 },
+  /* 2298 */  { MAD_F(0x07674f22) /* 0.462721950 */, 16 },
+  /* 2299 */  { MAD_F(0x076868ac) /* 0.462990448 */, 16 },
+  /* 2300 */  { MAD_F(0x07698240) /* 0.463258984 */, 16 },
+  /* 2301 */  { MAD_F(0x076a9be0) /* 0.463527560 */, 16 },
+  /* 2302 */  { MAD_F(0x076bb589) /* 0.463796174 */, 16 },
+  /* 2303 */  { MAD_F(0x076ccf3d) /* 0.464064827 */, 16 },
+
+  /* 2304 */  { MAD_F(0x076de8fc) /* 0.464333519 */, 16 },
+  /* 2305 */  { MAD_F(0x076f02c5) /* 0.464602250 */, 16 },
+  /* 2306 */  { MAD_F(0x07701c98) /* 0.464871020 */, 16 },
+  /* 2307 */  { MAD_F(0x07713676) /* 0.465139829 */, 16 },
+  /* 2308 */  { MAD_F(0x0772505e) /* 0.465408676 */, 16 },
+  /* 2309 */  { MAD_F(0x07736a51) /* 0.465677563 */, 16 },
+  /* 2310 */  { MAD_F(0x0774844e) /* 0.465946488 */, 16 },
+  /* 2311 */  { MAD_F(0x07759e55) /* 0.466215452 */, 16 },
+  /* 2312 */  { MAD_F(0x0776b867) /* 0.466484455 */, 16 },
+  /* 2313 */  { MAD_F(0x0777d283) /* 0.466753496 */, 16 },
+  /* 2314 */  { MAD_F(0x0778ecaa) /* 0.467022577 */, 16 },
+  /* 2315 */  { MAD_F(0x077a06db) /* 0.467291696 */, 16 },
+  /* 2316 */  { MAD_F(0x077b2117) /* 0.467560854 */, 16 },
+  /* 2317 */  { MAD_F(0x077c3b5d) /* 0.467830050 */, 16 },
+  /* 2318 */  { MAD_F(0x077d55ad) /* 0.468099285 */, 16 },
+  /* 2319 */  { MAD_F(0x077e7008) /* 0.468368560 */, 16 },
+
+  /* 2320 */  { MAD_F(0x077f8a6d) /* 0.468637872 */, 16 },
+  /* 2321 */  { MAD_F(0x0780a4dc) /* 0.468907224 */, 16 },
+  /* 2322 */  { MAD_F(0x0781bf56) /* 0.469176614 */, 16 },
+  /* 2323 */  { MAD_F(0x0782d9da) /* 0.469446043 */, 16 },
+  /* 2324 */  { MAD_F(0x0783f469) /* 0.469715510 */, 16 },
+  /* 2325 */  { MAD_F(0x07850f02) /* 0.469985016 */, 16 },
+  /* 2326 */  { MAD_F(0x078629a5) /* 0.470254561 */, 16 },
+  /* 2327 */  { MAD_F(0x07874453) /* 0.470524145 */, 16 },
+  /* 2328 */  { MAD_F(0x07885f0b) /* 0.470793767 */, 16 },
+  /* 2329 */  { MAD_F(0x078979ce) /* 0.471063427 */, 16 },
+  /* 2330 */  { MAD_F(0x078a949a) /* 0.471333126 */, 16 },
+  /* 2331 */  { MAD_F(0x078baf72) /* 0.471602864 */, 16 },
+  /* 2332 */  { MAD_F(0x078cca53) /* 0.471872641 */, 16 },
+  /* 2333 */  { MAD_F(0x078de53f) /* 0.472142456 */, 16 },
+  /* 2334 */  { MAD_F(0x078f0035) /* 0.472412309 */, 16 },
+  /* 2335 */  { MAD_F(0x07901b36) /* 0.472682201 */, 16 },
+
+  /* 2336 */  { MAD_F(0x07913641) /* 0.472952132 */, 16 },
+  /* 2337 */  { MAD_F(0x07925156) /* 0.473222101 */, 16 },
+  /* 2338 */  { MAD_F(0x07936c76) /* 0.473492108 */, 16 },
+  /* 2339 */  { MAD_F(0x079487a0) /* 0.473762155 */, 16 },
+  /* 2340 */  { MAD_F(0x0795a2d4) /* 0.474032239 */, 16 },
+  /* 2341 */  { MAD_F(0x0796be13) /* 0.474302362 */, 16 },
+  /* 2342 */  { MAD_F(0x0797d95c) /* 0.474572524 */, 16 },
+  /* 2343 */  { MAD_F(0x0798f4af) /* 0.474842724 */, 16 },
+  /* 2344 */  { MAD_F(0x079a100c) /* 0.475112962 */, 16 },
+  /* 2345 */  { MAD_F(0x079b2b74) /* 0.475383239 */, 16 },
+  /* 2346 */  { MAD_F(0x079c46e7) /* 0.475653554 */, 16 },
+  /* 2347 */  { MAD_F(0x079d6263) /* 0.475923908 */, 16 },
+  /* 2348 */  { MAD_F(0x079e7dea) /* 0.476194300 */, 16 },
+  /* 2349 */  { MAD_F(0x079f997b) /* 0.476464731 */, 16 },
+  /* 2350 */  { MAD_F(0x07a0b516) /* 0.476735200 */, 16 },
+  /* 2351 */  { MAD_F(0x07a1d0bc) /* 0.477005707 */, 16 },
+
+  /* 2352 */  { MAD_F(0x07a2ec6c) /* 0.477276252 */, 16 },
+  /* 2353 */  { MAD_F(0x07a40827) /* 0.477546836 */, 16 },
+  /* 2354 */  { MAD_F(0x07a523eb) /* 0.477817459 */, 16 },
+  /* 2355 */  { MAD_F(0x07a63fba) /* 0.478088119 */, 16 },
+  /* 2356 */  { MAD_F(0x07a75b93) /* 0.478358818 */, 16 },
+  /* 2357 */  { MAD_F(0x07a87777) /* 0.478629555 */, 16 },
+  /* 2358 */  { MAD_F(0x07a99364) /* 0.478900331 */, 16 },
+  /* 2359 */  { MAD_F(0x07aaaf5c) /* 0.479171145 */, 16 },
+  /* 2360 */  { MAD_F(0x07abcb5f) /* 0.479441997 */, 16 },
+  /* 2361 */  { MAD_F(0x07ace76b) /* 0.479712887 */, 16 },
+  /* 2362 */  { MAD_F(0x07ae0382) /* 0.479983816 */, 16 },
+  /* 2363 */  { MAD_F(0x07af1fa3) /* 0.480254782 */, 16 },
+  /* 2364 */  { MAD_F(0x07b03bcf) /* 0.480525787 */, 16 },
+  /* 2365 */  { MAD_F(0x07b15804) /* 0.480796831 */, 16 },
+  /* 2366 */  { MAD_F(0x07b27444) /* 0.481067912 */, 16 },
+  /* 2367 */  { MAD_F(0x07b3908e) /* 0.481339032 */, 16 },
+
+  /* 2368 */  { MAD_F(0x07b4ace3) /* 0.481610189 */, 16 },
+  /* 2369 */  { MAD_F(0x07b5c941) /* 0.481881385 */, 16 },
+  /* 2370 */  { MAD_F(0x07b6e5aa) /* 0.482152620 */, 16 },
+  /* 2371 */  { MAD_F(0x07b8021d) /* 0.482423892 */, 16 },
+  /* 2372 */  { MAD_F(0x07b91e9b) /* 0.482695202 */, 16 },
+  /* 2373 */  { MAD_F(0x07ba3b22) /* 0.482966551 */, 16 },
+  /* 2374 */  { MAD_F(0x07bb57b4) /* 0.483237938 */, 16 },
+  /* 2375 */  { MAD_F(0x07bc7450) /* 0.483509362 */, 16 },
+  /* 2376 */  { MAD_F(0x07bd90f6) /* 0.483780825 */, 16 },
+  /* 2377 */  { MAD_F(0x07beada7) /* 0.484052326 */, 16 },
+  /* 2378 */  { MAD_F(0x07bfca61) /* 0.484323865 */, 16 },
+  /* 2379 */  { MAD_F(0x07c0e726) /* 0.484595443 */, 16 },
+  /* 2380 */  { MAD_F(0x07c203f5) /* 0.484867058 */, 16 },
+  /* 2381 */  { MAD_F(0x07c320cf) /* 0.485138711 */, 16 },
+  /* 2382 */  { MAD_F(0x07c43db2) /* 0.485410402 */, 16 },
+  /* 2383 */  { MAD_F(0x07c55aa0) /* 0.485682131 */, 16 },
+
+  /* 2384 */  { MAD_F(0x07c67798) /* 0.485953899 */, 16 },
+  /* 2385 */  { MAD_F(0x07c7949a) /* 0.486225704 */, 16 },
+  /* 2386 */  { MAD_F(0x07c8b1a7) /* 0.486497547 */, 16 },
+  /* 2387 */  { MAD_F(0x07c9cebd) /* 0.486769429 */, 16 },
+  /* 2388 */  { MAD_F(0x07caebde) /* 0.487041348 */, 16 },
+  /* 2389 */  { MAD_F(0x07cc0909) /* 0.487313305 */, 16 },
+  /* 2390 */  { MAD_F(0x07cd263e) /* 0.487585300 */, 16 },
+  /* 2391 */  { MAD_F(0x07ce437d) /* 0.487857333 */, 16 },
+  /* 2392 */  { MAD_F(0x07cf60c7) /* 0.488129404 */, 16 },
+  /* 2393 */  { MAD_F(0x07d07e1b) /* 0.488401513 */, 16 },
+  /* 2394 */  { MAD_F(0x07d19b79) /* 0.488673660 */, 16 },
+  /* 2395 */  { MAD_F(0x07d2b8e1) /* 0.488945845 */, 16 },
+  /* 2396 */  { MAD_F(0x07d3d653) /* 0.489218067 */, 16 },
+  /* 2397 */  { MAD_F(0x07d4f3cf) /* 0.489490328 */, 16 },
+  /* 2398 */  { MAD_F(0x07d61156) /* 0.489762626 */, 16 },
+  /* 2399 */  { MAD_F(0x07d72ee6) /* 0.490034962 */, 16 },
+
+  /* 2400 */  { MAD_F(0x07d84c81) /* 0.490307336 */, 16 },
+  /* 2401 */  { MAD_F(0x07d96a26) /* 0.490579748 */, 16 },
+  /* 2402 */  { MAD_F(0x07da87d5) /* 0.490852198 */, 16 },
+  /* 2403 */  { MAD_F(0x07dba58f) /* 0.491124686 */, 16 },
+  /* 2404 */  { MAD_F(0x07dcc352) /* 0.491397211 */, 16 },
+  /* 2405 */  { MAD_F(0x07dde120) /* 0.491669774 */, 16 },
+  /* 2406 */  { MAD_F(0x07defef7) /* 0.491942375 */, 16 },
+  /* 2407 */  { MAD_F(0x07e01cd9) /* 0.492215014 */, 16 },
+  /* 2408 */  { MAD_F(0x07e13ac5) /* 0.492487690 */, 16 },
+  /* 2409 */  { MAD_F(0x07e258bc) /* 0.492760404 */, 16 },
+  /* 2410 */  { MAD_F(0x07e376bc) /* 0.493033156 */, 16 },
+  /* 2411 */  { MAD_F(0x07e494c6) /* 0.493305946 */, 16 },
+  /* 2412 */  { MAD_F(0x07e5b2db) /* 0.493578773 */, 16 },
+  /* 2413 */  { MAD_F(0x07e6d0f9) /* 0.493851638 */, 16 },
+  /* 2414 */  { MAD_F(0x07e7ef22) /* 0.494124541 */, 16 },
+  /* 2415 */  { MAD_F(0x07e90d55) /* 0.494397481 */, 16 },
+
+  /* 2416 */  { MAD_F(0x07ea2b92) /* 0.494670459 */, 16 },
+  /* 2417 */  { MAD_F(0x07eb49d9) /* 0.494943475 */, 16 },
+  /* 2418 */  { MAD_F(0x07ec682a) /* 0.495216529 */, 16 },
+  /* 2419 */  { MAD_F(0x07ed8686) /* 0.495489620 */, 16 },
+  /* 2420 */  { MAD_F(0x07eea4eb) /* 0.495762748 */, 16 },
+  /* 2421 */  { MAD_F(0x07efc35b) /* 0.496035915 */, 16 },
+  /* 2422 */  { MAD_F(0x07f0e1d4) /* 0.496309119 */, 16 },
+  /* 2423 */  { MAD_F(0x07f20058) /* 0.496582360 */, 16 },
+  /* 2424 */  { MAD_F(0x07f31ee6) /* 0.496855639 */, 16 },
+  /* 2425 */  { MAD_F(0x07f43d7e) /* 0.497128956 */, 16 },
+  /* 2426 */  { MAD_F(0x07f55c20) /* 0.497402310 */, 16 },
+  /* 2427 */  { MAD_F(0x07f67acc) /* 0.497675702 */, 16 },
+  /* 2428 */  { MAD_F(0x07f79982) /* 0.497949132 */, 16 },
+  /* 2429 */  { MAD_F(0x07f8b842) /* 0.498222598 */, 16 },
+  /* 2430 */  { MAD_F(0x07f9d70c) /* 0.498496103 */, 16 },
+  /* 2431 */  { MAD_F(0x07faf5e1) /* 0.498769645 */, 16 },
+
+  /* 2432 */  { MAD_F(0x07fc14bf) /* 0.499043224 */, 16 },
+  /* 2433 */  { MAD_F(0x07fd33a8) /* 0.499316841 */, 16 },
+  /* 2434 */  { MAD_F(0x07fe529a) /* 0.499590496 */, 16 },
+  /* 2435 */  { MAD_F(0x07ff7197) /* 0.499864188 */, 16 },
+  /* 2436 */  { MAD_F(0x0400484f) /* 0.250068959 */, 17 },
+  /* 2437 */  { MAD_F(0x0400d7d7) /* 0.250205842 */, 17 },
+  /* 2438 */  { MAD_F(0x04016764) /* 0.250342744 */, 17 },
+  /* 2439 */  { MAD_F(0x0401f6f7) /* 0.250479665 */, 17 },
+  /* 2440 */  { MAD_F(0x0402868e) /* 0.250616605 */, 17 },
+  /* 2441 */  { MAD_F(0x0403162b) /* 0.250753563 */, 17 },
+  /* 2442 */  { MAD_F(0x0403a5cc) /* 0.250890540 */, 17 },
+  /* 2443 */  { MAD_F(0x04043573) /* 0.251027536 */, 17 },
+  /* 2444 */  { MAD_F(0x0404c51e) /* 0.251164550 */, 17 },
+  /* 2445 */  { MAD_F(0x040554cf) /* 0.251301583 */, 17 },
+  /* 2446 */  { MAD_F(0x0405e484) /* 0.251438635 */, 17 },
+  /* 2447 */  { MAD_F(0x0406743f) /* 0.251575706 */, 17 },
+
+  /* 2448 */  { MAD_F(0x040703ff) /* 0.251712795 */, 17 },
+  /* 2449 */  { MAD_F(0x040793c3) /* 0.251849903 */, 17 },
+  /* 2450 */  { MAD_F(0x0408238d) /* 0.251987029 */, 17 },
+  /* 2451 */  { MAD_F(0x0408b35b) /* 0.252124174 */, 17 },
+  /* 2452 */  { MAD_F(0x0409432f) /* 0.252261338 */, 17 },
+  /* 2453 */  { MAD_F(0x0409d308) /* 0.252398520 */, 17 },
+  /* 2454 */  { MAD_F(0x040a62e5) /* 0.252535721 */, 17 },
+  /* 2455 */  { MAD_F(0x040af2c8) /* 0.252672941 */, 17 },
+  /* 2456 */  { MAD_F(0x040b82b0) /* 0.252810180 */, 17 },
+  /* 2457 */  { MAD_F(0x040c129c) /* 0.252947436 */, 17 },
+  /* 2458 */  { MAD_F(0x040ca28e) /* 0.253084712 */, 17 },
+  /* 2459 */  { MAD_F(0x040d3284) /* 0.253222006 */, 17 },
+  /* 2460 */  { MAD_F(0x040dc280) /* 0.253359319 */, 17 },
+  /* 2461 */  { MAD_F(0x040e5281) /* 0.253496651 */, 17 },
+  /* 2462 */  { MAD_F(0x040ee286) /* 0.253634001 */, 17 },
+  /* 2463 */  { MAD_F(0x040f7291) /* 0.253771369 */, 17 },
+
+  /* 2464 */  { MAD_F(0x041002a1) /* 0.253908756 */, 17 },
+  /* 2465 */  { MAD_F(0x041092b5) /* 0.254046162 */, 17 },
+  /* 2466 */  { MAD_F(0x041122cf) /* 0.254183587 */, 17 },
+  /* 2467 */  { MAD_F(0x0411b2ed) /* 0.254321030 */, 17 },
+  /* 2468 */  { MAD_F(0x04124311) /* 0.254458491 */, 17 },
+  /* 2469 */  { MAD_F(0x0412d339) /* 0.254595971 */, 17 },
+  /* 2470 */  { MAD_F(0x04136367) /* 0.254733470 */, 17 },
+  /* 2471 */  { MAD_F(0x0413f399) /* 0.254870987 */, 17 },
+  /* 2472 */  { MAD_F(0x041483d1) /* 0.255008523 */, 17 },
+  /* 2473 */  { MAD_F(0x0415140d) /* 0.255146077 */, 17 },
+  /* 2474 */  { MAD_F(0x0415a44f) /* 0.255283650 */, 17 },
+  /* 2475 */  { MAD_F(0x04163495) /* 0.255421241 */, 17 },
+  /* 2476 */  { MAD_F(0x0416c4e1) /* 0.255558851 */, 17 },
+  /* 2477 */  { MAD_F(0x04175531) /* 0.255696480 */, 17 },
+  /* 2478 */  { MAD_F(0x0417e586) /* 0.255834127 */, 17 },
+  /* 2479 */  { MAD_F(0x041875e1) /* 0.255971792 */, 17 },
+
+  /* 2480 */  { MAD_F(0x04190640) /* 0.256109476 */, 17 },
+  /* 2481 */  { MAD_F(0x041996a4) /* 0.256247179 */, 17 },
+  /* 2482 */  { MAD_F(0x041a270d) /* 0.256384900 */, 17 },
+  /* 2483 */  { MAD_F(0x041ab77b) /* 0.256522639 */, 17 },
+  /* 2484 */  { MAD_F(0x041b47ef) /* 0.256660397 */, 17 },
+  /* 2485 */  { MAD_F(0x041bd867) /* 0.256798174 */, 17 },
+  /* 2486 */  { MAD_F(0x041c68e4) /* 0.256935969 */, 17 },
+  /* 2487 */  { MAD_F(0x041cf966) /* 0.257073782 */, 17 },
+  /* 2488 */  { MAD_F(0x041d89ed) /* 0.257211614 */, 17 },
+  /* 2489 */  { MAD_F(0x041e1a79) /* 0.257349465 */, 17 },
+  /* 2490 */  { MAD_F(0x041eab0a) /* 0.257487334 */, 17 },
+  /* 2491 */  { MAD_F(0x041f3b9f) /* 0.257625221 */, 17 },
+  /* 2492 */  { MAD_F(0x041fcc3a) /* 0.257763127 */, 17 },
+  /* 2493 */  { MAD_F(0x04205cda) /* 0.257901051 */, 17 },
+  /* 2494 */  { MAD_F(0x0420ed7f) /* 0.258038994 */, 17 },
+  /* 2495 */  { MAD_F(0x04217e28) /* 0.258176955 */, 17 },
+
+  /* 2496 */  { MAD_F(0x04220ed7) /* 0.258314934 */, 17 },
+  /* 2497 */  { MAD_F(0x04229f8a) /* 0.258452932 */, 17 },
+  /* 2498 */  { MAD_F(0x04233043) /* 0.258590948 */, 17 },
+  /* 2499 */  { MAD_F(0x0423c100) /* 0.258728983 */, 17 },
+  /* 2500 */  { MAD_F(0x042451c3) /* 0.258867036 */, 17 },
+  /* 2501 */  { MAD_F(0x0424e28a) /* 0.259005108 */, 17 },
+  /* 2502 */  { MAD_F(0x04257356) /* 0.259143198 */, 17 },
+  /* 2503 */  { MAD_F(0x04260428) /* 0.259281307 */, 17 },
+  /* 2504 */  { MAD_F(0x042694fe) /* 0.259419433 */, 17 },
+  /* 2505 */  { MAD_F(0x042725d9) /* 0.259557579 */, 17 },
+  /* 2506 */  { MAD_F(0x0427b6b9) /* 0.259695742 */, 17 },
+  /* 2507 */  { MAD_F(0x0428479e) /* 0.259833924 */, 17 },
+  /* 2508 */  { MAD_F(0x0428d888) /* 0.259972124 */, 17 },
+  /* 2509 */  { MAD_F(0x04296976) /* 0.260110343 */, 17 },
+  /* 2510 */  { MAD_F(0x0429fa6a) /* 0.260248580 */, 17 },
+  /* 2511 */  { MAD_F(0x042a8b63) /* 0.260386836 */, 17 },
+
+  /* 2512 */  { MAD_F(0x042b1c60) /* 0.260525110 */, 17 },
+  /* 2513 */  { MAD_F(0x042bad63) /* 0.260663402 */, 17 },
+  /* 2514 */  { MAD_F(0x042c3e6a) /* 0.260801712 */, 17 },
+  /* 2515 */  { MAD_F(0x042ccf77) /* 0.260940041 */, 17 },
+  /* 2516 */  { MAD_F(0x042d6088) /* 0.261078388 */, 17 },
+  /* 2517 */  { MAD_F(0x042df19e) /* 0.261216754 */, 17 },
+  /* 2518 */  { MAD_F(0x042e82b9) /* 0.261355137 */, 17 },
+  /* 2519 */  { MAD_F(0x042f13d9) /* 0.261493540 */, 17 },
+  /* 2520 */  { MAD_F(0x042fa4fe) /* 0.261631960 */, 17 },
+  /* 2521 */  { MAD_F(0x04303628) /* 0.261770399 */, 17 },
+  /* 2522 */  { MAD_F(0x0430c757) /* 0.261908856 */, 17 },
+  /* 2523 */  { MAD_F(0x0431588b) /* 0.262047331 */, 17 },
+  /* 2524 */  { MAD_F(0x0431e9c3) /* 0.262185825 */, 17 },
+  /* 2525 */  { MAD_F(0x04327b01) /* 0.262324337 */, 17 },
+  /* 2526 */  { MAD_F(0x04330c43) /* 0.262462867 */, 17 },
+  /* 2527 */  { MAD_F(0x04339d8a) /* 0.262601416 */, 17 },
+
+  /* 2528 */  { MAD_F(0x04342ed7) /* 0.262739982 */, 17 },
+  /* 2529 */  { MAD_F(0x0434c028) /* 0.262878568 */, 17 },
+  /* 2530 */  { MAD_F(0x0435517e) /* 0.263017171 */, 17 },
+  /* 2531 */  { MAD_F(0x0435e2d9) /* 0.263155792 */, 17 },
+  /* 2532 */  { MAD_F(0x04367439) /* 0.263294432 */, 17 },
+  /* 2533 */  { MAD_F(0x0437059e) /* 0.263433090 */, 17 },
+  /* 2534 */  { MAD_F(0x04379707) /* 0.263571767 */, 17 },
+  /* 2535 */  { MAD_F(0x04382876) /* 0.263710461 */, 17 },
+  /* 2536 */  { MAD_F(0x0438b9e9) /* 0.263849174 */, 17 },
+  /* 2537 */  { MAD_F(0x04394b61) /* 0.263987905 */, 17 },
+  /* 2538 */  { MAD_F(0x0439dcdf) /* 0.264126655 */, 17 },
+  /* 2539 */  { MAD_F(0x043a6e61) /* 0.264265422 */, 17 },
+  /* 2540 */  { MAD_F(0x043affe8) /* 0.264404208 */, 17 },
+  /* 2541 */  { MAD_F(0x043b9174) /* 0.264543012 */, 17 },
+  /* 2542 */  { MAD_F(0x043c2305) /* 0.264681834 */, 17 },
+  /* 2543 */  { MAD_F(0x043cb49a) /* 0.264820674 */, 17 },
+
+  /* 2544 */  { MAD_F(0x043d4635) /* 0.264959533 */, 17 },
+  /* 2545 */  { MAD_F(0x043dd7d4) /* 0.265098410 */, 17 },
+  /* 2546 */  { MAD_F(0x043e6979) /* 0.265237305 */, 17 },
+  /* 2547 */  { MAD_F(0x043efb22) /* 0.265376218 */, 17 },
+  /* 2548 */  { MAD_F(0x043f8cd0) /* 0.265515149 */, 17 },
+  /* 2549 */  { MAD_F(0x04401e83) /* 0.265654099 */, 17 },
+  /* 2550 */  { MAD_F(0x0440b03b) /* 0.265793066 */, 17 },
+  /* 2551 */  { MAD_F(0x044141f7) /* 0.265932052 */, 17 },
+  /* 2552 */  { MAD_F(0x0441d3b9) /* 0.266071056 */, 17 },
+  /* 2553 */  { MAD_F(0x04426580) /* 0.266210078 */, 17 },
+  /* 2554 */  { MAD_F(0x0442f74b) /* 0.266349119 */, 17 },
+  /* 2555 */  { MAD_F(0x0443891b) /* 0.266488177 */, 17 },
+  /* 2556 */  { MAD_F(0x04441af0) /* 0.266627254 */, 17 },
+  /* 2557 */  { MAD_F(0x0444acca) /* 0.266766349 */, 17 },
+  /* 2558 */  { MAD_F(0x04453ea9) /* 0.266905462 */, 17 },
+  /* 2559 */  { MAD_F(0x0445d08d) /* 0.267044593 */, 17 },
+
+  /* 2560 */  { MAD_F(0x04466275) /* 0.267183742 */, 17 },
+  /* 2561 */  { MAD_F(0x0446f463) /* 0.267322909 */, 17 },
+  /* 2562 */  { MAD_F(0x04478655) /* 0.267462094 */, 17 },
+  /* 2563 */  { MAD_F(0x0448184c) /* 0.267601298 */, 17 },
+  /* 2564 */  { MAD_F(0x0448aa48) /* 0.267740519 */, 17 },
+  /* 2565 */  { MAD_F(0x04493c49) /* 0.267879759 */, 17 },
+  /* 2566 */  { MAD_F(0x0449ce4f) /* 0.268019017 */, 17 },
+  /* 2567 */  { MAD_F(0x044a6059) /* 0.268158293 */, 17 },
+  /* 2568 */  { MAD_F(0x044af269) /* 0.268297587 */, 17 },
+  /* 2569 */  { MAD_F(0x044b847d) /* 0.268436899 */, 17 },
+  /* 2570 */  { MAD_F(0x044c1696) /* 0.268576229 */, 17 },
+  /* 2571 */  { MAD_F(0x044ca8b4) /* 0.268715577 */, 17 },
+  /* 2572 */  { MAD_F(0x044d3ad7) /* 0.268854943 */, 17 },
+  /* 2573 */  { MAD_F(0x044dccff) /* 0.268994328 */, 17 },
+  /* 2574 */  { MAD_F(0x044e5f2b) /* 0.269133730 */, 17 },
+  /* 2575 */  { MAD_F(0x044ef15d) /* 0.269273150 */, 17 },
+
+  /* 2576 */  { MAD_F(0x044f8393) /* 0.269412589 */, 17 },
+  /* 2577 */  { MAD_F(0x045015ce) /* 0.269552045 */, 17 },
+  /* 2578 */  { MAD_F(0x0450a80e) /* 0.269691520 */, 17 },
+  /* 2579 */  { MAD_F(0x04513a53) /* 0.269831013 */, 17 },
+  /* 2580 */  { MAD_F(0x0451cc9c) /* 0.269970523 */, 17 },
+  /* 2581 */  { MAD_F(0x04525eeb) /* 0.270110052 */, 17 },
+  /* 2582 */  { MAD_F(0x0452f13e) /* 0.270249599 */, 17 },
+  /* 2583 */  { MAD_F(0x04538396) /* 0.270389163 */, 17 },
+  /* 2584 */  { MAD_F(0x045415f3) /* 0.270528746 */, 17 },
+  /* 2585 */  { MAD_F(0x0454a855) /* 0.270668347 */, 17 },
+  /* 2586 */  { MAD_F(0x04553abb) /* 0.270807965 */, 17 },
+  /* 2587 */  { MAD_F(0x0455cd27) /* 0.270947602 */, 17 },
+  /* 2588 */  { MAD_F(0x04565f97) /* 0.271087257 */, 17 },
+  /* 2589 */  { MAD_F(0x0456f20c) /* 0.271226930 */, 17 },
+  /* 2590 */  { MAD_F(0x04578486) /* 0.271366620 */, 17 },
+  /* 2591 */  { MAD_F(0x04581705) /* 0.271506329 */, 17 },
+
+  /* 2592 */  { MAD_F(0x0458a989) /* 0.271646056 */, 17 },
+  /* 2593 */  { MAD_F(0x04593c11) /* 0.271785800 */, 17 },
+  /* 2594 */  { MAD_F(0x0459ce9e) /* 0.271925563 */, 17 },
+  /* 2595 */  { MAD_F(0x045a6130) /* 0.272065343 */, 17 },
+  /* 2596 */  { MAD_F(0x045af3c7) /* 0.272205142 */, 17 },
+  /* 2597 */  { MAD_F(0x045b8663) /* 0.272344958 */, 17 },
+  /* 2598 */  { MAD_F(0x045c1903) /* 0.272484793 */, 17 },
+  /* 2599 */  { MAD_F(0x045caba9) /* 0.272624645 */, 17 },
+  /* 2600 */  { MAD_F(0x045d3e53) /* 0.272764515 */, 17 },
+  /* 2601 */  { MAD_F(0x045dd102) /* 0.272904403 */, 17 },
+  /* 2602 */  { MAD_F(0x045e63b6) /* 0.273044310 */, 17 },
+  /* 2603 */  { MAD_F(0x045ef66e) /* 0.273184234 */, 17 },
+  /* 2604 */  { MAD_F(0x045f892b) /* 0.273324176 */, 17 },
+  /* 2605 */  { MAD_F(0x04601bee) /* 0.273464136 */, 17 },
+  /* 2606 */  { MAD_F(0x0460aeb5) /* 0.273604113 */, 17 },
+  /* 2607 */  { MAD_F(0x04614180) /* 0.273744109 */, 17 },
+
+  /* 2608 */  { MAD_F(0x0461d451) /* 0.273884123 */, 17 },
+  /* 2609 */  { MAD_F(0x04626727) /* 0.274024154 */, 17 },
+  /* 2610 */  { MAD_F(0x0462fa01) /* 0.274164204 */, 17 },
+  /* 2611 */  { MAD_F(0x04638ce0) /* 0.274304271 */, 17 },
+  /* 2612 */  { MAD_F(0x04641fc4) /* 0.274444356 */, 17 },
+  /* 2613 */  { MAD_F(0x0464b2ac) /* 0.274584459 */, 17 },
+  /* 2614 */  { MAD_F(0x0465459a) /* 0.274724580 */, 17 },
+  /* 2615 */  { MAD_F(0x0465d88c) /* 0.274864719 */, 17 },
+  /* 2616 */  { MAD_F(0x04666b83) /* 0.275004875 */, 17 },
+  /* 2617 */  { MAD_F(0x0466fe7f) /* 0.275145050 */, 17 },
+  /* 2618 */  { MAD_F(0x0467917f) /* 0.275285242 */, 17 },
+  /* 2619 */  { MAD_F(0x04682485) /* 0.275425452 */, 17 },
+  /* 2620 */  { MAD_F(0x0468b78f) /* 0.275565681 */, 17 },
+  /* 2621 */  { MAD_F(0x04694a9e) /* 0.275705926 */, 17 },
+  /* 2622 */  { MAD_F(0x0469ddb2) /* 0.275846190 */, 17 },
+  /* 2623 */  { MAD_F(0x046a70ca) /* 0.275986472 */, 17 },
+
+  /* 2624 */  { MAD_F(0x046b03e7) /* 0.276126771 */, 17 },
+  /* 2625 */  { MAD_F(0x046b970a) /* 0.276267088 */, 17 },
+  /* 2626 */  { MAD_F(0x046c2a31) /* 0.276407423 */, 17 },
+  /* 2627 */  { MAD_F(0x046cbd5c) /* 0.276547776 */, 17 },
+  /* 2628 */  { MAD_F(0x046d508d) /* 0.276688147 */, 17 },
+  /* 2629 */  { MAD_F(0x046de3c2) /* 0.276828535 */, 17 },
+  /* 2630 */  { MAD_F(0x046e76fc) /* 0.276968942 */, 17 },
+  /* 2631 */  { MAD_F(0x046f0a3b) /* 0.277109366 */, 17 },
+  /* 2632 */  { MAD_F(0x046f9d7e) /* 0.277249808 */, 17 },
+  /* 2633 */  { MAD_F(0x047030c7) /* 0.277390267 */, 17 },
+  /* 2634 */  { MAD_F(0x0470c414) /* 0.277530745 */, 17 },
+  /* 2635 */  { MAD_F(0x04715766) /* 0.277671240 */, 17 },
+  /* 2636 */  { MAD_F(0x0471eabc) /* 0.277811753 */, 17 },
+  /* 2637 */  { MAD_F(0x04727e18) /* 0.277952284 */, 17 },
+  /* 2638 */  { MAD_F(0x04731178) /* 0.278092832 */, 17 },
+  /* 2639 */  { MAD_F(0x0473a4dd) /* 0.278233399 */, 17 },
+
+  /* 2640 */  { MAD_F(0x04743847) /* 0.278373983 */, 17 },
+  /* 2641 */  { MAD_F(0x0474cbb5) /* 0.278514584 */, 17 },
+  /* 2642 */  { MAD_F(0x04755f29) /* 0.278655204 */, 17 },
+  /* 2643 */  { MAD_F(0x0475f2a1) /* 0.278795841 */, 17 },
+  /* 2644 */  { MAD_F(0x0476861d) /* 0.278936496 */, 17 },
+  /* 2645 */  { MAD_F(0x0477199f) /* 0.279077169 */, 17 },
+  /* 2646 */  { MAD_F(0x0477ad25) /* 0.279217860 */, 17 },
+  /* 2647 */  { MAD_F(0x047840b0) /* 0.279358568 */, 17 },
+  /* 2648 */  { MAD_F(0x0478d440) /* 0.279499294 */, 17 },
+  /* 2649 */  { MAD_F(0x047967d5) /* 0.279640037 */, 17 },
+  /* 2650 */  { MAD_F(0x0479fb6e) /* 0.279780799 */, 17 },
+  /* 2651 */  { MAD_F(0x047a8f0c) /* 0.279921578 */, 17 },
+  /* 2652 */  { MAD_F(0x047b22af) /* 0.280062375 */, 17 },
+  /* 2653 */  { MAD_F(0x047bb657) /* 0.280203189 */, 17 },
+  /* 2654 */  { MAD_F(0x047c4a03) /* 0.280344021 */, 17 },
+  /* 2655 */  { MAD_F(0x047cddb4) /* 0.280484871 */, 17 },
+
+  /* 2656 */  { MAD_F(0x047d716a) /* 0.280625739 */, 17 },
+  /* 2657 */  { MAD_F(0x047e0524) /* 0.280766624 */, 17 },
+  /* 2658 */  { MAD_F(0x047e98e4) /* 0.280907527 */, 17 },
+  /* 2659 */  { MAD_F(0x047f2ca8) /* 0.281048447 */, 17 },
+  /* 2660 */  { MAD_F(0x047fc071) /* 0.281189385 */, 17 },
+  /* 2661 */  { MAD_F(0x0480543e) /* 0.281330341 */, 17 },
+  /* 2662 */  { MAD_F(0x0480e811) /* 0.281471315 */, 17 },
+  /* 2663 */  { MAD_F(0x04817be8) /* 0.281612306 */, 17 },
+  /* 2664 */  { MAD_F(0x04820fc3) /* 0.281753315 */, 17 },
+  /* 2665 */  { MAD_F(0x0482a3a4) /* 0.281894341 */, 17 },
+  /* 2666 */  { MAD_F(0x04833789) /* 0.282035386 */, 17 },
+  /* 2667 */  { MAD_F(0x0483cb73) /* 0.282176447 */, 17 },
+  /* 2668 */  { MAD_F(0x04845f62) /* 0.282317527 */, 17 },
+  /* 2669 */  { MAD_F(0x0484f355) /* 0.282458624 */, 17 },
+  /* 2670 */  { MAD_F(0x0485874d) /* 0.282599738 */, 17 },
+  /* 2671 */  { MAD_F(0x04861b4a) /* 0.282740871 */, 17 },
+
+  /* 2672 */  { MAD_F(0x0486af4c) /* 0.282882021 */, 17 },
+  /* 2673 */  { MAD_F(0x04874352) /* 0.283023188 */, 17 },
+  /* 2674 */  { MAD_F(0x0487d75d) /* 0.283164373 */, 17 },
+  /* 2675 */  { MAD_F(0x04886b6d) /* 0.283305576 */, 17 },
+  /* 2676 */  { MAD_F(0x0488ff82) /* 0.283446796 */, 17 },
+  /* 2677 */  { MAD_F(0x0489939b) /* 0.283588034 */, 17 },
+  /* 2678 */  { MAD_F(0x048a27b9) /* 0.283729290 */, 17 },
+  /* 2679 */  { MAD_F(0x048abbdc) /* 0.283870563 */, 17 },
+  /* 2680 */  { MAD_F(0x048b5003) /* 0.284011853 */, 17 },
+  /* 2681 */  { MAD_F(0x048be42f) /* 0.284153161 */, 17 },
+  /* 2682 */  { MAD_F(0x048c7860) /* 0.284294487 */, 17 },
+  /* 2683 */  { MAD_F(0x048d0c96) /* 0.284435831 */, 17 },
+  /* 2684 */  { MAD_F(0x048da0d0) /* 0.284577192 */, 17 },
+  /* 2685 */  { MAD_F(0x048e350f) /* 0.284718570 */, 17 },
+  /* 2686 */  { MAD_F(0x048ec953) /* 0.284859966 */, 17 },
+  /* 2687 */  { MAD_F(0x048f5d9b) /* 0.285001380 */, 17 },
+
+  /* 2688 */  { MAD_F(0x048ff1e8) /* 0.285142811 */, 17 },
+  /* 2689 */  { MAD_F(0x0490863a) /* 0.285284259 */, 17 },
+  /* 2690 */  { MAD_F(0x04911a91) /* 0.285425726 */, 17 },
+  /* 2691 */  { MAD_F(0x0491aeec) /* 0.285567209 */, 17 },
+  /* 2692 */  { MAD_F(0x0492434c) /* 0.285708711 */, 17 },
+  /* 2693 */  { MAD_F(0x0492d7b0) /* 0.285850229 */, 17 },
+  /* 2694 */  { MAD_F(0x04936c1a) /* 0.285991766 */, 17 },
+  /* 2695 */  { MAD_F(0x04940088) /* 0.286133319 */, 17 },
+  /* 2696 */  { MAD_F(0x049494fb) /* 0.286274891 */, 17 },
+  /* 2697 */  { MAD_F(0x04952972) /* 0.286416480 */, 17 },
+  /* 2698 */  { MAD_F(0x0495bdee) /* 0.286558086 */, 17 },
+  /* 2699 */  { MAD_F(0x0496526f) /* 0.286699710 */, 17 },
+  /* 2700 */  { MAD_F(0x0496e6f5) /* 0.286841351 */, 17 },
+  /* 2701 */  { MAD_F(0x04977b7f) /* 0.286983010 */, 17 },
+  /* 2702 */  { MAD_F(0x0498100e) /* 0.287124686 */, 17 },
+  /* 2703 */  { MAD_F(0x0498a4a1) /* 0.287266380 */, 17 },
+
+  /* 2704 */  { MAD_F(0x0499393a) /* 0.287408091 */, 17 },
+  /* 2705 */  { MAD_F(0x0499cdd7) /* 0.287549820 */, 17 },
+  /* 2706 */  { MAD_F(0x049a6278) /* 0.287691566 */, 17 },
+  /* 2707 */  { MAD_F(0x049af71f) /* 0.287833330 */, 17 },
+  /* 2708 */  { MAD_F(0x049b8bca) /* 0.287975111 */, 17 },
+  /* 2709 */  { MAD_F(0x049c207a) /* 0.288116909 */, 17 },
+  /* 2710 */  { MAD_F(0x049cb52e) /* 0.288258725 */, 17 },
+  /* 2711 */  { MAD_F(0x049d49e7) /* 0.288400559 */, 17 },
+  /* 2712 */  { MAD_F(0x049ddea5) /* 0.288542409 */, 17 },
+  /* 2713 */  { MAD_F(0x049e7367) /* 0.288684278 */, 17 },
+  /* 2714 */  { MAD_F(0x049f082f) /* 0.288826163 */, 17 },
+  /* 2715 */  { MAD_F(0x049f9cfa) /* 0.288968067 */, 17 },
+  /* 2716 */  { MAD_F(0x04a031cb) /* 0.289109987 */, 17 },
+  /* 2717 */  { MAD_F(0x04a0c6a0) /* 0.289251925 */, 17 },
+  /* 2718 */  { MAD_F(0x04a15b7a) /* 0.289393881 */, 17 },
+  /* 2719 */  { MAD_F(0x04a1f059) /* 0.289535854 */, 17 },
+
+  /* 2720 */  { MAD_F(0x04a2853c) /* 0.289677844 */, 17 },
+  /* 2721 */  { MAD_F(0x04a31a24) /* 0.289819851 */, 17 },
+  /* 2722 */  { MAD_F(0x04a3af10) /* 0.289961876 */, 17 },
+  /* 2723 */  { MAD_F(0x04a44401) /* 0.290103919 */, 17 },
+  /* 2724 */  { MAD_F(0x04a4d8f7) /* 0.290245979 */, 17 },
+  /* 2725 */  { MAD_F(0x04a56df2) /* 0.290388056 */, 17 },
+  /* 2726 */  { MAD_F(0x04a602f1) /* 0.290530150 */, 17 },
+  /* 2727 */  { MAD_F(0x04a697f5) /* 0.290672262 */, 17 },
+  /* 2728 */  { MAD_F(0x04a72cfe) /* 0.290814392 */, 17 },
+  /* 2729 */  { MAD_F(0x04a7c20b) /* 0.290956538 */, 17 },
+  /* 2730 */  { MAD_F(0x04a8571d) /* 0.291098703 */, 17 },
+  /* 2731 */  { MAD_F(0x04a8ec33) /* 0.291240884 */, 17 },
+  /* 2732 */  { MAD_F(0x04a9814e) /* 0.291383083 */, 17 },
+  /* 2733 */  { MAD_F(0x04aa166e) /* 0.291525299 */, 17 },
+  /* 2734 */  { MAD_F(0x04aaab93) /* 0.291667532 */, 17 },
+  /* 2735 */  { MAD_F(0x04ab40bc) /* 0.291809783 */, 17 },
+
+  /* 2736 */  { MAD_F(0x04abd5ea) /* 0.291952051 */, 17 },
+  /* 2737 */  { MAD_F(0x04ac6b1c) /* 0.292094337 */, 17 },
+  /* 2738 */  { MAD_F(0x04ad0053) /* 0.292236640 */, 17 },
+  /* 2739 */  { MAD_F(0x04ad958f) /* 0.292378960 */, 17 },
+  /* 2740 */  { MAD_F(0x04ae2ad0) /* 0.292521297 */, 17 },
+  /* 2741 */  { MAD_F(0x04aec015) /* 0.292663652 */, 17 },
+  /* 2742 */  { MAD_F(0x04af555e) /* 0.292806024 */, 17 },
+  /* 2743 */  { MAD_F(0x04afeaad) /* 0.292948414 */, 17 },
+  /* 2744 */  { MAD_F(0x04b08000) /* 0.293090820 */, 17 },
+  /* 2745 */  { MAD_F(0x04b11557) /* 0.293233244 */, 17 },
+  /* 2746 */  { MAD_F(0x04b1aab4) /* 0.293375686 */, 17 },
+  /* 2747 */  { MAD_F(0x04b24015) /* 0.293518144 */, 17 },
+  /* 2748 */  { MAD_F(0x04b2d57a) /* 0.293660620 */, 17 },
+  /* 2749 */  { MAD_F(0x04b36ae4) /* 0.293803113 */, 17 },
+  /* 2750 */  { MAD_F(0x04b40053) /* 0.293945624 */, 17 },
+  /* 2751 */  { MAD_F(0x04b495c7) /* 0.294088151 */, 17 },
+
+  /* 2752 */  { MAD_F(0x04b52b3f) /* 0.294230696 */, 17 },
+  /* 2753 */  { MAD_F(0x04b5c0bc) /* 0.294373259 */, 17 },
+  /* 2754 */  { MAD_F(0x04b6563d) /* 0.294515838 */, 17 },
+  /* 2755 */  { MAD_F(0x04b6ebc3) /* 0.294658435 */, 17 },
+  /* 2756 */  { MAD_F(0x04b7814e) /* 0.294801049 */, 17 },
+  /* 2757 */  { MAD_F(0x04b816dd) /* 0.294943680 */, 17 },
+  /* 2758 */  { MAD_F(0x04b8ac71) /* 0.295086329 */, 17 },
+  /* 2759 */  { MAD_F(0x04b9420a) /* 0.295228995 */, 17 },
+  /* 2760 */  { MAD_F(0x04b9d7a7) /* 0.295371678 */, 17 },
+  /* 2761 */  { MAD_F(0x04ba6d49) /* 0.295514378 */, 17 },
+  /* 2762 */  { MAD_F(0x04bb02ef) /* 0.295657095 */, 17 },
+  /* 2763 */  { MAD_F(0x04bb989a) /* 0.295799830 */, 17 },
+  /* 2764 */  { MAD_F(0x04bc2e4a) /* 0.295942582 */, 17 },
+  /* 2765 */  { MAD_F(0x04bcc3fe) /* 0.296085351 */, 17 },
+  /* 2766 */  { MAD_F(0x04bd59b7) /* 0.296228138 */, 17 },
+  /* 2767 */  { MAD_F(0x04bdef74) /* 0.296370941 */, 17 },
+
+  /* 2768 */  { MAD_F(0x04be8537) /* 0.296513762 */, 17 },
+  /* 2769 */  { MAD_F(0x04bf1afd) /* 0.296656600 */, 17 },
+  /* 2770 */  { MAD_F(0x04bfb0c9) /* 0.296799455 */, 17 },
+  /* 2771 */  { MAD_F(0x04c04699) /* 0.296942327 */, 17 },
+  /* 2772 */  { MAD_F(0x04c0dc6d) /* 0.297085217 */, 17 },
+  /* 2773 */  { MAD_F(0x04c17247) /* 0.297228124 */, 17 },
+  /* 2774 */  { MAD_F(0x04c20824) /* 0.297371048 */, 17 },
+  /* 2775 */  { MAD_F(0x04c29e07) /* 0.297513989 */, 17 },
+  /* 2776 */  { MAD_F(0x04c333ee) /* 0.297656947 */, 17 },
+  /* 2777 */  { MAD_F(0x04c3c9da) /* 0.297799922 */, 17 },
+  /* 2778 */  { MAD_F(0x04c45fca) /* 0.297942915 */, 17 },
+  /* 2779 */  { MAD_F(0x04c4f5bf) /* 0.298085925 */, 17 },
+  /* 2780 */  { MAD_F(0x04c58bb8) /* 0.298228951 */, 17 },
+  /* 2781 */  { MAD_F(0x04c621b6) /* 0.298371996 */, 17 },
+  /* 2782 */  { MAD_F(0x04c6b7b9) /* 0.298515057 */, 17 },
+  /* 2783 */  { MAD_F(0x04c74dc0) /* 0.298658135 */, 17 },
+
+  /* 2784 */  { MAD_F(0x04c7e3cc) /* 0.298801231 */, 17 },
+  /* 2785 */  { MAD_F(0x04c879dd) /* 0.298944343 */, 17 },
+  /* 2786 */  { MAD_F(0x04c90ff2) /* 0.299087473 */, 17 },
+  /* 2787 */  { MAD_F(0x04c9a60c) /* 0.299230620 */, 17 },
+  /* 2788 */  { MAD_F(0x04ca3c2a) /* 0.299373784 */, 17 },
+  /* 2789 */  { MAD_F(0x04cad24d) /* 0.299516965 */, 17 },
+  /* 2790 */  { MAD_F(0x04cb6874) /* 0.299660163 */, 17 },
+  /* 2791 */  { MAD_F(0x04cbfea0) /* 0.299803378 */, 17 },
+  /* 2792 */  { MAD_F(0x04cc94d1) /* 0.299946611 */, 17 },
+  /* 2793 */  { MAD_F(0x04cd2b06) /* 0.300089860 */, 17 },
+  /* 2794 */  { MAD_F(0x04cdc140) /* 0.300233127 */, 17 },
+  /* 2795 */  { MAD_F(0x04ce577f) /* 0.300376411 */, 17 },
+  /* 2796 */  { MAD_F(0x04ceedc2) /* 0.300519711 */, 17 },
+  /* 2797 */  { MAD_F(0x04cf8409) /* 0.300663029 */, 17 },
+  /* 2798 */  { MAD_F(0x04d01a55) /* 0.300806364 */, 17 },
+  /* 2799 */  { MAD_F(0x04d0b0a6) /* 0.300949716 */, 17 },
+
+  /* 2800 */  { MAD_F(0x04d146fb) /* 0.301093085 */, 17 },
+  /* 2801 */  { MAD_F(0x04d1dd55) /* 0.301236472 */, 17 },
+  /* 2802 */  { MAD_F(0x04d273b4) /* 0.301379875 */, 17 },
+  /* 2803 */  { MAD_F(0x04d30a17) /* 0.301523295 */, 17 },
+  /* 2804 */  { MAD_F(0x04d3a07f) /* 0.301666733 */, 17 },
+  /* 2805 */  { MAD_F(0x04d436eb) /* 0.301810187 */, 17 },
+  /* 2806 */  { MAD_F(0x04d4cd5c) /* 0.301953659 */, 17 },
+  /* 2807 */  { MAD_F(0x04d563d1) /* 0.302097147 */, 17 },
+  /* 2808 */  { MAD_F(0x04d5fa4b) /* 0.302240653 */, 17 },
+  /* 2809 */  { MAD_F(0x04d690ca) /* 0.302384175 */, 17 },
+  /* 2810 */  { MAD_F(0x04d7274d) /* 0.302527715 */, 17 },
+  /* 2811 */  { MAD_F(0x04d7bdd5) /* 0.302671271 */, 17 },
+  /* 2812 */  { MAD_F(0x04d85461) /* 0.302814845 */, 17 },
+  /* 2813 */  { MAD_F(0x04d8eaf2) /* 0.302958436 */, 17 },
+  /* 2814 */  { MAD_F(0x04d98187) /* 0.303102044 */, 17 },
+  /* 2815 */  { MAD_F(0x04da1821) /* 0.303245668 */, 17 },
+
+  /* 2816 */  { MAD_F(0x04daaec0) /* 0.303389310 */, 17 },
+  /* 2817 */  { MAD_F(0x04db4563) /* 0.303532969 */, 17 },
+  /* 2818 */  { MAD_F(0x04dbdc0a) /* 0.303676645 */, 17 },
+  /* 2819 */  { MAD_F(0x04dc72b7) /* 0.303820337 */, 17 },
+  /* 2820 */  { MAD_F(0x04dd0967) /* 0.303964047 */, 17 },
+  /* 2821 */  { MAD_F(0x04dda01d) /* 0.304107774 */, 17 },
+  /* 2822 */  { MAD_F(0x04de36d7) /* 0.304251517 */, 17 },
+  /* 2823 */  { MAD_F(0x04decd95) /* 0.304395278 */, 17 },
+  /* 2824 */  { MAD_F(0x04df6458) /* 0.304539056 */, 17 },
+  /* 2825 */  { MAD_F(0x04dffb20) /* 0.304682850 */, 17 },
+  /* 2826 */  { MAD_F(0x04e091ec) /* 0.304826662 */, 17 },
+  /* 2827 */  { MAD_F(0x04e128bc) /* 0.304970491 */, 17 },
+  /* 2828 */  { MAD_F(0x04e1bf92) /* 0.305114336 */, 17 },
+  /* 2829 */  { MAD_F(0x04e2566b) /* 0.305258199 */, 17 },
+  /* 2830 */  { MAD_F(0x04e2ed4a) /* 0.305402078 */, 17 },
+  /* 2831 */  { MAD_F(0x04e3842d) /* 0.305545974 */, 17 },
+
+  /* 2832 */  { MAD_F(0x04e41b14) /* 0.305689888 */, 17 },
+  /* 2833 */  { MAD_F(0x04e4b200) /* 0.305833818 */, 17 },
+  /* 2834 */  { MAD_F(0x04e548f1) /* 0.305977765 */, 17 },
+  /* 2835 */  { MAD_F(0x04e5dfe6) /* 0.306121729 */, 17 },
+  /* 2836 */  { MAD_F(0x04e676df) /* 0.306265710 */, 17 },
+  /* 2837 */  { MAD_F(0x04e70dde) /* 0.306409708 */, 17 },
+  /* 2838 */  { MAD_F(0x04e7a4e0) /* 0.306553723 */, 17 },
+  /* 2839 */  { MAD_F(0x04e83be7) /* 0.306697755 */, 17 },
+  /* 2840 */  { MAD_F(0x04e8d2f3) /* 0.306841804 */, 17 },
+  /* 2841 */  { MAD_F(0x04e96a04) /* 0.306985869 */, 17 },
+  /* 2842 */  { MAD_F(0x04ea0118) /* 0.307129952 */, 17 },
+  /* 2843 */  { MAD_F(0x04ea9832) /* 0.307274051 */, 17 },
+  /* 2844 */  { MAD_F(0x04eb2f50) /* 0.307418168 */, 17 },
+  /* 2845 */  { MAD_F(0x04ebc672) /* 0.307562301 */, 17 },
+  /* 2846 */  { MAD_F(0x04ec5d99) /* 0.307706451 */, 17 },
+  /* 2847 */  { MAD_F(0x04ecf4c5) /* 0.307850618 */, 17 },
+
+  /* 2848 */  { MAD_F(0x04ed8bf5) /* 0.307994802 */, 17 },
+  /* 2849 */  { MAD_F(0x04ee2329) /* 0.308139003 */, 17 },
+  /* 2850 */  { MAD_F(0x04eeba63) /* 0.308283220 */, 17 },
+  /* 2851 */  { MAD_F(0x04ef51a0) /* 0.308427455 */, 17 },
+  /* 2852 */  { MAD_F(0x04efe8e2) /* 0.308571706 */, 17 },
+  /* 2853 */  { MAD_F(0x04f08029) /* 0.308715974 */, 17 },
+  /* 2854 */  { MAD_F(0x04f11774) /* 0.308860260 */, 17 },
+  /* 2855 */  { MAD_F(0x04f1aec4) /* 0.309004561 */, 17 },
+  /* 2856 */  { MAD_F(0x04f24618) /* 0.309148880 */, 17 },
+  /* 2857 */  { MAD_F(0x04f2dd71) /* 0.309293216 */, 17 },
+  /* 2858 */  { MAD_F(0x04f374cf) /* 0.309437568 */, 17 },
+  /* 2859 */  { MAD_F(0x04f40c30) /* 0.309581938 */, 17 },
+  /* 2860 */  { MAD_F(0x04f4a397) /* 0.309726324 */, 17 },
+  /* 2861 */  { MAD_F(0x04f53b02) /* 0.309870727 */, 17 },
+  /* 2862 */  { MAD_F(0x04f5d271) /* 0.310015147 */, 17 },
+  /* 2863 */  { MAD_F(0x04f669e5) /* 0.310159583 */, 17 },
+
+  /* 2864 */  { MAD_F(0x04f7015d) /* 0.310304037 */, 17 },
+  /* 2865 */  { MAD_F(0x04f798da) /* 0.310448507 */, 17 },
+  /* 2866 */  { MAD_F(0x04f8305c) /* 0.310592994 */, 17 },
+  /* 2867 */  { MAD_F(0x04f8c7e2) /* 0.310737498 */, 17 },
+  /* 2868 */  { MAD_F(0x04f95f6c) /* 0.310882018 */, 17 },
+  /* 2869 */  { MAD_F(0x04f9f6fb) /* 0.311026556 */, 17 },
+  /* 2870 */  { MAD_F(0x04fa8e8f) /* 0.311171110 */, 17 },
+  /* 2871 */  { MAD_F(0x04fb2627) /* 0.311315681 */, 17 },
+  /* 2872 */  { MAD_F(0x04fbbdc3) /* 0.311460269 */, 17 },
+  /* 2873 */  { MAD_F(0x04fc5564) /* 0.311604874 */, 17 },
+  /* 2874 */  { MAD_F(0x04fced0a) /* 0.311749495 */, 17 },
+  /* 2875 */  { MAD_F(0x04fd84b4) /* 0.311894133 */, 17 },
+  /* 2876 */  { MAD_F(0x04fe1c62) /* 0.312038788 */, 17 },
+  /* 2877 */  { MAD_F(0x04feb415) /* 0.312183460 */, 17 },
+  /* 2878 */  { MAD_F(0x04ff4bcd) /* 0.312328148 */, 17 },
+  /* 2879 */  { MAD_F(0x04ffe389) /* 0.312472854 */, 17 },
+
+  /* 2880 */  { MAD_F(0x05007b49) /* 0.312617576 */, 17 },
+  /* 2881 */  { MAD_F(0x0501130e) /* 0.312762314 */, 17 },
+  /* 2882 */  { MAD_F(0x0501aad8) /* 0.312907070 */, 17 },
+  /* 2883 */  { MAD_F(0x050242a6) /* 0.313051842 */, 17 },
+  /* 2884 */  { MAD_F(0x0502da78) /* 0.313196631 */, 17 },
+  /* 2885 */  { MAD_F(0x0503724f) /* 0.313341437 */, 17 },
+  /* 2886 */  { MAD_F(0x05040a2b) /* 0.313486259 */, 17 },
+  /* 2887 */  { MAD_F(0x0504a20b) /* 0.313631098 */, 17 },
+  /* 2888 */  { MAD_F(0x050539ef) /* 0.313775954 */, 17 },
+  /* 2889 */  { MAD_F(0x0505d1d8) /* 0.313920827 */, 17 },
+  /* 2890 */  { MAD_F(0x050669c5) /* 0.314065716 */, 17 },
+  /* 2891 */  { MAD_F(0x050701b7) /* 0.314210622 */, 17 },
+  /* 2892 */  { MAD_F(0x050799ae) /* 0.314355545 */, 17 },
+  /* 2893 */  { MAD_F(0x050831a9) /* 0.314500484 */, 17 },
+  /* 2894 */  { MAD_F(0x0508c9a8) /* 0.314645440 */, 17 },
+  /* 2895 */  { MAD_F(0x050961ac) /* 0.314790413 */, 17 },
+
+  /* 2896 */  { MAD_F(0x0509f9b4) /* 0.314935403 */, 17 },
+  /* 2897 */  { MAD_F(0x050a91c1) /* 0.315080409 */, 17 },
+  /* 2898 */  { MAD_F(0x050b29d2) /* 0.315225432 */, 17 },
+  /* 2899 */  { MAD_F(0x050bc1e8) /* 0.315370472 */, 17 },
+  /* 2900 */  { MAD_F(0x050c5a02) /* 0.315515528 */, 17 },
+  /* 2901 */  { MAD_F(0x050cf221) /* 0.315660601 */, 17 },
+  /* 2902 */  { MAD_F(0x050d8a44) /* 0.315805690 */, 17 },
+  /* 2903 */  { MAD_F(0x050e226c) /* 0.315950797 */, 17 },
+  /* 2904 */  { MAD_F(0x050eba98) /* 0.316095920 */, 17 },
+  /* 2905 */  { MAD_F(0x050f52c9) /* 0.316241059 */, 17 },
+  /* 2906 */  { MAD_F(0x050feafe) /* 0.316386216 */, 17 },
+  /* 2907 */  { MAD_F(0x05108337) /* 0.316531388 */, 17 },
+  /* 2908 */  { MAD_F(0x05111b75) /* 0.316676578 */, 17 },
+  /* 2909 */  { MAD_F(0x0511b3b8) /* 0.316821784 */, 17 },
+  /* 2910 */  { MAD_F(0x05124bff) /* 0.316967007 */, 17 },
+  /* 2911 */  { MAD_F(0x0512e44a) /* 0.317112247 */, 17 },
+
+  /* 2912 */  { MAD_F(0x05137c9a) /* 0.317257503 */, 17 },
+  /* 2913 */  { MAD_F(0x051414ee) /* 0.317402775 */, 17 },
+  /* 2914 */  { MAD_F(0x0514ad47) /* 0.317548065 */, 17 },
+  /* 2915 */  { MAD_F(0x051545a5) /* 0.317693371 */, 17 },
+  /* 2916 */  { MAD_F(0x0515de06) /* 0.317838693 */, 17 },
+  /* 2917 */  { MAD_F(0x0516766d) /* 0.317984033 */, 17 },
+  /* 2918 */  { MAD_F(0x05170ed7) /* 0.318129388 */, 17 },
+  /* 2919 */  { MAD_F(0x0517a746) /* 0.318274761 */, 17 },
+  /* 2920 */  { MAD_F(0x05183fba) /* 0.318420150 */, 17 },
+  /* 2921 */  { MAD_F(0x0518d832) /* 0.318565555 */, 17 },
+  /* 2922 */  { MAD_F(0x051970ae) /* 0.318710978 */, 17 },
+  /* 2923 */  { MAD_F(0x051a092f) /* 0.318856416 */, 17 },
+  /* 2924 */  { MAD_F(0x051aa1b5) /* 0.319001872 */, 17 },
+  /* 2925 */  { MAD_F(0x051b3a3f) /* 0.319147344 */, 17 },
+  /* 2926 */  { MAD_F(0x051bd2cd) /* 0.319292832 */, 17 },
+  /* 2927 */  { MAD_F(0x051c6b60) /* 0.319438338 */, 17 },
+
+  /* 2928 */  { MAD_F(0x051d03f7) /* 0.319583859 */, 17 },
+  /* 2929 */  { MAD_F(0x051d9c92) /* 0.319729398 */, 17 },
+  /* 2930 */  { MAD_F(0x051e3532) /* 0.319874952 */, 17 },
+  /* 2931 */  { MAD_F(0x051ecdd7) /* 0.320020524 */, 17 },
+  /* 2932 */  { MAD_F(0x051f6680) /* 0.320166112 */, 17 },
+  /* 2933 */  { MAD_F(0x051fff2d) /* 0.320311716 */, 17 },
+  /* 2934 */  { MAD_F(0x052097df) /* 0.320457337 */, 17 },
+  /* 2935 */  { MAD_F(0x05213095) /* 0.320602975 */, 17 },
+  /* 2936 */  { MAD_F(0x0521c950) /* 0.320748629 */, 17 },
+  /* 2937 */  { MAD_F(0x0522620f) /* 0.320894300 */, 17 },
+  /* 2938 */  { MAD_F(0x0522fad3) /* 0.321039987 */, 17 },
+  /* 2939 */  { MAD_F(0x0523939b) /* 0.321185691 */, 17 },
+  /* 2940 */  { MAD_F(0x05242c68) /* 0.321331411 */, 17 },
+  /* 2941 */  { MAD_F(0x0524c538) /* 0.321477148 */, 17 },
+  /* 2942 */  { MAD_F(0x05255e0e) /* 0.321622901 */, 17 },
+  /* 2943 */  { MAD_F(0x0525f6e8) /* 0.321768671 */, 17 },
+
+  /* 2944 */  { MAD_F(0x05268fc6) /* 0.321914457 */, 17 },
+  /* 2945 */  { MAD_F(0x052728a9) /* 0.322060260 */, 17 },
+  /* 2946 */  { MAD_F(0x0527c190) /* 0.322206079 */, 17 },
+  /* 2947 */  { MAD_F(0x05285a7b) /* 0.322351915 */, 17 },
+  /* 2948 */  { MAD_F(0x0528f36b) /* 0.322497768 */, 17 },
+  /* 2949 */  { MAD_F(0x05298c5f) /* 0.322643636 */, 17 },
+  /* 2950 */  { MAD_F(0x052a2558) /* 0.322789522 */, 17 },
+  /* 2951 */  { MAD_F(0x052abe55) /* 0.322935424 */, 17 },
+  /* 2952 */  { MAD_F(0x052b5757) /* 0.323081342 */, 17 },
+  /* 2953 */  { MAD_F(0x052bf05d) /* 0.323227277 */, 17 },
+  /* 2954 */  { MAD_F(0x052c8968) /* 0.323373228 */, 17 },
+  /* 2955 */  { MAD_F(0x052d2277) /* 0.323519196 */, 17 },
+  /* 2956 */  { MAD_F(0x052dbb8a) /* 0.323665180 */, 17 },
+  /* 2957 */  { MAD_F(0x052e54a2) /* 0.323811180 */, 17 },
+  /* 2958 */  { MAD_F(0x052eedbe) /* 0.323957197 */, 17 },
+  /* 2959 */  { MAD_F(0x052f86de) /* 0.324103231 */, 17 },
+
+  /* 2960 */  { MAD_F(0x05302003) /* 0.324249281 */, 17 },
+  /* 2961 */  { MAD_F(0x0530b92d) /* 0.324395347 */, 17 },
+  /* 2962 */  { MAD_F(0x0531525b) /* 0.324541430 */, 17 },
+  /* 2963 */  { MAD_F(0x0531eb8d) /* 0.324687530 */, 17 },
+  /* 2964 */  { MAD_F(0x053284c4) /* 0.324833646 */, 17 },
+  /* 2965 */  { MAD_F(0x05331dff) /* 0.324979778 */, 17 },
+  /* 2966 */  { MAD_F(0x0533b73e) /* 0.325125926 */, 17 },
+  /* 2967 */  { MAD_F(0x05345082) /* 0.325272091 */, 17 },
+  /* 2968 */  { MAD_F(0x0534e9ca) /* 0.325418273 */, 17 },
+  /* 2969 */  { MAD_F(0x05358317) /* 0.325564471 */, 17 },
+  /* 2970 */  { MAD_F(0x05361c68) /* 0.325710685 */, 17 },
+  /* 2971 */  { MAD_F(0x0536b5be) /* 0.325856916 */, 17 },
+  /* 2972 */  { MAD_F(0x05374f17) /* 0.326003163 */, 17 },
+  /* 2973 */  { MAD_F(0x0537e876) /* 0.326149427 */, 17 },
+  /* 2974 */  { MAD_F(0x053881d9) /* 0.326295707 */, 17 },
+  /* 2975 */  { MAD_F(0x05391b40) /* 0.326442003 */, 17 },
+
+  /* 2976 */  { MAD_F(0x0539b4ab) /* 0.326588316 */, 17 },
+  /* 2977 */  { MAD_F(0x053a4e1b) /* 0.326734645 */, 17 },
+  /* 2978 */  { MAD_F(0x053ae78f) /* 0.326880990 */, 17 },
+  /* 2979 */  { MAD_F(0x053b8108) /* 0.327027352 */, 17 },
+  /* 2980 */  { MAD_F(0x053c1a85) /* 0.327173730 */, 17 },
+  /* 2981 */  { MAD_F(0x053cb407) /* 0.327320125 */, 17 },
+  /* 2982 */  { MAD_F(0x053d4d8d) /* 0.327466536 */, 17 },
+  /* 2983 */  { MAD_F(0x053de717) /* 0.327612963 */, 17 },
+  /* 2984 */  { MAD_F(0x053e80a6) /* 0.327759407 */, 17 },
+  /* 2985 */  { MAD_F(0x053f1a39) /* 0.327905867 */, 17 },
+  /* 2986 */  { MAD_F(0x053fb3d0) /* 0.328052344 */, 17 },
+  /* 2987 */  { MAD_F(0x05404d6c) /* 0.328198837 */, 17 },
+  /* 2988 */  { MAD_F(0x0540e70c) /* 0.328345346 */, 17 },
+  /* 2989 */  { MAD_F(0x054180b1) /* 0.328491871 */, 17 },
+  /* 2990 */  { MAD_F(0x05421a5a) /* 0.328638413 */, 17 },
+  /* 2991 */  { MAD_F(0x0542b407) /* 0.328784971 */, 17 },
+
+  /* 2992 */  { MAD_F(0x05434db9) /* 0.328931546 */, 17 },
+  /* 2993 */  { MAD_F(0x0543e76f) /* 0.329078137 */, 17 },
+  /* 2994 */  { MAD_F(0x0544812a) /* 0.329224744 */, 17 },
+  /* 2995 */  { MAD_F(0x05451ae9) /* 0.329371367 */, 17 },
+  /* 2996 */  { MAD_F(0x0545b4ac) /* 0.329518007 */, 17 },
+  /* 2997 */  { MAD_F(0x05464e74) /* 0.329664663 */, 17 },
+  /* 2998 */  { MAD_F(0x0546e840) /* 0.329811336 */, 17 },
+  /* 2999 */  { MAD_F(0x05478211) /* 0.329958024 */, 17 },
+  /* 3000 */  { MAD_F(0x05481be5) /* 0.330104730 */, 17 },
+  /* 3001 */  { MAD_F(0x0548b5bf) /* 0.330251451 */, 17 },
+  /* 3002 */  { MAD_F(0x05494f9c) /* 0.330398189 */, 17 },
+  /* 3003 */  { MAD_F(0x0549e97e) /* 0.330544943 */, 17 },
+  /* 3004 */  { MAD_F(0x054a8364) /* 0.330691713 */, 17 },
+  /* 3005 */  { MAD_F(0x054b1d4f) /* 0.330838499 */, 17 },
+  /* 3006 */  { MAD_F(0x054bb73e) /* 0.330985302 */, 17 },
+  /* 3007 */  { MAD_F(0x054c5132) /* 0.331132121 */, 17 },
+
+  /* 3008 */  { MAD_F(0x054ceb2a) /* 0.331278957 */, 17 },
+  /* 3009 */  { MAD_F(0x054d8526) /* 0.331425808 */, 17 },
+  /* 3010 */  { MAD_F(0x054e1f26) /* 0.331572676 */, 17 },
+  /* 3011 */  { MAD_F(0x054eb92b) /* 0.331719560 */, 17 },
+  /* 3012 */  { MAD_F(0x054f5334) /* 0.331866461 */, 17 },
+  /* 3013 */  { MAD_F(0x054fed42) /* 0.332013377 */, 17 },
+  /* 3014 */  { MAD_F(0x05508754) /* 0.332160310 */, 17 },
+  /* 3015 */  { MAD_F(0x0551216b) /* 0.332307260 */, 17 },
+  /* 3016 */  { MAD_F(0x0551bb85) /* 0.332454225 */, 17 },
+  /* 3017 */  { MAD_F(0x055255a4) /* 0.332601207 */, 17 },
+  /* 3018 */  { MAD_F(0x0552efc8) /* 0.332748205 */, 17 },
+  /* 3019 */  { MAD_F(0x055389f0) /* 0.332895219 */, 17 },
+  /* 3020 */  { MAD_F(0x0554241c) /* 0.333042249 */, 17 },
+  /* 3021 */  { MAD_F(0x0554be4c) /* 0.333189296 */, 17 },
+  /* 3022 */  { MAD_F(0x05555881) /* 0.333336359 */, 17 },
+  /* 3023 */  { MAD_F(0x0555f2ba) /* 0.333483438 */, 17 },
+
+  /* 3024 */  { MAD_F(0x05568cf8) /* 0.333630533 */, 17 },
+  /* 3025 */  { MAD_F(0x0557273a) /* 0.333777645 */, 17 },
+  /* 3026 */  { MAD_F(0x0557c180) /* 0.333924772 */, 17 },
+  /* 3027 */  { MAD_F(0x05585bcb) /* 0.334071916 */, 17 },
+  /* 3028 */  { MAD_F(0x0558f61a) /* 0.334219076 */, 17 },
+  /* 3029 */  { MAD_F(0x0559906d) /* 0.334366253 */, 17 },
+  /* 3030 */  { MAD_F(0x055a2ac5) /* 0.334513445 */, 17 },
+  /* 3031 */  { MAD_F(0x055ac521) /* 0.334660654 */, 17 },
+  /* 3032 */  { MAD_F(0x055b5f81) /* 0.334807879 */, 17 },
+  /* 3033 */  { MAD_F(0x055bf9e6) /* 0.334955120 */, 17 },
+  /* 3034 */  { MAD_F(0x055c944f) /* 0.335102377 */, 17 },
+  /* 3035 */  { MAD_F(0x055d2ebd) /* 0.335249651 */, 17 },
+  /* 3036 */  { MAD_F(0x055dc92e) /* 0.335396941 */, 17 },
+  /* 3037 */  { MAD_F(0x055e63a5) /* 0.335544246 */, 17 },
+  /* 3038 */  { MAD_F(0x055efe1f) /* 0.335691568 */, 17 },
+  /* 3039 */  { MAD_F(0x055f989e) /* 0.335838906 */, 17 },
+
+  /* 3040 */  { MAD_F(0x05603321) /* 0.335986261 */, 17 },
+  /* 3041 */  { MAD_F(0x0560cda8) /* 0.336133631 */, 17 },
+  /* 3042 */  { MAD_F(0x05616834) /* 0.336281018 */, 17 },
+  /* 3043 */  { MAD_F(0x056202c4) /* 0.336428421 */, 17 },
+  /* 3044 */  { MAD_F(0x05629d59) /* 0.336575840 */, 17 },
+  /* 3045 */  { MAD_F(0x056337f2) /* 0.336723275 */, 17 },
+  /* 3046 */  { MAD_F(0x0563d28f) /* 0.336870726 */, 17 },
+  /* 3047 */  { MAD_F(0x05646d30) /* 0.337018193 */, 17 },
+  /* 3048 */  { MAD_F(0x056507d6) /* 0.337165677 */, 17 },
+  /* 3049 */  { MAD_F(0x0565a280) /* 0.337313176 */, 17 },
+  /* 3050 */  { MAD_F(0x05663d2f) /* 0.337460692 */, 17 },
+  /* 3051 */  { MAD_F(0x0566d7e1) /* 0.337608224 */, 17 },
+  /* 3052 */  { MAD_F(0x05677298) /* 0.337755772 */, 17 },
+  /* 3053 */  { MAD_F(0x05680d54) /* 0.337903336 */, 17 },
+  /* 3054 */  { MAD_F(0x0568a814) /* 0.338050916 */, 17 },
+  /* 3055 */  { MAD_F(0x056942d8) /* 0.338198513 */, 17 },
+
+  /* 3056 */  { MAD_F(0x0569dda0) /* 0.338346125 */, 17 },
+  /* 3057 */  { MAD_F(0x056a786d) /* 0.338493753 */, 17 },
+  /* 3058 */  { MAD_F(0x056b133e) /* 0.338641398 */, 17 },
+  /* 3059 */  { MAD_F(0x056bae13) /* 0.338789059 */, 17 },
+  /* 3060 */  { MAD_F(0x056c48ed) /* 0.338936736 */, 17 },
+  /* 3061 */  { MAD_F(0x056ce3cb) /* 0.339084429 */, 17 },
+  /* 3062 */  { MAD_F(0x056d7ead) /* 0.339232138 */, 17 },
+  /* 3063 */  { MAD_F(0x056e1994) /* 0.339379863 */, 17 },
+  /* 3064 */  { MAD_F(0x056eb47f) /* 0.339527604 */, 17 },
+  /* 3065 */  { MAD_F(0x056f4f6e) /* 0.339675361 */, 17 },
+  /* 3066 */  { MAD_F(0x056fea62) /* 0.339823134 */, 17 },
+  /* 3067 */  { MAD_F(0x0570855a) /* 0.339970924 */, 17 },
+  /* 3068 */  { MAD_F(0x05712056) /* 0.340118729 */, 17 },
+  /* 3069 */  { MAD_F(0x0571bb56) /* 0.340266550 */, 17 },
+  /* 3070 */  { MAD_F(0x0572565b) /* 0.340414388 */, 17 },
+  /* 3071 */  { MAD_F(0x0572f164) /* 0.340562242 */, 17 },
+
+  /* 3072 */  { MAD_F(0x05738c72) /* 0.340710111 */, 17 },
+  /* 3073 */  { MAD_F(0x05742784) /* 0.340857997 */, 17 },
+  /* 3074 */  { MAD_F(0x0574c29a) /* 0.341005899 */, 17 },
+  /* 3075 */  { MAD_F(0x05755db4) /* 0.341153816 */, 17 },
+  /* 3076 */  { MAD_F(0x0575f8d3) /* 0.341301750 */, 17 },
+  /* 3077 */  { MAD_F(0x057693f6) /* 0.341449700 */, 17 },
+  /* 3078 */  { MAD_F(0x05772f1d) /* 0.341597666 */, 17 },
+  /* 3079 */  { MAD_F(0x0577ca49) /* 0.341745648 */, 17 },
+  /* 3080 */  { MAD_F(0x05786578) /* 0.341893646 */, 17 },
+  /* 3081 */  { MAD_F(0x057900ad) /* 0.342041659 */, 17 },
+  /* 3082 */  { MAD_F(0x05799be5) /* 0.342189689 */, 17 },
+  /* 3083 */  { MAD_F(0x057a3722) /* 0.342337735 */, 17 },
+  /* 3084 */  { MAD_F(0x057ad263) /* 0.342485797 */, 17 },
+  /* 3085 */  { MAD_F(0x057b6da8) /* 0.342633875 */, 17 },
+  /* 3086 */  { MAD_F(0x057c08f2) /* 0.342781969 */, 17 },
+  /* 3087 */  { MAD_F(0x057ca440) /* 0.342930079 */, 17 },
+
+  /* 3088 */  { MAD_F(0x057d3f92) /* 0.343078205 */, 17 },
+  /* 3089 */  { MAD_F(0x057ddae9) /* 0.343226347 */, 17 },
+  /* 3090 */  { MAD_F(0x057e7644) /* 0.343374505 */, 17 },
+  /* 3091 */  { MAD_F(0x057f11a3) /* 0.343522679 */, 17 },
+  /* 3092 */  { MAD_F(0x057fad06) /* 0.343670869 */, 17 },
+  /* 3093 */  { MAD_F(0x0580486e) /* 0.343819075 */, 17 },
+  /* 3094 */  { MAD_F(0x0580e3da) /* 0.343967296 */, 17 },
+  /* 3095 */  { MAD_F(0x05817f4a) /* 0.344115534 */, 17 },
+  /* 3096 */  { MAD_F(0x05821abf) /* 0.344263788 */, 17 },
+  /* 3097 */  { MAD_F(0x0582b638) /* 0.344412058 */, 17 },
+  /* 3098 */  { MAD_F(0x058351b5) /* 0.344560343 */, 17 },
+  /* 3099 */  { MAD_F(0x0583ed36) /* 0.344708645 */, 17 },
+  /* 3100 */  { MAD_F(0x058488bc) /* 0.344856963 */, 17 },
+  /* 3101 */  { MAD_F(0x05852446) /* 0.345005296 */, 17 },
+  /* 3102 */  { MAD_F(0x0585bfd4) /* 0.345153646 */, 17 },
+  /* 3103 */  { MAD_F(0x05865b67) /* 0.345302011 */, 17 },
+
+  /* 3104 */  { MAD_F(0x0586f6fd) /* 0.345450393 */, 17 },
+  /* 3105 */  { MAD_F(0x05879298) /* 0.345598790 */, 17 },
+  /* 3106 */  { MAD_F(0x05882e38) /* 0.345747203 */, 17 },
+  /* 3107 */  { MAD_F(0x0588c9dc) /* 0.345895632 */, 17 },
+  /* 3108 */  { MAD_F(0x05896583) /* 0.346044077 */, 17 },
+  /* 3109 */  { MAD_F(0x058a0130) /* 0.346192538 */, 17 },
+  /* 3110 */  { MAD_F(0x058a9ce0) /* 0.346341015 */, 17 },
+  /* 3111 */  { MAD_F(0x058b3895) /* 0.346489508 */, 17 },
+  /* 3112 */  { MAD_F(0x058bd44e) /* 0.346638017 */, 17 },
+  /* 3113 */  { MAD_F(0x058c700b) /* 0.346786542 */, 17 },
+  /* 3114 */  { MAD_F(0x058d0bcd) /* 0.346935082 */, 17 },
+  /* 3115 */  { MAD_F(0x058da793) /* 0.347083639 */, 17 },
+  /* 3116 */  { MAD_F(0x058e435d) /* 0.347232211 */, 17 },
+  /* 3117 */  { MAD_F(0x058edf2b) /* 0.347380799 */, 17 },
+  /* 3118 */  { MAD_F(0x058f7afe) /* 0.347529403 */, 17 },
+  /* 3119 */  { MAD_F(0x059016d5) /* 0.347678023 */, 17 },
+
+  /* 3120 */  { MAD_F(0x0590b2b0) /* 0.347826659 */, 17 },
+  /* 3121 */  { MAD_F(0x05914e8f) /* 0.347975311 */, 17 },
+  /* 3122 */  { MAD_F(0x0591ea73) /* 0.348123979 */, 17 },
+  /* 3123 */  { MAD_F(0x0592865b) /* 0.348272662 */, 17 },
+  /* 3124 */  { MAD_F(0x05932247) /* 0.348421362 */, 17 },
+  /* 3125 */  { MAD_F(0x0593be37) /* 0.348570077 */, 17 },
+  /* 3126 */  { MAD_F(0x05945a2c) /* 0.348718808 */, 17 },
+  /* 3127 */  { MAD_F(0x0594f625) /* 0.348867555 */, 17 },
+  /* 3128 */  { MAD_F(0x05959222) /* 0.349016318 */, 17 },
+  /* 3129 */  { MAD_F(0x05962e24) /* 0.349165097 */, 17 },
+  /* 3130 */  { MAD_F(0x0596ca2a) /* 0.349313892 */, 17 },
+  /* 3131 */  { MAD_F(0x05976634) /* 0.349462702 */, 17 },
+  /* 3132 */  { MAD_F(0x05980242) /* 0.349611528 */, 17 },
+  /* 3133 */  { MAD_F(0x05989e54) /* 0.349760370 */, 17 },
+  /* 3134 */  { MAD_F(0x05993a6b) /* 0.349909228 */, 17 },
+  /* 3135 */  { MAD_F(0x0599d686) /* 0.350058102 */, 17 },
+
+  /* 3136 */  { MAD_F(0x059a72a5) /* 0.350206992 */, 17 },
+  /* 3137 */  { MAD_F(0x059b0ec9) /* 0.350355897 */, 17 },
+  /* 3138 */  { MAD_F(0x059baaf1) /* 0.350504818 */, 17 },
+  /* 3139 */  { MAD_F(0x059c471d) /* 0.350653756 */, 17 },
+  /* 3140 */  { MAD_F(0x059ce34d) /* 0.350802708 */, 17 },
+  /* 3141 */  { MAD_F(0x059d7f81) /* 0.350951677 */, 17 },
+  /* 3142 */  { MAD_F(0x059e1bba) /* 0.351100662 */, 17 },
+  /* 3143 */  { MAD_F(0x059eb7f7) /* 0.351249662 */, 17 },
+  /* 3144 */  { MAD_F(0x059f5438) /* 0.351398678 */, 17 },
+  /* 3145 */  { MAD_F(0x059ff07e) /* 0.351547710 */, 17 },
+  /* 3146 */  { MAD_F(0x05a08cc7) /* 0.351696758 */, 17 },
+  /* 3147 */  { MAD_F(0x05a12915) /* 0.351845821 */, 17 },
+  /* 3148 */  { MAD_F(0x05a1c567) /* 0.351994901 */, 17 },
+  /* 3149 */  { MAD_F(0x05a261be) /* 0.352143996 */, 17 },
+  /* 3150 */  { MAD_F(0x05a2fe18) /* 0.352293107 */, 17 },
+  /* 3151 */  { MAD_F(0x05a39a77) /* 0.352442233 */, 17 },
+
+  /* 3152 */  { MAD_F(0x05a436da) /* 0.352591376 */, 17 },
+  /* 3153 */  { MAD_F(0x05a4d342) /* 0.352740534 */, 17 },
+  /* 3154 */  { MAD_F(0x05a56fad) /* 0.352889708 */, 17 },
+  /* 3155 */  { MAD_F(0x05a60c1d) /* 0.353038898 */, 17 },
+  /* 3156 */  { MAD_F(0x05a6a891) /* 0.353188103 */, 17 },
+  /* 3157 */  { MAD_F(0x05a7450a) /* 0.353337325 */, 17 },
+  /* 3158 */  { MAD_F(0x05a7e186) /* 0.353486562 */, 17 },
+  /* 3159 */  { MAD_F(0x05a87e07) /* 0.353635814 */, 17 },
+  /* 3160 */  { MAD_F(0x05a91a8c) /* 0.353785083 */, 17 },
+  /* 3161 */  { MAD_F(0x05a9b715) /* 0.353934367 */, 17 },
+  /* 3162 */  { MAD_F(0x05aa53a2) /* 0.354083667 */, 17 },
+  /* 3163 */  { MAD_F(0x05aaf034) /* 0.354232983 */, 17 },
+  /* 3164 */  { MAD_F(0x05ab8cca) /* 0.354382314 */, 17 },
+  /* 3165 */  { MAD_F(0x05ac2964) /* 0.354531662 */, 17 },
+  /* 3166 */  { MAD_F(0x05acc602) /* 0.354681025 */, 17 },
+  /* 3167 */  { MAD_F(0x05ad62a5) /* 0.354830403 */, 17 },
+
+  /* 3168 */  { MAD_F(0x05adff4c) /* 0.354979798 */, 17 },
+  /* 3169 */  { MAD_F(0x05ae9bf7) /* 0.355129208 */, 17 },
+  /* 3170 */  { MAD_F(0x05af38a6) /* 0.355278634 */, 17 },
+  /* 3171 */  { MAD_F(0x05afd559) /* 0.355428075 */, 17 },
+  /* 3172 */  { MAD_F(0x05b07211) /* 0.355577533 */, 17 },
+  /* 3173 */  { MAD_F(0x05b10ecd) /* 0.355727006 */, 17 },
+  /* 3174 */  { MAD_F(0x05b1ab8d) /* 0.355876494 */, 17 },
+  /* 3175 */  { MAD_F(0x05b24851) /* 0.356025999 */, 17 },
+  /* 3176 */  { MAD_F(0x05b2e51a) /* 0.356175519 */, 17 },
+  /* 3177 */  { MAD_F(0x05b381e6) /* 0.356325054 */, 17 },
+  /* 3178 */  { MAD_F(0x05b41eb7) /* 0.356474606 */, 17 },
+  /* 3179 */  { MAD_F(0x05b4bb8c) /* 0.356624173 */, 17 },
+  /* 3180 */  { MAD_F(0x05b55866) /* 0.356773756 */, 17 },
+  /* 3181 */  { MAD_F(0x05b5f543) /* 0.356923354 */, 17 },
+  /* 3182 */  { MAD_F(0x05b69225) /* 0.357072969 */, 17 },
+  /* 3183 */  { MAD_F(0x05b72f0b) /* 0.357222598 */, 17 },
+
+  /* 3184 */  { MAD_F(0x05b7cbf5) /* 0.357372244 */, 17 },
+  /* 3185 */  { MAD_F(0x05b868e3) /* 0.357521905 */, 17 },
+  /* 3186 */  { MAD_F(0x05b905d6) /* 0.357671582 */, 17 },
+  /* 3187 */  { MAD_F(0x05b9a2cd) /* 0.357821275 */, 17 },
+  /* 3188 */  { MAD_F(0x05ba3fc8) /* 0.357970983 */, 17 },
+  /* 3189 */  { MAD_F(0x05badcc7) /* 0.358120707 */, 17 },
+  /* 3190 */  { MAD_F(0x05bb79ca) /* 0.358270446 */, 17 },
+  /* 3191 */  { MAD_F(0x05bc16d2) /* 0.358420201 */, 17 },
+  /* 3192 */  { MAD_F(0x05bcb3de) /* 0.358569972 */, 17 },
+  /* 3193 */  { MAD_F(0x05bd50ee) /* 0.358719758 */, 17 },
+  /* 3194 */  { MAD_F(0x05bdee02) /* 0.358869560 */, 17 },
+  /* 3195 */  { MAD_F(0x05be8b1a) /* 0.359019378 */, 17 },
+  /* 3196 */  { MAD_F(0x05bf2837) /* 0.359169211 */, 17 },
+  /* 3197 */  { MAD_F(0x05bfc558) /* 0.359319060 */, 17 },
+  /* 3198 */  { MAD_F(0x05c0627d) /* 0.359468925 */, 17 },
+  /* 3199 */  { MAD_F(0x05c0ffa6) /* 0.359618805 */, 17 },
+
+  /* 3200 */  { MAD_F(0x05c19cd3) /* 0.359768701 */, 17 },
+  /* 3201 */  { MAD_F(0x05c23a05) /* 0.359918612 */, 17 },
+  /* 3202 */  { MAD_F(0x05c2d73a) /* 0.360068540 */, 17 },
+  /* 3203 */  { MAD_F(0x05c37474) /* 0.360218482 */, 17 },
+  /* 3204 */  { MAD_F(0x05c411b2) /* 0.360368440 */, 17 },
+  /* 3205 */  { MAD_F(0x05c4aef5) /* 0.360518414 */, 17 },
+  /* 3206 */  { MAD_F(0x05c54c3b) /* 0.360668404 */, 17 },
+  /* 3207 */  { MAD_F(0x05c5e986) /* 0.360818409 */, 17 },
+  /* 3208 */  { MAD_F(0x05c686d5) /* 0.360968429 */, 17 },
+  /* 3209 */  { MAD_F(0x05c72428) /* 0.361118466 */, 17 },
+  /* 3210 */  { MAD_F(0x05c7c17f) /* 0.361268517 */, 17 },
+  /* 3211 */  { MAD_F(0x05c85eda) /* 0.361418585 */, 17 },
+  /* 3212 */  { MAD_F(0x05c8fc3a) /* 0.361568668 */, 17 },
+  /* 3213 */  { MAD_F(0x05c9999e) /* 0.361718766 */, 17 },
+  /* 3214 */  { MAD_F(0x05ca3706) /* 0.361868881 */, 17 },
+  /* 3215 */  { MAD_F(0x05cad472) /* 0.362019010 */, 17 },
+
+  /* 3216 */  { MAD_F(0x05cb71e2) /* 0.362169156 */, 17 },
+  /* 3217 */  { MAD_F(0x05cc0f57) /* 0.362319316 */, 17 },
+  /* 3218 */  { MAD_F(0x05ccaccf) /* 0.362469493 */, 17 },
+  /* 3219 */  { MAD_F(0x05cd4a4c) /* 0.362619685 */, 17 },
+  /* 3220 */  { MAD_F(0x05cde7cd) /* 0.362769892 */, 17 },
+  /* 3221 */  { MAD_F(0x05ce8552) /* 0.362920115 */, 17 },
+  /* 3222 */  { MAD_F(0x05cf22dc) /* 0.363070354 */, 17 },
+  /* 3223 */  { MAD_F(0x05cfc069) /* 0.363220608 */, 17 },
+  /* 3224 */  { MAD_F(0x05d05dfb) /* 0.363370878 */, 17 },
+  /* 3225 */  { MAD_F(0x05d0fb91) /* 0.363521163 */, 17 },
+  /* 3226 */  { MAD_F(0x05d1992b) /* 0.363671464 */, 17 },
+  /* 3227 */  { MAD_F(0x05d236c9) /* 0.363821780 */, 17 },
+  /* 3228 */  { MAD_F(0x05d2d46c) /* 0.363972112 */, 17 },
+  /* 3229 */  { MAD_F(0x05d37212) /* 0.364122459 */, 17 },
+  /* 3230 */  { MAD_F(0x05d40fbd) /* 0.364272822 */, 17 },
+  /* 3231 */  { MAD_F(0x05d4ad6c) /* 0.364423200 */, 17 },
+
+  /* 3232 */  { MAD_F(0x05d54b1f) /* 0.364573594 */, 17 },
+  /* 3233 */  { MAD_F(0x05d5e8d6) /* 0.364724004 */, 17 },
+  /* 3234 */  { MAD_F(0x05d68691) /* 0.364874429 */, 17 },
+  /* 3235 */  { MAD_F(0x05d72451) /* 0.365024869 */, 17 },
+  /* 3236 */  { MAD_F(0x05d7c215) /* 0.365175325 */, 17 },
+  /* 3237 */  { MAD_F(0x05d85fdc) /* 0.365325796 */, 17 },
+  /* 3238 */  { MAD_F(0x05d8fda8) /* 0.365476283 */, 17 },
+  /* 3239 */  { MAD_F(0x05d99b79) /* 0.365626786 */, 17 },
+  /* 3240 */  { MAD_F(0x05da394d) /* 0.365777304 */, 17 },
+  /* 3241 */  { MAD_F(0x05dad726) /* 0.365927837 */, 17 },
+  /* 3242 */  { MAD_F(0x05db7502) /* 0.366078386 */, 17 },
+  /* 3243 */  { MAD_F(0x05dc12e3) /* 0.366228950 */, 17 },
+  /* 3244 */  { MAD_F(0x05dcb0c8) /* 0.366379530 */, 17 },
+  /* 3245 */  { MAD_F(0x05dd4eb1) /* 0.366530125 */, 17 },
+  /* 3246 */  { MAD_F(0x05ddec9e) /* 0.366680736 */, 17 },
+  /* 3247 */  { MAD_F(0x05de8a90) /* 0.366831362 */, 17 },
+
+  /* 3248 */  { MAD_F(0x05df2885) /* 0.366982004 */, 17 },
+  /* 3249 */  { MAD_F(0x05dfc67f) /* 0.367132661 */, 17 },
+  /* 3250 */  { MAD_F(0x05e0647d) /* 0.367283334 */, 17 },
+  /* 3251 */  { MAD_F(0x05e1027f) /* 0.367434022 */, 17 },
+  /* 3252 */  { MAD_F(0x05e1a085) /* 0.367584725 */, 17 },
+  /* 3253 */  { MAD_F(0x05e23e8f) /* 0.367735444 */, 17 },
+  /* 3254 */  { MAD_F(0x05e2dc9e) /* 0.367886179 */, 17 },
+  /* 3255 */  { MAD_F(0x05e37ab0) /* 0.368036929 */, 17 },
+  /* 3256 */  { MAD_F(0x05e418c7) /* 0.368187694 */, 17 },
+  /* 3257 */  { MAD_F(0x05e4b6e2) /* 0.368338475 */, 17 },
+  /* 3258 */  { MAD_F(0x05e55501) /* 0.368489271 */, 17 },
+  /* 3259 */  { MAD_F(0x05e5f324) /* 0.368640082 */, 17 },
+  /* 3260 */  { MAD_F(0x05e6914c) /* 0.368790909 */, 17 },
+  /* 3261 */  { MAD_F(0x05e72f77) /* 0.368941752 */, 17 },
+  /* 3262 */  { MAD_F(0x05e7cda7) /* 0.369092610 */, 17 },
+  /* 3263 */  { MAD_F(0x05e86bda) /* 0.369243483 */, 17 },
+
+  /* 3264 */  { MAD_F(0x05e90a12) /* 0.369394372 */, 17 },
+  /* 3265 */  { MAD_F(0x05e9a84e) /* 0.369545276 */, 17 },
+  /* 3266 */  { MAD_F(0x05ea468e) /* 0.369696195 */, 17 },
+  /* 3267 */  { MAD_F(0x05eae4d3) /* 0.369847130 */, 17 },
+  /* 3268 */  { MAD_F(0x05eb831b) /* 0.369998080 */, 17 },
+  /* 3269 */  { MAD_F(0x05ec2168) /* 0.370149046 */, 17 },
+  /* 3270 */  { MAD_F(0x05ecbfb8) /* 0.370300027 */, 17 },
+  /* 3271 */  { MAD_F(0x05ed5e0d) /* 0.370451024 */, 17 },
+  /* 3272 */  { MAD_F(0x05edfc66) /* 0.370602036 */, 17 },
+  /* 3273 */  { MAD_F(0x05ee9ac3) /* 0.370753063 */, 17 },
+  /* 3274 */  { MAD_F(0x05ef3924) /* 0.370904105 */, 17 },
+  /* 3275 */  { MAD_F(0x05efd78a) /* 0.371055163 */, 17 },
+  /* 3276 */  { MAD_F(0x05f075f3) /* 0.371206237 */, 17 },
+  /* 3277 */  { MAD_F(0x05f11461) /* 0.371357326 */, 17 },
+  /* 3278 */  { MAD_F(0x05f1b2d3) /* 0.371508430 */, 17 },
+  /* 3279 */  { MAD_F(0x05f25148) /* 0.371659549 */, 17 },
+
+  /* 3280 */  { MAD_F(0x05f2efc2) /* 0.371810684 */, 17 },
+  /* 3281 */  { MAD_F(0x05f38e40) /* 0.371961834 */, 17 },
+  /* 3282 */  { MAD_F(0x05f42cc3) /* 0.372113000 */, 17 },
+  /* 3283 */  { MAD_F(0x05f4cb49) /* 0.372264181 */, 17 },
+  /* 3284 */  { MAD_F(0x05f569d3) /* 0.372415377 */, 17 },
+  /* 3285 */  { MAD_F(0x05f60862) /* 0.372566589 */, 17 },
+  /* 3286 */  { MAD_F(0x05f6a6f5) /* 0.372717816 */, 17 },
+  /* 3287 */  { MAD_F(0x05f7458b) /* 0.372869058 */, 17 },
+  /* 3288 */  { MAD_F(0x05f7e426) /* 0.373020316 */, 17 },
+  /* 3289 */  { MAD_F(0x05f882c5) /* 0.373171589 */, 17 },
+  /* 3290 */  { MAD_F(0x05f92169) /* 0.373322877 */, 17 },
+  /* 3291 */  { MAD_F(0x05f9c010) /* 0.373474181 */, 17 },
+  /* 3292 */  { MAD_F(0x05fa5ebb) /* 0.373625500 */, 17 },
+  /* 3293 */  { MAD_F(0x05fafd6b) /* 0.373776834 */, 17 },
+  /* 3294 */  { MAD_F(0x05fb9c1e) /* 0.373928184 */, 17 },
+  /* 3295 */  { MAD_F(0x05fc3ad6) /* 0.374079549 */, 17 },
+
+  /* 3296 */  { MAD_F(0x05fcd992) /* 0.374230929 */, 17 },
+  /* 3297 */  { MAD_F(0x05fd7852) /* 0.374382325 */, 17 },
+  /* 3298 */  { MAD_F(0x05fe1716) /* 0.374533735 */, 17 },
+  /* 3299 */  { MAD_F(0x05feb5de) /* 0.374685162 */, 17 },
+  /* 3300 */  { MAD_F(0x05ff54aa) /* 0.374836603 */, 17 },
+  /* 3301 */  { MAD_F(0x05fff37b) /* 0.374988060 */, 17 },
+  /* 3302 */  { MAD_F(0x0600924f) /* 0.375139532 */, 17 },
+  /* 3303 */  { MAD_F(0x06013128) /* 0.375291019 */, 17 },
+  /* 3304 */  { MAD_F(0x0601d004) /* 0.375442522 */, 17 },
+  /* 3305 */  { MAD_F(0x06026ee5) /* 0.375594040 */, 17 },
+  /* 3306 */  { MAD_F(0x06030dca) /* 0.375745573 */, 17 },
+  /* 3307 */  { MAD_F(0x0603acb3) /* 0.375897122 */, 17 },
+  /* 3308 */  { MAD_F(0x06044ba0) /* 0.376048685 */, 17 },
+  /* 3309 */  { MAD_F(0x0604ea91) /* 0.376200265 */, 17 },
+  /* 3310 */  { MAD_F(0x06058987) /* 0.376351859 */, 17 },
+  /* 3311 */  { MAD_F(0x06062880) /* 0.376503468 */, 17 },
+
+  /* 3312 */  { MAD_F(0x0606c77d) /* 0.376655093 */, 17 },
+  /* 3313 */  { MAD_F(0x0607667f) /* 0.376806733 */, 17 },
+  /* 3314 */  { MAD_F(0x06080585) /* 0.376958389 */, 17 },
+  /* 3315 */  { MAD_F(0x0608a48f) /* 0.377110059 */, 17 },
+  /* 3316 */  { MAD_F(0x0609439c) /* 0.377261745 */, 17 },
+  /* 3317 */  { MAD_F(0x0609e2ae) /* 0.377413446 */, 17 },
+  /* 3318 */  { MAD_F(0x060a81c4) /* 0.377565163 */, 17 },
+  /* 3319 */  { MAD_F(0x060b20df) /* 0.377716894 */, 17 },
+  /* 3320 */  { MAD_F(0x060bbffd) /* 0.377868641 */, 17 },
+  /* 3321 */  { MAD_F(0x060c5f1f) /* 0.378020403 */, 17 },
+  /* 3322 */  { MAD_F(0x060cfe46) /* 0.378172181 */, 17 },
+  /* 3323 */  { MAD_F(0x060d9d70) /* 0.378323973 */, 17 },
+  /* 3324 */  { MAD_F(0x060e3c9f) /* 0.378475781 */, 17 },
+  /* 3325 */  { MAD_F(0x060edbd1) /* 0.378627604 */, 17 },
+  /* 3326 */  { MAD_F(0x060f7b08) /* 0.378779442 */, 17 },
+  /* 3327 */  { MAD_F(0x06101a43) /* 0.378931296 */, 17 },
+
+  /* 3328 */  { MAD_F(0x0610b982) /* 0.379083164 */, 17 },
+  /* 3329 */  { MAD_F(0x061158c5) /* 0.379235048 */, 17 },
+  /* 3330 */  { MAD_F(0x0611f80c) /* 0.379386947 */, 17 },
+  /* 3331 */  { MAD_F(0x06129757) /* 0.379538862 */, 17 },
+  /* 3332 */  { MAD_F(0x061336a6) /* 0.379690791 */, 17 },
+  /* 3333 */  { MAD_F(0x0613d5fa) /* 0.379842736 */, 17 },
+  /* 3334 */  { MAD_F(0x06147551) /* 0.379994696 */, 17 },
+  /* 3335 */  { MAD_F(0x061514ad) /* 0.380146671 */, 17 },
+  /* 3336 */  { MAD_F(0x0615b40c) /* 0.380298661 */, 17 },
+  /* 3337 */  { MAD_F(0x06165370) /* 0.380450666 */, 17 },
+  /* 3338 */  { MAD_F(0x0616f2d8) /* 0.380602687 */, 17 },
+  /* 3339 */  { MAD_F(0x06179243) /* 0.380754723 */, 17 },
+  /* 3340 */  { MAD_F(0x061831b3) /* 0.380906774 */, 17 },
+  /* 3341 */  { MAD_F(0x0618d127) /* 0.381058840 */, 17 },
+  /* 3342 */  { MAD_F(0x0619709f) /* 0.381210921 */, 17 },
+  /* 3343 */  { MAD_F(0x061a101b) /* 0.381363018 */, 17 },
+
+  /* 3344 */  { MAD_F(0x061aaf9c) /* 0.381515130 */, 17 },
+  /* 3345 */  { MAD_F(0x061b4f20) /* 0.381667257 */, 17 },
+  /* 3346 */  { MAD_F(0x061beea8) /* 0.381819399 */, 17 },
+  /* 3347 */  { MAD_F(0x061c8e34) /* 0.381971556 */, 17 },
+  /* 3348 */  { MAD_F(0x061d2dc5) /* 0.382123728 */, 17 },
+  /* 3349 */  { MAD_F(0x061dcd59) /* 0.382275916 */, 17 },
+  /* 3350 */  { MAD_F(0x061e6cf2) /* 0.382428118 */, 17 },
+  /* 3351 */  { MAD_F(0x061f0c8f) /* 0.382580336 */, 17 },
+  /* 3352 */  { MAD_F(0x061fac2f) /* 0.382732569 */, 17 },
+  /* 3353 */  { MAD_F(0x06204bd4) /* 0.382884817 */, 17 },
+  /* 3354 */  { MAD_F(0x0620eb7d) /* 0.383037080 */, 17 },
+  /* 3355 */  { MAD_F(0x06218b2a) /* 0.383189358 */, 17 },
+  /* 3356 */  { MAD_F(0x06222adb) /* 0.383341652 */, 17 },
+  /* 3357 */  { MAD_F(0x0622ca90) /* 0.383493960 */, 17 },
+  /* 3358 */  { MAD_F(0x06236a49) /* 0.383646284 */, 17 },
+  /* 3359 */  { MAD_F(0x06240a06) /* 0.383798623 */, 17 },
+
+  /* 3360 */  { MAD_F(0x0624a9c7) /* 0.383950977 */, 17 },
+  /* 3361 */  { MAD_F(0x0625498d) /* 0.384103346 */, 17 },
+  /* 3362 */  { MAD_F(0x0625e956) /* 0.384255730 */, 17 },
+  /* 3363 */  { MAD_F(0x06268923) /* 0.384408129 */, 17 },
+  /* 3364 */  { MAD_F(0x062728f5) /* 0.384560544 */, 17 },
+  /* 3365 */  { MAD_F(0x0627c8ca) /* 0.384712973 */, 17 },
+  /* 3366 */  { MAD_F(0x062868a4) /* 0.384865418 */, 17 },
+  /* 3367 */  { MAD_F(0x06290881) /* 0.385017878 */, 17 },
+  /* 3368 */  { MAD_F(0x0629a863) /* 0.385170352 */, 17 },
+  /* 3369 */  { MAD_F(0x062a4849) /* 0.385322842 */, 17 },
+  /* 3370 */  { MAD_F(0x062ae832) /* 0.385475347 */, 17 },
+  /* 3371 */  { MAD_F(0x062b8820) /* 0.385627867 */, 17 },
+  /* 3372 */  { MAD_F(0x062c2812) /* 0.385780402 */, 17 },
+  /* 3373 */  { MAD_F(0x062cc808) /* 0.385932953 */, 17 },
+  /* 3374 */  { MAD_F(0x062d6802) /* 0.386085518 */, 17 },
+  /* 3375 */  { MAD_F(0x062e0800) /* 0.386238098 */, 17 },
+
+  /* 3376 */  { MAD_F(0x062ea802) /* 0.386390694 */, 17 },
+  /* 3377 */  { MAD_F(0x062f4808) /* 0.386543304 */, 17 },
+  /* 3378 */  { MAD_F(0x062fe812) /* 0.386695930 */, 17 },
+  /* 3379 */  { MAD_F(0x06308820) /* 0.386848570 */, 17 },
+  /* 3380 */  { MAD_F(0x06312832) /* 0.387001226 */, 17 },
+  /* 3381 */  { MAD_F(0x0631c849) /* 0.387153897 */, 17 },
+  /* 3382 */  { MAD_F(0x06326863) /* 0.387306582 */, 17 },
+  /* 3383 */  { MAD_F(0x06330881) /* 0.387459283 */, 17 },
+  /* 3384 */  { MAD_F(0x0633a8a3) /* 0.387611999 */, 17 },
+  /* 3385 */  { MAD_F(0x063448ca) /* 0.387764730 */, 17 },
+  /* 3386 */  { MAD_F(0x0634e8f4) /* 0.387917476 */, 17 },
+  /* 3387 */  { MAD_F(0x06358923) /* 0.388070237 */, 17 },
+  /* 3388 */  { MAD_F(0x06362955) /* 0.388223013 */, 17 },
+  /* 3389 */  { MAD_F(0x0636c98c) /* 0.388375804 */, 17 },
+  /* 3390 */  { MAD_F(0x063769c6) /* 0.388528610 */, 17 },
+  /* 3391 */  { MAD_F(0x06380a05) /* 0.388681431 */, 17 },
+
+  /* 3392 */  { MAD_F(0x0638aa48) /* 0.388834268 */, 17 },
+  /* 3393 */  { MAD_F(0x06394a8e) /* 0.388987119 */, 17 },
+  /* 3394 */  { MAD_F(0x0639ead9) /* 0.389139985 */, 17 },
+  /* 3395 */  { MAD_F(0x063a8b28) /* 0.389292866 */, 17 },
+  /* 3396 */  { MAD_F(0x063b2b7b) /* 0.389445762 */, 17 },
+  /* 3397 */  { MAD_F(0x063bcbd1) /* 0.389598674 */, 17 },
+  /* 3398 */  { MAD_F(0x063c6c2c) /* 0.389751600 */, 17 },
+  /* 3399 */  { MAD_F(0x063d0c8b) /* 0.389904541 */, 17 },
+  /* 3400 */  { MAD_F(0x063dacee) /* 0.390057497 */, 17 },
+  /* 3401 */  { MAD_F(0x063e4d55) /* 0.390210468 */, 17 },
+  /* 3402 */  { MAD_F(0x063eedc0) /* 0.390363455 */, 17 },
+  /* 3403 */  { MAD_F(0x063f8e2f) /* 0.390516456 */, 17 },
+  /* 3404 */  { MAD_F(0x06402ea2) /* 0.390669472 */, 17 },
+  /* 3405 */  { MAD_F(0x0640cf19) /* 0.390822503 */, 17 },
+  /* 3406 */  { MAD_F(0x06416f94) /* 0.390975549 */, 17 },
+  /* 3407 */  { MAD_F(0x06421013) /* 0.391128611 */, 17 },
+
+  /* 3408 */  { MAD_F(0x0642b096) /* 0.391281687 */, 17 },
+  /* 3409 */  { MAD_F(0x0643511d) /* 0.391434778 */, 17 },
+  /* 3410 */  { MAD_F(0x0643f1a8) /* 0.391587884 */, 17 },
+  /* 3411 */  { MAD_F(0x06449237) /* 0.391741005 */, 17 },
+  /* 3412 */  { MAD_F(0x064532ca) /* 0.391894141 */, 17 },
+  /* 3413 */  { MAD_F(0x0645d361) /* 0.392047292 */, 17 },
+  /* 3414 */  { MAD_F(0x064673fc) /* 0.392200458 */, 17 },
+  /* 3415 */  { MAD_F(0x0647149c) /* 0.392353638 */, 17 },
+  /* 3416 */  { MAD_F(0x0647b53f) /* 0.392506834 */, 17 },
+  /* 3417 */  { MAD_F(0x064855e6) /* 0.392660045 */, 17 },
+  /* 3418 */  { MAD_F(0x0648f691) /* 0.392813271 */, 17 },
+  /* 3419 */  { MAD_F(0x06499740) /* 0.392966511 */, 17 },
+  /* 3420 */  { MAD_F(0x064a37f4) /* 0.393119767 */, 17 },
+  /* 3421 */  { MAD_F(0x064ad8ab) /* 0.393273038 */, 17 },
+  /* 3422 */  { MAD_F(0x064b7966) /* 0.393426323 */, 17 },
+  /* 3423 */  { MAD_F(0x064c1a25) /* 0.393579623 */, 17 },
+
+  /* 3424 */  { MAD_F(0x064cbae9) /* 0.393732939 */, 17 },
+  /* 3425 */  { MAD_F(0x064d5bb0) /* 0.393886269 */, 17 },
+  /* 3426 */  { MAD_F(0x064dfc7b) /* 0.394039614 */, 17 },
+  /* 3427 */  { MAD_F(0x064e9d4b) /* 0.394192974 */, 17 },
+  /* 3428 */  { MAD_F(0x064f3e1e) /* 0.394346349 */, 17 },
+  /* 3429 */  { MAD_F(0x064fdef5) /* 0.394499739 */, 17 },
+  /* 3430 */  { MAD_F(0x06507fd0) /* 0.394653144 */, 17 },
+  /* 3431 */  { MAD_F(0x065120b0) /* 0.394806564 */, 17 },
+  /* 3432 */  { MAD_F(0x0651c193) /* 0.394959999 */, 17 },
+  /* 3433 */  { MAD_F(0x0652627a) /* 0.395113448 */, 17 },
+  /* 3434 */  { MAD_F(0x06530366) /* 0.395266913 */, 17 },
+  /* 3435 */  { MAD_F(0x0653a455) /* 0.395420392 */, 17 },
+  /* 3436 */  { MAD_F(0x06544548) /* 0.395573886 */, 17 },
+  /* 3437 */  { MAD_F(0x0654e640) /* 0.395727395 */, 17 },
+  /* 3438 */  { MAD_F(0x0655873b) /* 0.395880919 */, 17 },
+  /* 3439 */  { MAD_F(0x0656283a) /* 0.396034458 */, 17 },
+
+  /* 3440 */  { MAD_F(0x0656c93d) /* 0.396188012 */, 17 },
+  /* 3441 */  { MAD_F(0x06576a45) /* 0.396341581 */, 17 },
+  /* 3442 */  { MAD_F(0x06580b50) /* 0.396495164 */, 17 },
+  /* 3443 */  { MAD_F(0x0658ac5f) /* 0.396648763 */, 17 },
+  /* 3444 */  { MAD_F(0x06594d73) /* 0.396802376 */, 17 },
+  /* 3445 */  { MAD_F(0x0659ee8a) /* 0.396956004 */, 17 },
+  /* 3446 */  { MAD_F(0x065a8fa5) /* 0.397109647 */, 17 },
+  /* 3447 */  { MAD_F(0x065b30c4) /* 0.397263305 */, 17 },
+  /* 3448 */  { MAD_F(0x065bd1e7) /* 0.397416978 */, 17 },
+  /* 3449 */  { MAD_F(0x065c730f) /* 0.397570666 */, 17 },
+  /* 3450 */  { MAD_F(0x065d143a) /* 0.397724368 */, 17 },
+  /* 3451 */  { MAD_F(0x065db569) /* 0.397878085 */, 17 },
+  /* 3452 */  { MAD_F(0x065e569c) /* 0.398031818 */, 17 },
+  /* 3453 */  { MAD_F(0x065ef7d3) /* 0.398185565 */, 17 },
+  /* 3454 */  { MAD_F(0x065f990e) /* 0.398339326 */, 17 },
+  /* 3455 */  { MAD_F(0x06603a4e) /* 0.398493103 */, 17 },
+
+  /* 3456 */  { MAD_F(0x0660db91) /* 0.398646895 */, 17 },
+  /* 3457 */  { MAD_F(0x06617cd8) /* 0.398800701 */, 17 },
+  /* 3458 */  { MAD_F(0x06621e23) /* 0.398954522 */, 17 },
+  /* 3459 */  { MAD_F(0x0662bf72) /* 0.399108358 */, 17 },
+  /* 3460 */  { MAD_F(0x066360c5) /* 0.399262209 */, 17 },
+  /* 3461 */  { MAD_F(0x0664021c) /* 0.399416075 */, 17 },
+  /* 3462 */  { MAD_F(0x0664a377) /* 0.399569955 */, 17 },
+  /* 3463 */  { MAD_F(0x066544d6) /* 0.399723851 */, 17 },
+  /* 3464 */  { MAD_F(0x0665e639) /* 0.399877761 */, 17 },
+  /* 3465 */  { MAD_F(0x066687a0) /* 0.400031686 */, 17 },
+  /* 3466 */  { MAD_F(0x0667290b) /* 0.400185625 */, 17 },
+  /* 3467 */  { MAD_F(0x0667ca79) /* 0.400339580 */, 17 },
+  /* 3468 */  { MAD_F(0x06686bec) /* 0.400493549 */, 17 },
+  /* 3469 */  { MAD_F(0x06690d63) /* 0.400647534 */, 17 },
+  /* 3470 */  { MAD_F(0x0669aede) /* 0.400801533 */, 17 },
+  /* 3471 */  { MAD_F(0x066a505d) /* 0.400955546 */, 17 },
+
+  /* 3472 */  { MAD_F(0x066af1df) /* 0.401109575 */, 17 },
+  /* 3473 */  { MAD_F(0x066b9366) /* 0.401263618 */, 17 },
+  /* 3474 */  { MAD_F(0x066c34f1) /* 0.401417676 */, 17 },
+  /* 3475 */  { MAD_F(0x066cd67f) /* 0.401571749 */, 17 },
+  /* 3476 */  { MAD_F(0x066d7812) /* 0.401725837 */, 17 },
+  /* 3477 */  { MAD_F(0x066e19a9) /* 0.401879939 */, 17 },
+  /* 3478 */  { MAD_F(0x066ebb43) /* 0.402034056 */, 17 },
+  /* 3479 */  { MAD_F(0x066f5ce2) /* 0.402188188 */, 17 },
+  /* 3480 */  { MAD_F(0x066ffe84) /* 0.402342335 */, 17 },
+  /* 3481 */  { MAD_F(0x0670a02a) /* 0.402496497 */, 17 },
+  /* 3482 */  { MAD_F(0x067141d5) /* 0.402650673 */, 17 },
+  /* 3483 */  { MAD_F(0x0671e383) /* 0.402804864 */, 17 },
+  /* 3484 */  { MAD_F(0x06728535) /* 0.402959070 */, 17 },
+  /* 3485 */  { MAD_F(0x067326ec) /* 0.403113291 */, 17 },
+  /* 3486 */  { MAD_F(0x0673c8a6) /* 0.403267526 */, 17 },
+  /* 3487 */  { MAD_F(0x06746a64) /* 0.403421776 */, 17 },
+
+  /* 3488 */  { MAD_F(0x06750c26) /* 0.403576041 */, 17 },
+  /* 3489 */  { MAD_F(0x0675adec) /* 0.403730320 */, 17 },
+  /* 3490 */  { MAD_F(0x06764fb6) /* 0.403884615 */, 17 },
+  /* 3491 */  { MAD_F(0x0676f184) /* 0.404038924 */, 17 },
+  /* 3492 */  { MAD_F(0x06779356) /* 0.404193247 */, 17 },
+  /* 3493 */  { MAD_F(0x0678352c) /* 0.404347586 */, 17 },
+  /* 3494 */  { MAD_F(0x0678d706) /* 0.404501939 */, 17 },
+  /* 3495 */  { MAD_F(0x067978e4) /* 0.404656307 */, 17 },
+  /* 3496 */  { MAD_F(0x067a1ac6) /* 0.404810690 */, 17 },
+  /* 3497 */  { MAD_F(0x067abcac) /* 0.404965087 */, 17 },
+  /* 3498 */  { MAD_F(0x067b5e95) /* 0.405119499 */, 17 },
+  /* 3499 */  { MAD_F(0x067c0083) /* 0.405273926 */, 17 },
+  /* 3500 */  { MAD_F(0x067ca275) /* 0.405428368 */, 17 },
+  /* 3501 */  { MAD_F(0x067d446a) /* 0.405582824 */, 17 },
+  /* 3502 */  { MAD_F(0x067de664) /* 0.405737295 */, 17 },
+  /* 3503 */  { MAD_F(0x067e8861) /* 0.405891781 */, 17 },
+
+  /* 3504 */  { MAD_F(0x067f2a62) /* 0.406046281 */, 17 },
+  /* 3505 */  { MAD_F(0x067fcc68) /* 0.406200796 */, 17 },
+  /* 3506 */  { MAD_F(0x06806e71) /* 0.406355326 */, 17 },
+  /* 3507 */  { MAD_F(0x0681107e) /* 0.406509870 */, 17 },
+  /* 3508 */  { MAD_F(0x0681b28f) /* 0.406664429 */, 17 },
+  /* 3509 */  { MAD_F(0x068254a4) /* 0.406819003 */, 17 },
+  /* 3510 */  { MAD_F(0x0682f6bd) /* 0.406973592 */, 17 },
+  /* 3511 */  { MAD_F(0x068398da) /* 0.407128195 */, 17 },
+  /* 3512 */  { MAD_F(0x06843afb) /* 0.407282813 */, 17 },
+  /* 3513 */  { MAD_F(0x0684dd20) /* 0.407437445 */, 17 },
+  /* 3514 */  { MAD_F(0x06857f49) /* 0.407592093 */, 17 },
+  /* 3515 */  { MAD_F(0x06862176) /* 0.407746754 */, 17 },
+  /* 3516 */  { MAD_F(0x0686c3a6) /* 0.407901431 */, 17 },
+  /* 3517 */  { MAD_F(0x068765db) /* 0.408056122 */, 17 },
+  /* 3518 */  { MAD_F(0x06880814) /* 0.408210828 */, 17 },
+  /* 3519 */  { MAD_F(0x0688aa50) /* 0.408365549 */, 17 },
+
+  /* 3520 */  { MAD_F(0x06894c90) /* 0.408520284 */, 17 },
+  /* 3521 */  { MAD_F(0x0689eed5) /* 0.408675034 */, 17 },
+  /* 3522 */  { MAD_F(0x068a911d) /* 0.408829798 */, 17 },
+  /* 3523 */  { MAD_F(0x068b3369) /* 0.408984577 */, 17 },
+  /* 3524 */  { MAD_F(0x068bd5b9) /* 0.409139371 */, 17 },
+  /* 3525 */  { MAD_F(0x068c780e) /* 0.409294180 */, 17 },
+  /* 3526 */  { MAD_F(0x068d1a66) /* 0.409449003 */, 17 },
+  /* 3527 */  { MAD_F(0x068dbcc1) /* 0.409603840 */, 17 },
+  /* 3528 */  { MAD_F(0x068e5f21) /* 0.409758693 */, 17 },
+  /* 3529 */  { MAD_F(0x068f0185) /* 0.409913560 */, 17 },
+  /* 3530 */  { MAD_F(0x068fa3ed) /* 0.410068441 */, 17 },
+  /* 3531 */  { MAD_F(0x06904658) /* 0.410223338 */, 17 },
+  /* 3532 */  { MAD_F(0x0690e8c8) /* 0.410378249 */, 17 },
+  /* 3533 */  { MAD_F(0x06918b3c) /* 0.410533174 */, 17 },
+  /* 3534 */  { MAD_F(0x06922db3) /* 0.410688114 */, 17 },
+  /* 3535 */  { MAD_F(0x0692d02e) /* 0.410843069 */, 17 },
+
+  /* 3536 */  { MAD_F(0x069372ae) /* 0.410998038 */, 17 },
+  /* 3537 */  { MAD_F(0x06941531) /* 0.411153022 */, 17 },
+  /* 3538 */  { MAD_F(0x0694b7b8) /* 0.411308021 */, 17 },
+  /* 3539 */  { MAD_F(0x06955a43) /* 0.411463034 */, 17 },
+  /* 3540 */  { MAD_F(0x0695fcd2) /* 0.411618062 */, 17 },
+  /* 3541 */  { MAD_F(0x06969f65) /* 0.411773104 */, 17 },
+  /* 3542 */  { MAD_F(0x069741fb) /* 0.411928161 */, 17 },
+  /* 3543 */  { MAD_F(0x0697e496) /* 0.412083232 */, 17 },
+  /* 3544 */  { MAD_F(0x06988735) /* 0.412238319 */, 17 },
+  /* 3545 */  { MAD_F(0x069929d7) /* 0.412393419 */, 17 },
+  /* 3546 */  { MAD_F(0x0699cc7e) /* 0.412548535 */, 17 },
+  /* 3547 */  { MAD_F(0x069a6f28) /* 0.412703664 */, 17 },
+  /* 3548 */  { MAD_F(0x069b11d6) /* 0.412858809 */, 17 },
+  /* 3549 */  { MAD_F(0x069bb489) /* 0.413013968 */, 17 },
+  /* 3550 */  { MAD_F(0x069c573f) /* 0.413169142 */, 17 },
+  /* 3551 */  { MAD_F(0x069cf9f9) /* 0.413324330 */, 17 },
+
+  /* 3552 */  { MAD_F(0x069d9cb7) /* 0.413479532 */, 17 },
+  /* 3553 */  { MAD_F(0x069e3f78) /* 0.413634750 */, 17 },
+  /* 3554 */  { MAD_F(0x069ee23e) /* 0.413789982 */, 17 },
+  /* 3555 */  { MAD_F(0x069f8508) /* 0.413945228 */, 17 },
+  /* 3556 */  { MAD_F(0x06a027d5) /* 0.414100489 */, 17 },
+  /* 3557 */  { MAD_F(0x06a0caa7) /* 0.414255765 */, 17 },
+  /* 3558 */  { MAD_F(0x06a16d7c) /* 0.414411055 */, 17 },
+  /* 3559 */  { MAD_F(0x06a21055) /* 0.414566359 */, 17 },
+  /* 3560 */  { MAD_F(0x06a2b333) /* 0.414721679 */, 17 },
+  /* 3561 */  { MAD_F(0x06a35614) /* 0.414877012 */, 17 },
+  /* 3562 */  { MAD_F(0x06a3f8f9) /* 0.415032361 */, 17 },
+  /* 3563 */  { MAD_F(0x06a49be2) /* 0.415187723 */, 17 },
+  /* 3564 */  { MAD_F(0x06a53ece) /* 0.415343101 */, 17 },
+  /* 3565 */  { MAD_F(0x06a5e1bf) /* 0.415498493 */, 17 },
+  /* 3566 */  { MAD_F(0x06a684b4) /* 0.415653899 */, 17 },
+  /* 3567 */  { MAD_F(0x06a727ac) /* 0.415809320 */, 17 },
+
+  /* 3568 */  { MAD_F(0x06a7caa9) /* 0.415964756 */, 17 },
+  /* 3569 */  { MAD_F(0x06a86da9) /* 0.416120206 */, 17 },
+  /* 3570 */  { MAD_F(0x06a910ad) /* 0.416275670 */, 17 },
+  /* 3571 */  { MAD_F(0x06a9b3b5) /* 0.416431149 */, 17 },
+  /* 3572 */  { MAD_F(0x06aa56c1) /* 0.416586643 */, 17 },
+  /* 3573 */  { MAD_F(0x06aaf9d1) /* 0.416742151 */, 17 },
+  /* 3574 */  { MAD_F(0x06ab9ce5) /* 0.416897673 */, 17 },
+  /* 3575 */  { MAD_F(0x06ac3ffc) /* 0.417053210 */, 17 },
+  /* 3576 */  { MAD_F(0x06ace318) /* 0.417208762 */, 17 },
+  /* 3577 */  { MAD_F(0x06ad8637) /* 0.417364328 */, 17 },
+  /* 3578 */  { MAD_F(0x06ae295b) /* 0.417519909 */, 17 },
+  /* 3579 */  { MAD_F(0x06aecc82) /* 0.417675504 */, 17 },
+  /* 3580 */  { MAD_F(0x06af6fad) /* 0.417831113 */, 17 },
+  /* 3581 */  { MAD_F(0x06b012dc) /* 0.417986737 */, 17 },
+  /* 3582 */  { MAD_F(0x06b0b60f) /* 0.418142376 */, 17 },
+  /* 3583 */  { MAD_F(0x06b15946) /* 0.418298029 */, 17 },
+
+  /* 3584 */  { MAD_F(0x06b1fc81) /* 0.418453696 */, 17 },
+  /* 3585 */  { MAD_F(0x06b29fbf) /* 0.418609378 */, 17 },
+  /* 3586 */  { MAD_F(0x06b34302) /* 0.418765075 */, 17 },
+  /* 3587 */  { MAD_F(0x06b3e648) /* 0.418920786 */, 17 },
+  /* 3588 */  { MAD_F(0x06b48992) /* 0.419076511 */, 17 },
+  /* 3589 */  { MAD_F(0x06b52ce0) /* 0.419232251 */, 17 },
+  /* 3590 */  { MAD_F(0x06b5d032) /* 0.419388005 */, 17 },
+  /* 3591 */  { MAD_F(0x06b67388) /* 0.419543774 */, 17 },
+  /* 3592 */  { MAD_F(0x06b716e2) /* 0.419699557 */, 17 },
+  /* 3593 */  { MAD_F(0x06b7ba3f) /* 0.419855355 */, 17 },
+  /* 3594 */  { MAD_F(0x06b85da1) /* 0.420011167 */, 17 },
+  /* 3595 */  { MAD_F(0x06b90106) /* 0.420166994 */, 17 },
+  /* 3596 */  { MAD_F(0x06b9a470) /* 0.420322835 */, 17 },
+  /* 3597 */  { MAD_F(0x06ba47dd) /* 0.420478690 */, 17 },
+  /* 3598 */  { MAD_F(0x06baeb4e) /* 0.420634560 */, 17 },
+  /* 3599 */  { MAD_F(0x06bb8ec3) /* 0.420790445 */, 17 },
+
+  /* 3600 */  { MAD_F(0x06bc323b) /* 0.420946343 */, 17 },
+  /* 3601 */  { MAD_F(0x06bcd5b8) /* 0.421102257 */, 17 },
+  /* 3602 */  { MAD_F(0x06bd7939) /* 0.421258184 */, 17 },
+  /* 3603 */  { MAD_F(0x06be1cbd) /* 0.421414127 */, 17 },
+  /* 3604 */  { MAD_F(0x06bec045) /* 0.421570083 */, 17 },
+  /* 3605 */  { MAD_F(0x06bf63d1) /* 0.421726054 */, 17 },
+  /* 3606 */  { MAD_F(0x06c00761) /* 0.421882040 */, 17 },
+  /* 3607 */  { MAD_F(0x06c0aaf5) /* 0.422038039 */, 17 },
+  /* 3608 */  { MAD_F(0x06c14e8d) /* 0.422194054 */, 17 },
+  /* 3609 */  { MAD_F(0x06c1f229) /* 0.422350082 */, 17 },
+  /* 3610 */  { MAD_F(0x06c295c8) /* 0.422506125 */, 17 },
+  /* 3611 */  { MAD_F(0x06c3396c) /* 0.422662183 */, 17 },
+  /* 3612 */  { MAD_F(0x06c3dd13) /* 0.422818255 */, 17 },
+  /* 3613 */  { MAD_F(0x06c480be) /* 0.422974341 */, 17 },
+  /* 3614 */  { MAD_F(0x06c5246d) /* 0.423130442 */, 17 },
+  /* 3615 */  { MAD_F(0x06c5c820) /* 0.423286557 */, 17 },
+
+  /* 3616 */  { MAD_F(0x06c66bd6) /* 0.423442686 */, 17 },
+  /* 3617 */  { MAD_F(0x06c70f91) /* 0.423598830 */, 17 },
+  /* 3618 */  { MAD_F(0x06c7b34f) /* 0.423754988 */, 17 },
+  /* 3619 */  { MAD_F(0x06c85712) /* 0.423911161 */, 17 },
+  /* 3620 */  { MAD_F(0x06c8fad8) /* 0.424067348 */, 17 },
+  /* 3621 */  { MAD_F(0x06c99ea2) /* 0.424223550 */, 17 },
+  /* 3622 */  { MAD_F(0x06ca4270) /* 0.424379765 */, 17 },
+  /* 3623 */  { MAD_F(0x06cae641) /* 0.424535996 */, 17 },
+  /* 3624 */  { MAD_F(0x06cb8a17) /* 0.424692240 */, 17 },
+  /* 3625 */  { MAD_F(0x06cc2df0) /* 0.424848499 */, 17 },
+  /* 3626 */  { MAD_F(0x06ccd1ce) /* 0.425004772 */, 17 },
+  /* 3627 */  { MAD_F(0x06cd75af) /* 0.425161060 */, 17 },
+  /* 3628 */  { MAD_F(0x06ce1994) /* 0.425317362 */, 17 },
+  /* 3629 */  { MAD_F(0x06cebd7d) /* 0.425473678 */, 17 },
+  /* 3630 */  { MAD_F(0x06cf6169) /* 0.425630009 */, 17 },
+  /* 3631 */  { MAD_F(0x06d0055a) /* 0.425786354 */, 17 },
+
+  /* 3632 */  { MAD_F(0x06d0a94e) /* 0.425942714 */, 17 },
+  /* 3633 */  { MAD_F(0x06d14d47) /* 0.426099088 */, 17 },
+  /* 3634 */  { MAD_F(0x06d1f143) /* 0.426255476 */, 17 },
+  /* 3635 */  { MAD_F(0x06d29543) /* 0.426411878 */, 17 },
+  /* 3636 */  { MAD_F(0x06d33947) /* 0.426568295 */, 17 },
+  /* 3637 */  { MAD_F(0x06d3dd4e) /* 0.426724726 */, 17 },
+  /* 3638 */  { MAD_F(0x06d4815a) /* 0.426881172 */, 17 },
+  /* 3639 */  { MAD_F(0x06d52569) /* 0.427037632 */, 17 },
+  /* 3640 */  { MAD_F(0x06d5c97c) /* 0.427194106 */, 17 },
+  /* 3641 */  { MAD_F(0x06d66d93) /* 0.427350594 */, 17 },
+  /* 3642 */  { MAD_F(0x06d711ae) /* 0.427507097 */, 17 },
+  /* 3643 */  { MAD_F(0x06d7b5cd) /* 0.427663614 */, 17 },
+  /* 3644 */  { MAD_F(0x06d859f0) /* 0.427820146 */, 17 },
+  /* 3645 */  { MAD_F(0x06d8fe16) /* 0.427976692 */, 17 },
+  /* 3646 */  { MAD_F(0x06d9a240) /* 0.428133252 */, 17 },
+  /* 3647 */  { MAD_F(0x06da466f) /* 0.428289826 */, 17 },
+
+  /* 3648 */  { MAD_F(0x06daeaa1) /* 0.428446415 */, 17 },
+  /* 3649 */  { MAD_F(0x06db8ed6) /* 0.428603018 */, 17 },
+  /* 3650 */  { MAD_F(0x06dc3310) /* 0.428759635 */, 17 },
+  /* 3651 */  { MAD_F(0x06dcd74d) /* 0.428916267 */, 17 },
+  /* 3652 */  { MAD_F(0x06dd7b8f) /* 0.429072913 */, 17 },
+  /* 3653 */  { MAD_F(0x06de1fd4) /* 0.429229573 */, 17 },
+  /* 3654 */  { MAD_F(0x06dec41d) /* 0.429386248 */, 17 },
+  /* 3655 */  { MAD_F(0x06df686a) /* 0.429542937 */, 17 },
+  /* 3656 */  { MAD_F(0x06e00cbb) /* 0.429699640 */, 17 },
+  /* 3657 */  { MAD_F(0x06e0b10f) /* 0.429856357 */, 17 },
+  /* 3658 */  { MAD_F(0x06e15567) /* 0.430013089 */, 17 },
+  /* 3659 */  { MAD_F(0x06e1f9c4) /* 0.430169835 */, 17 },
+  /* 3660 */  { MAD_F(0x06e29e24) /* 0.430326595 */, 17 },
+  /* 3661 */  { MAD_F(0x06e34287) /* 0.430483370 */, 17 },
+  /* 3662 */  { MAD_F(0x06e3e6ef) /* 0.430640159 */, 17 },
+  /* 3663 */  { MAD_F(0x06e48b5b) /* 0.430796962 */, 17 },
+
+  /* 3664 */  { MAD_F(0x06e52fca) /* 0.430953779 */, 17 },
+  /* 3665 */  { MAD_F(0x06e5d43d) /* 0.431110611 */, 17 },
+  /* 3666 */  { MAD_F(0x06e678b4) /* 0.431267457 */, 17 },
+  /* 3667 */  { MAD_F(0x06e71d2f) /* 0.431424317 */, 17 },
+  /* 3668 */  { MAD_F(0x06e7c1ae) /* 0.431581192 */, 17 },
+  /* 3669 */  { MAD_F(0x06e86630) /* 0.431738080 */, 17 },
+  /* 3670 */  { MAD_F(0x06e90ab7) /* 0.431894983 */, 17 },
+  /* 3671 */  { MAD_F(0x06e9af41) /* 0.432051900 */, 17 },
+  /* 3672 */  { MAD_F(0x06ea53cf) /* 0.432208832 */, 17 },
+  /* 3673 */  { MAD_F(0x06eaf860) /* 0.432365778 */, 17 },
+  /* 3674 */  { MAD_F(0x06eb9cf6) /* 0.432522737 */, 17 },
+  /* 3675 */  { MAD_F(0x06ec418f) /* 0.432679712 */, 17 },
+  /* 3676 */  { MAD_F(0x06ece62d) /* 0.432836700 */, 17 },
+  /* 3677 */  { MAD_F(0x06ed8ace) /* 0.432993703 */, 17 },
+  /* 3678 */  { MAD_F(0x06ee2f73) /* 0.433150720 */, 17 },
+  /* 3679 */  { MAD_F(0x06eed41b) /* 0.433307751 */, 17 },
+
+  /* 3680 */  { MAD_F(0x06ef78c8) /* 0.433464796 */, 17 },
+  /* 3681 */  { MAD_F(0x06f01d78) /* 0.433621856 */, 17 },
+  /* 3682 */  { MAD_F(0x06f0c22c) /* 0.433778929 */, 17 },
+  /* 3683 */  { MAD_F(0x06f166e4) /* 0.433936017 */, 17 },
+  /* 3684 */  { MAD_F(0x06f20ba0) /* 0.434093120 */, 17 },
+  /* 3685 */  { MAD_F(0x06f2b060) /* 0.434250236 */, 17 },
+  /* 3686 */  { MAD_F(0x06f35523) /* 0.434407367 */, 17 },
+  /* 3687 */  { MAD_F(0x06f3f9eb) /* 0.434564512 */, 17 },
+  /* 3688 */  { MAD_F(0x06f49eb6) /* 0.434721671 */, 17 },
+  /* 3689 */  { MAD_F(0x06f54385) /* 0.434878844 */, 17 },
+  /* 3690 */  { MAD_F(0x06f5e857) /* 0.435036032 */, 17 },
+  /* 3691 */  { MAD_F(0x06f68d2e) /* 0.435193233 */, 17 },
+  /* 3692 */  { MAD_F(0x06f73208) /* 0.435350449 */, 17 },
+  /* 3693 */  { MAD_F(0x06f7d6e6) /* 0.435507679 */, 17 },
+  /* 3694 */  { MAD_F(0x06f87bc8) /* 0.435664924 */, 17 },
+  /* 3695 */  { MAD_F(0x06f920ae) /* 0.435822182 */, 17 },
+
+  /* 3696 */  { MAD_F(0x06f9c597) /* 0.435979455 */, 17 },
+  /* 3697 */  { MAD_F(0x06fa6a85) /* 0.436136741 */, 17 },
+  /* 3698 */  { MAD_F(0x06fb0f76) /* 0.436294042 */, 17 },
+  /* 3699 */  { MAD_F(0x06fbb46b) /* 0.436451358 */, 17 },
+  /* 3700 */  { MAD_F(0x06fc5964) /* 0.436608687 */, 17 },
+  /* 3701 */  { MAD_F(0x06fcfe60) /* 0.436766031 */, 17 },
+  /* 3702 */  { MAD_F(0x06fda361) /* 0.436923388 */, 17 },
+  /* 3703 */  { MAD_F(0x06fe4865) /* 0.437080760 */, 17 },
+  /* 3704 */  { MAD_F(0x06feed6d) /* 0.437238146 */, 17 },
+  /* 3705 */  { MAD_F(0x06ff9279) /* 0.437395547 */, 17 },
+  /* 3706 */  { MAD_F(0x07003788) /* 0.437552961 */, 17 },
+  /* 3707 */  { MAD_F(0x0700dc9c) /* 0.437710389 */, 17 },
+  /* 3708 */  { MAD_F(0x070181b3) /* 0.437867832 */, 17 },
+  /* 3709 */  { MAD_F(0x070226ce) /* 0.438025289 */, 17 },
+  /* 3710 */  { MAD_F(0x0702cbed) /* 0.438182760 */, 17 },
+  /* 3711 */  { MAD_F(0x0703710f) /* 0.438340245 */, 17 },
+
+  /* 3712 */  { MAD_F(0x07041636) /* 0.438497744 */, 17 },
+  /* 3713 */  { MAD_F(0x0704bb60) /* 0.438655258 */, 17 },
+  /* 3714 */  { MAD_F(0x0705608e) /* 0.438812785 */, 17 },
+  /* 3715 */  { MAD_F(0x070605c0) /* 0.438970327 */, 17 },
+  /* 3716 */  { MAD_F(0x0706aaf5) /* 0.439127883 */, 17 },
+  /* 3717 */  { MAD_F(0x0707502f) /* 0.439285453 */, 17 },
+  /* 3718 */  { MAD_F(0x0707f56c) /* 0.439443037 */, 17 },
+  /* 3719 */  { MAD_F(0x07089aad) /* 0.439600635 */, 17 },
+  /* 3720 */  { MAD_F(0x07093ff2) /* 0.439758248 */, 17 },
+  /* 3721 */  { MAD_F(0x0709e53a) /* 0.439915874 */, 17 },
+  /* 3722 */  { MAD_F(0x070a8a86) /* 0.440073515 */, 17 },
+  /* 3723 */  { MAD_F(0x070b2fd7) /* 0.440231170 */, 17 },
+  /* 3724 */  { MAD_F(0x070bd52a) /* 0.440388839 */, 17 },
+  /* 3725 */  { MAD_F(0x070c7a82) /* 0.440546522 */, 17 },
+  /* 3726 */  { MAD_F(0x070d1fde) /* 0.440704219 */, 17 },
+  /* 3727 */  { MAD_F(0x070dc53d) /* 0.440861930 */, 17 },
+
+  /* 3728 */  { MAD_F(0x070e6aa0) /* 0.441019655 */, 17 },
+  /* 3729 */  { MAD_F(0x070f1007) /* 0.441177395 */, 17 },
+  /* 3730 */  { MAD_F(0x070fb571) /* 0.441335148 */, 17 },
+  /* 3731 */  { MAD_F(0x07105ae0) /* 0.441492916 */, 17 },
+  /* 3732 */  { MAD_F(0x07110052) /* 0.441650697 */, 17 },
+  /* 3733 */  { MAD_F(0x0711a5c8) /* 0.441808493 */, 17 },
+  /* 3734 */  { MAD_F(0x07124b42) /* 0.441966303 */, 17 },
+  /* 3735 */  { MAD_F(0x0712f0bf) /* 0.442124127 */, 17 },
+  /* 3736 */  { MAD_F(0x07139641) /* 0.442281965 */, 17 },
+  /* 3737 */  { MAD_F(0x07143bc6) /* 0.442439817 */, 17 },
+  /* 3738 */  { MAD_F(0x0714e14f) /* 0.442597683 */, 17 },
+  /* 3739 */  { MAD_F(0x071586db) /* 0.442755564 */, 17 },
+  /* 3740 */  { MAD_F(0x07162c6c) /* 0.442913458 */, 17 },
+  /* 3741 */  { MAD_F(0x0716d200) /* 0.443071366 */, 17 },
+  /* 3742 */  { MAD_F(0x07177798) /* 0.443229289 */, 17 },
+  /* 3743 */  { MAD_F(0x07181d34) /* 0.443387226 */, 17 },
+
+  /* 3744 */  { MAD_F(0x0718c2d3) /* 0.443545176 */, 17 },
+  /* 3745 */  { MAD_F(0x07196877) /* 0.443703141 */, 17 },
+  /* 3746 */  { MAD_F(0x071a0e1e) /* 0.443861120 */, 17 },
+  /* 3747 */  { MAD_F(0x071ab3c9) /* 0.444019113 */, 17 },
+  /* 3748 */  { MAD_F(0x071b5977) /* 0.444177119 */, 17 },
+  /* 3749 */  { MAD_F(0x071bff2a) /* 0.444335140 */, 17 },
+  /* 3750 */  { MAD_F(0x071ca4e0) /* 0.444493175 */, 17 },
+  /* 3751 */  { MAD_F(0x071d4a9a) /* 0.444651224 */, 17 },
+  /* 3752 */  { MAD_F(0x071df058) /* 0.444809288 */, 17 },
+  /* 3753 */  { MAD_F(0x071e9619) /* 0.444967365 */, 17 },
+  /* 3754 */  { MAD_F(0x071f3bde) /* 0.445125456 */, 17 },
+  /* 3755 */  { MAD_F(0x071fe1a8) /* 0.445283561 */, 17 },
+  /* 3756 */  { MAD_F(0x07208774) /* 0.445441680 */, 17 },
+  /* 3757 */  { MAD_F(0x07212d45) /* 0.445599814 */, 17 },
+  /* 3758 */  { MAD_F(0x0721d319) /* 0.445757961 */, 17 },
+  /* 3759 */  { MAD_F(0x072278f1) /* 0.445916122 */, 17 },
+
+  /* 3760 */  { MAD_F(0x07231ecd) /* 0.446074298 */, 17 },
+  /* 3761 */  { MAD_F(0x0723c4ad) /* 0.446232487 */, 17 },
+  /* 3762 */  { MAD_F(0x07246a90) /* 0.446390690 */, 17 },
+  /* 3763 */  { MAD_F(0x07251077) /* 0.446548908 */, 17 },
+  /* 3764 */  { MAD_F(0x0725b662) /* 0.446707139 */, 17 },
+  /* 3765 */  { MAD_F(0x07265c51) /* 0.446865385 */, 17 },
+  /* 3766 */  { MAD_F(0x07270244) /* 0.447023644 */, 17 },
+  /* 3767 */  { MAD_F(0x0727a83a) /* 0.447181918 */, 17 },
+  /* 3768 */  { MAD_F(0x07284e34) /* 0.447340205 */, 17 },
+  /* 3769 */  { MAD_F(0x0728f431) /* 0.447498507 */, 17 },
+  /* 3770 */  { MAD_F(0x07299a33) /* 0.447656822 */, 17 },
+  /* 3771 */  { MAD_F(0x072a4038) /* 0.447815152 */, 17 },
+  /* 3772 */  { MAD_F(0x072ae641) /* 0.447973495 */, 17 },
+  /* 3773 */  { MAD_F(0x072b8c4e) /* 0.448131853 */, 17 },
+  /* 3774 */  { MAD_F(0x072c325e) /* 0.448290224 */, 17 },
+  /* 3775 */  { MAD_F(0x072cd873) /* 0.448448609 */, 17 },
+
+  /* 3776 */  { MAD_F(0x072d7e8b) /* 0.448607009 */, 17 },
+  /* 3777 */  { MAD_F(0x072e24a7) /* 0.448765422 */, 17 },
+  /* 3778 */  { MAD_F(0x072ecac6) /* 0.448923850 */, 17 },
+  /* 3779 */  { MAD_F(0x072f70e9) /* 0.449082291 */, 17 },
+  /* 3780 */  { MAD_F(0x07301710) /* 0.449240746 */, 17 },
+  /* 3781 */  { MAD_F(0x0730bd3b) /* 0.449399216 */, 17 },
+  /* 3782 */  { MAD_F(0x0731636a) /* 0.449557699 */, 17 },
+  /* 3783 */  { MAD_F(0x0732099c) /* 0.449716196 */, 17 },
+  /* 3784 */  { MAD_F(0x0732afd2) /* 0.449874708 */, 17 },
+  /* 3785 */  { MAD_F(0x0733560c) /* 0.450033233 */, 17 },
+  /* 3786 */  { MAD_F(0x0733fc49) /* 0.450191772 */, 17 },
+  /* 3787 */  { MAD_F(0x0734a28b) /* 0.450350325 */, 17 },
+  /* 3788 */  { MAD_F(0x073548d0) /* 0.450508892 */, 17 },
+  /* 3789 */  { MAD_F(0x0735ef18) /* 0.450667473 */, 17 },
+  /* 3790 */  { MAD_F(0x07369565) /* 0.450826068 */, 17 },
+  /* 3791 */  { MAD_F(0x07373bb5) /* 0.450984677 */, 17 },
+
+  /* 3792 */  { MAD_F(0x0737e209) /* 0.451143300 */, 17 },
+  /* 3793 */  { MAD_F(0x07388861) /* 0.451301937 */, 17 },
+  /* 3794 */  { MAD_F(0x07392ebc) /* 0.451460588 */, 17 },
+  /* 3795 */  { MAD_F(0x0739d51c) /* 0.451619252 */, 17 },
+  /* 3796 */  { MAD_F(0x073a7b7f) /* 0.451777931 */, 17 },
+  /* 3797 */  { MAD_F(0x073b21e5) /* 0.451936623 */, 17 },
+  /* 3798 */  { MAD_F(0x073bc850) /* 0.452095330 */, 17 },
+  /* 3799 */  { MAD_F(0x073c6ebe) /* 0.452254050 */, 17 },
+  /* 3800 */  { MAD_F(0x073d1530) /* 0.452412785 */, 17 },
+  /* 3801 */  { MAD_F(0x073dbba6) /* 0.452571533 */, 17 },
+  /* 3802 */  { MAD_F(0x073e621f) /* 0.452730295 */, 17 },
+  /* 3803 */  { MAD_F(0x073f089c) /* 0.452889071 */, 17 },
+  /* 3804 */  { MAD_F(0x073faf1d) /* 0.453047861 */, 17 },
+  /* 3805 */  { MAD_F(0x074055a2) /* 0.453206665 */, 17 },
+  /* 3806 */  { MAD_F(0x0740fc2a) /* 0.453365483 */, 17 },
+  /* 3807 */  { MAD_F(0x0741a2b6) /* 0.453524315 */, 17 },
+
+  /* 3808 */  { MAD_F(0x07424946) /* 0.453683161 */, 17 },
+  /* 3809 */  { MAD_F(0x0742efd9) /* 0.453842020 */, 17 },
+  /* 3810 */  { MAD_F(0x07439671) /* 0.454000894 */, 17 },
+  /* 3811 */  { MAD_F(0x07443d0c) /* 0.454159781 */, 17 },
+  /* 3812 */  { MAD_F(0x0744e3aa) /* 0.454318683 */, 17 },
+  /* 3813 */  { MAD_F(0x07458a4d) /* 0.454477598 */, 17 },
+  /* 3814 */  { MAD_F(0x074630f3) /* 0.454636527 */, 17 },
+  /* 3815 */  { MAD_F(0x0746d79d) /* 0.454795470 */, 17 },
+  /* 3816 */  { MAD_F(0x07477e4b) /* 0.454954427 */, 17 },
+  /* 3817 */  { MAD_F(0x074824fc) /* 0.455113397 */, 17 },
+  /* 3818 */  { MAD_F(0x0748cbb1) /* 0.455272382 */, 17 },
+  /* 3819 */  { MAD_F(0x0749726a) /* 0.455431381 */, 17 },
+  /* 3820 */  { MAD_F(0x074a1927) /* 0.455590393 */, 17 },
+  /* 3821 */  { MAD_F(0x074abfe7) /* 0.455749419 */, 17 },
+  /* 3822 */  { MAD_F(0x074b66ab) /* 0.455908459 */, 17 },
+  /* 3823 */  { MAD_F(0x074c0d73) /* 0.456067513 */, 17 },
+
+  /* 3824 */  { MAD_F(0x074cb43e) /* 0.456226581 */, 17 },
+  /* 3825 */  { MAD_F(0x074d5b0d) /* 0.456385663 */, 17 },
+  /* 3826 */  { MAD_F(0x074e01e0) /* 0.456544759 */, 17 },
+  /* 3827 */  { MAD_F(0x074ea8b7) /* 0.456703868 */, 17 },
+  /* 3828 */  { MAD_F(0x074f4f91) /* 0.456862992 */, 17 },
+  /* 3829 */  { MAD_F(0x074ff66f) /* 0.457022129 */, 17 },
+  /* 3830 */  { MAD_F(0x07509d51) /* 0.457181280 */, 17 },
+  /* 3831 */  { MAD_F(0x07514437) /* 0.457340445 */, 17 },
+  /* 3832 */  { MAD_F(0x0751eb20) /* 0.457499623 */, 17 },
+  /* 3833 */  { MAD_F(0x0752920d) /* 0.457658816 */, 17 },
+  /* 3834 */  { MAD_F(0x075338fd) /* 0.457818022 */, 17 },
+  /* 3835 */  { MAD_F(0x0753dff2) /* 0.457977243 */, 17 },
+  /* 3836 */  { MAD_F(0x075486ea) /* 0.458136477 */, 17 },
+  /* 3837 */  { MAD_F(0x07552de6) /* 0.458295725 */, 17 },
+  /* 3838 */  { MAD_F(0x0755d4e5) /* 0.458454987 */, 17 },
+  /* 3839 */  { MAD_F(0x07567be8) /* 0.458614262 */, 17 },
+
+  /* 3840 */  { MAD_F(0x075722ef) /* 0.458773552 */, 17 },
+  /* 3841 */  { MAD_F(0x0757c9fa) /* 0.458932855 */, 17 },
+  /* 3842 */  { MAD_F(0x07587108) /* 0.459092172 */, 17 },
+  /* 3843 */  { MAD_F(0x0759181a) /* 0.459251503 */, 17 },
+  /* 3844 */  { MAD_F(0x0759bf30) /* 0.459410848 */, 17 },
+  /* 3845 */  { MAD_F(0x075a664a) /* 0.459570206 */, 17 },
+  /* 3846 */  { MAD_F(0x075b0d67) /* 0.459729579 */, 17 },
+  /* 3847 */  { MAD_F(0x075bb488) /* 0.459888965 */, 17 },
+  /* 3848 */  { MAD_F(0x075c5bac) /* 0.460048365 */, 17 },
+  /* 3849 */  { MAD_F(0x075d02d5) /* 0.460207779 */, 17 },
+  /* 3850 */  { MAD_F(0x075daa01) /* 0.460367206 */, 17 },
+  /* 3851 */  { MAD_F(0x075e5130) /* 0.460526648 */, 17 },
+  /* 3852 */  { MAD_F(0x075ef864) /* 0.460686103 */, 17 },
+  /* 3853 */  { MAD_F(0x075f9f9b) /* 0.460845572 */, 17 },
+  /* 3854 */  { MAD_F(0x076046d6) /* 0.461005055 */, 17 },
+  /* 3855 */  { MAD_F(0x0760ee14) /* 0.461164552 */, 17 },
+
+  /* 3856 */  { MAD_F(0x07619557) /* 0.461324062 */, 17 },
+  /* 3857 */  { MAD_F(0x07623c9d) /* 0.461483586 */, 17 },
+  /* 3858 */  { MAD_F(0x0762e3e6) /* 0.461643124 */, 17 },
+  /* 3859 */  { MAD_F(0x07638b34) /* 0.461802676 */, 17 },
+  /* 3860 */  { MAD_F(0x07643285) /* 0.461962242 */, 17 },
+  /* 3861 */  { MAD_F(0x0764d9d9) /* 0.462121821 */, 17 },
+  /* 3862 */  { MAD_F(0x07658132) /* 0.462281414 */, 17 },
+  /* 3863 */  { MAD_F(0x0766288e) /* 0.462441021 */, 17 },
+  /* 3864 */  { MAD_F(0x0766cfee) /* 0.462600642 */, 17 },
+  /* 3865 */  { MAD_F(0x07677751) /* 0.462760276 */, 17 },
+  /* 3866 */  { MAD_F(0x07681eb9) /* 0.462919924 */, 17 },
+  /* 3867 */  { MAD_F(0x0768c624) /* 0.463079586 */, 17 },
+  /* 3868 */  { MAD_F(0x07696d92) /* 0.463239262 */, 17 },
+  /* 3869 */  { MAD_F(0x076a1505) /* 0.463398951 */, 17 },
+  /* 3870 */  { MAD_F(0x076abc7b) /* 0.463558655 */, 17 },
+  /* 3871 */  { MAD_F(0x076b63f4) /* 0.463718372 */, 17 },
+
+  /* 3872 */  { MAD_F(0x076c0b72) /* 0.463878102 */, 17 },
+  /* 3873 */  { MAD_F(0x076cb2f3) /* 0.464037847 */, 17 },
+  /* 3874 */  { MAD_F(0x076d5a78) /* 0.464197605 */, 17 },
+  /* 3875 */  { MAD_F(0x076e0200) /* 0.464357377 */, 17 },
+  /* 3876 */  { MAD_F(0x076ea98c) /* 0.464517163 */, 17 },
+  /* 3877 */  { MAD_F(0x076f511c) /* 0.464676962 */, 17 },
+  /* 3878 */  { MAD_F(0x076ff8b0) /* 0.464836776 */, 17 },
+  /* 3879 */  { MAD_F(0x0770a047) /* 0.464996603 */, 17 },
+  /* 3880 */  { MAD_F(0x077147e2) /* 0.465156443 */, 17 },
+  /* 3881 */  { MAD_F(0x0771ef80) /* 0.465316298 */, 17 },
+  /* 3882 */  { MAD_F(0x07729723) /* 0.465476166 */, 17 },
+  /* 3883 */  { MAD_F(0x07733ec9) /* 0.465636048 */, 17 },
+  /* 3884 */  { MAD_F(0x0773e672) /* 0.465795943 */, 17 },
+  /* 3885 */  { MAD_F(0x07748e20) /* 0.465955853 */, 17 },
+  /* 3886 */  { MAD_F(0x077535d1) /* 0.466115776 */, 17 },
+  /* 3887 */  { MAD_F(0x0775dd85) /* 0.466275713 */, 17 },
+
+  /* 3888 */  { MAD_F(0x0776853e) /* 0.466435663 */, 17 },
+  /* 3889 */  { MAD_F(0x07772cfa) /* 0.466595627 */, 17 },
+  /* 3890 */  { MAD_F(0x0777d4ba) /* 0.466755605 */, 17 },
+  /* 3891 */  { MAD_F(0x07787c7d) /* 0.466915597 */, 17 },
+  /* 3892 */  { MAD_F(0x07792444) /* 0.467075602 */, 17 },
+  /* 3893 */  { MAD_F(0x0779cc0f) /* 0.467235621 */, 17 },
+  /* 3894 */  { MAD_F(0x077a73dd) /* 0.467395654 */, 17 },
+  /* 3895 */  { MAD_F(0x077b1baf) /* 0.467555701 */, 17 },
+  /* 3896 */  { MAD_F(0x077bc385) /* 0.467715761 */, 17 },
+  /* 3897 */  { MAD_F(0x077c6b5f) /* 0.467875835 */, 17 },
+  /* 3898 */  { MAD_F(0x077d133c) /* 0.468035922 */, 17 },
+  /* 3899 */  { MAD_F(0x077dbb1d) /* 0.468196023 */, 17 },
+  /* 3900 */  { MAD_F(0x077e6301) /* 0.468356138 */, 17 },
+  /* 3901 */  { MAD_F(0x077f0ae9) /* 0.468516267 */, 17 },
+  /* 3902 */  { MAD_F(0x077fb2d5) /* 0.468676409 */, 17 },
+  /* 3903 */  { MAD_F(0x07805ac5) /* 0.468836565 */, 17 },
+
+  /* 3904 */  { MAD_F(0x078102b8) /* 0.468996735 */, 17 },
+  /* 3905 */  { MAD_F(0x0781aaaf) /* 0.469156918 */, 17 },
+  /* 3906 */  { MAD_F(0x078252aa) /* 0.469317115 */, 17 },
+  /* 3907 */  { MAD_F(0x0782faa8) /* 0.469477326 */, 17 },
+  /* 3908 */  { MAD_F(0x0783a2aa) /* 0.469637550 */, 17 },
+  /* 3909 */  { MAD_F(0x07844aaf) /* 0.469797788 */, 17 },
+  /* 3910 */  { MAD_F(0x0784f2b8) /* 0.469958040 */, 17 },
+  /* 3911 */  { MAD_F(0x07859ac5) /* 0.470118305 */, 17 },
+  /* 3912 */  { MAD_F(0x078642d6) /* 0.470278584 */, 17 },
+  /* 3913 */  { MAD_F(0x0786eaea) /* 0.470438877 */, 17 },
+  /* 3914 */  { MAD_F(0x07879302) /* 0.470599183 */, 17 },
+  /* 3915 */  { MAD_F(0x07883b1e) /* 0.470759503 */, 17 },
+  /* 3916 */  { MAD_F(0x0788e33d) /* 0.470919836 */, 17 },
+  /* 3917 */  { MAD_F(0x07898b60) /* 0.471080184 */, 17 },
+  /* 3918 */  { MAD_F(0x078a3386) /* 0.471240545 */, 17 },
+  /* 3919 */  { MAD_F(0x078adbb0) /* 0.471400919 */, 17 },
+
+  /* 3920 */  { MAD_F(0x078b83de) /* 0.471561307 */, 17 },
+  /* 3921 */  { MAD_F(0x078c2c10) /* 0.471721709 */, 17 },
+  /* 3922 */  { MAD_F(0x078cd445) /* 0.471882125 */, 17 },
+  /* 3923 */  { MAD_F(0x078d7c7e) /* 0.472042554 */, 17 },
+  /* 3924 */  { MAD_F(0x078e24ba) /* 0.472202996 */, 17 },
+  /* 3925 */  { MAD_F(0x078eccfb) /* 0.472363453 */, 17 },
+  /* 3926 */  { MAD_F(0x078f753e) /* 0.472523923 */, 17 },
+  /* 3927 */  { MAD_F(0x07901d86) /* 0.472684406 */, 17 },
+  /* 3928 */  { MAD_F(0x0790c5d1) /* 0.472844904 */, 17 },
+  /* 3929 */  { MAD_F(0x07916e20) /* 0.473005414 */, 17 },
+  /* 3930 */  { MAD_F(0x07921672) /* 0.473165939 */, 17 },
+  /* 3931 */  { MAD_F(0x0792bec8) /* 0.473326477 */, 17 },
+  /* 3932 */  { MAD_F(0x07936722) /* 0.473487029 */, 17 },
+  /* 3933 */  { MAD_F(0x07940f80) /* 0.473647594 */, 17 },
+  /* 3934 */  { MAD_F(0x0794b7e1) /* 0.473808173 */, 17 },
+  /* 3935 */  { MAD_F(0x07956045) /* 0.473968765 */, 17 },
+
+  /* 3936 */  { MAD_F(0x079608ae) /* 0.474129372 */, 17 },
+  /* 3937 */  { MAD_F(0x0796b11a) /* 0.474289991 */, 17 },
+  /* 3938 */  { MAD_F(0x0797598a) /* 0.474450625 */, 17 },
+  /* 3939 */  { MAD_F(0x079801fd) /* 0.474611272 */, 17 },
+  /* 3940 */  { MAD_F(0x0798aa74) /* 0.474771932 */, 17 },
+  /* 3941 */  { MAD_F(0x079952ee) /* 0.474932606 */, 17 },
+  /* 3942 */  { MAD_F(0x0799fb6d) /* 0.475093294 */, 17 },
+  /* 3943 */  { MAD_F(0x079aa3ef) /* 0.475253995 */, 17 },
+  /* 3944 */  { MAD_F(0x079b4c74) /* 0.475414710 */, 17 },
+  /* 3945 */  { MAD_F(0x079bf4fd) /* 0.475575439 */, 17 },
+  /* 3946 */  { MAD_F(0x079c9d8a) /* 0.475736181 */, 17 },
+  /* 3947 */  { MAD_F(0x079d461b) /* 0.475896936 */, 17 },
+  /* 3948 */  { MAD_F(0x079deeaf) /* 0.476057705 */, 17 },
+  /* 3949 */  { MAD_F(0x079e9747) /* 0.476218488 */, 17 },
+  /* 3950 */  { MAD_F(0x079f3fe2) /* 0.476379285 */, 17 },
+  /* 3951 */  { MAD_F(0x079fe881) /* 0.476540095 */, 17 },
+
+  /* 3952 */  { MAD_F(0x07a09124) /* 0.476700918 */, 17 },
+  /* 3953 */  { MAD_F(0x07a139ca) /* 0.476861755 */, 17 },
+  /* 3954 */  { MAD_F(0x07a1e274) /* 0.477022606 */, 17 },
+  /* 3955 */  { MAD_F(0x07a28b22) /* 0.477183470 */, 17 },
+  /* 3956 */  { MAD_F(0x07a333d3) /* 0.477344348 */, 17 },
+  /* 3957 */  { MAD_F(0x07a3dc88) /* 0.477505239 */, 17 },
+  /* 3958 */  { MAD_F(0x07a48541) /* 0.477666144 */, 17 },
+  /* 3959 */  { MAD_F(0x07a52dfd) /* 0.477827062 */, 17 },
+  /* 3960 */  { MAD_F(0x07a5d6bd) /* 0.477987994 */, 17 },
+  /* 3961 */  { MAD_F(0x07a67f80) /* 0.478148940 */, 17 },
+  /* 3962 */  { MAD_F(0x07a72847) /* 0.478309899 */, 17 },
+  /* 3963 */  { MAD_F(0x07a7d112) /* 0.478470871 */, 17 },
+  /* 3964 */  { MAD_F(0x07a879e1) /* 0.478631857 */, 17 },
+  /* 3965 */  { MAD_F(0x07a922b3) /* 0.478792857 */, 17 },
+  /* 3966 */  { MAD_F(0x07a9cb88) /* 0.478953870 */, 17 },
+  /* 3967 */  { MAD_F(0x07aa7462) /* 0.479114897 */, 17 },
+
+  /* 3968 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */, 17 },
+  /* 3969 */  { MAD_F(0x07abc61f) /* 0.479436991 */, 17 },
+  /* 3970 */  { MAD_F(0x07ac6f03) /* 0.479598058 */, 17 },
+  /* 3971 */  { MAD_F(0x07ad17eb) /* 0.479759139 */, 17 },
+  /* 3972 */  { MAD_F(0x07adc0d6) /* 0.479920233 */, 17 },
+  /* 3973 */  { MAD_F(0x07ae69c6) /* 0.480081341 */, 17 },
+  /* 3974 */  { MAD_F(0x07af12b8) /* 0.480242463 */, 17 },
+  /* 3975 */  { MAD_F(0x07afbbaf) /* 0.480403598 */, 17 },
+  /* 3976 */  { MAD_F(0x07b064a8) /* 0.480564746 */, 17 },
+  /* 3977 */  { MAD_F(0x07b10da6) /* 0.480725908 */, 17 },
+  /* 3978 */  { MAD_F(0x07b1b6a7) /* 0.480887083 */, 17 },
+  /* 3979 */  { MAD_F(0x07b25fac) /* 0.481048272 */, 17 },
+  /* 3980 */  { MAD_F(0x07b308b5) /* 0.481209475 */, 17 },
+  /* 3981 */  { MAD_F(0x07b3b1c1) /* 0.481370691 */, 17 },
+  /* 3982 */  { MAD_F(0x07b45ad0) /* 0.481531920 */, 17 },
+  /* 3983 */  { MAD_F(0x07b503e4) /* 0.481693163 */, 17 },
+
+  /* 3984 */  { MAD_F(0x07b5acfb) /* 0.481854420 */, 17 },
+  /* 3985 */  { MAD_F(0x07b65615) /* 0.482015690 */, 17 },
+  /* 3986 */  { MAD_F(0x07b6ff33) /* 0.482176973 */, 17 },
+  /* 3987 */  { MAD_F(0x07b7a855) /* 0.482338270 */, 17 },
+  /* 3988 */  { MAD_F(0x07b8517b) /* 0.482499580 */, 17 },
+  /* 3989 */  { MAD_F(0x07b8faa4) /* 0.482660904 */, 17 },
+  /* 3990 */  { MAD_F(0x07b9a3d0) /* 0.482822242 */, 17 },
+  /* 3991 */  { MAD_F(0x07ba4d01) /* 0.482983592 */, 17 },
+  /* 3992 */  { MAD_F(0x07baf635) /* 0.483144957 */, 17 },
+  /* 3993 */  { MAD_F(0x07bb9f6c) /* 0.483306335 */, 17 },
+  /* 3994 */  { MAD_F(0x07bc48a7) /* 0.483467726 */, 17 },
+  /* 3995 */  { MAD_F(0x07bcf1e6) /* 0.483629131 */, 17 },
+  /* 3996 */  { MAD_F(0x07bd9b28) /* 0.483790549 */, 17 },
+  /* 3997 */  { MAD_F(0x07be446e) /* 0.483951980 */, 17 },
+  /* 3998 */  { MAD_F(0x07beedb8) /* 0.484113426 */, 17 },
+  /* 3999 */  { MAD_F(0x07bf9705) /* 0.484274884 */, 17 },
+
+  /* 4000 */  { MAD_F(0x07c04056) /* 0.484436356 */, 17 },
+  /* 4001 */  { MAD_F(0x07c0e9aa) /* 0.484597842 */, 17 },
+  /* 4002 */  { MAD_F(0x07c19302) /* 0.484759341 */, 17 },
+  /* 4003 */  { MAD_F(0x07c23c5e) /* 0.484920853 */, 17 },
+  /* 4004 */  { MAD_F(0x07c2e5bd) /* 0.485082379 */, 17 },
+  /* 4005 */  { MAD_F(0x07c38f20) /* 0.485243918 */, 17 },
+  /* 4006 */  { MAD_F(0x07c43887) /* 0.485405471 */, 17 },
+  /* 4007 */  { MAD_F(0x07c4e1f1) /* 0.485567037 */, 17 },
+  /* 4008 */  { MAD_F(0x07c58b5f) /* 0.485728617 */, 17 },
+  /* 4009 */  { MAD_F(0x07c634d0) /* 0.485890210 */, 17 },
+  /* 4010 */  { MAD_F(0x07c6de45) /* 0.486051817 */, 17 },
+  /* 4011 */  { MAD_F(0x07c787bd) /* 0.486213436 */, 17 },
+  /* 4012 */  { MAD_F(0x07c83139) /* 0.486375070 */, 17 },
+  /* 4013 */  { MAD_F(0x07c8dab9) /* 0.486536717 */, 17 },
+  /* 4014 */  { MAD_F(0x07c9843c) /* 0.486698377 */, 17 },
+  /* 4015 */  { MAD_F(0x07ca2dc3) /* 0.486860051 */, 17 },
+
+  /* 4016 */  { MAD_F(0x07cad74e) /* 0.487021738 */, 17 },
+  /* 4017 */  { MAD_F(0x07cb80dc) /* 0.487183438 */, 17 },
+  /* 4018 */  { MAD_F(0x07cc2a6e) /* 0.487345152 */, 17 },
+  /* 4019 */  { MAD_F(0x07ccd403) /* 0.487506879 */, 17 },
+  /* 4020 */  { MAD_F(0x07cd7d9c) /* 0.487668620 */, 17 },
+  /* 4021 */  { MAD_F(0x07ce2739) /* 0.487830374 */, 17 },
+  /* 4022 */  { MAD_F(0x07ced0d9) /* 0.487992142 */, 17 },
+  /* 4023 */  { MAD_F(0x07cf7a7d) /* 0.488153923 */, 17 },
+  /* 4024 */  { MAD_F(0x07d02424) /* 0.488315717 */, 17 },
+  /* 4025 */  { MAD_F(0x07d0cdcf) /* 0.488477525 */, 17 },
+  /* 4026 */  { MAD_F(0x07d1777e) /* 0.488639346 */, 17 },
+  /* 4027 */  { MAD_F(0x07d22130) /* 0.488801181 */, 17 },
+  /* 4028 */  { MAD_F(0x07d2cae5) /* 0.488963029 */, 17 },
+  /* 4029 */  { MAD_F(0x07d3749f) /* 0.489124890 */, 17 },
+  /* 4030 */  { MAD_F(0x07d41e5c) /* 0.489286765 */, 17 },
+  /* 4031 */  { MAD_F(0x07d4c81c) /* 0.489448653 */, 17 },
+
+  /* 4032 */  { MAD_F(0x07d571e0) /* 0.489610555 */, 17 },
+  /* 4033 */  { MAD_F(0x07d61ba8) /* 0.489772470 */, 17 },
+  /* 4034 */  { MAD_F(0x07d6c573) /* 0.489934398 */, 17 },
+  /* 4035 */  { MAD_F(0x07d76f42) /* 0.490096340 */, 17 },
+  /* 4036 */  { MAD_F(0x07d81915) /* 0.490258295 */, 17 },
+  /* 4037 */  { MAD_F(0x07d8c2eb) /* 0.490420263 */, 17 },
+  /* 4038 */  { MAD_F(0x07d96cc4) /* 0.490582245 */, 17 },
+  /* 4039 */  { MAD_F(0x07da16a2) /* 0.490744240 */, 17 },
+  /* 4040 */  { MAD_F(0x07dac083) /* 0.490906249 */, 17 },
+  /* 4041 */  { MAD_F(0x07db6a67) /* 0.491068271 */, 17 },
+  /* 4042 */  { MAD_F(0x07dc144f) /* 0.491230306 */, 17 },
+  /* 4043 */  { MAD_F(0x07dcbe3b) /* 0.491392355 */, 17 },
+  /* 4044 */  { MAD_F(0x07dd682a) /* 0.491554417 */, 17 },
+  /* 4045 */  { MAD_F(0x07de121d) /* 0.491716492 */, 17 },
+  /* 4046 */  { MAD_F(0x07debc13) /* 0.491878581 */, 17 },
+  /* 4047 */  { MAD_F(0x07df660d) /* 0.492040683 */, 17 },
+
+  /* 4048 */  { MAD_F(0x07e0100a) /* 0.492202799 */, 17 },
+  /* 4049 */  { MAD_F(0x07e0ba0c) /* 0.492364928 */, 17 },
+  /* 4050 */  { MAD_F(0x07e16410) /* 0.492527070 */, 17 },
+  /* 4051 */  { MAD_F(0x07e20e19) /* 0.492689225 */, 17 },
+  /* 4052 */  { MAD_F(0x07e2b824) /* 0.492851394 */, 17 },
+  /* 4053 */  { MAD_F(0x07e36234) /* 0.493013576 */, 17 },
+  /* 4054 */  { MAD_F(0x07e40c47) /* 0.493175772 */, 17 },
+  /* 4055 */  { MAD_F(0x07e4b65e) /* 0.493337981 */, 17 },
+  /* 4056 */  { MAD_F(0x07e56078) /* 0.493500203 */, 17 },
+  /* 4057 */  { MAD_F(0x07e60a95) /* 0.493662438 */, 17 },
+  /* 4058 */  { MAD_F(0x07e6b4b7) /* 0.493824687 */, 17 },
+  /* 4059 */  { MAD_F(0x07e75edc) /* 0.493986949 */, 17 },
+  /* 4060 */  { MAD_F(0x07e80904) /* 0.494149225 */, 17 },
+  /* 4061 */  { MAD_F(0x07e8b330) /* 0.494311514 */, 17 },
+  /* 4062 */  { MAD_F(0x07e95d60) /* 0.494473816 */, 17 },
+  /* 4063 */  { MAD_F(0x07ea0793) /* 0.494636131 */, 17 },
+
+  /* 4064 */  { MAD_F(0x07eab1ca) /* 0.494798460 */, 17 },
+  /* 4065 */  { MAD_F(0x07eb5c04) /* 0.494960802 */, 17 },
+  /* 4066 */  { MAD_F(0x07ec0642) /* 0.495123158 */, 17 },
+  /* 4067 */  { MAD_F(0x07ecb084) /* 0.495285526 */, 17 },
+  /* 4068 */  { MAD_F(0x07ed5ac9) /* 0.495447908 */, 17 },
+  /* 4069 */  { MAD_F(0x07ee0512) /* 0.495610304 */, 17 },
+  /* 4070 */  { MAD_F(0x07eeaf5e) /* 0.495772712 */, 17 },
+  /* 4071 */  { MAD_F(0x07ef59ae) /* 0.495935134 */, 17 },
+  /* 4072 */  { MAD_F(0x07f00401) /* 0.496097570 */, 17 },
+  /* 4073 */  { MAD_F(0x07f0ae58) /* 0.496260018 */, 17 },
+  /* 4074 */  { MAD_F(0x07f158b3) /* 0.496422480 */, 17 },
+  /* 4075 */  { MAD_F(0x07f20311) /* 0.496584955 */, 17 },
+  /* 4076 */  { MAD_F(0x07f2ad72) /* 0.496747444 */, 17 },
+  /* 4077 */  { MAD_F(0x07f357d8) /* 0.496909945 */, 17 },
+  /* 4078 */  { MAD_F(0x07f40240) /* 0.497072460 */, 17 },
+  /* 4079 */  { MAD_F(0x07f4acad) /* 0.497234989 */, 17 },
+
+  /* 4080 */  { MAD_F(0x07f5571d) /* 0.497397530 */, 17 },
+  /* 4081 */  { MAD_F(0x07f60190) /* 0.497560085 */, 17 },
+  /* 4082 */  { MAD_F(0x07f6ac07) /* 0.497722653 */, 17 },
+  /* 4083 */  { MAD_F(0x07f75682) /* 0.497885235 */, 17 },
+  /* 4084 */  { MAD_F(0x07f80100) /* 0.498047829 */, 17 },
+  /* 4085 */  { MAD_F(0x07f8ab82) /* 0.498210437 */, 17 },
+  /* 4086 */  { MAD_F(0x07f95607) /* 0.498373058 */, 17 },
+  /* 4087 */  { MAD_F(0x07fa0090) /* 0.498535693 */, 17 },
+  /* 4088 */  { MAD_F(0x07faab1c) /* 0.498698341 */, 17 },
+  /* 4089 */  { MAD_F(0x07fb55ac) /* 0.498861002 */, 17 },
+  /* 4090 */  { MAD_F(0x07fc0040) /* 0.499023676 */, 17 },
+  /* 4091 */  { MAD_F(0x07fcaad7) /* 0.499186364 */, 17 },
+  /* 4092 */  { MAD_F(0x07fd5572) /* 0.499349064 */, 17 },
+  /* 4093 */  { MAD_F(0x07fe0010) /* 0.499511778 */, 17 },
+  /* 4094 */  { MAD_F(0x07feaab2) /* 0.499674506 */, 17 },
+  /* 4095 */  { MAD_F(0x07ff5557) /* 0.499837246 */, 17 },
+
+  /* 4096 */  { MAD_F(0x04000000) /* 0.250000000 */, 18 },
+  /* 4097 */  { MAD_F(0x04005556) /* 0.250081384 */, 18 },
+  /* 4098 */  { MAD_F(0x0400aaae) /* 0.250162774 */, 18 },
+  /* 4099 */  { MAD_F(0x04010008) /* 0.250244170 */, 18 },
+  /* 4100 */  { MAD_F(0x04015563) /* 0.250325574 */, 18 },
+  /* 4101 */  { MAD_F(0x0401aac1) /* 0.250406984 */, 18 },
+  /* 4102 */  { MAD_F(0x04020020) /* 0.250488400 */, 18 },
+  /* 4103 */  { MAD_F(0x04025581) /* 0.250569824 */, 18 },
+  /* 4104 */  { MAD_F(0x0402aae3) /* 0.250651254 */, 18 },
+  /* 4105 */  { MAD_F(0x04030048) /* 0.250732690 */, 18 },
+  /* 4106 */  { MAD_F(0x040355ae) /* 0.250814133 */, 18 },
+  /* 4107 */  { MAD_F(0x0403ab16) /* 0.250895583 */, 18 },
+  /* 4108 */  { MAD_F(0x04040080) /* 0.250977039 */, 18 },
+  /* 4109 */  { MAD_F(0x040455eb) /* 0.251058502 */, 18 },
+  /* 4110 */  { MAD_F(0x0404ab59) /* 0.251139971 */, 18 },
+  /* 4111 */  { MAD_F(0x040500c8) /* 0.251221448 */, 18 },
+
+  /* 4112 */  { MAD_F(0x04055638) /* 0.251302930 */, 18 },
+  /* 4113 */  { MAD_F(0x0405abab) /* 0.251384420 */, 18 },
+  /* 4114 */  { MAD_F(0x0406011f) /* 0.251465916 */, 18 },
+  /* 4115 */  { MAD_F(0x04065696) /* 0.251547418 */, 18 },
+  /* 4116 */  { MAD_F(0x0406ac0e) /* 0.251628927 */, 18 },
+  /* 4117 */  { MAD_F(0x04070187) /* 0.251710443 */, 18 },
+  /* 4118 */  { MAD_F(0x04075703) /* 0.251791965 */, 18 },
+  /* 4119 */  { MAD_F(0x0407ac80) /* 0.251873494 */, 18 },
+  /* 4120 */  { MAD_F(0x040801ff) /* 0.251955030 */, 18 },
+  /* 4121 */  { MAD_F(0x04085780) /* 0.252036572 */, 18 },
+  /* 4122 */  { MAD_F(0x0408ad02) /* 0.252118121 */, 18 },
+  /* 4123 */  { MAD_F(0x04090287) /* 0.252199676 */, 18 },
+  /* 4124 */  { MAD_F(0x0409580d) /* 0.252281238 */, 18 },
+  /* 4125 */  { MAD_F(0x0409ad95) /* 0.252362807 */, 18 },
+  /* 4126 */  { MAD_F(0x040a031e) /* 0.252444382 */, 18 },
+  /* 4127 */  { MAD_F(0x040a58aa) /* 0.252525963 */, 18 },
+
+  /* 4128 */  { MAD_F(0x040aae37) /* 0.252607552 */, 18 },
+  /* 4129 */  { MAD_F(0x040b03c6) /* 0.252689147 */, 18 },
+  /* 4130 */  { MAD_F(0x040b5957) /* 0.252770748 */, 18 },
+  /* 4131 */  { MAD_F(0x040baee9) /* 0.252852356 */, 18 },
+  /* 4132 */  { MAD_F(0x040c047e) /* 0.252933971 */, 18 },
+  /* 4133 */  { MAD_F(0x040c5a14) /* 0.253015592 */, 18 },
+  /* 4134 */  { MAD_F(0x040cafab) /* 0.253097220 */, 18 },
+  /* 4135 */  { MAD_F(0x040d0545) /* 0.253178854 */, 18 },
+  /* 4136 */  { MAD_F(0x040d5ae0) /* 0.253260495 */, 18 },
+  /* 4137 */  { MAD_F(0x040db07d) /* 0.253342143 */, 18 },
+  /* 4138 */  { MAD_F(0x040e061c) /* 0.253423797 */, 18 },
+  /* 4139 */  { MAD_F(0x040e5bbd) /* 0.253505457 */, 18 },
+  /* 4140 */  { MAD_F(0x040eb15f) /* 0.253587125 */, 18 },
+  /* 4141 */  { MAD_F(0x040f0703) /* 0.253668799 */, 18 },
+  /* 4142 */  { MAD_F(0x040f5ca9) /* 0.253750479 */, 18 },
+  /* 4143 */  { MAD_F(0x040fb251) /* 0.253832166 */, 18 },
+
+  /* 4144 */  { MAD_F(0x041007fa) /* 0.253913860 */, 18 },
+  /* 4145 */  { MAD_F(0x04105da6) /* 0.253995560 */, 18 },
+  /* 4146 */  { MAD_F(0x0410b353) /* 0.254077266 */, 18 },
+  /* 4147 */  { MAD_F(0x04110901) /* 0.254158980 */, 18 },
+  /* 4148 */  { MAD_F(0x04115eb2) /* 0.254240700 */, 18 },
+  /* 4149 */  { MAD_F(0x0411b464) /* 0.254322426 */, 18 },
+  /* 4150 */  { MAD_F(0x04120a18) /* 0.254404159 */, 18 },
+  /* 4151 */  { MAD_F(0x04125fce) /* 0.254485899 */, 18 },
+  /* 4152 */  { MAD_F(0x0412b586) /* 0.254567645 */, 18 },
+  /* 4153 */  { MAD_F(0x04130b3f) /* 0.254649397 */, 18 },
+  /* 4154 */  { MAD_F(0x041360fa) /* 0.254731157 */, 18 },
+  /* 4155 */  { MAD_F(0x0413b6b7) /* 0.254812922 */, 18 },
+  /* 4156 */  { MAD_F(0x04140c75) /* 0.254894695 */, 18 },
+  /* 4157 */  { MAD_F(0x04146236) /* 0.254976474 */, 18 },
+  /* 4158 */  { MAD_F(0x0414b7f8) /* 0.255058259 */, 18 },
+  /* 4159 */  { MAD_F(0x04150dbc) /* 0.255140051 */, 18 },
+
+  /* 4160 */  { MAD_F(0x04156381) /* 0.255221850 */, 18 },
+  /* 4161 */  { MAD_F(0x0415b949) /* 0.255303655 */, 18 },
+  /* 4162 */  { MAD_F(0x04160f12) /* 0.255385467 */, 18 },
+  /* 4163 */  { MAD_F(0x041664dd) /* 0.255467285 */, 18 },
+  /* 4164 */  { MAD_F(0x0416baaa) /* 0.255549110 */, 18 },
+  /* 4165 */  { MAD_F(0x04171078) /* 0.255630941 */, 18 },
+  /* 4166 */  { MAD_F(0x04176648) /* 0.255712779 */, 18 },
+  /* 4167 */  { MAD_F(0x0417bc1a) /* 0.255794624 */, 18 },
+  /* 4168 */  { MAD_F(0x041811ee) /* 0.255876475 */, 18 },
+  /* 4169 */  { MAD_F(0x041867c3) /* 0.255958332 */, 18 },
+  /* 4170 */  { MAD_F(0x0418bd9b) /* 0.256040196 */, 18 },
+  /* 4171 */  { MAD_F(0x04191374) /* 0.256122067 */, 18 },
+  /* 4172 */  { MAD_F(0x0419694e) /* 0.256203944 */, 18 },
+  /* 4173 */  { MAD_F(0x0419bf2b) /* 0.256285828 */, 18 },
+  /* 4174 */  { MAD_F(0x041a1509) /* 0.256367718 */, 18 },
+  /* 4175 */  { MAD_F(0x041a6ae9) /* 0.256449615 */, 18 },
+
+  /* 4176 */  { MAD_F(0x041ac0cb) /* 0.256531518 */, 18 },
+  /* 4177 */  { MAD_F(0x041b16ae) /* 0.256613428 */, 18 },
+  /* 4178 */  { MAD_F(0x041b6c94) /* 0.256695344 */, 18 },
+  /* 4179 */  { MAD_F(0x041bc27b) /* 0.256777267 */, 18 },
+  /* 4180 */  { MAD_F(0x041c1863) /* 0.256859197 */, 18 },
+  /* 4181 */  { MAD_F(0x041c6e4e) /* 0.256941133 */, 18 },
+  /* 4182 */  { MAD_F(0x041cc43a) /* 0.257023076 */, 18 },
+  /* 4183 */  { MAD_F(0x041d1a28) /* 0.257105025 */, 18 },
+  /* 4184 */  { MAD_F(0x041d7018) /* 0.257186980 */, 18 },
+  /* 4185 */  { MAD_F(0x041dc60a) /* 0.257268942 */, 18 },
+  /* 4186 */  { MAD_F(0x041e1bfd) /* 0.257350911 */, 18 },
+  /* 4187 */  { MAD_F(0x041e71f2) /* 0.257432886 */, 18 },
+  /* 4188 */  { MAD_F(0x041ec7e9) /* 0.257514868 */, 18 },
+  /* 4189 */  { MAD_F(0x041f1de1) /* 0.257596856 */, 18 },
+  /* 4190 */  { MAD_F(0x041f73dc) /* 0.257678851 */, 18 },
+  /* 4191 */  { MAD_F(0x041fc9d8) /* 0.257760852 */, 18 },
+
+  /* 4192 */  { MAD_F(0x04201fd5) /* 0.257842860 */, 18 },
+  /* 4193 */  { MAD_F(0x042075d5) /* 0.257924875 */, 18 },
+  /* 4194 */  { MAD_F(0x0420cbd6) /* 0.258006895 */, 18 },
+  /* 4195 */  { MAD_F(0x042121d9) /* 0.258088923 */, 18 },
+  /* 4196 */  { MAD_F(0x042177de) /* 0.258170957 */, 18 },
+  /* 4197 */  { MAD_F(0x0421cde5) /* 0.258252997 */, 18 },
+  /* 4198 */  { MAD_F(0x042223ed) /* 0.258335044 */, 18 },
+  /* 4199 */  { MAD_F(0x042279f7) /* 0.258417097 */, 18 },
+  /* 4200 */  { MAD_F(0x0422d003) /* 0.258499157 */, 18 },
+  /* 4201 */  { MAD_F(0x04232611) /* 0.258581224 */, 18 },
+  /* 4202 */  { MAD_F(0x04237c20) /* 0.258663297 */, 18 },
+  /* 4203 */  { MAD_F(0x0423d231) /* 0.258745376 */, 18 },
+  /* 4204 */  { MAD_F(0x04242844) /* 0.258827462 */, 18 },
+  /* 4205 */  { MAD_F(0x04247e58) /* 0.258909555 */, 18 },
+  /* 4206 */  { MAD_F(0x0424d46e) /* 0.258991654 */, 18 },
+  /* 4207 */  { MAD_F(0x04252a87) /* 0.259073760 */, 18 },
+
+  /* 4208 */  { MAD_F(0x042580a0) /* 0.259155872 */, 18 },
+  /* 4209 */  { MAD_F(0x0425d6bc) /* 0.259237990 */, 18 },
+  /* 4210 */  { MAD_F(0x04262cd9) /* 0.259320115 */, 18 },
+  /* 4211 */  { MAD_F(0x042682f8) /* 0.259402247 */, 18 },
+  /* 4212 */  { MAD_F(0x0426d919) /* 0.259484385 */, 18 },
+  /* 4213 */  { MAD_F(0x04272f3b) /* 0.259566529 */, 18 },
+  /* 4214 */  { MAD_F(0x04278560) /* 0.259648680 */, 18 },
+  /* 4215 */  { MAD_F(0x0427db86) /* 0.259730838 */, 18 },
+  /* 4216 */  { MAD_F(0x042831ad) /* 0.259813002 */, 18 },
+  /* 4217 */  { MAD_F(0x042887d7) /* 0.259895173 */, 18 },
+  /* 4218 */  { MAD_F(0x0428de02) /* 0.259977350 */, 18 },
+  /* 4219 */  { MAD_F(0x0429342f) /* 0.260059533 */, 18 },
+  /* 4220 */  { MAD_F(0x04298a5e) /* 0.260141723 */, 18 },
+  /* 4221 */  { MAD_F(0x0429e08e) /* 0.260223920 */, 18 },
+  /* 4222 */  { MAD_F(0x042a36c0) /* 0.260306123 */, 18 },
+  /* 4223 */  { MAD_F(0x042a8cf4) /* 0.260388332 */, 18 },
+
+  /* 4224 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 18 },
+  /* 4225 */  { MAD_F(0x042b3962) /* 0.260552771 */, 18 },
+  /* 4226 */  { MAD_F(0x042b8f9b) /* 0.260635000 */, 18 },
+  /* 4227 */  { MAD_F(0x042be5d6) /* 0.260717235 */, 18 },
+  /* 4228 */  { MAD_F(0x042c3c12) /* 0.260799477 */, 18 },
+  /* 4229 */  { MAD_F(0x042c9251) /* 0.260881725 */, 18 },
+  /* 4230 */  { MAD_F(0x042ce891) /* 0.260963980 */, 18 },
+  /* 4231 */  { MAD_F(0x042d3ed3) /* 0.261046242 */, 18 },
+  /* 4232 */  { MAD_F(0x042d9516) /* 0.261128510 */, 18 },
+  /* 4233 */  { MAD_F(0x042deb5c) /* 0.261210784 */, 18 },
+  /* 4234 */  { MAD_F(0x042e41a3) /* 0.261293065 */, 18 },
+  /* 4235 */  { MAD_F(0x042e97ec) /* 0.261375352 */, 18 },
+  /* 4236 */  { MAD_F(0x042eee36) /* 0.261457646 */, 18 },
+  /* 4237 */  { MAD_F(0x042f4482) /* 0.261539946 */, 18 },
+  /* 4238 */  { MAD_F(0x042f9ad1) /* 0.261622253 */, 18 },
+  /* 4239 */  { MAD_F(0x042ff120) /* 0.261704566 */, 18 },
+
+  /* 4240 */  { MAD_F(0x04304772) /* 0.261786886 */, 18 },
+  /* 4241 */  { MAD_F(0x04309dc5) /* 0.261869212 */, 18 },
+  /* 4242 */  { MAD_F(0x0430f41a) /* 0.261951545 */, 18 },
+  /* 4243 */  { MAD_F(0x04314a71) /* 0.262033884 */, 18 },
+  /* 4244 */  { MAD_F(0x0431a0c9) /* 0.262116229 */, 18 },
+  /* 4245 */  { MAD_F(0x0431f723) /* 0.262198581 */, 18 },
+  /* 4246 */  { MAD_F(0x04324d7f) /* 0.262280940 */, 18 },
+  /* 4247 */  { MAD_F(0x0432a3dd) /* 0.262363305 */, 18 },
+  /* 4248 */  { MAD_F(0x0432fa3d) /* 0.262445676 */, 18 },
+  /* 4249 */  { MAD_F(0x0433509e) /* 0.262528054 */, 18 },
+  /* 4250 */  { MAD_F(0x0433a701) /* 0.262610438 */, 18 },
+  /* 4251 */  { MAD_F(0x0433fd65) /* 0.262692829 */, 18 },
+  /* 4252 */  { MAD_F(0x043453cc) /* 0.262775227 */, 18 },
+  /* 4253 */  { MAD_F(0x0434aa34) /* 0.262857630 */, 18 },
+  /* 4254 */  { MAD_F(0x0435009d) /* 0.262940040 */, 18 },
+  /* 4255 */  { MAD_F(0x04355709) /* 0.263022457 */, 18 },
+
+  /* 4256 */  { MAD_F(0x0435ad76) /* 0.263104880 */, 18 },
+  /* 4257 */  { MAD_F(0x043603e5) /* 0.263187310 */, 18 },
+  /* 4258 */  { MAD_F(0x04365a56) /* 0.263269746 */, 18 },
+  /* 4259 */  { MAD_F(0x0436b0c9) /* 0.263352188 */, 18 },
+  /* 4260 */  { MAD_F(0x0437073d) /* 0.263434637 */, 18 },
+  /* 4261 */  { MAD_F(0x04375db3) /* 0.263517093 */, 18 },
+  /* 4262 */  { MAD_F(0x0437b42a) /* 0.263599554 */, 18 },
+  /* 4263 */  { MAD_F(0x04380aa4) /* 0.263682023 */, 18 },
+  /* 4264 */  { MAD_F(0x0438611f) /* 0.263764497 */, 18 },
+  /* 4265 */  { MAD_F(0x0438b79c) /* 0.263846979 */, 18 },
+  /* 4266 */  { MAD_F(0x04390e1a) /* 0.263929466 */, 18 },
+  /* 4267 */  { MAD_F(0x0439649b) /* 0.264011960 */, 18 },
+  /* 4268 */  { MAD_F(0x0439bb1d) /* 0.264094461 */, 18 },
+  /* 4269 */  { MAD_F(0x043a11a1) /* 0.264176968 */, 18 },
+  /* 4270 */  { MAD_F(0x043a6826) /* 0.264259481 */, 18 },
+  /* 4271 */  { MAD_F(0x043abead) /* 0.264342001 */, 18 },
+
+  /* 4272 */  { MAD_F(0x043b1536) /* 0.264424527 */, 18 },
+  /* 4273 */  { MAD_F(0x043b6bc1) /* 0.264507060 */, 18 },
+  /* 4274 */  { MAD_F(0x043bc24d) /* 0.264589599 */, 18 },
+  /* 4275 */  { MAD_F(0x043c18dc) /* 0.264672145 */, 18 },
+  /* 4276 */  { MAD_F(0x043c6f6c) /* 0.264754697 */, 18 },
+  /* 4277 */  { MAD_F(0x043cc5fd) /* 0.264837255 */, 18 },
+  /* 4278 */  { MAD_F(0x043d1c91) /* 0.264919820 */, 18 },
+  /* 4279 */  { MAD_F(0x043d7326) /* 0.265002392 */, 18 },
+  /* 4280 */  { MAD_F(0x043dc9bc) /* 0.265084969 */, 18 },
+  /* 4281 */  { MAD_F(0x043e2055) /* 0.265167554 */, 18 },
+  /* 4282 */  { MAD_F(0x043e76ef) /* 0.265250144 */, 18 },
+  /* 4283 */  { MAD_F(0x043ecd8b) /* 0.265332741 */, 18 },
+  /* 4284 */  { MAD_F(0x043f2429) /* 0.265415345 */, 18 },
+  /* 4285 */  { MAD_F(0x043f7ac8) /* 0.265497955 */, 18 },
+  /* 4286 */  { MAD_F(0x043fd169) /* 0.265580571 */, 18 },
+  /* 4287 */  { MAD_F(0x0440280c) /* 0.265663194 */, 18 },
+
+  /* 4288 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 18 },
+  /* 4289 */  { MAD_F(0x0440d557) /* 0.265828459 */, 18 },
+  /* 4290 */  { MAD_F(0x04412bff) /* 0.265911101 */, 18 },
+  /* 4291 */  { MAD_F(0x044182a9) /* 0.265993749 */, 18 },
+  /* 4292 */  { MAD_F(0x0441d955) /* 0.266076404 */, 18 },
+  /* 4293 */  { MAD_F(0x04423002) /* 0.266159065 */, 18 },
+  /* 4294 */  { MAD_F(0x044286b1) /* 0.266241733 */, 18 },
+  /* 4295 */  { MAD_F(0x0442dd61) /* 0.266324407 */, 18 },
+  /* 4296 */  { MAD_F(0x04433414) /* 0.266407088 */, 18 },
+  /* 4297 */  { MAD_F(0x04438ac8) /* 0.266489775 */, 18 },
+  /* 4298 */  { MAD_F(0x0443e17e) /* 0.266572468 */, 18 },
+  /* 4299 */  { MAD_F(0x04443835) /* 0.266655168 */, 18 },
+  /* 4300 */  { MAD_F(0x04448eef) /* 0.266737874 */, 18 },
+  /* 4301 */  { MAD_F(0x0444e5aa) /* 0.266820587 */, 18 },
+  /* 4302 */  { MAD_F(0x04453c66) /* 0.266903306 */, 18 },
+  /* 4303 */  { MAD_F(0x04459325) /* 0.266986031 */, 18 },
+
+  /* 4304 */  { MAD_F(0x0445e9e5) /* 0.267068763 */, 18 },
+  /* 4305 */  { MAD_F(0x044640a7) /* 0.267151501 */, 18 },
+  /* 4306 */  { MAD_F(0x0446976a) /* 0.267234246 */, 18 },
+  /* 4307 */  { MAD_F(0x0446ee30) /* 0.267316997 */, 18 },
+  /* 4308 */  { MAD_F(0x044744f7) /* 0.267399755 */, 18 },
+  /* 4309 */  { MAD_F(0x04479bc0) /* 0.267482518 */, 18 },
+  /* 4310 */  { MAD_F(0x0447f28a) /* 0.267565289 */, 18 },
+  /* 4311 */  { MAD_F(0x04484956) /* 0.267648065 */, 18 },
+  /* 4312 */  { MAD_F(0x0448a024) /* 0.267730848 */, 18 },
+  /* 4313 */  { MAD_F(0x0448f6f4) /* 0.267813638 */, 18 },
+  /* 4314 */  { MAD_F(0x04494dc5) /* 0.267896434 */, 18 },
+  /* 4315 */  { MAD_F(0x0449a498) /* 0.267979236 */, 18 },
+  /* 4316 */  { MAD_F(0x0449fb6d) /* 0.268062045 */, 18 },
+  /* 4317 */  { MAD_F(0x044a5243) /* 0.268144860 */, 18 },
+  /* 4318 */  { MAD_F(0x044aa91c) /* 0.268227681 */, 18 },
+  /* 4319 */  { MAD_F(0x044afff6) /* 0.268310509 */, 18 },
+
+  /* 4320 */  { MAD_F(0x044b56d1) /* 0.268393343 */, 18 },
+  /* 4321 */  { MAD_F(0x044badaf) /* 0.268476184 */, 18 },
+  /* 4322 */  { MAD_F(0x044c048e) /* 0.268559031 */, 18 },
+  /* 4323 */  { MAD_F(0x044c5b6f) /* 0.268641885 */, 18 },
+  /* 4324 */  { MAD_F(0x044cb251) /* 0.268724744 */, 18 },
+  /* 4325 */  { MAD_F(0x044d0935) /* 0.268807611 */, 18 },
+  /* 4326 */  { MAD_F(0x044d601b) /* 0.268890483 */, 18 },
+  /* 4327 */  { MAD_F(0x044db703) /* 0.268973362 */, 18 },
+  /* 4328 */  { MAD_F(0x044e0dec) /* 0.269056248 */, 18 },
+  /* 4329 */  { MAD_F(0x044e64d7) /* 0.269139139 */, 18 },
+  /* 4330 */  { MAD_F(0x044ebbc4) /* 0.269222037 */, 18 },
+  /* 4331 */  { MAD_F(0x044f12b3) /* 0.269304942 */, 18 },
+  /* 4332 */  { MAD_F(0x044f69a3) /* 0.269387853 */, 18 },
+  /* 4333 */  { MAD_F(0x044fc095) /* 0.269470770 */, 18 },
+  /* 4334 */  { MAD_F(0x04501788) /* 0.269553694 */, 18 },
+  /* 4335 */  { MAD_F(0x04506e7e) /* 0.269636624 */, 18 },
+
+  /* 4336 */  { MAD_F(0x0450c575) /* 0.269719560 */, 18 },
+  /* 4337 */  { MAD_F(0x04511c6e) /* 0.269802503 */, 18 },
+  /* 4338 */  { MAD_F(0x04517368) /* 0.269885452 */, 18 },
+  /* 4339 */  { MAD_F(0x0451ca64) /* 0.269968408 */, 18 },
+  /* 4340 */  { MAD_F(0x04522162) /* 0.270051370 */, 18 },
+  /* 4341 */  { MAD_F(0x04527862) /* 0.270134338 */, 18 },
+  /* 4342 */  { MAD_F(0x0452cf63) /* 0.270217312 */, 18 },
+  /* 4343 */  { MAD_F(0x04532666) /* 0.270300293 */, 18 },
+  /* 4344 */  { MAD_F(0x04537d6b) /* 0.270383281 */, 18 },
+  /* 4345 */  { MAD_F(0x0453d472) /* 0.270466275 */, 18 },
+  /* 4346 */  { MAD_F(0x04542b7a) /* 0.270549275 */, 18 },
+  /* 4347 */  { MAD_F(0x04548284) /* 0.270632281 */, 18 },
+  /* 4348 */  { MAD_F(0x0454d98f) /* 0.270715294 */, 18 },
+  /* 4349 */  { MAD_F(0x0455309c) /* 0.270798313 */, 18 },
+  /* 4350 */  { MAD_F(0x045587ab) /* 0.270881339 */, 18 },
+  /* 4351 */  { MAD_F(0x0455debc) /* 0.270964371 */, 18 },
+
+  /* 4352 */  { MAD_F(0x045635cf) /* 0.271047409 */, 18 },
+  /* 4353 */  { MAD_F(0x04568ce3) /* 0.271130454 */, 18 },
+  /* 4354 */  { MAD_F(0x0456e3f9) /* 0.271213505 */, 18 },
+  /* 4355 */  { MAD_F(0x04573b10) /* 0.271296562 */, 18 },
+  /* 4356 */  { MAD_F(0x04579229) /* 0.271379626 */, 18 },
+  /* 4357 */  { MAD_F(0x0457e944) /* 0.271462696 */, 18 },
+  /* 4358 */  { MAD_F(0x04584061) /* 0.271545772 */, 18 },
+  /* 4359 */  { MAD_F(0x0458977f) /* 0.271628855 */, 18 },
+  /* 4360 */  { MAD_F(0x0458ee9f) /* 0.271711944 */, 18 },
+  /* 4361 */  { MAD_F(0x045945c1) /* 0.271795040 */, 18 },
+  /* 4362 */  { MAD_F(0x04599ce5) /* 0.271878142 */, 18 },
+  /* 4363 */  { MAD_F(0x0459f40a) /* 0.271961250 */, 18 },
+  /* 4364 */  { MAD_F(0x045a4b31) /* 0.272044365 */, 18 },
+  /* 4365 */  { MAD_F(0x045aa259) /* 0.272127486 */, 18 },
+  /* 4366 */  { MAD_F(0x045af984) /* 0.272210613 */, 18 },
+  /* 4367 */  { MAD_F(0x045b50b0) /* 0.272293746 */, 18 },
+
+  /* 4368 */  { MAD_F(0x045ba7dd) /* 0.272376886 */, 18 },
+  /* 4369 */  { MAD_F(0x045bff0d) /* 0.272460033 */, 18 },
+  /* 4370 */  { MAD_F(0x045c563e) /* 0.272543185 */, 18 },
+  /* 4371 */  { MAD_F(0x045cad71) /* 0.272626344 */, 18 },
+  /* 4372 */  { MAD_F(0x045d04a5) /* 0.272709510 */, 18 },
+  /* 4373 */  { MAD_F(0x045d5bdc) /* 0.272792681 */, 18 },
+  /* 4374 */  { MAD_F(0x045db313) /* 0.272875859 */, 18 },
+  /* 4375 */  { MAD_F(0x045e0a4d) /* 0.272959044 */, 18 },
+  /* 4376 */  { MAD_F(0x045e6188) /* 0.273042234 */, 18 },
+  /* 4377 */  { MAD_F(0x045eb8c5) /* 0.273125431 */, 18 },
+  /* 4378 */  { MAD_F(0x045f1004) /* 0.273208635 */, 18 },
+  /* 4379 */  { MAD_F(0x045f6745) /* 0.273291844 */, 18 },
+  /* 4380 */  { MAD_F(0x045fbe87) /* 0.273375060 */, 18 },
+  /* 4381 */  { MAD_F(0x046015cb) /* 0.273458283 */, 18 },
+  /* 4382 */  { MAD_F(0x04606d10) /* 0.273541511 */, 18 },
+  /* 4383 */  { MAD_F(0x0460c457) /* 0.273624747 */, 18 },
+
+  /* 4384 */  { MAD_F(0x04611ba0) /* 0.273707988 */, 18 },
+  /* 4385 */  { MAD_F(0x046172eb) /* 0.273791236 */, 18 },
+  /* 4386 */  { MAD_F(0x0461ca37) /* 0.273874490 */, 18 },
+  /* 4387 */  { MAD_F(0x04622185) /* 0.273957750 */, 18 },
+  /* 4388 */  { MAD_F(0x046278d5) /* 0.274041017 */, 18 },
+  /* 4389 */  { MAD_F(0x0462d026) /* 0.274124290 */, 18 },
+  /* 4390 */  { MAD_F(0x0463277a) /* 0.274207569 */, 18 },
+  /* 4391 */  { MAD_F(0x04637ece) /* 0.274290855 */, 18 },
+  /* 4392 */  { MAD_F(0x0463d625) /* 0.274374147 */, 18 },
+  /* 4393 */  { MAD_F(0x04642d7d) /* 0.274457445 */, 18 },
+  /* 4394 */  { MAD_F(0x046484d7) /* 0.274540749 */, 18 },
+  /* 4395 */  { MAD_F(0x0464dc33) /* 0.274624060 */, 18 },
+  /* 4396 */  { MAD_F(0x04653390) /* 0.274707378 */, 18 },
+  /* 4397 */  { MAD_F(0x04658aef) /* 0.274790701 */, 18 },
+  /* 4398 */  { MAD_F(0x0465e250) /* 0.274874031 */, 18 },
+  /* 4399 */  { MAD_F(0x046639b2) /* 0.274957367 */, 18 },
+
+  /* 4400 */  { MAD_F(0x04669116) /* 0.275040710 */, 18 },
+  /* 4401 */  { MAD_F(0x0466e87c) /* 0.275124059 */, 18 },
+  /* 4402 */  { MAD_F(0x04673fe3) /* 0.275207414 */, 18 },
+  /* 4403 */  { MAD_F(0x0467974d) /* 0.275290775 */, 18 },
+  /* 4404 */  { MAD_F(0x0467eeb7) /* 0.275374143 */, 18 },
+  /* 4405 */  { MAD_F(0x04684624) /* 0.275457517 */, 18 },
+  /* 4406 */  { MAD_F(0x04689d92) /* 0.275540897 */, 18 },
+  /* 4407 */  { MAD_F(0x0468f502) /* 0.275624284 */, 18 },
+  /* 4408 */  { MAD_F(0x04694c74) /* 0.275707677 */, 18 },
+  /* 4409 */  { MAD_F(0x0469a3e7) /* 0.275791076 */, 18 },
+  /* 4410 */  { MAD_F(0x0469fb5c) /* 0.275874482 */, 18 },
+  /* 4411 */  { MAD_F(0x046a52d3) /* 0.275957894 */, 18 },
+  /* 4412 */  { MAD_F(0x046aaa4b) /* 0.276041312 */, 18 },
+  /* 4413 */  { MAD_F(0x046b01c5) /* 0.276124737 */, 18 },
+  /* 4414 */  { MAD_F(0x046b5941) /* 0.276208167 */, 18 },
+  /* 4415 */  { MAD_F(0x046bb0bf) /* 0.276291605 */, 18 },
+
+  /* 4416 */  { MAD_F(0x046c083e) /* 0.276375048 */, 18 },
+  /* 4417 */  { MAD_F(0x046c5fbf) /* 0.276458498 */, 18 },
+  /* 4418 */  { MAD_F(0x046cb741) /* 0.276541954 */, 18 },
+  /* 4419 */  { MAD_F(0x046d0ec5) /* 0.276625416 */, 18 },
+  /* 4420 */  { MAD_F(0x046d664b) /* 0.276708885 */, 18 },
+  /* 4421 */  { MAD_F(0x046dbdd3) /* 0.276792360 */, 18 },
+  /* 4422 */  { MAD_F(0x046e155c) /* 0.276875841 */, 18 },
+  /* 4423 */  { MAD_F(0x046e6ce7) /* 0.276959328 */, 18 },
+  /* 4424 */  { MAD_F(0x046ec474) /* 0.277042822 */, 18 },
+  /* 4425 */  { MAD_F(0x046f1c02) /* 0.277126322 */, 18 },
+  /* 4426 */  { MAD_F(0x046f7392) /* 0.277209829 */, 18 },
+  /* 4427 */  { MAD_F(0x046fcb24) /* 0.277293341 */, 18 },
+  /* 4428 */  { MAD_F(0x047022b8) /* 0.277376860 */, 18 },
+  /* 4429 */  { MAD_F(0x04707a4d) /* 0.277460385 */, 18 },
+  /* 4430 */  { MAD_F(0x0470d1e4) /* 0.277543917 */, 18 },
+  /* 4431 */  { MAD_F(0x0471297c) /* 0.277627455 */, 18 },
+
+  /* 4432 */  { MAD_F(0x04718116) /* 0.277710999 */, 18 },
+  /* 4433 */  { MAD_F(0x0471d8b2) /* 0.277794549 */, 18 },
+  /* 4434 */  { MAD_F(0x04723050) /* 0.277878106 */, 18 },
+  /* 4435 */  { MAD_F(0x047287ef) /* 0.277961669 */, 18 },
+  /* 4436 */  { MAD_F(0x0472df90) /* 0.278045238 */, 18 },
+  /* 4437 */  { MAD_F(0x04733733) /* 0.278128813 */, 18 },
+  /* 4438 */  { MAD_F(0x04738ed7) /* 0.278212395 */, 18 },
+  /* 4439 */  { MAD_F(0x0473e67d) /* 0.278295983 */, 18 },
+  /* 4440 */  { MAD_F(0x04743e25) /* 0.278379578 */, 18 },
+  /* 4441 */  { MAD_F(0x047495ce) /* 0.278463178 */, 18 },
+  /* 4442 */  { MAD_F(0x0474ed79) /* 0.278546785 */, 18 },
+  /* 4443 */  { MAD_F(0x04754526) /* 0.278630398 */, 18 },
+  /* 4444 */  { MAD_F(0x04759cd4) /* 0.278714018 */, 18 },
+  /* 4445 */  { MAD_F(0x0475f484) /* 0.278797643 */, 18 },
+  /* 4446 */  { MAD_F(0x04764c36) /* 0.278881275 */, 18 },
+  /* 4447 */  { MAD_F(0x0476a3ea) /* 0.278964914 */, 18 },
+
+  /* 4448 */  { MAD_F(0x0476fb9f) /* 0.279048558 */, 18 },
+  /* 4449 */  { MAD_F(0x04775356) /* 0.279132209 */, 18 },
+  /* 4450 */  { MAD_F(0x0477ab0e) /* 0.279215866 */, 18 },
+  /* 4451 */  { MAD_F(0x047802c8) /* 0.279299529 */, 18 },
+  /* 4452 */  { MAD_F(0x04785a84) /* 0.279383199 */, 18 },
+  /* 4453 */  { MAD_F(0x0478b242) /* 0.279466875 */, 18 },
+  /* 4454 */  { MAD_F(0x04790a01) /* 0.279550557 */, 18 },
+  /* 4455 */  { MAD_F(0x047961c2) /* 0.279634245 */, 18 },
+  /* 4456 */  { MAD_F(0x0479b984) /* 0.279717940 */, 18 },
+  /* 4457 */  { MAD_F(0x047a1149) /* 0.279801641 */, 18 },
+  /* 4458 */  { MAD_F(0x047a690f) /* 0.279885348 */, 18 },
+  /* 4459 */  { MAD_F(0x047ac0d6) /* 0.279969061 */, 18 },
+  /* 4460 */  { MAD_F(0x047b18a0) /* 0.280052781 */, 18 },
+  /* 4461 */  { MAD_F(0x047b706b) /* 0.280136507 */, 18 },
+  /* 4462 */  { MAD_F(0x047bc837) /* 0.280220239 */, 18 },
+  /* 4463 */  { MAD_F(0x047c2006) /* 0.280303978 */, 18 },
+
+  /* 4464 */  { MAD_F(0x047c77d6) /* 0.280387722 */, 18 },
+  /* 4465 */  { MAD_F(0x047ccfa8) /* 0.280471473 */, 18 },
+  /* 4466 */  { MAD_F(0x047d277b) /* 0.280555230 */, 18 },
+  /* 4467 */  { MAD_F(0x047d7f50) /* 0.280638994 */, 18 },
+  /* 4468 */  { MAD_F(0x047dd727) /* 0.280722764 */, 18 },
+  /* 4469 */  { MAD_F(0x047e2eff) /* 0.280806540 */, 18 },
+  /* 4470 */  { MAD_F(0x047e86d9) /* 0.280890322 */, 18 },
+  /* 4471 */  { MAD_F(0x047edeb5) /* 0.280974110 */, 18 },
+  /* 4472 */  { MAD_F(0x047f3693) /* 0.281057905 */, 18 },
+  /* 4473 */  { MAD_F(0x047f8e72) /* 0.281141706 */, 18 },
+  /* 4474 */  { MAD_F(0x047fe653) /* 0.281225513 */, 18 },
+  /* 4475 */  { MAD_F(0x04803e35) /* 0.281309326 */, 18 },
+  /* 4476 */  { MAD_F(0x04809619) /* 0.281393146 */, 18 },
+  /* 4477 */  { MAD_F(0x0480edff) /* 0.281476972 */, 18 },
+  /* 4478 */  { MAD_F(0x048145e7) /* 0.281560804 */, 18 },
+  /* 4479 */  { MAD_F(0x04819dd0) /* 0.281644643 */, 18 },
+
+  /* 4480 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 18 },
+  /* 4481 */  { MAD_F(0x04824da7) /* 0.281812338 */, 18 },
+  /* 4482 */  { MAD_F(0x0482a595) /* 0.281896195 */, 18 },
+  /* 4483 */  { MAD_F(0x0482fd85) /* 0.281980059 */, 18 },
+  /* 4484 */  { MAD_F(0x04835577) /* 0.282063928 */, 18 },
+  /* 4485 */  { MAD_F(0x0483ad6a) /* 0.282147804 */, 18 },
+  /* 4486 */  { MAD_F(0x0484055f) /* 0.282231686 */, 18 },
+  /* 4487 */  { MAD_F(0x04845d56) /* 0.282315574 */, 18 },
+  /* 4488 */  { MAD_F(0x0484b54e) /* 0.282399469 */, 18 },
+  /* 4489 */  { MAD_F(0x04850d48) /* 0.282483370 */, 18 },
+  /* 4490 */  { MAD_F(0x04856544) /* 0.282567277 */, 18 },
+  /* 4491 */  { MAD_F(0x0485bd41) /* 0.282651190 */, 18 },
+  /* 4492 */  { MAD_F(0x04861540) /* 0.282735109 */, 18 },
+  /* 4493 */  { MAD_F(0x04866d40) /* 0.282819035 */, 18 },
+  /* 4494 */  { MAD_F(0x0486c543) /* 0.282902967 */, 18 },
+  /* 4495 */  { MAD_F(0x04871d47) /* 0.282986905 */, 18 },
+
+  /* 4496 */  { MAD_F(0x0487754c) /* 0.283070849 */, 18 },
+  /* 4497 */  { MAD_F(0x0487cd54) /* 0.283154800 */, 18 },
+  /* 4498 */  { MAD_F(0x0488255d) /* 0.283238757 */, 18 },
+  /* 4499 */  { MAD_F(0x04887d67) /* 0.283322720 */, 18 },
+  /* 4500 */  { MAD_F(0x0488d574) /* 0.283406689 */, 18 },
+  /* 4501 */  { MAD_F(0x04892d82) /* 0.283490665 */, 18 },
+  /* 4502 */  { MAD_F(0x04898591) /* 0.283574646 */, 18 },
+  /* 4503 */  { MAD_F(0x0489dda3) /* 0.283658634 */, 18 },
+  /* 4504 */  { MAD_F(0x048a35b6) /* 0.283742628 */, 18 },
+  /* 4505 */  { MAD_F(0x048a8dca) /* 0.283826629 */, 18 },
+  /* 4506 */  { MAD_F(0x048ae5e1) /* 0.283910635 */, 18 },
+  /* 4507 */  { MAD_F(0x048b3df9) /* 0.283994648 */, 18 },
+  /* 4508 */  { MAD_F(0x048b9612) /* 0.284078667 */, 18 },
+  /* 4509 */  { MAD_F(0x048bee2e) /* 0.284162692 */, 18 },
+  /* 4510 */  { MAD_F(0x048c464b) /* 0.284246723 */, 18 },
+  /* 4511 */  { MAD_F(0x048c9e69) /* 0.284330761 */, 18 },
+
+  /* 4512 */  { MAD_F(0x048cf68a) /* 0.284414805 */, 18 },
+  /* 4513 */  { MAD_F(0x048d4eac) /* 0.284498855 */, 18 },
+  /* 4514 */  { MAD_F(0x048da6cf) /* 0.284582911 */, 18 },
+  /* 4515 */  { MAD_F(0x048dfef5) /* 0.284666974 */, 18 },
+  /* 4516 */  { MAD_F(0x048e571c) /* 0.284751042 */, 18 },
+  /* 4517 */  { MAD_F(0x048eaf44) /* 0.284835117 */, 18 },
+  /* 4518 */  { MAD_F(0x048f076f) /* 0.284919198 */, 18 },
+  /* 4519 */  { MAD_F(0x048f5f9b) /* 0.285003285 */, 18 },
+  /* 4520 */  { MAD_F(0x048fb7c8) /* 0.285087379 */, 18 },
+  /* 4521 */  { MAD_F(0x04900ff8) /* 0.285171479 */, 18 },
+  /* 4522 */  { MAD_F(0x04906829) /* 0.285255584 */, 18 },
+  /* 4523 */  { MAD_F(0x0490c05b) /* 0.285339697 */, 18 },
+  /* 4524 */  { MAD_F(0x04911890) /* 0.285423815 */, 18 },
+  /* 4525 */  { MAD_F(0x049170c6) /* 0.285507939 */, 18 },
+  /* 4526 */  { MAD_F(0x0491c8fd) /* 0.285592070 */, 18 },
+  /* 4527 */  { MAD_F(0x04922137) /* 0.285676207 */, 18 },
+
+  /* 4528 */  { MAD_F(0x04927972) /* 0.285760350 */, 18 },
+  /* 4529 */  { MAD_F(0x0492d1ae) /* 0.285844499 */, 18 },
+  /* 4530 */  { MAD_F(0x049329ed) /* 0.285928655 */, 18 },
+  /* 4531 */  { MAD_F(0x0493822c) /* 0.286012816 */, 18 },
+  /* 4532 */  { MAD_F(0x0493da6e) /* 0.286096984 */, 18 },
+  /* 4533 */  { MAD_F(0x049432b1) /* 0.286181158 */, 18 },
+  /* 4534 */  { MAD_F(0x04948af6) /* 0.286265338 */, 18 },
+  /* 4535 */  { MAD_F(0x0494e33d) /* 0.286349525 */, 18 },
+  /* 4536 */  { MAD_F(0x04953b85) /* 0.286433717 */, 18 },
+  /* 4537 */  { MAD_F(0x049593cf) /* 0.286517916 */, 18 },
+  /* 4538 */  { MAD_F(0x0495ec1b) /* 0.286602121 */, 18 },
+  /* 4539 */  { MAD_F(0x04964468) /* 0.286686332 */, 18 },
+  /* 4540 */  { MAD_F(0x04969cb7) /* 0.286770550 */, 18 },
+  /* 4541 */  { MAD_F(0x0496f508) /* 0.286854773 */, 18 },
+  /* 4542 */  { MAD_F(0x04974d5a) /* 0.286939003 */, 18 },
+  /* 4543 */  { MAD_F(0x0497a5ae) /* 0.287023239 */, 18 },
+
+  /* 4544 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 18 },
+  /* 4545 */  { MAD_F(0x0498565a) /* 0.287191729 */, 18 },
+  /* 4546 */  { MAD_F(0x0498aeb3) /* 0.287275983 */, 18 },
+  /* 4547 */  { MAD_F(0x0499070e) /* 0.287360244 */, 18 },
+  /* 4548 */  { MAD_F(0x04995f6a) /* 0.287444511 */, 18 },
+  /* 4549 */  { MAD_F(0x0499b7c8) /* 0.287528784 */, 18 },
+  /* 4550 */  { MAD_F(0x049a1027) /* 0.287613063 */, 18 },
+  /* 4551 */  { MAD_F(0x049a6889) /* 0.287697348 */, 18 },
+  /* 4552 */  { MAD_F(0x049ac0eb) /* 0.287781640 */, 18 },
+  /* 4553 */  { MAD_F(0x049b1950) /* 0.287865937 */, 18 },
+  /* 4554 */  { MAD_F(0x049b71b6) /* 0.287950241 */, 18 },
+  /* 4555 */  { MAD_F(0x049bca1e) /* 0.288034551 */, 18 },
+  /* 4556 */  { MAD_F(0x049c2287) /* 0.288118867 */, 18 },
+  /* 4557 */  { MAD_F(0x049c7af2) /* 0.288203190 */, 18 },
+  /* 4558 */  { MAD_F(0x049cd35f) /* 0.288287518 */, 18 },
+  /* 4559 */  { MAD_F(0x049d2bce) /* 0.288371853 */, 18 },
+
+  /* 4560 */  { MAD_F(0x049d843e) /* 0.288456194 */, 18 },
+  /* 4561 */  { MAD_F(0x049ddcaf) /* 0.288540541 */, 18 },
+  /* 4562 */  { MAD_F(0x049e3523) /* 0.288624894 */, 18 },
+  /* 4563 */  { MAD_F(0x049e8d98) /* 0.288709253 */, 18 },
+  /* 4564 */  { MAD_F(0x049ee60e) /* 0.288793619 */, 18 },
+  /* 4565 */  { MAD_F(0x049f3e87) /* 0.288877990 */, 18 },
+  /* 4566 */  { MAD_F(0x049f9701) /* 0.288962368 */, 18 },
+  /* 4567 */  { MAD_F(0x049fef7c) /* 0.289046752 */, 18 },
+  /* 4568 */  { MAD_F(0x04a047fa) /* 0.289131142 */, 18 },
+  /* 4569 */  { MAD_F(0x04a0a079) /* 0.289215538 */, 18 },
+  /* 4570 */  { MAD_F(0x04a0f8f9) /* 0.289299941 */, 18 },
+  /* 4571 */  { MAD_F(0x04a1517c) /* 0.289384349 */, 18 },
+  /* 4572 */  { MAD_F(0x04a1a9ff) /* 0.289468764 */, 18 },
+  /* 4573 */  { MAD_F(0x04a20285) /* 0.289553185 */, 18 },
+  /* 4574 */  { MAD_F(0x04a25b0c) /* 0.289637612 */, 18 },
+  /* 4575 */  { MAD_F(0x04a2b395) /* 0.289722045 */, 18 },
+
+  /* 4576 */  { MAD_F(0x04a30c20) /* 0.289806485 */, 18 },
+  /* 4577 */  { MAD_F(0x04a364ac) /* 0.289890930 */, 18 },
+  /* 4578 */  { MAD_F(0x04a3bd3a) /* 0.289975382 */, 18 },
+  /* 4579 */  { MAD_F(0x04a415c9) /* 0.290059840 */, 18 },
+  /* 4580 */  { MAD_F(0x04a46e5a) /* 0.290144304 */, 18 },
+  /* 4581 */  { MAD_F(0x04a4c6ed) /* 0.290228774 */, 18 },
+  /* 4582 */  { MAD_F(0x04a51f81) /* 0.290313250 */, 18 },
+  /* 4583 */  { MAD_F(0x04a57818) /* 0.290397733 */, 18 },
+  /* 4584 */  { MAD_F(0x04a5d0af) /* 0.290482221 */, 18 },
+  /* 4585 */  { MAD_F(0x04a62949) /* 0.290566716 */, 18 },
+  /* 4586 */  { MAD_F(0x04a681e4) /* 0.290651217 */, 18 },
+  /* 4587 */  { MAD_F(0x04a6da80) /* 0.290735724 */, 18 },
+  /* 4588 */  { MAD_F(0x04a7331f) /* 0.290820237 */, 18 },
+  /* 4589 */  { MAD_F(0x04a78bbf) /* 0.290904756 */, 18 },
+  /* 4590 */  { MAD_F(0x04a7e460) /* 0.290989281 */, 18 },
+  /* 4591 */  { MAD_F(0x04a83d03) /* 0.291073813 */, 18 },
+
+  /* 4592 */  { MAD_F(0x04a895a8) /* 0.291158351 */, 18 },
+  /* 4593 */  { MAD_F(0x04a8ee4f) /* 0.291242894 */, 18 },
+  /* 4594 */  { MAD_F(0x04a946f7) /* 0.291327444 */, 18 },
+  /* 4595 */  { MAD_F(0x04a99fa1) /* 0.291412001 */, 18 },
+  /* 4596 */  { MAD_F(0x04a9f84c) /* 0.291496563 */, 18 },
+  /* 4597 */  { MAD_F(0x04aa50fa) /* 0.291581131 */, 18 },
+  /* 4598 */  { MAD_F(0x04aaa9a8) /* 0.291665706 */, 18 },
+  /* 4599 */  { MAD_F(0x04ab0259) /* 0.291750286 */, 18 },
+  /* 4600 */  { MAD_F(0x04ab5b0b) /* 0.291834873 */, 18 },
+  /* 4601 */  { MAD_F(0x04abb3bf) /* 0.291919466 */, 18 },
+  /* 4602 */  { MAD_F(0x04ac0c74) /* 0.292004065 */, 18 },
+  /* 4603 */  { MAD_F(0x04ac652b) /* 0.292088670 */, 18 },
+  /* 4604 */  { MAD_F(0x04acbde4) /* 0.292173281 */, 18 },
+  /* 4605 */  { MAD_F(0x04ad169e) /* 0.292257899 */, 18 },
+  /* 4606 */  { MAD_F(0x04ad6f5a) /* 0.292342522 */, 18 },
+  /* 4607 */  { MAD_F(0x04adc818) /* 0.292427152 */, 18 },
+
+  /* 4608 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 18 },
+  /* 4609 */  { MAD_F(0x04ae7998) /* 0.292596430 */, 18 },
+  /* 4610 */  { MAD_F(0x04aed25a) /* 0.292681078 */, 18 },
+  /* 4611 */  { MAD_F(0x04af2b1e) /* 0.292765732 */, 18 },
+  /* 4612 */  { MAD_F(0x04af83e4) /* 0.292850392 */, 18 },
+  /* 4613 */  { MAD_F(0x04afdcac) /* 0.292935058 */, 18 },
+  /* 4614 */  { MAD_F(0x04b03575) /* 0.293019731 */, 18 },
+  /* 4615 */  { MAD_F(0x04b08e40) /* 0.293104409 */, 18 },
+  /* 4616 */  { MAD_F(0x04b0e70c) /* 0.293189094 */, 18 },
+  /* 4617 */  { MAD_F(0x04b13fda) /* 0.293273785 */, 18 },
+  /* 4618 */  { MAD_F(0x04b198aa) /* 0.293358482 */, 18 },
+  /* 4619 */  { MAD_F(0x04b1f17b) /* 0.293443185 */, 18 },
+  /* 4620 */  { MAD_F(0x04b24a4e) /* 0.293527894 */, 18 },
+  /* 4621 */  { MAD_F(0x04b2a322) /* 0.293612609 */, 18 },
+  /* 4622 */  { MAD_F(0x04b2fbf9) /* 0.293697331 */, 18 },
+  /* 4623 */  { MAD_F(0x04b354d1) /* 0.293782058 */, 18 },
+
+  /* 4624 */  { MAD_F(0x04b3adaa) /* 0.293866792 */, 18 },
+  /* 4625 */  { MAD_F(0x04b40685) /* 0.293951532 */, 18 },
+  /* 4626 */  { MAD_F(0x04b45f62) /* 0.294036278 */, 18 },
+  /* 4627 */  { MAD_F(0x04b4b840) /* 0.294121029 */, 18 },
+  /* 4628 */  { MAD_F(0x04b51120) /* 0.294205788 */, 18 },
+  /* 4629 */  { MAD_F(0x04b56a02) /* 0.294290552 */, 18 },
+  /* 4630 */  { MAD_F(0x04b5c2e6) /* 0.294375322 */, 18 },
+  /* 4631 */  { MAD_F(0x04b61bcb) /* 0.294460098 */, 18 },
+  /* 4632 */  { MAD_F(0x04b674b1) /* 0.294544881 */, 18 },
+  /* 4633 */  { MAD_F(0x04b6cd99) /* 0.294629669 */, 18 },
+  /* 4634 */  { MAD_F(0x04b72683) /* 0.294714464 */, 18 },
+  /* 4635 */  { MAD_F(0x04b77f6f) /* 0.294799265 */, 18 },
+  /* 4636 */  { MAD_F(0x04b7d85c) /* 0.294884072 */, 18 },
+  /* 4637 */  { MAD_F(0x04b8314b) /* 0.294968885 */, 18 },
+  /* 4638 */  { MAD_F(0x04b88a3b) /* 0.295053704 */, 18 },
+  /* 4639 */  { MAD_F(0x04b8e32d) /* 0.295138529 */, 18 },
+
+  /* 4640 */  { MAD_F(0x04b93c21) /* 0.295223360 */, 18 },
+  /* 4641 */  { MAD_F(0x04b99516) /* 0.295308197 */, 18 },
+  /* 4642 */  { MAD_F(0x04b9ee0d) /* 0.295393041 */, 18 },
+  /* 4643 */  { MAD_F(0x04ba4706) /* 0.295477890 */, 18 },
+  /* 4644 */  { MAD_F(0x04baa000) /* 0.295562746 */, 18 },
+  /* 4645 */  { MAD_F(0x04baf8fc) /* 0.295647608 */, 18 },
+  /* 4646 */  { MAD_F(0x04bb51fa) /* 0.295732476 */, 18 },
+  /* 4647 */  { MAD_F(0x04bbaaf9) /* 0.295817349 */, 18 },
+  /* 4648 */  { MAD_F(0x04bc03fa) /* 0.295902229 */, 18 },
+  /* 4649 */  { MAD_F(0x04bc5cfc) /* 0.295987115 */, 18 },
+  /* 4650 */  { MAD_F(0x04bcb600) /* 0.296072008 */, 18 },
+  /* 4651 */  { MAD_F(0x04bd0f06) /* 0.296156906 */, 18 },
+  /* 4652 */  { MAD_F(0x04bd680d) /* 0.296241810 */, 18 },
+  /* 4653 */  { MAD_F(0x04bdc116) /* 0.296326721 */, 18 },
+  /* 4654 */  { MAD_F(0x04be1a21) /* 0.296411637 */, 18 },
+  /* 4655 */  { MAD_F(0x04be732d) /* 0.296496560 */, 18 },
+
+  /* 4656 */  { MAD_F(0x04becc3b) /* 0.296581488 */, 18 },
+  /* 4657 */  { MAD_F(0x04bf254a) /* 0.296666423 */, 18 },
+  /* 4658 */  { MAD_F(0x04bf7e5b) /* 0.296751364 */, 18 },
+  /* 4659 */  { MAD_F(0x04bfd76e) /* 0.296836311 */, 18 },
+  /* 4660 */  { MAD_F(0x04c03083) /* 0.296921264 */, 18 },
+  /* 4661 */  { MAD_F(0x04c08999) /* 0.297006223 */, 18 },
+  /* 4662 */  { MAD_F(0x04c0e2b0) /* 0.297091188 */, 18 },
+  /* 4663 */  { MAD_F(0x04c13bca) /* 0.297176159 */, 18 },
+  /* 4664 */  { MAD_F(0x04c194e4) /* 0.297261136 */, 18 },
+  /* 4665 */  { MAD_F(0x04c1ee01) /* 0.297346120 */, 18 },
+  /* 4666 */  { MAD_F(0x04c2471f) /* 0.297431109 */, 18 },
+  /* 4667 */  { MAD_F(0x04c2a03f) /* 0.297516105 */, 18 },
+  /* 4668 */  { MAD_F(0x04c2f960) /* 0.297601106 */, 18 },
+  /* 4669 */  { MAD_F(0x04c35283) /* 0.297686114 */, 18 },
+  /* 4670 */  { MAD_F(0x04c3aba8) /* 0.297771128 */, 18 },
+  /* 4671 */  { MAD_F(0x04c404ce) /* 0.297856147 */, 18 },
+
+  /* 4672 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 18 },
+  /* 4673 */  { MAD_F(0x04c4b720) /* 0.298026205 */, 18 },
+  /* 4674 */  { MAD_F(0x04c5104b) /* 0.298111243 */, 18 },
+  /* 4675 */  { MAD_F(0x04c56978) /* 0.298196287 */, 18 },
+  /* 4676 */  { MAD_F(0x04c5c2a7) /* 0.298281337 */, 18 },
+  /* 4677 */  { MAD_F(0x04c61bd7) /* 0.298366393 */, 18 },
+  /* 4678 */  { MAD_F(0x04c67508) /* 0.298451456 */, 18 },
+  /* 4679 */  { MAD_F(0x04c6ce3c) /* 0.298536524 */, 18 },
+  /* 4680 */  { MAD_F(0x04c72771) /* 0.298621598 */, 18 },
+  /* 4681 */  { MAD_F(0x04c780a7) /* 0.298706679 */, 18 },
+  /* 4682 */  { MAD_F(0x04c7d9df) /* 0.298791765 */, 18 },
+  /* 4683 */  { MAD_F(0x04c83319) /* 0.298876858 */, 18 },
+  /* 4684 */  { MAD_F(0x04c88c55) /* 0.298961956 */, 18 },
+  /* 4685 */  { MAD_F(0x04c8e592) /* 0.299047061 */, 18 },
+  /* 4686 */  { MAD_F(0x04c93ed1) /* 0.299132172 */, 18 },
+  /* 4687 */  { MAD_F(0x04c99811) /* 0.299217288 */, 18 },
+
+  /* 4688 */  { MAD_F(0x04c9f153) /* 0.299302411 */, 18 },
+  /* 4689 */  { MAD_F(0x04ca4a97) /* 0.299387540 */, 18 },
+  /* 4690 */  { MAD_F(0x04caa3dc) /* 0.299472675 */, 18 },
+  /* 4691 */  { MAD_F(0x04cafd23) /* 0.299557816 */, 18 },
+  /* 4692 */  { MAD_F(0x04cb566b) /* 0.299642963 */, 18 },
+  /* 4693 */  { MAD_F(0x04cbafb5) /* 0.299728116 */, 18 },
+  /* 4694 */  { MAD_F(0x04cc0901) /* 0.299813275 */, 18 },
+  /* 4695 */  { MAD_F(0x04cc624e) /* 0.299898440 */, 18 },
+  /* 4696 */  { MAD_F(0x04ccbb9d) /* 0.299983611 */, 18 },
+  /* 4697 */  { MAD_F(0x04cd14ee) /* 0.300068789 */, 18 },
+  /* 4698 */  { MAD_F(0x04cd6e40) /* 0.300153972 */, 18 },
+  /* 4699 */  { MAD_F(0x04cdc794) /* 0.300239161 */, 18 },
+  /* 4700 */  { MAD_F(0x04ce20e9) /* 0.300324357 */, 18 },
+  /* 4701 */  { MAD_F(0x04ce7a40) /* 0.300409558 */, 18 },
+  /* 4702 */  { MAD_F(0x04ced399) /* 0.300494765 */, 18 },
+  /* 4703 */  { MAD_F(0x04cf2cf3) /* 0.300579979 */, 18 },
+
+  /* 4704 */  { MAD_F(0x04cf864f) /* 0.300665198 */, 18 },
+  /* 4705 */  { MAD_F(0x04cfdfad) /* 0.300750424 */, 18 },
+  /* 4706 */  { MAD_F(0x04d0390c) /* 0.300835656 */, 18 },
+  /* 4707 */  { MAD_F(0x04d0926d) /* 0.300920893 */, 18 },
+  /* 4708 */  { MAD_F(0x04d0ebcf) /* 0.301006137 */, 18 },
+  /* 4709 */  { MAD_F(0x04d14533) /* 0.301091387 */, 18 },
+  /* 4710 */  { MAD_F(0x04d19e99) /* 0.301176643 */, 18 },
+  /* 4711 */  { MAD_F(0x04d1f800) /* 0.301261904 */, 18 },
+  /* 4712 */  { MAD_F(0x04d25169) /* 0.301347172 */, 18 },
+  /* 4713 */  { MAD_F(0x04d2aad4) /* 0.301432446 */, 18 },
+  /* 4714 */  { MAD_F(0x04d30440) /* 0.301517726 */, 18 },
+  /* 4715 */  { MAD_F(0x04d35dae) /* 0.301603012 */, 18 },
+  /* 4716 */  { MAD_F(0x04d3b71d) /* 0.301688304 */, 18 },
+  /* 4717 */  { MAD_F(0x04d4108e) /* 0.301773602 */, 18 },
+  /* 4718 */  { MAD_F(0x04d46a01) /* 0.301858906 */, 18 },
+  /* 4719 */  { MAD_F(0x04d4c375) /* 0.301944216 */, 18 },
+
+  /* 4720 */  { MAD_F(0x04d51ceb) /* 0.302029532 */, 18 },
+  /* 4721 */  { MAD_F(0x04d57662) /* 0.302114854 */, 18 },
+  /* 4722 */  { MAD_F(0x04d5cfdb) /* 0.302200182 */, 18 },
+  /* 4723 */  { MAD_F(0x04d62956) /* 0.302285516 */, 18 },
+  /* 4724 */  { MAD_F(0x04d682d2) /* 0.302370856 */, 18 },
+  /* 4725 */  { MAD_F(0x04d6dc50) /* 0.302456203 */, 18 },
+  /* 4726 */  { MAD_F(0x04d735d0) /* 0.302541555 */, 18 },
+  /* 4727 */  { MAD_F(0x04d78f51) /* 0.302626913 */, 18 },
+  /* 4728 */  { MAD_F(0x04d7e8d4) /* 0.302712277 */, 18 },
+  /* 4729 */  { MAD_F(0x04d84258) /* 0.302797648 */, 18 },
+  /* 4730 */  { MAD_F(0x04d89bde) /* 0.302883024 */, 18 },
+  /* 4731 */  { MAD_F(0x04d8f566) /* 0.302968406 */, 18 },
+  /* 4732 */  { MAD_F(0x04d94eef) /* 0.303053794 */, 18 },
+  /* 4733 */  { MAD_F(0x04d9a87a) /* 0.303139189 */, 18 },
+  /* 4734 */  { MAD_F(0x04da0207) /* 0.303224589 */, 18 },
+  /* 4735 */  { MAD_F(0x04da5b95) /* 0.303309995 */, 18 },
+
+  /* 4736 */  { MAD_F(0x04dab524) /* 0.303395408 */, 18 },
+  /* 4737 */  { MAD_F(0x04db0eb6) /* 0.303480826 */, 18 },
+  /* 4738 */  { MAD_F(0x04db6849) /* 0.303566251 */, 18 },
+  /* 4739 */  { MAD_F(0x04dbc1dd) /* 0.303651681 */, 18 },
+  /* 4740 */  { MAD_F(0x04dc1b73) /* 0.303737117 */, 18 },
+  /* 4741 */  { MAD_F(0x04dc750b) /* 0.303822560 */, 18 },
+  /* 4742 */  { MAD_F(0x04dccea5) /* 0.303908008 */, 18 },
+  /* 4743 */  { MAD_F(0x04dd2840) /* 0.303993463 */, 18 },
+  /* 4744 */  { MAD_F(0x04dd81dc) /* 0.304078923 */, 18 },
+  /* 4745 */  { MAD_F(0x04dddb7a) /* 0.304164390 */, 18 },
+  /* 4746 */  { MAD_F(0x04de351a) /* 0.304249862 */, 18 },
+  /* 4747 */  { MAD_F(0x04de8ebc) /* 0.304335340 */, 18 },
+  /* 4748 */  { MAD_F(0x04dee85f) /* 0.304420825 */, 18 },
+  /* 4749 */  { MAD_F(0x04df4203) /* 0.304506315 */, 18 },
+  /* 4750 */  { MAD_F(0x04df9baa) /* 0.304591812 */, 18 },
+  /* 4751 */  { MAD_F(0x04dff552) /* 0.304677314 */, 18 },
+
+  /* 4752 */  { MAD_F(0x04e04efb) /* 0.304762823 */, 18 },
+  /* 4753 */  { MAD_F(0x04e0a8a6) /* 0.304848337 */, 18 },
+  /* 4754 */  { MAD_F(0x04e10253) /* 0.304933858 */, 18 },
+  /* 4755 */  { MAD_F(0x04e15c01) /* 0.305019384 */, 18 },
+  /* 4756 */  { MAD_F(0x04e1b5b1) /* 0.305104917 */, 18 },
+  /* 4757 */  { MAD_F(0x04e20f63) /* 0.305190455 */, 18 },
+  /* 4758 */  { MAD_F(0x04e26916) /* 0.305275999 */, 18 },
+  /* 4759 */  { MAD_F(0x04e2c2cb) /* 0.305361550 */, 18 },
+  /* 4760 */  { MAD_F(0x04e31c81) /* 0.305447106 */, 18 },
+  /* 4761 */  { MAD_F(0x04e37639) /* 0.305532669 */, 18 },
+  /* 4762 */  { MAD_F(0x04e3cff3) /* 0.305618237 */, 18 },
+  /* 4763 */  { MAD_F(0x04e429ae) /* 0.305703811 */, 18 },
+  /* 4764 */  { MAD_F(0x04e4836b) /* 0.305789392 */, 18 },
+  /* 4765 */  { MAD_F(0x04e4dd29) /* 0.305874978 */, 18 },
+  /* 4766 */  { MAD_F(0x04e536e9) /* 0.305960571 */, 18 },
+  /* 4767 */  { MAD_F(0x04e590ab) /* 0.306046169 */, 18 },
+
+  /* 4768 */  { MAD_F(0x04e5ea6e) /* 0.306131773 */, 18 },
+  /* 4769 */  { MAD_F(0x04e64433) /* 0.306217383 */, 18 },
+  /* 4770 */  { MAD_F(0x04e69df9) /* 0.306303000 */, 18 },
+  /* 4771 */  { MAD_F(0x04e6f7c1) /* 0.306388622 */, 18 },
+  /* 4772 */  { MAD_F(0x04e7518b) /* 0.306474250 */, 18 },
+  /* 4773 */  { MAD_F(0x04e7ab56) /* 0.306559885 */, 18 },
+  /* 4774 */  { MAD_F(0x04e80523) /* 0.306645525 */, 18 },
+  /* 4775 */  { MAD_F(0x04e85ef2) /* 0.306731171 */, 18 },
+  /* 4776 */  { MAD_F(0x04e8b8c2) /* 0.306816823 */, 18 },
+  /* 4777 */  { MAD_F(0x04e91293) /* 0.306902481 */, 18 },
+  /* 4778 */  { MAD_F(0x04e96c67) /* 0.306988145 */, 18 },
+  /* 4779 */  { MAD_F(0x04e9c63b) /* 0.307073816 */, 18 },
+  /* 4780 */  { MAD_F(0x04ea2012) /* 0.307159492 */, 18 },
+  /* 4781 */  { MAD_F(0x04ea79ea) /* 0.307245174 */, 18 },
+  /* 4782 */  { MAD_F(0x04ead3c4) /* 0.307330862 */, 18 },
+  /* 4783 */  { MAD_F(0x04eb2d9f) /* 0.307416556 */, 18 },
+
+  /* 4784 */  { MAD_F(0x04eb877c) /* 0.307502256 */, 18 },
+  /* 4785 */  { MAD_F(0x04ebe15b) /* 0.307587962 */, 18 },
+  /* 4786 */  { MAD_F(0x04ec3b3b) /* 0.307673674 */, 18 },
+  /* 4787 */  { MAD_F(0x04ec951c) /* 0.307759392 */, 18 },
+  /* 4788 */  { MAD_F(0x04ecef00) /* 0.307845115 */, 18 },
+  /* 4789 */  { MAD_F(0x04ed48e5) /* 0.307930845 */, 18 },
+  /* 4790 */  { MAD_F(0x04eda2cb) /* 0.308016581 */, 18 },
+  /* 4791 */  { MAD_F(0x04edfcb3) /* 0.308102323 */, 18 },
+  /* 4792 */  { MAD_F(0x04ee569d) /* 0.308188071 */, 18 },
+  /* 4793 */  { MAD_F(0x04eeb088) /* 0.308273824 */, 18 },
+  /* 4794 */  { MAD_F(0x04ef0a75) /* 0.308359584 */, 18 },
+  /* 4795 */  { MAD_F(0x04ef6464) /* 0.308445350 */, 18 },
+  /* 4796 */  { MAD_F(0x04efbe54) /* 0.308531121 */, 18 },
+  /* 4797 */  { MAD_F(0x04f01846) /* 0.308616899 */, 18 },
+  /* 4798 */  { MAD_F(0x04f07239) /* 0.308702682 */, 18 },
+  /* 4799 */  { MAD_F(0x04f0cc2e) /* 0.308788472 */, 18 },
+
+  /* 4800 */  { MAD_F(0x04f12624) /* 0.308874267 */, 18 },
+  /* 4801 */  { MAD_F(0x04f1801d) /* 0.308960068 */, 18 },
+  /* 4802 */  { MAD_F(0x04f1da16) /* 0.309045876 */, 18 },
+  /* 4803 */  { MAD_F(0x04f23412) /* 0.309131689 */, 18 },
+  /* 4804 */  { MAD_F(0x04f28e0f) /* 0.309217508 */, 18 },
+  /* 4805 */  { MAD_F(0x04f2e80d) /* 0.309303334 */, 18 },
+  /* 4806 */  { MAD_F(0x04f3420d) /* 0.309389165 */, 18 },
+  /* 4807 */  { MAD_F(0x04f39c0f) /* 0.309475002 */, 18 },
+  /* 4808 */  { MAD_F(0x04f3f612) /* 0.309560845 */, 18 },
+  /* 4809 */  { MAD_F(0x04f45017) /* 0.309646694 */, 18 },
+  /* 4810 */  { MAD_F(0x04f4aa1e) /* 0.309732549 */, 18 },
+  /* 4811 */  { MAD_F(0x04f50426) /* 0.309818410 */, 18 },
+  /* 4812 */  { MAD_F(0x04f55e30) /* 0.309904277 */, 18 },
+  /* 4813 */  { MAD_F(0x04f5b83b) /* 0.309990150 */, 18 },
+  /* 4814 */  { MAD_F(0x04f61248) /* 0.310076028 */, 18 },
+  /* 4815 */  { MAD_F(0x04f66c56) /* 0.310161913 */, 18 },
+
+  /* 4816 */  { MAD_F(0x04f6c666) /* 0.310247804 */, 18 },
+  /* 4817 */  { MAD_F(0x04f72078) /* 0.310333700 */, 18 },
+  /* 4818 */  { MAD_F(0x04f77a8b) /* 0.310419603 */, 18 },
+  /* 4819 */  { MAD_F(0x04f7d4a0) /* 0.310505511 */, 18 },
+  /* 4820 */  { MAD_F(0x04f82eb7) /* 0.310591426 */, 18 },
+  /* 4821 */  { MAD_F(0x04f888cf) /* 0.310677346 */, 18 },
+  /* 4822 */  { MAD_F(0x04f8e2e9) /* 0.310763272 */, 18 },
+  /* 4823 */  { MAD_F(0x04f93d04) /* 0.310849205 */, 18 },
+  /* 4824 */  { MAD_F(0x04f99721) /* 0.310935143 */, 18 },
+  /* 4825 */  { MAD_F(0x04f9f13f) /* 0.311021087 */, 18 },
+  /* 4826 */  { MAD_F(0x04fa4b5f) /* 0.311107037 */, 18 },
+  /* 4827 */  { MAD_F(0x04faa581) /* 0.311192993 */, 18 },
+  /* 4828 */  { MAD_F(0x04faffa4) /* 0.311278955 */, 18 },
+  /* 4829 */  { MAD_F(0x04fb59c9) /* 0.311364923 */, 18 },
+  /* 4830 */  { MAD_F(0x04fbb3ef) /* 0.311450897 */, 18 },
+  /* 4831 */  { MAD_F(0x04fc0e17) /* 0.311536877 */, 18 },
+
+  /* 4832 */  { MAD_F(0x04fc6841) /* 0.311622862 */, 18 },
+  /* 4833 */  { MAD_F(0x04fcc26c) /* 0.311708854 */, 18 },
+  /* 4834 */  { MAD_F(0x04fd1c99) /* 0.311794851 */, 18 },
+  /* 4835 */  { MAD_F(0x04fd76c7) /* 0.311880855 */, 18 },
+  /* 4836 */  { MAD_F(0x04fdd0f7) /* 0.311966864 */, 18 },
+  /* 4837 */  { MAD_F(0x04fe2b29) /* 0.312052880 */, 18 },
+  /* 4838 */  { MAD_F(0x04fe855c) /* 0.312138901 */, 18 },
+  /* 4839 */  { MAD_F(0x04fedf91) /* 0.312224928 */, 18 },
+  /* 4840 */  { MAD_F(0x04ff39c7) /* 0.312310961 */, 18 },
+  /* 4841 */  { MAD_F(0x04ff93ff) /* 0.312397000 */, 18 },
+  /* 4842 */  { MAD_F(0x04ffee38) /* 0.312483045 */, 18 },
+  /* 4843 */  { MAD_F(0x05004874) /* 0.312569096 */, 18 },
+  /* 4844 */  { MAD_F(0x0500a2b0) /* 0.312655153 */, 18 },
+  /* 4845 */  { MAD_F(0x0500fcef) /* 0.312741216 */, 18 },
+  /* 4846 */  { MAD_F(0x0501572e) /* 0.312827284 */, 18 },
+  /* 4847 */  { MAD_F(0x0501b170) /* 0.312913359 */, 18 },
+
+  /* 4848 */  { MAD_F(0x05020bb3) /* 0.312999439 */, 18 },
+  /* 4849 */  { MAD_F(0x050265f8) /* 0.313085526 */, 18 },
+  /* 4850 */  { MAD_F(0x0502c03e) /* 0.313171618 */, 18 },
+  /* 4851 */  { MAD_F(0x05031a86) /* 0.313257716 */, 18 },
+  /* 4852 */  { MAD_F(0x050374cf) /* 0.313343820 */, 18 },
+  /* 4853 */  { MAD_F(0x0503cf1a) /* 0.313429931 */, 18 },
+  /* 4854 */  { MAD_F(0x05042967) /* 0.313516047 */, 18 },
+  /* 4855 */  { MAD_F(0x050483b5) /* 0.313602168 */, 18 },
+  /* 4856 */  { MAD_F(0x0504de05) /* 0.313688296 */, 18 },
+  /* 4857 */  { MAD_F(0x05053856) /* 0.313774430 */, 18 },
+  /* 4858 */  { MAD_F(0x050592a9) /* 0.313860570 */, 18 },
+  /* 4859 */  { MAD_F(0x0505ecfd) /* 0.313946715 */, 18 },
+  /* 4860 */  { MAD_F(0x05064754) /* 0.314032867 */, 18 },
+  /* 4861 */  { MAD_F(0x0506a1ab) /* 0.314119024 */, 18 },
+  /* 4862 */  { MAD_F(0x0506fc04) /* 0.314205187 */, 18 },
+  /* 4863 */  { MAD_F(0x0507565f) /* 0.314291357 */, 18 },
+
+  /* 4864 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 18 },
+  /* 4865 */  { MAD_F(0x05080b1a) /* 0.314463713 */, 18 },
+  /* 4866 */  { MAD_F(0x05086579) /* 0.314549900 */, 18 },
+  /* 4867 */  { MAD_F(0x0508bfdb) /* 0.314636092 */, 18 },
+  /* 4868 */  { MAD_F(0x05091a3d) /* 0.314722291 */, 18 },
+  /* 4869 */  { MAD_F(0x050974a2) /* 0.314808496 */, 18 },
+  /* 4870 */  { MAD_F(0x0509cf08) /* 0.314894706 */, 18 },
+  /* 4871 */  { MAD_F(0x050a296f) /* 0.314980923 */, 18 },
+  /* 4872 */  { MAD_F(0x050a83d8) /* 0.315067145 */, 18 },
+  /* 4873 */  { MAD_F(0x050ade43) /* 0.315153373 */, 18 },
+  /* 4874 */  { MAD_F(0x050b38af) /* 0.315239607 */, 18 },
+  /* 4875 */  { MAD_F(0x050b931d) /* 0.315325847 */, 18 },
+  /* 4876 */  { MAD_F(0x050bed8d) /* 0.315412093 */, 18 },
+  /* 4877 */  { MAD_F(0x050c47fe) /* 0.315498345 */, 18 },
+  /* 4878 */  { MAD_F(0x050ca271) /* 0.315584603 */, 18 },
+  /* 4879 */  { MAD_F(0x050cfce5) /* 0.315670866 */, 18 },
+
+  /* 4880 */  { MAD_F(0x050d575b) /* 0.315757136 */, 18 },
+  /* 4881 */  { MAD_F(0x050db1d2) /* 0.315843411 */, 18 },
+  /* 4882 */  { MAD_F(0x050e0c4b) /* 0.315929693 */, 18 },
+  /* 4883 */  { MAD_F(0x050e66c5) /* 0.316015980 */, 18 },
+  /* 4884 */  { MAD_F(0x050ec141) /* 0.316102273 */, 18 },
+  /* 4885 */  { MAD_F(0x050f1bbf) /* 0.316188572 */, 18 },
+  /* 4886 */  { MAD_F(0x050f763e) /* 0.316274877 */, 18 },
+  /* 4887 */  { MAD_F(0x050fd0bf) /* 0.316361187 */, 18 },
+  /* 4888 */  { MAD_F(0x05102b42) /* 0.316447504 */, 18 },
+  /* 4889 */  { MAD_F(0x051085c6) /* 0.316533826 */, 18 },
+  /* 4890 */  { MAD_F(0x0510e04b) /* 0.316620155 */, 18 },
+  /* 4891 */  { MAD_F(0x05113ad3) /* 0.316706489 */, 18 },
+  /* 4892 */  { MAD_F(0x0511955b) /* 0.316792829 */, 18 },
+  /* 4893 */  { MAD_F(0x0511efe6) /* 0.316879175 */, 18 },
+  /* 4894 */  { MAD_F(0x05124a72) /* 0.316965527 */, 18 },
+  /* 4895 */  { MAD_F(0x0512a4ff) /* 0.317051885 */, 18 },
+
+  /* 4896 */  { MAD_F(0x0512ff8e) /* 0.317138249 */, 18 },
+  /* 4897 */  { MAD_F(0x05135a1f) /* 0.317224618 */, 18 },
+  /* 4898 */  { MAD_F(0x0513b4b1) /* 0.317310994 */, 18 },
+  /* 4899 */  { MAD_F(0x05140f45) /* 0.317397375 */, 18 },
+  /* 4900 */  { MAD_F(0x051469da) /* 0.317483762 */, 18 },
+  /* 4901 */  { MAD_F(0x0514c471) /* 0.317570155 */, 18 },
+  /* 4902 */  { MAD_F(0x05151f0a) /* 0.317656554 */, 18 },
+  /* 4903 */  { MAD_F(0x051579a4) /* 0.317742959 */, 18 },
+  /* 4904 */  { MAD_F(0x0515d440) /* 0.317829370 */, 18 },
+  /* 4905 */  { MAD_F(0x05162edd) /* 0.317915786 */, 18 },
+  /* 4906 */  { MAD_F(0x0516897c) /* 0.318002209 */, 18 },
+  /* 4907 */  { MAD_F(0x0516e41c) /* 0.318088637 */, 18 },
+  /* 4908 */  { MAD_F(0x05173ebe) /* 0.318175071 */, 18 },
+  /* 4909 */  { MAD_F(0x05179962) /* 0.318261511 */, 18 },
+  /* 4910 */  { MAD_F(0x0517f407) /* 0.318347957 */, 18 },
+  /* 4911 */  { MAD_F(0x05184eae) /* 0.318434409 */, 18 },
+
+  /* 4912 */  { MAD_F(0x0518a956) /* 0.318520867 */, 18 },
+  /* 4913 */  { MAD_F(0x05190400) /* 0.318607330 */, 18 },
+  /* 4914 */  { MAD_F(0x05195eab) /* 0.318693800 */, 18 },
+  /* 4915 */  { MAD_F(0x0519b958) /* 0.318780275 */, 18 },
+  /* 4916 */  { MAD_F(0x051a1407) /* 0.318866756 */, 18 },
+  /* 4917 */  { MAD_F(0x051a6eb7) /* 0.318953243 */, 18 },
+  /* 4918 */  { MAD_F(0x051ac969) /* 0.319039736 */, 18 },
+  /* 4919 */  { MAD_F(0x051b241c) /* 0.319126235 */, 18 },
+  /* 4920 */  { MAD_F(0x051b7ed1) /* 0.319212739 */, 18 },
+  /* 4921 */  { MAD_F(0x051bd987) /* 0.319299250 */, 18 },
+  /* 4922 */  { MAD_F(0x051c3440) /* 0.319385766 */, 18 },
+  /* 4923 */  { MAD_F(0x051c8ef9) /* 0.319472288 */, 18 },
+  /* 4924 */  { MAD_F(0x051ce9b4) /* 0.319558816 */, 18 },
+  /* 4925 */  { MAD_F(0x051d4471) /* 0.319645350 */, 18 },
+  /* 4926 */  { MAD_F(0x051d9f2f) /* 0.319731890 */, 18 },
+  /* 4927 */  { MAD_F(0x051df9ef) /* 0.319818435 */, 18 },
+
+  /* 4928 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 18 },
+  /* 4929 */  { MAD_F(0x051eaf74) /* 0.319991544 */, 18 },
+  /* 4930 */  { MAD_F(0x051f0a38) /* 0.320078107 */, 18 },
+  /* 4931 */  { MAD_F(0x051f64ff) /* 0.320164676 */, 18 },
+  /* 4932 */  { MAD_F(0x051fbfc6) /* 0.320251251 */, 18 },
+  /* 4933 */  { MAD_F(0x05201a90) /* 0.320337832 */, 18 },
+  /* 4934 */  { MAD_F(0x0520755b) /* 0.320424419 */, 18 },
+  /* 4935 */  { MAD_F(0x0520d027) /* 0.320511011 */, 18 },
+  /* 4936 */  { MAD_F(0x05212af5) /* 0.320597609 */, 18 },
+  /* 4937 */  { MAD_F(0x052185c5) /* 0.320684213 */, 18 },
+  /* 4938 */  { MAD_F(0x0521e096) /* 0.320770823 */, 18 },
+  /* 4939 */  { MAD_F(0x05223b69) /* 0.320857439 */, 18 },
+  /* 4940 */  { MAD_F(0x0522963d) /* 0.320944061 */, 18 },
+  /* 4941 */  { MAD_F(0x0522f113) /* 0.321030688 */, 18 },
+  /* 4942 */  { MAD_F(0x05234bea) /* 0.321117322 */, 18 },
+  /* 4943 */  { MAD_F(0x0523a6c3) /* 0.321203961 */, 18 },
+
+  /* 4944 */  { MAD_F(0x0524019e) /* 0.321290606 */, 18 },
+  /* 4945 */  { MAD_F(0x05245c7a) /* 0.321377257 */, 18 },
+  /* 4946 */  { MAD_F(0x0524b758) /* 0.321463913 */, 18 },
+  /* 4947 */  { MAD_F(0x05251237) /* 0.321550576 */, 18 },
+  /* 4948 */  { MAD_F(0x05256d18) /* 0.321637244 */, 18 },
+  /* 4949 */  { MAD_F(0x0525c7fb) /* 0.321723919 */, 18 },
+  /* 4950 */  { MAD_F(0x052622df) /* 0.321810599 */, 18 },
+  /* 4951 */  { MAD_F(0x05267dc4) /* 0.321897285 */, 18 },
+  /* 4952 */  { MAD_F(0x0526d8ab) /* 0.321983976 */, 18 },
+  /* 4953 */  { MAD_F(0x05273394) /* 0.322070674 */, 18 },
+  /* 4954 */  { MAD_F(0x05278e7e) /* 0.322157377 */, 18 },
+  /* 4955 */  { MAD_F(0x0527e96a) /* 0.322244087 */, 18 },
+  /* 4956 */  { MAD_F(0x05284457) /* 0.322330802 */, 18 },
+  /* 4957 */  { MAD_F(0x05289f46) /* 0.322417523 */, 18 },
+  /* 4958 */  { MAD_F(0x0528fa37) /* 0.322504249 */, 18 },
+  /* 4959 */  { MAD_F(0x05295529) /* 0.322590982 */, 18 },
+
+  /* 4960 */  { MAD_F(0x0529b01d) /* 0.322677720 */, 18 },
+  /* 4961 */  { MAD_F(0x052a0b12) /* 0.322764465 */, 18 },
+  /* 4962 */  { MAD_F(0x052a6609) /* 0.322851215 */, 18 },
+  /* 4963 */  { MAD_F(0x052ac101) /* 0.322937971 */, 18 },
+  /* 4964 */  { MAD_F(0x052b1bfb) /* 0.323024732 */, 18 },
+  /* 4965 */  { MAD_F(0x052b76f7) /* 0.323111500 */, 18 },
+  /* 4966 */  { MAD_F(0x052bd1f4) /* 0.323198273 */, 18 },
+  /* 4967 */  { MAD_F(0x052c2cf2) /* 0.323285052 */, 18 },
+  /* 4968 */  { MAD_F(0x052c87f2) /* 0.323371837 */, 18 },
+  /* 4969 */  { MAD_F(0x052ce2f4) /* 0.323458628 */, 18 },
+  /* 4970 */  { MAD_F(0x052d3df7) /* 0.323545425 */, 18 },
+  /* 4971 */  { MAD_F(0x052d98fc) /* 0.323632227 */, 18 },
+  /* 4972 */  { MAD_F(0x052df403) /* 0.323719036 */, 18 },
+  /* 4973 */  { MAD_F(0x052e4f0b) /* 0.323805850 */, 18 },
+  /* 4974 */  { MAD_F(0x052eaa14) /* 0.323892670 */, 18 },
+  /* 4975 */  { MAD_F(0x052f051f) /* 0.323979496 */, 18 },
+
+  /* 4976 */  { MAD_F(0x052f602c) /* 0.324066327 */, 18 },
+  /* 4977 */  { MAD_F(0x052fbb3a) /* 0.324153165 */, 18 },
+  /* 4978 */  { MAD_F(0x0530164a) /* 0.324240008 */, 18 },
+  /* 4979 */  { MAD_F(0x0530715b) /* 0.324326857 */, 18 },
+  /* 4980 */  { MAD_F(0x0530cc6e) /* 0.324413712 */, 18 },
+  /* 4981 */  { MAD_F(0x05312783) /* 0.324500572 */, 18 },
+  /* 4982 */  { MAD_F(0x05318299) /* 0.324587439 */, 18 },
+  /* 4983 */  { MAD_F(0x0531ddb0) /* 0.324674311 */, 18 },
+  /* 4984 */  { MAD_F(0x053238ca) /* 0.324761189 */, 18 },
+  /* 4985 */  { MAD_F(0x053293e4) /* 0.324848073 */, 18 },
+  /* 4986 */  { MAD_F(0x0532ef01) /* 0.324934963 */, 18 },
+  /* 4987 */  { MAD_F(0x05334a1e) /* 0.325021858 */, 18 },
+  /* 4988 */  { MAD_F(0x0533a53e) /* 0.325108760 */, 18 },
+  /* 4989 */  { MAD_F(0x0534005f) /* 0.325195667 */, 18 },
+  /* 4990 */  { MAD_F(0x05345b81) /* 0.325282580 */, 18 },
+  /* 4991 */  { MAD_F(0x0534b6a5) /* 0.325369498 */, 18 },
+
+  /* 4992 */  { MAD_F(0x053511cb) /* 0.325456423 */, 18 },
+  /* 4993 */  { MAD_F(0x05356cf2) /* 0.325543353 */, 18 },
+  /* 4994 */  { MAD_F(0x0535c81b) /* 0.325630290 */, 18 },
+  /* 4995 */  { MAD_F(0x05362345) /* 0.325717232 */, 18 },
+  /* 4996 */  { MAD_F(0x05367e71) /* 0.325804179 */, 18 },
+  /* 4997 */  { MAD_F(0x0536d99f) /* 0.325891133 */, 18 },
+  /* 4998 */  { MAD_F(0x053734ce) /* 0.325978092 */, 18 },
+  /* 4999 */  { MAD_F(0x05378ffe) /* 0.326065057 */, 18 },
+  /* 5000 */  { MAD_F(0x0537eb30) /* 0.326152028 */, 18 },
+  /* 5001 */  { MAD_F(0x05384664) /* 0.326239005 */, 18 },
+  /* 5002 */  { MAD_F(0x0538a199) /* 0.326325988 */, 18 },
+  /* 5003 */  { MAD_F(0x0538fcd0) /* 0.326412976 */, 18 },
+  /* 5004 */  { MAD_F(0x05395808) /* 0.326499970 */, 18 },
+  /* 5005 */  { MAD_F(0x0539b342) /* 0.326586970 */, 18 },
+  /* 5006 */  { MAD_F(0x053a0e7d) /* 0.326673976 */, 18 },
+  /* 5007 */  { MAD_F(0x053a69ba) /* 0.326760988 */, 18 },
+
+  /* 5008 */  { MAD_F(0x053ac4f9) /* 0.326848005 */, 18 },
+  /* 5009 */  { MAD_F(0x053b2039) /* 0.326935028 */, 18 },
+  /* 5010 */  { MAD_F(0x053b7b7b) /* 0.327022057 */, 18 },
+  /* 5011 */  { MAD_F(0x053bd6be) /* 0.327109092 */, 18 },
+  /* 5012 */  { MAD_F(0x053c3203) /* 0.327196132 */, 18 },
+  /* 5013 */  { MAD_F(0x053c8d49) /* 0.327283178 */, 18 },
+  /* 5014 */  { MAD_F(0x053ce891) /* 0.327370231 */, 18 },
+  /* 5015 */  { MAD_F(0x053d43da) /* 0.327457288 */, 18 },
+  /* 5016 */  { MAD_F(0x053d9f25) /* 0.327544352 */, 18 },
+  /* 5017 */  { MAD_F(0x053dfa72) /* 0.327631421 */, 18 },
+  /* 5018 */  { MAD_F(0x053e55c0) /* 0.327718497 */, 18 },
+  /* 5019 */  { MAD_F(0x053eb10f) /* 0.327805578 */, 18 },
+  /* 5020 */  { MAD_F(0x053f0c61) /* 0.327892665 */, 18 },
+  /* 5021 */  { MAD_F(0x053f67b3) /* 0.327979757 */, 18 },
+  /* 5022 */  { MAD_F(0x053fc308) /* 0.328066855 */, 18 },
+  /* 5023 */  { MAD_F(0x05401e5e) /* 0.328153960 */, 18 },
+
+  /* 5024 */  { MAD_F(0x054079b5) /* 0.328241070 */, 18 },
+  /* 5025 */  { MAD_F(0x0540d50e) /* 0.328328185 */, 18 },
+  /* 5026 */  { MAD_F(0x05413068) /* 0.328415307 */, 18 },
+  /* 5027 */  { MAD_F(0x05418bc4) /* 0.328502434 */, 18 },
+  /* 5028 */  { MAD_F(0x0541e722) /* 0.328589567 */, 18 },
+  /* 5029 */  { MAD_F(0x05424281) /* 0.328676706 */, 18 },
+  /* 5030 */  { MAD_F(0x05429de2) /* 0.328763850 */, 18 },
+  /* 5031 */  { MAD_F(0x0542f944) /* 0.328851001 */, 18 },
+  /* 5032 */  { MAD_F(0x054354a8) /* 0.328938157 */, 18 },
+  /* 5033 */  { MAD_F(0x0543b00d) /* 0.329025319 */, 18 },
+  /* 5034 */  { MAD_F(0x05440b74) /* 0.329112486 */, 18 },
+  /* 5035 */  { MAD_F(0x054466dd) /* 0.329199660 */, 18 },
+  /* 5036 */  { MAD_F(0x0544c247) /* 0.329286839 */, 18 },
+  /* 5037 */  { MAD_F(0x05451db2) /* 0.329374024 */, 18 },
+  /* 5038 */  { MAD_F(0x0545791f) /* 0.329461215 */, 18 },
+  /* 5039 */  { MAD_F(0x0545d48e) /* 0.329548411 */, 18 },
+
+  /* 5040 */  { MAD_F(0x05462ffe) /* 0.329635614 */, 18 },
+  /* 5041 */  { MAD_F(0x05468b70) /* 0.329722822 */, 18 },
+  /* 5042 */  { MAD_F(0x0546e6e3) /* 0.329810036 */, 18 },
+  /* 5043 */  { MAD_F(0x05474258) /* 0.329897255 */, 18 },
+  /* 5044 */  { MAD_F(0x05479dce) /* 0.329984481 */, 18 },
+  /* 5045 */  { MAD_F(0x0547f946) /* 0.330071712 */, 18 },
+  /* 5046 */  { MAD_F(0x054854c0) /* 0.330158949 */, 18 },
+  /* 5047 */  { MAD_F(0x0548b03b) /* 0.330246191 */, 18 },
+  /* 5048 */  { MAD_F(0x05490bb7) /* 0.330333440 */, 18 },
+  /* 5049 */  { MAD_F(0x05496735) /* 0.330420694 */, 18 },
+  /* 5050 */  { MAD_F(0x0549c2b5) /* 0.330507954 */, 18 },
+  /* 5051 */  { MAD_F(0x054a1e36) /* 0.330595220 */, 18 },
+  /* 5052 */  { MAD_F(0x054a79b9) /* 0.330682491 */, 18 },
+  /* 5053 */  { MAD_F(0x054ad53d) /* 0.330769768 */, 18 },
+  /* 5054 */  { MAD_F(0x054b30c3) /* 0.330857051 */, 18 },
+  /* 5055 */  { MAD_F(0x054b8c4b) /* 0.330944340 */, 18 },
+
+  /* 5056 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 18 },
+  /* 5057 */  { MAD_F(0x054c435e) /* 0.331118935 */, 18 },
+  /* 5058 */  { MAD_F(0x054c9eea) /* 0.331206241 */, 18 },
+  /* 5059 */  { MAD_F(0x054cfa78) /* 0.331293553 */, 18 },
+  /* 5060 */  { MAD_F(0x054d5607) /* 0.331380870 */, 18 },
+  /* 5061 */  { MAD_F(0x054db197) /* 0.331468193 */, 18 },
+  /* 5062 */  { MAD_F(0x054e0d2a) /* 0.331555522 */, 18 },
+  /* 5063 */  { MAD_F(0x054e68bd) /* 0.331642857 */, 18 },
+  /* 5064 */  { MAD_F(0x054ec453) /* 0.331730198 */, 18 },
+  /* 5065 */  { MAD_F(0x054f1fe9) /* 0.331817544 */, 18 },
+  /* 5066 */  { MAD_F(0x054f7b82) /* 0.331904896 */, 18 },
+  /* 5067 */  { MAD_F(0x054fd71c) /* 0.331992254 */, 18 },
+  /* 5068 */  { MAD_F(0x055032b7) /* 0.332079617 */, 18 },
+  /* 5069 */  { MAD_F(0x05508e54) /* 0.332166986 */, 18 },
+  /* 5070 */  { MAD_F(0x0550e9f3) /* 0.332254361 */, 18 },
+  /* 5071 */  { MAD_F(0x05514593) /* 0.332341742 */, 18 },
+
+  /* 5072 */  { MAD_F(0x0551a134) /* 0.332429129 */, 18 },
+  /* 5073 */  { MAD_F(0x0551fcd8) /* 0.332516521 */, 18 },
+  /* 5074 */  { MAD_F(0x0552587c) /* 0.332603919 */, 18 },
+  /* 5075 */  { MAD_F(0x0552b423) /* 0.332691323 */, 18 },
+  /* 5076 */  { MAD_F(0x05530fca) /* 0.332778732 */, 18 },
+  /* 5077 */  { MAD_F(0x05536b74) /* 0.332866147 */, 18 },
+  /* 5078 */  { MAD_F(0x0553c71f) /* 0.332953568 */, 18 },
+  /* 5079 */  { MAD_F(0x055422cb) /* 0.333040995 */, 18 },
+  /* 5080 */  { MAD_F(0x05547e79) /* 0.333128427 */, 18 },
+  /* 5081 */  { MAD_F(0x0554da29) /* 0.333215865 */, 18 },
+  /* 5082 */  { MAD_F(0x055535da) /* 0.333303309 */, 18 },
+  /* 5083 */  { MAD_F(0x0555918c) /* 0.333390759 */, 18 },
+  /* 5084 */  { MAD_F(0x0555ed40) /* 0.333478214 */, 18 },
+  /* 5085 */  { MAD_F(0x055648f6) /* 0.333565675 */, 18 },
+  /* 5086 */  { MAD_F(0x0556a4ad) /* 0.333653142 */, 18 },
+  /* 5087 */  { MAD_F(0x05570066) /* 0.333740615 */, 18 },
+
+  /* 5088 */  { MAD_F(0x05575c20) /* 0.333828093 */, 18 },
+  /* 5089 */  { MAD_F(0x0557b7dc) /* 0.333915577 */, 18 },
+  /* 5090 */  { MAD_F(0x05581399) /* 0.334003067 */, 18 },
+  /* 5091 */  { MAD_F(0x05586f58) /* 0.334090562 */, 18 },
+  /* 5092 */  { MAD_F(0x0558cb19) /* 0.334178063 */, 18 },
+  /* 5093 */  { MAD_F(0x055926db) /* 0.334265570 */, 18 },
+  /* 5094 */  { MAD_F(0x0559829e) /* 0.334353083 */, 18 },
+  /* 5095 */  { MAD_F(0x0559de63) /* 0.334440601 */, 18 },
+  /* 5096 */  { MAD_F(0x055a3a2a) /* 0.334528126 */, 18 },
+  /* 5097 */  { MAD_F(0x055a95f2) /* 0.334615655 */, 18 },
+  /* 5098 */  { MAD_F(0x055af1bb) /* 0.334703191 */, 18 },
+  /* 5099 */  { MAD_F(0x055b4d87) /* 0.334790732 */, 18 },
+  /* 5100 */  { MAD_F(0x055ba953) /* 0.334878279 */, 18 },
+  /* 5101 */  { MAD_F(0x055c0522) /* 0.334965832 */, 18 },
+  /* 5102 */  { MAD_F(0x055c60f1) /* 0.335053391 */, 18 },
+  /* 5103 */  { MAD_F(0x055cbcc3) /* 0.335140955 */, 18 },
+
+  /* 5104 */  { MAD_F(0x055d1896) /* 0.335228525 */, 18 },
+  /* 5105 */  { MAD_F(0x055d746a) /* 0.335316100 */, 18 },
+  /* 5106 */  { MAD_F(0x055dd040) /* 0.335403682 */, 18 },
+  /* 5107 */  { MAD_F(0x055e2c17) /* 0.335491269 */, 18 },
+  /* 5108 */  { MAD_F(0x055e87f0) /* 0.335578861 */, 18 },
+  /* 5109 */  { MAD_F(0x055ee3cb) /* 0.335666460 */, 18 },
+  /* 5110 */  { MAD_F(0x055f3fa7) /* 0.335754064 */, 18 },
+  /* 5111 */  { MAD_F(0x055f9b85) /* 0.335841674 */, 18 },
+  /* 5112 */  { MAD_F(0x055ff764) /* 0.335929290 */, 18 },
+  /* 5113 */  { MAD_F(0x05605344) /* 0.336016911 */, 18 },
+  /* 5114 */  { MAD_F(0x0560af27) /* 0.336104538 */, 18 },
+  /* 5115 */  { MAD_F(0x05610b0a) /* 0.336192171 */, 18 },
+  /* 5116 */  { MAD_F(0x056166f0) /* 0.336279809 */, 18 },
+  /* 5117 */  { MAD_F(0x0561c2d7) /* 0.336367453 */, 18 },
+  /* 5118 */  { MAD_F(0x05621ebf) /* 0.336455103 */, 18 },
+  /* 5119 */  { MAD_F(0x05627aa9) /* 0.336542759 */, 18 },
+
+  /* 5120 */  { MAD_F(0x0562d694) /* 0.336630420 */, 18 },
+  /* 5121 */  { MAD_F(0x05633281) /* 0.336718087 */, 18 },
+  /* 5122 */  { MAD_F(0x05638e70) /* 0.336805760 */, 18 },
+  /* 5123 */  { MAD_F(0x0563ea60) /* 0.336893439 */, 18 },
+  /* 5124 */  { MAD_F(0x05644651) /* 0.336981123 */, 18 },
+  /* 5125 */  { MAD_F(0x0564a244) /* 0.337068813 */, 18 },
+  /* 5126 */  { MAD_F(0x0564fe39) /* 0.337156508 */, 18 },
+  /* 5127 */  { MAD_F(0x05655a2f) /* 0.337244209 */, 18 },
+  /* 5128 */  { MAD_F(0x0565b627) /* 0.337331916 */, 18 },
+  /* 5129 */  { MAD_F(0x05661220) /* 0.337419629 */, 18 },
+  /* 5130 */  { MAD_F(0x05666e1a) /* 0.337507347 */, 18 },
+  /* 5131 */  { MAD_F(0x0566ca17) /* 0.337595071 */, 18 },
+  /* 5132 */  { MAD_F(0x05672614) /* 0.337682801 */, 18 },
+  /* 5133 */  { MAD_F(0x05678214) /* 0.337770537 */, 18 },
+  /* 5134 */  { MAD_F(0x0567de15) /* 0.337858278 */, 18 },
+  /* 5135 */  { MAD_F(0x05683a17) /* 0.337946025 */, 18 },
+
+  /* 5136 */  { MAD_F(0x0568961b) /* 0.338033777 */, 18 },
+  /* 5137 */  { MAD_F(0x0568f220) /* 0.338121535 */, 18 },
+  /* 5138 */  { MAD_F(0x05694e27) /* 0.338209299 */, 18 },
+  /* 5139 */  { MAD_F(0x0569aa30) /* 0.338297069 */, 18 },
+  /* 5140 */  { MAD_F(0x056a063a) /* 0.338384844 */, 18 },
+  /* 5141 */  { MAD_F(0x056a6245) /* 0.338472625 */, 18 },
+  /* 5142 */  { MAD_F(0x056abe52) /* 0.338560412 */, 18 },
+  /* 5143 */  { MAD_F(0x056b1a61) /* 0.338648204 */, 18 },
+  /* 5144 */  { MAD_F(0x056b7671) /* 0.338736002 */, 18 },
+  /* 5145 */  { MAD_F(0x056bd283) /* 0.338823806 */, 18 },
+  /* 5146 */  { MAD_F(0x056c2e96) /* 0.338911616 */, 18 },
+  /* 5147 */  { MAD_F(0x056c8aab) /* 0.338999431 */, 18 },
+  /* 5148 */  { MAD_F(0x056ce6c1) /* 0.339087252 */, 18 },
+  /* 5149 */  { MAD_F(0x056d42d9) /* 0.339175078 */, 18 },
+  /* 5150 */  { MAD_F(0x056d9ef2) /* 0.339262910 */, 18 },
+  /* 5151 */  { MAD_F(0x056dfb0d) /* 0.339350748 */, 18 },
+
+  /* 5152 */  { MAD_F(0x056e5729) /* 0.339438592 */, 18 },
+  /* 5153 */  { MAD_F(0x056eb347) /* 0.339526441 */, 18 },
+  /* 5154 */  { MAD_F(0x056f0f66) /* 0.339614296 */, 18 },
+  /* 5155 */  { MAD_F(0x056f6b87) /* 0.339702157 */, 18 },
+  /* 5156 */  { MAD_F(0x056fc7aa) /* 0.339790023 */, 18 },
+  /* 5157 */  { MAD_F(0x057023cd) /* 0.339877895 */, 18 },
+  /* 5158 */  { MAD_F(0x05707ff3) /* 0.339965773 */, 18 },
+  /* 5159 */  { MAD_F(0x0570dc1a) /* 0.340053656 */, 18 },
+  /* 5160 */  { MAD_F(0x05713843) /* 0.340141545 */, 18 },
+  /* 5161 */  { MAD_F(0x0571946d) /* 0.340229440 */, 18 },
+  /* 5162 */  { MAD_F(0x0571f098) /* 0.340317340 */, 18 },
+  /* 5163 */  { MAD_F(0x05724cc5) /* 0.340405246 */, 18 },
+  /* 5164 */  { MAD_F(0x0572a8f4) /* 0.340493158 */, 18 },
+  /* 5165 */  { MAD_F(0x05730524) /* 0.340581075 */, 18 },
+  /* 5166 */  { MAD_F(0x05736156) /* 0.340668999 */, 18 },
+  /* 5167 */  { MAD_F(0x0573bd89) /* 0.340756927 */, 18 },
+
+  /* 5168 */  { MAD_F(0x057419be) /* 0.340844862 */, 18 },
+  /* 5169 */  { MAD_F(0x057475f4) /* 0.340932802 */, 18 },
+  /* 5170 */  { MAD_F(0x0574d22c) /* 0.341020748 */, 18 },
+  /* 5171 */  { MAD_F(0x05752e65) /* 0.341108699 */, 18 },
+  /* 5172 */  { MAD_F(0x05758aa0) /* 0.341196656 */, 18 },
+  /* 5173 */  { MAD_F(0x0575e6dc) /* 0.341284619 */, 18 },
+  /* 5174 */  { MAD_F(0x0576431a) /* 0.341372587 */, 18 },
+  /* 5175 */  { MAD_F(0x05769f59) /* 0.341460562 */, 18 },
+  /* 5176 */  { MAD_F(0x0576fb9a) /* 0.341548541 */, 18 },
+  /* 5177 */  { MAD_F(0x057757dd) /* 0.341636527 */, 18 },
+  /* 5178 */  { MAD_F(0x0577b421) /* 0.341724518 */, 18 },
+  /* 5179 */  { MAD_F(0x05781066) /* 0.341812515 */, 18 },
+  /* 5180 */  { MAD_F(0x05786cad) /* 0.341900517 */, 18 },
+  /* 5181 */  { MAD_F(0x0578c8f5) /* 0.341988525 */, 18 },
+  /* 5182 */  { MAD_F(0x0579253f) /* 0.342076539 */, 18 },
+  /* 5183 */  { MAD_F(0x0579818b) /* 0.342164558 */, 18 },
+
+  /* 5184 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 18 },
+  /* 5185 */  { MAD_F(0x057a3a27) /* 0.342340614 */, 18 },
+  /* 5186 */  { MAD_F(0x057a9677) /* 0.342428651 */, 18 },
+  /* 5187 */  { MAD_F(0x057af2c8) /* 0.342516693 */, 18 },
+  /* 5188 */  { MAD_F(0x057b4f1c) /* 0.342604741 */, 18 },
+  /* 5189 */  { MAD_F(0x057bab70) /* 0.342692794 */, 18 },
+  /* 5190 */  { MAD_F(0x057c07c6) /* 0.342780853 */, 18 },
+  /* 5191 */  { MAD_F(0x057c641e) /* 0.342868918 */, 18 },
+  /* 5192 */  { MAD_F(0x057cc077) /* 0.342956988 */, 18 },
+  /* 5193 */  { MAD_F(0x057d1cd2) /* 0.343045064 */, 18 },
+  /* 5194 */  { MAD_F(0x057d792e) /* 0.343133146 */, 18 },
+  /* 5195 */  { MAD_F(0x057dd58c) /* 0.343221233 */, 18 },
+  /* 5196 */  { MAD_F(0x057e31eb) /* 0.343309326 */, 18 },
+  /* 5197 */  { MAD_F(0x057e8e4c) /* 0.343397425 */, 18 },
+  /* 5198 */  { MAD_F(0x057eeaae) /* 0.343485529 */, 18 },
+  /* 5199 */  { MAD_F(0x057f4712) /* 0.343573639 */, 18 },
+
+  /* 5200 */  { MAD_F(0x057fa378) /* 0.343661754 */, 18 },
+  /* 5201 */  { MAD_F(0x057fffde) /* 0.343749876 */, 18 },
+  /* 5202 */  { MAD_F(0x05805c47) /* 0.343838003 */, 18 },
+  /* 5203 */  { MAD_F(0x0580b8b1) /* 0.343926135 */, 18 },
+  /* 5204 */  { MAD_F(0x0581151c) /* 0.344014273 */, 18 },
+  /* 5205 */  { MAD_F(0x05817189) /* 0.344102417 */, 18 },
+  /* 5206 */  { MAD_F(0x0581cdf7) /* 0.344190566 */, 18 },
+  /* 5207 */  { MAD_F(0x05822a67) /* 0.344278722 */, 18 },
+  /* 5208 */  { MAD_F(0x058286d9) /* 0.344366882 */, 18 },
+  /* 5209 */  { MAD_F(0x0582e34c) /* 0.344455049 */, 18 },
+  /* 5210 */  { MAD_F(0x05833fc0) /* 0.344543221 */, 18 },
+  /* 5211 */  { MAD_F(0x05839c36) /* 0.344631398 */, 18 },
+  /* 5212 */  { MAD_F(0x0583f8ae) /* 0.344719582 */, 18 },
+  /* 5213 */  { MAD_F(0x05845527) /* 0.344807771 */, 18 },
+  /* 5214 */  { MAD_F(0x0584b1a1) /* 0.344895965 */, 18 },
+  /* 5215 */  { MAD_F(0x05850e1e) /* 0.344984165 */, 18 },
+
+  /* 5216 */  { MAD_F(0x05856a9b) /* 0.345072371 */, 18 },
+  /* 5217 */  { MAD_F(0x0585c71a) /* 0.345160583 */, 18 },
+  /* 5218 */  { MAD_F(0x0586239b) /* 0.345248800 */, 18 },
+  /* 5219 */  { MAD_F(0x0586801d) /* 0.345337023 */, 18 },
+  /* 5220 */  { MAD_F(0x0586dca1) /* 0.345425251 */, 18 },
+  /* 5221 */  { MAD_F(0x05873926) /* 0.345513485 */, 18 },
+  /* 5222 */  { MAD_F(0x058795ac) /* 0.345601725 */, 18 },
+  /* 5223 */  { MAD_F(0x0587f235) /* 0.345689970 */, 18 },
+  /* 5224 */  { MAD_F(0x05884ebe) /* 0.345778221 */, 18 },
+  /* 5225 */  { MAD_F(0x0588ab49) /* 0.345866478 */, 18 },
+  /* 5226 */  { MAD_F(0x058907d6) /* 0.345954740 */, 18 },
+  /* 5227 */  { MAD_F(0x05896464) /* 0.346043008 */, 18 },
+  /* 5228 */  { MAD_F(0x0589c0f4) /* 0.346131281 */, 18 },
+  /* 5229 */  { MAD_F(0x058a1d85) /* 0.346219560 */, 18 },
+  /* 5230 */  { MAD_F(0x058a7a18) /* 0.346307845 */, 18 },
+  /* 5231 */  { MAD_F(0x058ad6ac) /* 0.346396135 */, 18 },
+
+  /* 5232 */  { MAD_F(0x058b3342) /* 0.346484431 */, 18 },
+  /* 5233 */  { MAD_F(0x058b8fd9) /* 0.346572733 */, 18 },
+  /* 5234 */  { MAD_F(0x058bec72) /* 0.346661040 */, 18 },
+  /* 5235 */  { MAD_F(0x058c490c) /* 0.346749353 */, 18 },
+  /* 5236 */  { MAD_F(0x058ca5a8) /* 0.346837671 */, 18 },
+  /* 5237 */  { MAD_F(0x058d0246) /* 0.346925996 */, 18 },
+  /* 5238 */  { MAD_F(0x058d5ee4) /* 0.347014325 */, 18 },
+  /* 5239 */  { MAD_F(0x058dbb85) /* 0.347102661 */, 18 },
+  /* 5240 */  { MAD_F(0x058e1827) /* 0.347191002 */, 18 },
+  /* 5241 */  { MAD_F(0x058e74ca) /* 0.347279348 */, 18 },
+  /* 5242 */  { MAD_F(0x058ed16f) /* 0.347367700 */, 18 },
+  /* 5243 */  { MAD_F(0x058f2e15) /* 0.347456058 */, 18 },
+  /* 5244 */  { MAD_F(0x058f8abd) /* 0.347544422 */, 18 },
+  /* 5245 */  { MAD_F(0x058fe766) /* 0.347632791 */, 18 },
+  /* 5246 */  { MAD_F(0x05904411) /* 0.347721165 */, 18 },
+  /* 5247 */  { MAD_F(0x0590a0be) /* 0.347809546 */, 18 },
+
+  /* 5248 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 18 },
+  /* 5249 */  { MAD_F(0x05915a1b) /* 0.347986323 */, 18 },
+  /* 5250 */  { MAD_F(0x0591b6cc) /* 0.348074720 */, 18 },
+  /* 5251 */  { MAD_F(0x0592137e) /* 0.348163123 */, 18 },
+  /* 5252 */  { MAD_F(0x05927032) /* 0.348251531 */, 18 },
+  /* 5253 */  { MAD_F(0x0592cce8) /* 0.348339945 */, 18 },
+  /* 5254 */  { MAD_F(0x0593299f) /* 0.348428365 */, 18 },
+  /* 5255 */  { MAD_F(0x05938657) /* 0.348516790 */, 18 },
+  /* 5256 */  { MAD_F(0x0593e311) /* 0.348605221 */, 18 },
+  /* 5257 */  { MAD_F(0x05943fcd) /* 0.348693657 */, 18 },
+  /* 5258 */  { MAD_F(0x05949c8a) /* 0.348782099 */, 18 },
+  /* 5259 */  { MAD_F(0x0594f948) /* 0.348870547 */, 18 },
+  /* 5260 */  { MAD_F(0x05955608) /* 0.348959000 */, 18 },
+  /* 5261 */  { MAD_F(0x0595b2ca) /* 0.349047459 */, 18 },
+  /* 5262 */  { MAD_F(0x05960f8c) /* 0.349135923 */, 18 },
+  /* 5263 */  { MAD_F(0x05966c51) /* 0.349224393 */, 18 },
+
+  /* 5264 */  { MAD_F(0x0596c917) /* 0.349312869 */, 18 },
+  /* 5265 */  { MAD_F(0x059725de) /* 0.349401350 */, 18 },
+  /* 5266 */  { MAD_F(0x059782a7) /* 0.349489837 */, 18 },
+  /* 5267 */  { MAD_F(0x0597df72) /* 0.349578329 */, 18 },
+  /* 5268 */  { MAD_F(0x05983c3e) /* 0.349666827 */, 18 },
+  /* 5269 */  { MAD_F(0x0598990c) /* 0.349755331 */, 18 },
+  /* 5270 */  { MAD_F(0x0598f5db) /* 0.349843840 */, 18 },
+  /* 5271 */  { MAD_F(0x059952ab) /* 0.349932355 */, 18 },
+  /* 5272 */  { MAD_F(0x0599af7d) /* 0.350020876 */, 18 },
+  /* 5273 */  { MAD_F(0x059a0c51) /* 0.350109402 */, 18 },
+  /* 5274 */  { MAD_F(0x059a6926) /* 0.350197933 */, 18 },
+  /* 5275 */  { MAD_F(0x059ac5fc) /* 0.350286470 */, 18 },
+  /* 5276 */  { MAD_F(0x059b22d4) /* 0.350375013 */, 18 },
+  /* 5277 */  { MAD_F(0x059b7fae) /* 0.350463562 */, 18 },
+  /* 5278 */  { MAD_F(0x059bdc89) /* 0.350552116 */, 18 },
+  /* 5279 */  { MAD_F(0x059c3965) /* 0.350640675 */, 18 },
+
+  /* 5280 */  { MAD_F(0x059c9643) /* 0.350729240 */, 18 },
+  /* 5281 */  { MAD_F(0x059cf323) /* 0.350817811 */, 18 },
+  /* 5282 */  { MAD_F(0x059d5004) /* 0.350906388 */, 18 },
+  /* 5283 */  { MAD_F(0x059dace6) /* 0.350994970 */, 18 },
+  /* 5284 */  { MAD_F(0x059e09cb) /* 0.351083557 */, 18 },
+  /* 5285 */  { MAD_F(0x059e66b0) /* 0.351172150 */, 18 },
+  /* 5286 */  { MAD_F(0x059ec397) /* 0.351260749 */, 18 },
+  /* 5287 */  { MAD_F(0x059f2080) /* 0.351349353 */, 18 },
+  /* 5288 */  { MAD_F(0x059f7d6a) /* 0.351437963 */, 18 },
+  /* 5289 */  { MAD_F(0x059fda55) /* 0.351526579 */, 18 },
+  /* 5290 */  { MAD_F(0x05a03742) /* 0.351615200 */, 18 },
+  /* 5291 */  { MAD_F(0x05a09431) /* 0.351703827 */, 18 },
+  /* 5292 */  { MAD_F(0x05a0f121) /* 0.351792459 */, 18 },
+  /* 5293 */  { MAD_F(0x05a14e12) /* 0.351881097 */, 18 },
+  /* 5294 */  { MAD_F(0x05a1ab05) /* 0.351969740 */, 18 },
+  /* 5295 */  { MAD_F(0x05a207fa) /* 0.352058389 */, 18 },
+
+  /* 5296 */  { MAD_F(0x05a264f0) /* 0.352147044 */, 18 },
+  /* 5297 */  { MAD_F(0x05a2c1e7) /* 0.352235704 */, 18 },
+  /* 5298 */  { MAD_F(0x05a31ee1) /* 0.352324369 */, 18 },
+  /* 5299 */  { MAD_F(0x05a37bdb) /* 0.352413041 */, 18 },
+  /* 5300 */  { MAD_F(0x05a3d8d7) /* 0.352501718 */, 18 },
+  /* 5301 */  { MAD_F(0x05a435d5) /* 0.352590400 */, 18 },
+  /* 5302 */  { MAD_F(0x05a492d4) /* 0.352679088 */, 18 },
+  /* 5303 */  { MAD_F(0x05a4efd4) /* 0.352767782 */, 18 },
+  /* 5304 */  { MAD_F(0x05a54cd6) /* 0.352856481 */, 18 },
+  /* 5305 */  { MAD_F(0x05a5a9da) /* 0.352945186 */, 18 },
+  /* 5306 */  { MAD_F(0x05a606df) /* 0.353033896 */, 18 },
+  /* 5307 */  { MAD_F(0x05a663e5) /* 0.353122612 */, 18 },
+  /* 5308 */  { MAD_F(0x05a6c0ed) /* 0.353211333 */, 18 },
+  /* 5309 */  { MAD_F(0x05a71df7) /* 0.353300061 */, 18 },
+  /* 5310 */  { MAD_F(0x05a77b02) /* 0.353388793 */, 18 },
+  /* 5311 */  { MAD_F(0x05a7d80e) /* 0.353477531 */, 18 },
+
+  /* 5312 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 18 },
+  /* 5313 */  { MAD_F(0x05a8922c) /* 0.353655024 */, 18 },
+  /* 5314 */  { MAD_F(0x05a8ef3c) /* 0.353743779 */, 18 },
+  /* 5315 */  { MAD_F(0x05a94c4f) /* 0.353832540 */, 18 },
+  /* 5316 */  { MAD_F(0x05a9a963) /* 0.353921306 */, 18 },
+  /* 5317 */  { MAD_F(0x05aa0678) /* 0.354010077 */, 18 },
+  /* 5318 */  { MAD_F(0x05aa638f) /* 0.354098855 */, 18 },
+  /* 5319 */  { MAD_F(0x05aac0a8) /* 0.354187637 */, 18 },
+  /* 5320 */  { MAD_F(0x05ab1dc2) /* 0.354276426 */, 18 },
+  /* 5321 */  { MAD_F(0x05ab7add) /* 0.354365220 */, 18 },
+  /* 5322 */  { MAD_F(0x05abd7fa) /* 0.354454019 */, 18 },
+  /* 5323 */  { MAD_F(0x05ac3518) /* 0.354542824 */, 18 },
+  /* 5324 */  { MAD_F(0x05ac9238) /* 0.354631635 */, 18 },
+  /* 5325 */  { MAD_F(0x05acef5a) /* 0.354720451 */, 18 },
+  /* 5326 */  { MAD_F(0x05ad4c7d) /* 0.354809272 */, 18 },
+  /* 5327 */  { MAD_F(0x05ada9a1) /* 0.354898100 */, 18 },
+
+  /* 5328 */  { MAD_F(0x05ae06c7) /* 0.354986932 */, 18 },
+  /* 5329 */  { MAD_F(0x05ae63ee) /* 0.355075771 */, 18 },
+  /* 5330 */  { MAD_F(0x05aec117) /* 0.355164615 */, 18 },
+  /* 5331 */  { MAD_F(0x05af1e41) /* 0.355253464 */, 18 },
+  /* 5332 */  { MAD_F(0x05af7b6d) /* 0.355342319 */, 18 },
+  /* 5333 */  { MAD_F(0x05afd89b) /* 0.355431180 */, 18 },
+  /* 5334 */  { MAD_F(0x05b035c9) /* 0.355520046 */, 18 },
+  /* 5335 */  { MAD_F(0x05b092fa) /* 0.355608917 */, 18 },
+  /* 5336 */  { MAD_F(0x05b0f02b) /* 0.355697795 */, 18 },
+  /* 5337 */  { MAD_F(0x05b14d5f) /* 0.355786677 */, 18 },
+  /* 5338 */  { MAD_F(0x05b1aa94) /* 0.355875566 */, 18 },
+  /* 5339 */  { MAD_F(0x05b207ca) /* 0.355964460 */, 18 },
+  /* 5340 */  { MAD_F(0x05b26502) /* 0.356053359 */, 18 },
+  /* 5341 */  { MAD_F(0x05b2c23b) /* 0.356142264 */, 18 },
+  /* 5342 */  { MAD_F(0x05b31f76) /* 0.356231175 */, 18 },
+  /* 5343 */  { MAD_F(0x05b37cb2) /* 0.356320091 */, 18 },
+
+  /* 5344 */  { MAD_F(0x05b3d9f0) /* 0.356409012 */, 18 },
+  /* 5345 */  { MAD_F(0x05b4372f) /* 0.356497940 */, 18 },
+  /* 5346 */  { MAD_F(0x05b4946f) /* 0.356586872 */, 18 },
+  /* 5347 */  { MAD_F(0x05b4f1b2) /* 0.356675811 */, 18 },
+  /* 5348 */  { MAD_F(0x05b54ef5) /* 0.356764754 */, 18 },
+  /* 5349 */  { MAD_F(0x05b5ac3a) /* 0.356853704 */, 18 },
+  /* 5350 */  { MAD_F(0x05b60981) /* 0.356942659 */, 18 },
+  /* 5351 */  { MAD_F(0x05b666c9) /* 0.357031619 */, 18 },
+  /* 5352 */  { MAD_F(0x05b6c413) /* 0.357120585 */, 18 },
+  /* 5353 */  { MAD_F(0x05b7215e) /* 0.357209557 */, 18 },
+  /* 5354 */  { MAD_F(0x05b77eab) /* 0.357298534 */, 18 },
+  /* 5355 */  { MAD_F(0x05b7dbf9) /* 0.357387516 */, 18 },
+  /* 5356 */  { MAD_F(0x05b83948) /* 0.357476504 */, 18 },
+  /* 5357 */  { MAD_F(0x05b89699) /* 0.357565498 */, 18 },
+  /* 5358 */  { MAD_F(0x05b8f3ec) /* 0.357654497 */, 18 },
+  /* 5359 */  { MAD_F(0x05b95140) /* 0.357743502 */, 18 },
+
+  /* 5360 */  { MAD_F(0x05b9ae95) /* 0.357832512 */, 18 },
+  /* 5361 */  { MAD_F(0x05ba0bec) /* 0.357921528 */, 18 },
+  /* 5362 */  { MAD_F(0x05ba6945) /* 0.358010550 */, 18 },
+  /* 5363 */  { MAD_F(0x05bac69f) /* 0.358099576 */, 18 },
+  /* 5364 */  { MAD_F(0x05bb23fa) /* 0.358188609 */, 18 },
+  /* 5365 */  { MAD_F(0x05bb8157) /* 0.358277647 */, 18 },
+  /* 5366 */  { MAD_F(0x05bbdeb6) /* 0.358366690 */, 18 },
+  /* 5367 */  { MAD_F(0x05bc3c16) /* 0.358455739 */, 18 },
+  /* 5368 */  { MAD_F(0x05bc9977) /* 0.358544794 */, 18 },
+  /* 5369 */  { MAD_F(0x05bcf6da) /* 0.358633854 */, 18 },
+  /* 5370 */  { MAD_F(0x05bd543e) /* 0.358722920 */, 18 },
+  /* 5371 */  { MAD_F(0x05bdb1a4) /* 0.358811991 */, 18 },
+  /* 5372 */  { MAD_F(0x05be0f0b) /* 0.358901067 */, 18 },
+  /* 5373 */  { MAD_F(0x05be6c74) /* 0.358990150 */, 18 },
+  /* 5374 */  { MAD_F(0x05bec9df) /* 0.359079237 */, 18 },
+  /* 5375 */  { MAD_F(0x05bf274a) /* 0.359168331 */, 18 },
+
+  /* 5376 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 18 },
+  /* 5377 */  { MAD_F(0x05bfe226) /* 0.359346534 */, 18 },
+  /* 5378 */  { MAD_F(0x05c03f97) /* 0.359435644 */, 18 },
+  /* 5379 */  { MAD_F(0x05c09d08) /* 0.359524759 */, 18 },
+  /* 5380 */  { MAD_F(0x05c0fa7c) /* 0.359613880 */, 18 },
+  /* 5381 */  { MAD_F(0x05c157f0) /* 0.359703006 */, 18 },
+  /* 5382 */  { MAD_F(0x05c1b566) /* 0.359792138 */, 18 },
+  /* 5383 */  { MAD_F(0x05c212de) /* 0.359881276 */, 18 },
+  /* 5384 */  { MAD_F(0x05c27057) /* 0.359970419 */, 18 },
+  /* 5385 */  { MAD_F(0x05c2cdd2) /* 0.360059567 */, 18 },
+  /* 5386 */  { MAD_F(0x05c32b4e) /* 0.360148721 */, 18 },
+  /* 5387 */  { MAD_F(0x05c388cb) /* 0.360237881 */, 18 },
+  /* 5388 */  { MAD_F(0x05c3e64b) /* 0.360327046 */, 18 },
+  /* 5389 */  { MAD_F(0x05c443cb) /* 0.360416216 */, 18 },
+  /* 5390 */  { MAD_F(0x05c4a14d) /* 0.360505392 */, 18 },
+  /* 5391 */  { MAD_F(0x05c4fed1) /* 0.360594574 */, 18 },
+
+  /* 5392 */  { MAD_F(0x05c55c56) /* 0.360683761 */, 18 },
+  /* 5393 */  { MAD_F(0x05c5b9dc) /* 0.360772953 */, 18 },
+  /* 5394 */  { MAD_F(0x05c61764) /* 0.360862152 */, 18 },
+  /* 5395 */  { MAD_F(0x05c674ed) /* 0.360951355 */, 18 },
+  /* 5396 */  { MAD_F(0x05c6d278) /* 0.361040564 */, 18 },
+  /* 5397 */  { MAD_F(0x05c73005) /* 0.361129779 */, 18 },
+  /* 5398 */  { MAD_F(0x05c78d93) /* 0.361218999 */, 18 },
+  /* 5399 */  { MAD_F(0x05c7eb22) /* 0.361308225 */, 18 },
+  /* 5400 */  { MAD_F(0x05c848b3) /* 0.361397456 */, 18 },
+  /* 5401 */  { MAD_F(0x05c8a645) /* 0.361486693 */, 18 },
+  /* 5402 */  { MAD_F(0x05c903d9) /* 0.361575935 */, 18 },
+  /* 5403 */  { MAD_F(0x05c9616e) /* 0.361665183 */, 18 },
+  /* 5404 */  { MAD_F(0x05c9bf05) /* 0.361754436 */, 18 },
+  /* 5405 */  { MAD_F(0x05ca1c9d) /* 0.361843695 */, 18 },
+  /* 5406 */  { MAD_F(0x05ca7a37) /* 0.361932959 */, 18 },
+  /* 5407 */  { MAD_F(0x05cad7d2) /* 0.362022229 */, 18 },
+
+  /* 5408 */  { MAD_F(0x05cb356e) /* 0.362111504 */, 18 },
+  /* 5409 */  { MAD_F(0x05cb930d) /* 0.362200785 */, 18 },
+  /* 5410 */  { MAD_F(0x05cbf0ac) /* 0.362290071 */, 18 },
+  /* 5411 */  { MAD_F(0x05cc4e4d) /* 0.362379362 */, 18 },
+  /* 5412 */  { MAD_F(0x05ccabf0) /* 0.362468660 */, 18 },
+  /* 5413 */  { MAD_F(0x05cd0994) /* 0.362557962 */, 18 },
+  /* 5414 */  { MAD_F(0x05cd6739) /* 0.362647271 */, 18 },
+  /* 5415 */  { MAD_F(0x05cdc4e0) /* 0.362736584 */, 18 },
+  /* 5416 */  { MAD_F(0x05ce2289) /* 0.362825904 */, 18 },
+  /* 5417 */  { MAD_F(0x05ce8033) /* 0.362915228 */, 18 },
+  /* 5418 */  { MAD_F(0x05ceddde) /* 0.363004559 */, 18 },
+  /* 5419 */  { MAD_F(0x05cf3b8b) /* 0.363093894 */, 18 },
+  /* 5420 */  { MAD_F(0x05cf9939) /* 0.363183236 */, 18 },
+  /* 5421 */  { MAD_F(0x05cff6e9) /* 0.363272582 */, 18 },
+  /* 5422 */  { MAD_F(0x05d0549a) /* 0.363361935 */, 18 },
+  /* 5423 */  { MAD_F(0x05d0b24d) /* 0.363451292 */, 18 },
+
+  /* 5424 */  { MAD_F(0x05d11001) /* 0.363540655 */, 18 },
+  /* 5425 */  { MAD_F(0x05d16db7) /* 0.363630024 */, 18 },
+  /* 5426 */  { MAD_F(0x05d1cb6e) /* 0.363719398 */, 18 },
+  /* 5427 */  { MAD_F(0x05d22927) /* 0.363808778 */, 18 },
+  /* 5428 */  { MAD_F(0x05d286e1) /* 0.363898163 */, 18 },
+  /* 5429 */  { MAD_F(0x05d2e49d) /* 0.363987554 */, 18 },
+  /* 5430 */  { MAD_F(0x05d3425a) /* 0.364076950 */, 18 },
+  /* 5431 */  { MAD_F(0x05d3a018) /* 0.364166352 */, 18 },
+  /* 5432 */  { MAD_F(0x05d3fdd8) /* 0.364255759 */, 18 },
+  /* 5433 */  { MAD_F(0x05d45b9a) /* 0.364345171 */, 18 },
+  /* 5434 */  { MAD_F(0x05d4b95d) /* 0.364434589 */, 18 },
+  /* 5435 */  { MAD_F(0x05d51721) /* 0.364524013 */, 18 },
+  /* 5436 */  { MAD_F(0x05d574e7) /* 0.364613442 */, 18 },
+  /* 5437 */  { MAD_F(0x05d5d2af) /* 0.364702877 */, 18 },
+  /* 5438 */  { MAD_F(0x05d63078) /* 0.364792317 */, 18 },
+  /* 5439 */  { MAD_F(0x05d68e42) /* 0.364881762 */, 18 },
+
+  /* 5440 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 18 },
+  /* 5441 */  { MAD_F(0x05d749db) /* 0.365060669 */, 18 },
+  /* 5442 */  { MAD_F(0x05d7a7aa) /* 0.365150131 */, 18 },
+  /* 5443 */  { MAD_F(0x05d8057a) /* 0.365239599 */, 18 },
+  /* 5444 */  { MAD_F(0x05d8634c) /* 0.365329072 */, 18 },
+  /* 5445 */  { MAD_F(0x05d8c11f) /* 0.365418550 */, 18 },
+  /* 5446 */  { MAD_F(0x05d91ef4) /* 0.365508034 */, 18 },
+  /* 5447 */  { MAD_F(0x05d97cca) /* 0.365597523 */, 18 },
+  /* 5448 */  { MAD_F(0x05d9daa1) /* 0.365687018 */, 18 },
+  /* 5449 */  { MAD_F(0x05da387a) /* 0.365776518 */, 18 },
+  /* 5450 */  { MAD_F(0x05da9655) /* 0.365866024 */, 18 },
+  /* 5451 */  { MAD_F(0x05daf431) /* 0.365955536 */, 18 },
+  /* 5452 */  { MAD_F(0x05db520e) /* 0.366045052 */, 18 },
+  /* 5453 */  { MAD_F(0x05dbafed) /* 0.366134574 */, 18 },
+  /* 5454 */  { MAD_F(0x05dc0dce) /* 0.366224102 */, 18 },
+  /* 5455 */  { MAD_F(0x05dc6baf) /* 0.366313635 */, 18 },
+
+  /* 5456 */  { MAD_F(0x05dcc993) /* 0.366403174 */, 18 },
+  /* 5457 */  { MAD_F(0x05dd2778) /* 0.366492718 */, 18 },
+  /* 5458 */  { MAD_F(0x05dd855e) /* 0.366582267 */, 18 },
+  /* 5459 */  { MAD_F(0x05dde346) /* 0.366671822 */, 18 },
+  /* 5460 */  { MAD_F(0x05de412f) /* 0.366761383 */, 18 },
+  /* 5461 */  { MAD_F(0x05de9f1a) /* 0.366850949 */, 18 },
+  /* 5462 */  { MAD_F(0x05defd06) /* 0.366940520 */, 18 },
+  /* 5463 */  { MAD_F(0x05df5af3) /* 0.367030097 */, 18 },
+  /* 5464 */  { MAD_F(0x05dfb8e2) /* 0.367119680 */, 18 },
+  /* 5465 */  { MAD_F(0x05e016d3) /* 0.367209267 */, 18 },
+  /* 5466 */  { MAD_F(0x05e074c5) /* 0.367298861 */, 18 },
+  /* 5467 */  { MAD_F(0x05e0d2b8) /* 0.367388459 */, 18 },
+  /* 5468 */  { MAD_F(0x05e130ad) /* 0.367478064 */, 18 },
+  /* 5469 */  { MAD_F(0x05e18ea4) /* 0.367567673 */, 18 },
+  /* 5470 */  { MAD_F(0x05e1ec9c) /* 0.367657288 */, 18 },
+  /* 5471 */  { MAD_F(0x05e24a95) /* 0.367746909 */, 18 },
+
+  /* 5472 */  { MAD_F(0x05e2a890) /* 0.367836535 */, 18 },
+  /* 5473 */  { MAD_F(0x05e3068c) /* 0.367926167 */, 18 },
+  /* 5474 */  { MAD_F(0x05e3648a) /* 0.368015804 */, 18 },
+  /* 5475 */  { MAD_F(0x05e3c289) /* 0.368105446 */, 18 },
+  /* 5476 */  { MAD_F(0x05e4208a) /* 0.368195094 */, 18 },
+  /* 5477 */  { MAD_F(0x05e47e8c) /* 0.368284747 */, 18 },
+  /* 5478 */  { MAD_F(0x05e4dc8f) /* 0.368374406 */, 18 },
+  /* 5479 */  { MAD_F(0x05e53a94) /* 0.368464070 */, 18 },
+  /* 5480 */  { MAD_F(0x05e5989b) /* 0.368553740 */, 18 },
+  /* 5481 */  { MAD_F(0x05e5f6a3) /* 0.368643415 */, 18 },
+  /* 5482 */  { MAD_F(0x05e654ac) /* 0.368733096 */, 18 },
+  /* 5483 */  { MAD_F(0x05e6b2b7) /* 0.368822782 */, 18 },
+  /* 5484 */  { MAD_F(0x05e710c4) /* 0.368912473 */, 18 },
+  /* 5485 */  { MAD_F(0x05e76ed2) /* 0.369002170 */, 18 },
+  /* 5486 */  { MAD_F(0x05e7cce1) /* 0.369091873 */, 18 },
+  /* 5487 */  { MAD_F(0x05e82af2) /* 0.369181581 */, 18 },
+
+  /* 5488 */  { MAD_F(0x05e88904) /* 0.369271294 */, 18 },
+  /* 5489 */  { MAD_F(0x05e8e718) /* 0.369361013 */, 18 },
+  /* 5490 */  { MAD_F(0x05e9452d) /* 0.369450737 */, 18 },
+  /* 5491 */  { MAD_F(0x05e9a343) /* 0.369540467 */, 18 },
+  /* 5492 */  { MAD_F(0x05ea015c) /* 0.369630202 */, 18 },
+  /* 5493 */  { MAD_F(0x05ea5f75) /* 0.369719942 */, 18 },
+  /* 5494 */  { MAD_F(0x05eabd90) /* 0.369809688 */, 18 },
+  /* 5495 */  { MAD_F(0x05eb1bad) /* 0.369899440 */, 18 },
+  /* 5496 */  { MAD_F(0x05eb79cb) /* 0.369989197 */, 18 },
+  /* 5497 */  { MAD_F(0x05ebd7ea) /* 0.370078959 */, 18 },
+  /* 5498 */  { MAD_F(0x05ec360b) /* 0.370168727 */, 18 },
+  /* 5499 */  { MAD_F(0x05ec942d) /* 0.370258500 */, 18 },
+  /* 5500 */  { MAD_F(0x05ecf251) /* 0.370348279 */, 18 },
+  /* 5501 */  { MAD_F(0x05ed5076) /* 0.370438063 */, 18 },
+  /* 5502 */  { MAD_F(0x05edae9d) /* 0.370527853 */, 18 },
+  /* 5503 */  { MAD_F(0x05ee0cc5) /* 0.370617648 */, 18 },
+
+  /* 5504 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 18 },
+  /* 5505 */  { MAD_F(0x05eec91a) /* 0.370797254 */, 18 },
+  /* 5506 */  { MAD_F(0x05ef2746) /* 0.370887065 */, 18 },
+  /* 5507 */  { MAD_F(0x05ef8574) /* 0.370976882 */, 18 },
+  /* 5508 */  { MAD_F(0x05efe3a4) /* 0.371066704 */, 18 },
+  /* 5509 */  { MAD_F(0x05f041d5) /* 0.371156532 */, 18 },
+  /* 5510 */  { MAD_F(0x05f0a007) /* 0.371246365 */, 18 },
+  /* 5511 */  { MAD_F(0x05f0fe3b) /* 0.371336203 */, 18 },
+  /* 5512 */  { MAD_F(0x05f15c70) /* 0.371426047 */, 18 },
+  /* 5513 */  { MAD_F(0x05f1baa7) /* 0.371515897 */, 18 },
+  /* 5514 */  { MAD_F(0x05f218df) /* 0.371605751 */, 18 },
+  /* 5515 */  { MAD_F(0x05f27719) /* 0.371695612 */, 18 },
+  /* 5516 */  { MAD_F(0x05f2d554) /* 0.371785477 */, 18 },
+  /* 5517 */  { MAD_F(0x05f33390) /* 0.371875348 */, 18 },
+  /* 5518 */  { MAD_F(0x05f391cf) /* 0.371965225 */, 18 },
+  /* 5519 */  { MAD_F(0x05f3f00e) /* 0.372055107 */, 18 },
+
+  /* 5520 */  { MAD_F(0x05f44e4f) /* 0.372144994 */, 18 },
+  /* 5521 */  { MAD_F(0x05f4ac91) /* 0.372234887 */, 18 },
+  /* 5522 */  { MAD_F(0x05f50ad5) /* 0.372324785 */, 18 },
+  /* 5523 */  { MAD_F(0x05f5691b) /* 0.372414689 */, 18 },
+  /* 5524 */  { MAD_F(0x05f5c761) /* 0.372504598 */, 18 },
+  /* 5525 */  { MAD_F(0x05f625aa) /* 0.372594513 */, 18 },
+  /* 5526 */  { MAD_F(0x05f683f3) /* 0.372684433 */, 18 },
+  /* 5527 */  { MAD_F(0x05f6e23f) /* 0.372774358 */, 18 },
+  /* 5528 */  { MAD_F(0x05f7408b) /* 0.372864289 */, 18 },
+  /* 5529 */  { MAD_F(0x05f79ed9) /* 0.372954225 */, 18 },
+  /* 5530 */  { MAD_F(0x05f7fd29) /* 0.373044167 */, 18 },
+  /* 5531 */  { MAD_F(0x05f85b7a) /* 0.373134114 */, 18 },
+  /* 5532 */  { MAD_F(0x05f8b9cc) /* 0.373224066 */, 18 },
+  /* 5533 */  { MAD_F(0x05f91820) /* 0.373314024 */, 18 },
+  /* 5534 */  { MAD_F(0x05f97675) /* 0.373403987 */, 18 },
+  /* 5535 */  { MAD_F(0x05f9d4cc) /* 0.373493956 */, 18 },
+
+  /* 5536 */  { MAD_F(0x05fa3324) /* 0.373583930 */, 18 },
+  /* 5537 */  { MAD_F(0x05fa917e) /* 0.373673910 */, 18 },
+  /* 5538 */  { MAD_F(0x05faefd9) /* 0.373763895 */, 18 },
+  /* 5539 */  { MAD_F(0x05fb4e36) /* 0.373853885 */, 18 },
+  /* 5540 */  { MAD_F(0x05fbac94) /* 0.373943881 */, 18 },
+  /* 5541 */  { MAD_F(0x05fc0af3) /* 0.374033882 */, 18 },
+  /* 5542 */  { MAD_F(0x05fc6954) /* 0.374123889 */, 18 },
+  /* 5543 */  { MAD_F(0x05fcc7b7) /* 0.374213901 */, 18 },
+  /* 5544 */  { MAD_F(0x05fd261b) /* 0.374303918 */, 18 },
+  /* 5545 */  { MAD_F(0x05fd8480) /* 0.374393941 */, 18 },
+  /* 5546 */  { MAD_F(0x05fde2e7) /* 0.374483970 */, 18 },
+  /* 5547 */  { MAD_F(0x05fe414f) /* 0.374574003 */, 18 },
+  /* 5548 */  { MAD_F(0x05fe9fb9) /* 0.374664042 */, 18 },
+  /* 5549 */  { MAD_F(0x05fefe24) /* 0.374754087 */, 18 },
+  /* 5550 */  { MAD_F(0x05ff5c91) /* 0.374844137 */, 18 },
+  /* 5551 */  { MAD_F(0x05ffbaff) /* 0.374934192 */, 18 },
+
+  /* 5552 */  { MAD_F(0x0600196e) /* 0.375024253 */, 18 },
+  /* 5553 */  { MAD_F(0x060077df) /* 0.375114319 */, 18 },
+  /* 5554 */  { MAD_F(0x0600d651) /* 0.375204391 */, 18 },
+  /* 5555 */  { MAD_F(0x060134c5) /* 0.375294468 */, 18 },
+  /* 5556 */  { MAD_F(0x0601933b) /* 0.375384550 */, 18 },
+  /* 5557 */  { MAD_F(0x0601f1b1) /* 0.375474638 */, 18 },
+  /* 5558 */  { MAD_F(0x0602502a) /* 0.375564731 */, 18 },
+  /* 5559 */  { MAD_F(0x0602aea3) /* 0.375654830 */, 18 },
+  /* 5560 */  { MAD_F(0x06030d1e) /* 0.375744934 */, 18 },
+  /* 5561 */  { MAD_F(0x06036b9b) /* 0.375835043 */, 18 },
+  /* 5562 */  { MAD_F(0x0603ca19) /* 0.375925158 */, 18 },
+  /* 5563 */  { MAD_F(0x06042898) /* 0.376015278 */, 18 },
+  /* 5564 */  { MAD_F(0x06048719) /* 0.376105404 */, 18 },
+  /* 5565 */  { MAD_F(0x0604e59c) /* 0.376195535 */, 18 },
+  /* 5566 */  { MAD_F(0x0605441f) /* 0.376285671 */, 18 },
+  /* 5567 */  { MAD_F(0x0605a2a5) /* 0.376375813 */, 18 },
+
+  /* 5568 */  { MAD_F(0x0606012b) /* 0.376465960 */, 18 },
+  /* 5569 */  { MAD_F(0x06065fb4) /* 0.376556113 */, 18 },
+  /* 5570 */  { MAD_F(0x0606be3d) /* 0.376646271 */, 18 },
+  /* 5571 */  { MAD_F(0x06071cc8) /* 0.376736434 */, 18 },
+  /* 5572 */  { MAD_F(0x06077b55) /* 0.376826603 */, 18 },
+  /* 5573 */  { MAD_F(0x0607d9e3) /* 0.376916777 */, 18 },
+  /* 5574 */  { MAD_F(0x06083872) /* 0.377006957 */, 18 },
+  /* 5575 */  { MAD_F(0x06089703) /* 0.377097141 */, 18 },
+  /* 5576 */  { MAD_F(0x0608f595) /* 0.377187332 */, 18 },
+  /* 5577 */  { MAD_F(0x06095429) /* 0.377277528 */, 18 },
+  /* 5578 */  { MAD_F(0x0609b2be) /* 0.377367729 */, 18 },
+  /* 5579 */  { MAD_F(0x060a1155) /* 0.377457935 */, 18 },
+  /* 5580 */  { MAD_F(0x060a6fed) /* 0.377548147 */, 18 },
+  /* 5581 */  { MAD_F(0x060ace86) /* 0.377638364 */, 18 },
+  /* 5582 */  { MAD_F(0x060b2d21) /* 0.377728587 */, 18 },
+  /* 5583 */  { MAD_F(0x060b8bbe) /* 0.377818815 */, 18 },
+
+  /* 5584 */  { MAD_F(0x060bea5c) /* 0.377909049 */, 18 },
+  /* 5585 */  { MAD_F(0x060c48fb) /* 0.377999288 */, 18 },
+  /* 5586 */  { MAD_F(0x060ca79c) /* 0.378089532 */, 18 },
+  /* 5587 */  { MAD_F(0x060d063e) /* 0.378179781 */, 18 },
+  /* 5588 */  { MAD_F(0x060d64e1) /* 0.378270036 */, 18 },
+  /* 5589 */  { MAD_F(0x060dc387) /* 0.378360297 */, 18 },
+  /* 5590 */  { MAD_F(0x060e222d) /* 0.378450563 */, 18 },
+  /* 5591 */  { MAD_F(0x060e80d5) /* 0.378540834 */, 18 },
+  /* 5592 */  { MAD_F(0x060edf7f) /* 0.378631110 */, 18 },
+  /* 5593 */  { MAD_F(0x060f3e29) /* 0.378721392 */, 18 },
+  /* 5594 */  { MAD_F(0x060f9cd6) /* 0.378811680 */, 18 },
+  /* 5595 */  { MAD_F(0x060ffb83) /* 0.378901972 */, 18 },
+  /* 5596 */  { MAD_F(0x06105a33) /* 0.378992270 */, 18 },
+  /* 5597 */  { MAD_F(0x0610b8e3) /* 0.379082574 */, 18 },
+  /* 5598 */  { MAD_F(0x06111795) /* 0.379172883 */, 18 },
+  /* 5599 */  { MAD_F(0x06117649) /* 0.379263197 */, 18 },
+
+  /* 5600 */  { MAD_F(0x0611d4fe) /* 0.379353516 */, 18 },
+  /* 5601 */  { MAD_F(0x061233b4) /* 0.379443841 */, 18 },
+  /* 5602 */  { MAD_F(0x0612926c) /* 0.379534172 */, 18 },
+  /* 5603 */  { MAD_F(0x0612f125) /* 0.379624507 */, 18 },
+  /* 5604 */  { MAD_F(0x06134fe0) /* 0.379714848 */, 18 },
+  /* 5605 */  { MAD_F(0x0613ae9c) /* 0.379805195 */, 18 },
+  /* 5606 */  { MAD_F(0x06140d5a) /* 0.379895547 */, 18 },
+  /* 5607 */  { MAD_F(0x06146c19) /* 0.379985904 */, 18 },
+  /* 5608 */  { MAD_F(0x0614cada) /* 0.380076266 */, 18 },
+  /* 5609 */  { MAD_F(0x0615299c) /* 0.380166634 */, 18 },
+  /* 5610 */  { MAD_F(0x0615885f) /* 0.380257008 */, 18 },
+  /* 5611 */  { MAD_F(0x0615e724) /* 0.380347386 */, 18 },
+  /* 5612 */  { MAD_F(0x061645ea) /* 0.380437770 */, 18 },
+  /* 5613 */  { MAD_F(0x0616a4b2) /* 0.380528160 */, 18 },
+  /* 5614 */  { MAD_F(0x0617037b) /* 0.380618555 */, 18 },
+  /* 5615 */  { MAD_F(0x06176246) /* 0.380708955 */, 18 },
+
+  /* 5616 */  { MAD_F(0x0617c112) /* 0.380799360 */, 18 },
+  /* 5617 */  { MAD_F(0x06181fdf) /* 0.380889771 */, 18 },
+  /* 5618 */  { MAD_F(0x06187eae) /* 0.380980187 */, 18 },
+  /* 5619 */  { MAD_F(0x0618dd7e) /* 0.381070609 */, 18 },
+  /* 5620 */  { MAD_F(0x06193c50) /* 0.381161036 */, 18 },
+  /* 5621 */  { MAD_F(0x06199b24) /* 0.381251468 */, 18 },
+  /* 5622 */  { MAD_F(0x0619f9f8) /* 0.381341906 */, 18 },
+  /* 5623 */  { MAD_F(0x061a58ce) /* 0.381432349 */, 18 },
+  /* 5624 */  { MAD_F(0x061ab7a6) /* 0.381522798 */, 18 },
+  /* 5625 */  { MAD_F(0x061b167f) /* 0.381613251 */, 18 },
+  /* 5626 */  { MAD_F(0x061b7559) /* 0.381703711 */, 18 },
+  /* 5627 */  { MAD_F(0x061bd435) /* 0.381794175 */, 18 },
+  /* 5628 */  { MAD_F(0x061c3313) /* 0.381884645 */, 18 },
+  /* 5629 */  { MAD_F(0x061c91f1) /* 0.381975120 */, 18 },
+  /* 5630 */  { MAD_F(0x061cf0d2) /* 0.382065601 */, 18 },
+  /* 5631 */  { MAD_F(0x061d4fb3) /* 0.382156087 */, 18 },
+
+  /* 5632 */  { MAD_F(0x061dae96) /* 0.382246578 */, 18 },
+  /* 5633 */  { MAD_F(0x061e0d7b) /* 0.382337075 */, 18 },
+  /* 5634 */  { MAD_F(0x061e6c61) /* 0.382427577 */, 18 },
+  /* 5635 */  { MAD_F(0x061ecb48) /* 0.382518084 */, 18 },
+  /* 5636 */  { MAD_F(0x061f2a31) /* 0.382608597 */, 18 },
+  /* 5637 */  { MAD_F(0x061f891b) /* 0.382699115 */, 18 },
+  /* 5638 */  { MAD_F(0x061fe807) /* 0.382789638 */, 18 },
+  /* 5639 */  { MAD_F(0x062046f4) /* 0.382880167 */, 18 },
+  /* 5640 */  { MAD_F(0x0620a5e3) /* 0.382970701 */, 18 },
+  /* 5641 */  { MAD_F(0x062104d3) /* 0.383061241 */, 18 },
+  /* 5642 */  { MAD_F(0x062163c4) /* 0.383151786 */, 18 },
+  /* 5643 */  { MAD_F(0x0621c2b7) /* 0.383242336 */, 18 },
+  /* 5644 */  { MAD_F(0x062221ab) /* 0.383332891 */, 18 },
+  /* 5645 */  { MAD_F(0x062280a1) /* 0.383423452 */, 18 },
+  /* 5646 */  { MAD_F(0x0622df98) /* 0.383514018 */, 18 },
+  /* 5647 */  { MAD_F(0x06233e91) /* 0.383604590 */, 18 },
+
+  /* 5648 */  { MAD_F(0x06239d8b) /* 0.383695167 */, 18 },
+  /* 5649 */  { MAD_F(0x0623fc86) /* 0.383785749 */, 18 },
+  /* 5650 */  { MAD_F(0x06245b83) /* 0.383876337 */, 18 },
+  /* 5651 */  { MAD_F(0x0624ba82) /* 0.383966930 */, 18 },
+  /* 5652 */  { MAD_F(0x06251981) /* 0.384057528 */, 18 },
+  /* 5653 */  { MAD_F(0x06257883) /* 0.384148132 */, 18 },
+  /* 5654 */  { MAD_F(0x0625d785) /* 0.384238741 */, 18 },
+  /* 5655 */  { MAD_F(0x06263689) /* 0.384329355 */, 18 },
+  /* 5656 */  { MAD_F(0x0626958f) /* 0.384419975 */, 18 },
+  /* 5657 */  { MAD_F(0x0626f496) /* 0.384510600 */, 18 },
+  /* 5658 */  { MAD_F(0x0627539e) /* 0.384601230 */, 18 },
+  /* 5659 */  { MAD_F(0x0627b2a8) /* 0.384691866 */, 18 },
+  /* 5660 */  { MAD_F(0x062811b3) /* 0.384782507 */, 18 },
+  /* 5661 */  { MAD_F(0x062870c0) /* 0.384873153 */, 18 },
+  /* 5662 */  { MAD_F(0x0628cfce) /* 0.384963805 */, 18 },
+  /* 5663 */  { MAD_F(0x06292ede) /* 0.385054462 */, 18 },
+
+  /* 5664 */  { MAD_F(0x06298def) /* 0.385145124 */, 18 },
+  /* 5665 */  { MAD_F(0x0629ed01) /* 0.385235792 */, 18 },
+  /* 5666 */  { MAD_F(0x062a4c15) /* 0.385326465 */, 18 },
+  /* 5667 */  { MAD_F(0x062aab2a) /* 0.385417143 */, 18 },
+  /* 5668 */  { MAD_F(0x062b0a41) /* 0.385507827 */, 18 },
+  /* 5669 */  { MAD_F(0x062b6959) /* 0.385598516 */, 18 },
+  /* 5670 */  { MAD_F(0x062bc873) /* 0.385689211 */, 18 },
+  /* 5671 */  { MAD_F(0x062c278e) /* 0.385779910 */, 18 },
+  /* 5672 */  { MAD_F(0x062c86aa) /* 0.385870615 */, 18 },
+  /* 5673 */  { MAD_F(0x062ce5c8) /* 0.385961326 */, 18 },
+  /* 5674 */  { MAD_F(0x062d44e8) /* 0.386052041 */, 18 },
+  /* 5675 */  { MAD_F(0x062da408) /* 0.386142762 */, 18 },
+  /* 5676 */  { MAD_F(0x062e032a) /* 0.386233489 */, 18 },
+  /* 5677 */  { MAD_F(0x062e624e) /* 0.386324221 */, 18 },
+  /* 5678 */  { MAD_F(0x062ec173) /* 0.386414958 */, 18 },
+  /* 5679 */  { MAD_F(0x062f209a) /* 0.386505700 */, 18 },
+
+  /* 5680 */  { MAD_F(0x062f7fc1) /* 0.386596448 */, 18 },
+  /* 5681 */  { MAD_F(0x062fdeeb) /* 0.386687201 */, 18 },
+  /* 5682 */  { MAD_F(0x06303e16) /* 0.386777959 */, 18 },
+  /* 5683 */  { MAD_F(0x06309d42) /* 0.386868723 */, 18 },
+  /* 5684 */  { MAD_F(0x0630fc6f) /* 0.386959492 */, 18 },
+  /* 5685 */  { MAD_F(0x06315b9e) /* 0.387050266 */, 18 },
+  /* 5686 */  { MAD_F(0x0631bacf) /* 0.387141045 */, 18 },
+  /* 5687 */  { MAD_F(0x06321a01) /* 0.387231830 */, 18 },
+  /* 5688 */  { MAD_F(0x06327934) /* 0.387322621 */, 18 },
+  /* 5689 */  { MAD_F(0x0632d869) /* 0.387413416 */, 18 },
+  /* 5690 */  { MAD_F(0x0633379f) /* 0.387504217 */, 18 },
+  /* 5691 */  { MAD_F(0x063396d7) /* 0.387595023 */, 18 },
+  /* 5692 */  { MAD_F(0x0633f610) /* 0.387685835 */, 18 },
+  /* 5693 */  { MAD_F(0x0634554a) /* 0.387776652 */, 18 },
+  /* 5694 */  { MAD_F(0x0634b486) /* 0.387867474 */, 18 },
+  /* 5695 */  { MAD_F(0x063513c3) /* 0.387958301 */, 18 },
+
+  /* 5696 */  { MAD_F(0x06357302) /* 0.388049134 */, 18 },
+  /* 5697 */  { MAD_F(0x0635d242) /* 0.388139972 */, 18 },
+  /* 5698 */  { MAD_F(0x06363184) /* 0.388230816 */, 18 },
+  /* 5699 */  { MAD_F(0x063690c7) /* 0.388321665 */, 18 },
+  /* 5700 */  { MAD_F(0x0636f00b) /* 0.388412519 */, 18 },
+  /* 5701 */  { MAD_F(0x06374f51) /* 0.388503378 */, 18 },
+  /* 5702 */  { MAD_F(0x0637ae99) /* 0.388594243 */, 18 },
+  /* 5703 */  { MAD_F(0x06380de1) /* 0.388685113 */, 18 },
+  /* 5704 */  { MAD_F(0x06386d2b) /* 0.388775988 */, 18 },
+  /* 5705 */  { MAD_F(0x0638cc77) /* 0.388866869 */, 18 },
+  /* 5706 */  { MAD_F(0x06392bc4) /* 0.388957755 */, 18 },
+  /* 5707 */  { MAD_F(0x06398b12) /* 0.389048646 */, 18 },
+  /* 5708 */  { MAD_F(0x0639ea62) /* 0.389139542 */, 18 },
+  /* 5709 */  { MAD_F(0x063a49b4) /* 0.389230444 */, 18 },
+  /* 5710 */  { MAD_F(0x063aa906) /* 0.389321352 */, 18 },
+  /* 5711 */  { MAD_F(0x063b085a) /* 0.389412264 */, 18 },
+
+  /* 5712 */  { MAD_F(0x063b67b0) /* 0.389503182 */, 18 },
+  /* 5713 */  { MAD_F(0x063bc707) /* 0.389594105 */, 18 },
+  /* 5714 */  { MAD_F(0x063c265f) /* 0.389685033 */, 18 },
+  /* 5715 */  { MAD_F(0x063c85b9) /* 0.389775967 */, 18 },
+  /* 5716 */  { MAD_F(0x063ce514) /* 0.389866906 */, 18 },
+  /* 5717 */  { MAD_F(0x063d4471) /* 0.389957850 */, 18 },
+  /* 5718 */  { MAD_F(0x063da3cf) /* 0.390048800 */, 18 },
+  /* 5719 */  { MAD_F(0x063e032f) /* 0.390139755 */, 18 },
+  /* 5720 */  { MAD_F(0x063e6290) /* 0.390230715 */, 18 },
+  /* 5721 */  { MAD_F(0x063ec1f2) /* 0.390321681 */, 18 },
+  /* 5722 */  { MAD_F(0x063f2156) /* 0.390412651 */, 18 },
+  /* 5723 */  { MAD_F(0x063f80bb) /* 0.390503628 */, 18 },
+  /* 5724 */  { MAD_F(0x063fe022) /* 0.390594609 */, 18 },
+  /* 5725 */  { MAD_F(0x06403f8a) /* 0.390685596 */, 18 },
+  /* 5726 */  { MAD_F(0x06409ef3) /* 0.390776588 */, 18 },
+  /* 5727 */  { MAD_F(0x0640fe5e) /* 0.390867585 */, 18 },
+
+  /* 5728 */  { MAD_F(0x06415dcb) /* 0.390958588 */, 18 },
+  /* 5729 */  { MAD_F(0x0641bd38) /* 0.391049596 */, 18 },
+  /* 5730 */  { MAD_F(0x06421ca7) /* 0.391140609 */, 18 },
+  /* 5731 */  { MAD_F(0x06427c18) /* 0.391231627 */, 18 },
+  /* 5732 */  { MAD_F(0x0642db8a) /* 0.391322651 */, 18 },
+  /* 5733 */  { MAD_F(0x06433afd) /* 0.391413680 */, 18 },
+  /* 5734 */  { MAD_F(0x06439a72) /* 0.391504714 */, 18 },
+  /* 5735 */  { MAD_F(0x0643f9e9) /* 0.391595754 */, 18 },
+  /* 5736 */  { MAD_F(0x06445960) /* 0.391686799 */, 18 },
+  /* 5737 */  { MAD_F(0x0644b8d9) /* 0.391777849 */, 18 },
+  /* 5738 */  { MAD_F(0x06451854) /* 0.391868905 */, 18 },
+  /* 5739 */  { MAD_F(0x064577d0) /* 0.391959966 */, 18 },
+  /* 5740 */  { MAD_F(0x0645d74d) /* 0.392051032 */, 18 },
+  /* 5741 */  { MAD_F(0x064636cc) /* 0.392142103 */, 18 },
+  /* 5742 */  { MAD_F(0x0646964c) /* 0.392233180 */, 18 },
+  /* 5743 */  { MAD_F(0x0646f5ce) /* 0.392324262 */, 18 },
+
+  /* 5744 */  { MAD_F(0x06475551) /* 0.392415349 */, 18 },
+  /* 5745 */  { MAD_F(0x0647b4d5) /* 0.392506442 */, 18 },
+  /* 5746 */  { MAD_F(0x0648145b) /* 0.392597540 */, 18 },
+  /* 5747 */  { MAD_F(0x064873e3) /* 0.392688643 */, 18 },
+  /* 5748 */  { MAD_F(0x0648d36b) /* 0.392779751 */, 18 },
+  /* 5749 */  { MAD_F(0x064932f6) /* 0.392870865 */, 18 },
+  /* 5750 */  { MAD_F(0x06499281) /* 0.392961984 */, 18 },
+  /* 5751 */  { MAD_F(0x0649f20e) /* 0.393053108 */, 18 },
+  /* 5752 */  { MAD_F(0x064a519c) /* 0.393144238 */, 18 },
+  /* 5753 */  { MAD_F(0x064ab12c) /* 0.393235372 */, 18 },
+  /* 5754 */  { MAD_F(0x064b10be) /* 0.393326513 */, 18 },
+  /* 5755 */  { MAD_F(0x064b7050) /* 0.393417658 */, 18 },
+  /* 5756 */  { MAD_F(0x064bcfe4) /* 0.393508809 */, 18 },
+  /* 5757 */  { MAD_F(0x064c2f7a) /* 0.393599965 */, 18 },
+  /* 5758 */  { MAD_F(0x064c8f11) /* 0.393691126 */, 18 },
+  /* 5759 */  { MAD_F(0x064ceea9) /* 0.393782292 */, 18 },
+
+  /* 5760 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 18 },
+  /* 5761 */  { MAD_F(0x064dadde) /* 0.393964641 */, 18 },
+  /* 5762 */  { MAD_F(0x064e0d7a) /* 0.394055823 */, 18 },
+  /* 5763 */  { MAD_F(0x064e6d18) /* 0.394147011 */, 18 },
+  /* 5764 */  { MAD_F(0x064eccb8) /* 0.394238204 */, 18 },
+  /* 5765 */  { MAD_F(0x064f2c59) /* 0.394329402 */, 18 },
+  /* 5766 */  { MAD_F(0x064f8bfb) /* 0.394420605 */, 18 },
+  /* 5767 */  { MAD_F(0x064feb9e) /* 0.394511814 */, 18 },
+  /* 5768 */  { MAD_F(0x06504b44) /* 0.394603028 */, 18 },
+  /* 5769 */  { MAD_F(0x0650aaea) /* 0.394694247 */, 18 },
+  /* 5770 */  { MAD_F(0x06510a92) /* 0.394785472 */, 18 },
+  /* 5771 */  { MAD_F(0x06516a3b) /* 0.394876702 */, 18 },
+  /* 5772 */  { MAD_F(0x0651c9e6) /* 0.394967937 */, 18 },
+  /* 5773 */  { MAD_F(0x06522992) /* 0.395059177 */, 18 },
+  /* 5774 */  { MAD_F(0x06528940) /* 0.395150423 */, 18 },
+  /* 5775 */  { MAD_F(0x0652e8ef) /* 0.395241673 */, 18 },
+
+  /* 5776 */  { MAD_F(0x0653489f) /* 0.395332930 */, 18 },
+  /* 5777 */  { MAD_F(0x0653a851) /* 0.395424191 */, 18 },
+  /* 5778 */  { MAD_F(0x06540804) /* 0.395515458 */, 18 },
+  /* 5779 */  { MAD_F(0x065467b9) /* 0.395606730 */, 18 },
+  /* 5780 */  { MAD_F(0x0654c76f) /* 0.395698007 */, 18 },
+  /* 5781 */  { MAD_F(0x06552726) /* 0.395789289 */, 18 },
+  /* 5782 */  { MAD_F(0x065586df) /* 0.395880577 */, 18 },
+  /* 5783 */  { MAD_F(0x0655e699) /* 0.395971870 */, 18 },
+  /* 5784 */  { MAD_F(0x06564655) /* 0.396063168 */, 18 },
+  /* 5785 */  { MAD_F(0x0656a612) /* 0.396154472 */, 18 },
+  /* 5786 */  { MAD_F(0x065705d0) /* 0.396245780 */, 18 },
+  /* 5787 */  { MAD_F(0x06576590) /* 0.396337094 */, 18 },
+  /* 5788 */  { MAD_F(0x0657c552) /* 0.396428414 */, 18 },
+  /* 5789 */  { MAD_F(0x06582514) /* 0.396519738 */, 18 },
+  /* 5790 */  { MAD_F(0x065884d9) /* 0.396611068 */, 18 },
+  /* 5791 */  { MAD_F(0x0658e49e) /* 0.396702403 */, 18 },
+
+  /* 5792 */  { MAD_F(0x06594465) /* 0.396793743 */, 18 },
+  /* 5793 */  { MAD_F(0x0659a42e) /* 0.396885089 */, 18 },
+  /* 5794 */  { MAD_F(0x065a03f7) /* 0.396976440 */, 18 },
+  /* 5795 */  { MAD_F(0x065a63c3) /* 0.397067796 */, 18 },
+  /* 5796 */  { MAD_F(0x065ac38f) /* 0.397159157 */, 18 },
+  /* 5797 */  { MAD_F(0x065b235d) /* 0.397250524 */, 18 },
+  /* 5798 */  { MAD_F(0x065b832d) /* 0.397341896 */, 18 },
+  /* 5799 */  { MAD_F(0x065be2fe) /* 0.397433273 */, 18 },
+  /* 5800 */  { MAD_F(0x065c42d0) /* 0.397524655 */, 18 },
+  /* 5801 */  { MAD_F(0x065ca2a3) /* 0.397616043 */, 18 },
+  /* 5802 */  { MAD_F(0x065d0279) /* 0.397707436 */, 18 },
+  /* 5803 */  { MAD_F(0x065d624f) /* 0.397798834 */, 18 },
+  /* 5804 */  { MAD_F(0x065dc227) /* 0.397890237 */, 18 },
+  /* 5805 */  { MAD_F(0x065e2200) /* 0.397981646 */, 18 },
+  /* 5806 */  { MAD_F(0x065e81db) /* 0.398073059 */, 18 },
+  /* 5807 */  { MAD_F(0x065ee1b7) /* 0.398164479 */, 18 },
+
+  /* 5808 */  { MAD_F(0x065f4195) /* 0.398255903 */, 18 },
+  /* 5809 */  { MAD_F(0x065fa174) /* 0.398347333 */, 18 },
+  /* 5810 */  { MAD_F(0x06600154) /* 0.398438767 */, 18 },
+  /* 5811 */  { MAD_F(0x06606136) /* 0.398530207 */, 18 },
+  /* 5812 */  { MAD_F(0x0660c119) /* 0.398621653 */, 18 },
+  /* 5813 */  { MAD_F(0x066120fd) /* 0.398713103 */, 18 },
+  /* 5814 */  { MAD_F(0x066180e3) /* 0.398804559 */, 18 },
+  /* 5815 */  { MAD_F(0x0661e0cb) /* 0.398896020 */, 18 },
+  /* 5816 */  { MAD_F(0x066240b4) /* 0.398987487 */, 18 },
+  /* 5817 */  { MAD_F(0x0662a09e) /* 0.399078958 */, 18 },
+  /* 5818 */  { MAD_F(0x06630089) /* 0.399170435 */, 18 },
+  /* 5819 */  { MAD_F(0x06636077) /* 0.399261917 */, 18 },
+  /* 5820 */  { MAD_F(0x0663c065) /* 0.399353404 */, 18 },
+  /* 5821 */  { MAD_F(0x06642055) /* 0.399444897 */, 18 },
+  /* 5822 */  { MAD_F(0x06648046) /* 0.399536395 */, 18 },
+  /* 5823 */  { MAD_F(0x0664e039) /* 0.399627898 */, 18 },
+
+  /* 5824 */  { MAD_F(0x0665402d) /* 0.399719406 */, 18 },
+  /* 5825 */  { MAD_F(0x0665a022) /* 0.399810919 */, 18 },
+  /* 5826 */  { MAD_F(0x06660019) /* 0.399902438 */, 18 },
+  /* 5827 */  { MAD_F(0x06666011) /* 0.399993962 */, 18 },
+  /* 5828 */  { MAD_F(0x0666c00b) /* 0.400085491 */, 18 },
+  /* 5829 */  { MAD_F(0x06672006) /* 0.400177026 */, 18 },
+  /* 5830 */  { MAD_F(0x06678003) /* 0.400268565 */, 18 },
+  /* 5831 */  { MAD_F(0x0667e000) /* 0.400360110 */, 18 },
+  /* 5832 */  { MAD_F(0x06684000) /* 0.400451660 */, 18 },
+  /* 5833 */  { MAD_F(0x0668a000) /* 0.400543216 */, 18 },
+  /* 5834 */  { MAD_F(0x06690003) /* 0.400634776 */, 18 },
+  /* 5835 */  { MAD_F(0x06696006) /* 0.400726342 */, 18 },
+  /* 5836 */  { MAD_F(0x0669c00b) /* 0.400817913 */, 18 },
+  /* 5837 */  { MAD_F(0x066a2011) /* 0.400909489 */, 18 },
+  /* 5838 */  { MAD_F(0x066a8019) /* 0.401001071 */, 18 },
+  /* 5839 */  { MAD_F(0x066ae022) /* 0.401092657 */, 18 },
+
+  /* 5840 */  { MAD_F(0x066b402d) /* 0.401184249 */, 18 },
+  /* 5841 */  { MAD_F(0x066ba039) /* 0.401275847 */, 18 },
+  /* 5842 */  { MAD_F(0x066c0046) /* 0.401367449 */, 18 },
+  /* 5843 */  { MAD_F(0x066c6055) /* 0.401459057 */, 18 },
+  /* 5844 */  { MAD_F(0x066cc065) /* 0.401550670 */, 18 },
+  /* 5845 */  { MAD_F(0x066d2076) /* 0.401642288 */, 18 },
+  /* 5846 */  { MAD_F(0x066d8089) /* 0.401733911 */, 18 },
+  /* 5847 */  { MAD_F(0x066de09e) /* 0.401825540 */, 18 },
+  /* 5848 */  { MAD_F(0x066e40b3) /* 0.401917173 */, 18 },
+  /* 5849 */  { MAD_F(0x066ea0cb) /* 0.402008812 */, 18 },
+  /* 5850 */  { MAD_F(0x066f00e3) /* 0.402100457 */, 18 },
+  /* 5851 */  { MAD_F(0x066f60fd) /* 0.402192106 */, 18 },
+  /* 5852 */  { MAD_F(0x066fc118) /* 0.402283761 */, 18 },
+  /* 5853 */  { MAD_F(0x06702135) /* 0.402375420 */, 18 },
+  /* 5854 */  { MAD_F(0x06708153) /* 0.402467086 */, 18 },
+  /* 5855 */  { MAD_F(0x0670e173) /* 0.402558756 */, 18 },
+
+  /* 5856 */  { MAD_F(0x06714194) /* 0.402650431 */, 18 },
+  /* 5857 */  { MAD_F(0x0671a1b6) /* 0.402742112 */, 18 },
+  /* 5858 */  { MAD_F(0x067201da) /* 0.402833798 */, 18 },
+  /* 5859 */  { MAD_F(0x067261ff) /* 0.402925489 */, 18 },
+  /* 5860 */  { MAD_F(0x0672c226) /* 0.403017186 */, 18 },
+  /* 5861 */  { MAD_F(0x0673224e) /* 0.403108887 */, 18 },
+  /* 5862 */  { MAD_F(0x06738277) /* 0.403200594 */, 18 },
+  /* 5863 */  { MAD_F(0x0673e2a2) /* 0.403292306 */, 18 },
+  /* 5864 */  { MAD_F(0x067442ce) /* 0.403384024 */, 18 },
+  /* 5865 */  { MAD_F(0x0674a2fc) /* 0.403475746 */, 18 },
+  /* 5866 */  { MAD_F(0x0675032b) /* 0.403567474 */, 18 },
+  /* 5867 */  { MAD_F(0x0675635b) /* 0.403659207 */, 18 },
+  /* 5868 */  { MAD_F(0x0675c38d) /* 0.403750945 */, 18 },
+  /* 5869 */  { MAD_F(0x067623c0) /* 0.403842688 */, 18 },
+  /* 5870 */  { MAD_F(0x067683f4) /* 0.403934437 */, 18 },
+  /* 5871 */  { MAD_F(0x0676e42a) /* 0.404026190 */, 18 },
+
+  /* 5872 */  { MAD_F(0x06774462) /* 0.404117949 */, 18 },
+  /* 5873 */  { MAD_F(0x0677a49b) /* 0.404209714 */, 18 },
+  /* 5874 */  { MAD_F(0x067804d5) /* 0.404301483 */, 18 },
+  /* 5875 */  { MAD_F(0x06786510) /* 0.404393258 */, 18 },
+  /* 5876 */  { MAD_F(0x0678c54d) /* 0.404485037 */, 18 },
+  /* 5877 */  { MAD_F(0x0679258c) /* 0.404576822 */, 18 },
+  /* 5878 */  { MAD_F(0x067985cb) /* 0.404668613 */, 18 },
+  /* 5879 */  { MAD_F(0x0679e60c) /* 0.404760408 */, 18 },
+  /* 5880 */  { MAD_F(0x067a464f) /* 0.404852209 */, 18 },
+  /* 5881 */  { MAD_F(0x067aa693) /* 0.404944014 */, 18 },
+  /* 5882 */  { MAD_F(0x067b06d8) /* 0.405035825 */, 18 },
+  /* 5883 */  { MAD_F(0x067b671f) /* 0.405127642 */, 18 },
+  /* 5884 */  { MAD_F(0x067bc767) /* 0.405219463 */, 18 },
+  /* 5885 */  { MAD_F(0x067c27b1) /* 0.405311290 */, 18 },
+  /* 5886 */  { MAD_F(0x067c87fc) /* 0.405403122 */, 18 },
+  /* 5887 */  { MAD_F(0x067ce848) /* 0.405494959 */, 18 },
+
+  /* 5888 */  { MAD_F(0x067d4896) /* 0.405586801 */, 18 },
+  /* 5889 */  { MAD_F(0x067da8e5) /* 0.405678648 */, 18 },
+  /* 5890 */  { MAD_F(0x067e0935) /* 0.405770501 */, 18 },
+  /* 5891 */  { MAD_F(0x067e6987) /* 0.405862359 */, 18 },
+  /* 5892 */  { MAD_F(0x067ec9da) /* 0.405954222 */, 18 },
+  /* 5893 */  { MAD_F(0x067f2a2f) /* 0.406046090 */, 18 },
+  /* 5894 */  { MAD_F(0x067f8a85) /* 0.406137963 */, 18 },
+  /* 5895 */  { MAD_F(0x067feadd) /* 0.406229842 */, 18 },
+  /* 5896 */  { MAD_F(0x06804b36) /* 0.406321726 */, 18 },
+  /* 5897 */  { MAD_F(0x0680ab90) /* 0.406413615 */, 18 },
+  /* 5898 */  { MAD_F(0x06810beb) /* 0.406505509 */, 18 },
+  /* 5899 */  { MAD_F(0x06816c49) /* 0.406597408 */, 18 },
+  /* 5900 */  { MAD_F(0x0681cca7) /* 0.406689313 */, 18 },
+  /* 5901 */  { MAD_F(0x06822d07) /* 0.406781223 */, 18 },
+  /* 5902 */  { MAD_F(0x06828d68) /* 0.406873138 */, 18 },
+  /* 5903 */  { MAD_F(0x0682edcb) /* 0.406965058 */, 18 },
+
+  /* 5904 */  { MAD_F(0x06834e2f) /* 0.407056983 */, 18 },
+  /* 5905 */  { MAD_F(0x0683ae94) /* 0.407148914 */, 18 },
+  /* 5906 */  { MAD_F(0x06840efb) /* 0.407240850 */, 18 },
+  /* 5907 */  { MAD_F(0x06846f63) /* 0.407332791 */, 18 },
+  /* 5908 */  { MAD_F(0x0684cfcd) /* 0.407424737 */, 18 },
+  /* 5909 */  { MAD_F(0x06853038) /* 0.407516688 */, 18 },
+  /* 5910 */  { MAD_F(0x068590a4) /* 0.407608645 */, 18 },
+  /* 5911 */  { MAD_F(0x0685f112) /* 0.407700606 */, 18 },
+  /* 5912 */  { MAD_F(0x06865181) /* 0.407792573 */, 18 },
+  /* 5913 */  { MAD_F(0x0686b1f2) /* 0.407884545 */, 18 },
+  /* 5914 */  { MAD_F(0x06871264) /* 0.407976522 */, 18 },
+  /* 5915 */  { MAD_F(0x068772d7) /* 0.408068505 */, 18 },
+  /* 5916 */  { MAD_F(0x0687d34c) /* 0.408160492 */, 18 },
+  /* 5917 */  { MAD_F(0x068833c2) /* 0.408252485 */, 18 },
+  /* 5918 */  { MAD_F(0x06889439) /* 0.408344483 */, 18 },
+  /* 5919 */  { MAD_F(0x0688f4b2) /* 0.408436486 */, 18 },
+
+  /* 5920 */  { MAD_F(0x0689552c) /* 0.408528495 */, 18 },
+  /* 5921 */  { MAD_F(0x0689b5a8) /* 0.408620508 */, 18 },
+  /* 5922 */  { MAD_F(0x068a1625) /* 0.408712527 */, 18 },
+  /* 5923 */  { MAD_F(0x068a76a4) /* 0.408804551 */, 18 },
+  /* 5924 */  { MAD_F(0x068ad724) /* 0.408896580 */, 18 },
+  /* 5925 */  { MAD_F(0x068b37a5) /* 0.408988614 */, 18 },
+  /* 5926 */  { MAD_F(0x068b9827) /* 0.409080653 */, 18 },
+  /* 5927 */  { MAD_F(0x068bf8ac) /* 0.409172698 */, 18 },
+  /* 5928 */  { MAD_F(0x068c5931) /* 0.409264748 */, 18 },
+  /* 5929 */  { MAD_F(0x068cb9b8) /* 0.409356803 */, 18 },
+  /* 5930 */  { MAD_F(0x068d1a40) /* 0.409448863 */, 18 },
+  /* 5931 */  { MAD_F(0x068d7aca) /* 0.409540928 */, 18 },
+  /* 5932 */  { MAD_F(0x068ddb54) /* 0.409632999 */, 18 },
+  /* 5933 */  { MAD_F(0x068e3be1) /* 0.409725074 */, 18 },
+  /* 5934 */  { MAD_F(0x068e9c6f) /* 0.409817155 */, 18 },
+  /* 5935 */  { MAD_F(0x068efcfe) /* 0.409909241 */, 18 },
+
+  /* 5936 */  { MAD_F(0x068f5d8e) /* 0.410001332 */, 18 },
+  /* 5937 */  { MAD_F(0x068fbe20) /* 0.410093428 */, 18 },
+  /* 5938 */  { MAD_F(0x06901eb4) /* 0.410185530 */, 18 },
+  /* 5939 */  { MAD_F(0x06907f48) /* 0.410277637 */, 18 },
+  /* 5940 */  { MAD_F(0x0690dfde) /* 0.410369748 */, 18 },
+  /* 5941 */  { MAD_F(0x06914076) /* 0.410461865 */, 18 },
+  /* 5942 */  { MAD_F(0x0691a10f) /* 0.410553988 */, 18 },
+  /* 5943 */  { MAD_F(0x069201a9) /* 0.410646115 */, 18 },
+  /* 5944 */  { MAD_F(0x06926245) /* 0.410738247 */, 18 },
+  /* 5945 */  { MAD_F(0x0692c2e2) /* 0.410830385 */, 18 },
+  /* 5946 */  { MAD_F(0x06932380) /* 0.410922528 */, 18 },
+  /* 5947 */  { MAD_F(0x06938420) /* 0.411014676 */, 18 },
+  /* 5948 */  { MAD_F(0x0693e4c1) /* 0.411106829 */, 18 },
+  /* 5949 */  { MAD_F(0x06944563) /* 0.411198987 */, 18 },
+  /* 5950 */  { MAD_F(0x0694a607) /* 0.411291151 */, 18 },
+  /* 5951 */  { MAD_F(0x069506ad) /* 0.411383320 */, 18 },
+
+  /* 5952 */  { MAD_F(0x06956753) /* 0.411475493 */, 18 },
+  /* 5953 */  { MAD_F(0x0695c7fc) /* 0.411567672 */, 18 },
+  /* 5954 */  { MAD_F(0x069628a5) /* 0.411659857 */, 18 },
+  /* 5955 */  { MAD_F(0x06968950) /* 0.411752046 */, 18 },
+  /* 5956 */  { MAD_F(0x0696e9fc) /* 0.411844240 */, 18 },
+  /* 5957 */  { MAD_F(0x06974aaa) /* 0.411936440 */, 18 },
+  /* 5958 */  { MAD_F(0x0697ab59) /* 0.412028645 */, 18 },
+  /* 5959 */  { MAD_F(0x06980c09) /* 0.412120855 */, 18 },
+  /* 5960 */  { MAD_F(0x06986cbb) /* 0.412213070 */, 18 },
+  /* 5961 */  { MAD_F(0x0698cd6e) /* 0.412305290 */, 18 },
+  /* 5962 */  { MAD_F(0x06992e23) /* 0.412397516 */, 18 },
+  /* 5963 */  { MAD_F(0x06998ed9) /* 0.412489746 */, 18 },
+  /* 5964 */  { MAD_F(0x0699ef90) /* 0.412581982 */, 18 },
+  /* 5965 */  { MAD_F(0x069a5049) /* 0.412674223 */, 18 },
+  /* 5966 */  { MAD_F(0x069ab103) /* 0.412766469 */, 18 },
+  /* 5967 */  { MAD_F(0x069b11bf) /* 0.412858720 */, 18 },
+
+  /* 5968 */  { MAD_F(0x069b727b) /* 0.412950976 */, 18 },
+  /* 5969 */  { MAD_F(0x069bd33a) /* 0.413043238 */, 18 },
+  /* 5970 */  { MAD_F(0x069c33f9) /* 0.413135505 */, 18 },
+  /* 5971 */  { MAD_F(0x069c94ba) /* 0.413227776 */, 18 },
+  /* 5972 */  { MAD_F(0x069cf57d) /* 0.413320053 */, 18 },
+  /* 5973 */  { MAD_F(0x069d5641) /* 0.413412335 */, 18 },
+  /* 5974 */  { MAD_F(0x069db706) /* 0.413504623 */, 18 },
+  /* 5975 */  { MAD_F(0x069e17cc) /* 0.413596915 */, 18 },
+  /* 5976 */  { MAD_F(0x069e7894) /* 0.413689213 */, 18 },
+  /* 5977 */  { MAD_F(0x069ed95e) /* 0.413781515 */, 18 },
+  /* 5978 */  { MAD_F(0x069f3a28) /* 0.413873823 */, 18 },
+  /* 5979 */  { MAD_F(0x069f9af4) /* 0.413966136 */, 18 },
+  /* 5980 */  { MAD_F(0x069ffbc2) /* 0.414058454 */, 18 },
+  /* 5981 */  { MAD_F(0x06a05c91) /* 0.414150778 */, 18 },
+  /* 5982 */  { MAD_F(0x06a0bd61) /* 0.414243106 */, 18 },
+  /* 5983 */  { MAD_F(0x06a11e32) /* 0.414335440 */, 18 },
+
+  /* 5984 */  { MAD_F(0x06a17f05) /* 0.414427779 */, 18 },
+  /* 5985 */  { MAD_F(0x06a1dfda) /* 0.414520122 */, 18 },
+  /* 5986 */  { MAD_F(0x06a240b0) /* 0.414612471 */, 18 },
+  /* 5987 */  { MAD_F(0x06a2a187) /* 0.414704826 */, 18 },
+  /* 5988 */  { MAD_F(0x06a3025f) /* 0.414797185 */, 18 },
+  /* 5989 */  { MAD_F(0x06a36339) /* 0.414889549 */, 18 },
+  /* 5990 */  { MAD_F(0x06a3c414) /* 0.414981919 */, 18 },
+  /* 5991 */  { MAD_F(0x06a424f1) /* 0.415074294 */, 18 },
+  /* 5992 */  { MAD_F(0x06a485cf) /* 0.415166674 */, 18 },
+  /* 5993 */  { MAD_F(0x06a4e6ae) /* 0.415259059 */, 18 },
+  /* 5994 */  { MAD_F(0x06a5478f) /* 0.415351449 */, 18 },
+  /* 5995 */  { MAD_F(0x06a5a871) /* 0.415443844 */, 18 },
+  /* 5996 */  { MAD_F(0x06a60955) /* 0.415536244 */, 18 },
+  /* 5997 */  { MAD_F(0x06a66a3a) /* 0.415628650 */, 18 },
+  /* 5998 */  { MAD_F(0x06a6cb20) /* 0.415721061 */, 18 },
+  /* 5999 */  { MAD_F(0x06a72c08) /* 0.415813476 */, 18 },
+
+  /* 6000 */  { MAD_F(0x06a78cf1) /* 0.415905897 */, 18 },
+  /* 6001 */  { MAD_F(0x06a7eddb) /* 0.415998324 */, 18 },
+  /* 6002 */  { MAD_F(0x06a84ec7) /* 0.416090755 */, 18 },
+  /* 6003 */  { MAD_F(0x06a8afb4) /* 0.416183191 */, 18 },
+  /* 6004 */  { MAD_F(0x06a910a3) /* 0.416275633 */, 18 },
+  /* 6005 */  { MAD_F(0x06a97193) /* 0.416368079 */, 18 },
+  /* 6006 */  { MAD_F(0x06a9d284) /* 0.416460531 */, 18 },
+  /* 6007 */  { MAD_F(0x06aa3377) /* 0.416552988 */, 18 },
+  /* 6008 */  { MAD_F(0x06aa946b) /* 0.416645450 */, 18 },
+  /* 6009 */  { MAD_F(0x06aaf561) /* 0.416737917 */, 18 },
+  /* 6010 */  { MAD_F(0x06ab5657) /* 0.416830389 */, 18 },
+  /* 6011 */  { MAD_F(0x06abb750) /* 0.416922867 */, 18 },
+  /* 6012 */  { MAD_F(0x06ac1849) /* 0.417015349 */, 18 },
+  /* 6013 */  { MAD_F(0x06ac7944) /* 0.417107837 */, 18 },
+  /* 6014 */  { MAD_F(0x06acda41) /* 0.417200330 */, 18 },
+  /* 6015 */  { MAD_F(0x06ad3b3e) /* 0.417292828 */, 18 },
+
+  /* 6016 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 18 },
+  /* 6017 */  { MAD_F(0x06adfd3e) /* 0.417477839 */, 18 },
+  /* 6018 */  { MAD_F(0x06ae5e40) /* 0.417570352 */, 18 },
+  /* 6019 */  { MAD_F(0x06aebf43) /* 0.417662871 */, 18 },
+  /* 6020 */  { MAD_F(0x06af2047) /* 0.417755394 */, 18 },
+  /* 6021 */  { MAD_F(0x06af814d) /* 0.417847923 */, 18 },
+  /* 6022 */  { MAD_F(0x06afe255) /* 0.417940457 */, 18 },
+  /* 6023 */  { MAD_F(0x06b0435e) /* 0.418032996 */, 18 },
+  /* 6024 */  { MAD_F(0x06b0a468) /* 0.418125540 */, 18 },
+  /* 6025 */  { MAD_F(0x06b10573) /* 0.418218089 */, 18 },
+  /* 6026 */  { MAD_F(0x06b16680) /* 0.418310643 */, 18 },
+  /* 6027 */  { MAD_F(0x06b1c78e) /* 0.418403203 */, 18 },
+  /* 6028 */  { MAD_F(0x06b2289e) /* 0.418495767 */, 18 },
+  /* 6029 */  { MAD_F(0x06b289af) /* 0.418588337 */, 18 },
+  /* 6030 */  { MAD_F(0x06b2eac1) /* 0.418680911 */, 18 },
+  /* 6031 */  { MAD_F(0x06b34bd5) /* 0.418773491 */, 18 },
+
+  /* 6032 */  { MAD_F(0x06b3acea) /* 0.418866076 */, 18 },
+  /* 6033 */  { MAD_F(0x06b40e00) /* 0.418958666 */, 18 },
+  /* 6034 */  { MAD_F(0x06b46f18) /* 0.419051262 */, 18 },
+  /* 6035 */  { MAD_F(0x06b4d031) /* 0.419143862 */, 18 },
+  /* 6036 */  { MAD_F(0x06b5314c) /* 0.419236467 */, 18 },
+  /* 6037 */  { MAD_F(0x06b59268) /* 0.419329078 */, 18 },
+  /* 6038 */  { MAD_F(0x06b5f385) /* 0.419421694 */, 18 },
+  /* 6039 */  { MAD_F(0x06b654a4) /* 0.419514314 */, 18 },
+  /* 6040 */  { MAD_F(0x06b6b5c4) /* 0.419606940 */, 18 },
+  /* 6041 */  { MAD_F(0x06b716e6) /* 0.419699571 */, 18 },
+  /* 6042 */  { MAD_F(0x06b77808) /* 0.419792208 */, 18 },
+  /* 6043 */  { MAD_F(0x06b7d92d) /* 0.419884849 */, 18 },
+  /* 6044 */  { MAD_F(0x06b83a52) /* 0.419977495 */, 18 },
+  /* 6045 */  { MAD_F(0x06b89b79) /* 0.420070147 */, 18 },
+  /* 6046 */  { MAD_F(0x06b8fca1) /* 0.420162803 */, 18 },
+  /* 6047 */  { MAD_F(0x06b95dcb) /* 0.420255465 */, 18 },
+
+  /* 6048 */  { MAD_F(0x06b9bef6) /* 0.420348132 */, 18 },
+  /* 6049 */  { MAD_F(0x06ba2023) /* 0.420440803 */, 18 },
+  /* 6050 */  { MAD_F(0x06ba8150) /* 0.420533481 */, 18 },
+  /* 6051 */  { MAD_F(0x06bae280) /* 0.420626163 */, 18 },
+  /* 6052 */  { MAD_F(0x06bb43b0) /* 0.420718850 */, 18 },
+  /* 6053 */  { MAD_F(0x06bba4e2) /* 0.420811542 */, 18 },
+  /* 6054 */  { MAD_F(0x06bc0615) /* 0.420904240 */, 18 },
+  /* 6055 */  { MAD_F(0x06bc674a) /* 0.420996942 */, 18 },
+  /* 6056 */  { MAD_F(0x06bcc880) /* 0.421089650 */, 18 },
+  /* 6057 */  { MAD_F(0x06bd29b7) /* 0.421182362 */, 18 },
+  /* 6058 */  { MAD_F(0x06bd8af0) /* 0.421275080 */, 18 },
+  /* 6059 */  { MAD_F(0x06bdec2a) /* 0.421367803 */, 18 },
+  /* 6060 */  { MAD_F(0x06be4d66) /* 0.421460531 */, 18 },
+  /* 6061 */  { MAD_F(0x06beaea3) /* 0.421553264 */, 18 },
+  /* 6062 */  { MAD_F(0x06bf0fe1) /* 0.421646003 */, 18 },
+  /* 6063 */  { MAD_F(0x06bf7120) /* 0.421738746 */, 18 },
+
+  /* 6064 */  { MAD_F(0x06bfd261) /* 0.421831494 */, 18 },
+  /* 6065 */  { MAD_F(0x06c033a4) /* 0.421924248 */, 18 },
+  /* 6066 */  { MAD_F(0x06c094e7) /* 0.422017007 */, 18 },
+  /* 6067 */  { MAD_F(0x06c0f62c) /* 0.422109770 */, 18 },
+  /* 6068 */  { MAD_F(0x06c15773) /* 0.422202539 */, 18 },
+  /* 6069 */  { MAD_F(0x06c1b8bb) /* 0.422295313 */, 18 },
+  /* 6070 */  { MAD_F(0x06c21a04) /* 0.422388092 */, 18 },
+  /* 6071 */  { MAD_F(0x06c27b4e) /* 0.422480876 */, 18 },
+  /* 6072 */  { MAD_F(0x06c2dc9a) /* 0.422573665 */, 18 },
+  /* 6073 */  { MAD_F(0x06c33de8) /* 0.422666460 */, 18 },
+  /* 6074 */  { MAD_F(0x06c39f36) /* 0.422759259 */, 18 },
+  /* 6075 */  { MAD_F(0x06c40086) /* 0.422852064 */, 18 },
+  /* 6076 */  { MAD_F(0x06c461d8) /* 0.422944873 */, 18 },
+  /* 6077 */  { MAD_F(0x06c4c32a) /* 0.423037688 */, 18 },
+  /* 6078 */  { MAD_F(0x06c5247f) /* 0.423130508 */, 18 },
+  /* 6079 */  { MAD_F(0x06c585d4) /* 0.423223333 */, 18 },
+
+  /* 6080 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 18 },
+  /* 6081 */  { MAD_F(0x06c64883) /* 0.423408997 */, 18 },
+  /* 6082 */  { MAD_F(0x06c6a9dd) /* 0.423501838 */, 18 },
+  /* 6083 */  { MAD_F(0x06c70b38) /* 0.423594683 */, 18 },
+  /* 6084 */  { MAD_F(0x06c76c94) /* 0.423687533 */, 18 },
+  /* 6085 */  { MAD_F(0x06c7cdf2) /* 0.423780389 */, 18 },
+  /* 6086 */  { MAD_F(0x06c82f51) /* 0.423873249 */, 18 },
+  /* 6087 */  { MAD_F(0x06c890b1) /* 0.423966115 */, 18 },
+  /* 6088 */  { MAD_F(0x06c8f213) /* 0.424058985 */, 18 },
+  /* 6089 */  { MAD_F(0x06c95376) /* 0.424151861 */, 18 },
+  /* 6090 */  { MAD_F(0x06c9b4da) /* 0.424244742 */, 18 },
+  /* 6091 */  { MAD_F(0x06ca1640) /* 0.424337628 */, 18 },
+  /* 6092 */  { MAD_F(0x06ca77a8) /* 0.424430519 */, 18 },
+  /* 6093 */  { MAD_F(0x06cad910) /* 0.424523415 */, 18 },
+  /* 6094 */  { MAD_F(0x06cb3a7a) /* 0.424616316 */, 18 },
+  /* 6095 */  { MAD_F(0x06cb9be5) /* 0.424709222 */, 18 },
+
+  /* 6096 */  { MAD_F(0x06cbfd52) /* 0.424802133 */, 18 },
+  /* 6097 */  { MAD_F(0x06cc5ec0) /* 0.424895050 */, 18 },
+  /* 6098 */  { MAD_F(0x06ccc030) /* 0.424987971 */, 18 },
+  /* 6099 */  { MAD_F(0x06cd21a0) /* 0.425080898 */, 18 },
+  /* 6100 */  { MAD_F(0x06cd8313) /* 0.425173829 */, 18 },
+  /* 6101 */  { MAD_F(0x06cde486) /* 0.425266766 */, 18 },
+  /* 6102 */  { MAD_F(0x06ce45fb) /* 0.425359708 */, 18 },
+  /* 6103 */  { MAD_F(0x06cea771) /* 0.425452655 */, 18 },
+  /* 6104 */  { MAD_F(0x06cf08e9) /* 0.425545607 */, 18 },
+  /* 6105 */  { MAD_F(0x06cf6a62) /* 0.425638564 */, 18 },
+  /* 6106 */  { MAD_F(0x06cfcbdc) /* 0.425731526 */, 18 },
+  /* 6107 */  { MAD_F(0x06d02d58) /* 0.425824493 */, 18 },
+  /* 6108 */  { MAD_F(0x06d08ed5) /* 0.425917465 */, 18 },
+  /* 6109 */  { MAD_F(0x06d0f053) /* 0.426010443 */, 18 },
+  /* 6110 */  { MAD_F(0x06d151d3) /* 0.426103425 */, 18 },
+  /* 6111 */  { MAD_F(0x06d1b354) /* 0.426196412 */, 18 },
+
+  /* 6112 */  { MAD_F(0x06d214d7) /* 0.426289405 */, 18 },
+  /* 6113 */  { MAD_F(0x06d2765a) /* 0.426382403 */, 18 },
+  /* 6114 */  { MAD_F(0x06d2d7e0) /* 0.426475405 */, 18 },
+  /* 6115 */  { MAD_F(0x06d33966) /* 0.426568413 */, 18 },
+  /* 6116 */  { MAD_F(0x06d39aee) /* 0.426661426 */, 18 },
+  /* 6117 */  { MAD_F(0x06d3fc77) /* 0.426754444 */, 18 },
+  /* 6118 */  { MAD_F(0x06d45e02) /* 0.426847467 */, 18 },
+  /* 6119 */  { MAD_F(0x06d4bf8e) /* 0.426940495 */, 18 },
+  /* 6120 */  { MAD_F(0x06d5211c) /* 0.427033528 */, 18 },
+  /* 6121 */  { MAD_F(0x06d582aa) /* 0.427126566 */, 18 },
+  /* 6122 */  { MAD_F(0x06d5e43a) /* 0.427219609 */, 18 },
+  /* 6123 */  { MAD_F(0x06d645cc) /* 0.427312657 */, 18 },
+  /* 6124 */  { MAD_F(0x06d6a75f) /* 0.427405711 */, 18 },
+  /* 6125 */  { MAD_F(0x06d708f3) /* 0.427498769 */, 18 },
+  /* 6126 */  { MAD_F(0x06d76a88) /* 0.427591833 */, 18 },
+  /* 6127 */  { MAD_F(0x06d7cc1f) /* 0.427684901 */, 18 },
+
+  /* 6128 */  { MAD_F(0x06d82db8) /* 0.427777975 */, 18 },
+  /* 6129 */  { MAD_F(0x06d88f51) /* 0.427871054 */, 18 },
+  /* 6130 */  { MAD_F(0x06d8f0ec) /* 0.427964137 */, 18 },
+  /* 6131 */  { MAD_F(0x06d95288) /* 0.428057226 */, 18 },
+  /* 6132 */  { MAD_F(0x06d9b426) /* 0.428150320 */, 18 },
+  /* 6133 */  { MAD_F(0x06da15c5) /* 0.428243419 */, 18 },
+  /* 6134 */  { MAD_F(0x06da7766) /* 0.428336523 */, 18 },
+  /* 6135 */  { MAD_F(0x06dad907) /* 0.428429632 */, 18 },
+  /* 6136 */  { MAD_F(0x06db3aaa) /* 0.428522746 */, 18 },
+  /* 6137 */  { MAD_F(0x06db9c4f) /* 0.428615865 */, 18 },
+  /* 6138 */  { MAD_F(0x06dbfdf5) /* 0.428708989 */, 18 },
+  /* 6139 */  { MAD_F(0x06dc5f9c) /* 0.428802119 */, 18 },
+  /* 6140 */  { MAD_F(0x06dcc145) /* 0.428895253 */, 18 },
+  /* 6141 */  { MAD_F(0x06dd22ee) /* 0.428988392 */, 18 },
+  /* 6142 */  { MAD_F(0x06dd849a) /* 0.429081537 */, 18 },
+  /* 6143 */  { MAD_F(0x06dde646) /* 0.429174686 */, 18 },
+
+  /* 6144 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 18 },
+  /* 6145 */  { MAD_F(0x06dea9a4) /* 0.429361001 */, 18 },
+  /* 6146 */  { MAD_F(0x06df0b54) /* 0.429454165 */, 18 },
+  /* 6147 */  { MAD_F(0x06df6d06) /* 0.429547335 */, 18 },
+  /* 6148 */  { MAD_F(0x06dfceba) /* 0.429640510 */, 18 },
+  /* 6149 */  { MAD_F(0x06e0306f) /* 0.429733690 */, 18 },
+  /* 6150 */  { MAD_F(0x06e09225) /* 0.429826874 */, 18 },
+  /* 6151 */  { MAD_F(0x06e0f3dc) /* 0.429920064 */, 18 },
+  /* 6152 */  { MAD_F(0x06e15595) /* 0.430013259 */, 18 },
+  /* 6153 */  { MAD_F(0x06e1b74f) /* 0.430106459 */, 18 },
+  /* 6154 */  { MAD_F(0x06e2190b) /* 0.430199664 */, 18 },
+  /* 6155 */  { MAD_F(0x06e27ac8) /* 0.430292875 */, 18 },
+  /* 6156 */  { MAD_F(0x06e2dc86) /* 0.430386090 */, 18 },
+  /* 6157 */  { MAD_F(0x06e33e46) /* 0.430479310 */, 18 },
+  /* 6158 */  { MAD_F(0x06e3a007) /* 0.430572535 */, 18 },
+  /* 6159 */  { MAD_F(0x06e401c9) /* 0.430665765 */, 18 },
+
+  /* 6160 */  { MAD_F(0x06e4638d) /* 0.430759001 */, 18 },
+  /* 6161 */  { MAD_F(0x06e4c552) /* 0.430852241 */, 18 },
+  /* 6162 */  { MAD_F(0x06e52718) /* 0.430945487 */, 18 },
+  /* 6163 */  { MAD_F(0x06e588e0) /* 0.431038737 */, 18 },
+  /* 6164 */  { MAD_F(0x06e5eaa9) /* 0.431131993 */, 18 },
+  /* 6165 */  { MAD_F(0x06e64c73) /* 0.431225253 */, 18 },
+  /* 6166 */  { MAD_F(0x06e6ae3f) /* 0.431318519 */, 18 },
+  /* 6167 */  { MAD_F(0x06e7100c) /* 0.431411790 */, 18 },
+  /* 6168 */  { MAD_F(0x06e771db) /* 0.431505065 */, 18 },
+  /* 6169 */  { MAD_F(0x06e7d3ab) /* 0.431598346 */, 18 },
+  /* 6170 */  { MAD_F(0x06e8357c) /* 0.431691632 */, 18 },
+  /* 6171 */  { MAD_F(0x06e8974e) /* 0.431784923 */, 18 },
+  /* 6172 */  { MAD_F(0x06e8f922) /* 0.431878218 */, 18 },
+  /* 6173 */  { MAD_F(0x06e95af8) /* 0.431971519 */, 18 },
+  /* 6174 */  { MAD_F(0x06e9bcce) /* 0.432064825 */, 18 },
+  /* 6175 */  { MAD_F(0x06ea1ea6) /* 0.432158136 */, 18 },
+
+  /* 6176 */  { MAD_F(0x06ea807f) /* 0.432251452 */, 18 },
+  /* 6177 */  { MAD_F(0x06eae25a) /* 0.432344773 */, 18 },
+  /* 6178 */  { MAD_F(0x06eb4436) /* 0.432438099 */, 18 },
+  /* 6179 */  { MAD_F(0x06eba614) /* 0.432531431 */, 18 },
+  /* 6180 */  { MAD_F(0x06ec07f2) /* 0.432624767 */, 18 },
+  /* 6181 */  { MAD_F(0x06ec69d2) /* 0.432718108 */, 18 },
+  /* 6182 */  { MAD_F(0x06eccbb4) /* 0.432811454 */, 18 },
+  /* 6183 */  { MAD_F(0x06ed2d97) /* 0.432904805 */, 18 },
+  /* 6184 */  { MAD_F(0x06ed8f7b) /* 0.432998162 */, 18 },
+  /* 6185 */  { MAD_F(0x06edf160) /* 0.433091523 */, 18 },
+  /* 6186 */  { MAD_F(0x06ee5347) /* 0.433184889 */, 18 },
+  /* 6187 */  { MAD_F(0x06eeb52f) /* 0.433278261 */, 18 },
+  /* 6188 */  { MAD_F(0x06ef1719) /* 0.433371637 */, 18 },
+  /* 6189 */  { MAD_F(0x06ef7904) /* 0.433465019 */, 18 },
+  /* 6190 */  { MAD_F(0x06efdaf0) /* 0.433558405 */, 18 },
+  /* 6191 */  { MAD_F(0x06f03cde) /* 0.433651797 */, 18 },
+
+  /* 6192 */  { MAD_F(0x06f09ecc) /* 0.433745193 */, 18 },
+  /* 6193 */  { MAD_F(0x06f100bd) /* 0.433838595 */, 18 },
+  /* 6194 */  { MAD_F(0x06f162ae) /* 0.433932001 */, 18 },
+  /* 6195 */  { MAD_F(0x06f1c4a1) /* 0.434025413 */, 18 },
+  /* 6196 */  { MAD_F(0x06f22696) /* 0.434118830 */, 18 },
+  /* 6197 */  { MAD_F(0x06f2888b) /* 0.434212251 */, 18 },
+  /* 6198 */  { MAD_F(0x06f2ea82) /* 0.434305678 */, 18 },
+  /* 6199 */  { MAD_F(0x06f34c7b) /* 0.434399110 */, 18 },
+  /* 6200 */  { MAD_F(0x06f3ae75) /* 0.434492546 */, 18 },
+  /* 6201 */  { MAD_F(0x06f41070) /* 0.434585988 */, 18 },
+  /* 6202 */  { MAD_F(0x06f4726c) /* 0.434679435 */, 18 },
+  /* 6203 */  { MAD_F(0x06f4d46a) /* 0.434772887 */, 18 },
+  /* 6204 */  { MAD_F(0x06f53669) /* 0.434866344 */, 18 },
+  /* 6205 */  { MAD_F(0x06f59869) /* 0.434959806 */, 18 },
+  /* 6206 */  { MAD_F(0x06f5fa6b) /* 0.435053272 */, 18 },
+  /* 6207 */  { MAD_F(0x06f65c6e) /* 0.435146744 */, 18 },
+
+  /* 6208 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 18 },
+  /* 6209 */  { MAD_F(0x06f72079) /* 0.435333703 */, 18 },
+  /* 6210 */  { MAD_F(0x06f78280) /* 0.435427190 */, 18 },
+  /* 6211 */  { MAD_F(0x06f7e489) /* 0.435520682 */, 18 },
+  /* 6212 */  { MAD_F(0x06f84693) /* 0.435614179 */, 18 },
+  /* 6213 */  { MAD_F(0x06f8a89e) /* 0.435707681 */, 18 },
+  /* 6214 */  { MAD_F(0x06f90aaa) /* 0.435801188 */, 18 },
+  /* 6215 */  { MAD_F(0x06f96cb8) /* 0.435894700 */, 18 },
+  /* 6216 */  { MAD_F(0x06f9cec8) /* 0.435988217 */, 18 },
+  /* 6217 */  { MAD_F(0x06fa30d8) /* 0.436081739 */, 18 },
+  /* 6218 */  { MAD_F(0x06fa92ea) /* 0.436175266 */, 18 },
+  /* 6219 */  { MAD_F(0x06faf4fe) /* 0.436268799 */, 18 },
+  /* 6220 */  { MAD_F(0x06fb5712) /* 0.436362336 */, 18 },
+  /* 6221 */  { MAD_F(0x06fbb928) /* 0.436455878 */, 18 },
+  /* 6222 */  { MAD_F(0x06fc1b40) /* 0.436549425 */, 18 },
+  /* 6223 */  { MAD_F(0x06fc7d58) /* 0.436642977 */, 18 },
+
+  /* 6224 */  { MAD_F(0x06fcdf72) /* 0.436736534 */, 18 },
+  /* 6225 */  { MAD_F(0x06fd418e) /* 0.436830096 */, 18 },
+  /* 6226 */  { MAD_F(0x06fda3ab) /* 0.436923664 */, 18 },
+  /* 6227 */  { MAD_F(0x06fe05c9) /* 0.437017236 */, 18 },
+  /* 6228 */  { MAD_F(0x06fe67e8) /* 0.437110813 */, 18 },
+  /* 6229 */  { MAD_F(0x06feca09) /* 0.437204395 */, 18 },
+  /* 6230 */  { MAD_F(0x06ff2c2b) /* 0.437297982 */, 18 },
+  /* 6231 */  { MAD_F(0x06ff8e4f) /* 0.437391575 */, 18 },
+  /* 6232 */  { MAD_F(0x06fff073) /* 0.437485172 */, 18 },
+  /* 6233 */  { MAD_F(0x0700529a) /* 0.437578774 */, 18 },
+  /* 6234 */  { MAD_F(0x0700b4c1) /* 0.437672381 */, 18 },
+  /* 6235 */  { MAD_F(0x070116ea) /* 0.437765994 */, 18 },
+  /* 6236 */  { MAD_F(0x07017914) /* 0.437859611 */, 18 },
+  /* 6237 */  { MAD_F(0x0701db40) /* 0.437953233 */, 18 },
+  /* 6238 */  { MAD_F(0x07023d6c) /* 0.438046860 */, 18 },
+  /* 6239 */  { MAD_F(0x07029f9b) /* 0.438140493 */, 18 },
+
+  /* 6240 */  { MAD_F(0x070301ca) /* 0.438234130 */, 18 },
+  /* 6241 */  { MAD_F(0x070363fb) /* 0.438327772 */, 18 },
+  /* 6242 */  { MAD_F(0x0703c62d) /* 0.438421419 */, 18 },
+  /* 6243 */  { MAD_F(0x07042861) /* 0.438515072 */, 18 },
+  /* 6244 */  { MAD_F(0x07048a96) /* 0.438608729 */, 18 },
+  /* 6245 */  { MAD_F(0x0704eccc) /* 0.438702391 */, 18 },
+  /* 6246 */  { MAD_F(0x07054f04) /* 0.438796059 */, 18 },
+  /* 6247 */  { MAD_F(0x0705b13d) /* 0.438889731 */, 18 },
+  /* 6248 */  { MAD_F(0x07061377) /* 0.438983408 */, 18 },
+  /* 6249 */  { MAD_F(0x070675b3) /* 0.439077090 */, 18 },
+  /* 6250 */  { MAD_F(0x0706d7f0) /* 0.439170778 */, 18 },
+  /* 6251 */  { MAD_F(0x07073a2e) /* 0.439264470 */, 18 },
+  /* 6252 */  { MAD_F(0x07079c6e) /* 0.439358167 */, 18 },
+  /* 6253 */  { MAD_F(0x0707feaf) /* 0.439451869 */, 18 },
+  /* 6254 */  { MAD_F(0x070860f1) /* 0.439545577 */, 18 },
+  /* 6255 */  { MAD_F(0x0708c335) /* 0.439639289 */, 18 },
+
+  /* 6256 */  { MAD_F(0x0709257a) /* 0.439733006 */, 18 },
+  /* 6257 */  { MAD_F(0x070987c0) /* 0.439826728 */, 18 },
+  /* 6258 */  { MAD_F(0x0709ea08) /* 0.439920456 */, 18 },
+  /* 6259 */  { MAD_F(0x070a4c51) /* 0.440014188 */, 18 },
+  /* 6260 */  { MAD_F(0x070aae9b) /* 0.440107925 */, 18 },
+  /* 6261 */  { MAD_F(0x070b10e7) /* 0.440201667 */, 18 },
+  /* 6262 */  { MAD_F(0x070b7334) /* 0.440295414 */, 18 },
+  /* 6263 */  { MAD_F(0x070bd583) /* 0.440389167 */, 18 },
+  /* 6264 */  { MAD_F(0x070c37d2) /* 0.440482924 */, 18 },
+  /* 6265 */  { MAD_F(0x070c9a23) /* 0.440576686 */, 18 },
+  /* 6266 */  { MAD_F(0x070cfc76) /* 0.440670453 */, 18 },
+  /* 6267 */  { MAD_F(0x070d5eca) /* 0.440764225 */, 18 },
+  /* 6268 */  { MAD_F(0x070dc11f) /* 0.440858002 */, 18 },
+  /* 6269 */  { MAD_F(0x070e2375) /* 0.440951784 */, 18 },
+  /* 6270 */  { MAD_F(0x070e85cd) /* 0.441045572 */, 18 },
+  /* 6271 */  { MAD_F(0x070ee826) /* 0.441139364 */, 18 },
+
+  /* 6272 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 18 },
+  /* 6273 */  { MAD_F(0x070facdc) /* 0.441326963 */, 18 },
+  /* 6274 */  { MAD_F(0x07100f39) /* 0.441420770 */, 18 },
+  /* 6275 */  { MAD_F(0x07107198) /* 0.441514582 */, 18 },
+  /* 6276 */  { MAD_F(0x0710d3f8) /* 0.441608399 */, 18 },
+  /* 6277 */  { MAD_F(0x07113659) /* 0.441702221 */, 18 },
+  /* 6278 */  { MAD_F(0x071198bb) /* 0.441796048 */, 18 },
+  /* 6279 */  { MAD_F(0x0711fb1f) /* 0.441889880 */, 18 },
+  /* 6280 */  { MAD_F(0x07125d84) /* 0.441983717 */, 18 },
+  /* 6281 */  { MAD_F(0x0712bfeb) /* 0.442077559 */, 18 },
+  /* 6282 */  { MAD_F(0x07132253) /* 0.442171406 */, 18 },
+  /* 6283 */  { MAD_F(0x071384bc) /* 0.442265257 */, 18 },
+  /* 6284 */  { MAD_F(0x0713e726) /* 0.442359114 */, 18 },
+  /* 6285 */  { MAD_F(0x07144992) /* 0.442452976 */, 18 },
+  /* 6286 */  { MAD_F(0x0714abff) /* 0.442546843 */, 18 },
+  /* 6287 */  { MAD_F(0x07150e6e) /* 0.442640715 */, 18 },
+
+  /* 6288 */  { MAD_F(0x071570de) /* 0.442734592 */, 18 },
+  /* 6289 */  { MAD_F(0x0715d34f) /* 0.442828473 */, 18 },
+  /* 6290 */  { MAD_F(0x071635c1) /* 0.442922360 */, 18 },
+  /* 6291 */  { MAD_F(0x07169835) /* 0.443016252 */, 18 },
+  /* 6292 */  { MAD_F(0x0716faaa) /* 0.443110148 */, 18 },
+  /* 6293 */  { MAD_F(0x07175d21) /* 0.443204050 */, 18 },
+  /* 6294 */  { MAD_F(0x0717bf99) /* 0.443297957 */, 18 },
+  /* 6295 */  { MAD_F(0x07182212) /* 0.443391868 */, 18 },
+  /* 6296 */  { MAD_F(0x0718848d) /* 0.443485785 */, 18 },
+  /* 6297 */  { MAD_F(0x0718e709) /* 0.443579706 */, 18 },
+  /* 6298 */  { MAD_F(0x07194986) /* 0.443673633 */, 18 },
+  /* 6299 */  { MAD_F(0x0719ac04) /* 0.443767564 */, 18 },
+  /* 6300 */  { MAD_F(0x071a0e84) /* 0.443861501 */, 18 },
+  /* 6301 */  { MAD_F(0x071a7105) /* 0.443955442 */, 18 },
+  /* 6302 */  { MAD_F(0x071ad388) /* 0.444049389 */, 18 },
+  /* 6303 */  { MAD_F(0x071b360c) /* 0.444143340 */, 18 },
+
+  /* 6304 */  { MAD_F(0x071b9891) /* 0.444237296 */, 18 },
+  /* 6305 */  { MAD_F(0x071bfb18) /* 0.444331258 */, 18 },
+  /* 6306 */  { MAD_F(0x071c5d9f) /* 0.444425224 */, 18 },
+  /* 6307 */  { MAD_F(0x071cc029) /* 0.444519195 */, 18 },
+  /* 6308 */  { MAD_F(0x071d22b3) /* 0.444613171 */, 18 },
+  /* 6309 */  { MAD_F(0x071d853f) /* 0.444707153 */, 18 },
+  /* 6310 */  { MAD_F(0x071de7cc) /* 0.444801139 */, 18 },
+  /* 6311 */  { MAD_F(0x071e4a5b) /* 0.444895130 */, 18 },
+  /* 6312 */  { MAD_F(0x071eaceb) /* 0.444989126 */, 18 },
+  /* 6313 */  { MAD_F(0x071f0f7c) /* 0.445083127 */, 18 },
+  /* 6314 */  { MAD_F(0x071f720e) /* 0.445177133 */, 18 },
+  /* 6315 */  { MAD_F(0x071fd4a2) /* 0.445271144 */, 18 },
+  /* 6316 */  { MAD_F(0x07203737) /* 0.445365160 */, 18 },
+  /* 6317 */  { MAD_F(0x072099ce) /* 0.445459181 */, 18 },
+  /* 6318 */  { MAD_F(0x0720fc66) /* 0.445553206 */, 18 },
+  /* 6319 */  { MAD_F(0x07215eff) /* 0.445647237 */, 18 },
+
+  /* 6320 */  { MAD_F(0x0721c19a) /* 0.445741273 */, 18 },
+  /* 6321 */  { MAD_F(0x07222436) /* 0.445835314 */, 18 },
+  /* 6322 */  { MAD_F(0x072286d3) /* 0.445929359 */, 18 },
+  /* 6323 */  { MAD_F(0x0722e971) /* 0.446023410 */, 18 },
+  /* 6324 */  { MAD_F(0x07234c11) /* 0.446117466 */, 18 },
+  /* 6325 */  { MAD_F(0x0723aeb2) /* 0.446211526 */, 18 },
+  /* 6326 */  { MAD_F(0x07241155) /* 0.446305592 */, 18 },
+  /* 6327 */  { MAD_F(0x072473f9) /* 0.446399662 */, 18 },
+  /* 6328 */  { MAD_F(0x0724d69e) /* 0.446493738 */, 18 },
+  /* 6329 */  { MAD_F(0x07253944) /* 0.446587818 */, 18 },
+  /* 6330 */  { MAD_F(0x07259bec) /* 0.446681903 */, 18 },
+  /* 6331 */  { MAD_F(0x0725fe95) /* 0.446775994 */, 18 },
+  /* 6332 */  { MAD_F(0x07266140) /* 0.446870089 */, 18 },
+  /* 6333 */  { MAD_F(0x0726c3ec) /* 0.446964189 */, 18 },
+  /* 6334 */  { MAD_F(0x07272699) /* 0.447058294 */, 18 },
+  /* 6335 */  { MAD_F(0x07278947) /* 0.447152404 */, 18 },
+
+  /* 6336 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 18 },
+  /* 6337 */  { MAD_F(0x07284ea8) /* 0.447340639 */, 18 },
+  /* 6338 */  { MAD_F(0x0728b15b) /* 0.447434764 */, 18 },
+  /* 6339 */  { MAD_F(0x0729140f) /* 0.447528894 */, 18 },
+  /* 6340 */  { MAD_F(0x072976c4) /* 0.447623029 */, 18 },
+  /* 6341 */  { MAD_F(0x0729d97a) /* 0.447717169 */, 18 },
+  /* 6342 */  { MAD_F(0x072a3c32) /* 0.447811314 */, 18 },
+  /* 6343 */  { MAD_F(0x072a9eeb) /* 0.447905463 */, 18 },
+  /* 6344 */  { MAD_F(0x072b01a6) /* 0.447999618 */, 18 },
+  /* 6345 */  { MAD_F(0x072b6461) /* 0.448093778 */, 18 },
+  /* 6346 */  { MAD_F(0x072bc71e) /* 0.448187942 */, 18 },
+  /* 6347 */  { MAD_F(0x072c29dd) /* 0.448282112 */, 18 },
+  /* 6348 */  { MAD_F(0x072c8c9d) /* 0.448376286 */, 18 },
+  /* 6349 */  { MAD_F(0x072cef5e) /* 0.448470466 */, 18 },
+  /* 6350 */  { MAD_F(0x072d5220) /* 0.448564650 */, 18 },
+  /* 6351 */  { MAD_F(0x072db4e4) /* 0.448658839 */, 18 },
+
+  /* 6352 */  { MAD_F(0x072e17a9) /* 0.448753033 */, 18 },
+  /* 6353 */  { MAD_F(0x072e7a6f) /* 0.448847233 */, 18 },
+  /* 6354 */  { MAD_F(0x072edd37) /* 0.448941437 */, 18 },
+  /* 6355 */  { MAD_F(0x072f4000) /* 0.449035646 */, 18 },
+  /* 6356 */  { MAD_F(0x072fa2ca) /* 0.449129860 */, 18 },
+  /* 6357 */  { MAD_F(0x07300596) /* 0.449224079 */, 18 },
+  /* 6358 */  { MAD_F(0x07306863) /* 0.449318303 */, 18 },
+  /* 6359 */  { MAD_F(0x0730cb32) /* 0.449412531 */, 18 },
+  /* 6360 */  { MAD_F(0x07312e01) /* 0.449506765 */, 18 },
+  /* 6361 */  { MAD_F(0x073190d2) /* 0.449601004 */, 18 },
+  /* 6362 */  { MAD_F(0x0731f3a5) /* 0.449695247 */, 18 },
+  /* 6363 */  { MAD_F(0x07325678) /* 0.449789496 */, 18 },
+  /* 6364 */  { MAD_F(0x0732b94d) /* 0.449883749 */, 18 },
+  /* 6365 */  { MAD_F(0x07331c23) /* 0.449978008 */, 18 },
+  /* 6366 */  { MAD_F(0x07337efb) /* 0.450072271 */, 18 },
+  /* 6367 */  { MAD_F(0x0733e1d4) /* 0.450166540 */, 18 },
+
+  /* 6368 */  { MAD_F(0x073444ae) /* 0.450260813 */, 18 },
+  /* 6369 */  { MAD_F(0x0734a78a) /* 0.450355091 */, 18 },
+  /* 6370 */  { MAD_F(0x07350a67) /* 0.450449374 */, 18 },
+  /* 6371 */  { MAD_F(0x07356d45) /* 0.450543662 */, 18 },
+  /* 6372 */  { MAD_F(0x0735d025) /* 0.450637955 */, 18 },
+  /* 6373 */  { MAD_F(0x07363306) /* 0.450732253 */, 18 },
+  /* 6374 */  { MAD_F(0x073695e8) /* 0.450826556 */, 18 },
+  /* 6375 */  { MAD_F(0x0736f8cb) /* 0.450920864 */, 18 },
+  /* 6376 */  { MAD_F(0x07375bb0) /* 0.451015176 */, 18 },
+  /* 6377 */  { MAD_F(0x0737be96) /* 0.451109494 */, 18 },
+  /* 6378 */  { MAD_F(0x0738217e) /* 0.451203817 */, 18 },
+  /* 6379 */  { MAD_F(0x07388467) /* 0.451298144 */, 18 },
+  /* 6380 */  { MAD_F(0x0738e751) /* 0.451392477 */, 18 },
+  /* 6381 */  { MAD_F(0x07394a3d) /* 0.451486814 */, 18 },
+  /* 6382 */  { MAD_F(0x0739ad29) /* 0.451581156 */, 18 },
+  /* 6383 */  { MAD_F(0x073a1017) /* 0.451675503 */, 18 },
+
+  /* 6384 */  { MAD_F(0x073a7307) /* 0.451769856 */, 18 },
+  /* 6385 */  { MAD_F(0x073ad5f8) /* 0.451864213 */, 18 },
+  /* 6386 */  { MAD_F(0x073b38ea) /* 0.451958575 */, 18 },
+  /* 6387 */  { MAD_F(0x073b9bdd) /* 0.452052942 */, 18 },
+  /* 6388 */  { MAD_F(0x073bfed2) /* 0.452147313 */, 18 },
+  /* 6389 */  { MAD_F(0x073c61c8) /* 0.452241690 */, 18 },
+  /* 6390 */  { MAD_F(0x073cc4bf) /* 0.452336072 */, 18 },
+  /* 6391 */  { MAD_F(0x073d27b8) /* 0.452430458 */, 18 },
+  /* 6392 */  { MAD_F(0x073d8ab2) /* 0.452524850 */, 18 },
+  /* 6393 */  { MAD_F(0x073dedae) /* 0.452619246 */, 18 },
+  /* 6394 */  { MAD_F(0x073e50aa) /* 0.452713648 */, 18 },
+  /* 6395 */  { MAD_F(0x073eb3a8) /* 0.452808054 */, 18 },
+  /* 6396 */  { MAD_F(0x073f16a8) /* 0.452902465 */, 18 },
+  /* 6397 */  { MAD_F(0x073f79a8) /* 0.452996882 */, 18 },
+  /* 6398 */  { MAD_F(0x073fdcaa) /* 0.453091303 */, 18 },
+  /* 6399 */  { MAD_F(0x07403fad) /* 0.453185729 */, 18 },
+
+  /* 6400 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 18 },
+  /* 6401 */  { MAD_F(0x074105b8) /* 0.453374595 */, 18 },
+  /* 6402 */  { MAD_F(0x074168bf) /* 0.453469036 */, 18 },
+  /* 6403 */  { MAD_F(0x0741cbc8) /* 0.453563482 */, 18 },
+  /* 6404 */  { MAD_F(0x07422ed2) /* 0.453657932 */, 18 },
+  /* 6405 */  { MAD_F(0x074291dd) /* 0.453752388 */, 18 },
+  /* 6406 */  { MAD_F(0x0742f4e9) /* 0.453846848 */, 18 },
+  /* 6407 */  { MAD_F(0x074357f7) /* 0.453941314 */, 18 },
+  /* 6408 */  { MAD_F(0x0743bb06) /* 0.454035784 */, 18 },
+  /* 6409 */  { MAD_F(0x07441e17) /* 0.454130259 */, 18 },
+  /* 6410 */  { MAD_F(0x07448129) /* 0.454224739 */, 18 },
+  /* 6411 */  { MAD_F(0x0744e43c) /* 0.454319224 */, 18 },
+  /* 6412 */  { MAD_F(0x07454750) /* 0.454413714 */, 18 },
+  /* 6413 */  { MAD_F(0x0745aa66) /* 0.454508209 */, 18 },
+  /* 6414 */  { MAD_F(0x07460d7d) /* 0.454602708 */, 18 },
+  /* 6415 */  { MAD_F(0x07467095) /* 0.454697213 */, 18 },
+
+  /* 6416 */  { MAD_F(0x0746d3af) /* 0.454791723 */, 18 },
+  /* 6417 */  { MAD_F(0x074736ca) /* 0.454886237 */, 18 },
+  /* 6418 */  { MAD_F(0x074799e7) /* 0.454980756 */, 18 },
+  /* 6419 */  { MAD_F(0x0747fd04) /* 0.455075281 */, 18 },
+  /* 6420 */  { MAD_F(0x07486023) /* 0.455169810 */, 18 },
+  /* 6421 */  { MAD_F(0x0748c344) /* 0.455264344 */, 18 },
+  /* 6422 */  { MAD_F(0x07492665) /* 0.455358883 */, 18 },
+  /* 6423 */  { MAD_F(0x07498988) /* 0.455453427 */, 18 },
+  /* 6424 */  { MAD_F(0x0749ecac) /* 0.455547976 */, 18 },
+  /* 6425 */  { MAD_F(0x074a4fd2) /* 0.455642529 */, 18 },
+  /* 6426 */  { MAD_F(0x074ab2f9) /* 0.455737088 */, 18 },
+  /* 6427 */  { MAD_F(0x074b1621) /* 0.455831652 */, 18 },
+  /* 6428 */  { MAD_F(0x074b794b) /* 0.455926220 */, 18 },
+  /* 6429 */  { MAD_F(0x074bdc75) /* 0.456020793 */, 18 },
+  /* 6430 */  { MAD_F(0x074c3fa1) /* 0.456115372 */, 18 },
+  /* 6431 */  { MAD_F(0x074ca2cf) /* 0.456209955 */, 18 },
+
+  /* 6432 */  { MAD_F(0x074d05fe) /* 0.456304543 */, 18 },
+  /* 6433 */  { MAD_F(0x074d692e) /* 0.456399136 */, 18 },
+  /* 6434 */  { MAD_F(0x074dcc5f) /* 0.456493733 */, 18 },
+  /* 6435 */  { MAD_F(0x074e2f92) /* 0.456588336 */, 18 },
+  /* 6436 */  { MAD_F(0x074e92c6) /* 0.456682944 */, 18 },
+  /* 6437 */  { MAD_F(0x074ef5fb) /* 0.456777556 */, 18 },
+  /* 6438 */  { MAD_F(0x074f5932) /* 0.456872174 */, 18 },
+  /* 6439 */  { MAD_F(0x074fbc6a) /* 0.456966796 */, 18 },
+  /* 6440 */  { MAD_F(0x07501fa3) /* 0.457061423 */, 18 },
+  /* 6441 */  { MAD_F(0x075082de) /* 0.457156056 */, 18 },
+  /* 6442 */  { MAD_F(0x0750e61a) /* 0.457250693 */, 18 },
+  /* 6443 */  { MAD_F(0x07514957) /* 0.457345335 */, 18 },
+  /* 6444 */  { MAD_F(0x0751ac96) /* 0.457439981 */, 18 },
+  /* 6445 */  { MAD_F(0x07520fd6) /* 0.457534633 */, 18 },
+  /* 6446 */  { MAD_F(0x07527317) /* 0.457629290 */, 18 },
+  /* 6447 */  { MAD_F(0x0752d659) /* 0.457723951 */, 18 },
+
+  /* 6448 */  { MAD_F(0x0753399d) /* 0.457818618 */, 18 },
+  /* 6449 */  { MAD_F(0x07539ce2) /* 0.457913289 */, 18 },
+  /* 6450 */  { MAD_F(0x07540029) /* 0.458007965 */, 18 },
+  /* 6451 */  { MAD_F(0x07546371) /* 0.458102646 */, 18 },
+  /* 6452 */  { MAD_F(0x0754c6ba) /* 0.458197332 */, 18 },
+  /* 6453 */  { MAD_F(0x07552a04) /* 0.458292023 */, 18 },
+  /* 6454 */  { MAD_F(0x07558d50) /* 0.458386719 */, 18 },
+  /* 6455 */  { MAD_F(0x0755f09d) /* 0.458481420 */, 18 },
+  /* 6456 */  { MAD_F(0x075653eb) /* 0.458576125 */, 18 },
+  /* 6457 */  { MAD_F(0x0756b73b) /* 0.458670836 */, 18 },
+  /* 6458 */  { MAD_F(0x07571a8c) /* 0.458765551 */, 18 },
+  /* 6459 */  { MAD_F(0x07577dde) /* 0.458860271 */, 18 },
+  /* 6460 */  { MAD_F(0x0757e131) /* 0.458954996 */, 18 },
+  /* 6461 */  { MAD_F(0x07584486) /* 0.459049726 */, 18 },
+  /* 6462 */  { MAD_F(0x0758a7dd) /* 0.459144461 */, 18 },
+  /* 6463 */  { MAD_F(0x07590b34) /* 0.459239201 */, 18 },
+
+  /* 6464 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 18 },
+  /* 6465 */  { MAD_F(0x0759d1e7) /* 0.459428695 */, 18 },
+  /* 6466 */  { MAD_F(0x075a3542) /* 0.459523450 */, 18 },
+  /* 6467 */  { MAD_F(0x075a989f) /* 0.459618209 */, 18 },
+  /* 6468 */  { MAD_F(0x075afbfd) /* 0.459712973 */, 18 },
+  /* 6469 */  { MAD_F(0x075b5f5d) /* 0.459807742 */, 18 },
+  /* 6470 */  { MAD_F(0x075bc2bd) /* 0.459902516 */, 18 },
+  /* 6471 */  { MAD_F(0x075c261f) /* 0.459997295 */, 18 },
+  /* 6472 */  { MAD_F(0x075c8983) /* 0.460092079 */, 18 },
+  /* 6473 */  { MAD_F(0x075cece7) /* 0.460186867 */, 18 },
+  /* 6474 */  { MAD_F(0x075d504d) /* 0.460281661 */, 18 },
+  /* 6475 */  { MAD_F(0x075db3b5) /* 0.460376459 */, 18 },
+  /* 6476 */  { MAD_F(0x075e171d) /* 0.460471262 */, 18 },
+  /* 6477 */  { MAD_F(0x075e7a87) /* 0.460566071 */, 18 },
+  /* 6478 */  { MAD_F(0x075eddf2) /* 0.460660884 */, 18 },
+  /* 6479 */  { MAD_F(0x075f415f) /* 0.460755701 */, 18 },
+
+  /* 6480 */  { MAD_F(0x075fa4cc) /* 0.460850524 */, 18 },
+  /* 6481 */  { MAD_F(0x0760083b) /* 0.460945352 */, 18 },
+  /* 6482 */  { MAD_F(0x07606bac) /* 0.461040184 */, 18 },
+  /* 6483 */  { MAD_F(0x0760cf1e) /* 0.461135022 */, 18 },
+  /* 6484 */  { MAD_F(0x07613291) /* 0.461229864 */, 18 },
+  /* 6485 */  { MAD_F(0x07619605) /* 0.461324711 */, 18 },
+  /* 6486 */  { MAD_F(0x0761f97b) /* 0.461419563 */, 18 },
+  /* 6487 */  { MAD_F(0x07625cf2) /* 0.461514420 */, 18 },
+  /* 6488 */  { MAD_F(0x0762c06a) /* 0.461609282 */, 18 },
+  /* 6489 */  { MAD_F(0x076323e3) /* 0.461704149 */, 18 },
+  /* 6490 */  { MAD_F(0x0763875e) /* 0.461799020 */, 18 },
+  /* 6491 */  { MAD_F(0x0763eadb) /* 0.461893897 */, 18 },
+  /* 6492 */  { MAD_F(0x07644e58) /* 0.461988778 */, 18 },
+  /* 6493 */  { MAD_F(0x0764b1d7) /* 0.462083664 */, 18 },
+  /* 6494 */  { MAD_F(0x07651557) /* 0.462178555 */, 18 },
+  /* 6495 */  { MAD_F(0x076578d8) /* 0.462273451 */, 18 },
+
+  /* 6496 */  { MAD_F(0x0765dc5b) /* 0.462368352 */, 18 },
+  /* 6497 */  { MAD_F(0x07663fdf) /* 0.462463257 */, 18 },
+  /* 6498 */  { MAD_F(0x0766a364) /* 0.462558168 */, 18 },
+  /* 6499 */  { MAD_F(0x076706eb) /* 0.462653083 */, 18 },
+  /* 6500 */  { MAD_F(0x07676a73) /* 0.462748003 */, 18 },
+  /* 6501 */  { MAD_F(0x0767cdfc) /* 0.462842928 */, 18 },
+  /* 6502 */  { MAD_F(0x07683187) /* 0.462937858 */, 18 },
+  /* 6503 */  { MAD_F(0x07689513) /* 0.463032793 */, 18 },
+  /* 6504 */  { MAD_F(0x0768f8a0) /* 0.463127733 */, 18 },
+  /* 6505 */  { MAD_F(0x07695c2e) /* 0.463222678 */, 18 },
+  /* 6506 */  { MAD_F(0x0769bfbe) /* 0.463317627 */, 18 },
+  /* 6507 */  { MAD_F(0x076a234f) /* 0.463412581 */, 18 },
+  /* 6508 */  { MAD_F(0x076a86e2) /* 0.463507540 */, 18 },
+  /* 6509 */  { MAD_F(0x076aea75) /* 0.463602504 */, 18 },
+  /* 6510 */  { MAD_F(0x076b4e0a) /* 0.463697473 */, 18 },
+  /* 6511 */  { MAD_F(0x076bb1a1) /* 0.463792447 */, 18 },
+
+  /* 6512 */  { MAD_F(0x076c1538) /* 0.463887426 */, 18 },
+  /* 6513 */  { MAD_F(0x076c78d1) /* 0.463982409 */, 18 },
+  /* 6514 */  { MAD_F(0x076cdc6c) /* 0.464077398 */, 18 },
+  /* 6515 */  { MAD_F(0x076d4007) /* 0.464172391 */, 18 },
+  /* 6516 */  { MAD_F(0x076da3a4) /* 0.464267389 */, 18 },
+  /* 6517 */  { MAD_F(0x076e0742) /* 0.464362392 */, 18 },
+  /* 6518 */  { MAD_F(0x076e6ae2) /* 0.464457399 */, 18 },
+  /* 6519 */  { MAD_F(0x076ece82) /* 0.464552412 */, 18 },
+  /* 6520 */  { MAD_F(0x076f3224) /* 0.464647430 */, 18 },
+  /* 6521 */  { MAD_F(0x076f95c8) /* 0.464742452 */, 18 },
+  /* 6522 */  { MAD_F(0x076ff96c) /* 0.464837479 */, 18 },
+  /* 6523 */  { MAD_F(0x07705d12) /* 0.464932511 */, 18 },
+  /* 6524 */  { MAD_F(0x0770c0ba) /* 0.465027548 */, 18 },
+  /* 6525 */  { MAD_F(0x07712462) /* 0.465122590 */, 18 },
+  /* 6526 */  { MAD_F(0x0771880c) /* 0.465217637 */, 18 },
+  /* 6527 */  { MAD_F(0x0771ebb7) /* 0.465312688 */, 18 },
+
+  /* 6528 */  { MAD_F(0x07724f64) /* 0.465407744 */, 18 },
+  /* 6529 */  { MAD_F(0x0772b312) /* 0.465502806 */, 18 },
+  /* 6530 */  { MAD_F(0x077316c1) /* 0.465597872 */, 18 },
+  /* 6531 */  { MAD_F(0x07737a71) /* 0.465692943 */, 18 },
+  /* 6532 */  { MAD_F(0x0773de23) /* 0.465788018 */, 18 },
+  /* 6533 */  { MAD_F(0x077441d6) /* 0.465883099 */, 18 },
+  /* 6534 */  { MAD_F(0x0774a58a) /* 0.465978184 */, 18 },
+  /* 6535 */  { MAD_F(0x07750940) /* 0.466073275 */, 18 },
+  /* 6536 */  { MAD_F(0x07756cf7) /* 0.466168370 */, 18 },
+  /* 6537 */  { MAD_F(0x0775d0af) /* 0.466263470 */, 18 },
+  /* 6538 */  { MAD_F(0x07763468) /* 0.466358575 */, 18 },
+  /* 6539 */  { MAD_F(0x07769823) /* 0.466453684 */, 18 },
+  /* 6540 */  { MAD_F(0x0776fbdf) /* 0.466548799 */, 18 },
+  /* 6541 */  { MAD_F(0x07775f9d) /* 0.466643918 */, 18 },
+  /* 6542 */  { MAD_F(0x0777c35c) /* 0.466739043 */, 18 },
+  /* 6543 */  { MAD_F(0x0778271c) /* 0.466834172 */, 18 },
+
+  /* 6544 */  { MAD_F(0x07788add) /* 0.466929306 */, 18 },
+  /* 6545 */  { MAD_F(0x0778ee9f) /* 0.467024445 */, 18 },
+  /* 6546 */  { MAD_F(0x07795263) /* 0.467119588 */, 18 },
+  /* 6547 */  { MAD_F(0x0779b629) /* 0.467214737 */, 18 },
+  /* 6548 */  { MAD_F(0x077a19ef) /* 0.467309890 */, 18 },
+  /* 6549 */  { MAD_F(0x077a7db7) /* 0.467405048 */, 18 },
+  /* 6550 */  { MAD_F(0x077ae180) /* 0.467500211 */, 18 },
+  /* 6551 */  { MAD_F(0x077b454b) /* 0.467595379 */, 18 },
+  /* 6552 */  { MAD_F(0x077ba916) /* 0.467690552 */, 18 },
+  /* 6553 */  { MAD_F(0x077c0ce3) /* 0.467785729 */, 18 },
+  /* 6554 */  { MAD_F(0x077c70b2) /* 0.467880912 */, 18 },
+  /* 6555 */  { MAD_F(0x077cd481) /* 0.467976099 */, 18 },
+  /* 6556 */  { MAD_F(0x077d3852) /* 0.468071291 */, 18 },
+  /* 6557 */  { MAD_F(0x077d9c24) /* 0.468166488 */, 18 },
+  /* 6558 */  { MAD_F(0x077dfff8) /* 0.468261690 */, 18 },
+  /* 6559 */  { MAD_F(0x077e63cd) /* 0.468356896 */, 18 },
+
+  /* 6560 */  { MAD_F(0x077ec7a3) /* 0.468452108 */, 18 },
+  /* 6561 */  { MAD_F(0x077f2b7a) /* 0.468547324 */, 18 },
+  /* 6562 */  { MAD_F(0x077f8f53) /* 0.468642545 */, 18 },
+  /* 6563 */  { MAD_F(0x077ff32d) /* 0.468737771 */, 18 },
+  /* 6564 */  { MAD_F(0x07805708) /* 0.468833002 */, 18 },
+  /* 6565 */  { MAD_F(0x0780bae5) /* 0.468928237 */, 18 },
+  /* 6566 */  { MAD_F(0x07811ec3) /* 0.469023478 */, 18 },
+  /* 6567 */  { MAD_F(0x078182a2) /* 0.469118723 */, 18 },
+  /* 6568 */  { MAD_F(0x0781e683) /* 0.469213973 */, 18 },
+  /* 6569 */  { MAD_F(0x07824a64) /* 0.469309228 */, 18 },
+  /* 6570 */  { MAD_F(0x0782ae47) /* 0.469404488 */, 18 },
+  /* 6571 */  { MAD_F(0x0783122c) /* 0.469499752 */, 18 },
+  /* 6572 */  { MAD_F(0x07837612) /* 0.469595022 */, 18 },
+  /* 6573 */  { MAD_F(0x0783d9f9) /* 0.469690296 */, 18 },
+  /* 6574 */  { MAD_F(0x07843de1) /* 0.469785575 */, 18 },
+  /* 6575 */  { MAD_F(0x0784a1ca) /* 0.469880859 */, 18 },
+
+  /* 6576 */  { MAD_F(0x078505b5) /* 0.469976148 */, 18 },
+  /* 6577 */  { MAD_F(0x078569a2) /* 0.470071442 */, 18 },
+  /* 6578 */  { MAD_F(0x0785cd8f) /* 0.470166740 */, 18 },
+  /* 6579 */  { MAD_F(0x0786317e) /* 0.470262043 */, 18 },
+  /* 6580 */  { MAD_F(0x0786956e) /* 0.470357351 */, 18 },
+  /* 6581 */  { MAD_F(0x0786f95f) /* 0.470452664 */, 18 },
+  /* 6582 */  { MAD_F(0x07875d52) /* 0.470547982 */, 18 },
+  /* 6583 */  { MAD_F(0x0787c146) /* 0.470643305 */, 18 },
+  /* 6584 */  { MAD_F(0x0788253b) /* 0.470738632 */, 18 },
+  /* 6585 */  { MAD_F(0x07888932) /* 0.470833964 */, 18 },
+  /* 6586 */  { MAD_F(0x0788ed2a) /* 0.470929301 */, 18 },
+  /* 6587 */  { MAD_F(0x07895123) /* 0.471024643 */, 18 },
+  /* 6588 */  { MAD_F(0x0789b51d) /* 0.471119990 */, 18 },
+  /* 6589 */  { MAD_F(0x078a1919) /* 0.471215341 */, 18 },
+  /* 6590 */  { MAD_F(0x078a7d16) /* 0.471310698 */, 18 },
+  /* 6591 */  { MAD_F(0x078ae114) /* 0.471406059 */, 18 },
+
+  /* 6592 */  { MAD_F(0x078b4514) /* 0.471501425 */, 18 },
+  /* 6593 */  { MAD_F(0x078ba915) /* 0.471596796 */, 18 },
+  /* 6594 */  { MAD_F(0x078c0d17) /* 0.471692171 */, 18 },
+  /* 6595 */  { MAD_F(0x078c711a) /* 0.471787552 */, 18 },
+  /* 6596 */  { MAD_F(0x078cd51f) /* 0.471882937 */, 18 },
+  /* 6597 */  { MAD_F(0x078d3925) /* 0.471978327 */, 18 },
+  /* 6598 */  { MAD_F(0x078d9d2d) /* 0.472073722 */, 18 },
+  /* 6599 */  { MAD_F(0x078e0135) /* 0.472169122 */, 18 },
+  /* 6600 */  { MAD_F(0x078e653f) /* 0.472264527 */, 18 },
+  /* 6601 */  { MAD_F(0x078ec94b) /* 0.472359936 */, 18 },
+  /* 6602 */  { MAD_F(0x078f2d57) /* 0.472455350 */, 18 },
+  /* 6603 */  { MAD_F(0x078f9165) /* 0.472550769 */, 18 },
+  /* 6604 */  { MAD_F(0x078ff574) /* 0.472646193 */, 18 },
+  /* 6605 */  { MAD_F(0x07905985) /* 0.472741622 */, 18 },
+  /* 6606 */  { MAD_F(0x0790bd96) /* 0.472837055 */, 18 },
+  /* 6607 */  { MAD_F(0x079121a9) /* 0.472932493 */, 18 },
+
+  /* 6608 */  { MAD_F(0x079185be) /* 0.473027937 */, 18 },
+  /* 6609 */  { MAD_F(0x0791e9d3) /* 0.473123384 */, 18 },
+  /* 6610 */  { MAD_F(0x07924dea) /* 0.473218837 */, 18 },
+  /* 6611 */  { MAD_F(0x0792b202) /* 0.473314295 */, 18 },
+  /* 6612 */  { MAD_F(0x0793161c) /* 0.473409757 */, 18 },
+  /* 6613 */  { MAD_F(0x07937a37) /* 0.473505224 */, 18 },
+  /* 6614 */  { MAD_F(0x0793de53) /* 0.473600696 */, 18 },
+  /* 6615 */  { MAD_F(0x07944270) /* 0.473696173 */, 18 },
+  /* 6616 */  { MAD_F(0x0794a68f) /* 0.473791655 */, 18 },
+  /* 6617 */  { MAD_F(0x07950aaf) /* 0.473887141 */, 18 },
+  /* 6618 */  { MAD_F(0x07956ed0) /* 0.473982632 */, 18 },
+  /* 6619 */  { MAD_F(0x0795d2f2) /* 0.474078128 */, 18 },
+  /* 6620 */  { MAD_F(0x07963716) /* 0.474173629 */, 18 },
+  /* 6621 */  { MAD_F(0x07969b3b) /* 0.474269135 */, 18 },
+  /* 6622 */  { MAD_F(0x0796ff62) /* 0.474364645 */, 18 },
+  /* 6623 */  { MAD_F(0x07976389) /* 0.474460161 */, 18 },
+
+  /* 6624 */  { MAD_F(0x0797c7b2) /* 0.474555681 */, 18 },
+  /* 6625 */  { MAD_F(0x07982bdd) /* 0.474651205 */, 18 },
+  /* 6626 */  { MAD_F(0x07989008) /* 0.474746735 */, 18 },
+  /* 6627 */  { MAD_F(0x0798f435) /* 0.474842270 */, 18 },
+  /* 6628 */  { MAD_F(0x07995863) /* 0.474937809 */, 18 },
+  /* 6629 */  { MAD_F(0x0799bc92) /* 0.475033353 */, 18 },
+  /* 6630 */  { MAD_F(0x079a20c3) /* 0.475128902 */, 18 },
+  /* 6631 */  { MAD_F(0x079a84f5) /* 0.475224456 */, 18 },
+  /* 6632 */  { MAD_F(0x079ae929) /* 0.475320014 */, 18 },
+  /* 6633 */  { MAD_F(0x079b4d5d) /* 0.475415578 */, 18 },
+  /* 6634 */  { MAD_F(0x079bb193) /* 0.475511146 */, 18 },
+  /* 6635 */  { MAD_F(0x079c15ca) /* 0.475606719 */, 18 },
+  /* 6636 */  { MAD_F(0x079c7a03) /* 0.475702296 */, 18 },
+  /* 6637 */  { MAD_F(0x079cde3c) /* 0.475797879 */, 18 },
+  /* 6638 */  { MAD_F(0x079d4277) /* 0.475893466 */, 18 },
+  /* 6639 */  { MAD_F(0x079da6b4) /* 0.475989058 */, 18 },
+
+  /* 6640 */  { MAD_F(0x079e0af1) /* 0.476084655 */, 18 },
+  /* 6641 */  { MAD_F(0x079e6f30) /* 0.476180257 */, 18 },
+  /* 6642 */  { MAD_F(0x079ed370) /* 0.476275863 */, 18 },
+  /* 6643 */  { MAD_F(0x079f37b2) /* 0.476371475 */, 18 },
+  /* 6644 */  { MAD_F(0x079f9bf5) /* 0.476467091 */, 18 },
+  /* 6645 */  { MAD_F(0x07a00039) /* 0.476562712 */, 18 },
+  /* 6646 */  { MAD_F(0x07a0647e) /* 0.476658338 */, 18 },
+  /* 6647 */  { MAD_F(0x07a0c8c5) /* 0.476753968 */, 18 },
+  /* 6648 */  { MAD_F(0x07a12d0c) /* 0.476849603 */, 18 },
+  /* 6649 */  { MAD_F(0x07a19156) /* 0.476945243 */, 18 },
+  /* 6650 */  { MAD_F(0x07a1f5a0) /* 0.477040888 */, 18 },
+  /* 6651 */  { MAD_F(0x07a259ec) /* 0.477136538 */, 18 },
+  /* 6652 */  { MAD_F(0x07a2be39) /* 0.477232193 */, 18 },
+  /* 6653 */  { MAD_F(0x07a32287) /* 0.477327852 */, 18 },
+  /* 6654 */  { MAD_F(0x07a386d7) /* 0.477423516 */, 18 },
+  /* 6655 */  { MAD_F(0x07a3eb28) /* 0.477519185 */, 18 },
+
+  /* 6656 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 18 },
+  /* 6657 */  { MAD_F(0x07a4b3ce) /* 0.477710537 */, 18 },
+  /* 6658 */  { MAD_F(0x07a51822) /* 0.477806220 */, 18 },
+  /* 6659 */  { MAD_F(0x07a57c78) /* 0.477901908 */, 18 },
+  /* 6660 */  { MAD_F(0x07a5e0d0) /* 0.477997601 */, 18 },
+  /* 6661 */  { MAD_F(0x07a64528) /* 0.478093299 */, 18 },
+  /* 6662 */  { MAD_F(0x07a6a982) /* 0.478189001 */, 18 },
+  /* 6663 */  { MAD_F(0x07a70ddd) /* 0.478284708 */, 18 },
+  /* 6664 */  { MAD_F(0x07a7723a) /* 0.478380420 */, 18 },
+  /* 6665 */  { MAD_F(0x07a7d698) /* 0.478476137 */, 18 },
+  /* 6666 */  { MAD_F(0x07a83af7) /* 0.478571858 */, 18 },
+  /* 6667 */  { MAD_F(0x07a89f57) /* 0.478667585 */, 18 },
+  /* 6668 */  { MAD_F(0x07a903b9) /* 0.478763316 */, 18 },
+  /* 6669 */  { MAD_F(0x07a9681c) /* 0.478859052 */, 18 },
+  /* 6670 */  { MAD_F(0x07a9cc80) /* 0.478954793 */, 18 },
+  /* 6671 */  { MAD_F(0x07aa30e5) /* 0.479050538 */, 18 },
+
+  /* 6672 */  { MAD_F(0x07aa954c) /* 0.479146288 */, 18 },
+  /* 6673 */  { MAD_F(0x07aaf9b4) /* 0.479242043 */, 18 },
+  /* 6674 */  { MAD_F(0x07ab5e1e) /* 0.479337803 */, 18 },
+  /* 6675 */  { MAD_F(0x07abc288) /* 0.479433568 */, 18 },
+  /* 6676 */  { MAD_F(0x07ac26f4) /* 0.479529337 */, 18 },
+  /* 6677 */  { MAD_F(0x07ac8b61) /* 0.479625111 */, 18 },
+  /* 6678 */  { MAD_F(0x07acefd0) /* 0.479720890 */, 18 },
+  /* 6679 */  { MAD_F(0x07ad543f) /* 0.479816674 */, 18 },
+  /* 6680 */  { MAD_F(0x07adb8b0) /* 0.479912463 */, 18 },
+  /* 6681 */  { MAD_F(0x07ae1d23) /* 0.480008256 */, 18 },
+  /* 6682 */  { MAD_F(0x07ae8196) /* 0.480104054 */, 18 },
+  /* 6683 */  { MAD_F(0x07aee60b) /* 0.480199857 */, 18 },
+  /* 6684 */  { MAD_F(0x07af4a81) /* 0.480295664 */, 18 },
+  /* 6685 */  { MAD_F(0x07afaef9) /* 0.480391477 */, 18 },
+  /* 6686 */  { MAD_F(0x07b01372) /* 0.480487294 */, 18 },
+  /* 6687 */  { MAD_F(0x07b077ec) /* 0.480583116 */, 18 },
+
+  /* 6688 */  { MAD_F(0x07b0dc67) /* 0.480678943 */, 18 },
+  /* 6689 */  { MAD_F(0x07b140e4) /* 0.480774774 */, 18 },
+  /* 6690 */  { MAD_F(0x07b1a561) /* 0.480870611 */, 18 },
+  /* 6691 */  { MAD_F(0x07b209e1) /* 0.480966452 */, 18 },
+  /* 6692 */  { MAD_F(0x07b26e61) /* 0.481062298 */, 18 },
+  /* 6693 */  { MAD_F(0x07b2d2e3) /* 0.481158148 */, 18 },
+  /* 6694 */  { MAD_F(0x07b33766) /* 0.481254004 */, 18 },
+  /* 6695 */  { MAD_F(0x07b39bea) /* 0.481349864 */, 18 },
+  /* 6696 */  { MAD_F(0x07b4006f) /* 0.481445729 */, 18 },
+  /* 6697 */  { MAD_F(0x07b464f6) /* 0.481541598 */, 18 },
+  /* 6698 */  { MAD_F(0x07b4c97e) /* 0.481637473 */, 18 },
+  /* 6699 */  { MAD_F(0x07b52e08) /* 0.481733352 */, 18 },
+  /* 6700 */  { MAD_F(0x07b59292) /* 0.481829236 */, 18 },
+  /* 6701 */  { MAD_F(0x07b5f71e) /* 0.481925125 */, 18 },
+  /* 6702 */  { MAD_F(0x07b65bac) /* 0.482021019 */, 18 },
+  /* 6703 */  { MAD_F(0x07b6c03a) /* 0.482116917 */, 18 },
+
+  /* 6704 */  { MAD_F(0x07b724ca) /* 0.482212820 */, 18 },
+  /* 6705 */  { MAD_F(0x07b7895b) /* 0.482308728 */, 18 },
+  /* 6706 */  { MAD_F(0x07b7eded) /* 0.482404640 */, 18 },
+  /* 6707 */  { MAD_F(0x07b85281) /* 0.482500558 */, 18 },
+  /* 6708 */  { MAD_F(0x07b8b716) /* 0.482596480 */, 18 },
+  /* 6709 */  { MAD_F(0x07b91bac) /* 0.482692407 */, 18 },
+  /* 6710 */  { MAD_F(0x07b98044) /* 0.482788339 */, 18 },
+  /* 6711 */  { MAD_F(0x07b9e4dc) /* 0.482884275 */, 18 },
+  /* 6712 */  { MAD_F(0x07ba4976) /* 0.482980216 */, 18 },
+  /* 6713 */  { MAD_F(0x07baae12) /* 0.483076162 */, 18 },
+  /* 6714 */  { MAD_F(0x07bb12ae) /* 0.483172113 */, 18 },
+  /* 6715 */  { MAD_F(0x07bb774c) /* 0.483268069 */, 18 },
+  /* 6716 */  { MAD_F(0x07bbdbeb) /* 0.483364029 */, 18 },
+  /* 6717 */  { MAD_F(0x07bc408c) /* 0.483459994 */, 18 },
+  /* 6718 */  { MAD_F(0x07bca52d) /* 0.483555964 */, 18 },
+  /* 6719 */  { MAD_F(0x07bd09d0) /* 0.483651939 */, 18 },
+
+  /* 6720 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 18 },
+  /* 6721 */  { MAD_F(0x07bdd31a) /* 0.483843902 */, 18 },
+  /* 6722 */  { MAD_F(0x07be37c1) /* 0.483939891 */, 18 },
+  /* 6723 */  { MAD_F(0x07be9c69) /* 0.484035885 */, 18 },
+  /* 6724 */  { MAD_F(0x07bf0113) /* 0.484131883 */, 18 },
+  /* 6725 */  { MAD_F(0x07bf65bd) /* 0.484227886 */, 18 },
+  /* 6726 */  { MAD_F(0x07bfca69) /* 0.484323894 */, 18 },
+  /* 6727 */  { MAD_F(0x07c02f16) /* 0.484419907 */, 18 },
+  /* 6728 */  { MAD_F(0x07c093c5) /* 0.484515924 */, 18 },
+  /* 6729 */  { MAD_F(0x07c0f875) /* 0.484611946 */, 18 },
+  /* 6730 */  { MAD_F(0x07c15d26) /* 0.484707973 */, 18 },
+  /* 6731 */  { MAD_F(0x07c1c1d8) /* 0.484804005 */, 18 },
+  /* 6732 */  { MAD_F(0x07c2268b) /* 0.484900041 */, 18 },
+  /* 6733 */  { MAD_F(0x07c28b40) /* 0.484996083 */, 18 },
+  /* 6734 */  { MAD_F(0x07c2eff6) /* 0.485092128 */, 18 },
+  /* 6735 */  { MAD_F(0x07c354ae) /* 0.485188179 */, 18 },
+
+  /* 6736 */  { MAD_F(0x07c3b967) /* 0.485284235 */, 18 },
+  /* 6737 */  { MAD_F(0x07c41e21) /* 0.485380295 */, 18 },
+  /* 6738 */  { MAD_F(0x07c482dc) /* 0.485476360 */, 18 },
+  /* 6739 */  { MAD_F(0x07c4e798) /* 0.485572430 */, 18 },
+  /* 6740 */  { MAD_F(0x07c54c56) /* 0.485668504 */, 18 },
+  /* 6741 */  { MAD_F(0x07c5b115) /* 0.485764583 */, 18 },
+  /* 6742 */  { MAD_F(0x07c615d6) /* 0.485860667 */, 18 },
+  /* 6743 */  { MAD_F(0x07c67a97) /* 0.485956756 */, 18 },
+  /* 6744 */  { MAD_F(0x07c6df5a) /* 0.486052849 */, 18 },
+  /* 6745 */  { MAD_F(0x07c7441e) /* 0.486148948 */, 18 },
+  /* 6746 */  { MAD_F(0x07c7a8e4) /* 0.486245051 */, 18 },
+  /* 6747 */  { MAD_F(0x07c80daa) /* 0.486341158 */, 18 },
+  /* 6748 */  { MAD_F(0x07c87272) /* 0.486437271 */, 18 },
+  /* 6749 */  { MAD_F(0x07c8d73c) /* 0.486533388 */, 18 },
+  /* 6750 */  { MAD_F(0x07c93c06) /* 0.486629510 */, 18 },
+  /* 6751 */  { MAD_F(0x07c9a0d2) /* 0.486725637 */, 18 },
+
+  /* 6752 */  { MAD_F(0x07ca059f) /* 0.486821768 */, 18 },
+  /* 6753 */  { MAD_F(0x07ca6a6d) /* 0.486917905 */, 18 },
+  /* 6754 */  { MAD_F(0x07cacf3d) /* 0.487014045 */, 18 },
+  /* 6755 */  { MAD_F(0x07cb340e) /* 0.487110191 */, 18 },
+  /* 6756 */  { MAD_F(0x07cb98e0) /* 0.487206342 */, 18 },
+  /* 6757 */  { MAD_F(0x07cbfdb4) /* 0.487302497 */, 18 },
+  /* 6758 */  { MAD_F(0x07cc6288) /* 0.487398657 */, 18 },
+  /* 6759 */  { MAD_F(0x07ccc75e) /* 0.487494821 */, 18 },
+  /* 6760 */  { MAD_F(0x07cd2c36) /* 0.487590991 */, 18 },
+  /* 6761 */  { MAD_F(0x07cd910e) /* 0.487687165 */, 18 },
+  /* 6762 */  { MAD_F(0x07cdf5e8) /* 0.487783344 */, 18 },
+  /* 6763 */  { MAD_F(0x07ce5ac3) /* 0.487879528 */, 18 },
+  /* 6764 */  { MAD_F(0x07cebfa0) /* 0.487975716 */, 18 },
+  /* 6765 */  { MAD_F(0x07cf247d) /* 0.488071909 */, 18 },
+  /* 6766 */  { MAD_F(0x07cf895c) /* 0.488168107 */, 18 },
+  /* 6767 */  { MAD_F(0x07cfee3c) /* 0.488264310 */, 18 },
+
+  /* 6768 */  { MAD_F(0x07d0531e) /* 0.488360517 */, 18 },
+  /* 6769 */  { MAD_F(0x07d0b801) /* 0.488456729 */, 18 },
+  /* 6770 */  { MAD_F(0x07d11ce5) /* 0.488552946 */, 18 },
+  /* 6771 */  { MAD_F(0x07d181ca) /* 0.488649167 */, 18 },
+  /* 6772 */  { MAD_F(0x07d1e6b0) /* 0.488745394 */, 18 },
+  /* 6773 */  { MAD_F(0x07d24b98) /* 0.488841625 */, 18 },
+  /* 6774 */  { MAD_F(0x07d2b081) /* 0.488937860 */, 18 },
+  /* 6775 */  { MAD_F(0x07d3156c) /* 0.489034101 */, 18 },
+  /* 6776 */  { MAD_F(0x07d37a57) /* 0.489130346 */, 18 },
+  /* 6777 */  { MAD_F(0x07d3df44) /* 0.489226596 */, 18 },
+  /* 6778 */  { MAD_F(0x07d44432) /* 0.489322851 */, 18 },
+  /* 6779 */  { MAD_F(0x07d4a922) /* 0.489419110 */, 18 },
+  /* 6780 */  { MAD_F(0x07d50e13) /* 0.489515375 */, 18 },
+  /* 6781 */  { MAD_F(0x07d57305) /* 0.489611643 */, 18 },
+  /* 6782 */  { MAD_F(0x07d5d7f8) /* 0.489707917 */, 18 },
+  /* 6783 */  { MAD_F(0x07d63cec) /* 0.489804195 */, 18 },
+
+  /* 6784 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 18 },
+  /* 6785 */  { MAD_F(0x07d706d9) /* 0.489996766 */, 18 },
+  /* 6786 */  { MAD_F(0x07d76bd2) /* 0.490093059 */, 18 },
+  /* 6787 */  { MAD_F(0x07d7d0cb) /* 0.490189356 */, 18 },
+  /* 6788 */  { MAD_F(0x07d835c6) /* 0.490285658 */, 18 },
+  /* 6789 */  { MAD_F(0x07d89ac2) /* 0.490381965 */, 18 },
+  /* 6790 */  { MAD_F(0x07d8ffc0) /* 0.490478277 */, 18 },
+  /* 6791 */  { MAD_F(0x07d964be) /* 0.490574593 */, 18 },
+  /* 6792 */  { MAD_F(0x07d9c9be) /* 0.490670914 */, 18 },
+  /* 6793 */  { MAD_F(0x07da2ebf) /* 0.490767239 */, 18 },
+  /* 6794 */  { MAD_F(0x07da93c2) /* 0.490863570 */, 18 },
+  /* 6795 */  { MAD_F(0x07daf8c6) /* 0.490959905 */, 18 },
+  /* 6796 */  { MAD_F(0x07db5dcb) /* 0.491056245 */, 18 },
+  /* 6797 */  { MAD_F(0x07dbc2d1) /* 0.491152589 */, 18 },
+  /* 6798 */  { MAD_F(0x07dc27d9) /* 0.491248939 */, 18 },
+  /* 6799 */  { MAD_F(0x07dc8ce1) /* 0.491345293 */, 18 },
+
+  /* 6800 */  { MAD_F(0x07dcf1ec) /* 0.491441651 */, 18 },
+  /* 6801 */  { MAD_F(0x07dd56f7) /* 0.491538015 */, 18 },
+  /* 6802 */  { MAD_F(0x07ddbc04) /* 0.491634383 */, 18 },
+  /* 6803 */  { MAD_F(0x07de2111) /* 0.491730756 */, 18 },
+  /* 6804 */  { MAD_F(0x07de8621) /* 0.491827134 */, 18 },
+  /* 6805 */  { MAD_F(0x07deeb31) /* 0.491923516 */, 18 },
+  /* 6806 */  { MAD_F(0x07df5043) /* 0.492019903 */, 18 },
+  /* 6807 */  { MAD_F(0x07dfb556) /* 0.492116295 */, 18 },
+  /* 6808 */  { MAD_F(0x07e01a6a) /* 0.492212691 */, 18 },
+  /* 6809 */  { MAD_F(0x07e07f80) /* 0.492309093 */, 18 },
+  /* 6810 */  { MAD_F(0x07e0e496) /* 0.492405499 */, 18 },
+  /* 6811 */  { MAD_F(0x07e149ae) /* 0.492501909 */, 18 },
+  /* 6812 */  { MAD_F(0x07e1aec8) /* 0.492598325 */, 18 },
+  /* 6813 */  { MAD_F(0x07e213e2) /* 0.492694745 */, 18 },
+  /* 6814 */  { MAD_F(0x07e278fe) /* 0.492791170 */, 18 },
+  /* 6815 */  { MAD_F(0x07e2de1b) /* 0.492887599 */, 18 },
+
+  /* 6816 */  { MAD_F(0x07e3433a) /* 0.492984033 */, 18 },
+  /* 6817 */  { MAD_F(0x07e3a859) /* 0.493080472 */, 18 },
+  /* 6818 */  { MAD_F(0x07e40d7a) /* 0.493176916 */, 18 },
+  /* 6819 */  { MAD_F(0x07e4729c) /* 0.493273365 */, 18 },
+  /* 6820 */  { MAD_F(0x07e4d7c0) /* 0.493369818 */, 18 },
+  /* 6821 */  { MAD_F(0x07e53ce4) /* 0.493466275 */, 18 },
+  /* 6822 */  { MAD_F(0x07e5a20a) /* 0.493562738 */, 18 },
+  /* 6823 */  { MAD_F(0x07e60732) /* 0.493659205 */, 18 },
+  /* 6824 */  { MAD_F(0x07e66c5a) /* 0.493755677 */, 18 },
+  /* 6825 */  { MAD_F(0x07e6d184) /* 0.493852154 */, 18 },
+  /* 6826 */  { MAD_F(0x07e736af) /* 0.493948635 */, 18 },
+  /* 6827 */  { MAD_F(0x07e79bdb) /* 0.494045122 */, 18 },
+  /* 6828 */  { MAD_F(0x07e80109) /* 0.494141612 */, 18 },
+  /* 6829 */  { MAD_F(0x07e86638) /* 0.494238108 */, 18 },
+  /* 6830 */  { MAD_F(0x07e8cb68) /* 0.494334608 */, 18 },
+  /* 6831 */  { MAD_F(0x07e93099) /* 0.494431113 */, 18 },
+
+  /* 6832 */  { MAD_F(0x07e995cc) /* 0.494527623 */, 18 },
+  /* 6833 */  { MAD_F(0x07e9fb00) /* 0.494624137 */, 18 },
+  /* 6834 */  { MAD_F(0x07ea6035) /* 0.494720656 */, 18 },
+  /* 6835 */  { MAD_F(0x07eac56b) /* 0.494817180 */, 18 },
+  /* 6836 */  { MAD_F(0x07eb2aa3) /* 0.494913709 */, 18 },
+  /* 6837 */  { MAD_F(0x07eb8fdc) /* 0.495010242 */, 18 },
+  /* 6838 */  { MAD_F(0x07ebf516) /* 0.495106780 */, 18 },
+  /* 6839 */  { MAD_F(0x07ec5a51) /* 0.495203322 */, 18 },
+  /* 6840 */  { MAD_F(0x07ecbf8e) /* 0.495299870 */, 18 },
+  /* 6841 */  { MAD_F(0x07ed24cc) /* 0.495396422 */, 18 },
+  /* 6842 */  { MAD_F(0x07ed8a0b) /* 0.495492978 */, 18 },
+  /* 6843 */  { MAD_F(0x07edef4c) /* 0.495589540 */, 18 },
+  /* 6844 */  { MAD_F(0x07ee548e) /* 0.495686106 */, 18 },
+  /* 6845 */  { MAD_F(0x07eeb9d1) /* 0.495782677 */, 18 },
+  /* 6846 */  { MAD_F(0x07ef1f15) /* 0.495879252 */, 18 },
+  /* 6847 */  { MAD_F(0x07ef845b) /* 0.495975833 */, 18 },
+
+  /* 6848 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 18 },
+  /* 6849 */  { MAD_F(0x07f04ee9) /* 0.496169007 */, 18 },
+  /* 6850 */  { MAD_F(0x07f0b433) /* 0.496265602 */, 18 },
+  /* 6851 */  { MAD_F(0x07f1197d) /* 0.496362201 */, 18 },
+  /* 6852 */  { MAD_F(0x07f17ec9) /* 0.496458804 */, 18 },
+  /* 6853 */  { MAD_F(0x07f1e416) /* 0.496555413 */, 18 },
+  /* 6854 */  { MAD_F(0x07f24965) /* 0.496652026 */, 18 },
+  /* 6855 */  { MAD_F(0x07f2aeb5) /* 0.496748644 */, 18 },
+  /* 6856 */  { MAD_F(0x07f31405) /* 0.496845266 */, 18 },
+  /* 6857 */  { MAD_F(0x07f37958) /* 0.496941894 */, 18 },
+  /* 6858 */  { MAD_F(0x07f3deab) /* 0.497038526 */, 18 },
+  /* 6859 */  { MAD_F(0x07f44400) /* 0.497135162 */, 18 },
+  /* 6860 */  { MAD_F(0x07f4a956) /* 0.497231804 */, 18 },
+  /* 6861 */  { MAD_F(0x07f50ead) /* 0.497328450 */, 18 },
+  /* 6862 */  { MAD_F(0x07f57405) /* 0.497425100 */, 18 },
+  /* 6863 */  { MAD_F(0x07f5d95f) /* 0.497521756 */, 18 },
+
+  /* 6864 */  { MAD_F(0x07f63eba) /* 0.497618416 */, 18 },
+  /* 6865 */  { MAD_F(0x07f6a416) /* 0.497715081 */, 18 },
+  /* 6866 */  { MAD_F(0x07f70974) /* 0.497811750 */, 18 },
+  /* 6867 */  { MAD_F(0x07f76ed3) /* 0.497908425 */, 18 },
+  /* 6868 */  { MAD_F(0x07f7d433) /* 0.498005103 */, 18 },
+  /* 6869 */  { MAD_F(0x07f83994) /* 0.498101787 */, 18 },
+  /* 6870 */  { MAD_F(0x07f89ef7) /* 0.498198475 */, 18 },
+  /* 6871 */  { MAD_F(0x07f9045a) /* 0.498295168 */, 18 },
+  /* 6872 */  { MAD_F(0x07f969c0) /* 0.498391866 */, 18 },
+  /* 6873 */  { MAD_F(0x07f9cf26) /* 0.498488568 */, 18 },
+  /* 6874 */  { MAD_F(0x07fa348e) /* 0.498585275 */, 18 },
+  /* 6875 */  { MAD_F(0x07fa99f6) /* 0.498681987 */, 18 },
+  /* 6876 */  { MAD_F(0x07faff60) /* 0.498778704 */, 18 },
+  /* 6877 */  { MAD_F(0x07fb64cc) /* 0.498875425 */, 18 },
+  /* 6878 */  { MAD_F(0x07fbca38) /* 0.498972150 */, 18 },
+  /* 6879 */  { MAD_F(0x07fc2fa6) /* 0.499068881 */, 18 },
+
+  /* 6880 */  { MAD_F(0x07fc9516) /* 0.499165616 */, 18 },
+  /* 6881 */  { MAD_F(0x07fcfa86) /* 0.499262356 */, 18 },
+  /* 6882 */  { MAD_F(0x07fd5ff8) /* 0.499359101 */, 18 },
+  /* 6883 */  { MAD_F(0x07fdc56b) /* 0.499455850 */, 18 },
+  /* 6884 */  { MAD_F(0x07fe2adf) /* 0.499552604 */, 18 },
+  /* 6885 */  { MAD_F(0x07fe9054) /* 0.499649362 */, 18 },
+  /* 6886 */  { MAD_F(0x07fef5cb) /* 0.499746126 */, 18 },
+  /* 6887 */  { MAD_F(0x07ff5b43) /* 0.499842894 */, 18 },
+  /* 6888 */  { MAD_F(0x07ffc0bc) /* 0.499939666 */, 18 },
+  /* 6889 */  { MAD_F(0x0400131b) /* 0.250018222 */, 19 },
+  /* 6890 */  { MAD_F(0x040045d9) /* 0.250066613 */, 19 },
+  /* 6891 */  { MAD_F(0x04007897) /* 0.250115006 */, 19 },
+  /* 6892 */  { MAD_F(0x0400ab57) /* 0.250163402 */, 19 },
+  /* 6893 */  { MAD_F(0x0400de16) /* 0.250211800 */, 19 },
+  /* 6894 */  { MAD_F(0x040110d7) /* 0.250260200 */, 19 },
+  /* 6895 */  { MAD_F(0x04014398) /* 0.250308603 */, 19 },
+
+  /* 6896 */  { MAD_F(0x04017659) /* 0.250357008 */, 19 },
+  /* 6897 */  { MAD_F(0x0401a91c) /* 0.250405415 */, 19 },
+  /* 6898 */  { MAD_F(0x0401dbdf) /* 0.250453825 */, 19 },
+  /* 6899 */  { MAD_F(0x04020ea2) /* 0.250502237 */, 19 },
+  /* 6900 */  { MAD_F(0x04024166) /* 0.250550652 */, 19 },
+  /* 6901 */  { MAD_F(0x0402742b) /* 0.250599068 */, 19 },
+  /* 6902 */  { MAD_F(0x0402a6f0) /* 0.250647488 */, 19 },
+  /* 6903 */  { MAD_F(0x0402d9b6) /* 0.250695909 */, 19 },
+  /* 6904 */  { MAD_F(0x04030c7d) /* 0.250744333 */, 19 },
+  /* 6905 */  { MAD_F(0x04033f44) /* 0.250792759 */, 19 },
+  /* 6906 */  { MAD_F(0x0403720c) /* 0.250841187 */, 19 },
+  /* 6907 */  { MAD_F(0x0403a4d5) /* 0.250889618 */, 19 },
+  /* 6908 */  { MAD_F(0x0403d79e) /* 0.250938051 */, 19 },
+  /* 6909 */  { MAD_F(0x04040a68) /* 0.250986487 */, 19 },
+  /* 6910 */  { MAD_F(0x04043d32) /* 0.251034924 */, 19 },
+  /* 6911 */  { MAD_F(0x04046ffd) /* 0.251083365 */, 19 },
+
+  /* 6912 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 19 },
+  /* 6913 */  { MAD_F(0x0404d595) /* 0.251180252 */, 19 },
+  /* 6914 */  { MAD_F(0x04050862) /* 0.251228699 */, 19 },
+  /* 6915 */  { MAD_F(0x04053b30) /* 0.251277148 */, 19 },
+  /* 6916 */  { MAD_F(0x04056dfe) /* 0.251325600 */, 19 },
+  /* 6917 */  { MAD_F(0x0405a0cd) /* 0.251374054 */, 19 },
+  /* 6918 */  { MAD_F(0x0405d39c) /* 0.251422511 */, 19 },
+  /* 6919 */  { MAD_F(0x0406066c) /* 0.251470970 */, 19 },
+  /* 6920 */  { MAD_F(0x0406393d) /* 0.251519431 */, 19 },
+  /* 6921 */  { MAD_F(0x04066c0e) /* 0.251567894 */, 19 },
+  /* 6922 */  { MAD_F(0x04069ee0) /* 0.251616360 */, 19 },
+  /* 6923 */  { MAD_F(0x0406d1b3) /* 0.251664828 */, 19 },
+  /* 6924 */  { MAD_F(0x04070486) /* 0.251713299 */, 19 },
+  /* 6925 */  { MAD_F(0x0407375a) /* 0.251761772 */, 19 },
+  /* 6926 */  { MAD_F(0x04076a2e) /* 0.251810247 */, 19 },
+  /* 6927 */  { MAD_F(0x04079d03) /* 0.251858724 */, 19 },
+
+  /* 6928 */  { MAD_F(0x0407cfd9) /* 0.251907204 */, 19 },
+  /* 6929 */  { MAD_F(0x040802af) /* 0.251955686 */, 19 },
+  /* 6930 */  { MAD_F(0x04083586) /* 0.252004171 */, 19 },
+  /* 6931 */  { MAD_F(0x0408685e) /* 0.252052658 */, 19 },
+  /* 6932 */  { MAD_F(0x04089b36) /* 0.252101147 */, 19 },
+  /* 6933 */  { MAD_F(0x0408ce0f) /* 0.252149638 */, 19 },
+  /* 6934 */  { MAD_F(0x040900e8) /* 0.252198132 */, 19 },
+  /* 6935 */  { MAD_F(0x040933c2) /* 0.252246628 */, 19 },
+  /* 6936 */  { MAD_F(0x0409669d) /* 0.252295127 */, 19 },
+  /* 6937 */  { MAD_F(0x04099978) /* 0.252343627 */, 19 },
+  /* 6938 */  { MAD_F(0x0409cc54) /* 0.252392131 */, 19 },
+  /* 6939 */  { MAD_F(0x0409ff31) /* 0.252440636 */, 19 },
+  /* 6940 */  { MAD_F(0x040a320e) /* 0.252489144 */, 19 },
+  /* 6941 */  { MAD_F(0x040a64ec) /* 0.252537654 */, 19 },
+  /* 6942 */  { MAD_F(0x040a97cb) /* 0.252586166 */, 19 },
+  /* 6943 */  { MAD_F(0x040acaaa) /* 0.252634681 */, 19 },
+
+  /* 6944 */  { MAD_F(0x040afd89) /* 0.252683198 */, 19 },
+  /* 6945 */  { MAD_F(0x040b306a) /* 0.252731718 */, 19 },
+  /* 6946 */  { MAD_F(0x040b634b) /* 0.252780240 */, 19 },
+  /* 6947 */  { MAD_F(0x040b962c) /* 0.252828764 */, 19 },
+  /* 6948 */  { MAD_F(0x040bc90e) /* 0.252877290 */, 19 },
+  /* 6949 */  { MAD_F(0x040bfbf1) /* 0.252925819 */, 19 },
+  /* 6950 */  { MAD_F(0x040c2ed5) /* 0.252974350 */, 19 },
+  /* 6951 */  { MAD_F(0x040c61b9) /* 0.253022883 */, 19 },
+  /* 6952 */  { MAD_F(0x040c949e) /* 0.253071419 */, 19 },
+  /* 6953 */  { MAD_F(0x040cc783) /* 0.253119957 */, 19 },
+  /* 6954 */  { MAD_F(0x040cfa69) /* 0.253168498 */, 19 },
+  /* 6955 */  { MAD_F(0x040d2d4f) /* 0.253217040 */, 19 },
+  /* 6956 */  { MAD_F(0x040d6037) /* 0.253265585 */, 19 },
+  /* 6957 */  { MAD_F(0x040d931e) /* 0.253314133 */, 19 },
+  /* 6958 */  { MAD_F(0x040dc607) /* 0.253362682 */, 19 },
+  /* 6959 */  { MAD_F(0x040df8f0) /* 0.253411234 */, 19 },
+
+  /* 6960 */  { MAD_F(0x040e2bda) /* 0.253459789 */, 19 },
+  /* 6961 */  { MAD_F(0x040e5ec4) /* 0.253508345 */, 19 },
+  /* 6962 */  { MAD_F(0x040e91af) /* 0.253556904 */, 19 },
+  /* 6963 */  { MAD_F(0x040ec49b) /* 0.253605466 */, 19 },
+  /* 6964 */  { MAD_F(0x040ef787) /* 0.253654029 */, 19 },
+  /* 6965 */  { MAD_F(0x040f2a74) /* 0.253702595 */, 19 },
+  /* 6966 */  { MAD_F(0x040f5d61) /* 0.253751164 */, 19 },
+  /* 6967 */  { MAD_F(0x040f904f) /* 0.253799734 */, 19 },
+  /* 6968 */  { MAD_F(0x040fc33e) /* 0.253848307 */, 19 },
+  /* 6969 */  { MAD_F(0x040ff62d) /* 0.253896883 */, 19 },
+  /* 6970 */  { MAD_F(0x0410291d) /* 0.253945460 */, 19 },
+  /* 6971 */  { MAD_F(0x04105c0e) /* 0.253994040 */, 19 },
+  /* 6972 */  { MAD_F(0x04108eff) /* 0.254042622 */, 19 },
+  /* 6973 */  { MAD_F(0x0410c1f1) /* 0.254091207 */, 19 },
+  /* 6974 */  { MAD_F(0x0410f4e3) /* 0.254139794 */, 19 },
+  /* 6975 */  { MAD_F(0x041127d6) /* 0.254188383 */, 19 },
+
+  /* 6976 */  { MAD_F(0x04115aca) /* 0.254236974 */, 19 },
+  /* 6977 */  { MAD_F(0x04118dbe) /* 0.254285568 */, 19 },
+  /* 6978 */  { MAD_F(0x0411c0b3) /* 0.254334165 */, 19 },
+  /* 6979 */  { MAD_F(0x0411f3a9) /* 0.254382763 */, 19 },
+  /* 6980 */  { MAD_F(0x0412269f) /* 0.254431364 */, 19 },
+  /* 6981 */  { MAD_F(0x04125996) /* 0.254479967 */, 19 },
+  /* 6982 */  { MAD_F(0x04128c8d) /* 0.254528572 */, 19 },
+  /* 6983 */  { MAD_F(0x0412bf85) /* 0.254577180 */, 19 },
+  /* 6984 */  { MAD_F(0x0412f27e) /* 0.254625790 */, 19 },
+  /* 6985 */  { MAD_F(0x04132577) /* 0.254674403 */, 19 },
+  /* 6986 */  { MAD_F(0x04135871) /* 0.254723017 */, 19 },
+  /* 6987 */  { MAD_F(0x04138b6c) /* 0.254771635 */, 19 },
+  /* 6988 */  { MAD_F(0x0413be67) /* 0.254820254 */, 19 },
+  /* 6989 */  { MAD_F(0x0413f163) /* 0.254868876 */, 19 },
+  /* 6990 */  { MAD_F(0x0414245f) /* 0.254917500 */, 19 },
+  /* 6991 */  { MAD_F(0x0414575c) /* 0.254966126 */, 19 },
+
+  /* 6992 */  { MAD_F(0x04148a5a) /* 0.255014755 */, 19 },
+  /* 6993 */  { MAD_F(0x0414bd58) /* 0.255063386 */, 19 },
+  /* 6994 */  { MAD_F(0x0414f057) /* 0.255112019 */, 19 },
+  /* 6995 */  { MAD_F(0x04152356) /* 0.255160655 */, 19 },
+  /* 6996 */  { MAD_F(0x04155657) /* 0.255209292 */, 19 },
+  /* 6997 */  { MAD_F(0x04158957) /* 0.255257933 */, 19 },
+  /* 6998 */  { MAD_F(0x0415bc59) /* 0.255306575 */, 19 },
+  /* 6999 */  { MAD_F(0x0415ef5b) /* 0.255355220 */, 19 },
+  /* 7000 */  { MAD_F(0x0416225d) /* 0.255403867 */, 19 },
+  /* 7001 */  { MAD_F(0x04165561) /* 0.255452517 */, 19 },
+  /* 7002 */  { MAD_F(0x04168864) /* 0.255501169 */, 19 },
+  /* 7003 */  { MAD_F(0x0416bb69) /* 0.255549823 */, 19 },
+  /* 7004 */  { MAD_F(0x0416ee6e) /* 0.255598479 */, 19 },
+  /* 7005 */  { MAD_F(0x04172174) /* 0.255647138 */, 19 },
+  /* 7006 */  { MAD_F(0x0417547a) /* 0.255695799 */, 19 },
+  /* 7007 */  { MAD_F(0x04178781) /* 0.255744463 */, 19 },
+
+  /* 7008 */  { MAD_F(0x0417ba89) /* 0.255793128 */, 19 },
+  /* 7009 */  { MAD_F(0x0417ed91) /* 0.255841796 */, 19 },
+  /* 7010 */  { MAD_F(0x0418209a) /* 0.255890467 */, 19 },
+  /* 7011 */  { MAD_F(0x041853a3) /* 0.255939139 */, 19 },
+  /* 7012 */  { MAD_F(0x041886ad) /* 0.255987814 */, 19 },
+  /* 7013 */  { MAD_F(0x0418b9b8) /* 0.256036492 */, 19 },
+  /* 7014 */  { MAD_F(0x0418ecc3) /* 0.256085171 */, 19 },
+  /* 7015 */  { MAD_F(0x04191fcf) /* 0.256133853 */, 19 },
+  /* 7016 */  { MAD_F(0x041952dc) /* 0.256182537 */, 19 },
+  /* 7017 */  { MAD_F(0x041985e9) /* 0.256231224 */, 19 },
+  /* 7018 */  { MAD_F(0x0419b8f7) /* 0.256279913 */, 19 },
+  /* 7019 */  { MAD_F(0x0419ec05) /* 0.256328604 */, 19 },
+  /* 7020 */  { MAD_F(0x041a1f15) /* 0.256377297 */, 19 },
+  /* 7021 */  { MAD_F(0x041a5224) /* 0.256425993 */, 19 },
+  /* 7022 */  { MAD_F(0x041a8534) /* 0.256474691 */, 19 },
+  /* 7023 */  { MAD_F(0x041ab845) /* 0.256523392 */, 19 },
+
+  /* 7024 */  { MAD_F(0x041aeb57) /* 0.256572095 */, 19 },
+  /* 7025 */  { MAD_F(0x041b1e69) /* 0.256620800 */, 19 },
+  /* 7026 */  { MAD_F(0x041b517c) /* 0.256669507 */, 19 },
+  /* 7027 */  { MAD_F(0x041b848f) /* 0.256718217 */, 19 },
+  /* 7028 */  { MAD_F(0x041bb7a3) /* 0.256766929 */, 19 },
+  /* 7029 */  { MAD_F(0x041beab8) /* 0.256815643 */, 19 },
+  /* 7030 */  { MAD_F(0x041c1dcd) /* 0.256864359 */, 19 },
+  /* 7031 */  { MAD_F(0x041c50e3) /* 0.256913078 */, 19 },
+  /* 7032 */  { MAD_F(0x041c83fa) /* 0.256961800 */, 19 },
+  /* 7033 */  { MAD_F(0x041cb711) /* 0.257010523 */, 19 },
+  /* 7034 */  { MAD_F(0x041cea28) /* 0.257059249 */, 19 },
+  /* 7035 */  { MAD_F(0x041d1d41) /* 0.257107977 */, 19 },
+  /* 7036 */  { MAD_F(0x041d505a) /* 0.257156708 */, 19 },
+  /* 7037 */  { MAD_F(0x041d8373) /* 0.257205440 */, 19 },
+  /* 7038 */  { MAD_F(0x041db68e) /* 0.257254175 */, 19 },
+  /* 7039 */  { MAD_F(0x041de9a8) /* 0.257302913 */, 19 },
+
+  /* 7040 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 19 },
+  /* 7041 */  { MAD_F(0x041e4fe0) /* 0.257400394 */, 19 },
+  /* 7042 */  { MAD_F(0x041e82fd) /* 0.257449139 */, 19 },
+  /* 7043 */  { MAD_F(0x041eb61a) /* 0.257497885 */, 19 },
+  /* 7044 */  { MAD_F(0x041ee938) /* 0.257546634 */, 19 },
+  /* 7045 */  { MAD_F(0x041f1c57) /* 0.257595386 */, 19 },
+  /* 7046 */  { MAD_F(0x041f4f76) /* 0.257644139 */, 19 },
+  /* 7047 */  { MAD_F(0x041f8296) /* 0.257692895 */, 19 },
+  /* 7048 */  { MAD_F(0x041fb5b6) /* 0.257741653 */, 19 },
+  /* 7049 */  { MAD_F(0x041fe8d7) /* 0.257790414 */, 19 },
+  /* 7050 */  { MAD_F(0x04201bf9) /* 0.257839176 */, 19 },
+  /* 7051 */  { MAD_F(0x04204f1b) /* 0.257887941 */, 19 },
+  /* 7052 */  { MAD_F(0x0420823e) /* 0.257936709 */, 19 },
+  /* 7053 */  { MAD_F(0x0420b561) /* 0.257985478 */, 19 },
+  /* 7054 */  { MAD_F(0x0420e885) /* 0.258034250 */, 19 },
+  /* 7055 */  { MAD_F(0x04211baa) /* 0.258083025 */, 19 },
+
+  /* 7056 */  { MAD_F(0x04214ed0) /* 0.258131801 */, 19 },
+  /* 7057 */  { MAD_F(0x042181f6) /* 0.258180580 */, 19 },
+  /* 7058 */  { MAD_F(0x0421b51c) /* 0.258229361 */, 19 },
+  /* 7059 */  { MAD_F(0x0421e843) /* 0.258278145 */, 19 },
+  /* 7060 */  { MAD_F(0x04221b6b) /* 0.258326931 */, 19 },
+  /* 7061 */  { MAD_F(0x04224e94) /* 0.258375719 */, 19 },
+  /* 7062 */  { MAD_F(0x042281bd) /* 0.258424509 */, 19 },
+  /* 7063 */  { MAD_F(0x0422b4e6) /* 0.258473302 */, 19 },
+  /* 7064 */  { MAD_F(0x0422e811) /* 0.258522097 */, 19 },
+  /* 7065 */  { MAD_F(0x04231b3c) /* 0.258570894 */, 19 },
+  /* 7066 */  { MAD_F(0x04234e67) /* 0.258619694 */, 19 },
+  /* 7067 */  { MAD_F(0x04238193) /* 0.258668496 */, 19 },
+  /* 7068 */  { MAD_F(0x0423b4c0) /* 0.258717300 */, 19 },
+  /* 7069 */  { MAD_F(0x0423e7ee) /* 0.258766106 */, 19 },
+  /* 7070 */  { MAD_F(0x04241b1c) /* 0.258814915 */, 19 },
+  /* 7071 */  { MAD_F(0x04244e4a) /* 0.258863726 */, 19 },
+
+  /* 7072 */  { MAD_F(0x04248179) /* 0.258912540 */, 19 },
+  /* 7073 */  { MAD_F(0x0424b4a9) /* 0.258961356 */, 19 },
+  /* 7074 */  { MAD_F(0x0424e7da) /* 0.259010174 */, 19 },
+  /* 7075 */  { MAD_F(0x04251b0b) /* 0.259058994 */, 19 },
+  /* 7076 */  { MAD_F(0x04254e3d) /* 0.259107817 */, 19 },
+  /* 7077 */  { MAD_F(0x0425816f) /* 0.259156642 */, 19 },
+  /* 7078 */  { MAD_F(0x0425b4a2) /* 0.259205469 */, 19 },
+  /* 7079 */  { MAD_F(0x0425e7d6) /* 0.259254298 */, 19 },
+  /* 7080 */  { MAD_F(0x04261b0a) /* 0.259303130 */, 19 },
+  /* 7081 */  { MAD_F(0x04264e3f) /* 0.259351964 */, 19 },
+  /* 7082 */  { MAD_F(0x04268174) /* 0.259400801 */, 19 },
+  /* 7083 */  { MAD_F(0x0426b4aa) /* 0.259449639 */, 19 },
+  /* 7084 */  { MAD_F(0x0426e7e1) /* 0.259498480 */, 19 },
+  /* 7085 */  { MAD_F(0x04271b18) /* 0.259547324 */, 19 },
+  /* 7086 */  { MAD_F(0x04274e50) /* 0.259596169 */, 19 },
+  /* 7087 */  { MAD_F(0x04278188) /* 0.259645017 */, 19 },
+
+  /* 7088 */  { MAD_F(0x0427b4c2) /* 0.259693868 */, 19 },
+  /* 7089 */  { MAD_F(0x0427e7fb) /* 0.259742720 */, 19 },
+  /* 7090 */  { MAD_F(0x04281b36) /* 0.259791575 */, 19 },
+  /* 7091 */  { MAD_F(0x04284e71) /* 0.259840432 */, 19 },
+  /* 7092 */  { MAD_F(0x042881ac) /* 0.259889291 */, 19 },
+  /* 7093 */  { MAD_F(0x0428b4e8) /* 0.259938153 */, 19 },
+  /* 7094 */  { MAD_F(0x0428e825) /* 0.259987017 */, 19 },
+  /* 7095 */  { MAD_F(0x04291b63) /* 0.260035883 */, 19 },
+  /* 7096 */  { MAD_F(0x04294ea1) /* 0.260084752 */, 19 },
+  /* 7097 */  { MAD_F(0x042981df) /* 0.260133623 */, 19 },
+  /* 7098 */  { MAD_F(0x0429b51f) /* 0.260182496 */, 19 },
+  /* 7099 */  { MAD_F(0x0429e85f) /* 0.260231372 */, 19 },
+  /* 7100 */  { MAD_F(0x042a1b9f) /* 0.260280249 */, 19 },
+  /* 7101 */  { MAD_F(0x042a4ee0) /* 0.260329129 */, 19 },
+  /* 7102 */  { MAD_F(0x042a8222) /* 0.260378012 */, 19 },
+  /* 7103 */  { MAD_F(0x042ab564) /* 0.260426896 */, 19 },
+
+  /* 7104 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 19 },
+  /* 7105 */  { MAD_F(0x042b1beb) /* 0.260524673 */, 19 },
+  /* 7106 */  { MAD_F(0x042b4f2f) /* 0.260573564 */, 19 },
+  /* 7107 */  { MAD_F(0x042b8274) /* 0.260622458 */, 19 },
+  /* 7108 */  { MAD_F(0x042bb5ba) /* 0.260671354 */, 19 },
+  /* 7109 */  { MAD_F(0x042be900) /* 0.260720252 */, 19 },
+  /* 7110 */  { MAD_F(0x042c1c46) /* 0.260769153 */, 19 },
+  /* 7111 */  { MAD_F(0x042c4f8e) /* 0.260818056 */, 19 },
+  /* 7112 */  { MAD_F(0x042c82d6) /* 0.260866961 */, 19 },
+  /* 7113 */  { MAD_F(0x042cb61e) /* 0.260915869 */, 19 },
+  /* 7114 */  { MAD_F(0x042ce967) /* 0.260964779 */, 19 },
+  /* 7115 */  { MAD_F(0x042d1cb1) /* 0.261013691 */, 19 },
+  /* 7116 */  { MAD_F(0x042d4ffb) /* 0.261062606 */, 19 },
+  /* 7117 */  { MAD_F(0x042d8346) /* 0.261111522 */, 19 },
+  /* 7118 */  { MAD_F(0x042db692) /* 0.261160441 */, 19 },
+  /* 7119 */  { MAD_F(0x042de9de) /* 0.261209363 */, 19 },
+
+  /* 7120 */  { MAD_F(0x042e1d2b) /* 0.261258286 */, 19 },
+  /* 7121 */  { MAD_F(0x042e5078) /* 0.261307212 */, 19 },
+  /* 7122 */  { MAD_F(0x042e83c6) /* 0.261356140 */, 19 },
+  /* 7123 */  { MAD_F(0x042eb715) /* 0.261405071 */, 19 },
+  /* 7124 */  { MAD_F(0x042eea64) /* 0.261454004 */, 19 },
+  /* 7125 */  { MAD_F(0x042f1db4) /* 0.261502939 */, 19 },
+  /* 7126 */  { MAD_F(0x042f5105) /* 0.261551876 */, 19 },
+  /* 7127 */  { MAD_F(0x042f8456) /* 0.261600816 */, 19 },
+  /* 7128 */  { MAD_F(0x042fb7a8) /* 0.261649758 */, 19 },
+  /* 7129 */  { MAD_F(0x042feafa) /* 0.261698702 */, 19 },
+  /* 7130 */  { MAD_F(0x04301e4d) /* 0.261747649 */, 19 },
+  /* 7131 */  { MAD_F(0x043051a1) /* 0.261796597 */, 19 },
+  /* 7132 */  { MAD_F(0x043084f5) /* 0.261845548 */, 19 },
+  /* 7133 */  { MAD_F(0x0430b84a) /* 0.261894502 */, 19 },
+  /* 7134 */  { MAD_F(0x0430eb9f) /* 0.261943458 */, 19 },
+  /* 7135 */  { MAD_F(0x04311ef5) /* 0.261992416 */, 19 },
+
+  /* 7136 */  { MAD_F(0x0431524c) /* 0.262041376 */, 19 },
+  /* 7137 */  { MAD_F(0x043185a3) /* 0.262090338 */, 19 },
+  /* 7138 */  { MAD_F(0x0431b8fb) /* 0.262139303 */, 19 },
+  /* 7139 */  { MAD_F(0x0431ec54) /* 0.262188270 */, 19 },
+  /* 7140 */  { MAD_F(0x04321fad) /* 0.262237240 */, 19 },
+  /* 7141 */  { MAD_F(0x04325306) /* 0.262286211 */, 19 },
+  /* 7142 */  { MAD_F(0x04328661) /* 0.262335185 */, 19 },
+  /* 7143 */  { MAD_F(0x0432b9bc) /* 0.262384162 */, 19 },
+  /* 7144 */  { MAD_F(0x0432ed17) /* 0.262433140 */, 19 },
+  /* 7145 */  { MAD_F(0x04332074) /* 0.262482121 */, 19 },
+  /* 7146 */  { MAD_F(0x043353d0) /* 0.262531104 */, 19 },
+  /* 7147 */  { MAD_F(0x0433872e) /* 0.262580089 */, 19 },
+  /* 7148 */  { MAD_F(0x0433ba8c) /* 0.262629077 */, 19 },
+  /* 7149 */  { MAD_F(0x0433edea) /* 0.262678067 */, 19 },
+  /* 7150 */  { MAD_F(0x0434214a) /* 0.262727059 */, 19 },
+  /* 7151 */  { MAD_F(0x043454aa) /* 0.262776054 */, 19 },
+
+  /* 7152 */  { MAD_F(0x0434880a) /* 0.262825051 */, 19 },
+  /* 7153 */  { MAD_F(0x0434bb6b) /* 0.262874050 */, 19 },
+  /* 7154 */  { MAD_F(0x0434eecd) /* 0.262923051 */, 19 },
+  /* 7155 */  { MAD_F(0x0435222f) /* 0.262972055 */, 19 },
+  /* 7156 */  { MAD_F(0x04355592) /* 0.263021061 */, 19 },
+  /* 7157 */  { MAD_F(0x043588f6) /* 0.263070069 */, 19 },
+  /* 7158 */  { MAD_F(0x0435bc5a) /* 0.263119079 */, 19 },
+  /* 7159 */  { MAD_F(0x0435efbf) /* 0.263168092 */, 19 },
+  /* 7160 */  { MAD_F(0x04362324) /* 0.263217107 */, 19 },
+  /* 7161 */  { MAD_F(0x0436568a) /* 0.263266125 */, 19 },
+  /* 7162 */  { MAD_F(0x043689f1) /* 0.263315144 */, 19 },
+  /* 7163 */  { MAD_F(0x0436bd58) /* 0.263364166 */, 19 },
+  /* 7164 */  { MAD_F(0x0436f0c0) /* 0.263413191 */, 19 },
+  /* 7165 */  { MAD_F(0x04372428) /* 0.263462217 */, 19 },
+  /* 7166 */  { MAD_F(0x04375791) /* 0.263511246 */, 19 },
+  /* 7167 */  { MAD_F(0x04378afb) /* 0.263560277 */, 19 },
+
+  /* 7168 */  { MAD_F(0x0437be65) /* 0.263609310 */, 19 },
+  /* 7169 */  { MAD_F(0x0437f1d0) /* 0.263658346 */, 19 },
+  /* 7170 */  { MAD_F(0x0438253c) /* 0.263707384 */, 19 },
+  /* 7171 */  { MAD_F(0x043858a8) /* 0.263756424 */, 19 },
+  /* 7172 */  { MAD_F(0x04388c14) /* 0.263805466 */, 19 },
+  /* 7173 */  { MAD_F(0x0438bf82) /* 0.263854511 */, 19 },
+  /* 7174 */  { MAD_F(0x0438f2f0) /* 0.263903558 */, 19 },
+  /* 7175 */  { MAD_F(0x0439265e) /* 0.263952607 */, 19 },
+  /* 7176 */  { MAD_F(0x043959cd) /* 0.264001659 */, 19 },
+  /* 7177 */  { MAD_F(0x04398d3d) /* 0.264050713 */, 19 },
+  /* 7178 */  { MAD_F(0x0439c0ae) /* 0.264099769 */, 19 },
+  /* 7179 */  { MAD_F(0x0439f41f) /* 0.264148827 */, 19 },
+  /* 7180 */  { MAD_F(0x043a2790) /* 0.264197888 */, 19 },
+  /* 7181 */  { MAD_F(0x043a5b02) /* 0.264246951 */, 19 },
+  /* 7182 */  { MAD_F(0x043a8e75) /* 0.264296016 */, 19 },
+  /* 7183 */  { MAD_F(0x043ac1e9) /* 0.264345084 */, 19 },
+
+  /* 7184 */  { MAD_F(0x043af55d) /* 0.264394153 */, 19 },
+  /* 7185 */  { MAD_F(0x043b28d2) /* 0.264443225 */, 19 },
+  /* 7186 */  { MAD_F(0x043b5c47) /* 0.264492300 */, 19 },
+  /* 7187 */  { MAD_F(0x043b8fbd) /* 0.264541376 */, 19 },
+  /* 7188 */  { MAD_F(0x043bc333) /* 0.264590455 */, 19 },
+  /* 7189 */  { MAD_F(0x043bf6aa) /* 0.264639536 */, 19 },
+  /* 7190 */  { MAD_F(0x043c2a22) /* 0.264688620 */, 19 },
+  /* 7191 */  { MAD_F(0x043c5d9a) /* 0.264737706 */, 19 },
+  /* 7192 */  { MAD_F(0x043c9113) /* 0.264786794 */, 19 },
+  /* 7193 */  { MAD_F(0x043cc48d) /* 0.264835884 */, 19 },
+  /* 7194 */  { MAD_F(0x043cf807) /* 0.264884976 */, 19 },
+  /* 7195 */  { MAD_F(0x043d2b82) /* 0.264934071 */, 19 },
+  /* 7196 */  { MAD_F(0x043d5efd) /* 0.264983168 */, 19 },
+  /* 7197 */  { MAD_F(0x043d9279) /* 0.265032268 */, 19 },
+  /* 7198 */  { MAD_F(0x043dc5f6) /* 0.265081369 */, 19 },
+  /* 7199 */  { MAD_F(0x043df973) /* 0.265130473 */, 19 },
+
+  /* 7200 */  { MAD_F(0x043e2cf1) /* 0.265179580 */, 19 },
+  /* 7201 */  { MAD_F(0x043e6070) /* 0.265228688 */, 19 },
+  /* 7202 */  { MAD_F(0x043e93ef) /* 0.265277799 */, 19 },
+  /* 7203 */  { MAD_F(0x043ec76e) /* 0.265326912 */, 19 },
+  /* 7204 */  { MAD_F(0x043efaef) /* 0.265376027 */, 19 },
+  /* 7205 */  { MAD_F(0x043f2e6f) /* 0.265425145 */, 19 },
+  /* 7206 */  { MAD_F(0x043f61f1) /* 0.265474264 */, 19 },
+  /* 7207 */  { MAD_F(0x043f9573) /* 0.265523387 */, 19 },
+  /* 7208 */  { MAD_F(0x043fc8f6) /* 0.265572511 */, 19 },
+  /* 7209 */  { MAD_F(0x043ffc79) /* 0.265621638 */, 19 },
+  /* 7210 */  { MAD_F(0x04402ffd) /* 0.265670766 */, 19 },
+  /* 7211 */  { MAD_F(0x04406382) /* 0.265719898 */, 19 },
+  /* 7212 */  { MAD_F(0x04409707) /* 0.265769031 */, 19 },
+  /* 7213 */  { MAD_F(0x0440ca8d) /* 0.265818167 */, 19 },
+  /* 7214 */  { MAD_F(0x0440fe13) /* 0.265867305 */, 19 },
+  /* 7215 */  { MAD_F(0x0441319a) /* 0.265916445 */, 19 },
+
+  /* 7216 */  { MAD_F(0x04416522) /* 0.265965588 */, 19 },
+  /* 7217 */  { MAD_F(0x044198aa) /* 0.266014732 */, 19 },
+  /* 7218 */  { MAD_F(0x0441cc33) /* 0.266063880 */, 19 },
+  /* 7219 */  { MAD_F(0x0441ffbc) /* 0.266113029 */, 19 },
+  /* 7220 */  { MAD_F(0x04423346) /* 0.266162181 */, 19 },
+  /* 7221 */  { MAD_F(0x044266d1) /* 0.266211334 */, 19 },
+  /* 7222 */  { MAD_F(0x04429a5c) /* 0.266260491 */, 19 },
+  /* 7223 */  { MAD_F(0x0442cde8) /* 0.266309649 */, 19 },
+  /* 7224 */  { MAD_F(0x04430174) /* 0.266358810 */, 19 },
+  /* 7225 */  { MAD_F(0x04433501) /* 0.266407973 */, 19 },
+  /* 7226 */  { MAD_F(0x0443688f) /* 0.266457138 */, 19 },
+  /* 7227 */  { MAD_F(0x04439c1d) /* 0.266506305 */, 19 },
+  /* 7228 */  { MAD_F(0x0443cfac) /* 0.266555475 */, 19 },
+  /* 7229 */  { MAD_F(0x0444033c) /* 0.266604647 */, 19 },
+  /* 7230 */  { MAD_F(0x044436cc) /* 0.266653822 */, 19 },
+  /* 7231 */  { MAD_F(0x04446a5d) /* 0.266702998 */, 19 },
+
+  /* 7232 */  { MAD_F(0x04449dee) /* 0.266752177 */, 19 },
+  /* 7233 */  { MAD_F(0x0444d180) /* 0.266801358 */, 19 },
+  /* 7234 */  { MAD_F(0x04450513) /* 0.266850541 */, 19 },
+  /* 7235 */  { MAD_F(0x044538a6) /* 0.266899727 */, 19 },
+  /* 7236 */  { MAD_F(0x04456c39) /* 0.266948915 */, 19 },
+  /* 7237 */  { MAD_F(0x04459fce) /* 0.266998105 */, 19 },
+  /* 7238 */  { MAD_F(0x0445d363) /* 0.267047298 */, 19 },
+  /* 7239 */  { MAD_F(0x044606f8) /* 0.267096492 */, 19 },
+  /* 7240 */  { MAD_F(0x04463a8f) /* 0.267145689 */, 19 },
+  /* 7241 */  { MAD_F(0x04466e25) /* 0.267194888 */, 19 },
+  /* 7242 */  { MAD_F(0x0446a1bd) /* 0.267244090 */, 19 },
+  /* 7243 */  { MAD_F(0x0446d555) /* 0.267293294 */, 19 },
+  /* 7244 */  { MAD_F(0x044708ee) /* 0.267342500 */, 19 },
+  /* 7245 */  { MAD_F(0x04473c87) /* 0.267391708 */, 19 },
+  /* 7246 */  { MAD_F(0x04477021) /* 0.267440919 */, 19 },
+  /* 7247 */  { MAD_F(0x0447a3bb) /* 0.267490131 */, 19 },
+
+  /* 7248 */  { MAD_F(0x0447d756) /* 0.267539347 */, 19 },
+  /* 7249 */  { MAD_F(0x04480af2) /* 0.267588564 */, 19 },
+  /* 7250 */  { MAD_F(0x04483e8e) /* 0.267637783 */, 19 },
+  /* 7251 */  { MAD_F(0x0448722b) /* 0.267687005 */, 19 },
+  /* 7252 */  { MAD_F(0x0448a5c9) /* 0.267736229 */, 19 },
+  /* 7253 */  { MAD_F(0x0448d967) /* 0.267785456 */, 19 },
+  /* 7254 */  { MAD_F(0x04490d05) /* 0.267834685 */, 19 },
+  /* 7255 */  { MAD_F(0x044940a5) /* 0.267883915 */, 19 },
+  /* 7256 */  { MAD_F(0x04497445) /* 0.267933149 */, 19 },
+  /* 7257 */  { MAD_F(0x0449a7e5) /* 0.267982384 */, 19 },
+  /* 7258 */  { MAD_F(0x0449db86) /* 0.268031622 */, 19 },
+  /* 7259 */  { MAD_F(0x044a0f28) /* 0.268080862 */, 19 },
+  /* 7260 */  { MAD_F(0x044a42ca) /* 0.268130104 */, 19 },
+  /* 7261 */  { MAD_F(0x044a766d) /* 0.268179349 */, 19 },
+  /* 7262 */  { MAD_F(0x044aaa11) /* 0.268228595 */, 19 },
+  /* 7263 */  { MAD_F(0x044addb5) /* 0.268277844 */, 19 },
+
+  /* 7264 */  { MAD_F(0x044b115a) /* 0.268327096 */, 19 },
+  /* 7265 */  { MAD_F(0x044b44ff) /* 0.268376349 */, 19 },
+  /* 7266 */  { MAD_F(0x044b78a5) /* 0.268425605 */, 19 },
+  /* 7267 */  { MAD_F(0x044bac4c) /* 0.268474863 */, 19 },
+  /* 7268 */  { MAD_F(0x044bdff3) /* 0.268524123 */, 19 },
+  /* 7269 */  { MAD_F(0x044c139b) /* 0.268573386 */, 19 },
+  /* 7270 */  { MAD_F(0x044c4743) /* 0.268622651 */, 19 },
+  /* 7271 */  { MAD_F(0x044c7aec) /* 0.268671918 */, 19 },
+  /* 7272 */  { MAD_F(0x044cae96) /* 0.268721187 */, 19 },
+  /* 7273 */  { MAD_F(0x044ce240) /* 0.268770459 */, 19 },
+  /* 7274 */  { MAD_F(0x044d15eb) /* 0.268819733 */, 19 },
+  /* 7275 */  { MAD_F(0x044d4997) /* 0.268869009 */, 19 },
+  /* 7276 */  { MAD_F(0x044d7d43) /* 0.268918287 */, 19 },
+  /* 7277 */  { MAD_F(0x044db0ef) /* 0.268967568 */, 19 },
+  /* 7278 */  { MAD_F(0x044de49d) /* 0.269016851 */, 19 },
+  /* 7279 */  { MAD_F(0x044e184b) /* 0.269066136 */, 19 },
+
+  /* 7280 */  { MAD_F(0x044e4bf9) /* 0.269115423 */, 19 },
+  /* 7281 */  { MAD_F(0x044e7fa8) /* 0.269164713 */, 19 },
+  /* 7282 */  { MAD_F(0x044eb358) /* 0.269214005 */, 19 },
+  /* 7283 */  { MAD_F(0x044ee708) /* 0.269263299 */, 19 },
+  /* 7284 */  { MAD_F(0x044f1ab9) /* 0.269312595 */, 19 },
+  /* 7285 */  { MAD_F(0x044f4e6b) /* 0.269361894 */, 19 },
+  /* 7286 */  { MAD_F(0x044f821d) /* 0.269411195 */, 19 },
+  /* 7287 */  { MAD_F(0x044fb5cf) /* 0.269460498 */, 19 },
+  /* 7288 */  { MAD_F(0x044fe983) /* 0.269509804 */, 19 },
+  /* 7289 */  { MAD_F(0x04501d37) /* 0.269559111 */, 19 },
+  /* 7290 */  { MAD_F(0x045050eb) /* 0.269608421 */, 19 },
+  /* 7291 */  { MAD_F(0x045084a0) /* 0.269657734 */, 19 },
+  /* 7292 */  { MAD_F(0x0450b856) /* 0.269707048 */, 19 },
+  /* 7293 */  { MAD_F(0x0450ec0d) /* 0.269756365 */, 19 },
+  /* 7294 */  { MAD_F(0x04511fc4) /* 0.269805684 */, 19 },
+  /* 7295 */  { MAD_F(0x0451537b) /* 0.269855005 */, 19 },
+
+  /* 7296 */  { MAD_F(0x04518733) /* 0.269904329 */, 19 },
+  /* 7297 */  { MAD_F(0x0451baec) /* 0.269953654 */, 19 },
+  /* 7298 */  { MAD_F(0x0451eea5) /* 0.270002982 */, 19 },
+  /* 7299 */  { MAD_F(0x0452225f) /* 0.270052313 */, 19 },
+  /* 7300 */  { MAD_F(0x0452561a) /* 0.270101645 */, 19 },
+  /* 7301 */  { MAD_F(0x045289d5) /* 0.270150980 */, 19 },
+  /* 7302 */  { MAD_F(0x0452bd91) /* 0.270200317 */, 19 },
+  /* 7303 */  { MAD_F(0x0452f14d) /* 0.270249656 */, 19 },
+  /* 7304 */  { MAD_F(0x0453250a) /* 0.270298998 */, 19 },
+  /* 7305 */  { MAD_F(0x045358c8) /* 0.270348341 */, 19 },
+  /* 7306 */  { MAD_F(0x04538c86) /* 0.270397687 */, 19 },
+  /* 7307 */  { MAD_F(0x0453c045) /* 0.270447036 */, 19 },
+  /* 7308 */  { MAD_F(0x0453f405) /* 0.270496386 */, 19 },
+  /* 7309 */  { MAD_F(0x045427c5) /* 0.270545739 */, 19 },
+  /* 7310 */  { MAD_F(0x04545b85) /* 0.270595094 */, 19 },
+  /* 7311 */  { MAD_F(0x04548f46) /* 0.270644451 */, 19 },
+
+  /* 7312 */  { MAD_F(0x0454c308) /* 0.270693811 */, 19 },
+  /* 7313 */  { MAD_F(0x0454f6cb) /* 0.270743173 */, 19 },
+  /* 7314 */  { MAD_F(0x04552a8e) /* 0.270792537 */, 19 },
+  /* 7315 */  { MAD_F(0x04555e51) /* 0.270841903 */, 19 },
+  /* 7316 */  { MAD_F(0x04559216) /* 0.270891271 */, 19 },
+  /* 7317 */  { MAD_F(0x0455c5db) /* 0.270940642 */, 19 },
+  /* 7318 */  { MAD_F(0x0455f9a0) /* 0.270990015 */, 19 },
+  /* 7319 */  { MAD_F(0x04562d66) /* 0.271039390 */, 19 },
+  /* 7320 */  { MAD_F(0x0456612d) /* 0.271088768 */, 19 },
+  /* 7321 */  { MAD_F(0x045694f4) /* 0.271138148 */, 19 },
+  /* 7322 */  { MAD_F(0x0456c8bc) /* 0.271187530 */, 19 },
+  /* 7323 */  { MAD_F(0x0456fc84) /* 0.271236914 */, 19 },
+  /* 7324 */  { MAD_F(0x0457304e) /* 0.271286301 */, 19 },
+  /* 7325 */  { MAD_F(0x04576417) /* 0.271335689 */, 19 },
+  /* 7326 */  { MAD_F(0x045797e2) /* 0.271385080 */, 19 },
+  /* 7327 */  { MAD_F(0x0457cbac) /* 0.271434474 */, 19 },
+
+  /* 7328 */  { MAD_F(0x0457ff78) /* 0.271483869 */, 19 },
+  /* 7329 */  { MAD_F(0x04583344) /* 0.271533267 */, 19 },
+  /* 7330 */  { MAD_F(0x04586711) /* 0.271582667 */, 19 },
+  /* 7331 */  { MAD_F(0x04589ade) /* 0.271632069 */, 19 },
+  /* 7332 */  { MAD_F(0x0458ceac) /* 0.271681474 */, 19 },
+  /* 7333 */  { MAD_F(0x0459027b) /* 0.271730880 */, 19 },
+  /* 7334 */  { MAD_F(0x0459364a) /* 0.271780289 */, 19 },
+  /* 7335 */  { MAD_F(0x04596a19) /* 0.271829701 */, 19 },
+  /* 7336 */  { MAD_F(0x04599dea) /* 0.271879114 */, 19 },
+  /* 7337 */  { MAD_F(0x0459d1bb) /* 0.271928530 */, 19 },
+  /* 7338 */  { MAD_F(0x045a058c) /* 0.271977948 */, 19 },
+  /* 7339 */  { MAD_F(0x045a395e) /* 0.272027368 */, 19 },
+  /* 7340 */  { MAD_F(0x045a6d31) /* 0.272076790 */, 19 },
+  /* 7341 */  { MAD_F(0x045aa104) /* 0.272126215 */, 19 },
+  /* 7342 */  { MAD_F(0x045ad4d8) /* 0.272175642 */, 19 },
+  /* 7343 */  { MAD_F(0x045b08ad) /* 0.272225071 */, 19 },
+
+  /* 7344 */  { MAD_F(0x045b3c82) /* 0.272274503 */, 19 },
+  /* 7345 */  { MAD_F(0x045b7058) /* 0.272323936 */, 19 },
+  /* 7346 */  { MAD_F(0x045ba42e) /* 0.272373372 */, 19 },
+  /* 7347 */  { MAD_F(0x045bd805) /* 0.272422810 */, 19 },
+  /* 7348 */  { MAD_F(0x045c0bdd) /* 0.272472251 */, 19 },
+  /* 7349 */  { MAD_F(0x045c3fb5) /* 0.272521693 */, 19 },
+  /* 7350 */  { MAD_F(0x045c738e) /* 0.272571138 */, 19 },
+  /* 7351 */  { MAD_F(0x045ca767) /* 0.272620585 */, 19 },
+  /* 7352 */  { MAD_F(0x045cdb41) /* 0.272670035 */, 19 },
+  /* 7353 */  { MAD_F(0x045d0f1b) /* 0.272719486 */, 19 },
+  /* 7354 */  { MAD_F(0x045d42f7) /* 0.272768940 */, 19 },
+  /* 7355 */  { MAD_F(0x045d76d2) /* 0.272818396 */, 19 },
+  /* 7356 */  { MAD_F(0x045daaaf) /* 0.272867855 */, 19 },
+  /* 7357 */  { MAD_F(0x045dde8c) /* 0.272917315 */, 19 },
+  /* 7358 */  { MAD_F(0x045e1269) /* 0.272966778 */, 19 },
+  /* 7359 */  { MAD_F(0x045e4647) /* 0.273016243 */, 19 },
+
+  /* 7360 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 19 },
+  /* 7361 */  { MAD_F(0x045eae06) /* 0.273115180 */, 19 },
+  /* 7362 */  { MAD_F(0x045ee1e6) /* 0.273164652 */, 19 },
+  /* 7363 */  { MAD_F(0x045f15c6) /* 0.273214126 */, 19 },
+  /* 7364 */  { MAD_F(0x045f49a7) /* 0.273263602 */, 19 },
+  /* 7365 */  { MAD_F(0x045f7d89) /* 0.273313081 */, 19 },
+  /* 7366 */  { MAD_F(0x045fb16c) /* 0.273362561 */, 19 },
+  /* 7367 */  { MAD_F(0x045fe54f) /* 0.273412044 */, 19 },
+  /* 7368 */  { MAD_F(0x04601932) /* 0.273461530 */, 19 },
+  /* 7369 */  { MAD_F(0x04604d16) /* 0.273511017 */, 19 },
+  /* 7370 */  { MAD_F(0x046080fb) /* 0.273560507 */, 19 },
+  /* 7371 */  { MAD_F(0x0460b4e1) /* 0.273609999 */, 19 },
+  /* 7372 */  { MAD_F(0x0460e8c7) /* 0.273659493 */, 19 },
+  /* 7373 */  { MAD_F(0x04611cad) /* 0.273708989 */, 19 },
+  /* 7374 */  { MAD_F(0x04615094) /* 0.273758488 */, 19 },
+  /* 7375 */  { MAD_F(0x0461847c) /* 0.273807989 */, 19 },
+
+  /* 7376 */  { MAD_F(0x0461b864) /* 0.273857492 */, 19 },
+  /* 7377 */  { MAD_F(0x0461ec4d) /* 0.273906997 */, 19 },
+  /* 7378 */  { MAD_F(0x04622037) /* 0.273956505 */, 19 },
+  /* 7379 */  { MAD_F(0x04625421) /* 0.274006015 */, 19 },
+  /* 7380 */  { MAD_F(0x0462880c) /* 0.274055527 */, 19 },
+  /* 7381 */  { MAD_F(0x0462bbf7) /* 0.274105041 */, 19 },
+  /* 7382 */  { MAD_F(0x0462efe3) /* 0.274154558 */, 19 },
+  /* 7383 */  { MAD_F(0x046323d0) /* 0.274204076 */, 19 },
+  /* 7384 */  { MAD_F(0x046357bd) /* 0.274253597 */, 19 },
+  /* 7385 */  { MAD_F(0x04638bab) /* 0.274303121 */, 19 },
+  /* 7386 */  { MAD_F(0x0463bf99) /* 0.274352646 */, 19 },
+  /* 7387 */  { MAD_F(0x0463f388) /* 0.274402174 */, 19 },
+  /* 7388 */  { MAD_F(0x04642778) /* 0.274451704 */, 19 },
+  /* 7389 */  { MAD_F(0x04645b68) /* 0.274501236 */, 19 },
+  /* 7390 */  { MAD_F(0x04648f59) /* 0.274550771 */, 19 },
+  /* 7391 */  { MAD_F(0x0464c34a) /* 0.274600307 */, 19 },
+
+  /* 7392 */  { MAD_F(0x0464f73c) /* 0.274649846 */, 19 },
+  /* 7393 */  { MAD_F(0x04652b2f) /* 0.274699387 */, 19 },
+  /* 7394 */  { MAD_F(0x04655f22) /* 0.274748931 */, 19 },
+  /* 7395 */  { MAD_F(0x04659316) /* 0.274798476 */, 19 },
+  /* 7396 */  { MAD_F(0x0465c70a) /* 0.274848024 */, 19 },
+  /* 7397 */  { MAD_F(0x0465faff) /* 0.274897574 */, 19 },
+  /* 7398 */  { MAD_F(0x04662ef5) /* 0.274947126 */, 19 },
+  /* 7399 */  { MAD_F(0x046662eb) /* 0.274996681 */, 19 },
+  /* 7400 */  { MAD_F(0x046696e2) /* 0.275046238 */, 19 },
+  /* 7401 */  { MAD_F(0x0466cad9) /* 0.275095797 */, 19 },
+  /* 7402 */  { MAD_F(0x0466fed1) /* 0.275145358 */, 19 },
+  /* 7403 */  { MAD_F(0x046732ca) /* 0.275194921 */, 19 },
+  /* 7404 */  { MAD_F(0x046766c3) /* 0.275244487 */, 19 },
+  /* 7405 */  { MAD_F(0x04679abd) /* 0.275294055 */, 19 },
+  /* 7406 */  { MAD_F(0x0467ceb7) /* 0.275343625 */, 19 },
+  /* 7407 */  { MAD_F(0x046802b2) /* 0.275393198 */, 19 },
+
+  /* 7408 */  { MAD_F(0x046836ae) /* 0.275442772 */, 19 },
+  /* 7409 */  { MAD_F(0x04686aaa) /* 0.275492349 */, 19 },
+  /* 7410 */  { MAD_F(0x04689ea7) /* 0.275541928 */, 19 },
+  /* 7411 */  { MAD_F(0x0468d2a4) /* 0.275591509 */, 19 },
+  /* 7412 */  { MAD_F(0x046906a2) /* 0.275641093 */, 19 },
+  /* 7413 */  { MAD_F(0x04693aa1) /* 0.275690679 */, 19 },
+  /* 7414 */  { MAD_F(0x04696ea0) /* 0.275740267 */, 19 },
+  /* 7415 */  { MAD_F(0x0469a2a0) /* 0.275789857 */, 19 },
+  /* 7416 */  { MAD_F(0x0469d6a0) /* 0.275839449 */, 19 },
+  /* 7417 */  { MAD_F(0x046a0aa1) /* 0.275889044 */, 19 },
+  /* 7418 */  { MAD_F(0x046a3ea3) /* 0.275938641 */, 19 },
+  /* 7419 */  { MAD_F(0x046a72a5) /* 0.275988240 */, 19 },
+  /* 7420 */  { MAD_F(0x046aa6a8) /* 0.276037842 */, 19 },
+  /* 7421 */  { MAD_F(0x046adaab) /* 0.276087445 */, 19 },
+  /* 7422 */  { MAD_F(0x046b0eaf) /* 0.276137051 */, 19 },
+  /* 7423 */  { MAD_F(0x046b42b3) /* 0.276186659 */, 19 },
+
+  /* 7424 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 19 },
+  /* 7425 */  { MAD_F(0x046baabe) /* 0.276285882 */, 19 },
+  /* 7426 */  { MAD_F(0x046bdec5) /* 0.276335497 */, 19 },
+  /* 7427 */  { MAD_F(0x046c12cc) /* 0.276385113 */, 19 },
+  /* 7428 */  { MAD_F(0x046c46d3) /* 0.276434733 */, 19 },
+  /* 7429 */  { MAD_F(0x046c7adb) /* 0.276484354 */, 19 },
+  /* 7430 */  { MAD_F(0x046caee4) /* 0.276533978 */, 19 },
+  /* 7431 */  { MAD_F(0x046ce2ee) /* 0.276583604 */, 19 },
+  /* 7432 */  { MAD_F(0x046d16f7) /* 0.276633232 */, 19 },
+  /* 7433 */  { MAD_F(0x046d4b02) /* 0.276682862 */, 19 },
+  /* 7434 */  { MAD_F(0x046d7f0d) /* 0.276732495 */, 19 },
+  /* 7435 */  { MAD_F(0x046db319) /* 0.276782129 */, 19 },
+  /* 7436 */  { MAD_F(0x046de725) /* 0.276831766 */, 19 },
+  /* 7437 */  { MAD_F(0x046e1b32) /* 0.276881406 */, 19 },
+  /* 7438 */  { MAD_F(0x046e4f40) /* 0.276931047 */, 19 },
+  /* 7439 */  { MAD_F(0x046e834e) /* 0.276980691 */, 19 },
+
+  /* 7440 */  { MAD_F(0x046eb75c) /* 0.277030337 */, 19 },
+  /* 7441 */  { MAD_F(0x046eeb6c) /* 0.277079985 */, 19 },
+  /* 7442 */  { MAD_F(0x046f1f7c) /* 0.277129635 */, 19 },
+  /* 7443 */  { MAD_F(0x046f538c) /* 0.277179288 */, 19 },
+  /* 7444 */  { MAD_F(0x046f879d) /* 0.277228942 */, 19 },
+  /* 7445 */  { MAD_F(0x046fbbaf) /* 0.277278600 */, 19 },
+  /* 7446 */  { MAD_F(0x046fefc1) /* 0.277328259 */, 19 },
+  /* 7447 */  { MAD_F(0x047023d4) /* 0.277377920 */, 19 },
+  /* 7448 */  { MAD_F(0x047057e8) /* 0.277427584 */, 19 },
+  /* 7449 */  { MAD_F(0x04708bfc) /* 0.277477250 */, 19 },
+  /* 7450 */  { MAD_F(0x0470c011) /* 0.277526918 */, 19 },
+  /* 7451 */  { MAD_F(0x0470f426) /* 0.277576588 */, 19 },
+  /* 7452 */  { MAD_F(0x0471283c) /* 0.277626261 */, 19 },
+  /* 7453 */  { MAD_F(0x04715c52) /* 0.277675936 */, 19 },
+  /* 7454 */  { MAD_F(0x04719069) /* 0.277725613 */, 19 },
+  /* 7455 */  { MAD_F(0x0471c481) /* 0.277775292 */, 19 },
+
+  /* 7456 */  { MAD_F(0x0471f899) /* 0.277824973 */, 19 },
+  /* 7457 */  { MAD_F(0x04722cb2) /* 0.277874657 */, 19 },
+  /* 7458 */  { MAD_F(0x047260cc) /* 0.277924343 */, 19 },
+  /* 7459 */  { MAD_F(0x047294e6) /* 0.277974031 */, 19 },
+  /* 7460 */  { MAD_F(0x0472c900) /* 0.278023722 */, 19 },
+  /* 7461 */  { MAD_F(0x0472fd1b) /* 0.278073414 */, 19 },
+  /* 7462 */  { MAD_F(0x04733137) /* 0.278123109 */, 19 },
+  /* 7463 */  { MAD_F(0x04736554) /* 0.278172806 */, 19 },
+  /* 7464 */  { MAD_F(0x04739971) /* 0.278222505 */, 19 },
+  /* 7465 */  { MAD_F(0x0473cd8e) /* 0.278272207 */, 19 },
+  /* 7466 */  { MAD_F(0x047401ad) /* 0.278321910 */, 19 },
+  /* 7467 */  { MAD_F(0x047435cb) /* 0.278371616 */, 19 },
+  /* 7468 */  { MAD_F(0x047469eb) /* 0.278421324 */, 19 },
+  /* 7469 */  { MAD_F(0x04749e0b) /* 0.278471035 */, 19 },
+  /* 7470 */  { MAD_F(0x0474d22c) /* 0.278520747 */, 19 },
+  /* 7471 */  { MAD_F(0x0475064d) /* 0.278570462 */, 19 },
+
+  /* 7472 */  { MAD_F(0x04753a6f) /* 0.278620179 */, 19 },
+  /* 7473 */  { MAD_F(0x04756e91) /* 0.278669898 */, 19 },
+  /* 7474 */  { MAD_F(0x0475a2b4) /* 0.278719619 */, 19 },
+  /* 7475 */  { MAD_F(0x0475d6d7) /* 0.278769343 */, 19 },
+  /* 7476 */  { MAD_F(0x04760afc) /* 0.278819069 */, 19 },
+  /* 7477 */  { MAD_F(0x04763f20) /* 0.278868797 */, 19 },
+  /* 7478 */  { MAD_F(0x04767346) /* 0.278918527 */, 19 },
+  /* 7479 */  { MAD_F(0x0476a76c) /* 0.278968260 */, 19 },
+  /* 7480 */  { MAD_F(0x0476db92) /* 0.279017995 */, 19 },
+  /* 7481 */  { MAD_F(0x04770fba) /* 0.279067731 */, 19 },
+  /* 7482 */  { MAD_F(0x047743e1) /* 0.279117471 */, 19 },
+  /* 7483 */  { MAD_F(0x0477780a) /* 0.279167212 */, 19 },
+  /* 7484 */  { MAD_F(0x0477ac33) /* 0.279216956 */, 19 },
+  /* 7485 */  { MAD_F(0x0477e05c) /* 0.279266701 */, 19 },
+  /* 7486 */  { MAD_F(0x04781486) /* 0.279316449 */, 19 },
+  /* 7487 */  { MAD_F(0x047848b1) /* 0.279366200 */, 19 },
+
+  /* 7488 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 19 },
+  /* 7489 */  { MAD_F(0x0478b108) /* 0.279465707 */, 19 },
+  /* 7490 */  { MAD_F(0x0478e535) /* 0.279515464 */, 19 },
+  /* 7491 */  { MAD_F(0x04791962) /* 0.279565223 */, 19 },
+  /* 7492 */  { MAD_F(0x04794d8f) /* 0.279614984 */, 19 },
+  /* 7493 */  { MAD_F(0x047981be) /* 0.279664748 */, 19 },
+  /* 7494 */  { MAD_F(0x0479b5ed) /* 0.279714513 */, 19 },
+  /* 7495 */  { MAD_F(0x0479ea1c) /* 0.279764281 */, 19 },
+  /* 7496 */  { MAD_F(0x047a1e4c) /* 0.279814051 */, 19 },
+  /* 7497 */  { MAD_F(0x047a527d) /* 0.279863824 */, 19 },
+  /* 7498 */  { MAD_F(0x047a86ae) /* 0.279913598 */, 19 },
+  /* 7499 */  { MAD_F(0x047abae0) /* 0.279963375 */, 19 },
+  /* 7500 */  { MAD_F(0x047aef12) /* 0.280013154 */, 19 },
+  /* 7501 */  { MAD_F(0x047b2346) /* 0.280062935 */, 19 },
+  /* 7502 */  { MAD_F(0x047b5779) /* 0.280112719 */, 19 },
+  /* 7503 */  { MAD_F(0x047b8bad) /* 0.280162504 */, 19 },
+
+  /* 7504 */  { MAD_F(0x047bbfe2) /* 0.280212292 */, 19 },
+  /* 7505 */  { MAD_F(0x047bf418) /* 0.280262082 */, 19 },
+  /* 7506 */  { MAD_F(0x047c284e) /* 0.280311875 */, 19 },
+  /* 7507 */  { MAD_F(0x047c5c84) /* 0.280361669 */, 19 },
+  /* 7508 */  { MAD_F(0x047c90bb) /* 0.280411466 */, 19 },
+  /* 7509 */  { MAD_F(0x047cc4f3) /* 0.280461265 */, 19 },
+  /* 7510 */  { MAD_F(0x047cf92c) /* 0.280511066 */, 19 },
+  /* 7511 */  { MAD_F(0x047d2d65) /* 0.280560869 */, 19 },
+  /* 7512 */  { MAD_F(0x047d619e) /* 0.280610675 */, 19 },
+  /* 7513 */  { MAD_F(0x047d95d8) /* 0.280660483 */, 19 },
+  /* 7514 */  { MAD_F(0x047dca13) /* 0.280710292 */, 19 },
+  /* 7515 */  { MAD_F(0x047dfe4e) /* 0.280760105 */, 19 },
+  /* 7516 */  { MAD_F(0x047e328a) /* 0.280809919 */, 19 },
+  /* 7517 */  { MAD_F(0x047e66c7) /* 0.280859736 */, 19 },
+  /* 7518 */  { MAD_F(0x047e9b04) /* 0.280909554 */, 19 },
+  /* 7519 */  { MAD_F(0x047ecf42) /* 0.280959375 */, 19 },
+
+  /* 7520 */  { MAD_F(0x047f0380) /* 0.281009199 */, 19 },
+  /* 7521 */  { MAD_F(0x047f37bf) /* 0.281059024 */, 19 },
+  /* 7522 */  { MAD_F(0x047f6bff) /* 0.281108852 */, 19 },
+  /* 7523 */  { MAD_F(0x047fa03f) /* 0.281158682 */, 19 },
+  /* 7524 */  { MAD_F(0x047fd47f) /* 0.281208514 */, 19 },
+  /* 7525 */  { MAD_F(0x048008c1) /* 0.281258348 */, 19 },
+  /* 7526 */  { MAD_F(0x04803d02) /* 0.281308184 */, 19 },
+  /* 7527 */  { MAD_F(0x04807145) /* 0.281358023 */, 19 },
+  /* 7528 */  { MAD_F(0x0480a588) /* 0.281407864 */, 19 },
+  /* 7529 */  { MAD_F(0x0480d9cc) /* 0.281457707 */, 19 },
+  /* 7530 */  { MAD_F(0x04810e10) /* 0.281507552 */, 19 },
+  /* 7531 */  { MAD_F(0x04814255) /* 0.281557400 */, 19 },
+  /* 7532 */  { MAD_F(0x0481769a) /* 0.281607250 */, 19 },
+  /* 7533 */  { MAD_F(0x0481aae0) /* 0.281657101 */, 19 },
+  /* 7534 */  { MAD_F(0x0481df27) /* 0.281706956 */, 19 },
+  /* 7535 */  { MAD_F(0x0482136e) /* 0.281756812 */, 19 },
+
+  /* 7536 */  { MAD_F(0x048247b6) /* 0.281806670 */, 19 },
+  /* 7537 */  { MAD_F(0x04827bfe) /* 0.281856531 */, 19 },
+  /* 7538 */  { MAD_F(0x0482b047) /* 0.281906394 */, 19 },
+  /* 7539 */  { MAD_F(0x0482e491) /* 0.281956259 */, 19 },
+  /* 7540 */  { MAD_F(0x048318db) /* 0.282006127 */, 19 },
+  /* 7541 */  { MAD_F(0x04834d26) /* 0.282055996 */, 19 },
+  /* 7542 */  { MAD_F(0x04838171) /* 0.282105868 */, 19 },
+  /* 7543 */  { MAD_F(0x0483b5bd) /* 0.282155742 */, 19 },
+  /* 7544 */  { MAD_F(0x0483ea0a) /* 0.282205618 */, 19 },
+  /* 7545 */  { MAD_F(0x04841e57) /* 0.282255496 */, 19 },
+  /* 7546 */  { MAD_F(0x048452a4) /* 0.282305377 */, 19 },
+  /* 7547 */  { MAD_F(0x048486f3) /* 0.282355260 */, 19 },
+  /* 7548 */  { MAD_F(0x0484bb42) /* 0.282405145 */, 19 },
+  /* 7549 */  { MAD_F(0x0484ef91) /* 0.282455032 */, 19 },
+  /* 7550 */  { MAD_F(0x048523e1) /* 0.282504921 */, 19 },
+  /* 7551 */  { MAD_F(0x04855832) /* 0.282554813 */, 19 },
+
+  /* 7552 */  { MAD_F(0x04858c83) /* 0.282604707 */, 19 },
+  /* 7553 */  { MAD_F(0x0485c0d5) /* 0.282654603 */, 19 },
+  /* 7554 */  { MAD_F(0x0485f527) /* 0.282704501 */, 19 },
+  /* 7555 */  { MAD_F(0x0486297a) /* 0.282754401 */, 19 },
+  /* 7556 */  { MAD_F(0x04865dce) /* 0.282804304 */, 19 },
+  /* 7557 */  { MAD_F(0x04869222) /* 0.282854209 */, 19 },
+  /* 7558 */  { MAD_F(0x0486c677) /* 0.282904116 */, 19 },
+  /* 7559 */  { MAD_F(0x0486facc) /* 0.282954025 */, 19 },
+  /* 7560 */  { MAD_F(0x04872f22) /* 0.283003936 */, 19 },
+  /* 7561 */  { MAD_F(0x04876379) /* 0.283053850 */, 19 },
+  /* 7562 */  { MAD_F(0x048797d0) /* 0.283103766 */, 19 },
+  /* 7563 */  { MAD_F(0x0487cc28) /* 0.283153684 */, 19 },
+  /* 7564 */  { MAD_F(0x04880080) /* 0.283203604 */, 19 },
+  /* 7565 */  { MAD_F(0x048834d9) /* 0.283253527 */, 19 },
+  /* 7566 */  { MAD_F(0x04886933) /* 0.283303451 */, 19 },
+  /* 7567 */  { MAD_F(0x04889d8d) /* 0.283353378 */, 19 },
+
+  /* 7568 */  { MAD_F(0x0488d1e8) /* 0.283403307 */, 19 },
+  /* 7569 */  { MAD_F(0x04890643) /* 0.283453238 */, 19 },
+  /* 7570 */  { MAD_F(0x04893a9f) /* 0.283503172 */, 19 },
+  /* 7571 */  { MAD_F(0x04896efb) /* 0.283553107 */, 19 },
+  /* 7572 */  { MAD_F(0x0489a358) /* 0.283603045 */, 19 },
+  /* 7573 */  { MAD_F(0x0489d7b6) /* 0.283652985 */, 19 },
+  /* 7574 */  { MAD_F(0x048a0c14) /* 0.283702927 */, 19 },
+  /* 7575 */  { MAD_F(0x048a4073) /* 0.283752872 */, 19 },
+  /* 7576 */  { MAD_F(0x048a74d3) /* 0.283802818 */, 19 },
+  /* 7577 */  { MAD_F(0x048aa933) /* 0.283852767 */, 19 },
+  /* 7578 */  { MAD_F(0x048add93) /* 0.283902718 */, 19 },
+  /* 7579 */  { MAD_F(0x048b11f5) /* 0.283952671 */, 19 },
+  /* 7580 */  { MAD_F(0x048b4656) /* 0.284002627 */, 19 },
+  /* 7581 */  { MAD_F(0x048b7ab9) /* 0.284052584 */, 19 },
+  /* 7582 */  { MAD_F(0x048baf1c) /* 0.284102544 */, 19 },
+  /* 7583 */  { MAD_F(0x048be37f) /* 0.284152506 */, 19 },
+
+  /* 7584 */  { MAD_F(0x048c17e3) /* 0.284202470 */, 19 },
+  /* 7585 */  { MAD_F(0x048c4c48) /* 0.284252436 */, 19 },
+  /* 7586 */  { MAD_F(0x048c80ad) /* 0.284302405 */, 19 },
+  /* 7587 */  { MAD_F(0x048cb513) /* 0.284352376 */, 19 },
+  /* 7588 */  { MAD_F(0x048ce97a) /* 0.284402349 */, 19 },
+  /* 7589 */  { MAD_F(0x048d1de1) /* 0.284452324 */, 19 },
+  /* 7590 */  { MAD_F(0x048d5249) /* 0.284502301 */, 19 },
+  /* 7591 */  { MAD_F(0x048d86b1) /* 0.284552281 */, 19 },
+  /* 7592 */  { MAD_F(0x048dbb1a) /* 0.284602263 */, 19 },
+  /* 7593 */  { MAD_F(0x048def83) /* 0.284652246 */, 19 },
+  /* 7594 */  { MAD_F(0x048e23ed) /* 0.284702233 */, 19 },
+  /* 7595 */  { MAD_F(0x048e5858) /* 0.284752221 */, 19 },
+  /* 7596 */  { MAD_F(0x048e8cc3) /* 0.284802211 */, 19 },
+  /* 7597 */  { MAD_F(0x048ec12f) /* 0.284852204 */, 19 },
+  /* 7598 */  { MAD_F(0x048ef59b) /* 0.284902199 */, 19 },
+  /* 7599 */  { MAD_F(0x048f2a08) /* 0.284952196 */, 19 },
+
+  /* 7600 */  { MAD_F(0x048f5e76) /* 0.285002195 */, 19 },
+  /* 7601 */  { MAD_F(0x048f92e4) /* 0.285052197 */, 19 },
+  /* 7602 */  { MAD_F(0x048fc753) /* 0.285102201 */, 19 },
+  /* 7603 */  { MAD_F(0x048ffbc2) /* 0.285152206 */, 19 },
+  /* 7604 */  { MAD_F(0x04903032) /* 0.285202214 */, 19 },
+  /* 7605 */  { MAD_F(0x049064a3) /* 0.285252225 */, 19 },
+  /* 7606 */  { MAD_F(0x04909914) /* 0.285302237 */, 19 },
+  /* 7607 */  { MAD_F(0x0490cd86) /* 0.285352252 */, 19 },
+  /* 7608 */  { MAD_F(0x049101f8) /* 0.285402269 */, 19 },
+  /* 7609 */  { MAD_F(0x0491366b) /* 0.285452288 */, 19 },
+  /* 7610 */  { MAD_F(0x04916ade) /* 0.285502309 */, 19 },
+  /* 7611 */  { MAD_F(0x04919f52) /* 0.285552332 */, 19 },
+  /* 7612 */  { MAD_F(0x0491d3c7) /* 0.285602358 */, 19 },
+  /* 7613 */  { MAD_F(0x0492083c) /* 0.285652386 */, 19 },
+  /* 7614 */  { MAD_F(0x04923cb2) /* 0.285702416 */, 19 },
+  /* 7615 */  { MAD_F(0x04927128) /* 0.285752448 */, 19 },
+
+  /* 7616 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 19 },
+  /* 7617 */  { MAD_F(0x0492da17) /* 0.285852519 */, 19 },
+  /* 7618 */  { MAD_F(0x04930e8f) /* 0.285902557 */, 19 },
+  /* 7619 */  { MAD_F(0x04934308) /* 0.285952598 */, 19 },
+  /* 7620 */  { MAD_F(0x04937781) /* 0.286002641 */, 19 },
+  /* 7621 */  { MAD_F(0x0493abfb) /* 0.286052687 */, 19 },
+  /* 7622 */  { MAD_F(0x0493e076) /* 0.286102734 */, 19 },
+  /* 7623 */  { MAD_F(0x049414f1) /* 0.286152784 */, 19 },
+  /* 7624 */  { MAD_F(0x0494496c) /* 0.286202836 */, 19 },
+  /* 7625 */  { MAD_F(0x04947de9) /* 0.286252890 */, 19 },
+  /* 7626 */  { MAD_F(0x0494b266) /* 0.286302946 */, 19 },
+  /* 7627 */  { MAD_F(0x0494e6e3) /* 0.286353005 */, 19 },
+  /* 7628 */  { MAD_F(0x04951b61) /* 0.286403065 */, 19 },
+  /* 7629 */  { MAD_F(0x04954fe0) /* 0.286453128 */, 19 },
+  /* 7630 */  { MAD_F(0x0495845f) /* 0.286503193 */, 19 },
+  /* 7631 */  { MAD_F(0x0495b8df) /* 0.286553260 */, 19 },
+
+  /* 7632 */  { MAD_F(0x0495ed5f) /* 0.286603329 */, 19 },
+  /* 7633 */  { MAD_F(0x049621e0) /* 0.286653401 */, 19 },
+  /* 7634 */  { MAD_F(0x04965662) /* 0.286703475 */, 19 },
+  /* 7635 */  { MAD_F(0x04968ae4) /* 0.286753551 */, 19 },
+  /* 7636 */  { MAD_F(0x0496bf67) /* 0.286803629 */, 19 },
+  /* 7637 */  { MAD_F(0x0496f3ea) /* 0.286853709 */, 19 },
+  /* 7638 */  { MAD_F(0x0497286e) /* 0.286903792 */, 19 },
+  /* 7639 */  { MAD_F(0x04975cf2) /* 0.286953876 */, 19 },
+  /* 7640 */  { MAD_F(0x04979177) /* 0.287003963 */, 19 },
+  /* 7641 */  { MAD_F(0x0497c5fd) /* 0.287054052 */, 19 },
+  /* 7642 */  { MAD_F(0x0497fa83) /* 0.287104143 */, 19 },
+  /* 7643 */  { MAD_F(0x04982f0a) /* 0.287154237 */, 19 },
+  /* 7644 */  { MAD_F(0x04986392) /* 0.287204332 */, 19 },
+  /* 7645 */  { MAD_F(0x0498981a) /* 0.287254430 */, 19 },
+  /* 7646 */  { MAD_F(0x0498cca2) /* 0.287304530 */, 19 },
+  /* 7647 */  { MAD_F(0x0499012c) /* 0.287354632 */, 19 },
+
+  /* 7648 */  { MAD_F(0x049935b5) /* 0.287404737 */, 19 },
+  /* 7649 */  { MAD_F(0x04996a40) /* 0.287454843 */, 19 },
+  /* 7650 */  { MAD_F(0x04999ecb) /* 0.287504952 */, 19 },
+  /* 7651 */  { MAD_F(0x0499d356) /* 0.287555063 */, 19 },
+  /* 7652 */  { MAD_F(0x049a07e2) /* 0.287605176 */, 19 },
+  /* 7653 */  { MAD_F(0x049a3c6f) /* 0.287655291 */, 19 },
+  /* 7654 */  { MAD_F(0x049a70fc) /* 0.287705409 */, 19 },
+  /* 7655 */  { MAD_F(0x049aa58a) /* 0.287755528 */, 19 },
+  /* 7656 */  { MAD_F(0x049ada19) /* 0.287805650 */, 19 },
+  /* 7657 */  { MAD_F(0x049b0ea8) /* 0.287855774 */, 19 },
+  /* 7658 */  { MAD_F(0x049b4337) /* 0.287905900 */, 19 },
+  /* 7659 */  { MAD_F(0x049b77c8) /* 0.287956028 */, 19 },
+  /* 7660 */  { MAD_F(0x049bac58) /* 0.288006159 */, 19 },
+  /* 7661 */  { MAD_F(0x049be0ea) /* 0.288056292 */, 19 },
+  /* 7662 */  { MAD_F(0x049c157c) /* 0.288106427 */, 19 },
+  /* 7663 */  { MAD_F(0x049c4a0e) /* 0.288156564 */, 19 },
+
+  /* 7664 */  { MAD_F(0x049c7ea1) /* 0.288206703 */, 19 },
+  /* 7665 */  { MAD_F(0x049cb335) /* 0.288256844 */, 19 },
+  /* 7666 */  { MAD_F(0x049ce7ca) /* 0.288306988 */, 19 },
+  /* 7667 */  { MAD_F(0x049d1c5e) /* 0.288357134 */, 19 },
+  /* 7668 */  { MAD_F(0x049d50f4) /* 0.288407282 */, 19 },
+  /* 7669 */  { MAD_F(0x049d858a) /* 0.288457432 */, 19 },
+  /* 7670 */  { MAD_F(0x049dba21) /* 0.288507584 */, 19 },
+  /* 7671 */  { MAD_F(0x049deeb8) /* 0.288557739 */, 19 },
+  /* 7672 */  { MAD_F(0x049e2350) /* 0.288607895 */, 19 },
+  /* 7673 */  { MAD_F(0x049e57e8) /* 0.288658054 */, 19 },
+  /* 7674 */  { MAD_F(0x049e8c81) /* 0.288708215 */, 19 },
+  /* 7675 */  { MAD_F(0x049ec11b) /* 0.288758379 */, 19 },
+  /* 7676 */  { MAD_F(0x049ef5b5) /* 0.288808544 */, 19 },
+  /* 7677 */  { MAD_F(0x049f2a50) /* 0.288858712 */, 19 },
+  /* 7678 */  { MAD_F(0x049f5eeb) /* 0.288908881 */, 19 },
+  /* 7679 */  { MAD_F(0x049f9387) /* 0.288959053 */, 19 },
+
+  /* 7680 */  { MAD_F(0x049fc824) /* 0.289009227 */, 19 },
+  /* 7681 */  { MAD_F(0x049ffcc1) /* 0.289059404 */, 19 },
+  /* 7682 */  { MAD_F(0x04a0315e) /* 0.289109582 */, 19 },
+  /* 7683 */  { MAD_F(0x04a065fd) /* 0.289159763 */, 19 },
+  /* 7684 */  { MAD_F(0x04a09a9b) /* 0.289209946 */, 19 },
+  /* 7685 */  { MAD_F(0x04a0cf3b) /* 0.289260131 */, 19 },
+  /* 7686 */  { MAD_F(0x04a103db) /* 0.289310318 */, 19 },
+  /* 7687 */  { MAD_F(0x04a1387b) /* 0.289360507 */, 19 },
+  /* 7688 */  { MAD_F(0x04a16d1d) /* 0.289410699 */, 19 },
+  /* 7689 */  { MAD_F(0x04a1a1be) /* 0.289460893 */, 19 },
+  /* 7690 */  { MAD_F(0x04a1d661) /* 0.289511088 */, 19 },
+  /* 7691 */  { MAD_F(0x04a20b04) /* 0.289561287 */, 19 },
+  /* 7692 */  { MAD_F(0x04a23fa7) /* 0.289611487 */, 19 },
+  /* 7693 */  { MAD_F(0x04a2744b) /* 0.289661689 */, 19 },
+  /* 7694 */  { MAD_F(0x04a2a8f0) /* 0.289711894 */, 19 },
+  /* 7695 */  { MAD_F(0x04a2dd95) /* 0.289762101 */, 19 },
+
+  /* 7696 */  { MAD_F(0x04a3123b) /* 0.289812309 */, 19 },
+  /* 7697 */  { MAD_F(0x04a346e2) /* 0.289862521 */, 19 },
+  /* 7698 */  { MAD_F(0x04a37b89) /* 0.289912734 */, 19 },
+  /* 7699 */  { MAD_F(0x04a3b030) /* 0.289962949 */, 19 },
+  /* 7700 */  { MAD_F(0x04a3e4d8) /* 0.290013167 */, 19 },
+  /* 7701 */  { MAD_F(0x04a41981) /* 0.290063387 */, 19 },
+  /* 7702 */  { MAD_F(0x04a44e2b) /* 0.290113609 */, 19 },
+  /* 7703 */  { MAD_F(0x04a482d5) /* 0.290163833 */, 19 },
+  /* 7704 */  { MAD_F(0x04a4b77f) /* 0.290214059 */, 19 },
+  /* 7705 */  { MAD_F(0x04a4ec2a) /* 0.290264288 */, 19 },
+  /* 7706 */  { MAD_F(0x04a520d6) /* 0.290314519 */, 19 },
+  /* 7707 */  { MAD_F(0x04a55582) /* 0.290364751 */, 19 },
+  /* 7708 */  { MAD_F(0x04a58a2f) /* 0.290414986 */, 19 },
+  /* 7709 */  { MAD_F(0x04a5bedd) /* 0.290465224 */, 19 },
+  /* 7710 */  { MAD_F(0x04a5f38b) /* 0.290515463 */, 19 },
+  /* 7711 */  { MAD_F(0x04a62839) /* 0.290565705 */, 19 },
+
+  /* 7712 */  { MAD_F(0x04a65ce8) /* 0.290615948 */, 19 },
+  /* 7713 */  { MAD_F(0x04a69198) /* 0.290666194 */, 19 },
+  /* 7714 */  { MAD_F(0x04a6c648) /* 0.290716442 */, 19 },
+  /* 7715 */  { MAD_F(0x04a6faf9) /* 0.290766692 */, 19 },
+  /* 7716 */  { MAD_F(0x04a72fab) /* 0.290816945 */, 19 },
+  /* 7717 */  { MAD_F(0x04a7645d) /* 0.290867199 */, 19 },
+  /* 7718 */  { MAD_F(0x04a79910) /* 0.290917456 */, 19 },
+  /* 7719 */  { MAD_F(0x04a7cdc3) /* 0.290967715 */, 19 },
+  /* 7720 */  { MAD_F(0x04a80277) /* 0.291017976 */, 19 },
+  /* 7721 */  { MAD_F(0x04a8372b) /* 0.291068239 */, 19 },
+  /* 7722 */  { MAD_F(0x04a86be0) /* 0.291118505 */, 19 },
+  /* 7723 */  { MAD_F(0x04a8a096) /* 0.291168772 */, 19 },
+  /* 7724 */  { MAD_F(0x04a8d54c) /* 0.291219042 */, 19 },
+  /* 7725 */  { MAD_F(0x04a90a03) /* 0.291269314 */, 19 },
+  /* 7726 */  { MAD_F(0x04a93eba) /* 0.291319588 */, 19 },
+  /* 7727 */  { MAD_F(0x04a97372) /* 0.291369865 */, 19 },
+
+  /* 7728 */  { MAD_F(0x04a9a82b) /* 0.291420143 */, 19 },
+  /* 7729 */  { MAD_F(0x04a9dce4) /* 0.291470424 */, 19 },
+  /* 7730 */  { MAD_F(0x04aa119d) /* 0.291520706 */, 19 },
+  /* 7731 */  { MAD_F(0x04aa4658) /* 0.291570991 */, 19 },
+  /* 7732 */  { MAD_F(0x04aa7b13) /* 0.291621278 */, 19 },
+  /* 7733 */  { MAD_F(0x04aaafce) /* 0.291671568 */, 19 },
+  /* 7734 */  { MAD_F(0x04aae48a) /* 0.291721859 */, 19 },
+  /* 7735 */  { MAD_F(0x04ab1947) /* 0.291772153 */, 19 },
+  /* 7736 */  { MAD_F(0x04ab4e04) /* 0.291822449 */, 19 },
+  /* 7737 */  { MAD_F(0x04ab82c2) /* 0.291872747 */, 19 },
+  /* 7738 */  { MAD_F(0x04abb780) /* 0.291923047 */, 19 },
+  /* 7739 */  { MAD_F(0x04abec3f) /* 0.291973349 */, 19 },
+  /* 7740 */  { MAD_F(0x04ac20fe) /* 0.292023653 */, 19 },
+  /* 7741 */  { MAD_F(0x04ac55be) /* 0.292073960 */, 19 },
+  /* 7742 */  { MAD_F(0x04ac8a7f) /* 0.292124269 */, 19 },
+  /* 7743 */  { MAD_F(0x04acbf40) /* 0.292174580 */, 19 },
+
+  /* 7744 */  { MAD_F(0x04acf402) /* 0.292224893 */, 19 },
+  /* 7745 */  { MAD_F(0x04ad28c5) /* 0.292275208 */, 19 },
+  /* 7746 */  { MAD_F(0x04ad5d88) /* 0.292325526 */, 19 },
+  /* 7747 */  { MAD_F(0x04ad924b) /* 0.292375845 */, 19 },
+  /* 7748 */  { MAD_F(0x04adc70f) /* 0.292426167 */, 19 },
+  /* 7749 */  { MAD_F(0x04adfbd4) /* 0.292476491 */, 19 },
+  /* 7750 */  { MAD_F(0x04ae3099) /* 0.292526817 */, 19 },
+  /* 7751 */  { MAD_F(0x04ae655f) /* 0.292577145 */, 19 },
+  /* 7752 */  { MAD_F(0x04ae9a26) /* 0.292627476 */, 19 },
+  /* 7753 */  { MAD_F(0x04aeceed) /* 0.292677808 */, 19 },
+  /* 7754 */  { MAD_F(0x04af03b4) /* 0.292728143 */, 19 },
+  /* 7755 */  { MAD_F(0x04af387d) /* 0.292778480 */, 19 },
+  /* 7756 */  { MAD_F(0x04af6d45) /* 0.292828819 */, 19 },
+  /* 7757 */  { MAD_F(0x04afa20f) /* 0.292879160 */, 19 },
+  /* 7758 */  { MAD_F(0x04afd6d9) /* 0.292929504 */, 19 },
+  /* 7759 */  { MAD_F(0x04b00ba3) /* 0.292979849 */, 19 },
+
+  /* 7760 */  { MAD_F(0x04b0406e) /* 0.293030197 */, 19 },
+  /* 7761 */  { MAD_F(0x04b0753a) /* 0.293080547 */, 19 },
+  /* 7762 */  { MAD_F(0x04b0aa06) /* 0.293130899 */, 19 },
+  /* 7763 */  { MAD_F(0x04b0ded3) /* 0.293181253 */, 19 },
+  /* 7764 */  { MAD_F(0x04b113a1) /* 0.293231610 */, 19 },
+  /* 7765 */  { MAD_F(0x04b1486f) /* 0.293281968 */, 19 },
+  /* 7766 */  { MAD_F(0x04b17d3d) /* 0.293332329 */, 19 },
+  /* 7767 */  { MAD_F(0x04b1b20c) /* 0.293382692 */, 19 },
+  /* 7768 */  { MAD_F(0x04b1e6dc) /* 0.293433057 */, 19 },
+  /* 7769 */  { MAD_F(0x04b21bad) /* 0.293483424 */, 19 },
+  /* 7770 */  { MAD_F(0x04b2507d) /* 0.293533794 */, 19 },
+  /* 7771 */  { MAD_F(0x04b2854f) /* 0.293584165 */, 19 },
+  /* 7772 */  { MAD_F(0x04b2ba21) /* 0.293634539 */, 19 },
+  /* 7773 */  { MAD_F(0x04b2eef4) /* 0.293684915 */, 19 },
+  /* 7774 */  { MAD_F(0x04b323c7) /* 0.293735293 */, 19 },
+  /* 7775 */  { MAD_F(0x04b3589b) /* 0.293785673 */, 19 },
+
+  /* 7776 */  { MAD_F(0x04b38d6f) /* 0.293836055 */, 19 },
+  /* 7777 */  { MAD_F(0x04b3c244) /* 0.293886440 */, 19 },
+  /* 7778 */  { MAD_F(0x04b3f71a) /* 0.293936826 */, 19 },
+  /* 7779 */  { MAD_F(0x04b42bf0) /* 0.293987215 */, 19 },
+  /* 7780 */  { MAD_F(0x04b460c7) /* 0.294037606 */, 19 },
+  /* 7781 */  { MAD_F(0x04b4959e) /* 0.294087999 */, 19 },
+  /* 7782 */  { MAD_F(0x04b4ca76) /* 0.294138395 */, 19 },
+  /* 7783 */  { MAD_F(0x04b4ff4e) /* 0.294188792 */, 19 },
+  /* 7784 */  { MAD_F(0x04b53427) /* 0.294239192 */, 19 },
+  /* 7785 */  { MAD_F(0x04b56901) /* 0.294289593 */, 19 },
+  /* 7786 */  { MAD_F(0x04b59ddb) /* 0.294339997 */, 19 },
+  /* 7787 */  { MAD_F(0x04b5d2b6) /* 0.294390403 */, 19 },
+  /* 7788 */  { MAD_F(0x04b60791) /* 0.294440812 */, 19 },
+  /* 7789 */  { MAD_F(0x04b63c6d) /* 0.294491222 */, 19 },
+  /* 7790 */  { MAD_F(0x04b6714a) /* 0.294541635 */, 19 },
+  /* 7791 */  { MAD_F(0x04b6a627) /* 0.294592049 */, 19 },
+
+  /* 7792 */  { MAD_F(0x04b6db05) /* 0.294642466 */, 19 },
+  /* 7793 */  { MAD_F(0x04b70fe3) /* 0.294692885 */, 19 },
+  /* 7794 */  { MAD_F(0x04b744c2) /* 0.294743306 */, 19 },
+  /* 7795 */  { MAD_F(0x04b779a1) /* 0.294793730 */, 19 },
+  /* 7796 */  { MAD_F(0x04b7ae81) /* 0.294844155 */, 19 },
+  /* 7797 */  { MAD_F(0x04b7e362) /* 0.294894583 */, 19 },
+  /* 7798 */  { MAD_F(0x04b81843) /* 0.294945013 */, 19 },
+  /* 7799 */  { MAD_F(0x04b84d24) /* 0.294995445 */, 19 },
+  /* 7800 */  { MAD_F(0x04b88207) /* 0.295045879 */, 19 },
+  /* 7801 */  { MAD_F(0x04b8b6ea) /* 0.295096315 */, 19 },
+  /* 7802 */  { MAD_F(0x04b8ebcd) /* 0.295146753 */, 19 },
+  /* 7803 */  { MAD_F(0x04b920b1) /* 0.295197194 */, 19 },
+  /* 7804 */  { MAD_F(0x04b95596) /* 0.295247637 */, 19 },
+  /* 7805 */  { MAD_F(0x04b98a7b) /* 0.295298082 */, 19 },
+  /* 7806 */  { MAD_F(0x04b9bf61) /* 0.295348529 */, 19 },
+  /* 7807 */  { MAD_F(0x04b9f447) /* 0.295398978 */, 19 },
+
+  /* 7808 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 19 },
+  /* 7809 */  { MAD_F(0x04ba5e16) /* 0.295499883 */, 19 },
+  /* 7810 */  { MAD_F(0x04ba92fe) /* 0.295550338 */, 19 },
+  /* 7811 */  { MAD_F(0x04bac7e6) /* 0.295600796 */, 19 },
+  /* 7812 */  { MAD_F(0x04bafcd0) /* 0.295651256 */, 19 },
+  /* 7813 */  { MAD_F(0x04bb31b9) /* 0.295701718 */, 19 },
+  /* 7814 */  { MAD_F(0x04bb66a4) /* 0.295752183 */, 19 },
+  /* 7815 */  { MAD_F(0x04bb9b8f) /* 0.295802649 */, 19 },
+  /* 7816 */  { MAD_F(0x04bbd07a) /* 0.295853118 */, 19 },
+  /* 7817 */  { MAD_F(0x04bc0566) /* 0.295903588 */, 19 },
+  /* 7818 */  { MAD_F(0x04bc3a53) /* 0.295954061 */, 19 },
+  /* 7819 */  { MAD_F(0x04bc6f40) /* 0.296004536 */, 19 },
+  /* 7820 */  { MAD_F(0x04bca42e) /* 0.296055013 */, 19 },
+  /* 7821 */  { MAD_F(0x04bcd91d) /* 0.296105493 */, 19 },
+  /* 7822 */  { MAD_F(0x04bd0e0c) /* 0.296155974 */, 19 },
+  /* 7823 */  { MAD_F(0x04bd42fb) /* 0.296206458 */, 19 },
+
+  /* 7824 */  { MAD_F(0x04bd77ec) /* 0.296256944 */, 19 },
+  /* 7825 */  { MAD_F(0x04bdacdc) /* 0.296307432 */, 19 },
+  /* 7826 */  { MAD_F(0x04bde1ce) /* 0.296357922 */, 19 },
+  /* 7827 */  { MAD_F(0x04be16c0) /* 0.296408414 */, 19 },
+  /* 7828 */  { MAD_F(0x04be4bb2) /* 0.296458908 */, 19 },
+  /* 7829 */  { MAD_F(0x04be80a5) /* 0.296509405 */, 19 },
+  /* 7830 */  { MAD_F(0x04beb599) /* 0.296559904 */, 19 },
+  /* 7831 */  { MAD_F(0x04beea8d) /* 0.296610404 */, 19 },
+  /* 7832 */  { MAD_F(0x04bf1f82) /* 0.296660907 */, 19 },
+  /* 7833 */  { MAD_F(0x04bf5477) /* 0.296711413 */, 19 },
+  /* 7834 */  { MAD_F(0x04bf896d) /* 0.296761920 */, 19 },
+  /* 7835 */  { MAD_F(0x04bfbe64) /* 0.296812429 */, 19 },
+  /* 7836 */  { MAD_F(0x04bff35b) /* 0.296862941 */, 19 },
+  /* 7837 */  { MAD_F(0x04c02852) /* 0.296913455 */, 19 },
+  /* 7838 */  { MAD_F(0x04c05d4b) /* 0.296963971 */, 19 },
+  /* 7839 */  { MAD_F(0x04c09243) /* 0.297014489 */, 19 },
+
+  /* 7840 */  { MAD_F(0x04c0c73d) /* 0.297065009 */, 19 },
+  /* 7841 */  { MAD_F(0x04c0fc37) /* 0.297115531 */, 19 },
+  /* 7842 */  { MAD_F(0x04c13131) /* 0.297166056 */, 19 },
+  /* 7843 */  { MAD_F(0x04c1662d) /* 0.297216582 */, 19 },
+  /* 7844 */  { MAD_F(0x04c19b28) /* 0.297267111 */, 19 },
+  /* 7845 */  { MAD_F(0x04c1d025) /* 0.297317642 */, 19 },
+  /* 7846 */  { MAD_F(0x04c20521) /* 0.297368175 */, 19 },
+  /* 7847 */  { MAD_F(0x04c23a1f) /* 0.297418710 */, 19 },
+  /* 7848 */  { MAD_F(0x04c26f1d) /* 0.297469248 */, 19 },
+  /* 7849 */  { MAD_F(0x04c2a41b) /* 0.297519787 */, 19 },
+  /* 7850 */  { MAD_F(0x04c2d91b) /* 0.297570329 */, 19 },
+  /* 7851 */  { MAD_F(0x04c30e1a) /* 0.297620873 */, 19 },
+  /* 7852 */  { MAD_F(0x04c3431b) /* 0.297671418 */, 19 },
+  /* 7853 */  { MAD_F(0x04c3781c) /* 0.297721967 */, 19 },
+  /* 7854 */  { MAD_F(0x04c3ad1d) /* 0.297772517 */, 19 },
+  /* 7855 */  { MAD_F(0x04c3e21f) /* 0.297823069 */, 19 },
+
+  /* 7856 */  { MAD_F(0x04c41722) /* 0.297873624 */, 19 },
+  /* 7857 */  { MAD_F(0x04c44c25) /* 0.297924180 */, 19 },
+  /* 7858 */  { MAD_F(0x04c48129) /* 0.297974739 */, 19 },
+  /* 7859 */  { MAD_F(0x04c4b62d) /* 0.298025300 */, 19 },
+  /* 7860 */  { MAD_F(0x04c4eb32) /* 0.298075863 */, 19 },
+  /* 7861 */  { MAD_F(0x04c52038) /* 0.298126429 */, 19 },
+  /* 7862 */  { MAD_F(0x04c5553e) /* 0.298176996 */, 19 },
+  /* 7863 */  { MAD_F(0x04c58a44) /* 0.298227565 */, 19 },
+  /* 7864 */  { MAD_F(0x04c5bf4c) /* 0.298278137 */, 19 },
+  /* 7865 */  { MAD_F(0x04c5f453) /* 0.298328711 */, 19 },
+  /* 7866 */  { MAD_F(0x04c6295c) /* 0.298379287 */, 19 },
+  /* 7867 */  { MAD_F(0x04c65e65) /* 0.298429865 */, 19 },
+  /* 7868 */  { MAD_F(0x04c6936e) /* 0.298480445 */, 19 },
+  /* 7869 */  { MAD_F(0x04c6c878) /* 0.298531028 */, 19 },
+  /* 7870 */  { MAD_F(0x04c6fd83) /* 0.298581612 */, 19 },
+  /* 7871 */  { MAD_F(0x04c7328e) /* 0.298632199 */, 19 },
+
+  /* 7872 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 19 },
+  /* 7873 */  { MAD_F(0x04c79ca7) /* 0.298733379 */, 19 },
+  /* 7874 */  { MAD_F(0x04c7d1b4) /* 0.298783972 */, 19 },
+  /* 7875 */  { MAD_F(0x04c806c1) /* 0.298834567 */, 19 },
+  /* 7876 */  { MAD_F(0x04c83bcf) /* 0.298885165 */, 19 },
+  /* 7877 */  { MAD_F(0x04c870de) /* 0.298935764 */, 19 },
+  /* 7878 */  { MAD_F(0x04c8a5ed) /* 0.298986366 */, 19 },
+  /* 7879 */  { MAD_F(0x04c8dafd) /* 0.299036970 */, 19 },
+  /* 7880 */  { MAD_F(0x04c9100d) /* 0.299087576 */, 19 },
+  /* 7881 */  { MAD_F(0x04c9451e) /* 0.299138184 */, 19 },
+  /* 7882 */  { MAD_F(0x04c97a30) /* 0.299188794 */, 19 },
+  /* 7883 */  { MAD_F(0x04c9af42) /* 0.299239406 */, 19 },
+  /* 7884 */  { MAD_F(0x04c9e455) /* 0.299290021 */, 19 },
+  /* 7885 */  { MAD_F(0x04ca1968) /* 0.299340638 */, 19 },
+  /* 7886 */  { MAD_F(0x04ca4e7c) /* 0.299391256 */, 19 },
+  /* 7887 */  { MAD_F(0x04ca8391) /* 0.299441877 */, 19 },
+
+  /* 7888 */  { MAD_F(0x04cab8a6) /* 0.299492500 */, 19 },
+  /* 7889 */  { MAD_F(0x04caedbb) /* 0.299543126 */, 19 },
+  /* 7890 */  { MAD_F(0x04cb22d1) /* 0.299593753 */, 19 },
+  /* 7891 */  { MAD_F(0x04cb57e8) /* 0.299644382 */, 19 },
+  /* 7892 */  { MAD_F(0x04cb8d00) /* 0.299695014 */, 19 },
+  /* 7893 */  { MAD_F(0x04cbc217) /* 0.299745648 */, 19 },
+  /* 7894 */  { MAD_F(0x04cbf730) /* 0.299796284 */, 19 },
+  /* 7895 */  { MAD_F(0x04cc2c49) /* 0.299846922 */, 19 },
+  /* 7896 */  { MAD_F(0x04cc6163) /* 0.299897562 */, 19 },
+  /* 7897 */  { MAD_F(0x04cc967d) /* 0.299948204 */, 19 },
+  /* 7898 */  { MAD_F(0x04cccb98) /* 0.299998849 */, 19 },
+  /* 7899 */  { MAD_F(0x04cd00b3) /* 0.300049495 */, 19 },
+  /* 7900 */  { MAD_F(0x04cd35cf) /* 0.300100144 */, 19 },
+  /* 7901 */  { MAD_F(0x04cd6aeb) /* 0.300150795 */, 19 },
+  /* 7902 */  { MAD_F(0x04cda008) /* 0.300201448 */, 19 },
+  /* 7903 */  { MAD_F(0x04cdd526) /* 0.300252103 */, 19 },
+
+  /* 7904 */  { MAD_F(0x04ce0a44) /* 0.300302761 */, 19 },
+  /* 7905 */  { MAD_F(0x04ce3f63) /* 0.300353420 */, 19 },
+  /* 7906 */  { MAD_F(0x04ce7482) /* 0.300404082 */, 19 },
+  /* 7907 */  { MAD_F(0x04cea9a2) /* 0.300454745 */, 19 },
+  /* 7908 */  { MAD_F(0x04cedec3) /* 0.300505411 */, 19 },
+  /* 7909 */  { MAD_F(0x04cf13e4) /* 0.300556079 */, 19 },
+  /* 7910 */  { MAD_F(0x04cf4906) /* 0.300606749 */, 19 },
+  /* 7911 */  { MAD_F(0x04cf7e28) /* 0.300657421 */, 19 },
+  /* 7912 */  { MAD_F(0x04cfb34b) /* 0.300708096 */, 19 },
+  /* 7913 */  { MAD_F(0x04cfe86e) /* 0.300758772 */, 19 },
+  /* 7914 */  { MAD_F(0x04d01d92) /* 0.300809451 */, 19 },
+  /* 7915 */  { MAD_F(0x04d052b6) /* 0.300860132 */, 19 },
+  /* 7916 */  { MAD_F(0x04d087db) /* 0.300910815 */, 19 },
+  /* 7917 */  { MAD_F(0x04d0bd01) /* 0.300961500 */, 19 },
+  /* 7918 */  { MAD_F(0x04d0f227) /* 0.301012187 */, 19 },
+  /* 7919 */  { MAD_F(0x04d1274e) /* 0.301062876 */, 19 },
+
+  /* 7920 */  { MAD_F(0x04d15c76) /* 0.301113568 */, 19 },
+  /* 7921 */  { MAD_F(0x04d1919e) /* 0.301164261 */, 19 },
+  /* 7922 */  { MAD_F(0x04d1c6c6) /* 0.301214957 */, 19 },
+  /* 7923 */  { MAD_F(0x04d1fbef) /* 0.301265655 */, 19 },
+  /* 7924 */  { MAD_F(0x04d23119) /* 0.301316355 */, 19 },
+  /* 7925 */  { MAD_F(0x04d26643) /* 0.301367057 */, 19 },
+  /* 7926 */  { MAD_F(0x04d29b6e) /* 0.301417761 */, 19 },
+  /* 7927 */  { MAD_F(0x04d2d099) /* 0.301468468 */, 19 },
+  /* 7928 */  { MAD_F(0x04d305c5) /* 0.301519176 */, 19 },
+  /* 7929 */  { MAD_F(0x04d33af2) /* 0.301569887 */, 19 },
+  /* 7930 */  { MAD_F(0x04d3701f) /* 0.301620599 */, 19 },
+  /* 7931 */  { MAD_F(0x04d3a54d) /* 0.301671314 */, 19 },
+  /* 7932 */  { MAD_F(0x04d3da7b) /* 0.301722031 */, 19 },
+  /* 7933 */  { MAD_F(0x04d40faa) /* 0.301772751 */, 19 },
+  /* 7934 */  { MAD_F(0x04d444d9) /* 0.301823472 */, 19 },
+  /* 7935 */  { MAD_F(0x04d47a09) /* 0.301874195 */, 19 },
+
+  /* 7936 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 19 },
+  /* 7937 */  { MAD_F(0x04d4e46b) /* 0.301975649 */, 19 },
+  /* 7938 */  { MAD_F(0x04d5199c) /* 0.302026378 */, 19 },
+  /* 7939 */  { MAD_F(0x04d54ecf) /* 0.302077110 */, 19 },
+  /* 7940 */  { MAD_F(0x04d58401) /* 0.302127845 */, 19 },
+  /* 7941 */  { MAD_F(0x04d5b935) /* 0.302178581 */, 19 },
+  /* 7942 */  { MAD_F(0x04d5ee69) /* 0.302229319 */, 19 },
+  /* 7943 */  { MAD_F(0x04d6239d) /* 0.302280060 */, 19 },
+  /* 7944 */  { MAD_F(0x04d658d2) /* 0.302330802 */, 19 },
+  /* 7945 */  { MAD_F(0x04d68e08) /* 0.302381547 */, 19 },
+  /* 7946 */  { MAD_F(0x04d6c33e) /* 0.302432294 */, 19 },
+  /* 7947 */  { MAD_F(0x04d6f875) /* 0.302483043 */, 19 },
+  /* 7948 */  { MAD_F(0x04d72dad) /* 0.302533794 */, 19 },
+  /* 7949 */  { MAD_F(0x04d762e5) /* 0.302584547 */, 19 },
+  /* 7950 */  { MAD_F(0x04d7981d) /* 0.302635303 */, 19 },
+  /* 7951 */  { MAD_F(0x04d7cd56) /* 0.302686060 */, 19 },
+
+  /* 7952 */  { MAD_F(0x04d80290) /* 0.302736820 */, 19 },
+  /* 7953 */  { MAD_F(0x04d837ca) /* 0.302787581 */, 19 },
+  /* 7954 */  { MAD_F(0x04d86d05) /* 0.302838345 */, 19 },
+  /* 7955 */  { MAD_F(0x04d8a240) /* 0.302889111 */, 19 },
+  /* 7956 */  { MAD_F(0x04d8d77c) /* 0.302939879 */, 19 },
+  /* 7957 */  { MAD_F(0x04d90cb9) /* 0.302990650 */, 19 },
+  /* 7958 */  { MAD_F(0x04d941f6) /* 0.303041422 */, 19 },
+  /* 7959 */  { MAD_F(0x04d97734) /* 0.303092197 */, 19 },
+  /* 7960 */  { MAD_F(0x04d9ac72) /* 0.303142973 */, 19 },
+  /* 7961 */  { MAD_F(0x04d9e1b1) /* 0.303193752 */, 19 },
+  /* 7962 */  { MAD_F(0x04da16f0) /* 0.303244533 */, 19 },
+  /* 7963 */  { MAD_F(0x04da4c30) /* 0.303295316 */, 19 },
+  /* 7964 */  { MAD_F(0x04da8171) /* 0.303346101 */, 19 },
+  /* 7965 */  { MAD_F(0x04dab6b2) /* 0.303396889 */, 19 },
+  /* 7966 */  { MAD_F(0x04daebf4) /* 0.303447678 */, 19 },
+  /* 7967 */  { MAD_F(0x04db2136) /* 0.303498469 */, 19 },
+
+  /* 7968 */  { MAD_F(0x04db5679) /* 0.303549263 */, 19 },
+  /* 7969 */  { MAD_F(0x04db8bbc) /* 0.303600059 */, 19 },
+  /* 7970 */  { MAD_F(0x04dbc100) /* 0.303650857 */, 19 },
+  /* 7971 */  { MAD_F(0x04dbf644) /* 0.303701657 */, 19 },
+  /* 7972 */  { MAD_F(0x04dc2b8a) /* 0.303752459 */, 19 },
+  /* 7973 */  { MAD_F(0x04dc60cf) /* 0.303803263 */, 19 },
+  /* 7974 */  { MAD_F(0x04dc9616) /* 0.303854070 */, 19 },
+  /* 7975 */  { MAD_F(0x04dccb5c) /* 0.303904878 */, 19 },
+  /* 7976 */  { MAD_F(0x04dd00a4) /* 0.303955689 */, 19 },
+  /* 7977 */  { MAD_F(0x04dd35ec) /* 0.304006502 */, 19 },
+  /* 7978 */  { MAD_F(0x04dd6b34) /* 0.304057317 */, 19 },
+  /* 7979 */  { MAD_F(0x04dda07d) /* 0.304108134 */, 19 },
+  /* 7980 */  { MAD_F(0x04ddd5c7) /* 0.304158953 */, 19 },
+  /* 7981 */  { MAD_F(0x04de0b11) /* 0.304209774 */, 19 },
+  /* 7982 */  { MAD_F(0x04de405c) /* 0.304260597 */, 19 },
+  /* 7983 */  { MAD_F(0x04de75a7) /* 0.304311423 */, 19 },
+
+  /* 7984 */  { MAD_F(0x04deaaf3) /* 0.304362251 */, 19 },
+  /* 7985 */  { MAD_F(0x04dee040) /* 0.304413080 */, 19 },
+  /* 7986 */  { MAD_F(0x04df158d) /* 0.304463912 */, 19 },
+  /* 7987 */  { MAD_F(0x04df4adb) /* 0.304514746 */, 19 },
+  /* 7988 */  { MAD_F(0x04df8029) /* 0.304565582 */, 19 },
+  /* 7989 */  { MAD_F(0x04dfb578) /* 0.304616421 */, 19 },
+  /* 7990 */  { MAD_F(0x04dfeac7) /* 0.304667261 */, 19 },
+  /* 7991 */  { MAD_F(0x04e02017) /* 0.304718103 */, 19 },
+  /* 7992 */  { MAD_F(0x04e05567) /* 0.304768948 */, 19 },
+  /* 7993 */  { MAD_F(0x04e08ab8) /* 0.304819795 */, 19 },
+  /* 7994 */  { MAD_F(0x04e0c00a) /* 0.304870644 */, 19 },
+  /* 7995 */  { MAD_F(0x04e0f55c) /* 0.304921495 */, 19 },
+  /* 7996 */  { MAD_F(0x04e12aaf) /* 0.304972348 */, 19 },
+  /* 7997 */  { MAD_F(0x04e16002) /* 0.305023203 */, 19 },
+  /* 7998 */  { MAD_F(0x04e19556) /* 0.305074060 */, 19 },
+  /* 7999 */  { MAD_F(0x04e1caab) /* 0.305124920 */, 19 },
+
+  /* 8000 */  { MAD_F(0x04e20000) /* 0.305175781 */, 19 },
+  /* 8001 */  { MAD_F(0x04e23555) /* 0.305226645 */, 19 },
+  /* 8002 */  { MAD_F(0x04e26aac) /* 0.305277511 */, 19 },
+  /* 8003 */  { MAD_F(0x04e2a002) /* 0.305328379 */, 19 },
+  /* 8004 */  { MAD_F(0x04e2d55a) /* 0.305379249 */, 19 },
+  /* 8005 */  { MAD_F(0x04e30ab2) /* 0.305430121 */, 19 },
+  /* 8006 */  { MAD_F(0x04e3400a) /* 0.305480995 */, 19 },
+  /* 8007 */  { MAD_F(0x04e37563) /* 0.305531872 */, 19 },
+  /* 8008 */  { MAD_F(0x04e3aabd) /* 0.305582750 */, 19 },
+  /* 8009 */  { MAD_F(0x04e3e017) /* 0.305633631 */, 19 },
+  /* 8010 */  { MAD_F(0x04e41572) /* 0.305684513 */, 19 },
+  /* 8011 */  { MAD_F(0x04e44acd) /* 0.305735398 */, 19 },
+  /* 8012 */  { MAD_F(0x04e48029) /* 0.305786285 */, 19 },
+  /* 8013 */  { MAD_F(0x04e4b585) /* 0.305837174 */, 19 },
+  /* 8014 */  { MAD_F(0x04e4eae2) /* 0.305888066 */, 19 },
+  /* 8015 */  { MAD_F(0x04e52040) /* 0.305938959 */, 19 },
+
+  /* 8016 */  { MAD_F(0x04e5559e) /* 0.305989854 */, 19 },
+  /* 8017 */  { MAD_F(0x04e58afd) /* 0.306040752 */, 19 },
+  /* 8018 */  { MAD_F(0x04e5c05c) /* 0.306091652 */, 19 },
+  /* 8019 */  { MAD_F(0x04e5f5bc) /* 0.306142554 */, 19 },
+  /* 8020 */  { MAD_F(0x04e62b1c) /* 0.306193457 */, 19 },
+  /* 8021 */  { MAD_F(0x04e6607d) /* 0.306244364 */, 19 },
+  /* 8022 */  { MAD_F(0x04e695df) /* 0.306295272 */, 19 },
+  /* 8023 */  { MAD_F(0x04e6cb41) /* 0.306346182 */, 19 },
+  /* 8024 */  { MAD_F(0x04e700a3) /* 0.306397094 */, 19 },
+  /* 8025 */  { MAD_F(0x04e73607) /* 0.306448009 */, 19 },
+  /* 8026 */  { MAD_F(0x04e76b6b) /* 0.306498925 */, 19 },
+  /* 8027 */  { MAD_F(0x04e7a0cf) /* 0.306549844 */, 19 },
+  /* 8028 */  { MAD_F(0x04e7d634) /* 0.306600765 */, 19 },
+  /* 8029 */  { MAD_F(0x04e80b99) /* 0.306651688 */, 19 },
+  /* 8030 */  { MAD_F(0x04e84100) /* 0.306702613 */, 19 },
+  /* 8031 */  { MAD_F(0x04e87666) /* 0.306753540 */, 19 },
+
+  /* 8032 */  { MAD_F(0x04e8abcd) /* 0.306804470 */, 19 },
+  /* 8033 */  { MAD_F(0x04e8e135) /* 0.306855401 */, 19 },
+  /* 8034 */  { MAD_F(0x04e9169e) /* 0.306906334 */, 19 },
+  /* 8035 */  { MAD_F(0x04e94c07) /* 0.306957270 */, 19 },
+  /* 8036 */  { MAD_F(0x04e98170) /* 0.307008208 */, 19 },
+  /* 8037 */  { MAD_F(0x04e9b6da) /* 0.307059148 */, 19 },
+  /* 8038 */  { MAD_F(0x04e9ec45) /* 0.307110090 */, 19 },
+  /* 8039 */  { MAD_F(0x04ea21b0) /* 0.307161034 */, 19 },
+  /* 8040 */  { MAD_F(0x04ea571c) /* 0.307211980 */, 19 },
+  /* 8041 */  { MAD_F(0x04ea8c88) /* 0.307262928 */, 19 },
+  /* 8042 */  { MAD_F(0x04eac1f5) /* 0.307313879 */, 19 },
+  /* 8043 */  { MAD_F(0x04eaf762) /* 0.307364831 */, 19 },
+  /* 8044 */  { MAD_F(0x04eb2cd0) /* 0.307415786 */, 19 },
+  /* 8045 */  { MAD_F(0x04eb623f) /* 0.307466743 */, 19 },
+  /* 8046 */  { MAD_F(0x04eb97ae) /* 0.307517702 */, 19 },
+  /* 8047 */  { MAD_F(0x04ebcd1e) /* 0.307568663 */, 19 },
+
+  /* 8048 */  { MAD_F(0x04ec028e) /* 0.307619626 */, 19 },
+  /* 8049 */  { MAD_F(0x04ec37ff) /* 0.307670591 */, 19 },
+  /* 8050 */  { MAD_F(0x04ec6d71) /* 0.307721558 */, 19 },
+  /* 8051 */  { MAD_F(0x04eca2e3) /* 0.307772528 */, 19 },
+  /* 8052 */  { MAD_F(0x04ecd855) /* 0.307823499 */, 19 },
+  /* 8053 */  { MAD_F(0x04ed0dc8) /* 0.307874473 */, 19 },
+  /* 8054 */  { MAD_F(0x04ed433c) /* 0.307925449 */, 19 },
+  /* 8055 */  { MAD_F(0x04ed78b0) /* 0.307976426 */, 19 },
+  /* 8056 */  { MAD_F(0x04edae25) /* 0.308027406 */, 19 },
+  /* 8057 */  { MAD_F(0x04ede39a) /* 0.308078389 */, 19 },
+  /* 8058 */  { MAD_F(0x04ee1910) /* 0.308129373 */, 19 },
+  /* 8059 */  { MAD_F(0x04ee4e87) /* 0.308180359 */, 19 },
+  /* 8060 */  { MAD_F(0x04ee83fe) /* 0.308231347 */, 19 },
+  /* 8061 */  { MAD_F(0x04eeb976) /* 0.308282338 */, 19 },
+  /* 8062 */  { MAD_F(0x04eeeeee) /* 0.308333331 */, 19 },
+  /* 8063 */  { MAD_F(0x04ef2467) /* 0.308384325 */, 19 },
+
+  /* 8064 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 19 },
+  /* 8065 */  { MAD_F(0x04ef8f5a) /* 0.308486321 */, 19 },
+  /* 8066 */  { MAD_F(0x04efc4d5) /* 0.308537322 */, 19 },
+  /* 8067 */  { MAD_F(0x04effa50) /* 0.308588325 */, 19 },
+  /* 8068 */  { MAD_F(0x04f02fcb) /* 0.308639331 */, 19 },
+  /* 8069 */  { MAD_F(0x04f06547) /* 0.308690338 */, 19 },
+  /* 8070 */  { MAD_F(0x04f09ac4) /* 0.308741348 */, 19 },
+  /* 8071 */  { MAD_F(0x04f0d041) /* 0.308792359 */, 19 },
+  /* 8072 */  { MAD_F(0x04f105bf) /* 0.308843373 */, 19 },
+  /* 8073 */  { MAD_F(0x04f13b3e) /* 0.308894389 */, 19 },
+  /* 8074 */  { MAD_F(0x04f170bd) /* 0.308945407 */, 19 },
+  /* 8075 */  { MAD_F(0x04f1a63c) /* 0.308996427 */, 19 },
+  /* 8076 */  { MAD_F(0x04f1dbbd) /* 0.309047449 */, 19 },
+  /* 8077 */  { MAD_F(0x04f2113d) /* 0.309098473 */, 19 },
+  /* 8078 */  { MAD_F(0x04f246bf) /* 0.309149499 */, 19 },
+  /* 8079 */  { MAD_F(0x04f27c40) /* 0.309200528 */, 19 },
+
+  /* 8080 */  { MAD_F(0x04f2b1c3) /* 0.309251558 */, 19 },
+  /* 8081 */  { MAD_F(0x04f2e746) /* 0.309302591 */, 19 },
+  /* 8082 */  { MAD_F(0x04f31cc9) /* 0.309353626 */, 19 },
+  /* 8083 */  { MAD_F(0x04f3524d) /* 0.309404663 */, 19 },
+  /* 8084 */  { MAD_F(0x04f387d2) /* 0.309455702 */, 19 },
+  /* 8085 */  { MAD_F(0x04f3bd57) /* 0.309506743 */, 19 },
+  /* 8086 */  { MAD_F(0x04f3f2dd) /* 0.309557786 */, 19 },
+  /* 8087 */  { MAD_F(0x04f42864) /* 0.309608831 */, 19 },
+  /* 8088 */  { MAD_F(0x04f45dea) /* 0.309659879 */, 19 },
+  /* 8089 */  { MAD_F(0x04f49372) /* 0.309710928 */, 19 },
+  /* 8090 */  { MAD_F(0x04f4c8fa) /* 0.309761980 */, 19 },
+  /* 8091 */  { MAD_F(0x04f4fe83) /* 0.309813033 */, 19 },
+  /* 8092 */  { MAD_F(0x04f5340c) /* 0.309864089 */, 19 },
+  /* 8093 */  { MAD_F(0x04f56996) /* 0.309915147 */, 19 },
+  /* 8094 */  { MAD_F(0x04f59f20) /* 0.309966207 */, 19 },
+  /* 8095 */  { MAD_F(0x04f5d4ab) /* 0.310017269 */, 19 },
+
+  /* 8096 */  { MAD_F(0x04f60a36) /* 0.310068333 */, 19 },
+  /* 8097 */  { MAD_F(0x04f63fc2) /* 0.310119400 */, 19 },
+  /* 8098 */  { MAD_F(0x04f6754f) /* 0.310170468 */, 19 },
+  /* 8099 */  { MAD_F(0x04f6aadc) /* 0.310221539 */, 19 },
+  /* 8100 */  { MAD_F(0x04f6e06a) /* 0.310272611 */, 19 },
+  /* 8101 */  { MAD_F(0x04f715f8) /* 0.310323686 */, 19 },
+  /* 8102 */  { MAD_F(0x04f74b87) /* 0.310374763 */, 19 },
+  /* 8103 */  { MAD_F(0x04f78116) /* 0.310425842 */, 19 },
+  /* 8104 */  { MAD_F(0x04f7b6a6) /* 0.310476923 */, 19 },
+  /* 8105 */  { MAD_F(0x04f7ec37) /* 0.310528006 */, 19 },
+  /* 8106 */  { MAD_F(0x04f821c8) /* 0.310579091 */, 19 },
+  /* 8107 */  { MAD_F(0x04f85759) /* 0.310630179 */, 19 },
+  /* 8108 */  { MAD_F(0x04f88cec) /* 0.310681268 */, 19 },
+  /* 8109 */  { MAD_F(0x04f8c27e) /* 0.310732360 */, 19 },
+  /* 8110 */  { MAD_F(0x04f8f812) /* 0.310783453 */, 19 },
+  /* 8111 */  { MAD_F(0x04f92da6) /* 0.310834549 */, 19 },
+
+  /* 8112 */  { MAD_F(0x04f9633a) /* 0.310885647 */, 19 },
+  /* 8113 */  { MAD_F(0x04f998cf) /* 0.310936747 */, 19 },
+  /* 8114 */  { MAD_F(0x04f9ce65) /* 0.310987849 */, 19 },
+  /* 8115 */  { MAD_F(0x04fa03fb) /* 0.311038953 */, 19 },
+  /* 8116 */  { MAD_F(0x04fa3992) /* 0.311090059 */, 19 },
+  /* 8117 */  { MAD_F(0x04fa6f29) /* 0.311141168 */, 19 },
+  /* 8118 */  { MAD_F(0x04faa4c1) /* 0.311192278 */, 19 },
+  /* 8119 */  { MAD_F(0x04fada59) /* 0.311243390 */, 19 },
+  /* 8120 */  { MAD_F(0x04fb0ff2) /* 0.311294505 */, 19 },
+  /* 8121 */  { MAD_F(0x04fb458c) /* 0.311345622 */, 19 },
+  /* 8122 */  { MAD_F(0x04fb7b26) /* 0.311396741 */, 19 },
+  /* 8123 */  { MAD_F(0x04fbb0c1) /* 0.311447862 */, 19 },
+  /* 8124 */  { MAD_F(0x04fbe65c) /* 0.311498985 */, 19 },
+  /* 8125 */  { MAD_F(0x04fc1bf8) /* 0.311550110 */, 19 },
+  /* 8126 */  { MAD_F(0x04fc5194) /* 0.311601237 */, 19 },
+  /* 8127 */  { MAD_F(0x04fc8731) /* 0.311652366 */, 19 },
+
+  /* 8128 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 19 },
+  /* 8129 */  { MAD_F(0x04fcf26c) /* 0.311754631 */, 19 },
+  /* 8130 */  { MAD_F(0x04fd280b) /* 0.311805767 */, 19 },
+  /* 8131 */  { MAD_F(0x04fd5daa) /* 0.311856905 */, 19 },
+  /* 8132 */  { MAD_F(0x04fd934a) /* 0.311908044 */, 19 },
+  /* 8133 */  { MAD_F(0x04fdc8ea) /* 0.311959186 */, 19 },
+  /* 8134 */  { MAD_F(0x04fdfe8b) /* 0.312010330 */, 19 },
+  /* 8135 */  { MAD_F(0x04fe342c) /* 0.312061476 */, 19 },
+  /* 8136 */  { MAD_F(0x04fe69ce) /* 0.312112625 */, 19 },
+  /* 8137 */  { MAD_F(0x04fe9f71) /* 0.312163775 */, 19 },
+  /* 8138 */  { MAD_F(0x04fed514) /* 0.312214927 */, 19 },
+  /* 8139 */  { MAD_F(0x04ff0ab8) /* 0.312266082 */, 19 },
+  /* 8140 */  { MAD_F(0x04ff405c) /* 0.312317238 */, 19 },
+  /* 8141 */  { MAD_F(0x04ff7601) /* 0.312368397 */, 19 },
+  /* 8142 */  { MAD_F(0x04ffaba6) /* 0.312419558 */, 19 },
+  /* 8143 */  { MAD_F(0x04ffe14c) /* 0.312470720 */, 19 },
+
+  /* 8144 */  { MAD_F(0x050016f3) /* 0.312521885 */, 19 },
+  /* 8145 */  { MAD_F(0x05004c9a) /* 0.312573052 */, 19 },
+  /* 8146 */  { MAD_F(0x05008241) /* 0.312624222 */, 19 },
+  /* 8147 */  { MAD_F(0x0500b7e9) /* 0.312675393 */, 19 },
+  /* 8148 */  { MAD_F(0x0500ed92) /* 0.312726566 */, 19 },
+  /* 8149 */  { MAD_F(0x0501233b) /* 0.312777742 */, 19 },
+  /* 8150 */  { MAD_F(0x050158e5) /* 0.312828919 */, 19 },
+  /* 8151 */  { MAD_F(0x05018e90) /* 0.312880099 */, 19 },
+  /* 8152 */  { MAD_F(0x0501c43b) /* 0.312931280 */, 19 },
+  /* 8153 */  { MAD_F(0x0501f9e6) /* 0.312982464 */, 19 },
+  /* 8154 */  { MAD_F(0x05022f92) /* 0.313033650 */, 19 },
+  /* 8155 */  { MAD_F(0x0502653f) /* 0.313084838 */, 19 },
+  /* 8156 */  { MAD_F(0x05029aec) /* 0.313136028 */, 19 },
+  /* 8157 */  { MAD_F(0x0502d09a) /* 0.313187220 */, 19 },
+  /* 8158 */  { MAD_F(0x05030648) /* 0.313238414 */, 19 },
+  /* 8159 */  { MAD_F(0x05033bf7) /* 0.313289611 */, 19 },
+
+  /* 8160 */  { MAD_F(0x050371a7) /* 0.313340809 */, 19 },
+  /* 8161 */  { MAD_F(0x0503a757) /* 0.313392010 */, 19 },
+  /* 8162 */  { MAD_F(0x0503dd07) /* 0.313443212 */, 19 },
+  /* 8163 */  { MAD_F(0x050412b9) /* 0.313494417 */, 19 },
+  /* 8164 */  { MAD_F(0x0504486a) /* 0.313545624 */, 19 },
+  /* 8165 */  { MAD_F(0x05047e1d) /* 0.313596833 */, 19 },
+  /* 8166 */  { MAD_F(0x0504b3cf) /* 0.313648044 */, 19 },
+  /* 8167 */  { MAD_F(0x0504e983) /* 0.313699257 */, 19 },
+  /* 8168 */  { MAD_F(0x05051f37) /* 0.313750472 */, 19 },
+  /* 8169 */  { MAD_F(0x050554eb) /* 0.313801689 */, 19 },
+  /* 8170 */  { MAD_F(0x05058aa0) /* 0.313852909 */, 19 },
+  /* 8171 */  { MAD_F(0x0505c056) /* 0.313904130 */, 19 },
+  /* 8172 */  { MAD_F(0x0505f60c) /* 0.313955354 */, 19 },
+  /* 8173 */  { MAD_F(0x05062bc3) /* 0.314006579 */, 19 },
+  /* 8174 */  { MAD_F(0x0506617a) /* 0.314057807 */, 19 },
+  /* 8175 */  { MAD_F(0x05069732) /* 0.314109037 */, 19 },
+
+  /* 8176 */  { MAD_F(0x0506cceb) /* 0.314160269 */, 19 },
+  /* 8177 */  { MAD_F(0x050702a4) /* 0.314211502 */, 19 },
+  /* 8178 */  { MAD_F(0x0507385d) /* 0.314262739 */, 19 },
+  /* 8179 */  { MAD_F(0x05076e17) /* 0.314313977 */, 19 },
+  /* 8180 */  { MAD_F(0x0507a3d2) /* 0.314365217 */, 19 },
+  /* 8181 */  { MAD_F(0x0507d98d) /* 0.314416459 */, 19 },
+  /* 8182 */  { MAD_F(0x05080f49) /* 0.314467704 */, 19 },
+  /* 8183 */  { MAD_F(0x05084506) /* 0.314518950 */, 19 },
+  /* 8184 */  { MAD_F(0x05087ac2) /* 0.314570199 */, 19 },
+  /* 8185 */  { MAD_F(0x0508b080) /* 0.314621449 */, 19 },
+  /* 8186 */  { MAD_F(0x0508e63e) /* 0.314672702 */, 19 },
+  /* 8187 */  { MAD_F(0x05091bfd) /* 0.314723957 */, 19 },
+  /* 8188 */  { MAD_F(0x050951bc) /* 0.314775214 */, 19 },
+  /* 8189 */  { MAD_F(0x0509877c) /* 0.314826473 */, 19 },
+  /* 8190 */  { MAD_F(0x0509bd3c) /* 0.314877734 */, 19 },
+  /* 8191 */  { MAD_F(0x0509f2fd) /* 0.314928997 */, 19 },
+
+  /* 8192 */  { MAD_F(0x050a28be) /* 0.314980262 */, 19 },
+  /* 8193 */  { MAD_F(0x050a5e80) /* 0.315031530 */, 19 },
+  /* 8194 */  { MAD_F(0x050a9443) /* 0.315082799 */, 19 },
+  /* 8195 */  { MAD_F(0x050aca06) /* 0.315134071 */, 19 },
+  /* 8196 */  { MAD_F(0x050affc9) /* 0.315185344 */, 19 },
+  /* 8197 */  { MAD_F(0x050b358e) /* 0.315236620 */, 19 },
+  /* 8198 */  { MAD_F(0x050b6b52) /* 0.315287898 */, 19 },
+  /* 8199 */  { MAD_F(0x050ba118) /* 0.315339178 */, 19 },
+  /* 8200 */  { MAD_F(0x050bd6de) /* 0.315390460 */, 19 },
+  /* 8201 */  { MAD_F(0x050c0ca4) /* 0.315441744 */, 19 },
+  /* 8202 */  { MAD_F(0x050c426b) /* 0.315493030 */, 19 },
+  /* 8203 */  { MAD_F(0x050c7833) /* 0.315544318 */, 19 },
+  /* 8204 */  { MAD_F(0x050cadfb) /* 0.315595608 */, 19 },
+  /* 8205 */  { MAD_F(0x050ce3c4) /* 0.315646901 */, 19 },
+  /* 8206 */  { MAD_F(0x050d198d) /* 0.315698195 */, 19 }
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/sf_table.dat
@@ -1,0 +1,106 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: sf_table.dat,v 1.7 2004/01/23 09:41:33 rob Exp $
+ */
+
+/*
+ * These are the scalefactor values for Layer I and Layer II.
+ * The values are from Table B.1 of ISO/IEC 11172-3.
+ *
+ * There is some error introduced by the 32-bit fixed-point representation;
+ * the amount of error is shown. For 16-bit PCM output, this shouldn't be
+ * too much of a problem.
+ *
+ * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict
+ * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of
+ * 63 is invalid. However, for better compatibility with current practices, we
+ * add a 64th entry.
+ */
+
+  MAD_F(0x20000000),  /* 2.000000000000 => 2.000000000000, e  0.000000000000 */
+  MAD_F(0x1965fea5),  /* 1.587401051968 => 1.587401051074, e  0.000000000894 */
+  MAD_F(0x1428a2fa),  /* 1.259921049895 => 1.259921051562, e -0.000000001667 */
+  MAD_F(0x10000000),  /* 1.000000000000 => 1.000000000000, e  0.000000000000 */
+  MAD_F(0x0cb2ff53),  /* 0.793700525984 => 0.793700527400, e -0.000000001416 */
+  MAD_F(0x0a14517d),  /* 0.629960524947 => 0.629960525781, e -0.000000000833 */
+  MAD_F(0x08000000),  /* 0.500000000000 => 0.500000000000, e  0.000000000000 */
+  MAD_F(0x06597fa9),  /* 0.396850262992 => 0.396850261837, e  0.000000001155 */
+
+  MAD_F(0x050a28be),  /* 0.314980262474 => 0.314980261028, e  0.000000001446 */
+  MAD_F(0x04000000),  /* 0.250000000000 => 0.250000000000, e  0.000000000000 */
+  MAD_F(0x032cbfd5),  /* 0.198425131496 => 0.198425132781, e -0.000000001285 */
+  MAD_F(0x0285145f),  /* 0.157490131237 => 0.157490130514, e  0.000000000723 */
+  MAD_F(0x02000000),  /* 0.125000000000 => 0.125000000000, e  0.000000000000 */
+  MAD_F(0x01965fea),  /* 0.099212565748 => 0.099212564528, e  0.000000001220 */
+  MAD_F(0x01428a30),  /* 0.078745065618 => 0.078745067120, e -0.000000001501 */
+  MAD_F(0x01000000),  /* 0.062500000000 => 0.062500000000, e  0.000000000000 */
+
+  MAD_F(0x00cb2ff5),  /* 0.049606282874 => 0.049606282264, e  0.000000000610 */
+  MAD_F(0x00a14518),  /* 0.039372532809 => 0.039372533560, e -0.000000000751 */
+  MAD_F(0x00800000),  /* 0.031250000000 => 0.031250000000, e  0.000000000000 */
+  MAD_F(0x006597fb),  /* 0.024803141437 => 0.024803142995, e -0.000000001558 */
+  MAD_F(0x0050a28c),  /* 0.019686266405 => 0.019686266780, e -0.000000000375 */
+  MAD_F(0x00400000),  /* 0.015625000000 => 0.015625000000, e  0.000000000000 */
+  MAD_F(0x0032cbfd),  /* 0.012401570719 => 0.012401569635, e  0.000000001084 */
+  MAD_F(0x00285146),  /* 0.009843133202 => 0.009843133390, e -0.000000000188 */
+
+  MAD_F(0x00200000),  /* 0.007812500000 => 0.007812500000, e  0.000000000000 */
+  MAD_F(0x001965ff),  /* 0.006200785359 => 0.006200786680, e -0.000000001321 */
+  MAD_F(0x001428a3),  /* 0.004921566601 => 0.004921566695, e -0.000000000094 */
+  MAD_F(0x00100000),  /* 0.003906250000 => 0.003906250000, e  0.000000000000 */
+  MAD_F(0x000cb2ff),  /* 0.003100392680 => 0.003100391477, e  0.000000001202 */
+  MAD_F(0x000a1451),  /* 0.002460783301 => 0.002460781485, e  0.000000001816 */
+  MAD_F(0x00080000),  /* 0.001953125000 => 0.001953125000, e  0.000000000000 */
+  MAD_F(0x00065980),  /* 0.001550196340 => 0.001550197601, e -0.000000001262 */
+
+  MAD_F(0x00050a29),  /* 0.001230391650 => 0.001230392605, e -0.000000000955 */
+  MAD_F(0x00040000),  /* 0.000976562500 => 0.000976562500, e  0.000000000000 */
+  MAD_F(0x00032cc0),  /* 0.000775098170 => 0.000775098801, e -0.000000000631 */
+  MAD_F(0x00028514),  /* 0.000615195825 => 0.000615194440, e  0.000000001385 */
+  MAD_F(0x00020000),  /* 0.000488281250 => 0.000488281250, e  0.000000000000 */
+  MAD_F(0x00019660),  /* 0.000387549085 => 0.000387549400, e -0.000000000315 */
+  MAD_F(0x0001428a),  /* 0.000307597913 => 0.000307597220, e  0.000000000693 */
+  MAD_F(0x00010000),  /* 0.000244140625 => 0.000244140625, e  0.000000000000 */
+
+  MAD_F(0x0000cb30),  /* 0.000193774542 => 0.000193774700, e -0.000000000158 */
+  MAD_F(0x0000a145),  /* 0.000153798956 => 0.000153798610, e  0.000000000346 */
+  MAD_F(0x00008000),  /* 0.000122070313 => 0.000122070313, e  0.000000000000 */
+  MAD_F(0x00006598),  /* 0.000096887271 => 0.000096887350, e -0.000000000079 */
+  MAD_F(0x000050a3),  /* 0.000076899478 => 0.000076901168, e -0.000000001689 */
+  MAD_F(0x00004000),  /* 0.000061035156 => 0.000061035156, e  0.000000000000 */
+  MAD_F(0x000032cc),  /* 0.000048443636 => 0.000048443675, e -0.000000000039 */
+  MAD_F(0x00002851),  /* 0.000038449739 => 0.000038448721, e  0.000000001018 */
+
+  MAD_F(0x00002000),  /* 0.000030517578 => 0.000030517578, e  0.000000000000 */
+  MAD_F(0x00001966),  /* 0.000024221818 => 0.000024221838, e -0.000000000020 */
+  MAD_F(0x00001429),  /* 0.000019224870 => 0.000019226223, e -0.000000001354 */
+  MAD_F(0x00001000),  /* 0.000015258789 => 0.000015258789, e -0.000000000000 */
+  MAD_F(0x00000cb3),  /* 0.000012110909 => 0.000012110919, e -0.000000000010 */
+  MAD_F(0x00000a14),  /* 0.000009612435 => 0.000009611249, e  0.000000001186 */
+  MAD_F(0x00000800),  /* 0.000007629395 => 0.000007629395, e -0.000000000000 */
+  MAD_F(0x00000659),  /* 0.000006055454 => 0.000006053597, e  0.000000001858 */
+
+  MAD_F(0x0000050a),  /* 0.000004806217 => 0.000004805624, e  0.000000000593 */
+  MAD_F(0x00000400),  /* 0.000003814697 => 0.000003814697, e  0.000000000000 */
+  MAD_F(0x0000032d),  /* 0.000003027727 => 0.000003028661, e -0.000000000934 */
+  MAD_F(0x00000285),  /* 0.000002403109 => 0.000002402812, e  0.000000000296 */
+  MAD_F(0x00000200),  /* 0.000001907349 => 0.000001907349, e -0.000000000000 */
+  MAD_F(0x00000196),  /* 0.000001513864 => 0.000001512468, e  0.000000001396 */
+  MAD_F(0x00000143),  /* 0.000001201554 => 0.000001203269, e -0.000000001714 */
+  MAD_F(0x00000000)   /* this compatibility entry is not part of Table B.1 */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/stream.c
@@ -1,0 +1,159 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: stream.c,v 1.12 2004/02/05 09:02:39 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "bit.h"
+# include "stream.h"
+
+/*
+ * NAME:	stream->init()
+ * DESCRIPTION:	initialize stream struct
+ */
+void mad_stream_init(struct mad_stream *stream)
+{
+  stream->buffer     = 0;
+  stream->bufend     = 0;
+  stream->skiplen    = 0;
+
+  stream->sync       = 0;
+  stream->freerate   = 0;
+
+  stream->this_frame = 0;
+  stream->next_frame = 0;
+  mad_bit_init(&stream->ptr, 0);
+
+  mad_bit_init(&stream->anc_ptr, 0);
+  stream->anc_bitlen = 0;
+
+  stream->main_data  = 0;
+  stream->md_len     = 0;
+
+  stream->options    = 0;
+  stream->error      = MAD_ERROR_NONE;
+}
+
+/*
+ * NAME:	stream->finish()
+ * DESCRIPTION:	deallocate any dynamic memory associated with stream
+ */
+void mad_stream_finish(struct mad_stream *stream)
+{
+  if (stream->main_data) {
+    free(stream->main_data);
+    stream->main_data = 0;
+  }
+
+  mad_bit_finish(&stream->anc_ptr);
+  mad_bit_finish(&stream->ptr);
+}
+
+/*
+ * NAME:	stream->buffer()
+ * DESCRIPTION:	set stream buffer pointers
+ */
+void mad_stream_buffer(struct mad_stream *stream,
+		       unsigned char const *buffer, unsigned long length)
+{
+  stream->buffer = buffer;
+  stream->bufend = buffer + length;
+
+  stream->this_frame = buffer;
+  stream->next_frame = buffer;
+
+  stream->sync = 1;
+
+  mad_bit_init(&stream->ptr, buffer);
+}
+
+/*
+ * NAME:	stream->skip()
+ * DESCRIPTION:	arrange to skip bytes before the next frame
+ */
+void mad_stream_skip(struct mad_stream *stream, unsigned long length)
+{
+  stream->skiplen += length;
+}
+
+/*
+ * NAME:	stream->sync()
+ * DESCRIPTION:	locate the next stream sync word
+ */
+int mad_stream_sync(struct mad_stream *stream)
+{
+  register unsigned char const *ptr, *end;
+
+  ptr = mad_bit_nextbyte(&stream->ptr);
+  end = stream->bufend;
+
+  while (ptr < end - 1 &&
+	 !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0))
+    ++ptr;
+
+  if (end - ptr < MAD_BUFFER_GUARD)
+    return -1;
+
+  mad_bit_init(&stream->ptr, ptr);
+
+  return 0;
+}
+
+/*
+ * NAME:	stream->errorstr()
+ * DESCRIPTION:	return a string description of the current error condition
+ */
+char const *mad_stream_errorstr(struct mad_stream const *stream)
+{
+  switch (stream->error) {
+  case MAD_ERROR_NONE:		 return "no error";
+
+  case MAD_ERROR_BUFLEN:	 return "input buffer too small (or EOF)";
+  case MAD_ERROR_BUFPTR:	 return "invalid (null) buffer pointer";
+
+  case MAD_ERROR_NOMEM:		 return "not enough memory";
+
+  case MAD_ERROR_LOSTSYNC:	 return "lost synchronization";
+  case MAD_ERROR_BADLAYER:	 return "reserved header layer value";
+  case MAD_ERROR_BADBITRATE:	 return "forbidden bitrate value";
+  case MAD_ERROR_BADSAMPLERATE:	 return "reserved sample frequency value";
+  case MAD_ERROR_BADEMPHASIS:	 return "reserved emphasis value";
+
+  case MAD_ERROR_BADCRC:	 return "CRC check failed";
+  case MAD_ERROR_BADBITALLOC:	 return "forbidden bit allocation value";
+  case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index";
+  case MAD_ERROR_BADMODE:	 return "bad bitrate/mode combination";
+  case MAD_ERROR_BADFRAMELEN:	 return "bad frame length";
+  case MAD_ERROR_BADBIGVALUES:	 return "bad big_values count";
+  case MAD_ERROR_BADBLOCKTYPE:	 return "reserved block_type";
+  case MAD_ERROR_BADSCFSI:	 return "bad scalefactor selection info";
+  case MAD_ERROR_BADDATAPTR:	 return "bad main_data_begin pointer";
+  case MAD_ERROR_BADPART3LEN:	 return "bad audio data length";
+  case MAD_ERROR_BADHUFFTABLE:	 return "bad Huffman table select";
+  case MAD_ERROR_BADHUFFDATA:	 return "Huffman data overrun";
+  case MAD_ERROR_BADSTEREO:	 return "incompatible block_type for JS";
+  }
+
+  return 0;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/stream.h
@@ -1,0 +1,108 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $
+ */
+
+# ifndef LIBMAD_STREAM_H
+# define LIBMAD_STREAM_H
+
+# include "bit.h"
+
+# define MAD_BUFFER_GUARD	8
+# define MAD_BUFFER_MDLEN	(511 + 2048 + MAD_BUFFER_GUARD)
+
+enum mad_error {
+  MAD_ERROR_NONE	   = 0x0000,	/* no error */
+
+  MAD_ERROR_BUFLEN	   = 0x0001,	/* input buffer too small (or EOF) */
+  MAD_ERROR_BUFPTR	   = 0x0002,	/* invalid (null) buffer pointer */
+
+  MAD_ERROR_NOMEM	   = 0x0031,	/* not enough memory */
+
+  MAD_ERROR_LOSTSYNC	   = 0x0101,	/* lost synchronization */
+  MAD_ERROR_BADLAYER	   = 0x0102,	/* reserved header layer value */
+  MAD_ERROR_BADBITRATE	   = 0x0103,	/* forbidden bitrate value */
+  MAD_ERROR_BADSAMPLERATE  = 0x0104,	/* reserved sample frequency value */
+  MAD_ERROR_BADEMPHASIS	   = 0x0105,	/* reserved emphasis value */
+
+  MAD_ERROR_BADCRC	   = 0x0201,	/* CRC check failed */
+  MAD_ERROR_BADBITALLOC	   = 0x0211,	/* forbidden bit allocation value */
+  MAD_ERROR_BADSCALEFACTOR = 0x0221,	/* bad scalefactor index */
+  MAD_ERROR_BADMODE        = 0x0222,	/* bad bitrate/mode combination */
+  MAD_ERROR_BADFRAMELEN	   = 0x0231,	/* bad frame length */
+  MAD_ERROR_BADBIGVALUES   = 0x0232,	/* bad big_values count */
+  MAD_ERROR_BADBLOCKTYPE   = 0x0233,	/* reserved block_type */
+  MAD_ERROR_BADSCFSI	   = 0x0234,	/* bad scalefactor selection info */
+  MAD_ERROR_BADDATAPTR	   = 0x0235,	/* bad main_data_begin pointer */
+  MAD_ERROR_BADPART3LEN	   = 0x0236,	/* bad audio data length */
+  MAD_ERROR_BADHUFFTABLE   = 0x0237,	/* bad Huffman table select */
+  MAD_ERROR_BADHUFFDATA	   = 0x0238,	/* Huffman data overrun */
+  MAD_ERROR_BADSTEREO	   = 0x0239	/* incompatible block_type for JS */
+};
+
+# define MAD_RECOVERABLE(error)	((error) & 0xff00)
+
+struct mad_stream {
+  unsigned char const *buffer;		/* input bitstream buffer */
+  unsigned char const *bufend;		/* end of buffer */
+  unsigned long skiplen;		/* bytes to skip before next frame */
+
+  int sync;				/* stream sync found */
+  unsigned long freerate;		/* free bitrate (fixed) */
+
+  unsigned char const *this_frame;	/* start of current frame */
+  unsigned char const *next_frame;	/* start of next frame */
+  struct mad_bitptr ptr;		/* current processing bit pointer */
+
+  struct mad_bitptr anc_ptr;		/* ancillary bits pointer */
+  unsigned int anc_bitlen;		/* number of ancillary bits */
+
+  unsigned char (*main_data)[MAD_BUFFER_MDLEN];
+					/* Layer III main_data() */
+  unsigned int md_len;			/* bytes in main_data */
+
+  int options;				/* decoding options (see below) */
+  enum mad_error error;			/* error code (see above) */
+};
+
+enum {
+  MAD_OPTION_IGNORECRC      = 0x0001,	/* ignore CRC errors */
+  MAD_OPTION_HALFSAMPLERATE = 0x0002	/* generate PCM at 1/2 sample rate */
+# if 0  /* not yet implemented */
+  MAD_OPTION_LEFTCHANNEL    = 0x0010,	/* decode left channel only */
+  MAD_OPTION_RIGHTCHANNEL   = 0x0020,	/* decode right channel only */
+  MAD_OPTION_SINGLECHANNEL  = 0x0030	/* combine channels */
+# endif
+};
+
+void mad_stream_init(struct mad_stream *);
+void mad_stream_finish(struct mad_stream *);
+
+# define mad_stream_options(stream, opts)  \
+    ((void) ((stream)->options = (opts)))
+
+void mad_stream_buffer(struct mad_stream *,
+		       unsigned char const *, unsigned long);
+void mad_stream_skip(struct mad_stream *, unsigned long);
+
+int mad_stream_sync(struct mad_stream *);
+
+char const *mad_stream_errorstr(struct mad_stream const *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/synth.c
@@ -1,0 +1,857 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: synth.c,v 1.25 2004/01/23 09:41:33 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "fixed.h"
+# include "frame.h"
+# include "synth.h"
+
+/*
+ * NAME:	synth->init()
+ * DESCRIPTION:	initialize synth struct
+ */
+void mad_synth_init(struct mad_synth *synth)
+{
+  mad_synth_mute(synth);
+
+  synth->phase = 0;
+
+  synth->pcm.samplerate = 0;
+  synth->pcm.channels   = 0;
+  synth->pcm.length     = 0;
+}
+
+/*
+ * NAME:	synth->mute()
+ * DESCRIPTION:	zero all polyphase filterbank values, resetting synthesis
+ */
+void mad_synth_mute(struct mad_synth *synth)
+{
+  unsigned int ch, s, v;
+
+  for (ch = 0; ch < 2; ++ch) {
+    for (s = 0; s < 16; ++s) {
+      for (v = 0; v < 8; ++v) {
+	synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] =
+	synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0;
+      }
+    }
+  }
+}
+
+/*
+ * An optional optimization called here the Subband Synthesis Optimization
+ * (SSO) improves the performance of subband synthesis at the expense of
+ * accuracy.
+ *
+ * The idea is to simplify 32x32->64-bit multiplication to 32x32->32 such
+ * that extra scaling and rounding are not necessary. This often allows the
+ * compiler to use faster 32-bit multiply-accumulate instructions instead of
+ * explicit 64-bit multiply, shift, and add instructions.
+ *
+ * SSO works like this: a full 32x32->64-bit multiply of two mad_fixed_t
+ * values requires the result to be right-shifted 28 bits to be properly
+ * scaled to the same fixed-point format. Right shifts can be applied at any
+ * time to either operand or to the result, so the optimization involves
+ * careful placement of these shifts to minimize the loss of accuracy.
+ *
+ * First, a 14-bit shift is applied with rounding at compile-time to the D[]
+ * table of coefficients for the subband synthesis window. This only loses 2
+ * bits of accuracy because the lower 12 bits are always zero. A second
+ * 12-bit shift occurs after the DCT calculation. This loses 12 bits of
+ * accuracy. Finally, a third 2-bit shift occurs just before the sample is
+ * saved in the PCM buffer. 14 + 12 + 2 == 28 bits.
+ */
+
+/* FPM_DEFAULT without OPT_SSO will actually lose accuracy and performance */
+
+# if defined(FPM_DEFAULT) && !defined(OPT_SSO)
+#  define OPT_SSO
+# endif
+
+/* second SSO shift, with rounding */
+
+# if defined(OPT_SSO)
+#  define SHIFT(x)  (((x) + (1L << 11)) >> 12)
+# else
+#  define SHIFT(x)  (x)
+# endif
+
+/* possible DCT speed optimization */
+
+# if defined(OPT_SPEED) && defined(MAD_F_MLX)
+#  define OPT_DCTO
+#  define MUL(x, y)  \
+    ({ mad_fixed64hi_t hi;  \
+       mad_fixed64lo_t lo;  \
+       MAD_F_MLX(hi, lo, (x), (y));  \
+       hi << (32 - MAD_F_SCALEBITS - 3);  \
+    })
+# else
+#  undef OPT_DCTO
+#  define MUL(x, y)  mad_f_mul((x), (y))
+# endif
+
+/*
+ * NAME:	dct32()
+ * DESCRIPTION:	perform fast in[32]->out[32] DCT
+ */
+static
+void dct32(mad_fixed_t const in[32], unsigned int slot,
+	   mad_fixed_t lo[16][8], mad_fixed_t hi[16][8])
+{
+  mad_fixed_t t0,   t1,   t2,   t3,   t4,   t5,   t6,   t7;
+  mad_fixed_t t8,   t9,   t10,  t11,  t12,  t13,  t14,  t15;
+  mad_fixed_t t16,  t17,  t18,  t19,  t20,  t21,  t22,  t23;
+  mad_fixed_t t24,  t25,  t26,  t27,  t28,  t29,  t30,  t31;
+  mad_fixed_t t32,  t33,  t34,  t35,  t36,  t37,  t38,  t39;
+  mad_fixed_t t40,  t41,  t42,  t43,  t44,  t45,  t46,  t47;
+  mad_fixed_t t48,  t49,  t50,  t51,  t52,  t53,  t54,  t55;
+  mad_fixed_t t56,  t57,  t58,  t59,  t60,  t61,  t62,  t63;
+  mad_fixed_t t64,  t65,  t66,  t67,  t68,  t69,  t70,  t71;
+  mad_fixed_t t72,  t73,  t74,  t75,  t76,  t77,  t78,  t79;
+  mad_fixed_t t80,  t81,  t82,  t83,  t84,  t85,  t86,  t87;
+  mad_fixed_t t88,  t89,  t90,  t91,  t92,  t93,  t94,  t95;
+  mad_fixed_t t96,  t97,  t98,  t99,  t100, t101, t102, t103;
+  mad_fixed_t t104, t105, t106, t107, t108, t109, t110, t111;
+  mad_fixed_t t112, t113, t114, t115, t116, t117, t118, t119;
+  mad_fixed_t t120, t121, t122, t123, t124, t125, t126, t127;
+  mad_fixed_t t128, t129, t130, t131, t132, t133, t134, t135;
+  mad_fixed_t t136, t137, t138, t139, t140, t141, t142, t143;
+  mad_fixed_t t144, t145, t146, t147, t148, t149, t150, t151;
+  mad_fixed_t t152, t153, t154, t155, t156, t157, t158, t159;
+  mad_fixed_t t160, t161, t162, t163, t164, t165, t166, t167;
+  mad_fixed_t t168, t169, t170, t171, t172, t173, t174, t175;
+  mad_fixed_t t176;
+
+  /* costab[i] = cos(PI / (2 * 32) * i) */
+
+# if defined(OPT_DCTO)
+#  define costab1	MAD_F(0x7fd8878e)
+#  define costab2	MAD_F(0x7f62368f)
+#  define costab3	MAD_F(0x7e9d55fc)
+#  define costab4	MAD_F(0x7d8a5f40)
+#  define costab5	MAD_F(0x7c29fbee)
+#  define costab6	MAD_F(0x7a7d055b)
+#  define costab7	MAD_F(0x78848414)
+#  define costab8	MAD_F(0x7641af3d)
+#  define costab9	MAD_F(0x73b5ebd1)
+#  define costab10	MAD_F(0x70e2cbc6)
+#  define costab11	MAD_F(0x6dca0d14)
+#  define costab12	MAD_F(0x6a6d98a4)
+#  define costab13	MAD_F(0x66cf8120)
+#  define costab14	MAD_F(0x62f201ac)
+#  define costab15	MAD_F(0x5ed77c8a)
+#  define costab16	MAD_F(0x5a82799a)
+#  define costab17	MAD_F(0x55f5a4d2)
+#  define costab18	MAD_F(0x5133cc94)
+#  define costab19	MAD_F(0x4c3fdff4)
+#  define costab20	MAD_F(0x471cece7)
+#  define costab21	MAD_F(0x41ce1e65)
+#  define costab22	MAD_F(0x3c56ba70)
+#  define costab23	MAD_F(0x36ba2014)
+#  define costab24	MAD_F(0x30fbc54d)
+#  define costab25	MAD_F(0x2b1f34eb)
+#  define costab26	MAD_F(0x25280c5e)
+#  define costab27	MAD_F(0x1f19f97b)
+#  define costab28	MAD_F(0x18f8b83c)
+#  define costab29	MAD_F(0x12c8106f)
+#  define costab30	MAD_F(0x0c8bd35e)
+#  define costab31	MAD_F(0x0647d97c)
+# else
+#  define costab1	MAD_F(0x0ffb10f2)  /* 0.998795456 */
+#  define costab2	MAD_F(0x0fec46d2)  /* 0.995184727 */
+#  define costab3	MAD_F(0x0fd3aac0)  /* 0.989176510 */
+#  define costab4	MAD_F(0x0fb14be8)  /* 0.980785280 */
+#  define costab5	MAD_F(0x0f853f7e)  /* 0.970031253 */
+#  define costab6	MAD_F(0x0f4fa0ab)  /* 0.956940336 */
+#  define costab7	MAD_F(0x0f109082)  /* 0.941544065 */
+#  define costab8	MAD_F(0x0ec835e8)  /* 0.923879533 */
+#  define costab9	MAD_F(0x0e76bd7a)  /* 0.903989293 */
+#  define costab10	MAD_F(0x0e1c5979)  /* 0.881921264 */
+#  define costab11	MAD_F(0x0db941a3)  /* 0.857728610 */
+#  define costab12	MAD_F(0x0d4db315)  /* 0.831469612 */
+#  define costab13	MAD_F(0x0cd9f024)  /* 0.803207531 */
+#  define costab14	MAD_F(0x0c5e4036)  /* 0.773010453 */
+#  define costab15	MAD_F(0x0bdaef91)  /* 0.740951125 */
+#  define costab16	MAD_F(0x0b504f33)  /* 0.707106781 */
+#  define costab17	MAD_F(0x0abeb49a)  /* 0.671558955 */
+#  define costab18	MAD_F(0x0a267993)  /* 0.634393284 */
+#  define costab19	MAD_F(0x0987fbfe)  /* 0.595699304 */
+#  define costab20	MAD_F(0x08e39d9d)  /* 0.555570233 */
+#  define costab21	MAD_F(0x0839c3cd)  /* 0.514102744 */
+#  define costab22	MAD_F(0x078ad74e)  /* 0.471396737 */
+#  define costab23	MAD_F(0x06d74402)  /* 0.427555093 */
+#  define costab24	MAD_F(0x061f78aa)  /* 0.382683432 */
+#  define costab25	MAD_F(0x0563e69d)  /* 0.336889853 */
+#  define costab26	MAD_F(0x04a5018c)  /* 0.290284677 */
+#  define costab27	MAD_F(0x03e33f2f)  /* 0.242980180 */
+#  define costab28	MAD_F(0x031f1708)  /* 0.195090322 */
+#  define costab29	MAD_F(0x0259020e)  /* 0.146730474 */
+#  define costab30	MAD_F(0x01917a6c)  /* 0.098017140 */
+#  define costab31	MAD_F(0x00c8fb30)  /* 0.049067674 */
+# endif
+
+  t0   = in[0]  + in[31];  t16  = MUL(in[0]  - in[31], costab1);
+  t1   = in[15] + in[16];  t17  = MUL(in[15] - in[16], costab31);
+
+  t41  = t16 + t17;
+  t59  = MUL(t16 - t17, costab2);
+  t33  = t0  + t1;
+  t50  = MUL(t0  - t1,  costab2);
+
+  t2   = in[7]  + in[24];  t18  = MUL(in[7]  - in[24], costab15);
+  t3   = in[8]  + in[23];  t19  = MUL(in[8]  - in[23], costab17);
+
+  t42  = t18 + t19;
+  t60  = MUL(t18 - t19, costab30);
+  t34  = t2  + t3;
+  t51  = MUL(t2  - t3,  costab30);
+
+  t4   = in[3]  + in[28];  t20  = MUL(in[3]  - in[28], costab7);
+  t5   = in[12] + in[19];  t21  = MUL(in[12] - in[19], costab25);
+
+  t43  = t20 + t21;
+  t61  = MUL(t20 - t21, costab14);
+  t35  = t4  + t5;
+  t52  = MUL(t4  - t5,  costab14);
+
+  t6   = in[4]  + in[27];  t22  = MUL(in[4]  - in[27], costab9);
+  t7   = in[11] + in[20];  t23  = MUL(in[11] - in[20], costab23);
+
+  t44  = t22 + t23;
+  t62  = MUL(t22 - t23, costab18);
+  t36  = t6  + t7;
+  t53  = MUL(t6  - t7,  costab18);
+
+  t8   = in[1]  + in[30];  t24  = MUL(in[1]  - in[30], costab3);
+  t9   = in[14] + in[17];  t25  = MUL(in[14] - in[17], costab29);
+
+  t45  = t24 + t25;
+  t63  = MUL(t24 - t25, costab6);
+  t37  = t8  + t9;
+  t54  = MUL(t8  - t9,  costab6);
+
+  t10  = in[6]  + in[25];  t26  = MUL(in[6]  - in[25], costab13);
+  t11  = in[9]  + in[22];  t27  = MUL(in[9]  - in[22], costab19);
+
+  t46  = t26 + t27;
+  t64  = MUL(t26 - t27, costab26);
+  t38  = t10 + t11;
+  t55  = MUL(t10 - t11, costab26);
+
+  t12  = in[2]  + in[29];  t28  = MUL(in[2]  - in[29], costab5);
+  t13  = in[13] + in[18];  t29  = MUL(in[13] - in[18], costab27);
+
+  t47  = t28 + t29;
+  t65  = MUL(t28 - t29, costab10);
+  t39  = t12 + t13;
+  t56  = MUL(t12 - t13, costab10);
+
+  t14  = in[5]  + in[26];  t30  = MUL(in[5]  - in[26], costab11);
+  t15  = in[10] + in[21];  t31  = MUL(in[10] - in[21], costab21);
+
+  t48  = t30 + t31;
+  t66  = MUL(t30 - t31, costab22);
+  t40  = t14 + t15;
+  t57  = MUL(t14 - t15, costab22);
+
+  t69  = t33 + t34;  t89  = MUL(t33 - t34, costab4);
+  t70  = t35 + t36;  t90  = MUL(t35 - t36, costab28);
+  t71  = t37 + t38;  t91  = MUL(t37 - t38, costab12);
+  t72  = t39 + t40;  t92  = MUL(t39 - t40, costab20);
+  t73  = t41 + t42;  t94  = MUL(t41 - t42, costab4);
+  t74  = t43 + t44;  t95  = MUL(t43 - t44, costab28);
+  t75  = t45 + t46;  t96  = MUL(t45 - t46, costab12);
+  t76  = t47 + t48;  t97  = MUL(t47 - t48, costab20);
+
+  t78  = t50 + t51;  t100 = MUL(t50 - t51, costab4);
+  t79  = t52 + t53;  t101 = MUL(t52 - t53, costab28);
+  t80  = t54 + t55;  t102 = MUL(t54 - t55, costab12);
+  t81  = t56 + t57;  t103 = MUL(t56 - t57, costab20);
+
+  t83  = t59 + t60;  t106 = MUL(t59 - t60, costab4);
+  t84  = t61 + t62;  t107 = MUL(t61 - t62, costab28);
+  t85  = t63 + t64;  t108 = MUL(t63 - t64, costab12);
+  t86  = t65 + t66;  t109 = MUL(t65 - t66, costab20);
+
+  t113 = t69  + t70;
+  t114 = t71  + t72;
+
+  /*  0 */ hi[15][slot] = SHIFT(t113 + t114);
+  /* 16 */ lo[ 0][slot] = SHIFT(MUL(t113 - t114, costab16));
+
+  t115 = t73  + t74;
+  t116 = t75  + t76;
+
+  t32  = t115 + t116;
+
+  /*  1 */ hi[14][slot] = SHIFT(t32);
+
+  t118 = t78  + t79;
+  t119 = t80  + t81;
+
+  t58  = t118 + t119;
+
+  /*  2 */ hi[13][slot] = SHIFT(t58);
+
+  t121 = t83  + t84;
+  t122 = t85  + t86;
+
+  t67  = t121 + t122;
+
+  t49  = (t67 * 2) - t32;
+
+  /*  3 */ hi[12][slot] = SHIFT(t49);
+
+  t125 = t89  + t90;
+  t126 = t91  + t92;
+
+  t93  = t125 + t126;
+
+  /*  4 */ hi[11][slot] = SHIFT(t93);
+
+  t128 = t94  + t95;
+  t129 = t96  + t97;
+
+  t98  = t128 + t129;
+
+  t68  = (t98 * 2) - t49;
+
+  /*  5 */ hi[10][slot] = SHIFT(t68);
+
+  t132 = t100 + t101;
+  t133 = t102 + t103;
+
+  t104 = t132 + t133;
+
+  t82  = (t104 * 2) - t58;
+
+  /*  6 */ hi[ 9][slot] = SHIFT(t82);
+
+  t136 = t106 + t107;
+  t137 = t108 + t109;
+
+  t110 = t136 + t137;
+
+  t87  = (t110 * 2) - t67;
+
+  t77  = (t87 * 2) - t68;
+
+  /*  7 */ hi[ 8][slot] = SHIFT(t77);
+
+  t141 = MUL(t69 - t70, costab8);
+  t142 = MUL(t71 - t72, costab24);
+  t143 = t141 + t142;
+
+  /*  8 */ hi[ 7][slot] = SHIFT(t143);
+  /* 24 */ lo[ 8][slot] =
+	     SHIFT((MUL(t141 - t142, costab16) * 2) - t143);
+
+  t144 = MUL(t73 - t74, costab8);
+  t145 = MUL(t75 - t76, costab24);
+  t146 = t144 + t145;
+
+  t88  = (t146 * 2) - t77;
+
+  /*  9 */ hi[ 6][slot] = SHIFT(t88);
+
+  t148 = MUL(t78 - t79, costab8);
+  t149 = MUL(t80 - t81, costab24);
+  t150 = t148 + t149;
+
+  t105 = (t150 * 2) - t82;
+
+  /* 10 */ hi[ 5][slot] = SHIFT(t105);
+
+  t152 = MUL(t83 - t84, costab8);
+  t153 = MUL(t85 - t86, costab24);
+  t154 = t152 + t153;
+
+  t111 = (t154 * 2) - t87;
+
+  t99  = (t111 * 2) - t88;
+
+  /* 11 */ hi[ 4][slot] = SHIFT(t99);
+
+  t157 = MUL(t89 - t90, costab8);
+  t158 = MUL(t91 - t92, costab24);
+  t159 = t157 + t158;
+
+  t127 = (t159 * 2) - t93;
+
+  /* 12 */ hi[ 3][slot] = SHIFT(t127);
+
+  t160 = (MUL(t125 - t126, costab16) * 2) - t127;
+
+  /* 20 */ lo[ 4][slot] = SHIFT(t160);
+  /* 28 */ lo[12][slot] =
+	     SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160);
+
+  t161 = MUL(t94 - t95, costab8);
+  t162 = MUL(t96 - t97, costab24);
+  t163 = t161 + t162;
+
+  t130 = (t163 * 2) - t98;
+
+  t112 = (t130 * 2) - t99;
+
+  /* 13 */ hi[ 2][slot] = SHIFT(t112);
+
+  t164 = (MUL(t128 - t129, costab16) * 2) - t130;
+
+  t166 = MUL(t100 - t101, costab8);
+  t167 = MUL(t102 - t103, costab24);
+  t168 = t166 + t167;
+
+  t134 = (t168 * 2) - t104;
+
+  t120 = (t134 * 2) - t105;
+
+  /* 14 */ hi[ 1][slot] = SHIFT(t120);
+
+  t135 = (MUL(t118 - t119, costab16) * 2) - t120;
+
+  /* 18 */ lo[ 2][slot] = SHIFT(t135);
+
+  t169 = (MUL(t132 - t133, costab16) * 2) - t134;
+
+  t151 = (t169 * 2) - t135;
+
+  /* 22 */ lo[ 6][slot] = SHIFT(t151);
+
+  t170 = (((MUL(t148 - t149, costab16) * 2) - t150) * 2) - t151;
+
+  /* 26 */ lo[10][slot] = SHIFT(t170);
+  /* 30 */ lo[14][slot] =
+	     SHIFT((((((MUL(t166 - t167, costab16) * 2) -
+		       t168) * 2) - t169) * 2) - t170);
+
+  t171 = MUL(t106 - t107, costab8);
+  t172 = MUL(t108 - t109, costab24);
+  t173 = t171 + t172;
+
+  t138 = (t173 * 2) - t110;
+
+  t123 = (t138 * 2) - t111;
+
+  t139 = (MUL(t121 - t122, costab16) * 2) - t123;
+
+  t117 = (t123 * 2) - t112;
+
+  /* 15 */ hi[ 0][slot] = SHIFT(t117);
+
+  t124 = (MUL(t115 - t116, costab16) * 2) - t117;
+
+  /* 17 */ lo[ 1][slot] = SHIFT(t124);
+
+  t131 = (t139 * 2) - t124;
+
+  /* 19 */ lo[ 3][slot] = SHIFT(t131);
+
+  t140 = (t164 * 2) - t131;
+
+  /* 21 */ lo[ 5][slot] = SHIFT(t140);
+
+  t174 = (MUL(t136 - t137, costab16) * 2) - t138;
+
+  t155 = (t174 * 2) - t139;
+
+  t147 = (t155 * 2) - t140;
+
+  /* 23 */ lo[ 7][slot] = SHIFT(t147);
+
+  t156 = (((MUL(t144 - t145, costab16) * 2) - t146) * 2) - t147;
+
+  /* 25 */ lo[ 9][slot] = SHIFT(t156);
+
+  t175 = (((MUL(t152 - t153, costab16) * 2) - t154) * 2) - t155;
+
+  t165 = (t175 * 2) - t156;
+
+  /* 27 */ lo[11][slot] = SHIFT(t165);
+
+  t176 = (((((MUL(t161 - t162, costab16) * 2) -
+	     t163) * 2) - t164) * 2) - t165;
+
+  /* 29 */ lo[13][slot] = SHIFT(t176);
+  /* 31 */ lo[15][slot] =
+	     SHIFT((((((((MUL(t171 - t172, costab16) * 2) -
+			 t173) * 2) - t174) * 2) - t175) * 2) - t176);
+
+  /*
+   * Totals:
+   *  80 multiplies
+   *  80 additions
+   * 119 subtractions
+   *  49 shifts (not counting SSO)
+   */
+}
+
+# undef MUL
+# undef SHIFT
+
+/* third SSO shift and/or D[] optimization preshift */
+
+# if defined(OPT_SSO)
+#  if MAD_F_FRACBITS != 28
+#   error "MAD_F_FRACBITS must be 28 to use OPT_SSO"
+#  endif
+#  define ML0(hi, lo, x, y)	((lo)  = (x) * (y))
+#  define MLA(hi, lo, x, y)	((lo) += (x) * (y))
+#  define MLN(hi, lo)		((lo)  = -(lo))
+#  define MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
+#  define SHIFT(x)		((x) >> 2)
+#  define PRESHIFT(x)		((MAD_F(x) + (1L << 13)) >> 14)
+# else
+#  define ML0(hi, lo, x, y)	MAD_F_ML0((hi), (lo), (x), (y))
+#  define MLA(hi, lo, x, y)	MAD_F_MLA((hi), (lo), (x), (y))
+#  define MLN(hi, lo)		MAD_F_MLN((hi), (lo))
+#  define MLZ(hi, lo)		MAD_F_MLZ((hi), (lo))
+#  define SHIFT(x)		(x)
+#  if defined(MAD_F_SCALEBITS)
+#   undef  MAD_F_SCALEBITS
+#   define MAD_F_SCALEBITS	(MAD_F_FRACBITS - 12)
+#   define PRESHIFT(x)		(MAD_F(x) >> 12)
+#  else
+#   define PRESHIFT(x)		MAD_F(x)
+#  endif
+# endif
+
+static
+mad_fixed_t const D[17][32] = {
+# include "D.dat"
+};
+
+# if defined(ASO_SYNTH)
+void synth_full(struct mad_synth *, struct mad_frame const *,
+		unsigned int, unsigned int);
+# else
+/*
+ * NAME:	synth->full()
+ * DESCRIPTION:	perform full frequency PCM synthesis
+ */
+static
+void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
+		unsigned int nch, unsigned int ns)
+{
+  unsigned int phase, ch, s, sb, pe, po;
+  mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8];
+  mad_fixed_t const (*sbsample)[36][32];
+  register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
+  register mad_fixed_t const (*Dptr)[32], *ptr;
+  register mad_fixed64hi_t hi;
+  register mad_fixed64lo_t lo;
+
+  for (ch = 0; ch < nch; ++ch) {
+    sbsample = &frame->sbsample[ch];
+    filter   = &synth->filter[ch];
+    phase    = synth->phase;
+    pcm1     = synth->pcm.samples[ch];
+
+    for (s = 0; s < ns; ++s) {
+      dct32((*sbsample)[s], phase >> 1,
+	    (*filter)[0][phase & 1], (*filter)[1][phase & 1]);
+
+      pe = phase & ~1;
+      po = ((phase - 1) & 0xf) | 1;
+
+      /* calculate 32 samples */
+
+      fe = &(*filter)[0][ phase & 1][0];
+      fx = &(*filter)[0][~phase & 1][0];
+      fo = &(*filter)[1][~phase & 1][0];
+
+      Dptr = &D[0];
+
+      ptr = *Dptr + po;
+      ML0(hi, lo, (*fx)[0], ptr[ 0]);
+      MLA(hi, lo, (*fx)[1], ptr[14]);
+      MLA(hi, lo, (*fx)[2], ptr[12]);
+      MLA(hi, lo, (*fx)[3], ptr[10]);
+      MLA(hi, lo, (*fx)[4], ptr[ 8]);
+      MLA(hi, lo, (*fx)[5], ptr[ 6]);
+      MLA(hi, lo, (*fx)[6], ptr[ 4]);
+      MLA(hi, lo, (*fx)[7], ptr[ 2]);
+      MLN(hi, lo);
+
+      ptr = *Dptr + pe;
+      MLA(hi, lo, (*fe)[0], ptr[ 0]);
+      MLA(hi, lo, (*fe)[1], ptr[14]);
+      MLA(hi, lo, (*fe)[2], ptr[12]);
+      MLA(hi, lo, (*fe)[3], ptr[10]);
+      MLA(hi, lo, (*fe)[4], ptr[ 8]);
+      MLA(hi, lo, (*fe)[5], ptr[ 6]);
+      MLA(hi, lo, (*fe)[6], ptr[ 4]);
+      MLA(hi, lo, (*fe)[7], ptr[ 2]);
+
+      *pcm1++ = SHIFT(MLZ(hi, lo));
+
+      pcm2 = pcm1 + 30;
+
+      for (sb = 1; sb < 16; ++sb) {
+	++fe;
+	++Dptr;
+
+	/* D[32 - sb][i] == -D[sb][31 - i] */
+
+	ptr = *Dptr + po;
+	ML0(hi, lo, (*fo)[0], ptr[ 0]);
+	MLA(hi, lo, (*fo)[1], ptr[14]);
+	MLA(hi, lo, (*fo)[2], ptr[12]);
+	MLA(hi, lo, (*fo)[3], ptr[10]);
+	MLA(hi, lo, (*fo)[4], ptr[ 8]);
+	MLA(hi, lo, (*fo)[5], ptr[ 6]);
+	MLA(hi, lo, (*fo)[6], ptr[ 4]);
+	MLA(hi, lo, (*fo)[7], ptr[ 2]);
+	MLN(hi, lo);
+
+	ptr = *Dptr + pe;
+	MLA(hi, lo, (*fe)[7], ptr[ 2]);
+	MLA(hi, lo, (*fe)[6], ptr[ 4]);
+	MLA(hi, lo, (*fe)[5], ptr[ 6]);
+	MLA(hi, lo, (*fe)[4], ptr[ 8]);
+	MLA(hi, lo, (*fe)[3], ptr[10]);
+	MLA(hi, lo, (*fe)[2], ptr[12]);
+	MLA(hi, lo, (*fe)[1], ptr[14]);
+	MLA(hi, lo, (*fe)[0], ptr[ 0]);
+
+	*pcm1++ = SHIFT(MLZ(hi, lo));
+
+	ptr = *Dptr - pe;
+	ML0(hi, lo, (*fe)[0], ptr[31 - 16]);
+	MLA(hi, lo, (*fe)[1], ptr[31 - 14]);
+	MLA(hi, lo, (*fe)[2], ptr[31 - 12]);
+	MLA(hi, lo, (*fe)[3], ptr[31 - 10]);
+	MLA(hi, lo, (*fe)[4], ptr[31 -  8]);
+	MLA(hi, lo, (*fe)[5], ptr[31 -  6]);
+	MLA(hi, lo, (*fe)[6], ptr[31 -  4]);
+	MLA(hi, lo, (*fe)[7], ptr[31 -  2]);
+
+	ptr = *Dptr - po;
+	MLA(hi, lo, (*fo)[7], ptr[31 -  2]);
+	MLA(hi, lo, (*fo)[6], ptr[31 -  4]);
+	MLA(hi, lo, (*fo)[5], ptr[31 -  6]);
+	MLA(hi, lo, (*fo)[4], ptr[31 -  8]);
+	MLA(hi, lo, (*fo)[3], ptr[31 - 10]);
+	MLA(hi, lo, (*fo)[2], ptr[31 - 12]);
+	MLA(hi, lo, (*fo)[1], ptr[31 - 14]);
+	MLA(hi, lo, (*fo)[0], ptr[31 - 16]);
+
+	*pcm2-- = SHIFT(MLZ(hi, lo));
+
+	++fo;
+      }
+
+      ++Dptr;
+
+      ptr = *Dptr + po;
+      ML0(hi, lo, (*fo)[0], ptr[ 0]);
+      MLA(hi, lo, (*fo)[1], ptr[14]);
+      MLA(hi, lo, (*fo)[2], ptr[12]);
+      MLA(hi, lo, (*fo)[3], ptr[10]);
+      MLA(hi, lo, (*fo)[4], ptr[ 8]);
+      MLA(hi, lo, (*fo)[5], ptr[ 6]);
+      MLA(hi, lo, (*fo)[6], ptr[ 4]);
+      MLA(hi, lo, (*fo)[7], ptr[ 2]);
+
+      *pcm1 = SHIFT(-MLZ(hi, lo));
+      pcm1 += 16;
+
+      phase = (phase + 1) % 16;
+    }
+  }
+}
+# endif
+
+/*
+ * NAME:	synth->half()
+ * DESCRIPTION:	perform half frequency PCM synthesis
+ */
+static
+void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
+		unsigned int nch, unsigned int ns)
+{
+  unsigned int phase, ch, s, sb, pe, po;
+  mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8];
+  mad_fixed_t const (*sbsample)[36][32];
+  register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
+  register mad_fixed_t const (*Dptr)[32], *ptr;
+  register mad_fixed64hi_t hi;
+  register mad_fixed64lo_t lo;
+
+  for (ch = 0; ch < nch; ++ch) {
+    sbsample = &frame->sbsample[ch];
+    filter   = &synth->filter[ch];
+    phase    = synth->phase;
+    pcm1     = synth->pcm.samples[ch];
+
+    for (s = 0; s < ns; ++s) {
+      dct32((*sbsample)[s], phase >> 1,
+	    (*filter)[0][phase & 1], (*filter)[1][phase & 1]);
+
+      pe = phase & ~1;
+      po = ((phase - 1) & 0xf) | 1;
+
+      /* calculate 16 samples */
+
+      fe = &(*filter)[0][ phase & 1][0];
+      fx = &(*filter)[0][~phase & 1][0];
+      fo = &(*filter)[1][~phase & 1][0];
+
+      Dptr = &D[0];
+
+      ptr = *Dptr + po;
+      ML0(hi, lo, (*fx)[0], ptr[ 0]);
+      MLA(hi, lo, (*fx)[1], ptr[14]);
+      MLA(hi, lo, (*fx)[2], ptr[12]);
+      MLA(hi, lo, (*fx)[3], ptr[10]);
+      MLA(hi, lo, (*fx)[4], ptr[ 8]);
+      MLA(hi, lo, (*fx)[5], ptr[ 6]);
+      MLA(hi, lo, (*fx)[6], ptr[ 4]);
+      MLA(hi, lo, (*fx)[7], ptr[ 2]);
+      MLN(hi, lo);
+
+      ptr = *Dptr + pe;
+      MLA(hi, lo, (*fe)[0], ptr[ 0]);
+      MLA(hi, lo, (*fe)[1], ptr[14]);
+      MLA(hi, lo, (*fe)[2], ptr[12]);
+      MLA(hi, lo, (*fe)[3], ptr[10]);
+      MLA(hi, lo, (*fe)[4], ptr[ 8]);
+      MLA(hi, lo, (*fe)[5], ptr[ 6]);
+      MLA(hi, lo, (*fe)[6], ptr[ 4]);
+      MLA(hi, lo, (*fe)[7], ptr[ 2]);
+
+      *pcm1++ = SHIFT(MLZ(hi, lo));
+
+      pcm2 = pcm1 + 14;
+
+      for (sb = 1; sb < 16; ++sb) {
+	++fe;
+	++Dptr;
+
+	/* D[32 - sb][i] == -D[sb][31 - i] */
+
+	if (!(sb & 1)) {
+	  ptr = *Dptr + po;
+	  ML0(hi, lo, (*fo)[0], ptr[ 0]);
+	  MLA(hi, lo, (*fo)[1], ptr[14]);
+	  MLA(hi, lo, (*fo)[2], ptr[12]);
+	  MLA(hi, lo, (*fo)[3], ptr[10]);
+	  MLA(hi, lo, (*fo)[4], ptr[ 8]);
+	  MLA(hi, lo, (*fo)[5], ptr[ 6]);
+	  MLA(hi, lo, (*fo)[6], ptr[ 4]);
+	  MLA(hi, lo, (*fo)[7], ptr[ 2]);
+	  MLN(hi, lo);
+
+	  ptr = *Dptr + pe;
+	  MLA(hi, lo, (*fe)[7], ptr[ 2]);
+	  MLA(hi, lo, (*fe)[6], ptr[ 4]);
+	  MLA(hi, lo, (*fe)[5], ptr[ 6]);
+	  MLA(hi, lo, (*fe)[4], ptr[ 8]);
+	  MLA(hi, lo, (*fe)[3], ptr[10]);
+	  MLA(hi, lo, (*fe)[2], ptr[12]);
+	  MLA(hi, lo, (*fe)[1], ptr[14]);
+	  MLA(hi, lo, (*fe)[0], ptr[ 0]);
+
+	  *pcm1++ = SHIFT(MLZ(hi, lo));
+
+	  ptr = *Dptr - po;
+	  ML0(hi, lo, (*fo)[7], ptr[31 -  2]);
+	  MLA(hi, lo, (*fo)[6], ptr[31 -  4]);
+	  MLA(hi, lo, (*fo)[5], ptr[31 -  6]);
+	  MLA(hi, lo, (*fo)[4], ptr[31 -  8]);
+	  MLA(hi, lo, (*fo)[3], ptr[31 - 10]);
+	  MLA(hi, lo, (*fo)[2], ptr[31 - 12]);
+	  MLA(hi, lo, (*fo)[1], ptr[31 - 14]);
+	  MLA(hi, lo, (*fo)[0], ptr[31 - 16]);
+
+	  ptr = *Dptr - pe;
+	  MLA(hi, lo, (*fe)[0], ptr[31 - 16]);
+	  MLA(hi, lo, (*fe)[1], ptr[31 - 14]);
+	  MLA(hi, lo, (*fe)[2], ptr[31 - 12]);
+	  MLA(hi, lo, (*fe)[3], ptr[31 - 10]);
+	  MLA(hi, lo, (*fe)[4], ptr[31 -  8]);
+	  MLA(hi, lo, (*fe)[5], ptr[31 -  6]);
+	  MLA(hi, lo, (*fe)[6], ptr[31 -  4]);
+	  MLA(hi, lo, (*fe)[7], ptr[31 -  2]);
+
+	  *pcm2-- = SHIFT(MLZ(hi, lo));
+	}
+
+	++fo;
+      }
+
+      ++Dptr;
+
+      ptr = *Dptr + po;
+      ML0(hi, lo, (*fo)[0], ptr[ 0]);
+      MLA(hi, lo, (*fo)[1], ptr[14]);
+      MLA(hi, lo, (*fo)[2], ptr[12]);
+      MLA(hi, lo, (*fo)[3], ptr[10]);
+      MLA(hi, lo, (*fo)[4], ptr[ 8]);
+      MLA(hi, lo, (*fo)[5], ptr[ 6]);
+      MLA(hi, lo, (*fo)[6], ptr[ 4]);
+      MLA(hi, lo, (*fo)[7], ptr[ 2]);
+
+      *pcm1 = SHIFT(-MLZ(hi, lo));
+      pcm1 += 8;
+
+      phase = (phase + 1) % 16;
+    }
+  }
+}
+
+/*
+ * NAME:	synth->frame()
+ * DESCRIPTION:	perform PCM synthesis of frame subband samples
+ */
+void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
+{
+  unsigned int nch, ns;
+  void (*synth_frame)(struct mad_synth *, struct mad_frame const *,
+		      unsigned int, unsigned int);
+
+  nch = MAD_NCHANNELS(&frame->header);
+  ns  = MAD_NSBSAMPLES(&frame->header);
+
+  synth->pcm.samplerate = frame->header.samplerate;
+  synth->pcm.channels   = nch;
+  synth->pcm.length     = 32 * ns;
+
+  synth_frame = synth_full;
+
+  if (frame->options & MAD_OPTION_HALFSAMPLERATE) {
+    synth->pcm.samplerate /= 2;
+    synth->pcm.length     /= 2;
+
+    synth_frame = synth_half;
+  }
+
+  synth_frame(synth, frame, nch, ns);
+
+  synth->phase = (synth->phase + ns) % 16;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/synth.h
@@ -1,0 +1,69 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $
+ */
+
+# ifndef LIBMAD_SYNTH_H
+# define LIBMAD_SYNTH_H
+
+# include "fixed.h"
+# include "frame.h"
+
+struct mad_pcm {
+  unsigned int samplerate;		/* sampling frequency (Hz) */
+  unsigned short channels;		/* number of channels */
+  unsigned short length;		/* number of samples per channel */
+  mad_fixed_t samples[2][1152];		/* PCM output samples [ch][sample] */
+};
+
+struct mad_synth {
+  mad_fixed_t filter[2][2][2][16][8];	/* polyphase filterbank outputs */
+  					/* [ch][eo][peo][s][v] */
+
+  unsigned int phase;			/* current processing phase */
+
+  struct mad_pcm pcm;			/* PCM output */
+};
+
+/* single channel PCM selector */
+enum {
+  MAD_PCM_CHANNEL_SINGLE = 0
+};
+
+/* dual channel PCM selector */
+enum {
+  MAD_PCM_CHANNEL_DUAL_1 = 0,
+  MAD_PCM_CHANNEL_DUAL_2 = 1
+};
+
+/* stereo PCM selector */
+enum {
+  MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
+  MAD_PCM_CHANNEL_STEREO_RIGHT = 1
+};
+
+void mad_synth_init(struct mad_synth *);
+
+# define mad_synth_finish(synth)  /* nothing */
+
+void mad_synth_mute(struct mad_synth *);
+
+void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/timer.h
@@ -1,0 +1,100 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $
+ */
+
+# ifndef LIBMAD_TIMER_H
+# define LIBMAD_TIMER_H
+
+typedef struct {
+  signed long seconds;		/* whole seconds */
+  unsigned long fraction;	/* 1/MAD_TIMER_RESOLUTION seconds */
+} mad_timer_t;
+
+extern mad_timer_t const mad_timer_zero;
+
+# define MAD_TIMER_RESOLUTION	352800000UL
+
+enum mad_units {
+  MAD_UNITS_HOURS	 =    -2,
+  MAD_UNITS_MINUTES	 =    -1,
+  MAD_UNITS_SECONDS	 =     0,
+
+  /* metric units */
+
+  MAD_UNITS_DECISECONDS	 =    10,
+  MAD_UNITS_CENTISECONDS =   100,
+  MAD_UNITS_MILLISECONDS =  1000,
+
+  /* audio sample units */
+
+  MAD_UNITS_8000_HZ	 =  8000,
+  MAD_UNITS_11025_HZ	 = 11025,
+  MAD_UNITS_12000_HZ	 = 12000,
+
+  MAD_UNITS_16000_HZ	 = 16000,
+  MAD_UNITS_22050_HZ	 = 22050,
+  MAD_UNITS_24000_HZ	 = 24000,
+
+  MAD_UNITS_32000_HZ	 = 32000,
+  MAD_UNITS_44100_HZ	 = 44100,
+  MAD_UNITS_48000_HZ	 = 48000,
+
+  /* video frame/field units */
+
+  MAD_UNITS_24_FPS	 =    24,
+  MAD_UNITS_25_FPS	 =    25,
+  MAD_UNITS_30_FPS	 =    30,
+  MAD_UNITS_48_FPS	 =    48,
+  MAD_UNITS_50_FPS	 =    50,
+  MAD_UNITS_60_FPS	 =    60,
+
+  /* CD audio frames */
+
+  MAD_UNITS_75_FPS	 =    75,
+
+  /* video drop-frame units */
+
+  MAD_UNITS_23_976_FPS	 =   -24,
+  MAD_UNITS_24_975_FPS	 =   -25,
+  MAD_UNITS_29_97_FPS	 =   -30,
+  MAD_UNITS_47_952_FPS	 =   -48,
+  MAD_UNITS_49_95_FPS	 =   -50,
+  MAD_UNITS_59_94_FPS	 =   -60
+};
+
+# define mad_timer_reset(timer)	((void) (*(timer) = mad_timer_zero))
+
+int mad_timer_compare(mad_timer_t, mad_timer_t);
+
+# define mad_timer_sign(timer)	mad_timer_compare((timer), mad_timer_zero)
+
+void mad_timer_negate(mad_timer_t *);
+mad_timer_t mad_timer_abs(mad_timer_t);
+
+void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long);
+void mad_timer_add(mad_timer_t *, mad_timer_t);
+void mad_timer_multiply(mad_timer_t *, signed long);
+
+signed long mad_timer_count(mad_timer_t, enum mad_units);
+unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
+void mad_timer_string(mad_timer_t, char *, char const *,
+		      enum mad_units, enum mad_units, unsigned long);
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/version.c
@@ -1,0 +1,91 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include "version.h"
+
+char const mad_version[]   = "MPEG Audio Decoder " MAD_VERSION;
+char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR;
+char const mad_author[]    = MAD_AUTHOR " <" MAD_EMAIL ">";
+
+char const mad_build[] = ""
+# if defined(DEBUG)
+  "DEBUG "
+# elif defined(NDEBUG)
+  "NDEBUG "
+# endif
+
+# if defined(EXPERIMENTAL)
+  "EXPERIMENTAL "
+# endif
+
+# if defined(FPM_64BIT)
+  "FPM_64BIT "
+# elif defined(FPM_INTEL)
+  "FPM_INTEL "
+# elif defined(FPM_ARM)
+  "FPM_ARM "
+# elif defined(FPM_MIPS)
+  "FPM_MIPS "
+# elif defined(FPM_SPARC)
+  "FPM_SPARC "
+# elif defined(FPM_PPC)
+  "FPM_PPC "
+# elif defined(FPM_DEFAULT)
+  "FPM_DEFAULT "
+# endif
+
+# if defined(ASO_IMDCT)
+  "ASO_IMDCT "
+# endif
+# if defined(ASO_INTERLEAVE1)
+  "ASO_INTERLEAVE1 "
+# endif
+# if defined(ASO_INTERLEAVE2)
+  "ASO_INTERLEAVE2 "
+# endif
+# if defined(ASO_ZEROCHECK)
+  "ASO_ZEROCHECK "
+# endif
+
+# if defined(OPT_SPEED)
+  "OPT_SPEED "
+# elif defined(OPT_ACCURACY)
+  "OPT_ACCURACY "
+# endif
+
+# if defined(OPT_SSO)
+  "OPT_SSO "
+# endif
+
+# if defined(OPT_DCTO)  /* never defined here */
+  "OPT_DCTO "
+# endif
+
+# if defined(OPT_STRICT)
+  "OPT_STRICT "
+# endif
+;
--- /dev/null
+++ b/sys/src/cmd/audio/mp3dec/version.h
@@ -1,0 +1,47 @@
+/*
+ * libmad - MPEG audio decoder library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $
+ */
+
+# ifndef LIBMAD_VERSION_H
+# define LIBMAD_VERSION_H
+
+# define MAD_VERSION_MAJOR	0
+# define MAD_VERSION_MINOR	15
+# define MAD_VERSION_PATCH	1
+# define MAD_VERSION_EXTRA	" (beta)"
+
+# define MAD_VERSION_STRINGIZE(str)	#str
+# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)
+
+# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) "."  \
+				MAD_VERSION_STRING(MAD_VERSION_MINOR) "."  \
+				MAD_VERSION_STRING(MAD_VERSION_PATCH)  \
+				MAD_VERSION_EXTRA
+
+# define MAD_PUBLISHYEAR	"2000-2004"
+# define MAD_AUTHOR		"Underbit Technologies, Inc."
+# define MAD_EMAIL		"[email protected]"
+
+extern char const mad_version[];
+extern char const mad_copyright[];
+extern char const mad_author[];
+extern char const mad_build[];
+
+# endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/README
@@ -1,0 +1,49 @@
+This is LAME 3.88 from www.mp3dev.org,
+stripped down for Plan 9.
+
+-rsc
+
+=============================================
+                      LAME 3.xx   
+               LAME Ain't an MP3 Encoder
+                 http://www.mp3dev.org
+	             March 2001
+
+Originally developed by Mike Cheng (www.uq.net.au/~zzmcheng).  Now 
+maintained by Mark Taylor (www.sulaco.org/mp3).
+
+This code is distributed under the GNU LESSER PUBLIC LICENSE
+(LGPL, see www.gnu.org) with the following modification:
+
+1. If you determine that distribution of LAME requires a patent license,
+   and you obtain a patent license, you may distribute LAME even though
+   redistribution of LAME may also require a patent license.  
+
+2. You agree not to enforce any patent claims for any aspect of
+   MPEG audio compression, or any other techniques contained in 
+   the LAME source code. 
+
+
+============================================================================
+
+see the file "INSTALL" for installation (compiling) instructions.  
+see the file "USAGE" for the most up-to-date guide to the command line options.
+see the file "LICENSE" for details on how to use LAME in non-GPL programs.
+see the file "HACKING" if you are interested in working on LAME
+see the file "API" for details of the LAME encoding library API
+
+There is HTML documentation and a man page in the doc directory.
+The HTML docs were contributed by Gabriel Bouvigne (www.mp3tech.org).
+See www.mp3tech.org for more audio compression information and links.
+
+============================================================================
+
+LAME uses the MPGLIB decoding engine, from the MPG123 package, written
+by: Michael Hipp (www.mpg123.de) MPGLIB is released under the GPL.
+
+Copyrights (c) 1999,2000,2001 by Mark Taylor
+Copyrights (c) 1998 by Michael Cheng
+Copyrights (c) 1995,1996,1997 by Michael Hipp: mpglib
+
+As well as additional copyrights as documented in the source code.  
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/VbrTag.c
@@ -1,0 +1,575 @@
+/*
+ *	Xing VBR tagging for LAME.
+ *
+ *	Copyright (c) 1999 A.L. Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: VbrTag.c,v 1.20 2001/02/27 09:59:16 robert Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "machine.h"
+#if defined(__riscos__) && defined(FPA10)
+#include	"ymath.h"
+#else
+#include	<math.h>
+#endif
+#include "VbrTag.h"
+#include "version.h"
+#include "bitstream.h"
+#include "VbrTag.h"
+#include	<assert.h>
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+#ifdef _DEBUG
+/*  #define DEBUG_VBRTAG */
+#endif
+
+/*
+//    4 bytes for Header Tag
+//    4 bytes for Header Flags
+//  100 bytes for entry (NUMTOCENTRIES)
+//    4 bytes for FRAME SIZE
+//    4 bytes for STREAM_SIZE
+//    4 bytes for VBR SCALE. a VBR quality indicator: 0=best 100=worst
+//   20 bytes for LAME tag.  for example, "LAME3.12 (beta 6)"
+// ___________
+//  140 bytes
+*/
+#define VBRHEADERSIZE (NUMTOCENTRIES+4+4+4+4+4)
+
+/* the size of the Xing header (MPEG1 and MPEG2) in kbps */
+#define XING_BITRATE1 128
+#define XING_BITRATE2  64
+#define XING_BITRATE25 32
+
+
+
+const static char	VBRTag[]={"Xing"};
+const int SizeOfEmptyFrame[2][2]=
+{
+	{17,9},
+	{32,17},
+};
+
+
+/***********************************************************************
+ *  Robert Hegemann 2001-01-17
+ ***********************************************************************/
+
+void addVbr(VBR_seek_info_t * v, int bitrate)
+{
+    int i;
+
+    v->sum += bitrate;
+    v->seen ++;
+    
+    if (v->seen < v->want) {
+        return;
+    }
+
+    if (v->pos < v->size) {
+        v->bag[v->pos] = v->sum;
+        v->pos ++;
+        v->seen = 0;
+    }
+    if (v->pos == v->size) {
+        for (i = 1; i < v->size; i += 2) {
+            v->bag[i/2] = v->bag[i]; 
+        }
+        v->want *= 2;
+        v->pos  /= 2;
+    }
+}
+
+void Xing_seek_table(VBR_seek_info_t * v, unsigned char *t)
+{
+    int i, index;
+    int seek_point;
+    
+    if (v->pos <= 0)
+        return;
+        
+    for (i = 1; i < NUMTOCENTRIES; ++i) {
+        float j = i/(float)NUMTOCENTRIES, act, sum;
+        index = (int)(floor(j * v->pos));
+        if (index > v->pos-1)
+            index = v->pos-1;
+        act = v->bag[index];
+        sum = v->sum;
+        seek_point = (int)(256. * act / sum);
+        if (seek_point > 255)
+            seek_point = 255;
+        t[i] = seek_point;
+    }
+}
+
+#if 0
+void print_seeking(unsigned char *t)
+{
+    int i;
+    
+    printf("seeking table ");
+    for (i = 0; i < NUMTOCENTRIES; ++i) {
+        printf(" %d ", t[i]);
+    }
+    printf("\n");
+}
+#endif
+
+
+
+/****************************************************************************
+ * AddVbrFrame: Add VBR entry, used to fill the VBR the TOC entries
+ * Paramters:
+ *	nStreamPos: how many bytes did we write to the bitstream so far
+ *				(in Bytes NOT Bits)
+ ****************************************************************************
+*/
+void AddVbrFrame(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    int kbps = bitrate_table[gfp->version][gfc->bitrate_index];
+    
+    if (gfc->VBR_seek_table.bag == NULL) {
+        gfc->VBR_seek_table.sum  = 0;
+        gfc->VBR_seek_table.seen = 0;
+        gfc->VBR_seek_table.want = 1;
+        gfc->VBR_seek_table.pos  = 0;
+        gfc->VBR_seek_table.bag  = malloc (400*sizeof(int));
+        if (gfc->VBR_seek_table.bag != NULL) {
+            gfc->VBR_seek_table.size = 400;
+        }
+        else {
+            gfc->VBR_seek_table.size = 0;
+            ERRORF (gfc,"Error: can't allocate VbrFrames buffer\n");
+            return;
+        }   
+    }
+    addVbr(&gfc->VBR_seek_table, kbps);
+    gfp->nVbrNumFrames++;
+}
+
+
+/*-------------------------------------------------------------*/
+static int ExtractI4(unsigned char *buf)
+{
+	int x;
+	/* big endian extract */
+	x = buf[0];
+	x <<= 8;
+	x |= buf[1];
+	x <<= 8;
+	x |= buf[2];
+	x <<= 8;
+	x |= buf[3];
+	return x;
+}
+
+void CreateI4(unsigned char *buf, int nValue)
+{
+        /* big endian create */
+	buf[0]=(nValue>>24)&0xff;
+	buf[1]=(nValue>>16)&0xff;
+	buf[2]=(nValue>> 8)&0xff;
+	buf[3]=(nValue    )&0xff;
+}
+
+
+/*-------------------------------------------------------------*/
+/* Same as GetVbrTag below, but only checks for the Xing tag.
+   requires buf to contain only 40 bytes */
+/*-------------------------------------------------------------*/
+int CheckVbrTag(unsigned char *buf)
+{
+	int			h_id, h_mode, h_sr_index;
+
+	/* get selected MPEG header data */
+	h_id       = (buf[1] >> 3) & 1;
+	h_sr_index = (buf[2] >> 2) & 3;
+	h_mode     = (buf[3] >> 6) & 3;
+
+	/*  determine offset of header */
+	if( h_id )
+	{
+                /* mpeg1 */
+		if( h_mode != 3 )	buf+=(32+4);
+		else				buf+=(17+4);
+	}
+	else
+	{
+                /* mpeg2 */
+		if( h_mode != 3 ) buf+=(17+4);
+		else              buf+=(9+4);
+	}
+
+	if( buf[0] != VBRTag[0] ) return 0;    /* fail */
+	if( buf[1] != VBRTag[1] ) return 0;    /* header not found*/
+	if( buf[2] != VBRTag[2] ) return 0;
+	if( buf[3] != VBRTag[3] ) return 0;
+	return 1;
+}
+
+int GetVbrTag(VBRTAGDATA *pTagData,  unsigned char *buf)
+{
+	int			i, head_flags;
+	int			h_bitrate,h_id, h_mode, h_sr_index;
+
+	/* get Vbr header data */
+	pTagData->flags = 0;
+
+	/* get selected MPEG header data */
+	h_id       = (buf[1] >> 3) & 1;
+	h_sr_index = (buf[2] >> 2) & 3;
+	h_mode     = (buf[3] >> 6) & 3;
+        h_bitrate  = ((buf[2]>>4)&0xf);
+	h_bitrate = bitrate_table[h_id][h_bitrate];
+
+
+	/*  determine offset of header */
+	if( h_id )
+	{
+                /* mpeg1 */
+		if( h_mode != 3 )	buf+=(32+4);
+		else				buf+=(17+4);
+	}
+	else
+	{
+                /* mpeg2 */
+		if( h_mode != 3 ) buf+=(17+4);
+		else              buf+=(9+4);
+	}
+
+	if( buf[0] != VBRTag[0] ) return 0;    /* fail */
+	if( buf[1] != VBRTag[1] ) return 0;    /* header not found*/
+	if( buf[2] != VBRTag[2] ) return 0;
+	if( buf[3] != VBRTag[3] ) return 0;
+
+	buf+=4;
+
+	pTagData->h_id = h_id;
+	pTagData->samprate = samplerate_table[h_id][h_sr_index];
+
+	if( h_id == 0 )
+		pTagData->samprate >>= 1;
+
+	head_flags = pTagData->flags = ExtractI4(buf); buf+=4;      /* get flags */
+
+	if( head_flags & FRAMES_FLAG )
+	{
+		pTagData->frames   = ExtractI4(buf); buf+=4;
+	}
+
+	if( head_flags & BYTES_FLAG )
+	{
+		pTagData->bytes = ExtractI4(buf); buf+=4;
+	}
+
+	if( head_flags & TOC_FLAG )
+	{
+		if( pTagData->toc != NULL )
+		{
+			for(i=0;i<NUMTOCENTRIES;i++)
+				pTagData->toc[i] = buf[i];
+		}
+		buf+=NUMTOCENTRIES;
+	}
+
+	pTagData->vbr_scale = -1;
+
+	if( head_flags & VBR_SCALE_FLAG )
+	{
+		pTagData->vbr_scale = ExtractI4(buf); buf+=4;
+	}
+
+	pTagData->headersize = 
+	  ((h_id+1)*72000*h_bitrate) / pTagData->samprate;
+
+
+#ifdef DEBUG_VBRTAG
+	DEBUGF("\n\n********************* VBR TAG INFO *****************\n");
+	DEBUGF("tag         :%s\n",VBRTag);
+	DEBUGF("head_flags  :%d\n",head_flags);
+	DEBUGF("bytes       :%d\n",pTagData->bytes);
+	DEBUGF("frames      :%d\n",pTagData->frames);
+	DEBUGF("VBR Scale   :%d\n",pTagData->vbr_scale);
+	DEBUGF("toc:\n");
+	if( pTagData->toc != NULL )
+	{
+		for(i=0;i<NUMTOCENTRIES;i++)
+		{
+			if( (i%10) == 0 ) DEBUGF("\n");
+			DEBUGF(" %3d", (int)(pTagData->toc[i]));
+		}
+	}
+	DEBUGF("\n***************** END OF VBR TAG INFO ***************\n");
+#endif
+	return 1;       /* success */
+}
+
+
+/****************************************************************************
+ * InitVbrTag: Initializes the header, and write empty frame to stream
+ * Paramters:
+ *				fpStream: pointer to output file stream
+ *				nMode	: Channel Mode: 0=STEREO 1=JS 2=DS 3=MONO
+ ****************************************************************************
+*/
+int InitVbrTag(lame_global_flags *gfp)
+{
+	int nMode,SampIndex;
+	lame_internal_flags *gfc = gfp->internal_flags;
+#define MAXFRAMESIZE 576
+	//	u_char pbtStreamBuffer[MAXFRAMESIZE];
+	nMode = gfp->mode;
+	SampIndex = gfc->samplerate_index;
+
+
+	/* Clear Frame position array variables */
+	gfp->pVbrFrames=NULL;
+	gfp->nVbrNumFrames=0;
+	gfp->nVbrFrameBufferSize=0;
+
+
+	/* Clear stream buffer */
+	//	memset(pbtStreamBuffer,0x00,sizeof(pbtStreamBuffer));
+
+
+
+	/* Reserve the proper amount of bytes */
+	if (nMode==3)
+	{
+		gfp->nZeroStreamSize=SizeOfEmptyFrame[gfp->version][1]+4;
+	}
+	else
+	{
+		gfp->nZeroStreamSize=SizeOfEmptyFrame[gfp->version][0]+4;
+	}
+
+	/*
+	// Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).
+        // (at 48kHz they use 56kbs since 48kbs frame not big enough for
+        // table of contents)
+	// let's always embed Xing header inside a 64kbs layer III frame.
+	// this gives us enough room for a LAME version string too.
+	// size determined by sampling frequency (MPEG1)
+	// 32kHz:    216 bytes@48kbs    288bytes@ 64kbs
+	// 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)
+	// 48kHz:    144 bytes          192
+	//
+	// MPEG 2 values are the same since the framesize and samplerate
+        // are each reduced by a factor of 2.
+	*/
+	{
+	int i,bitrate,tot;
+	if (1==gfp->version) {
+	  bitrate = XING_BITRATE1;
+	} else {
+	  if (gfp->out_samplerate < 16000 )
+	    bitrate = XING_BITRATE25;
+	  else
+	    bitrate = XING_BITRATE2;
+	}
+	gfp->TotalFrameSize= 
+	  ((gfp->version+1)*72000*bitrate) / gfp->out_samplerate;
+	tot = (gfp->nZeroStreamSize+VBRHEADERSIZE);
+	tot += 20;  /* extra 20 bytes for LAME & version string */
+
+	assert(gfp->TotalFrameSize >= tot );
+	assert(gfp->TotalFrameSize <= MAXFRAMESIZE );
+
+	for (i=0; i<gfp->TotalFrameSize; ++i)
+	  add_dummy_byte(gfp,0);
+	}
+
+	/* Success */
+	return 0;
+}
+
+
+
+/****************************************************************************
+ * PutVbrTag: Write final VBR tag to the file
+ * Paramters:
+ *				lpszFileName: filename of MP3 bit stream
+ *				nVbrScale	: encoder quality indicator (0..100)
+ ****************************************************************************
+*/
+int PutVbrTag(lame_global_flags *gfp,FILE *fpStream,int nVbrScale)
+{
+        lame_internal_flags * gfc = gfp->internal_flags;
+
+	long lFileSize;
+	int nStreamIndex;
+	char abyte,bbyte;
+	u_char		btToc[NUMTOCENTRIES];
+	u_char pbtStreamBuffer[MAXFRAMESIZE];
+	char str1[80];
+        unsigned char id3v2Header[10];
+        size_t id3v2TagSize;
+
+        if (gfc->VBR_seek_table.pos <= 0)
+		return -1;
+
+
+	/* Clear stream buffer */
+	memset(pbtStreamBuffer,0x00,sizeof(pbtStreamBuffer));
+
+	/* Seek to end of file*/
+	fseek(fpStream,0,SEEK_END);
+
+	/* Get file size */
+	lFileSize=ftell(fpStream);
+
+	/* Abort if file has zero length. Yes, it can happen :) */
+	if (lFileSize==0)
+		return -1;
+
+        /*
+         * The VBR tag may NOT be located at the beginning of the stream.
+         * If an ID3 version 2 tag was added, then it must be skipped to write
+         * the VBR tag data.
+         */
+
+        /* seek to the beginning of the stream */
+	fseek(fpStream,0,SEEK_SET);
+        /* read 10 bytes in case there's an ID3 version 2 header here */
+        fread(id3v2Header,1,sizeof id3v2Header,fpStream);
+        /* does the stream begin with the ID3 version 2 file identifier? */
+        if (!strncmp((char *)id3v2Header,"ID3",3)) {
+          /* the tag size (minus the 10-byte header) is encoded into four
+           * bytes where the most significant bit is clear in each byte */
+          id3v2TagSize=(((id3v2Header[6] & 0x7f)<<21)
+            | ((id3v2Header[7] & 0x7f)<<14)
+            | ((id3v2Header[8] & 0x7f)<<7)
+            | (id3v2Header[9] & 0x7f))
+            + sizeof id3v2Header;
+        } else {
+          /* no ID3 version 2 tag in this stream */
+          id3v2TagSize=0;
+        }
+
+	/* Seek to first real frame */
+	fseek(fpStream,id3v2TagSize+gfp->TotalFrameSize,SEEK_SET);
+
+	/* Read the header (first valid frame) */
+	fread(pbtStreamBuffer,4,1,fpStream);
+
+	/* the default VBR header. 48 kbps layer III, no padding, no crc */
+	/* but sampling freq, mode andy copyright/copy protection taken */
+	/* from first valid frame */
+	pbtStreamBuffer[0]=(u_char) 0xff;
+	abyte = (pbtStreamBuffer[1] & (char) 0xf1);
+	{ int bitrate;
+	if (1==gfp->version) {
+	  bitrate = XING_BITRATE1;
+	} else {
+	  if (gfp->out_samplerate < 16000 )
+	    bitrate = XING_BITRATE25;
+	  else
+	    bitrate = XING_BITRATE2;
+	}
+	  bbyte = 16*BitrateIndex(bitrate,gfp->version,gfp->out_samplerate);
+	}
+
+	/* Use as much of the info from the real frames in the
+	 * Xing header:  samplerate, channels, crc, etc...
+	 */ 
+	if (gfp->version==1) {
+	  /* MPEG1 */
+	  pbtStreamBuffer[1]=abyte | (char) 0x0a;     /* was 0x0b; */
+	  abyte = pbtStreamBuffer[2] & (char) 0x0d;   /* AF keep also private bit */
+	  pbtStreamBuffer[2]=(char) bbyte | abyte;     /* 64kbs MPEG1 frame */
+	}else{
+	  /* MPEG2 */
+	  pbtStreamBuffer[1]=abyte | (char) 0x02;     /* was 0x03; */
+	  abyte = pbtStreamBuffer[2] & (char) 0x0d;   /* AF keep also private bit */
+	  pbtStreamBuffer[2]=(char) bbyte | abyte;     /* 64kbs MPEG2 frame */
+	}
+
+
+	/*Seek to the beginning of the stream */
+	fseek(fpStream,id3v2TagSize,SEEK_SET);
+
+	/* Clear all TOC entries */
+	memset(btToc,0,sizeof(btToc));
+
+        Xing_seek_table (&gfc->VBR_seek_table, btToc);
+        /* print_seeking (btToc); */
+
+	/* Start writing the tag after the zero frame */
+	nStreamIndex=gfp->nZeroStreamSize;
+
+	/* Put Vbr tag */
+	pbtStreamBuffer[nStreamIndex++]=VBRTag[0];
+	pbtStreamBuffer[nStreamIndex++]=VBRTag[1];
+	pbtStreamBuffer[nStreamIndex++]=VBRTag[2];
+	pbtStreamBuffer[nStreamIndex++]=VBRTag[3];
+
+	/* Put header flags */
+	CreateI4(&pbtStreamBuffer[nStreamIndex],FRAMES_FLAG+BYTES_FLAG+TOC_FLAG+VBR_SCALE_FLAG);
+	nStreamIndex+=4;
+
+	/* Put Total Number of frames */
+	CreateI4(&pbtStreamBuffer[nStreamIndex],gfp->nVbrNumFrames);
+	nStreamIndex+=4;
+
+	/* Put Total file size */
+	CreateI4(&pbtStreamBuffer[nStreamIndex],(int)lFileSize);
+	nStreamIndex+=4;
+
+	/* Put TOC */
+	memcpy(&pbtStreamBuffer[nStreamIndex],btToc,sizeof(btToc));
+	nStreamIndex+=sizeof(btToc);
+
+	/* Put VBR SCALE */
+	CreateI4(&pbtStreamBuffer[nStreamIndex],nVbrScale);
+	nStreamIndex+=4;
+
+	/* Put LAME ID */
+        sprintf ( str1, "LAME%s", get_lame_short_version () );
+        strncpy ( (char*)pbtStreamBuffer + nStreamIndex, str1, 20 );
+        nStreamIndex += 20;
+
+
+#ifdef DEBUG_VBRTAG
+{
+	VBRTAGDATA TestHeader;
+	GetVbrTag(&TestHeader,pbtStreamBuffer);
+}
+#endif
+
+        /* Put it all to disk again */
+	if (fwrite(pbtStreamBuffer,(unsigned int)gfp->TotalFrameSize,1,fpStream)!=1)
+	{
+		return -1;
+	}
+	/* Save to delete the frame buffer */
+	free(gfp->pVbrFrames);
+	gfp->pVbrFrames=NULL;
+
+	return 0;       /* success */
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/VbrTag.h
@@ -1,0 +1,76 @@
+/*
+ *	Xing VBR tagging for LAME.
+ *
+ *	Copyright (c) 1999 A.L. Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_VRBTAG_H
+#define LAME_VRBTAG_H
+#include "lame.h"
+/* -----------------------------------------------------------
+ * A Vbr header may be present in the ancillary
+ * data field of the first frame of an mp3 bitstream
+ * The Vbr header (optionally) contains
+ *      frames      total number of audio frames in the bitstream
+ *      bytes       total number of bytes in the bitstream
+ *      toc         table of contents
+
+ * toc (table of contents) gives seek points
+ * for random access
+ * the ith entry determines the seek point for
+ * i-percent duration
+ * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
+ * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes
+ */
+
+
+#define FRAMES_FLAG     0x0001
+#define BYTES_FLAG      0x0002
+#define TOC_FLAG        0x0004
+#define VBR_SCALE_FLAG  0x0008
+
+#define NUMTOCENTRIES 100
+
+#define FRAMES_AND_BYTES (FRAMES_FLAG | BYTES_FLAG)
+
+
+ 
+/*structure to receive extracted header */
+/* toc may be NULL*/
+typedef struct
+{
+  int		h_id;			/* from MPEG header, 0=MPEG2, 1=MPEG1 */
+  int		samprate;		/* determined from MPEG header */
+  int		flags;			/* from Vbr header data */
+  int		frames;			/* total bit stream frames from Vbr header data */
+  int		bytes;			/* total bit stream bytes from Vbr header data*/
+  int		vbr_scale;		/* encoded vbr scale from Vbr header data*/
+  unsigned char	toc[NUMTOCENTRIES];	/* may be NULL if toc not desired*/
+  int           headersize;             /* size of VBR header, in bytes */
+}   VBRTAGDATA;
+
+int CheckVbrTag(unsigned char *buf);
+int GetVbrTag(VBRTAGDATA *pTagData,  unsigned char *buf);
+
+int SeekPoint(unsigned char TOC[NUMTOCENTRIES], int file_bytes, float percent);
+int InitVbrTag(lame_global_flags *gfp);
+int PutVbrTag(lame_global_flags *gfp,FILE *fid,int nVbrScale);
+void AddVbrFrame(lame_global_flags *gfp);
+
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/bitstream.c
@@ -1,0 +1,880 @@
+/*
+ *	MP3 bitstream Output interface for LAME
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+#include "tables.h"
+#include "bitstream.h"
+#include "quantize.h"
+#include "quantize_pvt.h"
+#include "version.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+/* This is the scfsi_band table from 2.4.2.7 of the IS */
+const int scfsi_band[5] = { 0, 6, 11, 16, 21 };
+
+
+/* unsigned int is at least this large:  */
+/* we work with ints, so when doing bit manipulation, we limit
+ * ourselves to MAX_LENGTH-2 just to be on the safe side */
+#define MAX_LENGTH      32  
+
+
+
+#ifdef DEBUG
+static int hoge, hogege;
+#endif
+
+void putheader_bits(lame_internal_flags *gfc,int w_ptr)
+{
+    Bit_stream_struc *bs;
+    bs = &gfc->bs;
+#ifdef DEBUG
+    hoge += gfc->sideinfo_len * 8;
+    hogege += gfc->sideinfo_len * 8;
+#endif
+    memcpy(&bs->buf[bs->buf_byte_idx], gfc->header[gfc->w_ptr].buf,
+	   gfc->sideinfo_len);
+    bs->buf_byte_idx += gfc->sideinfo_len;
+    bs->totbit += gfc->sideinfo_len * 8;
+    gfc->w_ptr = (gfc->w_ptr + 1) & (MAX_HEADER_BUF - 1);
+}
+
+/*write j bits into the bit stream */
+static void
+putbits2(lame_global_flags *gfp, int val, int j)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    Bit_stream_struc *bs;
+    bs = &gfc->bs;
+
+//	assert(j < MAX_LENGTH-2);
+
+    while (j > 0) {
+	int k;
+
+	if (bs->buf_bit_idx == 0) {
+	    bs->buf_bit_idx = 8;
+	    bs->buf_byte_idx++;
+//		assert(bs->buf_byte_idx < BUFFER_SIZE);
+//		assert(gfc->header[gfc->w_ptr].write_timing >= bs->totbit);
+	    if (gfc->header[gfc->w_ptr].write_timing == bs->totbit)
+	      putheader_bits(gfc, gfc->w_ptr);
+	    bs->buf[bs->buf_byte_idx] = 0;
+	}
+
+	k = Min(j, bs->buf_bit_idx);
+	j -= k;
+
+	bs->buf_bit_idx -= k;
+
+//	assert (j < MAX_LENGTH); /* 32 too large on 32 bit machines */
+//	assert (bs->buf_bit_idx < MAX_LENGTH); 
+
+        bs->buf[bs->buf_byte_idx] |= (val >> j) << bs->buf_bit_idx;
+	bs->totbit += k;
+    }
+}
+
+/*write j bits into the bit stream, ignoring frame headers */
+static void
+putbits_noheaders(lame_global_flags *gfp, int val, int j)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    Bit_stream_struc *bs;
+    bs = &gfc->bs;
+
+//	assert(j < MAX_LENGTH-2);
+
+    while (j > 0) {
+	int k;
+	if (bs->buf_bit_idx == 0) {
+	    bs->buf_bit_idx = 8;
+	    bs->buf_byte_idx++;
+//		assert(bs->buf_byte_idx < BUFFER_SIZE);
+	    bs->buf[bs->buf_byte_idx] = 0;
+	}
+
+	k = Min(j, bs->buf_bit_idx);
+	j -= k;
+        
+	bs->buf_bit_idx -= k;
+        
+//	assert (j < MAX_LENGTH); /* 32 too large on 32 bit machines */
+//	assert (bs->buf_bit_idx < MAX_LENGTH); 
+	
+        bs->buf[bs->buf_byte_idx] |= (val >> j) << bs->buf_bit_idx;
+	bs->totbit += k;
+    }
+}
+
+
+/*
+  Some combinations of bitrate, Fs, and stereo make it impossible to stuff
+  out a frame using just main_data, due to the limited number of bits to
+  indicate main_data_length. In these situations, we put stuffing bits into
+  the ancillary data...
+*/
+static void
+drain_into_ancillary(lame_global_flags *gfp,int remainingBits)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int i;
+    assert(remainingBits >= 0);
+
+    if (remainingBits >= 8) {
+      putbits2(gfp,0x4c,8);
+      remainingBits -= 8;
+    }
+    if (remainingBits >= 8) {
+      putbits2(gfp,0x41,8);
+      remainingBits -= 8;
+    }
+    if (remainingBits >= 8) {
+      putbits2(gfp,0x4d,8);
+      remainingBits -= 8;
+    }
+    if (remainingBits >= 8) {
+      putbits2(gfp,0x45,8);
+      remainingBits -= 8;
+    }
+      
+    if (remainingBits >= 32) {
+      const char *version = get_lame_short_version ();
+      if (remainingBits >= 32) 
+	for (i=0; i<(int)strlen(version) && remainingBits >=8 ; ++i) {
+	  remainingBits -= 8;
+	  putbits2(gfp,version[i],8);
+	}
+    }
+
+    for (; remainingBits >= 1; remainingBits -= 1 ) {
+        putbits2 ( gfp, gfc->ancillary_flag, 1 );
+        gfc->ancillary_flag ^= 1;
+    }
+
+    assert (remainingBits == 0);
+
+}
+
+/*write N bits into the header */
+inline static void
+writeheader(lame_internal_flags *gfc,int val, int j)
+{
+    int ptr = gfc->header[gfc->h_ptr].ptr;
+
+    while (j > 0) {
+	int k = Min(j, 8 - (ptr & 7));
+	j -= k;
+        assert (j < MAX_LENGTH); /* >> 32  too large for 32 bit machines */
+	gfc->header[gfc->h_ptr].buf[ptr >> 3]
+	    |= ((val >> j)) << (8 - (ptr & 7) - k);
+	ptr += k;
+    }
+    gfc->header[gfc->h_ptr].ptr = ptr;
+}
+
+
+/* (jo) this wrapper function for BF_addEntry() updates also the crc */
+static void
+CRC_writeheader(lame_internal_flags *gfc, int value, int length,int *crc)
+{
+   int bit = 1 << length;
+
+   assert(length < MAX_LENGTH-2);
+   
+   while((bit >>= 1)){
+      *crc <<= 1;
+      if (!(*crc & 0x10000) ^ !(value & bit))
+	*crc ^= CRC16_POLYNOMIAL;
+   }
+   *crc &= 0xffff;
+   writeheader(gfc,value, length);
+}
+
+void main_CRC_init (void) {}
+
+
+
+inline static void
+encodeSideInfo2(lame_global_flags *gfp,int bitsPerFrame)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_side_info_t *l3_side;
+    int gr, ch;
+    int crc;
+    
+    l3_side = &gfc->l3_side;
+    gfc->header[gfc->h_ptr].ptr = 0;
+    memset(gfc->header[gfc->h_ptr].buf, 0, gfc->sideinfo_len);
+    crc = 0xffff; /* (jo) init crc16 for error_protection */
+    if (gfp->out_samplerate < 16000) 
+      writeheader(gfc,0xffe,                12);
+    else
+      writeheader(gfc,0xfff,                12);
+    writeheader(gfc,(gfp->version),            1);
+    writeheader(gfc,4 - 3,                 2);
+    writeheader(gfc,(!gfp->error_protection),  1);
+    /* (jo) from now on call the CRC_writeheader() wrapper to update crc */
+    CRC_writeheader(gfc,(gfc->bitrate_index),      4,&crc);
+    CRC_writeheader(gfc,(gfc->samplerate_index),   2,&crc);
+    CRC_writeheader(gfc,(gfc->padding),            1,&crc);
+    CRC_writeheader(gfc,(gfp->extension),          1,&crc);
+    CRC_writeheader(gfc,(gfp->mode),               2,&crc);
+    CRC_writeheader(gfc,(gfc->mode_ext),           2,&crc);
+    CRC_writeheader(gfc,(gfp->copyright),          1,&crc);
+    CRC_writeheader(gfc,(gfp->original),           1,&crc);
+    CRC_writeheader(gfc,(gfp->emphasis),           2,&crc);
+    if (gfp->error_protection) {
+	writeheader(gfc,0, 16); /* dummy */
+    }
+
+    if (gfp->version == 1) {
+	/* MPEG1 */
+	assert(l3_side->main_data_begin >= 0);
+	CRC_writeheader(gfc,(l3_side->main_data_begin), 9,&crc);
+
+	if (gfc->channels_out == 2)
+	    CRC_writeheader(gfc,l3_side->private_bits, 3,&crc);
+	else
+	    CRC_writeheader(gfc,l3_side->private_bits, 5,&crc);
+
+	for (ch = 0; ch < gfc->channels_out; ch++) {
+	    int band;
+	    for (band = 0; band < 4; band++) {
+		CRC_writeheader(gfc,l3_side->scfsi[ch][band], 1,&crc);
+	    }
+	}
+
+	for (gr = 0; gr < 2; gr++) {
+	    for (ch = 0; ch < gfc->channels_out; ch++) {
+		gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
+		CRC_writeheader(gfc,gi->part2_3_length,       12,&crc);
+		CRC_writeheader(gfc,gi->big_values / 2,        9,&crc);
+		CRC_writeheader(gfc,gi->global_gain,           8,&crc);
+		CRC_writeheader(gfc,gi->scalefac_compress,     4,&crc);
+		CRC_writeheader(gfc,gi->window_switching_flag, 1,&crc);
+
+		if (gi->window_switching_flag) {
+		    CRC_writeheader(gfc,gi->block_type,       2,&crc);
+		    CRC_writeheader(gfc,gi->mixed_block_flag, 1,&crc);
+
+		    if (gi->table_select[0] == 14)
+			gi->table_select[0] = 16;
+		    CRC_writeheader(gfc,gi->table_select[0],  5,&crc);
+		    if (gi->table_select[1] == 14)
+			gi->table_select[1] = 16;
+		    CRC_writeheader(gfc,gi->table_select[1],  5,&crc);
+
+		    CRC_writeheader(gfc,gi->subblock_gain[0], 3,&crc);
+		    CRC_writeheader(gfc,gi->subblock_gain[1], 3,&crc);
+		    CRC_writeheader(gfc,gi->subblock_gain[2], 3,&crc);
+		} else {
+		    assert(gi->block_type == NORM_TYPE);
+		    if (gi->table_select[0] == 14)
+			gi->table_select[0] = 16;
+		    CRC_writeheader(gfc,gi->table_select[0], 5,&crc);
+		    if (gi->table_select[1] == 14)
+			gi->table_select[1] = 16;
+		    CRC_writeheader(gfc,gi->table_select[1], 5,&crc);
+		    if (gi->table_select[2] == 14)
+			gi->table_select[2] = 16;
+		    CRC_writeheader(gfc,gi->table_select[2], 5,&crc);
+
+		    assert(gi->region0_count < 16U);
+		    assert(gi->region1_count < 8U);
+		    CRC_writeheader(gfc,gi->region0_count, 4,&crc);
+		    CRC_writeheader(gfc,gi->region1_count, 3,&crc);
+		}
+		CRC_writeheader(gfc,gi->preflag,            1,&crc);
+		CRC_writeheader(gfc,gi->scalefac_scale,     1,&crc);
+		CRC_writeheader(gfc,gi->count1table_select, 1,&crc);
+	    }
+	}
+    } else {
+	/* MPEG2 */
+	assert(l3_side->main_data_begin >= 0);
+	CRC_writeheader(gfc,(l3_side->main_data_begin), 8,&crc);
+	CRC_writeheader(gfc,l3_side->private_bits, gfc->channels_out,&crc);
+
+	gr = 0;
+	for (ch = 0; ch < gfc->channels_out; ch++) {
+	    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
+	    CRC_writeheader(gfc,gi->part2_3_length,       12,&crc);
+	    CRC_writeheader(gfc,gi->big_values / 2,        9,&crc);
+	    CRC_writeheader(gfc,gi->global_gain,           8,&crc);
+	    CRC_writeheader(gfc,gi->scalefac_compress,     9,&crc);
+	    CRC_writeheader(gfc,gi->window_switching_flag, 1,&crc);
+
+	    if (gi->window_switching_flag) {
+		CRC_writeheader(gfc,gi->block_type,       2,&crc);
+		CRC_writeheader(gfc,gi->mixed_block_flag, 1,&crc);
+
+		if (gi->table_select[0] == 14)
+		    gi->table_select[0] = 16;
+		CRC_writeheader(gfc,gi->table_select[0],  5,&crc);
+		if (gi->table_select[1] == 14)
+		    gi->table_select[1] = 16;
+		CRC_writeheader(gfc,gi->table_select[1],  5,&crc);
+
+		CRC_writeheader(gfc,gi->subblock_gain[0], 3,&crc);
+		CRC_writeheader(gfc,gi->subblock_gain[1], 3,&crc);
+		CRC_writeheader(gfc,gi->subblock_gain[2], 3,&crc);
+	    } else {
+		if (gi->table_select[0] == 14)
+		    gi->table_select[0] = 16;
+		CRC_writeheader(gfc,gi->table_select[0], 5,&crc);
+		if (gi->table_select[1] == 14)
+		    gi->table_select[1] = 16;
+		CRC_writeheader(gfc,gi->table_select[1], 5,&crc);
+		if (gi->table_select[2] == 14)
+		    gi->table_select[2] = 16;
+		CRC_writeheader(gfc,gi->table_select[2], 5,&crc);
+
+		assert(gi->region0_count < 16U);
+		assert(gi->region1_count < 8U);
+		CRC_writeheader(gfc,gi->region0_count, 4,&crc);
+		CRC_writeheader(gfc,gi->region1_count, 3,&crc);
+	    }
+
+	    CRC_writeheader(gfc,gi->scalefac_scale,     1,&crc);
+	    CRC_writeheader(gfc,gi->count1table_select, 1,&crc);
+	}
+    }
+
+    if (gfp->error_protection) {
+	/* (jo) error_protection: add crc16 information to header */
+	gfc->header[gfc->h_ptr].buf[4] = crc >> 8;
+	gfc->header[gfc->h_ptr].buf[5] = crc & 255;
+    }
+
+    {
+	int old = gfc->h_ptr;
+	assert(gfc->header[old].ptr == gfc->sideinfo_len * 8);
+
+	gfc->h_ptr = (old + 1) & (MAX_HEADER_BUF - 1);
+	gfc->header[gfc->h_ptr].write_timing =
+	    gfc->header[old].write_timing + bitsPerFrame;
+
+	if (gfc->h_ptr == gfc->w_ptr) {
+	  /* yikes! we are out of header buffer space */
+	  ERRORF(gfc,"Error: MAX_HEADER_BUF too small in bitstream.c \n");
+	}
+
+    }
+}
+
+
+inline static int
+huffman_coder_count1(lame_global_flags *gfp,int *ix, gr_info *gi)
+{
+#ifdef DEBUG
+    lame_internal_flags *gfc = gfp->internal_flags;
+#endif
+    /* Write count1 area */
+    const struct huffcodetab *h = &ht[gi->count1table_select + 32];
+    int i,bits=0;
+#ifdef DEBUG
+    int gegebo = gfc->bs.totbit;
+#endif
+
+    ix += gi->big_values;
+    assert(gi->count1table_select < 2);
+
+
+    for (i = (gi->count1 - gi->big_values) / 4; i > 0; --i) {
+	int huffbits = 0;
+	int p = 0, v;
+
+	v = ix[0];
+	if (v) {
+	    p += 8;
+	    if (v < 0)
+		huffbits++;
+	    assert(-1 <= v && v <= 1);
+	}
+
+	v = ix[1];
+	if (v) {
+	    p += 4;
+	    huffbits *= 2;
+	    if (v < 0)
+		huffbits++;
+	    assert(-1 <= v && v <= 1);
+	}
+
+	v = ix[2];
+	if (v) {
+	    p += 2;
+	    huffbits *= 2;
+	    if (v < 0)
+		huffbits++;
+	    assert(-1 <= v && v <= 1);
+	}
+
+	v = ix[3];
+	if (v) {
+	    p++;
+	    huffbits *= 2;
+	    if (v < 0)
+		huffbits++;
+	    assert(-1 <= v && v <= 1);
+	}
+
+	ix += 4;
+	putbits2(gfp,huffbits + h->table[p], h->hlen[p]);
+	bits += h->hlen[p];
+    }
+#ifdef DEBUG
+    DEBUGF("%ld %d %d %d\n",gfc->bs.totbit -gegebo, gi->count1bits, gi->big_values, gi->count1);
+#endif
+    return bits;
+}
+
+/*
+ * Implements the pseudocode of page 98 of the IS
+ */
+static int
+HuffmanCode(lame_global_flags* const gfp, int table_select, int x1, int x2)
+{
+    struct huffcodetab* h = ht + table_select;
+    int  code    = 0;
+    int  cbits   = 0;
+    int  xbits   = 0;
+    int  sgn_x1  = 0;
+    int  sgn_x2  = 0;
+    int  linbits = h->xlen;
+    int  xlen    = h->xlen;
+    int  ext; 
+
+//	assert ( table_select > 0 );
+
+    if (x1 < 0) {
+	sgn_x1++;
+	x1 = -x1;
+    }
+
+    if (x2 < 0) {
+	sgn_x2++;
+	x2 = -x2;
+    }
+
+    ext     = sgn_x1;
+
+    if (table_select > 15) {
+	/* use ESC-words */
+	if (x1 > 14) {
+	    int linbits_x1 = x1 - 15;
+
+//	    assert ( linbits_x1 <= h->linmax );
+	    ext   |= linbits_x1 << 1;
+	    xbits  = linbits;
+	    x1     = 15;
+	}
+
+	if (x2 > 14) {
+	    int linbits_x2 = x2 - 15;
+
+//	    assert ( linbits_x2 <= h->linmax );
+	    ext  <<= linbits;
+	    ext   |= linbits_x2;
+	    xbits += linbits;
+	    x2     = 15;
+	}
+	xlen = 16;
+    }
+
+    if (x1 != 0) {
+	cbits--;
+    }
+
+    if (x2 != 0) {
+	ext <<= 1;
+	ext  |= sgn_x2;
+	cbits--;
+    }
+
+    xbits -= cbits;
+
+//	assert ( (x1|x2) < 16u );
+
+    x1 = x1 * xlen + x2;
+
+    code   = h->table [x1];
+    cbits += h->hlen  [x1];
+
+//	assert ( cbits <= MAX_LENGTH );
+//	assert ( xbits <= MAX_LENGTH );
+
+    putbits2 ( gfp, code, cbits );
+    putbits2 ( gfp, ext,  xbits );
+    
+    return cbits + xbits;
+}
+
+static int
+Huffmancodebits(lame_global_flags *gfp, int tableindex, int start, int end, int *ix)
+{
+    int i,bits;
+
+//	assert(tableindex < 32);
+    if (!tableindex) return 0;
+
+    bits=0;
+    for (i = start; i < end; i += 2) {
+      bits += HuffmanCode(gfp,tableindex, ix[i], ix[i + 1]);
+    }
+    return bits;
+}
+
+
+
+/*
+  Note the discussion of huffmancodebits() on pages 28
+  and 29 of the IS, as well as the definitions of the side
+  information on pages 26 and 27.
+  */
+static int
+ShortHuffmancodebits(lame_global_flags *gfp,int *ix, gr_info *gi)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int bits;
+    int region1Start;
+    
+    region1Start = 3*gfc->scalefac_band.s[3];
+    if (region1Start > gi->big_values) 	
+        region1Start = gi->big_values;
+
+    /* short blocks do not have a region2 */
+    bits  = Huffmancodebits(gfp,gi->table_select[0], 0, region1Start, ix);
+    bits += Huffmancodebits(gfp,gi->table_select[1], region1Start, gi->big_values, ix);
+    return bits;
+}
+
+static int
+LongHuffmancodebits(lame_global_flags *gfp,int *ix, gr_info *gi)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int i, bigvalues,bits=0;
+    int region1Start, region2Start;
+
+    bigvalues = gi->big_values;
+    assert(0 <= bigvalues && bigvalues <= 576);
+
+    i = gi->region0_count + 1;
+    assert(i < 23);
+    region1Start = gfc->scalefac_band.l[i];
+    i += gi->region1_count + 1;
+    assert(i < 23);
+    region2Start = gfc->scalefac_band.l[i];
+
+    if (region1Start > bigvalues)
+	region1Start = bigvalues;
+
+    if (region2Start > bigvalues)
+	region2Start = bigvalues;
+
+    bits +=Huffmancodebits(gfp,gi->table_select[0], 0, region1Start, ix);
+    bits +=Huffmancodebits(gfp,gi->table_select[1], region1Start, region2Start, ix);
+    bits +=Huffmancodebits(gfp,gi->table_select[2], region2Start, bigvalues, ix);
+    return bits;
+}
+
+inline static int
+writeMainData ( lame_global_flags * const gfp,
+        int              l3_enc   [2] [2] [576],
+        III_scalefac_t   scalefac [2] [2] )
+{
+    int gr, ch, sfb,data_bits,scale_bits,tot_bits=0;
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_side_info_t *l3_side;
+
+    l3_side = &gfc->l3_side;
+    if (gfp->version == 1) {
+	/* MPEG 1 */
+	for (gr = 0; gr < 2; gr++) {
+	    for (ch = 0; ch < gfc->channels_out; ch++) {
+		gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
+		int slen1 = slen1_tab[gi->scalefac_compress];
+		int slen2 = slen2_tab[gi->scalefac_compress];
+		data_bits=0;
+		scale_bits=0;
+
+#ifdef DEBUG
+		hogege = gfc->bs.totbit;
+#endif
+		if (gi->block_type == SHORT_TYPE) {
+		    for (sfb = 0; sfb < SBPSY_s; sfb++) {
+			int slen = sfb < 6 ? slen1 : slen2;
+
+			assert(scalefac[gr][ch].s[sfb][0]>=0);
+			assert(scalefac[gr][ch].s[sfb][1]>=0);
+			assert(scalefac[gr][ch].s[sfb][2]>=0);
+
+			putbits2(gfp,scalefac[gr][ch].s[sfb][0], slen);
+			putbits2(gfp,scalefac[gr][ch].s[sfb][1], slen);
+			putbits2(gfp,scalefac[gr][ch].s[sfb][2], slen);
+			scale_bits += 3*slen;
+		    }
+		    data_bits += ShortHuffmancodebits(gfp,l3_enc[gr][ch], gi);
+		} else {
+		    int i;
+		    for (i = 0; i < sizeof(scfsi_band) / sizeof(int) - 1;
+			 i++) {
+			if (gr != 0 && l3_side->scfsi[ch][i])
+			    continue;
+
+			for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1];
+			     sfb++) {
+
+			    assert(scalefac[gr][ch].l[sfb]>=0);
+			    putbits2(gfp,scalefac[gr][ch].l[sfb],
+				    sfb < 11 ? slen1 : slen2);
+			    scale_bits += sfb < 11 ? slen1 : slen2;
+			}
+		    }
+		    data_bits +=LongHuffmancodebits(gfp,l3_enc[gr][ch], gi);
+		}
+		data_bits +=huffman_coder_count1(gfp,l3_enc[gr][ch], gi);
+#ifdef DEBUG
+		DEBUGF("<%ld> ", gfc->bs.totbit-hogege);
+#endif
+		/* does bitcount in quantize.c agree with actual bit count?*/
+		assert(data_bits==gi->part2_3_length-gi->part2_length);
+		assert(scale_bits==gi->part2_length);
+		tot_bits += scale_bits + data_bits;
+
+	    } /* for ch */
+	} /* for gr */
+    } else {
+	/* MPEG 2 */
+	gr = 0;
+	for (ch = 0; ch < gfc->channels_out; ch++) {
+	    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
+	    int i, sfb_partition;
+	    assert(gi->sfb_partition_table);
+	    data_bits = 0;
+	    scale_bits=0;
+
+	    sfb = 0;
+	    sfb_partition = 0;
+	    if (gi->block_type == SHORT_TYPE) {
+		for (; sfb_partition < 4; sfb_partition++) {
+		    int sfbs = gi->sfb_partition_table[sfb_partition] / 3;
+		    int slen = gi->slen[sfb_partition];
+		    for (i = 0; i < sfbs; i++, sfb++) {
+			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][0], 0U), slen);
+			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][1], 0U), slen);
+			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][2], 0U), slen);
+			scale_bits += 3*slen;
+		    }
+		}
+		data_bits += ShortHuffmancodebits(gfp,l3_enc[gr][ch], gi);
+	    } else {
+		for (; sfb_partition < 4; sfb_partition++) {
+		    int sfbs = gi->sfb_partition_table[sfb_partition];
+		    int slen = gi->slen[sfb_partition];
+		    for (i = 0; i < sfbs; i++, sfb++) {
+			putbits2(gfp,Max(scalefac[gr][ch].l[sfb], 0U), slen);
+			scale_bits += slen;
+		    }
+		}
+		data_bits +=LongHuffmancodebits(gfp,l3_enc[gr][ch], gi);
+	    }
+	    data_bits +=huffman_coder_count1(gfp,l3_enc[gr][ch], gi);
+
+	    /* does bitcount in quantize.c agree with actual bit count?*/
+	    assert(data_bits==gi->part2_3_length-gi->part2_length);
+	    assert(scale_bits==gi->part2_length);
+	    tot_bits += scale_bits + data_bits;
+	} /* for ch */
+    } /* for gf */
+    return tot_bits;
+} /* main_data */
+
+
+
+
+void
+flush_bitstream(lame_global_flags *gfp)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int flushbits,remaining_headers;
+  int bitsPerFrame, mean_bits;
+  int last_ptr,first_ptr;
+  first_ptr=gfc->w_ptr;           /* first header to add to bitstream */
+  last_ptr = gfc->h_ptr - 1;   /* last header to add to bitstream */
+  if (last_ptr==-1) last_ptr=MAX_HEADER_BUF-1;   
+
+  /* add this many bits to bitstream so we can flush all headers */
+  flushbits = gfc->header[last_ptr].write_timing - gfc->bs.totbit;
+
+  if (flushbits >= 0) {
+    /* if flushbits >= 0, some headers have not yet been written */
+    /* reduce flushbits by the size of the headers */
+    remaining_headers= 1+last_ptr - first_ptr;
+    if (last_ptr < first_ptr) 
+      remaining_headers= 1+last_ptr - first_ptr + MAX_HEADER_BUF;
+    flushbits -= remaining_headers*8*gfc->sideinfo_len;
+  }
+
+
+  /* finally, add some bits so that the last frame is complete
+   * these bits are not necessary to decode the last frame, but
+   * some decoders will ignore last frame if these bits are missing 
+   */
+  getframebits(gfp,&bitsPerFrame,&mean_bits);
+  flushbits += bitsPerFrame;
+  if (flushbits<0) {
+#if 0
+    /* if flushbits < 0, this would mean that the buffer looks like:
+     * (data...)  last_header  (data...)  (extra data that should not be here...)
+     */
+    DEBUGF("last header write_timing = %i \n",gfc->header[last_ptr].write_timing);
+    DEBUGF("first header write_timing = %i \n",gfc->header[first_ptr].write_timing);
+    DEBUGF("bs.totbit:                 %i \n",gfc->bs.totbit);
+    DEBUGF("first_ptr, last_ptr        %i %i \n",first_ptr,last_ptr);
+    DEBUGF("remaining_headers =        %i \n",remaining_headers);
+    DEBUGF("bitsperframe:              %i \n",bitsPerFrame);
+    DEBUGF("sidelen:                   %i \n",gfc->sideinfo_len);
+#endif
+    ERRORF(gfc,"strange error flushing buffer ... \n");
+  } else {
+    drain_into_ancillary(gfp,flushbits);
+  }
+
+  assert (gfc->header[last_ptr].write_timing + bitsPerFrame  == gfc->bs.totbit);
+}
+
+
+
+
+void  add_dummy_byte ( lame_global_flags* const gfp, unsigned char val )
+{
+  lame_internal_flags *gfc = gfp->internal_flags;
+  int i;
+
+  putbits_noheaders(gfp,val,8);   
+
+  for (i=0 ; i< MAX_HEADER_BUF ; ++i) 
+    gfc->header[i].write_timing += 8;
+}
+
+
+/*
+  format_bitstream()
+
+  This is called after a frame of audio has been quantized and coded.
+  It will write the encoded audio to the bitstream. Note that
+  from a layer3 encoder's perspective the bit stream is primarily
+  a series of main_data() blocks, with header and side information
+  inserted at the proper locations to maintain framing. (See Figure A.7
+  in the IS).
+  */
+int
+format_bitstream(lame_global_flags *gfp, int bitsPerFrame,
+      int              l3_enc[2][2][576],
+  	III_scalefac_t   scalefac[2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int bits;
+    III_side_info_t *l3_side;
+    l3_side = &gfc->l3_side;
+
+    drain_into_ancillary(gfp,l3_side->resvDrain_pre);
+
+    encodeSideInfo2(gfp,bitsPerFrame);
+    bits = 8*gfc->sideinfo_len;
+    bits+=writeMainData(gfp,l3_enc,scalefac);
+    drain_into_ancillary(gfp,l3_side->resvDrain_post);
+    bits += l3_side->resvDrain_post;
+
+    l3_side->main_data_begin += (bitsPerFrame-bits)/8;
+    if ((l3_side->main_data_begin * 8) != gfc->ResvSize ) {
+      ERRORF(gfc,"bit reservoir error: \n"
+             "l3_side->main_data_begin: %i \n"
+             "Resvoir size:             %i \n"
+             "resv drain (post)         %i \n"
+             "resv drain (pre)          %i \n"
+             "header and sideinfo:      %i \n"
+             "data bits:                %i \n"
+             "total bits:               %i (remainder: %i) \n"
+             "bitsperframe:             %i \n",
+
+             8*l3_side->main_data_begin,
+             gfc->ResvSize,
+             l3_side->resvDrain_post,
+             l3_side->resvDrain_pre,
+             8*gfc->sideinfo_len,
+             bits-l3_side->resvDrain_post-8*gfc->sideinfo_len,
+             bits, bits % 8,
+             bitsPerFrame
+      );
+
+      gfc->ResvSize = l3_side->main_data_begin*8;
+    };
+    assert(gfc->bs.totbit % 8 == 0);
+
+    if (gfc->bs.totbit > 1000000000  ) {
+      /* to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset bit counter*/
+      int i;
+      for (i=0 ; i< MAX_HEADER_BUF ; ++i) 
+	gfc->header[i].write_timing -= gfc->bs.totbit;      
+      gfc->bs.totbit=0;
+    }
+    return 0;
+}
+
+
+int copy_buffer(unsigned char *buffer,int size,Bit_stream_struc *bs)
+{
+  int minimum = bs->buf_byte_idx + 1;
+  if (minimum <= 0) return 0;
+  if (size!=0 && minimum>size) return -1; /* buffer is too small */
+  memcpy(buffer,bs->buf,minimum);
+  bs->buf_byte_idx = -1;
+  bs->buf_bit_idx = 0;
+  return minimum;
+}
+
+
+void init_bit_stream_w(lame_internal_flags *gfc)
+{
+   gfc->bs.buf = (unsigned char *)       malloc(BUFFER_SIZE);
+   gfc->bs.buf_size = BUFFER_SIZE;
+
+   gfc->h_ptr = gfc->w_ptr = 0;
+   gfc->header[gfc->h_ptr].write_timing = 0;
+   gfc->bs.buf_byte_idx = -1;
+   gfc->bs.buf_bit_idx = 0;
+   gfc->bs.totbit = 0;
+}
+
+/* end of bitstream.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/bitstream.h
@@ -1,0 +1,37 @@
+/*
+ *	MP3 bitstream Output interface for LAME
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_BITSTREAM_H
+#define LAME_BITSTREAM_H
+#include "util.h"
+
+int format_bitstream(lame_global_flags *gfp, int i,
+		     int              l3_enc[2][2][576],
+		     III_scalefac_t   scalefac[2][2] );
+
+void flush_bitstream(lame_global_flags *gfp);
+void add_dummy_byte ( lame_global_flags* const gfp, unsigned char val );
+
+int  copy_buffer(unsigned char *buffer,int buffer_size,Bit_stream_struc *bs);
+void init_bit_stream_w(lame_internal_flags *gfc);
+void main_CRC_init (void);   // remove sometimes
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/brhist.h
@@ -1,0 +1,53 @@
+/*
+ *	Bitrate histogram include file
+ *
+ *	Copyright (c) 2000 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_BRHIST_H
+#define LAME_BRHIST_H
+
+#if defined(_WIN32)  &&  !defined(__CYGWIN__)
+# include <windows.h>
+#endif
+#include "lame.h"
+
+int   brhist_init       ( const lame_global_flags  *gf, const int bitrate_kbps_min, const int bitrate_kbps_max );
+void  brhist_disp       ( const lame_global_flags  *gf );
+void  brhist_disp_total ( const lame_global_flags  *gf );
+void  brhist_jump_back  ( void );
+
+typedef struct {
+    FILE*   Console_fp;			/* filepointer to stream reporting information */
+    FILE*   Error_fp;                   /* filepointer to stream fatal error reporting information */
+    FILE*   Report_fp;                  /* filepointer to stream reports (normally a text file or /dev/null) */
+#if defined(_WIN32)  &&  !defined(__CYGWIN__) 
+    HANDLE  Console_Handle;
+#endif
+    int     disp_width;
+    int     disp_height;
+    char    str_up         [10];
+    char    str_clreoln    [10];
+    char    str_emph       [10];
+    char    str_norm       [10];
+    char    Console_buff [1024];
+} Console_IO_t;
+
+extern Console_IO_t  Console_IO;
+
+#endif /* LAME_BRHIST_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/encoder.c
@@ -1,0 +1,584 @@
+/*
+ *	LAME MP3 encoding engine
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: encoder.c,v 1.43 2001/03/12 04:38:35 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+
+#include "lame.h"
+#include "util.h"
+#include "newmdct.h"
+#include "psymodel.h"
+#include "quantize.h"
+#include "quantize_pvt.h"
+#include "bitstream.h"
+#include "VbrTag.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+/*
+ * auto-adjust of ATH, useful for low volume
+ * Gabriel Bouvigne 3 feb 2001
+ *
+ * modifies some values in
+ *   gfp->internal_flags->ATH
+ *   (gfc->ATH)
+ */
+void
+adjust_ATH( lame_global_flags* const  gfp,
+            FLOAT8              tot_ener[2][4] )
+{
+    lame_internal_flags* const  gfc = gfp->internal_flags;
+    int gr, channel;
+
+    if (gfc->ATH->use_adjust) {
+        FLOAT8 max_val = 0;
+
+	for ( gr = 0; gr < gfc->mode_gr; ++gr ) 
+	    for ( channel = 0; channel < gfc->channels_out; ++channel ) 
+	        max_val = Max( max_val, tot_ener[gr][channel] );
+	/* scale to 0..1, and then rescale to 0..32767 */
+	max_val *= 32767/1e13;
+
+        /*  adjust ATH depending on range of maximum value
+         */
+        if (vbr_mtrh == gfp->VBR) {
+            /*  this code reduces slowly the ATH (speed of 12 dB per second)
+             *  with some supporting stages to limit the reduction
+             *    640  ->  ~17 dB
+             *         :
+             *  32640  ->  ~0.01 dB
+             */
+            FLOAT8 
+            x = Max (640, 320*(int)(max_val/320));
+            x = x/32768;
+            gfc->ATH->adjust *= gfc->ATH->decay;
+            if (gfc->ATH->adjust < x)       /* but not more than f(x) dB */
+                gfc->ATH->adjust = x;
+        }
+        else {
+#ifdef OLD_ATH_AUTO_ADJUST
+            if      (0.5 < max_val / 32768) {       /* value above 50 % */
+                    gfc->ATH->adjust = 1.0;         /* do not reduce ATH */
+            }
+            else if (0.3 < max_val / 32768) {       /* value above 30 % */
+                    gfc->ATH->adjust *= 0.955;      /* reduce by ~0.2 dB */
+                    if (gfc->ATH->adjust < 0.3)     /* but ~5 dB in maximum */
+                        gfc->ATH->adjust = 0.3;            
+            }
+            else {                                  /* value below 30 % */
+                    gfc->ATH->adjust *= 0.93;       /* reduce by ~0.3 dB */
+                    if (gfc->ATH->adjust < 0.01)    /* but 20 dB in maximum */
+                        gfc->ATH->adjust = 0.01;
+            }
+#else				/* jd - 27 feb 2001 */
+				/* continuous curves based on approximation */
+				/* to GB's original values */
+	  FLOAT8 max_val_n = max_val / 32768;
+	  FLOAT8 adj_lim_new;
+				/* For an increase in approximate loudness, */
+				/* set ATH adjust to adjust_limit immediately*/
+				/* after a delay of one frame. */
+				/* For a loudness decrease, reduce ATH adjust*/
+				/* towards adjust_limit gradually. */
+	  if( max_val_n > 0.25) { /* sqrt((1 - 0.01) / 15.84) from curve below*/
+	    if( gfc->ATH->adjust >= 1.0) {
+	      gfc->ATH->adjust = 1.0;
+	    } else {		/* preceding frame has lower ATH adjust; */
+				/* ascend only to the preceding adjust_limit */
+				/* in case there is leading low volume */
+	      if( gfc->ATH->adjust < gfc->ATH->adjust_limit) {
+		gfc->ATH->adjust = gfc->ATH->adjust_limit;
+	      }
+	    }
+	    gfc->ATH->adjust_limit = 1.0;
+	  } else {		/* adjustment curve (parabolic) */
+	    adj_lim_new = 15.84 * (max_val_n * max_val_n) + 0.01;
+	    if( gfc->ATH->adjust >= adj_lim_new) { /* descend gradually */
+	      gfc->ATH->adjust *= adj_lim_new * 0.075 + 0.925;
+	      if( gfc->ATH->adjust < adj_lim_new) { /* stop descent */
+		gfc->ATH->adjust = adj_lim_new;
+	      }
+	    } else {		/* ascend */
+	      if( gfc->ATH->adjust_limit >= adj_lim_new) {
+		gfc->ATH->adjust = adj_lim_new;
+	      } else {		/* preceding frame has lower ATH adjust; */
+				/* ascend only to the preceding adjust_limit */
+		if( gfc->ATH->adjust < gfc->ATH->adjust_limit) {
+		  gfc->ATH->adjust = gfc->ATH->adjust_limit;
+		}
+	      }
+	    }
+	    gfc->ATH->adjust_limit = adj_lim_new;
+	  }
+#endif
+        }
+    }
+}
+
+/************************************************************************
+*
+* encodeframe()           Layer 3
+*
+* encode a single frame
+*
+************************************************************************
+lame_encode_frame()
+
+
+                       gr 0            gr 1
+inbuf:           |--------------|---------------|-------------|
+MDCT output:  |--------------|---------------|-------------|
+
+FFT's                    <---------1024---------->
+                                         <---------1024-------->
+
+
+
+    inbuf = buffer of PCM data size=MP3 framesize
+    encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY
+    so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]
+
+    psy-model FFT has a 1 granule delay, so we feed it data for the 
+    next granule.
+    FFT is centered over granule:  224+576+224
+    So FFT starts at:   576-224-MDCTDELAY
+
+    MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY
+    MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)
+
+    FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET
+
+*/
+
+typedef FLOAT8 chgrdata[2][2];
+
+int  lame_encode_mp3_frame (				// Output
+	lame_global_flags* const  gfp,			// Context
+	sample_t*                 inbuf_l,              // Input
+	sample_t*                 inbuf_r,              // Input
+	unsigned char*            mp3buf, 		// Output
+	int                    mp3buf_size )		// Output
+{
+#ifdef macintosh /* PLL 14/04/2000 */
+  static FLOAT8 xr[2][2][576];
+  static int l3_enc[2][2][576];
+#else
+  FLOAT8 xr[2][2][576];
+  int l3_enc[2][2][576];
+#endif
+  int mp3count;
+  III_psy_ratio masking_LR[2][2];    /*LR masking & energy */
+  III_psy_ratio masking_MS[2][2]; /*MS masking & energy */
+  III_psy_ratio (*masking)[2][2];  /*pointer to selected maskings*/
+  III_scalefac_t scalefac[2][2];
+  const sample_t *inbuf[2];
+  lame_internal_flags *gfc=gfp->internal_flags;
+
+  FLOAT8 tot_ener[2][4];   
+  FLOAT8 ms_ener_ratio[2]={.5,.5};
+  chgrdata pe,pe_MS;
+  chgrdata *pe_use;
+
+  int ch,gr,mean_bits;
+  int bitsPerFrame;
+
+  int check_ms_stereo;
+  FLOAT8 ms_ratio_next = 0.;
+  FLOAT8 ms_ratio_prev = 0.;
+
+
+  memset((char *) masking_LR, 0, sizeof(masking_LR));
+  memset((char *) masking_MS, 0, sizeof(masking_MS));
+  memset((char *) scalefac, 0, sizeof(scalefac));
+  inbuf[0]=inbuf_l;
+  inbuf[1]=inbuf_r;
+
+  check_ms_stereo =  (gfp->mode == JOINT_STEREO);
+  gfc->mode_ext = MPG_MD_LR_LR;
+
+  if (gfc->lame_encode_frame_init==0 )  {
+    gfc->lame_encode_frame_init=1;
+    
+    /* padding method as described in 
+     * "MPEG-Layer3 / Bitstream Syntax and Decoding"
+     * by Martin Sieler, Ralph Sperschneider
+     *
+     * note: there is no padding for the very first frame
+     *
+     * [email protected] 2000-06-22
+     */
+        
+    gfc->frac_SpF = ((gfp->version+1)*72000L*gfp->brate) % gfp->out_samplerate;
+    gfc->slot_lag  = gfc->frac_SpF;
+    
+    /* check FFT will not use a negative starting offset */
+#if 576 < FFTOFFSET
+# error FFTOFFSET greater than 576: FFT uses a negative offset
+#endif
+    /* check if we have enough data for FFT */
+    assert(gfc->mf_size>=(BLKSIZE+gfp->framesize-FFTOFFSET));
+    /* check if we have enough data for polyphase filterbank */
+    /* it needs 1152 samples + 286 samples ignored for one granule */
+    /*          1152+576+286 samples for two granules */
+    assert(gfc->mf_size>=(286+576*(1+gfc->mode_gr)));
+
+    /* prime the MDCT/polyphase filterbank with a short block */
+    { 
+      int i,j;
+      sample_t primebuff0[286+1152+576];
+      sample_t primebuff1[286+1152+576];
+      for (i=0, j=0; i<286+576*(1+gfc->mode_gr); ++i) {
+	if (i<576*gfc->mode_gr) {
+	  primebuff0[i]=0;
+	  if (gfc->channels_out==2) 
+	    primebuff1[i]=0;
+	}else{
+	  primebuff0[i]=inbuf[0][j];
+	  if (gfc->channels_out==2) 
+	    primebuff1[i]=inbuf[1][j];
+	  ++j;
+	}
+      }
+      /* polyphase filtering / mdct */
+      for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
+	for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+	  gfc->l3_side.gr[gr].ch[ch].tt.block_type=SHORT_TYPE;
+	}
+      }
+      mdct_sub48(gfc, primebuff0, primebuff1, xr);
+    }
+    
+    iteration_init(gfp);
+    
+    /*  prepare for ATH auto adjustment:
+     *  we want to decrease the ATH by 12 dB per second
+     */ {
+        FLOAT8 frame_duration = 576. * gfc->mode_gr / gfp->out_samplerate;
+        gfc->ATH->decay = pow(10., -12./10. * frame_duration);
+        gfc->ATH->adjust = 1.0;
+        gfc->ATH->adjust_limit = 0.01;
+    }
+  }
+
+
+  /********************** padding *****************************/
+  switch (gfp->padding_type) {
+  case 0:
+    gfc->padding=0;
+    break;
+  case 1:
+    gfc->padding=1;
+    break;
+  case 2:
+  default:
+    if (gfp->VBR!=vbr_off) {
+      gfc->padding=0;
+    } else {
+      if (gfp->disable_reservoir) {
+	gfc->padding = 0;
+	/* if the user specified --nores, dont very gfc->padding either */
+	/* tiny changes in frac_SpF rounding will cause file differences */
+      }else{
+        /* padding method as described in 
+         * "MPEG-Layer3 / Bitstream Syntax and Decoding"
+         * by Martin Sieler, Ralph Sperschneider
+         *
+         * note: there is no padding for the very first frame
+         *
+         * [email protected] 2000-06-22
+         */
+
+        gfc->slot_lag -= gfc->frac_SpF;
+        if (gfc->slot_lag < 0) {
+          gfc->slot_lag += gfp->out_samplerate;
+          gfc->padding = 1;
+        } else {
+          gfc->padding = 0;
+        }
+      } /* reservoir enabled */
+    }
+  }
+
+
+  if (gfc->psymodel) {
+    /* psychoacoustic model
+     * psy model has a 1 granule (576) delay that we must compensate for
+     * (mt 6/99).
+     */
+    int ret;
+    const sample_t *bufp[2];  /* address of beginning of left & right granule */
+    int blocktype[2];
+
+    ms_ratio_prev=gfc->ms_ratio[gfc->mode_gr-1];
+    for (gr=0; gr < gfc->mode_gr ; gr++) {
+
+      for ( ch = 0; ch < gfc->channels_out; ch++ )
+	bufp[ch] = &inbuf[ch][576 + gr*576-FFTOFFSET];
+
+      if (gfc->nsPsy.use) {
+	ret=L3psycho_anal_ns( gfp, bufp, gr, 
+			      &gfc->ms_ratio[gr],&ms_ratio_next,
+			      masking_LR, masking_MS,
+			      pe[gr],pe_MS[gr],tot_ener[gr],blocktype);
+      } else {
+	ret=L3psycho_anal( gfp, bufp, gr, 
+			   &gfc->ms_ratio[gr],&ms_ratio_next,
+			   masking_LR, masking_MS,
+			   pe[gr],pe_MS[gr],tot_ener[gr],blocktype);
+      }
+      if (ret!=0) return -4;
+
+      for ( ch = 0; ch < gfc->channels_out; ch++ )
+	gfc->l3_side.gr[gr].ch[ch].tt.block_type=blocktype[ch];
+
+      if (check_ms_stereo) {
+	  ms_ener_ratio[gr] = tot_ener[gr][2]+tot_ener[gr][3];
+	  if (ms_ener_ratio[gr]>0)
+	      ms_ener_ratio[gr] = tot_ener[gr][3]/ms_ener_ratio[gr];
+      }
+
+    }
+  }else{
+    for (gr=0; gr < gfc->mode_gr ; gr++)
+      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+	gfc->l3_side.gr[gr].ch[ch].tt.block_type=NORM_TYPE;
+	pe_MS[gr][ch]=pe[gr][ch]=700;
+      }
+  }
+
+
+
+  /* auto-adjust of ATH, useful for low volume */
+  adjust_ATH( gfp, tot_ener );
+
+
+
+  /* block type flags */
+  for( gr = 0; gr < gfc->mode_gr; gr++ ) {
+    for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+      gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
+      cod_info->mixed_block_flag = 0;     /* never used by this model */
+      if (cod_info->block_type == NORM_TYPE )
+	cod_info->window_switching_flag = 0;
+      else
+	cod_info->window_switching_flag = 1;
+    }
+  }
+
+
+  /* polyphase filtering / mdct */
+  mdct_sub48(gfc, inbuf[0], inbuf[1], xr);
+  /* re-order the short blocks, for more efficient encoding below */
+  for (gr = 0; gr < gfc->mode_gr; gr++) {
+    for (ch = 0; ch < gfc->channels_out; ch++) {
+      gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
+      if (cod_info->block_type==SHORT_TYPE) {
+	freorder(gfc->scalefac_band.s,xr[gr][ch]);
+      }
+    }
+  }
+  
+
+  /* use m/s gfc->channels_out? */
+  if (check_ms_stereo) {
+    int gr0 = 0, gr1 = gfc->mode_gr-1;
+    /* make sure block type is the same in each channel */
+    check_ms_stereo =
+      (gfc->l3_side.gr[gr0].ch[0].tt.block_type==gfc->l3_side.gr[gr0].ch[1].tt.block_type) &&
+      (gfc->l3_side.gr[gr1].ch[0].tt.block_type==gfc->l3_side.gr[gr1].ch[1].tt.block_type);
+  }
+  
+  /* Here will be selected MS or LR coding of the 2 stereo channels */
+
+  assert (  gfc->mode_ext == MPG_MD_LR_LR );
+  gfc->mode_ext = MPG_MD_LR_LR;
+  
+  if (gfp->force_ms) {
+    gfc->mode_ext = MPG_MD_MS_LR;
+  } else if (check_ms_stereo) {
+      /* ms_ratio = is scaled, for historical reasons, to look like
+	 a ratio of side_channel / total.  
+         0 = signal is 100% mono
+         .5 = L & R uncorrelated
+      */
+      
+      /* [0] and [1] are the results for the two granules in MPEG-1,
+       * in MPEG-2 it's only a faked averaging of the same value
+       * _prev is the value of the last granule of the previous frame
+       * _next is the value of the first granule of the next frame
+       */
+      FLOAT8  ms_ratio_ave1;
+      FLOAT8  ms_ratio_ave2;
+      FLOAT8  threshold1    = 0.35;
+      FLOAT8  threshold2    = 0.45;
+
+      /* take an average */
+      if (gfc->mode_gr==1) {
+	  /* MPEG2 - no second granule */
+	  ms_ratio_ave1 = 0.33 * ( gfc->ms_ratio[0] + ms_ratio_prev + ms_ratio_next );
+	  ms_ratio_ave2 = gfc->ms_ratio[0];
+      }else{
+	  ms_ratio_ave1 = 0.25 * ( gfc->ms_ratio[0] + gfc->ms_ratio[1] + ms_ratio_prev + ms_ratio_next );
+	  ms_ratio_ave2 = 0.50 * ( gfc->ms_ratio[0] + gfc->ms_ratio[1] );
+      }
+      
+      if (gfp->mode_automs) {
+	  if ( gfp->compression_ratio < 11.025 ) {
+	      /* 11.025 => 1, 6.3 => 0 */
+	      double thr = (gfp->compression_ratio - 6.3) / (11.025 - 6.3);
+	      if (thr<0) thr=0;
+	      threshold1   *= thr;
+	      threshold2   *= thr;
+	  }
+      }
+      
+      if ((ms_ratio_ave1 < threshold1  &&  ms_ratio_ave2 < threshold2) || gfc->nsPsy.use) {
+	  int  sum_pe_MS = pe_MS[0][0] + pe_MS[0][1] + pe_MS[1][0] + pe_MS[1][1];
+	  int  sum_pe_LR = pe   [0][0] + pe   [0][1] + pe   [1][0] + pe   [1][1];
+	  
+	  /* based on PE: M/S coding would not use much more bits than L/R coding */
+	  
+	  if (sum_pe_MS <= 1.07 * sum_pe_LR && !gfc->nsPsy.use) gfc->mode_ext = MPG_MD_MS_LR;
+	  if (sum_pe_MS <= 1.00 * sum_pe_LR &&  gfc->nsPsy.use) gfc->mode_ext = MPG_MD_MS_LR;
+      }
+  }
+
+
+  /* copy data for MP3 frame analyzer */
+  if (gfp->analysis && gfc->pinfo != NULL) {
+    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
+      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+	gfc->pinfo->ms_ratio[gr]=gfc->ms_ratio[gr];
+	gfc->pinfo->ms_ener_ratio[gr]=ms_ener_ratio[gr];
+	gfc->pinfo->blocktype[gr][ch]=
+	  gfc->l3_side.gr[gr].ch[ch].tt.block_type;
+	memcpy(gfc->pinfo->xr[gr][ch],xr[gr][ch],sizeof(xr[gr][ch]));
+	/* in psymodel, LR and MS data was stored in pinfo.  
+	   switch to MS data: */
+	if (gfc->mode_ext==MPG_MD_MS_LR) {
+	  gfc->pinfo->pe[gr][ch]=gfc->pinfo->pe[gr][ch+2];
+	  gfc->pinfo->ers[gr][ch]=gfc->pinfo->ers[gr][ch+2];
+	  memcpy(gfc->pinfo->energy[gr][ch],gfc->pinfo->energy[gr][ch+2],
+		 sizeof(gfc->pinfo->energy[gr][ch]));
+	}
+      }
+    }
+  }
+
+
+
+
+  /* bit and noise allocation */
+  if (MPG_MD_MS_LR == gfc->mode_ext) {
+    masking = &masking_MS;    /* use MS masking */
+    pe_use = &pe_MS;
+  } else {
+    masking = &masking_LR;    /* use LR masking */
+    pe_use = &pe;
+  }
+
+
+  if (gfc->nsPsy.use && (gfp->VBR == vbr_off || gfp->VBR == vbr_abr)) {
+    static FLOAT fircoef[19] = {
+      -0.0207887,-0.0378413,-0.0432472,-0.031183,
+      7.79609e-18,0.0467745,0.10091,0.151365,
+      0.187098,0.2,0.187098,0.151365,
+      0.10091,0.0467745,7.79609e-18,-0.031183,
+      -0.0432472,-0.0378413,-0.0207887,
+    };
+    int i;
+    FLOAT8 f;
+
+    for(i=0;i<18;i++) gfc->nsPsy.pefirbuf[i] = gfc->nsPsy.pefirbuf[i+1];
+
+    i=0;
+    gfc->nsPsy.pefirbuf[18] = 0;
+    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
+      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+	gfc->nsPsy.pefirbuf[18] += (*pe_use)[gr][ch];
+	i++;
+      }
+    }
+
+    gfc->nsPsy.pefirbuf[18] = gfc->nsPsy.pefirbuf[18] / i;
+    f = 0;
+    for(i=0;i<19;i++) f += gfc->nsPsy.pefirbuf[i] * fircoef[i];
+
+    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
+      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+	(*pe_use)[gr][ch] *= 670 / f;
+      }
+    }
+  }
+
+  switch (gfp->VBR){ 
+  default:
+  case vbr_off:
+    iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
+    break;
+  case vbr_mt:
+    VBR_quantize( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
+    break;
+  case vbr_rh:
+  case vbr_mtrh:
+    VBR_iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
+    break;
+  case vbr_abr:
+    ABR_iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
+    break;
+  }
+
+  /*  write the frame to the bitstream  */
+  getframebits(gfp, &bitsPerFrame, &mean_bits);
+
+  format_bitstream( gfp, bitsPerFrame, l3_enc, scalefac);
+
+  /* copy mp3 bit buffer into array */
+  mp3count = copy_buffer(mp3buf,mp3buf_size,&gfc->bs);
+
+  if (gfp->bWriteVbrTag) AddVbrFrame(gfp);
+
+
+  /* copy data for MP3 frame analyzer */
+  if (gfp->analysis && gfc->pinfo != NULL) {
+    int j;
+    for ( ch = 0; ch < gfc->channels_out; ch++ ) {
+      for ( j = 0; j < FFTOFFSET; j++ )
+	gfc->pinfo->pcmdata[ch][j] = gfc->pinfo->pcmdata[ch][j+gfp->framesize];
+      for ( j = FFTOFFSET; j < 1600; j++ ) {
+	gfc->pinfo->pcmdata[ch][j] = inbuf[ch][j-FFTOFFSET];
+      }
+    }
+    set_frame_pinfo (gfp, xr, *masking, l3_enc, scalefac);
+  }
+  
+  updateStats( gfc );
+
+  return mp3count;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/encoder.h
@@ -1,0 +1,131 @@
+/*
+ *      encoder.h include file
+ *
+ *      Copyright (c) 2000 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef LAME_ENCODER_H
+#define LAME_ENCODER_H
+
+/***********************************************************************
+*
+*  encoder and decoder delays
+*
+***********************************************************************/
+
+/* 
+ * layer III enc->dec delay:  1056 (1057?)   (observed)
+ * layer  II enc->dec delay:   480  (481?)   (observed)
+ *
+ * polyphase 256-16             (dec or enc)        = 240
+ * mdct      256+32  (9*32)     (dec or enc)        = 288
+ * total:    512+16
+ *
+ * My guess is that delay of polyphase filterbank is actualy 240.5
+ * (there are technical reasons for this, see postings in mp3encoder).
+ * So total Encode+Decode delay = ENCDELAY + 528 + 1
+ */
+
+/* 
+ * ENCDELAY  The encoder delay.  
+ *
+ * Minimum allowed is MDCTDELAY (see below)
+ *  
+ * The first 96 samples will be attenuated, so using a value less than 96
+ * will result in corrupt data for the first 96-ENCDELAY samples.
+ *
+ * suggested: 576
+ * set to 1160 to sync with FhG.
+ */
+ 
+#define ENCDELAY      576
+
+/* 
+ * delay of the MDCT used in mdct.c
+ * original ISO routines had a delay of 528!  
+ * Takehiro's routines: 
+ */
+
+#define MDCTDELAY     48  
+#define FFTOFFSET     (224+MDCTDELAY)
+
+/*
+ * Most decoders, including the one we use, have a delay of 528 samples.  
+ */
+ 
+#define DECDELAY      528
+
+
+/* number of subbands */
+#define SBLIMIT       32
+
+/* parition bands bands */
+#define CBANDS        64
+
+/* number of critical bands/scale factor bands where masking is computed*/
+#define SBPSY_l       21
+#define SBPSY_s       12
+
+/* total number of scalefactor bands encoded */
+#define SBMAX_l       22
+#define SBMAX_s       13
+
+
+
+/* FFT sizes */
+#define BLKSIZE       1024
+#define HBLKSIZE      (BLKSIZE/2 + 1)
+#define BLKSIZE_s     256
+#define HBLKSIZE_s    (BLKSIZE_s/2 + 1)
+
+
+/* #define switch_pe        1800 */
+#define NORM_TYPE     0
+#define START_TYPE    1
+#define SHORT_TYPE    2
+#define STOP_TYPE     3
+
+/* 
+ * Mode Extention:
+ * When we are in stereo mode, there are 4 possible methods to store these
+ * two channels. The stereo modes -m? are using a subset of them.
+ *
+ *  -ms: MPG_MD_LR_LR
+ *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR
+ *  -mf: MPG_MD_MS_LR
+ *  -mi: all
+ */
+ 
+#define MPG_MD_LR_LR  0
+#define MPG_MD_LR_I   1
+#define MPG_MD_MS_LR  2
+#define MPG_MD_MS_I   3
+
+
+#include "machine.h"
+#include "lame.h"
+
+int  lame_encode_mp3_frame (
+        lame_global_flags*  const gfp,
+        sample_t*           inbuf_l,
+        sample_t*           inbuf_r,
+        unsigned char*      mp3buf, 
+	int                 mp3buf_size );
+
+#endif /* LAME_ENCODER_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/fft.c
@@ -1,0 +1,289 @@
+/*
+** FFT and FHT routines
+**  Copyright 1988, 1993; Ron Mayer
+**  
+**  fht(fz,n);
+**      Does a hartley transform of "n" points in the array "fz".
+**      
+** NOTE: This routine uses at least 2 patented algorithms, and may be
+**       under the restrictions of a bunch of different organizations.
+**       Although I wrote it completely myself; it is kind of a derivative
+**       of a routine I once authored and released under the GPL, so it
+**       may fall under the free software foundation's restrictions;
+**       it was worked on as a Stanford Univ project, so they claim
+**       some rights to it; it was further optimized at work here, so
+**       I think this company claims parts of it.  The patents are
+**       held by R. Bracewell (the FHT algorithm) and O. Buneman (the
+**       trig generator), both at Stanford Univ.
+**       If it were up to me, I'd say go do whatever you want with it;
+**       but it would be polite to give credit to the following people
+**       if you use this anywhere:
+**           Euler     - probable inventor of the fourier transform.
+**           Gauss     - probable inventor of the FFT.
+**           Hartley   - probable inventor of the hartley transform.
+**           Buneman   - for a really cool trig generator
+**           Mayer(me) - for authoring this particular version and
+**                       including all the optimizations in one package.
+**       Thanks,
+**       Ron Mayer; [email protected]
+** and added some optimization by
+**           Mather    - idea of using lookup table
+**           Takehiro  - some dirty hack for speed up
+*/
+
+/* $Id: fft.c,v 1.17 2001/01/13 12:54:41 takehiro Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <math.h>
+#include "util.h"
+#include "fft.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+#ifndef USE_FFT3DN
+#define TRI_SIZE (5-1) /* 1024 =  4**5 */
+
+static const FLOAT costab[TRI_SIZE*2] = {
+  9.238795325112867e-01, 3.826834323650898e-01,
+  9.951847266721969e-01, 9.801714032956060e-02,
+  9.996988186962042e-01, 2.454122852291229e-02,
+  9.999811752826011e-01, 6.135884649154475e-03
+};
+
+inline static void fht(FLOAT *fz, int n)
+{
+    const FLOAT *tri = costab;
+    int           k4;
+    FLOAT *fi, *fn, *gi;
+
+    fn = fz + n;
+    k4 = 4;
+    do {
+	FLOAT s1, c1;
+	int   i, k1, k2, k3, kx;
+	kx  = k4 >> 1;
+	k1  = k4;
+	k2  = k4 << 1;
+	k3  = k2 + k1;
+	k4  = k2 << 1;
+	fi  = fz;
+	gi  = fi + kx;
+	do {
+	    FLOAT f0,f1,f2,f3;
+	    f1      = fi[0]  - fi[k1];
+	    f0      = fi[0]  + fi[k1];
+	    f3      = fi[k2] - fi[k3];
+	    f2      = fi[k2] + fi[k3];
+	    fi[k2]  = f0     - f2;
+	    fi[0 ]  = f0     + f2;
+	    fi[k3]  = f1     - f3;
+	    fi[k1]  = f1     + f3;
+	    f1      = gi[0]  - gi[k1];
+	    f0      = gi[0]  + gi[k1];
+	    f3      = SQRT2  * gi[k3];
+	    f2      = SQRT2  * gi[k2];
+	    gi[k2]  = f0     - f2;
+	    gi[0 ]  = f0     + f2;
+	    gi[k3]  = f1     - f3;
+	    gi[k1]  = f1     + f3;
+	    gi     += k4;
+	    fi     += k4;
+	} while (fi<fn);
+	c1 = tri[0];
+	s1 = tri[1];
+	for (i = 1; i < kx; i++) {
+	    FLOAT c2,s2;
+	    c2 = 1 - (2*s1)*s1;
+	    s2 = (2*s1)*c1;
+	    fi = fz + i;
+	    gi = fz + k1 - i;
+	    do {
+		FLOAT a,b,g0,f0,f1,g1,f2,g2,f3,g3;
+		b       = s2*fi[k1] - c2*gi[k1];
+		a       = c2*fi[k1] + s2*gi[k1];
+		f1      = fi[0 ]    - a;
+		f0      = fi[0 ]    + a;
+		g1      = gi[0 ]    - b;
+		g0      = gi[0 ]    + b;
+		b       = s2*fi[k3] - c2*gi[k3];
+		a       = c2*fi[k3] + s2*gi[k3];
+		f3      = fi[k2]    - a;
+		f2      = fi[k2]    + a;
+		g3      = gi[k2]    - b;
+		g2      = gi[k2]    + b;
+		b       = s1*f2     - c1*g3;
+		a       = c1*f2     + s1*g3;
+		fi[k2]  = f0        - a;
+		fi[0 ]  = f0        + a;
+		gi[k3]  = g1        - b;
+		gi[k1]  = g1        + b;
+		b       = c1*g2     - s1*f3;
+		a       = s1*g2     + c1*f3;
+		gi[k2]  = g0        - a;
+		gi[0 ]  = g0        + a;
+		fi[k3]  = f1        - b;
+		fi[k1]  = f1        + b;
+		gi     += k4;
+		fi     += k4;
+	    } while (fi<fn);
+	    c2 = c1;
+	    c1 = c2 * tri[0] - s1 * tri[1];
+	    s1 = c2 * tri[1] + s1 * tri[0];
+        }
+	tri += 2;
+    } while (k4<n);
+}
+#else
+#define fht(a,b) fht_3DN(a,b/2)
+#endif /* USE_FFT3DN */
+
+static const unsigned char rv_tbl[] = {
+    0x00,    0x80,    0x40,    0xc0,    0x20,    0xa0,    0x60,    0xe0,
+    0x10,    0x90,    0x50,    0xd0,    0x30,    0xb0,    0x70,    0xf0,
+    0x08,    0x88,    0x48,    0xc8,    0x28,    0xa8,    0x68,    0xe8,
+    0x18,    0x98,    0x58,    0xd8,    0x38,    0xb8,    0x78,    0xf8,
+    0x04,    0x84,    0x44,    0xc4,    0x24,    0xa4,    0x64,    0xe4,
+    0x14,    0x94,    0x54,    0xd4,    0x34,    0xb4,    0x74,    0xf4,
+    0x0c,    0x8c,    0x4c,    0xcc,    0x2c,    0xac,    0x6c,    0xec,
+    0x1c,    0x9c,    0x5c,    0xdc,    0x3c,    0xbc,    0x7c,    0xfc,
+    0x02,    0x82,    0x42,    0xc2,    0x22,    0xa2,    0x62,    0xe2,
+    0x12,    0x92,    0x52,    0xd2,    0x32,    0xb2,    0x72,    0xf2,
+    0x0a,    0x8a,    0x4a,    0xca,    0x2a,    0xaa,    0x6a,    0xea,
+    0x1a,    0x9a,    0x5a,    0xda,    0x3a,    0xba,    0x7a,    0xfa,
+    0x06,    0x86,    0x46,    0xc6,    0x26,    0xa6,    0x66,    0xe6,
+    0x16,    0x96,    0x56,    0xd6,    0x36,    0xb6,    0x76,    0xf6,
+    0x0e,    0x8e,    0x4e,    0xce,    0x2e,    0xae,    0x6e,    0xee,
+    0x1e,    0x9e,    0x5e,    0xde,    0x3e,    0xbe,    0x7e,    0xfe
+};
+
+#define ch01(index)  (buffer[chn][index])
+
+#define ml00(f)	(window[i        ] * f(i))
+#define ml10(f)	(window[i + 0x200] * f(i + 0x200))
+#define ml20(f)	(window[i + 0x100] * f(i + 0x100))
+#define ml30(f)	(window[i + 0x300] * f(i + 0x300))
+
+#define ml01(f)	(window[i + 0x001] * f(i + 0x001))
+#define ml11(f)	(window[i + 0x201] * f(i + 0x201))
+#define ml21(f)	(window[i + 0x101] * f(i + 0x101))
+#define ml31(f)	(window[i + 0x301] * f(i + 0x301))
+
+#define ms00(f)	(window_s[i       ] * f(i + k))
+#define ms10(f)	(window_s[0x7f - i] * f(i + k + 0x80))
+#define ms20(f)	(window_s[i + 0x40] * f(i + k + 0x40))
+#define ms30(f)	(window_s[0x3f - i] * f(i + k + 0xc0))
+
+#define ms01(f)	(window_s[i + 0x01] * f(i + k + 0x01))
+#define ms11(f)	(window_s[0x7e - i] * f(i + k + 0x81))
+#define ms21(f)	(window_s[i + 0x41] * f(i + k + 0x41))
+#define ms31(f)	(window_s[0x3e - i] * f(i + k + 0xc1))
+
+
+void fft_short(lame_internal_flags *gfc, 
+                FLOAT x_real[3][BLKSIZE_s], int chn, const sample_t *buffer[2])
+{
+    const FLOAT*  window_s = (const FLOAT *)&gfc->window_s[0];
+    int           i;
+    int           j;
+    int           b;
+
+    for (b = 0; b < 3; b++) {
+	FLOAT *x = &x_real[b][BLKSIZE_s / 2];
+	short k = (576 / 3) * (b + 1);
+	j = BLKSIZE_s / 8 - 1;
+	do {
+	  FLOAT f0,f1,f2,f3, w;
+
+	  i = rv_tbl[j << 2];
+
+	  f0 = ms00(ch01); w = ms10(ch01); f1 = f0 - w; f0 = f0 + w;
+	  f2 = ms20(ch01); w = ms30(ch01); f3 = f2 - w; f2 = f2 + w;
+
+	  x -= 4;
+	  x[0] = f0 + f2;
+	  x[2] = f0 - f2;
+	  x[1] = f1 + f3;
+	  x[3] = f1 - f3;
+
+	  f0 = ms01(ch01); w = ms11(ch01); f1 = f0 - w; f0 = f0 + w;
+	  f2 = ms21(ch01); w = ms31(ch01); f3 = f2 - w; f2 = f2 + w;
+
+	  x[BLKSIZE_s / 2 + 0] = f0 + f2;
+	  x[BLKSIZE_s / 2 + 2] = f0 - f2;
+	  x[BLKSIZE_s / 2 + 1] = f1 + f3;
+	  x[BLKSIZE_s / 2 + 3] = f1 - f3;
+	} while (--j >= 0);
+
+	fht(x, BLKSIZE_s);
+    }
+}
+
+void fft_long(lame_internal_flags * const gfc,
+               FLOAT x[BLKSIZE], int chn, const sample_t *buffer[2] )
+{
+    const FLOAT*  window = (const FLOAT *)&gfc->window[0];
+    int           i;
+    int           jj = BLKSIZE / 8 - 1;
+    x += BLKSIZE / 2;
+
+    do {
+      FLOAT f0,f1,f2,f3, w;
+
+      i = rv_tbl[jj];
+      f0 = ml00(ch01); w = ml10(ch01); f1 = f0 - w; f0 = f0 + w;
+      f2 = ml20(ch01); w = ml30(ch01); f3 = f2 - w; f2 = f2 + w;
+
+      x -= 4;
+      x[0] = f0 + f2;
+      x[2] = f0 - f2;
+      x[1] = f1 + f3;
+      x[3] = f1 - f3;
+
+      f0 = ml01(ch01); w = ml11(ch01); f1 = f0 - w; f0 = f0 + w;
+      f2 = ml21(ch01); w = ml31(ch01); f3 = f2 - w; f2 = f2 + w;
+
+      x[BLKSIZE / 2 + 0] = f0 + f2;
+      x[BLKSIZE / 2 + 2] = f0 - f2;
+      x[BLKSIZE / 2 + 1] = f1 + f3;
+      x[BLKSIZE / 2 + 3] = f1 - f3;
+    } while (--jj >= 0);
+
+    fht(x, BLKSIZE);
+}
+
+
+void init_fft(lame_internal_flags * const gfc)
+{
+    FLOAT *window   = &gfc->window[0];
+    FLOAT *window_s = &gfc->window_s[0];
+    int i;
+
+#if 0
+    if (gfc->nsPsy.use) {
+      for (i = 0; i < BLKSIZE ; i++)
+	/* blackman window */
+	window[i] = 0.42-0.5*cos(2*PI*i/(BLKSIZE-1))+0.08*cos(4*PI*i/(BLKSIZE-1));
+    } else {
+      /*
+       * calculate HANN window coefficients 
+       */
+      for (i = 0; i < BLKSIZE ; i++)
+	window[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE));
+    }
+#endif
+
+    // The type of window used here will make no real difference, but
+    // in the interest of merging nspsytune stuff - switch to blackman window
+    for (i = 0; i < BLKSIZE ; i++)
+      /* blackman window */
+      window[i] = 0.42-0.5*cos(2*PI*(i+.5)/BLKSIZE)+
+	0.08*cos(4*PI*(i+.5)/BLKSIZE);
+
+    for (i = 0; i < BLKSIZE_s/2 ; i++)
+	window_s[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE_s));
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/fft.h
@@ -1,0 +1,37 @@
+/*
+ *	Fast Fourier Transform include file
+ *
+ *	Copyright (c) 2000 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_FFT_H
+#define LAME_FFT_H
+
+#include "encoder.h"
+
+void fft_long(lame_internal_flags* gfc, FLOAT x_real[BLKSIZE], 
+               int chn, const sample_t *data[2] );
+
+void fft_short(lame_internal_flags* gfc, FLOAT x_real[3][BLKSIZE_s], 
+               int chn, const sample_t *data[2] );
+
+void init_fft(lame_internal_flags* gfc );
+
+#endif
+
+/* End of fft.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/get_audio.c
@@ -1,0 +1,1618 @@
+/*
+ *	Get Audio routines source file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: get_audio.c,v 1.61 2001/03/19 21:26:05 markt Exp $ */
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef HAVE_STRCHR
+#  define strchr index
+#  define strrchr rindex
+# endif
+char   *strchr(), *strrchr();
+# ifndef HAVE_MEMCPY
+#  define memcpy(d, s, n) bcopy ((s), (d), (n))
+#  define memmove(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif
+
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "lame.h"
+#include "main.h"
+#include "get_audio.h"
+#include "portableio.h"
+#include "timestatus.h"
+#include "lametime.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+/* global data for get_audio.c. */
+int     count_samples_carefully;
+int     pcmbitwidth;
+mp3data_struct mp3input_data; /* used by Ogg and MP3 */
+unsigned int num_samples_read;
+FILE   *musicin;
+
+
+#ifdef AMIGA_MPEGA
+int     lame_decode_initfile(const char *fullname,
+                             mp3data_struct * const mp3data);
+#else
+int     lame_decode_initfile(FILE * const fd, mp3data_struct * const mp3data);
+#endif
+
+/* read mp3 file until mpglib returns one frame of PCM data */
+int     lame_decode_fromfile(FILE * fd, short int pcm_l[], short int pcm_r[],
+                             mp3data_struct * mp3data);
+
+/* and for Vorbis: */
+int     lame_decode_ogg_initfile( lame_global_flags*  gfp,
+                                  FILE*               fd,
+                                  mp3data_struct*     mp3data );
+int     lame_decode_ogg_fromfile( lame_global_flags*  gfc,
+                                  FILE*               fd,
+                                  short int           pcm_l[],
+                                  short int           pcm_r[],
+                                  mp3data_struct*     mp3data );
+
+
+static int read_samples_pcm(FILE * musicin, short sample_buffer[2304],
+                            int frame_size, int samples_to_read);
+static int read_samples_mp3(lame_global_flags * gfp, FILE * musicin,
+                            short int mpg123pcm[2][1152], int num_chan);
+static int read_samples_ogg(lame_global_flags * gfp, FILE * musicin,
+                            short int mpg123pcm[2][1152], int num_chan);
+void    CloseSndFile(sound_file_format input, FILE * musicin);
+FILE   *OpenSndFile(lame_global_flags * gfp, char *);
+
+
+/* Replacement for forward fseek(,,SEEK_CUR), because fseek() fails on pipes */
+
+
+static int
+fskip(FILE * fp, long offset, int whence)
+{
+#ifndef PIPE_BUF
+    char    buffer[4096];
+#else
+    char    buffer[PIPE_BUF];
+#endif
+    int     read;
+
+    if (0 == fseek(fp, offset, whence))
+        return 0;
+
+    if (whence != SEEK_CUR || offset < 0) {
+        fprintf(stderr,
+                "fskip problem: Mostly the return status of functions is not evaluated so it is more secure to pollute <stderr>.\n");
+        return -1;
+    }
+
+    while (offset > 0) {
+        read = offset > sizeof(buffer) ? sizeof(buffer) : offset;
+        if ((read = fread(buffer, 1, read, fp)) <= 0)
+            return -1;
+        offset -= read;
+    }
+
+    return 0;
+}
+
+
+FILE   *
+init_outfile(char *outPath, int decode)
+{
+    FILE   *outf;
+
+    /* open the output file */
+    if (0 == strcmp(outPath, "-"))
+        lame_set_stream_binary_mode(outf = stdout);
+    else 
+        if ((outf = fopen(outPath, "wb+")) == NULL)
+            return NULL;
+    return outf;
+}
+
+void
+init_infile(lame_global_flags * gfp, char *inPath)
+{
+    /* open the input file */
+    count_samples_carefully = 0;
+    pcmbitwidth = 16;
+    musicin = OpenSndFile(gfp, inPath);
+}
+
+void
+close_infile(void)
+{
+    CloseSndFile(input_format, musicin);
+}
+
+
+void
+SwapBytesInWords(short *ptr, int short_words)
+{                       /* Some speedy code */
+    unsigned long val;
+    unsigned long *p = (unsigned long *) ptr;
+
+#ifndef lint
+# if defined(CHAR_BIT)
+#  if CHAR_BIT != 8
+#   error CHAR_BIT != 8
+#  endif
+# else
+#  error can not determine number of bits in a char
+# endif
+#endif /* lint */
+
+    assert(sizeof(short) == 2);
+
+
+#if defined(SIZEOF_UNSIGNED_LONG) && SIZEOF_UNSIGNED_LONG == 4
+    for (; short_words >= 2; short_words -= 2, p++) {
+        val = *p;
+        *p = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0x00FF00FF);
+    }
+    ptr = (short *) p;
+    for (; short_words >= 1; short_words -= 1, ptr++) {
+        val = *ptr;
+        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
+    }
+#elif defined(SIZEOF_UNSIGNED_LONG) && SIZEOF_UNSIGNED_LONG == 8
+    for (; short_words >= 4; short_words -= 4, p++) {
+        val = *p;
+        *p =
+            ((val << 8) & 0xFF00FF00FF00FF00) | ((val >> 8) &
+                                                 0x00FF00FF00FF00FF);
+    }
+    ptr = (short *) p;
+    for (; short_words >= 1; short_words -= 1, ptr++) {
+        val = *ptr;
+        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
+    }
+#else
+# ifdef SIZEOF_UNSIGNED_LONG
+//#  warning Using unoptimized SwapBytesInWords().
+# endif
+    for (; short_words >= 1; short_words -= 1, ptr++) {
+        val = *ptr;
+        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
+    }
+#endif
+
+    assert(short_words == 0);
+}
+
+
+/************************************************************************
+*
+* get_audio()
+*
+* PURPOSE:  reads a frame of audio data from a file to the buffer,
+*   aligns the data for future processing, and separates the
+*   left and right channels
+*
+************************************************************************/
+int
+get_audio(lame_global_flags * const gfp, short buffer[2][1152])
+{
+    int     num_channels = lame_get_num_channels( gfp );
+    short   insamp[2 * 1152];
+    int     samples_read;
+    int     framesize;
+    int     samples_to_read;
+    unsigned int remaining, tmp_num_samples;
+    int     j;
+    short  *p;
+
+    /* 
+     * NOTE: LAME can now handle arbritray size input data packets,
+     * so there is no reason to read the input data in chuncks of
+     * size "gfp->framesize".  EXCEPT:  the LAME graphical frame analyzer 
+     * will get out of sync if we read more than framesize worth of data.
+     */
+
+    samples_to_read = framesize = gfp->framesize;
+    assert(framesize <= 1152);
+
+    /* get num_samples */
+    tmp_num_samples = lame_get_num_samples( gfp );
+
+    /* if this flag has been set, then we are carefull to read
+     * exactly num_samples and no more.  This is useful for .wav and .aiff
+     * files which have id3 or other tags at the end.  Note that if you
+     * are using LIBSNDFILE, this is not necessary 
+     */
+    if (count_samples_carefully) {
+        remaining = tmp_num_samples - Min(tmp_num_samples, num_samples_read);
+        if (remaining < framesize)
+            samples_to_read = remaining;
+    }
+
+    switch (input_format) {
+    case sf_mp1:
+    case sf_mp2:
+    case sf_mp3:
+        samples_read = read_samples_mp3(gfp, musicin, buffer, num_channels);
+        break;
+    case sf_ogg:
+        samples_read = read_samples_ogg(gfp, musicin, buffer, num_channels);
+        break;
+    default:
+        samples_read =
+            read_samples_pcm(musicin, insamp, num_channels * framesize,
+                             num_channels * samples_to_read);
+        samples_read /= num_channels;
+
+        p = insamp;
+        switch (num_channels) {
+        case 1:
+            for (j = 0; j < framesize; j++) {
+                buffer[0][j] = *p++;
+                buffer[1][j] = 0;
+            }
+            break;
+        case 2:
+            for (j = 0; j < framesize; j++) {
+                buffer[0][j] = *p++;
+                buffer[1][j] = *p++;
+            }
+            break;
+        default:
+            assert(0);
+            break;
+        }
+    }
+
+    /* if num_samples = MAX_U_32_NUM, then it is considered infinitely long.
+       Don't count the samples */
+    if ( tmp_num_samples != MAX_U_32_NUM )
+        num_samples_read += samples_read;
+
+    return samples_read;
+}
+
+
+
+
+
+
+int
+read_samples_ogg(lame_global_flags * const gfp,
+                 FILE * const musicin,
+                 short int oggpcm[2][1152], const int stereo)
+{
+    int     out = 0;
+
+#ifdef HAVE_VORBIS
+    static const char type_name[] = "Ogg Vorbis file";
+
+    out =
+        lame_decode_ogg_fromfile( gfp,
+                                  musicin,
+                                  oggpcm[0],
+                                  oggpcm[1],
+                                  &mp3input_data );
+    /*
+     * out < 0:  error, probably EOF
+     * out = 0:  not possible with lame_decode_fromfile() ???
+     * out > 0:  number of output samples
+     */
+
+    if (out < 0) {
+        memset(oggpcm, 0, sizeof(**oggpcm) * 2 * 1152);
+        return 0;
+    }
+
+    if (lame_get_num_channels( gfp ) != mp3input_data.stereo)
+        fprintf(stderr,
+                "Error: number of channels has changed in %s - not supported\n",
+                type_name);
+    if ( lame_get_in_samplerate( gfp ) != mp3input_data.samplerate )
+        fprintf(stderr,
+                "Error: sample frequency has changed in %s - not supported\n",
+                type_name);
+
+#else
+    out = -1;           /* wanna read ogg without vorbis support? */
+#endif
+
+    return out;
+}
+
+
+int
+read_samples_mp3(lame_global_flags * const gfp,
+                 FILE * const musicin, short int mpg123pcm[2][1152], int stereo)
+{
+    int     out;
+#if defined(AMIGA_MPEGA)  ||  defined(HAVE_MPGLIB)
+    static const char type_name[] = "MP3 file";
+
+    out =
+        lame_decode_fromfile(musicin, mpg123pcm[0], mpg123pcm[1],
+                             &mp3input_data);
+    /*
+     * out < 0:  error, probably EOF
+     * out = 0:  not possible with lame_decode_fromfile() ???
+     * out > 0:  number of output samples
+     */
+
+    if (out < 0) {
+        memset(mpg123pcm, 0, sizeof(**mpg123pcm) * 2 * 1152);
+        return 0;
+    }
+
+    if ( lame_get_num_channels( gfp ) != mp3input_data.stereo )
+        fprintf(stderr,
+                "Error: number of channels has changed in %s - not supported\n",
+                type_name);
+    if ( lame_get_in_samplerate( gfp ) != mp3input_data.samplerate )
+        fprintf(stderr,
+                "Error: sample frequency has changed in %s - not supported\n",
+                type_name);
+
+#else
+    out = -1;
+#endif
+    return out;
+}
+
+
+static int
+WriteWaveHeader(FILE * const fp, const int pcmbytes,
+                const int freq, const int channels, const int bits)
+{
+    int     bytes = (bits + 7) / 8;
+
+    /* quick and dirty, but documented */
+    fwrite("RIFF", 1, 4, fp); // label
+    Write32BitsLowHigh(fp, pcmbytes + 44 - 8); // length in bytes without header
+    fwrite("WAVEfmt ", 2, 4, fp); // 2 labels
+    Write32BitsLowHigh(fp, 2 + 2 + 4 + 4 + 2 + 2); // length of PCM format declaration area
+    Write16BitsLowHigh(fp, 1); // is PCM?
+    Write16BitsLowHigh(fp, channels); // number of channels
+    Write32BitsLowHigh(fp, freq); // sample frequency in [Hz]
+    Write32BitsLowHigh(fp, freq * channels * bytes); // bytes per second
+    Write16BitsLowHigh(fp, channels * bytes); // bytes per sample time
+    Write16BitsLowHigh(fp, bits); // bits per sample
+    fwrite("data", 1, 4, fp); // label
+    Write32BitsLowHigh(fp, pcmbytes); // length in bytes of raw PCM data
+
+    return ferror(fp) ? -1 : 0;
+}
+
+/* the simple lame decoder */
+/* After calling lame_init(), lame_init_params() and
+ * init_infile(), call this routine to read the input MP3 file
+ * and output .wav data to the specified file pointer*/
+/* lame_decoder will ignore the first 528 samples, since these samples
+ * represent the mpglib delay (and are all 0).  skip = number of additional
+ * samples to skip, to (for example) compensate for the encoder delay */
+
+int
+lame_decoder(lame_global_flags * gfp, FILE * outf, int skip, char *inPath,
+             char *outPath)
+{
+    short int Buffer[2][1152];
+    int     iread;
+    double  wavsize;
+    int     i;
+    void    (*WriteFunction) (FILE * fp, char *p, int n);
+    int tmp_num_channels = lame_get_num_channels( gfp );
+
+
+
+    fprintf(stderr, "\rinput:  %s%s(%g kHz, %i channel%s, ",
+            strcmp(inPath, "-") ? inPath : "<stdin>",
+            strlen(inPath) > 26 ? "\n\t" : "  ",
+            lame_get_in_samplerate( gfp ) / 1.e3,
+            tmp_num_channels, tmp_num_channels != 1 ? "s" : "");
+
+    switch (input_format) {
+    case sf_mp3:
+        skip += 528 + 1; /* mp3 decoder has a 528 sample delay, plus user supplied "skip" */
+        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
+                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "III");
+        break;
+    case sf_mp2:
+        skip += 240 + 1;
+        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
+                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "II");
+        break;
+    case sf_mp1:
+        skip += 240 + 1;
+        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
+                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "I");
+        break;
+    case sf_ogg:
+        fprintf(stderr, "Ogg Vorbis");
+        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
+        break;
+    case sf_raw:
+        fprintf(stderr, "raw PCM data");
+        mp3input_data.nsamp = lame_get_num_samples( gfp );
+        mp3input_data.framesize = 1152;
+        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
+        break;
+    case sf_wave:
+        fprintf(stderr, "Microsoft WAVE");
+        mp3input_data.nsamp = lame_get_num_samples( gfp );
+        mp3input_data.framesize = 1152;
+        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
+        break;
+    case sf_aiff:
+        fprintf(stderr, "SGI/Apple AIFF");
+        mp3input_data.nsamp = lame_get_num_samples( gfp );
+        mp3input_data.framesize = 1152;
+        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
+        break;
+    default:
+        fprintf(stderr, "unknown");
+        mp3input_data.nsamp = lame_get_num_samples( gfp );
+        mp3input_data.framesize = 1152;
+        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
+        assert(0);
+        break;
+    }
+
+    fprintf(stderr, ")\noutput: %s%s(16 bit, Microsoft WAVE)\n",
+            strcmp(outPath, "-") ? outPath : "<stdout>",
+            strlen(outPath) > 45 ? "\n\t" : "  ");
+
+    if (skip > 0)
+        fprintf(stderr, "skipping initial %i samples (encoder+decoder delay)\n",
+                skip);
+
+    if ( 0 == lame_get_disable_waveheader( gfp ) )
+        WriteWaveHeader(outf, 0x7FFFFFFF, lame_get_in_samplerate( gfp ),
+                        tmp_num_channels,
+                        16);
+    /* unknown size, so write maximum 32 bit signed value */
+
+    wavsize = -skip;
+    WriteFunction = swapbytes ? WriteBytesSwapped : WriteBytes;
+    mp3input_data.totalframes = mp3input_data.nsamp / mp3input_data.framesize;
+
+    assert(tmp_num_channels >= 1 && tmp_num_channels <= 2);
+
+    do {
+        iread = get_audio(gfp, Buffer); /* read in 'iread' samples */
+        mp3input_data.framenum += iread / mp3input_data.framesize;
+        wavsize += iread;
+
+        if (!silent)
+            decoder_progress(gfp, &mp3input_data);
+
+        skip -= (i = skip < iread ? skip : iread); /* 'i' samples are to skip in this frame */
+
+        for (; i < iread; i++) {
+            if ( lame_get_disable_waveheader( gfp ) ) {
+                WriteFunction(outf, (char *) Buffer[0] + i, sizeof(short));
+                if (tmp_num_channels == 2)
+                    WriteFunction(outf, (char *) Buffer[1] + i, sizeof(short));
+            }
+            else {
+                Write16BitsLowHigh(outf, Buffer[0][i]);
+                if (tmp_num_channels == 2)
+                    Write16BitsLowHigh(outf, Buffer[1][i]);
+            }
+        }
+    } while (iread);
+
+    i = (16 / 8) * tmp_num_channels;
+    assert(i > 0);
+    if (wavsize <= 0) {
+        fprintf(stderr, "WAVE file contains 0 PCM samples\n");
+        wavsize = 0;
+    }
+    else if (wavsize > 0xFFFFFFD0 / i) {
+        fprintf(stderr,
+                "Very huge WAVE file, can't set filesize accordingly\n");
+        wavsize = 0xFFFFFFD0;
+    }
+    else {
+        wavsize *= i;
+    }
+
+    if ( 0 == lame_get_disable_waveheader( gfp ) )
+        if (!fseek(outf, 0l, SEEK_SET)) /* if outf is seekable, rewind and adjust length */
+            WriteWaveHeader(outf, wavsize, lame_get_in_samplerate( gfp ),
+                            tmp_num_channels, 16);
+    fclose(outf);
+
+    decoder_progress_finish(gfp);
+    return 0;
+}
+
+
+
+
+
+
+#if defined(LIBSNDFILE)
+
+#if 0                   /* currently disabled */
+# include "sndfile.h"   // prototype for sf_get_lib_version()
+void
+print_sndlib_version(FILE * fp)
+{
+    char    tmp[80];
+    sf_get_lib_version(tmp, sizeof(tmp));
+    fprintf(fp,
+            "Input handled by %s  (http://www.zip.com.au/~erikd/libsndfile/)\n",
+            tmp);
+}
+#endif
+
+/*
+** Copyright (C) 1999 Albert Faber
+**
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+
+
+
+
+void
+CloseSndFile(sound_file_format input, FILE * musicin)
+{
+    SNDFILE *gs_pSndFileIn = (SNDFILE *) musicin;
+    if (input == sf_mp1 || input == sf_mp2 || input == sf_mp3) {
+#ifndef AMIGA_MPEGA
+        if (fclose(musicin) != 0) {
+            fprintf(stderr, "Could not close audio input file\n");
+            exit(2);
+        }
+#endif
+    }
+    else {
+        if (gs_pSndFileIn) {
+            if (sf_close(gs_pSndFileIn) != 0) {
+                fprintf(stderr, "Could not close sound file \n");
+                exit(2);
+            }
+        }
+    }
+}
+
+
+
+FILE   *
+OpenSndFile(lame_global_flags * gfp, char *inPath)
+{
+    char   *lpszFileName = inPath;
+    FILE   *musicin;
+    SNDFILE *gs_pSndFileIn;
+    SF_INFO gs_wfInfo;
+
+    if (input_format == sf_mp1 ||
+        input_format == sf_mp2 || input_format == sf_mp3) {
+#ifdef AMIGA_MPEGA
+        if (-1 == lame_decode_initfile(lpszFileName, &mp3input_data)) {
+            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
+                    lpszFileName);
+            exit(1);
+        }
+#endif
+#ifdef HAVE_MPGLIB
+        if ((musicin = fopen(lpszFileName, "rb")) == NULL) {
+            fprintf(stderr, "Could not find \"%s\".\n", lpszFileName);
+            exit(1);
+        }
+        if (-1 == lame_decode_initfile(musicin, &mp3input_data)) {
+            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
+                    lpszFileName);
+            exit(1);
+        }
+#endif
+
+        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     mp3input_data.stereo );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
+        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
+    }
+    else if (input_format == sf_ogg) {
+#ifdef HAVE_VORBIS
+        if ((musicin = fopen(lpszFileName, "rb")) == NULL) {
+            fprintf(stderr, "Could not find \"%s\".\n", lpszFileName);
+            exit(1);
+        }
+        if ( -1 == lame_decode_ogg_initfile( gfp,
+                                             musicin,
+                                             &mp3input_data ) ) {
+            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
+                    lpszFileName);
+            exit(1);
+        }
+#else
+        fprintf(stderr, "mp3enc not compiled with libvorbis support.\n");
+        exit(1);
+#endif
+
+
+    }
+    else {
+
+        /* Try to open the sound file */
+        /* set some defaults incase input is raw PCM */
+        gs_wfInfo.seekable = (input_format != sf_raw); /* if user specified -r, set to not seekable */
+        gs_wfInfo.samplerate = lame_get_in_samplerate( gfp );
+        gs_wfInfo.pcmbitwidth = 16;
+        gs_wfInfo.channels = lame_get_num_channels( gfp );
+#ifndef WORDS_BIGENDIAN
+        /* little endian */
+        if (swapbytes)
+            gs_wfInfo.format = SF_FORMAT_RAW_BE;
+        else
+            gs_wfInfo.format = SF_FORMAT_RAW_LE;
+#else
+        if (swapbytes)
+            gs_wfInfo.format = SF_FORMAT_RAW_LE;
+        else
+            gs_wfInfo.format = SF_FORMAT_RAW_BE;
+#endif
+
+        gs_pSndFileIn = sf_open_read(lpszFileName, &gs_wfInfo);
+        musicin = (SNDFILE *) gs_pSndFileIn;
+
+        /* Check result */
+        if (gs_pSndFileIn == NULL) {
+            sf_perror(gs_pSndFileIn);
+            fprintf(stderr, "Could not open sound file \"%s\".\n",
+                    lpszFileName);
+            exit(1);
+        }
+
+        if ((gs_wfInfo.format == SF_FORMAT_RAW_LE) ||
+            (gs_wfInfo.format == SF_FORMAT_RAW_BE)) input_format = sf_raw;
+
+#ifdef _DEBUG_SND_FILE
+        DEBUGF("\n\nSF_INFO structure\n");
+        DEBUGF("samplerate        :%d\n", gs_wfInfo.samplerate);
+        DEBUGF("samples           :%d\n", gs_wfInfo.samples);
+        DEBUGF("channels          :%d\n", gs_wfInfo.channels);
+        DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
+        DEBUGF("format            :");
+
+        /* new formats from [email protected]  1/2000 */
+
+        switch (gs_wfInfo.format & SF_FORMAT_TYPEMASK) {
+        case SF_FORMAT_WAV:
+            DEBUGF("Microsoft WAV format (big endian). ");
+            break;
+        case SF_FORMAT_AIFF:
+            DEBUGF("Apple/SGI AIFF format (little endian). ");
+            break;
+        case SF_FORMAT_AU:
+            DEBUGF("Sun/NeXT AU format (big endian). ");
+            break;
+        case SF_FORMAT_AULE:
+            DEBUGF("DEC AU format (little endian). ");
+            break;
+        case SF_FORMAT_RAW:
+            DEBUGF("RAW PCM data. ");
+            break;
+        case SF_FORMAT_PAF:
+            DEBUGF("Ensoniq PARIS file format. ");
+            break;
+        case SF_FORMAT_SVX:
+            DEBUGF("Amiga IFF / SVX8 / SV16 format. ");
+            break;
+        case SF_FORMAT_NIST:
+            DEBUGF("Sphere NIST format. ");
+            break;
+        default:
+            assert(0);
+            break;
+        }
+
+        switch (gs_wfInfo.format & SF_FORMAT_SUBMASK) {
+        case SF_FORMAT_PCM:
+            DEBUGF("PCM data in 8, 16, 24 or 32 bits.");
+            break;
+        case SF_FORMAT_FLOAT:
+            DEBUGF("32 bit Intel x86 floats.");
+            break;
+        case SF_FORMAT_ULAW:
+            DEBUGF("U-Law encoded.");
+            break;
+        case SF_FORMAT_ALAW:
+            DEBUGF("A-Law encoded.");
+            break;
+        case SF_FORMAT_IMA_ADPCM:
+            DEBUGF("IMA ADPCM.");
+            break;
+        case SF_FORMAT_MS_ADPCM:
+            DEBUGF("Microsoft ADPCM.");
+            break;
+        case SF_FORMAT_PCM_BE:
+            DEBUGF("Big endian PCM data.");
+            break;
+        case SF_FORMAT_PCM_LE:
+            DEBUGF("Little endian PCM data.");
+            break;
+        case SF_FORMAT_PCM_S8:
+            DEBUGF("Signed 8 bit PCM.");
+            break;
+        case SF_FORMAT_PCM_U8:
+            DEBUGF("Unsigned 8 bit PCM.");
+            break;
+        case SF_FORMAT_SVX_FIB:
+            DEBUGF("SVX Fibonacci Delta encoding.");
+            break;
+        case SF_FORMAT_SVX_EXP:
+            DEBUGF("SVX Exponential Delta encoding.");
+            break;
+        default:
+            assert(0);
+            break;
+        }
+
+        DEBUGF("\n");
+        DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
+        DEBUGF("sections          :%d\n", gs_wfInfo.sections);
+        DEBUGF("seekable          :\n", gs_wfInfo.seekable);
+#endif
+
+        (void) lame_set_num_samples( gfp, gs_wfInfo.samples );
+        if( -1 == lame_set_num_channels( gfp, gs_wfInfo.channels ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     gs_wfInfo.channels );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, gs_wfInfo.samplerate );
+        pcmbitwidth = gs_wfInfo.pcmbitwidth;
+    }
+
+    if (lame_get_num_samples( gfp ) == MAX_U_32_NUM) {
+        /* try to figure out num_samples */
+        double  flen = lame_get_file_size( lpszFileName );
+
+        if (flen >= 0) {
+            /* try file size, assume 2 bytes per sample */
+            if (input_format == sf_mp1 ||
+                input_format == sf_mp2 || input_format == sf_mp3) {
+                double  totalseconds =
+                    (flen * 8.0 / (1000.0 * mp3input_data.bitrate));
+                unsigned long tmp_num_samples =
+                    totalseconds * lame_get_in_samplerate( gfp );
+
+                (void) lame_set_num_samples( gfp, tmp_num_samples );
+                mp3input_data.nsamp = tmp_num_samples;
+            }
+            else {
+                lame_set_num_samples( gfp,
+                    flen / (2 * lame_get_num_channels( gfp )) );
+            }
+        }
+    }
+
+
+    return musicin;
+}
+
+
+/************************************************************************
+*
+* read_samples()
+*
+* PURPOSE:  reads the PCM samples from a file to the buffer
+*
+*  SEMANTICS:
+* Reads #samples_read# number of shorts from #musicin# filepointer
+* into #sample_buffer[]#.  Returns the number of samples read.
+*
+************************************************************************/
+
+static int
+read_samples_pcm(FILE * const musicin, short sample_buffer[2304],
+                 int frame_size /* unused */ , int samples_to_read)
+{
+    int     i;
+    int     samples_read;
+
+    samples_read =
+        sf_read_short((SNDFILE *) musicin, sample_buffer, samples_to_read);
+
+    switch (pcmbitwidth) {
+    case 8:
+        for (i = 0; i < samples_read; i++)
+            sample_buffer[i] <<= 8;
+        break;
+    case 16:
+        break;
+    default:
+        fprintf(stderr, "Only 8 and 16 bit input files supported \n");
+        exit(1);
+    }
+
+    return samples_read;
+}
+
+
+#else /* defined(LIBSNDFILE) */
+
+/************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ *
+ * OLD ISO/LAME routines follow.  Used if you dont have LIBSNDFILE
+ * or for stdin/stdout support
+ *
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************
+ ************************************************************************/
+
+
+
+/************************************************************************
+*
+* read_samples()
+*
+* PURPOSE:  reads the PCM samples from a file to the buffer
+*
+*  SEMANTICS:
+* Reads #samples_read# number of shorts from #musicin# filepointer
+* into #sample_buffer[]#.  Returns the number of samples read.
+*
+************************************************************************/
+
+int
+read_samples_pcm(FILE * musicin, short sample_buffer[2304], int frame_size,
+                 int samples_to_read)
+{
+    int     samples_read;
+    int     iswav = (input_format == sf_wave);
+
+    if (16 == pcmbitwidth) {
+        samples_read = fread(sample_buffer, 2, samples_to_read, musicin);
+    }
+    else if (8 == pcmbitwidth) {
+        char    temp[2304];
+        int     i;
+        samples_read = fread(temp, 1, samples_to_read, musicin);
+        for (i = 0; i < samples_read; ++i) {
+            /* note: 8bit .wav samples are unsigned */
+	    /* map [0,255]  -> [-32768,32767] */
+            sample_buffer[i] = ((short int)temp[i] - 128)*256 + 127;
+        }
+    }
+    else {
+        fprintf(stderr, "Only 8 and 16 bit input files supported \n");
+        exit(1);
+    }
+    if (ferror(musicin)) {
+        fprintf(stderr, "Error reading input file\n");
+        exit(1);
+    }
+
+
+
+    if (16 == pcmbitwidth) {
+        /* intel=littleEndian.  wav files are always little endian */
+#ifndef WORDS_BIGENDIAN
+        /* little endian */
+        if (!iswav)
+            SwapBytesInWords(sample_buffer, samples_read);
+#else
+        /* big endian */
+        if (iswav)
+            SwapBytesInWords(sample_buffer, samples_read);
+#endif
+
+        if (swapbytes)
+            SwapBytesInWords(sample_buffer, samples_read);
+    }
+
+    return samples_read;
+}
+
+
+
+/* AIFF Definitions */
+
+#define IFF_ID_FORM 0x464f524d /* "FORM" */
+#define IFF_ID_AIFF 0x41494646 /* "AIFF" */
+#define IFF_ID_COMM 0x434f4d4d /* "COMM" */
+#define IFF_ID_SSND 0x53534e44 /* "SSND" */
+#define IFF_ID_MPEG 0x4d504547 /* "MPEG" */
+
+
+#define WAV_ID_RIFF 0x52494646 /* "RIFF" */
+#define WAV_ID_WAVE 0x57415645 /* "WAVE" */
+#define WAV_ID_FMT  0x666d7420 /* "fmt " */
+#define WAV_ID_DATA 0x64617461 /* "data" */
+
+
+
+
+/*****************************************************************************
+ *
+ *	Read Microsoft Wave headers
+ *
+ *	By the time we get here the first 32-bits of the file have already been
+ *	read, and we're pretty sure that we're looking at a WAV file.
+ *
+ *****************************************************************************/
+
+static int
+parse_wave_header(lame_global_flags * gfp, FILE * sf)
+{
+    int     format_tag = 0;
+    int     channels = 0;
+    int     block_align = 0;
+    int     bits_per_sample = 0;
+    int     samples_per_sec = 0;
+    int     avg_bytes_per_sec = 0;
+
+
+    int     is_wav = 0;
+    long    data_length = 0, file_length, subSize = 0;
+    int     loop_sanity = 0;
+
+    file_length = Read32BitsHighLow(sf);
+
+    if (Read32BitsHighLow(sf) != WAV_ID_WAVE)
+        return 0;
+
+    for (loop_sanity = 0; loop_sanity < 20; ++loop_sanity) {
+        int     type = Read32BitsHighLow(sf);
+
+        if (type == WAV_ID_FMT) {
+            subSize = Read32BitsLowHigh(sf);
+            if (subSize < 16) {
+                /*DEBUGF(
+                   "'fmt' chunk too short (only %ld bytes)!", subSize);  */
+                return 0;
+            }
+
+            format_tag = Read16BitsLowHigh(sf);
+            subSize -= 2;
+            channels = Read16BitsLowHigh(sf);
+            subSize -= 2;
+            samples_per_sec = Read32BitsLowHigh(sf);
+            subSize -= 4;
+            avg_bytes_per_sec = Read32BitsLowHigh(sf);
+            subSize -= 4;
+            block_align = Read16BitsLowHigh(sf);
+            subSize -= 2;
+            bits_per_sample = Read16BitsLowHigh(sf);
+            subSize -= 2;
+
+            /* DEBUGF("   skipping %d bytes\n", subSize); */
+
+            if (subSize > 0) {
+                if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
+                    return 0;
+            };
+
+        }
+        else if (type == WAV_ID_DATA) {
+            subSize = Read32BitsLowHigh(sf);
+            data_length = subSize;
+            is_wav = 1;
+            /* We've found the audio data. Read no further! */
+            break;
+
+        }
+        else {
+            subSize = Read32BitsLowHigh(sf);
+            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
+                return 0;
+        }
+    }
+
+    if (format_tag != 1) {
+	return 0; /* oh no! non-supported format  */
+    }
+
+
+    if (is_wav) {
+        /* make sure the header is sane */
+        if( -1 == lame_set_num_channels( gfp, channels ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     channels );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, samples_per_sec );
+        pcmbitwidth = bits_per_sample;
+        (void) lame_set_num_samples( gfp,
+            data_length / (channels * ((bits_per_sample+7) / 8)) );
+    }
+    return is_wav;
+}
+
+
+
+/************************************************************************
+* aiff_check2
+*
+* PURPOSE:	Checks AIFF header information to make sure it is valid.
+*	        returns 0 on success, 1 on errors
+************************************************************************/
+
+int
+aiff_check2(const char *file_name, IFF_AIFF * const pcm_aiff_data)
+{
+    if (pcm_aiff_data->sampleType != IFF_ID_SSND) {
+        fprintf(stderr, "Sound data is not PCM in '%s'\n", file_name);
+        return 1;
+    }
+    if (pcm_aiff_data->sampleSize != sizeof(short) * CHAR_BIT) {
+        fprintf(stderr, "Sound data is not %i bits in '%s'\n",
+                sizeof(short) * CHAR_BIT, file_name);
+        return 1;
+    }
+    if (pcm_aiff_data->numChannels != 1 && pcm_aiff_data->numChannels != 2) {
+        fprintf(stderr, "Sound data is not mono or stereo in '%s'\n",
+                file_name);
+        return 1;
+    }
+    if (pcm_aiff_data->blkAlgn.blockSize != 0) {
+        fprintf(stderr, "Block size is not 0 bytes in '%s'\n", file_name);
+        return 1;
+    }
+    if (pcm_aiff_data->blkAlgn.offset != 0) {
+        fprintf(stderr, "Block offset is not 0 bytes in '%s'\n", file_name);
+        return 1;
+    }
+
+    return 0;
+}
+
+/*****************************************************************************
+ *
+ *	Read Audio Interchange File Format (AIFF) headers.
+ *
+ *	By the time we get here the first 32 bits of the file have already been
+ *	read, and we're pretty sure that we're looking at an AIFF file.
+ *
+ *****************************************************************************/
+
+static int
+parse_aiff_header(lame_global_flags * gfp, FILE * sf)
+{
+    int     is_aiff = 0;
+    long    chunkSize = 0, subSize = 0;
+    IFF_AIFF aiff_info;
+
+    memset(&aiff_info, 0, sizeof(aiff_info));
+    chunkSize = Read32BitsHighLow(sf);
+
+    if (Read32BitsHighLow(sf) != IFF_ID_AIFF)
+        return 0;
+
+    while (chunkSize > 0) {
+        int     type = Read32BitsHighLow(sf);
+        chunkSize -= 4;
+
+        /* DEBUGF(
+           "found chunk type %08x '%4.4s'\n", type, (char*)&type); */
+
+        /* don't use a switch here to make it easier to use 'break' for SSND */
+        if (type == IFF_ID_COMM) {
+            subSize = Read32BitsHighLow(sf);
+            chunkSize -= subSize;
+
+            aiff_info.numChannels = Read16BitsHighLow(sf);
+            subSize -= 2;
+            aiff_info.numSampleFrames = Read32BitsHighLow(sf);
+            subSize -= 4;
+            aiff_info.sampleSize = Read16BitsHighLow(sf);
+            subSize -= 2;
+            aiff_info.sampleRate = ReadIeeeExtendedHighLow(sf);
+            subSize -= 10;
+
+            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
+                return 0;
+
+        }
+        else if (type == IFF_ID_SSND) {
+            subSize = Read32BitsHighLow(sf);
+            chunkSize -= subSize;
+
+            aiff_info.blkAlgn.offset = Read32BitsHighLow(sf);
+            subSize -= 4;
+            aiff_info.blkAlgn.blockSize = Read32BitsHighLow(sf);
+            subSize -= 4;
+
+            if (fskip(sf, (long) aiff_info.blkAlgn.offset, SEEK_CUR) != 0)
+                return 0;
+
+            aiff_info.sampleType = IFF_ID_SSND;
+            is_aiff = 1;
+
+            /* We've found the audio data. Read no further! */
+            break;
+
+        }
+        else {
+            subSize = Read32BitsHighLow(sf);
+            chunkSize -= subSize;
+
+            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
+                return 0;
+        }
+    }
+
+    /* DEBUGF("Parsed AIFF %d\n", is_aiff); */
+    if (is_aiff) {
+        /* make sure the header is sane */
+        if (0 != aiff_check2("name" /*???????????? */ , &aiff_info))
+            return 0;
+        if( -1 == lame_set_num_channels( gfp, aiff_info.numChannels ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     aiff_info.numChannels );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, aiff_info.sampleRate );
+        pcmbitwidth = aiff_info.sampleSize;
+        (void) lame_set_num_samples( gfp, aiff_info.numSampleFrames );
+    }
+    return is_aiff;
+}
+
+
+
+/************************************************************************
+*
+* parse_file_header
+*
+* PURPOSE: Read the header from a bytestream.  Try to determine whether
+*		   it's a WAV file or AIFF without rewinding, since rewind
+*		   doesn't work on pipes and there's a good chance we're reading
+*		   from stdin (otherwise we'd probably be using libsndfile).
+*
+* When this function returns, the file offset will be positioned at the
+* beginning of the sound data.
+*
+************************************************************************/
+
+void
+parse_file_header(lame_global_flags * gfp, FILE * sf)
+{
+
+    int     type = Read32BitsHighLow(sf);
+    /*
+       DEBUGF(
+       "First word of input stream: %08x '%4.4s'\n", type, (char*) &type); 
+     */
+    count_samples_carefully = 0;
+    input_format = sf_raw;
+
+    if (type == WAV_ID_RIFF) {
+        /* It's probably a WAV file */
+        if (parse_wave_header(gfp, sf)) {
+            input_format = sf_wave;
+            count_samples_carefully = 1;
+        } else {
+	    fprintf( stderr, "Warning: corrupt or unsupported WAVE format\n"); 
+        }
+    }
+    else if (type == IFF_ID_FORM) {
+        /* It's probably an AIFF file */
+        if (parse_aiff_header(gfp, sf)) {
+            input_format = sf_aiff;
+            count_samples_carefully = 1;
+        }
+    }
+    if (input_format == sf_raw) {
+        /*
+           ** Assume it's raw PCM.  Since the audio data is assumed to begin
+           ** at byte zero, this will unfortunately require seeking.
+         */
+        if (fseek(sf, 0L, SEEK_SET) != 0) {
+            /* ignore errors */
+        }
+        input_format = sf_raw;
+    }
+}
+
+
+
+void
+CloseSndFile(sound_file_format input, FILE * musicin)
+{
+    if (fclose(musicin) != 0) {
+        fprintf(stderr, "Could not close audio input file\n");
+        exit(2);
+    }
+}
+
+
+
+
+
+FILE   *
+OpenSndFile(lame_global_flags * gfp, char *inPath)
+{
+    FILE   *musicin;
+
+    /* set the defaults from info incase we cannot determine them from file */
+    lame_set_num_samples( gfp, MAX_U_32_NUM );
+
+
+    if (!strcmp(inPath, "-")) {
+        lame_set_stream_binary_mode(musicin = stdin); /* Read from standard input. */
+    }
+    else {
+        if ((musicin = fopen(inPath, "rb")) == NULL) {
+            fprintf(stderr, "Could not find \"%s\".\n", inPath);
+            exit(1);
+        }
+    }
+
+    if (input_format == sf_mp1 ||
+        input_format == sf_mp2 || input_format == sf_mp3) {
+#ifdef AMIGA_MPEGA
+        if (-1 == lame_decode_initfile(inPath, &mp3input_data)) {
+            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
+                    inPath);
+            exit(1);
+        }
+#endif
+#ifdef HAVE_MPGLIB
+        if (-1 == lame_decode_initfile(musicin, &mp3input_data)) {
+            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
+                    inPath);
+            exit(1);
+        }
+#endif
+        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     mp3input_data.stereo );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
+        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
+    }
+    else if (input_format == sf_ogg) {
+#ifdef HAVE_VORBIS
+        if ( -1 == lame_decode_ogg_initfile( gfp,
+                                             musicin,
+                                             &mp3input_data ) ) {
+            fprintf(stderr, "Error reading headers in ogg input file %s.\n",
+                    inPath);
+            exit(1);
+        }
+        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
+            fprintf( stderr,
+                     "Unsupported number of channels: %ud\n",
+                     mp3input_data.stereo );
+            exit( 1 );
+        }
+        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
+        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
+#else
+        fprintf(stderr, "mp3enc not compiled with libvorbis support.\n");
+        exit(1);
+#endif
+    }
+    else {
+        if (input_format != sf_raw) {
+            parse_file_header(gfp, musicin);
+        }
+
+        if (0 && input_format == sf_raw) {
+		fprintf(stderr, "Assuming raw pcm input file");
+		if (swapbytes)
+			fprintf(stderr, " : Forcing byte-swapping\n");
+		else
+			fprintf(stderr, "\n");
+	}
+    }
+
+
+    if (lame_get_num_samples( gfp ) == MAX_U_32_NUM && musicin != stdin) {
+        double  flen = lame_get_file_size(inPath); /* try to figure out num_samples */
+
+        if (flen >= 0) {
+
+            /* try file size, assume 2 bytes per sample */
+            if (input_format == sf_mp1 ||
+                input_format == sf_mp2 || input_format == sf_mp3) {
+                if (mp3input_data.bitrate > 0) {
+                    double  totalseconds =
+                        (flen * 8.0 / (1000.0 * mp3input_data.bitrate));
+                    unsigned long tmp_num_samples =
+                        totalseconds * lame_get_in_samplerate( gfp );
+
+                    (void) lame_set_num_samples( gfp, tmp_num_samples );
+                    mp3input_data.nsamp = tmp_num_samples;
+                }
+            }
+            else {
+                (void) lame_set_num_samples( gfp,
+                    flen / (2 * lame_get_num_channels( gfp )) );
+            }
+        }
+    }
+    return musicin;
+}
+#endif /* defined(LIBSNDFILE) */
+
+
+
+
+
+#if defined(HAVE_MPGLIB)
+static int
+check_aid(const unsigned char *header)
+{
+    return 0 == strncmp(header, "AiD\1", 4);
+}
+
+/*
+ * Please check this and don't kill me if there's a bug
+ * This is a (nearly?) complete header analysis for a MPEG-1/2/2.5 Layer I, II or III
+ * data stream
+ */
+
+static int
+is_syncword_mp123(const void *const headerptr)
+{
+    const unsigned char *const p = headerptr;
+    static const char abl2[16] =
+        { 0, 7, 7, 7, 0, 7, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8 };
+
+    if ((p[0] & 0xFF) != 0xFF)
+        return 0;       // first 8 bits must be '1'
+    if ((p[1] & 0xE0) != 0xE0)
+        return 0;       // next 3 bits are also
+    if ((p[1] & 0x18) == 0x08)
+        return 0;       // no MPEG-1, -2 or -2.5
+    if ((p[1] & 0x06) == 0x00)
+        return 0;       // no Layer I, II and III
+    if ((p[2] & 0xF0) == 0xF0)
+        return 0;       // bad bitrate
+    if ((p[2] & 0x0C) == 0x0C)
+        return 0;       // no sample frequency with (32,44.1,48)/(1,2,4)    
+    if ((p[1] & 0x06) == 0x04) // illegal Layer II bitrate/Channel Mode comb
+        if (abl2[p[2] >> 4] & (1 << (p[3] >> 6)))
+            return 0;
+    return 1;
+}
+
+static int
+is_syncword_mp3(const void *const headerptr)
+{
+    const unsigned char *const p = headerptr;
+
+    if ((p[0] & 0xFF) != 0xFF)
+        return 0;       // first 8 bits must be '1'
+    if ((p[1] & 0xE0) != 0xE0)
+        return 0;       // next 3 bits are also
+    if ((p[1] & 0x18) == 0x08)
+        return 0;       // no MPEG-1, -2 or -2.5
+    if ((p[1] & 0x06) != 0x02)
+        return 0;       // no Layer III (can be merged with 'next 3 bits are also' test, but don't do this, this decreases readability)
+    if ((p[2] & 0xF0) == 0xF0)
+        return 0;       // bad bitrate
+    if ((p[2] & 0x0C) == 0x0C)
+        return 0;       // no sample frequency with (32,44.1,48)/(1,2,4)    
+    return 1;
+}
+
+
+int
+lame_decode_initfile(FILE * fd, mp3data_struct * mp3data)
+{
+    //  VBRTAGDATA pTagData;
+    // int xing_header,len2,num_frames;
+    unsigned char buf[100];
+    int     ret;
+    int     len, aid_header;
+    short int pcm_l[1152], pcm_r[1152];
+
+    memset(mp3data, 0, sizeof(mp3data_struct));
+    lame_decode_init();
+
+    len = 4;
+    if (fread(&buf, 1, len, fd) != len)
+        return -1;      /* failed */
+    aid_header = check_aid(buf);
+    if (aid_header) {
+        if (fread(&buf, 1, 2, fd) != 2)
+            return -1;  /* failed */
+        aid_header = (unsigned char) buf[0] + 256 * (unsigned char) buf[1];
+        fprintf(stderr, "Album ID found.  length=%i \n", aid_header);
+        /* skip rest of AID, except for 6 bytes we have already read */
+        fskip(fd, aid_header - 6, SEEK_CUR);
+
+        /* read 4 more bytes to set up buffer for MP3 header check */
+        len = fread(&buf, 1, 4, fd);
+    }
+
+
+    /* look for valid 4 byte MPEG header  */
+    if (len < 4)
+        return -1;
+    while (!is_syncword_mp123(buf)) {
+        int     i;
+        for (i = 0; i < len - 1; i++)
+            buf[i] = buf[i + 1];
+        if (fread(buf + len - 1, 1, 1, fd) != 1)
+            return -1;  /* failed */
+    }
+
+
+#if 0
+    /* buffer 48 bytes so we can check for Xing header */
+    len2 = fread(&buf[len], 1, 48 - len, fd);
+    if (len2 != 48 - len)
+        return -1;
+    len = 48;
+
+    /* check first 48 bytes for Xing header */
+    xing_header = GetVbrTag(&pTagData, (unsigned char *) buf);
+
+    if (xing_header && pTagData.headersize >= 48) {
+        num_frames = pTagData.frames;
+        fprintf(stderr,
+                "\rXing VBR header dectected.  MP3 file has %i frames\n",
+                num_frames);
+
+        // skip the rest of the Xing header.  LAME decoder ignores TOC data    
+        fskip(fd, pTagData.headersize - 48, SEEK_CUR);
+        // buffer a few more bytes for next header check:  
+        len = fread(buf, 1, 4, fd);
+
+    }
+    else {
+        /* we have read 48 bytes, but did not find a Xing header */
+        /* lets try and rewind the stream:  */
+        if (fseek(fd, -44, SEEK_CUR) != 0) {
+            /* backwards fseek failed.  input is probably a pipe */
+            /* keep 'len' unchanged */
+        }
+        else {
+            len -= 44;
+        }
+    }
+#endif
+
+    // now parse the current buffer looking for MP3 headers 
+    // we dont want to feed too much data to lame_decode1_headers -  
+    // we dont want it to actually decode the first frame
+    // (as of 11/00: mpglib modified so that for the first frame where 
+    // headers are parsed, no data will be decoded.  So the above is
+    // now a moot point.
+    ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
+    if (-1 == ret)
+        return -1;
+
+    /* repeat until we decode a valid mp3 header */
+    while (!mp3data->header_parsed) {
+        len = fread(buf, 1, sizeof(buf), fd);
+        if (len != sizeof(buf))
+            return -1;
+        ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
+        if (-1 == ret)
+            return -1;
+    }
+
+
+#if 1
+    if (mp3data->totalframes > 0) {
+        /* mpglib found a Xing VBR header and computed nsamp & totalframes */
+    }
+    else {
+        mp3data->nsamp = MAX_U_32_NUM;
+    }
+#else
+    mp3data->nsamp = MAX_U_32_NUM;
+    if (xing_header && num_frames) {
+        mp3data->nsamp = mp3data->framesize * num_frames;
+    }
+#endif
+
+
+    /*
+       fprintf(stderr,"ret = %i NEED_MORE=%i \n",ret,MP3_NEED_MORE);
+       fprintf(stderr,"stereo = %i \n",mp.fr.stereo);
+       fprintf(stderr,"samp = %i  \n",freqs[mp.fr.sampling_frequency]);
+       fprintf(stderr,"framesize = %i  \n",framesize);
+       fprintf(stderr,"bitrate = %i  \n",mp3data->bitrate);
+       fprintf(stderr,"num frames = %ui  \n",num_frames);
+       fprintf(stderr,"num samp = %ui  \n",mp3data->nsamp);
+       fprintf(stderr,"mode     = %i  \n",mp.fr.mode);
+     */
+
+    return 0;
+}
+
+/*
+For lame_decode_fromfile:  return code
+  -1     error
+   0     ok, but need more data before outputing any samples
+   n     number of samples output.  either 576 or 1152 depending on MP3 file.
+*/
+int
+lame_decode_fromfile(FILE * fd, short pcm_l[], short pcm_r[],
+                     mp3data_struct * mp3data)
+{
+    int     ret = 0, len;
+    unsigned char buf[100];
+    /* read until we get a valid output frame */
+    while (0 == ret) {
+        len = fread(buf, 1, 100, fd);
+        if (len != 100)
+            return -1;
+        ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
+        if (ret == -1)
+            return -1;
+    }
+    return ret;
+}
+#endif /* defined(HAVE_MPGLIB) */
+
+/* end of get_audio.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/get_audio.h
@@ -1,0 +1,100 @@
+/*
+ *	Get Audio routines include file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef LAME_GET_AUDIO_H
+#define LAME_GET_AUDIO_H
+
+typedef enum sound_file_format_e {
+  sf_unknown, 
+  sf_raw, 
+  sf_wave, 
+  sf_aiff, 
+  sf_mp1,  /* MPEG Layer 1, aka mpg */
+  sf_mp2,  /* MPEG Layer 2 */
+  sf_mp3,  /* MPEG Layer 3 */
+  sf_ogg 
+} sound_file_format;
+
+
+
+FILE*  init_outfile ( char *outPath, int decode );
+void init_infile(lame_global_flags *, char *inPath);
+void close_infile(void);
+int get_audio(lame_global_flags *gfp,short buffer[2][1152]);
+
+
+
+/* the simple lame decoder */
+/* After calling lame_init(), lame_init_params() and
+ * init_infile(), call this routine to read the input MP3 file 
+ * and output .wav data to the specified file pointer
+ * lame_decoder will ignore the first 528 samples, since these samples
+ * represent the mpglib decoding delay (and are all 0).  
+ *skip = number of additional
+ * samples to skip, to (for example) compensate for the encoder delay,
+ * only used when decoding mp3 
+*/
+int lame_decoder(lame_global_flags *gfp,FILE *outf,int skip, char *inPath, char *outPath);
+
+
+
+void SwapBytesInWords( short *loc, int words );
+
+
+
+#ifdef LIBSNDFILE
+
+#include "sndfile.h"
+
+
+#else
+/*****************************************************************
+ * LAME/ISO built in audio file I/O routines 
+ *******************************************************************/
+#include "portableio.h"
+
+
+typedef struct  blockAlign_struct {
+    unsigned long   offset;
+    unsigned long   blockSize;
+} blockAlign;
+
+typedef struct  IFF_AIFF_struct {
+    short           numChannels;
+    unsigned long   numSampleFrames;
+    short           sampleSize;
+    double          sampleRate;
+    unsigned long   sampleType;
+    blockAlign      blkAlgn;
+} IFF_AIFF;
+
+extern int            aiff_read_headers(FILE*, IFF_AIFF*);
+extern int            aiff_seek_to_sound_data(FILE*);
+extern int            aiff_write_headers(FILE*, IFF_AIFF*);
+extern int parse_wavheader(void);
+extern int parse_aiff(const char fn[]);
+extern void   aiff_check(const char*, IFF_AIFF*, int*);
+
+
+
+#endif	/* ifdef LIBSNDFILE */
+#endif	/* ifndef LAME_GET_AUDIO_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/id3tag.c
@@ -1,0 +1,539 @@
+/*
+ * id3tag.c -- Write ID3 version 1 and 2 tags.
+ *
+ * Copyright (C) 2000 Don Melton.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * HISTORY: This source file is part of LAME (see http://www.mp3dev.org/mp3/)
+ * and was originally adapted by Conrad Sanderson <[email protected]>
+ * from mp3info by Ricardo Cerqueira <[email protected]> to write only ID3 version 1
+ * tags.  Don Melton <[email protected]> COMPLETELY rewrote it to support version
+ * 2 tags and be more conformant to other standards while remaining flexible.
+ *
+ * NOTE: See http://id3.org/ for more information about ID3 tag formats.
+ */
+
+/* $Id: id3tag.c,v 1.18 2001/01/15 15:16:09 aleidinger Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef HAVE_STRCHR
+#  define strchr index
+#  define strrchr rindex
+# endif
+char *strchr (), *strrchr ();
+# ifndef HAVE_MEMCPY
+#  define memcpy(d, s, n) bcopy ((s), (d), (n))
+#  define memmove(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif
+
+#include "lame.h"
+#include "id3tag.h"
+#include "util.h"
+#include "bitstream.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+static const char *const genre_names[] =
+{
+    /*
+     * NOTE: The spelling of these genre names is identical to those found in
+     * Winamp and mp3info.
+     */
+    "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
+    "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
+    "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
+    "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
+    "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental",
+    "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "Alt. Rock",
+    "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop",
+    "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
+    "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy",
+    "Cult", "Gangsta Rap", "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
+    "Native American", "Cabaret", "New Wave", "Psychedelic", "Rave",
+    "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz",
+    "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk",
+    "Folk/Rock", "National Folk", "Swing", "Fast-Fusion", "Bebob", "Latin",
+    "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock",
+    "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
+    "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech",
+    "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass",
+    "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+    "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+    "Punk Rock", "Drum Solo", "A Cappella", "Euro-House", "Dance Hall",
+    "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie",
+    "BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta Rap",
+    "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian",
+    "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+    "Synthpop"
+};
+
+#define GENRE_NAME_COUNT \
+    ((int)(sizeof genre_names / sizeof (const char *const)))
+
+static const int genre_alpha_map [] = {
+    123, 34, 74, 73, 99, 20, 40, 26, 145, 90, 116, 41, 135, 85, 96, 138, 89, 0,
+    107, 132, 65, 88, 104, 102, 97, 136, 61, 141, 32, 1, 112, 128, 57, 140, 2,
+    139, 58, 3, 125, 50, 22, 4, 55, 127, 122, 120, 98, 52, 48, 54, 124, 25, 84,
+    80, 115, 81, 119, 5, 30, 36, 59, 126, 38, 49, 91, 6, 129, 79, 137, 7, 35,
+    100, 131, 19, 33, 46, 47, 8, 29, 146, 63, 86, 71, 45, 142, 9, 77, 82, 64,
+    133, 10, 66, 39, 11, 103, 12, 75, 134, 13, 53, 62, 109, 117, 23, 108, 92,
+    67, 93, 43, 121, 15, 68, 14, 16, 76, 87, 118, 17, 78, 143, 114, 110, 69, 21,
+    111, 95, 105, 42, 37, 24, 56, 44, 101, 83, 94, 106, 147, 113, 18, 51, 130,
+    144, 60, 70, 31, 72, 27, 28
+};
+
+#define GENRE_ALPHA_COUNT ((int)(sizeof genre_alpha_map / sizeof (int)))
+
+void
+id3tag_genre_list(void (*handler)(int, const char *, void *), void *cookie)
+{
+    if (handler) {
+        int i;
+        for (i = 0; i < GENRE_NAME_COUNT; ++i) {
+            if (i < GENRE_ALPHA_COUNT) {
+                int j = genre_alpha_map[i];
+                handler(j, genre_names[j], cookie);
+            }
+        }
+    }
+}
+
+#define GENRE_NUM_UNKNOWN 255
+
+void
+id3tag_init(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    memset(&gfc->tag_spec, 0, sizeof gfc->tag_spec);
+    gfc->tag_spec.genre = GENRE_NUM_UNKNOWN;
+}
+
+#define CHANGED_FLAG    (1U << 0)
+#define ADD_V2_FLAG     (1U << 1)
+#define V1_ONLY_FLAG    (1U << 2)
+#define V2_ONLY_FLAG    (1U << 3)
+#define SPACE_V1_FLAG   (1U << 4)
+#define PAD_V2_FLAG     (1U << 5)
+
+void
+id3tag_add_v2(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
+    gfc->tag_spec.flags |= ADD_V2_FLAG;
+}
+
+void
+id3tag_v1_only(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    gfc->tag_spec.flags &= ~(ADD_V2_FLAG | V2_ONLY_FLAG);
+    gfc->tag_spec.flags |= V1_ONLY_FLAG;
+}
+
+void
+id3tag_v2_only(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
+    gfc->tag_spec.flags |= V2_ONLY_FLAG;
+}
+
+void
+id3tag_space_v1(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    gfc->tag_spec.flags &= ~V2_ONLY_FLAG;
+    gfc->tag_spec.flags |= SPACE_V1_FLAG;
+}
+
+void
+id3tag_pad_v2(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
+    gfc->tag_spec.flags |= PAD_V2_FLAG;
+}
+
+void
+id3tag_set_title(lame_global_flags *gfp, const char *title)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (title && *title) {
+        gfc->tag_spec.title = title;
+        gfc->tag_spec.flags |= CHANGED_FLAG;
+    }
+}
+
+void
+id3tag_set_artist(lame_global_flags *gfp, const char *artist)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (artist && *artist) {
+        gfc->tag_spec.artist = artist;
+        gfc->tag_spec.flags |= CHANGED_FLAG;
+    }
+}
+
+void
+id3tag_set_album(lame_global_flags *gfp, const char *album)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (album && *album) {
+        gfc->tag_spec.album = album;
+        gfc->tag_spec.flags |= CHANGED_FLAG;
+    }
+}
+
+void
+id3tag_set_year(lame_global_flags *gfp, const char *year)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (year && *year) {
+        int num = atoi(year);
+        if (num < 0) {
+            num = 0;
+        }
+        /* limit a year to 4 digits so it fits in a version 1 tag */
+        if (num > 9999) {
+            num = 9999;
+        }
+        if (num) {
+            gfc->tag_spec.year = num;
+            gfc->tag_spec.flags |= CHANGED_FLAG;
+        }
+    }
+}
+
+void
+id3tag_set_comment(lame_global_flags *gfp, const char *comment)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (comment && *comment) {
+        gfc->tag_spec.comment = comment;
+        gfc->tag_spec.flags |= CHANGED_FLAG;
+    }
+}
+
+void
+id3tag_set_track(lame_global_flags *gfp, const char *track)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (track && *track) {
+        int num = atoi(track);
+        if (num < 0) {
+            num = 0;
+        }
+        /* limit a track to 255 so it fits in a version 1 tag even though CD
+         * audio doesn't allow more than 99 tracks */
+        if (num > 255) {
+            num = 255;
+        }
+        if (num) {
+            gfc->tag_spec.track = num;
+            gfc->tag_spec.flags |= CHANGED_FLAG;
+        }
+    }
+}
+
+/* would use real "strcasecmp" but it isn't portable */
+static int
+local_strcasecmp(const char *s1, const char *s2)
+{
+    unsigned char c1;
+    unsigned char c2;
+    do {
+        c1 = tolower(*s1);
+        c2 = tolower(*s2);
+        if (!c1) {
+            break;
+        }
+        ++s1;
+        ++s2;
+    } while (c1 == c2);
+    return c1 - c2;
+}
+
+int
+id3tag_set_genre(lame_global_flags *gfp, const char *genre)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if (genre && *genre) {
+        char *str;
+        int num = strtol(genre, &str, 10);
+        /* is the input a string or a valid number? */
+        if (*str) {
+            int i;
+            for (i = 0; i < GENRE_NAME_COUNT; ++i) {
+                if (!local_strcasecmp(genre, genre_names[i])) {
+                    num = i;
+                    break;
+                }
+            }
+            if (i == GENRE_NAME_COUNT) {
+                return -1;
+            }
+        } else if ((num < 0) || (num >= GENRE_NAME_COUNT)) {
+            return -1;
+        }
+        gfc->tag_spec.genre = num;
+        gfc->tag_spec.flags |= CHANGED_FLAG;
+    }
+    return 0;
+}
+
+static unsigned char *
+set_4_byte_value(unsigned char *bytes, unsigned long value)
+{
+    int index;
+    for (index = 3; index >= 0; --index) {
+        bytes[index] = value & 0xfful;
+        value >>= 8;
+    }
+    return bytes + 4;
+}
+
+#define FRAME_ID(a, b, c, d) \
+    ( ((unsigned long)(a) << 24) \
+    | ((unsigned long)(b) << 16) \
+    | ((unsigned long)(c) <<  8) \
+    | ((unsigned long)(d) <<  0) )
+#define TITLE_FRAME_ID FRAME_ID('T', 'I', 'T', '2')
+#define ARTIST_FRAME_ID FRAME_ID('T', 'P', 'E', '1')
+#define ALBUM_FRAME_ID FRAME_ID('T', 'A', 'L', 'B')
+#define YEAR_FRAME_ID FRAME_ID('T', 'Y', 'E', 'R')
+#define COMMENT_FRAME_ID FRAME_ID('C', 'O', 'M', 'M')
+#define TRACK_FRAME_ID FRAME_ID('T', 'R', 'C', 'K')
+#define GENRE_FRAME_ID FRAME_ID('T', 'C', 'O', 'N')
+
+static unsigned char *
+set_frame(unsigned char *frame, unsigned long id, const char *text,
+    size_t length)
+{
+    if (length) {
+        frame = set_4_byte_value(frame, id);
+        /* Set frame size = total size - header size.  Frame header and field
+         * bytes include 2-byte header flags, 1 encoding descriptor byte, and
+         * for comment frames: 3-byte language descriptor and 1 content
+         * descriptor byte */
+        frame = set_4_byte_value(frame, ((id == COMMENT_FRAME_ID) ? 5 : 1)
+                + length);
+        /* clear 2-byte header flags */
+        *frame++ = 0;
+        *frame++ = 0;
+        /* clear 1 encoding descriptor byte to indicate ISO-8859-1 format */
+        *frame++ = 0;
+        if (id == COMMENT_FRAME_ID) {
+            /* use id3lib-compatible bogus language descriptor */
+            *frame++ = 'X';
+            *frame++ = 'X';
+            *frame++ = 'X';
+            /* clear 1 byte to make content descriptor empty string */
+            *frame++ = 0;
+        }
+        while (length--) {
+            *frame++ = *text++;
+        }
+    }
+    return frame;
+}
+
+int
+id3tag_write_v2(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if ((gfc->tag_spec.flags & CHANGED_FLAG)
+            && !(gfc->tag_spec.flags & V1_ONLY_FLAG)) {
+        /* calculate length of four fields which may not fit in verion 1 tag */
+        size_t title_length = gfc->tag_spec.title
+            ? strlen(gfc->tag_spec.title) : 0;
+        size_t artist_length = gfc->tag_spec.artist
+            ? strlen(gfc->tag_spec.artist) : 0;
+        size_t album_length = gfc->tag_spec.album
+            ? strlen(gfc->tag_spec.album) : 0;
+        size_t comment_length = gfc->tag_spec.comment
+            ? strlen(gfc->tag_spec.comment) : 0;
+        /* write tag if explicitly requested or if fields overflow */
+        if ((gfc->tag_spec.flags & (ADD_V2_FLAG | V2_ONLY_FLAG))
+                || (title_length > 30)
+                || (artist_length > 30) || (album_length > 30)
+                || (comment_length > 30)
+                || (gfc->tag_spec.track && (comment_length > 28))) {
+            size_t tag_size;
+            char year[5];
+            size_t year_length;
+            char track[3];
+            size_t track_length;
+            char genre[6];
+            size_t genre_length;
+            unsigned char *tag;
+            unsigned char *p;
+            size_t adjusted_tag_size;
+            unsigned int index;
+            /* calulate size of tag starting with 10-byte tag header */
+            tag_size = 10;
+            if (title_length) {
+                /* add 10-byte frame header, 1 encoding descriptor byte ... */
+                tag_size += 11 + title_length;
+            }
+            if (artist_length) {
+                tag_size += 11 + artist_length;
+            }
+            if (album_length) {
+                tag_size += 11 + album_length;
+            }
+            if (gfc->tag_spec.year) {
+                year_length = sprintf(year, "%d", gfc->tag_spec.year);
+                tag_size += 11 + year_length;
+            } else {
+                year_length = 0;
+            }
+            if (comment_length) {
+                /* add 10-byte frame header, 1 encoding descriptor byte,
+                 * 3-byte language descriptor, 1 content descriptor byte ... */
+                tag_size += 15 + comment_length;
+            }
+            if (gfc->tag_spec.track) {
+                track_length = sprintf(track, "%d", gfc->tag_spec.track);
+                tag_size += 11 + track_length;
+            } else {
+                track_length = 0;
+            }
+            if (gfc->tag_spec.genre != GENRE_NUM_UNKNOWN) {
+                genre_length = sprintf(genre, "(%d)", gfc->tag_spec.genre);
+                tag_size += 11 + genre_length;
+            } else {
+                genre_length = 0;
+            }
+            if (gfc->tag_spec.flags & PAD_V2_FLAG) {
+                /* add 128 bytes of padding */
+                tag_size += 128;
+            }
+            tag = (unsigned char *)malloc(tag_size);
+            if (!tag) {
+                return -1;
+            }
+            p = tag;
+            /* set tag header starting with file identifier */
+            *p++ = 'I'; *p++ = 'D'; *p++ = '3';
+            /* set version number word */
+            *p++ = 3; *p++ = 0;
+            /* clear flags byte */
+            *p++ = 0;
+            /* calculate and set tag size = total size - header size */
+            adjusted_tag_size = tag_size - 10;
+            /* encode adjusted size into four bytes where most significant 
+             * bit is clear in each byte, for 28-bit total */
+            *p++ = (adjusted_tag_size >> 21) & 0x7fu;
+            *p++ = (adjusted_tag_size >> 14) & 0x7fu;
+            *p++ = (adjusted_tag_size >> 7) & 0x7fu;
+            *p++ = adjusted_tag_size & 0x7fu;
+
+            /*
+             * NOTE: The remainder of the tag (frames and padding, if any)
+             * are not "unsynchronized" to prevent false MPEG audio headers
+             * from appearing in the bitstream.  Why?  Well, most players
+             * and utilities know how to skip the ID3 version 2 tag by now
+             * even if they don't read its contents, and it's actually
+             * very unlikely that such a false "sync" pattern would occur
+             * in just the simple text frames added here.
+             */
+
+            /* set each frame in tag */
+            p = set_frame(p, TITLE_FRAME_ID, gfc->tag_spec.title, title_length);
+            p = set_frame(p, ARTIST_FRAME_ID, gfc->tag_spec.artist,
+                    artist_length);
+            p = set_frame(p, ALBUM_FRAME_ID, gfc->tag_spec.album, album_length);
+            p = set_frame(p, YEAR_FRAME_ID, year, year_length);
+            p = set_frame(p, COMMENT_FRAME_ID, gfc->tag_spec.comment,
+                    comment_length);
+            p = set_frame(p, TRACK_FRAME_ID, track, track_length);
+            p = set_frame(p, GENRE_FRAME_ID, genre, genre_length);
+            /* clear any padding bytes */
+            memset(p, 0, tag_size - (p - tag));
+            /* write tag directly into bitstream at current position */
+            for (index = 0; index < tag_size; ++index) {
+                add_dummy_byte(gfp, tag[index]);
+            }
+            free(tag);
+            return tag_size;
+        }
+    }
+    return 0;
+}
+
+static unsigned char *
+set_text_field(unsigned char *field, const char *text, size_t size, int pad)
+{
+    while (size--) {
+        if (text && *text) {
+            *field++ = *text++;
+        } else {
+            *field++ = pad;
+        }
+    }
+    return field;
+}
+
+int
+id3tag_write_v1(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    if ((gfc->tag_spec.flags & CHANGED_FLAG)
+            && !(gfc->tag_spec.flags & V2_ONLY_FLAG)) {
+        unsigned char tag[128];
+        unsigned char *p = tag;
+        int pad = (gfc->tag_spec.flags & SPACE_V1_FLAG) ? ' ' : 0;
+        char year[5];
+        unsigned int index;
+        /* set tag identifier */
+        *p++ = 'T'; *p++ = 'A'; *p++ = 'G';
+        /* set each field in tag */
+        p = set_text_field(p, gfc->tag_spec.title, 30, pad);
+        p = set_text_field(p, gfc->tag_spec.artist, 30, pad);
+        p = set_text_field(p, gfc->tag_spec.album, 30, pad);
+        sprintf(year, "%d", gfc->tag_spec.year);
+        p = set_text_field(p, gfc->tag_spec.year ? year : NULL, 4, pad);
+        /* limit comment field to 28 bytes if a track is specified */
+        p = set_text_field(p, gfc->tag_spec.comment, gfc->tag_spec.track
+                ? 28 : 30, pad);
+        if (gfc->tag_spec.track) {
+            /* clear the next byte to indicate a version 1.1 tag */
+            *p++ = 0;
+            *p++ = gfc->tag_spec.track;
+        }
+        *p++ = gfc->tag_spec.genre;
+        /* write tag directly into bitstream at current position */
+        for (index = 0; index < 128; ++index) {
+            add_dummy_byte(gfp, tag[index]);
+        }
+        return 128;
+    }
+    return 0;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/id3tag.h
@@ -1,0 +1,30 @@
+
+#ifndef LAME_ID3_H
+#define LAME_ID3_H
+
+#include "lame.h"
+
+struct id3tag_spec
+{
+    /* private data members */
+    int flags;
+    const char *title;
+    const char *artist;
+    const char *album;
+    int year;
+    const char *comment;
+    int track;
+    int genre;
+};
+
+
+/* write tag into stream at current position */
+extern int id3tag_write_v2(lame_global_flags *gfp);
+extern int id3tag_write_v1(lame_global_flags *gfp);
+/*
+ * NOTE: A version 2 tag will NOT be added unless one of the text fields won't
+ * fit in a version 1 tag (e.g. the title string is longer than 30 characters),
+ * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used.
+ */
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/l3side.h
@@ -1,0 +1,100 @@
+/*
+ *	Layer 3 side include file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_L3SIDE_H
+#define LAME_L3SIDE_H
+
+#include "encoder.h"
+#include "machine.h"
+
+/* Layer III side information. */
+
+typedef FLOAT8	D576[576];
+typedef int	I576[576];
+typedef FLOAT8	D192_3[192][3];
+typedef int	I192_3[192][3];
+
+
+typedef struct 
+{
+   int l[1+SBMAX_l];
+   int s[1+SBMAX_s];
+} scalefac_struct;
+
+
+typedef struct {
+	FLOAT8	l[SBMAX_l];
+	FLOAT8	s[SBMAX_s][3];
+} III_psy_xmin;
+
+typedef struct {
+    III_psy_xmin thm;
+    III_psy_xmin en;
+} III_psy_ratio;
+
+typedef struct {
+	int part2_3_length;
+	int big_values;
+	int count1;
+ 	int global_gain;
+	int scalefac_compress;
+	int window_switching_flag;
+	int block_type;
+	int mixed_block_flag;
+	int table_select[3];
+	 int subblock_gain[3];
+	 int region0_count;
+	 int region1_count;
+	 int preflag;
+	 int scalefac_scale;
+	 int count1table_select;
+
+	 int part2_length;
+	 int sfb_lmax;
+	 int sfb_smin;
+	 int count1bits;
+	/* added for LSF */
+	 const int *sfb_partition_table;
+	 int slen[4];
+} gr_info;
+
+typedef struct {
+	int main_data_begin; 
+	int private_bits;
+	int resvDrain_pre;
+	int resvDrain_post;
+	int scfsi[2][4];
+	struct {
+		struct gr_info_ss {
+			gr_info tt;
+			} ch[2];
+		} gr[2];
+	} III_side_info_t;
+
+/* Layer III scale factors. */
+/* note: there are only SBPSY_l=(SBMAX_l-1) and SBPSY_s=(SBMAX_s-1) scalefactors.
+ * Dont know why these would be dimensioned SBMAX_l and SBMAX-s */
+typedef struct {
+	int l[SBMAX_l];            /* [cb] */
+	int s[SBMAX_s][3];         /* [window][cb] */
+} III_scalefac_t;  /* [gr][ch] */
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lame-analysis.h
@@ -1,0 +1,90 @@
+/*
+ *	GTK plotting routines source file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_GTKANAL_H
+#define LAME_GTKANAL_H
+
+#include "encoder.h"
+
+#define READ_AHEAD 10             /* number of frames to read ahead */
+#define MAXMPGLAG READ_AHEAD      /* if the mpg123 lag becomes bigger than this 				     we have to stop */
+#define NUMBACK 6                 /* number of frames we can back up */
+#define NUMPINFO (NUMBACK+READ_AHEAD+1)
+
+
+
+typedef struct {
+  int frameNum;           /* current frame number */
+  int frameNum123;
+  int num_samples;        /* number of pcm samples read for this frame */
+  double frametime;       /* starting time of frame, in seconds */
+  double pcmdata[2][1600];
+  double pcmdata2[2][1152+1152-DECDELAY];
+  double xr[2][2][576];
+  double mpg123xr[2][2][576];
+  double ms_ratio[2];
+  double ms_ener_ratio[2];
+
+  /* L,R, M and S values */
+  double energy[2][4][BLKSIZE];
+  double pe[2][4];
+  double thr[2][4][SBMAX_l];
+  double en[2][4][SBMAX_l];
+  double thr_s[2][4][3*SBMAX_s];
+  double en_s[2][4][3*SBMAX_s];
+  double ers[2][4];
+
+  double sfb[2][2][SBMAX_l];
+  double sfb_s[2][2][3*SBMAX_s];
+  double LAMEsfb[2][2][SBMAX_l];
+  double LAMEsfb_s[2][2][3*SBMAX_s];
+
+  int LAMEqss[2][2];
+  int qss[2][2];
+  int big_values[2][2];
+  int sub_gain[2][2][3];
+
+  double xfsf[2][2][SBMAX_l];
+  double xfsf_s[2][2][3*SBMAX_s];
+
+  int over[2][2];
+  double tot_noise[2][2];
+  double max_noise[2][2];
+  double over_noise[2][2];
+  int blocktype[2][2];
+  int scalefac_scale[2][2];
+  int preflag[2][2];
+  int mpg123blocktype[2][2];
+  int mixed[2][2];
+  int mainbits[2][2];
+  int sfbits[2][2];
+  int LAMEmainbits[2][2];
+  int LAMEsfbits[2][2];
+  int framesize,stereo,js,ms_stereo,i_stereo,emph,bitrate,sampfreq,maindata;
+  int crc,padding;
+  int scfsi[2],mean_bits,resvsize;
+  int totbits;
+} plotting_data;
+ 
+
+extern plotting_data *pinfo;
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lame.c
@@ -1,0 +1,1852 @@
+/* -*- mode: C; mode: fold -*- */
+/*
+ *	LAME MP3 encoding engine
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: lame.c,v 1.100 2001/03/25 23:14:45 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include <assert.h>
+#include "lame-analysis.h"
+#include "lame.h"
+#include "util.h"
+#include "bitstream.h"
+#include "version.h"
+#include "tables.h"
+#include "quantize_pvt.h"
+#include "VbrTag.h"
+
+#if defined(__FreeBSD__) && !defined(__alpha__)
+#include <floatingpoint.h>
+#endif
+#ifdef __riscos__
+#include "asmstuff.h"
+#endif
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+static void
+lame_init_params_ppflt_lowpass(FLOAT8 amp_lowpass[32], FLOAT lowpass1,
+                               FLOAT lowpass2, int *lowpass_band,
+                               int *minband, int *maxband)
+{
+    int     band;
+    FLOAT8  freq;
+
+    for (band = 0; band <= 31; band++) {
+        freq = band / 31.0;
+        amp_lowpass[band] = 1;
+        /* this band and above will be zeroed: */
+        if (freq >= lowpass2) {
+            *lowpass_band = Min(*lowpass_band, band);
+            amp_lowpass[band] = 0;
+        }
+        if (lowpass1 < freq && freq < lowpass2) {
+            *minband = Min(*minband, band);
+            *maxband = Max(*maxband, band);
+            amp_lowpass[band] = cos((PI / 2) *
+                                    (lowpass1 - freq) / (lowpass2 - lowpass1));
+        }
+        /*
+         * DEBUGF("lowpass band=%i  amp=%f \n",
+         *      band, gfc->amp_lowpass[band]);
+         */
+    }
+}
+
+/* lame_init_params_ppflt */
+
+/*}}}*/
+/* static void   lame_init_params_ppflt         (lame_internal_flags *gfc)                                                                                        *//*{{{ */
+
+static void
+lame_init_params_ppflt(lame_global_flags * gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+  /**/
+    /* compute info needed for polyphase filter (filter type==0, default) */
+  /**/
+
+    int     band, maxband, minband;
+    FLOAT8  freq;
+
+    if (gfc->lowpass1 > 0) {
+        minband = 999;
+        maxband = -1;
+        lame_init_params_ppflt_lowpass(gfc->amp_lowpass,
+                                       gfc->lowpass1, gfc->lowpass2,
+                                       &gfc->lowpass_band, &minband, &maxband);
+        /* compute the *actual* transition band implemented by
+         * the polyphase filter */
+        if (minband == 999) {
+            gfc->lowpass1 = (gfc->lowpass_band - .75) / 31.0;
+        }
+        else {
+            gfc->lowpass1 = (minband - .75) / 31.0;
+        }
+        gfc->lowpass2 = gfc->lowpass_band / 31.0;
+
+        gfc->lowpass_start_band = minband;
+        gfc->lowpass_end_band = maxband;
+
+        /* as the lowpass may have changed above
+         * calculate the amplification here again
+         */
+        for (band = minband; band <= maxband; band++) {
+            freq = band / 31.0;
+            gfc->amp_lowpass[band] =
+                cos((PI / 2) * (gfc->lowpass1 - freq) /
+                    (gfc->lowpass2 - gfc->lowpass1));
+        }
+    }
+    else {
+        gfc->lowpass_start_band = 0;
+        gfc->lowpass_end_band = -1; /* do not to run into for-loops */
+    }
+
+    /* make sure highpass filter is within 90% of what the effective
+     * highpass frequency will be */
+    if (gfc->highpass2 > 0) {
+        if (gfc->highpass2 < .9 * (.75 / 31.0)) {
+            gfc->highpass1 = 0;
+            gfc->highpass2 = 0;
+            MSGF(gfc, "Warning: highpass filter disabled.  "
+                 "highpass frequency too small\n");
+        }
+    }
+
+    if (gfc->highpass2 > 0) {
+        minband = 999;
+        maxband = -1;
+        for (band = 0; band <= 31; band++) {
+            freq = band / 31.0;
+            gfc->amp_highpass[band] = 1;
+            /* this band and below will be zereod */
+            if (freq <= gfc->highpass1) {
+                gfc->highpass_band = Max(gfc->highpass_band, band);
+                gfc->amp_highpass[band] = 0;
+            }
+            if (gfc->highpass1 < freq && freq < gfc->highpass2) {
+                minband = Min(minband, band);
+                maxband = Max(maxband, band);
+                gfc->amp_highpass[band] =
+                    cos((PI / 2) *
+                        (gfc->highpass2 - freq) /
+                        (gfc->highpass2 - gfc->highpass1));
+            }
+            /*
+               DEBUGF("highpass band=%i  amp=%f \n",
+               band, gfc->amp_highpass[band]);
+             */
+        }
+        /* compute the *actual* transition band implemented by
+         * the polyphase filter */
+        gfc->highpass1 = gfc->highpass_band / 31.0;
+        if (maxband == -1) {
+            gfc->highpass2 = (gfc->highpass_band + .75) / 31.0;
+        }
+        else {
+            gfc->highpass2 = (maxband + .75) / 31.0;
+        }
+
+        gfc->highpass_start_band = minband;
+        gfc->highpass_end_band = maxband;
+
+        /* as the highpass may have changed above
+         * calculate the amplification here again
+         */
+        for (band = minband; band <= maxband; band++) {
+            freq = band / 31.0;
+            gfc->amp_highpass[band] =
+                cos((PI / 2) * (gfc->highpass2 - freq) /
+                    (gfc->highpass2 - gfc->highpass1));
+        }
+    }
+    else {
+        gfc->highpass_start_band = 0;
+        gfc->highpass_end_band = -1; /* do not to run into for-loops */
+    }
+    /*
+       DEBUGF("lowpass band with amp=0:  %i \n",gfc->lowpass_band);
+       DEBUGF("highpass band with amp=0:  %i \n",gfc->highpass_band);
+       DEBUGF("lowpass band start:  %i \n",gfc->lowpass_start_band);
+       DEBUGF("lowpass band end:    %i \n",gfc->lowpass_end_band);
+       DEBUGF("highpass band start:  %i \n",gfc->highpass_start_band);
+       DEBUGF("highpass band end:    %i \n",gfc->highpass_end_band);
+     */
+}
+
+/*}}}*/
+
+
+static void
+optimum_bandwidth(double *const lowerlimit,
+                  double *const upperlimit,
+                  const unsigned bitrate,
+                  const int samplefreq,
+                  const double channels, lame_global_flags * gfp)
+{
+/*
+ *  Input:
+ *      bitrate     total bitrate in bps
+ *      samplefreq  output sampling frequency in Hz
+ *      channels    1 for mono, 2+epsilon for MS stereo, 3 for LR stereo
+ *                  epsilon is the percentage of LR frames for typical audio
+ *                  (I use 'Fade to Gray' by Metallica)
+ *
+ *   Output:
+ *      lowerlimit: best lowpass frequency limit for input filter in Hz
+ *      upperlimit: best highpass frequency limit for input filter in Hz
+ */
+    double  f_low;
+    double  f_high;
+    double  br;
+
+    assert(bitrate >= 8000 && bitrate <= 320000);
+    assert(samplefreq >= 8000 && samplefreq <= 48000);
+    assert(channels == 1 || (channels >= 2 && channels <= 3));
+
+    if (samplefreq >= 32000)
+        br =
+            bitrate - (channels ==
+                       1 ? (17 + 4) * 8 : (32 + 4) * 8) * samplefreq / 1152;
+    else
+        br =
+            bitrate - (channels ==
+                       1 ? (9 + 4) * 8 : (17 + 4) * 8) * samplefreq / 576;
+
+    if (channels >= 2.)
+        br /= 1.75 + 0.25 * (channels - 2.); // MS needs 1.75x mono, LR needs 2.00x mono (experimental data of a lot of albums)
+
+    br *= 0.5;          // the sine and cosine term must share the bitrate
+
+/*
+ *  So, now we have the bitrate for every spectral line.
+ *  Let's look at the current settings:
+ *
+ *    Bitrate   limit    bits/line
+ *     8 kbps   0.34 kHz  4.76
+ *    16 kbps   1.9 kHz   2.06
+ *    24 kbps   2.8 kHz   2.21
+ *    32 kbps   3.85 kHz  2.14
+ *    40 kbps   5.1 kHz   2.06
+ *    48 kbps   5.6 kHz   2.21
+ *    56 kbps   7.0 kHz   2.10
+ *    64 kbps   7.7 kHz   2.14
+ *    80 kbps  10.1 kHz   2.08
+ *    96 kbps  11.2 kHz   2.24
+ *   112 kbps  14.0 kHz   2.12
+ *   128 kbps  15.4 kHz   2.17
+ *   160 kbps  18.2 kHz   2.05
+ *   192 kbps  21.1 kHz   2.14
+ *   224 kbps  22.0 kHz   2.41
+ *   256 kbps  22.0 kHz   2.78
+ *
+ *   What can we see?
+ *       Value for 8 kbps is nonsense (although 8 kbps and stereo is nonsense)
+ *       Values are between 2.05 and 2.24 for 16...192 kbps
+ *       Some bitrate lack the following bitrates have: 16, 40, 80, 160 kbps
+ *       A lot of bits per spectral line have: 24, 48, 96 kbps
+ *
+ *   What I propose?
+ *       A slightly with the bitrate increasing bits/line function. It is
+ *       better to decrease NMR for low bitrates to get a little bit more
+ *       bandwidth. So we have a better trade off between twickling and
+ *       muffled sound.
+ */
+
+    f_low = br / log10(br * 4.425e-3); // Tests with 8, 16, 32, 64, 112 and 160 kbps
+
+/*
+ *  What we get now?
+ *
+ *    Bitrate       limit  bits/line	difference
+ *     8 kbps (8)  1.89 kHz  0.86          +1.6 kHz
+ *    16 kbps (8)  3.16 kHz  1.24          +1.2 kHz
+ *    32 kbps(16)  5.08 kHz  1.54          +1.2 kHz
+ *    56 kbps(22)  7.88 kHz  1.80          +0.9 kHz
+ *    64 kbps(22)  8.83 kHz  1.86          +1.1 kHz
+ *   112 kbps(32) 14.02 kHz  2.12           0.0 kHz
+ *   112 kbps(44) 13.70 kHz  2.11          -0.3 kHz
+ *   128 kbps     15.40 kHz  2.17           0.0 kHz
+ *   160 kbps     16.80 kHz  2.22          -1.4 kHz
+ *   192 kbps     19.66 kHz  2.30          -1.4 kHz
+ *   256 kbps     22.05 kHz  2.78           0.0 kHz
+ */
+
+#if 0
+/*
+ *  Beginning at 128 kbps/jstereo, we can use the following additional
+ *  strategy:
+ *
+ *      For every increase of f_low in a way that the ATH(f_low)
+ *      increases by 4 dB we force an additional NMR of 1.25 dB.
+ *      These are the setting of the VBR quality selecting scheme
+ *      for V <= 4.
+ */
+    {
+        double  br_sw = (128000 - (32 + 4) * 8 * 44100 / 1152) / 1.75 * 0.5;
+        double  f_low_sw = br_sw / log10(br_sw * 4.425e-3);
+
+        // printf ("br_sw=%f  f_low_sw=%f\n", br_sw, f_low_sw );
+        // printf ("br   =%f  f_low   =%f\n", br   , f_low    );
+        // fflush (stdout);
+
+        while (f_low > f_low_sw) {
+            double  dATH = ATHformula(f_low, gfp) - ATHformula(f_low_sw, gfp); // [dB]
+            double  dNMR = br / f_low - br_sw / f_low_sw; // bit
+
+            // printf ("br   =%f  f_low   =%f\n", br   , f_low    );
+            // printf ("dATH =%f  dNMR    =%f\n", dATH , dNMR     );
+            // fflush (stdout);
+
+
+            if (dATH / 4.0 < dNMR * 6.0206 / 1.25) // 1 bit = 6.0206... dB
+                break;
+            f_low -= 25.;
+        }
+    }
+#endif
+
+/*
+ *  Now we try to choose a good high pass filtering frequency.
+ *  This value is currently not used.
+ *    For fu < 16 kHz:  sqrt(fu*fl) = 560 Hz
+ *    For fu = 18 kHz:  no high pass filtering
+ *  This gives:
+ *
+ *   2 kHz => 160 Hz
+ *   3 kHz => 107 Hz
+ *   4 kHz =>  80 Hz
+ *   8 kHz =>  40 Hz
+ *  16 kHz =>  20 Hz
+ *  17 kHz =>  10 Hz
+ *  18 kHz =>   0 Hz
+ *
+ *  These are ad hoc values and these can be optimized if a high pass is available.
+ */
+    if (f_low <= 16000)
+        f_high = 16000. * 20. / f_low;
+    else if (f_low <= 18000)
+        f_high = 180. - 0.01 * f_low;
+    else
+        f_high = 0.;
+
+    /*
+     *  When we sometimes have a good highpass filter, we can add the highpass
+     *  frequency to the lowpass frequency
+     */
+
+    if (lowerlimit != NULL)
+        *lowerlimit = f_low /* + f_high */ ;
+    if (upperlimit != NULL)
+        *upperlimit = f_high;
+/*
+ * Now the weak points:
+ *
+ *   - the formula f_low=br/log10(br*4.425e-3) is an ad hoc formula
+ *     (but has a physical background and is easy to tune)
+ *   - the switch to the ATH based bandwidth selecting is the ad hoc
+ *     value of 128 kbps
+ */
+}
+
+static int
+optimum_samplefreq(int lowpassfreq, int input_samplefreq)
+{
+/*
+ * Rules:
+ *
+ *  - output sample frequency should NOT be decreased by more than 3% if lowpass allows this
+ *  - if possible, sfb21 should NOT be used
+ *
+ *  Problem: Switches to 32 kHz at 112 kbps
+ */
+    if (input_samplefreq <= 8000 * 1.03 || lowpassfreq <= 3622)
+        return 8000;
+    if (input_samplefreq <= 11025 * 1.03 || lowpassfreq <= 4991)
+        return 11025;
+    if (input_samplefreq <= 12000 * 1.03 || lowpassfreq <= 5620)
+        return 12000;
+    if (input_samplefreq <= 16000 * 1.03 || lowpassfreq <= 7244)
+        return 16000;
+    if (input_samplefreq <= 22050 * 1.03 || lowpassfreq <= 9982)
+        return 22050;
+    if (input_samplefreq <= 24000 * 1.03 || lowpassfreq <= 11240)
+        return 24000;
+    if (input_samplefreq <= 32000 * 1.03 || lowpassfreq <= 15264)
+        return 32000;
+    if (input_samplefreq <= 44100 * 1.03)
+        return 44100;
+    return 48000;
+}
+
+
+/* set internal feature flags.  USER should not access these since
+ * some combinations will produce strange results */
+void
+lame_init_qval(lame_global_flags * gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    switch (gfp->quality) {
+    case 9:            /* no psymodel, no noise shaping */
+        gfc->filter_type = 0;
+        gfc->psymodel = 0;
+        gfc->quantization = 0;
+        gfc->noise_shaping = 0;
+        gfc->noise_shaping_amp = 0;
+        gfc->noise_shaping_stop = 0;
+        gfc->use_best_huffman = 0;
+        break;
+
+    case 8:
+        gfp->quality = 7;
+    case 7:            /* use psymodel (for short block and m/s switching), but no noise shapping */
+        gfc->filter_type = 0;
+        gfc->psymodel = 1;
+        gfc->quantization = 0;
+        gfc->noise_shaping = 0;
+        gfc->noise_shaping_amp = 0;
+        gfc->noise_shaping_stop = 0;
+        gfc->use_best_huffman = 0;
+        break;
+
+    case 6:
+        gfp->quality = 5;
+    case 5:            /* the default */
+        gfc->filter_type = 0;
+        gfc->psymodel = 1;
+        gfc->quantization = 0;
+        gfc->noise_shaping = 1;
+         /**/ gfc->noise_shaping_amp = 0;
+        gfc->noise_shaping_stop = 0;
+        gfc->use_best_huffman = 0;
+        break;
+
+    case 4:
+        gfp->quality = 3;
+    case 3:
+        gfc->filter_type = 0;
+        gfc->psymodel = 1;
+        gfc->quantization = 1;
+        gfc->noise_shaping = 1;
+        gfc->noise_shaping_amp = 0;
+        gfc->noise_shaping_stop = 0;
+        gfc->use_best_huffman = 1;
+        break;
+
+    case 2:
+        gfc->filter_type = 0;
+        gfc->psymodel = 1;
+        gfc->quantization = 1;
+        gfc->noise_shaping = 1;
+        gfc->noise_shaping_amp = 1;
+        gfc->noise_shaping_stop = 1;
+        gfc->use_best_huffman = 1;
+        break;
+
+    case 1:
+        gfc->filter_type = 0;
+        gfc->psymodel = 1;
+        gfc->quantization = 1;
+        gfc->noise_shaping = 1;
+        gfc->noise_shaping_amp = 2;
+        gfc->noise_shaping_stop = 1;
+        gfc->use_best_huffman = 1;
+        break;
+
+    case 0:            /* 0..1 quality */
+        gfc->filter_type = 0; /* 1 not yet coded */
+        gfc->psymodel = 1;
+        gfc->quantization = 1;
+        gfc->noise_shaping = 1; /* 2=usually lowers quality */
+        gfc->noise_shaping_amp = 2;
+        gfc->noise_shaping_stop = 1;
+        gfc->use_best_huffman = 1; /* 2 not yet coded */
+    }
+
+    /* modifications to the above rules: */
+
+    /* -Z option enables scalefactor_scale: */
+    if (gfp->experimentalZ) {
+        gfc->noise_shaping = 2;
+    }
+
+    if (gfp->exp_nspsytune & 1) {
+        if (gfp->quality <= 2)
+            gfc->noise_shaping = 2; /* use scalefac_scale */
+    }
+
+}
+
+
+
+
+
+
+
+/* int           lame_init_params               (lame_global_flags *gfp)                                                                                          *//*{{{ */
+
+/*
+ *   initialize internal params based on data in gf
+ *   (globalflags struct filled in by calling program)
+ *
+ *  OUTLINE:
+ *
+ * We first have some complex code to determine bitrate,
+ * output samplerate and mode.  It is complicated by the fact
+ * that we allow the user to set some or all of these parameters,
+ * and need to determine best possible values for the rest of them:
+ *
+ *  1. set some CPU related flags
+ *  2. check if we are mono->mono, stereo->mono or stereo->stereo
+ *  3.  compute bitrate and output samplerate:
+ *          user may have set compression ratio
+ *          user may have set a bitrate
+ *          user may have set a output samplerate
+ *  4. set some options which depend on output samplerate
+ *  5. compute the actual compression ratio
+ *  6. set mode based on compression ratio
+ *
+ *  The remaining code is much simpler - it just sets options
+ *  based on the mode & compression ratio:
+ *
+ *   set allow_diff_short based on mode
+ *   select lowpass filter based on compression ratio & mode
+ *   set the bitrate index, and min/max bitrates for VBR modes
+ *   disable VBR tag if it is not appropriate
+ *   initialize the bitstream
+ *   initialize scalefac_band data
+ *   set sideinfo_len (based on channels, CRC, out_samplerate)
+ *   write an id3v2 tag into the bitstream
+ *   write VBR tag into the bitstream
+ *   set mpeg1/2 flag
+ *   estimate the number of frames (based on a lot of data)
+ *
+ *   now we set more flags:
+ *   nspsytune:
+ *      see code
+ *   VBR modes
+ *      see code
+ *   CBR/ABR
+ *      see code
+ *
+ *  Finally, we set the algorithm flags based on the gfp->quality value
+ *  lame_init_qval(gfp);
+ *
+ */
+int
+lame_init_params(lame_global_flags * const gfp)
+{
+
+    int     i;
+    int     j;
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    gfc->gfp = gfp;
+
+    gfc->Class_ID = 0;
+
+    /* report functions */
+    gfc->report.msgf   = gfp->report.msgf;
+    gfc->report.debugf = gfp->report.debugf;
+    gfc->report.errorf = gfp->report.errorf;
+
+    gfc->CPU_features.i387 = has_i387();
+    gfc->CPU_features.AMD_3DNow = has_3DNow();
+    gfc->CPU_features.MMX = has_MMX();
+    gfc->CPU_features.SIMD = has_SIMD();
+    gfc->CPU_features.SIMD2 = has_SIMD2();
+
+
+    if (NULL == gfc->ATH)
+        gfc->ATH = calloc(1, sizeof(ATH_t));
+
+    if (NULL == gfc->ATH)
+        return -2;  // maybe error codes should be enumerated in lame.h ??
+
+#ifdef KLEMM_44
+    /* Select the fastest functions for this CPU */
+    init_scalar_functions(gfc);
+#endif
+
+    gfc->channels_in = gfp->num_channels;
+    if (gfc->channels_in == 1)
+        gfp->mode = MONO;
+    gfc->channels_out = (gfp->mode == MONO) ? 1 : 2;
+    gfc->mode_ext = MPG_MD_LR_LR;
+    if (gfp->mode == MONO)
+        gfp->force_ms = 0; // don't allow forced mid/side stereo for mono output
+
+
+    if (gfp->VBR != vbr_off) {
+        gfp->free_format = 0; /* VBR can't be mixed with free format */
+    }
+
+    if (gfp->VBR == vbr_off && gfp->brate == 0) {
+        /* no bitrate or compression ratio specified, use a compression ratio of 11.025 */
+        if (gfp->compression_ratio == 0)
+            gfp->compression_ratio = 11.025;
+		/* rate to compress a CD down to exactly 128000 bps */
+    }
+
+
+    if (gfp->VBR == vbr_off && gfp->brate == 0) {
+        /* no bitrate or compression ratio specified, use 11.025 */
+        if (gfp->compression_ratio == 0)
+            gfp->compression_ratio = 11.025;
+		/* rate to compress a CD down to exactly 128000 bps */
+    }
+
+    /* find bitrate if user specify a compression ratio */
+    if (gfp->VBR == vbr_off && gfp->compression_ratio > 0) {
+
+        if (gfp->out_samplerate == 0)
+            gfp->out_samplerate = map2MP3Frequency(0.97 * gfp->in_samplerate);
+			/* round up with a margin of 3% */
+
+        /* choose a bitrate for the output samplerate which achieves
+         * specified compression ratio
+         */
+	gfp->brate = gfp->out_samplerate * 16 * gfc->channels_out / (1.e3 *
+		gfp->compression_ratio);
+
+        /* we need the version for the bitrate table look up */
+        gfc->samplerate_index = SmpFrqIndex(gfp->out_samplerate, &gfp->version);
+
+        if (!gfp->free_format) /* for non Free Format find the nearest allowed bitrate */
+            gfp->brate =
+                FindNearestBitrate(gfp->brate, gfp->version,
+                                   gfp->out_samplerate);
+    }
+
+	/*
+	 * at 160 kbps (MPEG-2/2.5)/ 320 kbps (MPEG-1), only Free format
+	 * or CBR are possible, no VBR
+	 */
+    if (gfp->VBR != vbr_off && gfp->brate >= 320)
+        gfp->VBR = vbr_off;
+
+    if (gfp->out_samplerate == 0) {
+	/* if output sample frequency is not given, find a useful value */
+        gfp->out_samplerate = map2MP3Frequency(0.97 * gfp->in_samplerate);
+
+
+        /* check if user specified bitrate requires downsampling, if compression    */
+        /* ratio is > 13, choose a new samplerate to get the ratio down to about 10 */
+
+        if (gfp->VBR == vbr_off && gfp->brate > 0) {
+            gfp->compression_ratio = gfp->out_samplerate * 16 *
+		gfc->channels_out / (1.e3 * gfp->brate);
+            if (gfp->compression_ratio > 13.)
+                gfp->out_samplerate = map2MP3Frequency((10. * 1.e3 *
+			gfp->brate) / (16 * gfc->channels_out));
+        }
+        if (gfp->VBR == vbr_abr) {
+            gfp->compression_ratio = gfp->out_samplerate * 16 *
+		gfc->channels_out / (1.e3 * gfp->VBR_mean_bitrate_kbps);
+            if (gfp->compression_ratio > 13.)
+                gfp->out_samplerate =
+                    map2MP3Frequency((10. * 1.e3 * gfp->VBR_mean_bitrate_kbps) /
+                                     (16 * gfc->channels_out));
+        }
+    }
+
+    if (gfp->ogg) {
+        gfp->framesize = 1024;
+        gfp->encoder_delay = ENCDELAY;
+        gfc->coding = coding_Ogg_Vorbis;
+    }
+    else {
+        gfc->mode_gr = gfp->out_samplerate <= 24000 ? 1 : 2; // Number of granules per frame
+        gfp->framesize = 576 * gfc->mode_gr;
+        gfp->encoder_delay = ENCDELAY;
+        gfc->coding = coding_MPEG_Layer_3;
+    }
+
+    gfc->frame_size = gfp->framesize;
+
+    gfc->resample_ratio = (double) gfp->in_samplerate / gfp->out_samplerate;
+
+    /*
+     *  sample freq       bitrate     compression ratio
+     *     [kHz]      [kbps/channel]   for 16 bit input
+     *     44.1            56               12.6
+     *     44.1            64               11.025
+     *     44.1            80                8.82
+     *     22.05           24               14.7
+     *     22.05           32               11.025
+     *     22.05           40                8.82
+     *     16              16               16.0
+     *     16              24               10.667
+     *
+     */
+    /*
+     *  For VBR, take a guess at the compression_ratio.
+     *  For example:
+     *
+     *    VBR_q    compression     like
+     *     -        4.4         320 kbps/44 kHz
+     *   0...1      5.5         256 kbps/44 kHz
+     *     2        7.3         192 kbps/44 kHz
+     *     4        8.8         160 kbps/44 kHz
+     *     6       11           128 kbps/44 kHz
+     *     9       14.7          96 kbps
+     *
+     *  for lower bitrates, downsample with --resample
+     */
+
+    switch (gfp->VBR) {
+    case vbr_mt:
+    case vbr_rh:
+    case vbr_mtrh:
+        {
+            FLOAT8  cmp[] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
+            gfp->compression_ratio = cmp[gfp->VBR_q];
+        }
+        break;
+    case vbr_abr:
+        gfp->compression_ratio = gfp->out_samplerate * 16 * gfc->channels_out /
+		(1.e3 * gfp->VBR_mean_bitrate_kbps);
+        break;
+    default:
+        gfp->compression_ratio =
+            gfp->out_samplerate * 16 * gfc->channels_out / (1.e3 * gfp->brate);
+        break;
+    }
+
+
+    /* mode = -1 (not set by user) or
+     * mode = MONO (because of only 1 input channel).
+     * If mode has been set, then select between STEREO or J-STEREO
+     * At higher quality (lower compression) use STEREO instead of J-STEREO.
+     * (unless the user explicitly specified a mode)
+     *
+     * The threshold to switch to STEREO is:
+     *    48 kHz:   171 kbps (used at 192+)
+     *    44.1 kHz: 160 kbps (used at 160+)
+     *    32 kHz:   119 kbps (used at 128+)
+     *
+     *   Note, that for 32 kHz/128 kbps J-STEREO FM recordings sound much
+     *   better than STEREO, so I'm not so very happy with that.
+     *   fs < 32 kHz I have not tested.
+     */
+    if (gfp->mode == NOT_SET) {
+        if (gfp->compression_ratio < 8)
+            gfp->mode = STEREO;
+        else
+            gfp->mode = JOINT_STEREO;
+    }
+
+    /* KLEMM's jstereo with ms threshold adjusted via compression ratio */
+    if (gfp->mode_automs) {
+        if (gfp->mode != MONO && gfp->compression_ratio < 6.6)
+            gfp->mode = STEREO;
+    }
+
+
+    if (gfp->allow_diff_short == -1) {
+        if (gfp->mode == STEREO)
+            gfp->allow_diff_short = 1;
+    }
+
+
+
+
+  /**/
+  /* if a filter has not been enabled, see if we should add one: */
+  /**/
+    if (gfp->lowpassfreq == 0) {
+        double  lowpass;
+        double  highpass;
+        double  channels;
+
+        switch (gfp->mode) {
+        case MONO:
+            channels = 1.;
+            break;
+        case JOINT_STEREO:
+            channels = 2. + 0.00;
+            break;
+        case DUAL_CHANNEL:
+        case STEREO:
+            channels = 3.;
+            break;
+        default:
+            channels = 1.;  // just to make data flow analysis happy :-)
+            assert(0);
+            break;
+        }
+
+        optimum_bandwidth(&lowpass,
+                          &highpass,
+                          gfp->out_samplerate * 16 * gfc->channels_out /
+                          gfp->compression_ratio, gfp->out_samplerate, channels,
+                          gfp);
+
+        if (lowpass < 0.5 * gfp->out_samplerate) {
+            //MSGF(gfc,"Lowpass @ %7.1f Hz\n", lowpass);
+            gfc->lowpass1 = gfc->lowpass2 =
+                lowpass / (0.5 * gfp->out_samplerate);
+        }
+        if (0 && gfp->out_samplerate !=
+            optimum_samplefreq(lowpass, gfp->in_samplerate)) {
+            MSGF(gfc,
+                 "I would suggest to use %u Hz instead of %u Hz sample frequency\n",
+                 optimum_samplefreq(lowpass, gfp->in_samplerate),
+                 gfp->out_samplerate);
+        }
+        fflush(stderr);
+    }
+
+    /* apply user driven high pass filter */
+    if (gfp->highpassfreq > 0) {
+        gfc->highpass1 = 2. * gfp->highpassfreq / gfp->out_samplerate;
+					/* will always be >=0 */
+        if (gfp->highpasswidth >= 0)
+            gfc->highpass2 = 2. * (gfp->highpassfreq + gfp->highpasswidth) /
+		gfp->out_samplerate;
+        else            	/* 0% above on default */
+            gfc->highpass2 =
+                (1 + 0.00) * 2. * gfp->highpassfreq / gfp->out_samplerate;
+    }
+
+    /* apply user driven low pass filter */
+    if (gfp->lowpassfreq > 0) {
+        gfc->lowpass2 = 2. * gfp->lowpassfreq / gfp->out_samplerate;
+			/* will always be >=0 */
+        if (gfp->lowpasswidth >= 0) {
+            gfc->lowpass1 = 2. * (gfp->lowpassfreq - gfp->lowpasswidth) /
+		gfp->out_samplerate;
+            if (gfc->lowpass1 < 0) /* has to be >= 0 */
+                gfc->lowpass1 = 0;
+        }
+        else {          /* 0% below on default */
+            gfc->lowpass1 =
+                (1 - 0.00) * 2. * gfp->lowpassfreq / gfp->out_samplerate;
+        }
+    }
+
+  /**/
+  /* compute info needed for polyphase filter (filter type==0, default) */
+  /**/
+    lame_init_params_ppflt(gfp);
+
+
+  /*
+   * compute info needed for FIR filter (filter_type==1)
+   */
+   /* not yet coded */
+
+
+
+  /*
+   * samplerate and bitrate index
+   */
+    gfc->samplerate_index = SmpFrqIndex(gfp->out_samplerate, &gfp->version);
+    if (gfc->samplerate_index < 0)
+        return -1;
+
+    if (gfp->VBR == vbr_off) {
+        if (gfp->free_format)
+            gfc->bitrate_index = 0;
+        else {
+            gfc->bitrate_index = BitrateIndex(gfp->brate, gfp->version,
+                                              gfp->out_samplerate);
+            if (gfc->bitrate_index < 0)
+                return -1;
+        }
+    }
+    else {              /* choose a min/max bitrate for VBR */
+        /* if the user didn't specify VBR_max_bitrate: */
+        gfc->VBR_min_bitrate = 1; /* default: allow   8 kbps (MPEG-2) or  32 kbps (MPEG-1) */
+        gfc->VBR_max_bitrate = 14; /* default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1) */
+
+        if (gfp->VBR_min_bitrate_kbps)
+            if (
+                (gfc->VBR_min_bitrate =
+                 BitrateIndex(gfp->VBR_min_bitrate_kbps, gfp->version,
+                              gfp->out_samplerate)) < 0) return -1;
+        if (gfp->VBR_max_bitrate_kbps)
+            if (
+                (gfc->VBR_max_bitrate =
+                 BitrateIndex(gfp->VBR_max_bitrate_kbps, gfp->version,
+                              gfp->out_samplerate)) < 0) return -1;
+
+        gfp->VBR_min_bitrate_kbps =
+            bitrate_table[gfp->version][gfc->VBR_min_bitrate];
+        gfp->VBR_max_bitrate_kbps =
+            bitrate_table[gfp->version][gfc->VBR_max_bitrate];
+
+        gfp->VBR_mean_bitrate_kbps =
+            Min(bitrate_table[gfp->version][gfc->VBR_max_bitrate],
+                gfp->VBR_mean_bitrate_kbps);
+        gfp->VBR_mean_bitrate_kbps =
+            Max(bitrate_table[gfp->version][gfc->VBR_min_bitrate],
+                gfp->VBR_mean_bitrate_kbps);
+
+
+    }
+
+    /* Do not write VBR tag if VBR flag is not specified */
+    if (gfp->VBR == vbr_off)
+        gfp->bWriteVbrTag = 0;
+    if (gfp->ogg)
+        gfp->bWriteVbrTag = 0;
+    if (gfp->analysis)
+        gfp->bWriteVbrTag = 0;
+
+    /* some file options not allowed if output is: not specified or stdout */
+    if (gfc->pinfo != NULL)
+        gfp->bWriteVbrTag = 0; /* disable Xing VBR tag */
+
+    init_bit_stream_w(gfc);
+
+    j = gfc->samplerate_index + (3 * gfp->version) + 6 * (gfp->out_samplerate <
+                                                          16000);
+    for (i = 0; i < SBMAX_l + 1; i++)
+        gfc->scalefac_band.l[i] = sfBandIndex[j].l[i];
+    for (i = 0; i < SBMAX_s + 1; i++)
+        gfc->scalefac_band.s[i] = sfBandIndex[j].s[i];
+
+    /* determine the mean bitrate for main data */
+    if (gfp->version == 1)		/* MPEG 1 */
+        gfc->sideinfo_len = (gfc->channels_out == 1) ? 4 + 17 : 4 + 32;
+    else				/* MPEG 2 */
+        gfc->sideinfo_len = (gfc->channels_out == 1) ? 4 + 9 : 4 + 17;
+
+    if (gfp->error_protection)
+        gfc->sideinfo_len += 2;
+
+
+    /*
+     *  Write id3v2 tag into the bitstream.
+     *  This tag must be before the Xing VBR header.
+     */
+    if (!gfp->ogg)
+        id3tag_write_v2(gfp);
+
+
+    /* Write initial VBR Header to bitstream */
+    if (gfp->bWriteVbrTag)
+        InitVbrTag(gfp);
+
+    if (gfp->version == 1) /* 0 indicates use lower sample freqs algorithm */
+        gfc->is_mpeg1 = 1; /* yes */
+    else
+        gfc->is_mpeg1 = 0; /* no */
+
+    /* estimate total frames.  */
+    gfp->totalframes =
+        2 + gfp->num_samples / (gfc->resample_ratio * gfp->framesize);
+    gfc->Class_ID = LAME_ID;
+
+    if (gfp->exp_nspsytune & 1) {
+        int     i;
+
+        gfc->nsPsy.use = 1;
+        gfc->nsPsy.safejoint = (gfp->exp_nspsytune & 2) != 0;
+        for (i = 0; i < 19; i++)
+            gfc->nsPsy.pefirbuf[i] = 700;
+
+        if (gfp->VBR == vbr_mtrh || gfp->VBR == vbr_mt) {
+            ERRORF(gfc, "\n**** nspsytune doesn't support --vbr-new **** \n\n");
+            gfp->VBR = vbr_rh;
+        }
+
+        if (gfp->ATHtype == -1)
+            gfp->ATHtype = 0;
+
+        gfc->nsPsy.bass = gfc->nsPsy.alto = gfc->nsPsy.treble = 0;
+
+        i = (gfp->exp_nspsytune >> 2) & 63;
+        if (i >= 32)
+            i -= 64;
+        gfc->nsPsy.bass = pow(10, i / 4.0 / 10.0);
+        i = (gfp->exp_nspsytune >> 8) & 63;
+        if (i >= 32)
+            i -= 64;
+        gfc->nsPsy.alto = pow(10, i / 4.0 / 10.0);
+        i = (gfp->exp_nspsytune >> 14) & 63;
+        if (i >= 32)
+            i -= 64;
+        gfc->nsPsy.treble = pow(10, i / 4.0 / 10.0);
+    }
+
+    switch (gfp->VBR) {
+    case vbr_mtrh:
+        /*  default quality for --vbr-mtrh is 1
+         */
+        if (gfp->quality < 0)
+            gfp->quality = 1;
+
+        /*  tonality
+         */
+        if (gfp->cwlimit <= 0)
+            gfp->cwlimit = 0.454 * gfp->out_samplerate;
+
+        /*  fall through */
+    case vbr_mt:
+        /*  use Gaby's ATH for vbr-mtrh by default
+         */
+        if (gfp->ATHtype == -1)
+            gfp->ATHtype = 2;
+
+        /*  fall through */
+    case vbr_rh:
+        /*  use Roel's tweaked Gaby-ATH for VBR by default
+         */
+        if (gfp->ATHtype == -1)
+            gfp->ATHtype = 2;
+
+        /*  automatic ATH adjustment on, VBR modes need it
+         */
+        gfc->ATH->use_adjust = 1;
+
+        /*  sfb21 extra only with MPEG-1 at higher sampling rates
+         */
+        gfc->sfb21_extra = (gfp->out_samplerate > 44000);
+
+        /*  VBR needs at least the output of GPSYCHO,
+         *  so we have to garantee that by setting a minimum
+         *  quality level, actually level 5 does it.
+         *  the -v and -V x settings switch the quality to level 2
+         *  you would have to add a -q 5 to reduce the quality
+         *  down to level 5
+         */
+        if (gfp->quality > 5)
+            gfp->quality = 5;
+
+        /*  default quality setting is 2
+         */
+        if (gfp->quality < 0)
+            gfp->quality = 2;
+
+        /*  allow left and right channels to have different block types
+         */
+        gfp->allow_diff_short = 1;
+        break;
+    default:
+        /*  automatic ATH adjustment off, not so important for CBR code
+         */
+        gfc->ATH->use_adjust = 0;
+
+        /*  use Frank's ATH for CBR/ABR by default
+         */
+        if (gfp->ATHtype == -1)
+            gfp->ATHtype = 2;
+
+        /*  no sfb21 extra with CBR code
+         */
+        gfc->sfb21_extra = 0;
+
+        /*  default quality setting for CBR/ABR is 5
+         */
+        if (gfp->quality < 0)
+            gfp->quality = 5;
+        break;
+    }
+
+    /* initialize internal qval settings */
+    lame_init_qval(gfp);
+
+#ifdef KLEMM_44
+    gfc->mfbuf[0] = (sample_t *) calloc(sizeof(sample_t), MFSIZE);
+    gfc->mfbuf[1] = (sample_t *) calloc(sizeof(sample_t), MFSIZE);
+    gfc->sampfreq_in = unround_samplefrequency(gfp->in_samplerate);
+    gfc->sampfreq_out = gfp->out_samplerate;
+    gfc->resample_in = resample_open(gfc->sampfreq_in, gfc->sampfreq_out,
+	-1 .0 /* Auto */ , 32);
+#endif
+    return 0;
+}
+
+/*}}}*/
+/* void          lame_print_config              (lame_global_flags *gfp)                                                                                          *//*{{{ */
+
+/*
+ *  print_config
+ *
+ *  Prints some selected information about the coding parameters via
+ *  the macro command MSGF(), which is currently mapped to lame_errorf
+ *  (reports via a error function?), which is a printf-like function
+ *  for <stderr>.
+ */
+
+void
+lame_print_config(const lame_global_flags * gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    double  out_samplerate = gfp->out_samplerate;
+    double  in_samplerate = gfp->out_samplerate * gfc->resample_ratio;
+
+    MSGF(gfc, "mp3enc (from lame version %s (%s))\n", get_lame_version(), get_lame_url());
+
+    if (gfc->CPU_features.MMX
+        || gfc->CPU_features.AMD_3DNow
+        || gfc->CPU_features.SIMD || gfc->CPU_features.SIMD2) {
+        MSGF(gfc, "CPU features:");
+
+        if (gfc->CPU_features.i387)
+            MSGF(gfc, " i387");
+        if (gfc->CPU_features.MMX)
+#ifdef MMX_choose_table
+            MSGF(gfc, ", MMX (ASM used)");
+#else
+            MSGF(gfc, ", MMX");
+#endif
+        if (gfc->CPU_features.AMD_3DNow)
+            MSGF(gfc, ", 3DNow!");
+        if (gfc->CPU_features.SIMD)
+            MSGF(gfc, ", SIMD");
+        if (gfc->CPU_features.SIMD2)
+            MSGF(gfc, ", SIMD2");
+        MSGF(gfc, "\n");
+    }
+
+    if (gfp->num_channels == 2 && gfc->channels_out == 1 /* mono */ ) {
+        MSGF
+            (gfc,
+             "Autoconverting from stereo to mono. Setting encoding to mono mode.\n");
+    }
+
+    if (gfc->resample_ratio != 1.) {
+        MSGF(gfc, "Resampling:  input %g kHz  output %g kHz\n",
+             1.e-3 * in_samplerate, 1.e-3 * out_samplerate);
+    }
+
+    if (gfc->filter_type == 0) {
+        if (gfc->highpass2 > 0.)
+            MSGF
+                (gfc,
+                 "Using polyphase highpass filter, transition band: %5.0f Hz - %5.0f Hz\n",
+                 0.5 * gfc->highpass1 * out_samplerate,
+                 0.5 * gfc->highpass2 * out_samplerate);
+        if (gfc->lowpass1 > 0.) {
+            MSGF
+                (gfc,
+                 "Using polyphase lowpass  filter, transition band: %5.0f Hz - %5.0f Hz\n",
+                 0.5 * gfc->lowpass1 * out_samplerate,
+                 0.5 * gfc->lowpass2 * out_samplerate);
+        }
+        else {
+            MSGF(gfc, "polyphase lowpass filter disabled\n");
+        }
+    }
+    else {
+        MSGF(gfc, "polyphase filters disabled\n");
+    }
+
+    if (gfp->free_format) {
+        MSGF(gfc,
+             "Warning: many decoders cannot handle free format bitstreams\n");
+        if (gfp->brate > 320) {
+            MSGF
+                (gfc,
+                 "Warning: many decoders cannot handle free format bitrates >320 kbps (see documentation)\n");
+        }
+    }
+}
+
+
+/* int           lame_encode_frame              (lame_global_flags *gfp, sample_t inbuf_l[],sample_t inbuf_r[], char *mp3buf, int mp3buf_size)                    *//*{{{ */
+
+/* routine to feed exactly one frame (gfp->framesize) worth of data to the
+encoding engine.  All buffering, resampling, etc, handled by calling
+program.
+*/
+int
+lame_encode_frame(lame_global_flags * gfp,
+                  sample_t inbuf_l[], sample_t inbuf_r[],
+                  unsigned char *mp3buf, int mp3buf_size)
+{
+    int     ret;
+    if (gfp->ogg) {
+#ifdef HAVE_VORBIS
+        ret = lame_encode_ogg_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3buf_size);
+#else
+        return -5;      /* wanna encode ogg without vorbis */
+#endif
+    }
+    else {
+        ret = lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3buf_size);
+    }
+
+    /* check to see if we underestimated totalframes */
+    gfp->frameNum++;
+    if (gfp->totalframes < gfp->frameNum)
+        gfp->totalframes = gfp->frameNum;
+    return ret;
+}
+
+/*}}}*/
+/* int           lame_encode_buffer             (lame_global_flags* gfp, short int buffer_l[], short int buffer_r[], int nsamples, char* mp3buf, int mp3buf_size )*//*{{{ */
+
+
+
+/*
+ * THE MAIN LAME ENCODING INTERFACE
+ * mt 3/00
+ *
+ * input pcm data, output (maybe) mp3 frames.
+ * This routine handles all buffering, resampling and filtering for you.
+ * The required mp3buffer_size can be computed from num_samples,
+ * samplerate and encoding rate, but here is a worst case estimate:
+ *
+ * mp3buffer_size in bytes = 1.25*num_samples + 7200
+ *
+ * return code = number of bytes output in mp3buffer.  can be 0
+*/
+int
+lame_encode_buffer_sample_t(lame_global_flags * gfp,
+                   sample_t buffer_l[],
+                   sample_t buffer_r[],
+                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int     mp3size = 0, ret, i, ch, mf_needed;
+    sample_t *mfbuf[2];
+    sample_t *in_buffer[2];
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    if (nsamples == 0)
+        return 0;
+
+    in_buffer[0]=buffer_l;
+    in_buffer[1]=buffer_r;
+
+
+    /* some sanity checks */
+#if ENCDELAY < MDCTDELAY
+# error ENCDELAY is less than MDCTDELAY, see encoder.h
+#endif
+#if FFTOFFSET > BLKSIZE
+# error FFTOFFSET is greater than BLKSIZE, see encoder.h
+#endif
+
+    mf_needed = BLKSIZE + gfp->framesize - FFTOFFSET; /* amount needed for FFT */
+    mf_needed = Max(mf_needed, 286 + 576 * (1 + gfc->mode_gr)); /* amount needed for MDCT/filterbank */
+    assert(MFSIZE >= mf_needed);
+
+    mfbuf[0] = gfc->mfbuf[0];
+    mfbuf[1] = gfc->mfbuf[1];
+
+    if (gfp->num_channels == 2 && gfc->channels_out == 1) {
+        /* downsample to mono */
+        for (i = 0; i < nsamples; ++i) {
+            in_buffer[0][i] =
+                0.5 * ((FLOAT8) in_buffer[0][i] + in_buffer[1][i]);
+            in_buffer[1][i] = 0.0;
+        }
+    }
+
+
+    while (nsamples > 0) {
+        int     n_in = 0;    /* number of input samples processed with fill_buffer */
+        int     n_out = 0;   /* number of samples output with fill_buffer */
+        /* n_in <> n_out if we are resampling */
+
+        /* copy in new samples into mfbuf, with resampling & scaling if necessary */
+        fill_buffer(gfp, mfbuf, in_buffer, nsamples, &n_in, &n_out);
+
+        /* update in_buffer counters */
+        nsamples -= n_in;
+        in_buffer[0] += n_in;
+        if (gfc->channels_out == 2)
+            in_buffer[1] += n_in;
+
+        /* update mfbuf[] counters */
+        gfc->mf_size += n_out;
+        assert(gfc->mf_size <= MFSIZE);
+        gfc->mf_samples_to_encode += n_out;
+
+
+        if (gfc->mf_size >= mf_needed) {
+            /* encode the frame.  */
+            ret =
+                lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf, mp3buf_size);
+
+            if (ret < 0)
+                goto retr;
+            mp3buf += ret;
+            mp3size += ret;
+
+            /* shift out old samples */
+            gfc->mf_size -= gfp->framesize;
+            gfc->mf_samples_to_encode -= gfp->framesize;
+            for (ch = 0; ch < gfc->channels_out; ch++)
+                for (i = 0; i < gfc->mf_size; i++)
+                    mfbuf[ch][i] = mfbuf[ch][i + gfp->framesize];
+        }
+    }
+    assert(nsamples == 0);
+    ret = mp3size;
+
+  retr:
+    return ret;
+}
+
+
+int
+lame_encode_buffer(lame_global_flags * gfp,
+                   const short int buffer_l[],
+                   const short int buffer_r[],
+                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int     ret, i;
+    sample_t *in_buffer[2];
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    if (nsamples == 0)
+        return 0;
+
+    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
+    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
+
+    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
+        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
+        return -2;
+    }
+
+    /* make a copy of input buffer, changing type to sample_t */
+    for (i = 0; i < nsamples; i++) {
+        in_buffer[0][i] = buffer_l[i];
+        in_buffer[1][i] = buffer_r[i];
+    }
+
+    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
+				      nsamples, mp3buf, mp3buf_size);
+
+    free(in_buffer[0]);
+    free(in_buffer[1]);
+    return ret;
+}
+
+
+int
+lame_encode_buffer_float(lame_global_flags * gfp,
+                   const float buffer_l[],
+                   const float buffer_r[],
+                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int     ret, i;
+    sample_t *in_buffer[2];
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    if (nsamples == 0)
+        return 0;
+
+    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
+    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
+
+    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
+        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
+        return -2;
+    }
+
+    /* make a copy of input buffer, changing type to sample_t */
+    for (i = 0; i < nsamples; i++) {
+        in_buffer[0][i] = buffer_l[i];
+        in_buffer[1][i] = buffer_r[i];
+    }
+
+    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
+				      nsamples, mp3buf, mp3buf_size);
+
+    free(in_buffer[0]);
+    free(in_buffer[1]);
+    return ret;
+}
+
+
+
+int
+lame_encode_buffer_long(lame_global_flags * gfp,
+                   const long buffer_l[],
+                   const long buffer_r[],
+                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int     ret, i;
+    sample_t *in_buffer[2];
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    if (nsamples == 0)
+        return 0;
+
+    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
+    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
+
+    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
+        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
+        return -2;
+    }
+
+    /* make a copy of input buffer, changing type to sample_t */
+    for (i = 0; i < nsamples; i++) {
+        in_buffer[0][i] = buffer_l[i];
+        in_buffer[1][i] = buffer_r[i];
+    }
+
+    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
+				      nsamples, mp3buf, mp3buf_size);
+
+    free(in_buffer[0]);
+    free(in_buffer[1]);
+    return ret;
+}
+
+
+
+
+
+
+
+
+
+
+
+int
+lame_encode_buffer_interleaved(lame_global_flags * gfp,
+                               short int buffer[],
+                               int nsamples,
+                               unsigned char *mp3buf, int mp3buf_size)
+{
+    int     ret, i;
+    short int *buffer_l;
+    short int *buffer_r;
+
+    buffer_l = malloc(sizeof(short int) * nsamples);
+    buffer_r = malloc(sizeof(short int) * nsamples);
+    if (buffer_l == NULL || buffer_r == NULL) {
+        return -2;
+    }
+    for (i = 0; i < nsamples; i++) {
+        buffer_l[i] = buffer[2 * i];
+        buffer_r[i] = buffer[2 * i + 1];
+    }
+    ret =
+        lame_encode_buffer(gfp, buffer_l, buffer_r, nsamples, mp3buf,
+                           mp3buf_size);
+    free(buffer_l);
+    free(buffer_r);
+    return ret;
+
+}
+
+
+/*}}}*/
+/* int           lame_encode                    (lame_global_flags* gfp, short int in_buffer[2][1152], char* mp3buf, int size )                                   *//*{{{ */
+
+
+/* old LAME interface.  use lame_encode_buffer instead */
+
+int
+lame_encode(lame_global_flags * const gfp,
+            const short int in_buffer[2][1152],
+            unsigned char *const mp3buf, const int size)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    return lame_encode_buffer(gfp, in_buffer[0], in_buffer[1], gfp->framesize,
+                              mp3buf, size);
+}
+
+/*}}}*/
+/* int           lame_encode_flush              (lame_global_flags* gfp, char* mp3buffer, int mp3buffer_size )                                                    *//*{{{ */
+
+/**/
+/* flush internal mp3 buffers,                                   */
+/**/
+
+int
+lame_encode_flush(lame_global_flags * gfp,
+                  unsigned char *mp3buffer, int mp3buffer_size)
+{
+    short int buffer[2][1152];
+    int     imp3 = 0, mp3count, mp3buffer_size_remaining;
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    memset(buffer, 0, sizeof(buffer));
+    mp3count = 0;
+
+    while (gfc->mf_samples_to_encode > 0) {
+
+        mp3buffer_size_remaining = mp3buffer_size - mp3count;
+
+        /* if user specifed buffer size = 0, dont check size */
+        if (mp3buffer_size == 0)
+            mp3buffer_size_remaining = 0;
+
+        /* send in a frame of 0 padding until all internal sample buffers
+         * are flushed
+         */
+        imp3 = lame_encode_buffer(gfp, buffer[0], buffer[1], gfp->framesize,
+                                  mp3buffer, mp3buffer_size_remaining);
+        /* don't count the above padding: */
+        gfc->mf_samples_to_encode -= gfp->framesize;
+
+        if (imp3 < 0) {
+            /* some type of fatal error */
+            return imp3;
+        }
+        mp3buffer += imp3;
+        mp3count += imp3;
+    }
+
+    mp3buffer_size_remaining = mp3buffer_size - mp3count;
+    /* if user specifed buffer size = 0, dont check size */
+    if (mp3buffer_size == 0)
+        mp3buffer_size_remaining = 0;
+
+    if (gfp->ogg) {
+#ifdef HAVE_VORBIS
+        /* ogg related stuff */
+        imp3 = lame_encode_ogg_finish(gfp, mp3buffer, mp3buffer_size_remaining);
+#endif
+    }
+    else {
+        /* mp3 related stuff.  bit buffer might still contain some mp3 data */
+        flush_bitstream(gfp);
+        /* write a id3 tag to the bitstream */
+        id3tag_write_v1(gfp);
+        imp3 = copy_buffer(mp3buffer, mp3buffer_size_remaining, &gfc->bs);
+    }
+
+    if (imp3 < 0) {
+        return imp3;
+    }
+    mp3count += imp3;
+    return mp3count;
+}
+
+/*}}}*/
+/* void          lame_close                     (lame_global_flags *gfp)                                                                                          *//*{{{ */
+
+/*
+ *
+ *      lame_close ()
+ *
+ *  frees internal buffers
+ *
+ */
+
+int
+lame_close(lame_global_flags * gfp)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+
+    if (gfc->Class_ID != LAME_ID)
+        return -3;
+
+    gfc->Class_ID = 0;
+
+    // this routien will free all malloc'd data in gfc, and then free gfc:
+    freegfc(gfc);
+
+    gfp->internal_flags = NULL;
+
+    if (gfp->lame_allocated_gfp)
+        free(gfp);
+
+    return 0;
+}
+
+
+/*}}}*/
+/* int           lame_encode_finish             (lame_global_flags* gfp, char* mp3buffer, int mp3buffer_size )                                                    *//*{{{ */
+
+
+/**/
+/* flush internal mp3 buffers, and free internal buffers         */
+/**/
+
+int
+lame_encode_finish(lame_global_flags * gfp,
+                   unsigned char *mp3buffer, int mp3buffer_size)
+{
+    int     ret = lame_encode_flush(gfp, mp3buffer, mp3buffer_size);
+
+    lame_close(gfp);
+
+    return ret;
+}
+
+/*}}}*/
+/* void          lame_mp3_tags_fid              (lame_global_flags *gfp,FILE *fpStream)                                                                           *//*{{{ */
+
+/**/
+/* write VBR Xing header, and ID3 version 1 tag, if asked for    */
+/**/
+void
+lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream)
+{
+    if (gfp->bWriteVbrTag && (gfp->VBR != vbr_off)) {
+        /* Map VBR_q to Xing quality value: 0=worst, 100=best */
+        int     nQuality = ((9-gfp->VBR_q) * 100) / 9;
+
+        /* Write Xing header again */
+        if (fpStream && !fseek(fpStream, 0, SEEK_SET))
+            PutVbrTag(gfp, fpStream, nQuality);
+    }
+
+
+}
+/*}}}*/
+/* lame_global_flags *lame_init                 (void)                                                                                                            *//*{{{ */
+
+lame_global_flags *
+lame_init(void)
+{
+    lame_global_flags *gfp;
+    int     ret;
+
+    gfp = calloc(1, sizeof(lame_global_flags));
+    if (gfp == NULL)
+        return NULL;
+
+    ret = lame_init_old(gfp);
+    if (ret != 0) {
+        free(gfp);
+        return NULL;
+    }
+
+    gfp->lame_allocated_gfp = 1;
+    return gfp;
+}
+
+/*}}}*/
+/* int           lame_init_old                  (lame_global_flags *gfp)                                                                                          *//*{{{ */
+
+/* initialize mp3 encoder */
+int
+lame_init_old(lame_global_flags * gfp)
+{
+    lame_internal_flags *gfc;
+
+    disable_FPE();      // disable floating point exceptions
+
+    memset(gfp, 0, sizeof(lame_global_flags));
+
+    if (NULL ==
+        (gfc = gfp->internal_flags =
+         calloc(1, sizeof(lame_internal_flags)))) return -1;
+
+    /* Global flags.  set defaults here for non-zero values */
+    /* see lame.h for description */
+    /* set integer values to -1 to mean that LAME will compute the
+     * best value, UNLESS the calling program as set it
+     * (and the value is no longer -1)
+     */
+
+
+    gfp->mode = NOT_SET;
+    gfp->original = 1;
+    gfp->in_samplerate = 1000 * 44.1;
+    gfp->num_channels = 2;
+    gfp->num_samples = MAX_U_32_NUM;
+
+    gfp->bWriteVbrTag = 1;
+    gfp->quality = -1;
+    gfp->allow_diff_short = -1;
+
+    gfp->lowpassfreq = 0;
+    gfp->highpassfreq = 0;
+    gfp->lowpasswidth = -1;
+    gfp->highpasswidth = -1;
+
+    gfp->padding_type = 2;
+    gfp->VBR = vbr_off;
+    gfp->VBR_q = 4;
+    gfp->VBR_mean_bitrate_kbps = 128;
+    gfp->VBR_min_bitrate_kbps = 0;
+    gfp->VBR_max_bitrate_kbps = 0;
+    gfp->VBR_hard_min = 0;
+
+
+    gfc->resample_ratio = 1;
+    gfc->lowpass_band = 32;
+    gfc->highpass_band = -1;
+    gfc->VBR_min_bitrate = 1; /* not  0 ????? */
+    gfc->VBR_max_bitrate = 13; /* not 14 ????? */
+
+    gfc->OldValue[0] = 180;
+    gfc->OldValue[1] = 180;
+    gfc->CurrentStep = 4;
+    gfc->masking_lower = 1;
+
+    gfp->ATHtype = -1;  /* default = -1 = set in lame_init_params */
+    gfp->useTemporal = 1;
+
+    /* The reason for
+     *       int mf_samples_to_encode = ENCDELAY + 288;
+     * ENCDELAY = internal encoder delay.  And then we have to add 288
+     * because of the 50% MDCT overlap.  A 576 MDCT granule decodes to
+     * 1152 samples.  To synthesize the 576 samples centered under this granule
+     * we need the previous granule for the first 288 samples (no problem), and
+     * the next granule for the next 288 samples (not possible if this is last
+     * granule).  So we need to pad with 288 samples to make sure we can
+     * encode the 576 samples we are interested in.
+     */
+    gfc->mf_samples_to_encode = ENCDELAY + 288;
+    gfc->mf_size = ENCDELAY - MDCTDELAY; /* we pad input with this many 0's */
+
+#ifdef KLEMM_44
+    /* XXX: this wasn't protectes by KLEMM_44 initially! */
+    gfc->last_ampl = gfc->ampl = +1.0;
+#endif
+
+    return 0;
+}
+
+/*}}}*/
+
+/*
+ *
+ *  some simple statistics
+ *
+ *  Robert Hegemann 2000-10-11
+ *
+ */
+
+/*  histogram of used bitrate indexes:
+ *  One has to weight them to calculate the average bitrate in kbps
+ *
+ *  bitrate indices:
+ *  there are 14 possible bitrate indices, 0 has the special meaning
+ *  "free format" which is not possible to mix with VBR and 15 is forbidden
+ *  anyway.
+ *
+ *  stereo modes:
+ *  0: LR   number of left-right encoded frames
+ *  1: LR-I number of left-right and intensity encoded frames
+ *  2: MS   number of mid-side encoded frames
+ *  3: MS-I number of mid-side and intensity encoded frames
+ *
+ *  4: number of encoded frames
+ *
+ */
+
+void
+lame_bitrate_hist(const lame_global_flags * const gfp, int bitrate_count[14])
+{
+    const lame_internal_flags *gfc;
+    int     i;
+
+    if (NULL == bitrate_count)
+        return;
+    if (NULL == gfp)
+        return;
+    gfc = gfp->internal_flags;
+    if (NULL == gfc)
+        return;
+
+    for (i = 0; i < 14; i++)
+        bitrate_count[i] = gfc->bitrate_stereoMode_Hist[i + 1][4];
+}
+
+
+void
+lame_bitrate_kbps(const lame_global_flags * const gfp, int bitrate_kbps[14])
+{
+    const lame_internal_flags *gfc;
+    int     i;
+
+    if (NULL == bitrate_kbps)
+        return;
+    if (NULL == gfp)
+        return;
+    gfc = gfp->internal_flags;
+    if (NULL == gfc)
+        return;
+
+    for (i = 0; i < 14; i++)
+        bitrate_kbps[i] = bitrate_table[gfp->version][i + 1];
+}
+
+
+
+void
+lame_stereo_mode_hist(const lame_global_flags * const gfp, int stmode_count[4])
+{
+    const lame_internal_flags *gfc;
+    int     i;
+
+    if (NULL == stmode_count)
+        return;
+    if (NULL == gfp)
+        return;
+    gfc = gfp->internal_flags;
+    if (NULL == gfc)
+        return;
+
+    for (i = 0; i < 4; i++) {
+        int     j, sum = 0;
+        for (j = 0; j < 14; j++)
+            sum += gfc->bitrate_stereoMode_Hist[j + 1][i];
+        stmode_count[i] = sum;
+    }
+}
+
+
+
+void
+lame_bitrate_stereo_mode_hist(const lame_global_flags * const gfp,
+                              int bitrate_stmode_count[14][4])
+{
+    const lame_internal_flags *gfc;
+    int     i;
+    int     j;
+
+    if (NULL == bitrate_stmode_count)
+        return;
+    if (NULL == gfp)
+        return;
+    gfc = gfp->internal_flags;
+    if (NULL == gfc)
+        return;
+
+    for (j = 0; j < 14; j++)
+        for (i = 0; i < 4; i++)
+            bitrate_stmode_count[j][i] = gfc->bitrate_stereoMode_Hist[j + 1][i];
+}
+
+/* end of lame.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lame.h
@@ -1,0 +1,953 @@
+/*
+ *	Interface to MP3 LAME encoding engine
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* $Id: lame.h,v 1.67 2001/03/12 04:38:35 markt Exp $ */
+
+#ifndef LAME_LAME_H
+#define LAME_LAME_H
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(WIN32)
+#undef CDECL
+#define CDECL _cdecl
+#else
+#define CDECL
+#endif
+
+
+typedef enum vbr_mode_e {
+  vbr_off=0,
+  vbr_mt,
+  vbr_rh,
+  vbr_abr,
+  vbr_mtrh,
+  vbr_default=vbr_rh  /* change this to change the default VBR mode of LAME */ 
+} vbr_mode;
+
+
+/* MPEG modes */
+typedef enum MPEG_mode_e {
+  STEREO=0,
+  JOINT_STEREO,
+  DUAL_CHANNEL,   /* LAME doesn't supports this! */
+  MONO,
+  NOT_SET,
+  MAX_INDICATOR   /* Don't use this! It's used for sanity checks. */ 
+} MPEG_mode;
+
+
+/***********************************************************************
+*
+*  Control Parameters set by User.  These parameters are here for
+*  backwards compatibility with the old, non-shared lib API.  
+*  Please use the lame_set_variablename() functions below
+*
+*
+***********************************************************************/
+typedef struct  {
+  /* input description */
+  unsigned long num_samples;  /* number of samples. default=2^32-1           */
+  int num_channels;           /* input number of channels. default=2         */
+  int in_samplerate;          /* input_samp_rate in Hz. default=44.1 kHz     */
+  int out_samplerate;         /* output_samp_rate.
+                                   default: LAME picks best value 
+                                   at least not used for MP3 decoding:
+                                   Remember 44.1 kHz MP3s and AC97           */
+  float scale;                /* scale input by this amount before encoding
+                                 at least not used for MP3 decoding          */
+
+  /* general control params */
+  int analysis;               /* collect data for a MP3 frame analyzer?      */
+  int bWriteVbrTag;           /* add Xing VBR tag?                           */
+  int disable_waveheader;     /* disable writing of .wav header, when
+                                 *decoding*                                  */
+  int decode_only;            /* use lame/mpglib to convert mp3/ogg to wav   */
+  int ogg;                    /* encode to Vorbis .ogg file                  */
+
+  int quality;                /* quality setting 0=best,  9=worst  default=5 */
+  MPEG_mode mode;             /* see enum above
+                                 default = LAME picks best value             */
+  int mode_fixed;             /* ignored                                     */
+  int mode_automs;            /* use a m/s threshold based on compression
+                                 ratio                                       */
+  int force_ms;               /* force M/S mode.  requires mode=1            */
+  int free_format;            /* use free format? default=0                  */
+
+  /*
+   * set either brate>0  or compression_ratio>0, LAME will compute
+   * the value of the variable not set.
+   * Default is compression_ratio = 11.025
+   */
+  int brate;                  /* bitrate                                    */
+  float compression_ratio;    /* sizeof(wav file)/sizeof(mp3 file)          */
+
+
+  /* frame params */
+  int copyright;                  /* mark as copyright. default=0           */
+  int original;                   /* mark as original. default=1            */
+  int error_protection;           /* use 2 bytes per frame for a CRC
+                                     checksum. default=0                    */
+  int padding_type;               /* 0=no padding, 1=always pad,
+                                     2=adjust padding, default=2            */
+  int extension;                  /* the MP3 'private extension' bit.
+                                     Meaningless                            */
+  int strict_ISO;                 /* enforce ISO spec as much as possible   */
+
+  /* quantization/noise shaping */
+  int disable_reservoir;          /* use bit reservoir?                     */
+  int experimentalX;            
+  int experimentalY;
+  int experimentalZ;
+  int exp_nspsytune;
+
+  /* VBR control */
+  vbr_mode VBR;
+  int VBR_q;
+  int VBR_mean_bitrate_kbps;
+  int VBR_min_bitrate_kbps;
+  int VBR_max_bitrate_kbps;
+  int VBR_hard_min;             /* strictly enforce VBR_min_bitrate
+                                   normaly, it will be violated for analog
+                                   silence                                 */
+
+
+  /* resampling and filtering */
+  int lowpassfreq;                /* freq in Hz. 0=lame choses.
+                                     -1=no filter                          */
+  int highpassfreq;               /* freq in Hz. 0=lame choses.
+                                     -1=no filter                          */
+  int lowpasswidth;               /* freq width of filter, in Hz
+                                     (default=15%)                         */
+  int highpasswidth;              /* freq width of filter, in Hz
+                                     (default=15%)                         */
+
+
+
+  /*
+   * psycho acoustics and other arguments which you should not change 
+   * unless you know what you are doing
+   */
+  int ATHonly;                    /* only use ATH                         */
+  int ATHshort;                   /* only use ATH for short blocks        */
+  int noATH;                      /* disable ATH                          */
+  int ATHtype;                    /* select ATH formula                   */
+  float ATHlower;                 /* lower ATH by this many db            */
+  int cwlimit;                    /* predictability limit                 */
+  int allow_diff_short;           /* allow blocktypes to differ between
+                                     channels?                            */
+  int useTemporal;                /* use temporal masking effect          */
+  int no_short_blocks;            /* disable short blocks                 */
+  int emphasis;                   /* Input PCM is emphased PCM (for
+                                     instance from one of the rarely
+                                     emphased CDs), it is STRONGLY not
+                                     recommended to use this, because
+				     psycho does not take it into account,
+				     and last but not least many decoders
+                                     don't care about these bits          */
+
+  struct {
+    void (*msgf)  (const char *format, va_list ap);
+    void (*debugf)(const char *format, va_list ap);
+    void (*errorf)(const char *format, va_list ap);
+  } report;
+
+  /************************************************************************/
+  /* internal variables, do not set...                                    */
+  /* provided because they may be of use to calling application           */
+  /************************************************************************/
+
+  int version;                    /* 0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)     */
+  int encoder_delay;
+  int framesize;                  
+  int frameNum;                   /* number of frames encoded             */
+  int totalframes;
+  int lame_allocated_gfp;         /* is this struct owned by calling
+                                     program or lame?                     */
+
+
+
+  /****************************************************************************/
+  /* more internal variables, which will not exist after lame_encode_finish() */
+  /****************************************************************************/
+  void *internal_flags;
+
+  /* VBR tags.  This data is here because VBR header is writen after
+   * input file is closed and *internal_flags struct is free'd */
+  int nZeroStreamSize;
+  int TotalFrameSize;
+  int* pVbrFrames;
+  int nVbrNumFrames;
+  int nVbrFrameBufferSize;
+
+
+} lame_global_flags;
+
+// I give up. Klemm has worn me down on this one... 
+typedef lame_global_flags lame_t;
+
+
+
+
+
+/***********************************************************************
+ *
+ *  The LAME API
+ *  These functions should be called, in this order, for each
+ *  MP3 file to be encoded 
+ *
+ ***********************************************************************/
+
+
+/*
+ * REQUIRED:
+ * initialize the encoder.  sets default for all encoder paramters,
+ * returns -1 if some malloc()'s failed
+ * otherwise returns 0
+ */
+lame_global_flags * CDECL lame_init(void);
+/* obsolete version */
+int CDECL lame_init_old(lame_global_flags *);
+
+
+/*
+ * OPTIONAL:
+ * set as needed to override defaults
+ */
+
+/********************************************************************
+ *  input stream description
+ ***********************************************************************/
+// number of samples.  default = 2^32-1  
+int CDECL lame_set_num_samples(lame_global_flags *, unsigned long);
+unsigned long CDECL lame_get_num_samples(const lame_global_flags *);
+
+// input sample rate in Hz.  default = 44100hz
+int CDECL lame_set_in_samplerate(lame_global_flags *, int);
+int CDECL lame_get_in_samplerate(const lame_global_flags *);
+
+// number of channels in input stream. default=2 
+int CDECL lame_set_num_channels(lame_global_flags *, int);
+int CDECL lame_get_num_channels(const lame_global_flags *);
+
+// scale the input by this amount before encoding.  default=0 (disabled)
+// (not used by decoding routines)
+int CDECL lame_set_scale(lame_global_flags *, float);
+float CDECL lame_get_scale(const lame_global_flags *);
+
+// output sample rate in Hz.  default = 0, which means LAME picks best value 
+// based on the amount of compression.  MPEG only allows:
+// MPEG1    32, 44.1,   48khz
+// MPEG2    16, 22.05,  24
+// MPEG2.5   8, 11.025, 12
+// (not used by decoding routines)
+int CDECL lame_set_out_samplerate(lame_global_flags *, int);
+int CDECL lame_get_out_samplerate(const lame_global_flags *);
+
+
+/********************************************************************
+ *  general control parameters
+ ***********************************************************************/
+// 1=cause LAME to collect data for an MP3 frame analzyer. default=0
+int CDECL lame_set_analysis(lame_global_flags *, int);
+int CDECL lame_get_analysis(const lame_global_flags *);
+
+// 1 = write a Xing VBR header frame.
+// default = 1 for VBR/ABR modes, 0 for CBR mode
+// this variable must have been added by a Hungarian notation Windows programmer :-)
+int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int);
+int CDECL lame_get_bWriteVbrTag(const lame_global_flags *);
+
+// 1=disable writing a wave header with *decoding*.  default=0
+int CDECL lame_set_disable_waveheader(lame_global_flags *, int);
+int CDECL lame_get_disable_waveheader(const lame_global_flags *);
+
+// 1=decode only.  use lame/mpglib to convert mp3/ogg to wav.  default=0
+int CDECL lame_set_decode_only(lame_global_flags *, int);
+int CDECL lame_get_decode_only(const lame_global_flags *);
+
+// 1=encode a Vorbis .ogg file.  default=0
+int CDECL lame_set_ogg(lame_global_flags *, int);
+int CDECL lame_get_ogg(const lame_global_flags *);
+
+// internal algorithm selection.  True quality is determined by the bitrate
+// but this variable will effect quality by selecting expensive or cheap algorithms.
+// quality=0..9.  0=best (very slow).  9=worst.  
+// recommended:  2     near-best quality, not too slow
+//               5     good quality, fast
+//               7     ok quality, really fast
+int CDECL lame_set_quality(lame_global_flags *, int);
+int CDECL lame_get_quality(const lame_global_flags *);
+
+// mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono
+// default: lame picks based on compression ration and input channels
+int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
+MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
+
+// mode_automs.  Us a M/S mode with a switching threshold based on 
+// compression ratio
+// default = 0 (disabled)
+int CDECL lame_set_mode_automs(lame_global_flags *, int);
+int CDECL lame_get_mode_automs(const lame_global_flags *);
+
+// force_ms.  Force M/S for all frames.  For testing only.
+// default = 0 (disabled)
+int CDECL lame_set_force_ms(lame_global_flags *, int);
+int CDECL lame_get_force_ms(const lame_global_flags *);
+
+// use free_format?  default = 0 (disabled)
+int CDECL lame_set_free_format(lame_global_flags *, int);
+int CDECL lame_get_free_format(const lame_global_flags *);
+
+/*
+ * OPTIONAL:
+ * Set printf like error/debug/message reporting functions.
+ * The second argument has to be a pointer to a function which looks like
+ *   void my_debugf(const char *format, va_list ap)
+ *   {
+ *       (void) vfprintf(stdout, format, ap);
+ *   }
+ * If you use NULL as the value of the pointer in the set function, the
+ * lame buildin function will be used (prints to stderr).
+ * To quiet any output you have to replace the body of the example function
+ * with just "return;" and use it in the set function.
+ */
+int CDECL lame_set_errorf(lame_global_flags *,
+                          void (*func)(const char *, va_list));
+int CDECL lame_set_debugf(lame_global_flags *,
+                          void (*func)(const char *, va_list));
+int CDECL lame_set_msgf  (lame_global_flags *,
+                          void (*func)(const char *, va_list));
+
+
+
+/* set one of brate compression ratio.  default is compression ratio of 11.  */
+int CDECL lame_set_brate(lame_global_flags *, int);
+int CDECL lame_get_brate(const lame_global_flags *);
+int CDECL lame_set_compression_ratio(lame_global_flags *, float);
+float CDECL lame_get_compression_ratio(const lame_global_flags *);
+
+/********************************************************************
+ *  frame params
+ ***********************************************************************/
+// mark as copyright.  default=0
+int CDECL lame_set_copyright(lame_global_flags *, int);
+int CDECL lame_get_copyright(const lame_global_flags *);
+
+// mark as original.  default=1
+int CDECL lame_set_original(lame_global_flags *, int);
+int CDECL lame_get_original(const lame_global_flags *);
+
+// error_protection.  Use 2 bytes from each fraome for CRC checksum. default=0
+int CDECL lame_set_error_protection(lame_global_flags *, int);
+int CDECL lame_get_error_protection(const lame_global_flags *);
+
+// padding_type.  0=pad no frames  1=pad all frames 2=adjust padding(default)
+int CDECL lame_set_padding_type(lame_global_flags *, int);
+int CDECL lame_get_padding_type(const lame_global_flags *);
+
+// MP3 'private extension' bit  Meaningless
+int CDECL lame_set_extension(lame_global_flags *, int);
+int CDECL lame_get_extension(const lame_global_flags *);
+
+// enforce strict ISO complience.  default=0
+int CDECL lame_set_strict_ISO(lame_global_flags *, int);
+int CDECL lame_get_strict_ISO(const lame_global_flags *);
+ 
+
+/********************************************************************
+ * quantization/noise shaping 
+ ***********************************************************************/
+
+// disable the bit reservoir. For testing only. default=0
+int CDECL lame_set_disable_reservoir(lame_global_flags *, int);
+int CDECL lame_get_disable_reservoir(const lame_global_flags *);
+
+// select a different "best quantization" function. default=0 
+int CDECL lame_set_experimentalX(lame_global_flags *, int);
+int CDECL lame_get_experimentalX(const lame_global_flags *);
+
+// another experimental option.  for testing only
+int CDECL lame_set_experimentalY(lame_global_flags *, int);
+int CDECL lame_get_experimentalY(const lame_global_flags *);
+
+// another experimental option.  for testing only
+int CDECL lame_set_experimentalZ(lame_global_flags *, int);
+int CDECL lame_get_experimentalZ(const lame_global_flags *);
+
+// Naoki's psycho acoustic model.  default=0
+int CDECL lame_set_exp_nspsytune(lame_global_flags *, int);
+int CDECL lame_get_exp_nspsytune(const lame_global_flags *);
+
+
+
+/********************************************************************
+ * VBR control
+ ***********************************************************************/
+// Types of VBR.  default = vbr_off = CBR
+int CDECL lame_set_VBR(lame_global_flags *, vbr_mode);
+vbr_mode CDECL lame_get_exp_VBR(const lame_global_flags *);
+
+// VBR quality level.  0=highest  9=lowest 
+int CDECL lame_set_VBR_q(lame_global_flags *, int);
+int CDECL lame_get_VBR_q(const lame_global_flags *);
+
+// Ignored except for VBR=vbr_abr (ABR mode)
+int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *);
+
+int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *);
+
+int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *);
+
+// 1=stricetly enforce VBR_min_bitrate.  Normally it will be violated for
+// analog silence
+int CDECL lame_set_VBR_hard_min(lame_global_flags *, int);
+int CDECL lame_get_VBR_hard_min(const lame_global_flags *);
+
+
+/********************************************************************
+ * Filtering control
+ ***********************************************************************/
+// freq in Hz to apply lowpass. Default = 0 = lame chooses.  -1 = disabled
+int CDECL lame_set_lowpassfreq(lame_global_flags *, int);
+int CDECL lame_get_lowpassfreq(const lame_global_flags *);
+// width of transition band, in Hz.  Default = one polyphase filter band
+int CDECL lame_set_lowpasswidth(lame_global_flags *, int);
+int CDECL lame_get_lowpasswidth(const lame_global_flags *);
+
+// freq in Hz to apply highpass. Default = 0 = lame chooses.  -1 = disabled
+int CDECL lame_set_highpassfreq(lame_global_flags *, int);
+int CDECL lame_get_highpassfreq(const lame_global_flags *);
+// width of transition band, in Hz.  Default = one polyphase filter band
+int CDECL lame_set_highpasswidth(lame_global_flags *, int);
+int CDECL lame_get_highpasswidth(const lame_global_flags *);
+
+
+/********************************************************************
+ * psycho acoustics and other arguments which you should not change 
+ * unless you know what you are doing
+ ***********************************************************************/
+// only use ATH for masking
+int CDECL lame_set_ATHonly(lame_global_flags *, int);
+int CDECL lame_get_ATHonly(const lame_global_flags *);
+
+// only use ATH for short blocks
+int CDECL lame_set_ATHshort(lame_global_flags *, int);
+int CDECL lame_get_ATHshort(const lame_global_flags *);
+
+// disable ATH
+int CDECL lame_set_noATH(lame_global_flags *, int);
+int CDECL lame_get_noATH(const lame_global_flags *);
+
+// select ATH formula
+int CDECL lame_set_ATHtype(lame_global_flags *, int);
+int CDECL lame_get_ATHtype(const lame_global_flags *);
+
+// lower ATH by this many db
+int CDECL lame_set_ATHlower(lame_global_flags *, float);
+float CDECL lame_get_ATHlower(const lame_global_flags *);
+
+// predictability limit (ISO tonality formula)
+int CDECL lame_set_cwlimit(lame_global_flags *, int);
+int CDECL lame_get_cwlimit(const lame_global_flags *);
+
+// allow blocktypes to differ between channels?
+// default: 0 for jstereo, 1 for stereo
+int CDECL lame_set_allow_diff_short(lame_global_flags *, int);
+int CDECL lame_get_allow_diff_short(const lame_global_flags *);
+
+// use temporal masking effect (default = 1)
+int CDECL lame_set_useTemporal(lame_global_flags *, int);
+int CDECL lame_get_useTemporal(const lame_global_flags *);
+
+// disable short blocks
+int CDECL lame_set_no_short_blocks(lame_global_flags *, int);
+int CDECL lame_get_no_short_blocks(const lame_global_flags *);
+
+/* Input PCM is emphased PCM (for instance from one of the rarely
+   emphased CDs), it is STRONGLY not recommended to use this, because
+   psycho does not take it into account, and last but not least many decoders
+   ignore these bits */
+int CDECL lame_set_emphasis(lame_global_flags *, int);
+int CDECL lame_get_emphasis(const lame_global_flags *);
+
+
+
+/************************************************************************/
+/* internal variables, cannot be set...                                 */
+/* provided because they may be of use to calling application           */
+/************************************************************************/
+// version  0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)    
+int CDECL lame_get_version(const lame_global_flags *);
+
+// encoder delay
+int CDECL lame_get_encoder_delay(const lame_global_flags *);
+
+// size of MPEG frame
+int CDECL lame_get_framesize(const lame_global_flags *);
+
+// number of frames encoded so far
+int CDECL lame_get_frameNum(const lame_global_flags *);
+
+// lame's estimate of the total number of frames to be encoded
+// only valid if calling program set num_samples 
+int CDECL lame_get_totalframes(const lame_global_flags *);
+
+
+
+
+
+
+
+
+/*
+ * REQUIRED:
+ * sets more internal configuration based on data provided above.
+ * returns -1 if something failed.
+ */
+int CDECL lame_init_params(lame_global_flags *);
+
+
+/*
+ * OPTIONAL:
+ * get the version number, in a string. of the form:  
+ * "3.63 (beta)" or just "3.63". 
+ */
+const /*@observer@*/ char*  CDECL get_lame_version       ( void );
+const /*@observer@*/ char*  CDECL get_lame_short_version ( void );
+const /*@observer@*/ char*  CDECL get_psy_version        ( void );
+const /*@observer@*/ char*  CDECL get_mp3x_version       ( void );
+const /*@observer@*/ char*  CDECL get_lame_url           ( void );
+
+/*
+ * OPTIONAL:
+ * get the version numbers in numerical form.
+ */
+typedef struct {
+    /* generic LAME version */
+    int major;
+    int minor;
+    int alpha;               /* 0 if not an alpha version                  */
+    int beta;                /* 0 if not a beta version                    */
+
+    /* version of the psy model */
+    int psy_major;
+    int psy_minor;
+    int psy_alpha;           /* 0 if not an alpha version                  */
+    int psy_beta;            /* 0 if not a beta version                    */
+
+    /* compile time features */
+    const char *features;    /* Don't make assumptions about the contents! */
+} lame_version_t;
+void CDECL get_lame_version_numerical ( lame_version_t *const );
+
+
+/*
+ * OPTIONAL:
+ * print internal lame configuration to message handler
+ */
+void CDECL lame_print_config(const lame_global_flags*  gfp);
+
+
+
+
+/*
+ * input pcm data, output (maybe) mp3 frames.
+ * This routine handles all buffering, resampling and filtering for you.
+ * 
+ * return code     number of bytes output in mp3buf. Can be 0 
+ *                 -1:  mp3buf was too small
+ *                 -2:  malloc() problem
+ *                 -3:  lame_init_params() not called
+ *                 -4:  psycho acoustic problems 
+ *                 -5:  ogg cleanup encoding error
+ *                 -6:  ogg frame encoding error
+ *
+ * The required mp3buf_size can be computed from num_samples, 
+ * samplerate and encoding rate, but here is a worst case estimate:
+ *
+ * mp3buf_size in bytes = 1.25*num_samples + 7200
+ *
+ * I think a tighter bound could be:  (mt, March 2000)
+ * MPEG1:
+ *    num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512
+ * MPEG2:
+ *    num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256
+ *
+ * but test first if you use that!
+ *
+ * set mp3buf_size = 0 and LAME will not check if mp3buf_size is
+ * large enough.
+ *
+ * NOTE:
+ * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels
+ * will be averaged into the L channel before encoding only the L channel
+ * This will overwrite the data in buffer_l[] and buffer_r[].
+ * 
+*/
+int CDECL lame_encode_buffer (
+        lame_global_flags*  gfp,           /* global context handle         */
+        const short int     buffer_l [],   /* PCM data for left channel     */
+        const short int     buffer_r [],   /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+/*
+ * as above, but input has L & R channel data interleaved.
+ * NOTE: 
+ * num_samples = number of samples in the L (or R)
+ * channel, not the total number of samples in pcm[]  
+ */
+int CDECL lame_encode_buffer_interleaved(
+        lame_global_flags*  gfp,           /* global context handlei        */
+        short int           pcm[],         /* PCM data for left and right
+                                              channel, interleaved          */
+        int                 num_samples,   /* number of samples per channel,
+                                              _not_ number of samples in
+                                              pcm[]                         */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        int                 mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+
+/* as lame_encode_buffer, but for 'float's */
+int CDECL lame_encode_buffer_float(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const float     buffer_l [],       /* PCM data for left channel     */
+        const float     buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+/* as lame_encode_buffer, but for long's' */
+int CDECL lame_encode_buffer_long(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const long     buffer_l [],       /* PCM data for left channel     */
+        const long     buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+
+
+
+
+
+/*
+ * REQUIRED:
+ * lame_encode_finish will flush the buffers and may return a 
+ * final few mp3 frames.  'mp3buf' should be at least 7200 bytes long
+ * to hold all possible emitted data.
+ *
+ * will also write id3v1 tags (if any) into the bitstream       
+ *
+ * return code = number of bytes output to mp3buf. Can be 0
+ */
+int CDECL lame_encode_flush(
+        lame_global_flags *  gfp,    /* global context handle                 */
+        unsigned char*       mp3buf, /* pointer to encoded MP3 stream         */
+        int                  size);  /* number of valid octets in this stream */
+
+
+#ifdef KLEMM_44
+ 
+int CDECL lame_encode_pcm (
+        lame_t* const   lame,      /* lame context handle                     */
+        octetstream_t*  os,        /* octet stream object                     */
+        const void*     pcm,       /* pointer to PCM data                     */
+        size_t          len,       /* samples per channel in this data stream */
+        uint32_t        flags );   /* PCM data description field              */
+
+int CDECL lame_encode_pcm_flush (
+        lame_t*        const  lame,  /* lame context handle                   */
+        octetstream_t* const  os );  /* octet stream object                   */
+ 
+#endif /* KLEMM_44 */
+
+
+/*
+ * OPTIONAL:    some simple statistics
+ * a bitrate histogram to visualize the distribution of used frame sizes
+ * a stereo mode histogram to visualize the distribution of used stereo
+ *   modes, useful in joint-stereo mode only
+ *   0: LR    left-right encoded
+ *   1: LR-I  left-right and intensity encoded (currently not supported)
+ *   2: MS    mid-side encoded
+ *   3: MS-I  mid-side and intensity encoded (currently not supported)
+ *
+ * attention: don't call them after lame_encode_finish
+ * suggested: lame_encode_flush -> lame_*_hist -> lame_close
+ */
+
+/*@-fixedformalarray@*/ 
+void CDECL lame_bitrate_hist( 
+        const lame_global_flags *const gfp, 
+              int                      bitrate_count[14] );
+void CDECL lame_bitrate_kbps( 
+        const lame_global_flags *const gfp, 
+              int                      bitrate_kbps [14] );
+void CDECL lame_stereo_mode_hist( 
+        const lame_global_flags *const gfp, 
+              int                      stereo_mode_count[4] );
+
+void CDECL lame_bitrate_stereo_mode_hist ( 
+        const lame_global_flags*  gfp, 
+        int  bitrate_stmode_count [14] [4] );
+/*@=fixedformalarray@*/
+
+
+/*
+ * OPTIONAL:
+ * lame_mp3_tags_fid will append a Xing VBR tag to the mp3 file with file
+ * pointer fid.  These calls perform forward and backwards seeks, so make
+ * sure fid is a real file.  Make sure lame_encode_flush has been called,
+ * and all mp3 data has been written to the file before calling this
+ * function.
+ * NOTE:
+ * if VBR  tags are turned off by the user, or turned off by LAME because
+ * the output is not a regular file, this call does nothing
+*/
+void CDECL lame_mp3_tags_fid(lame_global_flags *,FILE* fid);
+
+
+/*
+ * REQUIRED:
+ * final call to free all remaining buffers
+ */
+int  CDECL lame_close (lame_global_flags *);
+
+/*
+ * OBSOLETE:
+ * lame_encode_finish combines lame_encode_flush() and lame_close() in
+ * one call.  However, once this call is made, the statistics routines
+ * will no longer work because the data will have been cleared
+ */
+int CDECL lame_encode_finish(
+        lame_global_flags*  gfp,
+        unsigned char*      mp3buf,
+        int                 size );
+
+
+
+
+
+
+
+/*********************************************************************
+ *
+ * decoding 
+ *
+ * a simple interface to mpglib, part of mpg123, is also included if
+ * libmp3lame is compiled with HAVE_MPGLIB
+ *
+ *********************************************************************/
+typedef struct {
+  int header_parsed;   /* 1 if header was parsed and following data was
+                          computed                                       */
+  int stereo;          /* number of channels                             */
+  int samplerate;      /* sample rate                                    */
+  int bitrate;         /* bitrate                                        */
+  int mode;            /* mp3 frame type                                 */
+  int mode_ext;        /* mp3 frame type                                 */
+  int framesize;       /* number of samples per mp3 frame                */
+
+  /* this data is only computed if mpglib detects a Xing VBR header */
+  unsigned long nsamp; /* number of samples in mp3 file.                 */
+  int totalframes;     /* total number of frames in mp3 file             */
+
+  /* this data is not currently computed by the mpglib routines */
+  int framenum;        /* frames decoded counter                         */
+} mp3data_struct;
+
+
+/* required call to initialize decoder */
+int CDECL lame_decode_init(void);
+
+/*********************************************************************
+ * input 1 mp3 frame, output (maybe) pcm data.  
+ * lame_decode() return code:
+ *   -1: error
+ *    0: need more data
+ *  n>0: size of pcm output
+ *********************************************************************/
+int CDECL lame_decode(
+        unsigned char *  mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[] );
+
+/* same as lame_decode, and also returns mp3 header data */
+int CDECL lame_decode_headers(
+        unsigned char*   mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[],
+        mp3data_struct*  mp3data );
+
+/* same as lame_decode, but returns at most one frame */
+int CDECL lame_decode1(
+        unsigned char*  mp3buf,
+        int             len,
+        short           pcm_l[],
+        short           pcm_r[] );
+
+/* same as lame_decode1, but returns at most one frame and mp3 header data */
+int CDECL lame_decode1_headers(
+        unsigned char*   mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[],
+        mp3data_struct*  mp3data );
+
+#if 0
+/* Also useful for decoding is the ability to parse Xing VBR headers: */
+#define NUMTOCENTRIES 100
+typedef struct
+{
+  int		h_id;			/* from MPEG header, 0=MPEG2, 1=MPEG1 */
+  int		samprate;		/* determined from MPEG header        */
+  int		flags;			/* from Vbr header data               */
+  int		frames;			/* total bit stream frames from Vbr
+                                           header data                        */
+  int		bytes;			/* total bit stream bytes from Vbr
+                                           header data                        */
+  int		vbr_scale;		/* encoded vbr scale from Vbr header
+                                           data                               */
+  unsigned char	toc[NUMTOCENTRIES];	/* may be NULL if toc not desired     */
+  int           headersize;             /* size of VBR header, in bytes       */
+}   VBRTAGDATA;
+
+int CDECL GetVbrTag(
+        VBRTAGDATA*     pTagData,
+        unsigned char*  buf);
+#endif
+
+
+
+
+
+
+
+/*********************************************************************
+ *
+ * id3tag stuff
+ *
+ *********************************************************************/
+
+/*
+ * id3tag.h -- Interface to write ID3 version 1 and 2 tags.
+ *
+ * Copyright (C) 2000 Don Melton.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* utility to obtain alphabetically sorted list of genre names with numbers */
+extern void id3tag_genre_list(
+        void (*handler)(int, const char *, void *),
+        void*  cookie);
+
+extern void id3tag_init   (lame_global_flags *gfp);
+
+/* force addition of version 2 tag */
+extern void id3tag_add_v2   (lame_global_flags *gfp);
+
+/* add only a version 1 tag */
+extern void id3tag_v1_only  (lame_global_flags *gfp);
+
+/* add only a version 2 tag */
+extern void id3tag_v2_only  (lame_global_flags *gfp);
+
+/* pad version 1 tag with spaces instead of nulls */
+extern void id3tag_space_v1 (lame_global_flags *gfp);
+
+/* pad version 2 tag with extra 128 bytes */
+extern void id3tag_pad_v2   (lame_global_flags *gfp);
+
+extern void id3tag_set_title(
+        lame_global_flags*  gfp,
+        const char*         title );
+extern void id3tag_set_artist(
+        lame_global_flags*  gfp,
+        const char*         artist );
+extern void id3tag_set_album(
+        lame_global_flags*  gfp,
+        const char*         album );
+extern void id3tag_set_year(
+        lame_global_flags*  gfp,
+        const char*         year );
+extern void id3tag_set_comment(
+        lame_global_flags*  gfp,
+        const char*         comment );
+extern void id3tag_set_track(
+        lame_global_flags*  gfp,
+        const char*         track );
+
+/* return non-zero result if genre name or number is invalid */
+extern int id3tag_set_genre(
+        lame_global_flags*  gfp,
+        const char*         genre );
+
+/***********************************************************************
+*
+*  list of valid bitrates [kbps] & sample frequencies [Hz].
+*  first index: 0: MPEG-2   values  (sample frequencies 16...24 kHz) 
+*               1: MPEG-1   values  (sample frequencies 32...48 kHz)
+*               2: MPEG-2.5 values  (sample frequencies  8...12 kHz)
+***********************************************************************/
+extern const int      bitrate_table    [3] [16];
+extern const int      samplerate_table [3] [ 4];
+
+
+
+/* maximum size of mp3buffer needed if you encode at most 1152 samples for
+   each call to lame_encode_buffer.  see lame_encode_buffer() below  
+   (LAME_MAXMP3BUFFER is now obsolete)  */
+#define LAME_MAXMP3BUFFER   16384
+
+
+#if defined(__cplusplus)
+}
+#endif
+#endif /* LAME_LAME_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lameerror.h
@@ -1,0 +1,26 @@
+/*
+ *  A collection of LAME Error Codes
+ *
+ *  Please use the constants defined here instead of some arbitrary
+ *  values. Currently the values starting at -10 to avoid intersection
+ *  with the -1, -2, -3 and -4 used in the current code.
+ *
+ *  May be this should be a part of the include/lame.h.
+ */
+
+typedef enum {
+    LAME_OKAY             =   0,
+    LAME_NOERROR          =   0,
+    LAME_GENERICERROR     =  -1,
+    LAME_NOMEM            = -10,
+    LAME_BADBITRATE       = -11,
+    LAME_BADSAMPFREQ      = -12,
+    LAME_INTERNALERROR    = -13,
+    
+    FRONTEND_READERROR    = -80,
+    FRONTEND_WRITEERROR   = -81,
+    FRONTEND_FILETOOLARGE = -82,
+    
+} lame_errorcodes_t;
+
+/* end of lameerror.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lametime.c
@@ -1,0 +1,89 @@
+/*
+ *	Lame time routines source file
+ *
+ *	Copyright (c) 2000 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: lametime.c,v 1.10 2001/02/26 18:57:20 markt Exp $ */
+
+/*
+ * name:        GetCPUTime ( void )
+ *
+ * description: returns CPU time used by the process
+ * input:       none
+ * output:      time in seconds
+ * known bugs:  may not work in SMP and RPC
+ * conforming:  ANSI C
+ *
+ * There is some old difficult to read code at the end of this file.
+ * Can someone integrate this into this function (if useful)?
+ */
+
+#define _BSD_EXTENSION
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+
+#include "lametime.h"
+
+double GetCPUTime ( void )
+{
+    return clock () / (double) CLOCKS_PER_SEC;
+}
+
+/*
+ * name:        GetRealTime ( void )
+ *
+ * description: returns real (human) time elapsed relative to a fixed time (mostly 1970-01-01 00:00:00)
+ * input:       none
+ * output:      time in seconds
+ * known bugs:  bad precision with time()
+ */
+
+double GetRealTime ( void )			/* conforming:  SVr4, BSD 4.3 */
+{
+    struct timeval  t;
+
+    if ( 0 != gettimeofday (&t, NULL) )
+        assert (0);
+    return t.tv_sec + 1.e-6 * t.tv_usec;
+} 
+
+int  lame_set_stream_binary_mode ( FILE* const fp )
+{
+    return 0;
+}
+
+off_t  lame_get_file_size ( const char* const filename )
+{
+    struct stat       sb;
+
+    if ( 0 == stat ( filename, &sb ) )
+        return sb.st_size;
+    return (off_t) -1;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/lametime.h
@@ -1,0 +1,35 @@
+/*
+ *	Lame time routines include file
+ *
+ *	Copyright (c) 2000 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_LAMETIME_H
+#define LAME_LAMETIME_H
+
+#include <sys/types.h>
+#include "lame.h"
+
+extern double  GetCPUTime  ( void );
+extern double  GetRealTime ( void );
+
+extern int     lame_set_stream_binary_mode ( FILE* const fp );
+extern off_t   lame_get_file_size          ( const char* const filename );
+
+#endif /* LAME_LAMETIME_H */
+                              
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/machine.h
@@ -1,0 +1,147 @@
+/*
+ *	Machine dependent defines/includes for LAME.
+ *
+ *	Copyright (c) 1999 A.L. Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_MACHINE_H
+#define LAME_MACHINE_H
+
+#include <stdio.h>
+#include <memory.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef HAVE_STRCHR
+#  define strchr index
+#  define strrchr rindex
+# endif
+char *strchr (), *strrchr ();
+# ifndef HAVE_MEMCPY
+#  define memcpy(d, s, n) bcopy ((s), (d), (n))
+#  define memmove(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif
+
+#if  defined(__riscos__)  &&  defined(FPA10)
+# include "ymath.h"
+#else
+# include <math.h>
+#endif
+
+#include <ctype.h>
+
+#ifdef HAVE_ERRNO_H
+# include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if defined(macintosh)
+# include <types.h>
+# include <stat.h>
+#else
+# include <sys/types.h>
+# include <sys/stat.h>
+#endif
+
+/* 
+ * 3 different types of pow() functions:
+ *   - table lookup
+ *   - pow()
+ *   - exp()   on some machines this is claimed to be faster than pow()
+ */
+
+#define POW20(x)  pow20[x]
+//#define POW20(x)  pow(2.0,((double)(x)-210)*.25)
+//#define POW20(x)  exp( ((double)(x)-210)*(.25*LOG2) )
+
+#define IPOW20(x)  ipow20[x]
+//#define IPOW20(x)  exp( -((double)(x)-210)*.1875*LOG2 )
+//#define IPOW20(x)  pow(2.0,-((double)(x)-210)*.1875)
+
+
+/* in case this is used without configure */
+#ifndef inline
+# define inline
+#endif
+/* compatibility */
+#define INLINE inline
+
+#if defined(_MSC_VER)
+# undef inline
+# define inline _inline
+#elif defined(__SASC) || defined(__GNUC__)
+/* if __GNUC__ we always want to inline, not only if the user requests it */
+# undef inline
+# define inline __inline
+#endif
+
+#if    defined(_MSC_VER)
+# pragma warning( disable : 4244 )
+//# pragma warning( disable : 4305 )
+#endif
+
+/*
+ * FLOAT    for variables which require at least 32 bits
+ * FLOAT8   for variables which require at least 64 bits
+ *
+ * On some machines, 64 bit will be faster than 32 bit.  Also, some math
+ * routines require 64 bit float, so setting FLOAT=float will result in a
+ * lot of conversions.
+ */
+
+#if ( defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__) )
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#else
+# ifndef FLOAT
+typedef float   FLOAT;
+# endif
+#endif
+
+#ifndef FLOAT8  /* NOTE: RH: 7/00:  if FLOAT8=float, it breaks resampling and VBR code */
+typedef double  FLOAT8;
+#endif
+
+/* Various integer types */
+
+#if   defined _WIN32 && !defined __CYGWIN__
+typedef unsigned char	u_char;
+#elif defined __DECALPHA__
+// do nothing
+#elif defined OS_AMIGAOS
+// do nothing
+#elif defined __DJGPP__
+typedef unsigned char	u_char;
+#elif !defined __GNUC__  ||  defined __STRICT_ANSI__
+typedef unsigned char	u_char;
+#else
+// do nothing
+#endif
+
+/* sample_t must be floating point, at least 32 bits */
+typedef FLOAT     sample_t;
+typedef sample_t  stereo_t [2];
+
+#endif
+
+/* end of machine.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/main.c
@@ -1,0 +1,293 @@
+/* mp3enc - encode audio files in MP3 format */
+
+/*
+ *	Command line frontend program
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *                    2000 Takehiro TOMIANGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: main.c,v 1.46 2001/03/11 11:24:25 aleidinger Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <memory.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/*
+ main.c is example code for how to use libmp3lame.a.  To use this library,
+ you only need the library and lame.h.  All other .h files are private
+ to the library.
+*/
+#include "lame.h"
+
+#include "brhist.h"
+#include "parse.h"
+#include "main.h"
+#include "get_audio.h"
+#include "timestatus.h"
+
+/*
+*
+* main
+*
+* PURPOSE:  MPEG-1,2 Layer III encoder with GPSYCHO
+* psychoacoustic model.
+*
+*/
+
+int
+parse_args_from_string(lame_global_flags *const gfp, const char *p)
+{
+	/* Quick & very Dirty */
+	int c = 0, ret;
+	char *f, *q, *r[128];
+
+	if (p == NULL || *p == '\0')
+		return 0;
+
+	f = q = malloc(strlen(p) + 1);
+	strcpy (q, p);
+
+	r[c++] = "lhama";
+	for (;;) {
+		r[c++] = q;
+		while (*q != ' ' && *q != '\0')
+			q++;
+		if (*q == '\0')
+			break;
+		*q++ = '\0';
+	}
+	r[c] = NULL;
+
+	ret = parse_args(gfp, c, r);
+	free(f);
+	return ret;
+}
+
+int
+main(int argc, char **argv)
+{
+	int i, iread, imp3, ret;
+	short Buffer[2][1152];
+	unsigned char mp3buffer[LAME_MAXMP3BUFFER];
+	FILE *outf;
+	lame_global_flags *gf;
+	static char inPath[]  = "-";
+	static char outPath[] = "-";
+	static const char *mode_names[2][4] = {
+		{ "stereo", "j-stereo", "dual-ch", "single-ch" },
+		{ "stereo", "force-ms", "dual-ch", "single-ch" }
+	};
+
+	/* initialize libmp3lame */
+	input_format = sf_unknown;
+	if (NULL == (gf = lame_init()) ) {
+		fprintf(stderr, "mp3enc: fatal error during initialization\n");
+		return 1;
+	}
+	/*
+	 * parse the command line arguments, setting various flags in the
+	 * struct 'gf'.  If you want to parse your own arguments,
+	 * or call libmp3lame from a program which uses a GUI to set arguments,
+	 * skip this call and set the values of interest in the gf struct.
+	 * (see the file API & lame.h for documentation about these parameters)
+	 */
+	parse_args_from_string(gf, getenv("LAMEOPT"));
+	ret = parse_args(gf, argc, argv);
+	if (ret < 0)
+		return ret == -2? 0: 1;
+	if (update_interval < 0.)
+		update_interval = 2.;
+
+	/*
+	 * open the wav/aiff/raw pcm or mp3 input file.  This call will
+	 * open the file, try to parse the headers and
+	 * set gf.samplerate, gf.num_channels, gf.num_samples.
+	 * if you want to do your own file input, skip this call and set
+	 * samplerate, num_channels and num_samples yourself.
+	 */
+	init_infile(gf, inPath);
+	if ((outf = init_outfile(outPath, lame_get_decode_only(gf))) == NULL) {
+		fprintf(stderr, "Can't init outfile '%s'\n", outPath);
+		return -42;
+	}
+
+	/*
+	 * Now that all the options are set, lame needs to analyze them and
+	 * set some more internal options and check for problems
+	 */
+	i = lame_init_params(gf);
+	if (i < 0) {
+		if (i == -1)
+			display_bitrates(stderr);
+		fprintf(stderr, "fatal error during initialization\n");
+		return 1;
+	}
+
+	if (silent || gf->VBR == vbr_off)
+		brhist = 0;			/* turn off VBR histogram */
+
+#ifdef BRHIST
+	if (brhist) {
+		if (brhist_init(gf, gf->VBR_min_bitrate_kbps,
+		    gf->VBR_max_bitrate_kbps))
+			/* fail to initialize */
+			brhist = 0;
+	} else
+		brhist_init(gf, 128, 128);	/* Dirty hack */
+#endif
+
+
+#ifdef HAVE_VORBIS
+	if (lame_get_ogg( gf ) ) {
+		lame_encode_ogg_init(gf);
+		gf->VBR = vbr_off;	/* ignore lame's various VBR modes */
+	}
+#endif
+	if (0 == lame_get_decode_only( gf ) && silent < 10 ) {
+		if (0)
+			fprintf(stderr, "Encoding as %g kHz ",
+				1.e-3 * lame_get_out_samplerate( gf ) );
+
+		if (lame_get_ogg(gf)) {
+			if (0)
+				fprintf(stderr, "VBR Ogg Vorbis\n" );
+		} else {
+			const char *appendix = "";
+
+			switch (gf->VBR ) {
+			case vbr_mt:
+			case vbr_rh:
+			case vbr_mtrh:
+				appendix = "ca. ";
+				if (0)
+					fprintf(stderr, "VBR(q=%i)", gf->VBR_q );
+				break;
+			case vbr_abr:
+				if (0)
+					fprintf(stderr, "average %d kbps",
+						gf->VBR_mean_bitrate_kbps);
+				break;
+			default:
+				if (0)
+					fprintf(stderr, "%3d Kb/s", gf->brate);
+				break;
+			}
+			if (0)
+				fprintf(stderr, " %s MPEG-%u%s Layer III (%s%gx) qval=%i\n",
+					mode_names[gf->force_ms][gf->mode],
+					2 - gf->version,
+					lame_get_out_samplerate(gf) < 16000?
+					".5": "", appendix,
+					0.1 * (int)(10.*gf->compression_ratio + 0.5),
+					lame_get_quality(gf));
+		}
+		fflush(stderr);
+	}
+
+	if (lame_get_decode_only(gf))
+		/* decode an mp3 file to a .wav */
+		if (mp3_delay_set)
+			lame_decoder(gf, outf, mp3_delay, inPath, outPath);
+		else
+			lame_decoder(gf, outf, gf->encoder_delay, inPath, outPath);
+	else {
+		/* encode until we hit eof */
+		do {
+			/* read in 'iread' samples */
+			iread = get_audio(gf, Buffer);
+
+			/* status display  */
+			if (!silent)
+				if (update_interval > 0)
+					timestatus_klemm(gf);
+				else {
+					if (0 == gf->frameNum % 50) {
+#ifdef BRHIST
+						brhist_jump_back();
+#endif
+						timestatus(lame_get_out_samplerate(gf),
+							gf->frameNum,
+							gf->totalframes,
+							gf->framesize );
+#ifdef BRHIST
+						if (brhist)
+							brhist_disp(gf);
+#endif
+					}
+				}
+
+			/* encode */
+			imp3 = lame_encode_buffer(gf, Buffer[0], Buffer[1], iread,
+				mp3buffer, sizeof(mp3buffer));
+
+			/* was our output buffer big enough? */
+			if (imp3 < 0) {
+				if (imp3 == -1)
+					fprintf(stderr, "mp3 buffer is not big enough... \n");
+				else
+					fprintf(stderr, "mp3 internal error:  error code=%i\n", imp3);
+				return 1;
+			}
+
+			if (fwrite(mp3buffer, 1, imp3, outf) != imp3) {
+				fprintf(stderr, "Error writing mp3 output \n");
+				return 1;
+			}
+		} while (iread);
+		/* may return one more mp3 frame */
+		imp3 = lame_encode_flush(gf, mp3buffer, sizeof(mp3buffer));
+		if (imp3 < 0) {
+			if (imp3 == -1)
+				fprintf(stderr, "mp3 buffer is not big enough... \n");
+			else
+				fprintf(stderr, "mp3 internal error:  error code=%i\n", imp3);
+			return 1;
+
+		}
+		if (!silent) {
+#ifdef BRHIST
+			brhist_jump_back();
+#endif
+			timestatus(lame_get_out_samplerate(gf),
+				gf->frameNum,
+				gf->totalframes,
+				gf->framesize);
+#ifdef BRHIST
+			if (brhist)
+				brhist_disp(gf);
+			brhist_disp_total(gf);
+#endif
+			timestatus_finish();
+		}
+
+		fwrite(mp3buffer, 1, imp3, outf);
+		lame_mp3_tags_fid(gf, outf);	/* add VBR tags to mp3 file */
+		lame_close(gf);
+		fclose(outf);
+	}
+	close_infile();
+	exit(0);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/main.h
@@ -1,0 +1,45 @@
+/*
+ *	Command line frontend program
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *                    2000 Takehiro TOMIANGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#include "get_audio.h"        
+
+#define         MAX_NAME_SIZE           1000
+
+
+/* GLOBAL VARIABLES used by parse.c and main.c.  
+   instantiated in parce.c.  ugly, ugly */
+extern sound_file_format input_format;   
+extern int swapbytes;              /* force byte swapping   default=0*/
+extern int silent;
+extern int brhist;
+extern int mp3_delay;              /* for decoder only */
+extern int mp3_delay_set;          /* for decoder only */
+extern float update_interval;      /* to use Frank's time status display */
+
+
+
+#define         Min(A, B)       ((A) < (B) ? (A) : (B))
+#define         Max(A, B)       ((A) > (B) ? (A) : (B))
+
+#define         MAX_U_32_NUM            0xFFFFFFFF
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/memory.h
@@ -1,0 +1,2 @@
+#include <string.h>
+#include <stdlib.h>
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/mkfile
@@ -1,0 +1,65 @@
+</$objtype/mkfile
+<../config
+
+TARG=mp3enc
+OFILES=\
+	VbrTag.$O\
+	bitstream.$O\
+	encoder.$O\
+	fft.$O\
+	get_audio.$O\
+	id3tag.$O\
+	lame.$O\
+	lametime.$O\
+	main.$O\
+	mpglib_interface.$O\
+	newmdct.$O\
+	parse.$O\
+	pcm.$O\
+	portableio.$O\
+	psymodel.$O\
+	quantize.$O\
+	quantize_pvt.$O\
+	reservoir.$O\
+	set_get.$O\
+	tables.$O\
+	takehiro.$O\
+	timestatus.$O\
+	tools.$O\
+	util.$O\
+	vbrquantize.$O\
+	version.$O\
+	vorbis_interface.$O\
+
+# need a way to ignore this on non-386en
+# LIB=/$objtype/lib/lib387.a
+</sys/src/cmd/mkone
+
+CC=pcc
+CFLAGS=\
+	-I.\
+	-D_POSIX_SOURCE\
+	-DSTDC_HEADERS\
+	-DUSE_LAYER_1\
+	-DUSE_LAYER_2\
+	-D'CHAR_BIT=8'\
+	-D'SIZEOF_DOUBLE=8'\
+	-D'SIZEOF_FLOAT=4'\
+	-D'SIZEOF_INT=4'\
+	-D'SIZEOF_LONG=4'\
+	-D'SIZEOF_LONG_DOUBLE=8'\
+	-D'SIZEOF_LONG_LONG=8'\
+	-D'SIZEOF_SHORT=2'\
+	-D'SIZEOF_UNSIGNED_INT=4'\
+	-D'SIZEOF_UNSIGNED_LONG=4'\
+	-D'SIZEOF_UNSIGNED_LONG_LONG=8'\
+	-D'SIZEOF_UNSIGNED_SHORT=2'\
+	-+ -c
+LDFLAGS= # -p
+
+testcase.new.mp3: testcase.wav $O.out
+	$O.out --nores -h testcase.wav testcase.new.mp3
+
+test:V: testcase.new.mp3
+	cmp -l testcase.new.mp3 testcase.mp3 | wc -l
+	rm testcase.new.mp3
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/mpglib_interface.c
@@ -1,0 +1,185 @@
+/* $Id: mpglib_interface.c,v 1.18 2001/01/06 01:00:33 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_MPGLIB
+
+#include <limits.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "interface.h"
+#include "lame.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+MPSTR           mp;
+plotting_data*  mpg123_pinfo = NULL;
+
+
+int lame_decode_init( void )
+{
+    InitMP3 ( &mp );
+    return 0;
+}
+
+/*
+ * For lame_decode:  return code
+ * -1     error
+ *  0     ok, but need more data before outputing any samples
+ *  n     number of samples output.  either 576 or 1152 depending on MP3 file.
+ */
+ 
+int lame_decode1_headers(
+        unsigned char*   buffer,
+        int              len,
+        short            pcm_l [],
+        short            pcm_r [],
+        mp3data_struct*  mp3data )
+{
+    static const int smpls [2] [4] = {
+    /* Layer   I    II   III */
+        { 0, 384, 1152, 1152 }, /* MPEG-1     */
+        { 0, 384, 1152,  576 }  /* MPEG-2(.5) */
+    };
+    static char        out  [8192];
+    signed short int*  p = (signed short int*) out;
+    int                processed_bytes;
+    int                processed_samples;  // processed samples per channel
+    int                ret;
+    int                i;
+
+    mp3data->header_parsed = 0;
+  
+    ret = decodeMP3 ( &mp, buffer, len, (char*)p, sizeof(out), &processed_bytes );
+
+    if ( mp.header_parsed ) {
+        mp3data->header_parsed = 1;
+        mp3data->stereo        = mp.fr.stereo;
+        mp3data->samplerate    = freqs [mp.fr.sampling_frequency];
+        mp3data->mode          = mp.fr.mode;
+        mp3data->mode_ext      = mp.fr.mode_ext;
+        mp3data->framesize     = smpls [mp.fr.lsf] [mp.fr.lay];
+	
+        if (mp.fsizeold > 0)      /* works for free format and fixed, no overrun, temporal results are < 400.e6 */
+            mp3data->bitrate   = 8 * (4 + mp.fsizeold) * mp3data->samplerate /
+	                         ( 1.e3 * mp3data->framesize ) + 0.5;
+        else
+            mp3data->bitrate   = tabsel_123 [mp.fr.lsf] [mp.fr.lay-1] [mp.fr.bitrate_index];
+
+        if (mp.num_frames>0) {
+	  /* Xing VBR header found and num_frames was set */
+	  mp3data->totalframes = mp.num_frames;
+          mp3data->nsamp=mp3data->framesize * mp.num_frames;  
+	}
+    }
+
+    switch ( ret ) {
+    case MP3_OK:
+        switch ( mp.fr.stereo ) {
+	case 1:
+            processed_samples = processed_bytes >> 1;
+            for ( i = 0; i < processed_samples; i++ ) 
+	        pcm_l [i] = *p++;
+	    break;
+	case 2:
+            processed_samples = processed_bytes >> 2;
+            for ( i = 0; i < processed_samples; i++ ) {
+	        pcm_l [i] = *p++;
+		pcm_r [i] = *p++;
+	    }
+	    break;
+	default:
+            processed_samples = -1;
+	    assert (0);
+	    break;
+        }    
+	break;
+	
+    case MP3_NEED_MORE:
+        processed_samples = 0;
+	break;
+	
+    default:
+        assert (0);
+    case MP3_ERR: 
+        processed_samples = -1;
+	break;
+	
+    }
+  
+    //  printf ( "ok, more, err:  %i %i %i\n", MP3_OK, MP3_NEED_MORE, MP3_ERR );
+    //  printf ( "ret = %i out=%i\n", ret, totsize );
+    return processed_samples;
+}
+
+
+/*
+ * For lame_decode:  return code
+ *  -1     error
+ *   0     ok, but need more data before outputing any samples
+ *   n     number of samples output.  Will be at most one frame of
+ *         MPEG data.  
+ */
+ 
+int lame_decode1( 
+        unsigned char*  buffer,
+	int    len,
+	short  pcm_l [],
+	short  pcm_r [] )
+{
+  mp3data_struct mp3data;
+  
+  return lame_decode1_headers ( buffer, len, pcm_l, pcm_r, &mp3data );
+}
+
+
+/*
+ * For lame_decode:  return code
+ *  -1     error
+ *   0     ok, but need more data before outputing any samples
+ *   n     number of samples output.  a multiple of 576 or 1152 depending on MP3 file.
+ */
+ 
+int lame_decode_headers( 
+        unsigned char*   buffer,
+	int              len,
+	short            pcm_l [],
+	short            pcm_r [],
+        mp3data_struct*  mp3data )
+{
+    int  ret;
+    int  totsize = 0;   // number of decoded samples per channel
+
+    while (1) {
+        switch ( ret = lame_decode1_headers ( buffer, len, pcm_l+totsize, pcm_r+totsize, mp3data ) ) {
+        case -1: return ret;
+        case  0: return totsize;
+        default: totsize += ret;
+                 len      = 0;  /* future calls to decodeMP3 are just to flush buffers */
+                 break;
+        }
+    }
+}
+
+
+int lame_decode(
+        unsigned char*  buffer,
+	int    len,
+	short  pcm_l [],
+	short  pcm_r [] )
+{
+    mp3data_struct  mp3data;
+    
+    return lame_decode_headers ( buffer, len, pcm_l, pcm_r, &mp3data );
+}
+
+
+#endif
+
+/* end of mpglib_interface.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/newmdct.c
@@ -1,0 +1,792 @@
+/*
+ *	MP3 window subband -> subband filtering -> mdct routine
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ *         Special Thanks to Patrick De Smet for your advices.
+ */
+
+/* $Id: newmdct.c,v 1.25 2001/01/17 09:54:20 robert Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "util.h"
+#include "l3side.h"
+#include "newmdct.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+#define SCALE (32768.0/ 2.384e-06)
+
+#ifndef USE_GOGO_SUBBAND
+static const FLOAT8 enwindow[] = 
+{
+      -4.77e-07*0.740951125354959/2.384e-06,  1.03951e-04*0.740951125354959/2.384e-06,  9.53674e-04*0.740951125354959/2.384e-06, 2.841473e-03*0.740951125354959/2.384e-06,
+  3.5758972e-02*0.740951125354959/2.384e-06, 3.401756e-03*0.740951125354959/2.384e-06,  9.83715e-04*0.740951125354959/2.384e-06,   9.9182e-05*0.740951125354959/2.384e-06, /* 15*/
+     1.2398e-05*0.740951125354959/2.384e-06,  1.91212e-04*0.740951125354959/2.384e-06, 2.283096e-03*0.740951125354959/2.384e-06,1.6994476e-02*0.740951125354959/2.384e-06,
+ -1.8756866e-02*0.740951125354959/2.384e-06,-2.630711e-03*0.740951125354959/2.384e-06, -2.47478e-04*0.740951125354959/2.384e-06,  -1.4782e-05*0.740951125354959/2.384e-06,
+      9.063471690191471e-01,
+      1.960342806591213e-01,
+
+
+      -4.77e-07*0.773010453362737/2.384e-06,  1.05858e-04*0.773010453362737/2.384e-06,  9.30786e-04*0.773010453362737/2.384e-06, 2.521515e-03*0.773010453362737/2.384e-06,
+  3.5694122e-02*0.773010453362737/2.384e-06, 3.643036e-03*0.773010453362737/2.384e-06,  9.91821e-04*0.773010453362737/2.384e-06,   9.6321e-05*0.773010453362737/2.384e-06, /* 14*/
+     1.1444e-05*0.773010453362737/2.384e-06,  1.65462e-04*0.773010453362737/2.384e-06, 2.110004e-03*0.773010453362737/2.384e-06,1.6112804e-02*0.773010453362737/2.384e-06,
+ -1.9634247e-02*0.773010453362737/2.384e-06,-2.803326e-03*0.773010453362737/2.384e-06, -2.77042e-04*0.773010453362737/2.384e-06,  -1.6689e-05*0.773010453362737/2.384e-06,
+      8.206787908286602e-01,
+      3.901806440322567e-01,
+
+
+      -4.77e-07*0.803207531480645/2.384e-06,  1.07288e-04*0.803207531480645/2.384e-06,  9.02653e-04*0.803207531480645/2.384e-06, 2.174854e-03*0.803207531480645/2.384e-06,
+  3.5586357e-02*0.803207531480645/2.384e-06, 3.858566e-03*0.803207531480645/2.384e-06,  9.95159e-04*0.803207531480645/2.384e-06,   9.3460e-05*0.803207531480645/2.384e-06, /* 13*/
+     1.0014e-05*0.803207531480645/2.384e-06,  1.40190e-04*0.803207531480645/2.384e-06, 1.937389e-03*0.803207531480645/2.384e-06,1.5233517e-02*0.803207531480645/2.384e-06,
+ -2.0506859e-02*0.803207531480645/2.384e-06,-2.974033e-03*0.803207531480645/2.384e-06, -3.07560e-04*0.803207531480645/2.384e-06,  -1.8120e-05*0.803207531480645/2.384e-06,
+      7.416505462720353e-01,
+      5.805693545089249e-01,
+
+
+      -4.77e-07*0.831469612302545/2.384e-06,  1.08242e-04*0.831469612302545/2.384e-06,  8.68797e-04*0.831469612302545/2.384e-06, 1.800537e-03*0.831469612302545/2.384e-06,
+  3.5435200e-02*0.831469612302545/2.384e-06, 4.049301e-03*0.831469612302545/2.384e-06,  9.94205e-04*0.831469612302545/2.384e-06,   9.0599e-05*0.831469612302545/2.384e-06, /* 12*/
+      9.060e-06*0.831469612302545/2.384e-06,  1.16348e-04*0.831469612302545/2.384e-06, 1.766682e-03*0.831469612302545/2.384e-06,1.4358521e-02*0.831469612302545/2.384e-06,
+ -2.1372318e-02*0.831469612302545/2.384e-06, -3.14188e-03*0.831469612302545/2.384e-06, -3.39031e-04*0.831469612302545/2.384e-06,  -1.9550e-05*0.831469612302545/2.384e-06,
+      6.681786379192989e-01,
+      7.653668647301797e-01,
+
+
+      -4.77e-07*0.857728610000272/2.384e-06,  1.08719e-04*0.857728610000272/2.384e-06,  8.29220e-04*0.857728610000272/2.384e-06, 1.399517e-03*0.857728610000272/2.384e-06,
+  3.5242081e-02*0.857728610000272/2.384e-06, 4.215240e-03*0.857728610000272/2.384e-06,  9.89437e-04*0.857728610000272/2.384e-06,   8.7261e-05*0.857728610000272/2.384e-06, /* 11*/
+      8.106e-06*0.857728610000272/2.384e-06,   9.3937e-05*0.857728610000272/2.384e-06, 1.597881e-03*0.857728610000272/2.384e-06,1.3489246e-02*0.857728610000272/2.384e-06,
+ -2.2228718e-02*0.857728610000272/2.384e-06,-3.306866e-03*0.857728610000272/2.384e-06, -3.71456e-04*0.857728610000272/2.384e-06,  -2.1458e-05*0.857728610000272/2.384e-06,
+      5.993769336819237e-01,
+      9.427934736519954e-01,
+
+
+      -4.77e-07*0.881921264348355/2.384e-06,  1.08719e-04*0.881921264348355/2.384e-06,   7.8392e-04*0.881921264348355/2.384e-06,  9.71317e-04*0.881921264348355/2.384e-06,
+  3.5007000e-02*0.881921264348355/2.384e-06, 4.357815e-03*0.881921264348355/2.384e-06,  9.80854e-04*0.881921264348355/2.384e-06,   8.3923e-05*0.881921264348355/2.384e-06, /* 10*/
+      7.629e-06*0.881921264348355/2.384e-06,   7.2956e-05*0.881921264348355/2.384e-06, 1.432419e-03*0.881921264348355/2.384e-06,1.2627602e-02*0.881921264348355/2.384e-06,
+ -2.3074150e-02*0.881921264348355/2.384e-06,-3.467083e-03*0.881921264348355/2.384e-06, -4.04358e-04*0.881921264348355/2.384e-06,  -2.3365e-05*0.881921264348355/2.384e-06,
+      5.345111359507916e-01,
+      1.111140466039205e+00,
+
+
+      -9.54e-07*0.903989293123443/2.384e-06,  1.08242e-04*0.903989293123443/2.384e-06,  7.31945e-04*0.903989293123443/2.384e-06,  5.15938e-04*0.903989293123443/2.384e-06,
+  3.4730434e-02*0.903989293123443/2.384e-06, 4.477024e-03*0.903989293123443/2.384e-06,  9.68933e-04*0.903989293123443/2.384e-06,   8.0585e-05*0.903989293123443/2.384e-06, /* 9*/
+      6.676e-06*0.903989293123443/2.384e-06,   5.2929e-05*0.903989293123443/2.384e-06, 1.269817e-03*0.903989293123443/2.384e-06,1.1775017e-02*0.903989293123443/2.384e-06,
+ -2.3907185e-02*0.903989293123443/2.384e-06,-3.622532e-03*0.903989293123443/2.384e-06, -4.38213e-04*0.903989293123443/2.384e-06,  -2.5272e-05*0.903989293123443/2.384e-06,
+      4.729647758913199e-01,
+      1.268786568327291e+00,
+
+
+      -9.54e-07*0.92387953251128675613/2.384e-06,  1.06812e-04*0.92387953251128675613/2.384e-06,  6.74248e-04*0.92387953251128675613/2.384e-06,   3.3379e-05*0.92387953251128675613/2.384e-06,
+  3.4412861e-02*0.92387953251128675613/2.384e-06, 4.573822e-03*0.92387953251128675613/2.384e-06,  9.54151e-04*0.92387953251128675613/2.384e-06,   7.6771e-05*0.92387953251128675613/2.384e-06,
+      6.199e-06*0.92387953251128675613/2.384e-06,   3.4332e-05*0.92387953251128675613/2.384e-06, 1.111031e-03*0.92387953251128675613/2.384e-06,1.0933399e-02*0.92387953251128675613/2.384e-06,
+ -2.4725437e-02*0.92387953251128675613/2.384e-06,-3.771782e-03*0.92387953251128675613/2.384e-06, -4.72546e-04*0.92387953251128675613/2.384e-06,  -2.7657e-05*0.92387953251128675613/2.384e-06,
+      4.1421356237309504879e-01,  /* tan(PI/8) */
+      1.414213562373095e+00,
+
+
+      -9.54e-07*0.941544065183021/2.384e-06,  1.05381e-04*0.941544065183021/2.384e-06,  6.10352e-04*0.941544065183021/2.384e-06, -4.75883e-04*0.941544065183021/2.384e-06,
+  3.4055710e-02*0.941544065183021/2.384e-06, 4.649162e-03*0.941544065183021/2.384e-06,  9.35555e-04*0.941544065183021/2.384e-06,   7.3433e-05*0.941544065183021/2.384e-06, /* 7*/
+      5.245e-06*0.941544065183021/2.384e-06,   1.7166e-05*0.941544065183021/2.384e-06,  9.56535e-04*0.941544065183021/2.384e-06,1.0103703e-02*0.941544065183021/2.384e-06,
+ -2.5527000e-02*0.941544065183021/2.384e-06,-3.914356e-03*0.941544065183021/2.384e-06, -5.07355e-04*0.941544065183021/2.384e-06,  -3.0041e-05*0.941544065183021/2.384e-06,
+      3.578057213145241e-01,
+      1.546020906725474e+00,
+
+
+      -9.54e-07*0.956940335732209/2.384e-06,  1.02520e-04*0.956940335732209/2.384e-06,  5.39303e-04*0.956940335732209/2.384e-06,-1.011848e-03*0.956940335732209/2.384e-06,
+  3.3659935e-02*0.956940335732209/2.384e-06, 4.703045e-03*0.956940335732209/2.384e-06,  9.15051e-04*0.956940335732209/2.384e-06,   7.0095e-05*0.956940335732209/2.384e-06, /* 6*/
+      4.768e-06*0.956940335732209/2.384e-06,     9.54e-07*0.956940335732209/2.384e-06,  8.06808e-04*0.956940335732209/2.384e-06, 9.287834e-03*0.956940335732209/2.384e-06,
+ -2.6310921e-02*0.956940335732209/2.384e-06,-4.048824e-03*0.956940335732209/2.384e-06, -5.42164e-04*0.956940335732209/2.384e-06,  -3.2425e-05*0.956940335732209/2.384e-06,
+      3.033466836073424e-01,
+      1.662939224605090e+00,
+
+
+     -1.431e-06*0.970031253194544/2.384e-06,   9.9182e-05*0.970031253194544/2.384e-06,  4.62532e-04*0.970031253194544/2.384e-06,-1.573563e-03*0.970031253194544/2.384e-06,
+  3.3225536e-02*0.970031253194544/2.384e-06, 4.737377e-03*0.970031253194544/2.384e-06,  8.91685e-04*0.970031253194544/2.384e-06,   6.6280e-05*0.970031253194544/2.384e-06,  /* 5*/
+      4.292e-06*0.970031253194544/2.384e-06,  -1.3828e-05*0.970031253194544/2.384e-06,  6.61850e-04*0.970031253194544/2.384e-06, 8.487225e-03*0.970031253194544/2.384e-06,
+ -2.7073860e-02*0.970031253194544/2.384e-06,-4.174709e-03*0.970031253194544/2.384e-06, -5.76973e-04*0.970031253194544/2.384e-06,  -3.4809e-05*0.970031253194544/2.384e-06,
+      2.504869601913055e-01,
+      1.763842528696710e+00,
+
+
+     -1.431e-06*0.98078528040323/2.384e-06,   9.5367e-05*0.98078528040323/2.384e-06,  3.78609e-04*0.98078528040323/2.384e-06,-2.161503e-03*0.98078528040323/2.384e-06,
+  3.2754898e-02*0.98078528040323/2.384e-06, 4.752159e-03*0.98078528040323/2.384e-06,  8.66413e-04*0.98078528040323/2.384e-06,   6.2943e-05*0.98078528040323/2.384e-06, /* 4*/
+      3.815e-06*0.98078528040323/2.384e-06,   -2.718e-05*0.98078528040323/2.384e-06,  5.22137e-04*0.98078528040323/2.384e-06, 7.703304e-03*0.98078528040323/2.384e-06,
+ -2.7815342e-02*0.98078528040323/2.384e-06,-4.290581e-03*0.98078528040323/2.384e-06, -6.11782e-04*0.98078528040323/2.384e-06,  -3.7670e-05*0.98078528040323/2.384e-06,
+      1.989123673796580e-01,
+      1.847759065022573e+00,
+
+
+     -1.907e-06*0.989176509964781/2.384e-06,   9.0122e-05*0.989176509964781/2.384e-06,  2.88486e-04*0.989176509964781/2.384e-06,-2.774239e-03*0.989176509964781/2.384e-06,
+  3.2248020e-02*0.989176509964781/2.384e-06, 4.748821e-03*0.989176509964781/2.384e-06,  8.38757e-04*0.989176509964781/2.384e-06,   5.9605e-05*0.989176509964781/2.384e-06, /* 3*/
+      3.338e-06*0.989176509964781/2.384e-06,  -3.9577e-05*0.989176509964781/2.384e-06,  3.88145e-04*0.989176509964781/2.384e-06, 6.937027e-03*0.989176509964781/2.384e-06,
+ -2.8532982e-02*0.989176509964781/2.384e-06,-4.395962e-03*0.989176509964781/2.384e-06, -6.46591e-04*0.989176509964781/2.384e-06,  -4.0531e-05*0.989176509964781/2.384e-06,
+      1.483359875383474e-01,
+      1.913880671464418e+00,
+
+
+     -1.907e-06*0.995184726672197/2.384e-06,   8.4400e-05*0.995184726672197/2.384e-06,  1.91689e-04*0.995184726672197/2.384e-06,-3.411293e-03*0.995184726672197/2.384e-06,
+  3.1706810e-02*0.995184726672197/2.384e-06, 4.728317e-03*0.995184726672197/2.384e-06,  8.09669e-04*0.995184726672197/2.384e-06,    5.579e-05*0.995184726672197/2.384e-06,
+      3.338e-06*0.995184726672197/2.384e-06,  -5.0545e-05*0.995184726672197/2.384e-06,  2.59876e-04*0.995184726672197/2.384e-06, 6.189346e-03*0.995184726672197/2.384e-06,
+ -2.9224873e-02*0.995184726672197/2.384e-06,-4.489899e-03*0.995184726672197/2.384e-06, -6.80923e-04*0.995184726672197/2.384e-06,  -4.3392e-05*0.995184726672197/2.384e-06,
+      9.849140335716425e-02,
+      1.961570560806461e+00,
+
+
+     -2.384e-06*0.998795456205172/2.384e-06,   7.7724e-05*0.998795456205172/2.384e-06,   8.8215e-05*0.998795456205172/2.384e-06,-4.072189e-03*0.998795456205172/2.384e-06,
+      3.1132698e-02*0.998795456205172/2.384e-06, 4.691124e-03*0.998795456205172/2.384e-06,  7.79152e-04*0.998795456205172/2.384e-06,   5.2929e-05*0.998795456205172/2.384e-06,
+      2.861e-06*0.998795456205172/2.384e-06,  -6.0558e-05*0.998795456205172/2.384e-06,  1.37329e-04*0.998795456205172/2.384e-06, 5.462170e-03*0.998795456205172/2.384e-06,
+      -2.9890060e-02*0.998795456205172/2.384e-06,-4.570484e-03*0.998795456205172/2.384e-06, -7.14302e-04*0.998795456205172/2.384e-06,  -4.6253e-05*0.998795456205172/2.384e-06,
+      4.912684976946725e-02,
+      1.990369453344394e+00,
+
+
+      3.5780907e-02 * SQRT2*0.5/2.384e-06,1.7876148e-02 * SQRT2*0.5/2.384e-06, 3.134727e-03 * SQRT2*0.5/2.384e-06, 2.457142e-03 * SQRT2*0.5/2.384e-06,
+      9.71317e-04 * SQRT2*0.5/2.384e-06,  2.18868e-04 * SQRT2*0.5/2.384e-06,  1.01566e-04 * SQRT2*0.5/2.384e-06,   1.3828e-05 * SQRT2*0.5/2.384e-06,
+
+      3.0526638e-02/2.384e-06, 4.638195e-03/2.384e-06,  7.47204e-04/2.384e-06,   4.9591e-05/2.384e-06,
+      4.756451e-03/2.384e-06,   2.1458e-05/2.384e-06,  -6.9618e-05/2.384e-06,/*    2.384e-06/2.384e-06*/
+};
+#endif
+
+
+#define NS 12
+#define NL 36
+
+static const FLOAT8 win[4][NL] = {
+  {
+    2.382191739347913e-13,
+    6.423305872147834e-13,
+    9.400849094049688e-13,
+    1.122435026096556e-12,
+    1.183840321267481e-12,
+    1.122435026096556e-12,
+    9.400849094049690e-13,
+    6.423305872147839e-13,
+    2.382191739347918e-13,
+
+    5.456116108943412e-12,
+    4.878985199565852e-12,
+    4.240448995017367e-12,
+    3.559909094758252e-12,
+    2.858043359288075e-12,
+    2.156177623817898e-12,
+    1.475637723558783e-12,
+    8.371015190102974e-13,
+    2.599706096327376e-13,
+
+    -5.456116108943412e-12,
+    -4.878985199565852e-12,
+    -4.240448995017367e-12,
+    -3.559909094758252e-12,
+    -2.858043359288076e-12,
+    -2.156177623817898e-12,
+    -1.475637723558783e-12,
+    -8.371015190102975e-13,
+    -2.599706096327376e-13,
+
+    -2.382191739347923e-13,
+    -6.423305872147843e-13,
+    -9.400849094049696e-13,
+    -1.122435026096556e-12,
+    -1.183840321267481e-12,
+    -1.122435026096556e-12,
+    -9.400849094049694e-13,
+    -6.423305872147840e-13,
+    -2.382191739347918e-13,
+  },
+  {
+    2.382191739347913e-13,
+    6.423305872147834e-13,
+    9.400849094049688e-13,
+    1.122435026096556e-12,
+    1.183840321267481e-12,
+    1.122435026096556e-12,
+    9.400849094049688e-13,
+    6.423305872147841e-13,
+    2.382191739347918e-13,
+
+    5.456116108943413e-12,
+    4.878985199565852e-12,
+    4.240448995017367e-12,
+    3.559909094758253e-12,
+    2.858043359288075e-12,
+    2.156177623817898e-12,
+    1.475637723558782e-12,
+    8.371015190102975e-13,
+    2.599706096327376e-13,
+
+    -5.461314069809755e-12,
+    -4.921085770524055e-12,
+    -4.343405037091838e-12,
+    -3.732668368707687e-12,
+    -3.093523840190885e-12,
+    -2.430835727329465e-12,
+    -1.734679010007751e-12,
+    -9.748253656609281e-13,
+    -2.797435120168326e-13,
+
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    -2.283748241799531e-13,
+    -4.037858874020686e-13,
+    -2.146547464825323e-13,
+  },
+  {
+    1.316524975873958e-01, /* win[SHORT_TYPE] */
+    4.142135623730950e-01,
+    7.673269879789602e-01,
+
+    1.091308501069271e+00, /* tantab_l */
+    1.303225372841206e+00,
+    1.569685577117490e+00,
+    1.920982126971166e+00,
+    2.414213562373094e+00,
+    3.171594802363212e+00,
+    4.510708503662055e+00,
+    7.595754112725146e+00,
+    2.290376554843115e+01,
+
+    0.98480775301220802032, /* cx */
+    0.64278760968653936292,
+    0.34202014332566882393,
+    0.93969262078590842791,
+    -0.17364817766693030343,
+    -0.76604444311897790243,
+    0.86602540378443870761,
+    0.500000000000000e+00,
+
+    -5.144957554275265e-01, /* ca */
+    -4.717319685649723e-01,
+    -3.133774542039019e-01,
+    -1.819131996109812e-01,
+    -9.457419252642064e-02,
+    -4.096558288530405e-02,
+    -1.419856857247115e-02,
+    -3.699974673760037e-03,
+
+     8.574929257125442e-01, /* cs */
+     8.817419973177052e-01,
+     9.496286491027329e-01,
+     9.833145924917901e-01,
+     9.955178160675857e-01,
+     9.991605581781475e-01,
+     9.998991952444470e-01,
+     9.999931550702802e-01,
+  },
+  {
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    0.000000000000000e+00,
+    2.283748241799531e-13,
+    4.037858874020686e-13,
+    2.146547464825323e-13,
+
+    5.461314069809755e-12,
+    4.921085770524055e-12,
+    4.343405037091838e-12,
+    3.732668368707687e-12,
+    3.093523840190885e-12,
+    2.430835727329466e-12,
+    1.734679010007751e-12,
+    9.748253656609281e-13,
+    2.797435120168326e-13,
+
+    -5.456116108943413e-12,
+    -4.878985199565852e-12,
+    -4.240448995017367e-12,
+    -3.559909094758253e-12,
+    -2.858043359288075e-12,
+    -2.156177623817898e-12,
+    -1.475637723558782e-12,
+    -8.371015190102975e-13,
+    -2.599706096327376e-13,
+
+    -2.382191739347913e-13,
+    -6.423305872147834e-13,
+    -9.400849094049688e-13,
+    -1.122435026096556e-12,
+    -1.183840321267481e-12,
+    -1.122435026096556e-12,
+    -9.400849094049688e-13,
+    -6.423305872147841e-13,
+    -2.382191739347918e-13,
+  }
+};
+
+#define tantab_l (win[SHORT_TYPE]+3)
+#define cx (win[SHORT_TYPE]+12)
+#define ca (win[SHORT_TYPE]+20)
+#define cs (win[SHORT_TYPE]+28)
+
+/************************************************************************
+*
+* window_subband()
+*
+* PURPOSE:  Overlapping window on PCM samples
+*
+* SEMANTICS:
+* 32 16-bit pcm samples are scaled to fractional 2's complement and
+* concatenated to the end of the window buffer #x#. The updated window
+* buffer #x# is then windowed by the analysis window #c# to produce the
+* windowed sample #z#
+*
+************************************************************************/
+
+/*
+ *      new IDCT routine written by Takehiro TOMINAGA
+ */
+static const int order[] = {
+  0, 1,16,17, 8, 9,24,25, 4, 5,20,21,12,13,28,29,
+  2, 3,18,19,10,11,26,27, 6, 7,22,23,14,15,30,31
+};
+
+
+/* returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32 */
+INLINE static void
+window_subband(const sample_t *x1, FLOAT8 a[SBLIMIT])
+{
+    int i;
+    FLOAT8 const *wp = enwindow+10;
+
+    const sample_t *x2 = &x1[238-14-286];
+
+    for (i = -15; i < 0; i++) {
+	FLOAT8 w, s, t;
+
+	w = wp[-10]; s = x2[-224] * w; t  = x1[ 224] * w;
+	w = wp[-9]; s += x2[-160] * w; t += x1[ 160] * w;
+	w = wp[-8]; s += x2[- 96] * w; t += x1[  96] * w;
+	w = wp[-7]; s += x2[- 32] * w; t += x1[  32] * w;
+	w = wp[-6]; s += x2[  32] * w; t += x1[- 32] * w;
+	w = wp[-5]; s += x2[  96] * w; t += x1[- 96] * w;
+	w = wp[-4]; s += x2[ 160] * w; t += x1[-160] * w;
+	w = wp[-3]; s += x2[ 224] * w; t += x1[-224] * w;
+
+	w = wp[-2]; s += x1[-256] * w; t -= x2[ 256] * w;
+	w = wp[-1]; s += x1[-192] * w; t -= x2[ 192] * w;
+	w = wp[ 0]; s += x1[-128] * w; t -= x2[ 128] * w;
+	w = wp[ 1]; s += x1[- 64] * w; t -= x2[  64] * w;
+	w = wp[ 2]; s += x1[   0] * w; t -= x2[   0] * w;
+	w = wp[ 3]; s += x1[  64] * w; t -= x2[- 64] * w;
+	w = wp[ 4]; s += x1[ 128] * w; t -= x2[-128] * w;
+	w = wp[ 5]; s += x1[ 192] * w; t -= x2[-192] * w;
+
+	/*
+	 * this multiplyer could be removed, but it needs more 256 FLOAT data.
+	 * thinking about the data cache performance, I think we should not
+	 * use such a huge table. tt 2000/Oct/25
+	 */
+	s *= wp[6];
+	w = t - s;
+	a[30+i*2] = t + s;
+	a[31+i*2] = wp[7] * w;
+	wp += 18;
+	x1--;
+	x2++;
+    }
+    {
+	FLOAT8 s,t,u,v;
+	t  =  x1[- 16] * wp[-10];              s  = x1[ -32] * wp[-2];
+	t += (x1[- 48] - x1[ 16]) * wp[-9];    s += x1[ -96] * wp[-1];
+	t += (x1[- 80] + x1[ 48]) * wp[-8];    s += x1[-160] * wp[ 0];
+	t += (x1[-112] - x1[ 80]) * wp[-7];    s += x1[-224] * wp[ 1];
+	t += (x1[-144] + x1[112]) * wp[-6];    s -= x1[  32] * wp[ 2];
+	t += (x1[-176] - x1[144]) * wp[-5];    s -= x1[  96] * wp[ 3];
+	t += (x1[-208] + x1[176]) * wp[-4];    s -= x1[ 160] * wp[ 4];
+	t += (x1[-240] - x1[208]) * wp[-3];    s -= x1[ 224];
+
+	u = s - t;
+	v = s + t;
+
+	t = a[14];
+	s = a[15] - t;
+
+	a[31] = v + t;   // A0
+	a[30] = u + s;   // A1
+	a[15] = u - s;   // A2
+	a[14] = v - t;   // A3
+    }
+{
+    FLOAT8 xr;
+    xr = a[28] - a[ 0]; a[ 0] += a[28]; a[28] = xr * wp[-2*18+7];
+    xr = a[29] - a[ 1]; a[ 1] += a[29]; a[29] = xr * wp[-2*18+7];
+
+    xr = a[26] - a[ 2]; a[ 2] += a[26]; a[26] = xr * wp[-4*18+7];
+    xr = a[27] - a[ 3]; a[ 3] += a[27]; a[27] = xr * wp[-4*18+7];
+
+    xr = a[24] - a[ 4]; a[ 4] += a[24]; a[24] = xr * wp[-6*18+7];
+    xr = a[25] - a[ 5]; a[ 5] += a[25]; a[25] = xr * wp[-6*18+7];
+
+    xr = a[22] - a[ 6]; a[ 6] += a[22]; a[22] = xr * SQRT2;
+    xr = a[23] - a[ 7]; a[ 7] += a[23]; a[23] = xr * SQRT2 - a[ 7];
+    a[ 7] -= a[ 6];
+    a[22] -= a[ 7];
+    a[23] -= a[22];
+
+    xr = a[ 6]; a[ 6] = a[31] - xr; a[31] = a[31] + xr;
+    xr = a[ 7]; a[ 7] = a[30] - xr; a[30] = a[30] + xr;
+    xr = a[22]; a[22] = a[15] - xr; a[15] = a[15] + xr;
+    xr = a[23]; a[23] = a[14] - xr; a[14] = a[14] + xr;
+
+    xr = a[20] - a[ 8]; a[ 8] += a[20]; a[20] = xr * wp[-10*18+7];
+    xr = a[21] - a[ 9]; a[ 9] += a[21]; a[21] = xr * wp[-10*18+7];
+
+    xr = a[18] - a[10]; a[10] += a[18]; a[18] = xr * wp[-12*18+7];
+    xr = a[19] - a[11]; a[11] += a[19]; a[19] = xr * wp[-12*18+7];
+
+    xr = a[16] - a[12]; a[12] += a[16]; a[16] = xr * wp[-14*18+7];
+    xr = a[17] - a[13]; a[13] += a[17]; a[17] = xr * wp[-14*18+7];
+
+    xr = -a[20] + a[24]; a[20] += a[24]; a[24] = xr * wp[-12*18+7];
+    xr = -a[21] + a[25]; a[21] += a[25]; a[25] = xr * wp[-12*18+7];
+
+    xr = a[ 4] - a[ 8]; a[ 4] += a[ 8]; a[ 8] = xr * wp[-12*18+7];
+    xr = a[ 5] - a[ 9]; a[ 5] += a[ 9]; a[ 9] = xr * wp[-12*18+7];
+
+    xr = a[ 0] - a[12]; a[ 0] += a[12]; a[12] = xr * wp[-4*18+7];
+    xr = a[ 1] - a[13]; a[ 1] += a[13]; a[13] = xr * wp[-4*18+7];
+    xr = a[16] - a[28]; a[16] += a[28]; a[28] = xr * wp[-4*18+7];
+    xr = -a[17] + a[29]; a[17] += a[29]; a[29] = xr * wp[-4*18+7];
+
+    xr = SQRT2 * (a[ 2] - a[10]); a[ 2] += a[10]; a[10] = xr;
+    xr = SQRT2 * (a[ 3] - a[11]); a[ 3] += a[11]; a[11] = xr;
+    xr = SQRT2 * (-a[18] + a[26]); a[18] += a[26]; a[26] = xr - a[18];
+    xr = SQRT2 * (-a[19] + a[27]); a[19] += a[27]; a[27] = xr - a[19];
+
+    xr = a[ 2]; a[19] -= a[ 3]; a[ 3] -= xr; a[ 2] = a[31] - xr; a[31] += xr;
+    xr = a[ 3]; a[11] -= a[19]; a[18] -= xr; a[ 3] = a[30] - xr; a[30] += xr;
+    xr = a[18]; a[27] -= a[11]; a[19] -= xr; a[18] = a[15] - xr; a[15] += xr;
+
+    xr = a[19]; a[10] -= xr; a[19] = a[14] - xr; a[14] += xr;
+    xr = a[10]; a[11] -= xr; a[10] = a[23] - xr; a[23] += xr;
+    xr = a[11]; a[26] -= xr; a[11] = a[22] - xr; a[22] += xr;
+    xr = a[26]; a[27] -= xr; a[26] = a[ 7] - xr; a[ 7] += xr;
+
+    xr = a[27]; a[27] = a[ 6] - xr; a[ 6] += xr;
+
+    xr = SQRT2 * (a[ 0] - a[ 4]); a[ 0] += a[ 4]; a[ 4] = xr;
+    xr = SQRT2 * (a[ 1] - a[ 5]); a[ 1] += a[ 5]; a[ 5] = xr;
+    xr = SQRT2 * (a[16] - a[20]); a[16] += a[20]; a[20] = xr;
+    xr = SQRT2 * (a[17] - a[21]); a[17] += a[21]; a[21] = xr;
+
+    xr = -SQRT2 * (a[ 8] - a[12]); a[ 8] += a[12]; a[12] = xr - a[ 8];
+    xr = -SQRT2 * (a[ 9] - a[13]); a[ 9] += a[13]; a[13] = xr - a[ 9];
+    xr = -SQRT2 * (a[25] - a[29]); a[25] += a[29]; a[29] = xr - a[25];
+    xr = -SQRT2 * (a[24] + a[28]); a[24] -= a[28]; a[28] = xr - a[24];
+
+    xr = a[24] - a[16]; a[24] = xr;
+    xr = a[20] - xr;    a[20] = xr;
+    xr = a[28] - xr;    a[28] = xr;
+
+    xr = a[25] - a[17]; a[25] = xr;
+    xr = a[21] - xr;    a[21] = xr;
+    xr = a[29] - xr;    a[29] = xr;
+
+    xr = a[17] - a[ 1]; a[17] = xr;
+    xr = a[ 9] - xr;    a[ 9] = xr;
+    xr = a[25] - xr;    a[25] = xr;
+    xr = a[ 5] - xr;    a[ 5] = xr;
+    xr = a[21] - xr;    a[21] = xr;
+    xr = a[13] - xr;    a[13] = xr;
+    xr = a[29] - xr;    a[29] = xr;
+
+    xr = a[ 1] - a[ 0]; a[ 1] = xr;
+    xr = a[16] - xr;    a[16] = xr;
+    xr = a[17] - xr;    a[17] = xr;
+    xr = a[ 8] - xr;    a[ 8] = xr;
+    xr = a[ 9] - xr;    a[ 9] = xr;
+    xr = a[24] - xr;    a[24] = xr;
+    xr = a[25] - xr;    a[25] = xr;
+    xr = a[ 4] - xr;    a[ 4] = xr;
+    xr = a[ 5] - xr;    a[ 5] = xr;
+    xr = a[20] - xr;    a[20] = xr;
+    xr = a[21] - xr;    a[21] = xr;
+    xr = a[12] - xr;    a[12] = xr;
+    xr = a[13] - xr;    a[13] = xr;
+    xr = a[28] - xr;    a[28] = xr;
+    xr = a[29] - xr;    a[29] = xr;
+
+    xr = a[ 0]; a[ 0] += a[31]; a[31] -= xr;
+    xr = a[ 1]; a[ 1] += a[30]; a[30] -= xr;
+    xr = a[16]; a[16] += a[15]; a[15] -= xr;
+    xr = a[17]; a[17] += a[14]; a[14] -= xr;
+    xr = a[ 8]; a[ 8] += a[23]; a[23] -= xr;
+    xr = a[ 9]; a[ 9] += a[22]; a[22] -= xr;
+    xr = a[24]; a[24] += a[ 7]; a[ 7] -= xr;
+    xr = a[25]; a[25] += a[ 6]; a[ 6] -= xr;
+    xr = a[ 4]; a[ 4] += a[27]; a[27] -= xr;
+    xr = a[ 5]; a[ 5] += a[26]; a[26] -= xr;
+    xr = a[20]; a[20] += a[11]; a[11] -= xr;
+    xr = a[21]; a[21] += a[10]; a[10] -= xr;
+    xr = a[12]; a[12] += a[19]; a[19] -= xr;
+    xr = a[13]; a[13] += a[18]; a[18] -= xr;
+    xr = a[28]; a[28] += a[ 3]; a[ 3] -= xr;
+    xr = a[29]; a[29] += a[ 2]; a[ 2] -= xr;
+}
+
+}
+
+
+/*-------------------------------------------------------------------*/
+/*                                                                   */
+/*   Function: Calculation of the MDCT                               */
+/*   In the case of long blocks (type 0,1,3) there are               */
+/*   36 coefficents in the time domain and 18 in the frequency       */
+/*   domain.                                                         */
+/*   In the case of short blocks (type 2) there are 3                */
+/*   transformations with short length. This leads to 12 coefficents */
+/*   in the time and 6 in the frequency domain. In this case the     */
+/*   results are stored side by side in the vector out[].            */
+/*                                                                   */
+/*   New layer3                                                      */
+/*                                                                   */
+/*-------------------------------------------------------------------*/
+
+inline static void mdct_short(FLOAT8 *inout)
+{
+    int l;
+    for ( l = 0; l < 3; l++ ) {
+	FLOAT8 tc0,tc1,tc2,ts0,ts1,ts2;
+
+	ts0 = inout[2*3] * win[SHORT_TYPE][0] - inout[5*3];
+	tc0 = inout[0*3] * win[SHORT_TYPE][2] - inout[3*3];
+	tc1 = ts0 + tc0;
+	tc2 = ts0 - tc0;
+
+	ts0 = inout[5*3] * win[SHORT_TYPE][0] + inout[2*3];
+	tc0 = inout[3*3] * win[SHORT_TYPE][2] + inout[0*3];
+	ts1 = ts0 + tc0;
+	ts2 = -ts0 + tc0;
+
+	tc0 = (inout[1*3] * win[SHORT_TYPE][1] - inout[4*3]) * 2.069978111953089e-11; /* tritab_s[1] */
+	ts0 = (inout[4*3] * win[SHORT_TYPE][1] + inout[1*3]) * 2.069978111953089e-11; /* tritab_s[1] */
+
+	inout[3*0] = tc1 * 1.907525191737280e-11 /* tritab_s[2] */ + tc0;
+	inout[3*5] = -ts1 * 1.907525191737280e-11 /* tritab_s[0] */ + ts0;
+
+	tc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11 /* tritab_s[2] */;
+	ts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;
+	inout[3*1] = tc2-ts1;
+	inout[3*2] = tc2+ts1;
+
+	tc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;
+	ts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11 /* tritab_s[0] */;
+	inout[3*3] = tc1+ts2;
+	inout[3*4] = tc1-ts2;
+
+	inout++;
+    }
+}
+
+inline static void mdct_long(FLOAT8 *out, FLOAT8 *in)
+{
+    FLOAT8 ct,st;
+  {
+    FLOAT8 tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;
+    // 1,2, 5,6, 9,10, 13,14, 17
+    tc1 = in[17]-in[ 9];
+    tc3 = in[15]-in[11];
+    tc4 = in[14]-in[12];
+    ts5 = in[ 0]+in[ 8];
+    ts6 = in[ 1]+in[ 7];
+    ts7 = in[ 2]+in[ 6];
+    ts8 = in[ 3]+in[ 5];
+
+    out[17] = (ts5+ts7-ts8)-(ts6-in[4]);
+    st = (ts5+ts7-ts8)*cx[7]+(ts6-in[4]);
+    ct = (tc1-tc3-tc4)*cx[6];
+    out[5] = ct+st;
+    out[6] = ct-st;
+
+    tc2 = (in[16]-in[10])*cx[6];
+    ts6 = ts6*cx[7] + in[4];
+    ct =  tc1*cx[0] + tc2 + tc3*cx[1] + tc4*cx[2];
+    st = -ts5*cx[4] + ts6 - ts7*cx[5] + ts8*cx[3];
+    out[1] = ct+st;
+    out[2] = ct-st;
+
+    ct =  tc1*cx[1] - tc2 - tc3*cx[2] + tc4*cx[0];
+    st = -ts5*cx[5] + ts6 - ts7*cx[3] + ts8*cx[4];
+    out[ 9] = ct+st;
+    out[10] = ct-st;
+
+    ct = tc1*cx[2] - tc2 + tc3*cx[0] - tc4*cx[1];
+    st = ts5*cx[3] - ts6 + ts7*cx[4] - ts8*cx[5];
+    out[13] = ct+st;
+    out[14] = ct-st;
+  }
+  {
+    FLOAT8 ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;
+
+    ts1 = in[ 8]-in[ 0];
+    ts3 = in[ 6]-in[ 2];
+    ts4 = in[ 5]-in[ 3];
+    tc5 = in[17]+in[ 9];
+    tc6 = in[16]+in[10];
+    tc7 = in[15]+in[11];
+    tc8 = in[14]+in[12];
+
+    out[0]  = (tc5+tc7+tc8)+(tc6+in[13]);
+    ct = (tc5+tc7+tc8)*cx[7]-(tc6+in[13]);
+    st = (ts1-ts3+ts4)*cx[6];
+    out[11] = ct+st;
+    out[12] = ct-st;
+
+    ts2 = (in[7]-in[1])*cx[6];
+    tc6 = in[13] - tc6*cx[7];
+    ct = tc5*cx[3] - tc6 + tc7*cx[4] + tc8*cx[5];
+    st = ts1*cx[2] + ts2 + ts3*cx[0] + ts4*cx[1];
+    out[3] = ct+st;
+    out[4] = ct-st;
+
+    ct = -tc5*cx[5] + tc6 - tc7*cx[3] - tc8*cx[4];
+    st =  ts1*cx[1] + ts2 - ts3*cx[2] - ts4*cx[0];
+    out[7] = ct+st;
+    out[8] = ct-st;
+
+    ct = -tc5*cx[4] + tc6 - tc7*cx[5] - tc8*cx[3];
+    st =  ts1*cx[0] - ts2 + ts3*cx[1] - ts4*cx[2];
+    out[15] = ct+st;
+    out[16] = ct-st;
+  }
+}
+
+
+void mdct_sub48( lame_internal_flags *gfc, const sample_t *w0, const sample_t *w1, 
+                 FLOAT8 mdct_freq[2][2][576] )
+{
+    int gr, k, ch;
+    const sample_t *wk;
+
+    wk = w0 + 286;
+    /* thinking cache performance, ch->gr loop is better than gr->ch loop */
+    for (ch = 0; ch < gfc->channels_out; ch++) {
+	for (gr = 0; gr < gfc->mode_gr; gr++) {
+	    int	band;
+	    FLOAT8 *mdct_enc = &mdct_freq[gr][ch][0];
+	    gr_info *gi = &(gfc->l3_side.gr[gr].ch[ch].tt);
+	    FLOAT8 *samp = gfc->sb_sample[ch][1 - gr][0];
+
+	    for (k = 0; k < 18 / 2; k++) {
+		window_subband(wk, samp);
+		window_subband(wk + 32, samp + 32);
+		samp += 64;
+		wk += 64;
+		/*
+		 * Compensate for inversion in the analysis filter
+		 */
+		for (band = 1; band < 32; band+=2) {
+		    samp[band-32] *= -1;
+		}
+	    }
+
+
+	    /* apply filters on the polyphase filterbank outputs */
+	    /* bands <= gfc->highpass_band will be zeroed out below */
+	    /* bands >= gfc->lowpass_band  will be zeroed out below */
+	    if (gfc->filter_type==0) {
+              for (band=gfc->highpass_start_band;  band <= gfc->highpass_end_band; band++) { 
+		  for (k=0; k<18; k++) 
+		    gfc->sb_sample[ch][1-gr][k][order[band]]*=gfc->amp_highpass[band];
+	      }
+              for (band=gfc->lowpass_start_band;  band <= gfc->lowpass_end_band; band++) { 
+		  for (k=0; k<18; k++) 
+		    gfc->sb_sample[ch][1-gr][k][order[band]]*=gfc->amp_lowpass[band];
+	      }
+	    }
+	    
+
+
+	    /*
+	     * Perform imdct of 18 previous subband samples
+	     * + 18 current subband samples
+	     */
+	    for (band = 0; band < 32; band++, mdct_enc += 18) {
+		int type = gi->block_type;
+		FLOAT8 *band0, *band1;
+		band0 = gfc->sb_sample[ch][  gr][0] + order[band];
+		band1 = gfc->sb_sample[ch][1-gr][0] + order[band];
+		if (gi->mixed_block_flag && band < 2)
+		    type = 0;
+		if (band >= gfc->lowpass_band || band <= gfc->highpass_band) {
+		    memset((char *)mdct_enc,0,18*sizeof(FLOAT8));
+		} else {
+		  if (type == SHORT_TYPE) {
+		    for (k = -NS/4; k < 0; k++) {
+			FLOAT8 w = win[SHORT_TYPE][k+3];
+			mdct_enc[k*3+ 9] = band0[( 9+k)*32] * w - band0[( 8-k)*32];
+			mdct_enc[k*3+18] = band0[(14-k)*32] * w + band0[(15+k)*32];
+			mdct_enc[k*3+10] = band0[(15+k)*32] * w - band0[(14-k)*32];
+			mdct_enc[k*3+19] = band1[( 2-k)*32] * w + band1[( 3+k)*32];
+			mdct_enc[k*3+11] = band1[( 3+k)*32] * w - band1[( 2-k)*32];
+			mdct_enc[k*3+20] = band1[( 8-k)*32] * w + band1[( 9+k)*32];
+		    }
+		    mdct_short(mdct_enc);
+		  } else {
+		    FLOAT8 work[18];
+		    for (k = -NL/4; k < 0; k++) {
+			FLOAT8 a, b;
+			a = win[type][k+27] * band1[(k+9)*32]
+			  + win[type][k+36] * band1[(8-k)*32];
+			b = win[type][k+ 9] * band0[(k+9)*32]
+			  - win[type][k+18] * band0[(8-k)*32];
+			work[k+ 9] = a - b*tantab_l[k+9];
+			work[k+18] = a*tantab_l[k+9] + b;
+		    }
+
+		    mdct_long(mdct_enc, work);
+		  }
+		}
+		/*
+		 * Perform aliasing reduction butterfly
+		 */
+		if (type != SHORT_TYPE) {
+		  if (band == 0)
+		    continue;
+		  for (k = 7; k >= 0; --k) {
+		    FLOAT8 bu,bd;
+		    bu = mdct_enc[k] * ca[k] + mdct_enc[-1-k] * cs[k];
+		    bd = mdct_enc[k] * cs[k] - mdct_enc[-1-k] * ca[k];
+		    
+		    mdct_enc[-1-k] = bu;
+		    mdct_enc[k]    = bd;
+		  }
+		}
+	      }
+	}
+	wk = w1 + 286;
+	if (gfc->mode_gr == 1) {
+	    memcpy(gfc->sb_sample[ch][0], gfc->sb_sample[ch][1], 576 * sizeof(FLOAT8));
+	}
+    }
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/newmdct.h
@@ -1,0 +1,28 @@
+/*
+ *	New Modified DCT include file
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_NEWMDCT_H
+#define LAME_NEWMDCT_H
+
+void mdct_sub48(lame_internal_flags *gfc,const sample_t *w0, const sample_t *w1,
+		FLOAT8 mdct_freq[2][2][576]);
+
+#endif /* LAME_NEWMDCT_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/parse.c
@@ -1,0 +1,1236 @@
+/*
+ *	Command line parsing related functions
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: parse.c,v 1.68 2001/03/11 11:24:25 aleidinger Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "lame.h"
+#include "brhist.h"
+#include "parse.h"
+#include "main.h"
+#include "get_audio.h"
+
+/* GLOBAL VARIABLES.  set by parse_args() */
+/* we need to clean this up */
+sound_file_format input_format;
+int	swapbytes;		/* force byte swapping   default=0*/
+int	silent;
+int	brhist;
+float	update_interval;	/* to use Frank's time status display */
+int	mp3_delay;		/* to adjust the number of samples truncated
+                               during decode */
+int	mp3_delay_set;		/* user specified the value of the mp3 encoder
+                               delay to assume for decoding */
+
+/*
+* license - Writes version and license to the file specified by fp
+*/
+static int
+lame_version_print(FILE*const fp)
+{
+	const char *v = get_lame_version();
+	const char *u = get_lame_url();
+	const int lenv = strlen(v);
+	const int lenu = strlen (u);
+	const int lw = 80;	/* line width of terminal in characters */
+	const int sw = 16;	/* static width of text */
+
+	if (lw >= lenv + lenu + sw || lw < lenu + 2)
+		/* text fits in 80 chars/line, or line even too small for url */
+		fprintf(fp, "mp3enc (from lame version %s (%s))\n\n", v, u);
+	else
+		/* text too long, wrap url into next line, right aligned */
+		fprintf(fp, "mp3enc (from lame version %s)\n%*s(%s)\n\n",
+			v, lw - 2 - lenu, "", u);
+	return 0;
+}
+
+/* print version & license */
+int
+print_license(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
+{
+	lame_version_print(fp);
+	fprintf(fp, "Can I use LAME in my commercial program?\n\n"
+		"Yes, you can, under the restrictions of the LGPL.  In particular, you\n"
+		"can include a compiled version of the LAME library (for example,\n"
+		"lame.dll) with a commercial program.  Some notable requirements of\n"
+		"the LGPL:\n"
+		"\n"
+		"1. In your program, you cannot include any source code from LAME, with\n"
+		"   the exception of files whose only purpose is to describe the library\n"
+		"   interface (such as lame.h).\n"
+		"\n"
+		"2. Any modifications of LAME must be released under the LGPL.\n"
+		"   The LAME project (www.mp3dev.org) would appreciate being\n"
+		"   notified of any modifications.\n"
+		"\n"
+		"3. You must give prominent notice that your program is:\n"
+		"      A. using LAME (including version number)\n"
+		"      B. LAME is under the LGPL\n"
+		"      C. Provide a copy of the LGPL.  (the file COPYING contains the LGPL)\n"
+		"      D. Provide a copy of LAME source, or a pointer where the LAME\n"
+		"         source can be obtained (such as www.mp3dev.org)\n"
+		"   An example of prominent notice would be an \"About the LAME encoding engine\"\n"
+		"   button in some pull down menu within the executable of your program.\n"
+		"\n"
+		"4. If you determine that distribution of LAME requires a patent license,\n"
+		"   you must obtain such license.\n"
+		"\n"
+		"\n"
+		"*** IMPORTANT NOTE ***\n"
+		"\n"
+		"The decoding functions provided in LAME use the mpglib decoding engine which\n"
+		"is under the GPL.  They may not be used by any program not released under the\n"
+		"GPL unless you obtain such permission from the MPG123 project (www.mpg123.de).\n"
+		"\n");
+	return 0;
+}
+
+/*
+* usage - Writes command line syntax to the file specified by fp
+*/
+/* print general syntax */
+int
+usage(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
+{
+	lame_version_print(fp);
+	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
+		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
+		"\n"
+		"Try  \"%s --help\"     for more information\n"
+		"  or \"%s --longhelp\"\n"
+		"  or \"%s -?\"         for a complete options list\n\n",
+		ProgramName, ProgramName, ProgramName, ProgramName);
+	return 0;
+}
+
+/*
+* short_help - Writes command line syntax to the file specified by fp
+*           but only the most important ones, to fit on a vt100 terminal
+*/
+/* print short syntax help */
+int
+short_help(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
+{
+	lame_version_print(fp);
+	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
+		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
+		"\n"
+		"RECOMMENDED:\n"
+		"    mp3enc -h input.wav output.mp3\n"
+		"\n"
+		"OPTIONS:\n"
+		"    -b bitrate      set the bitrate, default 128 kbps\n"
+		"    -f              fast mode (lower quality)\n"
+		"    -h              higher quality, but a little slower.  Recommended.\n"
+		"    -k              keep ALL frequencies (disables all filters)\n"
+		"                    Can cause ringing and twinkling\n"
+		"    -m mode         (s)tereo, (j)oint, (m)ono or (a)uto\n"
+		"                    default is (j) or (s) depending on bitrate\n"
+		"    -V n            quality setting for VBR.  default n=%i\n"
+		"\n"
+		"    --preset type   type must be phone, voice, fm, tape, hifi, cd or studio\n"
+		"                    \"--preset help\" gives some more infos on these\n"
+		"\n"
+		"    --longhelp      full list of options\n"
+		"\n",
+		ProgramName, gfp->VBR_q);
+	return 0;
+}
+
+/*
+* wait_for - Writes command line syntax to the file specified by fp
+*/
+static void
+wait_for (FILE*const fp, int lessmode)
+{
+	if (lessmode ) {
+		fflush(fp);
+		getchar ();
+	} else
+		fprintf(fp, "\n");
+	fprintf(fp, "\n");
+}
+
+/* print long syntax help */
+int
+long_help(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName, int lessmode)
+{
+	lame_version_print(fp);
+	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
+		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
+		"\n"
+		"RECOMMENDED:\n"
+		"    mp3enc -h input.wav output.mp3\n"
+		"\n"
+		"OPTIONS:\n"
+		"  Input options:\n"
+		"    -r              input is raw pcm\n"
+		"    -x              force byte-swapping of input\n"
+		"    -s sfreq        sampling frequency of input file (kHz) - default 44.1 kHz\n"
+		"    --mp1input      input file is a MPEG Layer I   file\n"
+		"    --mp2input      input file is a MPEG Layer II  file\n"
+		"    --mp3input      input file is a MPEG Layer III file\n"
+		"    --ogginput      input file is a Ogg Vorbis file",
+		ProgramName);
+	wait_for (fp, lessmode);
+	fprintf(fp, "  Operational options:\n"
+		"    -m <mode>       (s)tereo, (j)oint, (f)orce, (m)ono or (a)auto  \n"
+		"                    default is (s) or (j) depending on bitrate\n"
+		"                    force = force ms_stereo on all frames.\n"
+		"                    auto = jstereo, with varialbe mid/side threshold\n"
+		"    -a              downmix from stereo to mono file for mono encoding\n"
+		"    -d              allow channels to have different blocktypes\n"
+		"    --disptime <arg>print progress report every arg seconds\n"
+		"    --ogg           encode to Ogg Vorbis instead of MP3\n"
+		"    --freeformat    produce a free format bitstream\n"
+		"    --decode        input=mp3 file, output=wav\n"
+		"    -t              disable writing wav header when using --decode\n"
+		"    --comp  <arg>   choose bitrate to achive a compression ratio of <arg>\n"
+		"    --scale <arg>   scale input (multiply PCM data) by <arg>\n"
+		"    --athonly       only use the ATH for masking\n"
+		"    --noath         disable the ATH for masking\n"
+		"    --athlower x    lower the ATH x dB\n"
+		"    --notemp        disable temporal masking effect\n"
+		"    --short         use short blocks\n"
+		"    --noshort       do not use short blocks\n"
+		"    --voice         experimental voice mode\n"
+		"    --preset type   type must be phone, voice, fm, tape, hifi, cd or studio\n"
+		"                    \"--preset help\" gives some more infos on these");
+	wait_for (fp, lessmode);
+	fprintf(fp, "  Verbosity:\n"
+		"    -S              don't print progress report, VBR histograms\n"
+		"    --silent        don't print anything on screen\n"
+		"    --quiet         don't print anything on screen\n"
+		"    --verbose       print a lot of useful information, default\n"
+		"\n"
+		"  Noise shaping & psycho acoustic algorithms:\n"
+		"    -q <arg>        <arg> = 0...9.  Default  -q 5 \n"
+		"                    -q 0:  Highest quality, very slow \n"
+		"                    -q 9:  Poor quality, but fast \n"
+		"    -h              Same as -q 2.   Recommended.\n"
+		"    -f              Same as -q 7.   Fast, ok quality\n");
+	wait_for (fp, lessmode);
+	fprintf(fp, "  CBR (constant bitrate, the default) options:\n"
+		"    -b <bitrate>    set the bitrate in kbps, default 128 kbps\n"
+		"\n"
+		"  ABR options:\n"
+		"    --abr <bitrate> specify average bitrate desired (instead of quality)\n"
+		"\n"
+		"  VBR options:\n"
+		"    -v              use variable bitrate (VBR) (--vbr-old)\n"
+		"    --vbr-old       use old variable bitrate (VBR) routine\n"
+		"    --vbr-new       use new variable bitrate (VBR) routine\n"
+		"    --vbr-mtrh      a merger of old and new (VBR) routine\n"
+		"    -V n            quality setting for VBR.  default n=%i\n"
+		"                    0=high quality,bigger files. 9=smaller files\n"
+		"    -b <bitrate>    specify minimum allowed bitrate, default  32 kbps\n"
+		"    -B <bitrate>    specify maximum allowed bitrate, default 320 kbps\n"
+		"    -F              strictly enforce the -b option, for use with players that\n"
+		"                    do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)\n"
+		"    -t              disable writing Xing VBR informational tag\n"
+		"    --nohist        disable VBR histogram display", gfp->VBR_q);
+
+	wait_for (fp, lessmode);
+	fprintf(fp, "  MP3 header/stream options:\n"
+		"    -e <emp>        de-emphasis n/5/c  (obsolete)\n"
+		"    -c              mark as copyright\n"
+		"    -o              mark as non-original\n"
+		"    -p              error protection.  adds 16 bit checksum to every frame\n"
+		"                    (the checksum is computed correctly)\n"
+		"    --nores         disable the bit reservoir\n"
+		"    --strictly-enforce-ISO   comply as much as possible to ISO MPEG spec\n"
+		"\n"
+		"  Filter options:\n"
+		"    -k              keep ALL frequencies (disables all filters),\n"
+		"                    Can cause ringing and twinkling\n"
+		"  --lowpass <freq>        frequency(kHz), lowpass filter cutoff above freq\n"
+		"  --lowpass-width <freq>  frequency(kHz) - default 15%% of lowpass freq\n"
+		"  --highpass <freq>       frequency(kHz), highpass filter cutoff below freq\n"
+		"  --highpass-width <freq> frequency(kHz) - default 15%% of highpass freq\n"
+		"  --resample <sfreq>  sampling frequency of output file(kHz)- default=automatic\n"
+		"  --cwlimit <freq>    compute tonality up to freq (in kHz) default 8.8717");
+
+	wait_for (fp, lessmode);
+	fprintf(fp,
+		"  ID3 tag options:\n"
+		"    --tt <title>    audio/song title (max 30 chars for version 1 tag)\n"
+		"    --ta <artist>   audio/song artist (max 30 chars for version 1 tag)\n"
+		"    --tl <album>    audio/song album (max 30 chars for version 1 tag)\n"
+		"    --ty <year>     audio/song year of issue (1 to 9999)\n"
+		"    --tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)\n"
+		"    --tn <track>    audio/song track number (1 to 255, creates v1.1 tag)\n"
+		"    --tg <genre>    audio/song genre (name or number in list)\n"
+		"    --add-id3v2     force addition of version 2 tag\n"
+		"    --id3v1-only    add only a version 1 tag\n"
+		"    --id3v2-only    add only a version 2 tag\n"
+		"    --space-id3v1   pad version 1 tag with spaces instead of nulls\n"
+		"    --pad-id3v2     pad version 2 tag with extra 128 bytes\n"
+		"    --genre-list    print alphabetically sorted ID3 genre list and exit\n"
+		"\n"
+		"    Note: A version 2 tag will NOT be added unless one of the input fields\n"
+		"    won't fit in a version 1 tag (e.g. the title string is longer than 30\n"
+		"    characters), or the '--add-id3v2' or '--id3v2-only' options are used,\n"
+		"    or output is redirected to stdout."
+#if defined(HAVE_VORBIS)
+		"\n\n"
+		"    Note: All '--t*' options (except those for track and genre) work for Ogg\n"
+		"    Vorbis output, but other ID3-specific options are ignored."
+#endif
+		);
+	wait_for (fp, lessmode);
+	display_bitrates(fp);
+	return 0;
+}
+
+static void
+display_bitrate(FILE*const fp, const char*const version, const int div, const int index)
+{
+	int	i;
+
+	fprintf(fp, "\nMPEG-%-3s layer III sample frequencies (kHz):  %2d  %2d  %g\n"
+		"bitrates (kbps):",
+		version, 32 / div, 48 / div, 44.1 / div);
+	for (i = 1; i <= 14; i++)
+		fprintf(fp, " %2i", bitrate_table [index] [i]);
+	fprintf(fp, "\n");
+}
+
+int
+display_bitrates(FILE*const fp)
+{
+	display_bitrate(fp, "1"  , 1, 1);
+	display_bitrate(fp, "2"  , 2, 0);
+	display_bitrate(fp, "2.5", 4, 0);
+	fprintf(fp, "\n");
+	fflush(fp);
+	return 0;
+}
+
+typedef struct {
+	const char*name;	/* name of preset */
+	long	resample;	/* resample frequency in Hz, or -1 for no resampling */
+	short	highpass_freq;	/* highpass frequency in Hz, or -1 for no highpass filtering */
+	short	lowpass_freq;	/* lowpass frequency in Hz, or -1 for no lowpass filtering */
+	short	lowpass_width;	/* lowpass width in Hz */
+	signed char no_short_blocks;	/* use of short blocks, 1: no, 0: yes */
+	signed char quality;	/* quality, the same as -f or -h */
+	MPEG_mode mode;		/* channel mode (mono, stereo, joint) */
+	short	cbr;		/* CBR data rate in kbps (8...320) */
+	signed char xvbr_mode;	/* VBR mode (0...9) */
+	short	vbr_min;	/* minimum VBR rate in kbps(8...256) */
+	short	vbr_max;	/* maximum VBR rate in kbps (16...320) */
+} preset_t;
+
+const preset_t Presets [] = {
+/* name       fs     fu    fo    dfo shrt qual  mode       cbr vbr_mode/min/max */
+{ "phone" ,  8000, 125,  3400,    0,  1,  5, MONO        ,  16,  6,   8,  24 },	/* phone standard 300-3400 */
+{ "phon+" , 11025, 100,  4000,    0,  1,  5, MONO        ,  24,  4,  16,  32 },	/* phone theoretical limits */
+{ "lw"    , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* LW */
+{ "mw-eu" , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* MW in europe */
+{ "mw-us" , 16000,  -1,  7500,    0,  0,  5, MONO        ,  40,  3,  24, 112 },	/* MW in U.S.A. */
+{ "sw"    , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* SW */
+{ "fm"    , 32000,  -1, 15000,    0,  0,  3, JOINT_STEREO, 112,  3,  80, 256 },
+{ "voice" , 24000,  -1, 12000,    0,  1,  5, MONO        ,  56,  4,  40, 112 },
+{ "radio" ,    -1,  -1, 15000,    0,  0,  3, JOINT_STEREO, 128,  3,  96, 256 },
+{ "tape"  ,    -1,  -1, 18000,  900,  0,  3, JOINT_STEREO, 128,  3,  96, 256 },
+{ "hifi"  ,    -1,  -1, 18000,  900,  0, -1, JOINT_STEREO, 160,  2, 112, 320 },
+{ "cd"    ,    -1,  -1,    -1,   -1,  0, -1, STEREO      , 192,  1, 128, 320 },
+{ "studio",    -1,  -1,    -1,   -1,  0, -1, STEREO      , 256,  0, 160, 320 },
+};
+
+/*
+* Writes presetting info to #stdout#
+*/
+
+/* print possible combination */
+static int
+presets_info(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
+{
+	int	i;
+
+	fprintf(fp, "\n");
+	lame_version_print(fp);
+
+	fprintf(fp, "Presets are some shortcuts for common settings.\n");
+	fprintf(fp, "They can be combined with -v if you want VBR MP3s.\n");
+
+	fprintf(fp, "\n                ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  strlen(Presets[i].name) <= 4? "%5s ": " %-5s",
+			Presets[i].name);
+	fprintf(fp, "\n=================");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "======");
+	fprintf(fp, "\n--resample      ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		if (Presets[i].resample < 0)
+			fprintf(fp,  "      ");
+		else
+			fprintf(fp,  "%6.3g",  Presets[i].resample * 1.e-3);
+	fprintf(fp, "\n--highpass      ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		if (Presets[i].highpass_freq < 0)
+			fprintf(fp,  "      ");
+		else
+			fprintf(fp,  "%6.3g",  Presets[i].highpass_freq * 1.e-3);
+	fprintf(fp, "\n--lowpass       ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		if (Presets[i].lowpass_freq < 0)
+			fprintf(fp,  "      ");
+		else
+			fprintf(fp,  "%6.3g",  Presets[i].lowpass_freq * 1.e-3);
+	fprintf(fp, "\n--lowpass-width ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		if (Presets[i].lowpass_width < 0)
+			fprintf(fp,  "      ");
+		else
+			fprintf(fp,  "%6.3g",  Presets[i].lowpass_width * 1.e-3);
+	fprintf(fp, "\n--noshort       ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		switch (Presets[i].no_short_blocks ) {
+		case 1:
+			fprintf(fp,  "   yes");
+			break;
+		case 0:
+			fprintf(fp,  "    no");
+			break;
+		case -1:
+			fprintf(fp,  "      ");
+			break;
+		default:
+			assert (0);
+			break;
+		}
+	fprintf(fp, "\n                ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		switch (Presets[i].mode ) {
+		case MONO:
+			fprintf(fp, "   -mm");
+			break;
+		case JOINT_STEREO:
+			fprintf(fp, "   -mj");
+			break;
+		case STEREO:
+			fprintf(fp, "   -ms");
+			break;
+		case -1:
+			fprintf(fp, "      ");
+			break;
+		default:
+			assert (0);
+			break;
+		}
+	fprintf(fp, "\n                ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		switch (Presets[i].quality ) {
+		case -1:
+			fprintf(fp, "      ");
+			break;
+		case 2:
+			fprintf(fp, "    -h");
+			break;
+		case 3:
+			fprintf(fp, "   -q3");
+			break;
+		case 5:
+			fprintf(fp, "      ");
+			break;
+		case 7:
+			fprintf(fp, "    -f");
+			break;
+		default:
+			assert (0);
+			break;
+		}
+	fprintf(fp, "\n-b              ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "%6u", Presets[i].cbr);
+	fprintf(fp, "\n-- PLUS WITH -v ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "------");
+	fprintf(fp, "-\n-V              ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "%6u", Presets[i].xvbr_mode);
+	fprintf(fp, "\n-b              ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "%6u", Presets[i].vbr_min);
+	fprintf(fp, "\n-B              ");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "%6u", Presets[i].vbr_max);
+	fprintf(fp, "\n----------------");
+	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
+		fprintf(fp,  "------");
+
+	fprintf(fp, "-\nEXAMPLES:\n");
+	fprintf(fp, " a) --preset fm\n");
+	fprintf(fp, "    equal to: -mj -b112 --resample 32 --lowpass 15 --lowpass-width 0\n");
+	fprintf(fp, " b) -v --preset studio\n");
+	fprintf(fp, "    equals to: -h -ms -V0 -b160 -B320\n");
+
+	return 0;
+}
+
+
+static int
+presets_setup(lame_global_flags*gfp, const char*preset_name, const char*ProgramName)
+{
+	int	i;
+
+	for (i = 0; i < sizeof Presets / sizeof *Presets; i++)
+		if (0 == strncmp(preset_name, Presets[i].name, strlen(preset_name))) {
+			if (Presets[i].resample >= 0)
+				(void) lame_set_out_samplerate(gfp,
+					Presets[i].resample);
+			if (Presets[i].highpass_freq >= 0)
+				gfp ->highpassfreq = Presets[i].highpass_freq,
+					gfp ->highpasswidth = 0;
+			gfp ->lowpassfreq          = Presets[i].lowpass_freq;
+			gfp ->lowpasswidth         = Presets[i].lowpass_width;
+			gfp ->no_short_blocks      = Presets[i].no_short_blocks;
+			(void) lame_set_quality(gfp, Presets[i].quality);
+			(void) lame_set_mode(gfp, Presets[i].mode);
+			gfp ->brate                = Presets[i].cbr;
+			gfp ->VBR_q                = Presets[i].xvbr_mode;
+			gfp ->VBR_min_bitrate_kbps = Presets[i].vbr_min;
+			gfp ->VBR_max_bitrate_kbps = Presets[i].vbr_max;
+			return 0;
+		}
+	presets_info(gfp, stderr, ProgramName);
+	return -1;
+}
+
+static void
+genre_list_handler(int num, const char *name, void *cookie)
+{
+	printf("%3d %s\n", num, name);
+}
+
+/*
+* parse_args - Sets encoding parameters to the specifications of the
+* command line.  Default settings are used for parameters
+* not specified in the command line.
+*
+* If the input file is in WAVE or AIFF format, the sampling frequency is read
+* from the AIFF header.
+*
+* The input and output filenames are read into #inpath# and #outpath#.
+*/
+
+/* would use real "strcasecmp" but it isn't portable */
+static int
+local_strcasecmp(const char*s1, const char*s2)
+{
+	unsigned char	c1, c2;
+
+	do {
+		c1 = tolower(*s1);
+		c2 = tolower(*s2);
+		if (!c1)
+			break;
+		++s1;
+		++s2;
+	} while (c1 == c2);
+	return c1 - c2;
+}
+
+/*
+ * LAME is a simple frontend which just uses the file extension
+ * to determine the file type.  Trying to analyze the file
+ * contents is well beyond the scope of LAME and should not be added.
+ */
+static int
+filename_to_type(const char*FileName)
+{
+	int	len = strlen(FileName);
+
+	if (len < 4)
+		return sf_unknown;
+
+	FileName += len - 4;
+	if (0 == local_strcasecmp(FileName, ".mpg" ))
+		return sf_mp1;
+	if (0 == local_strcasecmp(FileName, ".mp1" ))
+		return sf_mp1;
+	if (0 == local_strcasecmp(FileName, ".mp2" ))
+		return sf_mp2;
+	if (0 == local_strcasecmp(FileName, ".mp3" ))
+		return sf_mp3;
+	if (0 == local_strcasecmp(FileName, ".ogg" ))
+		return sf_ogg;
+	if (0 == local_strcasecmp(FileName, ".wav" ))
+		return sf_wave;
+	if (0 == local_strcasecmp(FileName, ".aif" ))
+		return sf_aiff;
+	if (0 == local_strcasecmp(FileName, ".raw" ))
+		return sf_raw;
+	return sf_unknown;
+}
+
+static int
+resample_rate(double freq)
+{
+	if (freq >= 1.e3)
+		freq *= 1.e-3;
+
+	switch ((int)freq) {
+	case 8:
+		return  8000;
+	case 11:
+		return 11025;
+	case 12:
+		return 12000;
+	case 16:
+		return 16000;
+	case 22:
+		return 22050;
+	case 24:
+		return 24000;
+	case 32:
+		return 32000;
+	case 44:
+		return 44100;
+	case 48:
+		return 48000;
+	default:
+		fprintf(stderr, "Illegal resample frequency: %.3f kHz\n", freq);
+		return 0;
+	}
+}
+
+/* Ugly, NOT final version */
+
+#define T_IF(str)	if (0 == local_strcasecmp (token,str) ) {
+#define T_ELIF(str)	} else if (0 == local_strcasecmp (token,str) ) {
+#define T_ELIF2(str1,str2) } else if (0 == local_strcasecmp(token,str1) || \
+			0 == local_strcasecmp(token,str2)) {
+#define T_ELSE		} else {
+#define T_END		}
+
+int
+parse_args(lame_global_flags*gfp, int argc, char **argv)
+{
+	int err, i, autoconvert  = 0;
+	double val;
+	const char *ProgramName = argv[0];
+
+	/* turn on display options. user settings may turn them off below */
+	silent   = 0;
+	brhist   = 1;
+	mp3_delay = 0;
+	mp3_delay_set = 0;
+	id3tag_init(gfp);
+
+	/* process args */
+	for (i = 0, err = 0; ++i < argc && !err; ) {
+		char	c;
+		char *token, *arg, *nextArg;
+		int	argUsed;
+
+		token = argv[i];
+		if (*token++ == '-' ) {
+			argUsed = 0;
+			nextArg = i + 1 < argc? argv[i+1]: "";
+
+			if (*token == '-') {		/* GNU style */
+				token++;
+
+				T_IF ("resample")
+				argUsed = 1;
+				(void) lame_set_out_samplerate(gfp,
+					resample_rate(atof (nextArg) ));
+
+				T_ELIF ("vbr-old")
+				gfp->VBR = vbr_rh;
+
+				T_ELIF ("vbr-new")
+				gfp->VBR = vbr_mt;
+
+				T_ELIF ("vbr-mtrh")
+				gfp->VBR = vbr_mtrh;
+
+				T_ELIF ("r3mix")
+				gfp->VBR = vbr_rh;
+				gfp->VBR_q = 1;
+				(void) lame_set_quality(gfp, 2);
+				gfp->lowpassfreq = 19500;
+				(void) lame_set_mode(gfp, JOINT_STEREO);
+				gfp->ATHtype = 3;
+				gfp->VBR_min_bitrate_kbps = 64;
+
+				T_ELIF ("abr")
+				argUsed = 1;
+				gfp->VBR = vbr_abr;
+				gfp->VBR_mean_bitrate_kbps = atoi(nextArg);
+				/*
+				 * values larger than 8000 are bps (like
+				 * Fraunhofer), so it's strange to get 320000
+				 * bps MP3 when specifying 8000 bps MP3.
+				 */
+				if (gfp ->VBR_mean_bitrate_kbps >= 8000)
+					gfp->VBR_mean_bitrate_kbps = (gfp->VBR_mean_bitrate_kbps + 500 )/1000;
+				gfp->VBR_mean_bitrate_kbps = Min(gfp->VBR_mean_bitrate_kbps, 320);
+				gfp->VBR_mean_bitrate_kbps = Max(gfp->VBR_mean_bitrate_kbps,   8);
+
+				T_ELIF ("mp1input")
+				input_format = sf_mp1;
+
+				T_ELIF ("mp2input")
+				input_format = sf_mp2;
+
+				T_ELIF ("mp3input")
+				input_format = sf_mp3;
+
+				T_ELIF ("ogginput")
+#if defined(HAVE_VORBIS)
+				input_format = sf_ogg;
+#else
+				fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
+				return -1;
+#endif
+				T_ELIF ("ogg")
+#if defined(HAVE_VORBIS)
+				(void) lame_set_ogg(gfp, 1);
+#else
+				fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
+				return -1;
+#endif
+				T_ELIF ("phone")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("voice")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("radio")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("tape")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("cd")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("studio")
+				if (presets_setup(gfp, token, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("noshort")
+				gfp->no_short_blocks = 1;
+
+				T_ELIF ("short")
+				gfp->no_short_blocks = 0;
+
+				T_ELIF ("decode")
+				(void) lame_set_decode_only(gfp, 1);
+
+				T_ELIF ("decode-mp3delay")
+				mp3_delay = atoi(nextArg);
+				mp3_delay_set = 1;
+				argUsed = 1;
+
+				T_ELIF ("noath")
+				gfp->noATH = 1;
+
+				T_ELIF ("nores")
+				gfp->disable_reservoir = 1;
+				gfp->padding_type = 0;
+
+				T_ELIF ("strictly-enforce-ISO")
+				gfp->strict_ISO = 1;
+
+				T_ELIF ("athonly")
+				gfp->ATHonly = 1;
+
+				T_ELIF ("athlower")
+				argUsed = 1;
+				gfp->ATHlower = atof(nextArg);
+
+				T_ELIF ("athtype")
+				argUsed = 1;
+				gfp->ATHtype = atoi(nextArg);
+
+				T_ELIF ("scale")
+				argUsed = 1;
+				(void) lame_set_scale(gfp, atof(nextArg));
+
+				T_ELIF ("freeformat")
+				gfp->free_format = 1;
+
+				T_ELIF ("athshort")
+				gfp->ATHshort = 1;
+
+				T_ELIF ("nohist")
+				brhist = 0;
+
+				/* options for ID3 tag */
+				T_ELIF ("tt")
+				argUsed = 1;
+				id3tag_set_title(gfp, nextArg);
+
+				T_ELIF ("ta")
+				argUsed = 1;
+				id3tag_set_artist(gfp, nextArg);
+
+				T_ELIF ("tl")
+				argUsed = 1;
+				id3tag_set_album(gfp, nextArg);
+
+				T_ELIF ("ty")
+				argUsed = 1;
+				id3tag_set_year(gfp, nextArg);
+
+				T_ELIF ("tc")
+				argUsed = 1;
+				id3tag_set_comment(gfp, nextArg);
+
+				T_ELIF ("tn")
+				argUsed = 1;
+				id3tag_set_track(gfp, nextArg);
+
+				T_ELIF ("tg")
+				argUsed = 1;
+				if (id3tag_set_genre(gfp, nextArg)) {
+					fprintf(stderr, "Unknown genre: %s.  Specify genre name or number\n", nextArg);
+					return -1;
+				}
+
+				T_ELIF ("add-id3v2")
+				id3tag_add_v2(gfp);
+
+				T_ELIF ("id3v1-only")
+				id3tag_v1_only(gfp);
+
+				T_ELIF ("id3v2-only")
+				id3tag_v2_only(gfp);
+
+				T_ELIF ("space-id3v1")
+				id3tag_space_v1(gfp);
+
+				T_ELIF ("pad-id3v2")
+				id3tag_pad_v2(gfp);
+
+				T_ELIF ("genre-list")
+				id3tag_genre_list(genre_list_handler, NULL);
+				return - 2;
+
+				T_ELIF ("lowpass")
+				val     = atof(nextArg);
+				argUsed = 1;
+				/* useful are 0.001 kHz...50 kHz, 50 Hz...50000 Hz */
+				gfp ->lowpassfreq = val * (val < 50. ? 1.e3 : 1.e0 ) + 0.5;
+				if (val < 0.001 || val > 50000. ) {
+					fprintf(stderr, "Must specify lowpass with --lowpass freq, freq >= 0.001 kHz\n");
+					return -1;
+				}
+
+				T_ELIF ("lowpass-width")
+				argUsed = 1;
+				gfp->lowpasswidth =  1000.0 * atof(nextArg ) + 0.5;
+				if (gfp->lowpasswidth  < 0) {
+					fprintf(stderr, "Must specify lowpass width with --lowpass-width freq, freq >= 0 kHz\n");
+					return -1;
+				}
+
+				T_ELIF ("highpass")
+				val = atof(nextArg);
+				argUsed = 1;
+				/* useful are 0.001 kHz...16 kHz, 16 Hz...50000 Hz */
+				gfp->highpassfreq =  val * (val < 16. ? 1.e3 : 1.e0 ) + 0.5;
+				if (val < 0.001 || val > 50000. ) {
+					fprintf(stderr, "Must specify highpass with --highpass freq, freq >= 0.001 kHz\n");
+					return -1;
+				}
+
+				T_ELIF ("highpass-width")
+				argUsed = 1;
+				gfp->highpasswidth =  1000.0 * atof(nextArg ) + 0.5;
+				if (gfp->highpasswidth  < 0) {
+					fprintf(stderr, "Must specify highpass width with --highpass-width freq, freq >= 0 kHz\n");
+					return -1;
+				}
+
+				T_ELIF ("cwlimit")
+				val = atof (nextArg);
+				argUsed = 1;
+				/* useful are 0.001 kHz...50 kHz, 50 Hz...50000 Hz */
+				gfp ->cwlimit = val *(val <= 50. ? 1.e3 : 1.e0);
+				if (gfp->cwlimit <= 0 ) {
+					fprintf(stderr, "Must specify cwlimit with --cwlimit freq, freq >= 0.001 kHz\n");
+					return -1;
+				}
+
+				T_ELIF ("comp")
+				argUsed = 1;
+				gfp->compression_ratio =  atof(nextArg);
+				if (gfp->compression_ratio < 1.0 ) {
+					fprintf(stderr, "Must specify compression ratio >= 1.0\n");
+					return -1;
+				}
+
+				T_ELIF ("notemp")
+				gfp->useTemporal =  0;
+
+				T_ELIF ("nspsytune")
+				gfp->exp_nspsytune |= 1;
+				gfp->experimentalZ = 1;
+				gfp->experimentalX = 1;
+
+				T_ELIF ("nssafejoint")
+				gfp->exp_nspsytune |= 2;
+
+				T_ELIF ("ns-bass")
+				argUsed = 1;
+				 {
+					double	d;
+					int	k;
+					d = atof(nextArg);
+					k = (int)(d * 4);
+					if (k < -32)
+						k = -32;
+					if (k >  31)
+						k =  31;
+					if (k < 0)
+						k += 64;
+					gfp->exp_nspsytune |= (k << 2);
+				}
+
+				T_ELIF ("ns-alto")
+				argUsed = 1;
+				 {
+					double	d;
+					int	k;
+					d = atof(nextArg);
+					k = (int)(d * 4);
+					if (k < -32)
+						k = -32;
+					if (k >  31)
+						k =  31;
+					if (k < 0)
+						k += 64;
+					gfp->exp_nspsytune |= (k << 8);
+				}
+
+				T_ELIF ("ns-treble")
+				argUsed = 1;
+				 {
+					double	d;
+					int	k;
+					d = atof(nextArg);
+					k = (int)(d * 4);
+					if (k < -32)
+						k = -32;
+					if (k >  31)
+						k =  31;
+					if (k < 0)
+						k += 64;
+					gfp->exp_nspsytune |= (k << 14);
+				}
+
+				/* some more GNU-ish options could be added
+		 * brief         => few messages on screen (name, status report)
+		 * o/output file => specifies output filename
+		 * O             => stdout
+		 * i/input file  => specifies input filename
+		 * I             => stdin
+		 */
+				T_ELIF2 ("quiet", "silent")
+				silent = 10;    /* on a scale from 1 to 10 be very silent */
+
+				T_ELIF ("verbose")
+				silent = 0;    /* print a lot on screen, the default */
+
+				T_ELIF2 ("version", "license")
+				print_license(gfp, stdout, ProgramName);
+				return - 2;
+
+				T_ELIF2 ("help", "usage")
+				short_help(gfp, stdout, ProgramName);
+				return - 2;
+
+				T_ELIF ("longhelp")
+				long_help(gfp, stdout, ProgramName, 0 /* lessmode=NO */);
+				return - 2;
+
+				T_ELIF ("?")
+				long_help(gfp, stdout, ProgramName, 1 /* lessmode=YES */);
+				return - 2;
+
+				T_ELIF ("preset")
+				argUsed = 1;
+				if (presets_setup(gfp, nextArg, ProgramName ) < 0)
+					return -1;
+
+				T_ELIF ("disptime")
+				argUsed = 1;
+				update_interval = atof (nextArg);
+
+				T_ELSE
+					fprintf(stderr, "%s: unrec option --%s\n", ProgramName, token);
+
+				T_END
+					i += argUsed;
+			} else {
+				while ((c = *token++) != '\0' ) {
+					arg = *token ? token : nextArg;
+					switch (c) {
+					case 'm':
+						argUsed = 1;
+
+						switch (*arg ) {
+						case 's':
+							(void) lame_set_mode(gfp, STEREO);
+							break;
+						case 'd':
+							(void) lame_set_mode(gfp, DUAL_CHANNEL);
+							fprintf(stderr,
+								"%s: dual channel is not supported yet, the result (perhaps stereo)\n"
+								"  may not be what you expect\n",
+								ProgramName);
+							break;
+						case 'f':
+							gfp->force_ms = 1;
+							/* FALLTHROUGH */
+						case 'j':
+							(void) lame_set_mode(gfp, JOINT_STEREO);
+							break;
+						case 'm':
+							(void) lame_set_mode(gfp, MONO);
+							break;
+						case 'a':
+							(void) lame_set_mode_automs(gfp, 1);
+							/* lame picks mode & uses variable MS threshold */
+							break;
+						default :
+							fprintf(stderr, "%s: -m mode must be s/d/j/f/m not %s\n", ProgramName, arg);
+							err = 1;
+							break;
+						}
+						break;
+
+					case 'V':
+						argUsed = 1;
+						/* to change VBR default look in lame.h */
+						if (gfp->VBR == vbr_off)
+							gfp->VBR = vbr_default;
+						gfp->VBR_q = atoi(arg);
+						if (gfp->VBR_q < 0)
+							gfp->VBR_q = 0;
+						if (gfp->VBR_q > 9)
+							gfp->VBR_q = 9;
+						break;
+					case 'v':
+						/* to change VBR default look in lame.h */
+						if (gfp->VBR == vbr_off)
+							gfp->VBR = vbr_default;
+						break;
+
+					case 'q':
+						argUsed = 1;
+						 {
+							int tmp_quality = atoi(arg);
+
+							/* XXX should we move this into lame_set_quality()? */
+							if (tmp_quality < 0)
+								tmp_quality = 0;
+							if (tmp_quality > 9)
+								tmp_quality = 9;
+
+							(void) lame_set_quality(gfp, tmp_quality);
+						}
+						break;
+					case 'f':
+						(void) lame_set_quality(gfp, 7);
+						break;
+					case 'h':
+						(void) lame_set_quality(gfp, 2);
+						break;
+
+					case 's':
+						argUsed = 1;
+						val = atof(arg);
+						(void) lame_set_in_samplerate(gfp,
+							val *(val <= 192 ? 1.e3 : 1.e0 ) + 0.5);
+						break;
+					case 'b':
+						argUsed = 1;
+						gfp->brate = atoi(arg);
+						gfp->VBR_min_bitrate_kbps = gfp->brate;
+						break;
+					case 'B':
+						argUsed = 1;
+						gfp->VBR_max_bitrate_kbps = atoi(arg);
+						break;
+					case 'F':
+						gfp->VBR_hard_min = 1;
+						break;
+					case 't':  /* dont write VBR tag */
+						(void) lame_set_bWriteVbrTag(gfp, 0);
+						(void) lame_set_disable_waveheader(gfp, 1);
+						break;
+					case 'r':  /* force raw pcm input file */
+#if defined(LIBSNDFILE)
+						fprintf(stderr, "WARNING: libsndfile may ignore -r and perform fseek's on the input.\n"
+							"Compile without libsndfile if this is a problem.\n");
+#endif
+						input_format = sf_raw;
+						break;
+					case 'x':  /* force byte swapping */
+						swapbytes = 1;
+						break;
+					case 'p': /* (jo) error_protection: add crc16 information to stream */
+						gfp->error_protection = 1;
+						break;
+					case 'a': /* autoconvert input file from stereo to mono - for mono mp3 encoding */
+						autoconvert = 1;
+						(void) lame_set_mode(gfp, MONO);
+						break;
+					case 'k':
+						gfp->lowpassfreq = -1;
+						gfp->highpassfreq = -1;
+						break;
+					case 'd':
+						gfp->allow_diff_short = 1;
+						break;
+					case 'S':
+						silent = 1;
+						break;
+					case 'X':
+						argUsed = 1;
+						gfp->experimentalX = atoi(arg);
+						break;
+					case 'Y':
+						gfp->experimentalY = 1;
+						break;
+					case 'Z':
+						gfp->experimentalZ = 1;
+						break;
+#if defined(HAVE_GTK)
+					case 'g': /* turn on gtk analysis */
+						(void) lame_set_analysis(gfp, 1);
+						break;
+#endif
+					case 'e':
+						argUsed = 1;
+
+						switch (*arg) {
+						case 'n':
+							gfp ->emphasis = 0;
+							break;
+						case '5':
+							gfp ->emphasis = 1;
+							break;
+						case 'c':
+							gfp ->emphasis = 3;
+							break;
+						default :
+							fprintf(stderr, "%s: -e emp must be n/5/c not %s\n", ProgramName, arg);
+							err = 1;
+							break;
+						}
+						break;
+					case 'c':
+						gfp->copyright = 1;
+						break;
+					case 'o':
+						gfp->original  = 0;
+						break;
+
+					case '?':
+						long_help(gfp, stderr, ProgramName, 0 /* LESSMODE=NO */);
+						return -1;
+
+					default:
+						fprintf(stderr, "%s: unrec option %c\n", ProgramName, c);
+						err = 1;
+						break;
+					}
+					if (argUsed) {
+						if (arg == token)
+							token = ""; /* no more from token */
+						else
+							++i; /* skip arg we used */
+						arg = "";
+						argUsed = 0;
+					}
+				}
+			}
+		} else {
+			fprintf(stderr, "%s: excess arg %s\n", ProgramName, argv[i]);
+			err = 1;
+		}
+	}
+
+	if (err) {
+		usage(gfp, stderr, ProgramName);
+		return -1;
+	}
+
+//	if (inPath[0] == '-')
+	silent = 1;		/* turn off status - it's broken for stdin */
+
+	/* some file options not allowed with stdout */
+//	if (outPath[0] == '-')
+	(void) lame_set_bWriteVbrTag(gfp, 0); /* turn off VBR tag */
+
+#if !(defined HAVE_MPGLIB || defined AMIGA_MPEGA)
+	if (input_format == sf_mp1 ||
+		input_format == sf_mp2 ||
+		input_format == sf_mp3) {
+		fprintf(stderr, "Error: libmp3lame not compiled with mpg123 *decoding* support \n");
+		return -1;
+	}
+#endif
+
+#if !(defined HAVE_VORBIS)
+	if (input_format == sf_ogg) {
+		fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
+		return -1;
+	}
+#endif
+	/* default guess for number of channels */
+	if (autoconvert)
+		(void) lame_set_num_channels(gfp, 2);
+	else if (MONO == lame_get_mode(gfp ))
+		(void) lame_set_num_channels(gfp, 1);
+	else
+		(void) lame_set_num_channels(gfp, 2);
+
+	if (gfp->free_format) {
+		if (gfp ->brate < 8  ||  gfp ->brate > 640) {
+			fprintf(stderr, "For free format, specify a bitrate between 8 and 640 kbps\n");
+			return -1;
+		}
+	}
+	return 0;
+}
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/parse.h
@@ -1,0 +1,8 @@
+int  print_license(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
+int  usage(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
+int  short_help(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
+int  long_help(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName, int lessmode);
+int  display_bitrates(FILE* const fp);
+
+int  parse_args(lame_global_flags* gfp, int argc, char** argv);
+void print_config(lame_global_flags* gfp);
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/pcm.c
@@ -1,0 +1,1609 @@
+/* -*- mode: C; mode: fold -*- */
+
+/* $Id: pcm.c,v 1.7 2001/02/17 14:30:56 aleidinger Exp $ */
+
+/*
+ *  There are a lot of not tested return codes.
+ *  This is currently intention to make the code more readable
+ *  in the design phase.
+ *  Keine Ber�cksichtigung des Ein- und Ausschwingens des Downsamplefilters am
+ *  Anfang und am Ende wie bei meinem Resample-Programm
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "bitstream.h"
+#include "id3tag.h"
+
+#define FN(x)	do { static unsigned int cnt = 0; if (cnt < 100000) fprintf (stderr,"[%3u]>>>%s<<<\n",++cnt,(x)), fflush(stderr); } while (0)
+
+#ifdef KLEMM_44
+
+/*{{{ #includes                       */
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <math.h>
+#include <memory.h>
+#include <unistd.h>
+#include "pcm.h"
+
+/*}}}*/
+/*{{{ bitstream object                */
+
+/*
+ *  About handling of octetstreams:
+ *
+ *  CHAR_BIT = 8: data points to a normal memory block which can be written to
+ *                disk via fwrite
+ *  CHAR_BIT > 8: On every char only the bits from 0...7 are used. Depending on the
+ *                host I/O it can be possible that you must first pack the data
+ *                stream before writing to disk/network/...
+ *  CHAR_BIT < 8: Not allowed by C
+ */
+
+octetstream_t*  octetstream_open ( OUT size_t  size )
+{
+    octetstream_t*  ret = (octetstream_t*) calloc ( 1, sizeof(octetstream_t) );
+    FN("octetstream_open");
+    ret -> data = (uint8_t*) calloc ( 1, size );
+    ret -> size = size;
+    return ret;
+}
+
+int  octetstream_resize ( INOUT octetstream_t* const  os, OUT size_t  size )
+{
+    FN("octetstream_resize");
+    if ( size > os->size ) {
+        os -> data = (uint8_t*) realloc ( os -> data, size );
+        memset ( os -> data + os -> size, 0, size - os -> size );
+        os -> size = size;
+    } else if ( size < os->size ) {
+	os -> data = (uint8_t*) realloc ( os -> data, os->size = size );
+    }
+    return 0;
+}
+
+int  octetstream_close ( INOUT octetstream_t* const  os )
+{
+    FN("octetstream_close");
+    if ( os == NULL )
+        return -1;
+    if ( os -> data != NULL ) {
+        free (os -> data);
+        os -> data = NULL;
+        free (os);
+        return 0;
+    } else {
+        free (os);
+        return -1;
+    }
+}
+
+/*}}}*/
+/*{{{ encode one frame                */
+
+static inline int  lame_encode_frame (
+        INOUT lame_t*     lame,
+        OUTTR sample_t**  inbuf,
+        IN    uint8_t*    mp3buf,
+        OUT   size_t      mp3buf_size )
+{
+    int  ret;
+#if 1
+    int           i;
+    static int    j  = 0;
+    static FILE*  fp = NULL;
+    if ( fp == NULL )
+        fp = fopen ("pcm_data.txt", "w");
+    for ( i = 0; i < lame->frame_size; i++ )
+        fprintf ( fp, "%7d %11.4f %11.4f\n", j++, inbuf[0][i], inbuf[1][i] );
+    fprintf ( fp, "\n" );
+    fflush ( fp );
+#endif
+    
+    FN("lame_encode_frame");
+
+    switch ( lame -> coding ) {
+#ifdef HAVE_MPEG_LAYER1
+    case coding_MPEG_Layer_1:
+        ret = lame_encode_mp1_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#endif
+#ifdef HAVE_MPEG_LAYER2
+    case coding_MPEG_Layer_2:
+        ret = lame_encode_mp2_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#endif
+    case coding_MPEG_Layer_3:
+        ret = lame_encode_mp3_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#ifdef HAVE_MPEG_PLUS
+    case coding_MPEG_plus:
+        ret = lame_encode_mpp_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#endif
+#ifdef HAVE_AAC
+    case coding_MPEG_AAC:
+        ret = lame_encode_aac_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#endif
+#ifdef HAVE_VORBIS
+    case coding_Ogg_Vorbis:
+        ret = lame_encode_ogg_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
+        break;
+#endif
+    default:
+        ret = -5;
+        break;
+    }
+    
+    if ( ret >= 0 ) {
+        lame->frame_count++;
+        if ( lame->analyzer_callback != NULL )
+            lame->analyzer_callback ( lame, lame->frame_size );
+    }
+    return ret;
+}
+
+/*}}}*/
+/*{{{ demultiplexing tools            */
+
+/*
+ * Now there are following the so called peek functions. They got a pointer and returning
+ * the data to this pointer as a sample. The size of the memory object can be from
+ * 8 up to 80 bits. One sample must be fully determined by it's bits, not by the history
+ * or by other channels or things like that. Also the input must have a integral byte size.
+ *
+ * That means:
+ *
+ *   - 4 or 6 bit PCM can't be decoded
+ *   - APCM can't be decoded
+ *   - ulaw/alaw *can* be decoded
+ *
+ * Note: In the future there will be a SMART define supported which only
+ *       support native endian shorts.
+ */
+
+static const int16_t  ulaw [256] = {
+    -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956,
+    -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764,
+    -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412,
+    -11900, -11388, -10876, -10364,  -9852,  -9340,  -8828,  -8316,
+     -7932,  -7676,  -7420,  -7164,  -6908,  -6652,  -6396,  -6140,
+     -5884,  -5628,  -5372,  -5116,  -4860,  -4604,  -4348,  -4092,
+     -3900,  -3772,  -3644,  -3516,  -3388,  -3260,  -3132,  -3004,
+     -2876,  -2748,  -2620,  -2492,  -2364,  -2236,  -2108,  -1980,
+     -1884,  -1820,  -1756,  -1692,  -1628,  -1564,  -1500,  -1436,
+     -1372,  -1308,  -1244,  -1180,  -1116,  -1052,   -988,   -924,
+      -876,   -844,   -812,   -780,   -748,   -716,   -684,   -652,
+      -620,   -588,   -556,   -524,   -492,   -460,   -428,   -396,
+      -372,   -356,   -340,   -324,   -308,   -292,   -276,   -260,
+      -244,   -228,   -212,   -196,   -180,   -164,   -148,   -132,
+      -120,   -112,   -104,    -96,    -88,    -80,    -72,    -64,
+       -56,    -48,    -40,    -32,    -24,    -16,     -8,      0,
+     32124,  31100,  30076,  29052,  28028,  27004,  25980,  24956,
+     23932,  22908,  21884,  20860,  19836,  18812,  17788,  16764,
+     15996,  15484,  14972,  14460,  13948,  13436,  12924,  12412,
+     11900,  11388,  10876,  10364,   9852,   9340,   8828,   8316,
+      7932,   7676,   7420,   7164,   6908,   6652,   6396,   6140,
+      5884,   5628,   5372,   5116,   4860,   4604,   4348,   4092,
+      3900,   3772,   3644,   3516,   3388,   3260,   3132,   3004,
+      2876,   2748,   2620,   2492,   2364,   2236,   2108,   1980,
+      1884,   1820,   1756,   1692,   1628,   1564,   1500,   1436,
+      1372,   1308,   1244,   1180,   1116,   1052,    988,    924,
+       876,    844,    812,    780,    748,    716,    684,    652,
+       620,    588,    556,    524,    492,    460,    428,    396,
+       372,    356,    340,    324,    308,    292,    276,    260,
+       244,    228,    212,    196,    180,    164,    148,    132,
+       120,    112,    104,     96,     88,     80,     72,     64,
+        56,     48,     40,     32,     24,     16,      8,      0,
+};
+
+static const int16_t  alaw [256] = {
+     -5504,  -5248,  -6016,  -5760,  -4480,  -4224,  -4992,  -4736,
+     -7552,  -7296,  -8064,  -7808,  -6528,  -6272,  -7040,  -6784,
+     -2752,  -2624,  -3008,  -2880,  -2240,  -2112,  -2496,  -2368,
+     -3776,  -3648,  -4032,  -3904,  -3264,  -3136,  -3520,  -3392,
+    -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944,
+    -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136,
+    -11008, -10496, -12032, -11520,  -8960,  -8448,  -9984,  -9472,
+    -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568,
+      -344,   -328,   -376,   -360,   -280,   -264,   -312,   -296,
+      -472,   -456,   -504,   -488,   -408,   -392,   -440,   -424,
+       -88,    -72,   -120,   -104,    -24,     -8,    -56,    -40,
+      -216,   -200,   -248,   -232,   -152,   -136,   -184,   -168,
+     -1376,  -1312,  -1504,  -1440,  -1120,  -1056,  -1248,  -1184,
+     -1888,  -1824,  -2016,  -1952,  -1632,  -1568,  -1760,  -1696,
+      -688,   -656,   -752,   -720,   -560,   -528,   -624,   -592,
+      -944,   -912,  -1008,   -976,   -816,   -784,   -880,   -848,
+      5504,   5248,   6016,   5760,   4480,   4224,   4992,   4736,
+      7552,   7296,   8064,   7808,   6528,   6272,   7040,   6784,
+      2752,   2624,   3008,   2880,   2240,   2112,   2496,   2368,
+      3776,   3648,   4032,   3904,   3264,   3136,   3520,   3392,
+     22016,  20992,  24064,  23040,  17920,  16896,  19968,  18944,
+     30208,  29184,  32256,  31232,  26112,  25088,  28160,  27136,
+     11008,  10496,  12032,  11520,   8960,   8448,   9984,   9472,
+     15104,  14592,  16128,  15616,  13056,  12544,  14080,  13568,
+       344,    328,    376,    360,    280,    264,    312,    296,
+       472,    456,    504,    488,    408,    392,    440,    424,
+        88,     72,    120,    104,     24,      8,     56,     40,
+       216,    200,    248,    232,    152,    136,    184,    168,
+      1376,   1312,   1504,   1440,   1120,   1056,   1248,   1184,
+      1888,   1824,   2016,   1952,   1632,   1568,   1760,   1696,
+       688,    656,    752,    720,    560,    528,    624,    592,
+       944,    912,   1008,    976,    816,    784,    880,    848,
+};
+
+/*
+ *  These macros get 1...4 bytes and calculating a value between -32768 and +32768.
+ *  The first argument of the macros is the MSB, the last the LSB.
+ *  These are used to decode integer PCM (if there is no faster code available).
+ */
+
+#define BYTES1(x1)          ((((int8_t)(x1)) << 8))
+#define BYTES2(x1,x2)       ((((int8_t)(x1)) << 8) + (uint8_t)(x2))
+#define BYTES3(x1,x2,x3)    ((((int8_t)(x1)) << 8) + (uint8_t)(x2) + 1/256.*(uint8_t)(x3))
+#define BYTES4(x1,x2,x3,x4) ((((int8_t)(x1)) << 8) + (uint8_t)(x2) + 1/256.*(uint8_t)(x3) + 1/65536.*(uint8_t)(x4))
+
+/*
+ * The next two functions can read a 32 and 64 bit floating pointer number
+ * of an opposite byte order machine. This is done by byte swaping and using
+ * the normal way to read such a variable.
+ * Also note: peek function got their data from a variable called src, which is a pointer
+ * to const unsigned char.
+ */
+
+static inline sample_t  read_opposite_float32 ( OUT uint8_t* const src )
+{
+    uint8_t  tmp [4];
+    tmp[0] = src[3];
+    tmp[1] = src[2];
+    tmp[2] = src[1];
+    tmp[3] = src[0];
+    return *(const float32_t*)tmp;
+}
+
+static inline sample_t  read_opposite_float64 ( OUT uint8_t* const src )
+{
+    uint8_t  tmp [8];
+    tmp[0] = src[7];
+    tmp[1] = src[6];
+    tmp[2] = src[5];
+    tmp[3] = src[4];
+    tmp[4] = src[3];
+    tmp[5] = src[2];
+    tmp[6] = src[1];
+    tmp[7] = src[0];
+    return *(const float64_t*)tmp;
+}
+
+/*
+ *  The next two functions can read a 80 bit extended precision
+ *  IEEE-854 floating point number. This code also can read the numbers
+ *  on a machine not supporting 80 bit floats.
+ */
+
+static sample_t  read_float80_le ( OUT uint8_t* const src )
+{
+    int         sign     = src [9] & 128  ?  -1  :  +1;
+    long        exponent =(src [9] & 127) * 256 +
+                           src [8] - 16384 - 62;
+    long double mantisse = src [7] * 72057594037927936.L +
+                           src [6] * 281474976710656.L +
+                           src [5] * 1099511627776.L +
+                           src [4] * 4294967296.L +
+                           src [3] * 16777216.L +
+                           src [2] * 65536.L +
+                           src [1] * 256.L +
+                           src [0];
+    return sign * ldexp (mantisse, exponent);
+}
+
+static sample_t  read_float80_be ( OUT uint8_t* const src )
+{
+    int         sign     = src [0] & 128  ?  -1  :  +1;
+    long        exponent =(src [0] & 127) * 256 +
+                           src [1] - 16384 - 62;
+    long double mantisse = src [2] * 72057594037927936.L +
+                           src [3] * 281474976710656.L +
+                           src [4] * 1099511627776.L +
+                           src [5] * 4294967296.L +
+                           src [6] * 16777216.L +
+                           src [7] * 65536.L +
+                           src [8] * 256.L +
+                           src [9];
+    return sign * ldexp (mantisse, exponent);
+}
+
+static inline sample_t  read_opposite_float80 ( OUT uint8_t* const src )
+{
+    uint8_t  tmp [10];
+    tmp[0] = src[9];
+    tmp[1] = src[8];
+    tmp[2] = src[7];
+    tmp[3] = src[6];
+    tmp[4] = src[5];
+    tmp[5] = src[4];
+    tmp[6] = src[3];
+    tmp[7] = src[2];
+    tmp[8] = src[1];
+    tmp[9] = src[0];
+    return *(const float80_t*)tmp;
+}
+
+
+/*
+ *  Now we are building all resorting functions. The macro wants the name of the function
+ *  and a peek function or macro. The created function wants the following input:
+ *
+ *     destination: Where to store the result as sample_t vector? The distance between
+ *                  the elements is sizeof(sample_t)
+ *     source:      Where to get the bytes which should converted to destination
+ *     step size:   The distance between the input samples. This is at least the size
+ *                  of one input element, but can be more due to
+ *                    - alignment
+ *                    - interleaved multi-channel input
+ *     length:      The number of elements to process. Number must be positive.
+ */
+
+typedef void (*demux_t) ( IN sample_t* dst, OUT uint8_t* src, OUT ssize_t step, OUT size_t len );
+
+#define FUNCTION(name,expr)       \
+static void  name (               \
+        IN  sample_t*  dst,       \
+	OUT uint8_t*   src,       \
+	OUT ssize_t    step,      \
+	OUT size_t     len )      \
+{                                 \
+    size_t  i = len;              \
+    do {                          \
+        *dst++ = (expr);          \
+        src   += (step);          \
+    } while (--i);                \
+}
+
+/* Some of these function can be implemented byte order independent ... */
+
+FUNCTION ( copy_silence, 0 )
+FUNCTION ( copy_u8     , BYTES1 (src[0]-128) )
+FUNCTION ( copy_s8     , BYTES1 (src[0]    ) )
+FUNCTION ( copy_alaw   , alaw[*src] )
+FUNCTION ( copy_ulaw   , ulaw[*src] )
+FUNCTION ( copy_s24_le , BYTES3 (src[2], src[1], src[0] ) )
+FUNCTION ( copy_s24_be , BYTES3 (src[0], src[1], src[2] ) )
+FUNCTION ( copy_u24_le , BYTES3 (src[2]-128, src[1], src[0] ) )
+FUNCTION ( copy_u24_be , BYTES3 (src[0]-128, src[1], src[2] ) )
+FUNCTION ( copy_f80_le , read_float80_le (src) )
+FUNCTION ( copy_f80_be , read_float80_be (src) )
+
+/* ... and some are not or there are faster but byte order dependent possiblities */
+
+
+#ifndef WORDS_BIGENDIAN
+
+/* little endian */
+FUNCTION ( copy_s16_le , *(const int16_t*)src )
+FUNCTION ( copy_s16_be , BYTES2 (src[0], src[1] ) )
+FUNCTION ( copy_u16_le , *(const uint16_t*)src - 32768 )
+FUNCTION ( copy_u16_be , BYTES2 (src[0]-128, src[1] ) )
+FUNCTION ( copy_s32_le , 1/65536. * *(const int32_t*)src )
+FUNCTION ( copy_s32_be , BYTES4 (src[0], src[1], src[2], src[3] ) )
+FUNCTION ( copy_u32_le , 1/65536. * *(const uint32_t*)src - 32768. )
+FUNCTION ( copy_u32_be , BYTES4 (src[0]-128, src[1], src[2], src[3] ) )
+FUNCTION ( copy_f32_le , *(const float32_t*)src )
+FUNCTION ( copy_f32_be , read_opposite_float32 (src) )
+FUNCTION ( copy_f64_le , *(const float64_t*)src )
+FUNCTION ( copy_f64_be , read_opposite_float64 (src) )
+
+#else
+
+/* big endian */
+FUNCTION ( copy_s16_le , BYTES2 (src[1], src[0] ) )
+FUNCTION ( copy_s16_be , *(const int16_t*)src )
+FUNCTION ( copy_u16_le , BYTES2 (src[1]-128, src[0] ) )
+FUNCTION ( copy_u16_be , *(const uint16_t*)src - 32768 )
+FUNCTION ( copy_s32_le , BYTES4 (src[3], src[2], src[1], src[0] ) )
+FUNCTION ( copy_s32_be , 1/65536. * *(const int32_t*)src )
+FUNCTION ( copy_u32_le , BYTES4 (src[3]-128, src[2], src[1], src[0] ) )
+FUNCTION ( copy_u32_be , 1/65536. * *(const uint32_t*)src - 32768. )
+FUNCTION ( copy_f32_le , read_opposite_float32 (src) )
+FUNCTION ( copy_f32_be , *(const float32_t*)src )
+FUNCTION ( copy_f64_le , read_opposite_float64 (src) )
+FUNCTION ( copy_f64_be , *(const float64_t*)src )
+
+#endif
+
+/*
+ *  The global collection of channel demultiplexer.
+ *  For every data type we have the size of one memory object and two
+ *  demultiplexer, one for big endians, one for little endians.
+ *  The demultiplexers
+ *    - 1st argument is the destination of the data converted to sample_t (and normalized to +/-32768)
+ *    - 2nd argument is a pointer to the source data, in any format
+ *    - 3rd argument is 1st argument of the table (multiplied by the channel count in the case of 
+ *      interleaved data)
+ *    - 4th argument is the count of samples per channel to convert
+ */
+
+typedef struct {
+    const ssize_t  size;
+    const demux_t  demultiplexer_be;
+    const demux_t  demultiplexer_le;
+} demux_info_t;
+
+const demux_info_t  demux_info [] = {
+    { -1, NULL        , NULL         }, /* 00: */
+    {  0, copy_silence, copy_silence }, /* 01: */
+    {  1, copy_u8     , copy_u8      }, /* 02: */
+    {  1, copy_s8     , copy_s8      }, /* 03: */
+    {  2, copy_u16_be , copy_u16_le  }, /* 04: */
+    {  2, copy_s16_be , copy_s16_le  }, /* 05: */
+    {  3, copy_u24_be , copy_u24_le  }, /* 06: */
+    {  3, copy_s24_be , copy_s24_le  }, /* 07: */
+    {  4, copy_u32_be , copy_u32_le  }, /* 08: */
+    {  4, copy_s32_be , copy_s32_le  }, /* 09: */
+    { -1, NULL        , NULL         }, /* 0A: */
+    { -1, NULL        , NULL         }, /* 0B: */
+    { -1, NULL        , NULL         }, /* 0C: */
+    { -1, NULL        , NULL         }, /* 0D: */
+    { -1, NULL        , NULL         }, /* 0E: */
+    { -1, NULL        , NULL         }, /* 0F: */
+    { -1, NULL        , NULL         }, /* 10: */
+    { -1, NULL        , NULL         }, /* 11: */
+    { -1, NULL        , NULL         }, /* 12: */
+    { -1, NULL        , NULL         }, /* 13: */
+    {  4, copy_f32_be , copy_f32_le  }, /* 14: */
+    { -1, NULL        , NULL         }, /* 15: */
+    { -1, NULL        , NULL         }, /* 16: */
+    { -1, NULL        , NULL         }, /* 17: */
+    {  8, copy_f64_be , copy_f64_le  }, /* 18: */
+    { -1, NULL        , NULL         }, /* 19: */
+    { 10, copy_f80_be , copy_f80_le  }, /* 1A: */
+    { -1, NULL        , NULL         }, /* 1B: */
+    { 12, copy_f80_be , copy_f80_le  }, /* 1C: */
+    { -1, NULL        , NULL         }, /* 1D: */
+    { -1, NULL        , NULL         }, /* 1E: */
+    { -1, NULL        , NULL         }, /* 1F: */
+    { 16, copy_f80_be , copy_f80_le  }, /* 20: */
+
+    { sizeof(short)      , NULL        , NULL         }, /* 21: */
+    { sizeof(int)        , NULL        , NULL         }, /* 22: */
+    { sizeof(long)       , NULL        , NULL         }, /* 23: */
+    { sizeof(float)      , copy_f32_be , copy_f32_le  }, /* 24: */
+    { sizeof(double)     , copy_f64_be , copy_f64_le  }, /* 25: */
+    { sizeof(long double), NULL        , NULL         }, /* 26: */
+
+    { -1, NULL        , NULL         }, /* 27: */
+    { -1, NULL        , NULL         }, /* 28: */
+    { -1, NULL        , NULL         }, /* 29: */
+    { -1, NULL        , NULL         }, /* 2A: */
+    { -1, NULL        , NULL         }, /* 2B: */
+    { -1, NULL        , NULL         }, /* 2C: */
+    { -1, NULL        , NULL         }, /* 2D: */
+    { -1, NULL        , NULL         }, /* 2E: */
+    { -1, NULL        , NULL         }, /* 2F: */
+    { -1, NULL        , NULL         }, /* 30: */
+    {  1, copy_alaw   , copy_alaw    }, /* 31: */
+    {  1, copy_ulaw   , copy_ulaw    }, /* 32: */
+    { -1, NULL        , NULL         }, /* 33: */
+    { -1, NULL        , NULL         }, /* 34: */
+    { -1, NULL        , NULL         }, /* 35: */
+    { -1, NULL        , NULL         }, /* 36: */
+    { -1, NULL        , NULL         }, /* 37: */
+    { -1, NULL        , NULL         }, /* 38: */
+    { -1, NULL        , NULL         }, /* 39: */
+    { -1, NULL        , NULL         }, /* 3A: */
+    { -1, NULL        , NULL         }, /* 3B: */
+    { -1, NULL        , NULL         }, /* 3C: */
+    { -1, NULL        , NULL         }, /* 3D: */
+    { -1, NULL        , NULL         }, /* 3E: */
+    { -1, NULL        , NULL         }, /* 3F: */
+};
+
+/*
+ *  Selects the right demultiplexer from the attribute field
+ *  (currently endian and type information is used, rest is done in
+ *  lame_encode_pcm)
+ */
+
+static inline int  select_demux ( OUT uint32_t mode, IN demux_t* retf, IN ssize_t* size )
+{
+    int                  big    = mode >> 24;
+    const demux_info_t*  tabptr = demux_info + ((mode >> 16) & 0x3F);
+
+    FN("select_demux");
+
+#ifdef WORDS_BIGENDIAN
+    /* big endian */
+    big  = (big >> 1) ^ big ^ 1;        // 0=big, 1=little, 2=little, 3=big
+#else
+    /* little endian */                 // 0=little, 1=big, 2=little, 3=big
+#endif
+
+    *size = tabptr -> size;
+    *retf = big & 1  ?  tabptr -> demultiplexer_be
+                     :  tabptr -> demultiplexer_le;
+    return *retf != NULL  ?  0  :  -1;
+}
+
+/*}}}*/
+/*{{{ amplify/resample stuff          */
+
+/*
+ *  routine to feed EXACTLY one frame (lame->frame_size) worth of data to the
+ *  encoding engine. All buffering, resampling, etc, handled by calling program.
+ */
+
+static inline int  internal_lame_encoding_pcm (
+        INOUT lame_t*           const lame,
+        INOUT octetstream_t*    const os,
+        OUT   sample_t* const * const data,
+        OUT   size_t                  len )
+{
+    size_t           i;
+    double           ampl;
+    double           dampl;
+    int              ampl_on;
+    size_t           ch;
+    size_t           mf_needed;
+    int              ret;
+    size_t           n_in;
+    size_t           n_out;
+    size_t           remaining = len;
+    sample_t*        mfbuf [MAX_CHANNELS];
+    const sample_t*  pdata [MAX_CHANNELS];
+
+    FN("internal_lame_encoding_pcm");
+
+    /// this should be moved to lame_init_params();
+    // some sanity checks
+#if ENCDELAY < MDCTDELAY
+# error ENCDELAY is less than MDCTDELAY, see <encoder.h>
+#endif
+#if FFTOFFSET > BLKSIZE
+# error FFTOFFSET is greater than BLKSIZE, see <encoder.h>
+#endif
+
+    mf_needed = BLKSIZE + lame->frame_size - FFTOFFSET;           // amount needed for FFT
+    mf_needed = MAX ( mf_needed, 286 + 576 * (1+lame->mode_gr) ); // amount needed for MDCT/filterbank
+    assert ( mf_needed <= MFSIZE );
+    ///
+
+    os -> length = 0;
+    pdata [0]    = data [0];
+    pdata [1]    = data [1];
+    mfbuf [0]    = lame->mfbuf [0];
+    mfbuf [1]    = lame->mfbuf [1];
+
+    ampl    = lame->last_ampl;
+    dampl   = 0.;
+    if ( lame->ampl != ampl ) {
+        if (remaining <= 1) {           // constant amplification
+            ampl_on = 1;
+        } else {                        // fading
+            ampl_on = 2;
+            dampl   = (lame->ampl - ampl) / remaining * lame->sampfreq_out / lame->sampfreq_in;
+        }
+        lame->last_ampl = lame->ampl;
+    } else if ( lame->ampl != 1. ) {    // constant amplification
+        ampl_on = 1;
+    } else {                            // no manipulation (fastest)
+        ampl_on = 0;
+    }
+
+    while ( (int) remaining > 0 ) {
+
+        FN("internal_lame_encoding_pcm 3");
+
+        /* copy in new samples into mfbuf, with resampling if necessary */
+        if ( lame->resample_in != NULL )  {
+	
+            FN("internal_lame_encoding_pcm 10");
+	
+            for ( ch = 0; ch < lame->channels_out; ch++ ) {
+                n_in  = remaining;
+                n_out = lame->frame_size;
+		
+                FN("internal_lame_encoding_pcm 12");
+
+                // resample filter virtually should have no delay !
+                ret   = resample_buffer (
+                            lame->resample_in,
+                            mfbuf [ch] + lame->mf_size, &n_out,
+                            pdata [ch]                , &n_in,
+                            ch );
+                if ( ret < 0 )
+                    return ret;
+                pdata [ch] += n_in;
+            }
+	    
+            FN("internal_lame_encoding_pcm 13");
+	    
+        }
+        else {
+	
+            FN("internal_lame_encoding_pcm 14");
+	
+            n_in = n_out = MIN ( lame->frame_size, remaining );
+
+            FN("internal_lame_encoding_pcm 15");
+
+            for ( ch = 0; ch < lame->channels_out; ch++ ) {
+                memcpy (  mfbuf [ch] + lame->mf_size,
+                          pdata [ch],
+                          n_out * sizeof (**mfbuf) );
+                pdata [ch] += n_in;
+            }
+	    
+            FN("internal_lame_encoding_pcm 16");
+	    
+        }
+
+        FN("internal_lame_encoding_pcm 4");
+
+        switch ( ampl_on ) {
+        case 0:
+            break;
+        case 1:
+            for ( ch = 0; ch < lame->channels_out; ch++ )
+                for ( i = 0; i < n_out; i++ )
+                    mfbuf [ch] [lame->mf_size + i] *= ampl;
+            break;
+        case 2:
+            for ( i = 0; i < n_out; i++, ampl += dampl )
+                for ( ch = 0; ch < lame->channels_out; ch++ )
+                    mfbuf [ch] [lame->mf_size + i] *= ampl;
+            break;
+        default:
+            assert (0);
+            break;
+        }
+
+        FN("internal_lame_encoding_pcm 4");
+
+        fprintf ( stderr, "n_in=%d, n_out=%d, remaining=%d, remaining=%d\n", n_in, n_out, remaining, remaining-n_in );
+
+        remaining                  -= n_in;
+        lame->mf_size              += n_out;
+        lame->mf_samples_to_encode += n_out;
+
+        // encode ONE frame if enough data available
+        if ( lame->mf_size >= mf_needed ) {
+            // Enlarge octetstream buffer if (possibly) needed by (25% + 16K)
+            if ( os->size < 16384 + os->length )
+                octetstream_resize ( os, os->size + os->size/4 + 16384 );
+            // Encode one frame
+            ret = lame_encode_frame ( lame, mfbuf,
+                                      os->data + os->length, os->size - os->length );
+
+            if (ret < 0)
+                return ret;
+            os->length += ret;
+
+            FN("internal_lame_encoding_pcm 5");
+
+            // shift out old samples
+            lame->mf_size              -= lame->frame_size;
+            lame->mf_samples_to_encode -= lame->frame_size;
+            for ( ch = 0; ch < lame->channels_out; ch++ )
+                memmove ( mfbuf [ch] + 0, mfbuf [ch] + lame->frame_size, lame->mf_size * sizeof (**mfbuf) );
+		
+            FN("internal_lame_encoding_pcm 6");
+
+        }
+    }
+    assert (remaining == 0);
+    return 0;
+}
+
+/*}}}*/
+/*{{{ demultiplexing stuff            */
+
+static inline void  average ( sample_t* dst, const sample_t* src1, const sample_t* src2, size_t len )
+{
+    FN("average");
+
+    while (len--)
+        *dst++ = (*src1++ + *src2++) * 0.5;
+}
+
+int  lame_encode_pcm (
+        lame_t* const   lame,
+        octetstream_t*  os,
+        const void*     pcm,
+        size_t          len,
+        uint32_t        flags )
+{
+    sample_t*           data [2];
+    demux_t             retf;
+    ssize_t             size;
+    const uint8_t*      p;
+    const uint8_t* const*  q;
+    int                 ret;
+    size_t              channels_in = flags & 0xFFFF;
+
+    FN("lame_encode_pcm");
+
+    if (len == 0)
+        return 0;
+
+    if (select_demux ( flags, &retf, &size ) < 0)
+        return -1;
+
+    data[0] = (sample_t*) calloc (sizeof(sample_t), len);
+    data[1] = (sample_t*) calloc (sizeof(sample_t), len);
+
+    switch (flags >> 28) {
+    case LAME_INTERLEAVED >> 28:
+        p = (const uint8_t*) pcm;
+        switch ( lame->channels_out ) {
+        case 1:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], p+0*size, 1*size, len );
+                break;
+            case 2:
+                retf ( data[0], p+0*size, 2*size, len );
+                retf ( data[1], p+1*size, 2*size, len );
+                average ( data[0], data[0], data[1], len );
+                memset ( data[1], 0, sizeof(sample_t)*len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        case 2:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], p+0*size, 1*size, len );
+                memcpy ( data[1], data[0], sizeof(sample_t)*len );
+                break;
+            case 2:
+                retf ( data[0], p+0*size, 2*size, len );
+                retf ( data[1], p+1*size, 2*size, len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        default:
+            return -1;
+        }
+        break;
+
+    case LAME_CHAINED >> 28:
+        p = (const uint8_t*) pcm;
+        switch ( lame->channels_out ) {
+        case 1:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], p+0*size*len, size, len );
+                break;
+            case 2:
+                retf ( data[0], p+0*size*len, size, len );
+                retf ( data[1], p+1*size*len, size, len );
+                average ( data[0], data[0], data[1], len );
+                memset ( data[1], 0, sizeof(sample_t)*len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        case 2:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], p+0*size*len, size, len );
+                memcpy ( data[1], data[0], sizeof(sample_t)*len );
+                break;
+            case 2:
+                retf ( data[0], p+0*size*len, size, len );
+                retf ( data[1], p+1*size*len, size, len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        default:
+            return -1;
+        }
+        break;
+
+    case LAME_INDIRECT >> 28:
+        q = (const uint8_t* const*) pcm;
+        switch ( lame->channels_out ) {
+        case 1:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], q[0], size, len );
+                break;
+            case 2:
+                retf ( data[0], q[0], size, len );
+                retf ( data[1], q[1], size, len );
+                average ( data[0], data[0], data[1], len );
+                memset ( data[1], 0, sizeof(sample_t)*len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        case 2:
+            switch ( channels_in ) {
+            case 1:
+                retf ( data[0], q[0], size, len );
+                memcpy ( data[1], data[0], sizeof(sample_t)*len );
+                break;
+            case 2:
+                retf ( data[0], q[0], size, len );
+                retf ( data[1], q[1], size, len );
+                break;
+            default:
+                return -1;
+                break;
+            }
+            break;
+        default:
+            return -1;
+        }
+        break;
+
+    default:
+        return -1;
+    }
+
+    ret = internal_lame_encoding_pcm ( lame, os, (sample_t const* const*) data, len );
+
+    free ( data[0] );
+    free ( data[1] );
+    return ret;
+}
+
+/*}}}*/
+/*{{{ lame_encode_pcm_flush           */
+
+int  lame_encode_pcm_flush (
+        lame_t*        const  lame,
+        octetstream_t* const  os )
+{
+    int  ret;
+    int  ret_cb;
+
+    FN("lame_encode_pcm_flush");
+
+    ret = lame_encode_pcm ( lame, os, NULL, 
+                            lame->mf_samples_to_encode + lame->frame_size, 
+			    LAME_INTERLEAVED | LAME_SILENCE | 1 );
+
+
+    // ugly, not encapsulated
+    flush_bitstream (lame -> global_flags);       // mp3 related stuff. bit buffer might still contain some mp3 data
+    id3tag_write_v1 (lame -> global_flags);       // write a ID3 tag to the bitstream
+    ret_cb = copy_buffer (os->data, os->size - os->length, &lame->bs);
+    if (ret_cb < 0) 
+        return ret_cb;
+    os->length += ret_cb;
+
+
+    return ret;
+}
+
+/*
+ *  Data flow
+ *  ~~~~~~~~~
+ *  lame_encode_buffer (public)
+ *  lame_encode_buffer_interleaved (public)
+ *      - do some little preparations and calls lame_encode_pcm
+ *  lame_encode_pcm (public)
+ *      - demultiplexing
+ *      - type converting
+ *      - endian handling
+ *      - alignment handling
+ *      - channel number converting (currently averaging or duplicating)
+ *  internal_lame_encoding_pcm
+ *      - resampling
+ *      - level attenuator/amplifier, fader
+ *      - divide input into frames
+ *      - merge encoded data to one stream
+ *      - does a lot of things which should be done in the setup
+ *  lame_encode_frame
+ *      - calls the right next stage encoder
+ *      - counts the number of encoded frames
+ *      - analyzer call back
+ *  lame_encode_???_frame
+ *      - out of the scope of this file
+ */
+
+/*}}}*/
+/*{{{ Legacy stuff                    */
+
+static lame_t*  pointer2lame ( void* const handle )
+{
+    lame_t*             lame = (lame_t*)handle;
+    lame_global_flags*  gfp  = (lame_global_flags*)handle;
+
+    FN("pointer2lame");
+
+    if ( lame == NULL )
+        return NULL;
+    if ( lame->Class_ID == LAME_ID )
+        return lame;
+
+    if ( gfp->num_channels == 1  ||  gfp->num_channels == 2 ) {
+        lame = (lame_t*) (gfp->internal_flags);
+
+        if ( lame == NULL )
+            return NULL;
+        if ( lame->Class_ID == LAME_ID )
+            return lame;
+    }
+    return NULL;
+}
+
+
+int  lame_encode_buffer (
+        void* const    gfp,
+        const int16_t  buffer_l [],
+        const int16_t  buffer_r [],
+        const size_t   nsamples,
+        void* const    mp3buf,
+        const size_t   mp3buf_size )
+{
+    const int16_t*  pcm [2];
+    octetstream_t*  os;
+    int             ret;
+    lame_t*         lame;
+
+    FN("lame_encode_buffer");
+
+    lame    = pointer2lame (gfp);
+    os      = octetstream_open (mp3buf_size);
+    pcm [0] = buffer_l;
+    pcm [1] = buffer_r;
+
+    ret     = lame_encode_pcm ( lame, os, pcm, nsamples,
+                                LAME_INDIRECT | LAME_NATIVE_ENDIAN | LAME_INT16 |
+                                lame->channels_in );
+
+    memcpy ( mp3buf, os->data, os->length );
+    if (ret == 0) ret = os->length;
+    octetstream_close (os);
+    return ret;
+}
+
+
+int  lame_encode_buffer_interleaved (
+        void* const    gfp,
+        const int16_t  buffer [],
+        size_t         nsamples,
+        void* const    mp3buf,
+        const size_t   mp3buf_size )
+{
+    octetstream_t*  os;
+    int             ret;
+    lame_t*         lame;
+
+    FN("lame_encode_buffer_interleaved");
+
+    lame    = pointer2lame (gfp);
+    os      = octetstream_open (mp3buf_size);
+
+    ret     = lame_encode_pcm ( lame, os, buffer, nsamples,
+                                LAME_INTERLEAVED | LAME_NATIVE_ENDIAN | LAME_INT16 |
+                                lame->channels_in );
+
+    memcpy ( mp3buf, os->data, os->length );
+    if (ret == 0) ret = os->length;
+    octetstream_close (os);
+    return ret;
+}
+
+
+int  lame_encode_flush (
+        void* const    gfp,
+        void* const    mp3buf,
+        const size_t   mp3buf_size )
+{
+    octetstream_t*  os;
+    int             ret;
+    lame_t*         lame;
+
+    FN("lame_encode_flush");
+
+    lame    = pointer2lame (gfp);
+    os      = octetstream_open (mp3buf_size);
+
+    ret     = lame_encode_pcm_flush ( lame, os );
+
+    memcpy ( mp3buf, os->data, os->length );
+    if (ret == 0) ret = os->length;
+    octetstream_close (os);
+    return ret;
+}
+
+/*}}}*/
+/*{{{ sin/cos/sinc/rounding functions */
+
+static inline long  round_nearest ( long double x )
+{
+    if ( x >= 0. )
+        return (long)(x+0.5);
+    else
+        return (long)(x-0.5);
+}
+
+
+static inline long  round_down ( long double x )
+{
+    if ( x >= 0. )
+        return +(long)(+x);
+    else
+        return -(long)(-x);
+}
+
+
+static inline long double  sinpi ( long double x )
+{
+    x -= round_down (x) & ~1;
+
+    switch ( (int)(4.*x) ) {
+    default: assert (0);
+    case  0: return +SIN ( M_PIl * (0.0+x) );
+    case  1: return +COS ( M_PIl * (0.5-x) );
+    case  2: return +COS ( M_PIl * (x-0.5) );
+    case  3: return +SIN ( M_PIl * (1.0-x) );
+    case  4: return -SIN ( M_PIl * (x-1.0) );
+    case  5: return -COS ( M_PIl * (1.5-x) );
+    case  6: return -COS ( M_PIl * (x-1.5) );
+    case  7: return -SIN ( M_PIl * (2.0-x) );
+    }
+}
+
+
+static inline long double  cospi ( long double x )
+{
+    x -= round_down (x) & ~1;
+
+    switch ( (int)(4.*x) ) {
+    default: assert (0);
+    case  0: return +COS ( M_PIl * (x-0.0) );
+    case  1: return +SIN ( M_PIl * (0.5-x) );
+    case  2: return -SIN ( M_PIl * (x-0.5) );
+    case  3: return -COS ( M_PIl * (1.0-x) );
+    case  4: return -COS ( M_PIl * (x-1.0) );
+    case  5: return -SIN ( M_PIl * (1.5-x) );
+    case  6: return +SIN ( M_PIl * (x-1.5) );
+    case  7: return +COS ( M_PIl * (2.0-x) );
+    }
+}
+
+
+static inline long double  sinc ( long double x )
+{
+    if ( x == 0. )
+        return 1.;
+
+    if ( x <  0. )
+        x = -x;
+
+    return sinpi ( x ) / ( M_PIl * x );
+}
+
+/*}}}*/
+/*{{{ some window functions           */
+
+static inline  double  hanning ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x = cospi (0.5 * x);
+    return x * x;
+}
+
+static inline  double  hamming ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x = cospi (x);
+    return 0.54 + 0.46 * x;
+}
+
+static inline  double  blackman ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x = cospi (x);
+    return (0.16 * x + 0.50) * x + 0.34;        // using addition theorem of arc functions
+}
+
+static inline  double  blackman1 ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x += 1.;
+    return 0.42 - 0.50*cospi(x) + 0.08*cospi(2*x);
+}
+
+static inline  double  blackman2 ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x += 1.;
+    return 0.375 - 0.50*cospi(x) + 0.125*cospi(2*x);
+}
+
+static inline  double  blackmanharris_nuttall ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x += 1.;
+    return (10 - 15*cospi (x) + 6*cospi (2*x) - cospi (3*x) ) * (1./32);
+}
+
+static inline  double  blackmanharris_min4 ( double x )
+{
+    if ( fabs (x) >= 1 )
+        return 0.;
+
+    x += 1.;
+    return 0.355768 - 0.487396*cospi (x) + 0.144232*cospi (2*x) - 0.012604*cospi (3*x);
+}
+
+/*
+ * Blackman-Harris windows, which have the general equation:
+ *
+ *          w(n) = a0 - a1 cos(2pn/N) + a2 cos(4pn/N) - a3 cos(6pn/N).
+ *
+ * When Nuttall set the ak coefficients to the "minimum 4-term" values of a0 = 0.355768, a1 =
+ * 0.487396, a2 = 0.144232, and a3 = 0.012604, he obtained the window and the frequency
+ * response shown in Figure 8. The minimum-4-term window loses some frequency
+ * resolution because it has a wide main lobe, but the first side lobe drops to -93 db.
+ *
+ * If you require fast side-lobe rolloff in an application, consider Nuttall's Equation (30). It
+ * applies the following coefficients to the general equation above: a0 = 10/32, a1 = 15/32, a2 =
+ * 6/32, and a3 = 1/32. Figure 8 also includes the window and frequency response for Nuttall's
+ * Equation (30). This window has a first side-lobe level of -61 dB and a significant side-lobe
+ * rolloff of -42 dB/octave.
+ *
+ * The first investigators of windowing functions determined that window functions should
+ * have zero values at their boundaries and so should their successive derivatives. If a
+ * window's kth derivative is zero at the boundaries, the peaks of the window's side lobes will
+ * decay at a rate of 6(k+2) dB/octave. T&MW.
+ */
+
+/*}}}*/
+/*{{{ scalar stuff                    */
+
+
+/**********************************************************
+ *                                                        *
+ *           Functions taken from scalar.nas              *
+ *                                                        *
+ **********************************************************/
+
+/*
+ * The scalarxx versions with xx=04,08,12,16,20,24 are fixed size for xx element scalars
+ * The scalar1n version is suitable for every non negative length
+ * The scalar4n version is only suitable for positive lengths which are a multiple of 4
+ *
+ * The following are equivalent:
+ *    scalar12 (p, q);
+ *    scalar4n (p, q, 3);
+ *    scalar1n (p, q, 12);
+ */
+
+float_t  scalar04_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
+}
+
+float_t  scalar08_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3]
+          + p[4]*q[4] + p[5]*q[5] + p[6]*q[6] + p[7]*q[7];
+}
+
+float_t  scalar12_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[0]*q[0] + p[1]*q[1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
+          + p[4]*q[4] + p[5]*q[5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
+          + p[8]*q[8] + p[9]*q[9] + p[10]*q[10] + p[11]*q[11];
+}
+
+float_t  scalar16_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
+          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
+          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
+          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15];
+}
+
+float_t  scalar20_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
+          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
+          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
+          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
+          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19];
+}
+
+float_t  scalar24_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
+          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
+          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
+          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
+          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19]
+          + p[20]*q[20] + p[21]*q[21] + p[22]*q[22] + p[23]*q[23];
+}
+
+float_t  scalar32_float32 ( const sample_t* p, const sample_t* q )
+{
+    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
+          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
+          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
+          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
+          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19]
+          + p[20]*q[20] + p[21]*q[21] + p[22]*q[22] + p[23]*q[23]
+          + p[24]*q[24] + p[25]*q[25] + p[26]*q[26] + p[27]*q[27]
+          + p[28]*q[28] + p[29]*q[29] + p[30]*q[30] + p[31]*q[31];
+}
+
+float_t  scalar4n_float32 ( const sample_t* p, const sample_t* q, size_t len )
+{
+    double sum = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
+
+    while (--len) {
+        p   += 4;
+        q   += 4;
+        sum += p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
+    }
+    return sum;
+}
+
+float_t  scalar1n_float32 ( const sample_t* p, const sample_t* q, size_t len )
+{
+    float_t sum;
+
+    switch (len & 3) {
+    case 0:
+        sum  = 0.;
+        break;
+    case 1:
+        sum  = p[0]*q[0];
+        p   += 1;
+        q   += 1;
+        break;
+    case 2:
+        sum  = p[0]*q[0] + p[1]*q[1];
+        p   += 2;
+        q   += 2;
+        break;
+    default:
+        sum  = p[0]*q[0] + p[1]*q[1] + p[2]*q[2];
+        p   += 3;
+        q   += 3;
+        break;
+    }
+    
+    for ( len >>= 2; len--; ) {
+        sum += p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
+        p   += 4;
+        q   += 4;
+    }
+    return sum;
+}
+
+
+scalar_t   scalar04 = scalar04_float32;
+scalar_t   scalar08 = scalar08_float32;
+scalar_t   scalar12 = scalar12_float32;
+scalar_t   scalar16 = scalar16_float32;
+scalar_t   scalar20 = scalar20_float32;
+scalar_t   scalar24 = scalar24_float32;
+scalar_t   scalar32 = scalar32_float32;
+scalarn_t  scalar4n = scalar4n_float32;
+scalarn_t  scalar1n = scalar1n_float32;
+
+
+void  init_scalar_functions ( OUT lame_t* const lame )
+{
+    if ( lame -> CPU_features.i387 ) {
+        scalar04 = scalar04_float32_i387;
+        scalar08 = scalar08_float32_i387;
+        scalar12 = scalar12_float32_i387;
+        scalar16 = scalar16_float32_i387;
+        scalar20 = scalar20_float32_i387;
+        scalar24 = scalar24_float32_i387;
+        scalar32 = scalar32_float32_i387;
+        scalar4n = scalar4n_float32_i387;
+        scalar1n = scalar1n_float32_i387;
+    }
+
+    if ( lame -> CPU_features.AMD_3DNow ) {
+        scalar04 = scalar04_float32_3DNow;
+        scalar08 = scalar08_float32_3DNow;
+        scalar12 = scalar12_float32_3DNow;
+        scalar16 = scalar16_float32_3DNow;
+        scalar20 = scalar20_float32_3DNow;
+        scalar24 = scalar24_float32_3DNow;
+        scalar32 = scalar32_float32_3DNow;
+        scalar4n = scalar4n_float32_3DNow;
+        scalar1n = scalar1n_float32_3DNow;
+    }
+
+    if ( lame -> CPU_features.SIMD ) {
+        scalar04 = scalar04_float32_SIMD;
+        scalar08 = scalar08_float32_SIMD;
+        scalar12 = scalar12_float32_SIMD;
+        scalar16 = scalar16_float32_SIMD;
+        scalar20 = scalar20_float32_SIMD;
+        scalar24 = scalar24_float32_SIMD;
+        scalar32 = scalar32_float32_SIMD;
+        scalar4n = scalar4n_float32_SIMD;
+        scalar1n = scalar1n_float32_SIMD;
+    }
+}
+
+/*}}}*/
+/*{{{ factorize                       */
+
+/*
+ *  Tries to find the best integral ratio for two sampling frequencies
+ *  It searches the best ratio a:b with b <= MAX_TABLES
+ */
+
+static double  factorize ( 
+        OUT long double  f1, 
+	OUT long double  f2, 
+	IN  int* const   x1, 
+	IN  int* const   x2 )
+{
+    unsigned     i;
+    long         ltmp;
+    long double  ftmp;
+    double       minerror = 1.;
+    double       abserror = 1.;
+
+    assert ( f1 > 0. );
+    assert ( f2 > 0. );
+    assert ( x1 != NULL );
+    assert ( x2 != NULL );
+
+    for ( i = 1; i <= MAX_TABLES; i++ ) {
+        ftmp  = f2 * i / f1;
+        ltmp  = (long) ( ftmp + 0.5 );
+        if ( fabs ( (ltmp-ftmp)/ftmp ) < minerror ) {
+            *x1      = i;
+            *x2      = (int)ltmp;
+            abserror = (ltmp-ftmp) / ftmp;
+            minerror = 0.9999847412109375 * fabs (abserror);
+        }
+    }
+    return abserror;
+}
+
+/*
+ *  Some programmers and some file format only supporting integral sampling frequencies
+ *  This patch tries to find the right sampling frequency for some know rounding victims.
+ *  Better is to support directly 64 or 80 bit FPU precision.
+ */
+
+long double  unround_samplefrequency ( OUT long double freq )
+{
+    if ( freq != (unsigned short)freq )
+        return freq;
+
+    switch ( (unsigned short)freq ) {
+    case 48662: case 48663: return 1411200/ 29.L;  // SB 128 "48 kHz"         48662.06896551724137931034
+    case 44055: case 44056: return 2863636/ 65.L;  // NTSC PCM/LD PCM         44055.93846153846153846153
+    case 32072: case 32073: return 1411200/ 44.L;  // SB 128 "32 kHz"         32072.72727272727272727272
+    case 31468: case 31469: return 2863636/ 91.L;  // NTSC Hi8 Digital Audio  31468.52747252747252747252
+    case 23918: case 23919: return 1411200/ 59.L;  // SB 128 "24 kHz"         23918.64406779661016949152
+    case 22254: case 22255: return  244800/ 11.L;  // MAC HQ                  22254.54545454545454545454
+    case 16036: case 16037: return 1411200/ 88.L;  // SB 128 "16 kHz"         16036.36363636363636363636
+    case 11959: case 11960: return 1411200/118.L;  // SB 128 "12 kHz"         11959.32203389830508474576
+    case 11127: case 11128: return  122400/ 11.L;  // MAC LQ                  11127.27272727272727272727
+    case  8018: case  8019: return 1411200/176.L;  // SB 128  "8 kHz"          8018.18181818181818181818
+    case  8012: case  8013: return  312500/ 39.L;  // NeXT/Telco               8012.82051282051282051282
+    case  5512: case  5513: return   44100/  8.L;  // 1/8 CD                   5512.50000000000000000000
+    }
+
+    return freq;
+}
+
+/*}}}*/
+/*{{{ resampling stuff                */
+
+static inline void  Calc_Coeffs (
+        IN  sample_t*  Coeff,
+        OUT int        iNew,
+        OUT int        iOld,
+        OUT long       i,
+        OUT long       k,
+        OUT double     bandwidth )   // 0.0 ... 1.0: used bandwidth from 0...fs_out/2
+{
+    long double  w   = 1.L / (WINDOW_SIZE + 0.5);
+    long double  sum = 0.;
+    long double  tmp1;
+    long double  tmp2;
+    long         j;
+
+    for ( j = 0; j <= 2*WINDOW_SIZE; j++ ) {
+        tmp1 = ((k+j)*iNew - i*iOld) / (long double)iNew * bandwidth;
+        tmp2 = ((k+j)*iNew - i*iOld) / (long double)iNew;
+        sum += Coeff [j] = sinc (tmp1) * WINDOW (tmp2 * w);
+    }
+
+    for ( j = 0; j <= 2*WINDOW_SIZE; j++ )
+        Coeff [j] /= sum;
+}
+
+
+resample_t*  resample_open (
+        OUT long double  sampfreq_in,    // [Hz]
+        OUT long double  sampfreq_out,   // [Hz]
+        OUT double       lowpass_freq,   // [Hz] or <0 for auto mode
+        OUT int          quality )       // Proposal: 0: default, 1: sample select, 2: linear interpolation
+                                         //           4: 4-point interpolation, 32: 32-point interpolation
+{
+    resample_t* const  ret = calloc ( sizeof(resample_t), 1 );
+    long               i;
+    sample_t*          p;
+    double             err;
+
+    FN("resample_open");
+
+    if ( sampfreq_in == sampfreq_out )
+        return NULL;
+
+    err = factorize ( sampfreq_out, sampfreq_in, &(ret->scale_out), &(ret->scale_in) );
+    fprintf ( stderr, "(%.6g => %.6g Hz, Ratio %d:%d",
+              (double)sampfreq_in, (double)sampfreq_out, ret->scale_in, ret->scale_out );
+    if ( fabs (err) > 5.e-10 )                                            // 16 msec/year
+        fprintf ( stderr, ", Error %+.3f ppm", 1.e6*err );
+    fprintf ( stderr, ")\n" );
+    fflush  ( stderr );
+
+    if ( ret->scale_out == ret->scale_in )
+        return NULL;
+
+    ret->Class_ID        = RESAMPLE_ID;
+    ret->samplefreq_in   = sampfreq_in;
+    ret->samplefreq_out  = sampfreq_out;
+    ret->taps            = TAPS;
+    ret->lowpass_freq    = lowpass_freq < 0.  ?  0.50 * MIN (sampfreq_in, sampfreq_out)  :  lowpass_freq;
+    ret->in_old [0]      = calloc ( sizeof(sample_t*)     , 2*TAPS );
+    ret->in_old [1]      = calloc ( sizeof(sample_t*)     , 2*TAPS );
+    ret->src_step        = calloc ( sizeof(unsigned char*), (unsigned)ret->scale_out );
+    ret->fir             = calloc ( sizeof(sample_t*)     , (unsigned)ret->scale_out );
+    ret->firfree         = calloc ( sizeof(sample_t)      , TAPS * ret->scale_out + 64/sizeof(sample_t) );
+    p                    = (sample_t*) ( ((ptrdiff_t)(ret->firfree) | 63) + 1 ); /* 64 byte alignment */
+
+    for ( i = 0; i < ret->scale_out; i++, p += TAPS ) {
+        ret->src_step [i] = round_nearest ( (i+1.L) * ret->scale_in / ret->scale_out )
+                          - round_nearest ( (i+0.L) * ret->scale_in / ret->scale_out );
+                          
+        Calc_Coeffs ( ret->fir [i] = p,
+                      ret->scale_out, ret->scale_in,
+                      i, round_nearest ( (double)i * ret->scale_in / ret->scale_out - WINDOW_SIZE ),
+                      2.*ret->lowpass_freq / sampfreq_out );
+    }
+
+    return ret;
+}
+
+
+/* Should be done with more sanity checks */
+
+int  resample_close ( INOUT resample_t* const r )
+{
+    FN("resample_close");
+
+    if ( r == NULL )
+        return -1;
+    free ( r->in_old [0] );
+    free ( r->in_old [1] );
+    free ( r->fir [0]    );
+    free ( r->fir        );
+    free ( r->src_step   );
+    return 0;
+}
+
+
+// in the future some of the copies should be avoided by usage of mfbuf
+// also by the fill_buffer_resample() routine
+
+/*
+ *  Current working scheme:
+ *
+ *  | old | new                data in in_buf, consist of old *and new data
+ *  |0 1 2|3 4 5 6 ...
+ *
+ *   <--1-->
+ *     <--2-->
+ *       <--3-->
+ *
+ *        | new                data in in, only new data
+ *        |0 1 2 3 4 5 6
+ *         <--4-->
+ *           <--5-->
+ *             <--6-->
+ */
+
+int  resample_buffer (                          // return code, 0 for success
+        INOUT resample_t *const   r,            // internal structure
+        IN    sample_t   *const   out,          // where to write the output data
+        INOUT size_t     *const   out_req_len,  // requested output data len/really written output data len
+        OUT   sample_t   *const   in,           // where are the input data?
+        INOUT size_t     *const   in_avail_len, // available input data len/consumed input data len
+        OUT   size_t              channel )     // number of the channel (needed for internal buffering)
+{
+    sample_t*  p           = out;
+    sample_t*  in_old      = r->in_old [channel];
+    size_t     len         = *in_avail_len;
+    size_t     desired_len = *out_req_len;
+    size_t     i;
+    size_t     k;
+    int        l;
+
+    FN("resample_buffer");
+
+    // copy TAPS samples to the second half of in_old
+    memcpy ( in_old + TAPS, in, MIN (len*sizeof(*in), TAPS*sizeof(*in)) );
+
+    // calculating k and l
+    l = r->fir_stepper [channel];
+    k = r->inp_stepper [channel];
+
+    // doing converting for all samples which can be done in 'in_old'
+    for ( i = 0; i < desired_len  &&  k < TAPS; i++ ) {
+        *p++ = scalar32 ( in_old + k, r->fir [l] );
+        k   += r->src_step [l];
+        if ( ++l >= r->scale_out ) l = 0;
+    }
+
+    // doing converting for all samples which can be done in 'in'
+    k -= TAPS;
+    for ( ; i < desired_len  &&  k < len - TAPS; i++ ) {
+        *p++ = scalar32 ( in + k, r->fir [l] );
+        k   += r->src_step [l];
+        if ( ++l >= r->scale_out ) l = 0;
+    }
+
+    // writing back processed in and out
+    *in_avail_len  = k - r->inp_stepper [channel];
+    *out_req_len   = p - out;
+
+    r->fir_stepper [channel] = l;
+    r->inp_stepper [channel] = k - r->inp_stepper [channel] - len;
+
+    // make of copy of the overlap
+    if ( len >= TAPS )
+        memcpy  ( in_old, in + len - TAPS, TAPS*sizeof(sample_t) );
+    else
+        memmove ( in_old, in_old + len   , TAPS*sizeof(sample_t) );
+
+    return 0;
+}
+
+/*}}}*/
+
+#endif /* KLEMM_44 */
+
+/* end of pcm.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/pcm.h
@@ -1,0 +1,277 @@
+/*{{{ #defines                        */
+
+#include <limits.h>
+#include "lame.h"
+#include "util.h"
+
+#define ENCDELAY      576
+#define MDCTDELAY     48
+#define BLKSIZE       1024
+#define HBLKSIZE      (BLKSIZE/2 + 1)
+#define BLKSIZE_s     256
+#define HBLKSIZE_s    (BLKSIZE_s/2 + 1)
+#define MAX_TABLES    1002
+#define TAPS          32
+#define WINDOW_SIZE   15.5
+#define WINDOW        hanning
+#define inline        __inline
+
+#define MIN(a,b)      ((a) < (b) ? (a) : (b))
+#define MAX(a,b)      ((a) > (b) ? (a) : (b))
+
+#ifndef M_PIl
+# define M_PIl          3.1415926535897932384626433832795029L
+#endif
+
+#define SIN             sin
+#define COS             cos
+
+/*}}}*/
+/*{{{ object ID's                     */
+
+#define RESAMPLE_ID     0x52455341LU
+#define PSYCHO_ID       0x50535943LU
+#define BITSTREAM_ID    0x42495453LU
+
+/*}}}*/
+/*{{{ typedef's                       */
+
+typedef float         float32_t;                   // IEEE-754 32 bit floating point
+typedef double        float64_t;                   // IEEE-754 64 bit floating point
+typedef long double   float80_t;                   // IEEE-854 80 bit floating point, if available
+typedef long double   float_t;                     // temporarly results of float operations
+typedef long double   double_t;                    // temporarly results of double operations
+typedef long double   longdouble_t;                // temporarly results of long double operations
+
+typedef float_t (*scalar_t)  ( const sample_t* p, const sample_t* q );
+typedef float_t (*scalarn_t) ( const sample_t* p, const sample_t* q, size_t len );
+
+/*}}}*/
+/*{{{ data direction attributes       */
+
+/*
+ * These are data stream direction attributes like used in Ada83/Ada95 and in RPC
+ * The data direction is seen from the caller to the calling function.
+ * Examples:
+ *
+ *    size_t  fread  ( void INOUT* buffer, size_t items, size_t itemsize, FILE INOUT* fp );
+ *    size_t  fwrite ( void OUT  * buffer, size_t items, size_t itemsize, FILE INOUT* fp );
+ *    size_t  memset ( void IN   * buffer, unsigned char value, size_t size );
+ *
+ * Return values are implizit IN (note that here C uses the opposite attribute).
+ * Arguments not transmitted via references are implizit OUT.
+ */
+
+#define OUT            /* [out]   */ const
+#define INOUT          /* [inout] */
+#define IN             /* [in]    */
+#define OUTTR          /* [out]: data is modified like [inout], but you don't get any useful back */
+
+/*}}}*/
+/*{{{ Test some error conditions      */
+
+#ifndef __LOC__
+# define _STR2(x)      #x
+# define _STR1(x)      _STR2(x)
+# define __LOC__       __FILE__ "(" _STR1(__LINE__) ") : warning: "
+#endif
+
+/* The current code doesn't work on machines with non 8 bit char's in any way, so abort */
+
+#if CHAR_BIT != 8
+# pragma message ( __LOC__ "Machines with CHAR_BIT != 8 not yet supported" )
+# pragma error
+#endif
+
+/*}}}*/
+
+/*
+ *  Now some information how PCM data can be specified. PCM data
+ *  is specified by 3 attributes: pointer, length information
+ *  and attributes.
+ *    - Audio is always stored in 2D arrays, which are collapsing to 1D
+ *      in the case of monaural input
+ *    - 2D arrays can be stored as 2D arrays or as pointers to 1D arrays.
+ *    - 2D data can be stored as samples*channels or as channels*samples
+ *    - This gives 4 kinds of storing PCM data:
+ *      + pcm [samples][channels]       (LAME_INTERLEAVED)
+ *      + pcm [channels][samples]       (LAME_CHAINED)
+ *      + (*pcm) [samples]              (LAME_INDIRECT)
+ *      + (*pcm) [channels]
+ *    - The last I have never seen and it have a huge overhead (67% ... 200%),
+ *      so the first three are implemented.
+ *    - The monaural 1D cases can also be handled by the first two attributes
+ */
+
+#define  LAME_INTERLEAVED       0x10000000
+#define  LAME_CHAINED           0x20000000
+#define  LAME_INDIRECT          0x30000000
+
+/*
+ *  Now we need some information about the byte order of the data.
+ *  There are 4 cases possible (if you are not fully support such strange
+ *  Machines like the PDPs):
+ *    - You know the absolute byte order of the data (LAME_LITTLE_ENDIAN, LAME_BIG_ENDIAN)
+ *    - You know the byte order from the view of the current machine
+ *      (LAME_NATIVE_ENDIAN, LAME_OPPOSITE_ENDIAN)
+ *    - The use of LAME_OPPOSITE_ENDIAN is NOT recommended because it is
+ *      is a breakable attribute, use LAME_LITTLE_ENDIAN or LAME_BIG_ENDIAN
+ *      instead
+ */
+
+#define  LAME_NATIVE_ENDIAN     0x00000000
+#define  LAME_OPPOSITE_ENDIAN   0x01000000
+#define  LAME_LITTLE_ENDIAN     0x02000000
+#define  LAME_BIG_ENDIAN        0x03000000
+
+/*
+ *  The next attribute is the data type of the input data.
+ *  There are currently 2 kinds of input data:
+ *    - C based:
+ *          LAME_{SHORT,INT,LONG}
+ *          LAME_{FLOAT,DOUBLE,LONGDOUBLE}
+ *    - Binary representation based:
+ *          LAME_{UINT,INT}{8,16,24,32}
+ *          LAME_{A,U}LAW
+ *          LAME_FLOAT{32,64,80_ALIGN{2,4,8}}
+ *
+ *  Don't use the C based for external data.
+ */
+
+#define  LAME_SILENCE           0x00010000
+#define  LAME_UINT8             0x00020000
+#define  LAME_INT8              0x00030000
+#define  LAME_UINT16            0x00040000
+#define  LAME_INT16             0x00050000
+#define  LAME_UINT24            0x00060000
+#define  LAME_INT24             0x00070000
+#define  LAME_UINT32            0x00080000
+#define  LAME_INT32             0x00090000
+#define  LAME_FLOAT32           0x00140000
+#define  LAME_FLOAT64           0x00180000
+#define  LAME_FLOAT80_ALIGN2    0x001A0000
+#define  LAME_FLOAT80_ALIGN4    0x001C0000
+#define  LAME_FLOAT80_ALIGN8    0x00200000
+#define  LAME_SHORT             0x00210000
+#define  LAME_INT               0x00220000
+#define  LAME_LONG              0x00230000
+#define  LAME_FLOAT             0x00240000
+#define  LAME_DOUBLE            0x00250000
+#define  LAME_LONGDOUBLE        0x00260000
+#define  LAME_ALAW              0x00310000
+#define  LAME_ULAW              0x00320000
+
+/*
+ *  The last attribute is the number of input channels. Currently
+ *  1...65535 channels are possible, but only 1 and 2 are supported.
+ *  So matrixing or MPEG-2 MultiChannelSupport are not a big problem.
+ *
+ *  Note: Some people use the word 'stereo' for 2 channel stereophonic sound.
+ *        But stereophonic sound is a collection of ALL methods to restore the
+ *        stereophonic sound field starting from 2 channels up to audio
+ *        holography.
+ */
+
+#define LAME_MONO               0x00000001
+#define LAME_STEREO             0x00000002
+#define LAME_STEREO_2_CHANNELS  0x00000002
+#define LAME_STEREO_3_CHANNELS  0x00000003
+#define LAME_STEREO_4_CHANNELS  0x00000004
+#define LAME_STEREO_5_CHANNELS  0x00000005
+#define LAME_STEREO_6_CHANNELS  0x00000006
+#define LAME_STEREO_7_CHANNELS  0x00000007
+#define LAME_STEREO_65535_CHANNELS\
+                                0x0000FFFF
+
+
+extern scalar_t   scalar4;
+extern scalar_t   scalar8;
+extern scalar_t   scalar12;
+extern scalar_t   scalar16;
+extern scalar_t   scalar20;
+extern scalar_t   scalar24;
+extern scalar_t   scalar32;
+extern scalarn_t  scalar4n;
+extern scalarn_t  scalar1n;
+
+float_t  scalar04_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar08_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar12_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar16_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar20_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar24_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar32_float32_i387  ( const float32_t* p, const float32_t* q );
+float_t  scalar4n_float32_i387  ( const float32_t* p, const float32_t* q, const size_t len );
+float_t  scalar1n_float32_i387  ( const float32_t* p, const float32_t* q, const size_t len );
+
+float_t  scalar04_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar08_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar12_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar16_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar20_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar24_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar32_float32_3DNow ( const float32_t* p, const float32_t* q );
+float_t  scalar4n_float32_3DNow ( const float32_t* p, const float32_t* q, const size_t len );
+float_t  scalar1n_float32_3DNow ( const float32_t* p, const float32_t* q, const size_t len );
+
+float_t  scalar04_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar08_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar12_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar16_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar20_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar24_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar32_float32_SIMD  ( const float32_t* p, const float32_t* q );
+float_t  scalar4n_float32_SIMD  ( const float32_t* p, const float32_t* q, const size_t len );
+float_t  scalar1n_float32_SIMD  ( const float32_t* p, const float32_t* q, const size_t len );
+
+float_t  scalar04_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar08_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar12_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar16_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar20_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar24_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar32_float32       ( const float32_t* p, const float32_t* q );
+float_t  scalar4n_float32       ( const float32_t* p, const float32_t* q, const size_t len );
+float_t  scalar1n_float32       ( const float32_t* p, const float32_t* q, const size_t len );
+
+
+/*{{{ some prototypes                 */
+
+resample_t*  resample_open (
+        OUT long double  sampfreq_in,    // [Hz]
+        OUT long double  sampfreq_out,   // [Hz]
+        OUT double       lowpass_freq,   // [Hz] or <0 for auto mode
+        OUT int          quality );      // Proposal: 0 default, 1 sample select, 2 linear interpol, 4 4-point interpolation, 32 32-point interpolation
+        
+int  resample_buffer (                          // return code, 0 for success
+        INOUT resample_t *const   r,            // internal structure
+        IN    sample_t   *const   out,          // where to write the output data
+        INOUT size_t     *const   out_req_len,  // requested output data len/really written output data len
+        OUT   sample_t   *const   in,           // where are the input data?
+        INOUT size_t     *const   in_avail_len, // available input data len/consumed input data len
+        OUT   size_t              channel );    // number of the channel (needed for buffering)
+
+int  resample_close ( INOUT resample_t* const r );
+
+void         init_scalar_functions   ( OUT lame_t* const lame );
+long double  unround_samplefrequency ( OUT long double freq );
+
+#if 0
+int  lame_encode_mp3_frame (             // return code, 0 for success
+        INOUT lame_global_flags*,        // internal context structure
+        OUTTR sample_t * inbuf_l,        // data for left  channel
+        OUTTR sample_t * inbuf_r,        // data for right channel
+        IN    uint8_t  * mp3buf,         // where to write the coded data
+        OUT   size_t     mp3buf_size );  // maximum size of coded data
+#endif
+
+int  lame_encode_ogg_frame (             // return code, 0 for success
+        INOUT lame_global_flags*,        // internal context structure
+        OUT   sample_t * inbuf_l,        // data for left  channel
+        OUT   sample_t * inbuf_r,        // data for right channel
+        IN    uint8_t  * mp3buf,         // where to write the coded data
+        OUT   size_t     mp3buf_size );  // maximum size of coded data
+
+/*}}}*/
+
+/* end of pcm.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/portableio.c
@@ -1,0 +1,477 @@
+/* Copyright (C) 1988-1991 Apple Computer, Inc.
+ * All Rights Reserved.
+ *
+ * Warranty Information
+ * Even though Apple has reviewed this software, Apple makes no warranty
+ * or representation, either express or implied, with respect to this
+ * software, its quality, accuracy, merchantability, or fitness for a
+ * particular purpose.  As a result, this software is provided "as is,"
+ * and you, its user, are assuming the entire risk as to its quality
+ * and accuracy.
+ *
+ * This code may be used and freely distributed as long as it includes
+ * this copyright notice and the warranty information.
+ *
+ *
+ * Motorola processors (Macintosh, Sun, Sparc, MIPS, etc)
+ * pack bytes from high to low (they are big-endian).
+ * Use the HighLow routines to match the native format
+ * of these machines.
+ *
+ * Intel-like machines (PCs, Sequent)
+ * pack bytes from low to high (the are little-endian).
+ * Use the LowHigh routines to match the native format
+ * of these machines.
+ *
+ * These routines have been tested on the following machines:
+ *	Apple Macintosh, MPW 3.1 C compiler
+ *	Apple Macintosh, THINK C compiler
+ *	Silicon Graphics IRIS, MIPS compiler
+ *	Cray X/MP and Y/MP
+ *	Digital Equipment VAX
+ *
+ *
+ * Implemented by Malcolm Slaney and Ken Turkowski.
+ *
+ * Malcolm Slaney contributions during 1988-1990 include big- and little-
+ * endian file I/O, conversion to and from Motorola's extended 80-bit
+ * floating-point format, and conversions to and from IEEE single-
+ * precision floating-point format.
+ *
+ * In 1991, Ken Turkowski implemented the conversions to and from
+ * IEEE double-precision format, added more precision to the extended
+ * conversions, and accommodated conversions involving +/- infinity,
+ * NaN's, and denormalized numbers.
+ *
+ * $Id: portableio.c,v 1.11 2001/01/07 23:47:38 markt Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include	<stdio.h>
+#if defined(__riscos__) && defined(FPA10)
+#include	"ymath.h"
+#else
+#include	<math.h>
+#endif
+#include	"portableio.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+/****************************************************************
+ * Big/little-endian independent I/O routines.
+ ****************************************************************/
+
+/*
+ * It is a hoax to call this code portable-IO:
+ * 
+ *   - It doesn't work on machines with CHAR_BIT != 8
+ *   - it also don't test this error condition
+ *   - otherwise it tries to handle CHAR_BIT != 8 by things like 
+ *     masking 'putc(i&0xff,fp)'
+ *   - It doesn't handle EOF in any way
+ *   - it only works with ints with 32 or more bits
+ *   - It is a collection of initial buggy code with patching the known errors
+ *     instead of CORRECTING them! 
+ *     For that see comments on the old Read16BitsHighLow()
+ */
+
+#ifdef KLEMM_36
+
+signed int    ReadByte ( FILE* fp )
+{
+    int  result = getc (fp);
+    return result == EOF  ?  0  :  (signed char) (result & 0xFF);
+}
+
+unsigned int  ReadByteUnsigned ( FILE* fp )
+{
+    int  result = getc (fp);
+    return result == EOF  ?  0  :  (unsigned char) (result & 0xFF);
+}
+
+#else
+
+int
+ReadByte(FILE *fp)
+{
+	int	result;
+
+	result = getc(fp) & 0xff;
+	if (result & 0x80)
+		result = result - 0x100;
+	return result;
+}
+
+#endif
+
+#ifdef KLEMM_36
+
+int  Read16BitsLowHigh ( FILE* fp )
+{
+    int  low  = ReadByteUnsigned (fp);
+    int  high = ReadByte         (fp);
+    
+    return (high << 8) | low;
+}
+
+#else
+int
+Read16BitsLowHigh(FILE *fp)
+{
+	int	first, second, result;
+
+	first = 0xff & getc(fp);
+	second = 0xff & getc(fp);
+
+	result = (second << 8) + first;
+#ifndef	THINK_C42
+	if (result & 0x8000)
+		result = result - 0x10000;
+#endif	/* THINK_C */
+	return(result);
+}
+#endif
+
+
+#ifdef KLEMM_36
+
+int  Read16BitsHighLow ( FILE* fp )
+{
+    int  high = ReadByte         (fp);
+    int  low  = ReadByteUnsigned (fp);
+    
+    return (high << 8) | low;
+}
+
+#else
+int
+Read16BitsHighLow(FILE *fp)
+{
+	int	first, second, result;
+     
+        /* Reads the High bits, the value is -128...127 
+	 * (which gave after upscaling the -32768...+32512
+	 * Why this value is not converted to signed char?
+	 */
+        first = 0xff & getc(fp);
+        /* Reads the Lows bits, the value is 0...255 
+	 * This is correct. This value gives an additional offset
+	 * for the High bits
+	 */
+	second = 0xff & getc(fp);
+
+        /* This is right */
+	result = (first << 8) + second;
+    
+        /* Now we are starting to correct the nasty bug of the first instruction
+	 * The value of the high bits is wrong. Always. So we must correct this
+	 * value. This seems to be not necessary for THINK_C42. This is either
+	 * a 16 bit compiler with 16 bit ints (where this bug is hidden and 0x10000
+	 * is not in the scope of an int) or it is not a C compiler, but only a
+	 * C like compiler. In the first case the '#ifndef THINK_C42' is wrong
+	 * because it's not a property of the THINK_C42 compiler, but of all compilers
+	 * with sizeof(int)*CHAR_BIT < 18.
+	 * Another nasty thing is that the rest of the code doesn't work for 16 bit ints,
+	 * so this patch don't solve the 16 bit problem.
+         */
+#ifndef	THINK_C42
+	if (result & 0x8000)
+		result = result - 0x10000;
+#endif	/* THINK_C */
+	return(result);
+}
+#endif
+
+void
+Write8Bits(FILE *fp, int i)
+{
+	putc(i&0xff,fp);
+}
+
+
+void
+Write16BitsLowHigh(FILE *fp, int i)
+{
+	putc(i&0xff,fp);
+	putc((i>>8)&0xff,fp);
+}
+
+
+void
+Write16BitsHighLow(FILE *fp, int i)
+{
+	putc((i>>8)&0xff,fp);
+	putc(i&0xff,fp);
+}
+
+#ifdef KLEMM_36
+
+int  Read24BitsHighLow ( FILE* fp )
+{
+    int  high = ReadByte         (fp);
+    int  med  = ReadByteUnsigned (fp);
+    int  low  = ReadByteUnsigned (fp);
+    
+    return (high << 16) | (med << 8) | low;
+}
+
+#else
+int
+Read24BitsHighLow(FILE *fp)
+{
+	int	first, second, third;
+	int	result;
+
+	first = 0xff & getc(fp);
+	second = 0xff & getc(fp);
+	third = 0xff & getc(fp);
+
+	result = (first << 16) + (second << 8) + third;
+	if (result & 0x800000)
+		result = result - 0x1000000;
+	return(result);
+}
+#endif
+
+#define	Read32BitsLowHigh(f)	Read32Bits(f)
+
+#ifdef KLEMM_36
+
+int  Read32Bits ( FILE* fp )
+{
+    int  low  = ReadByteUnsigned (fp);
+    int  medl = ReadByteUnsigned (fp);
+    int  medh = ReadByteUnsigned (fp);
+    int  high = ReadByte         (fp);
+
+    return (high << 24) | (medh << 16) | (medl << 8) | low;
+}
+
+#else
+
+int
+Read32Bits(FILE *fp)
+{
+	int	first, second, result;
+
+	first = 0xffff & Read16BitsLowHigh(fp);
+	second = 0xffff & Read16BitsLowHigh(fp);
+
+	result = (second << 16) + first;
+#ifdef	CRAY
+	if (result & 0x80000000)
+		result = result - 0x100000000;
+#endif	/* CRAY */
+	return(result);
+}
+#endif
+
+
+#ifdef KLEMM_36
+
+int  Read32BitsHighLow ( FILE* fp )
+{
+    int  high = ReadByte         (fp);
+    int  medh = ReadByteUnsigned (fp);
+    int  medl = ReadByteUnsigned (fp);
+    int  low  = ReadByteUnsigned (fp);
+    
+    return (high << 24) | (medh << 16) | (medl << 8) | low;
+}
+
+#else
+
+int
+Read32BitsHighLow(FILE *fp)
+{
+	int	first, second, result;
+
+	first = 0xffff & Read16BitsHighLow(fp);
+	second = 0xffff & Read16BitsHighLow(fp);
+
+	result = (first << 16) + second;
+#ifdef	CRAY
+	if (result & 0x80000000)
+		result = result - 0x100000000;
+#endif
+	return(result);
+}
+
+#endif
+
+void
+Write32Bits(FILE *fp, int i)
+{
+	Write16BitsLowHigh(fp,(int)(i&0xffffL));
+	Write16BitsLowHigh(fp,(int)((i>>16)&0xffffL));
+}
+
+
+void
+Write32BitsLowHigh(FILE *fp, int i)
+{
+	Write16BitsLowHigh(fp,(int)(i&0xffffL));
+	Write16BitsLowHigh(fp,(int)((i>>16)&0xffffL));
+}
+
+
+void
+Write32BitsHighLow(FILE *fp, int i)
+{
+	Write16BitsHighLow(fp,(int)((i>>16)&0xffffL));
+	Write16BitsHighLow(fp,(int)(i&0xffffL));
+}
+
+#ifdef KLEMM_36
+void ReadBytes (FILE     *fp, char *p, int n) 
+{
+    memset ( p, 0, n );
+    fread  ( p, 1, n, fp );
+}
+#else
+void ReadBytes(FILE	*fp, char *p, int n)
+{
+	/* What about fread? */
+	 
+	while (!feof(fp) & (n-- > 0))
+		*p++ = getc(fp);
+}
+#endif
+
+void ReadBytesSwapped(FILE *fp, char *p, int n)
+{
+	register char	*q = p;
+
+	/* What about fread? */
+	  
+	while (!feof(fp) & (n-- > 0))
+		*q++ = getc(fp);
+
+        /* If not all bytes could be read, the resorting is different
+	 * from the normal resorting. Is this intention or another bug?
+	 */
+	for (q--; p < q; p++, q--){
+		n = *p;
+		*p = *q;
+		*q = n;
+	}
+}
+
+#ifdef KLEMM_36
+void WriteBytes(FILE *fp, char *p, int n)
+{
+    /* return n == */
+    fwrite ( p, 1, n, fp );
+}
+#else
+void WriteBytes(FILE *fp, char *p, int n)
+{
+        /* No error condition checking */
+        while (n-- > 0)
+		putc(*p++, fp);
+}
+#endif
+#ifdef KLEMM_36
+void WriteBytesSwapped(FILE *fp, char *p, int n)
+{
+    p += n;
+    while ( n-- > 0 )
+	putc ( *--p, fp );
+}
+#else
+void WriteBytesSwapped(FILE *fp, char *p, int n)
+{
+	p += n-1;
+	while (n-- > 0)
+		putc(*p--, fp);
+}
+#endif
+
+
+
+/****************************************************************
+ * The following two routines make up for deficiencies in many
+ * compilers to convert properly between unsigned integers and
+ * floating-point.  Some compilers which have this bug are the
+ * THINK_C compiler for the Macintosh and the C compiler for the
+ * Silicon Graphics MIPS-based Iris.
+ ****************************************************************/
+
+#ifdef applec	/* The Apple C compiler works */
+# define FloatToUnsigned(f)	((unsigned long)(f))
+# define UnsignedToFloat(u)	((double)(u))
+#else /* applec */
+# define FloatToUnsigned(f)	((unsigned long)(((long)((f) - 2147483648.0)) + 2147483647L + 1))
+# define UnsignedToFloat(u)	(((double)((long)((u) - 2147483647L - 1))) + 2147483648.0)
+#endif /* applec */
+/****************************************************************
+ * Extended precision IEEE floating-point conversion routines
+ ****************************************************************/
+
+double
+ConvertFromIeeeExtended(char* bytes)
+{
+	double	f;
+	long	expon;
+	unsigned long hiMant, loMant;
+
+#ifdef	TEST
+printf("ConvertFromIEEEExtended(%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx\r",
+	(long)bytes[0], (long)bytes[1], (long)bytes[2], (long)bytes[3],
+	(long)bytes[4], (long)bytes[5], (long)bytes[6],
+	(long)bytes[7], (long)bytes[8], (long)bytes[9]);
+#endif
+
+	expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF);
+	hiMant	=	((unsigned long)(bytes[2] & 0xFF) << 24)
+			|	((unsigned long)(bytes[3] & 0xFF) << 16)
+			|	((unsigned long)(bytes[4] & 0xFF) << 8)
+			|	((unsigned long)(bytes[5] & 0xFF));
+	loMant	=	((unsigned long)(bytes[6] & 0xFF) << 24)
+			|	((unsigned long)(bytes[7] & 0xFF) << 16)
+			|	((unsigned long)(bytes[8] & 0xFF) << 8)
+			|	((unsigned long)(bytes[9] & 0xFF));
+
+        /* This case should also be called if the number is below the smallest
+	 * positive double variable */
+	if (expon == 0 && hiMant == 0 && loMant == 0) {
+		f = 0;
+	}
+	else {
+	        /* This case should also be called if the number is too large to fit into 
+		 * a double variable */
+	    
+		if (expon == 0x7FFF) {	/* Infinity or NaN */
+			f = HUGE_VAL;
+		}
+		else {
+			expon -= 16383;
+			f  = ldexp(UnsignedToFloat(hiMant), (int) (expon -= 31));
+			f += ldexp(UnsignedToFloat(loMant), (int) (expon -= 32));
+		}
+	}
+
+	if (bytes[0] & 0x80)
+		return -f;
+	else
+		return f;
+}
+
+
+
+
+
+double
+ReadIeeeExtendedHighLow(FILE *fp)
+{
+	char	bytes [10];
+
+	ReadBytes ( fp, bytes, 10 );
+	return ConvertFromIeeeExtended ( bytes );
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/portableio.h
@@ -1,0 +1,118 @@
+#ifndef LAME_PORTABLEIO_H
+#define LAME_PORTABLEIO_H
+/* Copyright (C) 1988-1991 Apple Computer, Inc.
+ * All Rights Reserved.
+ *
+ * Warranty Information
+ * Even though Apple has reviewed this software, Apple makes no warranty
+ * or representation, either express or implied, with respect to this
+ * software, its quality, accuracy, merchantability, or fitness for a 
+ * particular purpose.  As a result, this software is provided "as is,"
+ * and you, its user, are assuming the entire risk as to its quality
+ * and accuracy.
+ *
+ * This code may be used and freely distributed as long as it includes
+ * this copyright notice and the warranty information.
+ *
+ * Machine-independent I/O routines for 8-, 16-, 24-, and 32-bit integers.
+ *
+ * Motorola processors (Macintosh, Sun, Sparc, MIPS, etc)
+ * pack bytes from high to low (they are big-endian).
+ * Use the HighLow routines to match the native format
+ * of these machines.
+ *
+ * Intel-like machines (PCs, Sequent)
+ * pack bytes from low to high (the are little-endian).
+ * Use the LowHigh routines to match the native format
+ * of these machines.
+ *
+ * These routines have been tested on the following machines:
+ *	Apple Macintosh, MPW 3.1 C compiler
+ *	Apple Macintosh, THINK C compiler
+ *	Silicon Graphics IRIS, MIPS compiler
+ *	Cray X/MP and Y/MP
+ *	Digital Equipment VAX
+ *
+ *
+ * Implemented by Malcolm Slaney and Ken Turkowski.
+ *
+ * Malcolm Slaney contributions during 1988-1990 include big- and little-
+ * endian file I/O, conversion to and from Motorola's extended 80-bit
+ * floating-point format, and conversions to and from IEEE single-
+ * precision floating-point format.
+ *
+ * In 1991, Ken Turkowski implemented the conversions to and from
+ * IEEE double-precision format, added more precision to the extended
+ * conversions, and accommodated conversions involving +/- infinity,
+ * NaN's, and denormalized numbers.
+ *
+ * $Id: portableio.h,v 1.2 2000/11/18 04:24:06 markt Exp $
+ *
+ * $Log: portableio.h,v $
+ * Revision 1.2  2000/11/18 04:24:06  markt
+ * Removed ieeefloat.*
+ *
+ * Revision 1.1  2000/09/28 16:36:53  takehiro
+ * moved frontend staffs into frontend/
+ * Need to debug vorbis/mpglib/analyzer/bitrate histgram.
+ * still long way to go...
+ *
+ * HAVEGTK is changed ANALYSIS(library side) and HAVEGTK(frontend side)
+ *
+ * BRHIST is deleted from library. all the bitrate histogram works are
+ * now in frontend(but not works properly, yet).
+ *
+ * timestatus things are also moved to frontend.
+ *
+ * parse.c is now out of library.
+ *
+ * Revision 1.2  2000/09/17 04:19:09  cisc
+ * conformed all this-is-included-defines to match 'project_file_name' style
+ *
+ * Revision 1.1.1.1  1999/11/24 08:43:37  markt
+ * initial checkin of LAME
+ * Starting with LAME 3.57beta with some modifications
+ *
+ * Revision 2.6  91/04/30  17:06:02  malcolm
+ */
+
+#include	<stdio.h>
+
+#ifndef	__cplusplus
+# define	CLINK	
+#else
+# define	CLINK "C"
+#endif
+
+extern CLINK int ReadByte(FILE *fp);
+extern CLINK int Read16BitsLowHigh(FILE *fp);
+extern CLINK int Read16BitsHighLow(FILE *fp);
+extern CLINK void Write8Bits(FILE *fp, int i);
+extern CLINK void Write16BitsLowHigh(FILE *fp, int i);
+extern CLINK void Write16BitsHighLow(FILE *fp, int i);
+extern CLINK int Read24BitsHighLow(FILE *fp);
+extern CLINK int Read32Bits(FILE *fp);
+extern CLINK int Read32BitsHighLow(FILE *fp);
+extern CLINK void Write32Bits(FILE *fp, int i);
+extern CLINK void Write32BitsLowHigh(FILE *fp, int i);
+extern CLINK void Write32BitsHighLow(FILE *fp, int i);
+extern CLINK void ReadBytes(FILE *fp, char *p, int n);
+extern CLINK void ReadBytesSwapped(FILE *fp, char *p, int n);
+extern CLINK void WriteBytes(FILE *fp, char *p, int n);
+extern CLINK void WriteBytesSwapped(FILE *fp, char *p, int n);
+extern CLINK double ReadIeeeFloatHighLow(FILE *fp);
+extern CLINK double ReadIeeeFloatLowHigh(FILE *fp);
+extern CLINK double ReadIeeeDoubleHighLow(FILE *fp);
+extern CLINK double ReadIeeeDoubleLowHigh(FILE *fp);
+extern CLINK double ReadIeeeExtendedHighLow(FILE *fp);
+extern CLINK double ReadIeeeExtendedLowHigh(FILE *fp);
+extern CLINK void WriteIeeeFloatLowHigh(FILE *fp, double num);
+extern CLINK void WriteIeeeFloatHighLow(FILE *fp, double num);
+extern CLINK void WriteIeeeDoubleLowHigh(FILE *fp, double num);
+extern CLINK void WriteIeeeDoubleHighLow(FILE *fp, double num);
+extern CLINK void WriteIeeeExtendedLowHigh(FILE *fp, double num);
+extern CLINK void WriteIeeeExtendedHighLow(FILE *fp, double num);
+
+#define	Read32BitsLowHigh(f)	Read32Bits(f)
+#define WriteString(f,s)	fwrite(s,strlen(s),sizeof(char),f)
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/psymodel.c
@@ -1,0 +1,2273 @@
+/*
+ *	psymodel.c
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: psymodel.c,v 1.75 2001/03/25 21:37:00 shibatch Exp $ */
+
+
+/*
+PSYCHO ACOUSTICS
+
+
+This routine computes the psycho acoustics, delayed by
+one granule.  
+
+Input: buffer of PCM data (1024 samples).  
+
+This window should be centered over the 576 sample granule window.
+The routine will compute the psycho acoustics for
+this granule, but return the psycho acoustics computed
+for the *previous* granule.  This is because the block
+type of the previous granule can only be determined
+after we have computed the psycho acoustics for the following
+granule.  
+
+Output:  maskings and energies for each scalefactor band.
+block type, PE, and some correlation measures.  
+The PE is used by CBR modes to determine if extra bits
+from the bit reservoir should be used.  The correlation
+measures are used to determine mid/side or regular stereo.
+
+
+Notation:
+
+barks:  a non-linear frequency scale.  Mapping from frequency to
+        barks is given by freq2bark()
+
+scalefactor bands: The spectrum (frequencies) are broken into 
+                   SBMAX "scalefactor bands".  Thes bands
+                   are determined by the MPEG ISO spec.  In
+                   the noise shaping/quantization code, we allocate
+                   bits among the partition bands to achieve the
+                   best possible quality
+
+partition bands:   The spectrum is also broken into about
+                   64 "partition bands".  Each partition 
+                   band is about .34 barks wide.  There are about 2-5
+                   partition bands for each scalefactor band.
+
+LAME computes all psycho acoustic information for each partition
+band.  Then at the end of the computations, this information
+is mapped to scalefactor bands.  The energy in each scalefactor
+band is taken as the sum of the energy in all partition bands
+which overlap the scalefactor band.  The maskings can be computed
+in the same way (and thus represent the average masking in that band)
+or by taking the minmum value multiplied by the number of
+partition bands used (which represents a minimum masking in that band).
+
+
+The general outline is as follows:
+
+
+1. compute the energy in each partition band
+2. compute the tonality in each partition band
+3. compute the strength of each partion band "masker"
+4. compute the masking (via the spreading function applied to each masker)
+5. Modifications for mid/side masking.  
+
+Each partition band is considiered a "masker".  The strength
+of the i'th masker in band j is given by:
+
+    s3(bark(i)-bark(j))*strength(i)
+
+The strength of the masker is a function of the energy and tonality.
+The more tonal, the less masking.  LAME uses a simple linear formula
+(controlled by NMT and TMN) which says the strength is given by the
+energy divided by a linear function of the tonality.
+
+
+s3() is the "spreading function".  It is given by a formula
+determined via listening tests.  
+
+The total masking in the j'th partition band is the sum over
+all maskings i.  It is thus given by the convolution of
+the strength with s3(), the "spreading function."
+
+masking(j) = sum_over_i  s3(i-j)*strength(i)  = s3 o strength
+
+where "o" = convolution operator.  s3 is given by a formula determined
+via listening tests.  It is normalized so that s3 o 1 = 1.
+
+Note: instead of a simple convolution, LAME also has the
+option of using "additive masking"
+
+The most critical part is step 2, computing the tonality of each
+partition band.  LAME has two tonality estimators.  The first
+is based on the ISO spec, and measures how predictiable the
+signal is over time.  The more predictable, the more tonal.
+The second measure is based on looking at the spectrum of
+a single granule.  The more peaky the spectrum, the more
+tonal.  By most indications, the latter approach is better.
+
+Finally, in step 5, the maskings for the mid and side
+channel are possibly increased.  Under certain circumstances,
+noise in the mid & side channels is assumed to also
+be masked by strong maskers in the L or R channels.
+
+
+Other data computed by the psy-model:
+
+ms_ratio        side-channel / mid-channel masking ratio (for previous granule)
+ms_ratio_next   side-channel / mid-channel masking ratio for this granule
+
+percep_entropy[2]     L and R values (prev granule) of PE - A measure of how 
+                      much pre-echo is in the previous granule
+percep_entropy_MS[2]  mid and side channel values (prev granule) of percep_entropy
+energy[4]             L,R,M,S energy in each channel, prev granule
+blocktype_d[2]        block type to use for previous granule
+
+
+*/
+
+
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "util.h"
+#include "encoder.h"
+#include "psymodel.h"
+#include "l3side.h"
+#include <assert.h>
+#include "tables.h"
+#include "fft.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+#define NSFIRLEN 21
+#define rpelev 2
+#define rpelev2 16
+
+/* size of each partition band, in barks: */
+#define DELBARK .34
+
+
+#if 1
+    /* AAC values, results in more masking over MP3 values */
+# define TMN 18
+# define NMT 6
+#else
+    /* MP3 values */
+# define TMN 29
+# define NMT 6
+#endif
+
+#define NBPSY_l  (SBMAX_l)
+#define NBPSY_s  (SBMAX_s)
+
+
+#ifdef M_LN10
+#define		LN_TO_LOG10		(M_LN10/10)
+#else
+#define         LN_TO_LOG10             0.2302585093
+#endif
+
+
+
+
+
+/*
+   L3psycho_anal.  Compute psycho acoustics.
+
+   Data returned to the calling program must be delayed by one 
+   granule. 
+
+   This is done in two places.  
+   If we do not need to know the blocktype, the copying
+   can be done here at the top of the program: we copy the data for
+   the last granule (computed during the last call) before it is
+   overwritten with the new data.  It looks like this:
+  
+   0. static psymodel_data 
+   1. calling_program_data = psymodel_data
+   2. compute psymodel_data
+    
+   For data which needs to know the blocktype, the copying must be
+   done at the end of this loop, and the old values must be saved:
+   
+   0. static psymodel_data_old 
+   1. compute psymodel_data
+   2. compute possible block type of this granule
+   3. compute final block type of previous granule based on #2.
+   4. calling_program_data = psymodel_data_old
+   5. psymodel_data_old = psymodel_data
+*/
+int L3psycho_anal( lame_global_flags * gfp,
+                    const sample_t *buffer[2], int gr_out, 
+                    FLOAT8 *ms_ratio,
+                    FLOAT8 *ms_ratio_next,
+		    III_psy_ratio masking_ratio[2][2],
+		    III_psy_ratio masking_MS_ratio[2][2],
+		    FLOAT8 percep_entropy[2],FLOAT8 percep_MS_entropy[2], 
+                    FLOAT8 energy[4],
+                    int blocktype_d[2])
+{
+/* to get a good cache performance, one has to think about
+ * the sequence, in which the variables are used.  
+ * (Note: these static variables have been moved to the gfc-> struct,
+ * and their order in memory is layed out in util.h)
+ */
+  lame_internal_flags *gfc=gfp->internal_flags;
+
+
+  /* fft and energy calculation   */
+  FLOAT (*wsamp_l)[BLKSIZE];
+  FLOAT (*wsamp_s)[3][BLKSIZE_s];
+
+  /* convolution   */
+  FLOAT8 eb[CBANDS];
+  FLOAT8 cb[CBANDS];
+  FLOAT8 thr[CBANDS];
+  
+  /* ratios    */
+  FLOAT8 ms_ratio_l=0,ms_ratio_s=0;
+
+  /* block type  */
+  int blocktype[2],uselongblock[2];
+  
+  /* usual variables like loop indices, etc..    */
+  int numchn, chn;
+  int   b, i, j, k;
+  int	sb,sblock;
+
+
+  if(gfc->psymodel_init==0) {
+      psymodel_init(gfp);
+      init_fft(gfc);
+      gfc->psymodel_init=1;
+  }
+  
+
+
+  
+  
+  numchn = gfc->channels_out;
+  /* chn=2 and 3 = Mid and Side channels */
+  if (gfp->mode == JOINT_STEREO) numchn=4;
+
+  for (chn=0; chn<numchn; chn++) {
+      for (i=0; i<numchn; ++i) {
+	  energy[chn]=gfc->tot_ener[chn];
+      }
+  }
+  
+  for (chn=0; chn<numchn; chn++) {
+
+      /* there is a one granule delay.  Copy maskings computed last call
+       * into masking_ratio to return to calling program.
+       */
+      if (chn < 2) {    
+	  /* LR maskings  */
+	  percep_entropy            [chn]       = gfc -> pe  [chn]; 
+	  masking_ratio    [gr_out] [chn]  .en  = gfc -> en  [chn];
+	  masking_ratio    [gr_out] [chn]  .thm = gfc -> thm [chn];
+      } else {
+	  /* MS maskings  */
+	  percep_MS_entropy         [chn-2]     = gfc -> pe  [chn]; 
+	  masking_MS_ratio [gr_out] [chn-2].en  = gfc -> en  [chn];
+	  masking_MS_ratio [gr_out] [chn-2].thm = gfc -> thm [chn];
+      }
+      
+      
+
+    /**********************************************************************
+     *  compute FFTs
+     **********************************************************************/
+    wsamp_s = gfc->wsamp_S+(chn & 1);
+    wsamp_l = gfc->wsamp_L+(chn & 1);
+    if (chn<2) {    
+      fft_long ( gfc, *wsamp_l, chn, buffer);
+      fft_short( gfc, *wsamp_s, chn, buffer);
+    } 
+    /* FFT data for mid and side channel is derived from L & R */
+    if (chn == 2)
+      {
+        for (j = BLKSIZE-1; j >=0 ; --j)
+        {
+          FLOAT l = gfc->wsamp_L[0][j];
+          FLOAT r = gfc->wsamp_L[1][j];
+          gfc->wsamp_L[0][j] = (l+r)*(FLOAT)(SQRT2*0.5);
+          gfc->wsamp_L[1][j] = (l-r)*(FLOAT)(SQRT2*0.5);
+        }
+        for (b = 2; b >= 0; --b)
+        {
+          for (j = BLKSIZE_s-1; j >= 0 ; --j)
+          {
+            FLOAT l = gfc->wsamp_S[0][b][j];
+            FLOAT r = gfc->wsamp_S[1][b][j];
+            gfc->wsamp_S[0][b][j] = (l+r)*(FLOAT)(SQRT2*0.5);
+            gfc->wsamp_S[1][b][j] = (l-r)*(FLOAT)(SQRT2*0.5);
+          }
+        }
+      }
+
+
+    /**********************************************************************
+     *  compute energies
+     **********************************************************************/
+    
+    
+    
+    gfc->energy[0]  = (*wsamp_l)[0];
+    gfc->energy[0] *= gfc->energy[0];
+    
+    gfc->tot_ener[chn] = gfc->energy[0]; /* sum total energy at nearly no extra cost */
+    
+    for (j=BLKSIZE/2-1; j >= 0; --j)
+    {
+      FLOAT re = (*wsamp_l)[BLKSIZE/2-j];
+      FLOAT im = (*wsamp_l)[BLKSIZE/2+j];
+      gfc->energy[BLKSIZE/2-j] = (re * re + im * im) * (FLOAT)0.5;
+
+      if (BLKSIZE/2-j > 10)
+	gfc->tot_ener[chn] += gfc->energy[BLKSIZE/2-j];
+    }
+    for (b = 2; b >= 0; --b)
+    {
+      gfc->energy_s[b][0]  = (*wsamp_s)[b][0];
+      gfc->energy_s[b][0] *=  gfc->energy_s [b][0];
+      for (j=BLKSIZE_s/2-1; j >= 0; --j)
+      {
+        FLOAT re = (*wsamp_s)[b][BLKSIZE_s/2-j];
+        FLOAT im = (*wsamp_s)[b][BLKSIZE_s/2+j];
+        gfc->energy_s[b][BLKSIZE_s/2-j] = (re * re + im * im) * (FLOAT)0.5;
+      }
+    }
+
+
+  if (gfp->analysis) {
+    for (j=0; j<HBLKSIZE ; j++) {
+      gfc->pinfo->energy[gr_out][chn][j]=gfc->energy_save[chn][j];
+      gfc->energy_save[chn][j]=gfc->energy[j];
+    }
+  }
+    
+    /**********************************************************************
+     *    compute unpredicatability of first six spectral lines            * 
+     **********************************************************************/
+    for ( j = 0; j < gfc->cw_lower_index; j++ )
+      {	 /* calculate unpredictability measure cw */
+	FLOAT an, a1, a2;
+	FLOAT bn, b1, b2;
+	FLOAT rn, r1, r2;
+	FLOAT numre, numim, den;
+
+	a2 = gfc-> ax_sav[chn][1][j];
+	b2 = gfc-> bx_sav[chn][1][j];
+	r2 = gfc-> rx_sav[chn][1][j];
+	a1 = gfc-> ax_sav[chn][1][j] = gfc-> ax_sav[chn][0][j];
+	b1 = gfc-> bx_sav[chn][1][j] = gfc-> bx_sav[chn][0][j];
+	r1 = gfc-> rx_sav[chn][1][j] = gfc-> rx_sav[chn][0][j];
+	an = gfc-> ax_sav[chn][0][j] = (*wsamp_l)[j];
+	bn = gfc-> bx_sav[chn][0][j] = j==0 ? (*wsamp_l)[0] : (*wsamp_l)[BLKSIZE-j];  
+	rn = gfc-> rx_sav[chn][0][j] = sqrt(gfc->energy[j]);
+
+	{ /* square (x1,y1) */
+	  if( r1 != 0 ) {
+	    numre = (a1*b1);
+	    numim = (a1*a1-b1*b1)*(FLOAT)0.5;
+	    den = r1*r1;
+	  } else {
+	    numre = 1;
+	    numim = 0;
+	    den = 1;
+	  }
+	}
+	
+	{ /* multiply by (x2,-y2) */
+	  if( r2 != 0 ) {
+	    FLOAT tmp2 = (numim+numre)*(a2+b2)*(FLOAT)0.5;
+	    FLOAT tmp1 = -a2*numre+tmp2;
+	    numre =       -b2*numim+tmp2;
+	    numim = tmp1;
+	    den *= r2;
+	  } else {
+	    /* do nothing */
+	  }
+	}
+	
+	{ /* r-prime factor */
+	  FLOAT tmp = (2*r1-r2)/den;
+	  numre *= tmp;
+	  numim *= tmp;
+	}
+	den=rn+fabs(2*r1-r2);
+	if( den != 0 ) {
+	  numre = (an+bn)*(FLOAT)0.5-numre;
+	  numim = (an-bn)*(FLOAT)0.5-numim;
+	  den = sqrt(numre*numre+numim*numim)/den;
+	}
+	gfc->cw[j] = den;
+      }
+
+
+
+    /**********************************************************************
+     *     compute unpredicatibility of next 200 spectral lines            *
+     **********************************************************************/ 
+    for ( j = gfc->cw_lower_index; j < gfc->cw_upper_index; j += 4 )
+      {/* calculate unpredictability measure cw */
+	FLOAT rn, r1, r2;
+	FLOAT numre, numim, den;
+	
+	k = (j+2) / 4; 
+	
+	{ /* square (x1,y1) */
+	  r1 = gfc->energy_s[0][k];
+	  if( r1 != 0 ) {
+	    FLOAT a1 = (*wsamp_s)[0][k]; 
+	    FLOAT b1 = (*wsamp_s)[0][BLKSIZE_s-k]; /* k is never 0 */
+	    numre = (a1*b1);
+	    numim = (a1*a1-b1*b1)*(FLOAT)0.5;
+	    den = r1;
+	    r1 = sqrt(r1);
+	  } else {
+	    numre = 1;
+	    numim = 0;
+	    den = 1;
+	  }
+	}
+	
+	
+	{ /* multiply by (x2,-y2) */
+	  r2 = gfc->energy_s[2][k];
+	  if( r2 != 0 ) {
+	    FLOAT a2 = (*wsamp_s)[2][k]; 
+	    FLOAT b2 = (*wsamp_s)[2][BLKSIZE_s-k];
+	    
+	    
+	    FLOAT tmp2 = (numim+numre)*(a2+b2)*(FLOAT)0.5;
+	    FLOAT tmp1 = -a2*numre+tmp2;
+	    numre =       -b2*numim+tmp2;
+	    numim = tmp1;
+	    
+	    r2 = sqrt(r2);
+	    den *= r2;
+	  } else {
+	    /* do nothing */
+	  }
+	}
+	
+	{ /* r-prime factor */
+	  FLOAT tmp = (2*r1-r2)/den;
+	  numre *= tmp;
+	  numim *= tmp;
+	}
+	
+	rn = sqrt(gfc->energy_s[1][k]);
+	den=rn+fabs(2*r1-r2);
+	if( den != 0 ) {
+	  FLOAT an = (*wsamp_s)[1][k]; 
+	  FLOAT bn = (*wsamp_s)[1][BLKSIZE_s-k];
+	  numre = (an+bn)*(FLOAT)0.5-numre;
+	  numim = (an-bn)*(FLOAT)0.5-numim;
+	  den = sqrt(numre*numre+numim*numim)/den;
+	}
+	
+	gfc->cw[j+1] = gfc->cw[j+2] = gfc->cw[j+3] = gfc->cw[j] = den;
+      }
+    
+#if 0
+    for ( j = 14; j < HBLKSIZE-4; j += 4 )
+      {/* calculate energy from short ffts */
+	FLOAT8 tot,ave;
+	k = (j+2) / 4; 
+	for (tot=0, sblock=0; sblock < 3; sblock++)
+	  tot+=gfc->energy_s[sblock][k];
+	ave = gfc->energy[j+1]+ gfc->energy[j+2]+ gfc->energy[j+3]+ gfc->energy[j];
+	ave /= 4.;
+	gfc->energy[j+1] = gfc->energy[j+2] = gfc->energy[j+3] =  gfc->energy[j]=tot;
+      }
+#endif
+    
+    /**********************************************************************
+     *    Calculate the energy and the unpredictability in the threshold   *
+     *    calculation partitions                                           *
+     **********************************************************************/
+
+    b = 0;
+    for (j = 0; j < gfc->cw_upper_index && gfc->numlines_l[b] && b<gfc->npart_l_orig; )
+      {
+	FLOAT8 ebb, cbb;
+
+	ebb = gfc->energy[j];
+	cbb = gfc->energy[j] * gfc->cw[j];
+	j++;
+
+	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
+	  {
+	    ebb += gfc->energy[j];
+	    cbb += gfc->energy[j] * gfc->cw[j];
+	    j++;
+	  }
+	eb[b] = ebb;
+	cb[b] = cbb;
+	b++;
+      }
+
+    for (; b < gfc->npart_l_orig; b++ )
+      {
+	FLOAT8 ebb = gfc->energy[j++];
+	assert(gfc->numlines_l[b]);
+	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
+	  {
+	    ebb += gfc->energy[j++];
+	  }
+	eb[b] = ebb;
+	cb[b] = ebb * 0.4;
+      }
+
+    /**********************************************************************
+     *      convolve the partitioned energy and unpredictability           *
+     *      with the spreading function, s3_l[b][k]                        *
+     ******************************************************************** */
+    gfc->pe[chn] = 0;		/*  calculate percetual entropy */
+    for ( b = 0;b < gfc->npart_l; b++ )
+      {
+	FLOAT8 tbb,ecb,ctb;
+
+	ecb = 0;
+	ctb = 0;
+
+	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
+	  {
+	    ecb += gfc->s3_l[b][k] * eb[k];	/* sprdngf for Layer III */
+	    ctb += gfc->s3_l[b][k] * cb[k];
+	  }
+
+	/* calculate the tonality of each threshold calculation partition 
+	 * calculate the SNR in each threshold calculation partition 
+	 * tonality = -0.299 - .43*log(ctb/ecb);
+	 * tonality = 0:           use NMT   (lots of masking)
+	 * tonality = 1:           use TMN   (little masking)
+	 */
+
+/* ISO values */
+#define CONV1 (-.299)
+#define CONV2 (-.43)
+
+	tbb = ecb;
+	if (tbb != 0)
+	  {
+	    tbb = ctb / tbb;
+	    if (tbb <= exp((1-CONV1)/CONV2)) 
+	      { /* tonality near 1 */
+		tbb = exp(-LN_TO_LOG10 * TMN);
+	      }
+	    else if (tbb >= exp((0-CONV1)/CONV2)) 
+	      {/* tonality near 0 */
+		tbb = exp(-LN_TO_LOG10 * NMT);
+	      }
+	    else
+	      {
+		/* convert to tonality index */
+		/* tonality small:   tbb=1 */
+		/* tonality large:   tbb=-.299 */
+		tbb = CONV1 + CONV2*log(tbb);
+		tbb = exp(-LN_TO_LOG10 * ( TMN*tbb + (1-tbb)*NMT) );
+	      }
+	  }
+
+	/* at this point, tbb represents the amount the spreading function
+	 * will be reduced.  The smaller the value, the less masking.
+	 * minval[] = 1 (0db)     says just use tbb.
+	 * minval[]= .01 (-20db)  says reduce spreading function by 
+	 *                        at least 20db.  
+	 */
+
+	tbb = Min(gfc->minval[b], tbb);
+	ecb *= tbb;
+
+	/* long block pre-echo control.   */
+	/* rpelev=2.0, rpelev2=16.0 */
+	/* note: all surges in PE are because of this pre-echo formula
+	 * for thr[b].  If it this is not used, PE is always around 600
+	 */
+	/* dont use long block pre-echo control if previous granule was 
+	 * a short block.  This is to avoid the situation:   
+	 * frame0:  quiet (very low masking)  
+	 * frame1:  surge  (triggers short blocks)
+	 * frame2:  regular frame.  looks like pre-echo when compared to 
+	 *          frame0, but all pre-echo was in frame1.
+	 */
+	/* chn=0,1   L and R channels
+	   chn=2,3   S and M channels.  
+	*/
+        
+        if (vbr_mtrh == gfp->VBR) {
+            thr[b] = Min (rpelev*gfc->nb_1[chn][b], rpelev2*gfc->nb_2[chn][b]);
+            thr[b] = Max (thr[b], gfc->ATH->adjust * gfc->ATH->cb[b]);
+            thr[b] = Min (thr[b], ecb);
+	}
+        else if (gfc->blocktype_old[chn>1 ? chn-2 : chn] == SHORT_TYPE )
+	  thr[b] = ecb; /* Min(ecb, rpelev*gfc->nb_1[chn][b]); */
+	else
+	  thr[b] = Min(ecb, Min(rpelev*gfc->nb_1[chn][b],rpelev2*gfc->nb_2[chn][b]) );
+
+	gfc->nb_2[chn][b] = gfc->nb_1[chn][b];
+	gfc->nb_1[chn][b] = ecb;
+
+	{
+	  FLOAT8 thrpe;
+	  thrpe = Max(thr[b],gfc->ATH->cb[b]);
+	  /*
+	    printf("%i thr=%e   ATH=%e  \n",b,thr[b],gfc->ATH->cb[b]);
+	  */
+	  if (thrpe < eb[b])
+	    gfc->pe[chn] -= gfc->numlines_l[b] * log(thrpe / eb[b]);
+	}
+      }
+
+    /*************************************************************** 
+     * determine the block type (window type) based on L & R channels
+     * 
+     ***************************************************************/
+    {  /* compute PE for all 4 channels */
+      FLOAT mn,mx,ma=0,mb=0,mc=0;
+      
+      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
+	{
+	  ma += gfc->energy_s[0][j];
+	  mb += gfc->energy_s[1][j];
+	  mc += gfc->energy_s[2][j];
+	}
+      mn = Min(ma,mb);
+      mn = Min(mn,mc);
+      mx = Max(ma,mb);
+      mx = Max(mx,mc);
+      
+      /* bit allocation is based on pe.  */
+      if (mx>mn) {
+	FLOAT8 tmp = 400*log(mx/(1e-12+mn));
+	if (tmp>gfc->pe[chn]) gfc->pe[chn]=tmp;
+      }
+
+      /* block type is based just on L or R channel */      
+      if (chn<2) {
+	uselongblock[chn] = 1;
+	
+	/* tuned for t1.wav.  doesnt effect most other samples */
+	if (gfc->pe[chn] > 3000) 
+	  uselongblock[chn]=0;
+	
+	if ( mx > 30*mn ) 
+	  {/* big surge of energy - always use short blocks */
+	    uselongblock[chn] = 0;
+	  } 
+	else if ((mx > 10*mn) && (gfc->pe[chn] > 1000))
+	  {/* medium surge, medium pe - use short blocks */
+	    uselongblock[chn] = 0;
+	  }
+	
+	/* disable short blocks */
+	if (gfp->no_short_blocks)
+	  uselongblock[chn]=1;
+      }
+    }
+
+    if (gfp->analysis) {
+      FLOAT mn,mx,ma=0,mb=0,mc=0;
+
+      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
+      {
+        ma += gfc->energy_s[0][j];
+        mb += gfc->energy_s[1][j];
+        mc += gfc->energy_s[2][j];
+      }
+      mn = Min(ma,mb);
+      mn = Min(mn,mc);
+      mx = Max(ma,mb);
+      mx = Max(mx,mc);
+
+      gfc->pinfo->ers[gr_out][chn]=gfc->ers_save[chn];
+      gfc->ers_save[chn]=(mx/(1e-12+mn));
+      gfc->pinfo->pe[gr_out][chn]=gfc->pe_save[chn];
+      gfc->pe_save[chn]=gfc->pe[chn];
+    }
+
+
+    /*************************************************************** 
+     * compute masking thresholds for both short and long blocks
+     ***************************************************************/
+    /* longblock threshold calculation (part 2) */
+    for ( sb = 0; sb < NBPSY_l; sb++ )
+      {
+	FLOAT8 enn = gfc->w1_l[sb] * eb[gfc->bu_l[sb]] + gfc->w2_l[sb] * eb[gfc->bo_l[sb]];
+	FLOAT8 thmm = gfc->w1_l[sb] *thr[gfc->bu_l[sb]] + gfc->w2_l[sb] * thr[gfc->bo_l[sb]];
+
+        for ( b = gfc->bu_l[sb]+1; b < gfc->bo_l[sb]; b++ )
+          {
+            enn  += eb[b];
+            thmm += thr[b];
+          }
+
+	gfc->en [chn].l[sb] = enn;
+	gfc->thm[chn].l[sb] = thmm;
+      }
+    
+
+    /* threshold calculation for short blocks */
+    for ( sblock = 0; sblock < 3; sblock++ )
+      {
+	j = 0;
+	for ( b = 0; b < gfc->npart_s_orig; b++ )
+	  {
+	    FLOAT ecb = gfc->energy_s[sblock][j++];
+	    for (i = 1 ; i<gfc->numlines_s[b]; ++i)
+	      {
+		ecb += gfc->energy_s[sblock][j++];
+	      }
+	    eb[b] = ecb;
+	  }
+
+	for ( b = 0; b < gfc->npart_s; b++ )
+	  {
+	    FLOAT8 ecb = 0;
+	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
+		ecb += gfc->s3_s[b][k] * eb[k];
+	    }
+            ecb *= gfc->SNR_s[b];
+	    thr[b] = Max (1e-6, ecb);
+	  }
+
+	for ( sb = 0; sb < NBPSY_s; sb++ ){
+            FLOAT8 enn  = gfc->w1_s[sb] * eb[gfc->bu_s[sb]] + gfc->w2_s[sb] * eb[gfc->bo_s[sb]];
+	    FLOAT8 thmm = gfc->w1_s[sb] *thr[gfc->bu_s[sb]] + gfc->w2_s[sb] * thr[gfc->bo_s[sb]];
+	    
+            for ( b = gfc->bu_s[sb]+1; b < gfc->bo_s[sb]; b++ ) {
+		enn  += eb[b];
+		thmm += thr[b];
+	    }
+
+	    gfc->en [chn].s[sb][sblock] = enn;
+	    gfc->thm[chn].s[sb][sblock] = thmm;
+	  }
+      }
+  } /* end loop over chn */
+
+
+  /* compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper */
+  if (gfp->mode == JOINT_STEREO) {
+    FLOAT8 rside,rmid,mld;
+    int chmid=2,chside=3; 
+    
+    for ( sb = 0; sb < NBPSY_l; sb++ ) {
+      /* use this fix if L & R masking differs by 2db or less */
+      /* if db = 10*log10(x2/x1) < 2 */
+      /* if (x2 < 1.58*x1) { */
+      if (gfc->thm[0].l[sb] <= 1.58*gfc->thm[1].l[sb]
+	  && gfc->thm[1].l[sb] <= 1.58*gfc->thm[0].l[sb]) {
+
+	mld = gfc->mld_l[sb]*gfc->en[chside].l[sb];
+	rmid = Max(gfc->thm[chmid].l[sb], Min(gfc->thm[chside].l[sb],mld));
+
+	mld = gfc->mld_l[sb]*gfc->en[chmid].l[sb];
+	rside = Max(gfc->thm[chside].l[sb],Min(gfc->thm[chmid].l[sb],mld));
+
+	gfc->thm[chmid].l[sb]=rmid;
+	gfc->thm[chside].l[sb]=rside;
+      }
+    }
+    for ( sb = 0; sb < NBPSY_s; sb++ ) {
+      for ( sblock = 0; sblock < 3; sblock++ ) {
+	if (gfc->thm[0].s[sb][sblock] <= 1.58*gfc->thm[1].s[sb][sblock]
+	    && gfc->thm[1].s[sb][sblock] <= 1.58*gfc->thm[0].s[sb][sblock]) {
+
+	  mld = gfc->mld_s[sb]*gfc->en[chside].s[sb][sblock];
+	  rmid = Max(gfc->thm[chmid].s[sb][sblock],Min(gfc->thm[chside].s[sb][sblock],mld));
+
+	  mld = gfc->mld_s[sb]*gfc->en[chmid].s[sb][sblock];
+	  rside = Max(gfc->thm[chside].s[sb][sblock],Min(gfc->thm[chmid].s[sb][sblock],mld));
+
+	  gfc->thm[chmid].s[sb][sblock]=rmid;
+	  gfc->thm[chside].s[sb][sblock]=rside;
+	}
+      }
+    }
+  }
+
+  if (gfp->mode == JOINT_STEREO)  {
+    /* determin ms_ratio from masking thresholds*/
+    /* use ms_stereo (ms_ratio < .35) if average thresh. diff < 5 db */
+    FLOAT8 db,x1,x2,sidetot=0,tot=0;
+    for (sb= NBPSY_l/4 ; sb< NBPSY_l; sb ++ ) {
+      x1 = Min(gfc->thm[0].l[sb],gfc->thm[1].l[sb]);
+      x2 = Max(gfc->thm[0].l[sb],gfc->thm[1].l[sb]);
+      /* thresholds difference in db */
+      if (x2 >= 1000*x1)  db=3;
+      else db = log10(x2/x1);  
+      /*  DEBUGF(gfc,"db = %f %e %e  \n",db,gfc->thm[0].l[sb],gfc->thm[1].l[sb]);*/
+      sidetot += db;
+      tot++;
+    }
+    ms_ratio_l= (sidetot/tot)*0.7; /* was .35*(sidetot/tot)/5.0*10 */
+    ms_ratio_l = Min(ms_ratio_l,0.5);
+    
+    sidetot=0; tot=0;
+    for ( sblock = 0; sblock < 3; sblock++ )
+      for ( sb = NBPSY_s/4; sb < NBPSY_s; sb++ ) {
+	x1 = Min(gfc->thm[0].s[sb][sblock],gfc->thm[1].s[sb][sblock]);
+	x2 = Max(gfc->thm[0].s[sb][sblock],gfc->thm[1].s[sb][sblock]);
+	/* thresholds difference in db */
+	if (x2 >= 1000*x1)  db=3;
+	else db = log10(x2/x1);  
+	sidetot += db;
+	tot++;
+      }
+    ms_ratio_s = (sidetot/tot)*0.7; /* was .35*(sidetot/tot)/5.0*10 */
+    ms_ratio_s = Min(ms_ratio_s,.5);
+  }
+
+  /*************************************************************** 
+   * determine final block type
+   ***************************************************************/
+
+  for (chn=0; chn<gfc->channels_out; chn++) {
+    blocktype[chn] = NORM_TYPE;
+  }
+
+
+  if (gfc->channels_out==2) {
+    if (!gfp->allow_diff_short || gfp->mode==JOINT_STEREO) {
+      /* force both channels to use the same block type */
+      /* this is necessary if the frame is to be encoded in ms_stereo.  */
+      /* But even without ms_stereo, FhG  does this */
+      int bothlong= (uselongblock[0] && uselongblock[1]);
+      if (!bothlong) {
+	uselongblock[0]=0;
+	uselongblock[1]=0;
+      }
+    }
+  }
+
+  
+  
+  /* update the blocktype of the previous granule, since it depends on what
+   * happend in this granule */
+  for (chn=0; chn<gfc->channels_out; chn++) {
+    if ( uselongblock[chn])
+      {				/* no attack : use long blocks */
+	assert( gfc->blocktype_old[chn] != START_TYPE );
+	switch( gfc->blocktype_old[chn] ) 
+	  {
+	  case NORM_TYPE:
+	  case STOP_TYPE:
+	    blocktype[chn] = NORM_TYPE;
+	    break;
+	  case SHORT_TYPE:
+	    blocktype[chn] = STOP_TYPE; 
+	    break;
+	  }
+      } else   {
+	/* attack : use short blocks */
+	blocktype[chn] = SHORT_TYPE;
+	if ( gfc->blocktype_old[chn] == NORM_TYPE ) {
+	  gfc->blocktype_old[chn] = START_TYPE;
+	}
+	if ( gfc->blocktype_old[chn] == STOP_TYPE ) {
+	  gfc->blocktype_old[chn] = SHORT_TYPE ;
+	}
+      }
+    
+    blocktype_d[chn] = gfc->blocktype_old[chn];  /* value returned to calling program */
+    gfc->blocktype_old[chn] = blocktype[chn];    /* save for next call to l3psy_anal */
+  }
+  
+  if (blocktype_d[0]==2) 
+    *ms_ratio = gfc->ms_ratio_s_old;
+  else
+    *ms_ratio = gfc->ms_ratio_l_old;
+
+  gfc->ms_ratio_s_old = ms_ratio_s;
+  gfc->ms_ratio_l_old = ms_ratio_l;
+
+  /* we dont know the block type of this frame yet - assume long */
+  *ms_ratio_next = ms_ratio_l;
+
+  return 0;
+}
+
+/* addition of simultaneous masking   Naoki Shibata 2000/7 */
+inline static FLOAT8 mask_add(FLOAT8 m1,FLOAT8 m2,int k,int b, lame_internal_flags * const gfc)
+{
+  static const FLOAT8 table1[] = {
+    3.3246 *3.3246 ,3.23837*3.23837,3.15437*3.15437,3.00412*3.00412,2.86103*2.86103,2.65407*2.65407,2.46209*2.46209,2.284  *2.284  ,
+    2.11879*2.11879,1.96552*1.96552,1.82335*1.82335,1.69146*1.69146,1.56911*1.56911,1.46658*1.46658,1.37074*1.37074,1.31036*1.31036,
+    1.25264*1.25264,1.20648*1.20648,1.16203*1.16203,1.12765*1.12765,1.09428*1.09428,1.0659 *1.0659 ,1.03826*1.03826,1.01895*1.01895,
+    1
+  };
+
+  static const FLOAT8 table2[] = {
+    1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537 *1.3537 ,1.30382*1.30382,1.22321*1.22321,
+    1.14758*1.14758
+  };
+
+  static const FLOAT8 table3[] = {
+    2.35364*2.35364,2.29259*2.29259,2.23313*2.23313,2.12675*2.12675,2.02545*2.02545,1.87894*1.87894,1.74303*1.74303,1.61695*1.61695,
+    1.49999*1.49999,1.39148*1.39148,1.29083*1.29083,1.19746*1.19746,1.11084*1.11084,1.03826*1.03826
+  };
+
+
+  int i;
+  FLOAT8 m;
+
+  if (m1 == 0) return m2;
+
+  if (b < 0) b = -b;
+
+  i = 10*log10(m2 / m1)/10*16;
+  m = 10*log10((m1+m2)/gfc->ATH->cb[k]);
+
+  if (i < 0) i = -i;
+
+  if (b <= 3) {  /* approximately, 1 bark = 3 partitions */
+    if (i > 8) return m1+m2;
+    return (m1+m2)*table2[i];
+  }
+
+  if (m<15) {
+    if (m > 0) {
+      FLOAT8 f=1.0,r;
+      if (i > 24) return m1+m2;
+      if (i > 13) f = 1; else f = table3[i];
+      r = (m-0)/15;
+      return (m1+m2)*(table1[i]*r+f*(1-r));
+    }
+    if (i > 13) return m1+m2;
+    return (m1+m2)*table3[i];
+  }
+
+  if (i > 24) return m1+m2;
+  return (m1+m2)*table1[i];
+}
+
+int L3psycho_anal_ns( lame_global_flags * gfp,
+                    const sample_t *buffer[2], int gr_out, 
+                    FLOAT8 *ms_ratio,
+                    FLOAT8 *ms_ratio_next,
+		    III_psy_ratio masking_ratio[2][2],
+		    III_psy_ratio masking_MS_ratio[2][2],
+		    FLOAT8 percep_entropy[2],FLOAT8 percep_MS_entropy[2], 
+		    FLOAT8 energy[4], 
+                    int blocktype_d[2])
+{
+/* to get a good cache performance, one has to think about
+ * the sequence, in which the variables are used.  
+ * (Note: these static variables have been moved to the gfc-> struct,
+ * and their order in memory is layed out in util.h)
+ */
+  lame_internal_flags *gfc=gfp->internal_flags;
+
+  /* fft and energy calculation   */
+  FLOAT (*wsamp_l)[BLKSIZE];
+  FLOAT (*wsamp_s)[3][BLKSIZE_s];
+
+  /* convolution   */
+  FLOAT8 eb[CBANDS],eb2[CBANDS];
+  FLOAT8 thr[CBANDS];
+  
+  FLOAT8 max[CBANDS],avg[CBANDS],tonality2[CBANDS];
+
+  /* ratios    */
+  FLOAT8 ms_ratio_l=0,ms_ratio_s=0;
+
+  /* block type  */
+  int blocktype[2],uselongblock[2];
+  
+  /* usual variables like loop indices, etc..    */
+  int numchn, chn;
+  int   b, i, j, k;
+  int	sb,sblock;
+
+  /* variables used for --nspsytune */
+  int ns_attacks[4];
+  FLOAT ns_hpfsmpl[4][576+576/3+NSFIRLEN];
+  FLOAT pe_l[4],pe_s[4];
+  FLOAT pcfact;
+
+
+  if(gfc->psymodel_init==0) {
+    psymodel_init(gfp);
+    init_fft(gfc);
+    gfc->psymodel_init=1;
+  }
+
+
+  numchn = gfc->channels_out;
+  /* chn=2 and 3 = Mid and Side channels */
+  if (gfp->mode == JOINT_STEREO) numchn=4;
+
+  if (gfp->VBR==vbr_off) pcfact = gfc->ResvMax == 0 ? 0 : ((FLOAT)gfc->ResvSize)/gfc->ResvMax*0.5;
+  else if (gfp->VBR == vbr_rh  ||  gfp->VBR == vbr_mtrh  ||  gfp->VBR == vbr_mt) {
+    static const FLOAT8 pcQns[10]={1.0,1.0,1.0,0.8,0.6,0.5,0.4,0.3,0.2,0.1};
+    pcfact = pcQns[gfp->VBR_q];
+  } else pcfact = 1;
+
+  /**********************************************************************
+   *  Apply HPF of fs/4 to the input signal.
+   *  This is used for attack detection / handling.
+   **********************************************************************/
+
+  {
+    static const FLOAT fircoef[] = {
+      -8.65163e-18,-0.00851586,-6.74764e-18, 0.0209036,
+      -3.36639e-17,-0.0438162 ,-1.54175e-17, 0.0931738,
+      -5.52212e-17,-0.313819  , 0.5        ,-0.313819,
+      -5.52212e-17, 0.0931738 ,-1.54175e-17,-0.0438162,
+      -3.36639e-17, 0.0209036 ,-6.74764e-18,-0.00851586,
+      -8.65163e-18,
+    };
+
+    for(chn=0;chn<gfc->channels_out;chn++)
+      {
+	FLOAT firbuf[576+576/3+NSFIRLEN];
+
+	/* apply high pass filter of fs/4 */
+	
+	for(i=-NSFIRLEN;i<576+576/3;i++)
+	  firbuf[i+NSFIRLEN] = buffer[chn][576-350+(i)];
+
+	for(i=0;i<576+576/3-NSFIRLEN;i++)
+          {
+	    FLOAT sum = 0;
+	    for(j=0;j<NSFIRLEN;j++)
+	      sum += fircoef[j] * firbuf[i+j];
+	    ns_hpfsmpl[chn][i] = sum;
+	  }
+	for(;i<576+576/3;i++)
+	  ns_hpfsmpl[chn][i] = 0;
+      }
+
+    if (gfp->mode == JOINT_STEREO) {
+      for(i=0;i<576+576/3;i++)
+	{
+	  ns_hpfsmpl[2][i] = ns_hpfsmpl[0][i]+ns_hpfsmpl[1][i];
+	  ns_hpfsmpl[3][i] = ns_hpfsmpl[0][i]-ns_hpfsmpl[1][i];
+	}
+    }
+  }
+  
+
+
+  /* there is a one granule delay.  Copy maskings computed last call
+   * into masking_ratio to return to calling program.
+   */
+  for (chn=0; chn<numchn; chn++) {
+      for (i=0; i<numchn; ++i) {
+	  energy[chn]=gfc->tot_ener[chn];
+      }
+  }
+
+
+  for (chn=0; chn<numchn; chn++) {
+    /* there is a one granule delay.  Copy maskings computed last call
+     * into masking_ratio to return to calling program.
+     */
+    pe_l[chn] = gfc->nsPsy.pe_l[chn];
+    pe_s[chn] = gfc->nsPsy.pe_s[chn];
+
+    if (chn < 2) {    
+      /* LR maskings  */
+      //percep_entropy            [chn]       = gfc -> pe  [chn]; 
+      masking_ratio    [gr_out] [chn]  .en  = gfc -> en  [chn];
+      masking_ratio    [gr_out] [chn]  .thm = gfc -> thm [chn];
+    } else {
+      /* MS maskings  */
+      //percep_MS_entropy         [chn-2]     = gfc -> pe  [chn]; 
+      masking_MS_ratio [gr_out] [chn-2].en  = gfc -> en  [chn];
+      masking_MS_ratio [gr_out] [chn-2].thm = gfc -> thm [chn];
+    }
+  }
+
+  for (chn=0; chn<numchn; chn++) {
+
+    /**********************************************************************
+     *  compute FFTs
+     **********************************************************************/
+
+    wsamp_s = gfc->wsamp_S+(chn & 1);
+    wsamp_l = gfc->wsamp_L+(chn & 1);
+
+    if (chn<2) {    
+      fft_long ( gfc, *wsamp_l, chn, buffer);
+      fft_short( gfc, *wsamp_s, chn, buffer);
+    } 
+
+    /* FFT data for mid and side channel is derived from L & R */
+
+    if (chn == 2)
+      {
+        for (j = BLKSIZE-1; j >=0 ; --j)
+	  {
+	    FLOAT l = gfc->wsamp_L[0][j];
+	    FLOAT r = gfc->wsamp_L[1][j];
+	    gfc->wsamp_L[0][j] = (l+r)*(FLOAT)(SQRT2*0.5);
+	    gfc->wsamp_L[1][j] = (l-r)*(FLOAT)(SQRT2*0.5);
+	  }
+        for (b = 2; b >= 0; --b)
+	  {
+	    for (j = BLKSIZE_s-1; j >= 0 ; --j)
+	      {
+		FLOAT l = gfc->wsamp_S[0][b][j];
+		FLOAT r = gfc->wsamp_S[1][b][j];
+		gfc->wsamp_S[0][b][j] = (l+r)*(FLOAT)(SQRT2*0.5);
+		gfc->wsamp_S[1][b][j] = (l-r)*(FLOAT)(SQRT2*0.5);
+	      }
+	  }
+      }
+
+
+    /**********************************************************************
+     *  compute energies for each spectral line
+     **********************************************************************/
+    
+    /* long block */
+
+    gfc->energy[0]  = (*wsamp_l)[0];
+    gfc->energy[0] *= gfc->energy[0];
+    
+    gfc->tot_ener[chn] = gfc->energy[0]; /* sum total energy at nearly no extra cost */
+    
+    for (j=BLKSIZE/2-1; j >= 0; --j)
+    {
+      FLOAT re = (*wsamp_l)[BLKSIZE/2-j];
+      FLOAT im = (*wsamp_l)[BLKSIZE/2+j];
+      gfc->energy[BLKSIZE/2-j] = (re * re + im * im) * (FLOAT)0.5;
+
+      if (BLKSIZE/2-j > 10)
+	gfc->tot_ener[chn] += gfc->energy[BLKSIZE/2-j];
+    }
+
+
+    /* short block */
+
+    for (b = 2; b >= 0; --b)
+    {
+      gfc->energy_s[b][0]  = (*wsamp_s)[b][0];
+      gfc->energy_s[b][0] *=  gfc->energy_s [b][0];
+      for (j=BLKSIZE_s/2-1; j >= 0; --j)
+      {
+        FLOAT re = (*wsamp_s)[b][BLKSIZE_s/2-j];
+        FLOAT im = (*wsamp_s)[b][BLKSIZE_s/2+j];
+        gfc->energy_s[b][BLKSIZE_s/2-j] = (re * re + im * im) * (FLOAT)0.5;
+      }
+    }
+
+
+    /* output data for analysis */
+
+    if (gfp->analysis) {
+      for (j=0; j<HBLKSIZE ; j++) {
+	gfc->pinfo->energy[gr_out][chn][j]=gfc->energy_save[chn][j];
+	gfc->energy_save[chn][j]=gfc->energy[j];
+      }
+    }
+    
+
+    /**********************************************************************
+     *    Calculate the energy and the tonality of each partition.
+     **********************************************************************/
+
+    for (b=0, j=0; b<gfc->npart_l_orig; b++)
+      {
+	FLOAT8 ebb,m,a;
+  
+	ebb = gfc->energy[j];
+	m = a = gfc->energy[j];
+	j++;
+  
+	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
+	  {
+	    FLOAT8 el = gfc->energy[j];
+	    ebb += gfc->energy[j];
+	    a += el;
+	    m = m < el ? el : m;
+	    j++;
+	  }
+	eb[b] = ebb;
+	max[b] = m;
+	avg[b] = a / gfc->numlines_l[b];
+      }
+  
+    j = 0;
+    for (b=0; b < gfc->npart_l_orig; b++ )
+      {
+	int c1,c2;
+	FLOAT8 m,a;
+	tonality2[b] = 0;
+	c1 = c2 = 0;
+	m = a = 0;
+	for(k=b-1;k<=b+1;k++)
+	  {
+	    if (k >= 0 && k < gfc->npart_l_orig) {
+	      c1++;
+	      c2 += gfc->numlines_l[k];
+	      a += avg[k];
+	      m = m < max[k] ? max[k] : m;
+	    }
+	  }
+ 
+	a /= c1;
+	tonality2[b] = a == 0 ? 0 : (m / a - 1)/(c2-1);
+      }
+
+    for (b=0; b < gfc->npart_l_orig; b++ )
+      {
+#if 0
+	static FLOAT8 tab[20] =
+	{  0,  1,  2,  2,  2,  2,  2,  6,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3};
+
+	static int init = 1;
+	if (init) {
+	  int j;
+	  for(j=0;j<20;j++) {
+	    tab[j] = pow(10.0,-tab[j]/10.0);
+	  }
+	  init = 0;
+	}
+#else
+	static FLOAT8 tab[20] = {
+	  1,0.79433,0.63096,0.63096,0.63096,0.63096,0.63096,0.25119,0.11749,0.11749,
+	  0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749
+	};
+#endif
+
+	int t = 20*tonality2[b];
+	if (t > 19) t = 19;
+	eb2[b] = eb[b] * tab[t];
+      }
+
+
+    /**********************************************************************
+     *      convolve the partitioned energy and unpredictability
+     *      with the spreading function, s3_l[b][k]
+     ******************************************************************** */
+
+    for ( b = 0;b < gfc->npart_l; b++ )
+      {
+	FLOAT8 ecb;
+
+	/****   convolve the partitioned energy with the spreading function   ****/
+
+	ecb = 0;
+
+#if 1
+	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
+	  {
+	    ecb = mask_add(ecb,gfc->s3_l[b][k] * eb2[k],k,k-b,gfc);
+	  }
+
+	ecb *= 0.158489319246111; // pow(10,-0.8)
+#endif
+
+#if 0
+	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
+	  {
+	    ecb += gfc->s3_l[k][b] * eb2[k];
+	  }
+
+	ecb *= 0.223872113856834; // pow(10,-0.65);
+#endif
+
+	/****   long block pre-echo control   ****/
+
+	/* dont use long block pre-echo control if previous granule was 
+	 * a short block.  This is to avoid the situation:   
+	 * frame0:  quiet (very low masking)  
+	 * frame1:  surge  (triggers short blocks)
+	 * frame2:  regular frame.  looks like pre-echo when compared to 
+	 *          frame0, but all pre-echo was in frame1.
+	 */
+
+	/* chn=0,1   L and R channels
+	   chn=2,3   S and M channels.  
+	*/
+
+#define NS_INTERP(x,y,r) (pow((x),(r))*pow((y),1-(r)))
+
+	if (gfc->blocktype_old[chn>1 ? chn-2 : chn] == SHORT_TYPE )
+	  thr[b] = ecb; /* Min(ecb, rpelev*gfc->nb_1[chn][b]); */
+	else
+	  thr[b] = NS_INTERP(Min(ecb, Min(rpelev*gfc->nb_1[chn][b],rpelev2*gfc->nb_2[chn][b])),ecb,pcfact);
+
+	gfc->nb_2[chn][b] = gfc->nb_1[chn][b];
+	gfc->nb_1[chn][b] = ecb;
+      }
+
+
+    /*************************************************************** 
+     * determine the block type (window type)
+     ***************************************************************/
+
+    {
+      static int count=0;
+      FLOAT en_subshort[12];
+      FLOAT attack_intensity[12];
+      int ns_uselongblock = 1;
+
+      /* calculate energies of each sub-shortblocks */
+
+      k = 0;
+      for(i=0;i<12;i++)
+	{
+	  en_subshort[i] = 0;
+	  for(j=0;j<576/9;j++)
+	    {
+	      en_subshort[i] += ns_hpfsmpl[chn][k] * ns_hpfsmpl[chn][k];
+	      k++;
+	    }
+
+	  if (en_subshort[i] < 100) en_subshort[i] = 100;
+	}
+
+      /* compare energies between sub-shortblocks */
+
+#define NSATTACKTHRE 150
+#define NSATTACKTHRE_S 300
+
+      for(i=0;i<2;i++) {
+	attack_intensity[i] = en_subshort[i] / gfc->nsPsy.last_en_subshort[chn][7+i];
+      }
+
+      for(;i<12;i++) {
+	attack_intensity[i] = en_subshort[i] / en_subshort[i-2];
+      }
+
+      ns_attacks[0] = ns_attacks[1] = ns_attacks[2] = ns_attacks[3] = 0;
+
+      for(i=0;i<12;i++)
+	{
+	  if (!ns_attacks[i/3] && attack_intensity[i] > (chn == 3 ? NSATTACKTHRE_S : NSATTACKTHRE)) ns_attacks[i/3] = (i % 3)+1;
+	}
+
+      if (ns_attacks[0] && gfc->nsPsy.last_attacks[chn][2]) ns_attacks[0] = 0;
+      if (ns_attacks[1] && ns_attacks[0]) ns_attacks[1] = 0;
+      if (ns_attacks[2] && ns_attacks[1]) ns_attacks[2] = 0;
+      if (ns_attacks[3] && ns_attacks[2]) ns_attacks[3] = 0;
+
+      if (gfc->nsPsy.last_attacks[chn][2] == 3 ||
+	  ns_attacks[0] || ns_attacks[1] || ns_attacks[2] || ns_attacks[3]) ns_uselongblock = 0;
+
+      if (chn < 4) count++;
+
+      for(i=0;i<9;i++)
+	{
+	  gfc->nsPsy.last_en_subshort[chn][i] = en_subshort[i];
+	  gfc->nsPsy.last_attack_intensity[chn][i] = attack_intensity[i];
+	}
+
+      if (gfp->no_short_blocks) {
+	uselongblock[chn] = 1;
+      } else {
+	if (chn < 2) {
+	  uselongblock[chn] = ns_uselongblock;
+	} else {
+	  if (ns_uselongblock == 0) uselongblock[0] = uselongblock[1] = 0;
+	}
+      }
+    }
+
+    if (gfp->analysis) {
+      FLOAT mn,mx,ma=0,mb=0,mc=0;
+
+      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
+      {
+        ma += gfc->energy_s[0][j];
+        mb += gfc->energy_s[1][j];
+        mc += gfc->energy_s[2][j];
+      }
+      mn = Min(ma,mb);
+      mn = Min(mn,mc);
+      mx = Max(ma,mb);
+      mx = Max(mx,mc);
+
+      gfc->pinfo->ers[gr_out][chn]=gfc->ers_save[chn];
+      gfc->ers_save[chn]=(mx/(1e-12+mn));
+    }
+
+
+    /*************************************************************** 
+     * compute masking thresholds for long blocks
+     ***************************************************************/
+
+    for ( sb = 0; sb < NBPSY_l; sb++ )
+      {
+	FLOAT8 enn = gfc->w1_l[sb] * eb[gfc->bu_l[sb]] + gfc->w2_l[sb] * eb[gfc->bo_l[sb]];
+	FLOAT8 thmm = gfc->w1_l[sb] *thr[gfc->bu_l[sb]] + gfc->w2_l[sb] * thr[gfc->bo_l[sb]];
+
+        for ( b = gfc->bu_l[sb]+1; b < gfc->bo_l[sb]; b++ )
+          {
+            enn  += eb[b];
+            thmm += thr[b];
+          }
+
+	gfc->en [chn].l[sb] = enn;
+	gfc->thm[chn].l[sb] = thmm;
+      }
+    
+
+    /*************************************************************** 
+     * compute masking thresholds for short blocks
+     ***************************************************************/
+
+    for ( sblock = 0; sblock < 3; sblock++ )
+      {
+	j = 0;
+	for ( b = 0; b < gfc->npart_s_orig; b++ )
+	  {
+	    FLOAT ecb = gfc->energy_s[sblock][j++];
+	    for (i = 1 ; i<gfc->numlines_s[b]; ++i)
+	      {
+		ecb += gfc->energy_s[sblock][j++];
+	      }
+	    eb[b] = ecb;
+	  }
+
+	for ( b = 0; b < gfc->npart_s; b++ )
+	  {
+	    FLOAT8 ecb = 0;
+	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ )
+	      {
+		ecb += gfc->s3_s[b][k] * eb[k];
+	      }
+	    thr[b] = Max (1e-6, ecb);
+	  }
+
+	for ( sb = 0; sb < NBPSY_s; sb++ )
+	  {
+            FLOAT8 enn  = gfc->w1_s[sb] * eb[gfc->bu_s[sb]] + gfc->w2_s[sb] * eb[gfc->bo_s[sb]];
+	    FLOAT8 thmm = gfc->w1_s[sb] *thr[gfc->bu_s[sb]] + gfc->w2_s[sb] * thr[gfc->bo_s[sb]];
+	    
+            for ( b = gfc->bu_s[sb]+1; b < gfc->bo_s[sb]; b++ )
+	      {
+		enn  += eb[b];
+		thmm += thr[b];
+	      }
+
+	    /****   short block pre-echo control   ****/
+
+#define NS_PREECHO_ATT0 0.8
+#define NS_PREECHO_ATT1 0.6
+#define NS_PREECHO_ATT2 0.3
+
+	    thmm *= NS_PREECHO_ATT0;
+
+	    if (ns_attacks[sblock] >= 2) {
+	      if (sblock != 0) {
+		double p = NS_INTERP(gfc->thm[chn].s[sb][sblock-1],thmm,NS_PREECHO_ATT1*pcfact);
+		thmm = Min(thmm,p);
+	      } else {
+		double p = NS_INTERP(gfc->nsPsy.last_thm[chn][sb][2],thmm,NS_PREECHO_ATT1*pcfact);
+		thmm = Min(thmm,p);
+	      }
+	    } else if (ns_attacks[sblock+1] == 1) {
+	      if (sblock != 0) {
+		double p = NS_INTERP(gfc->thm[chn].s[sb][sblock-1],thmm,NS_PREECHO_ATT1*pcfact);
+		thmm = Min(thmm,p);
+	      } else {
+		double p = NS_INTERP(gfc->nsPsy.last_thm[chn][sb][2],thmm,NS_PREECHO_ATT1*pcfact);
+		thmm = Min(thmm,p);
+	      }
+	    }
+
+	    if (ns_attacks[sblock] == 1) {
+	      double p = sblock == 0 ? gfc->nsPsy.last_thm[chn][sb][2] : gfc->thm[chn].s[sb][sblock-1];
+	      p = NS_INTERP(p,thmm,NS_PREECHO_ATT2*pcfact);
+	      thmm = Min(thmm,p);
+	    } else if ((sblock != 0 && ns_attacks[sblock-1] == 3) ||
+		       (sblock == 0 && gfc->nsPsy.last_attacks[chn][2] == 3)) {
+	      double p = sblock <= 1 ? gfc->nsPsy.last_thm[chn][sb][sblock+1] : gfc->thm[chn].s[sb][0];
+	      p = NS_INTERP(p,thmm,NS_PREECHO_ATT2*pcfact);
+	      thmm = Min(thmm,p);
+	    }
+
+	    gfc->en [chn].s[sb][sblock] = enn;
+	    gfc->thm[chn].s[sb][sblock] = thmm;
+	  }
+      }
+
+
+    /*************************************************************** 
+     * save some values for analysis of the next granule
+     ***************************************************************/
+
+    for ( sblock = 0; sblock < 3; sblock++ )
+      {
+	for ( sb = 0; sb < NBPSY_s; sb++ )
+	  {
+	    gfc->nsPsy.last_thm[chn][sb][sblock] = gfc->thm[chn].s[sb][sblock];
+	  }
+      }
+
+    for(i=0;i<3;i++)
+      gfc->nsPsy.last_attacks[chn][i] = ns_attacks[i];
+
+  } /* end loop over chn */
+
+
+
+  /*************************************************************** 
+   * compute M/S thresholds
+   ***************************************************************/
+
+  /* from Johnston & Ferreira 1992 ICASSP paper */
+
+  if ( numchn==4 /* mid/side and r/l */) {
+    FLOAT8 rside,rmid,mld;
+    int chmid=2,chside=3; 
+    
+    for ( sb = 0; sb < NBPSY_l; sb++ ) {
+      /* use this fix if L & R masking differs by 2db or less */
+      /* if db = 10*log10(x2/x1) < 2 */
+      /* if (x2 < 1.58*x1) { */
+      if (gfc->thm[0].l[sb] <= 1.58*gfc->thm[1].l[sb]
+	  && gfc->thm[1].l[sb] <= 1.58*gfc->thm[0].l[sb]) {
+
+	mld = gfc->mld_l[sb]*gfc->en[chside].l[sb];
+	rmid = Max(gfc->thm[chmid].l[sb], Min(gfc->thm[chside].l[sb],mld));
+
+	mld = gfc->mld_l[sb]*gfc->en[chmid].l[sb];
+	rside = Max(gfc->thm[chside].l[sb],Min(gfc->thm[chmid].l[sb],mld));
+
+	gfc->thm[chmid].l[sb]=rmid;
+	gfc->thm[chside].l[sb]=rside;
+      }
+    }
+    for ( sb = 0; sb < NBPSY_s; sb++ ) {
+      for ( sblock = 0; sblock < 3; sblock++ ) {
+	if (gfc->thm[0].s[sb][sblock] <= 1.58*gfc->thm[1].s[sb][sblock]
+	    && gfc->thm[1].s[sb][sblock] <= 1.58*gfc->thm[0].s[sb][sblock]) {
+
+	  mld = gfc->mld_s[sb]*gfc->en[chside].s[sb][sblock];
+	  rmid = Max(gfc->thm[chmid].s[sb][sblock],Min(gfc->thm[chside].s[sb][sblock],mld));
+
+	  mld = gfc->mld_s[sb]*gfc->en[chmid].s[sb][sblock];
+	  rside = Max(gfc->thm[chside].s[sb][sblock],Min(gfc->thm[chmid].s[sb][sblock],mld));
+
+	  gfc->thm[chmid].s[sb][sblock]=rmid;
+	  gfc->thm[chside].s[sb][sblock]=rside;
+	}
+      }
+    }
+  }
+
+
+  /* Naoki Shibata 2000 */
+
+#define NS_MSFIX 3.5
+  
+  if (numchn == 4) {
+    FLOAT msfix = NS_MSFIX;
+    if (gfc->nsPsy.safejoint) msfix = 1;
+
+    for ( sb = 0; sb < NBPSY_l; sb++ )
+      {
+	FLOAT8 thmL,thmR,thmM,thmS,ath;
+	ath  = (gfc->ATH->cb[(gfc->bu_l[sb] + gfc->bo_l[sb])/2])*pow(10,-gfp->ATHlower/10.0);
+	thmL = Max(gfc->thm[0].l[sb],ath);
+	thmR = Max(gfc->thm[1].l[sb],ath);
+	thmM = Max(gfc->thm[2].l[sb],ath);
+	thmS = Max(gfc->thm[3].l[sb],ath);
+
+	if (thmL*msfix < (thmM+thmS)/2) {
+	  FLOAT8 f = thmL*msfix / ((thmM+thmS)/2);
+	  thmM *= f;
+	  thmS *= f;
+	}
+	if (thmR*msfix < (thmM+thmS)/2) {
+	  FLOAT8 f = thmR*msfix / ((thmM+thmS)/2);
+	  thmM *= f;
+	  thmS *= f;
+	}
+
+	gfc->thm[2].l[sb] = Min(thmM,gfc->thm[2].l[sb]);
+	gfc->thm[3].l[sb] = Min(thmS,gfc->thm[3].l[sb]);
+      }
+
+    for ( sb = 0; sb < NBPSY_s; sb++ ) {
+      for ( sblock = 0; sblock < 3; sblock++ ) {
+	FLOAT8 thmL,thmR,thmM,thmS,ath;
+	ath  = (gfc->ATH->cb[(gfc->bu_s[sb] + gfc->bo_s[sb])/2])*pow(10,-gfp->ATHlower/10.0);
+	thmL = Max(gfc->thm[0].s[sb][sblock],ath);
+	thmR = Max(gfc->thm[1].s[sb][sblock],ath);
+	thmM = Max(gfc->thm[2].s[sb][sblock],ath);
+	thmS = Max(gfc->thm[3].s[sb][sblock],ath);
+
+	if (thmL*msfix < (thmM+thmS)/2) {
+	  FLOAT8 f = thmL*msfix / ((thmM+thmS)/2);
+	  thmM *= f;
+	  thmS *= f;
+	}
+	if (thmR*msfix < (thmM+thmS)/2) {
+	  FLOAT8 f = thmR*msfix / ((thmM+thmS)/2);
+	  thmM *= f;
+	  thmS *= f;
+	}
+
+	gfc->thm[2].s[sb][sblock] = Min(gfc->thm[2].s[sb][sblock],thmM);
+	gfc->thm[3].s[sb][sblock] = Min(gfc->thm[3].s[sb][sblock],thmS);
+      }
+    }
+  }
+
+  ms_ratio_l = 0;
+  ms_ratio_s = 0;
+
+
+  /*************************************************************** 
+   * compute estimation of the amount of bit used in the granule
+   ***************************************************************/
+
+  for(chn=0;chn<numchn;chn++)
+    {
+      {
+	static FLOAT8 regcoef[] = {
+	  1124.23,10.0583,10.7484,7.29006,16.2714,6.2345,4.09743,3.05468,3.33196,2.54688,
+	  3.68168,5.83109,2.93817,-8.03277,-10.8458,8.48777,9.13182,2.05212,8.6674,50.3937,73.267,97.5664,0
+	};
+
+	FLOAT8 msum = regcoef[0]/4;
+	int sb;
+
+	for ( sb = 0; sb < NBPSY_l; sb++ )
+	  {
+	    FLOAT8 t;
+	      
+	    if (gfc->thm[chn].l[sb]*gfc->masking_lower != 0 &&
+		gfc->en[chn].l[sb]/(gfc->thm[chn].l[sb]*gfc->masking_lower) > 1)
+	      t = log(gfc->en[chn].l[sb]/(gfc->thm[chn].l[sb]*gfc->masking_lower));
+	    else
+	      t = 0;
+	    msum += regcoef[sb+1] * t;
+	  }
+
+	gfc->nsPsy.pe_l[chn] = msum;
+      }
+
+      {
+	static FLOAT8 regcoef[] = {
+	  1236.28,0,0,0,0.434542,25.0738,0,0,0,19.5442,19.7486,60,100,0
+	};
+
+	FLOAT8 msum = regcoef[0]/4;
+	int sb,sblock;
+
+	for(sblock=0;sblock<3;sblock++)
+	  {
+	    for ( sb = 0; sb < NBPSY_s; sb++ )
+	      {
+		FLOAT8 t;
+	      
+		if (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower != 0 &&
+		    gfc->en[chn].s[sb][sblock] / (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower) > 1)
+		  t = log(gfc->en[chn].s[sb][sblock] / (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower));
+		else
+		  t = 0;
+		msum += regcoef[sb+1] * t;
+	      }
+	  }
+
+	gfc->nsPsy.pe_s[chn] = msum;
+      }
+
+      //gfc->pe[chn] -= 150;
+    }
+
+  /*************************************************************** 
+   * determine final block type
+   ***************************************************************/
+
+  for (chn=0; chn<gfc->channels_out; chn++) {
+    blocktype[chn] = NORM_TYPE;
+  }
+
+  if (gfc->channels_out==2) {
+    if (!gfp->allow_diff_short || gfp->mode==JOINT_STEREO) {
+      /* force both channels to use the same block type */
+      /* this is necessary if the frame is to be encoded in ms_stereo.  */
+      /* But even without ms_stereo, FhG  does this */
+      int bothlong= (uselongblock[0] && uselongblock[1]);
+      if (!bothlong) {
+	uselongblock[0]=0;
+	uselongblock[1]=0;
+      }
+    }
+  }
+
+  /* update the blocktype of the previous granule, since it depends on what
+   * happend in this granule */
+  for (chn=0; chn<gfc->channels_out; chn++) {
+    if ( uselongblock[chn])
+      {				/* no attack : use long blocks */
+	assert( gfc->blocktype_old[chn] != START_TYPE );
+	switch( gfc->blocktype_old[chn] ) 
+	  {
+	  case NORM_TYPE:
+	  case STOP_TYPE:
+	    blocktype[chn] = NORM_TYPE;
+	    break;
+	  case SHORT_TYPE:
+	    blocktype[chn] = STOP_TYPE; 
+	    break;
+	  }
+      } else   {
+	/* attack : use short blocks */
+	blocktype[chn] = SHORT_TYPE;
+	if ( gfc->blocktype_old[chn] == NORM_TYPE ) {
+	  gfc->blocktype_old[chn] = START_TYPE;
+	}
+	if ( gfc->blocktype_old[chn] == STOP_TYPE ) {
+	  gfc->blocktype_old[chn] = SHORT_TYPE ;
+	}
+      }
+    
+    blocktype_d[chn] = gfc->blocktype_old[chn];  /* value returned to calling program */
+    gfc->blocktype_old[chn] = blocktype[chn];    /* save for next call to l3psy_anal */
+  }
+  
+  /*********************************************************************
+   * compute the value of PE to return (one granule delay)
+   *********************************************************************/
+  for(chn=0;chn<numchn;chn++)
+    {
+      if (chn < 2) {
+	if (blocktype_d[chn] == SHORT_TYPE) {
+	  percep_entropy[chn] = pe_s[chn];
+	} else {
+	  percep_entropy[chn] = pe_l[chn];
+	}
+	if (gfp->analysis) gfc->pinfo->pe[gr_out][chn] = percep_entropy[chn];
+      } else {
+	if (blocktype_d[0] == SHORT_TYPE) {
+	  percep_MS_entropy[chn-2] = pe_s[chn];
+	} else {
+	  percep_MS_entropy[chn-2] = pe_l[chn];
+	}
+	if (gfp->analysis) gfc->pinfo->pe[gr_out][chn] = percep_MS_entropy[chn-2];
+      }
+    }
+
+
+  return 0;
+}
+
+
+
+
+
+/* 
+ *   The spreading function.  Values returned in units of energy
+ */
+FLOAT8 s3_func(FLOAT8 bark) {
+    
+    FLOAT8 tempx,x,tempy,temp;
+    tempx = bark;
+    if (tempx>=0) tempx *= 3;
+    else tempx *=1.5; 
+    
+    if(tempx>=0.5 && tempx<=2.5)
+	{
+	    temp = tempx - 0.5;
+	    x = 8.0 * (temp*temp - 2.0 * temp);
+	}
+    else x = 0.0;
+    tempx += 0.474;
+    tempy = 15.811389 + 7.5*tempx - 17.5*sqrt(1.0+tempx*tempx);
+    
+    if (tempy <= -60.0) return  0.0;
+
+    tempx = exp( (x + tempy)*LN_TO_LOG10 ); 
+
+    /* Normalization.  The spreading function should be normalized so that:
+         +inf
+           /
+           |  s3 [ bark ]  d(bark)   =  1
+           /
+         -inf
+    */
+    tempx /= .6609193;
+    return tempx;
+    
+}
+
+
+
+
+
+
+
+
+int L3para_read(lame_global_flags * gfp, FLOAT8 sfreq, int *numlines_l,int *numlines_s, 
+FLOAT8 *minval,
+FLOAT8 s3_l[CBANDS][CBANDS], FLOAT8 s3_s[CBANDS][CBANDS],
+FLOAT8 *SNR, 
+int *bu_l, int *bo_l, FLOAT8 *w1_l, FLOAT8 *w2_l, 
+int *bu_s, int *bo_s, FLOAT8 *w1_s, FLOAT8 *w2_s,
+int *npart_l_orig,int *npart_l,int *npart_s_orig,int *npart_s)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+
+
+  FLOAT8 freq_tp;
+  FLOAT8 bval_l[CBANDS], bval_s[CBANDS];
+  FLOAT8 bval_l_width[CBANDS], bval_s_width[CBANDS];
+  int   cbmax=0, cbmax_tp;
+  int  sbmax ;
+  int  i,j;
+  int freq_scale=1;
+  int partition[HBLKSIZE]; 
+  int loop, k2;
+
+
+
+  /* compute numlines, the number of spectral lines in each partition band */
+  /* each partition band should be about DELBARK wide. */
+  j=0;
+  for(i=0;i<CBANDS;i++)
+    {
+      FLOAT8 ji, bark1,bark2;
+      int k,j2;
+
+      j2 = j;
+      j2 = Min(j2,BLKSIZE/2);
+      
+      do {
+	/* find smallest j2 >= j so that  (bark - bark_l[i-1]) < DELBARK */
+	ji = j;
+	bark1 = freq2bark(sfreq*ji/BLKSIZE);
+	
+	++j2;
+	ji = j2;
+	bark2  = freq2bark(sfreq*ji/BLKSIZE);
+      } while ((bark2 - bark1) < DELBARK  && j2<=BLKSIZE/2);
+
+      for (k=j; k<j2; ++k)
+	partition[k]=i;
+      numlines_l[i]=(j2-j);
+      j = j2;
+      if (j > BLKSIZE/2) break;
+    }
+  *npart_l_orig = i+1;
+  assert(*npart_l_orig <= CBANDS);
+
+  /* compute which partition bands are in which scalefactor bands */
+  { int i1,i2,sfb,start,end;
+    FLOAT8 freq1,freq2;
+    for ( sfb = 0; sfb < SBMAX_l; sfb++ ) {
+      start = gfc->scalefac_band.l[ sfb ];
+      end   = gfc->scalefac_band.l[ sfb+1 ];
+      freq1 = sfreq*(start-.5)/(2*576);
+      freq2 = sfreq*(end-1+.5)/(2*576);
+		     
+      i1 = floor(.5 + BLKSIZE*freq1/sfreq);
+      if (i1<0) i1=0;
+      i2 = floor(.5 + BLKSIZE*freq2/sfreq);
+      if (i2>BLKSIZE/2) i2=BLKSIZE/2;
+
+      //      DEBUGF(gfc,"longblock:  old: (%i,%i)  new: (%i,%i) %i %i \n",bu_l[sfb],bo_l[sfb],partition[i1],partition[i2],i1,i2);
+
+      w1_l[sfb]=.5;
+      w2_l[sfb]=.5;
+      bu_l[sfb]=partition[i1];
+      bo_l[sfb]=partition[i2];
+
+    }
+  }
+
+
+  /* compute bark value and ATH of each critical band */
+  j = 0;
+  for ( i = 0; i < *npart_l_orig; i++ ) {
+      int     k;
+      FLOAT8  bark1,bark2;
+      /* FLOAT8 mval,freq; */
+
+      // Calculating the medium bark scaled frequency of the spectral lines
+      // from j ... j + numlines[i]-1  (=spectral lines in parition band i)
+
+      k         = numlines_l[i] - 1;
+      bark1 = freq2bark(sfreq*(j+0)/BLKSIZE);
+      bark2 = freq2bark(sfreq*(j+k)/BLKSIZE);
+      bval_l[i] = .5*(bark1+bark2);
+
+      bark1 = freq2bark(sfreq*(j+0-.5)/BLKSIZE);
+      bark2 = freq2bark(sfreq*(j+k+.5)/BLKSIZE);
+      bval_l_width[i] = bark2-bark1;
+
+      gfc->ATH->cb [i] = 1.e37; // preinit for minimum search
+      for (k=0; k < numlines_l[i]; k++, j++) {
+	FLOAT8  freq = sfreq*j/(1000.0*BLKSIZE);
+	FLOAT8  level;
+	assert( freq <= 24 );              // or only '<'
+	//	freq = Min(.1,freq);       // ATH below 100 Hz constant, not further climbing
+	level  = ATHformula (freq*1000, gfp) - 20;   // scale to FFT units; returned value is in dB
+	level  = pow ( 10., 0.1*level );   // convert from dB -> energy
+	level *= numlines_l [i];
+	if ( level < gfc->ATH->cb [i] )
+	    gfc->ATH->cb [i] = level;
+      }
+
+
+    }
+
+  /* MINVAL.  For low freq, the strength of the masking is limited by minval
+   * this is an ISO MPEG1 thing, dont know if it is really needed */
+  for(i=0;i<*npart_l_orig;i++){
+    double x = (-20+bval_l[i]*20.0/10.0);
+    if (bval_l[i]>10) x = 0;
+    minval[i]=pow(10.0,x/10);
+  }
+
+
+
+
+
+
+
+  /************************************************************************/
+  /* SHORT BLOCKS */
+  /************************************************************************/
+
+  /* compute numlines */
+  j=0;
+  for(i=0;i<CBANDS;i++)
+    {
+      FLOAT8 ji, bark1,bark2;
+      int k,j2;
+
+      j2 = j;
+      j2 = Min(j2,BLKSIZE_s/2);
+      
+      do {
+	/* find smallest j2 >= j so that  (bark - bark_s[i-1]) < DELBARK */
+	ji = j;
+	bark1  = freq2bark(sfreq*ji/BLKSIZE_s);
+	
+	++j2;
+	ji = j2;
+	bark2  = freq2bark(sfreq*ji/BLKSIZE_s);
+
+      } while ((bark2 - bark1) < DELBARK  && j2<=BLKSIZE_s/2);
+
+      for (k=j; k<j2; ++k)
+	partition[k]=i;
+      numlines_s[i]=(j2-j);
+      j = j2;
+      if (j > BLKSIZE_s/2) break;
+    }
+  *npart_s_orig = i+1;
+  assert(*npart_s_orig <= CBANDS);
+
+  /* compute which partition bands are in which scalefactor bands */
+  { int i1,i2,sfb,start,end;
+    FLOAT8 freq1,freq2;
+    for ( sfb = 0; sfb < SBMAX_s; sfb++ ) {
+      start = gfc->scalefac_band.s[ sfb ];
+      end   = gfc->scalefac_band.s[ sfb+1 ];
+      freq1 = sfreq*(start-.5)/(2*192);
+      freq2 = sfreq*(end-1+.5)/(2*192);
+		     
+      i1 = floor(.5 + BLKSIZE_s*freq1/sfreq);
+      if (i1<0) i1=0;
+      i2 = floor(.5 + BLKSIZE_s*freq2/sfreq);
+      if (i2>BLKSIZE_s/2) i2=BLKSIZE_s/2;
+
+      //DEBUGF(gfc,"shortblock: old: (%i,%i)  new: (%i,%i) %i %i \n",bu_s[sfb],bo_s[sfb], partition[i1],partition[i2],i1,i2);
+
+      w1_s[sfb]=.5;
+      w2_s[sfb]=.5;
+      bu_s[sfb]=partition[i1];
+      bo_s[sfb]=partition[i2];
+
+    }
+  }
+
+
+
+
+
+  /* compute bark values of each critical band */
+  j = 0;
+  for(i=0;i<*npart_s_orig;i++)
+    {
+      int     k;
+      FLOAT8  bark1,bark2,snr;
+      k    = numlines_s[i] - 1;
+
+      bark1 = freq2bark (sfreq*(j+0)/BLKSIZE_s);
+      bark2 = freq2bark (sfreq*(j+k)/BLKSIZE_s); 
+      bval_s[i] = .5*(bark1+bark2);
+
+      bark1 = freq2bark (sfreq*(j+0-.5)/BLKSIZE_s);
+      bark2 = freq2bark (sfreq*(j+k+.5)/BLKSIZE_s); 
+      bval_s_width[i] = bark2-bark1;
+      j        += k+1;
+      
+      /* SNR formula */
+      if (bval_s[i]<13)
+          snr=-8.25;
+      else 
+	  snr  = -4.5 * (bval_s[i]-13)/(24.0-13.0)  + 
+	      -8.25*(bval_s[i]-24)/(13.0-24.0);
+
+      SNR[i]=pow(10.0,snr/10.0);
+    }
+
+
+
+
+
+
+  /************************************************************************
+   * Now compute the spreading function, s[j][i], the value of the spread-*
+   * ing function, centered at band j, for band i, store for later use    *
+   ************************************************************************/
+  /* i.e.: sum over j to spread into signal barkval=i  
+     NOTE: i and j are used opposite as in the ISO docs */
+  for(i=0;i<*npart_l_orig;i++)    {
+      for(j=0;j<*npart_l_orig;j++) 	{
+  	  s3_l[i][j]=s3_func(bval_l[i]-bval_l[j])*bval_l_width[j];
+      }
+  }
+  for(i=0;i<*npart_s_orig;i++)     {
+      for(j=0;j<*npart_s_orig;j++) 	{
+  	  s3_s[i][j]=s3_func(bval_s[i]-bval_s[j])*bval_s_width[j];
+      }
+  }
+  
+
+
+
+  /* compute: */
+  /* npart_l_orig   = number of partition bands before convolution */
+  /* npart_l  = number of partition bands after convolution */
+  
+  *npart_l=bo_l[NBPSY_l-1]+1;
+  *npart_s=bo_s[NBPSY_s-1]+1;
+  
+  assert(*npart_l <= *npart_l_orig);
+  assert(*npart_s <= *npart_s_orig);
+
+
+    /* setup stereo demasking thresholds */
+    /* formula reverse enginerred from plot in paper */
+    for ( i = 0; i < NBPSY_s; i++ ) {
+      FLOAT8 arg,mld;
+      arg = freq2bark(sfreq*gfc->scalefac_band.s[i]/(2*192));
+      arg = (Min(arg, 15.5)/15.5);
+
+      mld = 1.25*(1-cos(PI*arg))-2.5;
+      gfc->mld_s[i] = pow(10.0,mld);
+    }
+    for ( i = 0; i < NBPSY_l; i++ ) {
+      FLOAT8 arg,mld;
+      arg = freq2bark(sfreq*gfc->scalefac_band.l[i]/(2*576));
+      arg = (Min(arg, 15.5)/15.5);
+
+      mld = 1.25*(1-cos(PI*arg))-2.5;
+      gfc->mld_l[i] = pow(10.0,mld);
+    }
+
+#define temporalmask_sustain_sec 0.01
+
+    /* setup temporal masking */
+    gfc->decay = exp(-1.0*LOG10/(temporalmask_sustain_sec*sfreq/192.0));
+
+    return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+int psymodel_init(lame_global_flags *gfp)
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int i,j,b,sb,k,samplerate;
+    FLOAT cwlimit;
+
+    samplerate = gfp->out_samplerate;
+    gfc->ms_ener_ratio_old=.25;
+    gfc->blocktype_old[0]=STOP_TYPE;
+    gfc->blocktype_old[1]=STOP_TYPE;
+    gfc->blocktype_old[0]=SHORT_TYPE;
+    gfc->blocktype_old[1]=SHORT_TYPE;
+
+    for (i=0; i<4; ++i) {
+      for (j=0; j<CBANDS; ++j) {
+	gfc->nb_1[i][j]=1e20;
+	gfc->nb_2[i][j]=1e20;
+      }
+      for ( sb = 0; sb < NBPSY_l; sb++ ) {
+	gfc->en[i].l[sb] = 1e20;
+	gfc->thm[i].l[sb] = 1e20;
+      }
+      for (j=0; j<3; ++j) {
+	for ( sb = 0; sb < NBPSY_s; sb++ ) {
+	  gfc->en[i].s[sb][j] = 1e20;
+	  gfc->thm[i].s[sb][j] = 1e20;
+	}
+      }
+    }
+    for (i=0; i<4; ++i) {
+      for (j=0; j<3; ++j) {
+	for ( sb = 0; sb < NBPSY_s; sb++ ) {
+	  gfc->nsPsy.last_thm[i][sb][j] = 1e20;
+	}
+      }
+    }
+    for(i=0;i<4;i++) {
+      for(j=0;j<9;j++)
+	gfc->nsPsy.last_en_subshort[i][j] = 100;
+      for(j=0;j<3;j++)
+	gfc->nsPsy.last_attacks[i][j] = 0;
+      gfc->nsPsy.pe_l[i] = gfc->nsPsy.pe_s[i] = 0;
+    }
+
+
+
+    
+    /*  gfp->cwlimit = sfreq*j/1024.0;  */
+    gfc->cw_lower_index=6;
+    if (gfp->cwlimit>0) 
+      cwlimit=gfp->cwlimit;
+    else
+      cwlimit=(FLOAT)8871.7;
+    gfc->cw_upper_index = cwlimit*1024.0/gfp->out_samplerate;
+    gfc->cw_upper_index=Min(HBLKSIZE-4,gfc->cw_upper_index);      /* j+3 < HBLKSIZE-1 */
+    gfc->cw_upper_index=Max(6,gfc->cw_upper_index);
+
+    for ( j = 0; j < HBLKSIZE; j++ )
+      gfc->cw[j] = 0.4f;
+    
+    
+
+    i=L3para_read( gfp,(FLOAT8) samplerate,gfc->numlines_l,gfc->numlines_s,
+          gfc->minval,gfc->s3_l,gfc->s3_s,gfc->SNR_s,gfc->bu_l,
+          gfc->bo_l,gfc->w1_l,gfc->w2_l, gfc->bu_s,gfc->bo_s,
+          gfc->w1_s,gfc->w2_s,&gfc->npart_l_orig,&gfc->npart_l,
+          &gfc->npart_s_orig,&gfc->npart_s );
+    if (i!=0) return -1;
+    
+
+
+    /* npart_l_orig   = number of partition bands before convolution */
+    /* npart_l  = number of partition bands after convolution */
+    
+    for (i=0; i<gfc->npart_l; i++) {
+      for (j = 0; j < gfc->npart_l_orig; j++) {
+	if (gfc->s3_l[i][j] != 0.0)
+	  break;
+      }
+      gfc->s3ind[i][0] = j;
+      
+      for (j = gfc->npart_l_orig - 1; j > 0; j--) {
+	if (gfc->s3_l[i][j] != 0.0)
+	  break;
+      }
+      gfc->s3ind[i][1] = j;
+    }
+
+
+    for (i=0; i<gfc->npart_s; i++) {
+      for (j = 0; j < gfc->npart_s_orig; j++) {
+	if (gfc->s3_s[i][j] != 0.0)
+	  break;
+      }
+      gfc->s3ind_s[i][0] = j;
+      
+      for (j = gfc->npart_s_orig - 1; j > 0; j--) {
+	if (gfc->s3_s[i][j] != 0.0)
+	  break;
+      }
+      gfc->s3ind_s[i][1] = j;
+    }
+    
+    
+    /*  
+      #include "debugscalefac.c"
+    */
+    
+
+
+    if (gfc->nsPsy.use) {
+	/* long block spreading function normalization */
+	for ( b = 0;b < gfc->npart_l; b++ ) {
+	    for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ ) {
+		// spreading function has been properly normalized by
+		// multiplying by DELBARK/.6609193 = .515.  
+		// It looks like Naoki was
+                // way ahead of me and added this factor here!
+		// it is no longer needed.
+		//gfc->s3_l[b][k] *= 0.5;
+	    }
+	}
+	/* short block spreading function normalization */
+	// no longer needs to be normalized, but nspsytune wants 
+	// SNR_s applied here istead of later to save CPU cycles
+	for ( b = 0;b < gfc->npart_s; b++ ) {
+	    FLOAT8 norm=0;
+	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
+		norm += gfc->s3_s[b][k];
+	    }
+	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
+		gfc->s3_s[b][k] *= gfc->SNR_s[b] /* / norm */;
+	    }
+	}
+    }
+
+
+
+    if (gfc->nsPsy.use) {
+#if 1
+	/* spread only from npart_l bands.  Normally, we use the spreading
+	 * function to convolve from npart_l_orig down to npart_l bands 
+	 */
+	for(b=0;b<gfc->npart_l;b++)
+	    if (gfc->s3ind[b][1] > gfc->npart_l-1) gfc->s3ind[b][1] = gfc->npart_l-1;
+#endif
+    }
+
+    return 0;
+}
+
+
+
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/psymodel.h
@@ -1,0 +1,49 @@
+/*
+ *	psymodel.h
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_PSYMODEL_H
+#define LAME_PSYMODEL_H
+
+#include "l3side.h"
+
+int L3psycho_anal( lame_global_flags *gfc,
+                    const sample_t *buffer[2], int gr, 
+		    FLOAT8 *ms_ratio, 
+		    FLOAT8 *ms_ratio_next, 
+		    III_psy_ratio ratio[2][2],
+		    III_psy_ratio MS_ratio[2][2],
+		   FLOAT8 pe[2], FLOAT8 pe_MS[2], FLOAT8 ener[2],
+                    int blocktype_d[2]); 
+
+int L3psycho_anal_ns( lame_global_flags *gfc,
+		      const sample_t *buffer[2], int gr, 
+		      FLOAT8 *ms_ratio, 
+		      FLOAT8 *ms_ratio_next, 
+		      III_psy_ratio ratio[2][2],
+		      III_psy_ratio MS_ratio[2][2],
+		      FLOAT8 pe[2], FLOAT8 pe_MS[2], FLOAT8 ener[2],
+		      int blocktype_d[2]); 
+
+
+int psymodel_init(lame_global_flags *gfp);
+
+
+#endif /* LAME_PSYMODEL_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/quantize.c
@@ -1,0 +1,1838 @@
+/*
+ * MP3 quantization
+ *
+ * Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: quantize.c,v 1.57 2001/02/27 06:14:57 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <math.h>
+#include <assert.h>
+#include "util.h"
+#include "l3side.h"
+#include "quantize.h"
+#include "reservoir.h"
+#include "quantize_pvt.h"
+#include "lame-analysis.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+/************************************************************************
+ *
+ *      init_outer_loop()
+ *  mt 6/99                                    
+ *
+ *  initializes cod_info, scalefac and xrpow
+ *
+ *  returns 0 if all energies in xr are zero, else 1                    
+ *
+ ************************************************************************/
+
+static int 
+init_outer_loop(
+    gr_info *const cod_info, 
+    III_scalefac_t *const scalefac, 
+    const int is_mpeg1,
+    const FLOAT8 xr[576], 
+    FLOAT8 xrpow[576] )
+{
+    FLOAT8 tmp, sum = 0;
+    int i;
+
+    /*  initialize fresh cod_info
+     */
+    cod_info->part2_3_length      = 0;
+    cod_info->big_values          = 0;
+    cod_info->count1              = 0;
+    cod_info->global_gain         = 210;
+    cod_info->scalefac_compress   = 0;
+    /* window_switching_flag was set in psymodel.c? */
+    /* block_type            was set in psymodel.c? */
+    /* mixed_block_flag      would be set in ^      */
+    cod_info->table_select [0]    = 0;
+    cod_info->table_select [1]    = 0;
+    cod_info->table_select [2]    = 0;
+    cod_info->subblock_gain[0]    = 0;
+    cod_info->subblock_gain[1]    = 0;
+    cod_info->subblock_gain[2]    = 0;
+    cod_info->region0_count       = 0;
+    cod_info->region1_count       = 0;
+    cod_info->preflag             = 0;
+    cod_info->scalefac_scale      = 0;
+    cod_info->count1table_select  = 0;
+    cod_info->part2_length        = 0;
+    if (cod_info->block_type == SHORT_TYPE) {
+        cod_info->sfb_lmax        = 0;
+        cod_info->sfb_smin        = 0;
+	if (cod_info->mixed_block_flag) {
+            /*
+             *  MPEG-1:      sfbs 0-7 long block, 3-12 short blocks 
+             *  MPEG-2(.5):  sfbs 0-5 long block, 3-12 short blocks
+             */ 
+            cod_info->sfb_lmax    = is_mpeg1 ? 8 : 6;
+	    cod_info->sfb_smin    = 3;
+	}
+    } else {
+        cod_info->sfb_lmax        = SBPSY_l;
+        cod_info->sfb_smin        = SBPSY_s;
+    }   
+    cod_info->count1bits          = 0;  
+    cod_info->sfb_partition_table = nr_of_sfb_block[0][0];
+    cod_info->slen[0]             = 0;
+    cod_info->slen[1]             = 0;
+    cod_info->slen[2]             = 0;
+    cod_info->slen[3]             = 0;
+
+    /*  fresh scalefactors are all zero
+     */
+    memset(scalefac, 0, sizeof(III_scalefac_t));
+  
+    /*  check if there is some energy we have to quantize
+     *  and calculate xrpow matching our fresh scalefactors
+     */
+    for (i = 0; i < 576; ++i) {
+        tmp = fabs (xr[i]);
+	sum += tmp;
+        xrpow[i] = sqrt (tmp * sqrt(tmp));
+    }
+   /*  return 1 if we have something to quantize, else 0
+    */
+   return sum > (FLOAT8)1E-20;
+}
+
+
+
+/************************************************************************
+ *
+ *      bin_search_StepSize()
+ *
+ *  author/date??
+ *
+ *  binary step size search
+ *  used by outer_loop to get a quantizer step size to start with
+ *
+ ************************************************************************/
+
+typedef enum {
+    BINSEARCH_NONE,
+    BINSEARCH_UP, 
+    BINSEARCH_DOWN
+} binsearchDirection_t;
+
+int 
+bin_search_StepSize(
+          lame_internal_flags * const gfc,
+          gr_info * const cod_info,
+    const int             desired_rate, 
+    const int             start, 
+    const FLOAT8          xrpow [576],
+          int             l3enc [576] ) 
+{
+    int nBits;
+    int CurrentStep;
+    int flag_GoneOver = 0;
+    int StepSize      = start;
+
+    binsearchDirection_t Direction = BINSEARCH_NONE;
+    assert(gfc->CurrentStep);
+    CurrentStep = gfc->CurrentStep;
+
+    do {
+        cod_info->global_gain = StepSize;
+        nBits = count_bits(gfc,l3enc,xrpow,cod_info);  
+
+        if (CurrentStep == 1) break; /* nothing to adjust anymore */
+    
+        if (flag_GoneOver) CurrentStep /= 2;
+ 
+        if (nBits > desired_rate) {  
+            /* increase Quantize_StepSize */
+            if (Direction == BINSEARCH_DOWN && !flag_GoneOver) {
+                flag_GoneOver = 1;
+                CurrentStep  /= 2; /* late adjust */
+            }
+            Direction = BINSEARCH_UP;
+            StepSize += CurrentStep;
+            if (StepSize > 255) break;
+        }
+        else if (nBits < desired_rate) {
+            /* decrease Quantize_StepSize */
+            if (Direction == BINSEARCH_UP && !flag_GoneOver) {
+                flag_GoneOver = 1;
+                CurrentStep  /= 2; /* late adjust */
+            }
+            Direction = BINSEARCH_DOWN;
+            StepSize -= CurrentStep;
+            if (StepSize < 0) break;
+        }
+        else break; /* nBits == desired_rate;; most unlikely to happen.*/
+    } while (1); /* For-ever, break is adjusted. */
+
+    CurrentStep = start - StepSize;
+    
+    gfc->CurrentStep = CurrentStep/4 != 0 ? 4 : 2;
+
+    return nBits;
+}
+
+
+
+
+/*************************************************************************** 
+ *
+ *         inner_loop ()                                                     
+ *
+ *  author/date??
+ *
+ *  The code selects the best global gain for a particular set of scalefacs 
+ *
+ ***************************************************************************/ 
+
+int 
+inner_loop(
+          lame_internal_flags * const gfc,
+          gr_info * const cod_info,
+    const int             max_bits,
+    const FLOAT8          xrpow [576],
+          int             l3enc [576] )
+{
+    int bits;
+    
+    assert(max_bits >= 0);
+
+    /*  scalefactors may have changed, so count bits
+     */
+    bits=count_bits(gfc,l3enc,xrpow,cod_info);
+
+    /*  increase quantizer stepsize until needed bits are below maximum
+     */
+    while (bits > max_bits) {
+        cod_info->global_gain++;
+        bits = count_bits (gfc, l3enc, xrpow, cod_info);
+    } 
+
+    return bits;
+}
+
+
+
+/*************************************************************************
+ *
+ *      loop_break()                                               
+ *
+ *  author/date??
+ *
+ *  Function: Returns zero if there is a scalefac which has not been
+ *            amplified. Otherwise it returns one. 
+ *
+ *************************************************************************/
+
+inline 
+static int
+loop_break( 
+    const gr_info        * const cod_info,
+    const III_scalefac_t * const scalefac ) 
+{
+    unsigned int i, sfb;
+
+    for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++)
+        if (scalefac->l[sfb] == 0)
+            return 0;
+
+    for (sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++)
+        for (i = 0; i < 3; i++) 
+            if (scalefac->s[sfb][i] == 0 && cod_info->subblock_gain[i] == 0)
+                return 0;
+
+    return 1;
+}
+
+
+
+
+/*************************************************************************
+ *
+ *      quant_compare()                                               
+ *
+ *  author/date??
+ *
+ *  several different codes to decide which quantization is better
+ *
+ *************************************************************************/
+
+inline 
+static int 
+quant_compare(
+    const int                       experimentalX,
+    const calc_noise_result * const best,
+    const calc_noise_result * const calc )
+{
+    /*
+       noise is given in decibels (dB) relative to masking thesholds.
+
+       over_noise:  ??? (the previous comment is fully wrong)
+       tot_noise:   ??? (the previous comment is fully wrong)
+       max_noise:   max quantization noise 
+
+     */
+    int better;
+
+    switch (experimentalX) {
+        default:
+        case 0: 
+	    better = calc->over_count  < best->over_count
+               ||  ( calc->over_count == best->over_count  &&
+                     calc->over_noise  < best->over_noise )
+               ||  ( calc->over_count == best->over_count  &&
+                     calc->over_noise == best->over_noise  &&
+                     calc->tot_noise   < best->tot_noise  ); 
+	    break;
+        case 1: 
+	    better = calc->max_noise < best->max_noise; 
+	    break;
+        case 2: 
+	    better = calc->tot_noise < best->tot_noise; 
+	    break;
+        case 3: 
+	    better = calc->tot_noise < best->tot_noise  &&
+                     calc->max_noise < best->max_noise+2; 
+	    break;
+        case 4: 
+	    better = ( calc->max_noise <= 0  &&
+                       best->max_noise >  2 )
+                 ||  ( calc->max_noise <= 0  &&
+                       best->max_noise <  0  &&
+                       best->max_noise >  calc->max_noise-2  &&
+                       calc->tot_noise <  best->tot_noise )
+                 ||  ( calc->max_noise <= 0  &&
+                       best->max_noise >  0  &&
+                       best->max_noise >  calc->max_noise-2  &&
+                       calc->tot_noise <  best->tot_noise+best->over_noise )
+                 ||  ( calc->max_noise >  0  &&
+                       best->max_noise > -0.5  &&
+                       best->max_noise >  calc->max_noise-1  &&
+                       calc->tot_noise+calc->over_noise < best->tot_noise+best->over_noise )
+                 ||  ( calc->max_noise >  0  &&
+                       best->max_noise > -1  &&
+                       best->max_noise >  calc->max_noise-1.5  &&
+                       calc->tot_noise+calc->over_noise+calc->over_noise < best->tot_noise+best->over_noise+best->over_noise );
+            break;
+        case 5: 
+	    better =   calc->over_noise  < best->over_noise
+                 ||  ( calc->over_noise == best->over_noise  &&
+                       calc->tot_noise   < best->tot_noise ); 
+	    break;
+        case 6: 
+	    better =   calc->over_noise  < best->over_noise
+                 ||  ( calc->over_noise == best->over_noise  &&
+                     ( calc->max_noise   < best->max_noise  
+		     ||  ( calc->max_noise  == best->max_noise  &&
+                           calc->tot_noise  <= best->tot_noise )
+		      )); 
+	    break;
+        case 7: 
+	    better =   calc->over_count < best->over_count
+                   ||  calc->over_noise < best->over_noise; 
+	    break;
+        case 8: 
+	    better =   calc->klemm_noise < best->klemm_noise;
+            break;
+    }   
+
+    return better;
+}
+
+
+
+/*************************************************************************
+ *
+ *          amp_scalefac_bands() 
+ *
+ *  author/date??
+ *        
+ *  Amplify the scalefactor bands that violate the masking threshold.
+ *  See ISO 11172-3 Section C.1.5.4.3.5
+ * 
+ *  distort[] = noise/masking
+ *  distort[] > 1   ==> noise is not masked
+ *  distort[] < 1   ==> noise is masked
+ *  max_dist = maximum value of distort[]
+ *  
+ *  Three algorithms:
+ *  noise_shaping_amp
+ *        0             Amplify all bands with distort[]>1.
+ *
+ *        1             Amplify all bands with distort[] >= max_dist^(.5);
+ *                     ( 50% in the db scale)
+ *
+ *        2             Amplify first band with distort[] >= max_dist;
+ *                       
+ *
+ *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands 
+ *  with distort[] >= .95*max_dist.  This is to make sure we always
+ *  amplify at least one band.  
+ * 
+ *
+ *************************************************************************/
+static void 
+amp_scalefac_bands(
+    lame_global_flags *gfp,
+    const gr_info  *const cod_info, 
+    III_scalefac_t *const scalefac,
+    III_psy_xmin *distort,
+    FLOAT8 xrpow[576] )
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int start, end, l,i,j,sfb;
+  FLOAT8 ifqstep34, trigger;
+
+  if (cod_info->scalefac_scale == 0) {
+    ifqstep34 = 1.29683955465100964055; /* 2**(.75*.5)*/
+  } else {
+    ifqstep34 = 1.68179283050742922612;  /* 2**(.75*1) */
+  }
+
+  /* compute maximum value of distort[]  */
+  trigger = 0;
+  for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) {
+    if (trigger < distort->l[sfb])
+        trigger = distort->l[sfb];
+  }
+  for (sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++) {
+    for (i = 0; i < 3; i++ ) {
+      if (trigger < distort->s[sfb][i])
+          trigger = distort->s[sfb][i];
+    }
+  }
+
+  switch (gfc->noise_shaping_amp) {
+
+  case 2:
+    /* amplify exactly 1 band */
+    //trigger = distort_thresh;
+    break;
+
+  case 1:
+    /* amplify bands within 50% of max (on db scale) */
+    if (trigger>1.0)
+        trigger = pow(trigger, .5);
+    else
+      trigger *= .95;
+    break;
+
+  case 0:
+  default:
+    /* ISO algorithm.  amplify all bands with distort>1 */
+    if (trigger>1.0)
+        trigger=1.0;
+    else
+        trigger *= .95;
+    break;
+  }
+
+  for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++ ) {
+    start = gfc->scalefac_band.l[sfb];
+    end   = gfc->scalefac_band.l[sfb+1];
+    if (distort->l[sfb]>=trigger  ) {
+      scalefac->l[sfb]++;
+      for ( l = start; l < end; l++ )
+	xrpow[l] *= ifqstep34;
+      if (gfc->noise_shaping_amp==2) goto done;
+    }
+  }
+  
+  for ( j=0,sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++ ) {
+    start = gfc->scalefac_band.s[sfb];
+    end   = gfc->scalefac_band.s[sfb+1];
+    for ( i = 0; i < 3; i++ ) {
+      int j2 = j;
+      if ( distort->s[sfb][i]>=trigger) {
+	scalefac->s[sfb][i]++;
+	for (l = start; l < end; l++) 
+	  xrpow[j2++] *= ifqstep34;
+        if (gfc->noise_shaping_amp==2) goto done;
+      }
+      j += end-start;
+    }
+  }
+ done:
+ return;
+}
+
+/*************************************************************************
+ *
+ *      inc_scalefac_scale()
+ *
+ *  Takehiro Tominaga 2000-xx-xx
+ *
+ *  turns on scalefac scale and adjusts scalefactors
+ *
+ *************************************************************************/
+ 
+static void
+inc_scalefac_scale (
+    const lame_internal_flags        * const gfc, 
+          gr_info        * const cod_info, 
+          III_scalefac_t * const scalefac,
+          FLOAT8                 xrpow[576] )
+{
+    int start, end, l,i,j;
+    int sfb;
+    const FLOAT8 ifqstep34 = 1.29683955465100964055;
+
+    for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) {
+        int s = scalefac->l[sfb] + (cod_info->preflag ? pretab[sfb] : 0);
+        if (s & 1) {
+            s++;
+            start = gfc->scalefac_band.l[sfb];
+            end   = gfc->scalefac_band.l[sfb+1];
+            for (l = start; l < end; l++) 
+                xrpow[l] *= ifqstep34;
+        }
+        scalefac->l[sfb]  = s >> 1;
+        cod_info->preflag = 0;
+    }
+
+    for (j = 0, sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++) {
+    start = gfc->scalefac_band.s[sfb];
+    end   = gfc->scalefac_band.s[sfb+1];
+    for (i = 0; i < 3; i++) {
+        int j2 = j;
+        if (scalefac->s[sfb][i] & 1) {
+        scalefac->s[sfb][i]++;
+        for (l = start; l < end; l++) 
+            xrpow[j2++] *= ifqstep34;
+        }
+        scalefac->s[sfb][i] >>= 1;
+        j += end-start;
+    }
+    }
+    cod_info->scalefac_scale = 1;
+}
+
+
+
+/*************************************************************************
+ *
+ *      inc_subblock_gain()
+ *
+ *  Takehiro Tominaga 2000-xx-xx
+ *
+ *  increases the subblock gain and adjusts scalefactors
+ *
+ *************************************************************************/
+ 
+static int 
+inc_subblock_gain (
+    const lame_internal_flags        * const gfc,
+          gr_info        * const cod_info,
+          III_scalefac_t * const scalefac,
+          FLOAT8                 xrpow[576] )
+{
+    int window;
+
+    for (window = 0; window < 3; window++) {
+        int s1, s2, l;
+        int sfb;
+        s1 = s2 = 0;
+
+        for (sfb = cod_info->sfb_smin; sfb < 6; sfb++) {
+            if (s1 < scalefac->s[sfb][window])
+            s1 = scalefac->s[sfb][window];
+        }
+        for (; sfb < SBPSY_s; sfb++) {
+            if (s2 < scalefac->s[sfb][window])
+            s2 = scalefac->s[sfb][window];
+        }
+
+        if (s1 < 16 && s2 < 8)
+            continue;
+
+        if (cod_info->subblock_gain[window] >= 7)
+            return 1;
+
+        /* even though there is no scalefactor for sfb12
+         * subblock gain affects upper frequencies too, that's why
+         * we have to go up to SBMAX_s
+         */
+        cod_info->subblock_gain[window]++;
+        for (sfb = cod_info->sfb_smin; sfb < SBMAX_s; sfb++) {
+            int i, width;
+            int s = scalefac->s[sfb][window];
+            FLOAT8 amp;
+
+            if (s < 0)
+                continue;
+            s = s - (4 >> cod_info->scalefac_scale);
+            if (s >= 0) {
+                scalefac->s[sfb][window] = s;
+                continue;
+            }
+
+            scalefac->s[sfb][window] = 0;
+            width = gfc->scalefac_band.s[sfb] - gfc->scalefac_band.s[sfb+1];
+            i = gfc->scalefac_band.s[sfb] * 3 + width * window;
+            amp = IPOW20(210 + (s << (cod_info->scalefac_scale + 1)));
+            for (l = 0; l < width; l++) {
+                xrpow[l] *= amp;
+            }
+        }
+    }
+    return 0;
+}
+
+
+
+/********************************************************************
+ *
+ *      balance_noise()
+ *
+ *  Takehiro Tominaga /date??
+ *  Robert Hegemann 2000-09-06: made a function of it
+ *
+ *  amplifies scalefactor bands, 
+ *   - if all are already amplified returns 0
+ *   - if some bands are amplified too much:
+ *      * try to increase scalefac_scale
+ *      * if already scalefac_scale was set
+ *          try on short blocks to increase subblock gain
+ *
+ ********************************************************************/
+inline
+static int 
+balance_noise (
+    lame_global_flags  *const gfp,
+    gr_info        * const cod_info,
+    III_scalefac_t * const scalefac, 
+    III_psy_xmin           *distort,
+    FLOAT8                 xrpow[576] )
+{
+    lame_internal_flags *const gfc = (lame_internal_flags *)gfp->internal_flags;
+    int status;
+    
+    amp_scalefac_bands ( gfp, cod_info, scalefac, distort, xrpow);
+    
+    /* check to make sure we have not amplified too much 
+     * loop_break returns 0 if there is an unamplified scalefac
+     * scale_bitcount returns 0 if no scalefactors are too large
+     */
+    
+    status = loop_break (cod_info, scalefac);
+    
+    if (status) 
+        return 0; /* all bands amplified */
+    
+    /* not all scalefactors have been amplified.  so these 
+     * scalefacs are possibly valid.  encode them: 
+     */
+    if (gfc->is_mpeg1)
+        status = scale_bitcount (scalefac, cod_info);
+    else 
+        status = scale_bitcount_lsf (gfc, scalefac, cod_info);
+    
+    if (!status) 
+        return 1; /* amplified some bands not exceeding limits */
+    
+    /*  some scalefactors are too large.
+     *  lets try setting scalefac_scale=1 
+     */
+    if (gfc->noise_shaping > 1) {
+	if (!cod_info->scalefac_scale) {
+	    inc_scalefac_scale (gfc, cod_info, scalefac, xrpow);
+	    status = 0;
+	} else {
+	    if (cod_info->block_type == SHORT_TYPE ) {
+		status = inc_subblock_gain (gfc, cod_info, scalefac, xrpow)
+		    || loop_break (cod_info, scalefac);
+	    }
+	}
+    }
+
+    if (!status) {
+        if (gfc->is_mpeg1 == 1) 
+            status = scale_bitcount (scalefac, cod_info);
+        else 
+            status = scale_bitcount_lsf (gfc, scalefac, cod_info);
+    }    
+    return !status;
+}
+
+
+
+/************************************************************************
+ *
+ *  outer_loop ()                                                       
+ *
+ *  Function: The outer iteration loop controls the masking conditions  
+ *  of all scalefactorbands. It computes the best scalefac and          
+ *  global gain. This module calls the inner iteration loop             
+ * 
+ *  mt 5/99 completely rewritten to allow for bit reservoir control,   
+ *  mid/side channels with L/R or mid/side masking thresholds, 
+ *  and chooses best quantization instead of last quantization when 
+ *  no distortion free quantization can be found.  
+ *  
+ *  added VBR support mt 5/99
+ *
+ *  some code shuffle rh 9/00
+ ************************************************************************/
+
+static int 
+outer_loop (
+   lame_global_flags *gfp,
+          gr_info        * const cod_info,
+    const FLOAT8                 xr[576],   /* magnitudes of spectral values */
+    const III_psy_xmin   * const l3_xmin,   /* allowed distortion of the scalefactor */
+          III_scalefac_t * const scalefac,  /* scalefactors */
+          FLOAT8                 xrpow[576], /* coloured magnitudes of spectral values */
+          int                    l3enc[576], /* vector of quantized values ix(0..575) */
+    const int                    ch, 
+    const int                    targ_bits )  /* maximum allowed bits */
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_scalefac_t save_scalefac;
+    gr_info save_cod_info;
+    FLOAT8 save_xrpow[576];
+    III_psy_xmin   distort;
+    calc_noise_result noise_info;
+    calc_noise_result best_noise_info;
+    int l3_enc_w[576]; 
+    int iteration = 0;
+    int bits_found = 0;
+    int huff_bits;
+    int real_bits;
+    int better;
+    int over=0;
+
+    int notdone = 1;
+    int copy = 0;
+    int age = 0;
+
+    noise_info.over_count = 100;
+    noise_info.tot_count  = 100;
+    noise_info.max_noise  = 0;
+    noise_info.tot_noise  = 0;
+    noise_info.over_noise = 0;
+    
+    best_noise_info.over_count = 100;
+
+    bits_found = bin_search_StepSize (gfc, cod_info, targ_bits, 
+                                      gfc->OldValue[ch], xrpow, l3_enc_w);
+    gfc->OldValue[ch] = cod_info->global_gain;
+
+    /* BEGIN MAIN LOOP */
+    do {
+        iteration ++;
+
+        /* inner_loop starts with the initial quantization step computed above
+         * and slowly increases until the bits < huff_bits.
+         * Thus it is important not to start with too large of an inital
+         * quantization step.  Too small is ok, but inner_loop will take longer 
+         */
+        huff_bits = targ_bits - cod_info->part2_length;
+        if (huff_bits < 0) {
+            assert(iteration != 1);
+            /*  scale factors too large, not enough bits. 
+             *  use previous quantizaton */
+            break;
+        }
+        /*  if this is the first iteration, 
+         *  see if we can reuse the quantization computed in 
+         *  bin_search_StepSize above */
+
+        if (iteration == 1) {
+            if (bits_found > huff_bits) {
+                cod_info->global_gain++;
+                real_bits = inner_loop (gfc, cod_info, huff_bits, xrpow, 
+                                        l3_enc_w);
+            } else {
+                real_bits = bits_found;
+            }
+        } else {
+            real_bits = inner_loop (gfc, cod_info, huff_bits, xrpow,
+                                    l3_enc_w);
+        }
+
+        cod_info->part2_3_length = real_bits;
+
+        /* compute the distortion in this quantization */
+        if (gfc->noise_shaping) 
+            /* coefficients and thresholds both l/r (or both mid/side) */
+            over = calc_noise (gfc, xr, l3_enc_w, cod_info, l3_xmin, 
+                               scalefac, &distort, &noise_info);
+        else {
+            /* fast mode, no noise shaping, we are ready */
+            best_noise_info = noise_info;
+            over = 0;
+            copy = 0;
+            memcpy(l3enc, l3_enc_w, sizeof(int)*576);
+            break;
+        }
+
+
+        /* check if this quantization is better
+         * than our saved quantization */
+        if (iteration == 1) /* the first iteration is always better */
+            better = 1;
+        else
+            better = quant_compare (gfp->experimentalX, 
+                                    &best_noise_info, &noise_info);
+        
+        /* save data so we can restore this quantization later */    
+        if (better) {
+            copy = 0;
+            best_noise_info = noise_info;
+            memcpy(l3enc, l3_enc_w, sizeof(int)*576);
+            age = 0;
+        }
+        else
+            age ++;
+
+
+        /******************************************************************/
+        /* stopping criterion */
+        /******************************************************************/
+        /* if no bands with distortion and -X0, we are done */
+        if (0==gfc->noise_shaping_stop && 
+            0==gfp->experimentalX &&
+	    (over == 0 || best_noise_info.over_count == 0) )
+            break;
+        /* Otherwise, allow up to 3 unsuccesful tries in serial, then stop 
+         * if our best quantization so far had no distorted bands. This
+         * gives us more possibilities for different quant_compare modes.
+         * Much more than 3 makes not a big difference, it is only slower.
+         */
+        if (age > 3 && best_noise_info.over_count == 0) 
+            break;
+        
+
+
+
+    
+        /* Check if the last scalefactor band is distorted.
+         * in VBR mode we can't get rid of the distortion, so quit now
+         * and VBR mode will try again with more bits.  
+         * (makes a 10% speed increase, the files I tested were
+         * binary identical, 2000/05/20 [email protected])
+         * distort[] > 1 means noise > allowed noise
+         */
+        if (gfc->sfb21_extra) {
+            if (cod_info->block_type == SHORT_TYPE) {
+                if (distort.s[SBMAX_s-1][0] > 1 ||
+                    distort.s[SBMAX_s-1][1] > 1 ||
+                    distort.s[SBMAX_s-1][2] > 1) break;
+            } else {
+                if (distort.l[SBMAX_l-1] > 1) break;
+            }
+        }
+
+        /* save data so we can restore this quantization later */    
+        if (better) {
+            copy = 1;
+            save_scalefac = *scalefac;
+            save_cod_info = *cod_info;
+            if (gfp->VBR == vbr_rh || gfp->VBR == vbr_mtrh) {
+                /* store for later reuse */
+                memcpy(save_xrpow, xrpow, sizeof(FLOAT8)*576);
+            }
+        }
+            
+        notdone = balance_noise (gfp, cod_info, scalefac, &distort, xrpow);
+        
+        if (notdone == 0) 
+            break;
+    }
+    while (1); /* main iteration loop, breaks adjusted */
+    
+    /*  finish up
+     */
+    if (copy) {
+        *cod_info = save_cod_info;
+        *scalefac = save_scalefac;
+        if (gfp->VBR == vbr_rh || gfp->VBR == vbr_mtrh)
+            /* restore for reuse on next try */
+            memcpy(xrpow, save_xrpow, sizeof(FLOAT8)*576);
+    }
+    cod_info->part2_3_length += cod_info->part2_length;
+    
+    assert (cod_info->global_gain < 256);
+    
+    return best_noise_info.over_count;
+}
+
+
+
+
+/************************************************************************
+ *
+ *      iteration_finish()                                                    
+ *
+ *  Robert Hegemann 2000-09-06
+ *
+ *  update reservoir status after FINAL quantization/bitrate 
+ *
+ *  rh 2000-09-06: it will not work with CBR due to the bitstream formatter
+ *            you will get "Error: MAX_HEADER_BUF too small in bitstream.c"
+ *
+ ************************************************************************/
+
+static void 
+iteration_finish (
+    lame_internal_flags *gfc,
+    FLOAT8          xr      [2][2][576],
+    int             l3_enc  [2][2][576],
+    III_psy_ratio   ratio   [2][2],  
+    III_scalefac_t  scalefac[2][2],
+    const int       mean_bits )
+{
+    III_side_info_t *l3_side = &gfc->l3_side;
+    int gr, ch, i;
+    
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            gr_info *cod_info = &l3_side->gr[gr].ch[ch].tt;
+
+            /*  try some better scalefac storage
+             */
+            best_scalefac_store (gfc, gr, ch, l3_enc, l3_side, scalefac);
+            
+            /*  best huffman_divide may save some bits too
+             */
+            if (gfc->use_best_huffman == 1) 
+                best_huffman_divide (gfc, gr, ch, cod_info, l3_enc[gr][ch]);
+            
+            /*  update reservoir status after FINAL quantization/bitrate
+             */
+            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
+      
+            /*  set the sign of l3_enc from the sign of xr
+             */
+            for (i = 0; i < 576; i++) {
+                if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1; 
+            }
+        } /* for ch */
+    }    /* for gr */
+    
+    ResvFrameEnd (gfc, l3_side, mean_bits);
+}
+
+
+
+/*********************************************************************
+ *
+ *      VBR_encode_granule()
+ *
+ *  2000-09-04 Robert Hegemann
+ *
+ *********************************************************************/
+ 
+static void
+VBR_encode_granule (
+          lame_global_flags *gfp,
+          gr_info        * const cod_info,
+          FLOAT8                 xr[576],     /* magnitudes of spectral values */
+    const III_psy_xmin   * const l3_xmin,     /* allowed distortion of the scalefactor */
+          III_scalefac_t * const scalefac,    /* scalefactors */
+          FLOAT8                 xrpow[576],  /* coloured magnitudes of spectral values */
+          int                    l3_enc[576], /* vector of quantized values ix(0..575) */
+    const int                    ch, 
+          int                    min_bits, 
+          int                    max_bits )
+{
+    //lame_internal_flags *gfc=gfp->internal_flags;
+    gr_info         bst_cod_info;
+    III_scalefac_t  bst_scalefac;
+    FLOAT8          bst_xrpow [576]; 
+    int             bst_l3_enc[576];
+    int Max_bits  = max_bits;
+    int real_bits = max_bits+1;
+    int this_bits = min_bits+(max_bits-min_bits)/2;
+    int dbits, over;
+      
+    assert(Max_bits <= MAX_BITS);
+  
+    bst_cod_info = *cod_info;
+    memset(&bst_scalefac, 0, sizeof(III_scalefac_t));
+    memcpy(&bst_xrpow, xrpow, sizeof(FLOAT8)*576);
+      
+    /*  search within round about 40 bits of optimal
+     */
+    do {
+        assert(this_bits >= min_bits);
+        assert(this_bits <= max_bits);
+
+        over = outer_loop ( gfp, cod_info, xr, l3_xmin, scalefac,
+                            xrpow, l3_enc, ch, this_bits );
+
+        /*  is quantization as good as we are looking for ?
+         *  in this case: is no scalefactor band distorted?
+         */
+        if (over <= 0) {
+            /*  now we know it can be done with "real_bits"
+             *  and maybe we can skip some iterations
+             */
+            real_bits = cod_info->part2_3_length;
+
+            /*  store best quantization so far
+             */
+            bst_cod_info = *cod_info;
+            bst_scalefac = *scalefac;
+            memcpy(bst_xrpow, xrpow, sizeof(FLOAT8)*576);
+            memcpy(bst_l3_enc, l3_enc, sizeof(int)*576);
+
+            /*  try with fewer bits
+             */
+            max_bits  = real_bits-32;
+            dbits     = max_bits-min_bits;
+            this_bits = min_bits+dbits/2;
+        } 
+        else {
+            /*  try with more bits
+             */
+            min_bits  = this_bits+32;
+            dbits     = max_bits-min_bits;
+            this_bits = min_bits+dbits/2;
+
+            if (dbits>8) {
+                /*  start again with best quantization so far
+                 */
+                *cod_info = bst_cod_info;
+                *scalefac = bst_scalefac;
+                memcpy(xrpow, bst_xrpow, sizeof(FLOAT8)*576);
+            }
+        }
+    } while (dbits>8);
+
+    if (real_bits <= Max_bits) {
+        /*  restore best quantization found
+         */
+        *cod_info = bst_cod_info;
+        *scalefac = bst_scalefac;
+        memcpy(l3_enc, bst_l3_enc, sizeof(int)*576);
+    }
+    assert(cod_info->part2_3_length <= Max_bits);
+}
+
+
+
+/************************************************************************
+ *
+ *      get_framebits()   
+ *
+ *  Robert Hegemann 2000-09-05
+ *
+ *  calculates
+ *  * how many bits are available for analog silent granules
+ *  * how many bits to use for the lowest allowed bitrate
+ *  * how many bits each bitrate would provide
+ *
+ ************************************************************************/
+
+static void 
+get_framebits (
+    lame_global_flags *gfp,
+    int     * const analog_mean_bits,
+    int     * const min_mean_bits,
+    int             frameBits[15] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int bitsPerFrame, mean_bits, i;
+    III_side_info_t *l3_side = &gfc->l3_side;
+    
+    /*  always use at least this many bits per granule per channel 
+     *  unless we detect analog silence, see below 
+     */
+    gfc->bitrate_index = gfc->VBR_min_bitrate;
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    *min_mean_bits = mean_bits / gfc->channels_out;
+
+    /*  bits for analog silence 
+     */
+    gfc->bitrate_index = 1;
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    *analog_mean_bits = mean_bits / gfc->channels_out;
+
+    for (i = 1; i <= gfc->VBR_max_bitrate; i++) {
+        gfc->bitrate_index = i;
+        getframebits (gfp, &bitsPerFrame, &mean_bits);
+        frameBits[i] = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
+    }
+}
+
+
+
+/************************************************************************
+ *
+ *      calc_min_bits()   
+ *
+ *  Robert Hegemann 2000-09-04
+ *
+ *  determine minimal bit skeleton
+ *
+ ************************************************************************/
+inline
+static int 
+calc_min_bits (
+    lame_global_flags *gfp,
+    const gr_info * const cod_info,
+    const int             pe,
+    const FLOAT8          ms_ener_ratio, 
+    const int             bands,    
+    const int             mch_bits,
+    const int             analog_mean_bits,
+    const int             min_mean_bits,
+    const int             analog_silence,
+    const int             ch )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int min_bits, min_pe_bits;
+    
+    if (gfc->nsPsy.use) return 1;
+
+    /*  base amount of minimum bits
+     */
+    min_bits = Max (125, min_mean_bits);
+
+    if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1)  
+        min_bits = Max (min_bits, mch_bits/5);
+
+    /*  bit skeleton based on PE
+     */
+    if (cod_info->block_type == SHORT_TYPE) 
+        /*  if LAME switches to short blocks then pe is
+         *  >= 1000 on medium surge
+         *  >= 3000 on big surge
+         */
+        min_pe_bits = (pe-350) * bands/39;
+    else 
+        min_pe_bits = (pe-350) * bands/22;
+    
+    if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1) {
+        /*  side channel will use a lower bit skeleton based on PE
+         */ 
+        FLOAT8 fac  = .33 * (.5 - ms_ener_ratio) / .5;
+        min_pe_bits = (int)(min_pe_bits * ((1-fac)/(1+fac)));
+    }
+    min_pe_bits = Min (min_pe_bits, (1820 * gfp->out_samplerate / 44100));
+
+    /*  determine final minimum bits
+     */
+    if (analog_silence && !gfp->VBR_hard_min) 
+        min_bits = analog_mean_bits;
+    else 
+        min_bits = Max (min_bits, min_pe_bits);
+    
+    return min_bits;
+}
+
+
+
+/************************************************************************
+ *
+ *      calc_max_bits()   
+ *
+ *  Robert Hegemann 2000-09-05
+ *
+ *  determine maximal bit skeleton
+ *
+ ************************************************************************/
+inline
+static int 
+calc_max_bits (
+    const lame_internal_flags * const gfc,
+    const int             frameBits[15],
+    const int             min_bits )
+{
+    int max_bits;
+    
+    max_bits  = frameBits[gfc->VBR_max_bitrate];
+    max_bits /= gfc->channels_out * gfc->mode_gr;
+    max_bits  = Min (1200 + max_bits, MAX_BITS - 195 * (gfc->channels_out - 1));
+    max_bits  = Max (max_bits, min_bits);
+    
+    return max_bits;
+}
+
+
+
+/*********************************************************************
+ *
+ *      VBR_prepare()
+ *
+ *  2000-09-04 Robert Hegemann
+ *
+ *  * converts LR to MS coding when necessary 
+ *  * calculates allowed/adjusted quantization noise amounts
+ *  * detects analog silent frames
+ *
+ *  some remarks:
+ *  - lower masking depending on Quality setting
+ *  - quality control together with adjusted ATH MDCT scaling
+ *    on lower quality setting allocate more noise from
+ *    ATH masking, and on higher quality setting allocate
+ *    less noise from ATH masking.
+ *  - experiments show that going more than 2dB over GPSYCHO's
+ *    limits ends up in very annoying artefacts
+ *
+ *********************************************************************/
+
+/* RH: this one needs to be overhauled sometime */
+ 
+static int 
+VBR_prepare (
+          lame_global_flags *gfp,
+          FLOAT8          pe            [2][2],
+          FLOAT8          ms_ener_ratio [2], 
+          FLOAT8          xr            [2][2][576],
+          III_psy_ratio   ratio         [2][2], 
+          III_psy_xmin    l3_xmin       [2][2],
+          int             frameBits     [16],
+          int            *analog_mean_bits,
+          int            *min_mean_bits,
+          int             min_bits      [2][2],
+          int             max_bits      [2][2],
+          int             bands         [2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    static const FLOAT8 dbQ[10]={-2.,-1.0,-.66,-.33,0.,0.33,.66,1.0,1.33,1.66};
+    static const FLOAT8 dbQns[10]={- 4,- 3,-2,-1,0,0.7,1.4,2.1,2.8,3.5};
+    /*static const FLOAT8 atQns[10]={-16,-12,-8,-4,0,  1,  2,  3,  4,  5};*/
+    
+    static const FLOAT8 dbQmtrh[10]=
+        { -4., -3., -2., -1., 0., 0.5, 1., 1.5, 2., 2.5 };
+    
+    FLOAT8   masking_lower_db, adjust = 0.0;
+    int      gr, ch;
+    int      used_bits = 0, bits;
+    int      analog_silence = 1;
+  
+    assert( gfp->VBR_q <= 9 );
+    assert( gfp->VBR_q >= 0 );
+  
+    get_framebits (gfp, analog_mean_bits, min_mean_bits, frameBits);
+    
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        if (gfc->mode_ext == MPG_MD_MS_LR) 
+            ms_convert (xr[gr], xr[gr]); 
+    
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
+      
+            if (cod_info->block_type == SHORT_TYPE) 
+                adjust = 5/(1+exp(3.5-pe[gr][ch]/300.))-0.14;
+            else 
+                adjust = 2/(1+exp(3.5-pe[gr][ch]/300.))-0.05;
+      
+	    if (vbr_mtrh == gfp->VBR) {
+	        masking_lower_db   = dbQmtrh[gfp->VBR_q] - adjust; 
+            } 
+            else if (gfc->nsPsy.use && gfp->ATHtype == 0) {
+	        masking_lower_db   = dbQns[gfp->VBR_q] - adjust; 
+	    } 
+            else {
+	        masking_lower_db   = dbQ[gfp->VBR_q] - adjust; 
+	    }
+            gfc->masking_lower = pow (10.0, masking_lower_db * 0.1);
+      
+            bands[gr][ch] = calc_xmin (gfp, xr[gr][ch], ratio[gr]+ch, 
+                                       cod_info, l3_xmin[gr]+ch);
+            if (bands[gr][ch]) 
+                analog_silence = 0;
+                
+            
+            min_bits[gr][ch] = calc_min_bits (gfp, cod_info, (int)pe[gr][ch],
+                                      ms_ener_ratio[gr], bands[gr][ch],
+                                      0, *analog_mean_bits, 
+                                      *min_mean_bits, analog_silence, ch);
+      
+            max_bits[gr][ch] = calc_max_bits (gfc, frameBits, min_bits[gr][ch]); 
+            used_bits += min_bits[gr][ch];           
+    
+        } /* for ch */
+    }  /* for gr */
+    
+    *min_mean_bits = Max(125, *min_mean_bits);
+    bits = 0.8*frameBits[gfc->VBR_max_bitrate];
+    if (used_bits >= bits) 
+        for (gr = 0; gr < gfc->mode_gr; gr++) {
+            for (ch = 0; ch < gfc->channels_out; ch++) {
+                min_bits[gr][ch] *= bits;
+                min_bits[gr][ch] /= used_bits;
+                if (min_bits[gr][ch] < *min_mean_bits)
+                    min_bits[gr][ch] = *min_mean_bits;
+                max_bits[gr][ch] *= bits;
+                max_bits[gr][ch] /= used_bits;
+                if (max_bits[gr][ch] < *min_mean_bits)
+                    max_bits[gr][ch] = *min_mean_bits;
+            }
+        }
+    
+  
+    return analog_silence;
+}
+ 
+ 
+
+/************************************************************************
+ *
+ *      VBR_iteration_loop()   
+ *
+ *  tries to find out how many bits are needed for each granule and channel
+ *  to get an acceptable quantization. An appropriate bitrate will then be
+ *  choosed for quantization.  rh 8/99                          
+ *
+ *  Robert Hegemann 2000-09-06 rewrite
+ *
+ ************************************************************************/
+
+void 
+VBR_iteration_loop (
+    lame_global_flags *gfp,
+    FLOAT8             pe           [2][2],
+    FLOAT8             ms_ener_ratio[2], 
+    FLOAT8             xr           [2][2][576],
+    III_psy_ratio      ratio        [2][2], 
+    int                l3_enc       [2][2][576],
+    III_scalefac_t     scalefac     [2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_psy_xmin l3_xmin[2][2];
+  
+    FLOAT8    xrpow[576];
+    int       bands[2][2];
+    int       frameBits[15];
+    int       bitsPerFrame;
+    int       save_bits[2][2];
+    int       used_bits, used_bits2;
+    int       bits;
+    int       min_bits[2][2], max_bits[2][2];
+    int       analog_mean_bits, min_mean_bits;
+    int       mean_bits;
+    int       ch, num_chan, gr, analog_silence;
+    int       reduce_s_ch, sfb21_extra;
+    gr_info             *cod_info;
+    III_side_info_t     *l3_side  = &gfc->l3_side;
+
+    if (gfc->mode_ext == MPG_MD_MS_LR && gfp->quality >= 5) {
+        /*  my experiences are, that side channel reduction  
+         *  does more harm than good when VBR encoding
+         *  ([email protected] 2000-02-18)
+         *  2000-09-06: code is enabled at quality level 5
+         */
+        reduce_s_ch = 1;
+        num_chan    = 1;
+    } else {
+        reduce_s_ch = 0;
+        num_chan    = gfc->channels_out;
+    }
+  
+    analog_silence = VBR_prepare (gfp, pe, ms_ener_ratio, xr, ratio, 
+                                  l3_xmin, frameBits, &analog_mean_bits,
+                                  &min_mean_bits, min_bits, max_bits, bands);
+  
+    /*---------------------------------*/
+    do {  
+    
+    /*  quantize granules with lowest possible number of bits
+     */
+    
+    used_bits = 0;
+    used_bits2 = 0;
+   
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch = 0; ch < num_chan; ch++) {
+            int ret; 
+            cod_info = &l3_side->gr[gr].ch[ch].tt;
+      
+            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
+             */
+            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
+				  xr[gr][ch], xrpow);
+            if (ret == 0) {
+                /*  xr contains no energy 
+                 *  l3_enc, our encoding data, will be quantized to zero
+                 */
+                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
+                save_bits[gr][ch] = 0;
+                continue; /* with next channel */
+            }
+#if 0
+            if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1)  
+                min_bits[gr][ch] = Max (min_bits[gr][ch], save_bits[gr][0]/5);
+#endif
+      
+            if (gfp->VBR == vbr_mtrh) {
+                ret = VBR_noise_shaping2 (gfp, xr[gr][ch], xrpow, 
+                                        &ratio[gr][ch], l3_enc[gr][ch], 0, 
+                                        min_bits[gr][ch], max_bits[gr][ch], 
+                                        &scalefac[gr][ch],
+                                        &l3_xmin[gr][ch], gr, ch );
+                if (ret < 0)
+                    cod_info->part2_3_length = 100000;
+            } 
+            else
+                VBR_encode_granule (gfp, cod_info, xr[gr][ch], &l3_xmin[gr][ch],
+                                    &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
+                                    ch, min_bits[gr][ch], max_bits[gr][ch] );
+
+            used_bits += cod_info->part2_3_length;
+            save_bits[gr][ch] = Min(MAX_BITS, cod_info->part2_3_length);
+            used_bits2 += Min(MAX_BITS, cod_info->part2_3_length);
+        } /* for ch */
+    }    /* for gr */
+
+    /*  special on quality=5, we didn't quantize side channel above
+     */
+    if (reduce_s_ch) {
+        /*  number of bits needed was found for MID channel above.  Use formula
+         *  (fixed bitrate code) to set the side channel bits */
+        for (gr = 0; gr < gfc->mode_gr; gr++) {
+            FLOAT8 fac = .33*(.5-ms_ener_ratio[gr])/.5;
+            save_bits[gr][1] = (int)(((1-fac)/(1+fac)) * save_bits[gr][0]);
+            save_bits[gr][1] = Max (analog_mean_bits, save_bits[gr][1]);
+            used_bits += save_bits[gr][1];
+        }
+    }
+
+    /*  find lowest bitrate able to hold used bits
+     */
+    if (analog_silence && !gfp->VBR_hard_min) 
+        /*  we detected analog silence and the user did not specify 
+         *  any hard framesize limit, so start with smallest possible frame
+         */
+        gfc->bitrate_index = 1;
+    else
+        gfc->bitrate_index = gfc->VBR_min_bitrate;
+     
+    for( ; gfc->bitrate_index < gfc->VBR_max_bitrate; gfc->bitrate_index++) {
+        if (used_bits <= frameBits[gfc->bitrate_index]) break; 
+    }
+
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
+    
+    if (used_bits > bits){
+        //printf("# %d used %d have %d\n",gfp->frameNum,used_bits,bits);
+        if(gfp->VBR == vbr_mtrh) {        
+            for (gr = 0; gr < gfc->mode_gr; gr++) {
+                for (ch = 0; ch < gfc->channels_out; ch++) {
+                    max_bits[gr][ch] = save_bits[gr][ch];
+                    max_bits[gr][ch] *= frameBits[gfc->bitrate_index];
+                    max_bits[gr][ch] /= used_bits2;
+                    max_bits[gr][ch] = Max(min_bits[gr][ch],max_bits[gr][ch]);
+                }
+            }
+        }
+        else {
+            for (gr = 0; gr < gfc->mode_gr; gr++) {
+                for (ch = 0; ch < gfc->channels_out; ch++) {
+                    int sfb;
+                    cod_info = &l3_side->gr[gr].ch[ch].tt;
+                    if (cod_info->block_type == SHORT_TYPE) {
+                        for (sfb = 0; sfb < SBMAX_s; sfb++) {
+                            l3_xmin[gr][ch].s[sfb][0] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
+                            l3_xmin[gr][ch].s[sfb][1] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
+                            l3_xmin[gr][ch].s[sfb][2] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
+                        }
+                    }
+                    else {
+                        for (sfb = 0; sfb < SBMAX_l; sfb++) 
+                            l3_xmin[gr][ch].l[sfb] *= 1.+.029*sfb*sfb/SBMAX_l/SBMAX_l;
+                    }
+//                  min_bits[gr][ch] = Max(min_mean_bits, 0.9*min_bits[gr][ch]);
+                    max_bits[gr][ch] = Max(min_mean_bits, 0.9*max_bits[gr][ch]);
+                }
+            }
+        }
+    }
+
+    } while (used_bits > bits);
+    /*--------------------------------------*/
+    
+    /*  ignore sfb21 by the following (maybe) noise shaping  
+     */
+    sfb21_extra = gfc->sfb21_extra;
+    gfc->sfb21_extra = 0;     
+        
+    /*  quantize granules which violate bit constraints again
+     *  and side channel when in quality=5 reduce_side is used
+     */  
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            int ret;
+            cod_info = &l3_side->gr[gr].ch[ch].tt;
+      
+            if (used_bits <= bits && ! (reduce_s_ch && ch == 1))
+                /*  we have enough bits
+                 *  and have already encoded the side channel 
+                 */
+                continue; /* with next ch */
+            
+            if (used_bits > bits) {
+                /*  repartion available bits in same proportion
+                 */
+                save_bits[gr][ch] *= frameBits[gfc->bitrate_index];
+                save_bits[gr][ch] /= used_bits;
+            }
+            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
+             */
+            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
+				  xr[gr][ch], xrpow);
+            if (ret == 0) 
+            {
+                /*  xr contains no energy 
+                 *  l3_enc, our encoding data, will be quantized to zero
+                 */
+                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
+            }
+            else {
+                /*  xr contains energy we will have to encode 
+                 *  masking abilities were previously calculated
+                 *  find some good quantization in outer_loop 
+                 */
+                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin[gr][ch],
+                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch], ch,
+                            save_bits[gr][ch]);
+            }
+        } /* ch */
+    }  /* gr */
+    
+    gfc->sfb21_extra = sfb21_extra;
+
+    iteration_finish (gfc, xr, l3_enc, ratio, scalefac, mean_bits);
+}
+
+
+
+
+
+
+/********************************************************************
+ *
+ *  calc_target_bits()
+ *
+ *  calculates target bits for ABR encoding
+ *
+ *  mt 2000/05/31
+ *
+ ********************************************************************/
+
+static void 
+calc_target_bits (
+    lame_global_flags * gfp,
+    FLOAT8               pe            [2][2],
+    FLOAT8               ms_ener_ratio [2],
+    int                  targ_bits     [2][2],
+    int                 *analog_silence_bits,
+    int                 *max_frame_bits )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_side_info_t *l3_side = &gfc->l3_side;
+    FLOAT8 res_factor;
+    int gr, ch, totbits, mean_bits, bitsPerFrame;
+    
+    gfc->bitrate_index = gfc->VBR_max_bitrate;
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    *max_frame_bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
+
+    gfc->bitrate_index = 1;
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    *analog_silence_bits = mean_bits / gfc->channels_out;
+
+    mean_bits  = gfp->VBR_mean_bitrate_kbps * gfp->framesize * 1000;
+    mean_bits /= gfp->out_samplerate;
+    mean_bits -= gfc->sideinfo_len*8;
+    mean_bits /= gfc->mode_gr;
+
+    res_factor = .90 + .10 * (11.0 - gfp->compression_ratio) / (11.0 - 5.5);
+    if (res_factor <  .90)
+        res_factor =  .90; 
+    if (res_factor > 1.00) 
+        res_factor = 1.00;
+
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            targ_bits[gr][ch] = res_factor * (mean_bits / gfc->channels_out);
+            
+            if (pe[gr][ch] > 700) {
+                int add_bits = (pe[gr][ch] - 700) / 1.4;
+  
+                gr_info *cod_info = &l3_side->gr[gr].ch[ch].tt;
+                targ_bits[gr][ch] = res_factor * (mean_bits / gfc->channels_out);
+ 
+                /* short blocks use a little extra, no matter what the pe */
+                if (cod_info->block_type == SHORT_TYPE) {
+                    if (add_bits < mean_bits/4) 
+                        add_bits = mean_bits/4; 
+                }
+                /* at most increase bits by 1.5*average */
+                if (add_bits > mean_bits*3/4)
+                    add_bits = mean_bits*3/4;
+                else
+                if (add_bits < 0) 
+                    add_bits = 0;
+
+                targ_bits[gr][ch] += add_bits;
+            }
+        }/* for ch */
+    }   /* for gr */
+    
+    if (gfc->mode_ext == MPG_MD_MS_LR) 
+        for (gr = 0; gr < gfc->mode_gr; gr++) {
+            reduce_side (targ_bits[gr], ms_ener_ratio[gr], mean_bits,
+			 MAX_BITS);
+        }
+
+    /*  sum target bits
+     */
+    totbits=0;
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            if (targ_bits[gr][ch] > MAX_BITS) 
+                targ_bits[gr][ch] = MAX_BITS;
+            totbits += targ_bits[gr][ch];
+        }
+    }
+
+    /*  repartion target bits if needed
+     */
+    if (totbits > *max_frame_bits) {
+        for(gr = 0; gr < gfc->mode_gr; gr++) {
+            for(ch = 0; ch < gfc->channels_out; ch++) {
+                targ_bits[gr][ch] *= *max_frame_bits; 
+                targ_bits[gr][ch] /= totbits; 
+            }
+        }
+    }
+}
+
+
+
+
+
+
+/********************************************************************
+ *
+ *  ABR_iteration_loop()
+ *
+ *  encode a frame with a disired average bitrate
+ *
+ *  mt 2000/05/31
+ *
+ ********************************************************************/
+
+void 
+ABR_iteration_loop(
+    lame_global_flags *gfp,
+    FLOAT8             pe           [2][2],
+    FLOAT8             ms_ener_ratio[2], 
+    FLOAT8             xr           [2][2][576],
+    III_psy_ratio      ratio        [2][2], 
+    int                l3_enc       [2][2][576],
+    III_scalefac_t     scalefac     [2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_psy_xmin l3_xmin;
+    FLOAT8    xrpow[576];
+    int       targ_bits[2][2];
+    int       bitsPerFrame, mean_bits, totbits, max_frame_bits;
+    int       ch, gr, ath_over, ret;
+    int       analog_silence_bits;
+    gr_info             *cod_info = NULL;
+    III_side_info_t     *l3_side  = &gfc->l3_side;
+
+    calc_target_bits (gfp, pe, ms_ener_ratio, targ_bits, 
+                      &analog_silence_bits, &max_frame_bits);
+    
+    /*  encode granules
+     */
+    totbits=0;
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+
+        if (gfc->mode_ext == MPG_MD_MS_LR) 
+            ms_convert (xr[gr], xr[gr]);
+
+        for (ch = 0; ch < gfc->channels_out; ch++) {
+            cod_info = &l3_side->gr[gr].ch[ch].tt;
+
+            /*  cod_info, scalefac and xrpow get initialized in init_outer_loop
+             */
+            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
+				  xr[gr][ch], xrpow);
+            if (ret == 0) {
+                /*  xr contains no energy 
+                 *  l3_enc, our encoding data, will be quantized to zero
+                 */
+                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
+            } 
+            else {
+                /*  xr contains energy we will have to encode 
+                 *  calculate the masking abilities
+                 *  find some good quantization in outer_loop 
+                 */
+                ath_over = calc_xmin (gfp, xr[gr][ch], &ratio[gr][ch],
+                                      cod_info, &l3_xmin);
+                if (0 == ath_over) /* analog silence */
+                    targ_bits[gr][ch] = analog_silence_bits;
+
+                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin,
+                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
+                            ch, targ_bits[gr][ch]);
+            }
+
+            totbits += cod_info->part2_3_length;
+        } /* ch */
+    }  /* gr */
+  
+    /*  find a bitrate which can handle totbits 
+     */
+    for (gfc->bitrate_index =  gfc->VBR_min_bitrate ;
+         gfc->bitrate_index <= gfc->VBR_max_bitrate;
+         gfc->bitrate_index++    ) {
+        getframebits (gfp, &bitsPerFrame, &mean_bits);
+        max_frame_bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
+        if (totbits <= max_frame_bits) break; 
+    }
+    assert (gfc->bitrate_index <= gfc->VBR_max_bitrate);
+
+    iteration_finish (gfc, xr, l3_enc, ratio, scalefac, mean_bits);
+}
+
+
+
+
+
+
+/************************************************************************
+ *
+ *      iteration_loop()                                                    
+ *
+ *  author/date??
+ *
+ *  encodes one frame of MP3 data with constant bitrate
+ *
+ ************************************************************************/
+
+void 
+iteration_loop(
+    lame_global_flags *gfp, 
+    FLOAT8             pe           [2][2],
+    FLOAT8             ms_ener_ratio[2],  
+    FLOAT8             xr           [2][2][576],
+    III_psy_ratio      ratio        [2][2],  
+    int                l3_enc       [2][2][576],
+    III_scalefac_t     scalefac     [2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_psy_xmin l3_xmin[2];
+    FLOAT8 xrpow[576];
+    int    targ_bits[2];
+    int    bitsPerFrame;
+    int    mean_bits, max_bits, bit_rate;
+    int    gr, ch, i;
+    III_side_info_t     *l3_side = &gfc->l3_side;
+    gr_info             *cod_info;
+
+    bit_rate = bitrate_table [gfp->version] [gfc->bitrate_index];
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame );
+
+    /* quantize! */
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+
+        /*  calculate needed bits
+         */
+        max_bits = on_pe (gfp, pe, l3_side, targ_bits, mean_bits, gr);
+        
+        if (gfc->mode_ext == MPG_MD_MS_LR) {
+            ms_convert (xr[gr], xr[gr]);
+            reduce_side (targ_bits, ms_ener_ratio[gr], mean_bits, max_bits);
+        }
+        
+        for (ch=0 ; ch < gfc->channels_out ; ch ++) {
+            cod_info = &l3_side->gr[gr].ch[ch].tt; 
+
+            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
+             */
+            i = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
+				xr[gr][ch], xrpow);
+            if (i == 0) {
+                /*  xr contains no energy, l3_enc will be quantized to zero
+                 */
+                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
+            }
+            else {
+                /*  xr contains energy we will have to encode 
+                 *  calculate the masking abilities
+                 *  find some good quantization in outer_loop 
+                 */
+                calc_xmin (gfp, xr[gr][ch], &ratio[gr][ch], cod_info, 
+                           &l3_xmin[ch]);
+                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin[ch], 
+                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
+                            ch, targ_bits[ch]);
+            }
+            assert (cod_info->part2_3_length <= MAX_BITS);
+
+            /*  try some better scalefac storage
+             */
+            best_scalefac_store (gfc, gr, ch, l3_enc, l3_side, scalefac);
+            
+            /*  best huffman_divide may save some bits too
+             */
+            if (gfc->use_best_huffman == 1) 
+                best_huffman_divide (gfc, gr, ch, cod_info, l3_enc[gr][ch]);
+            
+            /*  update reservoir status after FINAL quantization/bitrate
+             */
+#undef  NORES_TEST
+#ifndef NORES_TEST
+            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
+#endif      
+            /*  set the sign of l3_enc from the sign of xr
+             */
+            for (i = 0; i < 576; i++) {
+                if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1; 
+            }
+        } /* for ch */
+    }    /* for gr */
+    
+#ifdef NORES_TEST
+    /* replace ResvAdjust above with this code if you do not want
+       the second granule to use bits saved by the first granule.
+       Requires using the --nores.  This is useful for testing only */
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+        for (ch =  0; ch < gfc->channels_out; ch++) {
+            cod_info = &l3_side->gr[gr].ch[ch].tt;
+            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
+        }
+    }
+#endif
+
+    ResvFrameEnd (gfc, l3_side, mean_bits);
+}
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/quantize.h
@@ -1,0 +1,76 @@
+/*
+ * MP3 quantization
+ *
+ * Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_QUANTIZE_H
+#define LAME_QUANTIZE_H
+
+#include "util.h"
+/*#include "l3side.h"
+*/
+void iteration_loop( lame_global_flags *gfp,
+                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
+		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
+		     int l3_enc[2][2][576], 
+		     III_scalefac_t scalefac[2][2]);
+
+void VBR_iteration_loop( lame_global_flags *gfp,
+                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
+		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
+		     int l3_enc[2][2][576], 
+		     III_scalefac_t scalefac[2][2]);
+
+void ABR_iteration_loop( lame_global_flags *gfp,
+                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
+		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
+		     int l3_enc[2][2][576], 
+		     III_scalefac_t scalefac[2][2]);
+
+/*
+ *  vbrquantize.c
+ */
+
+void VBR_quantize( 
+                    lame_global_flags      *gfp,
+		    FLOAT8         pe[2][2], 
+                    FLOAT8         ms_ener_ratio[2],
+		    FLOAT8         xr[2][2][576], 
+                    III_psy_ratio  ratio[2][2],
+		    int            l3_enc[2][2][576],
+		    III_scalefac_t scalefac[2][2]);
+
+
+    /*  used by VBR_iteration_loop() */ 
+
+int VBR_noise_shaping2(
+                    lame_global_flags        *gfp,
+                    FLOAT8           xr       [576], 
+                    FLOAT8           xr34orig [576], 
+                    III_psy_ratio  * ratio,
+                    int              l3_enc   [576], 
+                    int              digital_silence, 
+                    int              minbits, 
+                    int              maxbits,
+                    III_scalefac_t * scalefac, 
+                    III_psy_xmin   * l3_xmin,
+                    int              gr,
+                    int              ch );
+
+#endif /* LAME_QUANTIZE_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/quantize_pvt.c
@@ -1,0 +1,1171 @@
+/*
+ *	quantize_pvt source file
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: quantize_pvt.c,v 1.55 2001/03/05 20:29:24 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include "util.h"
+#include "lame-analysis.h"
+#include "tables.h"
+#include "reservoir.h"
+#include "quantize_pvt.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+#define NSATHSCALE 100 // Assuming dynamic range=96dB, this value should be 92
+
+const char  slen1_tab [16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };
+const char  slen2_tab [16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };
+
+
+/*
+  The following table is used to implement the scalefactor
+  partitioning for MPEG2 as described in section
+  2.4.3.2 of the IS. The indexing corresponds to the
+  way the tables are presented in the IS:
+
+  [table_number][row_in_table][column of nr_of_sfb]
+*/
+const int  nr_of_sfb_block [6] [3] [4] =
+{
+  {
+    {6, 5, 5, 5},
+    {9, 9, 9, 9},
+    {6, 9, 9, 9}
+  },
+  {
+    {6, 5, 7, 3},
+    {9, 9, 12, 6},
+    {6, 9, 12, 6}
+  },
+  {
+    {11, 10, 0, 0},
+    {18, 18, 0, 0},
+    {15,18,0,0}
+  },
+  {
+    {7, 7, 7, 0},
+    {12, 12, 12, 0},
+    {6, 15, 12, 0}
+  },
+  {
+    {6, 6, 6, 3},
+    {12, 9, 9, 6},
+    {6, 12, 9, 6}
+  },
+  {
+    {8, 8, 5, 0},
+    {15,12,9,0},
+    {6,18,9,0}
+  }
+};
+
+
+/* Table B.6: layer3 preemphasis */
+const char  pretab [SBMAX_l] =
+{
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0
+};
+
+/*
+  Here are MPEG1 Table B.8 and MPEG2 Table B.1
+  -- Layer III scalefactor bands. 
+  Index into this using a method such as:
+    idx  = fr_ps->header->sampling_frequency
+           + (fr_ps->header->version * 3)
+*/
+
+
+const scalefac_struct sfBandIndex[9] =
+{
+  { /* Table B.2.b: 22.05 kHz */
+    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
+    {0,4,8,12,18,24,32,42,56,74,100,132,174,192}
+  },
+  { /* Table B.2.c: 24 kHz */                 /* docs: 332. mpg123(broken): 330 */
+    {0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278, 332, 394,464,540,576},
+    {0,4,8,12,18,26,36,48,62,80,104,136,180,192}
+  },
+  { /* Table B.2.a: 16 kHz */
+    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
+    {0,4,8,12,18,26,36,48,62,80,104,134,174,192}
+  },
+  { /* Table B.8.b: 44.1 kHz */
+    {0,4,8,12,16,20,24,30,36,44,52,62,74,90,110,134,162,196,238,288,342,418,576},
+    {0,4,8,12,16,22,30,40,52,66,84,106,136,192}
+  },
+  { /* Table B.8.c: 48 kHz */
+    {0,4,8,12,16,20,24,30,36,42,50,60,72,88,106,128,156,190,230,276,330,384,576},
+    {0,4,8,12,16,22,28,38,50,64,80,100,126,192}
+  },
+  { /* Table B.8.a: 32 kHz */
+    {0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576},
+    {0,4,8,12,16,22,30,42,58,78,104,138,180,192}
+  },
+  { /* MPEG-2.5 11.025 kHz */
+    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
+    {0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3}
+  },
+  { /* MPEG-2.5 12 kHz */
+    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
+    {0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3}
+  },
+  { /* MPEG-2.5 8 kHz */
+    {0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576},
+    {0/3,24/3,48/3,72/3,108/3,156/3,216/3,288/3,372/3,480/3,486/3,492/3,498/3,576/3}
+  }
+};
+
+
+
+FLOAT8 pow20[Q_MAX];
+FLOAT8 ipow20[Q_MAX];
+FLOAT8 pow43[PRECALC_SIZE];
+/* initialized in first call to iteration_init */
+FLOAT8 adj43asm[PRECALC_SIZE];
+FLOAT8 adj43[PRECALC_SIZE];
+
+/************************************************************************/
+/*  initialization for iteration_loop */
+/************************************************************************/
+void
+iteration_init( lame_global_flags *gfp)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  III_side_info_t * const l3_side = &gfc->l3_side;
+  int i;
+
+  if ( gfc->iteration_init_init==0 ) {
+    gfc->iteration_init_init=1;
+
+    l3_side->main_data_begin = 0;
+    compute_ath(gfp,gfc->ATH->l,gfc->ATH->s);
+
+    pow43[0] = 0.0;
+    for(i=1;i<PRECALC_SIZE;i++)
+        pow43[i] = pow((FLOAT8)i, 4.0/3.0);
+
+    adj43asm[0] = 0.0;
+    for (i = 1; i < PRECALC_SIZE; i++)
+      adj43asm[i] = i - 0.5 - pow(0.5 * (pow43[i - 1] + pow43[i]),0.75);
+    for (i = 0; i < PRECALC_SIZE-1; i++)
+	adj43[i] = (i + 1) - pow(0.5 * (pow43[i] + pow43[i + 1]), 0.75);
+    adj43[i] = 0.5;
+    for (i = 0; i < Q_MAX; i++) {
+	ipow20[i] = pow(2.0, (double)(i - 210) * -0.1875);
+	pow20[i] = pow(2.0, (double)(i - 210) * 0.25);
+    }
+    huffman_init(gfc);
+  }
+}
+
+
+
+
+
+/* 
+compute the ATH for each scalefactor band 
+cd range:  0..96db
+
+Input:  3.3kHz signal  32767 amplitude  (3.3kHz is where ATH is smallest = -5db)
+longblocks:  sfb=12   en0/bw=-11db    max_en0 = 1.3db
+shortblocks: sfb=5           -9db              0db
+
+Input:  1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated)
+longblocks:  amp=1      sfb=12   en0/bw=-103 db      max_en0 = -92db
+            amp=32767   sfb=12           -12 db                 -1.4db 
+
+Input:  1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated)
+shortblocks: amp=1      sfb=5   en0/bw= -99                    -86 
+            amp=32767   sfb=5           -9  db                  4db 
+
+
+MAX energy of largest wave at 3.3kHz = 1db
+AVE energy of largest wave at 3.3kHz = -11db
+Let's take AVE:  -11db = maximum signal in sfb=12.  
+Dynamic range of CD: 96db.  Therefor energy of smallest audible wave 
+in sfb=12  = -11  - 96 = -107db = ATH at 3.3kHz.  
+
+ATH formula for this wave: -5db.  To adjust to LAME scaling, we need
+ATH = ATH_formula  - 103  (db)
+ATH = ATH * 2.5e-10      (ener)
+
+*/
+
+FLOAT8 ATHmdct( lame_global_flags *gfp, FLOAT8 f )
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    FLOAT8 ath;
+  
+    ath = ATHformula( f , gfp );
+	  
+    if (gfc->nsPsy.use) {
+        ath -= NSATHSCALE;
+    } else {
+        ath -= 114;
+    }
+    
+    /*  modify the MDCT scaling for the ATH  */
+    ath -= gfp->ATHlower;
+
+    /* convert to energy */
+    ath = pow( 10.0, ath/10.0 );
+    return ath;
+}
+ 
+
+void compute_ath( lame_global_flags *gfp, FLOAT8 ATH_l[], FLOAT8 ATH_s[] )
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int sfb, i, start, end;
+    FLOAT8 ATH_f;
+    FLOAT8 samp_freq = gfp->out_samplerate;
+
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        start = gfc->scalefac_band.l[ sfb ];
+        end   = gfc->scalefac_band.l[ sfb+1 ];
+        ATH_l[sfb]=1e99;
+        for (i = start ; i < end; i++) {
+            FLOAT8 freq = i*samp_freq/(2*576);
+            ATH_f = ATHmdct( gfp, freq );  /* freq in kHz */
+            ATH_l[sfb] = Min( ATH_l[sfb], ATH_f );
+        }
+
+    }
+
+    for (sfb = 0; sfb < SBMAX_s; sfb++){
+        start = gfc->scalefac_band.s[ sfb ];
+        end   = gfc->scalefac_band.s[ sfb+1 ];
+        ATH_s[sfb] = 1e99;
+        for (i = start ; i < end; i++) {
+            FLOAT8 freq = i*samp_freq/(2*192);
+            ATH_f = ATHmdct( gfp, freq );    /* freq in kHz */
+            ATH_s[sfb] = Min( ATH_s[sfb], ATH_f );
+        }
+    }
+
+    /*  no-ATH mode:
+     *  reduce ATH to -200 dB
+     */
+    
+    if (gfp->noATH) {
+        for (sfb = 0; sfb < SBMAX_l; sfb++) {
+            ATH_l[sfb] = 1E-37;
+        }
+        for (sfb = 0; sfb < SBMAX_s; sfb++) {
+            ATH_s[sfb] = 1E-37;
+        }
+    }
+}
+
+
+
+
+
+/* convert from L/R <-> Mid/Side, src == dst allowed */
+void ms_convert(FLOAT8 dst[2][576], FLOAT8 src[2][576])
+{
+    FLOAT8 l;
+    FLOAT8 r;
+    int i;
+    for (i = 0; i < 576; ++i) {
+        l = src[0][i];
+        r = src[1][i];
+        dst[0][i] = (l+r) * (FLOAT8)(SQRT2*0.5);
+        dst[1][i] = (l-r) * (FLOAT8)(SQRT2*0.5);
+    }
+}
+
+
+
+/************************************************************************
+ * allocate bits among 2 channels based on PE
+ * mt 6/99
+ ************************************************************************/
+int on_pe(lame_global_flags *gfp,FLOAT8 pe[2][2],III_side_info_t *l3_side,
+int targ_bits[2],int mean_bits, int gr)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  gr_info *cod_info;
+  int extra_bits,tbits,bits;
+  int add_bits[2]; 
+  int ch;
+  int max_bits;  /* maximum allowed bits for this granule */
+
+  /* allocate targ_bits for granule */
+  ResvMaxBits (gfp, mean_bits, &tbits, &extra_bits);
+  max_bits=tbits+extra_bits;
+
+  bits=0;
+
+  for (ch=0 ; ch < gfc->channels_out ; ch ++) {
+    /******************************************************************
+     * allocate bits for each channel 
+     ******************************************************************/
+    cod_info = &l3_side->gr[gr].ch[ch].tt;
+    
+    targ_bits[ch]=Min(MAX_BITS, tbits/gfc->channels_out);
+    
+    if (gfc->nsPsy.use) {
+      add_bits[ch] = targ_bits[ch]*pe[gr][ch]/700.0-targ_bits[ch];
+    } else {
+      add_bits[ch]=(pe[gr][ch]-750)/1.4;
+      /* short blocks us a little extra, no matter what the pe */
+      if (cod_info->block_type==SHORT_TYPE) {
+	if (add_bits[ch]<mean_bits/4) add_bits[ch]=mean_bits/4;
+      }
+
+      /* at most increase bits by 1.5*average */
+      if (add_bits[ch] > .75*mean_bits) add_bits[ch]=mean_bits*.75;
+      if (add_bits[ch] < 0) add_bits[ch]=0;
+
+      if ((targ_bits[ch]+add_bits[ch]) > MAX_BITS) 
+	add_bits[ch]=Max(0, MAX_BITS-targ_bits[ch]);
+    }
+
+    bits += add_bits[ch];
+  }
+  if (bits > extra_bits)
+    for (ch=0 ; ch < gfc->channels_out ; ch ++) {
+      add_bits[ch] = (extra_bits*add_bits[ch])/bits;
+    }
+
+  for (ch=0 ; ch < gfc->channels_out ; ch ++) {
+    targ_bits[ch] = targ_bits[ch] + add_bits[ch];
+    extra_bits -= add_bits[ch];
+  }
+  return max_bits;
+}
+
+
+
+
+void reduce_side(int targ_bits[2],FLOAT8 ms_ener_ratio,int mean_bits,int max_bits)
+{
+  int move_bits;
+  FLOAT fac;
+
+
+  /*  ms_ener_ratio = 0:  allocate 66/33  mid/side  fac=.33  
+   *  ms_ener_ratio =.5:  allocate 50/50 mid/side   fac= 0 */
+  /* 75/25 split is fac=.5 */
+  /* float fac = .50*(.5-ms_ener_ratio[gr])/.5;*/
+  fac = .33*(.5-ms_ener_ratio)/.5;
+  if (fac<0) fac=0;
+  if (fac>.5) fac=.5;
+  
+    /* number of bits to move from side channel to mid channel */
+    /*    move_bits = fac*targ_bits[1];  */
+    move_bits = fac*.5*(targ_bits[0]+targ_bits[1]);  
+
+    if (move_bits > MAX_BITS - targ_bits[0]) {
+        move_bits = MAX_BITS - targ_bits[0];
+    }
+    if (move_bits<0) move_bits=0;
+    
+    if (targ_bits[1] >= 125) {
+      /* dont reduce side channel below 125 bits */
+      if (targ_bits[1]-move_bits > 125) {
+
+	/* if mid channel already has 2x more than average, dont bother */
+	/* mean_bits = bits per granule (for both channels) */
+	if (targ_bits[0] < mean_bits)
+	  targ_bits[0] += move_bits;
+	targ_bits[1] -= move_bits;
+      } else {
+	targ_bits[0] += targ_bits[1] - 125;
+	targ_bits[1] = 125;
+      }
+    }
+    
+    move_bits=targ_bits[0]+targ_bits[1];
+    if (move_bits > max_bits) {
+      targ_bits[0]=(max_bits*targ_bits[0])/move_bits;
+      targ_bits[1]=(max_bits*targ_bits[1])/move_bits;
+    }
+}
+
+#if 0
+FLOAT8 dreinorm (FLOAT8 a, FLOAT8 b, FLOAT8 c)
+{
+    return pow(pow(a,3.)+pow(b,3.)+pow(c,3.),1./3.);
+}
+#endif
+
+/*************************************************************************/
+/*            calc_xmin                                                  */
+/*************************************************************************/
+
+/*
+  Calculate the allowed distortion for each scalefactor band,
+  as determined by the psychoacoustic model.
+  xmin(sb) = ratio(sb) * en(sb) / bw(sb)
+
+  returns number of sfb's with energy > ATH
+*/
+int calc_xmin( 
+        lame_global_flags *gfp,
+        const FLOAT8                xr [576],
+        const III_psy_ratio * const ratio,
+	const gr_info       * const cod_info, 
+              III_psy_xmin  * const l3_xmin ) 
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int sfb,j,start, end, bw,l, b, ath_over=0;
+  FLOAT8 en0, xmin, ener;
+
+  if (cod_info->block_type==SHORT_TYPE) {
+
+  for ( j=0, sfb = 0; sfb < SBMAX_s; sfb++ ) {
+    start = gfc->scalefac_band.s[ sfb ];
+    end   = gfc->scalefac_band.s[ sfb + 1 ];
+    bw = end - start;
+    for ( b = 0; b < 3; b++ ) {
+      for (en0 = 0.0, l = start; l < end; l++) {
+        ener = xr[j++];
+        ener = ener * ener;
+        en0 += ener;
+      }
+      en0 /= bw;
+      
+      if (gfp->ATHonly || gfp->ATHshort) {
+        xmin = gfc->ATH->adjust * gfc->ATH->s[sfb];
+      } else {
+        xmin = ratio->en.s[sfb][b];
+        if (xmin > 0.0)
+          xmin = en0 * ratio->thm.s[sfb][b] * gfc->masking_lower / xmin;
+        xmin = Max(gfc->ATH->adjust * gfc->ATH->s[sfb], xmin);
+      }
+      l3_xmin->s[sfb][b] = xmin * bw;
+
+      if (gfc->nsPsy.use) {
+	if (sfb <= 5) {
+	  l3_xmin->s[sfb][b] *= gfc->nsPsy.bass;
+	} else if (sfb <= 10) {
+	  l3_xmin->s[sfb][b] *= gfc->nsPsy.alto;
+	} else {
+	  l3_xmin->s[sfb][b] *= gfc->nsPsy.treble;
+	}
+      }
+
+      if (en0 > gfc->ATH->adjust * gfc->ATH->s[sfb]) ath_over++;
+      if (gfc->nsPsy.use && (gfp->VBR == vbr_off || gfp->VBR == vbr_abr) && gfp->quality <= 1)
+        l3_xmin->s[sfb][b] *= 0.001;
+    }
+  }
+
+  if (gfp->useTemporal) {
+    for (sfb = 0; sfb < SBMAX_s; sfb++ ) {
+      for ( b = 1; b < 3; b++ ) {
+        xmin = l3_xmin->s[sfb][b] * (1.0 - gfc->decay)
+	  +  l3_xmin->s[sfb][b-1] * gfc->decay;
+	if (l3_xmin->s[sfb][b] < xmin)
+	    l3_xmin->s[sfb][b] = xmin;
+      }
+    }
+  }
+
+  }else{
+    if (gfc->nsPsy.use) {
+      for ( sfb = 0; sfb < SBMAX_l; sfb++ ){
+	start = gfc->scalefac_band.l[ sfb ];
+	end   = gfc->scalefac_band.l[ sfb+1 ];
+    
+	for (en0 = 0.0, l = start; l < end; l++ ) {
+	  ener = xr[l] * xr[l];
+	  en0 += ener;
+	}
+    
+	if (gfp->ATHonly) {
+	  xmin=gfc->ATH->adjust * gfc->ATH->l[sfb];
+	} else {
+	  xmin = ratio->en.l[sfb];
+	  if (xmin > 0.0)
+	    xmin = en0 * ratio->thm.l[sfb] * gfc->masking_lower / xmin;
+          xmin=Max(gfc->ATH->adjust * gfc->ATH->l[sfb], xmin);
+	}
+	l3_xmin->l[sfb]=xmin;
+
+	if (sfb <= 6) {
+	  l3_xmin->l[sfb] *= gfc->nsPsy.bass;
+	} else if (sfb <= 13) {
+	  l3_xmin->l[sfb] *= gfc->nsPsy.alto;
+	} else {
+	  l3_xmin->l[sfb] *= gfc->nsPsy.treble;
+	}
+
+	if (en0 > gfc->ATH->adjust * gfc->ATH->l[sfb]) ath_over++;
+	if ((gfp->VBR == vbr_off || gfp->VBR == vbr_abr) && gfp->quality <= 1)
+          l3_xmin->l[sfb] *= 0.001;
+      }
+    } else {
+      for ( sfb = 0; sfb < SBMAX_l; sfb++ ){
+	start = gfc->scalefac_band.l[ sfb ];
+	end   = gfc->scalefac_band.l[ sfb+1 ];
+	bw = end - start;
+    
+	for (en0 = 0.0, l = start; l < end; l++ ) {
+	  ener = xr[l] * xr[l];
+	  en0 += ener;
+	}
+	en0 /= bw;
+    
+	if (gfp->ATHonly) {
+	  xmin=gfc->ATH->adjust * gfc->ATH->l[sfb];
+	} else {
+	  xmin = ratio->en.l[sfb];
+	  if (xmin > 0.0)
+	    xmin = en0 * ratio->thm.l[sfb] * gfc->masking_lower / xmin;
+          xmin=Max(gfc->ATH->adjust * gfc->ATH->l[sfb], xmin);
+	}
+	l3_xmin->l[sfb]=xmin*bw;
+	
+        if (en0 > gfc->ATH->adjust * gfc->ATH->l[sfb]) ath_over++;
+      }
+    }
+  }
+  return ath_over;
+}
+
+/*************************************************************************/
+/*            calc_noise                                                 */
+/*************************************************************************/
+
+// -oo dB  =>  -1.00
+// - 6 dB  =>  -0.97
+// - 3 dB  =>  -0.80
+// - 2 dB  =>  -0.64
+// - 1 dB  =>  -0.38
+//   0 dB  =>   0.00
+// + 1 dB  =>  +0.49
+// + 2 dB  =>  +1.06
+// + 3 dB  =>  +1.68
+// + 6 dB  =>  +3.69
+// +10 dB  =>  +6.45
+
+double penalties ( double noise )
+{
+    return log ( 0.368 + 0.632 * noise * noise * noise );
+}
+
+/*  mt 5/99:  Function: Improved calc_noise for a single channel   */
+
+int  calc_noise( 
+        const lame_internal_flags           * const gfc,
+        const FLOAT8                    xr [576],
+        const int                       ix [576],
+        const gr_info           * const cod_info,
+        const III_psy_xmin      * const l3_xmin, 
+        const III_scalefac_t    * const scalefac,
+              III_psy_xmin      * xfsf,
+              calc_noise_result * const res )
+{
+  int sfb,start, end, j,l, i, over=0;
+  FLOAT8 sum;
+  
+  int count=0;
+  FLOAT8 noise,noise_db;
+  FLOAT8 over_noise = 1;     /*    0 dB relative to masking */
+  FLOAT8 over_noise_db = 0;
+  FLOAT8 tot_noise  = 1;     /*    0 dB relative to masking */
+  FLOAT8 tot_noise_db  = 0;     /*    0 dB relative to masking */
+  FLOAT8 max_noise  = 1E-20; /* -200 dB relative to masking */
+  double klemm_noise = 1E-37;
+
+  if (cod_info->block_type == SHORT_TYPE) {
+    int max_index = gfc->sfb21_extra ? SBMAX_s : SBPSY_s;
+
+    for ( j=0, sfb = 0; sfb < max_index; sfb++ ) {
+         start = gfc->scalefac_band.s[ sfb ];
+         end   = gfc->scalefac_band.s[ sfb+1 ];
+         for ( i = 0; i < 3; i++ ) {
+	    FLOAT8 step;
+	    int s;
+
+	    s = (scalefac->s[sfb][i] << (cod_info->scalefac_scale + 1))
+		+ cod_info->subblock_gain[i] * 8;
+	    s = cod_info->global_gain - s;
+
+	    assert(s<Q_MAX);
+	    assert(s>=0);
+	    step = POW20(s);
+	    sum = 0.0;
+	    l = start;
+	    do {
+	      FLOAT8 temp;
+	      temp = pow43[ix[j]];
+	      temp *= step;
+	      temp -= fabs(xr[j]);
+	      ++j;
+	      sum += temp * temp;
+	      l++;
+	    } while (l < end);
+            noise = xfsf->s[sfb][i]  = sum / l3_xmin->s[sfb][i];
+
+	    max_noise    = Max(max_noise,noise);
+	    klemm_noise += penalties (noise);
+
+	    noise_db=10*log10(Max(noise,1E-20));
+            /* multiplying here is adding in dB, but will overflow */
+	    //tot_noise *= Max(noise, 1E-20); 
+	    tot_noise_db += noise_db;
+
+            if (noise > 1) {
+		over++;
+	        /* multiplying here is adding in dB, but can overflow */
+		//over_noise *= noise;
+		over_noise_db += noise_db;
+	    }
+	    count++;	    
+        }
+    }
+  }else{ /* cod_info->block_type == SHORT_TYPE */
+    int max_index = gfc->sfb21_extra ? SBMAX_l : SBPSY_l;
+    
+    for ( sfb = 0; sfb < max_index; sfb++ ) {
+	FLOAT8 step;
+	int s = scalefac->l[sfb];
+
+	if (cod_info->preflag)
+	    s += pretab[sfb];
+
+	s = cod_info->global_gain - (s << (cod_info->scalefac_scale + 1));
+	assert(s<Q_MAX);
+	assert(s>=0);
+	step = POW20(s);
+
+	start = gfc->scalefac_band.l[ sfb ];
+        end   = gfc->scalefac_band.l[ sfb+1 ];
+
+	for ( sum = 0.0, l = start; l < end; l++ ) {
+	  FLOAT8 temp;
+	  temp = fabs(xr[l]) - pow43[ix[l]] * step;
+	  sum += temp * temp;
+	}
+	noise = xfsf->l[sfb] = sum / l3_xmin->l[sfb];
+	max_noise=Max(max_noise,noise);
+	klemm_noise += penalties (noise);
+
+	noise_db=10*log10(Max(noise,1E-20));
+	/* multiplying here is adding in dB, but can overflow */
+	//tot_noise *= Max(noise, 1E-20);
+	tot_noise_db += noise_db;
+
+	if (noise > 1) {
+	  over++;
+	  /* multiplying here is adding in dB -but can overflow */
+	  //over_noise *= noise;
+	  over_noise_db += noise_db;
+	}
+
+	count++;
+    }
+  } /* cod_info->block_type == SHORT_TYPE */
+
+  /* normalization at this point by "count" is not necessary, since
+   * the values are only used to compare with previous values */
+  res->tot_count  = count;
+  res->over_count = over;
+
+  /* convert to db. DO NOT CHANGE THESE */
+  /* tot_noise = is really the average over each sfb of: 
+     [noise(db) - allowed_noise(db)]
+
+     and over_noise is the same average, only over only the
+     bands with noise > allowed_noise.  
+
+  */
+
+  //res->tot_noise   = 10.*log10(Max(1e-20,tot_noise )); 
+  //res->over_noise  = 10.*log10(Max(1e+00,over_noise)); 
+  res->tot_noise   = tot_noise_db;
+  res->over_noise  = over_noise_db;
+  res->max_noise   = 10.*log10(Max(1e-20,max_noise ));
+  res->klemm_noise = 10.*log10(Max(1e-20,klemm_noise));
+
+  return over;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/************************************************************************
+ *
+ *  set_pinfo()
+ *
+ *  updates plotting data    
+ *
+ *  Mark Taylor 2000-??-??                
+ *
+ *  Robert Hegemann: moved noise/distortion calc into it                          
+ *
+ ************************************************************************/
+
+static
+void set_pinfo (
+        lame_global_flags *gfp,
+        const gr_info        * const cod_info,
+        const III_psy_ratio  * const ratio, 
+        const III_scalefac_t * const scalefac,
+        const FLOAT8                 xr[576],
+        const int                    l3_enc[576],        
+        const int                    gr,
+        const int                    ch )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int sfb;
+    int j,i,l,start,end,bw;
+    FLOAT8 en0,en1;
+    FLOAT ifqstep = ( cod_info->scalefac_scale == 0 ) ? .5 : 1.0;
+
+
+    III_psy_xmin l3_xmin;
+    calc_noise_result noise;
+    III_psy_xmin xfsf;
+
+    calc_xmin (gfp,xr, ratio, cod_info, &l3_xmin);
+
+    calc_noise (gfc, xr, l3_enc, cod_info, &l3_xmin, scalefac, &xfsf, &noise);
+
+    if (cod_info->block_type == SHORT_TYPE) {
+        for (j=0, sfb = 0; sfb < SBMAX_s; sfb++ )  {
+            start = gfc->scalefac_band.s[ sfb ];
+            end   = gfc->scalefac_band.s[ sfb + 1 ];
+            bw = end - start;
+            for ( i = 0; i < 3; i++ ) {
+                for ( en0 = 0.0, l = start; l < end; l++ ) {
+                    en0 += xr[j] * xr[j];
+                    ++j;
+                }
+                en0=Max(en0/bw,1e-20);
+
+
+#if 0
+{
+    double tot1,tot2;
+    if (sfb<SBMAX_s-1) {
+        if (sfb==0) {
+            tot1=0;
+            tot2=0;
+        }
+        tot1 += en0;
+        tot2 += ratio->en.s[sfb][i];
+
+        DEBUGF("%i %i sfb=%i mdct=%f fft=%f  fft-mdct=%f db \n",
+                gr,ch,sfb,
+                10*log10(Max(1e-25,ratio->en.s[sfb][i])),
+                10*log10(Max(1e-25,en0)),
+                10*log10((Max(1e-25,en0)/Max(1e-25,ratio->en.s[sfb][i]))));
+
+        if (sfb==SBMAX_s-2) {
+            DEBUGF("%i %i toti %f %f ratio=%f db \n",gr,ch,
+                    10*log10(Max(1e-25,tot2)),
+                    10*log(Max(1e-25,tot1)),
+                    10*log10(Max(1e-25,tot1)/(Max(1e-25,tot2))));
+
+        }
+    }
+    /*
+        masking: multiplied by en0/fft_energy
+        average seems to be about -135db.
+     */
+}
+#endif
+
+
+                /* convert to MDCT units */
+                en1=1e15;  /* scaling so it shows up on FFT plot */
+                gfc->pinfo->xfsf_s[gr][ch][3*sfb+i] 
+                    = en1*xfsf.s[sfb][i]*l3_xmin.s[sfb][i]/bw;
+                gfc->pinfo->en_s[gr][ch][3*sfb+i] = en1*en0;
+
+                if (ratio->en.s[sfb][i]>0)
+                    en0 = en0/ratio->en.s[sfb][i];
+                else
+                    en0=0;
+                if (gfp->ATHonly || gfp->ATHshort)
+                    en0=0;
+
+                gfc->pinfo->thr_s[gr][ch][3*sfb+i] = 
+                        en1*Max(en0*ratio->thm.s[sfb][i],gfc->ATH->s[sfb]);
+
+ 
+                /* there is no scalefactor bands >= SBPSY_s */
+                if (sfb < SBPSY_s) {
+                    gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i]=
+                                            -ifqstep*scalefac->s[sfb][i];
+                } else {
+                    gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i]=0;
+                }
+                gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i] -=
+                                             2*cod_info->subblock_gain[i];
+            }
+        }
+    } else {
+        for ( sfb = 0; sfb < SBMAX_l; sfb++ )   {
+            start = gfc->scalefac_band.l[ sfb ];
+            end   = gfc->scalefac_band.l[ sfb+1 ];
+            bw = end - start;
+            for ( en0 = 0.0, l = start; l < end; l++ ) 
+                en0 += xr[l] * xr[l];
+            if (!gfc->nsPsy.use) en0/=bw;
+      /*
+    DEBUGF("diff  = %f \n",10*log10(Max(ratio[gr][ch].en.l[sfb],1e-20))
+                            -(10*log10(en0)+150));
+       */
+
+#if 0
+ {
+    double tot1,tot2;
+    if (sfb==0) {
+        tot1=0;
+        tot2=0;
+    }
+    tot1 += en0;
+    tot2 += ratio->en.l[sfb];
+
+
+    DEBUGF("%i %i sfb=%i mdct=%f fft=%f  fft-mdct=%f db \n",
+            gr,ch,sfb,
+            10*log10(Max(1e-25,ratio->en.l[sfb])),
+            10*log10(Max(1e-25,en0)),
+            10*log10((Max(1e-25,en0)/Max(1e-25,ratio->en.l[sfb]))));
+
+    if (sfb==SBMAX_l-1) {
+        DEBUGF("%i %i toti %f %f ratio=%f db \n",
+            gr,ch,
+            10*log10(Max(1e-25,tot2)),
+            10*log(Max(1e-25,tot1)),
+            10*log10(Max(1e-25,tot1)/(Max(1e-25,tot2))));
+    }
+    /*
+        masking: multiplied by en0/fft_energy
+        average seems to be about -147db.
+     */
+}
+#endif
+
+
+            /* convert to MDCT units */
+            en1=1e15;  /* scaling so it shows up on FFT plot */
+            gfc->pinfo->xfsf[gr][ch][sfb] =  en1*xfsf.l[sfb]*l3_xmin.l[sfb]/bw;
+            gfc->pinfo->en[gr][ch][sfb] = en1*en0;
+            if (ratio->en.l[sfb]>0)
+                en0 = en0/ratio->en.l[sfb];
+            else
+                en0=0;
+            if (gfp->ATHonly)
+                en0=0;
+            gfc->pinfo->thr[gr][ch][sfb] =
+                             en1*Max(en0*ratio->thm.l[sfb],gfc->ATH->l[sfb]);
+
+            /* there is no scalefactor bands >= SBPSY_l */
+            if (sfb<SBPSY_l) {
+                if (scalefac->l[sfb]<0)  /* scfsi! */
+                    gfc->pinfo->LAMEsfb[gr][ch][sfb] =
+                                            gfc->pinfo->LAMEsfb[0][ch][sfb];
+                else
+                    gfc->pinfo->LAMEsfb[gr][ch][sfb] = -ifqstep*scalefac->l[sfb];
+            }else{
+                gfc->pinfo->LAMEsfb[gr][ch][sfb] = 0;
+            }
+
+            if (cod_info->preflag && sfb>=11) 
+                gfc->pinfo->LAMEsfb[gr][ch][sfb] -= ifqstep*pretab[sfb];
+        } /* for sfb */
+    } /* block type long */
+    gfc->pinfo->LAMEqss     [gr][ch] = cod_info->global_gain;
+    gfc->pinfo->LAMEmainbits[gr][ch] = cod_info->part2_3_length;
+    gfc->pinfo->LAMEsfbits  [gr][ch] = cod_info->part2_length;
+
+    gfc->pinfo->over      [gr][ch] = noise.over_count;
+    gfc->pinfo->max_noise [gr][ch] = noise.max_noise;
+    gfc->pinfo->over_noise[gr][ch] = noise.over_noise;
+    gfc->pinfo->tot_noise [gr][ch] = noise.tot_noise;
+}
+
+
+/************************************************************************
+ *
+ *  set_frame_pinfo()
+ *
+ *  updates plotting data for a whole frame  
+ *
+ *  Robert Hegemann 2000-10-21                          
+ *
+ ************************************************************************/
+
+void set_frame_pinfo( 
+        lame_global_flags *gfp,
+        FLOAT8          xr       [2][2][576],
+        III_psy_ratio   ratio    [2][2],  
+        int             l3_enc   [2][2][576],
+        III_scalefac_t  scalefac [2][2] )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    unsigned int          gr, ch, sfb;
+    int                   act_l3enc[576];
+    III_scalefac_t        act_scalefac [2];
+    int scsfi[2] = {0,0};
+    
+    
+    gfc->masking_lower = 1.0;
+    
+    /* reconstruct the scalefactors in case SCSFI was used 
+     */
+    for (ch = 0; ch < gfc->channels_out; ch ++) {
+        for (sfb = 0; sfb < SBMAX_l; sfb ++) {
+            if (scalefac[1][ch].l[sfb] == -1) {/* scfsi */
+                act_scalefac[ch].l[sfb] = scalefac[0][ch].l[sfb];
+                scsfi[ch] = 1;
+            } else {
+                act_scalefac[ch].l[sfb] = scalefac[1][ch].l[sfb];
+            }
+        }
+    }
+    
+    /* for every granule and channel patch l3_enc and set info
+     */
+    for (gr = 0; gr < gfc->mode_gr; gr ++) {
+        for (ch = 0; ch < gfc->channels_out; ch ++) {
+            int i;
+            gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
+            
+            /* revert back the sign of l3enc */
+            for ( i = 0; i < 576; i++) {
+                if (xr[gr][ch][i] < 0) 
+                    act_l3enc[i] = -l3_enc[gr][ch][i];
+                else
+                    act_l3enc[i] = +l3_enc[gr][ch][i];
+            }
+            if (gr == 1 && scsfi[ch]) 
+                set_pinfo (gfp, cod_info, &ratio[gr][ch], &act_scalefac[ch],
+                        xr[gr][ch], act_l3enc, gr, ch);                    
+            else
+                set_pinfo (gfp, cod_info, &ratio[gr][ch], &scalefac[gr][ch],
+                        xr[gr][ch], act_l3enc, gr, ch);                    
+        } /* for ch */
+    }    /* for gr */
+}
+        
+
+
+
+/*********************************************************************
+ * nonlinear quantization of xr 
+ * More accurate formula than the ISO formula.  Takes into account
+ * the fact that we are quantizing xr -> ix, but we want ix^4/3 to be 
+ * as close as possible to x^4/3.  (taking the nearest int would mean
+ * ix is as close as possible to xr, which is different.)
+ * From Segher Boessenkool <[email protected]>  11/1999
+ * ASM optimization from 
+ *    Mathew Hendry <[email protected]> 11/1999
+ *    Acy Stapp <[email protected]> 11/1999
+ *    Takehiro Tominaga <[email protected]> 11/1999
+ * 9/00: ASM code removed in favor of IEEE754 hack.  If you need
+ * the ASM code, check CVS circa Aug 2000.  
+ *********************************************************************/
+
+
+#ifdef TAKEHIRO_IEEE754_HACK
+
+typedef union {
+    float f;
+    int i;
+} fi_union;
+
+#define MAGIC_FLOAT (65536*(128))
+#define MAGIC_INT 0x4b000000
+
+void quantize_xrpow(const FLOAT8 xp[576], int pi[576], FLOAT8 istep)
+{
+    /* quantize on xr^(3/4) instead of xr */
+    int j;
+    fi_union *fi;
+
+    fi = (fi_union *)pi;
+    for (j = 576 / 4 - 1; j >= 0; --j) {
+	double x0 = istep * xp[0];
+	double x1 = istep * xp[1];
+	double x2 = istep * xp[2];
+	double x3 = istep * xp[3];
+
+	x0 += MAGIC_FLOAT; fi[0].f = x0;
+	x1 += MAGIC_FLOAT; fi[1].f = x1;
+	x2 += MAGIC_FLOAT; fi[2].f = x2;
+	x3 += MAGIC_FLOAT; fi[3].f = x3;
+
+	fi[0].f = x0 + (adj43asm - MAGIC_INT)[fi[0].i];
+	fi[1].f = x1 + (adj43asm - MAGIC_INT)[fi[1].i];
+	fi[2].f = x2 + (adj43asm - MAGIC_INT)[fi[2].i];
+	fi[3].f = x3 + (adj43asm - MAGIC_INT)[fi[3].i];
+
+	fi[0].i -= MAGIC_INT;
+	fi[1].i -= MAGIC_INT;
+	fi[2].i -= MAGIC_INT;
+	fi[3].i -= MAGIC_INT;
+	fi += 4;
+	xp += 4;
+    }
+}
+
+#  define ROUNDFAC -0.0946
+void quantize_xrpow_ISO(const FLOAT8 xp[576], int pi[576], FLOAT8 istep)
+{
+    /* quantize on xr^(3/4) instead of xr */
+    int j;
+    fi_union *fi;
+
+    fi = (fi_union *)pi;
+    for (j=576/4 - 1;j>=0;j--) {
+	fi[0].f = istep * xp[0] + (ROUNDFAC + MAGIC_FLOAT);
+	fi[1].f = istep * xp[1] + (ROUNDFAC + MAGIC_FLOAT);
+	fi[2].f = istep * xp[2] + (ROUNDFAC + MAGIC_FLOAT);
+	fi[3].f = istep * xp[3] + (ROUNDFAC + MAGIC_FLOAT);
+
+	fi[0].i -= MAGIC_INT;
+	fi[1].i -= MAGIC_INT;
+	fi[2].i -= MAGIC_INT;
+	fi[3].i -= MAGIC_INT;
+	fi+=4;
+	xp+=4;
+    }
+}
+
+#else
+
+/*********************************************************************
+ * XRPOW_FTOI is a macro to convert floats to ints.  
+ * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
+ *                                         ROUNDFAC= -0.0946
+ *
+ * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]   
+ *                                   ROUNDFAC=0.4054
+ *
+ * Note: using floor() or (int) is extermely slow. On machines where
+ * the TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile
+ * to write some ASM for XRPOW_FTOI().  
+ *********************************************************************/
+#define XRPOW_FTOI(src,dest) ((dest) = (int)(src))
+#define QUANTFAC(rx)  adj43[rx]
+#define ROUNDFAC 0.4054
+
+
+void quantize_xrpow(const FLOAT8 xr[576], int ix[576], FLOAT8 istep) {
+    /* quantize on xr^(3/4) instead of xr */
+    /* from [email protected].  Reported to be 2x faster than 
+       the above code (when not using ASM) on PowerPC */
+    int j;
+
+    for ( j = 576/8; j > 0; --j) {
+	FLOAT8	x1, x2, x3, x4, x5, x6, x7, x8;
+	int	rx1, rx2, rx3, rx4, rx5, rx6, rx7, rx8;
+	x1 = *xr++ * istep;
+	x2 = *xr++ * istep;
+	XRPOW_FTOI(x1, rx1);
+	x3 = *xr++ * istep;
+	XRPOW_FTOI(x2, rx2);
+	x4 = *xr++ * istep;
+	XRPOW_FTOI(x3, rx3);
+	x5 = *xr++ * istep;
+	XRPOW_FTOI(x4, rx4);
+	x6 = *xr++ * istep;
+	XRPOW_FTOI(x5, rx5);
+	x7 = *xr++ * istep;
+	XRPOW_FTOI(x6, rx6);
+	x8 = *xr++ * istep;
+	XRPOW_FTOI(x7, rx7);
+	x1 += QUANTFAC(rx1);
+	XRPOW_FTOI(x8, rx8);
+	x2 += QUANTFAC(rx2);
+	XRPOW_FTOI(x1,*ix++);
+	x3 += QUANTFAC(rx3);
+	XRPOW_FTOI(x2,*ix++);
+	x4 += QUANTFAC(rx4);
+	XRPOW_FTOI(x3,*ix++);
+	x5 += QUANTFAC(rx5);
+	XRPOW_FTOI(x4,*ix++);
+	x6 += QUANTFAC(rx6);
+	XRPOW_FTOI(x5,*ix++);
+	x7 += QUANTFAC(rx7);
+	XRPOW_FTOI(x6,*ix++);
+	x8 += QUANTFAC(rx8);
+	XRPOW_FTOI(x7,*ix++);
+	XRPOW_FTOI(x8,*ix++);
+    }
+}
+
+
+
+
+
+
+void quantize_xrpow_ISO( const FLOAT8 xr[576], int ix[576], FLOAT8 istep )
+{
+    /* quantize on xr^(3/4) instead of xr */
+    const FLOAT8 compareval0 = (1.0 - 0.4054)/istep;
+    int j;
+    /* depending on architecture, it may be worth calculating a few more
+       compareval's.
+
+       eg.  compareval1 = (2.0 - 0.4054/istep);
+       .. and then after the first compare do this ...
+       if compareval1>*xr then ix = 1;
+
+       On a pentium166, it's only worth doing the one compare (as done here),
+       as the second compare becomes more expensive than just calculating
+       the value. Architectures with slow FP operations may want to add some
+       more comparevals. try it and send your diffs statistically speaking
+
+       73% of all xr*istep values give ix=0
+       16% will give 1
+       4%  will give 2
+    */
+    for (j=576;j>0;j--) {
+	if (compareval0 > *xr) {
+	    *(ix++) = 0;
+	    xr++;
+	} else {
+	    /*    *(ix++) = (int)( istep*(*(xr++))  + 0.4054); */
+	    XRPOW_FTOI(  istep*(*(xr++))  + ROUNDFAC , *(ix++) );
+	}
+    }
+}
+
+#endif
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/quantize_pvt.h
@@ -1,0 +1,126 @@
+/*
+ *	quantize_pvt include file
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_QUANTIZE_PVT_H
+#define LAME_QUANTIZE_PVT_H
+
+#include "l3side.h"
+#define IXMAX_VAL 8206  /* ix always <= 8191+15.    see count_bits() */
+
+/* buggy Winamp decoder cannot handle values > 8191 */
+/* #define IXMAX_VAL 8191 */
+
+#define PRECALC_SIZE (IXMAX_VAL+2)
+
+
+extern const int nr_of_sfb_block[6][3][4];
+extern const char pretab[SBMAX_l];
+extern const char slen1_tab[16];
+extern const char slen2_tab[16];
+
+extern const scalefac_struct sfBandIndex[9];
+
+extern FLOAT8 pow43[PRECALC_SIZE];
+extern FLOAT8 adj43[PRECALC_SIZE];
+extern FLOAT8 adj43asm[PRECALC_SIZE];
+
+#define Q_MAX 330
+
+extern FLOAT8 pow20[Q_MAX];
+extern FLOAT8 ipow20[Q_MAX];
+
+typedef struct calc_noise_result_t {
+    int     over_count;      /* number of quantization noise > masking */
+    int     tot_count;       /* all */
+    FLOAT8  over_noise;      /* sum of quantization noise > masking */
+    FLOAT8  tot_noise;       /* sum of all quantization noise */
+    FLOAT8  max_noise;       /* max quantization noise */
+    float   klemm_noise;
+    FLOAT8  dist_l[SBMAX_l];
+    FLOAT8  dist_s[3][SBMAX_s];
+} calc_noise_result;
+
+void    compute_ath (lame_global_flags * gfp, FLOAT8 ATH_l[SBPSY_l],
+                     FLOAT8 ATH_s[SBPSY_l]);
+
+void    ms_convert (FLOAT8 xr[2][576], FLOAT8 xr_org[2][576]);
+
+int     on_pe (lame_global_flags *gfp, FLOAT8 pe[2][2], III_side_info_t * l3_side,
+               int targ_bits[2], int mean_bits, int gr);
+
+void    reduce_side (int targ_bits[2], FLOAT8 ms_ener_ratio, int mean_bits,
+                     int max_bits);
+
+
+int     bin_search_StepSize (lame_internal_flags * gfc, gr_info * cod_info,
+                             int desired_rate, int start,
+                             const FLOAT8 xrpow[576], int l3enc[576]);
+
+int     inner_loop (lame_internal_flags * gfc, gr_info * cod_info, int max_bits,
+                    const FLOAT8 xrpow[576], int l3enc[576]);
+
+void    iteration_init (lame_global_flags *gfp);
+
+
+int     calc_xmin (lame_global_flags *gfp, const FLOAT8 xr[576],
+                   const III_psy_ratio * ratio, const gr_info * cod_info,
+                   III_psy_xmin * l3_xmin);
+
+int     calc_noise (const lame_internal_flags * gfc, const FLOAT8 xr[576],
+                    const int ix[576], const gr_info * cod_info,
+                    const III_psy_xmin * l3_xmin,
+                    const III_scalefac_t * scalefac,
+                    III_psy_xmin * distort, calc_noise_result * res);
+
+void    set_frame_pinfo (lame_global_flags *gfp, FLOAT8 xr[2][2][576],
+                         III_psy_ratio ratio[2][2], int l3_enc[2][2][576],
+                         III_scalefac_t scalefac[2][2]);
+
+
+void    quantize_xrpow (const FLOAT8 xr[576], int ix[576], FLOAT8 istep);
+
+void    quantize_xrpow_ISO (const FLOAT8 xr[576], int ix[576], FLOAT8 istep);
+
+
+
+/* takehiro.c */
+
+int     count_bits (lame_internal_flags * gfc, int *ix, const FLOAT8 xr[576],
+                    gr_info * cod_info);
+
+
+void    best_huffman_divide (const lame_internal_flags * gfc, int gr, int ch,
+                             gr_info * cod_info, int *ix);
+
+void    best_scalefac_store (const lame_internal_flags * gfc, int gr, int ch,
+                             int l3_enc[2][2][576], III_side_info_t * l3_side,
+                             III_scalefac_t scalefac[2][2]);
+
+int     scale_bitcount (III_scalefac_t * scalefac, gr_info * cod_info);
+
+int     scale_bitcount_lsf (const lame_internal_flags *gfp, const III_scalefac_t * scalefac,
+                            gr_info * cod_info);
+
+void    huffman_init (lame_internal_flags * gfc);
+
+#define LARGE_BITS 100000
+
+#endif /* LAME_QUANTIZE_PVT_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/reservoir.c
@@ -1,0 +1,266 @@
+/*
+ *	bit reservoir source file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: reservoir.c,v 1.14 2001/01/05 15:20:33 aleidinger Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include "util.h"
+#include "reservoir.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+/*
+  ResvFrameBegin:
+  Called (repeatedly) at the beginning of a frame. Updates the maximum
+  size of the reservoir, and checks to make sure main_data_begin
+  was set properly by the formatter
+*/
+
+/*
+ *  Background information:
+ *
+ *  This is the original text from the ISO standard. Because of 
+ *  sooo many bugs and irritations correcting comments are added 
+ *  in brackets []. A '^W' means you should remove the last word.
+ *
+ *  1) The following rule can be used to calculate the maximum 
+ *     number of bits used for one granule [^W frame]: 
+ *     At the highest possible bitrate of Layer III (320 kbps 
+ *     per stereo signal [^W^W^W], 48 kHz) the frames must be of
+ *     [^W^W^W are designed to have] constant length, i.e. 
+ *     one buffer [^W^W the frame] length is:
+ *
+ *         320 kbps * 1152/48 kHz = 7680 bit = 960 byte
+ *
+ *     This value is used as the maximum buffer per channel [^W^W] at 
+ *     lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps 
+ *     stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit
+ *     [per granule and channel] at 48 kHz sampling frequency. 
+ *     This means that there is a maximum deviation (short time buffer 
+ *     [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps. 
+ *     The actual deviation is equal to the number of bytes [with the 
+ *     meaning of octets] denoted by the main_data_end offset pointer. 
+ *     The actual maximum deviation is (2^9-1)*8 bit = 4088 bits 
+ *     [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].
+ *     ... The xchange of buffer bits between the left and right channel
+ *     is allowed without restrictions [exception: dual channel].
+ *     Because of the [constructed] constraint on the buffer size
+ *     main_data_end is always set to 0 in the case of bit_rate_index==14, 
+ *     i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case 
+ *     all data are allocated between adjacent header [^W sync] words 
+ *     [, i.e. there is no buffering at all].
+ */
+
+int
+ResvFrameBegin(lame_global_flags *gfp,III_side_info_t *l3_side, int mean_bits, int frameLength )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    int fullFrameBits;
+    int resvLimit;
+    int maxmp3buf;
+
+/*
+ *  Meaning of the variables:
+ *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))
+ *          Number of bits can be stored in previous frame(s) due to 
+ *          counter size constaints
+ *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))
+ *          Number of bits allowed to encode one frame (you can take 8*511 bit 
+ *          from the bit reservoir and at most 8*1440 bit from the current 
+ *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible 
+ *          value for MPEG-1 and -2)
+ *      fullFrameBits:
+ *
+ *      mean_bits:
+ *
+ *      frameLength:
+ *
+ *      gfc->ResvMax:
+ *
+ *      gfc->ResvSize:
+ *
+ *      l3_side->resvDrain_pre:
+ *
+ */
+
+    /* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */
+    resvLimit = (gfp->version==1) ? 8*511 : 8*255 ;
+
+
+    /* maximum allowed frame size */
+    maxmp3buf = (gfp->strict_ISO) ? 8*960 : 8*2047;
+
+    if ( frameLength > maxmp3buf ||  gfp->disable_reservoir ) {
+	gfc->ResvMax = 0;
+    } else {
+	gfc->ResvMax = maxmp3buf - frameLength;
+	if ( gfc->ResvMax > resvLimit )
+	  gfc->ResvMax = resvLimit;
+    }
+
+    fullFrameBits = mean_bits * gfc->mode_gr + Min ( gfc->ResvSize, gfc->ResvMax );
+    
+    if ( gfp->strict_ISO  &&  fullFrameBits > maxmp3buf )
+        fullFrameBits = maxmp3buf;
+
+    assert ( 0 == gfc->ResvMax % 8 );
+    assert ( gfc->ResvMax >= 0 );
+
+    l3_side->resvDrain_pre = 0;
+
+    if ( gfc->pinfo != NULL ) {
+        gfc->pinfo->mean_bits = mean_bits / 2;  /* expected bits per channel per granule [is this also right for mono/stereo, MPEG-1/2 ?] */
+        gfc->pinfo->resvsize  = gfc->ResvSize;
+    }
+
+    return fullFrameBits;
+}
+
+
+/*
+  ResvMaxBits
+  returns targ_bits:  target number of bits to use for 1 granule
+         extra_bits:  amount extra available from reservoir
+  Mark Taylor 4/99
+*/
+void ResvMaxBits(lame_global_flags *gfp, int mean_bits, int *targ_bits, int *extra_bits)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int add_bits;
+  int full_fac;
+  
+  *targ_bits = mean_bits ;
+
+  /* extra bits if the reservoir is almost full */
+  full_fac=9;
+  if (gfc->ResvSize > ((gfc->ResvMax * full_fac) / 10)) {
+    add_bits= gfc->ResvSize-((gfc->ResvMax * full_fac) / 10);
+    *targ_bits += add_bits;
+  }else {
+    add_bits =0 ;
+    /* build up reservoir.  this builds the reservoir a little slower
+     * than FhG.  It could simple be mean_bits/15, but this was rigged
+     * to always produce 100 (the old value) at 128kbs */
+    /*    *targ_bits -= (int) (mean_bits/15.2);*/
+    if (!gfp->disable_reservoir) 
+      *targ_bits -= .1*mean_bits;
+  }
+
+
+  /* amount from the reservoir we are allowed to use. ISO says 6/10 */
+  *extra_bits =
+    (gfc->ResvSize  < (gfc->ResvMax*6)/10  ? gfc->ResvSize : (gfc->ResvMax*6)/10);
+  *extra_bits -= add_bits;
+
+  if (*extra_bits < 0) *extra_bits=0;
+
+
+}
+
+/*
+  ResvAdjust:
+  Called after a granule's bit allocation. Readjusts the size of
+  the reservoir to reflect the granule's usage.
+*/
+void
+ResvAdjust(lame_internal_flags *gfc,gr_info *gi, III_side_info_t *l3_side, int mean_bits )
+{
+  gfc->ResvSize += (mean_bits / gfc->channels_out) - gi->part2_3_length;
+#if 0
+  printf("part2_3_length:  %i  avg=%i  incres: %i  resvsize=%i\n",gi->part2_3_length,
+	 mean_bits/gfc->channels_out,
+mean_bits/gfc->channels_out-gi->part2_3_length,gfc->ResvSize);
+#endif
+}
+
+
+/*
+  ResvFrameEnd:
+  Called after all granules in a frame have been allocated. Makes sure
+  that the reservoir size is within limits, possibly by adding stuffing
+  bits.
+*/
+void
+ResvFrameEnd(lame_internal_flags *gfc, III_side_info_t *l3_side, int mean_bits)
+{
+    int stuffingBits;
+    int over_bits;
+
+
+    /* just in case mean_bits is odd, this is necessary... */
+    if ( gfc->channels_out == 2  &&  (mean_bits & 1) )
+	gfc->ResvSize += 1;
+
+    stuffingBits=0;
+    l3_side->resvDrain_post = 0;
+    l3_side->resvDrain_pre = 0;
+
+    /* we must be byte aligned */
+    if ( (over_bits = gfc->ResvSize % 8) != 0 )
+	stuffingBits += over_bits;
+
+
+    over_bits = (gfc->ResvSize - stuffingBits) - gfc->ResvMax;
+    if (over_bits > 0) {
+      assert ( 0 == over_bits % 8 );
+      assert ( over_bits >= 0 );
+      stuffingBits += over_bits;
+    }
+
+
+#define NEW_DRAINXX
+#ifdef NEW_DRAIN
+    /* drain as many bits as possible into previous frame ancillary data
+     * In particular, in VBR mode ResvMax may have changed, and we have
+     * to make sure main_data_begin does not create a reservoir bigger
+     * than ResvMax  mt 4/00*/
+  {
+    int mdb_bytes = Min(l3_side->main_data_begin*8,stuffingBits)/8;
+    l3_side->resvDrain_pre += 8*mdb_bytes;
+    stuffingBits -= 8*mdb_bytes;
+    gfc->ResvSize -= 8*mdb_bytes;
+    l3_side->main_data_begin -= mdb_bytes;
+
+
+    /* drain just enough to be byte aligned.  The remaining bits will
+     * be added to the reservoir, and we will deal with them next frame.
+     * If the next frame is at a lower bitrate, it may have a larger ResvMax,
+     * and we will not have to waste these bits!  mt 4/00 */
+    assert ( stuffingBits >= 0 );
+    l3_side->resvDrain_post += (stuffingBits % 8);
+    gfc->ResvSize -= stuffingBits % 8;
+  }
+#else
+    /* drain the rest into this frames ancillary data*/
+    l3_side->resvDrain_post += stuffingBits;
+    gfc->ResvSize -= stuffingBits;
+#endif
+
+    return;
+}
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/reservoir.h
@@ -1,0 +1,30 @@
+/*
+ *	bit reservoir include file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_RESERVOIR_H
+#define LAME_RESERVOIR_H
+
+int ResvFrameBegin(lame_global_flags *gfp,III_side_info_t *l3_side, int mean_bits, int frameLength );
+void ResvMaxBits(lame_global_flags *gfp, int mean_bits, int *targ_bits, int *max_bits);
+void ResvAdjust(lame_internal_flags *gfc,gr_info *gi, III_side_info_t *l3_side, int mean_bits );
+void ResvFrameEnd(lame_internal_flags *gfc,III_side_info_t *l3_side, int mean_bits );
+
+#endif /* LAME_RESERVOIR_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/set_get.c
@@ -1,0 +1,730 @@
+/* -*- mode: C; mode: fold -*- */
+/*
+ * set/get functions for lame_global_flags
+ *
+ * Copyright (c) 2001 Alexander Leidinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: set_get.c,v 1.2 2001/03/12 04:38:35 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include "lame.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+/*
+ * input stream description
+ */
+
+/* number of samples */
+/* it's unlikely for this function to return an error */
+int
+lame_set_num_samples( lame_global_flags*  gfp,
+                      unsigned long       num_samples)
+{
+    /* default = 2^32-1 */
+
+    gfp->num_samples = num_samples;
+
+    return 0;
+}
+
+unsigned long
+lame_get_num_samples( const lame_global_flags* gfp )
+{
+    return gfp->num_samples;
+}
+
+
+/* input samplerate */
+int
+lame_set_in_samplerate( lame_global_flags*  gfp,
+                        int                 in_samplerate )
+{
+    /* input sample rate in Hz,  default = 44100 Hz */
+    gfp->in_samplerate = in_samplerate;
+
+    return 0;
+}
+
+int
+lame_get_in_samplerate( const lame_global_flags*  gfp )
+{
+    return gfp->in_samplerate;
+}
+
+
+/* number of channels in input stream */
+int
+lame_set_num_channels( lame_global_flags*  gfp,
+                       int                 num_channels )
+{
+    /* default = 2 */
+
+    if ( 2 < num_channels || 0 == num_channels )
+        return -1;    /* we didn't support more than 2 channels */
+
+    gfp->num_channels = num_channels;
+
+    return 0;
+}
+
+int
+lame_get_num_channels( const lame_global_flags*  gfp )
+{
+    return gfp->num_channels;
+}
+
+
+/* scale the input by this amount before encoding (not used for decoding) */
+int
+lame_set_scale( lame_global_flags*  gfp,
+                float               scale )
+{
+    /* default = 0 */
+    gfp->scale = scale;
+
+    return 0;
+}
+
+float
+lame_get_scale( const lame_global_flags*  gfp )
+{
+    return gfp->scale;
+}
+
+
+/* output sample rate in Hz */
+int
+lame_set_out_samplerate( lame_global_flags*  gfp,
+                         int                 out_samplerate )
+{
+    /*
+     * default = 0: LAME picks best value based on the amount
+     *              of compression
+     * MPEG only allows:
+     *  MPEG1    32, 44.1,   48khz
+     *  MPEG2    16, 22.05,  24
+     *  MPEG2.5   8, 11.025, 12
+     *
+     * (not used by decoding routines)
+     */
+    gfp->out_samplerate = out_samplerate;
+
+    return 0;
+}
+
+int
+lame_get_out_samplerate( const lame_global_flags*  gfp )
+{
+    return gfp->out_samplerate;
+}
+
+
+
+
+/*
+ * general control parameters
+ */
+
+/*collect data for an MP3 frame analzyer */
+int
+lame_set_analysis( lame_global_flags*  gfp,
+                   int                 analysis )
+{
+    /* default = 0 */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > analysis || 1 < analysis )
+        return -1;
+
+    gfp->analysis = analysis;
+
+    return 0;
+}
+
+int
+lame_get_analysis( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->analysis && 1 >= gfp->analysis );
+
+    return gfp->analysis;
+}
+
+
+/* write a Xing VBR header frame */
+int
+lame_set_bWriteVbrTag( lame_global_flags*  gfp,
+                       int bWriteVbrTag )
+{
+    /* default = 1 (on) for VBR/ABR modes, 0 (off) for CBR mode */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > bWriteVbrTag || 1 < bWriteVbrTag )
+        return -1;
+
+    gfp->bWriteVbrTag = bWriteVbrTag;
+
+    return 0;
+}
+
+int
+lame_get_bWriteVbrTag( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->bWriteVbrTag && 1 >= gfp->bWriteVbrTag );
+
+    return gfp->bWriteVbrTag;
+}
+
+
+/* disable writing a wave header with *decoding* */
+int
+lame_set_disable_waveheader( lame_global_flags*  gfp,
+                             int                 disable_waveheader )
+{
+    /* default = 0 (disabled) */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > disable_waveheader || 1 < disable_waveheader )
+        return -1;
+
+    gfp->disable_waveheader = disable_waveheader;
+
+    return 0;
+}
+
+int
+lame_get_disable_waveheader( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->disable_waveheader && 1 >= gfp->disable_waveheader );
+
+    return gfp->disable_waveheader;
+}
+
+
+/* decode only, use lame/mpglib to convert mp3/ogg to wav */
+int
+lame_set_decode_only( lame_global_flags*  gfp,
+                      int                 decode_only )
+{
+    /* default = 0 (disabled) */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > decode_only || 1 < decode_only )
+        return -1;
+
+    gfp->decode_only = decode_only;
+
+    return 0;
+}
+
+int
+lame_get_decode_only( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->decode_only && 1 >= gfp->decode_only );
+
+    return gfp->decode_only;
+}
+
+
+/* encode a Vorbis .ogg file */
+int
+lame_set_ogg( lame_global_flags*  gfp,
+              int                 ogg )
+{
+    /* default = 0 (disabled) */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > ogg || 1 < ogg )
+        return -1;
+
+    gfp->ogg = ogg;
+
+    return 0;
+}
+
+int
+lame_get_ogg( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->ogg && 1 >= gfp->ogg );
+
+    return gfp->ogg;
+}
+
+
+/*
+ * Internal algorithm selection.
+ * True quality is determined by the bitrate but this variable will effect
+ * quality by selecting expensive or cheap algorithms.
+ * quality=0..9.  0=best (very slow).  9=worst.  
+ * recommended:  2     near-best quality, not too slow
+ *               5     good quality, fast
+ *               7     ok quality, really fast
+ */
+int
+lame_set_quality( lame_global_flags*  gfp,
+                  int                 quality )
+{
+    gfp->quality = quality;
+
+    return 0;
+}
+
+int
+lame_get_quality( const lame_global_flags*  gfp )
+{
+    return gfp->quality;
+}
+
+
+/* mode = STEREO, JOINT_STEREO, DUAL_CHANNEL (not supported), MONO */
+int
+lame_set_mode( lame_global_flags*  gfp,
+               MPEG_mode           mode )
+{
+    /* default: lame chooses based on compression ratio and input channels */
+
+    if( 0 > mode || MAX_INDICATOR <= mode )
+        return -1;  /* Unknown MPEG mode! */
+
+    gfp->mode = mode;
+
+    return 0;
+}
+
+MPEG_mode
+lame_get_mode( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->mode && MAX_INDICATOR > gfp->mode );
+
+    return gfp->mode;
+}
+
+
+/* Us a M/S mode with a switching threshold based on compression ratio */
+int
+lame_set_mode_automs( lame_global_flags*  gfp,
+                      int                 mode_automs )
+{
+    /* default = 0 (disabled) */
+
+    /* enforce disable/enable meaning, if we need more than two values
+       we need to switch to an enum to have an apropriate representation
+       of the possible meanings of the value */
+    if ( 0 > mode_automs || 1 < mode_automs )
+        return -1;
+
+    gfp->mode_automs = mode_automs;
+
+    return 0;
+}
+
+int
+lame_get_mode_automs( const lame_global_flags*  gfp )
+{
+    assert( 0 <= gfp->mode_automs && 1 >= gfp->mode_automs );
+
+    return gfp->mode_automs;
+}
+
+
+// force_ms.  Force M/S for all frames.  For testing only.
+// default = 0 (disabled)
+int
+lame_set_force_ms( lame_global_flags*  gfp,
+                   int                 force_ms );
+int
+lame_get_force_ms( const lame_global_flags*  gfp );
+
+
+// use free_format?  default = 0 (disabled)
+int
+lame_set_free_format( lame_global_flags*  gfp,
+                      int                 free_format );
+int
+lame_get_free_format( const lame_global_flags*  gfp );
+
+
+/* message handlers */
+int
+lame_set_errorf( lame_global_flags*  gfp,
+                 void                (*func)( const char*, va_list ) )
+{
+    gfp->report.errorf = func;
+
+    return 0;
+}
+
+int
+lame_set_debugf( lame_global_flags*  gfp,
+                 void                (*func)( const char*, va_list ) )
+{
+    gfp->report.debugf = func;
+
+    return 0;
+}
+
+int
+lame_set_msgf( lame_global_flags*  gfp,
+               void                (*func)( const char *, va_list ) )
+{
+    gfp->report.msgf = func;
+
+    return 0;
+}
+
+
+/* set one of brate compression ratio.  default is compression ratio of 11.  */
+int
+lame_set_brate( lame_global_flags*  gfp,
+                int                 brate );
+int
+lame_get_brate( const lame_global_flags*  gfp );
+int
+lame_set_compression_ratio( lame_global_flags*  gfp,
+                            float               compression_ratio );
+float
+lame_get_compression_ratio( const lame_global_flags*  gfp );
+
+
+
+
+/*
+ * frame parameters
+ */
+
+// mark as copyright.  default=0
+int
+lame_set_copyright( lame_global_flags*  gfp,
+                    int                 copyright );
+int
+lame_get_copyright( const lame_global_flags*  gfp );
+
+
+// mark as original.  default=1
+int
+lame_set_original( lame_global_flags*  gfp,
+                   int                 original );
+int
+lame_get_original( const lame_global_flags*  gfp );
+
+
+// error_protection.  Use 2 bytes from each fraome for CRC checksum. default=0
+int
+lame_set_error_protection( lame_global_flags*  gfp,
+                           int                 error_protection );
+int
+lame_get_error_protection( const lame_global_flags*  gfp );
+
+
+// padding_type.  0=pad no frames  1=pad all frames 2=adjust padding(default)
+int
+lame_set_padding_type( lame_global_flags*  gfp,
+                       int                 padding_type );
+int
+lame_get_padding_type( const lame_global_flags*  gfp );
+
+
+// MP3 'private extension' bit  Meaningless
+int
+lame_set_extension( lame_global_flags*  gfp,
+                    int                 extension );
+int
+lame_get_extension( const lame_global_flags*  gfp );
+
+
+// enforce strict ISO compliance.  default=0
+int
+lame_set_strict_ISO( lame_global_flags*  gfp,
+                     int                 strict_ISO );
+int
+lame_get_strict_ISO( const lame_global_flags*  gfp );
+ 
+
+
+
+/********************************************************************
+ * quantization/noise shaping 
+ ***********************************************************************/
+
+// disable the bit reservoir. For testing only. default=0
+int
+lame_set_disable_reservoir( lame_global_flags*  gfp,
+                            int                 disable_reservoir );
+int
+lame_get_disable_reservoir( const lame_global_flags*  gfp );
+
+
+// select a different "best quantization" function. default=0 
+int
+lame_set_experimentalX( lame_global_flags*  gfp,
+                        int                 experimentalX );
+int
+lame_get_experimentalX( const lame_global_flags*  gfp );
+
+
+// another experimental option.  for testing only
+int
+lame_set_experimentalY( lame_global_flags*  gfp,
+                        int                 experimentalY );
+int
+lame_get_experimentalY( const lame_global_flags*  gfp );
+
+
+// another experimental option.  for testing only
+int
+lame_set_experimentalZ( lame_global_flags*  gfp,
+                        int                 experimentalZ );
+int
+lame_get_experimentalZ( const lame_global_flags*  gfp );
+
+
+// Naoki's psycho acoustic model.  default=0
+int
+lame_set_exp_nspsytune( lame_global_flags*  gfp,
+                        int                 exp_nspsytune );
+int
+lame_get_exp_nspsytune( const lame_global_flags*  gfp );
+
+
+
+
+/********************************************************************
+ * VBR control
+ ***********************************************************************/
+
+// Types of VBR.  default = vbr_off = CBR
+int
+lame_set_VBR( lame_global_flags*  gfp,
+              vbr_mode            VBR );
+vbr_mode
+lame_get_exp_VBR( const lame_global_flags*  gfp );
+
+
+// VBR quality level.  0=highest  9=lowest 
+int
+lame_set_VBR_q( lame_global_flags*  gfp,
+                int                 VBR_q );
+int
+lame_get_VBR_q( const lame_global_flags*  gfp );
+
+
+// Ignored except for VBR=vbr_abr (ABR mode)
+int
+lame_set_VBR_mean_bitrate_kbps( lame_global_flags*  gfp,
+                                int                 VBR_mean_bitrate_kbps );
+int
+lame_get_VBR_mean_bitrate_kbps( const lame_global_flags*  gfp );
+
+int
+lame_set_VBR_min_bitrate_kbps( lame_global_flags*  gfp,
+                               int                 VBR_min_bitrate_kbps );
+int
+lame_get_VBR_min_bitrate_kbps( const lame_global_flags*  gfp );
+
+int
+lame_set_VBR_max_bitrate_kbps( lame_global_flags*  gfp,
+                               int                 VBR_max_bitrate_kbps );
+int
+lame_get_VBR_max_bitrate_kbps( const lame_global_flags*  gfp );
+
+
+// 1=stricetly enforce VBR_min_bitrate.  Normally it will be violated for
+// analog silence
+int
+lame_set_VBR_hard_min( lame_global_flags*  gfp,
+                       int                 VBR_hard_min );
+int
+lame_get_VBR_hard_min( const lame_global_flags*  gfp );
+
+
+/********************************************************************
+ * Filtering control
+ ***********************************************************************/
+
+// freq in Hz to apply lowpass. Default = 0 = lame chooses.  -1 = disabled
+int
+lame_set_lowpassfreq( lame_global_flags*  gfp,
+                      int                 lowpassfreq );
+int
+lame_get_lowpassfreq( const lame_global_flags*  gfp );
+
+
+// width of transition band, in Hz.  Default = one polyphase filter band
+int
+lame_set_lowpasswidth( lame_global_flags*  gfp,
+                       int                 lowpasswidth );
+int
+lame_get_lowpasswidth( const lame_global_flags*  gfp );
+
+
+// freq in Hz to apply highpass. Default = 0 = lame chooses.  -1 = disabled
+int
+lame_set_highpassfreq( lame_global_flags*  gfp,
+                       int                 highpassfreq );
+int
+lame_get_highpassfreq( const lame_global_flags*  gfp );
+
+
+// width of transition band, in Hz.  Default = one polyphase filter band
+int
+lame_set_highpasswidth( lame_global_flags*  gfp,
+                        int                 highpasswidth );
+int
+lame_get_highpasswidth( const lame_global_flags*  gfp );
+
+
+
+
+/*
+ * psycho acoustics and other arguments which you should not change 
+ * unless you know what you are doing
+ */
+
+// only use ATH for masking
+int
+lame_set_ATHonly( lame_global_flags*  gfp,
+                  int                 ATHonly );
+int
+lame_get_ATHonly( const lame_global_flags*  gfp );
+
+
+// only use ATH for short blocks
+int
+lame_set_ATHshort( lame_global_flags*  gfp,
+                   int                 ATHshort );
+int
+lame_get_ATHshort( const lame_global_flags*  gfp );
+
+
+// disable ATH
+int
+lame_set_noATH( lame_global_flags*  gfp,
+                int                 noATH );
+int
+lame_get_noATH( const lame_global_flags*  gfp );
+
+
+// select ATH formula
+int
+lame_set_ATHtype( lame_global_flags*  gfp,
+                  int                 ATHtype );
+int
+lame_get_ATHtype( const lame_global_flags*  gfp );
+
+
+// lower ATH by this many db
+int
+lame_set_ATHlower( lame_global_flags*  gfp,
+                   float               ATHlower );
+float
+lame_get_ATHlower( const lame_global_flags*  gfp );
+
+
+// predictability limit (ISO tonality formula)
+int
+lame_set_cwlimit( lame_global_flags*  gfp,
+                  int                 cwlimit );
+int
+lame_get_cwlimit( const lame_global_flags*  gfp );
+
+
+// allow blocktypes to differ between channels?
+// default: 0 for jstereo, 1 for stereo
+int
+lame_set_allow_diff_short( lame_global_flags*  gfp,
+                           int                 allow_diff_short );
+int
+lame_get_allow_diff_short( const lame_global_flags*  gfp );
+
+
+// use temporal masking effect (default = 1)
+int
+lame_set_useTemporal( lame_global_flags*  gfp,
+                      int                 useTemporal );
+int
+lame_get_useTemporal( const lame_global_flags*  gfp );
+
+
+// disable short blocks
+int
+lame_set_no_short_blocks( lame_global_flags*  gfp,
+                          int                 no_short_blocks );
+int
+lame_get_no_short_blocks( const lame_global_flags*  gfp );
+
+
+/* Input PCM is emphased PCM (for instance from one of the rarely
+   emphased CDs), it is STRONGLY not recommended to use this, because
+   psycho does not take it into account, and last but not least many decoders
+   ignore these bits */
+int
+lame_set_emphasis( lame_global_flags*  gfp,
+                   int                 emphasis );
+int
+lame_get_emphasis( const lame_global_flags*  gfp );
+
+
+
+
+/***************************************************************/
+/* internal variables, cannot be set...                        */
+/* provided because they may be of use to calling application  */
+/***************************************************************/
+
+// version  0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)    
+int
+lame_get_version( const lame_global_flags* gfp );
+
+
+// encoder delay
+int
+lame_get_encoder_delay( const lame_global_flags*  gfp );
+
+
+// size of MPEG frame
+int
+lame_get_framesize( const lame_global_flags*  gfp );
+
+
+// number of frames encoded so far
+int
+lame_get_frameNum( const lame_global_flags*  gfp );
+
+
+// lame's estimate of the total number of frames to be encoded
+// only valid if calling program set num_samples 
+int
+lame_get_totalframes( const lame_global_flags*  gfp );
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/tables.c
@@ -1,0 +1,509 @@
+/*
+ *	MPEG layer 3 tables source file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: tables.c,v 1.17 2001/03/12 20:40:36 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "util.h"
+#include "tables.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+static const short      t1HB[]   = {
+  1, 1, 
+  1, 0};
+
+static const short      t2HB[]   = {
+  1, 2, 1,
+  3, 1, 1,
+  3, 2, 0};
+
+static const short      t3HB[]   = {
+  3, 2, 1,
+  1, 1, 1,
+  3, 2, 0};
+
+static const short      t5HB[]   = {
+  1, 2, 6, 5,
+  3, 1, 4, 4,
+  7, 5, 7, 1,
+  6, 1, 1, 0};
+
+static const short      t6HB[]   = {
+  7, 3, 5, 1,
+  6, 2, 3, 2,
+  5, 4, 4, 1,
+  3, 3, 2, 0};
+
+static const short      t7HB[]   = {
+   1, 2,10,19,16,10,
+   3, 3, 7,10, 5, 3,
+  11, 4,13,17, 8, 4,
+  12,11,18,15,11, 2,
+   7, 6, 9,14, 3, 1,
+   6, 4, 5, 3, 2, 0};
+
+static const short      t8HB[]   = {
+  3, 4, 6, 18,12, 5,
+  5, 1, 2, 16, 9, 3,
+  7, 3, 5, 14, 7, 3,
+ 19,17,15, 13,10, 4,
+ 13, 5, 8, 11, 5, 1,
+ 12, 4, 4,  1, 1, 0};
+
+static const short      t9HB[]   = {
+  7, 5, 9, 14, 15, 7,
+  6, 4, 5,  5,  6, 7,
+  7, 6, 8,  8,  8, 5,
+ 15, 6, 9, 10,  5, 1,
+ 11, 7, 9,  6,  4, 1,
+ 14, 4, 6,  2,  6, 0};
+
+static const short      t10HB[]   = {
+  1, 2, 10, 23, 35, 30, 12, 17,
+  3, 3,  8, 12, 18, 21, 12,  7,
+ 11, 9, 15, 21, 32, 40, 19,  6,
+ 14,13, 22, 34, 46, 23, 18,  7,
+ 20,19, 33, 47, 27, 22,  9,  3,
+ 31,22, 41, 26, 21, 20,  5,  3,
+ 14,13, 10, 11, 16,  6,  5,  1,
+  9, 8,  7,  8,  4,  4,  2,  0};
+
+static const short      t11HB[]   = {
+  3, 4, 10, 24, 34, 33, 21, 15,
+  5, 3,  4, 10, 32, 17, 11, 10,
+ 11, 7, 13, 18, 30, 31, 20,  5,
+ 25,11, 19, 59, 27, 18, 12,  5,
+ 35,33, 31, 58, 30, 16,  7,  5,
+ 28,26, 32, 19, 17, 15,  8, 14,
+ 14,12,  9, 13, 14,  9,  4,  1,
+ 11, 4,  6,  6,  6,  3,  2,  0};
+
+static const short      t12HB[]   = {
+  9,  6, 16, 33, 41, 39, 38,26,
+  7,  5,  6,  9, 23, 16, 26,11,
+ 17,  7, 11, 14, 21, 30, 10, 7,
+ 17, 10, 15, 12, 18, 28, 14, 5,
+ 32, 13, 22, 19, 18, 16,  9, 5,
+ 40, 17, 31, 29, 17, 13,  4, 2,
+ 27, 12, 11, 15, 10,  7,  4, 1,
+ 27, 12,  8, 12,  6,  3,  1, 0};
+
+static const short      t13HB[]   = {
+  1,  5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,
+  3,  4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,
+ 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,
+ 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,
+ 35, 16, 60, 57, 97, 75,114, 91, 54, 73, 55, 41, 48, 53, 23, 24,
+ 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,
+ 47, 45, 78, 74,115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,
+ 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,
+ 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,
+ 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,
+ 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,
+ 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14,  9,  7,
+ 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17,  9,  5,
+ 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10,  7,  6,  3,
+ 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10,  6,  1,  4,  2,
+ 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16,  8,  1,  1,  0,  1};
+
+static const short      t15HB[]   = {
+   7, 12, 18, 53, 47, 76,124,108, 89,123,108,119,107, 81,122, 63,
+  13,  5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,
+  19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,
+  29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,
+  52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,
+  77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,
+ 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,
+ 109, 53, 49, 94, 88, 75, 66,122, 91, 73, 56, 42, 64, 44, 21, 25,
+  90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,
+  71, 34, 67, 60, 58, 49, 88, 76, 67,106, 71, 54, 38, 39, 23, 15,
+ 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62,  9,
+  86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11, 
+ 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14,  7,
+  91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14,  8,  9,  3,
+ 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10,  2,  1,
+  71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10,  6,  8,  6,  2,  0};
+
+static const short      t16HB[]   = {
+   1,   5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,
+   3,   4, 12, 20, 35, 62,  53, 47,  83,  75,  68, 119, 201, 107, 207,  9,
+  15,  13, 23, 38, 67, 58, 103, 90, 161,  72, 127, 117, 110, 209, 206, 16,
+  45,  21, 39, 69, 64,114,  99, 87, 158, 140, 252, 212, 199, 387, 365, 26,
+  75,  36, 68, 65,115,101, 179,164, 155, 264, 246, 226, 395, 382, 362,  9,
+  66,  30, 59, 56,102,185, 173,265, 142, 253, 232, 400, 388, 378, 445, 16,
+ 111,  54, 52,100,184,178, 160,133, 257, 244, 228, 217, 385, 366, 715, 10,
+  98,  48, 91, 88,165,157, 148,261, 248, 407, 397, 372, 380, 889, 884,  8,
+  85,  84, 81,159,156,143, 260,249, 427, 401, 392, 383, 727, 713, 708,  7,
+ 154,  76, 73,141,131,256, 245,426, 406, 394, 384, 735, 359, 710, 352, 11,
+ 139, 129, 67,125,247,233, 229,219, 393, 743, 737, 720, 885, 882, 439,  4,
+ 243, 120,118,115,227,223, 396,746, 742, 736, 721, 712, 706, 223, 436,  6,
+ 202, 224,222,218,216,389, 386,381, 364, 888, 443, 707, 440, 437,1728,  4,
+ 747, 211,210,208,370,379, 734,723, 714,1735, 883, 877, 876,3459, 865,  2,
+ 377, 369,102,187,726,722, 358,711, 709, 866,1734, 871,3458, 870, 434,  0,
+  12,  10,  7, 11, 10, 17,  11,  9,  13,  12,  10,   7,   5,   3,   1,  3};
+
+static const short      t24HB[]   = {
+   15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,
+   14, 12, 21, 38,  71, 130, 122, 216, 209, 198, 327, 345, 319, 297,  279, 42,
+   47, 22, 41, 74,  68, 128, 120, 221, 207, 194, 182, 340, 315, 295,  541, 18,
+   81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293,  271, 16,
+  147, 72, 69,135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285,  540, 14,
+  263, 66,129,126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281,  262, 12,
+  249,123,121,117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272,  520, 10,
+  435,115,111,109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531,  381, 17,
+  427,212,208,205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514,  377, 16,
+  335,199,197,191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379,  371, 11,
+  668,184,183,179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373,  366, 10,
+  652,346,171,168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368,  362,  6,
+  648,322,316,312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364,  359,  4,
+  620,300,296,294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361,  357,  2,
+ 1033,280,278,274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358,  356,  0,
+   43, 20, 19, 17,  15,  13,  11,   9,   7,   6,   4,   7,   5,   3,    1,  3};
+
+static const short      t32HB[]   = {
+  1 << 0,  5 << 1,  4 << 1,  5 << 2,  6 << 1,  5 << 2,  4 << 2,  4 << 3,
+  7 << 1,  3 << 2,  6 << 2,  0 << 3,  7 << 2,  2 << 3,  3 << 3,  1 << 4};
+
+static const short      t33HB[]   = {
+ 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2,  9 << 2,  8 << 3,
+  7 << 1,  6 << 2,  5 << 2,  4 << 3,  3 << 2,  2 << 3,  1 << 3,  0 << 4};
+
+
+const  char t1l[] = {
+ 1,  4, 
+ 3,  5};
+
+const  char t2l[] = {
+ 1,  4,  7, 
+ 4,  5,  7, 
+ 6,  7,  8};
+
+const  char t3l[] = {
+ 2,  3,  7, 
+ 4,  4,  7, 
+ 6,  7,  8};
+
+const  char t5l[] = {
+ 1,  4,  7,  8, 
+ 4,  5,  8,  9, 
+ 7,  8,  9, 10, 
+ 8,  8,  9, 10};
+
+const  char t6l[] = {
+ 3,  4,  6,  8, 
+ 4,  4,  6,  7, 
+ 5,  6,  7,  8, 
+ 7,  7,  8,  9};
+
+const  char t7l[] = {
+ 1,  4,  7,  9,  9, 10, 
+ 4,  6,  8,  9,  9, 10, 
+ 7,  7,  9, 10, 10, 11, 
+ 8,  9, 10, 11, 11, 11, 
+ 8,  9, 10, 11, 11, 12, 
+ 9, 10, 11, 12, 12, 12};
+
+const  char t8l[] = {
+ 2,  4,  7,  9,  9, 10, 
+ 4,  4,  6, 10, 10, 10, 
+ 7,  6,  8, 10, 10, 11, 
+ 9, 10, 10, 11, 11, 12, 
+ 9,  9, 10, 11, 12, 12, 
+10, 10, 11, 11, 13, 13};
+
+const  char t9l[] = {
+ 3,  4,  6,  7,  9, 10, 
+ 4,  5,  6,  7,  8, 10, 
+ 5,  6,  7,  8,  9, 10, 
+ 7,  7,  8,  9,  9, 10, 
+ 8,  8,  9,  9, 10, 11, 
+ 9,  9, 10, 10, 11, 11};
+
+const  char t10l[] = {
+ 1,  4,  7,  9, 10, 10, 10, 11, 
+ 4,  6,  8,  9, 10, 11, 10, 10, 
+ 7,  8,  9, 10, 11, 12, 11, 11, 
+ 8,  9, 10, 11, 12, 12, 11, 12, 
+ 9, 10, 11, 12, 12, 12, 12, 12, 
+10, 11, 12, 12, 13, 13, 12, 13, 
+ 9, 10, 11, 12, 12, 12, 13, 13, 
+10, 10, 11, 12, 12, 13, 13, 13};
+
+const  char t11l[] = {
+ 2,  4,  6,  8,  9, 10,  9, 10, 
+ 4,  5,  6,  8, 10, 10,  9, 10, 
+ 6,  7,  8,  9, 10, 11, 10, 10, 
+ 8,  8,  9, 11, 10, 12, 10, 11, 
+ 9, 10, 10, 11, 11, 12, 11, 12, 
+ 9, 10, 11, 12, 12, 13, 12, 13, 
+ 9,  9,  9, 10, 11, 12, 12, 12, 
+ 9,  9, 10, 11, 12, 12, 12, 12};
+
+const  char t12l[] = {
+ 4,  4,  6,  8,  9, 10, 10, 10, 
+ 4,  5,  6,  7,  9,  9, 10, 10, 
+ 6,  6,  7,  8,  9, 10,  9, 10, 
+ 7,  7,  8,  8,  9, 10, 10, 10, 
+ 8,  8,  9,  9, 10, 10, 10, 11, 
+ 9,  9, 10, 10, 10, 11, 10, 11, 
+ 9,  9,  9, 10, 10, 11, 11, 12, 
+10, 10, 10, 11, 11, 11, 11, 12};
+
+const  char t13l[] = {
+ 1,  5,  7,  8,  9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14, 
+ 4,  6,  8,  9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14, 
+ 7,  8,  9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15, 
+ 8,  9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, 
+ 9,  9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16, 
+10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16, 
+10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 
+11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18, 
+10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17, 
+11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17, 
+11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19, 
+12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18, 
+12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18, 
+13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18, 
+14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18, 
+13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18};
+
+const  char t15l[] = {
+ 3,  5,  6,  8,  8,  9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14, 
+ 5,  5,  7,  8,  9,  9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 
+ 6,  7,  7,  8,  9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 
+ 7,  8,  8,  9,  9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 
+ 8,  8,  9,  9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 
+ 9,  9,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14, 
+10,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 
+10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14, 
+10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 
+10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 
+11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14, 
+11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 
+12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 
+12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 
+13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15, 
+13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15};
+
+const  char t16_5l[] = {
+ 1,  5,  7,  9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11, 
+ 4,  6,  8,  9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11, 
+ 7,  8,  9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12, 
+ 9,  9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13, 
+10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12, 
+10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13, 
+11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13, 
+11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13, 
+11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13, 
+12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14, 
+12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13, 
+13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14, 
+13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14, 
+15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14, 
+14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14, 
+11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12};
+
+const  char t16l[] = {
+ 1,  5,  7,  9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10, 
+ 4,  6,  8,  9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10, 
+ 7,  8,  9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11, 
+ 9,  9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12, 
+10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11, 
+10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12, 
+11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12, 
+11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12, 
+11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12, 
+12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13, 
+12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12, 
+13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13, 
+13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13, 
+15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13, 
+14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13, 
+10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10};
+
+const  char t24l[] = {
+ 4,  5,  7,  8,  9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10, 
+ 5,  6,  7,  8,  9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10, 
+ 7,  7,  8,  9,  9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13,  9, 
+ 8,  8,  9,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12,  9, 
+ 9,  9,  9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13,  9, 
+10,  9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12,  9, 
+10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13,  9, 
+11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10, 
+11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10, 
+11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10, 
+12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, 
+12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, 
+12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10, 
+12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10, 
+13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10, 
+ 9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10,  6};
+
+const  char t32l[]  = {
+  1+0,  4+1,  4+1,  5+2,  4+1,  6+2,  5+2,  6+3,
+  4+1,  5+2,  5+2,  6+3,  5+2,  6+3,  6+3,  6+4};
+
+const  char t33l[]  = {
+  4+0,  4+1,  4+1,  4+2,  4+1,  4+2,  4+2,  4+3,
+  4+1,  4+2,  4+2,  4+3,  4+2,  4+3,  4+3,  4+4};
+
+
+const struct huffcodetab ht[HTN] =
+{
+  /* xlen, linmax, table, hlen */
+  { 0,   0,NULL,NULL},
+  { 2,   0,t1HB, t1l},
+  { 3,   0,t2HB, t2l},
+  { 3,   0,t3HB, t3l},
+  { 0,   0,NULL,NULL},/* Apparently not used */
+  { 4,   0,t5HB, t5l},
+  { 4,   0,t6HB, t6l},
+  { 6,   0,t7HB, t7l},
+  { 6,   0,t8HB, t8l},
+  { 6,   0,t9HB, t9l},
+  { 8,   0,t10HB, t10l},
+  { 8,   0,t11HB, t11l},
+  { 8,   0,t12HB, t12l},
+  {16,   0,t13HB, t13l},
+  { 0,   0,NULL,  t16_5l},/* Apparently not used */
+  {16,   0,t15HB, t15l},
+
+  { 1,   1,t16HB, t16l},
+  { 2,   3,t16HB, t16l},
+  { 3,   7,t16HB, t16l},
+  { 4,  15,t16HB, t16l},
+  { 6,  63,t16HB, t16l},
+  { 8, 255,t16HB, t16l},
+  {10,1023,t16HB, t16l},
+  {13,8191,t16HB, t16l},
+
+  { 4,  15,t24HB, t24l},
+  { 5,  31,t24HB, t24l},
+  { 6,  63,t24HB, t24l},
+  { 7, 127,t24HB, t24l},
+  { 8, 255,t24HB, t24l},
+  { 9, 511,t24HB, t24l},
+  {11,2047,t24HB, t24l},
+  {13,8191,t24HB, t24l},
+
+  { 0,   0,t32HB, t32l},
+  { 0,   0,t33HB, t33l},
+};
+
+
+
+
+
+/*  for (i = 0; i < 16*16; i++) {
+ *      largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];
+ *  }
+ */
+const unsigned int largetbl[16*16] = {
+0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,
+0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,
+0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,
+0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,
+0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,
+0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,
+0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,
+0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,
+0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,
+0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,
+0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,
+0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,
+0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,
+0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,
+0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,
+0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,
+0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,
+0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,
+0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,
+0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,
+0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,
+0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,
+0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,
+0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,
+0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,
+0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,
+0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,
+0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,
+0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,
+0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,
+0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,
+0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006
+};
+
+/*  for (i = 0; i < 3*3; i++) {
+ *      table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];
+ *  }
+ */
+const unsigned int table23[3*3] = {
+0x010002, 0x040003, 0x070007,
+0x040004, 0x050004, 0x070007, 
+0x060006, 0x070007, 0x080008
+};
+
+/*   for (i = 0; i < 4*4; i++) {
+ *       table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];
+ *   }
+ */
+const unsigned int table56[4*4] = {
+0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,
+0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009
+};
+
+
+
+/* 
+ * 0: MPEG-2 LSF
+ * 1: MPEG-1
+ * 2: MPEG-2.5 LSF FhG extention                  (1995-07-11 shn)
+ */
+
+typedef enum {
+    MPEG_2  = 0,
+    MPEG_1  = 1,
+    MPEG_25 = 2
+} MPEG_t;
+ 
+const int  bitrate_table    [3] [16] = {
+    { 0,  8, 16, 24, 32, 40, 48, 56,  64,  80,  96, 112, 128, 144, 160, -1 },
+    { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1 },
+    { 0,  8, 16, 24, 32, 40, 48, 56,  64,  80,  96, 112, 128, 144, 160, -1 },
+};
+
+const int  samplerate_table [3]  [4] = { 
+    { 22050, 24000, 16000, -1 },
+    { 44100, 48000, 32000, -1 },
+    { 11025, 12000,  8000, -1 },
+};
+
+const char* version_string  [3] = { "2", "1", "2.5" };
+
+const unsigned  header_word [3] = { 0xFFF00000, 0xFFF80000, 0xFFE00000 };
+
+/* end of tables.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/tables.h
@@ -1,0 +1,90 @@
+/*
+ *	MPEG layer 3 tables include file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_TABLES_H
+#define LAME_TABLES_H
+
+#include "machine.h"
+
+typedef struct {
+    unsigned char  no;
+    unsigned char  width;
+    unsigned char  minval_2;
+    float          quiet_thr;
+    float          norm;
+    float          bark;
+} type1_t;
+
+typedef struct {
+    unsigned char  no;
+    unsigned char  width;
+    float          quiet_thr;
+    float          norm;
+    float          SNR;
+    float          bark;
+} type2_t;
+
+typedef struct {
+    unsigned int  no     :  5;
+    unsigned int  cbw    :  3;
+    unsigned int  bu     :  6;
+    unsigned int  bo     :  6;
+    unsigned int  w1_576 : 10;
+    unsigned int  w2_576 : 10;
+} type34_t;
+
+typedef struct {
+    size_t                 len1;
+    const type1_t*  const  tab1;
+    size_t                 len2;
+    const type2_t*  const  tab2;
+    size_t                 len3;
+    const type34_t* const  tab3;
+    size_t                 len4;
+    const type34_t* const  tab4;
+} type5_t;
+
+extern const type5_t  table5 [6];
+
+
+
+#define HTN	34
+ 
+struct huffcodetab {
+    const int    xlen; 	        /* max. x-index+			*/ 
+    const int    linmax;	/* max number to be stored in linbits	*/
+    const short*   table;	        /* pointer to array[xlen][ylen]		*/
+    const char*  hlen;	        /* pointer to array[xlen][ylen]		*/
+};
+
+extern const struct huffcodetab ht [HTN];
+    /* global memory block			*/
+    /* array of all huffcodtable headers	*/
+    /* 0..31 Huffman code table 0..31		*/
+    /* 32,33 count1-tables			*/
+
+extern const char t32l [];
+extern const char t33l [];
+
+extern const unsigned int   largetbl    [16*16];
+extern const unsigned int   table23       [3*3];
+extern const unsigned int   table56       [4*4];
+#endif /* LAME_TABLES_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/takehiro.c
@@ -1,0 +1,1010 @@
+/*
+ *	MP3 huffman table selecting and bit counting
+ *
+ *	Copyright (c) 1999 Takehiro TOMINAGA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: takehiro.c,v 1.18 2001/02/27 09:59:18 robert Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include "util.h"
+#include "l3side.h"
+#include "tables.h"
+#include "quantize_pvt.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+static const struct
+{
+    const int region0_count;
+    const int region1_count;
+} subdv_table[ 23 ] =
+{
+{0, 0}, /* 0 bands */
+{0, 0}, /* 1 bands */
+{0, 0}, /* 2 bands */
+{0, 0}, /* 3 bands */
+{0, 0}, /* 4 bands */
+{0, 1}, /* 5 bands */
+{1, 1}, /* 6 bands */
+{1, 1}, /* 7 bands */
+{1, 2}, /* 8 bands */
+{2, 2}, /* 9 bands */
+{2, 3}, /* 10 bands */
+{2, 3}, /* 11 bands */
+{3, 4}, /* 12 bands */
+{3, 4}, /* 13 bands */
+{3, 4}, /* 14 bands */
+{4, 5}, /* 15 bands */
+{4, 5}, /* 16 bands */
+{4, 6}, /* 17 bands */
+{5, 6}, /* 18 bands */
+{5, 6}, /* 19 bands */
+{5, 7}, /* 20 bands */
+{6, 7}, /* 21 bands */
+{6, 7}, /* 22 bands */
+};
+
+
+
+
+/*************************************************************************/
+/*	      ix_max							 */
+/*************************************************************************/
+
+int 
+ix_max(const int *ix, const int *end)
+{
+    int max1 = 0, max2 = 0;
+
+    do {
+	int x1 = *ix++;
+	int x2 = *ix++;
+	if (max1 < x1) 
+	    max1 = x1;
+
+	if (max2 < x2) 
+	    max2 = x2;
+    } while (ix < end);
+    if (max1 < max2) 
+	max1 = max2;
+    return max1;
+}
+
+int
+count_bit_ESC( 
+    const int *       ix, 
+    const int * const end, 
+          int         t1,
+    const int         t2,
+          int * const s )
+{
+    /* ESC-table is used */
+    int linbits = ht[t1].xlen * 65536 + ht[t2].xlen;
+    int sum = 0, sum2;
+
+    do {
+	int x = *ix++;
+	int y = *ix++;
+
+	if (x != 0) {
+	    if (x > 14) {
+		x = 15;
+		sum += linbits;
+	    }
+	    x *= 16;
+	}
+
+	if (y != 0) {
+	    if (y > 14) {
+		y = 15;
+		sum += linbits;
+	    }
+	    x += y;
+	}
+
+	sum += largetbl[x];
+    } while (ix < end);
+
+    sum2 = sum & 0xffff;
+    sum >>= 16;
+
+    if (sum > sum2) {
+	sum = sum2;
+	t1 = t2;
+    }
+
+    *s += sum;
+    return t1;
+}
+
+
+inline static int
+count_bit_noESC(const int * ix, const int * const end, int * const s)
+{
+    /* No ESC-words */
+    int	sum1 = 0;
+    const char *hlen1 = ht[1].hlen;
+
+    do {
+	int x = ix[0] * 2 + ix[1];
+	ix += 2;
+	sum1 += hlen1[x];
+    } while (ix < end);
+
+    *s += sum1;
+    return 1;
+}
+
+
+
+inline static int
+count_bit_noESC_from2(
+    const int *       ix, 
+    const int * const end,
+          int         t1,
+          int * const s )
+{
+    /* No ESC-words */
+    unsigned int sum = 0, sum2;
+    const int xlen = ht[t1].xlen;
+    const unsigned int *hlen;
+    if (t1 == 2)
+	hlen = table23;
+    else
+	hlen = table56;
+
+    do {
+	int x = ix[0] * xlen + ix[1];
+	ix += 2;
+	sum += hlen[x];
+    } while (ix < end);
+
+    sum2 = sum & 0xffff;
+    sum >>= 16;
+
+    if (sum > sum2) {
+	sum = sum2;
+	t1++;
+    }
+
+    *s += sum;
+    return t1;
+}
+
+
+inline static int
+count_bit_noESC_from3(
+    const int *       ix, 
+    const int * const end,
+          int         t1,
+          int * const s )
+{
+    /* No ESC-words */
+    int	sum1 = 0;
+    int	sum2 = 0;
+    int	sum3 = 0;
+    const int xlen = ht[t1].xlen;
+    const char *hlen1 = ht[t1].hlen;
+    const char *hlen2 = ht[t1+1].hlen;
+    const char *hlen3 = ht[t1+2].hlen;
+    int t;
+
+    do {
+	int x = ix[0] * xlen + ix[1];
+	ix += 2;
+	sum1 += hlen1[x];
+	sum2 += hlen2[x];
+	sum3 += hlen3[x];
+    } while (ix < end);
+
+    t = t1;
+    if (sum1 > sum2) {
+	sum1 = sum2;
+	t++;
+    }
+    if (sum1 > sum3) {
+	sum1 = sum3;
+	t = t1+2;
+    }
+    *s += sum1;
+
+    return t;
+}
+
+
+/*************************************************************************/
+/*	      choose table						 */
+/*************************************************************************/
+
+/*
+  Choose the Huffman table that will encode ix[begin..end] with
+  the fewest bits.
+
+  Note: This code contains knowledge about the sizes and characteristics
+  of the Huffman tables as defined in the IS (Table B.7), and will not work
+  with any arbitrary tables.
+*/
+
+static int
+choose_table_nonMMX(
+    const int *       ix, 
+    const int * const end,
+          int * const s )
+{
+    int max;
+    int choice, choice2;
+    static const int huf_tbl_noESC[] = {
+	1, 2, 5, 7, 7,10,10,13,13,13,13,13,13,13,13 /* char not enough ? */
+    };
+
+    max = ix_max(ix, end);
+
+    switch (max) {
+    case 0:
+	return max;
+
+    case 1:
+	return count_bit_noESC(ix, end, s);
+
+    case 2:
+    case 3:
+	return count_bit_noESC_from2(ix, end, huf_tbl_noESC[max - 1], s);
+
+    case 4: case 5: case 6:
+    case 7: case 8: case 9:
+    case 10: case 11: case 12:
+    case 13: case 14: case 15:
+	return count_bit_noESC_from3(ix, end, huf_tbl_noESC[max - 1], s);
+
+    default:
+	/* try tables with linbits */
+	if (max > IXMAX_VAL) {
+	    *s = LARGE_BITS;
+	    return -1;
+	}
+	max -= 15;
+	for (choice2 = 24; choice2 < 32; choice2++) {
+	    if (ht[choice2].linmax >= max) {
+		break;
+	    }
+	}
+
+	for (choice = choice2 - 8; choice < 24; choice++) {
+	    if (ht[choice].linmax >= max) {
+		break;
+	    }
+	}
+	return count_bit_ESC(ix, end, choice, choice2, s);
+    }
+}
+
+
+
+/*************************************************************************/
+/*	      count_bit							 */
+/*************************************************************************/
+
+/*
+ Function: Count the number of bits necessary to code the subregion. 
+*/
+
+
+int count_bits_long(lame_internal_flags * const gfc, const int ix[576], gr_info * const gi)
+{
+    int i, a1, a2;
+    int bits = 0;
+
+    i=576;
+    /* Determine count1 region */
+    for (; i > 1; i -= 2) 
+	if (ix[i - 1] | ix[i - 2])
+	    break;
+    gi->count1 = i;
+
+    /* Determines the number of bits to encode the quadruples. */
+    a1 = a2 = 0;
+    for (; i > 3; i -= 4) {
+	int p;
+	/* hack to check if all values <= 1 */
+	if ((unsigned int)(ix[i-1] | ix[i-2] | ix[i-3] | ix[i-4]) > 1)
+	    break;
+
+	p = ((ix[i-4] * 2 + ix[i-3]) * 2 + ix[i-2]) * 2 + ix[i-1];
+	a1 += t32l[p];
+	a2 += t33l[p];
+    }
+
+    bits = a1;
+    gi->count1table_select = 0;
+    if (a1 > a2) {
+	bits = a2;
+	gi->count1table_select = 1;
+    }
+
+    gi->count1bits = bits;
+    gi->big_values = i;
+    if (i == 0)
+	return bits;
+
+    if (gi->block_type == SHORT_TYPE) {
+      a1=3*gfc->scalefac_band.s[3];
+      if (a1 > gi->big_values) a1 = gi->big_values;
+      a2 = gi->big_values;
+
+    }else if (gi->block_type == NORM_TYPE) {
+	assert(i <= 576); /* bv_scf has 576 entries (0..575) */
+        a1 = gi->region0_count = gfc->bv_scf[i-2];
+	a2 = gi->region1_count = gfc->bv_scf[i-1];
+
+//	assert(a1+a2+2 < SBPSY_l);
+        a2 = gfc->scalefac_band.l[a1 + a2 + 2];
+	a1 = gfc->scalefac_band.l[a1 + 1];
+	if (a2 < i)
+	  gi->table_select[2] = gfc->choose_table(ix + a2, ix + i, &bits);
+
+    } else {
+	gi->region0_count = 7;
+	/*gi->region1_count = SBPSY_l - 7 - 1;*/
+	gi->region1_count = SBMAX_l -1 - 7 - 1;
+	a1 = gfc->scalefac_band.l[7 + 1];
+	a2 = i;
+	if (a1 > a2) {
+	    a1 = a2;
+	}
+    }
+
+
+    /* have to allow for the case when bigvalues < region0 < region1 */
+    /* (and region0, region1 are ignored) */
+    a1 = Min(a1,i);
+    a2 = Min(a2,i);
+    
+//	assert( a1 >= 0 );
+//	assert( a2 >= 0 );
+
+    /* Count the number of bits necessary to code the bigvalues region. */
+    if (0 < a1)
+      gi->table_select[0] = gfc->choose_table(ix, ix + a1, &bits);
+    if (a1 < a2)
+      gi->table_select[1] = gfc->choose_table(ix + a1, ix + a2, &bits);
+    return bits;
+}
+
+
+
+
+
+int count_bits(
+          lame_internal_flags * const gfc, 
+          int     * const ix,
+    const FLOAT8  * const xr,
+          gr_info * const cod_info)  
+{
+  int bits=0,i;
+  /* since quantize_xrpow uses table lookup, we need to check this first: */
+  FLOAT8 w = (IXMAX_VAL) / IPOW20(cod_info->global_gain);
+  for ( i = 0; i < 576; i++ )  {
+    if (xr[i] > w)
+      return LARGE_BITS;
+  }
+
+  if (gfc->quantization) 
+    quantize_xrpow(xr, ix, IPOW20(cod_info->global_gain));
+  else
+    quantize_xrpow_ISO(xr, ix, IPOW20(cod_info->global_gain));
+
+  bits=count_bits_long(gfc, ix, cod_info);
+
+  return bits;
+}
+
+/***********************************************************************
+  re-calculate the best scalefac_compress using scfsi
+  the saved bits are kept in the bit reservoir.
+ **********************************************************************/
+
+
+inline static void
+recalc_divide_init(
+    const lame_internal_flags * const gfc,
+          gr_info         cod_info,
+          int     * const ix,
+          int             r01_bits[],
+          int             r01_div [],
+          int             r0_tbl  [],
+          int             r1_tbl  [] )
+{
+    int r0, r1, bigv, r0t, r1t, bits;
+
+    bigv = cod_info.big_values;
+
+    for (r0 = 0; r0 <= 7 + 15; r0++) {
+	r01_bits[r0] = LARGE_BITS;
+    }
+
+    for (r0 = 0; r0 < 16; r0++) {
+	int a1 = gfc->scalefac_band.l[r0 + 1], r0bits;
+	if (a1 >= bigv)
+	    break;
+	r0bits = cod_info.part2_length;
+	r0t = gfc->choose_table(ix, ix + a1, &r0bits);
+
+	for (r1 = 0; r1 < 8; r1++) {
+	    int a2 = gfc->scalefac_band.l[r0 + r1 + 2];
+	    if (a2 >= bigv)
+		break;
+
+	    bits = r0bits;
+	    r1t = gfc->choose_table(ix + a1, ix + a2, &bits);
+	    if (r01_bits[r0 + r1] > bits) {
+		r01_bits[r0 + r1] = bits;
+		r01_div[r0 + r1] = r0;
+		r0_tbl[r0 + r1] = r0t;
+		r1_tbl[r0 + r1] = r1t;
+	    }
+	}
+    }
+}
+
+inline static void
+recalc_divide_sub(
+    const lame_internal_flags * const gfc,
+    const gr_info         cod_info2,
+          gr_info * const gi,
+    const int     * const ix,
+    const int             r01_bits[],
+    const int             r01_div [],
+    const int             r0_tbl  [],
+    const int             r1_tbl  [] )
+{
+    int bits, r2, a2, bigv, r2t;
+
+    bigv = cod_info2.big_values;
+
+    for (r2 = 2; r2 < SBMAX_l + 1; r2++) {
+	a2 = gfc->scalefac_band.l[r2];
+	if (a2 >= bigv) 
+	    break;
+
+	bits = r01_bits[r2 - 2] + cod_info2.count1bits;
+	if (gi->part2_3_length <= bits)
+	    break;
+
+	r2t = gfc->choose_table(ix + a2, ix + bigv, &bits);
+	if (gi->part2_3_length <= bits)
+	    continue;
+
+	memcpy(gi, &cod_info2, sizeof(gr_info));
+	gi->part2_3_length = bits;
+	gi->region0_count = r01_div[r2 - 2];
+	gi->region1_count = r2 - 2 - r01_div[r2 - 2];
+	gi->table_select[0] = r0_tbl[r2 - 2];
+	gi->table_select[1] = r1_tbl[r2 - 2];
+	gi->table_select[2] = r2t;
+    }
+}
+
+
+
+
+void best_huffman_divide(
+    const lame_internal_flags * const gfc,
+    const int             gr, 
+    const int             ch,
+          gr_info * const gi,
+          int     * const ix )
+{
+    int i, a1, a2;
+    gr_info cod_info2;
+
+    int r01_bits[7 + 15 + 1];
+    int r01_div[7 + 15 + 1];
+    int r0_tbl[7 + 15 + 1];
+    int r1_tbl[7 + 15 + 1];
+
+
+    /* SHORT BLOCK stuff fails for MPEG2 */ 
+    if (gi->block_type == SHORT_TYPE && gfc->mode_gr==1) 
+          return;
+
+
+    memcpy(&cod_info2, gi, sizeof(gr_info));
+    if (gi->block_type == NORM_TYPE) {
+	recalc_divide_init(gfc, cod_info2, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
+	recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
+    }
+
+    i = cod_info2.big_values;
+    if (i == 0 || (unsigned int)(ix[i-2] | ix[i-1]) > 1)
+	return;
+
+    i = gi->count1 + 2;
+    if (i > 576)
+	return;
+
+    /* Determines the number of bits to encode the quadruples. */
+    memcpy(&cod_info2, gi, sizeof(gr_info));
+    cod_info2.count1 = i;
+    a1 = a2 = 0;
+
+    assert(i <= 576);
+    
+    for (; i > cod_info2.big_values; i -= 4) {
+	int p = ((ix[i-4] * 2 + ix[i-3]) * 2 + ix[i-2]) * 2 + ix[i-1];
+	a1 += t32l[p];
+	a2 += t33l[p];
+    }
+    cod_info2.big_values = i;
+
+    cod_info2.count1table_select = 0;
+    if (a1 > a2) {
+	a1 = a2;
+	cod_info2.count1table_select = 1;
+    }
+
+    cod_info2.count1bits = a1;
+    cod_info2.part2_3_length = a1 + cod_info2.part2_length;
+
+    if (cod_info2.block_type == NORM_TYPE)
+	recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
+    else {
+	/* Count the number of bits necessary to code the bigvalues region. */
+	a1 = gfc->scalefac_band.l[7 + 1];
+	if (a1 > i) {
+	    a1 = i;
+	}
+	if (a1 > 0)
+	  cod_info2.table_select[0] =
+	    gfc->choose_table(ix, ix + a1, (int *)&cod_info2.part2_3_length);
+	if (i > a1)
+	  cod_info2.table_select[1] =
+	    gfc->choose_table(ix + a1, ix + i, (int *)&cod_info2.part2_3_length);
+	if (gi->part2_3_length > cod_info2.part2_3_length)
+	    memcpy(gi, &cod_info2, sizeof(gr_info));
+    }
+}
+
+static const int slen1_n[16] = { 1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8,16,16 };
+static const int slen2_n[16] = { 1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 };
+
+void
+scfsi_calc(int ch,
+	   III_side_info_t *l3_side,
+	   III_scalefac_t scalefac[2][2])
+{
+    int i, s1, s2, c1, c2;
+    int sfb;
+    gr_info *gi = &l3_side->gr[1].ch[ch].tt;
+
+    static const int scfsi_band[5] = { 0, 6, 11, 16, 21 };
+#if 0
+    static const int slen1_n[16] = { 0, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8,16,16 };
+    static const int slen2_n[16] = { 0, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 };
+#endif
+
+    for (i = 0; i < 4; i++) 
+	l3_side->scfsi[ch][i] = 0;
+
+    for (i = 0; i < (sizeof(scfsi_band) / sizeof(int)) - 1; i++) {
+	for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1]; sfb++) {
+	    if (scalefac[0][ch].l[sfb] != scalefac[1][ch].l[sfb])
+		break;
+	}
+	if (sfb == scfsi_band[i + 1]) {
+	    for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1]; sfb++) {
+		scalefac[1][ch].l[sfb] = -1;
+	    }
+	    l3_side->scfsi[ch][i] = 1;
+	}
+    }
+
+    s1 = c1 = 0;
+    for (sfb = 0; sfb < 11; sfb++) {
+	if (scalefac[1][ch].l[sfb] < 0)
+	    continue;
+	c1++;
+	if (s1 < scalefac[1][ch].l[sfb])
+	    s1 = scalefac[1][ch].l[sfb];
+    }
+
+    s2 = c2 = 0;
+    for (; sfb < SBPSY_l; sfb++) {
+	if (scalefac[1][ch].l[sfb] < 0)
+	    continue;
+	c2++;
+	if (s2 < scalefac[1][ch].l[sfb])
+	    s2 = scalefac[1][ch].l[sfb];
+    }
+
+    for (i = 0; i < 16; i++) {
+	if (s1 < slen1_n[i] && s2 < slen2_n[i]) {
+	    int c = slen1_tab[i] * c1 + slen2_tab[i] * c2;
+	    if (gi->part2_length > c) {
+		gi->part2_length = c;
+		gi->scalefac_compress = i;
+	    }
+	}
+    }
+}
+
+/*
+Find the optimal way to store the scalefactors.
+Only call this routine after final scalefactors have been
+chosen and the channel/granule will not be re-encoded.
+ */
+void best_scalefac_store(
+    const lame_internal_flags *gfc,
+    const int             gr,
+    const int             ch,
+          int             l3_enc[2][2][576],
+          III_side_info_t * const l3_side,
+          III_scalefac_t          scalefac[2][2] )
+{
+
+    /* use scalefac_scale if we can */
+    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
+    int sfb,i,j,j2,l,start,end;
+
+    /* remove scalefacs from bands with ix=0.  This idea comes
+     * from the AAC ISO docs.  added mt 3/00 */
+    /* check if l3_enc=0 */
+    for ( sfb = 0; sfb < gi->sfb_lmax; sfb++ ) {
+      if (scalefac[gr][ch].l[sfb]>0) { 
+	start = gfc->scalefac_band.l[ sfb ];
+	end   = gfc->scalefac_band.l[ sfb+1 ];
+	for ( l = start; l < end; l++ ) if (l3_enc[gr][ch][l]!=0) break;
+	if (l==end) scalefac[gr][ch].l[sfb]=0;
+      }
+    }
+    for ( j=0, sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++ ) {
+	start = gfc->scalefac_band.s[ sfb ];
+	end   = gfc->scalefac_band.s[ sfb+1 ];
+	for ( i = 0; i < 3; i++ ) {
+	  if (scalefac[gr][ch].s[sfb][i]>0) {
+	    j2 = j;
+	    for ( l = start; l < end; l++ ) 
+	      if (l3_enc[gr][ch][j2++ /*3*l+i*/]!=0) break;
+	    if (l==end) scalefac[gr][ch].s[sfb][i]=0;
+	  }
+	  j += end-start;
+	}
+    }
+
+
+    gi->part2_3_length -= gi->part2_length;
+    if (!gi->scalefac_scale && !gi->preflag) {
+	int b, s = 0;
+	for (sfb = 0; sfb < gi->sfb_lmax; sfb++) {
+	    s |= scalefac[gr][ch].l[sfb];
+	}
+
+	for (sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++) {
+	    for (b = 0; b < 3; b++) {
+		s |= scalefac[gr][ch].s[sfb][b];
+	    }
+	}
+
+	if (!(s & 1) && s != 0) {
+	    for (sfb = 0; sfb < gi->sfb_lmax; sfb++) {
+		scalefac[gr][ch].l[sfb] /= 2;
+	    }
+	    for (sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++) {
+		for (b = 0; b < 3; b++) {
+		    scalefac[gr][ch].s[sfb][b] /= 2;
+		}
+	    }
+
+	    gi->scalefac_scale = 1;
+	    gi->part2_length = 99999999;
+	    if (gfc->mode_gr == 2) {
+	        scale_bitcount(&scalefac[gr][ch], gi);
+	    } else {
+		scale_bitcount_lsf(gfc,&scalefac[gr][ch], gi);
+	    }
+	}
+    }
+
+
+    for ( i = 0; i < 4; i++ )
+      l3_side->scfsi[ch][i] = 0;
+
+    if (gfc->mode_gr==2 && gr == 1
+	&& l3_side->gr[0].ch[ch].tt.block_type != SHORT_TYPE
+	&& l3_side->gr[1].ch[ch].tt.block_type != SHORT_TYPE) {
+      	scfsi_calc(ch, l3_side, scalefac);
+    }
+    gi->part2_3_length += gi->part2_length;
+}
+
+
+/* number of bits used to encode scalefacs */
+
+/* 18*slen1_tab[i] + 18*slen2_tab[i] */
+static const int scale_short[16] = {
+    0, 18, 36, 54, 54, 36, 54, 72, 54, 72, 90, 72, 90, 108, 108, 126 };
+
+/* 17*slen1_tab[i] + 18*slen2_tab[i] */
+static const int scale_mixed[16] = {
+    0, 18, 36, 54, 51, 35, 53, 71, 52, 70, 88, 69, 87, 105, 104, 122 };
+
+/* 11*slen1_tab[i] + 10*slen2_tab[i] */
+static const int scale_long[16] = {
+    0, 10, 20, 30, 33, 21, 31, 41, 32, 42, 52, 43, 53, 63, 64, 74 };
+
+
+/*************************************************************************/
+/*            scale_bitcount                                             */
+/*************************************************************************/
+
+/* Also calculates the number of bits necessary to code the scalefactors. */
+
+int scale_bitcount( 
+    III_scalefac_t * const scalefac, gr_info * const cod_info)
+{
+    int i, k, sfb, max_slen1 = 0, max_slen2 = 0, ep = 2;
+
+    /* maximum values */
+    const int *tab;
+
+
+    if ( cod_info->block_type == SHORT_TYPE ) {
+	tab = scale_short;
+	if (cod_info->mixed_block_flag) {
+	    tab = scale_mixed;
+	    for ( sfb = 0 ; sfb < cod_info->sfb_lmax; sfb++ )
+		if (max_slen1 < scalefac->l[sfb])
+		    max_slen1 = scalefac->l[sfb];
+	}
+
+	for ( i = 0; i < 3; i++ ) {
+	    for ( sfb = cod_info->sfb_smin; sfb < 6; sfb++ )
+		if (max_slen1 < scalefac->s[sfb][i])
+		    max_slen1 = scalefac->s[sfb][i];
+	    for (sfb = 6; sfb < SBPSY_s; sfb++ )
+		if (max_slen2 < scalefac->s[sfb][i])
+		    max_slen2 = scalefac->s[sfb][i];
+	}
+    }
+    else
+    { /* block_type == 1,2,or 3 */
+        tab = scale_long;
+        for ( sfb = 0; sfb < 11; sfb++ )
+            if ( scalefac->l[sfb] > max_slen1 )
+                max_slen1 = scalefac->l[sfb];
+
+	if (!cod_info->preflag) {
+	    for ( sfb = 11; sfb < SBPSY_l; sfb++ )
+		if (scalefac->l[sfb] < pretab[sfb])
+		    break;
+
+	    if (sfb == SBPSY_l) {
+		cod_info->preflag = 1;
+		for ( sfb = 11; sfb < SBPSY_l; sfb++ )
+		    scalefac->l[sfb] -= pretab[sfb];
+	    }
+	}
+
+        for ( sfb = 11; sfb < SBPSY_l; sfb++ )
+            if ( scalefac->l[sfb] > max_slen2 )
+                max_slen2 = scalefac->l[sfb];
+    }
+
+
+    /* from Takehiro TOMINAGA <[email protected]> 10/99
+     * loop over *all* posible values of scalefac_compress to find the
+     * one which uses the smallest number of bits.  ISO would stop
+     * at first valid index */
+    cod_info->part2_length = LARGE_BITS;
+    for ( k = 0; k < 16; k++ )
+    {
+        if ( (max_slen1 < slen1_n[k]) && (max_slen2 < slen2_n[k]) &&
+             (cod_info->part2_length > tab[k])) {
+	  cod_info->part2_length=tab[k];
+	  cod_info->scalefac_compress=k;
+	  ep=0;  /* we found a suitable scalefac_compress */
+	}
+    }
+    return ep;
+}
+
+
+
+/*
+  table of largest scalefactor values for MPEG2
+*/
+static const int max_range_sfac_tab[6][4] =
+{
+ { 15, 15, 7,  7},
+ { 15, 15, 7,  0},
+ { 7,  3,  0,  0},
+ { 15, 31, 31, 0},
+ { 7,  7,  7,  0},
+ { 3,  3,  0,  0}
+};
+
+
+
+
+/*************************************************************************/
+/*            scale_bitcount_lsf                                         */
+/*************************************************************************/
+
+/* Also counts the number of bits to encode the scalefacs but for MPEG 2 */ 
+/* Lower sampling frequencies  (24, 22.05 and 16 kHz.)                   */
+ 
+/*  This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,     */
+/* "Audio Decoding Layer III"                                            */
+
+int scale_bitcount_lsf(const lame_internal_flags *gfc,
+    const III_scalefac_t * const scalefac, gr_info * const cod_info)
+{
+    int table_number, row_in_table, partition, nr_sfb, window, over;
+    int i, sfb, max_sfac[ 4 ];
+    const int *partition_table;
+
+    /*
+      Set partition table. Note that should try to use table one,
+      but do not yet...
+    */
+    if ( cod_info->preflag )
+	table_number = 2;
+    else
+	table_number = 0;
+
+    for ( i = 0; i < 4; i++ )
+	max_sfac[i] = 0;
+
+    if ( cod_info->block_type == SHORT_TYPE )
+    {
+	    row_in_table = 1;
+	    partition_table = &nr_of_sfb_block[table_number][row_in_table][0];
+	    for ( sfb = 0, partition = 0; partition < 4; partition++ )
+	    {
+		nr_sfb = partition_table[ partition ] / 3;
+		for ( i = 0; i < nr_sfb; i++, sfb++ )
+		    for ( window = 0; window < 3; window++ )
+			if ( scalefac->s[sfb][window] > max_sfac[partition] )
+			    max_sfac[partition] = scalefac->s[sfb][window];
+	    }
+    }
+    else
+    {
+	row_in_table = 0;
+	partition_table = &nr_of_sfb_block[table_number][row_in_table][0];
+	for ( sfb = 0, partition = 0; partition < 4; partition++ )
+	{
+	    nr_sfb = partition_table[ partition ];
+	    for ( i = 0; i < nr_sfb; i++, sfb++ )
+		if ( scalefac->l[sfb] > max_sfac[partition] )
+		    max_sfac[partition] = scalefac->l[sfb];
+	}
+    }
+
+    for ( over = 0, partition = 0; partition < 4; partition++ )
+    {
+	if ( max_sfac[partition] > max_range_sfac_tab[table_number][partition] )
+	    over++;
+    }
+    if ( !over )
+    {
+	/*
+	  Since no bands have been over-amplified, we can set scalefac_compress
+	  and slen[] for the formatter
+	*/
+	static const int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };
+
+	int slen1, slen2, slen3, slen4;
+
+        cod_info->sfb_partition_table = nr_of_sfb_block[table_number][row_in_table];
+	for ( partition = 0; partition < 4; partition++ )
+	    cod_info->slen[partition] = log2tab[max_sfac[partition]];
+
+	/* set scalefac_compress */
+	slen1 = cod_info->slen[ 0 ];
+	slen2 = cod_info->slen[ 1 ];
+	slen3 = cod_info->slen[ 2 ];
+	slen4 = cod_info->slen[ 3 ];
+
+	switch ( table_number )
+	{
+	  case 0:
+	    cod_info->scalefac_compress = (((slen1 * 5) + slen2) << 4)
+		+ (slen3 << 2)
+		+ slen4;
+	    break;
+
+	  case 1:
+	    cod_info->scalefac_compress = 400
+		+ (((slen1 * 5) + slen2) << 2)
+		+ slen3;
+	    break;
+
+	  case 2:
+	    cod_info->scalefac_compress = 500 + (slen1 * 3) + slen2;
+	    break;
+
+	  default:
+	    ERRORF(gfc,"intensity stereo not implemented yet\n" );
+	    break;
+	}
+    }
+#ifdef DEBUG
+    if ( over ) 
+        ERRORF(gfc, "---WARNING !! Amplification of some bands over limits\n" );
+#endif
+    if (!over) {
+      assert( cod_info->sfb_partition_table );     
+      cod_info->part2_length=0;
+      for ( partition = 0; partition < 4; partition++ )
+	cod_info->part2_length += cod_info->slen[partition] * cod_info->sfb_partition_table[partition];
+    }
+    return over;
+}
+
+
+
+void huffman_init(lame_internal_flags * const gfc)
+{
+    int i;
+
+    gfc->choose_table = choose_table_nonMMX;
+    
+#ifdef MMX_choose_table
+    if (gfc->CPU_features.MMX) {
+        extern int choose_table_MMX(const int *ix, const int *end, int *s);
+        gfc->choose_table = choose_table_MMX;
+    }
+#endif
+
+    for (i = 2; i <= 576; i += 2) {
+	int scfb_anz = 0, index;
+	while (gfc->scalefac_band.l[++scfb_anz] < i)
+	    ;
+
+	index = subdv_table[scfb_anz].region0_count;
+	while (gfc->scalefac_band.l[index + 1] > i)
+	    index--;
+
+	if (index < 0) {
+	  /* this is an indication that everything is going to
+	     be encoded as region0:  bigvalues < region0 < region1
+	     so lets set region0, region1 to some value larger
+	     than bigvalues */
+	  index = subdv_table[scfb_anz].region0_count;
+	}
+
+	gfc->bv_scf[i-2] = index;
+
+	index = subdv_table[scfb_anz].region1_count;
+	while (gfc->scalefac_band.l[index + gfc->bv_scf[i-2] + 2] > i)
+	    index--;
+
+	if (index < 0) {
+	  index = subdv_table[scfb_anz].region1_count;
+	}
+
+	gfc->bv_scf[i-1] = index;
+    }
+}
binary files /dev/null b/sys/src/cmd/audio/mp3enc/testcase.mp3 differ
binary files /dev/null b/sys/src/cmd/audio/mp3enc/testcase.wav differ
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/timestatus.c
@@ -1,0 +1,224 @@
+/*
+ *	time status related function source file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: timestatus.c,v 1.32 2001/03/11 11:24:25 aleidinger Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+ 
+
+/* Hope it works now, otherwise complain or flame ;-)
+ */
+ 
+
+#if 1
+# define SPEED_CHAR	"x"	/* character x */
+# define SPEED_MULT	1.
+#else
+# define SPEED_CHAR	"%%"
+# define SPEED_MULT	100.
+#endif
+
+#include <assert.h>
+#include <time.h>
+
+#include "lame.h"
+#include "main.h"
+#include "lametime.h"
+#include "timestatus.h"
+
+#if defined(BRHIST)
+# include "brhist.h"
+#endif
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+typedef struct {
+    double  start_time;			  // start time of converting [s]
+    double  elapsed_time;		  // current time - start time [s]
+    double  estimated_time;		  // estimated total duration time [s]
+    double  speed_index;		  // speed relative to realtime coding [100%]
+} timestatus_t;
+
+/* 
+ *  Calculates from the input (see below) the following values:
+ *    - total estimated time
+ *    - a speed index
+ */
+
+static void  ts_calc_times (
+    timestatus_t* const  tstime,           // tstime->elapsed_time: elapsed time
+    const int            sample_freq,      // sample frequency [Hz/kHz] 
+    const int            frameNum,         // Number of the current Frame
+    const int            totalframes,      // total umber of Frames
+    const int            framesize )       // Size of a frame [bps/kbps]
+{
+    assert ( sample_freq >= 8000  &&  sample_freq <= 48000 );
+    
+    if ( frameNum > 0  &&  tstime->elapsed_time > 0 ) {
+        tstime->estimated_time = tstime->elapsed_time * totalframes / frameNum;
+        tstime->speed_index    = framesize * frameNum / (sample_freq * tstime->elapsed_time);
+    } else {
+        tstime->estimated_time = 0.;
+        tstime->speed_index    = 0.;
+    }
+}
+
+/* Decomposes a given number of seconds into a easy to read hh:mm:ss format
+ * padded with an additional character
+ */
+
+static void  ts_time_decompose ( const unsigned long time_in_sec, const char padded_char )
+{
+    const unsigned long hour = time_in_sec / 3600;
+    const unsigned int  min  = time_in_sec / 60 % 60;
+    const unsigned int  sec  = time_in_sec % 60;
+
+    if ( hour == 0 )
+        fprintf ( stderr,    "   %2u:%02u%c",       min, sec, padded_char );
+    else if ( hour < 100 )
+        fprintf ( stderr, "%2lu:%02u:%02u%c", hour, min, sec, padded_char );
+    else
+        fprintf ( stderr,         "%6lu h%c", hour,           padded_char );
+}
+
+void timestatus ( const int samp_rate, 
+                  const int frameNum,
+                  const int totalframes,
+                  const int framesize )
+{
+    static timestatus_t  real_time;
+    static timestatus_t  proc_time;
+    int                  percent;
+    static int           init = 0; /* What happens here? A work around instead of a bug fix ??? */
+
+    if ( frameNum == 0 ) {
+        real_time.start_time = GetRealTime ();
+        proc_time.start_time = GetCPUTime  ();
+    }
+    
+    real_time.elapsed_time = GetRealTime () - real_time.start_time;
+    proc_time.elapsed_time = GetCPUTime  () - proc_time.start_time;
+
+    if ( frameNum == 0 && init == 0 ) {
+        fprintf ( stderr,
+	    "\r"
+	    "    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA \n"
+            "     0/       ( 0%%)|    0:00/     :  |    0:00/     :  |         " SPEED_CHAR "|     :  \r"
+	    /* , Console_IO.str_clreoln, Console_IO.str_clreoln */ );
+	init = 1;
+        return;
+    }  
+    /* reset init counter for next time we are called with frameNum==0 */
+    if (frameNum > 0) 
+        init = 0;
+
+    ts_calc_times ( &real_time, samp_rate, frameNum, totalframes, framesize );
+    ts_calc_times ( &proc_time, samp_rate, frameNum, totalframes, framesize );
+
+    if ( frameNum < totalframes  ) {
+        percent = (int) (100. * frameNum / totalframes + 0.5 );
+    } else {
+        percent = 100;
+    }
+
+    fprintf ( stderr, "\r%6i/%-6i", frameNum, totalframes );
+    fprintf ( stderr, percent < 100 ? " (%2d%%)|" : "(%3.3d%%)|", percent );
+    ts_time_decompose ( (unsigned long)proc_time.elapsed_time  , '/' );
+    ts_time_decompose ( (unsigned long)proc_time.estimated_time, '|' );
+    ts_time_decompose ( (unsigned long)real_time.elapsed_time  , '/' );
+    ts_time_decompose ( (unsigned long)real_time.estimated_time, '|' );
+    fprintf ( stderr, proc_time.speed_index <= 1.  ?  
+              "%9.4f" SPEED_CHAR "|"  :  "%#9.5g" SPEED_CHAR "|",
+	      SPEED_MULT * proc_time.speed_index );
+    ts_time_decompose ( (unsigned long)(real_time.estimated_time - real_time.elapsed_time), ' ' );
+    fflush  ( stderr );
+}
+
+void timestatus_finish ( void )
+{
+    fprintf ( stderr, "\n" );
+    fflush  ( stderr );
+}
+
+void timestatus_klemm ( const lame_global_flags* const gfp )
+{
+    static double  last_time = 0.;
+
+    if ( !silent )
+        if ( gfp->frameNum == 0  ||  
+  	     gfp->frameNum == 9  ||
+  	     GetRealTime () - last_time >= update_interval  ||
+	     GetRealTime () - last_time <  0 ) {
+#ifdef BRHIST
+            brhist_jump_back();
+#endif
+            timestatus ( lame_get_out_samplerate( gfp ),
+                         gfp->frameNum,
+                         gfp->totalframes,
+                         gfp->framesize );
+#ifdef BRHIST
+            if ( brhist ) {
+	        brhist_disp ( gfp );
+	    }
+#endif
+            last_time = GetRealTime ();  /* from now! disp_time seconds */
+        }
+}
+
+/* these functions are used in get_audio.c */
+
+void decoder_progress ( const lame_global_flags* const gfp, const mp3data_struct* const mp3data )
+{
+    static int  last;
+    fprintf ( stderr, "\rFrame#%6i/%-6i %3i kbps",
+              mp3data->framenum, mp3data->totalframes, mp3data->bitrate );
+              
+    // Programmed with a single frame hold delay
+    // Attention: static data
+    
+    // MP2 Playback is still buggy.
+    // "'00' subbands 4-31 in intensity_stereo, bound==4"
+    // is this really intensity_stereo or is it MS stereo?
+    
+    if ( mp3data->mode == JOINT_STEREO ) {
+        int         curr = mp3data->mode_ext;
+        fprintf ( stderr, "  %s  %c" , 
+                  curr&2  ?  last&2 ? " MS " : "LMSR"  :  last&2 ? "LMSR" : "L  R",
+                  curr&1  ?  last&1 ? 'I'    : 'i'     :  last&1 ? 'i'    : ' ' );
+        last = curr;
+    } else {
+        fprintf ( stderr, "         " );
+	last = 0;
+    }
+//    fprintf ( stderr, "%s", Console_IO.str_clreoln );
+      fprintf ( stderr, "        \b\b\b\b\b\b\b\b" );
+      fflush  ( stderr );
+}
+
+void decoder_progress_finish ( const lame_global_flags* const gfp )
+{
+    fprintf ( stderr, "\n" );
+}
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/timestatus.h
@@ -1,0 +1,35 @@
+/*
+ *	time status related function include file
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_TIMESTATUS_H
+#define LAME_TIMESTATUS_H
+void timestatus_klemm(const lame_global_flags *gfp);
+
+void timestatus ( int samp_rate, 
+                  int frameNum, 
+                  int totalframes, 
+                  int           framesize);
+void timestatus_finish(void);
+
+void decoder_progress(const lame_global_flags *gfp,const mp3data_struct *);
+void decoder_progress_finish(const lame_global_flags *gfp);
+
+#endif /* LAME_TIMESTATUS_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/tools.c
@@ -1,0 +1,9 @@
+/*
+ *   Simple LAME context free functions:
+ *
+ *     - should not contain gfc or gfp
+ *     - should not call other functions not defined 
+ *       in this module (or libc functions)
+ *
+ *   Otherwise util.c is the right place.
+ */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/util.c
@@ -1,0 +1,866 @@
+/*
+ *	lame utility library source file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: util.c,v 1.67 2001/03/20 00:42:56 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define PRECOMPUTE
+
+#include "util.h"
+#include <ctype.h>
+#include <assert.h>
+#include <stdarg.h>
+
+#if defined(__FreeBSD__) && !defined(__alpha__)
+# include <machine/floatingpoint.h>
+#endif
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+/***********************************************************************
+*
+*  Global Function Definitions
+*
+***********************************************************************/
+/*empty and close mallocs in gfc */
+
+void  freegfc ( lame_internal_flags* const gfc )   /* bit stream structure */
+{
+    int  i;
+
+#ifdef KLEMM_44
+    if (gfc->resample_in != NULL) {
+        resample_close(gfc->resample_in);
+        gfc->resample_in = NULL;
+    }
+    free(gfc->mfbuf[0]);
+    free(gfc->mfbuf[1]);
+#endif
+
+    for ( i = 0 ; i <= 2*BPC; i++ )
+        if ( gfc->blackfilt[i] != NULL ) {
+            free ( gfc->blackfilt[i] );
+	    gfc->blackfilt[i] = NULL;
+	}
+    if ( gfc->inbuf_old[0] ) { 
+        free ( gfc->inbuf_old[0] );
+	gfc->inbuf_old[0] = NULL;
+    }
+    if ( gfc->inbuf_old[1] ) { 
+        free ( gfc->inbuf_old[1] );
+	gfc->inbuf_old[1] = NULL;
+    }
+
+    if ( gfc->bs.buf != NULL ) {
+        free ( gfc->bs.buf );
+        gfc->bs.buf = NULL;
+    }
+
+    if ( gfc->VBR_seek_table.bag ) {
+        free ( gfc->VBR_seek_table.bag );
+    }
+    if ( gfc->ATH ) {
+        free ( gfc->ATH );
+    }
+    free ( gfc );
+}
+
+FLOAT8 ATHformula_old(FLOAT8 f)
+{
+  FLOAT8 ath;
+  f /= 1000;  // convert to khz
+  f  = Max(0.01, f);
+  f  = Min(18.0, f);
+
+  /* from Painter & Spanias, 1997 */
+  /* minimum: (i=77) 3.3kHz = -5db */
+  ath =    3.640 * pow(f,-0.8)
+         - 6.500 * exp(-0.6*pow(f-3.3,2.0))
+         + 0.001 * pow(f,4.0);
+  return ath;
+}
+
+FLOAT8 ATHformula_GB(FLOAT8 f)
+{
+  FLOAT8 ath;
+  f /= 1000;  // convert to khz
+  f  = Max(0.01, f);
+  f  = Min(18.0, f);
+
+  /* from Painter & Spanias, 1997 */
+  /* modified by Gabriel Bouvigne to better fit to the reality */
+  ath =    3.640 * pow(f,-0.8)
+         - 6.800 * exp(-0.6*pow(f-3.4,2.0))
+         + 6.000 * exp(-0.15*pow(f-8.7,2.0))
+         + 0.6* 0.001 * pow(f,4.0);
+  return ath;
+}
+
+FLOAT8 ATHformula_GBtweak(FLOAT8 f)
+{
+  FLOAT8 ath;
+  f /= 1000;  // convert to khz
+  f  = Max(0.01, f);
+  f  = Min(18.0, f);
+
+  /* from Painter & Spanias, 1997 */
+  /* modified by Gabriel Bouvigne to better fit to the reality */
+  ath =    3.640 * pow(f,-0.8)
+         - 6.800 * exp(-0.6*pow(f-3.4,2.0))
+         + 6.000 * exp(-0.15*pow(f-8.7,2.0))
+         + 0.57* 0.001 * pow(f,4.0) //0.57 to maximize HF importance
+         + 6; //std --athlower -6 for
+  return ath;
+}
+
+
+/* 
+ *  Klemm 1994 and 1997. Experimental data. Sorry, data looks a little bit
+ *  dodderly. Data below 30 Hz is extrapolated from other material, above 18
+ *  kHz the ATH is limited due to the original purpose (too much noise at
+ *  ATH is not good even if it's theoretically inaudible).
+ */
+
+FLOAT8  ATHformula_Frank( FLOAT8 freq )
+{
+    /*
+     * one value per 100 cent = 1
+     * semitone = 1/4
+     * third = 1/12
+     * octave = 1/40 decade
+     * rest is linear interpolated, values are currently in decibel rel. 20 �Pa
+     */
+    static FLOAT tab [] = {
+        /*    10.0 */  96.69, 96.69, 96.26, 95.12,
+        /*    12.6 */  93.53, 91.13, 88.82, 86.76,
+        /*    15.8 */  84.69, 82.43, 79.97, 77.48,
+        /*    20.0 */  74.92, 72.39, 70.00, 67.62,
+        /*    25.1 */  65.29, 63.02, 60.84, 59.00,
+        /*    31.6 */  57.17, 55.34, 53.51, 51.67,
+        /*    39.8 */  50.04, 48.12, 46.38, 44.66,
+        /*    50.1 */  43.10, 41.73, 40.50, 39.22,
+        /*    63.1 */  37.23, 35.77, 34.51, 32.81,
+        /*    79.4 */  31.32, 30.36, 29.02, 27.60,
+        /*   100.0 */  26.58, 25.91, 24.41, 23.01,
+        /*   125.9 */  22.12, 21.25, 20.18, 19.00,
+        /*   158.5 */  17.70, 16.82, 15.94, 15.12,
+        /*   199.5 */  14.30, 13.41, 12.60, 11.98,
+        /*   251.2 */  11.36, 10.57,  9.98,  9.43,
+        /*   316.2 */   8.87,  8.46,  7.44,  7.12,
+        /*   398.1 */   6.93,  6.68,  6.37,  6.06,
+        /*   501.2 */   5.80,  5.55,  5.29,  5.02,
+        /*   631.0 */   4.75,  4.48,  4.22,  3.98,
+        /*   794.3 */   3.75,  3.51,  3.27,  3.22,
+        /*  1000.0 */   3.12,  3.01,  2.91,  2.68,
+        /*  1258.9 */   2.46,  2.15,  1.82,  1.46,
+        /*  1584.9 */   1.07,  0.61,  0.13, -0.35,
+        /*  1995.3 */  -0.96, -1.56, -1.79, -2.35,
+        /*  2511.9 */  -2.95, -3.50, -4.01, -4.21,
+        /*  3162.3 */  -4.46, -4.99, -5.32, -5.35,
+        /*  3981.1 */  -5.13, -4.76, -4.31, -3.13,
+        /*  5011.9 */  -1.79,  0.08,  2.03,  4.03,
+        /*  6309.6 */   5.80,  7.36,  8.81, 10.22,
+        /*  7943.3 */  11.54, 12.51, 13.48, 14.21,
+        /* 10000.0 */  14.79, 13.99, 12.85, 11.93,
+        /* 12589.3 */  12.87, 15.19, 19.14, 23.69,
+        /* 15848.9 */  33.52, 48.65, 59.42, 61.77,
+        /* 19952.6 */  63.85, 66.04, 68.33, 70.09,
+        /* 25118.9 */  70.66, 71.27, 71.91, 72.60,
+    };
+    FLOAT8    freq_log;
+    unsigned  index;
+    
+    if ( freq <    10. ) freq =    10.;
+    if ( freq > 29853. ) freq = 29853.;
+    
+    freq_log = 40. * log10 (0.1 * freq);   /* 4 steps per third, starting at 10 Hz */
+    index    = (unsigned) freq_log;
+    assert ( index < sizeof(tab)/sizeof(*tab) );
+    return tab [index] * (1 + index - freq_log) + tab [index+1] * (freq_log - index);
+}
+
+FLOAT8 ATHformula(FLOAT8 f,lame_global_flags *gfp)
+{
+  switch(gfp->ATHtype)
+    {
+    case 0:
+      return ATHformula_old(f);
+    case 1:
+      return ATHformula_Frank(f);
+    case 2:
+      return ATHformula_GB(f);
+    case 3:
+      return ATHformula_GBtweak(f);
+    }
+
+  return ATHformula_Frank(f);
+}
+
+/* see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */
+FLOAT8 freq2bark(FLOAT8 freq)
+{
+  /* input: freq in hz  output: barks */
+    if (freq<0) freq=0;
+    freq = freq * 0.001;
+    return 13.0*atan(.76*freq) + 3.5*atan(freq*freq/(7.5*7.5));
+}
+
+/* see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */
+FLOAT8 freq2cbw(FLOAT8 freq)
+{
+  /* input: freq in hz  output: critical band width */
+    freq = freq * 0.001;
+    return 25+75*pow(1+1.4*(freq*freq),0.69);
+}
+
+
+
+
+
+
+/***********************************************************************
+ * compute bitsperframe and mean_bits for a layer III frame 
+ **********************************************************************/
+void getframebits(lame_global_flags *gfp, int *bitsPerFrame, int *mean_bits) 
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int  whole_SpF;  /* integral number of Slots per Frame without padding */
+  int  bit_rate;
+  
+  /* get bitrate in kbps [?] */
+  if (gfc->bitrate_index) 
+    bit_rate = bitrate_table[gfp->version][gfc->bitrate_index];
+  else
+    bit_rate = gfp->brate;
+  assert ( bit_rate <= 550 );
+  
+  // bytes_per_frame = bitrate * 1000 / ( gfp->out_samplerate / (gfp->version == 1  ?  1152  :  576 )) / 8;
+  // bytes_per_frame = bitrate * 1000 / gfp->out_samplerate * (gfp->version == 1  ?  1152  :  576 ) / 8;
+  // bytes_per_frame = bitrate * ( gfp->version == 1  ?  1152/8*1000  :  576/8*1000 ) / gfp->out_samplerate;
+  
+  whole_SpF = (gfp->version+1)*72000*bit_rate / gfp->out_samplerate;
+  
+  // There must be somewhere code toggling gfc->padding on and off
+  
+  /* main encoding routine toggles padding on and off */
+  /* one Layer3 Slot consists of 8 bits */
+  *bitsPerFrame = 8 * (whole_SpF + gfc->padding);
+  
+  // sideinfo_len
+  *mean_bits = (*bitsPerFrame - 8*gfc->sideinfo_len) / gfc->mode_gr;
+}
+
+
+
+
+#define ABS(A) (((A)>0) ? (A) : -(A))
+
+int FindNearestBitrate(
+int bRate,        /* legal rates from 32 to 448 */
+int version,      /* MPEG-1 or MPEG-2 LSF */
+int samplerate)   /* convert bitrate in kbps to index */
+{
+    int  bitrate = 0;
+    int  i;
+  
+    for ( i = 1; i <= 14; i++ )
+        if ( ABS (bitrate_table[version][i] - bRate) < ABS (bitrate - bRate) )
+            bitrate = bitrate_table [version] [i];
+	    
+    return bitrate;
+}
+
+
+/* map frequency to a valid MP3 sample frequency
+ *
+ * [email protected] 2000-07-01
+ */
+int map2MP3Frequency(int freq)
+{
+    if (freq <=  8000) return  8000;
+    if (freq <= 11025) return 11025;
+    if (freq <= 12000) return 12000;
+    if (freq <= 16000) return 16000;
+    if (freq <= 22050) return 22050;
+    if (freq <= 24000) return 24000;
+    if (freq <= 32000) return 32000;
+    if (freq <= 44100) return 44100;
+    
+    return 48000;
+}
+
+int BitrateIndex(
+int bRate,        /* legal rates from 32 to 448 kbps */
+int version,      /* MPEG-1 or MPEG-2/2.5 LSF */
+int samplerate)   /* convert bitrate in kbps to index */
+{
+    int  i;
+
+    for ( i = 0; i <= 14; i++)
+        if ( bitrate_table [version] [i] == bRate )
+            return i;
+	    
+    return -1;
+}
+
+/* convert samp freq in Hz to index */
+
+int SmpFrqIndex ( int sample_freq, int* const version )
+{
+    switch ( sample_freq ) {
+    case 44100: *version = 1; return  0;
+    case 48000: *version = 1; return  1;
+    case 32000: *version = 1; return  2;
+    case 22050: *version = 0; return  0;
+    case 24000: *version = 0; return  1;
+    case 16000: *version = 0; return  2;
+    case 11025: *version = 0; return  0;
+    case 12000: *version = 0; return  1;
+    case  8000: *version = 0; return  2;
+    default:    *version = 0; return -1;
+    }
+}
+
+
+/*****************************************************************************
+*
+*  End of bit_stream.c package
+*
+*****************************************************************************/
+
+/* reorder the three short blocks By Takehiro TOMINAGA */
+/*
+  Within each scalefactor band, data is given for successive
+  time windows, beginning with window 0 and ending with window 2.
+  Within each window, the quantized values are then arranged in
+  order of increasing frequency...
+*/
+void freorder(int scalefac_band[],FLOAT8 ix_orig[576]) {
+  int i,sfb, window, j=0;
+  FLOAT8 ix[576];
+  for (sfb = 0; sfb < SBMAX_s; sfb++) {
+    int start = scalefac_band[sfb];
+    int end   = scalefac_band[sfb + 1];
+    for (window = 0; window < 3; window++) {
+      for (i = start; i < end; ++i) {
+	ix[j++] = ix_orig[3*i+window];
+      }
+    }
+  }
+  memcpy(ix_orig,ix,576*sizeof(FLOAT8));
+}
+
+
+
+
+
+
+
+#ifndef KLEMM_44
+
+
+/* resampling via FIR filter, blackman window */
+inline static FLOAT8 blackman(FLOAT8 x,FLOAT8 fcn,int l)
+{
+  /* This algorithm from:
+SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C
+S.D. Stearns and R.A. David, Prentice-Hall, 1992
+  */
+  FLOAT8 bkwn,x2;
+  FLOAT8 wcn = (PI * fcn);
+  
+  x /= l;
+  if (x<0) x=0;
+  if (x>1) x=1;
+  x2 = x - .5;
+
+  bkwn = 0.42 - 0.5*cos(2*x*PI)  + 0.08*cos(4*x*PI);
+  if (fabs(x2)<1e-9) return wcn/PI;
+  else 
+    return  (  bkwn*sin(l*wcn*x2)  / (PI*l*x2)  );
+
+
+}
+
+/* gcd - greatest common divisor */
+/* Joint work of Euclid and M. Hendry */
+
+int gcd ( int i, int j )
+{
+//    assert ( i > 0  &&  j > 0 );
+    return j ? gcd(j, i % j) : i;
+}
+
+
+
+/* copy in new samples from in_buffer into mfbuf, with resampling & scaling 
+   if necessary.  n_in = number of samples from the input buffer that
+   were used.  n_out = number of samples copied into mfbuf  */
+
+void fill_buffer(lame_global_flags *gfp,
+		 sample_t *mfbuf[2],
+		 sample_t *in_buffer[2],
+		 int nsamples, int *n_in, int *n_out)
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int ch,i;
+
+    /* copy in new samples into mfbuf, with resampling if necessary */
+    if (gfc->resample_ratio != 1.0) {
+	for (ch = 0; ch < gfc->channels_out; ch++) {
+	    *n_out =
+		fill_buffer_resample(gfp, &mfbuf[ch][gfc->mf_size],
+				     gfp->framesize, in_buffer[ch],
+				     nsamples, n_in, ch);
+	}
+    }
+    else {
+	*n_out = Min(gfp->framesize, nsamples);
+	*n_in = *n_out;
+	for (i = 0; i < *n_out; ++i) {
+	    mfbuf[0][gfc->mf_size + i] = in_buffer[0][i];
+	    if (gfc->channels_out == 2)
+		mfbuf[1][gfc->mf_size + i] = in_buffer[1][i];
+	}
+    }
+
+    /* user selected scaling of the samples */
+    if (gfp->scale != 0) {
+	for (i=0 ; i<*n_out; ++i) {
+	    mfbuf[0][gfc->mf_size+i] *= gfp->scale;
+	    if (gfc->channels_out == 2)
+		mfbuf[1][gfc->mf_size + i] *= gfp->scale;
+	}
+    }
+
+}
+    
+
+
+
+int fill_buffer_resample(
+       lame_global_flags *gfp,
+       sample_t *outbuf,
+       int desired_len,
+       sample_t *inbuf,
+       int len,
+       int *num_used,
+       int ch) 
+{
+
+  
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int BLACKSIZE;
+  FLOAT8 offset,xvalue;
+  int i,j=0,k;
+  int filter_l;
+  FLOAT8 fcn,intratio;
+  FLOAT *inbuf_old;
+  int bpc;   /* number of convolution functions to pre-compute */
+  bpc = gfp->out_samplerate/gcd(gfp->out_samplerate,gfp->in_samplerate);
+  if (bpc>BPC) bpc = BPC;
+
+  intratio=( fabs(gfc->resample_ratio - floor(.5+gfc->resample_ratio)) < .0001 );
+  fcn = 1.00/gfc->resample_ratio;
+  if (fcn>1.00) fcn=1.00;
+  filter_l = gfp->quality < 7 ? 31 : 7;
+  filter_l = 31;
+  if (0==filter_l % 2 ) --filter_l;/* must be odd */
+  filter_l += intratio;            /* unless resample_ratio=int, it must be even */
+
+
+  BLACKSIZE = filter_l+1;  /* size of data needed for FIR */
+  
+  if ( gfc->fill_buffer_resample_init == 0 ) {
+    gfc->inbuf_old[0]=calloc(BLACKSIZE,sizeof(gfc->inbuf_old[0][0]));
+    gfc->inbuf_old[1]=calloc(BLACKSIZE,sizeof(gfc->inbuf_old[0][0]));
+    for (i=0; i<=2*bpc; ++i)
+      gfc->blackfilt[i]=calloc(BLACKSIZE,sizeof(gfc->blackfilt[0][0]));
+
+    gfc->itime[0]=0;
+    gfc->itime[1]=0;
+
+    /* precompute blackman filter coefficients */
+    for ( j = 0; j <= 2*bpc; j++ ) {
+        FLOAT8 sum = 0.; 
+        offset = (j-bpc) / (2.*bpc);
+        for ( i = 0; i <= filter_l; i++ ) 
+            sum += 
+	    gfc->blackfilt[j][i]  = blackman(i-offset,fcn,filter_l);
+	for ( i = 0; i <= filter_l; i++ ) 
+	  gfc->blackfilt[j][i] /= sum;
+    }
+    gfc->fill_buffer_resample_init = 1;
+  }
+  
+  inbuf_old=gfc->inbuf_old[ch];
+
+  /* time of j'th element in inbuf = itime + j/ifreq; */
+  /* time of k'th element in outbuf   =  j/ofreq */
+  for (k=0;k<desired_len;k++) {
+    FLOAT time0;
+    int joff;
+
+    time0 = k*gfc->resample_ratio;       /* time of k'th output sample */
+    j = floor( time0 -gfc->itime[ch]  );
+
+    /* check if we need more input data */
+    if ((filter_l + j - filter_l/2) >= len) break;
+
+    /* blackman filter.  by default, window centered at j+.5(filter_l%2) */
+    /* but we want a window centered at time0.   */
+    offset = ( time0 -gfc->itime[ch] - (j + .5*(filter_l%2)));
+    assert(fabs(offset)<=.500001);
+
+    /* find the closest precomputed window for this offset: */
+    joff = floor((offset*2*bpc) + bpc +.5);
+
+    xvalue = 0.;
+    for (i=0 ; i<=filter_l ; ++i) {
+      int j2 = i+j-filter_l/2;
+      int y;
+      assert(j2<len);
+      assert(j2+BLACKSIZE >= 0);
+      y = (j2<0) ? inbuf_old[BLACKSIZE+j2] : inbuf[j2];
+#define PRECOMPUTE
+#ifdef PRECOMPUTE
+      xvalue += y*gfc->blackfilt[joff][i];
+#else
+      xvalue += y*blackman(i-offset,fcn,filter_l);  /* very slow! */
+#endif
+    }
+    outbuf[k]=xvalue;
+  }
+
+  
+  /* k = number of samples added to outbuf */
+  /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2]  */
+
+  /* how many samples of input data were used:  */
+  *num_used = Min(len,filter_l+j-filter_l/2);
+
+  /* adjust our input time counter.  Incriment by the number of samples used,
+   * then normalize so that next output sample is at time 0, next
+   * input buffer is at time itime[ch] */
+  gfc->itime[ch] += *num_used - k*gfc->resample_ratio;
+
+  /* save the last BLACKSIZE samples into the inbuf_old buffer */
+  if (*num_used >= BLACKSIZE) {
+      for (i=0;i<BLACKSIZE;i++)
+	  inbuf_old[i]=inbuf[*num_used + i -BLACKSIZE];
+  }else{
+      /* shift in *num_used samples into inbuf_old  */
+       int n_shift = BLACKSIZE-*num_used;  /* number of samples to shift */
+
+       /* shift n_shift samples by *num_used, to make room for the
+	* num_used new samples */
+       for (i=0; i<n_shift; ++i ) 
+	   inbuf_old[i] = inbuf_old[i+ *num_used];
+
+       /* shift in the *num_used samples */
+       for (j=0; i<BLACKSIZE; ++i, ++j ) 
+	   inbuf_old[i] = inbuf[j];
+
+       assert(j==*num_used);
+  }
+  return k;  /* return the number samples created at the new samplerate */
+}
+
+
+#endif /* ndef KLEMM_44 */
+
+
+
+/***********************************************************************
+*
+*  Message Output
+*
+***********************************************************************/
+void  lame_debugf (const lame_internal_flags *gfc, const char* format, ... )
+{
+    va_list  args;
+
+    va_start ( args, format );
+
+    if ( gfc->report.debugf != NULL ) {
+        gfc->report.debugf( format, args );
+    } else {
+        (void) vfprintf ( stderr, format, args );
+        fflush ( stderr );      /* an debug function should flush immediately */
+    }
+
+    va_end   ( args );
+}
+
+
+void  lame_msgf (const lame_internal_flags *gfc, const char* format, ... )
+{
+    va_list  args;
+
+    va_start ( args, format );
+   
+    if ( gfc->report.msgf != NULL ) {
+        gfc->report.msgf( format, args );
+    } else {
+        (void) vfprintf ( stderr, format, args );
+        fflush ( stderr );     /* we print to stderr, so me may want to flush */
+    }
+
+    va_end   ( args );
+}
+
+
+void  lame_errorf (const lame_internal_flags *gfc, const char* format, ... )
+{
+    va_list  args;
+
+    va_start ( args, format );
+    
+    if ( gfc->report.errorf != NULL ) {
+        gfc->report.errorf( format, args );
+    } else {
+        (void) vfprintf ( stderr, format, args );
+        fflush   ( stderr );    /* an error function should flush immediately */
+    }
+
+    va_end   ( args );
+}
+
+
+
+/***********************************************************************
+ *
+ *      routines to detect CPU specific features like 3DNow, MMX, SIMD
+ *
+ *  donated by Frank Klemm
+ *  added Robert Hegemann 2000-10-10
+ *
+ ***********************************************************************/
+
+int  has_i387 ( void )
+{
+#ifdef HAVE_NASM 
+    return 1;
+#else
+    return 0;   /* don't know, assume not */
+#endif
+}    
+
+int  has_MMX ( void )
+{
+#ifdef HAVE_NASM 
+    extern int has_MMX_nasm ( void );
+    return has_MMX_nasm ();
+#else
+    return 0;   /* don't know, assume not */
+#endif
+}    
+
+int  has_3DNow ( void )
+{
+#ifdef HAVE_NASM 
+    extern int has_3DNow_nasm ( void );
+    return has_3DNow_nasm ();
+#else
+    return 0;   /* don't know, assume not */
+#endif
+}    
+
+int  has_SIMD ( void )
+{
+#ifdef HAVE_NASM 
+    extern int has_SIMD_nasm ( void );
+    return has_SIMD_nasm ();
+#else
+    return 0;   /* don't know, assume not */
+#endif
+}    
+
+int  has_SIMD2 ( void )
+{
+#ifdef HAVE_NASM 
+    extern int has_SIMD2_nasm ( void );
+    return has_SIMD2_nasm ();
+#else
+    return 0;   /* don't know, assume not */
+#endif
+}    
+
+/***********************************************************************
+ *
+ *  some simple statistics
+ *
+ *  bitrate index 0: free bitrate -> not allowed in VBR mode
+ *  : bitrates, kbps depending on MPEG version
+ *  bitrate index 15: forbidden
+ *
+ *  mode_ext:
+ *  0:  LR
+ *  1:  LR-i
+ *  2:  MS
+ *  3:  MS-i
+ *
+ ***********************************************************************/
+ 
+void updateStats( lame_internal_flags * const gfc )
+{
+    assert ( gfc->bitrate_index < 16u );
+    assert ( gfc->mode_ext      <  4u );
+    
+    /* count bitrate indices */
+    gfc->bitrate_stereoMode_Hist [gfc->bitrate_index] [4] ++;
+    
+    /* count 'em for every mode extension in case of 2 channel encoding */
+    if (gfc->channels_out == 2)
+        gfc->bitrate_stereoMode_Hist [gfc->bitrate_index] [gfc->mode_ext]++;
+}
+
+
+
+/*  caution: a[] will be resorted!!
+ */
+int select_kth_int(int a[], int N, int k)
+{
+    int i, j, l, r, v, w;
+    
+    l = 0;
+    r = N-1;
+    while (r > l) {
+        v = a[r];
+        i = l-1;
+        j = r;
+        for (;;) {
+            while (a[++i] < v) /*empty*/;
+            while (a[--j] > v) /*empty*/;
+            if (i >= j) 
+                break;
+            /* swap i and j */
+            w = a[i];
+            a[i] = a[j];
+            a[j] = w;
+        }
+        /* swap i and r */
+        w = a[i];
+        a[i] = a[r];
+        a[r] = w;
+        if (i >= k) 
+            r = i-1;
+        if (i <= k) 
+            l = i+1;
+    }
+    return a[k];
+}
+
+
+
+void disable_FPE(void) {
+/* extremly system dependent stuff, move to a lib to make the code readable */
+/*==========================================================================*/
+
+    /*
+     *  Disable floating point exceptions
+     */
+#if defined(__FreeBSD__) && !defined(__alpha__)
+    {
+        /* seet floating point mask to the Linux default */
+        fp_except_t mask;
+        mask = fpgetmask();
+        /* if bit is set, we get SIGFPE on that error! */
+        fpsetmask(mask & ~(FP_X_INV | FP_X_DZ));
+        /*  DEBUGF("FreeBSD mask is 0x%x\n",mask); */
+    }
+#endif
+
+#if defined(__riscos__) && !defined(ABORTFP)
+    /* Disable FPE's under RISC OS */
+    /* if bit is set, we disable trapping that error! */
+    /*   _FPE_IVO : invalid operation */
+    /*   _FPE_DVZ : divide by zero */
+    /*   _FPE_OFL : overflow */
+    /*   _FPE_UFL : underflow */
+    /*   _FPE_INX : inexact */
+    DisableFPETraps(_FPE_IVO | _FPE_DVZ | _FPE_OFL);
+#endif
+
+    /*
+     *  Debugging stuff
+     *  The default is to ignore FPE's, unless compiled with -DABORTFP
+     *  so add code below to ENABLE FPE's.
+     */
+
+#if defined(ABORTFP)
+#if defined(_MSC_VER)
+    {
+#include <float.h>
+        unsigned int mask;
+        mask = _controlfp(0, 0);
+        mask &= ~(_EM_OVERFLOW | _EM_UNDERFLOW | _EM_ZERODIVIDE | _EM_INVALID);
+        mask = _controlfp(mask, _MCW_EM);
+    }
+#elif defined(__CYGWIN__)
+#  define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
+#  define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
+
+#  define _EM_INEXACT     0x00000020 /* inexact (precision) */
+#  define _EM_UNDERFLOW   0x00000010 /* underflow */
+#  define _EM_OVERFLOW    0x00000008 /* overflow */
+#  define _EM_ZERODIVIDE  0x00000004 /* zero divide */
+#  define _EM_INVALID     0x00000001 /* invalid */
+    {
+        unsigned int mask;
+        _FPU_GETCW(mask);
+        /* Set the FPU control word to abort on most FPEs */
+        mask &= ~(_EM_OVERFLOW | _EM_ZERODIVIDE | _EM_INVALID);
+        _FPU_SETCW(mask);
+    }
+# elif defined(__linux__)
+    {
+
+#  include <fpu_control.h>
+#  ifndef _FPU_GETCW
+#  define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
+#  endif
+#  ifndef _FPU_SETCW
+#  define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
+#  endif
+
+        /* 
+         * Set the Linux mask to abort on most FPE's
+         * if bit is set, we _mask_ SIGFPE on that error!
+         *  mask &= ~( _FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM );
+         */
+
+        unsigned int mask;
+        _FPU_GETCW(mask);
+        mask &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
+        _FPU_SETCW(mask);
+    }
+#endif
+#endif /* ABORTFP */
+}
+
+
+/* end of util.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/util.h
@@ -1,0 +1,543 @@
+/*
+ *	lame utility library include file
+ *
+ *	Copyright (c) 1999 Albert L Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_UTIL_H
+#define LAME_UTIL_H
+
+#ifdef HUGE_VAL		/* math.h already seen? */
+#ifndef fabs
+#define fabs(x) ((double)((x) < 0? -(x): (x)))
+#endif
+#endif
+
+/***********************************************************************
+*
+*  Global Include Files
+*
+***********************************************************************/
+#include "machine.h"
+#include "encoder.h"
+#include "lame.h"
+#include "lame-analysis.h"
+#include "id3tag.h"
+
+/***********************************************************************
+*
+*  Global Definitions
+*
+***********************************************************************/
+
+#ifndef FALSE
+#define         FALSE                   0
+#endif
+
+#ifndef TRUE
+#define         TRUE                    (!FALSE)
+#endif
+
+#ifdef UINT_MAX
+# define         MAX_U_32_NUM            UINT_MAX
+#else
+# define         MAX_U_32_NUM            0xFFFFFFFF
+#endif
+
+#ifndef PI
+# ifdef M_PI
+#  define       PI                      M_PI
+# else
+#  define       PI                      3.14159265358979323846
+# endif
+#endif
+
+
+#ifdef M_LN2
+# define        LOG2                    M_LN2
+#else
+# define        LOG2                    0.69314718055994530942
+#endif
+
+#ifdef M_LN10
+# define        LOG10                   M_LN10
+#else
+# define        LOG10                   2.30258509299404568402
+#endif
+
+
+#ifdef M_SQRT2
+# define        SQRT2                   M_SQRT2
+#else
+# define        SQRT2                   1.41421356237309504880
+#endif
+
+
+#define         HAN_SIZE                512
+#define         CRC16_POLYNOMIAL        0x8005
+#define MAX_BITS 4095
+
+/* "bit_stream.h" Definitions */
+#define         BUFFER_SIZE     LAME_MAXMP3BUFFER 
+
+#define         Min(A, B)       ((A) < (B) ? (A) : (B))
+#define         Max(A, B)       ((A) > (B) ? (A) : (B))
+
+
+
+
+
+/***********************************************************************
+*
+*  Global Type Definitions
+*
+***********************************************************************/
+
+
+
+/* "bit_stream.h" Type Definitions */
+
+typedef struct  bit_stream_struc {
+    unsigned char *buf;         /* bit stream buffer */
+    int         buf_size;       /* size of buffer (in number of bytes) */
+    int         totbit;         /* bit counter of bit stream */
+    int         buf_byte_idx;   /* pointer to top byte in buffer */
+    int         buf_bit_idx;    /* pointer to top bit of top byte in buffer */
+    
+    /* format of file in rd mode (BINARY/ASCII) */
+} Bit_stream_struc;
+
+#include "l3side.h"
+
+
+/* variables used for --nspsytune */
+typedef struct {
+  int   use; /* indicates the use of exp_nspsytune */
+  int   safejoint; /* safe joint stereo mode */
+  FLOAT last_en_subshort[4][9];
+  FLOAT last_attack_intensity[4][9];
+  FLOAT	last_thm[4][SBMAX_s][3];
+  int   last_attacks[4][3];
+  FLOAT pe_l[4],pe_s[4];
+  FLOAT pefirbuf[19];
+  FLOAT bass,alto,treble;
+} nsPsy_t;
+
+
+typedef struct 
+{
+    int sum;    // what we have seen so far
+    int seen;   // how many frames we have seen in this chunk
+    int want;   // how many frames we want to collect into one chunk
+    int pos;    // actual position in our bag
+    int size;   // size of our bag
+    int *bag;   // pointer to our bag
+} VBR_seek_info_t;
+
+
+/**
+ *  ATH related stuff, if something new ATH related has to be added,
+ *  please plugg it here into the ATH_t struct
+ */
+typedef struct
+{
+    int     use_adjust;     // do we want to use the auto adjustment yes/no
+    FLOAT8  adjust;         // lowering based on peak volume, 1 = no lowering
+    FLOAT8  adjust_limit;   // limit for dynamic ATH adjust
+    FLOAT8  decay;          // determined to lower x dB each second
+    FLOAT8  l[SBMAX_l];     // ATH for sfbs in long blocks
+    FLOAT8  s[SBMAX_s];     // ATH for sfbs in short blocks
+    FLOAT8  cb[CBANDS];     // ATH for convolution bands
+} ATH_t;
+
+
+
+/* Guest structure, only temporarly here */
+
+typedef enum {
+    coding_MPEG_Layer_1 = 1,
+    coding_MPEG_Layer_2 = 2,
+    coding_MPEG_Layer_3 = 3,
+    coding_MPEG_AAC     = 4,
+    coding_Ogg_Vorbis   = 5,
+    coding_MPEG_plus    = 6
+} coding_t;
+
+#define MAX_CHANNELS  2
+
+typedef struct {
+    unsigned long  Class_ID;        /* Class ID to recognize a resample_t
+                                       object */
+    long double    sample_freq_in;  /* Input sample frequency in Hz */
+    long double    sample_freq_out; /* requested Output sample frequency in Hz */
+    float          lowpass_freq;    /* lowpass frequency, this is the -6 dB
+                                       point */
+    int            scale_in;        /* the resampling is actually done by
+                                       scale_out: */
+    int            scale_out;       /* frequency is
+                                         samplefreq_in * scale_out / scal */
+    int            taps;            /* number of taps for every FIR resample
+                                       filter */
+
+    sample_t**     fir;             /* the FIR resample filters:
+                                         fir [scale_out] [taps */
+    void*          firfree;         /* start address of the alloced memory for
+                                       fir, */
+    unsigned char* src_step;
+    sample_t*      in_old       [MAX_CHANNELS];
+    //    uint64_t       sample_count [MAX_CHANNELS];
+    unsigned       fir_stepper  [MAX_CHANNELS];
+    int            inp_stepper  [MAX_CHANNELS];
+
+} resample_t;
+
+
+typedef struct  {
+
+  /********************************************************************
+   * internal variables NOT set by calling program, and should not be *
+   * modified by the calling program                                  *
+   ********************************************************************/
+  
+  /*  
+   * Some remarks to the Class_ID field:
+   * The Class ID is an Identifier for a pointer to this struct.
+   * It is very unlikely that a pointer to lame_global_flags has the same 32 bits 
+   * in it's structure (large and other special properties, for instance prime).
+   *
+   * To test that the structure is right and initialized, use:
+   *     if ( gfc -> Class_ID == LAME_ID ) ...
+   * Other remark:
+   *     If you set a flag to 0 for uninit data and 1 for init data, the right test
+   *     should be "if (flag == 1)" and NOT "if (flag)". Unintended modification
+   *     of this element will be otherwise misinterpreted as an init.
+   */
+  
+  #define  LAME_ID   0xFFF88E3B
+  unsigned long Class_ID;
+
+  struct {
+    void (*msgf)  (const char *format, va_list ap);
+    void (*debugf)(const char *format, va_list ap);
+    void (*errorf)(const char *format, va_list ap);
+  } report;
+  
+  int lame_encode_frame_init;     
+  int iteration_init_init;
+  int fill_buffer_resample_init;
+  int psymodel_init;
+
+  int padding;                    /* padding for the current frame? */
+  int mode_gr;                    /* granules per frame */
+  int          channels_in;	/* number of channels in the input data stream (PCM or decoded PCM) */
+  int          channels_out;  /* number of channels in the output data stream (not used for decoding) */
+  resample_t*  resample_in;   /* context for coding (PCM=>MP3) resampling */
+  resample_t*  resample_out;	/* context for decoding (MP3=>PCM) resampling */
+  long double  samplefreq_in;
+  long double  samplefreq_out;
+#ifndef  MFSIZE
+# define MFSIZE  ( 3*1152 + ENCDELAY - MDCTDELAY )
+#endif
+#ifdef  KLEMM_44
+  sample_t*    mfbuf [MAX_CHANNELS];
+#else
+  sample_t     mfbuf [2] [MFSIZE];
+#endif
+  size_t       frame_size;    /* size of one frame in samples per channel */
+  lame_global_flags* gfp;     /* needed as long as the frame encoding functions must access gfp (all needed information can be added to gfc) */
+  coding_t     coding;        /* MPEG Layer 1/2/3, Ogg Vorbis, MPEG AAC, ... */
+  unsigned long frame_count;  /* Number of frames coded, 2^32 > 3 years */
+  int          mf_samples_to_encode;
+  int          mf_size;
+  float        ampl;	  /* amplification at the end of the current chunk (1. = 0 dB) */
+  float        last_ampl;	  /* amplification at the end of the last chunk    (1. = 0 dB) */
+  int VBR_min_bitrate;            /* min bitrate index */
+  int VBR_max_bitrate;            /* max bitrate index */
+  float resample_ratio;           /* input_samp_rate/output_samp_rate */
+  int bitrate_index;
+  int samplerate_index;
+  int mode_ext;
+
+
+  /* lowpass and highpass filter control */
+  float lowpass1,lowpass2;        /* normalized frequency bounds of passband */
+  float highpass1,highpass2;      /* normalized frequency bounds of passband */
+                                  
+  /* polyphase filter (filter_type=0)  */
+  int lowpass_band;          /* zero bands >= lowpass_band in the polyphase filterbank */
+  int highpass_band;         /* zero bands <= highpass_band */
+  int lowpass_start_band;    /* amplify bands between start */
+  int lowpass_end_band;      /* and end for lowpass */
+  int highpass_start_band;   /* amplify bands between start */
+  int highpass_end_band;     /* and end for highpass */
+
+
+  int filter_type;          /* 0=polyphase filter, 1= FIR filter 2=MDCT filter(bad)*/
+  int quantization;         /* 0 = ISO formual,  1=best amplitude */
+  int noise_shaping;        /* 0 = none 
+                               1 = ISO AAC model
+                               2 = allow scalefac_select=1  
+                             */
+
+  int noise_shaping_amp;    /*  0 = ISO model: amplify all distorted bands
+                                1 = amplify only most distorted band
+                                2 = amplify bands using? 
+                                3 = amplify bands using?
+			     */
+
+  int psymodel;             /* 1 = gpsycho. 0 = none */
+  int noise_shaping_stop;   /* 0 = stop at over=0, all scalefacs amplified or
+                                   a scalefac has reached max value
+                               1 = stop when all scalefacs amplified or        
+                                   a scalefac has reached max value
+                               2 = stop when all scalefacs amplified 
+			    */
+
+  int use_best_huffman;     /* 0 = no.  1=outside loop  2=inside loop(slow) */
+
+
+
+
+  /* variables used by lame.c */
+  Bit_stream_struc   bs;
+  III_side_info_t l3_side;
+  FLOAT8 ms_ratio[2];
+  /* used for padding */
+  int frac_SpF;
+  int slot_lag;
+
+
+  /* optional ID3 tags, used in id3tag.c  */
+  struct id3tag_spec tag_spec;
+
+
+  /* variables used by quantize.c */
+  int OldValue[2];
+  int CurrentStep;
+  FLOAT8 decay;
+  FLOAT8 masking_lower;
+
+  char bv_scf[576];
+  
+  int sfb21_extra; /* will be set in lame_init_params */
+  
+  int is_mpeg1; /* 1 for MPEG-1, 0 for MPEG-2(.5) */
+
+#ifndef KLEMM_44
+  /* variables used by util.c */
+  /* BPC = maximum number of filter convolution windows to precompute */
+#define BPC 320
+  sample_t *inbuf_old [2];
+  sample_t *blackfilt [2*BPC+1];
+  FLOAT8 itime[2];
+#endif
+  int sideinfo_len;
+
+  /* variables for newmdct.c */
+  FLOAT8 sb_sample[2][2][18][SBLIMIT];
+  FLOAT8 amp_lowpass[32];
+  FLOAT8 amp_highpass[32];
+
+  /* variables for bitstream.c */
+  /* mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58
+   * max number of frames in reservoir:  8 
+   * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1
+   * with VBR, if you are encoding all silence, it is possible to
+   * have 8kbs/24khz frames with 1byte of data each, which means we need
+   * to buffer up to 255 headers! */
+  /* also, max_header_buf has to be a power of two */
+#define MAX_HEADER_BUF 256
+#define MAX_HEADER_LEN 40 /* max size of header is 38 */
+  struct {
+    int write_timing;
+    int ptr;
+    char buf[MAX_HEADER_LEN];
+  } header[MAX_HEADER_BUF];
+
+  int h_ptr;
+  int w_ptr;
+  int ancillary_flag;
+  
+
+  /* variables for reservoir.c */
+  int ResvSize; /* in bits */
+  int ResvMax;  /* in bits */
+
+  
+  scalefac_struct scalefac_band;
+
+
+  /* DATA FROM PSYMODEL.C */
+/* The static variables "r", "phi_sav", "new", "old" and "oldest" have    */
+/* to be remembered for the unpredictability measure.  For "r" and        */
+/* "phi_sav", the first index from the left is the channel select and     */
+/* the second index is the "age" of the data.                             */
+  FLOAT8	minval[CBANDS];
+  FLOAT8	nb_1[4][CBANDS], nb_2[4][CBANDS];
+  FLOAT8 s3_s[CBANDS][CBANDS];
+  FLOAT8 s3_l[CBANDS][CBANDS];
+
+  III_psy_xmin thm[4];
+  III_psy_xmin en[4];
+  
+  /* unpredictability calculation
+   */
+  int cw_upper_index;
+  int cw_lower_index;
+  FLOAT ax_sav[4][2][HBLKSIZE];
+  FLOAT bx_sav[4][2][HBLKSIZE];
+  FLOAT rx_sav[4][2][HBLKSIZE];
+  FLOAT cw[HBLKSIZE];
+
+  /* fft and energy calculation    */
+  FLOAT wsamp_L[2][BLKSIZE];
+  FLOAT energy[HBLKSIZE];
+  FLOAT wsamp_S[2][3][BLKSIZE_s];
+  FLOAT energy_s[3][HBLKSIZE_s];
+  FLOAT tot_ener[4];
+
+  
+  /* fft.c    */
+  FLOAT window[BLKSIZE], window_s[BLKSIZE_s/2];
+  
+  
+  /* Scale Factor Bands    */
+  FLOAT8	w1_l[SBMAX_l], w2_l[SBMAX_l];
+  FLOAT8	w1_s[SBMAX_s], w2_s[SBMAX_s];
+  FLOAT8 mld_l[SBMAX_l],mld_s[SBMAX_s];
+  int	bu_l[SBMAX_l],bo_l[SBMAX_l] ;
+  int	bu_s[SBMAX_s],bo_s[SBMAX_s] ;
+  int	npart_l,npart_s;
+  int	npart_l_orig,npart_s_orig;
+  
+  int	s3ind[CBANDS][2];
+  int	s3ind_s[CBANDS][2];
+  FLOAT8 SNR_s[CBANDS];
+
+  int	numlines_s[CBANDS];
+  int	numlines_l[CBANDS];
+  
+  /* frame analyzer    */
+  FLOAT energy_save[4][HBLKSIZE];
+  FLOAT8 pe_save[4];
+  FLOAT8 ers_save[4];
+  
+  /* simple statistics */
+  int   bitrate_stereoMode_Hist [16] [4+1];
+
+  /* ratios  */
+  FLOAT8 pe[4];
+  FLOAT8 ms_ratio_s_old,ms_ratio_l_old;
+  FLOAT8 ms_ener_ratio_old;
+
+  /* block type */
+  int	blocktype_old[2];
+
+  /* used by the frame analyzer */
+  plotting_data *pinfo;
+
+  /* CPU features */
+  struct {
+    unsigned int  i387      : 1; /* FPU is a normal Intel CPU */
+    unsigned int  MMX       : 1; /* Pentium MMX, Pentium II...IV, K6, K6-2,
+                                    K6-III, Athlon */
+    unsigned int  AMD_3DNow : 1; /* K6-2, K6-III, Athlon      */
+    unsigned int  SIMD      : 1; /* Pentium III, Pentium 4    */
+    unsigned int  SIMD2     : 1; /* Pentium 4, K8             */
+  } CPU_features;
+   
+  /* functions to replace with CPU feature optimized versions in takehiro.c */
+  int (*choose_table)(const int *ix, const int *end, int *s);
+  
+
+  nsPsy_t nsPsy;  /* variables used for --nspsytune */
+  
+  unsigned crcvalue;
+  
+  VBR_seek_info_t VBR_seek_table; // used for Xing VBR header
+  
+  ATH_t *ATH;   // all ATH related stuff
+  
+  
+} lame_internal_flags;
+
+
+
+ 
+
+/***********************************************************************
+*
+*  Global Function Prototype Declarations
+*
+***********************************************************************/
+void                  freegfc(lame_internal_flags *gfc);
+extern int            BitrateIndex(int, int,int);
+extern int            FindNearestBitrate(int,int,int);
+extern int            map2MP3Frequency(int freq);
+extern int            SmpFrqIndex(int, int*);
+extern FLOAT8         ATHformula(FLOAT8 f,lame_global_flags *gfp);
+extern FLOAT8         freq2bark(FLOAT8 freq);
+extern FLOAT8         freq2cbw(FLOAT8 freq);
+extern void freorder(int scalefac_band[],FLOAT8 ix_orig[576]);
+void disable_FPE(void);
+
+extern void 
+getframebits(lame_global_flags *gfp, int *bitsPerFrame, int *mean_bits);
+
+void fill_buffer(lame_global_flags *gfp,
+		 sample_t *mfbuf[2],
+		 sample_t *in_buffer[2],
+		 int nsamples, int *n_in, int *n_out);
+
+int  fill_buffer_resample (
+        lame_global_flags *gfp,
+        sample_t*  outbuf,
+        int        desired_len,
+        sample_t*  inbuf,
+        int        len,
+        int*       num_used,
+        int        channels );
+
+
+extern int  has_i387  ( void );
+extern int  has_MMX   ( void );
+extern int  has_3DNow ( void );
+extern int  has_SIMD  ( void );
+extern int  has_SIMD2 ( void );
+
+extern void updateStats (lame_internal_flags *gfc);
+
+
+
+/***********************************************************************
+*
+*  Macros about Message Printing and Exit
+*
+***********************************************************************/
+extern void lame_errorf(const lame_internal_flags *gfc, const char *, ...);
+extern void lame_debugf(const lame_internal_flags *gfc, const char *, ...);
+extern void lame_msgf  (const lame_internal_flags *gfc, const char *, ...);
+#define DEBUGF  lame_debugf
+#define ERRORF	lame_errorf
+#define MSGF	lame_msgf
+
+
+int select_kth_int(int b[], int N, int k);
+
+
+#endif /* LAME_UTIL_H */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/vbrquantize.c
@@ -1,0 +1,1689 @@
+/*
+ *	MP3 quantization
+ *
+ *	Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: vbrquantize.c,v 1.41 2001/03/12 07:26:08 markt Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include "util.h"
+#include "l3side.h"
+#include "quantize.h"
+#include "reservoir.h"
+#include "quantize_pvt.h"
+#include "lame-analysis.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+#undef MAXQUANTERROR
+
+
+typedef union {
+    float f;
+    int   i;
+} fi_union;
+
+#define MAGIC_FLOAT (65536*(128))
+#define MAGIC_INT    0x4b000000
+
+#ifdef TAKEHIRO_IEEE754_HACK
+
+#ifdef MAXQUANTERROR 
+#define DUFFBLOCK() do { \
+        xp = xr34[0] * sfpow34_p1; \
+        xe = xr34[0] * sfpow34_eq; \
+        xm = xr34[0] * sfpow34_m1; \
+        if (xm > IXMAX_VAL)  \
+            return -1; \
+        xp += MAGIC_FLOAT; \
+        xe += MAGIC_FLOAT; \
+        xm += MAGIC_FLOAT; \
+        fi[0].f = xp; \
+        fi[1].f = xe; \
+        fi[2].f = xm; \
+        fi[0].f = xp + (adj43asm - MAGIC_INT)[fi[0].i]; \
+        fi[1].f = xe + (adj43asm - MAGIC_INT)[fi[1].i]; \
+        fi[2].f = xm + (adj43asm - MAGIC_INT)[fi[2].i]; \
+        fi[0].i -= MAGIC_INT; \
+        fi[1].i -= MAGIC_INT; \
+        fi[2].i -= MAGIC_INT; \
+        x0 = fabs(xr[0]); \
+        xp = x0 - pow43[fi[0].i] * sfpow_p1; \
+        xe = x0 - pow43[fi[1].i] * sfpow_eq; \
+        xm = x0 - pow43[fi[2].i] * sfpow_m1; \
+        xp *= xp; \
+        xe *= xe; \
+        xm *= xm; \
+        xfsf_eq = Max(xfsf_eq, xe); \
+        xfsf_p1 = Max(xfsf_p1, xp); \
+        xfsf_m1 = Max(xfsf_m1, xm); \
+        ++xr; \
+        ++xr34; \
+    } while(0)  
+#else
+#define DUFFBLOCK() do { \
+        xp = xr34[0] * sfpow34_p1; \
+        xe = xr34[0] * sfpow34_eq; \
+        xm = xr34[0] * sfpow34_m1; \
+        if (xm > IXMAX_VAL)  \
+            return -1; \
+        xp += MAGIC_FLOAT; \
+        xe += MAGIC_FLOAT; \
+        xm += MAGIC_FLOAT; \
+        fi[0].f = xp; \
+        fi[1].f = xe; \
+        fi[2].f = xm; \
+        fi[0].f = xp + (adj43asm - MAGIC_INT)[fi[0].i]; \
+        fi[1].f = xe + (adj43asm - MAGIC_INT)[fi[1].i]; \
+        fi[2].f = xm + (adj43asm - MAGIC_INT)[fi[2].i]; \
+        fi[0].i -= MAGIC_INT; \
+        fi[1].i -= MAGIC_INT; \
+        fi[2].i -= MAGIC_INT; \
+        x0 = fabs(xr[0]); \
+        xp = x0 - pow43[fi[0].i] * sfpow_p1; \
+        xe = x0 - pow43[fi[1].i] * sfpow_eq; \
+        xm = x0 - pow43[fi[2].i] * sfpow_m1; \
+        xfsf_p1 += xp * xp; \
+        xfsf_eq += xe * xe; \
+        xfsf_m1 += xm * xm; \
+        ++xr; \
+        ++xr34; \
+    } while(0)  
+#endif
+
+#else
+
+/*********************************************************************
+ * XRPOW_FTOI is a macro to convert floats to ints.  
+ * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
+ *                                         ROUNDFAC= -0.0946
+ *
+ * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]   
+ *                                   ROUNDFAC=0.4054
+ *********************************************************************/
+#  define QUANTFAC(rx)  adj43[rx]
+#  define ROUNDFAC 0.4054
+#  define XRPOW_FTOI(src,dest) ((dest) = (int)(src))
+
+
+#endif
+
+
+static FLOAT8
+calc_sfb_noise(const FLOAT8 *xr, const FLOAT8 *xr34, const int bw, const int sf)
+{
+  int j;
+  fi_union fi; 
+  FLOAT8 temp;
+  FLOAT8 xfsf=0;
+  FLOAT8 sfpow,sfpow34;
+
+  sfpow = POW20(sf+210); /*pow(2.0,sf/4.0); */
+  sfpow34  = IPOW20(sf+210); /*pow(sfpow,-3.0/4.0);*/
+
+  for ( j=0; j < bw ; ++j) {
+#if 0
+    int ix;
+    if (xr34[j]*sfpow34 > IXMAX_VAL) return -1;
+    ix=floor( xr34[j]*sfpow34);
+    temp = fabs(xr[j])- pow43[ix]*sfpow;
+    temp *= temp;
+
+    if (ix < IXMAX_VAL) {
+      temp2 = fabs(xr[j])- pow43[ix+1]*sfpow;
+      temp2 *=temp2;
+      if (temp2<temp) {
+	temp=temp2;
+	++ix;
+      }
+    }
+#else
+    if (xr34[j]*sfpow34 > IXMAX_VAL) return -1;
+
+#ifdef TAKEHIRO_IEEE754_HACK
+    temp   = sfpow34*xr34[j];
+    temp  += MAGIC_FLOAT; 
+    fi.f  = temp;
+    fi.f  = temp + (adj43asm - MAGIC_INT)[fi.i];
+    fi.i -= MAGIC_INT;
+#else
+    temp = xr34[j]*sfpow34;
+    XRPOW_FTOI(temp, fi.i);
+    XRPOW_FTOI(temp + QUANTFAC(fi.i), fi.i);
+#endif
+
+    temp = fabs(xr[j])- pow43[fi.i]*sfpow;
+    temp *= temp;
+    
+#endif
+    
+#ifdef MAXQUANTERROR
+    xfsf = Max(xfsf,temp);
+#else
+    xfsf += temp;
+#endif
+  }
+#ifdef MAXQUANTERROR
+  return xfsf;
+#else
+  return xfsf;//bw;
+#endif
+}
+
+
+
+
+static FLOAT8
+calc_sfb_noise_ave(const FLOAT8 *xr, const FLOAT8 *xr34, const int bw, const int sf)
+{
+    double xp;
+    double xe;
+    double xm;
+#ifdef TAKEHIRO_IEEE754_HACK
+    double x0;
+#endif
+    int xx[3], j;
+    fi_union *fi = (fi_union *)xx; 
+    FLOAT8 sfpow34_eq, sfpow34_p1, sfpow34_m1;
+    FLOAT8 sfpow_eq, sfpow_p1, sfpow_m1;
+    FLOAT8 xfsf_eq = 0, xfsf_p1 = 0, xfsf_m1 = 0;
+
+    sfpow_eq = POW20(sf + 210); /*pow(2.0,sf/4.0); */
+    sfpow_m1 = sfpow_eq * .8408964153;  /* pow(2,(sf-1)/4.0) */
+    sfpow_p1 = sfpow_eq * 1.189207115;  
+    
+    sfpow34_eq = IPOW20(sf + 210); /*pow(sfpow,-3.0/4.0);*/
+    sfpow34_m1 = sfpow34_eq * 1.13878863476;       /* .84089 ^ -3/4 */
+    sfpow34_p1 = sfpow34_eq * 0.878126080187;
+
+#ifdef TAKEHIRO_IEEE754_HACK
+    /*
+     *  loop unrolled into "Duff's Device".   Robert Hegemann
+     */    
+    j = (bw+3) / 4;
+    switch (bw % 4) {
+        default:
+        case 0: do{ DUFFBLOCK();
+        case 3:     DUFFBLOCK();
+        case 2:     DUFFBLOCK();
+        case 1:     DUFFBLOCK(); } while (--j);
+    }
+#else
+    for (j = 0; j < bw; ++j) {
+
+        if (xr34[j]*sfpow34_m1 > IXMAX_VAL) return -1;
+
+        xe = xr34[j]*sfpow34_eq;
+        XRPOW_FTOI(xe, fi[0].i);
+        XRPOW_FTOI(xe + QUANTFAC(fi[0].i), fi[0].i);
+        xe = fabs(xr[j])- pow43[fi[0].i]*sfpow_eq;
+        xe *= xe;
+
+        xp = xr34[j]*sfpow34_p1;
+        XRPOW_FTOI(xp, fi[0].i);
+        XRPOW_FTOI(xp + QUANTFAC(fi[0].i), fi[0].i);
+        xp = fabs(xr[j])- pow43[fi[0].i]*sfpow_p1;
+        xp *= xp;
+
+        xm = xr34[j]*sfpow34_m1;
+        XRPOW_FTOI(xm, fi[0].i);
+        XRPOW_FTOI(xm + QUANTFAC(fi[0].i), fi[0].i);
+        xm = fabs(xr[j])- pow43[fi[0].i]*sfpow_m1;
+        xm *= xm;
+
+#ifdef MAXQUANTERROR
+        xfsf_eq = Max(xfsf,xm);
+        xfsf_p1 = Max(xfsf_p1,xp);
+        xfsf_m1 = Max(xfsf_m1,xm);
+#else
+        xfsf_eq += xe;
+        xfsf_p1 += xp;
+        xfsf_m1 += xm;
+#endif
+    }
+#endif
+
+    if (xfsf_eq < xfsf_p1) 
+        xfsf_eq = xfsf_p1;
+    if (xfsf_eq < xfsf_m1) 
+        xfsf_eq = xfsf_m1;
+#ifdef MAXQUANTERROR
+    return xfsf_eq;
+#else
+    return xfsf_eq;//bw;
+#endif
+}
+
+
+
+static int
+find_scalefac(const FLOAT8 *xr, const FLOAT8 *xr34, const int sfb,
+		     const FLOAT8 l3_xmin, const int bw)
+{
+  FLOAT8 xfsf;
+  int i,sf,sf_ok,delsf;
+
+  /* search will range from sf:  -209 -> 45  */
+  sf = -82;
+  delsf = 128;
+
+  sf_ok=10000;
+  for (i=0; i<7; i++) {
+    delsf /= 2;
+    xfsf = calc_sfb_noise(xr,xr34,bw,sf);
+
+    if (xfsf < 0) {
+      /* scalefactors too small */
+      sf += delsf;
+    }else{
+      if (sf_ok==10000) sf_ok=sf;  
+      if (xfsf > l3_xmin)  {
+	/* distortion.  try a smaller scalefactor */
+	sf -= delsf;
+      }else{
+	sf_ok = sf;
+	sf += delsf;
+      }
+    }
+  } 
+  assert(sf_ok!=10000);
+#if 0
+  assert(delsf==1);  /* when for loop goes up to 7 */
+#endif
+
+  return sf;
+}
+
+static int
+find_scalefac_ave(const FLOAT8 *xr, const FLOAT8 *xr34, const int sfb,
+		     const FLOAT8 l3_xmin, const int bw)
+{
+  FLOAT8 xfsf;
+  int i,sf,sf_ok,delsf;
+
+  /* search will range from sf:  -209 -> 45  */
+  sf = -82;
+  delsf = 128;
+
+  sf_ok=10000;
+  for (i=0; i<7; i++) {
+    delsf /= 2;
+    xfsf = calc_sfb_noise_ave(xr,xr34,bw,sf);
+
+    if (xfsf < 0) {
+      /* scalefactors too small */
+      sf += delsf;
+    }else{
+      if (sf_ok==10000) sf_ok=sf;  
+      if (xfsf > l3_xmin)  {
+	/* distortion.  try a smaller scalefactor */
+	sf -= delsf;
+      }else{
+	sf_ok = sf;
+	sf += delsf;
+      }
+    }
+  } 
+  assert(sf_ok!=10000);
+#if 0
+  assert(delsf==1);  /* when for loop goes up to 7 */
+#endif
+
+  return sf;
+}
+
+
+
+/*  ???
+        How do the following tables look like for MPEG-2-LSF
+                                                            ??? */
+
+
+
+static const int max_range_short[SBPSY_s] =
+{15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7 };
+
+static const int max_range_long[SBPSY_l] =
+{15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
+
+static const int max_range_short_lsf[SBPSY_s] =
+{15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7 };
+
+/*static const int max_range_short_lsf_pretab[SBPSY_s] =
+{}*/
+
+static const int max_range_long_lsf[SBPSY_l] =
+{15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
+
+static const int max_range_long_lsf_pretab[SBPSY_l] =
+{ 7,7,7,7,7,7, 3,3,3,3,3, 0,0,0,0, 0,0,0, 0,0,0 };
+    
+
+static int 
+compute_scalefacs_short_lsf (
+    int sf[SBPSY_s][3],gr_info *cod_info, int scalefac[SBPSY_s][3],int sbg[3])
+{
+    int maxrange, maxrange1, maxrange2, maxover;
+    int sfb, i;
+    int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+
+    maxover   = 0;
+    maxrange1 = max_range_short_lsf[0];
+    maxrange2 = max_range_short_lsf[6];
+
+
+    for (i=0; i<3; ++i) {
+        int maxsf1 = 0, maxsf2 = 0, minsf = 1000;
+        /* see if we should use subblock gain */
+        for (sfb = 0; sfb < SBPSY_s; sfb++) {
+            if (sfb < 6) {
+                if (maxsf1 < -sf[sfb][i]) 
+                    maxsf1 = -sf[sfb][i];
+            } else {
+                if (maxsf2 < -sf[sfb][i]) 
+                    maxsf2 = -sf[sfb][i];
+            }
+            if (minsf > -sf[sfb][i]) 
+                minsf = -sf[sfb][i];
+        }
+
+        /* boost subblock gain as little as possible so we can
+         * reach maxsf1 with scalefactors 
+         * 8*sbg >= maxsf1   
+         */
+        maxsf1 = Max (maxsf1-maxrange1*ifqstep, maxsf2-maxrange2*ifqstep);
+        sbg[i] = 0;
+        if (minsf > 0) 
+            sbg[i] = floor (.125*minsf + .001);
+        if (maxsf1 > 0) 
+            sbg[i] = Max (sbg[i], (maxsf1/8 + (maxsf1 % 8 != 0)));
+        
+        if (sbg[i] > 7) 
+            sbg[i] = 7;
+
+
+        for (sfb = 0; sfb < SBPSY_s; sfb++) {
+            sf[sfb][i] += 8*sbg[i];
+
+            if (sf[sfb][i] < 0) {
+                maxrange = sfb < 6 ? maxrange1 : maxrange2;
+                
+                scalefac[sfb][i]
+                     = -sf[sfb][i]/ifqstep + (-sf[sfb][i]%ifqstep != 0);
+                
+                if (scalefac[sfb][i] > maxrange)
+                    scalefac[sfb][i] = maxrange;
+
+                if (maxover < -(sf[sfb][i] + scalefac[sfb][i]*ifqstep)) 
+                    maxover = -(sf[sfb][i] + scalefac[sfb][i]*ifqstep);
+            }
+        }
+    }
+
+    return maxover;
+}
+
+static int
+compute_scalefacs_long_lsf (
+              int             sf       [SBPSY_l], 
+        const gr_info * const cod_info, 
+              int             scalefac [SBPSY_l] )
+{
+    const int * max_range = max_range_long_lsf;
+    int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+    int sfb;
+    int maxover;
+  
+
+    if (cod_info->preflag) {
+        max_range = max_range_long_lsf_pretab;
+        for (sfb = 11; sfb < SBPSY_l; sfb++) 
+            sf[sfb] += pretab[sfb] * ifqstep;
+    }
+
+    maxover = 0;
+    for (sfb = 0; sfb < SBPSY_l; sfb++) {
+
+        if (sf[sfb] < 0) {
+            /* ifqstep*scalefac >= -sf[sfb], so round UP */
+            scalefac[sfb] = -sf[sfb]/ifqstep  + (-sf[sfb] % ifqstep != 0);
+            if (scalefac[sfb] > max_range[sfb]) 
+                scalefac[sfb] = max_range[sfb];
+      
+            /* sf[sfb] should now be positive: */
+            if (-(sf[sfb] + scalefac[sfb]*ifqstep) > maxover) {
+                maxover = -(sf[sfb] + scalefac[sfb]*ifqstep);
+            }
+        }
+    }
+
+    return maxover;
+}
+
+
+/*
+    sfb=0..5  scalefac < 16 
+    sfb>5     scalefac < 8
+
+    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+    ol_sf =  (cod_info->global_gain-210.0);
+    ol_sf -= 8*cod_info->subblock_gain[i];
+    ol_sf -= ifqstep*scalefac[gr][ch].s[sfb][i];
+
+*/
+static int 
+compute_scalefacs_short(int sf[SBPSY_s][3],gr_info *cod_info,
+int scalefac[SBPSY_s][3],int sbg[3])
+{
+  int maxrange,maxrange1,maxrange2,maxover;
+  int sfb,i;
+  int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+
+  maxover=0;
+  maxrange1 = 15;
+  maxrange2 = 7;
+
+
+  for (i=0; i<3; ++i) {
+    int maxsf1=0,maxsf2=0,minsf=1000;
+    /* see if we should use subblock gain */
+    for ( sfb = 0; sfb < SBPSY_s; sfb++ ) {
+      if (sfb < 6) {
+	if (-sf[sfb][i]>maxsf1) maxsf1 = -sf[sfb][i];
+      } else {
+	if (-sf[sfb][i]>maxsf2) maxsf2 = -sf[sfb][i];
+      }
+      if (-sf[sfb][i]<minsf) minsf = -sf[sfb][i];
+    }
+
+    /* boost subblock gain as little as possible so we can
+     * reach maxsf1 with scalefactors 
+     * 8*sbg >= maxsf1   
+     */
+    maxsf1 = Max(maxsf1-maxrange1*ifqstep,maxsf2-maxrange2*ifqstep);
+    sbg[i]=0;
+    if (minsf >0 ) sbg[i] = floor(.125*minsf + .001);
+    if (maxsf1 > 0)  sbg[i] = Max(sbg[i],(maxsf1/8 + (maxsf1 % 8 != 0)));
+    if (sbg[i] > 7) sbg[i]=7;
+
+
+    for ( sfb = 0; sfb < SBPSY_s; sfb++ ) {
+      sf[sfb][i] += 8*sbg[i];
+
+      if (sf[sfb][i] < 0) {
+	maxrange = sfb < 6 ? maxrange1 : maxrange2;
+        scalefac[sfb][i]= -sf[sfb][i]/ifqstep + (-sf[sfb][i]%ifqstep != 0);
+	if (scalefac[sfb][i]>maxrange) scalefac[sfb][i]=maxrange;
+	
+	if (-(sf[sfb][i] + scalefac[sfb][i]*ifqstep) >maxover)  {
+	  maxover=-(sf[sfb][i] + scalefac[sfb][i]*ifqstep);
+	}
+      }
+    }
+  }
+
+  return maxover;
+}
+
+
+
+/*
+	  ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+	  ol_sf =  (cod_info->global_gain-210.0);
+	  ol_sf -= ifqstep*scalefac[gr][ch].l[sfb];
+	  if (cod_info->preflag && sfb>=11) 
+	  ol_sf -= ifqstep*pretab[sfb];
+*/
+static int
+compute_scalefacs_long(int sf[SBPSY_l],gr_info *cod_info,int scalefac[SBPSY_l])
+{
+  int sfb;
+  int maxover;
+  int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+  
+
+  if (cod_info->preflag)
+    for ( sfb = 11; sfb < SBPSY_l; sfb++ ) 
+      sf[sfb] += pretab[sfb]*ifqstep;
+
+
+  maxover=0;
+  for ( sfb = 0; sfb < SBPSY_l; sfb++ ) {
+
+    if (sf[sfb]<0) {
+      /* ifqstep*scalefac >= -sf[sfb], so round UP */
+      scalefac[sfb]= -sf[sfb]/ifqstep + (-sf[sfb] % ifqstep != 0);
+      if (scalefac[sfb] > max_range_long[sfb]) scalefac[sfb]=max_range_long[sfb];
+      
+      /* sf[sfb] should now be positive: */
+      if (  -(sf[sfb] + scalefac[sfb]*ifqstep)  > maxover) {
+	maxover = -(sf[sfb] + scalefac[sfb]*ifqstep);
+      }
+    }
+  }
+
+  return maxover;
+}
+  
+  
+
+
+
+
+
+
+/************************************************************************
+ *
+ * quantize and encode with the given scalefacs and global gain
+ *
+ * compute scalefactors, l3_enc, and return number of bits needed to encode
+ *
+ *
+ ************************************************************************/
+
+static int
+VBR_quantize_granule( 
+          lame_global_flags *gfp,
+          FLOAT8                 xr34[576], 
+          int                    l3_enc[576],
+    const III_psy_ratio  * const ratio,  
+          III_scalefac_t * const scalefac, 
+    const int gr, 
+    const int ch)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  int status;
+  gr_info *cod_info;  
+  III_side_info_t * l3_side;
+  l3_side = &gfc->l3_side;
+  cod_info = &l3_side->gr[gr].ch[ch].tt;
+
+
+  /* encode scalefacs */
+  if ( gfc->is_mpeg1 ) 
+    status=scale_bitcount(scalefac, cod_info);
+  else
+    status=scale_bitcount_lsf(gfc,scalefac, cod_info);
+
+  if (status!=0) {
+    return -1;
+  }
+  
+  /* quantize xr34 */
+  cod_info->part2_3_length = count_bits(gfc,l3_enc,xr34,cod_info);
+  if (cod_info->part2_3_length >= LARGE_BITS) return -2;
+  cod_info->part2_3_length += cod_info->part2_length;
+
+
+  if (gfc->use_best_huffman==1) {
+    best_huffman_divide(gfc, gr, ch, cod_info, l3_enc);
+  }
+  return 0;
+}
+
+
+  
+/***********************************************************************
+ *
+ *      calc_short_block_vbr_sf()
+ *      calc_long_block_vbr_sf()
+ *
+ *  Mark Taylor 2000-??-??
+ *  Robert Hegemann 2000-10-25 made functions of it
+ *
+ ***********************************************************************/
+static const int MAX_SF_DELTA = 4;    
+
+static int 
+short_block_vbr_sf (
+    const lame_internal_flags        * const gfc,
+    const III_psy_xmin   * const l3_xmin,
+    const FLOAT8                 xr34_orig[576],
+    const FLOAT8                 xr34     [576],
+          III_scalefac_t * const vbrsf )
+{
+     int j, sfb, b;
+    int vbrmax = -10000; /* initialize for maximum search */
+  
+    for (j = 0, sfb = 0; sfb < SBMAX_s; sfb++) {
+        for (b = 0; b < 3; b++) {
+	    const  int start = gfc->scalefac_band.s[ sfb ];
+	    const  int end   = gfc->scalefac_band.s[ sfb+1 ];
+	    const  int width = end - start;
+	    
+            vbrsf->s[sfb][b] = find_scalefac_ave (&xr34[j], &xr34_orig[j],
+                                              sfb, l3_xmin->s[sfb][b], width);
+            j += width;
+        }
+    }
+    
+    for (sfb = 0; sfb < SBMAX_s; sfb++) {
+        for (b = 0; b < 3; b++) {
+	    if (sfb > 0) 
+	        if (vbrsf->s[sfb][b] > vbrsf->s[sfb-1][b]+MAX_SF_DELTA)
+                    vbrsf->s[sfb][b] = vbrsf->s[sfb-1][b]+MAX_SF_DELTA;
+	    if (sfb < SBMAX_s-1) 
+	        if (vbrsf->s[sfb][b] > vbrsf->s[sfb+1][b]+MAX_SF_DELTA)
+                    vbrsf->s[sfb][b] = vbrsf->s[sfb+1][b]+MAX_SF_DELTA;
+            if (vbrmax < vbrsf->s[sfb][b])
+                vbrmax = vbrsf->s[sfb][b];
+        }
+    }
+
+    return vbrmax;
+}
+
+
+
+static int 
+long_block_vbr_sf (
+    const lame_internal_flags        * const gfc,
+    const III_psy_xmin   * const l3_xmin,
+    const FLOAT8                 xr34_orig[576],
+    const FLOAT8                 xr34     [576],
+          III_scalefac_t * const vbrsf )
+{
+     int sfb;
+    int vbrmax = -10000; /* initialize for maximum search */
+    
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        const  int start = gfc->scalefac_band.l[ sfb ];
+        const  int end   = gfc->scalefac_band.l[ sfb+1 ];
+        const  int width = end - start;
+        
+        vbrsf->l[sfb] = find_scalefac_ave (&xr34[start], &xr34_orig[start],
+                                               sfb, l3_xmin->l[sfb], width);
+    }
+    
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        if (sfb > 0) 
+	    if (vbrsf->l[sfb] > vbrsf->l[sfb-1]+MAX_SF_DELTA)
+                vbrsf->l[sfb] = vbrsf->l[sfb-1]+MAX_SF_DELTA;
+        if (sfb < SBMAX_l-1) 
+	    if (vbrsf->l[sfb] > vbrsf->l[sfb+1]+MAX_SF_DELTA)
+                vbrsf->l[sfb] = vbrsf->l[sfb+1]+MAX_SF_DELTA;
+        if (vbrmax < vbrsf->l[sfb]) 
+            vbrmax = vbrsf->l[sfb];
+    }
+        
+    return vbrmax;
+}
+
+
+    /* a variation for vbr-mtrh */
+static int 
+short_block_sf (
+    const lame_internal_flags        * const gfc,
+    const III_psy_xmin   * const l3_xmin,
+    const FLOAT8                 xr34_orig[576],
+    const FLOAT8                 xr34     [576],
+          III_scalefac_t * const vbrsf )
+{
+     int j, sfb, b;
+    int vbrmean, vbrmin, vbrmax;
+    int sf_cache[SBMAX_s];
+  
+    for (j = 0, sfb = 0; sfb < SBMAX_s; sfb++) {
+        for (b = 0; b < 3; b++) {
+	    const  int start = gfc->scalefac_band.s[ sfb ];
+	    const  int end   = gfc->scalefac_band.s[ sfb+1 ];
+	    const  int width = end - start;
+	    
+            if (0 == gfc->noise_shaping_amp) {
+                /*  the faster and sloppier mode to use at lower quality
+                 */
+                vbrsf->s[sfb][b] = find_scalefac (&xr34[j], &xr34_orig[j], sfb,
+                                              l3_xmin->s[sfb][b], width);
+	    }
+            else {
+                /*  the slower and better mode to use at higher quality
+                 */
+                vbrsf->s[sfb][b] = find_scalefac_ave (&xr34[j], &xr34_orig[j],
+                                              sfb, l3_xmin->s[sfb][b], width);
+            }
+            j += width;
+        }
+    }
+    
+    vbrmax = -10000;
+    
+    for (b = 0; b < 3; b++) { 
+
+        /*  make working copy, select_kth_int will reorder!
+         */
+        for (sfb = 0; sfb < SBMAX_s; sfb++) 
+            sf_cache[sfb] = vbrsf->s[sfb][b];
+        
+        /*  find median value, take it as mean 
+         */
+        vbrmean = select_kth_int (sf_cache, SBMAX_s, (SBMAX_s+1)/2);
+        
+        /*  get min value
+         */
+        vbrmin = 10000;
+        for (sfb = 0; sfb < SBMAX_s; sfb++) { 
+            if (vbrmin > vbrsf->s[sfb][b])
+                vbrmin = vbrsf->s[sfb][b];
+        }
+        
+        /*  patch sfb12
+         */
+        vbrsf->s[SBPSY_s][b] = Min (vbrsf->s[SBPSY_s][b], vbrmean);
+        vbrsf->s[SBPSY_s][b] = Max (vbrsf->s[SBPSY_s][b], vbrmin-(vbrmean-vbrmin));
+        
+        /*  cut peaks
+         */
+        for (sfb = 0; sfb < SBMAX_s; sfb++) {
+            if (vbrsf->s[sfb][b] > vbrmean+(vbrmean-vbrmin))
+                vbrsf->s[sfb][b] = vbrmean+(vbrmean-vbrmin);
+        }
+        
+        /*  get max value
+         */
+        for (sfb = 0; sfb < SBMAX_s; sfb++) { 
+            if (vbrmax < vbrsf->s[sfb][b])
+                vbrmax = vbrsf->s[sfb][b];
+        }
+    }
+    
+    return vbrmax;
+}
+
+
+    /* a variation for vbr-mtrh */
+static int 
+long_block_sf (
+    const lame_internal_flags        * const gfc,
+    const III_psy_xmin   * const l3_xmin,
+    const FLOAT8                 xr34_orig[576],
+    const FLOAT8                 xr34     [576],
+          III_scalefac_t * const vbrsf )
+{
+     int sfb;
+    int vbrmean, vbrmin, vbrmax;
+    int sf_cache[SBMAX_l];
+    
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        const  int start = gfc->scalefac_band.l[ sfb ];
+        const  int end   = gfc->scalefac_band.l[ sfb+1 ];
+        const  int width = end - start;
+        
+        if (0 == gfc->noise_shaping_amp) {
+            /*  the faster and sloppier mode to use at lower quality
+             */
+            vbrsf->l[sfb] = find_scalefac (&xr34[start], &xr34_orig[start], 
+                                           sfb, l3_xmin->l[sfb], width);
+        }
+        else {
+            /*  the slower and better mode to use at higher quality
+             */
+            vbrsf->l[sfb] = find_scalefac_ave (&xr34[start], &xr34_orig[start],
+                                               sfb, l3_xmin->l[sfb], width);
+        }
+    }
+    
+    /*  make working copy, select_kth_int will reorder!
+     */
+    for (sfb = 0; sfb < SBMAX_l; sfb++)
+        sf_cache[sfb] = vbrsf->l[sfb];
+    
+    /*  find median value, take it as mean 
+     */
+    vbrmean = select_kth_int (sf_cache, SBMAX_l, (SBMAX_l+1)/2);
+
+    /*  get min value
+     */
+    vbrmin = +10000;
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        if (vbrmin > vbrsf->l[sfb])
+            vbrmin = vbrsf->l[sfb];
+    }
+    
+    /*  patch sfb21
+     */
+    vbrsf->l[SBPSY_l] = Min (vbrsf->l[SBPSY_l], vbrmean);
+    vbrsf->l[SBPSY_l] = Max (vbrsf->l[SBPSY_l], vbrmin-(vbrmean-vbrmin));
+    
+    /*  cut peaks
+     */
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        if (vbrsf->l[sfb] > vbrmean+(vbrmean-vbrmin))
+            vbrsf->l[sfb] = vbrmean+(vbrmean-vbrmin);
+    }
+    
+    /*  get max value
+     */
+    vbrmax = -10000;
+    for (sfb = 0; sfb < SBMAX_l; sfb++) {
+        if (vbrmax < vbrsf->l[sfb]) 
+            vbrmax = vbrsf->l[sfb];
+    }
+        
+    return vbrmax;
+}
+
+
+
+/******************************************************************
+ *
+ *  short block scalefacs
+ *
+ ******************************************************************/
+
+static void 
+short_block_scalefacs (
+       lame_global_flags *gfp,
+          gr_info        * const cod_info,
+          III_scalefac_t * const scalefac,
+          III_scalefac_t * const vbrsf,
+          int            * const VBRmax )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    const int * max_range;
+     int sfb, b;
+    int maxover, maxover0, maxover1, mover;
+    int v0, v1;
+    int minsfb;
+    int vbrmax = *VBRmax;
+    
+    max_range = gfc->is_mpeg1 ? max_range_short : max_range_short_lsf;
+    
+    maxover0 = 0;
+    maxover1 = 0;
+    for (sfb = 0; sfb < SBPSY_s; sfb++) {
+        for (b = 0; b < 3; b++) {
+            v0 = (vbrmax - vbrsf->s[sfb][b]) - (4*14 + 2*max_range[sfb]);
+            v1 = (vbrmax - vbrsf->s[sfb][b]) - (4*14 + 4*max_range[sfb]);
+            if (maxover0 < v0)
+                maxover0 = v0;
+            if (maxover1 < v1)
+                maxover1 = v1;
+        }
+    }
+
+    if (gfc->noise_shaping == 2)
+        /* allow scalefac_scale=1 */
+        mover = Min (maxover0, maxover1);
+    else
+        mover = maxover0; 
+
+    vbrmax   -= mover;
+    maxover0 -= mover;
+    maxover1 -= mover;
+
+    if (maxover0 == 0) 
+        cod_info->scalefac_scale = 0;
+    else if (maxover1 == 0)
+        cod_info->scalefac_scale = 1;
+
+    /* sf =  (cod_info->global_gain-210.0) */
+    cod_info->global_gain = vbrmax + 210;
+    assert(cod_info->global_gain < 256);
+    
+    if (vbr_mtrh == gfp->VBR && cod_info->global_gain > 1) {
+        /*  just to be safe, reduce global_gain by one
+         */
+        cod_info->global_gain -= 1; 
+    }
+    
+    if (cod_info->global_gain > 255)
+        cod_info->global_gain = 255;
+
+    for (sfb = 0; sfb < SBPSY_s; sfb++) {
+        for (b = 0; b < 3; b++) {
+            vbrsf->s[sfb][b] -= vbrmax;
+        }
+    }
+    if ( gfc->is_mpeg1 ) 
+        maxover = compute_scalefacs_short (vbrsf->s, cod_info, scalefac->s,
+                                           cod_info->subblock_gain);
+    else
+        maxover = compute_scalefacs_short_lsf (vbrsf->s, cod_info, scalefac->s,
+                                               cod_info->subblock_gain);
+
+    assert (maxover <= 0);
+
+    /* adjust global_gain so at least 1 subblock gain = 0 */
+    minsfb = 999; /* prepare for minimum search */
+    for (b = 0; b < 3; b++) 
+        if (minsfb > cod_info->subblock_gain[b])
+            minsfb = cod_info->subblock_gain[b];
+    
+    if (minsfb > cod_info->global_gain/8)
+        minsfb = cod_info->global_gain/8;
+    
+    vbrmax                -= 8*minsfb; 
+    cod_info->global_gain -= 8*minsfb;
+    
+    for (b = 0; b < 3; b++)
+        cod_info->subblock_gain[b] -= minsfb;
+        
+    *VBRmax = vbrmax;
+}
+
+
+
+/******************************************************************
+ *
+ *  long block scalefacs
+ *
+ ******************************************************************/
+
+static void 
+long_block_scalefacs (
+    lame_global_flags *gfp,
+          gr_info        * const cod_info,
+          III_scalefac_t * const scalefac,
+          III_scalefac_t * const vbrsf,
+          int            * const VBRmax )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    const int * max_range;
+    const int * max_rangep;
+     int sfb;
+    int maxover, maxover0, maxover1, maxover0p, maxover1p, mover;
+    int v0, v1, v0p, v1p;
+    int vbrmax = *VBRmax;
+
+    max_range  = gfc->is_mpeg1 ? max_range_long : max_range_long_lsf;
+    max_rangep = gfc->is_mpeg1 ? max_range_long : max_range_long_lsf_pretab;
+    
+    maxover0  = 0;
+    maxover1  = 0;
+    maxover0p = 0; /* pretab */
+    maxover1p = 0; /* pretab */
+       
+    for ( sfb = 0; sfb < SBPSY_l; sfb++ ) {
+        v0  = (vbrmax - vbrsf->l[sfb]) - 2*max_range[sfb];
+        v1  = (vbrmax - vbrsf->l[sfb]) - 4*max_range[sfb];
+        v0p = (vbrmax - vbrsf->l[sfb]) - 2*(max_rangep[sfb]+pretab[sfb]);
+        v1p = (vbrmax - vbrsf->l[sfb]) - 4*(max_rangep[sfb]+pretab[sfb]);
+        if (maxover0 < v0)
+            maxover0 = v0;
+        if (maxover1 < v1)
+            maxover1 = v1;
+        if (maxover0p < v0p)
+            maxover0p = v0p;
+        if (maxover1p < v1p)
+            maxover1p = v1p;
+    }
+
+    mover = Min (maxover0, maxover0p);
+    if (gfc->noise_shaping == 2) {
+        /* allow scalefac_scale=1 */
+        mover = Min (mover, maxover1);
+        mover = Min (mover, maxover1p);
+    }
+
+    vbrmax    -= mover;
+    maxover0  -= mover;
+    maxover0p -= mover;
+    maxover1  -= mover;
+    maxover1p -= mover;
+
+    if (maxover0 <= 0) {
+        cod_info->scalefac_scale = 0;
+        cod_info->preflag = 0;
+        vbrmax -= maxover0;
+    } else if (maxover0p <= 0) {
+        cod_info->scalefac_scale = 0;
+        cod_info->preflag = 1;
+        vbrmax -= maxover0p;
+    } else if (maxover1 == 0) {
+        cod_info->scalefac_scale = 1;
+        cod_info->preflag = 0;
+    } else if (maxover1p == 0) {
+        cod_info->scalefac_scale = 1;
+        cod_info->preflag = 1;
+    } else {
+        assert(0); /* this should not happen */
+    }
+
+    /* sf =  (cod_info->global_gain-210.0) */
+    cod_info->global_gain = vbrmax + 210;
+    assert (cod_info->global_gain < 256);
+
+    if (vbr_mtrh == gfp->VBR && cod_info->global_gain > 1) {
+        /*  just to be safe, reduce global gain by one
+         */
+        cod_info->global_gain -= 1; 
+    }
+    
+    if (cod_info->global_gain > 255) 
+        cod_info->global_gain = 255;
+    
+    for (sfb = 0; sfb < SBPSY_l; sfb++)   
+        vbrsf->l[sfb] -= vbrmax;
+    
+    if ( gfc->is_mpeg1 == 1 ) 
+        maxover = compute_scalefacs_long (vbrsf->l, cod_info, scalefac->l);
+    else
+        maxover = compute_scalefacs_long_lsf (vbrsf->l, cod_info, scalefac->l);
+    
+    assert (maxover <= 0);
+    
+    *VBRmax = vbrmax;
+}
+
+
+
+/***********************************************************************
+ *
+ *      calc_fac()
+ *
+ *  Mark Taylor 2000-??-??
+ *  Robert Hegemann 2000-10-20 made functions of it
+ *
+ ***********************************************************************/
+
+static FLOAT8 calc_fac ( const int ifac )
+{
+    if (ifac+210 < Q_MAX) 
+        return 1/IPOW20 (ifac+210);
+    else
+        return pow (2.0, 0.75*ifac/4.0);
+}
+
+
+
+/***********************************************************************
+ *
+ *  quantize xr34 based on scalefactors
+ *
+ *  calc_short_block_xr34      
+ *  calc_long_block_xr34
+ *
+ *  Mark Taylor 2000-??-??
+ *  Robert Hegemann 2000-10-20 made functions of them
+ *
+ ***********************************************************************/
+
+static void
+short_block_xr34 ( 
+    const lame_internal_flags        * const gfc,
+    const gr_info        * const cod_info,
+    const III_scalefac_t * const scalefac, 
+    const FLOAT8                 xr34_orig[576],
+          FLOAT8                 xr34     [576] )
+{
+     int sfb, l, j, b;
+    int    ifac, ifqstep, start, end;
+    FLOAT8 fac;
+
+    /* even though there is no scalefactor for sfb12
+     * subblock gain affects upper frequencies too, that's why
+     * we have to go up to SBMAX_s
+     */
+    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+    for ( j = 0, sfb = 0; sfb < SBMAX_s; sfb++ ) {
+        start = gfc->scalefac_band.s[ sfb ];
+        end   = gfc->scalefac_band.s[ sfb+1 ];
+        for (b = 0; b < 3; b++) {
+            ifac = 8*cod_info->subblock_gain[b]+ifqstep*scalefac->s[sfb][b];
+            fac = calc_fac( ifac );
+            /*
+             *  loop unrolled into "Duff's Device".  Robert Hegemann
+             */
+            l = (end-start+7) / 8;
+            switch ((end-start) % 8) {
+                default:
+                case 0: do{ xr34[j] = xr34_orig[j]*fac; j++;
+                case 7:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 6:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 5:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 4:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 3:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 2:     xr34[j] = xr34_orig[j]*fac; j++;
+                case 1:     xr34[j] = xr34_orig[j]*fac; j++; } while (--l);
+            }
+        }
+    }
+}
+
+
+
+static void 
+long_block_xr34 ( 
+    const lame_internal_flags        * const gfc,
+    const gr_info        * const cod_info,
+    const III_scalefac_t * const scalefac, 
+    const FLOAT8                 xr34_orig[576],
+          FLOAT8                 xr34     [576] )
+{ 
+     int sfb, l, j;
+    int    ifac, ifqstep, start, end;
+    FLOAT8 fac;
+        
+    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
+    for ( sfb = 0; sfb < SBMAX_l; sfb++ ) {
+        
+        ifac = ifqstep*scalefac->l[sfb];
+        if (cod_info->preflag)
+            ifac += ifqstep*pretab[sfb];
+
+        fac = calc_fac( ifac );
+
+        start = gfc->scalefac_band.l[ sfb ];
+        end   = gfc->scalefac_band.l[ sfb+1 ];
+        /*
+         *  loop unrolled into "Duff's Device".  Robert Hegemann
+         */
+        j = start;
+        l = (end-start+7) / 8;
+        switch ((end-start) % 8) {
+            default:
+            case 0: do{ xr34[j] = xr34_orig[j]*fac; j++;
+            case 7:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 6:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 5:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 4:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 3:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 2:     xr34[j] = xr34_orig[j]*fac; j++;
+            case 1:     xr34[j] = xr34_orig[j]*fac; j++; } while (--l);
+        }
+    }
+}
+
+
+
+
+
+
+
+
+
+/************************************************************************
+ *
+ * VBR_noise_shaping()
+ *
+ * compute scalefactors, l3_enc, and return number of bits needed to encode
+ *
+ * return code:    0   scalefactors were found with all noise < masking
+ *
+ *               n>0   scalefactors required too many bits.  global gain
+ *                     was decreased by n
+ *                     If n is large, we should probably recompute scalefacs
+ *                     with a lower quality.
+ *
+ *               n<0   scalefactors used less than minbits.
+ *                     global gain was increased by n.  
+ *                     If n is large, might want to recompute scalefacs
+ *                     with a higher quality setting?
+ *
+ ************************************************************************/
+static int
+VBR_noise_shaping (
+    lame_global_flags *gfp,
+    FLOAT8             xr       [576], 
+    FLOAT8             xr34orig [576],
+    III_psy_ratio     *ratio,
+    int                l3_enc   [576], 
+    int                digital_silence, 
+    int                minbits,
+    int                maxbits,
+    III_scalefac_t    *scalefac,
+    III_psy_xmin      *l3_xmin,
+    int                gr,
+    int                ch )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_scalefac_t save_sf;
+    III_scalefac_t vbrsf;
+    gr_info *cod_info;  
+    FLOAT8 xr34[576];
+    int shortblock;
+    int vbrmax;
+    int global_gain_adjust = 0;
+
+    cod_info   = &gfc->l3_side.gr[gr].ch[ch].tt;
+    shortblock = (cod_info->block_type == SHORT_TYPE);
+  
+    if (shortblock)
+        vbrmax = short_block_vbr_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
+    else
+        vbrmax = long_block_vbr_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
+
+    /* save a copy of vbrsf, incase we have to recomptue scalefacs */
+    memcpy (&save_sf, &vbrsf, sizeof(III_scalefac_t));
+
+    do { 
+        memset (scalefac, 0, sizeof(III_scalefac_t));
+        
+        if (shortblock) {
+            short_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
+            short_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
+        } else {
+            long_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
+            long_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
+        } 
+        VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
+
+        
+        /* decrease noise until we use at least minbits
+         */
+        if (cod_info->part2_3_length < minbits) {
+            if (digital_silence) break;  
+            //if (cod_info->part2_3_length == cod_info->part2_length) break;
+            if (vbrmax+210 == 0) break;
+            
+            /* decrease global gain, recompute scale factors */
+            --vbrmax;
+            --global_gain_adjust;
+            memcpy (&vbrsf, &save_sf, sizeof(III_scalefac_t));
+        }
+
+    } while (cod_info->part2_3_length < minbits);
+
+    /* inject noise until we meet our bit limit
+     */
+    while (cod_info->part2_3_length > Min (maxbits, MAX_BITS)) {
+        /* increase global gain, keep existing scale factors */
+        ++cod_info->global_gain;
+        if (cod_info->global_gain > 255) 
+            ERRORF (gfc,"%ld impossible to encode ??? frame! bits=%d\n",
+                    //  gfp->frameNum, cod_info->part2_3_length);
+                             -1,       cod_info->part2_3_length);
+        VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
+
+        ++global_gain_adjust;
+    }
+
+    return global_gain_adjust;
+}
+
+
+
+/************************************************************************
+ *
+ *  VBR_noise_shaping2()
+ *
+ *  may result in a need of too many bits, then do it CBR like
+ *
+ *  Robert Hegemann 2000-10-25
+ *
+ ***********************************************************************/
+ 
+int
+VBR_noise_shaping2 (
+    lame_global_flags        *gfp,
+    FLOAT8                 xr       [576], 
+    FLOAT8                 xr34orig [576],
+    III_psy_ratio  * const ratio,
+    int                    l3_enc   [576], 
+    int                    digital_silence, 
+    int                    minbits,
+    int                    maxbits,
+    III_scalefac_t * const scalefac,
+    III_psy_xmin   * const l3_xmin,
+    int                    gr,
+    int                    ch )
+{
+    lame_internal_flags *gfc=gfp->internal_flags;
+    III_scalefac_t vbrsf;
+    gr_info *cod_info;  
+    FLOAT8 xr34[576];
+    int shortblock, ret, bits, huffbits;
+    int vbrmax, best_huffman = gfc->use_best_huffman;
+
+    cod_info   = &gfc->l3_side.gr[gr].ch[ch].tt;
+    shortblock = (cod_info->block_type == SHORT_TYPE);
+      
+    if (shortblock) {
+        vbrmax = short_block_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
+        short_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
+        short_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
+    } else {
+        vbrmax = long_block_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
+        long_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
+        long_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
+    } 
+    
+    gfc->use_best_huffman = 0; /* we will do it later */
+ 
+    ret = VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
+    
+    gfc->use_best_huffman = best_huffman;
+
+    if (ret == -1) /* Houston, we have a problem */
+        return -1;
+
+    if (cod_info->part2_3_length < minbits) {
+        huffbits = minbits - cod_info->part2_length;
+        bits = bin_search_StepSize (gfc, cod_info, huffbits, 
+                                    gfc->OldValue[ch], xr34, l3_enc);
+        gfc->OldValue[ch] = cod_info->global_gain;
+        cod_info->part2_3_length  = bits + cod_info->part2_length;
+    }
+    if (cod_info->part2_3_length > maxbits) {
+        huffbits = maxbits - cod_info->part2_length;
+        bits = bin_search_StepSize (gfc, cod_info, huffbits, 
+                                    gfc->OldValue[ch], xr34, l3_enc);
+        gfc->OldValue[ch] = cod_info->global_gain;
+        cod_info->part2_3_length = bits;
+        if (bits > huffbits) {
+            bits = inner_loop (gfc, cod_info, huffbits, xr34, l3_enc);
+            cod_info->part2_3_length  = bits;
+        }
+        if (bits >= LARGE_BITS) /* Houston, we have a problem */
+            return -2;
+        cod_info->part2_3_length += cod_info->part2_length;
+    }
+
+    if (cod_info->part2_length >= LARGE_BITS) /* Houston, we have a problem */
+        return -2;
+        
+    assert (cod_info->global_gain < 256);
+    
+    return 0;
+}
+
+
+
+
+void
+VBR_quantize(lame_global_flags *gfp,
+                FLOAT8 pe[2][2], FLOAT8 ms_ener_ratio[2],
+                FLOAT8 xr[2][2][576], III_psy_ratio ratio[2][2],
+                int l3_enc[2][2][576],
+                III_scalefac_t scalefac[2][2])
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  III_psy_xmin l3_xmin[2][2];
+  int minbits,maxbits,max_frame_bits,totbits,gr,ch,i,bits_ok;
+  int bitsPerFrame,mean_bits;
+  int analog_silence;
+  FLOAT8 qadjust;
+  III_side_info_t * l3_side;
+  gr_info *cod_info;  
+  int digital_silence[2][2];
+  FLOAT8 masking_lower_db=0;
+  FLOAT8 xr34[2][2][576];
+  // static const FLOAT8 dbQ[10]={-6.0,-5.0,-4.0,-3.0, -2.0, -1.0, -.25, .5, 1.25, 2.0};
+  /* from quantize.c VBR algorithm */
+  /*static const FLOAT8 dbQ[10]=
+   {-5.5,-4.25,-3.0,-2.50, -1.75, -.75, -.5, -.25, .25, .75};*/
+  /* a third dbQ table ?!? */
+  static const FLOAT8 dbQ[10]=
+  {-6.06,-4.4,-2.9,-1.57, -0.4, 0.61, 1.45, 2.13, 2.65, 3.0};
+  
+  qadjust=0;   /* start with -1 db quality improvement over quantize.c VBR */
+
+  l3_side = &gfc->l3_side;
+  //gfc->ATHlower += (4-gfp->VBR_q)*4.0; 
+  //if (gfc->ATHlower < 0) gfc->ATHlower=0;
+
+
+  /* now find out: if the frame can be considered analog silent
+   *               if each granule can be considered digital silent
+   * and calculate l3_xmin and the fresh xr34 array
+   */
+
+  assert( gfp->VBR_q <= 9 );
+  assert( gfp->VBR_q >= 0 );
+  analog_silence=1;
+  for (gr = 0; gr < gfc->mode_gr; gr++) {
+    /* copy data to be quantized into xr */
+    if (gfc->mode_ext==MPG_MD_MS_LR) {
+      ms_convert(xr[gr],xr[gr]);
+    }
+    for (ch = 0; ch < gfc->channels_out; ch++) {
+      /* if in the following sections the quality would not be adjusted
+       * then we would only have to call calc_xmin once here and
+       * could drop subsequently calls (rh 2000/07/17)
+       */
+      int over_ath;
+      cod_info = &l3_side->gr[gr].ch[ch].tt;
+      cod_info->part2_3_length=LARGE_BITS;
+      
+      if (cod_info->block_type == SHORT_TYPE) {
+          cod_info->sfb_lmax = 0; /* No sb*/
+          cod_info->sfb_smin = 0;
+      } else {
+          /* MPEG 1 doesnt use last scalefactor band */
+          cod_info->sfb_lmax = SBPSY_l;
+          cod_info->sfb_smin = SBPSY_s;    /* No sb */
+	  if (cod_info->mixed_block_flag) {
+	    cod_info->sfb_lmax        = 8;
+	    cod_info->sfb_smin        = 3;
+	  }
+      }
+      
+      /* quality setting */
+      masking_lower_db = dbQ[gfp->VBR_q];
+      if (pe[gr][ch]>750) {
+        masking_lower_db -= Min(10,4*(pe[gr][ch]-750.)/750.);
+      }
+      gfc->masking_lower = pow(10.0,masking_lower_db/10);
+      
+      /* masking thresholds */
+      over_ath = calc_xmin(gfp,xr[gr][ch],&ratio[gr][ch],cod_info,&l3_xmin[gr][ch]);
+      
+      /* if there are bands with more energy than the ATH 
+       * then we say the frame is not analog silent */
+      if (over_ath) {
+        analog_silence = 0;
+      }
+      
+      /* if there is no line with more energy than 1e-20
+       * then this granule is considered to be digital silent
+       * plus calculation of xr34 */
+      digital_silence[gr][ch] = 1;
+      for(i=0;i<576;i++) {
+        FLOAT8 temp=fabs(xr[gr][ch][i]);
+        xr34[gr][ch][i]=sqrt(sqrt(temp)*temp);
+        digital_silence[gr][ch] &= temp < 1E-20;
+      }
+    } /* ch */
+  }  /* gr */
+
+  
+  /* compute minimum allowed bits from minimum allowed bitrate */
+  if (analog_silence) {
+    gfc->bitrate_index=1;
+  } else {
+    gfc->bitrate_index=gfc->VBR_min_bitrate;
+  }
+  getframebits(gfp, &bitsPerFrame, &mean_bits);
+  minbits = (mean_bits/gfc->channels_out);
+
+  /* compute maximum allowed bits from max allowed bitrate */
+  gfc->bitrate_index=gfc->VBR_max_bitrate;
+  getframebits(gfp, &bitsPerFrame, &mean_bits);
+  max_frame_bits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
+  maxbits=2.5*(mean_bits/gfc->channels_out);
+
+  {
+  /* compute a target  mean_bits based on compression ratio 
+   * which was set based on VBR_q  
+   */
+  int bit_rate = gfp->out_samplerate*16*gfc->channels_out/(1000.0*gfp->compression_ratio);
+  bitsPerFrame = (bit_rate*gfp->framesize*1000)/gfp->out_samplerate;
+  mean_bits = (bitsPerFrame - 8*gfc->sideinfo_len) / gfc->mode_gr;
+  }
+
+
+  minbits = Max(minbits,125);
+  minbits=Max(minbits,.40*(mean_bits/gfc->channels_out));
+  maxbits=Min(maxbits,2.5*(mean_bits/gfc->channels_out));
+
+
+
+
+
+
+
+  /* 
+   * loop over all ch,gr, encoding anything with bits > .5*(max_frame_bits/4)
+   *
+   * If a particular granule uses way too many bits, it will be re-encoded
+   * on the next iteration of the loop (with a lower quality setting).  
+   * But granules which dont use
+   * use too many bits will not be re-encoded.
+   *
+   * minbits:  minimum allowed bits for 1 granule 1 channel
+   * maxbits:  maximum allowwed bits for 1 granule 1 channel
+   * max_frame_bits:  maximum allowed bits for entire frame
+   * (max_frame_bits/4)   estimate of average bits per granule per channel
+   * 
+   */
+
+  do {
+  
+    totbits=0;
+    for (gr = 0; gr < gfc->mode_gr; gr++) {
+      int minbits_lr[2];
+      minbits_lr[0]=minbits;
+      minbits_lr[1]=minbits;
+
+#if 0
+      if (gfc->mode_ext==MPG_MD_MS_LR) {
+        FLOAT8 fac;
+        fac = .33*(.5-ms_ener_ratio[gr])/.5;
+        if (fac<0) fac=0;
+        if (fac>.5) fac=.5;
+        minbits_lr[0] = (1+fac)*minbits;
+        minbits_lr[1] = Max(125,(1-fac)*minbits);
+      }
+#endif
+
+
+      for (ch = 0; ch < gfc->channels_out; ch++) { 
+        int adjusted,shortblock;
+        cod_info = &l3_side->gr[gr].ch[ch].tt;
+        
+        /* ENCODE this data first pass, and on future passes unless it uses
+         * a very small percentage of the max_frame_bits  */
+        if (cod_info->part2_3_length > (max_frame_bits/(2*gfc->channels_out*gfc->mode_gr))) {
+  
+          shortblock = (cod_info->block_type == SHORT_TYPE);
+  
+          /* Adjust allowed masking based on quality setting */
+          if (qadjust!=0 /*|| shortblock*/) {
+            masking_lower_db = dbQ[gfp->VBR_q] + qadjust;
+
+            /*
+            if (shortblock) masking_lower_db -= 4;
+            */
+     
+            if (pe[gr][ch]>750)
+              masking_lower_db -= Min(10,4*(pe[gr][ch]-750.)/750.);
+            gfc->masking_lower = pow(10.0,masking_lower_db/10);
+            calc_xmin( gfp, xr[gr][ch], ratio[gr]+ch, cod_info, l3_xmin[gr]+ch);
+          }
+          
+          /* digital silent granules do not need the full round trip,
+           * but this can be optimized later on
+           */
+          adjusted = VBR_noise_shaping (gfp,xr[gr][ch],xr34[gr][ch],
+                                        ratio[gr]+ch,l3_enc[gr][ch],
+                                        digital_silence[gr][ch],
+                                        minbits_lr[ch],
+                                        maxbits,scalefac[gr]+ch,
+                                        l3_xmin[gr]+ch,gr,ch);
+          if (adjusted>10) {
+            /* global_gain was changed by a large amount to get bits < maxbits */
+            /* quality is set to high.  we could set bits = LARGE_BITS
+             * to force re-encoding.  But most likely the other channels/granules
+             * will also use too many bits, and the entire frame will
+             * be > max_frame_bits, forcing re-encoding below.
+             */
+            // cod_info->part2_3_bits = LARGE_BITS;
+          }
+        }
+        totbits += cod_info->part2_3_length;
+      }
+    }
+    bits_ok=1;
+    if (totbits>max_frame_bits) {
+      /* lower quality */
+      qadjust += Max(.125,Min(1,(totbits-max_frame_bits)/300.0));
+      /* adjusting minbits and maxbits is necessary too
+       * cos lowering quality is not enough in rare cases
+       * when each granule still needs almost maxbits, it wont fit */ 
+      minbits = Max(125,minbits*0.975);
+      maxbits = Max(minbits,maxbits*0.975);
+      //      DEBUGF("%i totbits>max_frame_bits   totbits=%i  maxbits=%i \n",gfp->frameNum,totbits,max_frame_bits);
+      //      DEBUGF("next masking_lower_db = %f \n",masking_lower_db + qadjust);
+      bits_ok=0;
+    }
+    
+  } while (!bits_ok);
+  
+
+
+  /* find optimal scalefac storage.  Cant be done above because
+   * might enable scfsi which breaks the interation loops */
+  totbits=0;
+  for (gr = 0; gr < gfc->mode_gr; gr++) {
+    for (ch = 0; ch < gfc->channels_out; ch++) {
+      best_scalefac_store(gfc, gr, ch, l3_enc, l3_side, scalefac);
+      totbits += l3_side->gr[gr].ch[ch].tt.part2_3_length;
+    }
+  }
+
+
+  
+
+  if (analog_silence && !gfp->VBR_hard_min) {
+    gfc->bitrate_index = 1;
+  } else {
+    gfc->bitrate_index = gfc->VBR_min_bitrate;
+  }
+  for( ; gfc->bitrate_index < gfc->VBR_max_bitrate; gfc->bitrate_index++ ) {
+
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    maxbits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
+    if (totbits <= maxbits) break;
+  }
+  if (gfc->bitrate_index == gfc->VBR_max_bitrate) {
+    getframebits (gfp, &bitsPerFrame, &mean_bits);
+    maxbits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
+  }
+
+  //  DEBUGF("%i total_bits=%i max_frame_bits=%i index=%i  \n",gfp->frameNum,totbits,max_frame_bits,gfc->bitrate_index);
+
+  for (gr = 0; gr < gfc->mode_gr; gr++) {
+    for (ch = 0; ch < gfc->channels_out; ch++) {
+      cod_info = &l3_side->gr[gr].ch[ch].tt;
+
+
+      ResvAdjust (gfc, cod_info, l3_side, mean_bits);
+      
+      /*******************************************************************
+       * set the sign of l3_enc from the sign of xr
+       *******************************************************************/
+      for ( i = 0; i < 576; i++) {
+        if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1;
+      }
+    }
+  }
+  ResvFrameEnd (gfc, l3_side, mean_bits);
+
+
+
+}
+
+
+
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/version.c
@@ -1,0 +1,219 @@
+/*
+ *      Version numbering for LAME.
+ *
+ *      Copyright (c) 1999 A.L. Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*!
+  \file   version.c
+  \brief  Version numbering for LAME.
+
+  Contains functions which describe the version of LAME.
+
+  \author A.L. Faber
+  \version \$Id: version.c,v 1.17 2001/02/20 18:17:59 aleidinger Exp $
+  \ingroup libmp3lame
+
+  \todo The mp3x version should be located in the mp3x source,
+        not in the libmp3lame source.
+*/
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include <stdio.h>
+#include <lame.h>
+#include "version.h"    /* macros of version numbers */
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+//! Stringify \a x.
+#define STR(x)   #x
+//! Stringify \a x, perform macro expansion.
+#define XSTR(x)  STR(x)
+
+#if defined(MMX_choose_table)
+# define V1  "MMX "
+#else
+# define V1  ""
+#endif
+
+#if defined(KLEMM)
+# define V2  "KLM "
+#else
+# define V2  ""
+#endif
+
+#if defined(RH)
+# define V3  "RH "
+#else
+# define V3  ""
+#endif
+
+//! Compile time features.
+#define V   V1 V2 V3
+
+//! Get the LAME version string.
+/*!
+  \param void
+  \return a pointer to a string which describes the version of LAME.
+*/
+const char*  get_lame_version ( void )		/* primary to write screen reports */
+{
+    /* Here we can also add informations about compile time configurations */
+
+#if   LAME_ALPHA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
+        "(alpha " XSTR(LAME_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
+#elif LAME_BETA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
+        "(beta " XSTR(LAME_BETA_VERSION) ", " __DATE__ ")";
+#else
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V;
+#endif
+
+    return str;
+}
+
+
+//! Get the short LAME version string.
+/*!
+  It's mainly for inclusion into the MP3 stream.
+
+  \param void   
+  \return a pointer to the short version of the LAME version string.
+*/
+const char*  get_lame_short_version ( void )
+{
+    /* adding date and time to version string makes it harder for output
+       validation */
+
+#if   LAME_ALPHA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (alpha)";
+#elif LAME_BETA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (beta)";
+#else
+    static /*@observer@*/ const char *const str =
+        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION)
+#endif
+
+    return str;
+}
+
+
+//! Get the version string for GPSYCHO.
+/*!
+  \param void
+  \return a pointer to a string which describes the version of GPSYCHO.
+*/
+const char*  get_psy_version ( void )
+{
+#if   PSY_ALPHA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
+        " (alpha " XSTR(PSY_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
+#elif PSY_BETA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
+        " (beta " XSTR(PSY_BETA_VERSION) ", " __DATE__ ")";
+#else
+    static /*@observer@*/ const char *const str =
+        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION);
+#endif
+
+    return str;
+}
+
+
+//! Get the mp3x version string.
+/*!
+  \param void
+  \return a pointer to a string which describes the version of mp3x.
+*/
+const char*  get_mp3x_version ( void )
+{
+#if   MP3X_ALPHA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION)
+        " (alpha " XSTR(MP3X_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
+#elif MP3X_BETA_VERSION > 0
+    static /*@observer@*/ const char *const str =
+        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION)
+        " (beta " XSTR(MP3X_BETA_VERSION) ", " __DATE__ ")";
+#else
+    static /*@observer@*/ const char *const str =
+        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION);
+#endif
+
+    return str;
+}
+
+
+//! Get the URL for the LAME website.
+/*!
+  \param void
+  \return a pointer to a string which is a URL for the LAME website.
+*/
+const char*  get_lame_url ( void )
+{
+    static /*@observer@*/ const char *const str = LAME_URL;
+
+    return str;
+}    
+
+
+//! Get the numerical representation of the version.
+/*!
+  Writes the numerical representation of the version of LAME and
+  GPSYCHO into lvp.
+
+  \param lvp    
+*/
+void get_lame_version_numerical ( lame_version_t *const lvp )
+{
+    static /*@observer@*/ const char *const features = V;
+
+    /* generic version */
+    lvp->major = LAME_MAJOR_VERSION;
+    lvp->minor = LAME_MINOR_VERSION;
+    lvp->alpha = LAME_ALPHA_VERSION;
+    lvp->beta  = LAME_BETA_VERSION;
+
+    /* psy version */
+    lvp->psy_major = PSY_MAJOR_VERSION;
+    lvp->psy_minor = PSY_MINOR_VERSION;
+    lvp->psy_alpha = PSY_ALPHA_VERSION;
+    lvp->psy_beta  = PSY_BETA_VERSION;
+
+    /* compile time features */
+    /*@-mustfree@*/
+    lvp->features = features;
+    /*@=mustfree@*/
+}
+
+/* end of version.c */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/version.h
@@ -1,0 +1,60 @@
+/*
+ *      Version numbering for LAME.
+ *
+ *      Copyright (c) 1999 A.L. Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef LAME_VERSION_H
+#define LAME_VERSION_H
+
+# include <stdio.h>
+
+/* 
+ * To make a string from a token, use the # operator:
+ *
+ * #define __STR(x)  #x
+ * #define STR(x)    __STR(x)
+ */
+
+# define LAME_URL              "http://www.mp3dev.org/"
+
+# define LAME_MAJOR_VERSION      3      /* Major version number */
+# define LAME_MINOR_VERSION     88      /* Minor version number */
+# define LAME_ALPHA_VERSION      0      /* Patch level of alpha version, otherwise zero */
+# define LAME_BETA_VERSION       1      /* Patch level of beta  version, otherwise zero */
+
+# define PSY_MAJOR_VERSION       0      /* Major version number */
+# define PSY_MINOR_VERSION      85      /* Minor version number */
+# define PSY_ALPHA_VERSION       0      /* Set number if this is an alpha version, otherwise zero */
+# define PSY_BETA_VERSION        0      /* Set number if this is a beta version, otherwise zero */
+
+# define MP3X_MAJOR_VERSION      0      /* Major version number */
+# define MP3X_MINOR_VERSION     82      /* Minor version number */
+# define MP3X_ALPHA_VERSION      0      /* Set number if this is an alpha version, otherwise zero */
+# define MP3X_BETA_VERSION       0      /* Set number if this is a beta version, otherwise zero */
+
+const char*  get_lame_version       ( void );
+const char*  get_lame_short_version ( void );
+const char*  get_psy_version        ( void );
+const char*  get_mp3x_version       ( void );
+const char*  get_lame_url           ( void );
+void         get_lame_version_numerical ( lame_version_t *const lvp );
+
+#endif  /* LAME_VERSION_H */
+
+/* End of version.h */
--- /dev/null
+++ b/sys/src/cmd/audio/mp3enc/vorbis_interface.c
@@ -1,0 +1,571 @@
+/* $Id: vorbis_interface.c,v 1.16 2001/03/18 14:31:29 aleidinger Exp $ */
+
+
+/* Compile lame with
+
+#! /bin/bash
+
+OGGVORBIS_ROOT=/home/cvs/vorbis
+
+export CPPFLAGS="-I${OGGVORBIS_ROOT}/ogg/include -I${OGGVORBIS_ROOT}/vorbis/lib"
+export CONFIG_DEFS="-DUSE_FFT3DN"
+
+make clean
+../configure
+make
+
+You can also do this with the "--with-vorbis" options in configure.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* LAME interface to libvorbis */
+
+#ifdef HAVE_VORBIS
+#include <stdlib.h>
+#include <limits.h>
+#include <time.h>
+#include "vorbis/codec.h"
+#include "modes/modes.h"
+#include "lame.h"
+#include "util.h"
+
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+short int  convbuffer [4096];  /* take 8 KByte out of the data segment, not the stack */
+int        convsize;
+
+ogg_sync_state    oy;  // sync and verify incoming physical bitstream
+ogg_stream_state  os;  // take physical pages, weld into a logical stream of packets
+ogg_page          og;  // one Ogg bitstream page. Vorbis packets are inside
+ogg_packet        op;  // one raw packet of data for decode
+vorbis_info       vi;  // struct that stores all the static vorbis bitstream settings
+vorbis_comment    vc;  // struct that stores all the bitstream user comments
+vorbis_dsp_state  vd;  // central working state for the packet->PCM decoder
+vorbis_block      vb;  // local working space for packet->PCM decode
+
+
+
+int lame_decode_ogg_initfile( lame_global_flags*  gfp,
+                              FILE*               fd,
+                              mp3data_struct*     mp3data )
+{
+
+  lame_internal_flags *gfc = gfp->internal_flags;
+  char *buffer;
+  int  bytes;
+  int i;
+
+
+  /********** Decode setup ************/
+
+  ogg_sync_init(&oy); /* Now we can read pages */
+  
+
+  /* grab some data at the head of the stream.  We want the first page
+     (which is guaranteed to be small and only contain the Vorbis
+     stream initial header) We need the first page to get the stream
+     serialno. */
+  
+  /* submit a 4k block to libvorbis' Ogg layer */
+  buffer=ogg_sync_buffer(&oy,4096);
+  bytes=fread(buffer,1,4096,fd);
+  ogg_sync_wrote(&oy,bytes);
+  
+  /* Get the first page. */
+  if(ogg_sync_pageout(&oy,&og)!=1){
+    /* error case.  Must not be Vorbis data */
+    ERRORF( gfc, "Error initializing Ogg bitstream data.\n" );
+    return -1;
+  }
+  
+  /* Get the serial number and set up the rest of decode. */
+  /* serialno first; use it to set up a logical stream */
+  ogg_stream_init(&os,ogg_page_serialno(&og));
+  
+  /* extract the initial header from the first page and verify that the
+     Ogg bitstream is in fact Vorbis data */
+  
+  /* I handle the initial header first instead of just having the code
+     read all three Vorbis headers at once because reading the initial
+     header is an easy way to identify a Vorbis bitstream and it's
+     useful to see that functionality seperated out. */
+  
+  vorbis_info_init(&vi);
+  vorbis_comment_init(&vc);
+  if(ogg_stream_pagein(&os,&og)<0){ 
+    /* error; stream version mismatch perhaps */
+    ERRORF( gfc, "Error reading first page of Ogg bitstream data.\n" );
+    return -1;
+  }
+  
+  if(ogg_stream_packetout(&os,&op)!=1){ 
+    /* no page? must not be vorbis */
+    ERRORF( gfc, "Error reading initial header packet.\n" );
+    return -1;
+  }
+  
+  if(vorbis_synthesis_headerin(&vi,&vc,&op)<0){ 
+    /* error case; not a vorbis header */
+    ERRORF( gfc, "This Ogg bitstream does not contain Vorbis "
+	    "audio data.\n");
+    return -1;
+  }
+  
+  /* At this point, we're sure we're Vorbis.  We've set up the logical
+     (Ogg) bitstream decoder.  Get the comment and codebook headers and
+     set up the Vorbis decoder */
+  
+  /* The next two packets in order are the comment and codebook headers.
+     They're likely large and may span multiple pages.  Thus we reead
+     and submit data until we get our two pacakets, watching that no
+     pages are missing.  If a page is missing, error out; losing a
+     header page is the only place where missing data is fatal. */
+  
+  i=0;
+  while(i<2){
+    while(i<2){
+      int result=ogg_sync_pageout(&oy,&og);
+      if(result==0)break; /* Need more data */
+      /* Don't complain about missing or corrupt data yet.  We'll
+	 catch it at the packet output phase */
+      if(result==1){
+	ogg_stream_pagein(&os,&og); /* we can ignore any errors here
+				       as they'll also become apparent
+				       at packetout */
+	while(i<2){
+	  result=ogg_stream_packetout(&os,&op);
+	  if(result==0)break;
+	  if(result==-1){
+	    /* Uh oh; data at some point was corrupted or missing!
+	       We can't tolerate that in a header.  Die. */
+	    ERRORF( gfc, "Corrupt secondary header.  Exiting.\n" );
+	    return -1;
+	  }
+	  vorbis_synthesis_headerin(&vi,&vc,&op);
+	  i++;
+	}
+      }
+    }
+    /* no harm in not checking before adding more */
+    buffer=ogg_sync_buffer(&oy,4096);
+    bytes=fread(buffer,1,4096,fd);
+    if(bytes==0 && i<2){
+      ERRORF( gfc, "End of file before finding all Vorbis headers!\n" );
+      return -1;
+    }
+    ogg_sync_wrote(&oy,bytes);
+  }
+  
+  /* Throw the comments plus a few lines about the bitstream we're
+     decoding */
+  {
+    /*
+    char **ptr=vc.user_comments;
+    while(*ptr){
+      MSGF( gfc, "%s\n", *ptr );
+      ++ptr;
+    }
+    MSGF( gfc, "\nBitstream is %d channel, %ldHz\n", vi.channels, vi.rate );
+    MSGF( gfc, "Encoded by: %s\n\n", vc.vendor );
+    */
+  }
+  
+  
+  /* OK, got and parsed all three headers. Initialize the Vorbis
+     packet->PCM decoder. */
+  vorbis_synthesis_init(&vd,&vi); /* central decode state */
+  vorbis_block_init(&vd,&vb);     /* local state for most of the decode
+				     so multiple block decodes can
+				     proceed in parallel.  We could init
+				     multiple vorbis_block structures
+				     for vd here */
+  
+  mp3data->stereo = vi.channels;
+  mp3data->samplerate = vi.rate;
+  mp3data->bitrate = 0; //ov_bitrate_instant(&vf);
+  mp3data->nsamp=MAX_U_32_NUM;
+  
+  return 0;
+}
+
+
+
+/*
+  For lame_decode_fromfile:  return code
+  -1     error, or eof
+  0     ok, but need more data before outputing any samples
+  n     number of samples output.  
+*/
+int lame_decode_ogg_fromfile( lame_global_flags*  gfp,
+                              FILE*               fd,
+                              short int           pcm_l[],
+                              short int           pcm_r[],
+                              mp3data_struct*     mp3data )
+{
+  lame_internal_flags *gfc = gfp->internal_flags;
+  int samples,result,i,j,eof=0,eos=0,bout=0;
+  double **pcm;
+
+  while(1){
+
+    /* 
+    **pcm is a multichannel double vector.  In stereo, for
+    example, pcm[0] is left, and pcm[1] is right.  samples is
+    the size of each channel.  Convert the float values
+    (-1.<=range<=1.) to whatever PCM format and write it out */
+    /* unpack the buffer, if it has at least 1024 samples */
+    convsize=1024;
+    samples=vorbis_synthesis_pcmout(&vd,&pcm);
+    if (samples >= convsize || eos || eof) {
+      /* read 1024 samples, or if eos, read what ever is in buffer */
+      int clipflag=0;
+      bout=(samples<convsize?samples:convsize);
+      
+      /* convert doubles to 16 bit signed ints (host order) and
+	 interleave */
+      for(i=0;i<vi.channels;i++){
+	double  *mono=pcm[i];
+	for(j=0;j<bout;j++){
+	  int val=mono[j]*32767.;
+	  /* might as well guard against clipping */
+	  if(val>32767){
+	    val=32767;
+	    clipflag=1;
+	  }
+	  if(val<-32768){
+	    val=-32768;
+	    clipflag=1;
+	  }
+	  if (i==0) pcm_l[j]=val;
+	  if (i==1) pcm_r[j]=val;
+	}
+      }
+      
+      /*
+      if(clipflag)
+	MSGF( gfc, "Clipping in frame %ld\n", vd.sequence );
+      */
+      
+      /* tell libvorbis how many samples we actually consumed */
+      vorbis_synthesis_read(&vd,bout); 
+      
+      break;
+    }    
+
+    result=ogg_sync_pageout(&oy,&og);
+      
+    if(result==0) {
+      /* need more data */
+    }else if (result==-1){ /* missing or corrupt data at this page position */
+      ERRORF( gfc, "Corrupt or missing data in bitstream; "
+	      "continuing...\n");
+    }else{
+      /* decode this page */
+      ogg_stream_pagein(&os,&og); /* can safely ignore errors at
+				       this point */
+      do {
+	result=ogg_stream_packetout(&os,&op);
+	if(result==0) {
+	  /* need more data */
+	} else if(result==-1){ /* missing or corrupt data at this page position */
+	  /* no reason to complain; already complained above */
+	}else{
+	  /* we have a packet.  Decode it */
+	  vorbis_synthesis(&vb,&op);
+	  vorbis_synthesis_blockin(&vd,&vb);
+	}
+      } while (result!=0);
+    }
+
+    /* is this the last page? */    
+    if(ogg_page_eos(&og))eos=1;
+    
+    if(!eos){
+      char *buffer;
+      int bytes;
+      buffer=ogg_sync_buffer(&oy,4096);
+      bytes=fread(buffer,1,4096,fd);
+      ogg_sync_wrote(&oy,bytes);
+      if(bytes==0)eof=1;
+    }
+  }
+
+  mp3data->stereo = vi.channels;
+  mp3data->samplerate = vi.rate;
+  mp3data->bitrate = 0; //ov_bitrate_instant(&vf);
+  /*  mp3data->nsamp=MAX_U_32_NUM;*/
+
+  
+  if (bout==0) {
+    /* clean up this logical bitstream; before exit we see if we're
+       followed by another [chained] */
+    ogg_stream_clear(&os);
+    
+    /* ogg_page and ogg_packet structs always point to storage in
+       libvorbis.  They're never freed or manipulated directly */
+    
+    vorbis_block_clear(&vb);
+    vorbis_dsp_clear(&vd);
+    vorbis_info_clear(&vi);  /* must be called last */
+    
+    /* OK, clean up the framer */
+    ogg_sync_clear(&oy);
+    return -1;
+  }
+  return bout;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ogg_stream_state  os2;  // take physical pages, weld into a logical stream of packets
+ogg_page          og2;  // one Ogg bitstream page. Vorbis packets are inside
+ogg_packet        op2;  // one raw packet of data for decode
+
+vorbis_info       vi2;  // struct that stores all the static vorbis bitstream settings
+vorbis_comment    vc2;  // struct that stores all the bitstream user comments
+vorbis_dsp_state  vd2;  // central working state for the packet->PCM decoder
+vorbis_block      vb2;  // local working space for packet->PCM decode
+
+
+
+
+#define MAX_COMMENT_LENGTH 255
+
+int lame_encode_ogg_init(lame_global_flags *gfp)
+{
+  lame_internal_flags *gfc=gfp->internal_flags;
+  char comment[MAX_COMMENT_LENGTH+1];
+
+  
+  /********** Encode setup ************/
+  
+  /* choose an encoding mode */
+  /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */
+  if (gfp->compression_ratio < 5.01) {
+    memcpy(&vi2,&info_E,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_E \n" );
+  } else if (gfp->compression_ratio < 6) {
+    memcpy(&vi2,&info_D,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_D \n" );
+  } else if (gfp->compression_ratio < 8) {
+    memcpy(&vi2,&info_C,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_C \n" );
+  } else if (gfp->compression_ratio < 10) {
+    memcpy(&vi2,&info_B,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_B \n" );
+  } else if (gfp->compression_ratio < 12) {
+    memcpy(&vi2,&info_A,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_A \n" );
+  } else {
+    memcpy(&vi2,&info_A,sizeof(vi2));
+    MSGF( gfc, "Encoding with Vorbis mode info_A \n" );
+  }
+
+  vi2.channels = gfc->channels_out;
+  vi2.rate = gfp->out_samplerate;
+
+  
+  /* add a comment */
+  vorbis_comment_init(&vc2);
+  vorbis_comment_add(&vc2,"Track encoded using L.A.M.E. libvorbis interface.");
+
+  /* Add ID3-style comments to the output using (for the time being) the
+     "private data members" in the "id3tag_spec" data structure. This was
+     from a patch by Ralph Giles <[email protected]> */
+     
+#ifdef THIS_CODE_IS_NOT_BROKEN_ANYMORE     
+  if(gfp->tag_spec.title) {
+    strcpy(comment,"TITLE=");
+    strncat(comment,gfp->tag_spec.title,MAX_COMMENT_LENGTH-strlen(comment));
+    vorbis_comment_add(&vc2,comment);
+  }
+  if(gfp->tag_spec.artist) {
+    strcpy(comment,"ARTIST=");
+    strncat(comment,gfp->tag_spec.artist,MAX_COMMENT_LENGTH-strlen(comment));
+    vorbis_comment_add(&vc2,comment);
+  }
+  if(gfp->tag_spec.album) {
+    strcpy(comment,"ALBUM=");
+    strncat(comment,gfp->tag_spec.album,MAX_COMMENT_LENGTH-strlen(comment));
+    vorbis_comment_add(&vc2,comment);
+  }
+  /* pretend that the ID3 fields are equivalent to the Vorbis fields */
+  if(gfp->tag_spec.year) {
+    sprintf(comment, "DATE=%d", gfp->tag_spec.year);
+    vorbis_comment_add(&vc2,comment);
+  }
+  if(gfp->tag_spec.comment) {
+    strcpy(comment,"DESCRIPTION=");
+    strncat(comment,gfp->tag_spec.comment,MAX_COMMENT_LENGTH-strlen(comment));
+    vorbis_comment_add(&vc2,comment);
+  }
+  /* TODO -- support for track and genre */
+#endif  
+
+  /* set up the analysis state and auxiliary encoding storage */
+  vorbis_analysis_init(&vd2,&vi2);
+  vorbis_block_init(&vd2,&vb2);
+  
+  /* set up our packet->stream encoder */
+  /* pick a random serial number; that way we can more likely build
+     chained streams just by concatenation */
+  srand(time(NULL));
+  ogg_stream_init(&os2,rand());
+  
+  /* Vorbis streams begin with three headers; the initial header (with
+     most of the codec setup parameters) which is mandated by the Ogg
+     bitstream spec.  The second header holds any comment fields.  The
+     third header holds the bitstream codebook.  We merely need to
+     make the headers, then pass them to libvorbis one at a time;
+     libvorbis handles the additional Ogg bitstream constraints */
+  
+  {
+    ogg_packet header;
+    ogg_packet header_comm;
+    ogg_packet header_code;
+    
+    vorbis_analysis_headerout(&vd2,&vc2,&header,&header_comm,&header_code);
+    ogg_stream_packetin(&os2,&header); /* automatically placed in its own
+					 page */
+    ogg_stream_packetin(&os2,&header_comm);
+    ogg_stream_packetin(&os2,&header_code);
+    
+    /* no need to write out here.  We'll get to that in the main loop */
+  }
+  
+  return 0;
+}
+
+
+
+int lame_encode_ogg_finish(lame_global_flags *gfp,
+			  char *mp3buf, int mp3buf_size)
+{
+  int eos=0,bytes=0;
+
+  vorbis_analysis_wrote(&vd2,0);
+
+  while(vorbis_analysis_blockout(&vd2,&vb2)==1){
+    
+    /* analysis */
+    vorbis_analysis(&vb2,&op2);
+
+      /* weld the packet into the bitstream */
+      ogg_stream_packetin(&os2,&op2);
+
+      /* write out pages (if any) */
+      while(!eos){
+	int result=ogg_stream_pageout(&os2,&og2);
+	if(result==0)break;
+
+
+	/* check if mp3buffer is big enough for the output */
+	bytes += og2.header_len + og2.body_len;
+	if (bytes > mp3buf_size && mp3buf_size>0)
+	  return -5;
+	
+	memcpy(mp3buf,og2.header,og2.header_len);
+	memcpy(mp3buf+og2.header_len,og2.body,og2.body_len);
+
+	/* this could be set above, but for illustrative purposes, I do
+	   it here (to show that vorbis does know where the stream ends) */
+	if(ogg_page_eos(&og2))eos=1;
+
+      }
+    }
+
+
+  /* clean up and exit.  vorbis_info_clear() must be called last */
+  ogg_stream_clear(&os2);
+  vorbis_block_clear(&vb2);
+  vorbis_dsp_clear(&vd2);
+
+  
+  /* ogg_page and ogg_packet structs always point to storage in
+     libvorbis.  They're never freed or manipulated directly */
+  return bytes;
+
+}
+
+
+
+int  lame_encode_ogg_frame (
+	lame_global_flags*  gfp,
+	const sample_t*     inbuf_l, 
+	const sample_t*     inbuf_r,
+	unsigned char*      mp3buf, 
+	size_t              mp3buf_size )
+{
+    lame_internal_flags *gfc = gfp->internal_flags;
+    int  i;
+    int  eos   = 0;
+    int  bytes = 0;
+  
+    /* expose the buffer to submit data */
+    double **buffer = vorbis_analysis_buffer(&vd2,gfp->framesize);
+  
+    /* change level of input by -90 dB (no de-interleaving!) */
+    for ( i = 0; i < gfp->framesize; i++ )
+        buffer [0] [i] = (1/32768.) * inbuf_l [i];
+    if ( gfc->channels_out == 2 )
+        for ( i = 0; i < gfp->framesize; i++ )
+            buffer [1] [i] = (1/32768.) * inbuf_r [i];
+  
+  /* tell the library how much we actually submitted */
+  vorbis_analysis_wrote(&vd2,i);
+
+  /* vorbis does some data preanalysis, then divvies up blocks for
+     more involved (potentially parallel) processing.  Get a single
+     block for encoding now */
+  while(vorbis_analysis_blockout(&vd2,&vb2)==1){
+    int result;
+    /* analysis */
+    vorbis_analysis(&vb2,&op2);
+    
+    /* weld the packet into the bitstream */
+    ogg_stream_packetin(&os2,&op2);
+    
+    /* write out pages (if any) */
+    do {
+      result=ogg_stream_pageout(&os2,&og2);
+      if (result==0) break;
+	
+      /* check if mp3buffer is big enough for the output */
+      bytes += og2.header_len + og2.body_len;
+      /*
+      DEBUGF("\n\n*********\ndecoded bytes=%i  %i \n",bytes,mp3buf_size);
+      */
+      if (bytes > mp3buf_size && mp3buf_size>0)
+	return -6;
+      
+      memcpy(mp3buf,og2.header,og2.header_len);
+      memcpy(mp3buf+og2.header_len,og2.body,og2.body_len);
+      mp3buf += og2.header_len + og2.body_len;
+      
+      if(ogg_page_eos(&og2))eos=1;
+    } while (1);
+  }
+  (gfp -> frameNum)++;
+  return bytes;
+}
+
+#endif
+
+/* end of vorbis_interface.c */
+
--- /dev/null
+++ b/sys/src/cmd/audio/oggdec/AUTHORS
@@ -1,0 +1,11 @@
+
+Original:
+
+	Monty <[email protected]>
+	and the rest of the Xiph.org Foundation.
+
+
+Plan9 port:
+
+	Aki Nyrhinen <[email protected]>
+
--- /dev/null
+++ b/sys/src/cmd/audio/oggdec/COPYING
@@ -1,0 +1,28 @@
+Copyright (c) 2002, Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+++ b/sys/src/cmd/audio/oggdec/mkfile
@@ -1,0 +1,21 @@
+</$objtype/mkfile
+<../config
+
+TARGET=oggdec
+
+CC=pcc
+CFLAGS=-I../libvorbis -I../libogg
+
+%.$O: %.c
+	$CC $CFLAGS -c $stem.c
+
+$O.%: %.$O
+	$CC -o $target $prereq
+
+all:V: $O.$TARGET
+
+clean:V:
+	rm -f *.[$OS] [$OS].$TARGET
+
+install:V: $O.$TARGET
+	cp $O.$TARGET $BIN/$TARGET
--- /dev/null
+++ b/sys/src/cmd/audio/oggdec/oggdec.c
@@ -1,0 +1,284 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: simple example decoder
+ last mod: $Id: decoder_example.c,v 1.27 2002/07/12 15:07:52 giles Exp $
+
+ ********************************************************************/
+
+/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to
+   stdout.  Decodes simple and chained OggVorbis files from beginning
+   to end.  Vorbisfile.a is somewhat more complex than the code below.  */
+
+/* Note that this is POSIX, not ANSI code */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <vorbis/codec.h>
+
+
+ogg_int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */
+int convsize=4096;
+
+extern void _VDBG_dump(void);
+
+int main(){
+  ogg_sync_state   oy; /* sync and verify incoming physical bitstream */
+  ogg_stream_state os; /* take physical pages, weld into a logical
+			  stream of packets */
+  ogg_page         og; /* one Ogg bitstream page.  Vorbis packets are inside */
+  ogg_packet       op; /* one raw packet of data for decode */
+  
+  vorbis_info      vi; /* struct that stores all the static vorbis bitstream
+			  settings */
+  vorbis_comment   vc; /* struct that stores all the bitstream user comments */
+  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+  vorbis_block     vb; /* local working space for packet->PCM decode */
+  
+  char *buffer;
+  int  bytes;
+
+
+  /********** Decode setup ************/
+
+  ogg_sync_init(&oy); /* Now we can read pages */
+  
+  while(1){ /* we repeat if the bitstream is chained */
+    int eos=0;
+    int i;
+
+    /* grab some data at the head of the stream.  We want the first page
+       (which is guaranteed to be small and only contain the Vorbis
+       stream initial header) We need the first page to get the stream
+       serialno. */
+
+    /* submit a 4k block to libvorbis' Ogg layer */
+    buffer=ogg_sync_buffer(&oy,4096);
+    bytes=fread(buffer,1,4096,stdin);
+    ogg_sync_wrote(&oy,bytes);
+    
+    /* Get the first page. */
+    if(ogg_sync_pageout(&oy,&og)!=1){
+      /* have we simply run out of data?  If so, we're done. */
+      if(bytes<4096)break;
+      
+      /* error case.  Must not be Vorbis data */
+      fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
+      exit(1);
+    }
+  
+    /* Get the serial number and set up the rest of decode. */
+    /* serialno first; use it to set up a logical stream */
+    ogg_stream_init(&os,ogg_page_serialno(&og));
+    
+    /* extract the initial header from the first page and verify that the
+       Ogg bitstream is in fact Vorbis data */
+    
+    /* I handle the initial header first instead of just having the code
+       read all three Vorbis headers at once because reading the initial
+       header is an easy way to identify a Vorbis bitstream and it's
+       useful to see that functionality seperated out. */
+    
+    vorbis_info_init(&vi);
+    vorbis_comment_init(&vc);
+    if(ogg_stream_pagein(&os,&og)<0){ 
+      /* error; stream version mismatch perhaps */
+      fprintf(stderr,"Error reading first page of Ogg bitstream data.\n");
+      exit(1);
+    }
+    
+    if(ogg_stream_packetout(&os,&op)!=1){ 
+      /* no page? must not be vorbis */
+      fprintf(stderr,"Error reading initial header packet.\n");
+      exit(1);
+    }
+    
+    if(vorbis_synthesis_headerin(&vi,&vc,&op)<0){ 
+      /* error case; not a vorbis header */
+      fprintf(stderr,"This Ogg bitstream does not contain Vorbis "
+	      "audio data.\n");
+      exit(1);
+    }
+    
+    /* At this point, we're sure we're Vorbis.  We've set up the logical
+       (Ogg) bitstream decoder.  Get the comment and codebook headers and
+       set up the Vorbis decoder */
+    
+    /* The next two packets in order are the comment and codebook headers.
+       They're likely large and may span multiple pages.  Thus we reead
+       and submit data until we get our two pacakets, watching that no
+       pages are missing.  If a page is missing, error out; losing a
+       header page is the only place where missing data is fatal. */
+    
+    i=0;
+    while(i<2){
+      while(i<2){
+	int result=ogg_sync_pageout(&oy,&og);
+	if(result==0)break; /* Need more data */
+	/* Don't complain about missing or corrupt data yet.  We'll
+	   catch it at the packet output phase */
+	if(result==1){
+	  ogg_stream_pagein(&os,&og); /* we can ignore any errors here
+					 as they'll also become apparent
+					 at packetout */
+	  while(i<2){
+	    result=ogg_stream_packetout(&os,&op);
+	    if(result==0)break;
+	    if(result<0){
+	      /* Uh oh; data at some point was corrupted or missing!
+		 We can't tolerate that in a header.  Die. */
+	      fprintf(stderr,"Corrupt secondary header.  Exiting.\n");
+	      exit(1);
+	    }
+	    vorbis_synthesis_headerin(&vi,&vc,&op);
+	    i++;
+	  }
+	}
+      }
+      /* no harm in not checking before adding more */
+      buffer=ogg_sync_buffer(&oy,4096);
+      bytes=fread(buffer,1,4096,stdin);
+      if(bytes==0 && i<2){
+	fprintf(stderr,"End of file before finding all Vorbis headers!\n");
+	exit(1);
+      }
+      ogg_sync_wrote(&oy,bytes);
+    }
+    
+    /* Throw the comments plus a few lines about the bitstream we're
+       decoding */
+    {
+      char **ptr=vc.user_comments;
+      while(*ptr){
+	fprintf(stderr,"%s\n",*ptr);
+	++ptr;
+      }
+      fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi.channels,vi.rate);
+      fprintf(stderr,"Encoded by: %s\n\n",vc.vendor);
+    }
+    
+    convsize=4096/vi.channels;
+
+    /* OK, got and parsed all three headers. Initialize the Vorbis
+       packet->PCM decoder. */
+    vorbis_synthesis_init(&vd,&vi); /* central decode state */
+    vorbis_block_init(&vd,&vb);     /* local state for most of the decode
+				       so multiple block decodes can
+				       proceed in parallel.  We could init
+				       multiple vorbis_block structures
+				       for vd here */
+    
+    /* The rest is just a straight decode loop until end of stream */
+    while(!eos){
+      while(!eos){
+	int result=ogg_sync_pageout(&oy,&og);
+	if(result==0)break; /* need more data */
+	if(result<0){ /* missing or corrupt data at this page position */
+	  fprintf(stderr,"Corrupt or missing data in bitstream; "
+		  "continuing...\n");
+	}else{
+	  ogg_stream_pagein(&os,&og); /* can safely ignore errors at
+					 this point */
+	  while(1){
+	    result=ogg_stream_packetout(&os,&op);
+
+	    if(result==0)break; /* need more data */
+	    if(result<0){ /* missing or corrupt data at this page position */
+	      /* no reason to complain; already complained above */
+	    }else{
+	      /* we have a packet.  Decode it */
+	      float **pcm;
+	      int samples;
+	      
+	      if(vorbis_synthesis(&vb,&op)==0) /* test for success! */
+		vorbis_synthesis_blockin(&vd,&vb);
+	      /* 
+		 
+	      **pcm is a multichannel float vector.  In stereo, for
+	      example, pcm[0] is left, and pcm[1] is right.  samples is
+	      the size of each channel.  Convert the float values
+	      (-1.<=range<=1.) to whatever PCM format and write it out */
+	      
+	      while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0){
+		int j;
+		int clipflag=0;
+		int bout=(samples<convsize?samples:convsize);
+		
+		/* convert floats to 16 bit signed ints (host order) and
+		   interleave */
+		for(i=0;i<vi.channels;i++){
+		  ogg_int16_t *ptr=convbuffer+i;
+		  float  *mono=pcm[i];
+		  for(j=0;j<bout;j++){
+#if 1
+		    int val=mono[j]*32767.f;
+#else /* optional dither */
+		    int val=mono[j]*32767.f+drand48()-0.5f;
+#endif
+		    /* might as well guard against clipping */
+		    if(val>32767){
+		      val=32767;
+		      clipflag=1;
+		    }
+		    if(val<-32768){
+		      val=-32768;
+		      clipflag=1;
+		    }
+		    *ptr=val;
+		    ptr+=vi.channels;
+		  }
+		}
+		
+		if(clipflag)
+		  fprintf(stderr,"Clipping in frame %ld\n",(long)(vd.sequence));
+		
+		
+		fwrite(convbuffer,2*vi.channels,bout,stdout);
+		
+		vorbis_synthesis_read(&vd,bout); /* tell libvorbis how
+						   many samples we
+						   actually consumed */
+	      }	    
+	    }
+	  }
+	  if(ogg_page_eos(&og))eos=1;
+	}
+      }
+      if(!eos){
+	buffer=ogg_sync_buffer(&oy,4096);
+	bytes=fread(buffer,1,4096,stdin);
+	ogg_sync_wrote(&oy,bytes);
+	if(bytes==0)eos=1;
+      }
+    }
+    
+    /* clean up this logical bitstream; before exit we see if we're
+       followed by another [chained] */
+
+    ogg_stream_clear(&os);
+  
+    /* ogg_page and ogg_packet structs always point to storage in
+       libvorbis.  They're never freed or manipulated directly */
+    
+    vorbis_block_clear(&vb);
+    vorbis_dsp_clear(&vd);
+	vorbis_comment_clear(&vc);
+    vorbis_info_clear(&vi);  /* must be called last */
+  }
+
+  /* OK, clean up the framer */
+  ogg_sync_clear(&oy);
+  
+  fprintf(stderr,"Done.\n");
+  return(0);
+}
--- /dev/null
+++ b/sys/src/cmd/audio/oggenc/AUTHORS
@@ -1,0 +1,11 @@
+
+Original:
+
+	Monty <[email protected]>
+	and the rest of the Xiph.org Foundation.
+
+
+Plan9 port:
+
+	Aki Nyrhinen <[email protected]>
+
--- /dev/null
+++ b/sys/src/cmd/audio/oggenc/COPYING
@@ -1,0 +1,28 @@
+Copyright (c) 2002, Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+++ b/sys/src/cmd/audio/oggenc/mkfile
@@ -1,0 +1,21 @@
+</$objtype/mkfile
+<../config
+
+TARGET=oggenc
+
+CC=pcc
+CFLAGS=-I../libvorbis -I../libogg
+
+%.$O: %.c
+	$CC $CFLAGS -c $stem.c
+
+$O.%: %.$O
+	$CC -o $target $prereq
+
+all:V: $O.$TARGET
+
+clean:V:
+	rm -f *.[$OS] [$OS].$TARGET
+
+install:V: $O.$TARGET
+	cp $O.$TARGET $BIN/$TARGET
--- /dev/null
+++ b/sys/src/cmd/audio/oggenc/oggenc.c
@@ -1,0 +1,207 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: simple example encoder
+ last mod: $Id: encoder_example.c,v 1.50 2002/07/16 09:26:07 xiphmont Exp $
+
+ ********************************************************************/
+
+/* takes a stereo 16bit 44.1kHz RAW file from stdin and encodes it into
+   a Vorbis bitstream */
+
+/* Note that this is POSIX, not ANSI, code */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <math.h>
+#include <vorbis/vorbisenc.h>
+
+
+#define READ 1024
+signed char readbuffer[READ*4+44]; /* out of the data segment, not the stack */
+
+int main(){
+  ogg_stream_state os; /* take physical pages, weld into a logical
+			  stream of packets */
+  ogg_page         og; /* one Ogg bitstream page.  Vorbis packets are inside */
+  ogg_packet       op; /* one raw packet of data for decode */
+  
+  vorbis_info      vi; /* struct that stores all the static vorbis bitstream
+			  settings */
+  vorbis_comment   vc; /* struct that stores all the user comments */
+
+  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+  vorbis_block     vb; /* local working space for packet->PCM decode */
+
+  int eos=0,ret;
+  int i, founddata;
+
+  /********** Encode setup ************/
+
+  vorbis_info_init(&vi);
+
+  /* choose an encoding mode.  A few possibilities commented out, one
+     actually used: */
+
+  /*********************************************************************
+   Encoding using a VBR quality mode.  The usable range is -.1
+   (lowest quality, smallest file) to 1. (highest quality, largest file).
+   Example quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR 
+  
+   ret = vorbis_encode_init_vbr(&vi,2,44100,.4);
+
+   ---------------------------------------------------------------------
+
+   Encoding using an average bitrate mode (ABR).
+   example: 44kHz stereo coupled, average 128kbps VBR 
+  
+   ret = vorbis_encode_init(&vi,2,44100,-1,128000,-1);
+
+   ---------------------------------------------------------------------
+
+   Encode using a qulity mode, but select that quality mode by asking for
+   an approximate bitrate.  This is not ABR, it is true VBR, but selected
+   using the bitrate interface, and then turning bitrate management off:
+
+   ret = ( vorbis_encode_setup_managed(&vi,2,44100,-1,128000,-1) ||
+           vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) ||
+           vorbis_encode_setup_init(&vi));
+
+   *********************************************************************/
+
+  ret=vorbis_encode_init_vbr(&vi,2,44100,.5);
+
+  /* do not continue if setup failed; this can happen if we ask for a
+     mode that libVorbis does not support (eg, too low a bitrate, etc,
+     will return 'OV_EIMPL') */
+
+  if(ret)exit(1);
+
+  /* add a comment */
+  vorbis_comment_init(&vc);
+  vorbis_comment_add_tag(&vc,"ENCODER","encoder_example.c");
+
+  /* set up the analysis state and auxiliary encoding storage */
+  vorbis_analysis_init(&vd,&vi);
+  vorbis_block_init(&vd,&vb);
+  
+  /* set up our packet->stream encoder */
+  /* pick a random serial number; that way we can more likely build
+     chained streams just by concatenation */
+  srand(time(NULL));
+  ogg_stream_init(&os,rand());
+
+  /* Vorbis streams begin with three headers; the initial header (with
+     most of the codec setup parameters) which is mandated by the Ogg
+     bitstream spec.  The second header holds any comment fields.  The
+     third header holds the bitstream codebook.  We merely need to
+     make the headers, then pass them to libvorbis one at a time;
+     libvorbis handles the additional Ogg bitstream constraints */
+
+  {
+    ogg_packet header;
+    ogg_packet header_comm;
+    ogg_packet header_code;
+
+    vorbis_analysis_headerout(&vd,&vc,&header,&header_comm,&header_code);
+    ogg_stream_packetin(&os,&header); /* automatically placed in its own
+					 page */
+    ogg_stream_packetin(&os,&header_comm);
+    ogg_stream_packetin(&os,&header_code);
+
+	/* This ensures the actual
+	 * audio data will start on a new page, as per spec
+	 */
+	while(!eos){
+		int result=ogg_stream_flush(&os,&og);
+		if(result==0)break;
+		fwrite(og.header,1,og.header_len,stdout);
+		fwrite(og.body,1,og.body_len,stdout);
+	}
+
+  }
+  
+  while(!eos){
+    long i;
+    long bytes=fread(readbuffer,1,READ*4,stdin); /* stereo hardwired here */
+
+    if(bytes==0){
+      /* end of file.  this can be done implicitly in the mainline,
+         but it's easier to see here in non-clever fashion.
+         Tell the library we're at end of stream so that it can handle
+         the last frame and mark end of stream in the output properly */
+      vorbis_analysis_wrote(&vd,0);
+
+    }else{
+      /* data to encode */
+
+      /* expose the buffer to submit data */
+      float **buffer=vorbis_analysis_buffer(&vd,READ);
+      
+      /* uninterleave samples */
+      for(i=0;i<bytes/4;i++){
+	buffer[0][i]=((readbuffer[i*4+1]<<8)|
+		      (0x00ff&(int)readbuffer[i*4]))/32768.f;
+	buffer[1][i]=((readbuffer[i*4+3]<<8)|
+		      (0x00ff&(int)readbuffer[i*4+2]))/32768.f;
+      }
+    
+      /* tell the library how much we actually submitted */
+      vorbis_analysis_wrote(&vd,i);
+    }
+
+    /* vorbis does some data preanalysis, then divvies up blocks for
+       more involved (potentially parallel) processing.  Get a single
+       block for encoding now */
+    while(vorbis_analysis_blockout(&vd,&vb)==1){
+      fflush(stderr);
+      /* analysis, assume we want to use bitrate management */
+      vorbis_analysis(&vb,NULL);
+      vorbis_bitrate_addblock(&vb);
+
+      while(vorbis_bitrate_flushpacket(&vd,&op)){
+	
+	/* weld the packet into the bitstream */
+	ogg_stream_packetin(&os,&op);
+	
+	/* write out pages (if any) */
+	while(!eos){
+	  int result=ogg_stream_pageout(&os,&og);
+	  if(result==0)break;
+	  fwrite(og.header,1,og.header_len,stdout);
+	  fwrite(og.body,1,og.body_len,stdout);
+	  
+	  /* this could be set above, but for illustrative purposes, I do
+	     it here (to show that vorbis does know where the stream ends) */
+	  
+	  if(ogg_page_eos(&og))eos=1;
+	}
+      }
+    }
+  }
+
+  /* clean up and exit.  vorbis_info_clear() must be called last */
+  
+  ogg_stream_clear(&os);
+  vorbis_block_clear(&vb);
+  vorbis_dsp_clear(&vd);
+  vorbis_comment_clear(&vc);
+  vorbis_info_clear(&vi);
+  
+  /* ogg_page and ogg_packet structs always point to storage in
+     libvorbis.  They're never freed or manipulated directly */
+  
+  fprintf(stderr,"Done.\n");
+  return(0);
+}
--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -809,6 +809,7 @@
 	"\033E\033",	"HP PCL printer data",		3,	OCTET,
 	"\033%-12345X",	"HPJCL file",		9,	"application/hpjcl",
 	"ID3",			"mp3 audio with id3",	3,	"audio/mpeg",
+	"OggS",			"ogg audio",		4,	"audio/ogg",
 	"\211PNG",		"PNG image",		4,	"image/png",
 	"P3\n",			"ppm",				3,	"image/ppm",
 	"P6\n",			"ppm",				3,	"image/ppm",
--- a/sys/src/games/mkfile
+++ b/sys/src/games/mkfile
@@ -24,8 +24,6 @@
 	doom\
 	mahjongg\
 	mines\
-	mp3dec\
-	mp3enc\
 	music\
 	sokoban\
 	sudoku\
--- a/sys/src/games/mp3dec/COPYING
+++ /dev/null
@@ -1,340 +1,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
--- a/sys/src/games/mp3dec/COPYRIGHT
+++ /dev/null
@@ -1,21 +1,0 @@
-
- libmad - MPEG audio decoder library
- Copyright (C) 2000-2004 Underbit Technologies, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
- If you would like to negotiate alternate licensing terms, you may do
- so by contacting: Underbit Technologies, Inc. <[email protected]>
-
--- a/sys/src/games/mp3dec/D.dat
+++ /dev/null
@@ -1,607 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: D.dat,v 1.9 2004/01/23 09:41:32 rob Exp $
- */
-
-/*
- * These are the coefficients for the subband synthesis window. This is a
- * reordered version of Table B.3 from ISO/IEC 11172-3.
- *
- * Every value is parameterized so that shift optimizations can be made at
- * compile-time. For example, every value can be right-shifted 12 bits to
- * minimize multiply instruction times without any loss of accuracy.
- */
-
-  {  PRESHIFT(0x00000000) /*  0.000000000 */,	/*  0 */
-    -PRESHIFT(0x0001d000) /* -0.000442505 */,
-     PRESHIFT(0x000d5000) /*  0.003250122 */,
-    -PRESHIFT(0x001cb000) /* -0.007003784 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-    -PRESHIFT(0x01421000) /* -0.078628540 */,
-     PRESHIFT(0x019ae000) /*  0.100311279 */,
-    -PRESHIFT(0x09271000) /* -0.572036743 */,
-     PRESHIFT(0x1251e000) /*  1.144989014 */,
-     PRESHIFT(0x09271000) /*  0.572036743 */,
-     PRESHIFT(0x019ae000) /*  0.100311279 */,
-     PRESHIFT(0x01421000) /*  0.078628540 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-     PRESHIFT(0x001cb000) /*  0.007003784 */,
-     PRESHIFT(0x000d5000) /*  0.003250122 */,
-     PRESHIFT(0x0001d000) /*  0.000442505 */,
-
-     PRESHIFT(0x00000000) /*  0.000000000 */,
-    -PRESHIFT(0x0001d000) /* -0.000442505 */,
-     PRESHIFT(0x000d5000) /*  0.003250122 */,
-    -PRESHIFT(0x001cb000) /* -0.007003784 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-    -PRESHIFT(0x01421000) /* -0.078628540 */,
-     PRESHIFT(0x019ae000) /*  0.100311279 */,
-    -PRESHIFT(0x09271000) /* -0.572036743 */,
-     PRESHIFT(0x1251e000) /*  1.144989014 */,
-     PRESHIFT(0x09271000) /*  0.572036743 */,
-     PRESHIFT(0x019ae000) /*  0.100311279 */,
-     PRESHIFT(0x01421000) /*  0.078628540 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-     PRESHIFT(0x001cb000) /*  0.007003784 */,
-     PRESHIFT(0x000d5000) /*  0.003250122 */,
-     PRESHIFT(0x0001d000) /*  0.000442505 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  1 */
-    -PRESHIFT(0x0001f000) /* -0.000473022 */,
-     PRESHIFT(0x000da000) /*  0.003326416 */,
-    -PRESHIFT(0x00207000) /* -0.007919312 */,
-     PRESHIFT(0x007d0000) /*  0.030517578 */,
-    -PRESHIFT(0x0158d000) /* -0.084182739 */,
-     PRESHIFT(0x01747000) /*  0.090927124 */,
-    -PRESHIFT(0x099a8000) /* -0.600219727 */,
-     PRESHIFT(0x124f0000) /*  1.144287109 */,
-     PRESHIFT(0x08b38000) /*  0.543823242 */,
-     PRESHIFT(0x01bde000) /*  0.108856201 */,
-     PRESHIFT(0x012b4000) /*  0.073059082 */,
-     PRESHIFT(0x0080f000) /*  0.031478882 */,
-     PRESHIFT(0x00191000) /*  0.006118774 */,
-     PRESHIFT(0x000d0000) /*  0.003173828 */,
-     PRESHIFT(0x0001a000) /*  0.000396729 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x0001f000) /* -0.000473022 */,
-     PRESHIFT(0x000da000) /*  0.003326416 */,
-    -PRESHIFT(0x00207000) /* -0.007919312 */,
-     PRESHIFT(0x007d0000) /*  0.030517578 */,
-    -PRESHIFT(0x0158d000) /* -0.084182739 */,
-     PRESHIFT(0x01747000) /*  0.090927124 */,
-    -PRESHIFT(0x099a8000) /* -0.600219727 */,
-     PRESHIFT(0x124f0000) /*  1.144287109 */,
-     PRESHIFT(0x08b38000) /*  0.543823242 */,
-     PRESHIFT(0x01bde000) /*  0.108856201 */,
-     PRESHIFT(0x012b4000) /*  0.073059082 */,
-     PRESHIFT(0x0080f000) /*  0.031478882 */,
-     PRESHIFT(0x00191000) /*  0.006118774 */,
-     PRESHIFT(0x000d0000) /*  0.003173828 */,
-     PRESHIFT(0x0001a000) /*  0.000396729 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  2 */
-    -PRESHIFT(0x00023000) /* -0.000534058 */,
-     PRESHIFT(0x000de000) /*  0.003387451 */,
-    -PRESHIFT(0x00245000) /* -0.008865356 */,
-     PRESHIFT(0x007a0000) /*  0.029785156 */,
-    -PRESHIFT(0x016f7000) /* -0.089706421 */,
-     PRESHIFT(0x014a8000) /*  0.080688477 */,
-    -PRESHIFT(0x0a0d8000) /* -0.628295898 */,
-     PRESHIFT(0x12468000) /*  1.142211914 */,
-     PRESHIFT(0x083ff000) /*  0.515609741 */,
-     PRESHIFT(0x01dd8000) /*  0.116577148 */,
-     PRESHIFT(0x01149000) /*  0.067520142 */,
-     PRESHIFT(0x00820000) /*  0.031738281 */,
-     PRESHIFT(0x0015b000) /*  0.005294800 */,
-     PRESHIFT(0x000ca000) /*  0.003082275 */,
-     PRESHIFT(0x00018000) /*  0.000366211 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x00023000) /* -0.000534058 */,
-     PRESHIFT(0x000de000) /*  0.003387451 */,
-    -PRESHIFT(0x00245000) /* -0.008865356 */,
-     PRESHIFT(0x007a0000) /*  0.029785156 */,
-    -PRESHIFT(0x016f7000) /* -0.089706421 */,
-     PRESHIFT(0x014a8000) /*  0.080688477 */,
-    -PRESHIFT(0x0a0d8000) /* -0.628295898 */,
-     PRESHIFT(0x12468000) /*  1.142211914 */,
-     PRESHIFT(0x083ff000) /*  0.515609741 */,
-     PRESHIFT(0x01dd8000) /*  0.116577148 */,
-     PRESHIFT(0x01149000) /*  0.067520142 */,
-     PRESHIFT(0x00820000) /*  0.031738281 */,
-     PRESHIFT(0x0015b000) /*  0.005294800 */,
-     PRESHIFT(0x000ca000) /*  0.003082275 */,
-     PRESHIFT(0x00018000) /*  0.000366211 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  3 */
-    -PRESHIFT(0x00026000) /* -0.000579834 */,
-     PRESHIFT(0x000e1000) /*  0.003433228 */,
-    -PRESHIFT(0x00285000) /* -0.009841919 */,
-     PRESHIFT(0x00765000) /*  0.028884888 */,
-    -PRESHIFT(0x0185d000) /* -0.095169067 */,
-     PRESHIFT(0x011d1000) /*  0.069595337 */,
-    -PRESHIFT(0x0a7fe000) /* -0.656219482 */,
-     PRESHIFT(0x12386000) /*  1.138763428 */,
-     PRESHIFT(0x07ccb000) /*  0.487472534 */,
-     PRESHIFT(0x01f9c000) /*  0.123474121 */,
-     PRESHIFT(0x00fdf000) /*  0.061996460 */,
-     PRESHIFT(0x00827000) /*  0.031845093 */,
-     PRESHIFT(0x00126000) /*  0.004486084 */,
-     PRESHIFT(0x000c4000) /*  0.002990723 */,
-     PRESHIFT(0x00015000) /*  0.000320435 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x00026000) /* -0.000579834 */,
-     PRESHIFT(0x000e1000) /*  0.003433228 */,
-    -PRESHIFT(0x00285000) /* -0.009841919 */,
-     PRESHIFT(0x00765000) /*  0.028884888 */,
-    -PRESHIFT(0x0185d000) /* -0.095169067 */,
-     PRESHIFT(0x011d1000) /*  0.069595337 */,
-    -PRESHIFT(0x0a7fe000) /* -0.656219482 */,
-     PRESHIFT(0x12386000) /*  1.138763428 */,
-     PRESHIFT(0x07ccb000) /*  0.487472534 */,
-     PRESHIFT(0x01f9c000) /*  0.123474121 */,
-     PRESHIFT(0x00fdf000) /*  0.061996460 */,
-     PRESHIFT(0x00827000) /*  0.031845093 */,
-     PRESHIFT(0x00126000) /*  0.004486084 */,
-     PRESHIFT(0x000c4000) /*  0.002990723 */,
-     PRESHIFT(0x00015000) /*  0.000320435 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  4 */
-    -PRESHIFT(0x00029000) /* -0.000625610 */,
-     PRESHIFT(0x000e3000) /*  0.003463745 */,
-    -PRESHIFT(0x002c7000) /* -0.010848999 */,
-     PRESHIFT(0x0071e000) /*  0.027801514 */,
-    -PRESHIFT(0x019bd000) /* -0.100540161 */,
-     PRESHIFT(0x00ec0000) /*  0.057617187 */,
-    -PRESHIFT(0x0af15000) /* -0.683914185 */,
-     PRESHIFT(0x12249000) /*  1.133926392 */,
-     PRESHIFT(0x075a0000) /*  0.459472656 */,
-     PRESHIFT(0x0212c000) /*  0.129577637 */,
-     PRESHIFT(0x00e79000) /*  0.056533813 */,
-     PRESHIFT(0x00825000) /*  0.031814575 */,
-     PRESHIFT(0x000f4000) /*  0.003723145 */,
-     PRESHIFT(0x000be000) /*  0.002899170 */,
-     PRESHIFT(0x00013000) /*  0.000289917 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x00029000) /* -0.000625610 */,
-     PRESHIFT(0x000e3000) /*  0.003463745 */,
-    -PRESHIFT(0x002c7000) /* -0.010848999 */,
-     PRESHIFT(0x0071e000) /*  0.027801514 */,
-    -PRESHIFT(0x019bd000) /* -0.100540161 */,
-     PRESHIFT(0x00ec0000) /*  0.057617187 */,
-    -PRESHIFT(0x0af15000) /* -0.683914185 */,
-     PRESHIFT(0x12249000) /*  1.133926392 */,
-     PRESHIFT(0x075a0000) /*  0.459472656 */,
-     PRESHIFT(0x0212c000) /*  0.129577637 */,
-     PRESHIFT(0x00e79000) /*  0.056533813 */,
-     PRESHIFT(0x00825000) /*  0.031814575 */,
-     PRESHIFT(0x000f4000) /*  0.003723145 */,
-     PRESHIFT(0x000be000) /*  0.002899170 */,
-     PRESHIFT(0x00013000) /*  0.000289917 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  5 */
-    -PRESHIFT(0x0002d000) /* -0.000686646 */,
-     PRESHIFT(0x000e4000) /*  0.003479004 */,
-    -PRESHIFT(0x0030b000) /* -0.011886597 */,
-     PRESHIFT(0x006cb000) /*  0.026535034 */,
-    -PRESHIFT(0x01b17000) /* -0.105819702 */,
-     PRESHIFT(0x00b77000) /*  0.044784546 */,
-    -PRESHIFT(0x0b619000) /* -0.711318970 */,
-     PRESHIFT(0x120b4000) /*  1.127746582 */,
-     PRESHIFT(0x06e81000) /*  0.431655884 */,
-     PRESHIFT(0x02288000) /*  0.134887695 */,
-     PRESHIFT(0x00d17000) /*  0.051132202 */,
-     PRESHIFT(0x0081b000) /*  0.031661987 */,
-     PRESHIFT(0x000c5000) /*  0.003005981 */,
-     PRESHIFT(0x000b7000) /*  0.002792358 */,
-     PRESHIFT(0x00011000) /*  0.000259399 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x0002d000) /* -0.000686646 */,
-     PRESHIFT(0x000e4000) /*  0.003479004 */,
-    -PRESHIFT(0x0030b000) /* -0.011886597 */,
-     PRESHIFT(0x006cb000) /*  0.026535034 */,
-    -PRESHIFT(0x01b17000) /* -0.105819702 */,
-     PRESHIFT(0x00b77000) /*  0.044784546 */,
-    -PRESHIFT(0x0b619000) /* -0.711318970 */,
-     PRESHIFT(0x120b4000) /*  1.127746582 */,
-     PRESHIFT(0x06e81000) /*  0.431655884 */,
-     PRESHIFT(0x02288000) /*  0.134887695 */,
-     PRESHIFT(0x00d17000) /*  0.051132202 */,
-     PRESHIFT(0x0081b000) /*  0.031661987 */,
-     PRESHIFT(0x000c5000) /*  0.003005981 */,
-     PRESHIFT(0x000b7000) /*  0.002792358 */,
-     PRESHIFT(0x00011000) /*  0.000259399 */ },
-
-  { -PRESHIFT(0x00001000) /* -0.000015259 */,	/*  6 */
-    -PRESHIFT(0x00031000) /* -0.000747681 */,
-     PRESHIFT(0x000e4000) /*  0.003479004 */,
-    -PRESHIFT(0x00350000) /* -0.012939453 */,
-     PRESHIFT(0x0066c000) /*  0.025085449 */,
-    -PRESHIFT(0x01c67000) /* -0.110946655 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-    -PRESHIFT(0x0bd06000) /* -0.738372803 */,
-     PRESHIFT(0x11ec7000) /*  1.120223999 */,
-     PRESHIFT(0x06772000) /*  0.404083252 */,
-     PRESHIFT(0x023b3000) /*  0.139450073 */,
-     PRESHIFT(0x00bbc000) /*  0.045837402 */,
-     PRESHIFT(0x00809000) /*  0.031387329 */,
-     PRESHIFT(0x00099000) /*  0.002334595 */,
-     PRESHIFT(0x000b0000) /*  0.002685547 */,
-     PRESHIFT(0x00010000) /*  0.000244141 */,
-
-    -PRESHIFT(0x00001000) /* -0.000015259 */,
-    -PRESHIFT(0x00031000) /* -0.000747681 */,
-     PRESHIFT(0x000e4000) /*  0.003479004 */,
-    -PRESHIFT(0x00350000) /* -0.012939453 */,
-     PRESHIFT(0x0066c000) /*  0.025085449 */,
-    -PRESHIFT(0x01c67000) /* -0.110946655 */,
-     PRESHIFT(0x007f5000) /*  0.031082153 */,
-    -PRESHIFT(0x0bd06000) /* -0.738372803 */,
-     PRESHIFT(0x11ec7000) /*  1.120223999 */,
-     PRESHIFT(0x06772000) /*  0.404083252 */,
-     PRESHIFT(0x023b3000) /*  0.139450073 */,
-     PRESHIFT(0x00bbc000) /*  0.045837402 */,
-     PRESHIFT(0x00809000) /*  0.031387329 */,
-     PRESHIFT(0x00099000) /*  0.002334595 */,
-     PRESHIFT(0x000b0000) /*  0.002685547 */,
-     PRESHIFT(0x00010000) /*  0.000244141 */ },
-
-  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  7 */
-    -PRESHIFT(0x00035000) /* -0.000808716 */,
-     PRESHIFT(0x000e3000) /*  0.003463745 */,
-    -PRESHIFT(0x00397000) /* -0.014022827 */,
-     PRESHIFT(0x005ff000) /*  0.023422241 */,
-    -PRESHIFT(0x01dad000) /* -0.115921021 */,
-     PRESHIFT(0x0043a000) /*  0.016510010 */,
-    -PRESHIFT(0x0c3d9000) /* -0.765029907 */,
-     PRESHIFT(0x11c83000) /*  1.111373901 */,
-     PRESHIFT(0x06076000) /*  0.376800537 */,
-     PRESHIFT(0x024ad000) /*  0.143264771 */,
-     PRESHIFT(0x00a67000) /*  0.040634155 */,
-     PRESHIFT(0x007f0000) /*  0.031005859 */,
-     PRESHIFT(0x0006f000) /*  0.001693726 */,
-     PRESHIFT(0x000a9000) /*  0.002578735 */,
-     PRESHIFT(0x0000e000) /*  0.000213623 */,
-
-    -PRESHIFT(0x00002000) /* -0.000030518 */,
-    -PRESHIFT(0x00035000) /* -0.000808716 */,
-     PRESHIFT(0x000e3000) /*  0.003463745 */,
-    -PRESHIFT(0x00397000) /* -0.014022827 */,
-     PRESHIFT(0x005ff000) /*  0.023422241 */,
-    -PRESHIFT(0x01dad000) /* -0.115921021 */,
-     PRESHIFT(0x0043a000) /*  0.016510010 */,
-    -PRESHIFT(0x0c3d9000) /* -0.765029907 */,
-     PRESHIFT(0x11c83000) /*  1.111373901 */,
-     PRESHIFT(0x06076000) /*  0.376800537 */,
-     PRESHIFT(0x024ad000) /*  0.143264771 */,
-     PRESHIFT(0x00a67000) /*  0.040634155 */,
-     PRESHIFT(0x007f0000) /*  0.031005859 */,
-     PRESHIFT(0x0006f000) /*  0.001693726 */,
-     PRESHIFT(0x000a9000) /*  0.002578735 */,
-     PRESHIFT(0x0000e000) /*  0.000213623 */ },
-
-  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  8 */
-    -PRESHIFT(0x0003a000) /* -0.000885010 */,
-     PRESHIFT(0x000e0000) /*  0.003417969 */,
-    -PRESHIFT(0x003df000) /* -0.015121460 */,
-     PRESHIFT(0x00586000) /*  0.021575928 */,
-    -PRESHIFT(0x01ee6000) /* -0.120697021 */,
-     PRESHIFT(0x00046000) /*  0.001068115 */,
-    -PRESHIFT(0x0ca8d000) /* -0.791213989 */,
-     PRESHIFT(0x119e9000) /*  1.101211548 */,
-     PRESHIFT(0x05991000) /*  0.349868774 */,
-     PRESHIFT(0x02578000) /*  0.146362305 */,
-     PRESHIFT(0x0091a000) /*  0.035552979 */,
-     PRESHIFT(0x007d1000) /*  0.030532837 */,
-     PRESHIFT(0x00048000) /*  0.001098633 */,
-     PRESHIFT(0x000a1000) /*  0.002456665 */,
-     PRESHIFT(0x0000d000) /*  0.000198364 */,
-
-    -PRESHIFT(0x00002000) /* -0.000030518 */,
-    -PRESHIFT(0x0003a000) /* -0.000885010 */,
-     PRESHIFT(0x000e0000) /*  0.003417969 */,
-    -PRESHIFT(0x003df000) /* -0.015121460 */,
-     PRESHIFT(0x00586000) /*  0.021575928 */,
-    -PRESHIFT(0x01ee6000) /* -0.120697021 */,
-     PRESHIFT(0x00046000) /*  0.001068115 */,
-    -PRESHIFT(0x0ca8d000) /* -0.791213989 */,
-     PRESHIFT(0x119e9000) /*  1.101211548 */,
-     PRESHIFT(0x05991000) /*  0.349868774 */,
-     PRESHIFT(0x02578000) /*  0.146362305 */,
-     PRESHIFT(0x0091a000) /*  0.035552979 */,
-     PRESHIFT(0x007d1000) /*  0.030532837 */,
-     PRESHIFT(0x00048000) /*  0.001098633 */,
-     PRESHIFT(0x000a1000) /*  0.002456665 */,
-     PRESHIFT(0x0000d000) /*  0.000198364 */ },
-
-  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/*  9 */
-    -PRESHIFT(0x0003f000) /* -0.000961304 */,
-     PRESHIFT(0x000dd000) /*  0.003372192 */,
-    -PRESHIFT(0x00428000) /* -0.016235352 */,
-     PRESHIFT(0x00500000) /*  0.019531250 */,
-    -PRESHIFT(0x02011000) /* -0.125259399 */,
-    -PRESHIFT(0x003e6000) /* -0.015228271 */,
-    -PRESHIFT(0x0d11e000) /* -0.816864014 */,
-     PRESHIFT(0x116fc000) /*  1.089782715 */,
-     PRESHIFT(0x052c5000) /*  0.323318481 */,
-     PRESHIFT(0x02616000) /*  0.148773193 */,
-     PRESHIFT(0x007d6000) /*  0.030609131 */,
-     PRESHIFT(0x007aa000) /*  0.029937744 */,
-     PRESHIFT(0x00024000) /*  0.000549316 */,
-     PRESHIFT(0x0009a000) /*  0.002349854 */,
-     PRESHIFT(0x0000b000) /*  0.000167847 */,
-
-    -PRESHIFT(0x00002000) /* -0.000030518 */,
-    -PRESHIFT(0x0003f000) /* -0.000961304 */,
-     PRESHIFT(0x000dd000) /*  0.003372192 */,
-    -PRESHIFT(0x00428000) /* -0.016235352 */,
-     PRESHIFT(0x00500000) /*  0.019531250 */,
-    -PRESHIFT(0x02011000) /* -0.125259399 */,
-    -PRESHIFT(0x003e6000) /* -0.015228271 */,
-    -PRESHIFT(0x0d11e000) /* -0.816864014 */,
-     PRESHIFT(0x116fc000) /*  1.089782715 */,
-     PRESHIFT(0x052c5000) /*  0.323318481 */,
-     PRESHIFT(0x02616000) /*  0.148773193 */,
-     PRESHIFT(0x007d6000) /*  0.030609131 */,
-     PRESHIFT(0x007aa000) /*  0.029937744 */,
-     PRESHIFT(0x00024000) /*  0.000549316 */,
-     PRESHIFT(0x0009a000) /*  0.002349854 */,
-     PRESHIFT(0x0000b000) /*  0.000167847 */ },
-
-  { -PRESHIFT(0x00002000) /* -0.000030518 */,	/* 10 */
-    -PRESHIFT(0x00044000) /* -0.001037598 */,
-     PRESHIFT(0x000d7000) /*  0.003280640 */,
-    -PRESHIFT(0x00471000) /* -0.017349243 */,
-     PRESHIFT(0x0046b000) /*  0.017257690 */,
-    -PRESHIFT(0x0212b000) /* -0.129562378 */,
-    -PRESHIFT(0x0084a000) /* -0.032379150 */,
-    -PRESHIFT(0x0d78a000) /* -0.841949463 */,
-     PRESHIFT(0x113be000) /*  1.077117920 */,
-     PRESHIFT(0x04c16000) /*  0.297210693 */,
-     PRESHIFT(0x02687000) /*  0.150497437 */,
-     PRESHIFT(0x0069c000) /*  0.025817871 */,
-     PRESHIFT(0x0077f000) /*  0.029281616 */,
-     PRESHIFT(0x00002000) /*  0.000030518 */,
-     PRESHIFT(0x00093000) /*  0.002243042 */,
-     PRESHIFT(0x0000a000) /*  0.000152588 */,
-
-    -PRESHIFT(0x00002000) /* -0.000030518 */,
-    -PRESHIFT(0x00044000) /* -0.001037598 */,
-     PRESHIFT(0x000d7000) /*  0.003280640 */,
-    -PRESHIFT(0x00471000) /* -0.017349243 */,
-     PRESHIFT(0x0046b000) /*  0.017257690 */,
-    -PRESHIFT(0x0212b000) /* -0.129562378 */,
-    -PRESHIFT(0x0084a000) /* -0.032379150 */,
-    -PRESHIFT(0x0d78a000) /* -0.841949463 */,
-     PRESHIFT(0x113be000) /*  1.077117920 */,
-     PRESHIFT(0x04c16000) /*  0.297210693 */,
-     PRESHIFT(0x02687000) /*  0.150497437 */,
-     PRESHIFT(0x0069c000) /*  0.025817871 */,
-     PRESHIFT(0x0077f000) /*  0.029281616 */,
-     PRESHIFT(0x00002000) /*  0.000030518 */,
-     PRESHIFT(0x00093000) /*  0.002243042 */,
-     PRESHIFT(0x0000a000) /*  0.000152588 */ },
-
-  { -PRESHIFT(0x00003000) /* -0.000045776 */,	/* 11 */
-    -PRESHIFT(0x00049000) /* -0.001113892 */,
-     PRESHIFT(0x000d0000) /*  0.003173828 */,
-    -PRESHIFT(0x004ba000) /* -0.018463135 */,
-     PRESHIFT(0x003ca000) /*  0.014801025 */,
-    -PRESHIFT(0x02233000) /* -0.133590698 */,
-    -PRESHIFT(0x00ce4000) /* -0.050354004 */,
-    -PRESHIFT(0x0ddca000) /* -0.866363525 */,
-     PRESHIFT(0x1102f000) /*  1.063217163 */,
-     PRESHIFT(0x04587000) /*  0.271591187 */,
-     PRESHIFT(0x026cf000) /*  0.151596069 */,
-     PRESHIFT(0x0056c000) /*  0.021179199 */,
-     PRESHIFT(0x0074e000) /*  0.028533936 */,
-    -PRESHIFT(0x0001d000) /* -0.000442505 */,
-     PRESHIFT(0x0008b000) /*  0.002120972 */,
-     PRESHIFT(0x00009000) /*  0.000137329 */,
-
-    -PRESHIFT(0x00003000) /* -0.000045776 */,
-    -PRESHIFT(0x00049000) /* -0.001113892 */,
-     PRESHIFT(0x000d0000) /*  0.003173828 */,
-    -PRESHIFT(0x004ba000) /* -0.018463135 */,
-     PRESHIFT(0x003ca000) /*  0.014801025 */,
-    -PRESHIFT(0x02233000) /* -0.133590698 */,
-    -PRESHIFT(0x00ce4000) /* -0.050354004 */,
-    -PRESHIFT(0x0ddca000) /* -0.866363525 */,
-     PRESHIFT(0x1102f000) /*  1.063217163 */,
-     PRESHIFT(0x04587000) /*  0.271591187 */,
-     PRESHIFT(0x026cf000) /*  0.151596069 */,
-     PRESHIFT(0x0056c000) /*  0.021179199 */,
-     PRESHIFT(0x0074e000) /*  0.028533936 */,
-    -PRESHIFT(0x0001d000) /* -0.000442505 */,
-     PRESHIFT(0x0008b000) /*  0.002120972 */,
-     PRESHIFT(0x00009000) /*  0.000137329 */ },
-
-  { -PRESHIFT(0x00003000) /* -0.000045776 */,	/* 12 */
-    -PRESHIFT(0x0004f000) /* -0.001205444 */,
-     PRESHIFT(0x000c8000) /*  0.003051758 */,
-    -PRESHIFT(0x00503000) /* -0.019577026 */,
-     PRESHIFT(0x0031a000) /*  0.012115479 */,
-    -PRESHIFT(0x02326000) /* -0.137298584 */,
-    -PRESHIFT(0x011b5000) /* -0.069168091 */,
-    -PRESHIFT(0x0e3dd000) /* -0.890090942 */,
-     PRESHIFT(0x10c54000) /*  1.048156738 */,
-     PRESHIFT(0x03f1b000) /*  0.246505737 */,
-     PRESHIFT(0x026ee000) /*  0.152069092 */,
-     PRESHIFT(0x00447000) /*  0.016708374 */,
-     PRESHIFT(0x00719000) /*  0.027725220 */,
-    -PRESHIFT(0x00039000) /* -0.000869751 */,
-     PRESHIFT(0x00084000) /*  0.002014160 */,
-     PRESHIFT(0x00008000) /*  0.000122070 */,
-
-    -PRESHIFT(0x00003000) /* -0.000045776 */,
-    -PRESHIFT(0x0004f000) /* -0.001205444 */,
-     PRESHIFT(0x000c8000) /*  0.003051758 */,
-    -PRESHIFT(0x00503000) /* -0.019577026 */,
-     PRESHIFT(0x0031a000) /*  0.012115479 */,
-    -PRESHIFT(0x02326000) /* -0.137298584 */,
-    -PRESHIFT(0x011b5000) /* -0.069168091 */,
-    -PRESHIFT(0x0e3dd000) /* -0.890090942 */,
-     PRESHIFT(0x10c54000) /*  1.048156738 */,
-     PRESHIFT(0x03f1b000) /*  0.246505737 */,
-     PRESHIFT(0x026ee000) /*  0.152069092 */,
-     PRESHIFT(0x00447000) /*  0.016708374 */,
-     PRESHIFT(0x00719000) /*  0.027725220 */,
-    -PRESHIFT(0x00039000) /* -0.000869751 */,
-     PRESHIFT(0x00084000) /*  0.002014160 */,
-     PRESHIFT(0x00008000) /*  0.000122070 */ },
-
-  { -PRESHIFT(0x00004000) /* -0.000061035 */,	/* 13 */
-    -PRESHIFT(0x00055000) /* -0.001296997 */,
-     PRESHIFT(0x000bd000) /*  0.002883911 */,
-    -PRESHIFT(0x0054c000) /* -0.020690918 */,
-     PRESHIFT(0x0025d000) /*  0.009231567 */,
-    -PRESHIFT(0x02403000) /* -0.140670776 */,
-    -PRESHIFT(0x016ba000) /* -0.088775635 */,
-    -PRESHIFT(0x0e9be000) /* -0.913055420 */,
-     PRESHIFT(0x1082d000) /*  1.031936646 */,
-     PRESHIFT(0x038d4000) /*  0.221984863 */,
-     PRESHIFT(0x026e7000) /*  0.151962280 */,
-     PRESHIFT(0x0032e000) /*  0.012420654 */,
-     PRESHIFT(0x006df000) /*  0.026840210 */,
-    -PRESHIFT(0x00053000) /* -0.001266479 */,
-     PRESHIFT(0x0007d000) /*  0.001907349 */,
-     PRESHIFT(0x00007000) /*  0.000106812 */,
-
-    -PRESHIFT(0x00004000) /* -0.000061035 */,
-    -PRESHIFT(0x00055000) /* -0.001296997 */,
-     PRESHIFT(0x000bd000) /*  0.002883911 */,
-    -PRESHIFT(0x0054c000) /* -0.020690918 */,
-     PRESHIFT(0x0025d000) /*  0.009231567 */,
-    -PRESHIFT(0x02403000) /* -0.140670776 */,
-    -PRESHIFT(0x016ba000) /* -0.088775635 */,
-    -PRESHIFT(0x0e9be000) /* -0.913055420 */,
-     PRESHIFT(0x1082d000) /*  1.031936646 */,
-     PRESHIFT(0x038d4000) /*  0.221984863 */,
-     PRESHIFT(0x026e7000) /*  0.151962280 */,
-     PRESHIFT(0x0032e000) /*  0.012420654 */,
-     PRESHIFT(0x006df000) /*  0.026840210 */,
-    -PRESHIFT(0x00053000) /* -0.001266479 */,
-     PRESHIFT(0x0007d000) /*  0.001907349 */,
-     PRESHIFT(0x00007000) /*  0.000106812 */ },
-
-  { -PRESHIFT(0x00004000) /* -0.000061035 */,	/* 14 */
-    -PRESHIFT(0x0005b000) /* -0.001388550 */,
-     PRESHIFT(0x000b1000) /*  0.002700806 */,
-    -PRESHIFT(0x00594000) /* -0.021789551 */,
-     PRESHIFT(0x00192000) /*  0.006134033 */,
-    -PRESHIFT(0x024c8000) /* -0.143676758 */,
-    -PRESHIFT(0x01bf2000) /* -0.109161377 */,
-    -PRESHIFT(0x0ef69000) /* -0.935195923 */,
-     PRESHIFT(0x103be000) /*  1.014617920 */,
-     PRESHIFT(0x032b4000) /*  0.198059082 */,
-     PRESHIFT(0x026bc000) /*  0.151306152 */,
-     PRESHIFT(0x00221000) /*  0.008316040 */,
-     PRESHIFT(0x006a2000) /*  0.025909424 */,
-    -PRESHIFT(0x0006a000) /* -0.001617432 */,
-     PRESHIFT(0x00075000) /*  0.001785278 */,
-     PRESHIFT(0x00007000) /*  0.000106812 */,
-
-    -PRESHIFT(0x00004000) /* -0.000061035 */,
-    -PRESHIFT(0x0005b000) /* -0.001388550 */,
-     PRESHIFT(0x000b1000) /*  0.002700806 */,
-    -PRESHIFT(0x00594000) /* -0.021789551 */,
-     PRESHIFT(0x00192000) /*  0.006134033 */,
-    -PRESHIFT(0x024c8000) /* -0.143676758 */,
-    -PRESHIFT(0x01bf2000) /* -0.109161377 */,
-    -PRESHIFT(0x0ef69000) /* -0.935195923 */,
-     PRESHIFT(0x103be000) /*  1.014617920 */,
-     PRESHIFT(0x032b4000) /*  0.198059082 */,
-     PRESHIFT(0x026bc000) /*  0.151306152 */,
-     PRESHIFT(0x00221000) /*  0.008316040 */,
-     PRESHIFT(0x006a2000) /*  0.025909424 */,
-    -PRESHIFT(0x0006a000) /* -0.001617432 */,
-     PRESHIFT(0x00075000) /*  0.001785278 */,
-     PRESHIFT(0x00007000) /*  0.000106812 */ },
-
-  { -PRESHIFT(0x00005000) /* -0.000076294 */,	/* 15 */
-    -PRESHIFT(0x00061000) /* -0.001480103 */,
-     PRESHIFT(0x000a3000) /*  0.002487183 */,
-    -PRESHIFT(0x005da000) /* -0.022857666 */,
-     PRESHIFT(0x000b9000) /*  0.002822876 */,
-    -PRESHIFT(0x02571000) /* -0.146255493 */,
-    -PRESHIFT(0x0215c000) /* -0.130310059 */,
-    -PRESHIFT(0x0f4dc000) /* -0.956481934 */,
-     PRESHIFT(0x0ff0a000) /*  0.996246338 */,
-     PRESHIFT(0x02cbf000) /*  0.174789429 */,
-     PRESHIFT(0x0266e000) /*  0.150115967 */,
-     PRESHIFT(0x00120000) /*  0.004394531 */,
-     PRESHIFT(0x00662000) /*  0.024932861 */,
-    -PRESHIFT(0x0007f000) /* -0.001937866 */,
-     PRESHIFT(0x0006f000) /*  0.001693726 */,
-     PRESHIFT(0x00006000) /*  0.000091553 */,
-
-    -PRESHIFT(0x00005000) /* -0.000076294 */,
-    -PRESHIFT(0x00061000) /* -0.001480103 */,
-     PRESHIFT(0x000a3000) /*  0.002487183 */,
-    -PRESHIFT(0x005da000) /* -0.022857666 */,
-     PRESHIFT(0x000b9000) /*  0.002822876 */,
-    -PRESHIFT(0x02571000) /* -0.146255493 */,
-    -PRESHIFT(0x0215c000) /* -0.130310059 */,
-    -PRESHIFT(0x0f4dc000) /* -0.956481934 */,
-     PRESHIFT(0x0ff0a000) /*  0.996246338 */,
-     PRESHIFT(0x02cbf000) /*  0.174789429 */,
-     PRESHIFT(0x0266e000) /*  0.150115967 */,
-     PRESHIFT(0x00120000) /*  0.004394531 */,
-     PRESHIFT(0x00662000) /*  0.024932861 */,
-    -PRESHIFT(0x0007f000) /* -0.001937866 */,
-     PRESHIFT(0x0006f000) /*  0.001693726 */,
-     PRESHIFT(0x00006000) /*  0.000091553 */ },
-
-  { -PRESHIFT(0x00005000) /* -0.000076294 */,	/* 16 */
-    -PRESHIFT(0x00068000) /* -0.001586914 */,
-     PRESHIFT(0x00092000) /*  0.002227783 */,
-    -PRESHIFT(0x0061f000) /* -0.023910522 */,
-    -PRESHIFT(0x0002d000) /* -0.000686646 */,
-    -PRESHIFT(0x025ff000) /* -0.148422241 */,
-    -PRESHIFT(0x026f7000) /* -0.152206421 */,
-    -PRESHIFT(0x0fa13000) /* -0.976852417 */,
-     PRESHIFT(0x0fa13000) /*  0.976852417 */,
-     PRESHIFT(0x026f7000) /*  0.152206421 */,
-     PRESHIFT(0x025ff000) /*  0.148422241 */,
-     PRESHIFT(0x0002d000) /*  0.000686646 */,
-     PRESHIFT(0x0061f000) /*  0.023910522 */,
-    -PRESHIFT(0x00092000) /* -0.002227783 */,
-     PRESHIFT(0x00068000) /*  0.001586914 */,
-     PRESHIFT(0x00005000) /*  0.000076294 */,
-
-    -PRESHIFT(0x00005000) /* -0.000076294 */,
-    -PRESHIFT(0x00068000) /* -0.001586914 */,
-     PRESHIFT(0x00092000) /*  0.002227783 */,
-    -PRESHIFT(0x0061f000) /* -0.023910522 */,
-    -PRESHIFT(0x0002d000) /* -0.000686646 */,
-    -PRESHIFT(0x025ff000) /* -0.148422241 */,
-    -PRESHIFT(0x026f7000) /* -0.152206421 */,
-    -PRESHIFT(0x0fa13000) /* -0.976852417 */,
-     PRESHIFT(0x0fa13000) /*  0.976852417 */,
-     PRESHIFT(0x026f7000) /*  0.152206421 */,
-     PRESHIFT(0x025ff000) /*  0.148422241 */,
-     PRESHIFT(0x0002d000) /*  0.000686646 */,
-     PRESHIFT(0x0061f000) /*  0.023910522 */,
-    -PRESHIFT(0x00092000) /* -0.002227783 */,
-     PRESHIFT(0x00068000) /*  0.001586914 */,
-     PRESHIFT(0x00005000) /*  0.000076294 */ }
--- a/sys/src/games/mp3dec/README
+++ /dev/null
@@ -1,1 +1,0 @@
-This is a copy of libmad-0.15.1b minimally ported to Plan 9.
--- a/sys/src/games/mp3dec/bit.c
+++ /dev/null
@@ -1,237 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: bit.c,v 1.12 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# ifdef HAVE_LIMITS_H
-#  include <limits.h>
-# else
-#  define CHAR_BIT  8
-# endif
-
-# include "bit.h"
-
-/*
- * This is the lookup table for computing the CRC-check word.
- * As described in section 2.4.3.1 and depicted in Figure A.9
- * of ISO/IEC 11172-3, the generator polynomial is:
- *
- * G(X) = X^16 + X^15 + X^2 + 1
- */
-static
-unsigned short const crc_table[256] = {
-  0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011,
-  0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022,
-  0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072,
-  0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041,
-  0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2,
-  0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1,
-  0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1,
-  0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082,
-
-  0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192,
-  0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1,
-  0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1,
-  0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2,
-  0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151,
-  0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162,
-  0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132,
-  0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101,
-
-  0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312,
-  0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321,
-  0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371,
-  0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342,
-  0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1,
-  0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2,
-  0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2,
-  0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381,
-
-  0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291,
-  0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2,
-  0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2,
-  0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1,
-  0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252,
-  0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261,
-  0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231,
-  0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202
-};
-
-# define CRC_POLY  0x8005
-
-/*
- * NAME:	bit->init()
- * DESCRIPTION:	initialize bit pointer struct
- */
-void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte)
-{
-  bitptr->byte  = byte;
-  bitptr->cache = 0;
-  bitptr->left  = CHAR_BIT;
-}
-
-/*
- * NAME:	bit->length()
- * DESCRIPTION:	return number of bits between start and end points
- */
-unsigned int mad_bit_length(struct mad_bitptr const *begin,
-			    struct mad_bitptr const *end)
-{
-  return begin->left +
-    CHAR_BIT * (end->byte - (begin->byte + 1)) + (CHAR_BIT - end->left);
-}
-
-/*
- * NAME:	bit->nextbyte()
- * DESCRIPTION:	return pointer to next unprocessed byte
- */
-unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr)
-{
-  return bitptr->left == CHAR_BIT ? bitptr->byte : bitptr->byte + 1;
-}
-
-/*
- * NAME:	bit->skip()
- * DESCRIPTION:	advance bit pointer
- */
-void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len)
-{
-  bitptr->byte += len / CHAR_BIT;
-  bitptr->left -= len % CHAR_BIT;
-
-  if (bitptr->left > CHAR_BIT) {
-    bitptr->byte++;
-    bitptr->left += CHAR_BIT;
-  }
-
-  if (bitptr->left < CHAR_BIT)
-    bitptr->cache = *bitptr->byte;
-}
-
-/*
- * NAME:	bit->read()
- * DESCRIPTION:	read an arbitrary number of bits and return their UIMSBF value
- */
-unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len)
-{
-  register unsigned long value;
-
-  if (bitptr->left == CHAR_BIT)
-    bitptr->cache = *bitptr->byte;
-
-  if (len < bitptr->left) {
-    value = (bitptr->cache & ((1 << bitptr->left) - 1)) >>
-      (bitptr->left - len);
-    bitptr->left -= len;
-
-    return value;
-  }
-
-  /* remaining bits in current byte */
-
-  value = bitptr->cache & ((1 << bitptr->left) - 1);
-  len  -= bitptr->left;
-
-  bitptr->byte++;
-  bitptr->left = CHAR_BIT;
-
-  /* more bytes */
-
-  while (len >= CHAR_BIT) {
-    value = (value << CHAR_BIT) | *bitptr->byte++;
-    len  -= CHAR_BIT;
-  }
-
-  if (len > 0) {
-    bitptr->cache = *bitptr->byte;
-
-    value = (value << len) | (bitptr->cache >> (CHAR_BIT - len));
-    bitptr->left -= len;
-  }
-
-  return value;
-}
-
-# if 0
-/*
- * NAME:	bit->write()
- * DESCRIPTION:	write an arbitrary number of bits
- */
-void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len,
-		   unsigned long value)
-{
-  unsigned char *ptr;
-
-  ptr = (unsigned char *) bitptr->byte;
-
-  /* ... */
-}
-# endif
-
-/*
- * NAME:	bit->crc()
- * DESCRIPTION:	compute CRC-check word
- */
-unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len,
-			   unsigned short init)
-{
-  register unsigned int crc;
-
-  for (crc = init; len >= 32; len -= 32) {
-    register unsigned long data;
-
-    data = mad_bit_read(&bitptr, 32);
-
-    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 24)) & 0xff];
-    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 16)) & 0xff];
-    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >>  8)) & 0xff];
-    crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >>  0)) & 0xff];
-  }
-
-  switch (len / 8) {
-  case 3: crc = (crc << 8) ^
-	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
-  case 2: crc = (crc << 8) ^
-	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
-  case 1: crc = (crc << 8) ^
-	    crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff];
-
-  len %= 8;
-
-  case 0: break;
-  }
-
-  while (len--) {
-    register unsigned int msb;
-
-    msb = mad_bit_read(&bitptr, 1) ^ (crc >> 15);
-
-    crc <<= 1;
-    if (msb & 1)
-      crc ^= CRC_POLY;
-  }
-
-  return crc & 0xffff;
-}
--- a/sys/src/games/mp3dec/bit.h
+++ /dev/null
@@ -1,47 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifndef LIBMAD_BIT_H
-# define LIBMAD_BIT_H
-
-struct mad_bitptr {
-  unsigned char const *byte;
-  unsigned short cache;
-  unsigned short left;
-};
-
-void mad_bit_init(struct mad_bitptr *, unsigned char const *);
-
-# define mad_bit_finish(bitptr)		/* nothing */
-
-unsigned int mad_bit_length(struct mad_bitptr const *,
-			    struct mad_bitptr const *);
-
-# define mad_bit_bitsleft(bitptr)  ((bitptr)->left)
-unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
-
-void mad_bit_skip(struct mad_bitptr *, unsigned int);
-unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
-void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
-
-unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
-
-# endif
--- a/sys/src/games/mp3dec/decoder.c
+++ /dev/null
@@ -1,580 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: decoder.c,v 1.22 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
-# endif
-
-# ifdef HAVE_SYS_WAIT_H
-#  include <sys/wait.h>
-# endif
-
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-# ifdef HAVE_FCNTL_H
-#  include <fcntl.h>
-# endif
-
-# ifdef HAVE_ERRNO_H
-#  include <errno.h>
-# endif
-
-# include "stream.h"
-# include "frame.h"
-# include "synth.h"
-# include "decoder.h"
-
-/*
- * NAME:	decoder->init()
- * DESCRIPTION:	initialize a decoder object with callback routines
- */
-void mad_decoder_init(struct mad_decoder *decoder, void *data,
-		      enum mad_flow (*input_func)(void *,
-						  struct mad_stream *),
-		      enum mad_flow (*header_func)(void *,
-						   struct mad_header const *),
-		      enum mad_flow (*filter_func)(void *,
-						   struct mad_stream const *,
-						   struct mad_frame *),
-		      enum mad_flow (*output_func)(void *,
-						   struct mad_header const *,
-						   struct mad_pcm *),
-		      enum mad_flow (*error_func)(void *,
-						  struct mad_stream *,
-						  struct mad_frame *),
-		      enum mad_flow (*message_func)(void *,
-						    void *, unsigned int *))
-{
-  decoder->mode         = -1;
-
-  decoder->options      = 0;
-
-  decoder->async.pid    = 0;
-  decoder->async.in     = -1;
-  decoder->async.out    = -1;
-
-  decoder->sync         = 0;
-
-  decoder->cb_data      = data;
-
-  decoder->input_func   = input_func;
-  decoder->header_func  = header_func;
-  decoder->filter_func  = filter_func;
-  decoder->output_func  = output_func;
-  decoder->error_func   = error_func;
-  decoder->message_func = message_func;
-}
-
-int mad_decoder_finish(struct mad_decoder *decoder)
-{
-# if defined(USE_ASYNC)
-  if (decoder->mode == MAD_DECODER_MODE_ASYNC && decoder->async.pid) {
-    pid_t pid;
-    int status;
-
-    close(decoder->async.in);
-
-    do
-      pid = waitpid(decoder->async.pid, &status, 0);
-    while (pid == -1 && errno == EINTR);
-
-    decoder->mode = -1;
-
-    close(decoder->async.out);
-
-    decoder->async.pid = 0;
-    decoder->async.in  = -1;
-    decoder->async.out = -1;
-
-    if (pid == -1)
-      return -1;
-
-    return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0;
-  }
-# endif
-
-  return 0;
-}
-
-# if defined(USE_ASYNC)
-static
-enum mad_flow send_io(int fd, void const *data, size_t len)
-{
-  char const *ptr = data;
-  ssize_t count;
-
-  while (len) {
-    do
-      count = write(fd, ptr, len);
-    while (count == -1 && errno == EINTR);
-
-    if (count == -1)
-      return MAD_FLOW_BREAK;
-
-    len -= count;
-    ptr += count;
-  }
-
-  return MAD_FLOW_CONTINUE;
-}
-
-static
-enum mad_flow receive_io(int fd, void *buffer, size_t len)
-{
-  char *ptr = buffer;
-  ssize_t count;
-
-  while (len) {
-    do
-      count = read(fd, ptr, len);
-    while (count == -1 && errno == EINTR);
-
-    if (count == -1)
-      return (errno == EAGAIN) ? MAD_FLOW_IGNORE : MAD_FLOW_BREAK;
-    else if (count == 0)
-      return MAD_FLOW_STOP;
-
-    len -= count;
-    ptr += count;
-  }
-
-  return MAD_FLOW_CONTINUE;
-}
-
-static
-enum mad_flow receive_io_blocking(int fd, void *buffer, size_t len)
-{
-  int flags, blocking;
-  enum mad_flow result;
-
-  flags = fcntl(fd, F_GETFL);
-  if (flags == -1)
-    return MAD_FLOW_BREAK;
-
-  blocking = flags & ~O_NONBLOCK;
-
-  if (blocking != flags &&
-      fcntl(fd, F_SETFL, blocking) == -1)
-    return MAD_FLOW_BREAK;
-
-  result = receive_io(fd, buffer, len);
-
-  if (flags != blocking &&
-      fcntl(fd, F_SETFL, flags) == -1)
-    return MAD_FLOW_BREAK;
-
-  return result;
-}
-
-static
-enum mad_flow send(int fd, void const *message, unsigned int size)
-{
-  enum mad_flow result;
-
-  /* send size */
-
-  result = send_io(fd, &size, sizeof(size));
-
-  /* send message */
-
-  if (result == MAD_FLOW_CONTINUE)
-    result = send_io(fd, message, size);
-
-  return result;
-}
-
-static
-enum mad_flow receive(int fd, void **message, unsigned int *size)
-{
-  enum mad_flow result;
-  unsigned int actual;
-
-  if (*message == 0)
-    *size = 0;
-
-  /* receive size */
-
-  result = receive_io(fd, &actual, sizeof(actual));
-
-  /* receive message */
-
-  if (result == MAD_FLOW_CONTINUE) {
-    if (actual > *size)
-      actual -= *size;
-    else {
-      *size  = actual;
-      actual = 0;
-    }
-
-    if (*size > 0) {
-      if (*message == 0) {
-	*message = malloc(*size);
-	if (*message == 0)
-	  return MAD_FLOW_BREAK;
-      }
-
-      result = receive_io_blocking(fd, *message, *size);
-    }
-
-    /* throw away remainder of message */
-
-    while (actual && result == MAD_FLOW_CONTINUE) {
-      char sink[256];
-      unsigned int len;
-
-      len = actual > sizeof(sink) ? sizeof(sink) : actual;
-
-      result = receive_io_blocking(fd, sink, len);
-
-      actual -= len;
-    }
-  }
-
-  return result;
-}
-
-static
-enum mad_flow check_message(struct mad_decoder *decoder)
-{
-  enum mad_flow result;
-  void *message = 0;
-  unsigned int size;
-
-  result = receive(decoder->async.in, &message, &size);
-
-  if (result == MAD_FLOW_CONTINUE) {
-    if (decoder->message_func == 0)
-      size = 0;
-    else {
-      result = decoder->message_func(decoder->cb_data, message, &size);
-
-      if (result == MAD_FLOW_IGNORE ||
-	  result == MAD_FLOW_BREAK)
-	size = 0;
-    }
-
-    if (send(decoder->async.out, message, size) != MAD_FLOW_CONTINUE)
-      result = MAD_FLOW_BREAK;
-  }
-
-  if (message)
-    free(message);
-
-  return result;
-}
-# endif
-
-static
-enum mad_flow error_default(void *data, struct mad_stream *stream,
-			    struct mad_frame *frame)
-{
-  int *bad_last_frame = data;
-
-  switch (stream->error) {
-  case MAD_ERROR_BADCRC:
-    if (*bad_last_frame)
-      mad_frame_mute(frame);
-    else
-      *bad_last_frame = 1;
-
-    return MAD_FLOW_IGNORE;
-
-  default:
-    return MAD_FLOW_CONTINUE;
-  }
-}
-
-static
-int run_sync(struct mad_decoder *decoder)
-{
-  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
-  void *error_data;
-  int bad_last_frame = 0;
-  struct mad_stream *stream;
-  struct mad_frame *frame;
-  struct mad_synth *synth;
-  int result = 0;
-
-  if (decoder->input_func == 0)
-    return 0;
-
-  if (decoder->error_func) {
-    error_func = decoder->error_func;
-    error_data = decoder->cb_data;
-  }
-  else {
-    error_func = error_default;
-    error_data = &bad_last_frame;
-  }
-
-  stream = &decoder->sync->stream;
-  frame  = &decoder->sync->frame;
-  synth  = &decoder->sync->synth;
-
-  mad_stream_init(stream);
-  mad_frame_init(frame);
-  mad_synth_init(synth);
-
-  mad_stream_options(stream, decoder->options);
-
-  do {
-    switch (decoder->input_func(decoder->cb_data, stream)) {
-    case MAD_FLOW_STOP:
-      goto done;
-    case MAD_FLOW_BREAK:
-      goto fail;
-    case MAD_FLOW_IGNORE:
-      continue;
-    case MAD_FLOW_CONTINUE:
-      break;
-    }
-
-    while (1) {
-# if defined(USE_ASYNC)
-      if (decoder->mode == MAD_DECODER_MODE_ASYNC) {
-	switch (check_message(decoder)) {
-	case MAD_FLOW_IGNORE:
-	case MAD_FLOW_CONTINUE:
-	  break;
-	case MAD_FLOW_BREAK:
-	  goto fail;
-	case MAD_FLOW_STOP:
-	  goto done;
-	}
-      }
-# endif
-
-      if (decoder->header_func) {
-	if (mad_header_decode(&frame->header, stream) == -1) {
-	  if (!MAD_RECOVERABLE(stream->error))
-	    break;
-
-	  switch (error_func(error_data, stream, frame)) {
-	  case MAD_FLOW_STOP:
-	    goto done;
-	  case MAD_FLOW_BREAK:
-	    goto fail;
-	  case MAD_FLOW_IGNORE:
-	  case MAD_FLOW_CONTINUE:
-	  default:
-	    continue;
-	  }
-	}
-
-	switch (decoder->header_func(decoder->cb_data, &frame->header)) {
-	case MAD_FLOW_STOP:
-	  goto done;
-	case MAD_FLOW_BREAK:
-	  goto fail;
-	case MAD_FLOW_IGNORE:
-	  continue;
-	case MAD_FLOW_CONTINUE:
-	  break;
-	}
-      }
-
-      if (mad_frame_decode(frame, stream) == -1) {
-	if (!MAD_RECOVERABLE(stream->error))
-	  break;
-
-	switch (error_func(error_data, stream, frame)) {
-	case MAD_FLOW_STOP:
-	  goto done;
-	case MAD_FLOW_BREAK:
-	  goto fail;
-	case MAD_FLOW_IGNORE:
-	  break;
-	case MAD_FLOW_CONTINUE:
-	default:
-	  continue;
-	}
-      }
-      else
-	bad_last_frame = 0;
-
-      if (decoder->filter_func) {
-	switch (decoder->filter_func(decoder->cb_data, stream, frame)) {
-	case MAD_FLOW_STOP:
-	  goto done;
-	case MAD_FLOW_BREAK:
-	  goto fail;
-	case MAD_FLOW_IGNORE:
-	  continue;
-	case MAD_FLOW_CONTINUE:
-	  break;
-	}
-      }
-
-      mad_synth_frame(synth, frame);
-
-      if (decoder->output_func) {
-	switch (decoder->output_func(decoder->cb_data,
-				     &frame->header, &synth->pcm)) {
-	case MAD_FLOW_STOP:
-	  goto done;
-	case MAD_FLOW_BREAK:
-	  goto fail;
-	case MAD_FLOW_IGNORE:
-	case MAD_FLOW_CONTINUE:
-	  break;
-	}
-      }
-    }
-  }
-  while (stream->error == MAD_ERROR_BUFLEN);
-
- fail:
-  result = -1;
-
- done:
-  mad_synth_finish(synth);
-  mad_frame_finish(frame);
-  mad_stream_finish(stream);
-
-  return result;
-}
-
-# if defined(USE_ASYNC)
-static
-int run_async(struct mad_decoder *decoder)
-{
-  pid_t pid;
-  int ptoc[2], ctop[2], flags;
-
-  if (pipe(ptoc) == -1)
-    return -1;
-
-  if (pipe(ctop) == -1) {
-    close(ptoc[0]);
-    close(ptoc[1]);
-    return -1;
-  }
-
-  flags = fcntl(ptoc[0], F_GETFL);
-  if (flags == -1 ||
-      fcntl(ptoc[0], F_SETFL, flags | O_NONBLOCK) == -1) {
-    close(ctop[0]);
-    close(ctop[1]);
-    close(ptoc[0]);
-    close(ptoc[1]);
-    return -1;
-  }
-
-  pid = fork();
-  if (pid == -1) {
-    close(ctop[0]);
-    close(ctop[1]);
-    close(ptoc[0]);
-    close(ptoc[1]);
-    return -1;
-  }
-
-  decoder->async.pid = pid;
-
-  if (pid) {
-    /* parent */
-
-    close(ptoc[0]);
-    close(ctop[1]);
-
-    decoder->async.in  = ctop[0];
-    decoder->async.out = ptoc[1];
-
-    return 0;
-  }
-
-  /* child */
-
-  close(ptoc[1]);
-  close(ctop[0]);
-
-  decoder->async.in  = ptoc[0];
-  decoder->async.out = ctop[1];
-
-  _exit(run_sync(decoder));
-
-  /* not reached */
-  return -1;
-}
-# endif
-
-/*
- * NAME:	decoder->run()
- * DESCRIPTION:	run the decoder thread either synchronously or asynchronously
- */
-int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode)
-{
-  int result;
-  int (*run)(struct mad_decoder *) = 0;
-
-  switch (decoder->mode = mode) {
-  case MAD_DECODER_MODE_SYNC:
-    run = run_sync;
-    break;
-
-  case MAD_DECODER_MODE_ASYNC:
-# if defined(USE_ASYNC)
-    run = run_async;
-# endif
-    break;
-  }
-
-  if (run == 0)
-    return -1;
-
-  decoder->sync = malloc(sizeof(*decoder->sync));
-  if (decoder->sync == 0)
-    return -1;
-
-  result = run(decoder);
-
-  free(decoder->sync);
-  decoder->sync = 0;
-
-  return result;
-}
-
-/*
- * NAME:	decoder->message()
- * DESCRIPTION:	send a message to and receive a reply from the decoder process
- */
-int mad_decoder_message(struct mad_decoder *decoder,
-			void *message, unsigned int *len)
-{
-# if defined(USE_ASYNC)
-  if (decoder->mode != MAD_DECODER_MODE_ASYNC ||
-      send(decoder->async.out, message, *len) != MAD_FLOW_CONTINUE ||
-      receive(decoder->async.in, &message, len) != MAD_FLOW_CONTINUE)
-    return -1;
-
-  return 0;
-# else
-  return -1;
-# endif
-}
--- a/sys/src/games/mp3dec/decoder.h
+++ /dev/null
@@ -1,91 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifndef LIBMAD_DECODER_H
-# define LIBMAD_DECODER_H
-
-# include "stream.h"
-# include "frame.h"
-# include "synth.h"
-
-enum mad_decoder_mode {
-  MAD_DECODER_MODE_SYNC  = 0,
-  MAD_DECODER_MODE_ASYNC
-};
-
-enum mad_flow {
-  MAD_FLOW_CONTINUE = 0x0000,	/* continue normally */
-  MAD_FLOW_STOP     = 0x0010,	/* stop decoding normally */
-  MAD_FLOW_BREAK    = 0x0011,	/* stop decoding and signal an error */
-  MAD_FLOW_IGNORE   = 0x0020	/* ignore the current frame */
-};
-
-struct mad_decoder {
-  enum mad_decoder_mode mode;
-
-  int options;
-
-  struct {
-    long pid;
-    int in;
-    int out;
-  } async;
-
-  struct {
-    struct mad_stream stream;
-    struct mad_frame frame;
-    struct mad_synth synth;
-  } *sync;
-
-  void *cb_data;
-
-  enum mad_flow (*input_func)(void *, struct mad_stream *);
-  enum mad_flow (*header_func)(void *, struct mad_header const *);
-  enum mad_flow (*filter_func)(void *,
-			       struct mad_stream const *, struct mad_frame *);
-  enum mad_flow (*output_func)(void *,
-			       struct mad_header const *, struct mad_pcm *);
-  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
-  enum mad_flow (*message_func)(void *, void *, unsigned int *);
-};
-
-void mad_decoder_init(struct mad_decoder *, void *,
-		      enum mad_flow (*)(void *, struct mad_stream *),
-		      enum mad_flow (*)(void *, struct mad_header const *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream const *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *,
-					struct mad_header const *,
-					struct mad_pcm *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *, void *, unsigned int *));
-int mad_decoder_finish(struct mad_decoder *);
-
-# define mad_decoder_options(decoder, opts)  \
-    ((void) ((decoder)->options = (opts)))
-
-int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode);
-int mad_decoder_message(struct mad_decoder *, void *, unsigned int *);
-
-# endif
--- a/sys/src/games/mp3dec/fixed.c
+++ /dev/null
@@ -1,81 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "fixed.h"
-
-/*
- * NAME:	fixed->abs()
- * DESCRIPTION:	return absolute value of a fixed-point number
- */
-mad_fixed_t mad_f_abs(mad_fixed_t x)
-{
-  return x < 0 ? -x : x;
-}
-
-/*
- * NAME:	fixed->div()
- * DESCRIPTION:	perform division using fixed-point math
- */
-mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y)
-{
-  mad_fixed_t q, r;
-  unsigned int bits;
-
-  q = mad_f_abs(x / y);
-
-  if (x < 0) {
-    x = -x;
-    y = -y;
-  }
-
-  r = x % y;
-
-  if (y < 0) {
-    x = -x;
-    y = -y;
-  }
-
-  if (q > mad_f_intpart(MAD_F_MAX) &&
-      !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0)))
-    return 0;
-
-  for (bits = MAD_F_FRACBITS; bits && r; --bits) {
-    q <<= 1, r <<= 1;
-    if (r >= y)
-      r -= y, ++q;
-  }
-
-  /* round */
-  if (2 * r >= y)
-    ++q;
-
-  /* fix sign */
-  if ((x < 0) != (y < 0))
-    q = -q;
-
-  return q << bits;
-}
--- a/sys/src/games/mp3dec/fixed.h
+++ /dev/null
@@ -1,472 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp $
- */
-
-# ifndef LIBMAD_FIXED_H
-# define LIBMAD_FIXED_H
-
-typedef int mad_fixed_t;	// must be 32 bits
-typedef int mad_fixed64hi_t;	// must be 32 bits
-typedef u32int mad_fixed64lo_t;	// must be 32 bits
-typedef vlong mad_fixed64_t;
-
-# if defined(FPM_FLOAT)
-typedef double mad_sample_t;
-# else
-typedef mad_fixed_t mad_sample_t;
-# endif
-
-/*
- * Fixed-point format: 0xABBBBBBB
- * A == whole part      (sign + 3 bits)
- * B == fractional part (28 bits)
- *
- * Values are signed two's complement, so the effective range is:
- * 0x80000000 to 0x7fffffff
- *       -8.0 to +7.9999999962747097015380859375
- *
- * The smallest representable value is:
- * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
- *
- * 28 bits of fractional accuracy represent about
- * 8.6 digits of decimal accuracy.
- *
- * Fixed-point numbers can be added or subtracted as normal
- * integers, but multiplication requires shifting the 64-bit result
- * from 56 fractional bits back to 28 (and rounding.)
- *
- * Changing the definition of MAD_F_FRACBITS is only partially
- * supported, and must be done with care.
- */
-
-# define MAD_F_FRACBITS		28
-
-#  define MAD_F(x)		((mad_fixed_t) (x))
-
-# define MAD_F_MIN		((mad_fixed_t) -0x80000000L)
-# define MAD_F_MAX		((mad_fixed_t) +0x7fffffffL)
-
-# define MAD_F_ONE		MAD_F(0x10000000)
-
-# define mad_f_tofixed(x)	((mad_fixed_t)  \
-				 ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5))
-# define mad_f_todouble(x)	((double)  \
-				 ((x) / (double) (1L << MAD_F_FRACBITS)))
-
-# define mad_f_intpart(x)	((x) >> MAD_F_FRACBITS)
-# define mad_f_fracpart(x)	((x) & ((1L << MAD_F_FRACBITS) - 1))
-				/* (x should be positive) */
-
-# define mad_f_fromint(x)	((x) << MAD_F_FRACBITS)
-
-# define mad_f_add(x, y)	((x) + (y))
-# define mad_f_sub(x, y)	((x) - (y))
-
-# if defined(FPM_FLOAT)
-#  error "FPM_FLOAT not yet supported"
-
-#  undef MAD_F
-#  define MAD_F(x)		mad_f_todouble(x)
-
-#  define mad_f_mul(x, y)	((x) * (y))
-#  define mad_f_scale64
-
-#  undef ASO_ZEROCHECK
-
-# elif defined(FPM_64BIT)
-
-/*
- * This version should be the most accurate if 64-bit types are supported by
- * the compiler, although it may not be the most efficient.
- */
-#  if defined(OPT_ACCURACY)
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t)  \
-     ((((mad_fixed64_t) (x) * (y)) +  \
-       (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS))
-#  else
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS))
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Intel --------------------------------------------------------------- */
-
-# elif defined(FPM_INTEL)
-
-#  if defined(_MSC_VER)
-#   pragma warning(push)
-#   pragma warning(disable: 4035)  /* no return value */
-static __forceinline
-mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
-{
-  enum {
-    fracbits = MAD_F_FRACBITS
-  };
-
-  __asm {
-    mov eax, x
-    imul y
-    shrd eax, edx, fracbits
-  }
-
-  /* implicit return of eax */
-}
-#   pragma warning(pop)
-
-#   define mad_f_mul		mad_f_mul_inline
-#   define mad_f_scale64
-#  else
-/*
- * This Intel version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#   define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("imull %3"  \
-	 : "=a" (lo), "=d" (hi)  \
-	 : "%a" (x), "rm" (y)  \
-	 : "cc")
-
-#   if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#    define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addl %2,%0\n\t"  \
-	    "adcl %3,%1"  \
-	    : "=rm" (lo), "=rm" (hi)  \
-	    : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi)  \
-	    : "cc");  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   if defined(OPT_ACCURACY)
-/*
- * Surprisingly, this is faster than SHRD followed by ADC.
- */
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed64hi_t __hi_;  \
-       mad_fixed64lo_t __lo_;  \
-       mad_fixed_t __result;  \
-       asm ("addl %4,%2\n\t"  \
-	    "adcl %5,%3"  \
-	    : "=rm" (__lo_), "=rm" (__hi_)  \
-	    : "0" (lo), "1" (hi),  \
-	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
-	    : "cc");  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   elif defined(OPT_INTEL)
-/*
- * Alternate Intel scaling that may or may not perform better.
- */
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("shrl %3,%1\n\t"  \
-	    "shll %4,%2\n\t"  \
-	    "orl %2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi),  \
-	      "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   else
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   define MAD_F_SCALEBITS  MAD_F_FRACBITS
-#  endif
-
-/* --- ARM ----------------------------------------------------------------- */
-
-# elif defined(FPM_ARM)
-
-/* 
- * This ARM V4 version is as accurate as FPM_64BIT but much faster. The
- * least significant bit is properly rounded at no CPU cycle cost!
- */
-# if 1
-/*
- * This is faster than the default implementation via MAD_F_MLX() and
- * mad_f_scale64().
- */
-#  define mad_f_mul(x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       mad_fixed_t __result;  \
-       asm ("smull	%0, %1, %3, %4\n\t"  \
-	    "movs	%0, %0, lsr %5\n\t"  \
-	    "adc	%2, %0, %1, lsl %6"  \
-	    : "=&r" (__lo), "=&r" (__hi), "=r" (__result)  \
-	    : "%r" (x), "r" (y),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-# endif
-
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smull	%0, %1, %2, %3"  \
-	 : "=&r" (lo), "=&r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("smlal	%0, %1, %2, %3"  \
-	 : "+r" (lo), "+r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLN(hi, lo)  \
-    asm ("rsbs	%0, %2, #0\n\t"  \
-	 "rsc	%1, %3, #0"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "0" (lo), "1" (hi)  \
-	 : "cc")
-
-#  define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("movs	%0, %1, lsr %3\n\t"  \
-	    "adc	%0, %0, %2, lsl %4"  \
-	    : "=&r" (__result)  \
-	    : "r" (lo), "r" (hi),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- MIPS ---------------------------------------------------------------- */
-
-# elif defined(FPM_MIPS)
-
-/*
- * This MIPS version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" (x), "r" (y))
-
-# if defined(HAVE_MADD_ASM)
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" (x), "r" (y))
-# elif defined(HAVE_MADD16_ASM)
-/*
- * This loses significant accuracy due to the 16-bit integer limit in the
- * multiply/accumulate instruction.
- */
-#  define MAD_F_ML0(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd16	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
-# endif
-
-# if defined(OPT_SPEED)
-#  define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS)))
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* --- SPARC --------------------------------------------------------------- */
-
-# elif defined(FPM_SPARC)
-
-/*
- * This SPARC V8 version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smul %2, %3, %0\n\t"  \
-	 "rd %%y, %1"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "%r" (x), "rI" (y))
-
-/* --- PowerPC ------------------------------------------------------------- */
-
-# elif defined(FPM_PPC)
-
-/*
- * This PowerPC version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    do {  \
-      asm ("mullw %0,%1,%2"  \
-	   : "=r" (lo)  \
-	   : "%r" (x), "r" (y));  \
-      asm ("mulhw %0,%1,%2"  \
-	   : "=r" (hi)  \
-	   : "%r" (x), "r" (y));  \
-    }  \
-    while (0)
-
-#  if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#   define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addc %0,%2,%3\n\t"  \
-	    "adde %1,%4,%5"  \
-	    : "=r" (lo), "=r" (hi)  \
-	    : "%r" (lo), "r" (__lo),  \
-	      "%r" (hi), "r" (__hi)  \
-	    : "xer");  \
-    })
-#  endif
-
-#  if defined(OPT_ACCURACY)
-/*
- * This is slower than the truncating version below it.
- */
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result, __round;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("extrwi %0,%1,1,0"  \
-	    : "=r" (__round)  \
-	    : "r" (__result));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       asm ("add %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "%r" (__result), "r" (__round));  \
-       __result;  \
-    })
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       __result;  \
-    })
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Default ------------------------------------------------------------- */
-
-# elif defined(FPM_DEFAULT)
-
-/*
- * This version is the most portable but it loses significant accuracy.
- * Furthermore, accuracy is biased against the second argument, so care
- * should be taken when ordering operands.
- *
- * The scale factors are constant as this is not used with SSO.
- *
- * Pre-rounding is required to stay within the limits of compliance.
- */
-#  if defined(OPT_SPEED)
-#   define mad_f_mul(x, y)	(((x) >> 12) * ((y) >> 16))
-#  else
-#   define mad_f_mul(x, y)	((((x) + (1L << 11)) >> 12) *  \
-				 (((y) + (1L << 15)) >> 16))
-#  endif
-
-/* ------------------------------------------------------------------------- */
-
-# else
-#  error "no FPM selected"
-# endif
-
-/* default implementations */
-
-# if !defined(mad_f_mul)
-#  define mad_f_mul(x, y)  \
-    ({ register mad_fixed64hi_t __hi;  \
-       register mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       mad_f_scale64(__hi, __lo);  \
-    })
-# endif
-
-# if !defined(MAD_F_MLA)
-#  define MAD_F_ML0(hi, lo, x, y)	((lo)  = mad_f_mul((x), (y)))
-#  define MAD_F_MLA(hi, lo, x, y)	((lo) += mad_f_mul((x), (y)))
-#  define MAD_F_MLN(hi, lo)		((lo)  = -(lo))
-#  define MAD_F_MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
-# endif
-
-# if !defined(MAD_F_ML0)
-#  define MAD_F_ML0(hi, lo, x, y)	MAD_F_MLX((hi), (lo), (x), (y))
-# endif
-
-# if !defined(MAD_F_MLN)
-#  define MAD_F_MLN(hi, lo)		((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi))
-# endif
-
-# if !defined(MAD_F_MLZ)
-#  define MAD_F_MLZ(hi, lo)		mad_f_scale64((hi), (lo))
-# endif
-
-# if !defined(mad_f_scale64)
-#  if defined(OPT_ACCURACY)
-#   define mad_f_scale64(hi, lo)  \
-    ((((mad_fixed_t)  \
-       (((hi) << (32 - (MAD_F_SCALEBITS - 1))) |  \
-	((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1)
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t)  \
-     (((hi) << (32 - MAD_F_SCALEBITS)) |  \
-      ((lo) >> MAD_F_SCALEBITS)))
-#  endif
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* C routines */
-
-mad_fixed_t mad_f_abs(mad_fixed_t);
-mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t);
-
-# endif
--- a/sys/src/games/mp3dec/frame.c
+++ /dev/null
@@ -1,494 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "bit.h"
-# include "stream.h"
-# include "frame.h"
-# include "layer12.h"
-# include "layer3.h"
-
-static
-unsigned long const bitrate_table[5][15] = {
-  /* MPEG-1 */
-  { 0,  32000,  64000,  96000, 128000, 160000, 192000, 224000,  /* Layer I   */
-       256000, 288000, 320000, 352000, 384000, 416000, 448000 },
-  { 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  /* Layer II  */
-       128000, 160000, 192000, 224000, 256000, 320000, 384000 },
-  { 0,  32000,  40000,  48000,  56000,  64000,  80000,  96000,  /* Layer III */
-       112000, 128000, 160000, 192000, 224000, 256000, 320000 },
-
-  /* MPEG-2 LSF */
-  { 0,  32000,  48000,  56000,  64000,  80000,  96000, 112000,  /* Layer I   */
-       128000, 144000, 160000, 176000, 192000, 224000, 256000 },
-  { 0,   8000,  16000,  24000,  32000,  40000,  48000,  56000,  /* Layers    */
-        64000,  80000,  96000, 112000, 128000, 144000, 160000 } /* II & III  */
-};
-
-static
-unsigned int const samplerate_table[3] = { 44100, 48000, 32000 };
-
-static
-int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = {
-  mad_layer_I,
-  mad_layer_II,
-  mad_layer_III
-};
-
-/*
- * NAME:	header->init()
- * DESCRIPTION:	initialize header struct
- */
-void mad_header_init(struct mad_header *header)
-{
-  header->layer          = 0;
-  header->mode           = 0;
-  header->mode_extension = 0;
-  header->emphasis       = 0;
-
-  header->bitrate        = 0;
-  header->samplerate     = 0;
-
-  header->crc_check      = 0;
-  header->crc_target     = 0;
-
-  header->flags          = 0;
-  header->private_bits   = 0;
-}
-
-/*
- * NAME:	frame->init()
- * DESCRIPTION:	initialize frame struct
- */
-void mad_frame_init(struct mad_frame *frame)
-{
-  mad_header_init(&frame->header);
-
-  frame->options = 0;
-
-  frame->overlap = 0;
-  mad_frame_mute(frame);
-}
-
-/*
- * NAME:	frame->finish()
- * DESCRIPTION:	deallocate any dynamic memory associated with frame
- */
-void mad_frame_finish(struct mad_frame *frame)
-{
-  mad_header_finish(&frame->header);
-
-  if (frame->overlap) {
-    free(frame->overlap);
-    frame->overlap = 0;
-  }
-}
-
-/*
- * NAME:	decode_header()
- * DESCRIPTION:	read header data and following CRC word
- */
-static
-int decode_header(struct mad_header *header, struct mad_stream *stream)
-{
-  unsigned int index;
-
-  header->flags        = 0;
-  header->private_bits = 0;
-
-  /* header() */
-
-  /* syncword */
-  mad_bit_skip(&stream->ptr, 11);
-
-  /* MPEG 2.5 indicator (really part of syncword) */
-  if (mad_bit_read(&stream->ptr, 1) == 0)
-    header->flags |= MAD_FLAG_MPEG_2_5_EXT;
-
-  /* ID */
-  if (mad_bit_read(&stream->ptr, 1) == 0)
-    header->flags |= MAD_FLAG_LSF_EXT;
-  else if (header->flags & MAD_FLAG_MPEG_2_5_EXT) {
-    stream->error = MAD_ERROR_LOSTSYNC;
-    return -1;
-  }
-
-  /* layer */
-  header->layer = 4 - mad_bit_read(&stream->ptr, 2);
-
-  if (header->layer == 4) {
-    stream->error = MAD_ERROR_BADLAYER;
-    return -1;
-  }
-
-  /* protection_bit */
-  if (mad_bit_read(&stream->ptr, 1) == 0) {
-    header->flags    |= MAD_FLAG_PROTECTION;
-    header->crc_check = mad_bit_crc(stream->ptr, 16, 0xffff);
-  }
-
-  /* bitrate_index */
-  index = mad_bit_read(&stream->ptr, 4);
-
-  if (index == 15) {
-    stream->error = MAD_ERROR_BADBITRATE;
-    return -1;
-  }
-
-  if (header->flags & MAD_FLAG_LSF_EXT)
-    header->bitrate = bitrate_table[3 + (header->layer >> 1)][index];
-  else
-    header->bitrate = bitrate_table[header->layer - 1][index];
-
-  /* sampling_frequency */
-  index = mad_bit_read(&stream->ptr, 2);
-
-  if (index == 3) {
-    stream->error = MAD_ERROR_BADSAMPLERATE;
-    return -1;
-  }
-
-  header->samplerate = samplerate_table[index];
-
-  if (header->flags & MAD_FLAG_LSF_EXT) {
-    header->samplerate /= 2;
-
-    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
-      header->samplerate /= 2;
-  }
-
-  /* padding_bit */
-  if (mad_bit_read(&stream->ptr, 1))
-    header->flags |= MAD_FLAG_PADDING;
-
-  /* private_bit */
-  if (mad_bit_read(&stream->ptr, 1))
-    header->private_bits |= MAD_PRIVATE_HEADER;
-
-  /* mode */
-  header->mode = 3 - mad_bit_read(&stream->ptr, 2);
-
-  /* mode_extension */
-  header->mode_extension = mad_bit_read(&stream->ptr, 2);
-
-  /* copyright */
-  if (mad_bit_read(&stream->ptr, 1))
-    header->flags |= MAD_FLAG_COPYRIGHT;
-
-  /* original/copy */
-  if (mad_bit_read(&stream->ptr, 1))
-    header->flags |= MAD_FLAG_ORIGINAL;
-
-  /* emphasis */
-  header->emphasis = mad_bit_read(&stream->ptr, 2);
-
-# if defined(OPT_STRICT)
-  /*
-   * ISO/IEC 11172-3 says this is a reserved emphasis value, but
-   * streams exist which use it anyway. Since the value is not important
-   * to the decoder proper, we allow it unless OPT_STRICT is defined.
-   */
-  if (header->emphasis == MAD_EMPHASIS_RESERVED) {
-    stream->error = MAD_ERROR_BADEMPHASIS;
-    return -1;
-  }
-# endif
-
-  /* error_check() */
-
-  /* crc_check */
-  if (header->flags & MAD_FLAG_PROTECTION)
-    header->crc_target = mad_bit_read(&stream->ptr, 16);
-
-  return 0;
-}
-
-/*
- * NAME:	free_bitrate()
- * DESCRIPTION:	attempt to discover the bitstream's free bitrate
- */
-static
-int free_bitrate(struct mad_stream *stream, struct mad_header const *header)
-{
-  struct mad_bitptr keep_ptr;
-  unsigned long rate = 0;
-  unsigned int pad_slot, slots_per_frame;
-  unsigned char const *ptr = 0;
-
-  keep_ptr = stream->ptr;
-
-  pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
-  slots_per_frame = (header->layer == MAD_LAYER_III &&
-		     (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
-
-  while (mad_stream_sync(stream) == 0) {
-    struct mad_stream peek_stream;
-    struct mad_header peek_header;
-
-    peek_stream = *stream;
-    peek_header = *header;
-
-    if (decode_header(&peek_header, &peek_stream) == 0 &&
-	peek_header.layer == header->layer &&
-	peek_header.samplerate == header->samplerate) {
-      unsigned int N;
-
-      ptr = mad_bit_nextbyte(&stream->ptr);
-
-      N = ptr - stream->this_frame;
-
-      if (header->layer == MAD_LAYER_I) {
-	rate = (unsigned long) header->samplerate *
-	  (N - 4 * pad_slot + 4) / 48 / 1000;
-      }
-      else {
-	rate = (unsigned long) header->samplerate *
-	  (N - pad_slot + 1) / slots_per_frame / 1000;
-      }
-
-      if (rate >= 8)
-	break;
-    }
-
-    mad_bit_skip(&stream->ptr, 8);
-  }
-
-  stream->ptr = keep_ptr;
-
-  if (rate < 8 || (header->layer == MAD_LAYER_III && rate > 640)) {
-    stream->error = MAD_ERROR_LOSTSYNC;
-    return -1;
-  }
-
-  stream->freerate = rate * 1000;
-
-  return 0;
-}
-
-/*
- * NAME:	header->decode()
- * DESCRIPTION:	read the next frame header from the stream
- */
-int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
-{
-  register unsigned char const *ptr, *end;
-  unsigned int pad_slot, N;
-
-  ptr = stream->next_frame;
-  end = stream->bufend;
-
-  if (ptr == 0) {
-    stream->error = MAD_ERROR_BUFPTR;
-    goto fail;
-  }
-
-  /* stream skip */
-  if (stream->skiplen) {
-    if (!stream->sync)
-      ptr = stream->this_frame;
-
-    if (end - ptr < stream->skiplen) {
-      stream->skiplen   -= end - ptr;
-      stream->next_frame = end;
-
-      stream->error = MAD_ERROR_BUFLEN;
-      goto fail;
-    }
-
-    ptr += stream->skiplen;
-    stream->skiplen = 0;
-
-    stream->sync = 1;
-  }
-
- sync:
-  /* synchronize */
-  if (stream->sync) {
-    if (end - ptr < MAD_BUFFER_GUARD) {
-      stream->next_frame = ptr;
-
-      stream->error = MAD_ERROR_BUFLEN;
-      goto fail;
-    }
-    else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
-      /* mark point where frame sync word was expected */
-      stream->this_frame = ptr;
-      stream->next_frame = ptr + 1;
-
-      stream->error = MAD_ERROR_LOSTSYNC;
-      goto fail;
-    }
-  }
-  else {
-    mad_bit_init(&stream->ptr, ptr);
-
-    if (mad_stream_sync(stream) == -1) {
-      if (end - stream->next_frame >= MAD_BUFFER_GUARD)
-	stream->next_frame = end - MAD_BUFFER_GUARD;
-
-      stream->error = MAD_ERROR_BUFLEN;
-      goto fail;
-    }
-
-    ptr = mad_bit_nextbyte(&stream->ptr);
-  }
-
-  /* begin processing */
-  stream->this_frame = ptr;
-  stream->next_frame = ptr + 1;  /* possibly bogus sync word */
-
-  mad_bit_init(&stream->ptr, stream->this_frame);
-
-  if (decode_header(header, stream) == -1)
-    goto fail;
-
-  /* calculate free bit rate */
-  if (header->bitrate == 0) {
-    if ((stream->freerate == 0 || !stream->sync ||
-	 (header->layer == MAD_LAYER_III && stream->freerate > 640000)) &&
-	free_bitrate(stream, header) == -1)
-      goto fail;
-
-    header->bitrate = stream->freerate;
-    header->flags  |= MAD_FLAG_FREEFORMAT;
-  }
-
-  /* calculate beginning of next frame */
-  pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
-
-  if (header->layer == MAD_LAYER_I)
-    N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4;
-  else {
-    unsigned int slots_per_frame;
-
-    slots_per_frame = (header->layer == MAD_LAYER_III &&
-		       (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
-
-    N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot;
-  }
-
-  /* verify there is enough data left in buffer to decode this frame */
-  if (N + MAD_BUFFER_GUARD > end - stream->this_frame) {
-    stream->next_frame = stream->this_frame;
-
-    stream->error = MAD_ERROR_BUFLEN;
-    goto fail;
-  }
-
-  stream->next_frame = stream->this_frame + N;
-
-  if (!stream->sync) {
-    /* check that a valid frame header follows this frame */
-
-    ptr = stream->next_frame;
-    if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
-      ptr = stream->next_frame = stream->this_frame + 1;
-      goto sync;
-    }
-
-    stream->sync = 1;
-  }
-
-  header->flags |= MAD_FLAG_INCOMPLETE;
-
-  return 0;
-
- fail:
-  stream->sync = 0;
-
-  return -1;
-}
-
-/*
- * NAME:	frame->decode()
- * DESCRIPTION:	decode a single frame from a bitstream
- */
-int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream)
-{
-  frame->options = stream->options;
-
-  /* header() */
-  /* error_check() */
-
-  if (!(frame->header.flags & MAD_FLAG_INCOMPLETE) &&
-      mad_header_decode(&frame->header, stream) == -1)
-    goto fail;
-
-  /* audio_data() */
-
-  frame->header.flags &= ~MAD_FLAG_INCOMPLETE;
-
-  if (decoder_table[frame->header.layer - 1](stream, frame) == -1) {
-    if (!MAD_RECOVERABLE(stream->error))
-      stream->next_frame = stream->this_frame;
-
-    goto fail;
-  }
-
-  /* ancillary_data() */
-
-  if (frame->header.layer != MAD_LAYER_III) {
-    struct mad_bitptr next_frame;
-
-    mad_bit_init(&next_frame, stream->next_frame);
-
-    stream->anc_ptr    = stream->ptr;
-    stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame);
-
-    mad_bit_finish(&next_frame);
-  }
-
-  return 0;
-
- fail:
-  stream->anc_bitlen = 0;
-  return -1;
-}
-
-/*
- * NAME:	frame->mute()
- * DESCRIPTION:	zero all subband values so the frame becomes silent
- */
-void mad_frame_mute(struct mad_frame *frame)
-{
-  unsigned int s, sb;
-
-  for (s = 0; s < 36; ++s) {
-    for (sb = 0; sb < 32; ++sb) {
-      frame->sbsample[0][s][sb] =
-      frame->sbsample[1][s][sb] = 0;
-    }
-  }
-
-  if (frame->overlap) {
-    for (s = 0; s < 18; ++s) {
-      for (sb = 0; sb < 32; ++sb) {
-	(*frame->overlap)[0][sb][s] =
-	(*frame->overlap)[1][sb][s] = 0;
-      }
-    }
-  }
-}
--- a/sys/src/games/mp3dec/frame.h
+++ /dev/null
@@ -1,115 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifndef LIBMAD_FRAME_H
-# define LIBMAD_FRAME_H
-
-# include "fixed.h"
-# include "stream.h"
-
-enum mad_layer {
-  MAD_LAYER_I   = 1,			/* Layer I */
-  MAD_LAYER_II  = 2,			/* Layer II */
-  MAD_LAYER_III = 3			/* Layer III */
-};
-
-enum mad_mode {
-  MAD_MODE_SINGLE_CHANNEL = 0,		/* single channel */
-  MAD_MODE_DUAL_CHANNEL	  = 1,		/* dual channel */
-  MAD_MODE_JOINT_STEREO	  = 2,		/* joint (MS/intensity) stereo */
-  MAD_MODE_STEREO	  = 3		/* normal LR stereo */
-};
-
-enum mad_emphasis {
-  MAD_EMPHASIS_NONE	  = 0,		/* no emphasis */
-  MAD_EMPHASIS_50_15_US	  = 1,		/* 50/15 microseconds emphasis */
-  MAD_EMPHASIS_CCITT_J_17 = 3,		/* CCITT J.17 emphasis */
-  MAD_EMPHASIS_RESERVED   = 2		/* unknown emphasis */
-};
-
-struct mad_header {
-  enum mad_layer layer;			/* audio layer (1, 2, or 3) */
-  enum mad_mode mode;			/* channel mode (see above) */
-  int mode_extension;			/* additional mode info */
-  enum mad_emphasis emphasis;		/* de-emphasis to use (see above) */
-
-  unsigned long bitrate;		/* stream bitrate (bps) */
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-
-  unsigned short crc_check;		/* frame CRC accumulator */
-  unsigned short crc_target;		/* final target CRC checksum */
-
-  int flags;				/* flags (see below) */
-  int private_bits;			/* private bits (see below) */
-};
-
-struct mad_frame {
-  struct mad_header header;		/* MPEG audio header */
-
-  int options;				/* decoding options (from stream) */
-
-  mad_fixed_t sbsample[2][36][32];	/* synthesis subband filter samples */
-  mad_fixed_t (*overlap)[2][32][18];	/* Layer III block overlap data */
-};
-
-# define MAD_NCHANNELS(header)		((header)->mode ? 2 : 1)
-# define MAD_NSBSAMPLES(header)  \
-  ((header)->layer == MAD_LAYER_I ? 12 :  \
-   (((header)->layer == MAD_LAYER_III &&  \
-     ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
-
-enum {
-  MAD_FLAG_NPRIVATE_III	= 0x0007,	/* number of Layer III private bits */
-  MAD_FLAG_INCOMPLETE	= 0x0008,	/* header but not data is decoded */
-
-  MAD_FLAG_PROTECTION	= 0x0010,	/* frame has CRC protection */
-  MAD_FLAG_COPYRIGHT	= 0x0020,	/* frame is copyright */
-  MAD_FLAG_ORIGINAL	= 0x0040,	/* frame is original (else copy) */
-  MAD_FLAG_PADDING	= 0x0080,	/* frame has additional slot */
-
-  MAD_FLAG_I_STEREO	= 0x0100,	/* uses intensity joint stereo */
-  MAD_FLAG_MS_STEREO	= 0x0200,	/* uses middle/side joint stereo */
-  MAD_FLAG_FREEFORMAT	= 0x0400,	/* uses free format bitrate */
-
-  MAD_FLAG_LSF_EXT	= 0x1000,	/* lower sampling freq. extension */
-  MAD_FLAG_MC_EXT	= 0x2000,	/* multichannel audio extension */
-  MAD_FLAG_MPEG_2_5_EXT	= 0x4000	/* MPEG 2.5 (unofficial) extension */
-};
-
-enum {
-  MAD_PRIVATE_HEADER	= 0x0100,	/* header private bit */
-  MAD_PRIVATE_III	= 0x001f	/* Layer III private bits (up to 5) */
-};
-
-void mad_header_init(struct mad_header *);
-
-# define mad_header_finish(header)  /* nothing */
-
-int mad_header_decode(struct mad_header *, struct mad_stream *);
-
-void mad_frame_init(struct mad_frame *);
-void mad_frame_finish(struct mad_frame *);
-
-int mad_frame_decode(struct mad_frame *, struct mad_stream *);
-
-void mad_frame_mute(struct mad_frame *);
-
-# endif
--- a/sys/src/games/mp3dec/global.h
+++ /dev/null
@@ -1,33 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $
- */
-
-#include <u.h>
-#include <libc.h>
-
-/* conditional features */
-
-# if defined(OPT_SPEED) && defined(OPT_ACCURACY)
-#  error "cannot optimize for both speed and accuracy"
-# endif
-
-# if defined(OPT_SPEED) && !defined(OPT_SSO)
-#  define OPT_SSO
-# endif
--- a/sys/src/games/mp3dec/huffman.c
+++ /dev/null
@@ -1,3087 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "huffman.h"
-
-/*
- * These are the Huffman code words for Layer III.
- * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
- *
- * These tables support decoding up to 4 Huffman code bits at a time.
- */
-
-#define PTR(OFFS, BITS) { .ptr = { .bits=BITS, .offset=OFFS } }
-#define V(V, W, X, Y, HLEN) { .final = 1, .value = { .v=V, .w=W, .x=X, .y=Y, .hlen=HLEN } }
-
-static
-struct huffquad const hufftabA[] = {
-  /* 0000 */ PTR(16, 2),
-  /* 0001 */ PTR(20, 2),
-  /* 0010 */ PTR(24, 1),
-  /* 0011 */ PTR(26, 1),
-  /* 0100 */ V(0, 0, 1, 0, 4),
-  /* 0101 */ V(0, 0, 0, 1, 4),
-  /* 0110 */ V(0, 1, 0, 0, 4),
-  /* 0111 */ V(1, 0, 0, 0, 4),
-  /* 1000 */ V(0, 0, 0, 0, 1),
-  /* 1001 */ V(0, 0, 0, 0, 1),
-  /* 1010 */ V(0, 0, 0, 0, 1),
-  /* 1011 */ V(0, 0, 0, 0, 1),
-  /* 1100 */ V(0, 0, 0, 0, 1),
-  /* 1101 */ V(0, 0, 0, 0, 1),
-  /* 1110 */ V(0, 0, 0, 0, 1),
-  /* 1111 */ V(0, 0, 0, 0, 1),
-
-  /* 0000 ... */
-  /* 00   */ V(1, 0, 1, 1, 2),	/* 16 */
-  /* 01   */ V(1, 1, 1, 1, 2),
-  /* 10   */ V(1, 1, 0, 1, 2),
-  /* 11   */ V(1, 1, 1, 0, 2),
-
-  /* 0001 ... */
-  /* 00   */ V(0, 1, 1, 1, 2),	/* 20 */
-  /* 01   */ V(0, 1, 0, 1, 2),
-  /* 10   */ V(1, 0, 0, 1, 1),
-  /* 11   */ V(1, 0, 0, 1, 1),
-
-  /* 0010 ... */
-  /* 0    */ V(0, 1, 1, 0, 1),	/* 24 */
-  /* 1    */ V(0, 0, 1, 1, 1),
-
-  /* 0011 ... */
-  /* 0    */ V(1, 0, 1, 0, 1),	/* 26 */
-  /* 1    */ V(1, 1, 0, 0, 1)
-};
-
-static
-struct huffquad const hufftabB[] = {
-  /* 0000 */ V(1, 1, 1, 1, 4),
-  /* 0001 */ V(1, 1, 1, 0, 4),
-  /* 0010 */ V(1, 1, 0, 1, 4),
-  /* 0011 */ V(1, 1, 0, 0, 4),
-  /* 0100 */ V(1, 0, 1, 1, 4),
-  /* 0101 */ V(1, 0, 1, 0, 4),
-  /* 0110 */ V(1, 0, 0, 1, 4),
-  /* 0111 */ V(1, 0, 0, 0, 4),
-  /* 1000 */ V(0, 1, 1, 1, 4),
-  /* 1001 */ V(0, 1, 1, 0, 4),
-  /* 1010 */ V(0, 1, 0, 1, 4),
-  /* 1011 */ V(0, 1, 0, 0, 4),
-  /* 1100 */ V(0, 0, 1, 1, 4),
-  /* 1101 */ V(0, 0, 1, 0, 4),
-  /* 1110 */ V(0, 0, 0, 1, 4),
-  /* 1111 */ V(0, 0, 0, 0, 4)
-};
-
-# undef V
-# undef PTR
-
-#define PTR(OFFS, BITS) { .ptr = { .bits=BITS, .offset=OFFS } }
-#define V(X, Y, HLEN) { .final = 1, .value = { .x=X, .y=Y, .hlen=HLEN } }
-
-static
-struct huffpair const hufftab0[] = {
-  /*      */ V(0, 0, 0)
-};
-
-static
-struct huffpair const hufftab1[] = {
-  /* 000  */ V(1, 1, 3),
-  /* 001  */ V(0, 1, 3),
-  /* 010  */ V(1, 0, 2),
-  /* 011  */ V(1, 0, 2),
-  /* 100  */ V(0, 0, 1),
-  /* 101  */ V(0, 0, 1),
-  /* 110  */ V(0, 0, 1),
-  /* 111  */ V(0, 0, 1)
-};
-
-static
-struct huffpair const hufftab2[] = {
-  /* 000  */ PTR(8, 3),
-  /* 001  */ V(1, 1, 3),
-  /* 010  */ V(0, 1, 3),
-  /* 011  */ V(1, 0, 3),
-  /* 100  */ V(0, 0, 1),
-  /* 101  */ V(0, 0, 1),
-  /* 110  */ V(0, 0, 1),
-  /* 111  */ V(0, 0, 1),
-
-  /* 000 ... */
-  /* 000  */ V(2, 2, 3),	/* 8 */
-  /* 001  */ V(0, 2, 3),
-  /* 010  */ V(1, 2, 2),
-  /* 011  */ V(1, 2, 2),
-  /* 100  */ V(2, 1, 2),
-  /* 101  */ V(2, 1, 2),
-  /* 110  */ V(2, 0, 2),
-  /* 111  */ V(2, 0, 2)
-};
-
-static
-struct huffpair const hufftab3[] = {
-  /* 000  */ PTR(8, 3),
-  /* 001  */ V(1, 0, 3),
-  /* 010  */ V(1, 1, 2),
-  /* 011  */ V(1, 1, 2),
-  /* 100  */ V(0, 1, 2),
-  /* 101  */ V(0, 1, 2),
-  /* 110  */ V(0, 0, 2),
-  /* 111  */ V(0, 0, 2),
-
-  /* 000 ... */
-  /* 000  */ V(2, 2, 3),	/* 8 */
-  /* 001  */ V(0, 2, 3),
-  /* 010  */ V(1, 2, 2),
-  /* 011  */ V(1, 2, 2),
-  /* 100  */ V(2, 1, 2),
-  /* 101  */ V(2, 1, 2),
-  /* 110  */ V(2, 0, 2),
-  /* 111  */ V(2, 0, 2)
-};
-
-static
-struct huffpair const hufftab5[] = {
-  /* 000  */ PTR(8, 4),
-  /* 001  */ V(1, 1, 3),
-  /* 010  */ V(0, 1, 3),
-  /* 011  */ V(1, 0, 3),
-  /* 100  */ V(0, 0, 1),
-  /* 101  */ V(0, 0, 1),
-  /* 110  */ V(0, 0, 1),
-  /* 111  */ V(0, 0, 1),
-
-  /* 000 ... */
-  /* 0000 */ PTR(24, 1),	/* 8 */
-  /* 0001 */ V(3, 2, 4),
-  /* 0010 */ V(3, 1, 3),
-  /* 0011 */ V(3, 1, 3),
-  /* 0100 */ V(1, 3, 4),
-  /* 0101 */ V(0, 3, 4),
-  /* 0110 */ V(3, 0, 4),
-  /* 0111 */ V(2, 2, 4),
-  /* 1000 */ V(1, 2, 3),
-  /* 1001 */ V(1, 2, 3),
-  /* 1010 */ V(2, 1, 3),
-  /* 1011 */ V(2, 1, 3),
-  /* 1100 */ V(0, 2, 3),
-  /* 1101 */ V(0, 2, 3),
-  /* 1110 */ V(2, 0, 3),
-  /* 1111 */ V(2, 0, 3),
-
-  /* 000 0000 ... */
-  /* 0    */ V(3, 3, 1),	/* 24 */
-  /* 1    */ V(2, 3, 1)
-};
-
-static
-struct huffpair const hufftab6[] = {
-  /* 0000 */ PTR(16, 3),
-  /* 0001 */ PTR(24, 1),
-  /* 0010 */ PTR(26, 1),
-  /* 0011 */ V(1, 2, 4),
-  /* 0100 */ V(2, 1, 4),
-  /* 0101 */ V(2, 0, 4),
-  /* 0110 */ V(0, 1, 3),
-  /* 0111 */ V(0, 1, 3),
-  /* 1000 */ V(1, 1, 2),
-  /* 1001 */ V(1, 1, 2),
-  /* 1010 */ V(1, 1, 2),
-  /* 1011 */ V(1, 1, 2),
-  /* 1100 */ V(1, 0, 3),
-  /* 1101 */ V(1, 0, 3),
-  /* 1110 */ V(0, 0, 3),
-  /* 1111 */ V(0, 0, 3),
-
-  /* 0000 ... */
-  /* 000  */ V(3, 3, 3),	/* 16 */
-  /* 001  */ V(0, 3, 3),
-  /* 010  */ V(2, 3, 2),
-  /* 011  */ V(2, 3, 2),
-  /* 100  */ V(3, 2, 2),
-  /* 101  */ V(3, 2, 2),
-  /* 110  */ V(3, 0, 2),
-  /* 111  */ V(3, 0, 2),
-
-  /* 0001 ... */
-  /* 0    */ V(1, 3, 1),	/* 24 */
-  /* 1    */ V(3, 1, 1),
-
-  /* 0010 ... */
-  /* 0    */ V(2, 2, 1),	/* 26 */
-  /* 1    */ V(0, 2, 1)
-};
-
-static
-struct huffpair const hufftab7[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 2),
-  /* 0011 */ V(1, 1, 4),
-  /* 0100 */ V(0, 1, 3),
-  /* 0101 */ V(0, 1, 3),
-  /* 0110 */ V(1, 0, 3),
-  /* 0111 */ V(1, 0, 3),
-  /* 1000 */ V(0, 0, 1),
-  /* 1001 */ V(0, 0, 1),
-  /* 1010 */ V(0, 0, 1),
-  /* 1011 */ V(0, 0, 1),
-  /* 1100 */ V(0, 0, 1),
-  /* 1101 */ V(0, 0, 1),
-  /* 1110 */ V(0, 0, 1),
-  /* 1111 */ V(0, 0, 1),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(52, 2),	/* 16 */
-  /* 0001 */ PTR(56, 1),
-  /* 0010 */ PTR(58, 1),
-  /* 0011 */ V(1, 5, 4),
-  /* 0100 */ V(5, 1, 4),
-  /* 0101 */ PTR(60, 1),
-  /* 0110 */ V(5, 0, 4),
-  /* 0111 */ PTR(62, 1),
-  /* 1000 */ V(2, 4, 4),
-  /* 1001 */ V(4, 2, 4),
-  /* 1010 */ V(1, 4, 3),
-  /* 1011 */ V(1, 4, 3),
-  /* 1100 */ V(4, 1, 3),
-  /* 1101 */ V(4, 1, 3),
-  /* 1110 */ V(4, 0, 3),
-  /* 1111 */ V(4, 0, 3),
-
-  /* 0001 ... */
-  /* 0000 */ V(0, 4, 4),	/* 32 */
-  /* 0001 */ V(2, 3, 4),
-  /* 0010 */ V(3, 2, 4),
-  /* 0011 */ V(0, 3, 4),
-  /* 0100 */ V(1, 3, 3),
-  /* 0101 */ V(1, 3, 3),
-  /* 0110 */ V(3, 1, 3),
-  /* 0111 */ V(3, 1, 3),
-  /* 1000 */ V(3, 0, 3),
-  /* 1001 */ V(3, 0, 3),
-  /* 1010 */ V(2, 2, 3),
-  /* 1011 */ V(2, 2, 3),
-  /* 1100 */ V(1, 2, 2),
-  /* 1101 */ V(1, 2, 2),
-  /* 1110 */ V(1, 2, 2),
-  /* 1111 */ V(1, 2, 2),
-
-  /* 0010 ... */
-  /* 00   */ V(2, 1, 1),	/* 48 */
-  /* 01   */ V(2, 1, 1),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 00   */ V(5, 5, 2),	/* 52 */
-  /* 01   */ V(4, 5, 2),
-  /* 10   */ V(5, 4, 2),
-  /* 11   */ V(5, 3, 2),
-
-  /* 0000 0001 ... */
-  /* 0    */ V(3, 5, 1),	/* 56 */
-  /* 1    */ V(4, 4, 1),
-
-  /* 0000 0010 ... */
-  /* 0    */ V(2, 5, 1),	/* 58 */
-  /* 1    */ V(5, 2, 1),
-
-  /* 0000 0101 ... */
-  /* 0    */ V(0, 5, 1),	/* 60 */
-  /* 1    */ V(3, 4, 1),
-
-  /* 0000 0111 ... */
-  /* 0    */ V(4, 3, 1),	/* 62 */
-  /* 1    */ V(3, 3, 1)
-};
-
-# if 0
-/* this version saves 8 entries (16 bytes) at the expense of
-   an extra lookup in 4 out of 36 cases */
-static
-struct huffpair const hufftab8[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 2),
-  /* 0010 */ V(1, 2, 4),
-  /* 0011 */ V(2, 1, 4),
-  /* 0100 */ V(1, 1, 2),
-  /* 0101 */ V(1, 1, 2),
-  /* 0110 */ V(1, 1, 2),
-  /* 0111 */ V(1, 1, 2),
-  /* 1000 */ V(0, 1, 3),
-  /* 1001 */ V(0, 1, 3),
-  /* 1010 */ V(1, 0, 3),
-  /* 1011 */ V(1, 0, 3),
-  /* 1100 */ V(0, 0, 2),
-  /* 1101 */ V(0, 0, 2),
-  /* 1110 */ V(0, 0, 2),
-  /* 1111 */ V(0, 0, 2),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(36, 3),	/* 16 */
-  /* 0001 */ PTR(44, 2),
-  /* 0010 */ PTR(48, 1),
-  /* 0011 */ V(1, 5, 4),
-  /* 0100 */ V(5, 1, 4),
-  /* 0101 */ PTR(50, 1),
-  /* 0110 */ PTR(52, 1),
-  /* 0111 */ V(2, 4, 4),
-  /* 1000 */ V(4, 2, 4),
-  /* 1001 */ V(1, 4, 4),
-  /* 1010 */ V(4, 1, 3),
-  /* 1011 */ V(4, 1, 3),
-  /* 1100 */ V(0, 4, 4),
-  /* 1101 */ V(4, 0, 4),
-  /* 1110 */ V(2, 3, 4),
-  /* 1111 */ V(3, 2, 4),
-
-  /* 0001 ... */
-  /* 00   */ PTR(54, 2),	/* 32 */
-  /* 01   */ V(2, 2, 2),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 000  */ V(5, 5, 3),	/* 36 */
-  /* 001  */ V(5, 4, 3),
-  /* 010  */ V(4, 5, 2),
-  /* 011  */ V(4, 5, 2),
-  /* 100  */ V(5, 3, 1),
-  /* 101  */ V(5, 3, 1),
-  /* 110  */ V(5, 3, 1),
-  /* 111  */ V(5, 3, 1),
-
-  /* 0000 0001 ... */
-  /* 00   */ V(3, 5, 2),	/* 44 */
-  /* 01   */ V(4, 4, 2),
-  /* 10   */ V(2, 5, 1),
-  /* 11   */ V(2, 5, 1),
-
-  /* 0000 0010 ... */
-  /* 0    */ V(5, 2, 1),	/* 48 */
-  /* 1    */ V(0, 5, 1),
-
-  /* 0000 0101 ... */
-  /* 0    */ V(3, 4, 1),	/* 50 */
-  /* 1    */ V(4, 3, 1),
-
-  /* 0000 0110 ... */
-  /* 0    */ V(5, 0, 1),	/* 52 */
-  /* 1    */ V(3, 3, 1),
-
-  /* 0001 00 ... */
-  /* 00   */ V(1, 3, 2),	/* 54 */
-  /* 01   */ V(3, 1, 2),
-  /* 10   */ V(0, 3, 2),
-  /* 11   */ V(3, 0, 2),
-};
-# else
-static
-struct huffpair const hufftab8[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ V(1, 2, 4),
-  /* 0011 */ V(2, 1, 4),
-  /* 0100 */ V(1, 1, 2),
-  /* 0101 */ V(1, 1, 2),
-  /* 0110 */ V(1, 1, 2),
-  /* 0111 */ V(1, 1, 2),
-  /* 1000 */ V(0, 1, 3),
-  /* 1001 */ V(0, 1, 3),
-  /* 1010 */ V(1, 0, 3),
-  /* 1011 */ V(1, 0, 3),
-  /* 1100 */ V(0, 0, 2),
-  /* 1101 */ V(0, 0, 2),
-  /* 1110 */ V(0, 0, 2),
-  /* 1111 */ V(0, 0, 2),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(48, 3),	/* 16 */
-  /* 0001 */ PTR(56, 2),
-  /* 0010 */ PTR(60, 1),
-  /* 0011 */ V(1, 5, 4),
-  /* 0100 */ V(5, 1, 4),
-  /* 0101 */ PTR(62, 1),
-  /* 0110 */ PTR(64, 1),
-  /* 0111 */ V(2, 4, 4),
-  /* 1000 */ V(4, 2, 4),
-  /* 1001 */ V(1, 4, 4),
-  /* 1010 */ V(4, 1, 3),
-  /* 1011 */ V(4, 1, 3),
-  /* 1100 */ V(0, 4, 4),
-  /* 1101 */ V(4, 0, 4),
-  /* 1110 */ V(2, 3, 4),
-  /* 1111 */ V(3, 2, 4),
-
-  /* 0001 ... */
-  /* 0000 */ V(1, 3, 4),	/* 32 */
-  /* 0001 */ V(3, 1, 4),
-  /* 0010 */ V(0, 3, 4),
-  /* 0011 */ V(3, 0, 4),
-  /* 0100 */ V(2, 2, 2),
-  /* 0101 */ V(2, 2, 2),
-  /* 0110 */ V(2, 2, 2),
-  /* 0111 */ V(2, 2, 2),
-  /* 1000 */ V(0, 2, 2),
-  /* 1001 */ V(0, 2, 2),
-  /* 1010 */ V(0, 2, 2),
-  /* 1011 */ V(0, 2, 2),
-  /* 1100 */ V(2, 0, 2),
-  /* 1101 */ V(2, 0, 2),
-  /* 1110 */ V(2, 0, 2),
-  /* 1111 */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 000  */ V(5, 5, 3),	/* 48 */
-  /* 001  */ V(5, 4, 3),
-  /* 010  */ V(4, 5, 2),
-  /* 011  */ V(4, 5, 2),
-  /* 100  */ V(5, 3, 1),
-  /* 101  */ V(5, 3, 1),
-  /* 110  */ V(5, 3, 1),
-  /* 111  */ V(5, 3, 1),
-
-  /* 0000 0001 ... */
-  /* 00   */ V(3, 5, 2),	/* 56 */
-  /* 01   */ V(4, 4, 2),
-  /* 10   */ V(2, 5, 1),
-  /* 11   */ V(2, 5, 1),
-
-  /* 0000 0010 ... */
-  /* 0    */ V(5, 2, 1),	/* 60 */
-  /* 1    */ V(0, 5, 1),
-
-  /* 0000 0101 ... */
-  /* 0    */ V(3, 4, 1),	/* 62 */
-  /* 1    */ V(4, 3, 1),
-
-  /* 0000 0110 ... */
-  /* 0    */ V(5, 0, 1),	/* 64 */
-  /* 1    */ V(3, 3, 1)
-};
-# endif
-
-static
-struct huffpair const hufftab9[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 3),
-  /* 0010 */ PTR(40, 2),
-  /* 0011 */ PTR(44, 2),
-  /* 0100 */ PTR(48, 1),
-  /* 0101 */ V(1, 2, 4),
-  /* 0110 */ V(2, 1, 4),
-  /* 0111 */ V(2, 0, 4),
-  /* 1000 */ V(1, 1, 3),
-  /* 1001 */ V(1, 1, 3),
-  /* 1010 */ V(0, 1, 3),
-  /* 1011 */ V(0, 1, 3),
-  /* 1100 */ V(1, 0, 3),
-  /* 1101 */ V(1, 0, 3),
-  /* 1110 */ V(0, 0, 3),
-  /* 1111 */ V(0, 0, 3),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(50, 1),	/* 16 */
-  /* 0001 */ V(3, 5, 4),
-  /* 0010 */ V(5, 3, 4),
-  /* 0011 */ PTR(52, 1),
-  /* 0100 */ V(4, 4, 4),
-  /* 0101 */ V(2, 5, 4),
-  /* 0110 */ V(5, 2, 4),
-  /* 0111 */ V(1, 5, 4),
-  /* 1000 */ V(5, 1, 3),
-  /* 1001 */ V(5, 1, 3),
-  /* 1010 */ V(3, 4, 3),
-  /* 1011 */ V(3, 4, 3),
-  /* 1100 */ V(4, 3, 3),
-  /* 1101 */ V(4, 3, 3),
-  /* 1110 */ V(5, 0, 4),
-  /* 1111 */ V(0, 4, 4),
-
-  /* 0001 ... */
-  /* 000  */ V(2, 4, 3),	/* 32 */
-  /* 001  */ V(4, 2, 3),
-  /* 010  */ V(3, 3, 3),
-  /* 011  */ V(4, 0, 3),
-  /* 100  */ V(1, 4, 2),
-  /* 101  */ V(1, 4, 2),
-  /* 110  */ V(4, 1, 2),
-  /* 111  */ V(4, 1, 2),
-
-  /* 0010 ... */
-  /* 00   */ V(2, 3, 2),	/* 40 */
-  /* 01   */ V(3, 2, 2),
-  /* 10   */ V(1, 3, 1),
-  /* 11   */ V(1, 3, 1),
-
-  /* 0011 ... */
-  /* 00   */ V(3, 1, 1),	/* 44 */
-  /* 01   */ V(3, 1, 1),
-  /* 10   */ V(0, 3, 2),
-  /* 11   */ V(3, 0, 2),
-
-  /* 0100 ... */
-  /* 0    */ V(2, 2, 1),	/* 48 */
-  /* 1    */ V(0, 2, 1),
-
-  /* 0000 0000 ... */
-  /* 0    */ V(5, 5, 1),	/* 50 */
-  /* 1    */ V(4, 5, 1),
-
-  /* 0000 0011 ... */
-  /* 0    */ V(5, 4, 1),	/* 52 */
-  /* 1    */ V(0, 5, 1)
-};
-
-static
-struct huffpair const hufftab10[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 2),
-  /* 0011 */ V(1, 1, 4),
-  /* 0100 */ V(0, 1, 3),
-  /* 0101 */ V(0, 1, 3),
-  /* 0110 */ V(1, 0, 3),
-  /* 0111 */ V(1, 0, 3),
-  /* 1000 */ V(0, 0, 1),
-  /* 1001 */ V(0, 0, 1),
-  /* 1010 */ V(0, 0, 1),
-  /* 1011 */ V(0, 0, 1),
-  /* 1100 */ V(0, 0, 1),
-  /* 1101 */ V(0, 0, 1),
-  /* 1110 */ V(0, 0, 1),
-  /* 1111 */ V(0, 0, 1),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(52, 3),	/* 16 */
-  /* 0001 */ PTR(60, 2),
-  /* 0010 */ PTR(64, 3),
-  /* 0011 */ PTR(72, 1),
-  /* 0100 */ PTR(74, 2),
-  /* 0101 */ PTR(78, 2),
-  /* 0110 */ PTR(82, 2),
-  /* 0111 */ V(1, 7, 4),
-  /* 1000 */ V(7, 1, 4),
-  /* 1001 */ PTR(86, 1),
-  /* 1010 */ PTR(88, 2),
-  /* 1011 */ PTR(92, 2),
-  /* 1100 */ V(1, 6, 4),
-  /* 1101 */ V(6, 1, 4),
-  /* 1110 */ V(6, 0, 4),
-  /* 1111 */ PTR(96, 1),
-
-  /* 0001 ... */
-  /* 0000 */ PTR(98, 1),	/* 32 */
-  /* 0001 */ PTR(100, 1),
-  /* 0010 */ V(1, 4, 4),
-  /* 0011 */ V(4, 1, 4),
-  /* 0100 */ V(4, 0, 4),
-  /* 0101 */ V(2, 3, 4),
-  /* 0110 */ V(3, 2, 4),
-  /* 0111 */ V(0, 3, 4),
-  /* 1000 */ V(1, 3, 3),
-  /* 1001 */ V(1, 3, 3),
-  /* 1010 */ V(3, 1, 3),
-  /* 1011 */ V(3, 1, 3),
-  /* 1100 */ V(3, 0, 3),
-  /* 1101 */ V(3, 0, 3),
-  /* 1110 */ V(2, 2, 3),
-  /* 1111 */ V(2, 2, 3),
-
-  /* 0010 ... */
-  /* 00   */ V(1, 2, 2),	/* 48 */
-  /* 01   */ V(2, 1, 2),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 000  */ V(7, 7, 3),	/* 52 */
-  /* 001  */ V(6, 7, 3),
-  /* 010  */ V(7, 6, 3),
-  /* 011  */ V(5, 7, 3),
-  /* 100  */ V(7, 5, 3),
-  /* 101  */ V(6, 6, 3),
-  /* 110  */ V(4, 7, 2),
-  /* 111  */ V(4, 7, 2),
-
-  /* 0000 0001 ... */
-  /* 00   */ V(7, 4, 2),	/* 60 */
-  /* 01   */ V(5, 6, 2),
-  /* 10   */ V(6, 5, 2),
-  /* 11   */ V(3, 7, 2),
-
-  /* 0000 0010 ... */
-  /* 000  */ V(7, 3, 2),	/* 64 */
-  /* 001  */ V(7, 3, 2),
-  /* 010  */ V(4, 6, 2),
-  /* 011  */ V(4, 6, 2),
-  /* 100  */ V(5, 5, 3),
-  /* 101  */ V(5, 4, 3),
-  /* 110  */ V(6, 3, 2),
-  /* 111  */ V(6, 3, 2),
-
-  /* 0000 0011 ... */
-  /* 0    */ V(2, 7, 1),	/* 72 */
-  /* 1    */ V(7, 2, 1),
-
-  /* 0000 0100 ... */
-  /* 00   */ V(6, 4, 2),	/* 74 */
-  /* 01   */ V(0, 7, 2),
-  /* 10   */ V(7, 0, 1),
-  /* 11   */ V(7, 0, 1),
-
-  /* 0000 0101 ... */
-  /* 00   */ V(6, 2, 1),	/* 78 */
-  /* 01   */ V(6, 2, 1),
-  /* 10   */ V(4, 5, 2),
-  /* 11   */ V(3, 5, 2),
-
-  /* 0000 0110 ... */
-  /* 00   */ V(0, 6, 1),	/* 82 */
-  /* 01   */ V(0, 6, 1),
-  /* 10   */ V(5, 3, 2),
-  /* 11   */ V(4, 4, 2),
-
-  /* 0000 1001 ... */
-  /* 0    */ V(3, 6, 1),	/* 86 */
-  /* 1    */ V(2, 6, 1),
-
-  /* 0000 1010 ... */
-  /* 00   */ V(2, 5, 2),	/* 88 */
-  /* 01   */ V(5, 2, 2),
-  /* 10   */ V(1, 5, 1),
-  /* 11   */ V(1, 5, 1),
-
-  /* 0000 1011 ... */
-  /* 00   */ V(5, 1, 1),	/* 92 */
-  /* 01   */ V(5, 1, 1),
-  /* 10   */ V(3, 4, 2),
-  /* 11   */ V(4, 3, 2),
-
-  /* 0000 1111 ... */
-  /* 0    */ V(0, 5, 1),	/* 96 */
-  /* 1    */ V(5, 0, 1),
-
-  /* 0001 0000 ... */
-  /* 0    */ V(2, 4, 1),	/* 98 */
-  /* 1    */ V(4, 2, 1),
-
-  /* 0001 0001 ... */
-  /* 0    */ V(3, 3, 1),	/* 100 */
-  /* 1    */ V(0, 4, 1)
-};
-
-static
-struct huffpair const hufftab11[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ PTR(64, 3),
-  /* 0100 */ V(1, 2, 4),
-  /* 0101 */ PTR(72, 1),
-  /* 0110 */ V(1, 1, 3),
-  /* 0111 */ V(1, 1, 3),
-  /* 1000 */ V(0, 1, 3),
-  /* 1001 */ V(0, 1, 3),
-  /* 1010 */ V(1, 0, 3),
-  /* 1011 */ V(1, 0, 3),
-  /* 1100 */ V(0, 0, 2),
-  /* 1101 */ V(0, 0, 2),
-  /* 1110 */ V(0, 0, 2),
-  /* 1111 */ V(0, 0, 2),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(74, 2),	/* 16 */
-  /* 0001 */ PTR(78, 3),
-  /* 0010 */ PTR(86, 2),
-  /* 0011 */ PTR(90, 1),
-  /* 0100 */ PTR(92, 2),
-  /* 0101 */ V(2, 7, 4),
-  /* 0110 */ V(7, 2, 4),
-  /* 0111 */ PTR(96, 1),
-  /* 1000 */ V(7, 1, 3),
-  /* 1001 */ V(7, 1, 3),
-  /* 1010 */ V(1, 7, 4),
-  /* 1011 */ V(7, 0, 4),
-  /* 1100 */ V(3, 6, 4),
-  /* 1101 */ V(6, 3, 4),
-  /* 1110 */ V(6, 0, 4),
-  /* 1111 */ PTR(98, 1),
-
-  /* 0001 ... */
-  /* 0000 */ PTR(100, 1),	/* 32 */
-  /* 0001 */ V(1, 5, 4),
-  /* 0010 */ V(6, 2, 3),
-  /* 0011 */ V(6, 2, 3),
-  /* 0100 */ V(2, 6, 4),
-  /* 0101 */ V(0, 6, 4),
-  /* 0110 */ V(1, 6, 3),
-  /* 0111 */ V(1, 6, 3),
-  /* 1000 */ V(6, 1, 3),
-  /* 1001 */ V(6, 1, 3),
-  /* 1010 */ V(5, 1, 4),
-  /* 1011 */ V(3, 4, 4),
-  /* 1100 */ V(5, 0, 4),
-  /* 1101 */ PTR(102, 1),
-  /* 1110 */ V(2, 4, 4),
-  /* 1111 */ V(4, 2, 4),
-
-  /* 0010 ... */
-  /* 0000 */ V(1, 4, 4),	/* 48 */
-  /* 0001 */ V(4, 1, 4),
-  /* 0010 */ V(0, 4, 4),
-  /* 0011 */ V(4, 0, 4),
-  /* 0100 */ V(2, 3, 3),
-  /* 0101 */ V(2, 3, 3),
-  /* 0110 */ V(3, 2, 3),
-  /* 0111 */ V(3, 2, 3),
-  /* 1000 */ V(1, 3, 2),
-  /* 1001 */ V(1, 3, 2),
-  /* 1010 */ V(1, 3, 2),
-  /* 1011 */ V(1, 3, 2),
-  /* 1100 */ V(3, 1, 2),
-  /* 1101 */ V(3, 1, 2),
-  /* 1110 */ V(3, 1, 2),
-  /* 1111 */ V(3, 1, 2),
-
-  /* 0011 ... */
-  /* 000  */ V(0, 3, 3),	/* 64 */
-  /* 001  */ V(3, 0, 3),
-  /* 010  */ V(2, 2, 2),
-  /* 011  */ V(2, 2, 2),
-  /* 100  */ V(2, 1, 1),
-  /* 101  */ V(2, 1, 1),
-  /* 110  */ V(2, 1, 1),
-  /* 111  */ V(2, 1, 1),
-
-  /* 0101 ... */
-  /* 0    */ V(0, 2, 1),	/* 72 */
-  /* 1    */ V(2, 0, 1),
-
-  /* 0000 0000 ... */
-  /* 00   */ V(7, 7, 2),	/* 74 */
-  /* 01   */ V(6, 7, 2),
-  /* 10   */ V(7, 6, 2),
-  /* 11   */ V(7, 5, 2),
-
-  /* 0000 0001 ... */
-  /* 000  */ V(6, 6, 2),	/* 78 */
-  /* 001  */ V(6, 6, 2),
-  /* 010  */ V(4, 7, 2),
-  /* 011  */ V(4, 7, 2),
-  /* 100  */ V(7, 4, 2),
-  /* 101  */ V(7, 4, 2),
-  /* 110  */ V(5, 7, 3),
-  /* 111  */ V(5, 5, 3),
-
-  /* 0000 0010 ... */
-  /* 00   */ V(5, 6, 2),	/* 86 */
-  /* 01   */ V(6, 5, 2),
-  /* 10   */ V(3, 7, 1),
-  /* 11   */ V(3, 7, 1),
-
-  /* 0000 0011 ... */
-  /* 0    */ V(7, 3, 1),	/* 90 */
-  /* 1    */ V(4, 6, 1),
-
-  /* 0000 0100 ... */
-  /* 00   */ V(4, 5, 2),	/* 92 */
-  /* 01   */ V(5, 4, 2),
-  /* 10   */ V(3, 5, 2),
-  /* 11   */ V(5, 3, 2),
-
-  /* 0000 0111 ... */
-  /* 0    */ V(6, 4, 1),	/* 96 */
-  /* 1    */ V(0, 7, 1),
-
-  /* 0000 1111 ... */
-  /* 0    */ V(4, 4, 1),	/* 98 */
-  /* 1    */ V(2, 5, 1),
-
-  /* 0001 0000 ... */
-  /* 0    */ V(5, 2, 1),	/* 100 */
-  /* 1    */ V(0, 5, 1),
-
-  /* 0001 1101 ... */
-  /* 0    */ V(4, 3, 1),	/* 102 */
-  /* 1    */ V(3, 3, 1)
-};
-
-static
-struct huffpair const hufftab12[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ PTR(64, 2),
-  /* 0100 */ PTR(68, 3),
-  /* 0101 */ PTR(76, 1),
-  /* 0110 */ V(1, 2, 4),
-  /* 0111 */ V(2, 1, 4),
-  /* 1000 */ PTR(78, 1),
-  /* 1001 */ V(0, 0, 4),
-  /* 1010 */ V(1, 1, 3),
-  /* 1011 */ V(1, 1, 3),
-  /* 1100 */ V(0, 1, 3),
-  /* 1101 */ V(0, 1, 3),
-  /* 1110 */ V(1, 0, 3),
-  /* 1111 */ V(1, 0, 3),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(80, 2),	/* 16 */
-  /* 0001 */ PTR(84, 1),
-  /* 0010 */ PTR(86, 1),
-  /* 0011 */ PTR(88, 1),
-  /* 0100 */ V(5, 6, 4),
-  /* 0101 */ V(3, 7, 4),
-  /* 0110 */ PTR(90, 1),
-  /* 0111 */ V(2, 7, 4),
-  /* 1000 */ V(7, 2, 4),
-  /* 1001 */ V(4, 6, 4),
-  /* 1010 */ V(6, 4, 4),
-  /* 1011 */ V(1, 7, 4),
-  /* 1100 */ V(7, 1, 4),
-  /* 1101 */ PTR(92, 1),
-  /* 1110 */ V(3, 6, 4),
-  /* 1111 */ V(6, 3, 4),
-
-  /* 0001 ... */
-  /* 0000 */ V(4, 5, 4),	/* 32 */
-  /* 0001 */ V(5, 4, 4),
-  /* 0010 */ V(4, 4, 4),
-  /* 0011 */ PTR(94, 1),
-  /* 0100 */ V(2, 6, 3),
-  /* 0101 */ V(2, 6, 3),
-  /* 0110 */ V(6, 2, 3),
-  /* 0111 */ V(6, 2, 3),
-  /* 1000 */ V(6, 1, 3),
-  /* 1001 */ V(6, 1, 3),
-  /* 1010 */ V(1, 6, 4),
-  /* 1011 */ V(6, 0, 4),
-  /* 1100 */ V(3, 5, 4),
-  /* 1101 */ V(5, 3, 4),
-  /* 1110 */ V(2, 5, 4),
-  /* 1111 */ V(5, 2, 4),
-
-  /* 0010 ... */
-  /* 0000 */ V(1, 5, 3),	/* 48 */
-  /* 0001 */ V(1, 5, 3),
-  /* 0010 */ V(5, 1, 3),
-  /* 0011 */ V(5, 1, 3),
-  /* 0100 */ V(3, 4, 3),
-  /* 0101 */ V(3, 4, 3),
-  /* 0110 */ V(4, 3, 3),
-  /* 0111 */ V(4, 3, 3),
-  /* 1000 */ V(5, 0, 4),
-  /* 1001 */ V(0, 4, 4),
-  /* 1010 */ V(2, 4, 3),
-  /* 1011 */ V(2, 4, 3),
-  /* 1100 */ V(4, 2, 3),
-  /* 1101 */ V(4, 2, 3),
-  /* 1110 */ V(1, 4, 3),
-  /* 1111 */ V(1, 4, 3),
-
-  /* 0011 ... */
-  /* 00   */ V(3, 3, 2),	/* 64 */
-  /* 01   */ V(4, 1, 2),
-  /* 10   */ V(2, 3, 2),
-  /* 11   */ V(3, 2, 2),
-
-  /* 0100 ... */
-  /* 000  */ V(4, 0, 3),	/* 68 */
-  /* 001  */ V(0, 3, 3),
-  /* 010  */ V(3, 0, 2),
-  /* 011  */ V(3, 0, 2),
-  /* 100  */ V(1, 3, 1),
-  /* 101  */ V(1, 3, 1),
-  /* 110  */ V(1, 3, 1),
-  /* 111  */ V(1, 3, 1),
-
-  /* 0101 ... */
-  /* 0    */ V(3, 1, 1),	/* 76 */
-  /* 1    */ V(2, 2, 1),
-
-  /* 1000 ... */
-  /* 0    */ V(0, 2, 1),	/* 78 */
-  /* 1    */ V(2, 0, 1),
-
-  /* 0000 0000 ... */
-  /* 00   */ V(7, 7, 2),	/* 80 */
-  /* 01   */ V(6, 7, 2),
-  /* 10   */ V(7, 6, 1),
-  /* 11   */ V(7, 6, 1),
-
-  /* 0000 0001 ... */
-  /* 0    */ V(5, 7, 1),	/* 84 */
-  /* 1    */ V(7, 5, 1),
-
-  /* 0000 0010 ... */
-  /* 0    */ V(6, 6, 1),	/* 86 */
-  /* 1    */ V(4, 7, 1),
-
-  /* 0000 0011 ... */
-  /* 0    */ V(7, 4, 1),	/* 88 */
-  /* 1    */ V(6, 5, 1),
-
-  /* 0000 0110 ... */
-  /* 0    */ V(7, 3, 1),	/* 90 */
-  /* 1    */ V(5, 5, 1),
-
-  /* 0000 1101 ... */
-  /* 0    */ V(0, 7, 1),	/* 92 */
-  /* 1    */ V(7, 0, 1),
-
-  /* 0001 0011 ... */
-  /* 0    */ V(0, 6, 1),	/* 94 */
-  /* 1    */ V(0, 5, 1)
-};
-
-static
-struct huffpair const hufftab13[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ PTR(64, 2),
-  /* 0100 */ V(1, 1, 4),
-  /* 0101 */ V(0, 1, 4),
-  /* 0110 */ V(1, 0, 3),
-  /* 0111 */ V(1, 0, 3),
-  /* 1000 */ V(0, 0, 1),
-  /* 1001 */ V(0, 0, 1),
-  /* 1010 */ V(0, 0, 1),
-  /* 1011 */ V(0, 0, 1),
-  /* 1100 */ V(0, 0, 1),
-  /* 1101 */ V(0, 0, 1),
-  /* 1110 */ V(0, 0, 1),
-  /* 1111 */ V(0, 0, 1),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(68, 4),	/* 16 */
-  /* 0001 */ PTR(84, 4),
-  /* 0010 */ PTR(100, 4),
-  /* 0011 */ PTR(116, 4),
-  /* 0100 */ PTR(132, 4),
-  /* 0101 */ PTR(148, 4),
-  /* 0110 */ PTR(164, 3),
-  /* 0111 */ PTR(172, 3),
-  /* 1000 */ PTR(180, 3),
-  /* 1001 */ PTR(188, 3),
-  /* 1010 */ PTR(196, 3),
-  /* 1011 */ PTR(204, 3),
-  /* 1100 */ PTR(212, 1),
-  /* 1101 */ PTR(214, 2),
-  /* 1110 */ PTR(218, 3),
-  /* 1111 */ PTR(226, 1),
-
-  /* 0001 ... */
-  /* 0000 */ PTR(228, 2),	/* 32 */
-  /* 0001 */ PTR(232, 2),
-  /* 0010 */ PTR(236, 2),
-  /* 0011 */ PTR(240, 2),
-  /* 0100 */ V(8, 1, 4),
-  /* 0101 */ PTR(244, 1),
-  /* 0110 */ PTR(246, 1),
-  /* 0111 */ PTR(248, 1),
-  /* 1000 */ PTR(250, 2),
-  /* 1001 */ PTR(254, 1),
-  /* 1010 */ V(1, 5, 4),
-  /* 1011 */ V(5, 1, 4),
-  /* 1100 */ PTR(256, 1),
-  /* 1101 */ PTR(258, 1),
-  /* 1110 */ PTR(260, 1),
-  /* 1111 */ V(1, 4, 4),
-
-  /* 0010 ... */
-  /* 0000 */ V(4, 1, 3),	/* 48 */
-  /* 0001 */ V(4, 1, 3),
-  /* 0010 */ V(0, 4, 4),
-  /* 0011 */ V(4, 0, 4),
-  /* 0100 */ V(2, 3, 4),
-  /* 0101 */ V(3, 2, 4),
-  /* 0110 */ V(1, 3, 3),
-  /* 0111 */ V(1, 3, 3),
-  /* 1000 */ V(3, 1, 3),
-  /* 1001 */ V(3, 1, 3),
-  /* 1010 */ V(0, 3, 3),
-  /* 1011 */ V(0, 3, 3),
-  /* 1100 */ V(3, 0, 3),
-  /* 1101 */ V(3, 0, 3),
-  /* 1110 */ V(2, 2, 3),
-  /* 1111 */ V(2, 2, 3),
-
-  /* 0011 ... */
-  /* 00   */ V(1, 2, 2),	/* 64 */
-  /* 01   */ V(2, 1, 2),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 0000 */ PTR(262, 4),	/* 68 */
-  /* 0001 */ PTR(278, 4),
-  /* 0010 */ PTR(294, 4),
-  /* 0011 */ PTR(310, 3),
-  /* 0100 */ PTR(318, 2),
-  /* 0101 */ PTR(322, 2),
-  /* 0110 */ PTR(326, 3),
-  /* 0111 */ PTR(334, 2),
-  /* 1000 */ PTR(338, 1),
-  /* 1001 */ PTR(340, 2),
-  /* 1010 */ PTR(344, 2),
-  /* 1011 */ PTR(348, 2),
-  /* 1100 */ PTR(352, 2),
-  /* 1101 */ PTR(356, 2),
-  /* 1110 */ V(1, 15, 4),
-  /* 1111 */ V(15, 1, 4),
-
-  /* 0000 0001 ... */
-  /* 0000 */ V(15, 0, 4),	/* 84 */
-  /* 0001 */ PTR(360, 1),
-  /* 0010 */ PTR(362, 1),
-  /* 0011 */ PTR(364, 1),
-  /* 0100 */ V(14, 2, 4),
-  /* 0101 */ PTR(366, 1),
-  /* 0110 */ V(1, 14, 4),
-  /* 0111 */ V(14, 1, 4),
-  /* 1000 */ PTR(368, 1),
-  /* 1001 */ PTR(370, 1),
-  /* 1010 */ PTR(372, 1),
-  /* 1011 */ PTR(374, 1),
-  /* 1100 */ PTR(376, 1),
-  /* 1101 */ PTR(378, 1),
-  /* 1110 */ V(12, 6, 4),
-  /* 1111 */ V(3, 13, 4),
-
-  /* 0000 0010 ... */
-  /* 0000 */ PTR(380, 1),	/* 100 */
-  /* 0001 */ V(2, 13, 4),
-  /* 0010 */ V(13, 2, 4),
-  /* 0011 */ V(1, 13, 4),
-  /* 0100 */ V(11, 7, 4),
-  /* 0101 */ PTR(382, 1),
-  /* 0110 */ PTR(384, 1),
-  /* 0111 */ V(12, 3, 4),
-  /* 1000 */ PTR(386, 1),
-  /* 1001 */ V(4, 11, 4),
-  /* 1010 */ V(13, 1, 3),
-  /* 1011 */ V(13, 1, 3),
-  /* 1100 */ V(0, 13, 4),
-  /* 1101 */ V(13, 0, 4),
-  /* 1110 */ V(8, 10, 4),
-  /* 1111 */ V(10, 8, 4),
-
-  /* 0000 0011 ... */
-  /* 0000 */ V(4, 12, 4),	/* 116 */
-  /* 0001 */ V(12, 4, 4),
-  /* 0010 */ V(6, 11, 4),
-  /* 0011 */ V(11, 6, 4),
-  /* 0100 */ V(3, 12, 3),
-  /* 0101 */ V(3, 12, 3),
-  /* 0110 */ V(2, 12, 3),
-  /* 0111 */ V(2, 12, 3),
-  /* 1000 */ V(12, 2, 3),
-  /* 1001 */ V(12, 2, 3),
-  /* 1010 */ V(5, 11, 3),
-  /* 1011 */ V(5, 11, 3),
-  /* 1100 */ V(11, 5, 4),
-  /* 1101 */ V(8, 9, 4),
-  /* 1110 */ V(1, 12, 3),
-  /* 1111 */ V(1, 12, 3),
-
-  /* 0000 0100 ... */
-  /* 0000 */ V(12, 1, 3),	/* 132 */
-  /* 0001 */ V(12, 1, 3),
-  /* 0010 */ V(9, 8, 4),
-  /* 0011 */ V(0, 12, 4),
-  /* 0100 */ V(12, 0, 3),
-  /* 0101 */ V(12, 0, 3),
-  /* 0110 */ V(11, 4, 4),
-  /* 0111 */ V(6, 10, 4),
-  /* 1000 */ V(10, 6, 4),
-  /* 1001 */ V(7, 9, 4),
-  /* 1010 */ V(3, 11, 3),
-  /* 1011 */ V(3, 11, 3),
-  /* 1100 */ V(11, 3, 3),
-  /* 1101 */ V(11, 3, 3),
-  /* 1110 */ V(8, 8, 4),
-  /* 1111 */ V(5, 10, 4),
-
-  /* 0000 0101 ... */
-  /* 0000 */ V(2, 11, 3),	/* 148 */
-  /* 0001 */ V(2, 11, 3),
-  /* 0010 */ V(10, 5, 4),
-  /* 0011 */ V(6, 9, 4),
-  /* 0100 */ V(10, 4, 3),
-  /* 0101 */ V(10, 4, 3),
-  /* 0110 */ V(7, 8, 4),
-  /* 0111 */ V(8, 7, 4),
-  /* 1000 */ V(9, 4, 3),
-  /* 1001 */ V(9, 4, 3),
-  /* 1010 */ V(7, 7, 4),
-  /* 1011 */ V(7, 6, 4),
-  /* 1100 */ V(11, 2, 2),
-  /* 1101 */ V(11, 2, 2),
-  /* 1110 */ V(11, 2, 2),
-  /* 1111 */ V(11, 2, 2),
-
-  /* 0000 0110 ... */
-  /* 000  */ V(1, 11, 2),	/* 164 */
-  /* 001  */ V(1, 11, 2),
-  /* 010  */ V(11, 1, 2),
-  /* 011  */ V(11, 1, 2),
-  /* 100  */ V(0, 11, 3),
-  /* 101  */ V(11, 0, 3),
-  /* 110  */ V(9, 6, 3),
-  /* 111  */ V(4, 10, 3),
-
-  /* 0000 0111 ... */
-  /* 000  */ V(3, 10, 3),	/* 172 */
-  /* 001  */ V(10, 3, 3),
-  /* 010  */ V(5, 9, 3),
-  /* 011  */ V(9, 5, 3),
-  /* 100  */ V(2, 10, 2),
-  /* 101  */ V(2, 10, 2),
-  /* 110  */ V(10, 2, 2),
-  /* 111  */ V(10, 2, 2),
-
-  /* 0000 1000 ... */
-  /* 000  */ V(1, 10, 2),	/* 180 */
-  /* 001  */ V(1, 10, 2),
-  /* 010  */ V(10, 1, 2),
-  /* 011  */ V(10, 1, 2),
-  /* 100  */ V(0, 10, 3),
-  /* 101  */ V(6, 8, 3),
-  /* 110  */ V(10, 0, 2),
-  /* 111  */ V(10, 0, 2),
-
-  /* 0000 1001 ... */
-  /* 000  */ V(8, 6, 3),	/* 188 */
-  /* 001  */ V(4, 9, 3),
-  /* 010  */ V(9, 3, 2),
-  /* 011  */ V(9, 3, 2),
-  /* 100  */ V(3, 9, 3),
-  /* 101  */ V(5, 8, 3),
-  /* 110  */ V(8, 5, 3),
-  /* 111  */ V(6, 7, 3),
-
-  /* 0000 1010 ... */
-  /* 000  */ V(2, 9, 2),	/* 196 */
-  /* 001  */ V(2, 9, 2),
-  /* 010  */ V(9, 2, 2),
-  /* 011  */ V(9, 2, 2),
-  /* 100  */ V(5, 7, 3),
-  /* 101  */ V(7, 5, 3),
-  /* 110  */ V(3, 8, 2),
-  /* 111  */ V(3, 8, 2),
-
-  /* 0000 1011 ... */
-  /* 000  */ V(8, 3, 2),	/* 204 */
-  /* 001  */ V(8, 3, 2),
-  /* 010  */ V(6, 6, 3),
-  /* 011  */ V(4, 7, 3),
-  /* 100  */ V(7, 4, 3),
-  /* 101  */ V(5, 6, 3),
-  /* 110  */ V(6, 5, 3),
-  /* 111  */ V(7, 3, 3),
-
-  /* 0000 1100 ... */
-  /* 0    */ V(1, 9, 1),	/* 212 */
-  /* 1    */ V(9, 1, 1),
-
-  /* 0000 1101 ... */
-  /* 00   */ V(0, 9, 2),	/* 214 */
-  /* 01   */ V(9, 0, 2),
-  /* 10   */ V(4, 8, 2),
-  /* 11   */ V(8, 4, 2),
-
-  /* 0000 1110 ... */
-  /* 000  */ V(7, 2, 2),	/* 218 */
-  /* 001  */ V(7, 2, 2),
-  /* 010  */ V(4, 6, 3),
-  /* 011  */ V(6, 4, 3),
-  /* 100  */ V(2, 8, 1),
-  /* 101  */ V(2, 8, 1),
-  /* 110  */ V(2, 8, 1),
-  /* 111  */ V(2, 8, 1),
-
-  /* 0000 1111 ... */
-  /* 0    */ V(8, 2, 1),	/* 226 */
-  /* 1    */ V(1, 8, 1),
-
-  /* 0001 0000 ... */
-  /* 00   */ V(3, 7, 2),	/* 228 */
-  /* 01   */ V(2, 7, 2),
-  /* 10   */ V(1, 7, 1),
-  /* 11   */ V(1, 7, 1),
-
-  /* 0001 0001 ... */
-  /* 00   */ V(7, 1, 1),	/* 232 */
-  /* 01   */ V(7, 1, 1),
-  /* 10   */ V(5, 5, 2),
-  /* 11   */ V(0, 7, 2),
-
-  /* 0001 0010 ... */
-  /* 00   */ V(7, 0, 2),	/* 236 */
-  /* 01   */ V(3, 6, 2),
-  /* 10   */ V(6, 3, 2),
-  /* 11   */ V(4, 5, 2),
-
-  /* 0001 0011 ... */
-  /* 00   */ V(5, 4, 2),	/* 240 */
-  /* 01   */ V(2, 6, 2),
-  /* 10   */ V(6, 2, 2),
-  /* 11   */ V(3, 5, 2),
-
-  /* 0001 0101 ... */
-  /* 0    */ V(0, 8, 1),	/* 244 */
-  /* 1    */ V(8, 0, 1),
-
-  /* 0001 0110 ... */
-  /* 0    */ V(1, 6, 1),	/* 246 */
-  /* 1    */ V(6, 1, 1),
-
-  /* 0001 0111 ... */
-  /* 0    */ V(0, 6, 1),	/* 248 */
-  /* 1    */ V(6, 0, 1),
-
-  /* 0001 1000 ... */
-  /* 00   */ V(5, 3, 2),	/* 250 */
-  /* 01   */ V(4, 4, 2),
-  /* 10   */ V(2, 5, 1),
-  /* 11   */ V(2, 5, 1),
-
-  /* 0001 1001 ... */
-  /* 0    */ V(5, 2, 1),	/* 254 */
-  /* 1    */ V(0, 5, 1),
-
-  /* 0001 1100 ... */
-  /* 0    */ V(3, 4, 1),	/* 256 */
-  /* 1    */ V(4, 3, 1),
-
-  /* 0001 1101 ... */
-  /* 0    */ V(5, 0, 1),	/* 258 */
-  /* 1    */ V(2, 4, 1),
-
-  /* 0001 1110 ... */
-  /* 0    */ V(4, 2, 1),	/* 260 */
-  /* 1    */ V(3, 3, 1),
-
-  /* 0000 0000 0000 ... */
-  /* 0000 */ PTR(388, 3),	/* 262 */
-  /* 0001 */ V(15, 15, 4),
-  /* 0010 */ V(14, 15, 4),
-  /* 0011 */ V(13, 15, 4),
-  /* 0100 */ V(14, 14, 4),
-  /* 0101 */ V(12, 15, 4),
-  /* 0110 */ V(13, 14, 4),
-  /* 0111 */ V(11, 15, 4),
-  /* 1000 */ V(15, 11, 4),
-  /* 1001 */ V(12, 14, 4),
-  /* 1010 */ V(13, 12, 4),
-  /* 1011 */ PTR(396, 1),
-  /* 1100 */ V(14, 12, 3),
-  /* 1101 */ V(14, 12, 3),
-  /* 1110 */ V(13, 13, 3),
-  /* 1111 */ V(13, 13, 3),
-
-  /* 0000 0000 0001 ... */
-  /* 0000 */ V(15, 10, 4),	/* 278 */
-  /* 0001 */ V(12, 13, 4),
-  /* 0010 */ V(11, 14, 3),
-  /* 0011 */ V(11, 14, 3),
-  /* 0100 */ V(14, 11, 3),
-  /* 0101 */ V(14, 11, 3),
-  /* 0110 */ V(9, 15, 3),
-  /* 0111 */ V(9, 15, 3),
-  /* 1000 */ V(15, 9, 3),
-  /* 1001 */ V(15, 9, 3),
-  /* 1010 */ V(14, 10, 3),
-  /* 1011 */ V(14, 10, 3),
-  /* 1100 */ V(11, 13, 3),
-  /* 1101 */ V(11, 13, 3),
-  /* 1110 */ V(13, 11, 3),
-  /* 1111 */ V(13, 11, 3),
-
-  /* 0000 0000 0010 ... */
-  /* 0000 */ V(8, 15, 3),	/* 294 */
-  /* 0001 */ V(8, 15, 3),
-  /* 0010 */ V(15, 8, 3),
-  /* 0011 */ V(15, 8, 3),
-  /* 0100 */ V(12, 12, 3),
-  /* 0101 */ V(12, 12, 3),
-  /* 0110 */ V(10, 14, 4),
-  /* 0111 */ V(9, 14, 4),
-  /* 1000 */ V(8, 14, 3),
-  /* 1001 */ V(8, 14, 3),
-  /* 1010 */ V(7, 15, 4),
-  /* 1011 */ V(7, 14, 4),
-  /* 1100 */ V(15, 7, 2),
-  /* 1101 */ V(15, 7, 2),
-  /* 1110 */ V(15, 7, 2),
-  /* 1111 */ V(15, 7, 2),
-
-  /* 0000 0000 0011 ... */
-  /* 000  */ V(13, 10, 2),	/* 310 */
-  /* 001  */ V(13, 10, 2),
-  /* 010  */ V(10, 13, 3),
-  /* 011  */ V(11, 12, 3),
-  /* 100  */ V(12, 11, 3),
-  /* 101  */ V(15, 6, 3),
-  /* 110  */ V(6, 15, 2),
-  /* 111  */ V(6, 15, 2),
-
-  /* 0000 0000 0100 ... */
-  /* 00   */ V(14, 8, 2),	/* 318 */
-  /* 01   */ V(5, 15, 2),
-  /* 10   */ V(9, 13, 2),
-  /* 11   */ V(13, 9, 2),
-
-  /* 0000 0000 0101 ... */
-  /* 00   */ V(15, 5, 2),	/* 322 */
-  /* 01   */ V(14, 7, 2),
-  /* 10   */ V(10, 12, 2),
-  /* 11   */ V(11, 11, 2),
-
-  /* 0000 0000 0110 ... */
-  /* 000  */ V(4, 15, 2),	/* 326 */
-  /* 001  */ V(4, 15, 2),
-  /* 010  */ V(15, 4, 2),
-  /* 011  */ V(15, 4, 2),
-  /* 100  */ V(12, 10, 3),
-  /* 101  */ V(14, 6, 3),
-  /* 110  */ V(15, 3, 2),
-  /* 111  */ V(15, 3, 2),
-
-  /* 0000 0000 0111 ... */
-  /* 00   */ V(3, 15, 1),	/* 334 */
-  /* 01   */ V(3, 15, 1),
-  /* 10   */ V(8, 13, 2),
-  /* 11   */ V(13, 8, 2),
-
-  /* 0000 0000 1000 ... */
-  /* 0    */ V(2, 15, 1),	/* 338 */
-  /* 1    */ V(15, 2, 1),
-
-  /* 0000 0000 1001 ... */
-  /* 00   */ V(6, 14, 2),	/* 340 */
-  /* 01   */ V(9, 12, 2),
-  /* 10   */ V(0, 15, 1),
-  /* 11   */ V(0, 15, 1),
-
-  /* 0000 0000 1010 ... */
-  /* 00   */ V(12, 9, 2),	/* 344 */
-  /* 01   */ V(5, 14, 2),
-  /* 10   */ V(10, 11, 1),
-  /* 11   */ V(10, 11, 1),
-
-  /* 0000 0000 1011 ... */
-  /* 00   */ V(7, 13, 2),	/* 348 */
-  /* 01   */ V(13, 7, 2),
-  /* 10   */ V(4, 14, 1),
-  /* 11   */ V(4, 14, 1),
-
-  /* 0000 0000 1100 ... */
-  /* 00   */ V(12, 8, 2),	/* 352 */
-  /* 01   */ V(13, 6, 2),
-  /* 10   */ V(3, 14, 1),
-  /* 11   */ V(3, 14, 1),
-
-  /* 0000 0000 1101 ... */
-  /* 00   */ V(11, 9, 1),	/* 356 */
-  /* 01   */ V(11, 9, 1),
-  /* 10   */ V(9, 11, 2),
-  /* 11   */ V(10, 10, 2),
-
-  /* 0000 0001 0001 ... */
-  /* 0    */ V(11, 10, 1),	/* 360 */
-  /* 1    */ V(14, 5, 1),
-
-  /* 0000 0001 0010 ... */
-  /* 0    */ V(14, 4, 1),	/* 362 */
-  /* 1    */ V(8, 12, 1),
-
-  /* 0000 0001 0011 ... */
-  /* 0    */ V(6, 13, 1),	/* 364 */
-  /* 1    */ V(14, 3, 1),
-
-  /* 0000 0001 0101 ... */
-  /* 0    */ V(2, 14, 1),	/* 366 */
-  /* 1    */ V(0, 14, 1),
-
-  /* 0000 0001 1000 ... */
-  /* 0    */ V(14, 0, 1),	/* 368 */
-  /* 1    */ V(5, 13, 1),
-
-  /* 0000 0001 1001 ... */
-  /* 0    */ V(13, 5, 1),	/* 370 */
-  /* 1    */ V(7, 12, 1),
-
-  /* 0000 0001 1010 ... */
-  /* 0    */ V(12, 7, 1),	/* 372 */
-  /* 1    */ V(4, 13, 1),
-
-  /* 0000 0001 1011 ... */
-  /* 0    */ V(8, 11, 1),	/* 374 */
-  /* 1    */ V(11, 8, 1),
-
-  /* 0000 0001 1100 ... */
-  /* 0    */ V(13, 4, 1),	/* 376 */
-  /* 1    */ V(9, 10, 1),
-
-  /* 0000 0001 1101 ... */
-  /* 0    */ V(10, 9, 1),	/* 378 */
-  /* 1    */ V(6, 12, 1),
-
-  /* 0000 0010 0000 ... */
-  /* 0    */ V(13, 3, 1),	/* 380 */
-  /* 1    */ V(7, 11, 1),
-
-  /* 0000 0010 0101 ... */
-  /* 0    */ V(5, 12, 1),	/* 382 */
-  /* 1    */ V(12, 5, 1),
-
-  /* 0000 0010 0110 ... */
-  /* 0    */ V(9, 9, 1),	/* 384 */
-  /* 1    */ V(7, 10, 1),
-
-  /* 0000 0010 1000 ... */
-  /* 0    */ V(10, 7, 1),	/* 386 */
-  /* 1    */ V(9, 7, 1),
-
-  /* 0000 0000 0000 0000 ... */
-  /* 000  */ V(15, 14, 3),	/* 388 */
-  /* 001  */ V(15, 12, 3),
-  /* 010  */ V(15, 13, 2),
-  /* 011  */ V(15, 13, 2),
-  /* 100  */ V(14, 13, 1),
-  /* 101  */ V(14, 13, 1),
-  /* 110  */ V(14, 13, 1),
-  /* 111  */ V(14, 13, 1),
-
-  /* 0000 0000 0000 1011 ... */
-  /* 0    */ V(10, 15, 1),	/* 396 */
-  /* 1    */ V(14, 9, 1)
-};
-
-static
-struct huffpair const hufftab15[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ PTR(64, 4),
-  /* 0100 */ PTR(80, 4),
-  /* 0101 */ PTR(96, 3),
-  /* 0110 */ PTR(104, 3),
-  /* 0111 */ PTR(112, 2),
-  /* 1000 */ PTR(116, 1),
-  /* 1001 */ PTR(118, 1),
-  /* 1010 */ V(1, 1, 3),
-  /* 1011 */ V(1, 1, 3),
-  /* 1100 */ V(0, 1, 4),
-  /* 1101 */ V(1, 0, 4),
-  /* 1110 */ V(0, 0, 3),
-  /* 1111 */ V(0, 0, 3),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(120, 4),	/* 16 */
-  /* 0001 */ PTR(136, 4),
-  /* 0010 */ PTR(152, 4),
-  /* 0011 */ PTR(168, 4),
-  /* 0100 */ PTR(184, 4),
-  /* 0101 */ PTR(200, 3),
-  /* 0110 */ PTR(208, 3),
-  /* 0111 */ PTR(216, 4),
-  /* 1000 */ PTR(232, 3),
-  /* 1001 */ PTR(240, 3),
-  /* 1010 */ PTR(248, 3),
-  /* 1011 */ PTR(256, 3),
-  /* 1100 */ PTR(264, 2),
-  /* 1101 */ PTR(268, 3),
-  /* 1110 */ PTR(276, 3),
-  /* 1111 */ PTR(284, 2),
-
-  /* 0001 ... */
-  /* 0000 */ PTR(288, 2),	/* 32 */
-  /* 0001 */ PTR(292, 2),
-  /* 0010 */ PTR(296, 2),
-  /* 0011 */ PTR(300, 2),
-  /* 0100 */ PTR(304, 2),
-  /* 0101 */ PTR(308, 2),
-  /* 0110 */ PTR(312, 2),
-  /* 0111 */ PTR(316, 2),
-  /* 1000 */ PTR(320, 1),
-  /* 1001 */ PTR(322, 1),
-  /* 1010 */ PTR(324, 1),
-  /* 1011 */ PTR(326, 2),
-  /* 1100 */ PTR(330, 1),
-  /* 1101 */ PTR(332, 1),
-  /* 1110 */ PTR(334, 2),
-  /* 1111 */ PTR(338, 1),
-
-  /* 0010 ... */
-  /* 0000 */ PTR(340, 1),	/* 48 */
-  /* 0001 */ PTR(342, 1),
-  /* 0010 */ V(9, 1, 4),
-  /* 0011 */ PTR(344, 1),
-  /* 0100 */ PTR(346, 1),
-  /* 0101 */ PTR(348, 1),
-  /* 0110 */ PTR(350, 1),
-  /* 0111 */ PTR(352, 1),
-  /* 1000 */ V(2, 8, 4),
-  /* 1001 */ V(8, 2, 4),
-  /* 1010 */ V(1, 8, 4),
-  /* 1011 */ V(8, 1, 4),
-  /* 1100 */ PTR(354, 1),
-  /* 1101 */ PTR(356, 1),
-  /* 1110 */ PTR(358, 1),
-  /* 1111 */ PTR(360, 1),
-
-  /* 0011 ... */
-  /* 0000 */ V(2, 7, 4),	/* 64 */
-  /* 0001 */ V(7, 2, 4),
-  /* 0010 */ V(6, 4, 4),
-  /* 0011 */ V(1, 7, 4),
-  /* 0100 */ V(5, 5, 4),
-  /* 0101 */ V(7, 1, 4),
-  /* 0110 */ PTR(362, 1),
-  /* 0111 */ V(3, 6, 4),
-  /* 1000 */ V(6, 3, 4),
-  /* 1001 */ V(4, 5, 4),
-  /* 1010 */ V(5, 4, 4),
-  /* 1011 */ V(2, 6, 4),
-  /* 1100 */ V(6, 2, 4),
-  /* 1101 */ V(1, 6, 4),
-  /* 1110 */ PTR(364, 1),
-  /* 1111 */ V(3, 5, 4),
-
-  /* 0100 ... */
-  /* 0000 */ V(6, 1, 3),	/* 80 */
-  /* 0001 */ V(6, 1, 3),
-  /* 0010 */ V(5, 3, 4),
-  /* 0011 */ V(4, 4, 4),
-  /* 0100 */ V(2, 5, 3),
-  /* 0101 */ V(2, 5, 3),
-  /* 0110 */ V(5, 2, 3),
-  /* 0111 */ V(5, 2, 3),
-  /* 1000 */ V(1, 5, 3),
-  /* 1001 */ V(1, 5, 3),
-  /* 1010 */ V(5, 1, 3),
-  /* 1011 */ V(5, 1, 3),
-  /* 1100 */ V(0, 5, 4),
-  /* 1101 */ V(5, 0, 4),
-  /* 1110 */ V(3, 4, 3),
-  /* 1111 */ V(3, 4, 3),
-
-  /* 0101 ... */
-  /* 000  */ V(4, 3, 3),	/* 96 */
-  /* 001  */ V(2, 4, 3),
-  /* 010  */ V(4, 2, 3),
-  /* 011  */ V(3, 3, 3),
-  /* 100  */ V(4, 1, 2),
-  /* 101  */ V(4, 1, 2),
-  /* 110  */ V(1, 4, 3),
-  /* 111  */ V(0, 4, 3),
-
-  /* 0110 ... */
-  /* 000  */ V(2, 3, 2),	/* 104 */
-  /* 001  */ V(2, 3, 2),
-  /* 010  */ V(3, 2, 2),
-  /* 011  */ V(3, 2, 2),
-  /* 100  */ V(4, 0, 3),
-  /* 101  */ V(0, 3, 3),
-  /* 110  */ V(1, 3, 2),
-  /* 111  */ V(1, 3, 2),
-
-  /* 0111 ... */
-  /* 00   */ V(3, 1, 2),	/* 112 */
-  /* 01   */ V(3, 0, 2),
-  /* 10   */ V(2, 2, 1),
-  /* 11   */ V(2, 2, 1),
-
-  /* 1000 ... */
-  /* 0    */ V(1, 2, 1),	/* 116 */
-  /* 1    */ V(2, 1, 1),
-
-  /* 1001 ... */
-  /* 0    */ V(0, 2, 1),	/* 118 */
-  /* 1    */ V(2, 0, 1),
-
-  /* 0000 0000 ... */
-  /* 0000 */ PTR(366, 1),	/* 120 */
-  /* 0001 */ PTR(368, 1),
-  /* 0010 */ V(14, 14, 4),
-  /* 0011 */ PTR(370, 1),
-  /* 0100 */ PTR(372, 1),
-  /* 0101 */ PTR(374, 1),
-  /* 0110 */ V(15, 11, 4),
-  /* 0111 */ PTR(376, 1),
-  /* 1000 */ V(13, 13, 4),
-  /* 1001 */ V(10, 15, 4),
-  /* 1010 */ V(15, 10, 4),
-  /* 1011 */ V(11, 14, 4),
-  /* 1100 */ V(14, 11, 4),
-  /* 1101 */ V(12, 13, 4),
-  /* 1110 */ V(13, 12, 4),
-  /* 1111 */ V(9, 15, 4),
-
-  /* 0000 0001 ... */
-  /* 0000 */ V(15, 9, 4),	/* 136 */
-  /* 0001 */ V(14, 10, 4),
-  /* 0010 */ V(11, 13, 4),
-  /* 0011 */ V(13, 11, 4),
-  /* 0100 */ V(8, 15, 4),
-  /* 0101 */ V(15, 8, 4),
-  /* 0110 */ V(12, 12, 4),
-  /* 0111 */ V(9, 14, 4),
-  /* 1000 */ V(14, 9, 4),
-  /* 1001 */ V(7, 15, 4),
-  /* 1010 */ V(15, 7, 4),
-  /* 1011 */ V(10, 13, 4),
-  /* 1100 */ V(13, 10, 4),
-  /* 1101 */ V(11, 12, 4),
-  /* 1110 */ V(6, 15, 4),
-  /* 1111 */ PTR(378, 1),
-
-  /* 0000 0010 ... */
-  /* 0000 */ V(12, 11, 3),	/* 152 */
-  /* 0001 */ V(12, 11, 3),
-  /* 0010 */ V(15, 6, 3),
-  /* 0011 */ V(15, 6, 3),
-  /* 0100 */ V(8, 14, 4),
-  /* 0101 */ V(14, 8, 4),
-  /* 0110 */ V(5, 15, 4),
-  /* 0111 */ V(9, 13, 4),
-  /* 1000 */ V(15, 5, 3),
-  /* 1001 */ V(15, 5, 3),
-  /* 1010 */ V(7, 14, 3),
-  /* 1011 */ V(7, 14, 3),
-  /* 1100 */ V(14, 7, 3),
-  /* 1101 */ V(14, 7, 3),
-  /* 1110 */ V(10, 12, 3),
-  /* 1111 */ V(10, 12, 3),
-
-  /* 0000 0011 ... */
-  /* 0000 */ V(12, 10, 3),	/* 168 */
-  /* 0001 */ V(12, 10, 3),
-  /* 0010 */ V(11, 11, 3),
-  /* 0011 */ V(11, 11, 3),
-  /* 0100 */ V(13, 9, 4),
-  /* 0101 */ V(8, 13, 4),
-  /* 0110 */ V(4, 15, 3),
-  /* 0111 */ V(4, 15, 3),
-  /* 1000 */ V(15, 4, 3),
-  /* 1001 */ V(15, 4, 3),
-  /* 1010 */ V(3, 15, 3),
-  /* 1011 */ V(3, 15, 3),
-  /* 1100 */ V(15, 3, 3),
-  /* 1101 */ V(15, 3, 3),
-  /* 1110 */ V(13, 8, 3),
-  /* 1111 */ V(13, 8, 3),
-
-  /* 0000 0100 ... */
-  /* 0000 */ V(14, 6, 3),	/* 184 */
-  /* 0001 */ V(14, 6, 3),
-  /* 0010 */ V(2, 15, 3),
-  /* 0011 */ V(2, 15, 3),
-  /* 0100 */ V(15, 2, 3),
-  /* 0101 */ V(15, 2, 3),
-  /* 0110 */ V(6, 14, 4),
-  /* 0111 */ V(15, 0, 4),
-  /* 1000 */ V(1, 15, 3),
-  /* 1001 */ V(1, 15, 3),
-  /* 1010 */ V(15, 1, 3),
-  /* 1011 */ V(15, 1, 3),
-  /* 1100 */ V(9, 12, 3),
-  /* 1101 */ V(9, 12, 3),
-  /* 1110 */ V(12, 9, 3),
-  /* 1111 */ V(12, 9, 3),
-
-  /* 0000 0101 ... */
-  /* 000  */ V(5, 14, 3),	/* 200 */
-  /* 001  */ V(10, 11, 3),
-  /* 010  */ V(11, 10, 3),
-  /* 011  */ V(14, 5, 3),
-  /* 100  */ V(7, 13, 3),
-  /* 101  */ V(13, 7, 3),
-  /* 110  */ V(4, 14, 3),
-  /* 111  */ V(14, 4, 3),
-
-  /* 0000 0110 ... */
-  /* 000  */ V(8, 12, 3),	/* 208 */
-  /* 001  */ V(12, 8, 3),
-  /* 010  */ V(3, 14, 3),
-  /* 011  */ V(6, 13, 3),
-  /* 100  */ V(13, 6, 3),
-  /* 101  */ V(14, 3, 3),
-  /* 110  */ V(9, 11, 3),
-  /* 111  */ V(11, 9, 3),
-
-  /* 0000 0111 ... */
-  /* 0000 */ V(2, 14, 3),	/* 216 */
-  /* 0001 */ V(2, 14, 3),
-  /* 0010 */ V(10, 10, 3),
-  /* 0011 */ V(10, 10, 3),
-  /* 0100 */ V(14, 2, 3),
-  /* 0101 */ V(14, 2, 3),
-  /* 0110 */ V(1, 14, 3),
-  /* 0111 */ V(1, 14, 3),
-  /* 1000 */ V(14, 1, 3),
-  /* 1001 */ V(14, 1, 3),
-  /* 1010 */ V(0, 14, 4),
-  /* 1011 */ V(14, 0, 4),
-  /* 1100 */ V(5, 13, 3),
-  /* 1101 */ V(5, 13, 3),
-  /* 1110 */ V(13, 5, 3),
-  /* 1111 */ V(13, 5, 3),
-
-  /* 0000 1000 ... */
-  /* 000  */ V(7, 12, 3),	/* 232 */
-  /* 001  */ V(12, 7, 3),
-  /* 010  */ V(4, 13, 3),
-  /* 011  */ V(8, 11, 3),
-  /* 100  */ V(13, 4, 2),
-  /* 101  */ V(13, 4, 2),
-  /* 110  */ V(11, 8, 3),
-  /* 111  */ V(9, 10, 3),
-
-  /* 0000 1001 ... */
-  /* 000  */ V(10, 9, 3),	/* 240 */
-  /* 001  */ V(6, 12, 3),
-  /* 010  */ V(12, 6, 3),
-  /* 011  */ V(3, 13, 3),
-  /* 100  */ V(13, 3, 2),
-  /* 101  */ V(13, 3, 2),
-  /* 110  */ V(13, 2, 2),
-  /* 111  */ V(13, 2, 2),
-
-  /* 0000 1010 ... */
-  /* 000  */ V(2, 13, 3),	/* 248 */
-  /* 001  */ V(0, 13, 3),
-  /* 010  */ V(1, 13, 2),
-  /* 011  */ V(1, 13, 2),
-  /* 100  */ V(7, 11, 2),
-  /* 101  */ V(7, 11, 2),
-  /* 110  */ V(11, 7, 2),
-  /* 111  */ V(11, 7, 2),
-
-  /* 0000 1011 ... */
-  /* 000  */ V(13, 1, 2),	/* 256 */
-  /* 001  */ V(13, 1, 2),
-  /* 010  */ V(5, 12, 3),
-  /* 011  */ V(13, 0, 3),
-  /* 100  */ V(12, 5, 2),
-  /* 101  */ V(12, 5, 2),
-  /* 110  */ V(8, 10, 2),
-  /* 111  */ V(8, 10, 2),
-
-  /* 0000 1100 ... */
-  /* 00   */ V(10, 8, 2),	/* 264 */
-  /* 01   */ V(4, 12, 2),
-  /* 10   */ V(12, 4, 2),
-  /* 11   */ V(6, 11, 2),
-
-  /* 0000 1101 ... */
-  /* 000  */ V(11, 6, 2),	/* 268 */
-  /* 001  */ V(11, 6, 2),
-  /* 010  */ V(9, 9, 3),
-  /* 011  */ V(0, 12, 3),
-  /* 100  */ V(3, 12, 2),
-  /* 101  */ V(3, 12, 2),
-  /* 110  */ V(12, 3, 2),
-  /* 111  */ V(12, 3, 2),
-
-  /* 0000 1110 ... */
-  /* 000  */ V(7, 10, 2),	/* 276 */
-  /* 001  */ V(7, 10, 2),
-  /* 010  */ V(10, 7, 2),
-  /* 011  */ V(10, 7, 2),
-  /* 100  */ V(10, 6, 2),
-  /* 101  */ V(10, 6, 2),
-  /* 110  */ V(12, 0, 3),
-  /* 111  */ V(0, 11, 3),
-
-  /* 0000 1111 ... */
-  /* 00   */ V(12, 2, 1),	/* 284 */
-  /* 01   */ V(12, 2, 1),
-  /* 10   */ V(2, 12, 2),
-  /* 11   */ V(5, 11, 2),
-
-  /* 0001 0000 ... */
-  /* 00   */ V(11, 5, 2),	/* 288 */
-  /* 01   */ V(1, 12, 2),
-  /* 10   */ V(8, 9, 2),
-  /* 11   */ V(9, 8, 2),
-
-  /* 0001 0001 ... */
-  /* 00   */ V(12, 1, 2),	/* 292 */
-  /* 01   */ V(4, 11, 2),
-  /* 10   */ V(11, 4, 2),
-  /* 11   */ V(6, 10, 2),
-
-  /* 0001 0010 ... */
-  /* 00   */ V(3, 11, 2),	/* 296 */
-  /* 01   */ V(7, 9, 2),
-  /* 10   */ V(11, 3, 1),
-  /* 11   */ V(11, 3, 1),
-
-  /* 0001 0011 ... */
-  /* 00   */ V(9, 7, 2),	/* 300 */
-  /* 01   */ V(8, 8, 2),
-  /* 10   */ V(2, 11, 2),
-  /* 11   */ V(5, 10, 2),
-
-  /* 0001 0100 ... */
-  /* 00   */ V(11, 2, 1),	/* 304 */
-  /* 01   */ V(11, 2, 1),
-  /* 10   */ V(10, 5, 2),
-  /* 11   */ V(1, 11, 2),
-
-  /* 0001 0101 ... */
-  /* 00   */ V(11, 1, 1),	/* 308 */
-  /* 01   */ V(11, 1, 1),
-  /* 10   */ V(11, 0, 2),
-  /* 11   */ V(6, 9, 2),
-
-  /* 0001 0110 ... */
-  /* 00   */ V(9, 6, 2),	/* 312 */
-  /* 01   */ V(4, 10, 2),
-  /* 10   */ V(10, 4, 2),
-  /* 11   */ V(7, 8, 2),
-
-  /* 0001 0111 ... */
-  /* 00   */ V(8, 7, 2),	/* 316 */
-  /* 01   */ V(3, 10, 2),
-  /* 10   */ V(10, 3, 1),
-  /* 11   */ V(10, 3, 1),
-
-  /* 0001 1000 ... */
-  /* 0    */ V(5, 9, 1),	/* 320 */
-  /* 1    */ V(9, 5, 1),
-
-  /* 0001 1001 ... */
-  /* 0    */ V(2, 10, 1),	/* 322 */
-  /* 1    */ V(10, 2, 1),
-
-  /* 0001 1010 ... */
-  /* 0    */ V(1, 10, 1),	/* 324 */
-  /* 1    */ V(10, 1, 1),
-
-  /* 0001 1011 ... */
-  /* 00   */ V(0, 10, 2),	/* 326 */
-  /* 01   */ V(10, 0, 2),
-  /* 10   */ V(6, 8, 1),
-  /* 11   */ V(6, 8, 1),
-
-  /* 0001 1100 ... */
-  /* 0    */ V(8, 6, 1),	/* 330 */
-  /* 1    */ V(4, 9, 1),
-
-  /* 0001 1101 ... */
-  /* 0    */ V(9, 4, 1),	/* 332 */
-  /* 1    */ V(3, 9, 1),
-
-  /* 0001 1110 ... */
-  /* 00   */ V(9, 3, 1),	/* 334 */
-  /* 01   */ V(9, 3, 1),
-  /* 10   */ V(7, 7, 2),
-  /* 11   */ V(0, 9, 2),
-
-  /* 0001 1111 ... */
-  /* 0    */ V(5, 8, 1),	/* 338 */
-  /* 1    */ V(8, 5, 1),
-
-  /* 0010 0000 ... */
-  /* 0    */ V(2, 9, 1),	/* 340 */
-  /* 1    */ V(6, 7, 1),
-
-  /* 0010 0001 ... */
-  /* 0    */ V(7, 6, 1),	/* 342 */
-  /* 1    */ V(9, 2, 1),
-
-  /* 0010 0011 ... */
-  /* 0    */ V(1, 9, 1),	/* 344 */
-  /* 1    */ V(9, 0, 1),
-
-  /* 0010 0100 ... */
-  /* 0    */ V(4, 8, 1),	/* 346 */
-  /* 1    */ V(8, 4, 1),
-
-  /* 0010 0101 ... */
-  /* 0    */ V(5, 7, 1),	/* 348 */
-  /* 1    */ V(7, 5, 1),
-
-  /* 0010 0110 ... */
-  /* 0    */ V(3, 8, 1),	/* 350 */
-  /* 1    */ V(8, 3, 1),
-
-  /* 0010 0111 ... */
-  /* 0    */ V(6, 6, 1),	/* 352 */
-  /* 1    */ V(4, 7, 1),
-
-  /* 0010 1100 ... */
-  /* 0    */ V(7, 4, 1),	/* 354 */
-  /* 1    */ V(0, 8, 1),
-
-  /* 0010 1101 ... */
-  /* 0    */ V(8, 0, 1),	/* 356 */
-  /* 1    */ V(5, 6, 1),
-
-  /* 0010 1110 ... */
-  /* 0    */ V(6, 5, 1),	/* 358 */
-  /* 1    */ V(3, 7, 1),
-
-  /* 0010 1111 ... */
-  /* 0    */ V(7, 3, 1),	/* 360 */
-  /* 1    */ V(4, 6, 1),
-
-  /* 0011 0110 ... */
-  /* 0    */ V(0, 7, 1),	/* 362 */
-  /* 1    */ V(7, 0, 1),
-
-  /* 0011 1110 ... */
-  /* 0    */ V(0, 6, 1),	/* 364 */
-  /* 1    */ V(6, 0, 1),
-
-  /* 0000 0000 0000 ... */
-  /* 0    */ V(15, 15, 1),	/* 366 */
-  /* 1    */ V(14, 15, 1),
-
-  /* 0000 0000 0001 ... */
-  /* 0    */ V(15, 14, 1),	/* 368 */
-  /* 1    */ V(13, 15, 1),
-
-  /* 0000 0000 0011 ... */
-  /* 0    */ V(15, 13, 1),	/* 370 */
-  /* 1    */ V(12, 15, 1),
-
-  /* 0000 0000 0100 ... */
-  /* 0    */ V(15, 12, 1),	/* 372 */
-  /* 1    */ V(13, 14, 1),
-
-  /* 0000 0000 0101 ... */
-  /* 0    */ V(14, 13, 1),	/* 374 */
-  /* 1    */ V(11, 15, 1),
-
-  /* 0000 0000 0111 ... */
-  /* 0    */ V(12, 14, 1),	/* 376 */
-  /* 1    */ V(14, 12, 1),
-
-  /* 0000 0001 1111 ... */
-  /* 0    */ V(10, 14, 1),	/* 378 */
-  /* 1    */ V(0, 15, 1)
-};
-
-static
-struct huffpair const hufftab16[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ PTR(64, 2),
-  /* 0100 */ V(1, 1, 4),
-  /* 0101 */ V(0, 1, 4),
-  /* 0110 */ V(1, 0, 3),
-  /* 0111 */ V(1, 0, 3),
-  /* 1000 */ V(0, 0, 1),
-  /* 1001 */ V(0, 0, 1),
-  /* 1010 */ V(0, 0, 1),
-  /* 1011 */ V(0, 0, 1),
-  /* 1100 */ V(0, 0, 1),
-  /* 1101 */ V(0, 0, 1),
-  /* 1110 */ V(0, 0, 1),
-  /* 1111 */ V(0, 0, 1),
-
-  /* 0000 ... */
-  /* 0000 */ PTR(68, 3),	/* 16 */
-  /* 0001 */ PTR(76, 3),
-  /* 0010 */ PTR(84, 2),
-  /* 0011 */ V(15, 15, 4),
-  /* 0100 */ PTR(88, 2),
-  /* 0101 */ PTR(92, 1),
-  /* 0110 */ PTR(94, 4),
-  /* 0111 */ V(15, 2, 4),
-  /* 1000 */ PTR(110, 1),
-  /* 1001 */ V(1, 15, 4),
-  /* 1010 */ V(15, 1, 4),
-  /* 1011 */ PTR(112, 4),
-  /* 1100 */ PTR(128, 4),
-  /* 1101 */ PTR(144, 4),
-  /* 1110 */ PTR(160, 4),
-  /* 1111 */ PTR(176, 4),
-
-  /* 0001 ... */
-  /* 0000 */ PTR(192, 4),	/* 32 */
-  /* 0001 */ PTR(208, 3),
-  /* 0010 */ PTR(216, 3),
-  /* 0011 */ PTR(224, 3),
-  /* 0100 */ PTR(232, 3),
-  /* 0101 */ PTR(240, 3),
-  /* 0110 */ PTR(248, 3),
-  /* 0111 */ PTR(256, 3),
-  /* 1000 */ PTR(264, 2),
-  /* 1001 */ PTR(268, 2),
-  /* 1010 */ PTR(272, 1),
-  /* 1011 */ PTR(274, 2),
-  /* 1100 */ PTR(278, 2),
-  /* 1101 */ PTR(282, 1),
-  /* 1110 */ V(5, 1, 4),
-  /* 1111 */ PTR(284, 1),
-
-  /* 0010 ... */
-  /* 0000 */ PTR(286, 1),	/* 48 */
-  /* 0001 */ PTR(288, 1),
-  /* 0010 */ PTR(290, 1),
-  /* 0011 */ V(1, 4, 4),
-  /* 0100 */ V(4, 1, 4),
-  /* 0101 */ PTR(292, 1),
-  /* 0110 */ V(2, 3, 4),
-  /* 0111 */ V(3, 2, 4),
-  /* 1000 */ V(1, 3, 3),
-  /* 1001 */ V(1, 3, 3),
-  /* 1010 */ V(3, 1, 3),
-  /* 1011 */ V(3, 1, 3),
-  /* 1100 */ V(0, 3, 4),
-  /* 1101 */ V(3, 0, 4),
-  /* 1110 */ V(2, 2, 3),
-  /* 1111 */ V(2, 2, 3),
-
-  /* 0011 ... */
-  /* 00   */ V(1, 2, 2),	/* 64 */
-  /* 01   */ V(2, 1, 2),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0000 0000 ... */
-  /* 000  */ V(14, 15, 3),	/* 68 */
-  /* 001  */ V(15, 14, 3),
-  /* 010  */ V(13, 15, 3),
-  /* 011  */ V(15, 13, 3),
-  /* 100  */ V(12, 15, 3),
-  /* 101  */ V(15, 12, 3),
-  /* 110  */ V(11, 15, 3),
-  /* 111  */ V(15, 11, 3),
-
-  /* 0000 0001 ... */
-  /* 000  */ V(10, 15, 2),	/* 76 */
-  /* 001  */ V(10, 15, 2),
-  /* 010  */ V(15, 10, 3),
-  /* 011  */ V(9, 15, 3),
-  /* 100  */ V(15, 9, 3),
-  /* 101  */ V(15, 8, 3),
-  /* 110  */ V(8, 15, 2),
-  /* 111  */ V(8, 15, 2),
-
-  /* 0000 0010 ... */
-  /* 00   */ V(7, 15, 2),	/* 84 */
-  /* 01   */ V(15, 7, 2),
-  /* 10   */ V(6, 15, 2),
-  /* 11   */ V(15, 6, 2),
-
-  /* 0000 0100 ... */
-  /* 00   */ V(5, 15, 2),	/* 88 */
-  /* 01   */ V(15, 5, 2),
-  /* 10   */ V(4, 15, 1),
-  /* 11   */ V(4, 15, 1),
-
-  /* 0000 0101 ... */
-  /* 0    */ V(15, 4, 1),	/* 92 */
-  /* 1    */ V(15, 3, 1),
-
-  /* 0000 0110 ... */
-  /* 0000 */ V(15, 0, 1),	/* 94 */
-  /* 0001 */ V(15, 0, 1),
-  /* 0010 */ V(15, 0, 1),
-  /* 0011 */ V(15, 0, 1),
-  /* 0100 */ V(15, 0, 1),
-  /* 0101 */ V(15, 0, 1),
-  /* 0110 */ V(15, 0, 1),
-  /* 0111 */ V(15, 0, 1),
-  /* 1000 */ V(3, 15, 2),
-  /* 1001 */ V(3, 15, 2),
-  /* 1010 */ V(3, 15, 2),
-  /* 1011 */ V(3, 15, 2),
-  /* 1100 */ PTR(294, 4),
-  /* 1101 */ PTR(310, 3),
-  /* 1110 */ PTR(318, 3),
-  /* 1111 */ PTR(326, 3),
-
-  /* 0000 1000 ... */
-  /* 0    */ V(2, 15, 1),	/* 110 */
-  /* 1    */ V(0, 15, 1),
-
-  /* 0000 1011 ... */
-  /* 0000 */ PTR(334, 2),	/* 112 */
-  /* 0001 */ PTR(338, 2),
-  /* 0010 */ PTR(342, 2),
-  /* 0011 */ PTR(346, 1),
-  /* 0100 */ PTR(348, 2),
-  /* 0101 */ PTR(352, 2),
-  /* 0110 */ PTR(356, 1),
-  /* 0111 */ PTR(358, 2),
-  /* 1000 */ PTR(362, 2),
-  /* 1001 */ PTR(366, 2),
-  /* 1010 */ PTR(370, 2),
-  /* 1011 */ V(14, 3, 4),
-  /* 1100 */ PTR(374, 1),
-  /* 1101 */ PTR(376, 1),
-  /* 1110 */ PTR(378, 1),
-  /* 1111 */ PTR(380, 1),
-
-  /* 0000 1100 ... */
-  /* 0000 */ PTR(382, 1),	/* 128 */
-  /* 0001 */ PTR(384, 1),
-  /* 0010 */ PTR(386, 1),
-  /* 0011 */ V(0, 13, 4),
-  /* 0100 */ PTR(388, 1),
-  /* 0101 */ PTR(390, 1),
-  /* 0110 */ PTR(392, 1),
-  /* 0111 */ V(3, 12, 4),
-  /* 1000 */ PTR(394, 1),
-  /* 1001 */ V(1, 12, 4),
-  /* 1010 */ V(12, 0, 4),
-  /* 1011 */ PTR(396, 1),
-  /* 1100 */ V(14, 2, 3),
-  /* 1101 */ V(14, 2, 3),
-  /* 1110 */ V(2, 14, 4),
-  /* 1111 */ V(1, 14, 4),
-
-  /* 0000 1101 ... */
-  /* 0000 */ V(13, 3, 4),	/* 144 */
-  /* 0001 */ V(2, 13, 4),
-  /* 0010 */ V(13, 2, 4),
-  /* 0011 */ V(13, 1, 4),
-  /* 0100 */ V(3, 11, 4),
-  /* 0101 */ PTR(398, 1),
-  /* 0110 */ V(1, 13, 3),
-  /* 0111 */ V(1, 13, 3),
-  /* 1000 */ V(12, 4, 4),
-  /* 1001 */ V(6, 11, 4),
-  /* 1010 */ V(12, 3, 4),
-  /* 1011 */ V(10, 7, 4),
-  /* 1100 */ V(2, 12, 3),
-  /* 1101 */ V(2, 12, 3),
-  /* 1110 */ V(12, 2, 4),
-  /* 1111 */ V(11, 5, 4),
-
-  /* 0000 1110 ... */
-  /* 0000 */ V(12, 1, 4),	/* 160 */
-  /* 0001 */ V(0, 12, 4),
-  /* 0010 */ V(4, 11, 4),
-  /* 0011 */ V(11, 4, 4),
-  /* 0100 */ V(6, 10, 4),
-  /* 0101 */ V(10, 6, 4),
-  /* 0110 */ V(11, 3, 3),
-  /* 0111 */ V(11, 3, 3),
-  /* 1000 */ V(5, 10, 4),
-  /* 1001 */ V(10, 5, 4),
-  /* 1010 */ V(2, 11, 3),
-  /* 1011 */ V(2, 11, 3),
-  /* 1100 */ V(11, 2, 3),
-  /* 1101 */ V(11, 2, 3),
-  /* 1110 */ V(1, 11, 3),
-  /* 1111 */ V(1, 11, 3),
-
-  /* 0000 1111 ... */
-  /* 0000 */ V(11, 1, 3),	/* 176 */
-  /* 0001 */ V(11, 1, 3),
-  /* 0010 */ V(0, 11, 4),
-  /* 0011 */ V(11, 0, 4),
-  /* 0100 */ V(6, 9, 4),
-  /* 0101 */ V(9, 6, 4),
-  /* 0110 */ V(4, 10, 4),
-  /* 0111 */ V(10, 4, 4),
-  /* 1000 */ V(7, 8, 4),
-  /* 1001 */ V(8, 7, 4),
-  /* 1010 */ V(10, 3, 3),
-  /* 1011 */ V(10, 3, 3),
-  /* 1100 */ V(3, 10, 4),
-  /* 1101 */ V(5, 9, 4),
-  /* 1110 */ V(2, 10, 3),
-  /* 1111 */ V(2, 10, 3),
-
-  /* 0001 0000 ... */
-  /* 0000 */ V(9, 5, 4),	/* 192 */
-  /* 0001 */ V(6, 8, 4),
-  /* 0010 */ V(10, 1, 3),
-  /* 0011 */ V(10, 1, 3),
-  /* 0100 */ V(8, 6, 4),
-  /* 0101 */ V(7, 7, 4),
-  /* 0110 */ V(9, 4, 3),
-  /* 0111 */ V(9, 4, 3),
-  /* 1000 */ V(4, 9, 4),
-  /* 1001 */ V(5, 7, 4),
-  /* 1010 */ V(6, 7, 3),
-  /* 1011 */ V(6, 7, 3),
-  /* 1100 */ V(10, 2, 2),
-  /* 1101 */ V(10, 2, 2),
-  /* 1110 */ V(10, 2, 2),
-  /* 1111 */ V(10, 2, 2),
-
-  /* 0001 0001 ... */
-  /* 000  */ V(1, 10, 2),	/* 208 */
-  /* 001  */ V(1, 10, 2),
-  /* 010  */ V(0, 10, 3),
-  /* 011  */ V(10, 0, 3),
-  /* 100  */ V(3, 9, 3),
-  /* 101  */ V(9, 3, 3),
-  /* 110  */ V(5, 8, 3),
-  /* 111  */ V(8, 5, 3),
-
-  /* 0001 0010 ... */
-  /* 000  */ V(2, 9, 2),	/* 216 */
-  /* 001  */ V(2, 9, 2),
-  /* 010  */ V(9, 2, 2),
-  /* 011  */ V(9, 2, 2),
-  /* 100  */ V(7, 6, 3),
-  /* 101  */ V(0, 9, 3),
-  /* 110  */ V(1, 9, 2),
-  /* 111  */ V(1, 9, 2),
-
-  /* 0001 0011 ... */
-  /* 000  */ V(9, 1, 2),	/* 224 */
-  /* 001  */ V(9, 1, 2),
-  /* 010  */ V(9, 0, 3),
-  /* 011  */ V(4, 8, 3),
-  /* 100  */ V(8, 4, 3),
-  /* 101  */ V(7, 5, 3),
-  /* 110  */ V(3, 8, 3),
-  /* 111  */ V(8, 3, 3),
-
-  /* 0001 0100 ... */
-  /* 000  */ V(6, 6, 3),	/* 232 */
-  /* 001  */ V(2, 8, 3),
-  /* 010  */ V(8, 2, 2),
-  /* 011  */ V(8, 2, 2),
-  /* 100  */ V(4, 7, 3),
-  /* 101  */ V(7, 4, 3),
-  /* 110  */ V(1, 8, 2),
-  /* 111  */ V(1, 8, 2),
-
-  /* 0001 0101 ... */
-  /* 000  */ V(8, 1, 2),	/* 240 */
-  /* 001  */ V(8, 1, 2),
-  /* 010  */ V(8, 0, 2),
-  /* 011  */ V(8, 0, 2),
-  /* 100  */ V(0, 8, 3),
-  /* 101  */ V(5, 6, 3),
-  /* 110  */ V(3, 7, 2),
-  /* 111  */ V(3, 7, 2),
-
-  /* 0001 0110 ... */
-  /* 000  */ V(7, 3, 2),	/* 248 */
-  /* 001  */ V(7, 3, 2),
-  /* 010  */ V(6, 5, 3),
-  /* 011  */ V(4, 6, 3),
-  /* 100  */ V(2, 7, 2),
-  /* 101  */ V(2, 7, 2),
-  /* 110  */ V(7, 2, 2),
-  /* 111  */ V(7, 2, 2),
-
-  /* 0001 0111 ... */
-  /* 000  */ V(6, 4, 3),	/* 256 */
-  /* 001  */ V(5, 5, 3),
-  /* 010  */ V(0, 7, 2),
-  /* 011  */ V(0, 7, 2),
-  /* 100  */ V(1, 7, 1),
-  /* 101  */ V(1, 7, 1),
-  /* 110  */ V(1, 7, 1),
-  /* 111  */ V(1, 7, 1),
-
-  /* 0001 1000 ... */
-  /* 00   */ V(7, 1, 1),	/* 264  */
-  /* 01   */ V(7, 1, 1),
-  /* 10   */ V(7, 0, 2),
-  /* 11   */ V(3, 6, 2),
-
-  /* 0001 1001 ... */
-  /* 00   */ V(6, 3, 2),	/* 268 */
-  /* 01   */ V(4, 5, 2),
-  /* 10   */ V(5, 4, 2),
-  /* 11   */ V(2, 6, 2),
-
-  /* 0001 1010 ... */
-  /* 0    */ V(6, 2, 1),	/* 272 */
-  /* 1    */ V(1, 6, 1),
-
-  /* 0001 1011 ... */
-  /* 00   */ V(6, 1, 1),	/* 274 */
-  /* 01   */ V(6, 1, 1),
-  /* 10   */ V(0, 6, 2),
-  /* 11   */ V(6, 0, 2),
-
-  /* 0001 1100 ... */
-  /* 00   */ V(5, 3, 1),	/* 278 */
-  /* 01   */ V(5, 3, 1),
-  /* 10   */ V(3, 5, 2),
-  /* 11   */ V(4, 4, 2),
-
-  /* 0001 1101 ... */
-  /* 0    */ V(2, 5, 1),	/* 282 */
-  /* 1    */ V(5, 2, 1),
-
-  /* 0001 1111 ... */
-  /* 0    */ V(1, 5, 1),	/* 284 */
-  /* 1    */ V(0, 5, 1),
-
-  /* 0010 0000 ... */
-  /* 0    */ V(3, 4, 1),	/* 286 */
-  /* 1    */ V(4, 3, 1),
-
-  /* 0010 0001 ... */
-  /* 0    */ V(5, 0, 1),	/* 288 */
-  /* 1    */ V(2, 4, 1),
-
-  /* 0010 0010 ... */
-  /* 0    */ V(4, 2, 1),	/* 290 */
-  /* 1    */ V(3, 3, 1),
-
-  /* 0010 0101 ... */
-  /* 0    */ V(0, 4, 1),	/* 292 */
-  /* 1    */ V(4, 0, 1),
-
-  /* 0000 0110 1100 ... */
-  /* 0000 */ V(12, 14, 4),	/* 294 */
-  /* 0001 */ PTR(400, 1),
-  /* 0010 */ V(13, 14, 3),
-  /* 0011 */ V(13, 14, 3),
-  /* 0100 */ V(14, 9, 3),
-  /* 0101 */ V(14, 9, 3),
-  /* 0110 */ V(14, 10, 4),
-  /* 0111 */ V(13, 9, 4),
-  /* 1000 */ V(14, 14, 2),
-  /* 1001 */ V(14, 14, 2),
-  /* 1010 */ V(14, 14, 2),
-  /* 1011 */ V(14, 14, 2),
-  /* 1100 */ V(14, 13, 3),
-  /* 1101 */ V(14, 13, 3),
-  /* 1110 */ V(14, 11, 3),
-  /* 1111 */ V(14, 11, 3),
-
-  /* 0000 0110 1101 ... */
-  /* 000  */ V(11, 14, 2),	/* 310 */
-  /* 001  */ V(11, 14, 2),
-  /* 010  */ V(12, 13, 2),
-  /* 011  */ V(12, 13, 2),
-  /* 100  */ V(13, 12, 3),
-  /* 101  */ V(13, 11, 3),
-  /* 110  */ V(10, 14, 2),
-  /* 111  */ V(10, 14, 2),
-
-  /* 0000 0110 1110 ... */
-  /* 000  */ V(12, 12, 2),	/* 318 */
-  /* 001  */ V(12, 12, 2),
-  /* 010  */ V(10, 13, 3),
-  /* 011  */ V(13, 10, 3),
-  /* 100  */ V(7, 14, 3),
-  /* 101  */ V(10, 12, 3),
-  /* 110  */ V(12, 10, 2),
-  /* 111  */ V(12, 10, 2),
-
-  /* 0000 0110 1111 ... */
-  /* 000  */ V(12, 9, 3),	/* 326 */
-  /* 001  */ V(7, 13, 3),
-  /* 010  */ V(5, 14, 2),
-  /* 011  */ V(5, 14, 2),
-  /* 100  */ V(11, 13, 1),
-  /* 101  */ V(11, 13, 1),
-  /* 110  */ V(11, 13, 1),
-  /* 111  */ V(11, 13, 1),
-
-  /* 0000 1011 0000 ... */
-  /* 00   */ V(9, 14, 1),	/* 334 */
-  /* 01   */ V(9, 14, 1),
-  /* 10   */ V(11, 12, 2),
-  /* 11   */ V(12, 11, 2),
-
-  /* 0000 1011 0001 ... */
-  /* 00   */ V(8, 14, 2),	/* 338 */
-  /* 01   */ V(14, 8, 2),
-  /* 10   */ V(9, 13, 2),
-  /* 11   */ V(14, 7, 2),
-
-  /* 0000 1011 0010 ... */
-  /* 00   */ V(11, 11, 2),	/* 342 */
-  /* 01   */ V(8, 13, 2),
-  /* 10   */ V(13, 8, 2),
-  /* 11   */ V(6, 14, 2),
-
-  /* 0000 1011 0011 ... */
-  /* 0    */ V(14, 6, 1),	/* 346 */
-  /* 1    */ V(9, 12, 1),
-
-  /* 0000 1011 0100 ... */
-  /* 00   */ V(10, 11, 2),	/* 348 */
-  /* 01   */ V(11, 10, 2),
-  /* 10   */ V(14, 5, 2),
-  /* 11   */ V(13, 7, 2),
-
-  /* 0000 1011 0101 ... */
-  /* 00   */ V(4, 14, 1),	/* 352 */
-  /* 01   */ V(4, 14, 1),
-  /* 10   */ V(14, 4, 2),
-  /* 11   */ V(8, 12, 2),
-
-  /* 0000 1011 0110 ... */
-  /* 0    */ V(12, 8, 1),	/* 356 */
-  /* 1    */ V(3, 14, 1),
-
-  /* 0000 1011 0111 ... */
-  /* 00   */ V(6, 13, 1),	/* 358 */
-  /* 01   */ V(6, 13, 1),
-  /* 10   */ V(13, 6, 2),
-  /* 11   */ V(9, 11, 2),
-
-  /* 0000 1011 1000 ... */
-  /* 00   */ V(11, 9, 2),	/* 362 */
-  /* 01   */ V(10, 10, 2),
-  /* 10   */ V(14, 1, 1),
-  /* 11   */ V(14, 1, 1),
-
-  /* 0000 1011 1001 ... */
-  /* 00   */ V(13, 4, 1),	/* 366 */
-  /* 01   */ V(13, 4, 1),
-  /* 10   */ V(11, 8, 2),
-  /* 11   */ V(10, 9, 2),
-
-  /* 0000 1011 1010 ... */
-  /* 00   */ V(7, 11, 1),	/* 370 */
-  /* 01   */ V(7, 11, 1),
-  /* 10   */ V(11, 7, 2),
-  /* 11   */ V(13, 0, 2),
-
-  /* 0000 1011 1100 ... */
-  /* 0    */ V(0, 14, 1),	/* 374 */
-  /* 1    */ V(14, 0, 1),
-
-  /* 0000 1011 1101 ... */
-  /* 0    */ V(5, 13, 1),	/* 376 */
-  /* 1    */ V(13, 5, 1),
-
-  /* 0000 1011 1110 ... */
-  /* 0    */ V(7, 12, 1),	/* 378 */
-  /* 1    */ V(12, 7, 1),
-
-  /* 0000 1011 1111 ... */
-  /* 0    */ V(4, 13, 1),	/* 380 */
-  /* 1    */ V(8, 11, 1),
-
-  /* 0000 1100 0000 ... */
-  /* 0    */ V(9, 10, 1),	/* 382 */
-  /* 1    */ V(6, 12, 1),
-
-  /* 0000 1100 0001 ... */
-  /* 0    */ V(12, 6, 1),	/* 384 */
-  /* 1    */ V(3, 13, 1),
-
-  /* 0000 1100 0010 ... */
-  /* 0    */ V(5, 12, 1),	/* 386 */
-  /* 1    */ V(12, 5, 1),
-
-  /* 0000 1100 0100 ... */
-  /* 0    */ V(8, 10, 1),	/* 388 */
-  /* 1    */ V(10, 8, 1),
-
-  /* 0000 1100 0101 ... */
-  /* 0    */ V(9, 9, 1),	/* 390 */
-  /* 1    */ V(4, 12, 1),
-
-  /* 0000 1100 0110 ... */
-  /* 0    */ V(11, 6, 1),	/* 392 */
-  /* 1    */ V(7, 10, 1),
-
-  /* 0000 1100 1000 ... */
-  /* 0    */ V(5, 11, 1),	/* 394 */
-  /* 1    */ V(8, 9, 1),
-
-  /* 0000 1100 1011 ... */
-  /* 0    */ V(9, 8, 1),	/* 396 */
-  /* 1    */ V(7, 9, 1),
-
-  /* 0000 1101 0101 ... */
-  /* 0    */ V(9, 7, 1),	/* 398 */
-  /* 1    */ V(8, 8, 1),
-
-  /* 0000 0110 1100 0001 ... */
-  /* 0    */ V(14, 12, 1),	/* 400 */
-  /* 1    */ V(13, 13, 1)
-};
-
-static
-struct huffpair const hufftab24[] = {
-  /* 0000 */ PTR(16, 4),
-  /* 0001 */ PTR(32, 4),
-  /* 0010 */ PTR(48, 4),
-  /* 0011 */ V(15, 15, 4),
-  /* 0100 */ PTR(64, 4),
-  /* 0101 */ PTR(80, 4),
-  /* 0110 */ PTR(96, 4),
-  /* 0111 */ PTR(112, 4),
-  /* 1000 */ PTR(128, 4),
-  /* 1001 */ PTR(144, 4),
-  /* 1010 */ PTR(160, 3),
-  /* 1011 */ PTR(168, 2),
-  /* 1100 */ V(1, 1, 4),
-  /* 1101 */ V(0, 1, 4),
-  /* 1110 */ V(1, 0, 4),
-  /* 1111 */ V(0, 0, 4),
-
-  /* 0000 ... */
-  /* 0000 */ V(14, 15, 4),	/* 16 */
-  /* 0001 */ V(15, 14, 4),
-  /* 0010 */ V(13, 15, 4),
-  /* 0011 */ V(15, 13, 4),
-  /* 0100 */ V(12, 15, 4),
-  /* 0101 */ V(15, 12, 4),
-  /* 0110 */ V(11, 15, 4),
-  /* 0111 */ V(15, 11, 4),
-  /* 1000 */ V(15, 10, 3),
-  /* 1001 */ V(15, 10, 3),
-  /* 1010 */ V(10, 15, 4),
-  /* 1011 */ V(9, 15, 4),
-  /* 1100 */ V(15, 9, 3),
-  /* 1101 */ V(15, 9, 3),
-  /* 1110 */ V(15, 8, 3),
-  /* 1111 */ V(15, 8, 3),
-
-  /* 0001 ... */
-  /* 0000 */ V(8, 15, 4),	/* 32 */
-  /* 0001 */ V(7, 15, 4),
-  /* 0010 */ V(15, 7, 3),
-  /* 0011 */ V(15, 7, 3),
-  /* 0100 */ V(6, 15, 3),
-  /* 0101 */ V(6, 15, 3),
-  /* 0110 */ V(15, 6, 3),
-  /* 0111 */ V(15, 6, 3),
-  /* 1000 */ V(5, 15, 3),
-  /* 1001 */ V(5, 15, 3),
-  /* 1010 */ V(15, 5, 3),
-  /* 1011 */ V(15, 5, 3),
-  /* 1100 */ V(4, 15, 3),
-  /* 1101 */ V(4, 15, 3),
-  /* 1110 */ V(15, 4, 3),
-  /* 1111 */ V(15, 4, 3),
-
-  /* 0010 ... */
-  /* 0000 */ V(3, 15, 3),	/* 48 */
-  /* 0001 */ V(3, 15, 3),
-  /* 0010 */ V(15, 3, 3),
-  /* 0011 */ V(15, 3, 3),
-  /* 0100 */ V(2, 15, 3),
-  /* 0101 */ V(2, 15, 3),
-  /* 0110 */ V(15, 2, 3),
-  /* 0111 */ V(15, 2, 3),
-  /* 1000 */ V(15, 1, 3),
-  /* 1001 */ V(15, 1, 3),
-  /* 1010 */ V(1, 15, 4),
-  /* 1011 */ V(15, 0, 4),
-  /* 1100 */ PTR(172, 3),
-  /* 1101 */ PTR(180, 3),
-  /* 1110 */ PTR(188, 3),
-  /* 1111 */ PTR(196, 3),
-
-  /* 0100 ... */
-  /* 0000 */ PTR(204, 4),	/* 64 */
-  /* 0001 */ PTR(220, 3),
-  /* 0010 */ PTR(228, 3),
-  /* 0011 */ PTR(236, 3),
-  /* 0100 */ PTR(244, 2),
-  /* 0101 */ PTR(248, 2),
-  /* 0110 */ PTR(252, 2),
-  /* 0111 */ PTR(256, 2),
-  /* 1000 */ PTR(260, 2),
-  /* 1001 */ PTR(264, 2),
-  /* 1010 */ PTR(268, 2),
-  /* 1011 */ PTR(272, 2),
-  /* 1100 */ PTR(276, 2),
-  /* 1101 */ PTR(280, 3),
-  /* 1110 */ PTR(288, 2),
-  /* 1111 */ PTR(292, 2),
-
-  /* 0101 ... */
-  /* 0000 */ PTR(296, 2),	/* 80 */
-  /* 0001 */ PTR(300, 3),
-  /* 0010 */ PTR(308, 2),
-  /* 0011 */ PTR(312, 3),
-  /* 0100 */ PTR(320, 1),
-  /* 0101 */ PTR(322, 2),
-  /* 0110 */ PTR(326, 2),
-  /* 0111 */ PTR(330, 1),
-  /* 1000 */ PTR(332, 2),
-  /* 1001 */ PTR(336, 1),
-  /* 1010 */ PTR(338, 1),
-  /* 1011 */ PTR(340, 1),
-  /* 1100 */ PTR(342, 1),
-  /* 1101 */ PTR(344, 1),
-  /* 1110 */ PTR(346, 1),
-  /* 1111 */ PTR(348, 1),
-
-  /* 0110 ... */
-  /* 0000 */ PTR(350, 1),	/* 96 */
-  /* 0001 */ PTR(352, 1),
-  /* 0010 */ PTR(354, 1),
-  /* 0011 */ PTR(356, 1),
-  /* 0100 */ PTR(358, 1),
-  /* 0101 */ PTR(360, 1),
-  /* 0110 */ PTR(362, 1),
-  /* 0111 */ PTR(364, 1),
-  /* 1000 */ PTR(366, 1),
-  /* 1001 */ PTR(368, 1),
-  /* 1010 */ PTR(370, 2),
-  /* 1011 */ PTR(374, 1),
-  /* 1100 */ PTR(376, 2),
-  /* 1101 */ V(7, 3, 4),
-  /* 1110 */ PTR(380, 1),
-  /* 1111 */ V(7, 2, 4),
-
-  /* 0111 ... */
-  /* 0000 */ V(4, 6, 4),	/* 112 */
-  /* 0001 */ V(6, 4, 4),
-  /* 0010 */ V(5, 5, 4),
-  /* 0011 */ V(7, 1, 4),
-  /* 0100 */ V(3, 6, 4),
-  /* 0101 */ V(6, 3, 4),
-  /* 0110 */ V(4, 5, 4),
-  /* 0111 */ V(5, 4, 4),
-  /* 1000 */ V(2, 6, 4),
-  /* 1001 */ V(6, 2, 4),
-  /* 1010 */ V(1, 6, 4),
-  /* 1011 */ V(6, 1, 4),
-  /* 1100 */ PTR(382, 1),
-  /* 1101 */ V(3, 5, 4),
-  /* 1110 */ V(5, 3, 4),
-  /* 1111 */ V(4, 4, 4),
-
-  /* 1000 ... */
-  /* 0000 */ V(2, 5, 4),	/* 128 */
-  /* 0001 */ V(5, 2, 4),
-  /* 0010 */ V(1, 5, 4),
-  /* 0011 */ PTR(384, 1),
-  /* 0100 */ V(5, 1, 3),
-  /* 0101 */ V(5, 1, 3),
-  /* 0110 */ V(3, 4, 4),
-  /* 0111 */ V(4, 3, 4),
-  /* 1000 */ V(2, 4, 3),
-  /* 1001 */ V(2, 4, 3),
-  /* 1010 */ V(4, 2, 3),
-  /* 1011 */ V(4, 2, 3),
-  /* 1100 */ V(3, 3, 3),
-  /* 1101 */ V(3, 3, 3),
-  /* 1110 */ V(1, 4, 3),
-  /* 1111 */ V(1, 4, 3),
-
-  /* 1001 ... */
-  /* 0000 */ V(4, 1, 3),	/* 144 */
-  /* 0001 */ V(4, 1, 3),
-  /* 0010 */ V(0, 4, 4),
-  /* 0011 */ V(4, 0, 4),
-  /* 0100 */ V(2, 3, 3),
-  /* 0101 */ V(2, 3, 3),
-  /* 0110 */ V(3, 2, 3),
-  /* 0111 */ V(3, 2, 3),
-  /* 1000 */ V(1, 3, 2),
-  /* 1001 */ V(1, 3, 2),
-  /* 1010 */ V(1, 3, 2),
-  /* 1011 */ V(1, 3, 2),
-  /* 1100 */ V(3, 1, 2),
-  /* 1101 */ V(3, 1, 2),
-  /* 1110 */ V(3, 1, 2),
-  /* 1111 */ V(3, 1, 2),
-
-  /* 1010 ... */
-  /* 000  */ V(0, 3, 3),	/* 160 */
-  /* 001  */ V(3, 0, 3),
-  /* 010  */ V(2, 2, 2),
-  /* 011  */ V(2, 2, 2),
-  /* 100  */ V(1, 2, 1),
-  /* 101  */ V(1, 2, 1),
-  /* 110  */ V(1, 2, 1),
-  /* 111  */ V(1, 2, 1),
-
-  /* 1011 ... */
-  /* 00   */ V(2, 1, 1),	/* 168 */
-  /* 01   */ V(2, 1, 1),
-  /* 10   */ V(0, 2, 2),
-  /* 11   */ V(2, 0, 2),
-
-  /* 0010 1100 ... */
-  /* 000  */ V(0, 15, 1),	/* 172 */
-  /* 001  */ V(0, 15, 1),
-  /* 010  */ V(0, 15, 1),
-  /* 011  */ V(0, 15, 1),
-  /* 100  */ V(14, 14, 3),
-  /* 101  */ V(13, 14, 3),
-  /* 110  */ V(14, 13, 3),
-  /* 111  */ V(12, 14, 3),
-
-  /* 0010 1101 ... */
-  /* 000  */ V(14, 12, 3),	/* 180 */
-  /* 001  */ V(13, 13, 3),
-  /* 010  */ V(11, 14, 3),
-  /* 011  */ V(14, 11, 3),
-  /* 100  */ V(12, 13, 3),
-  /* 101  */ V(13, 12, 3),
-  /* 110  */ V(10, 14, 3),
-  /* 111  */ V(14, 10, 3),
-
-  /* 0010 1110 ... */
-  /* 000  */ V(11, 13, 3),	/* 188 */
-  /* 001  */ V(13, 11, 3),
-  /* 010  */ V(12, 12, 3),
-  /* 011  */ V(9, 14, 3),
-  /* 100  */ V(14, 9, 3),
-  /* 101  */ V(10, 13, 3),
-  /* 110  */ V(13, 10, 3),
-  /* 111  */ V(11, 12, 3),
-
-  /* 0010 1111 ... */
-  /* 000  */ V(12, 11, 3),	/* 196 */
-  /* 001  */ V(8, 14, 3),
-  /* 010  */ V(14, 8, 3),
-  /* 011  */ V(9, 13, 3),
-  /* 100  */ V(13, 9, 3),
-  /* 101  */ V(7, 14, 3),
-  /* 110  */ V(14, 7, 3),
-  /* 111  */ V(10, 12, 3),
-
-  /* 0100 0000 ... */
-  /* 0000 */ V(12, 10, 3),	/* 204 */
-  /* 0001 */ V(12, 10, 3),
-  /* 0010 */ V(11, 11, 3),
-  /* 0011 */ V(11, 11, 3),
-  /* 0100 */ V(8, 13, 3),
-  /* 0101 */ V(8, 13, 3),
-  /* 0110 */ V(13, 8, 3),
-  /* 0111 */ V(13, 8, 3),
-  /* 1000 */ V(0, 14, 4),
-  /* 1001 */ V(14, 0, 4),
-  /* 1010 */ V(0, 13, 3),
-  /* 1011 */ V(0, 13, 3),
-  /* 1100 */ V(14, 6, 2),
-  /* 1101 */ V(14, 6, 2),
-  /* 1110 */ V(14, 6, 2),
-  /* 1111 */ V(14, 6, 2),
-
-  /* 0100 0001 ... */
-  /* 000  */ V(6, 14, 3),	/* 220 */
-  /* 001  */ V(9, 12, 3),
-  /* 010  */ V(12, 9, 2),
-  /* 011  */ V(12, 9, 2),
-  /* 100  */ V(5, 14, 2),
-  /* 101  */ V(5, 14, 2),
-  /* 110  */ V(11, 10, 2),
-  /* 111  */ V(11, 10, 2),
-
-  /* 0100 0010 ... */
-  /* 000  */ V(14, 5, 2),	/* 228 */
-  /* 001  */ V(14, 5, 2),
-  /* 010  */ V(10, 11, 3),
-  /* 011  */ V(7, 13, 3),
-  /* 100  */ V(13, 7, 2),
-  /* 101  */ V(13, 7, 2),
-  /* 110  */ V(14, 4, 2),
-  /* 111  */ V(14, 4, 2),
-
-  /* 0100 0011 ... */
-  /* 000  */ V(8, 12, 2),	/* 236 */
-  /* 001  */ V(8, 12, 2),
-  /* 010  */ V(12, 8, 2),
-  /* 011  */ V(12, 8, 2),
-  /* 100  */ V(4, 14, 3),
-  /* 101  */ V(2, 14, 3),
-  /* 110  */ V(3, 14, 2),
-  /* 111  */ V(3, 14, 2),
-
-  /* 0100 0100 ... */
-  /* 00   */ V(6, 13, 2),	/* 244 */
-  /* 01   */ V(13, 6, 2),
-  /* 10   */ V(14, 3, 2),
-  /* 11   */ V(9, 11, 2),
-
-  /* 0100 0101 ... */
-  /* 00   */ V(11, 9, 2),	/* 248 */
-  /* 01   */ V(10, 10, 2),
-  /* 10   */ V(14, 2, 2),
-  /* 11   */ V(1, 14, 2),
-
-  /* 0100 0110 ... */
-  /* 00   */ V(14, 1, 2),	/* 252 */
-  /* 01   */ V(5, 13, 2),
-  /* 10   */ V(13, 5, 2),
-  /* 11   */ V(7, 12, 2),
-
-  /* 0100 0111 ... */
-  /* 00   */ V(12, 7, 2),	/* 256 */
-  /* 01   */ V(4, 13, 2),
-  /* 10   */ V(8, 11, 2),
-  /* 11   */ V(11, 8, 2),
-
-  /* 0100 1000 ... */
-  /* 00   */ V(13, 4, 2),	/* 260 */
-  /* 01   */ V(9, 10, 2),
-  /* 10   */ V(10, 9, 2),
-  /* 11   */ V(6, 12, 2),
-
-  /* 0100 1001 ... */
-  /* 00   */ V(12, 6, 2),	/* 264 */
-  /* 01   */ V(3, 13, 2),
-  /* 10   */ V(13, 3, 2),
-  /* 11   */ V(2, 13, 2),
-
-  /* 0100 1010 ... */
-  /* 00   */ V(13, 2, 2),	/* 268 */
-  /* 01   */ V(1, 13, 2),
-  /* 10   */ V(7, 11, 2),
-  /* 11   */ V(11, 7, 2),
-
-  /* 0100 1011 ... */
-  /* 00   */ V(13, 1, 2),	/* 272 */
-  /* 01   */ V(5, 12, 2),
-  /* 10   */ V(12, 5, 2),
-  /* 11   */ V(8, 10, 2),
-
-  /* 0100 1100 ... */
-  /* 00   */ V(10, 8, 2),	/* 276 */
-  /* 01   */ V(9, 9, 2),
-  /* 10   */ V(4, 12, 2),
-  /* 11   */ V(12, 4, 2),
-
-  /* 0100 1101 ... */
-  /* 000  */ V(6, 11, 2),	/* 280 */
-  /* 001  */ V(6, 11, 2),
-  /* 010  */ V(11, 6, 2),
-  /* 011  */ V(11, 6, 2),
-  /* 100  */ V(13, 0, 3),
-  /* 101  */ V(0, 12, 3),
-  /* 110  */ V(3, 12, 2),
-  /* 111  */ V(3, 12, 2),
-
-  /* 0100 1110 ... */
-  /* 00   */ V(12, 3, 2),	/* 288 */
-  /* 01   */ V(7, 10, 2),
-  /* 10   */ V(10, 7, 2),
-  /* 11   */ V(2, 12, 2),
-
-  /* 0100 1111 ... */
-  /* 00   */ V(12, 2, 2),	/* 292 */
-  /* 01   */ V(5, 11, 2),
-  /* 10   */ V(11, 5, 2),
-  /* 11   */ V(1, 12, 2),
-
-  /* 0101 0000 ... */
-  /* 00   */ V(8, 9, 2),	/* 296 */
-  /* 01   */ V(9, 8, 2),
-  /* 10   */ V(12, 1, 2),
-  /* 11   */ V(4, 11, 2),
-
-  /* 0101 0001 ... */
-  /* 000  */ V(12, 0, 3),	/* 300 */
-  /* 001  */ V(0, 11, 3),
-  /* 010  */ V(3, 11, 2),
-  /* 011  */ V(3, 11, 2),
-  /* 100  */ V(11, 0, 3),
-  /* 101  */ V(0, 10, 3),
-  /* 110  */ V(1, 10, 2),
-  /* 111  */ V(1, 10, 2),
-
-  /* 0101 0010 ... */
-  /* 00   */ V(11, 4, 1),	/* 308 */
-  /* 01   */ V(11, 4, 1),
-  /* 10   */ V(6, 10, 2),
-  /* 11   */ V(10, 6, 2),
-
-  /* 0101 0011 ... */
-  /* 000  */ V(7, 9, 2),	/* 312 */
-  /* 001  */ V(7, 9, 2),
-  /* 010  */ V(9, 7, 2),
-  /* 011  */ V(9, 7, 2),
-  /* 100  */ V(10, 0, 3),
-  /* 101  */ V(0, 9, 3),
-  /* 110  */ V(9, 0, 2),
-  /* 111  */ V(9, 0, 2),
-
-  /* 0101 0100 ... */
-  /* 0    */ V(11, 3, 1),	/* 320 */
-  /* 1    */ V(8, 8, 1),
-
-  /* 0101 0101 ... */
-  /* 00   */ V(2, 11, 2),	/* 322 */
-  /* 01   */ V(5, 10, 2),
-  /* 10   */ V(11, 2, 1),
-  /* 11   */ V(11, 2, 1),
-
-  /* 0101 0110 ... */
-  /* 00   */ V(10, 5, 2),	/* 326 */
-  /* 01   */ V(1, 11, 2),
-  /* 10   */ V(11, 1, 2),
-  /* 11   */ V(6, 9, 2),
-
-  /* 0101 0111 ... */
-  /* 0    */ V(9, 6, 1),	/* 330 */
-  /* 1    */ V(10, 4, 1),
-
-  /* 0101 1000 ... */
-  /* 00   */ V(4, 10, 2),	/* 332 */
-  /* 01   */ V(7, 8, 2),
-  /* 10   */ V(8, 7, 1),
-  /* 11   */ V(8, 7, 1),
-
-  /* 0101 1001 ... */
-  /* 0    */ V(3, 10, 1),	/* 336 */
-  /* 1    */ V(10, 3, 1),
-
-  /* 0101 1010 ... */
-  /* 0    */ V(5, 9, 1),	/* 338 */
-  /* 1    */ V(9, 5, 1),
-
-  /* 0101 1011 ... */
-  /* 0    */ V(2, 10, 1),	/* 340 */
-  /* 1    */ V(10, 2, 1),
-
-  /* 0101 1100 ... */
-  /* 0    */ V(10, 1, 1),	/* 342 */
-  /* 1    */ V(6, 8, 1),
-
-  /* 0101 1101 ... */
-  /* 0    */ V(8, 6, 1),	/* 344 */
-  /* 1    */ V(7, 7, 1),
-
-  /* 0101 1110 ... */
-  /* 0    */ V(4, 9, 1),	/* 346 */
-  /* 1    */ V(9, 4, 1),
-
-  /* 0101 1111 ... */
-  /* 0    */ V(3, 9, 1),	/* 348 */
-  /* 1    */ V(9, 3, 1),
-
-  /* 0110 0000 ... */
-  /* 0    */ V(5, 8, 1),	/* 350 */
-  /* 1    */ V(8, 5, 1),
-
-  /* 0110 0001 ... */
-  /* 0    */ V(2, 9, 1),	/* 352 */
-  /* 1    */ V(6, 7, 1),
-
-  /* 0110 0010 ... */
-  /* 0    */ V(7, 6, 1),	/* 354 */
-  /* 1    */ V(9, 2, 1),
-
-  /* 0110 0011 ... */
-  /* 0    */ V(1, 9, 1),	/* 356 */
-  /* 1    */ V(9, 1, 1),
-
-  /* 0110 0100 ... */
-  /* 0    */ V(4, 8, 1),	/* 358 */
-  /* 1    */ V(8, 4, 1),
-
-  /* 0110 0101 ... */
-  /* 0    */ V(5, 7, 1),	/* 360 */
-  /* 1    */ V(7, 5, 1),
-
-  /* 0110 0110 ... */
-  /* 0    */ V(3, 8, 1),	/* 362 */
-  /* 1    */ V(8, 3, 1),
-
-  /* 0110 0111 ... */
-  /* 0    */ V(6, 6, 1),	/* 364 */
-  /* 1    */ V(2, 8, 1),
-
-  /* 0110 1000 ... */
-  /* 0    */ V(8, 2, 1),	/* 366 */
-  /* 1    */ V(1, 8, 1),
-
-  /* 0110 1001 ... */
-  /* 0    */ V(4, 7, 1),	/* 368 */
-  /* 1    */ V(7, 4, 1),
-
-  /* 0110 1010 ... */
-  /* 00   */ V(8, 1, 1),	/* 370 */
-  /* 01   */ V(8, 1, 1),
-  /* 10   */ V(0, 8, 2),
-  /* 11   */ V(8, 0, 2),
-
-  /* 0110 1011 ... */
-  /* 0    */ V(5, 6, 1),	/* 374 */
-  /* 1    */ V(6, 5, 1),
-
-  /* 0110 1100 ... */
-  /* 00   */ V(1, 7, 1),	/* 376 */
-  /* 01   */ V(1, 7, 1),
-  /* 10   */ V(0, 7, 2),
-  /* 11   */ V(7, 0, 2),
-
-  /* 0110 1110 ... */
-  /* 0    */ V(3, 7, 1),	/* 380  */
-  /* 1    */ V(2, 7, 1),
-
-  /* 0111 1100 ... */
-  /* 0    */ V(0, 6, 1),	/* 382 */
-  /* 1    */ V(6, 0, 1),
-
-  /* 1000 0011 ... */
-  /* 0    */ V(0, 5, 1),	/* 384 */
-  /* 1    */ V(5, 0, 1)
-};
-
-# undef V
-# undef PTR
-
-/* external tables */
-
-struct huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB };
-
-struct hufftable const mad_huff_pair_table[32] = {
-  /*  0 */ { hufftab0,   0, 0 },
-  /*  1 */ { hufftab1,   0, 3 },
-  /*  2 */ { hufftab2,   0, 3 },
-  /*  3 */ { hufftab3,   0, 3 },
-  /*  4 */ { 0 /* not used */ },
-  /*  5 */ { hufftab5,   0, 3 },
-  /*  6 */ { hufftab6,   0, 4 },
-  /*  7 */ { hufftab7,   0, 4 },
-  /*  8 */ { hufftab8,   0, 4 },
-  /*  9 */ { hufftab9,   0, 4 },
-  /* 10 */ { hufftab10,  0, 4 },
-  /* 11 */ { hufftab11,  0, 4 },
-  /* 12 */ { hufftab12,  0, 4 },
-  /* 13 */ { hufftab13,  0, 4 },
-  /* 14 */ { 0 /* not used */ },
-  /* 15 */ { hufftab15,  0, 4 },
-  /* 16 */ { hufftab16,  1, 4 },
-  /* 17 */ { hufftab16,  2, 4 },
-  /* 18 */ { hufftab16,  3, 4 },
-  /* 19 */ { hufftab16,  4, 4 },
-  /* 20 */ { hufftab16,  6, 4 },
-  /* 21 */ { hufftab16,  8, 4 },
-  /* 22 */ { hufftab16, 10, 4 },
-  /* 23 */ { hufftab16, 13, 4 },
-  /* 24 */ { hufftab24,  4, 4 },
-  /* 25 */ { hufftab24,  5, 4 },
-  /* 26 */ { hufftab24,  6, 4 },
-  /* 27 */ { hufftab24,  7, 4 },
-  /* 28 */ { hufftab24,  8, 4 },
-  /* 29 */ { hufftab24,  9, 4 },
-  /* 30 */ { hufftab24, 11, 4 },
-  /* 31 */ { hufftab24, 13, 4 }
-};
--- a/sys/src/games/mp3dec/huffman.h
+++ /dev/null
@@ -1,59 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id; //  huffman.h,v 1.11 2004/01/23 09; // 41; // 32 rob Exp $
- */
-
-# ifndef LIBMAD_HUFFMAN_H
-# define LIBMAD_HUFFMAN_H
-
-struct huffquad {
-  unsigned char final;
-  struct {
-    unsigned char bits;
-    unsigned short offset;
-  } ptr;
-  struct {
-    unsigned char hlen;
-    unsigned char v, w, x, y;
-  } value;
-};
-
-struct huffpair {
-  unsigned char final;
-  struct {
-    unsigned char bits;
-    unsigned short offset;
-  } ptr;
-  struct {
-    unsigned char hlen;
-    unsigned char x;
-    unsigned char y;
-  } value;
-};
-
-struct hufftable {
-  struct huffpair const *table;
-  unsigned short linbits;
-  unsigned short startbits;
-};
-
-extern struct huffquad const *const mad_huff_quad_table[2];
-extern struct hufftable const mad_huff_pair_table[32];
-
-# endif
--- a/sys/src/games/mp3dec/imdct_s.dat
+++ /dev/null
@@ -1,62 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $
- */
-
-  /*  0 */  {  MAD_F(0x09bd7ca0) /*  0.608761429 */,
-	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
-	      -MAD_F(0x0216a2a2) /* -0.130526192 */,
-	       MAD_F(0x0fdcf549) /*  0.991444861 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	      -MAD_F(0x0cb19346) /* -0.793353340 */ },
-
-  /*  6 */  { -MAD_F(0x0cb19346) /* -0.793353340 */,
-	       MAD_F(0x061f78aa) /*  0.382683432 */,
-	       MAD_F(0x0fdcf549) /*  0.991444861 */,
-	       MAD_F(0x0216a2a2) /*  0.130526192 */,
-	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
-	      -MAD_F(0x09bd7ca0) /* -0.608761429 */ },
-
-  /*  1 */  {  MAD_F(0x061f78aa) /*  0.382683432 */,
-	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
-	       MAD_F(0x0ec835e8) /*  0.923879533 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	       MAD_F(0x0ec835e8) /*  0.923879533 */ },
-
-  /*  7 */  { -MAD_F(0x0ec835e8) /* -0.923879533 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	       MAD_F(0x061f78aa) /*  0.382683432 */,
-	       MAD_F(0x0ec835e8) /*  0.923879533 */,
-	       MAD_F(0x0ec835e8) /*  0.923879533 */,
-	       MAD_F(0x061f78aa) /*  0.382683432 */ },
-
-  /*  2 */  {  MAD_F(0x0216a2a2) /*  0.130526192 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	       MAD_F(0x09bd7ca0) /*  0.608761429 */,
-	      -MAD_F(0x0cb19346) /* -0.793353340 */,
-	       MAD_F(0x0ec835e8) /*  0.923879533 */,
-	      -MAD_F(0x0fdcf549) /* -0.991444861 */ },
-
-  /*  8 */  { -MAD_F(0x0fdcf549) /* -0.991444861 */,
-	      -MAD_F(0x0ec835e8) /* -0.923879533 */,
-	      -MAD_F(0x0cb19346) /* -0.793353340 */,
-	      -MAD_F(0x09bd7ca0) /* -0.608761429 */,
-	      -MAD_F(0x061f78aa) /* -0.382683432 */,
-	      -MAD_F(0x0216a2a2) /* -0.130526192 */ }
--- a/sys/src/games/mp3dec/layer12.c
+++ /dev/null
@@ -1,534 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: layer12.c,v 1.17 2004/02/05 09:02:39 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# ifdef HAVE_LIMITS_H
-#  include <limits.h>
-# else
-#  define CHAR_BIT  8
-# endif
-
-# include "fixed.h"
-# include "bit.h"
-# include "stream.h"
-# include "frame.h"
-# include "layer12.h"
-
-/*
- * scalefactor table
- * used in both Layer I and Layer II decoding
- */
-static
-mad_fixed_t const sf_table[64] = {
-# include "sf_table.dat"
-};
-
-/* --- Layer I ------------------------------------------------------------- */
-
-/* linear scaling table */
-static
-mad_fixed_t const linear_table[14] = {
-  MAD_F(0x15555555),  /* 2^2  / (2^2  - 1) == 1.33333333333333 */
-  MAD_F(0x12492492),  /* 2^3  / (2^3  - 1) == 1.14285714285714 */
-  MAD_F(0x11111111),  /* 2^4  / (2^4  - 1) == 1.06666666666667 */
-  MAD_F(0x10842108),  /* 2^5  / (2^5  - 1) == 1.03225806451613 */
-  MAD_F(0x10410410),  /* 2^6  / (2^6  - 1) == 1.01587301587302 */
-  MAD_F(0x10204081),  /* 2^7  / (2^7  - 1) == 1.00787401574803 */
-  MAD_F(0x10101010),  /* 2^8  / (2^8  - 1) == 1.00392156862745 */
-  MAD_F(0x10080402),  /* 2^9  / (2^9  - 1) == 1.00195694716243 */
-  MAD_F(0x10040100),  /* 2^10 / (2^10 - 1) == 1.00097751710655 */
-  MAD_F(0x10020040),  /* 2^11 / (2^11 - 1) == 1.00048851978505 */
-  MAD_F(0x10010010),  /* 2^12 / (2^12 - 1) == 1.00024420024420 */
-  MAD_F(0x10008004),  /* 2^13 / (2^13 - 1) == 1.00012208521548 */
-  MAD_F(0x10004001),  /* 2^14 / (2^14 - 1) == 1.00006103888177 */
-  MAD_F(0x10002000)   /* 2^15 / (2^15 - 1) == 1.00003051850948 */
-};
-
-/*
- * NAME:	I_sample()
- * DESCRIPTION:	decode one requantized Layer I sample from a bitstream
- */
-static
-mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb)
-{
-  mad_fixed_t sample;
-
-  sample = mad_bit_read(ptr, nb);
-
-  /* invert most significant bit, extend sign, then scale to fixed format */
-
-  sample ^= 1 << (nb - 1);
-  sample |= -(sample & (1 << (nb - 1)));
-
-  sample <<= MAD_F_FRACBITS - (nb - 1);
-
-  /* requantize the sample */
-
-  /* s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1)) */
-
-  sample += MAD_F_ONE >> (nb - 1);
-
-  return mad_f_mul(sample, linear_table[nb - 2]);
-
-  /* s' = factor * s'' */
-  /* (to be performed by caller) */
-}
-
-/*
- * NAME:	layer->I()
- * DESCRIPTION:	decode a single Layer I frame
- */
-int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
-{
-  struct mad_header *header = &frame->header;
-  unsigned int nch, bound, ch, s, sb, nb;
-  unsigned char allocation[2][32], scalefactor[2][32];
-
-  nch = MAD_NCHANNELS(header);
-
-  bound = 32;
-  if (header->mode == MAD_MODE_JOINT_STEREO) {
-    header->flags |= MAD_FLAG_I_STEREO;
-    bound = 4 + header->mode_extension * 4;
-  }
-
-  /* check CRC word */
-
-  if (header->flags & MAD_FLAG_PROTECTION) {
-    header->crc_check =
-      mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)),
-		  header->crc_check);
-
-    if (header->crc_check != header->crc_target &&
-	!(frame->options & MAD_OPTION_IGNORECRC)) {
-      stream->error = MAD_ERROR_BADCRC;
-      return -1;
-    }
-  }
-
-  /* decode bit allocations */
-
-  for (sb = 0; sb < bound; ++sb) {
-    for (ch = 0; ch < nch; ++ch) {
-      nb = mad_bit_read(&stream->ptr, 4);
-
-      if (nb == 15) {
-	stream->error = MAD_ERROR_BADBITALLOC;
-	return -1;
-      }
-
-      allocation[ch][sb] = nb ? nb + 1 : 0;
-    }
-  }
-
-  for (sb = bound; sb < 32; ++sb) {
-    nb = mad_bit_read(&stream->ptr, 4);
-
-    if (nb == 15) {
-      stream->error = MAD_ERROR_BADBITALLOC;
-      return -1;
-    }
-
-    allocation[0][sb] =
-    allocation[1][sb] = nb ? nb + 1 : 0;
-  }
-
-  /* decode scalefactors */
-
-  for (sb = 0; sb < 32; ++sb) {
-    for (ch = 0; ch < nch; ++ch) {
-      if (allocation[ch][sb]) {
-	scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6);
-
-# if defined(OPT_STRICT)
-	/*
-	 * Scalefactor index 63 does not appear in Table B.1 of
-	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
-	 * so we only reject it if OPT_STRICT is defined.
-	 */
-	if (scalefactor[ch][sb] == 63) {
-	  stream->error = MAD_ERROR_BADSCALEFACTOR;
-	  return -1;
-	}
-# endif
-      }
-    }
-  }
-
-  /* decode samples */
-
-  for (s = 0; s < 12; ++s) {
-    for (sb = 0; sb < bound; ++sb) {
-      for (ch = 0; ch < nch; ++ch) {
-	nb = allocation[ch][sb];
-	frame->sbsample[ch][s][sb] = nb ?
-	  mad_f_mul(I_sample(&stream->ptr, nb),
-		    sf_table[scalefactor[ch][sb]]) : 0;
-      }
-    }
-
-    for (sb = bound; sb < 32; ++sb) {
-      if ((nb = allocation[0][sb])) {
-	mad_fixed_t sample;
-
-	sample = I_sample(&stream->ptr, nb);
-
-	for (ch = 0; ch < nch; ++ch) {
-	  frame->sbsample[ch][s][sb] =
-	    mad_f_mul(sample, sf_table[scalefactor[ch][sb]]);
-	}
-      }
-      else {
-	for (ch = 0; ch < nch; ++ch)
-	  frame->sbsample[ch][s][sb] = 0;
-      }
-    }
-  }
-
-  return 0;
-}
-
-/* --- Layer II ------------------------------------------------------------ */
-
-/* possible quantization per subband table */
-static
-struct {
-  unsigned int sblimit;
-  unsigned char const offsets[30];
-} const sbquant_table[5] = {
-  /* ISO/IEC 11172-3 Table B.2a */
-  { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3,	/* 0 */
-	  3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } },
-  /* ISO/IEC 11172-3 Table B.2b */
-  { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3,	/* 1 */
-	  3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } },
-  /* ISO/IEC 11172-3 Table B.2c */
-  {  8, { 5, 5, 2, 2, 2, 2, 2, 2 } },				/* 2 */
-  /* ISO/IEC 11172-3 Table B.2d */
-  { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } },		/* 3 */
-  /* ISO/IEC 13818-3 Table B.1 */
-  { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,	/* 4 */
-	  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
-};
-
-/* bit allocation table */
-static
-struct {
-  unsigned short nbal;
-  unsigned short offset;
-} const bitalloc_table[8] = {
-  { 2, 0 },  /* 0 */
-  { 2, 3 },  /* 1 */
-  { 3, 3 },  /* 2 */
-  { 3, 1 },  /* 3 */
-  { 4, 2 },  /* 4 */
-  { 4, 3 },  /* 5 */
-  { 4, 4 },  /* 6 */
-  { 4, 5 }   /* 7 */
-};
-
-/* offsets into quantization class table */
-static
-unsigned char const offset_table[6][15] = {
-  { 0, 1, 16                                             },  /* 0 */
-  { 0, 1,  2, 3, 4, 5, 16                                },  /* 1 */
-  { 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14 },  /* 2 */
-  { 0, 1,  3, 4, 5, 6,  7, 8,  9, 10, 11, 12, 13, 14, 15 },  /* 3 */
-  { 0, 1,  2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 16 },  /* 4 */
-  { 0, 2,  4, 5, 6, 7,  8, 9, 10, 11, 12, 13, 14, 15, 16 }   /* 5 */
-};
-
-/* quantization class table */
-static
-struct quantclass {
-  unsigned short nlevels;
-  unsigned char group;
-  unsigned char bits;
-  mad_fixed_t C;
-  mad_fixed_t D;
-} const qc_table[17] = {
-# include "qc_table.dat"
-};
-
-/*
- * NAME:	II_samples()
- * DESCRIPTION:	decode three requantized Layer II samples from a bitstream
- */
-static
-void II_samples(struct mad_bitptr *ptr,
-		struct quantclass const *quantclass,
-		mad_fixed_t output[3])
-{
-  unsigned int nb, s, sample[3];
-
-  if ((nb = quantclass->group)) {
-    unsigned int c, nlevels;
-
-    /* degrouping */
-    c = mad_bit_read(ptr, quantclass->bits);
-    nlevels = quantclass->nlevels;
-
-    for (s = 0; s < 3; ++s) {
-      sample[s] = c % nlevels;
-      c /= nlevels;
-    }
-  }
-  else {
-    nb = quantclass->bits;
-
-    for (s = 0; s < 3; ++s)
-      sample[s] = mad_bit_read(ptr, nb);
-  }
-
-  for (s = 0; s < 3; ++s) {
-    mad_fixed_t requantized;
-
-    /* invert most significant bit, extend sign, then scale to fixed format */
-
-    requantized  = sample[s] ^ (1 << (nb - 1));
-    requantized |= -(requantized & (1 << (nb - 1)));
-
-    requantized <<= MAD_F_FRACBITS - (nb - 1);
-
-    /* requantize the sample */
-
-    /* s'' = C * (s''' + D) */
-
-    output[s] = mad_f_mul(requantized + quantclass->D, quantclass->C);
-
-    /* s' = factor * s'' */
-    /* (to be performed by caller) */
-  }
-}
-
-/*
- * NAME:	layer->II()
- * DESCRIPTION:	decode a single Layer II frame
- */
-int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
-{
-  struct mad_header *header = &frame->header;
-  struct mad_bitptr start;
-  unsigned int index, sblimit, nbal, nch, bound, gr, ch, s, sb;
-  unsigned char const *offsets;
-  unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3];
-  mad_fixed_t samples[3];
-
-  nch = MAD_NCHANNELS(header);
-
-  if (header->flags & MAD_FLAG_LSF_EXT)
-    index = 4;
-  else if (header->flags & MAD_FLAG_FREEFORMAT)
-    goto freeformat;
-  else {
-    unsigned long bitrate_per_channel;
-
-    bitrate_per_channel = header->bitrate;
-    if (nch == 2) {
-      bitrate_per_channel /= 2;
-
-# if defined(OPT_STRICT)
-      /*
-       * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and
-       * 80 kbps bitrates in Layer II, but some encoders ignore this
-       * restriction. We enforce it if OPT_STRICT is defined.
-       */
-      if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) {
-	stream->error = MAD_ERROR_BADMODE;
-	return -1;
-      }
-# endif
-    }
-    else {  /* nch == 1 */
-      if (bitrate_per_channel > 192000) {
-	/*
-	 * ISO/IEC 11172-3 does not allow single channel mode for 224, 256,
-	 * 320, or 384 kbps bitrates in Layer II.
-	 */
-	stream->error = MAD_ERROR_BADMODE;
-	return -1;
-      }
-    }
-
-    if (bitrate_per_channel <= 48000)
-      index = (header->samplerate == 32000) ? 3 : 2;
-    else if (bitrate_per_channel <= 80000)
-      index = 0;
-    else {
-    freeformat:
-      index = (header->samplerate == 48000) ? 0 : 1;
-    }
-  }
-
-  sblimit = sbquant_table[index].sblimit;
-  offsets = sbquant_table[index].offsets;
-
-  bound = 32;
-  if (header->mode == MAD_MODE_JOINT_STEREO) {
-    header->flags |= MAD_FLAG_I_STEREO;
-    bound = 4 + header->mode_extension * 4;
-  }
-
-  if (bound > sblimit)
-    bound = sblimit;
-
-  start = stream->ptr;
-
-  /* decode bit allocations */
-
-  for (sb = 0; sb < bound; ++sb) {
-    nbal = bitalloc_table[offsets[sb]].nbal;
-
-    for (ch = 0; ch < nch; ++ch)
-      allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal);
-  }
-
-  for (sb = bound; sb < sblimit; ++sb) {
-    nbal = bitalloc_table[offsets[sb]].nbal;
-
-    allocation[0][sb] =
-    allocation[1][sb] = mad_bit_read(&stream->ptr, nbal);
-  }
-
-  /* decode scalefactor selection info */
-
-  for (sb = 0; sb < sblimit; ++sb) {
-    for (ch = 0; ch < nch; ++ch) {
-      if (allocation[ch][sb])
-	scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2);
-    }
-  }
-
-  /* check CRC word */
-
-  if (header->flags & MAD_FLAG_PROTECTION) {
-    header->crc_check =
-      mad_bit_crc(start, mad_bit_length(&start, &stream->ptr),
-		  header->crc_check);
-
-    if (header->crc_check != header->crc_target &&
-	!(frame->options & MAD_OPTION_IGNORECRC)) {
-      stream->error = MAD_ERROR_BADCRC;
-      return -1;
-    }
-  }
-
-  /* decode scalefactors */
-
-  for (sb = 0; sb < sblimit; ++sb) {
-    for (ch = 0; ch < nch; ++ch) {
-      if (allocation[ch][sb]) {
-	scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6);
-
-	switch (scfsi[ch][sb]) {
-	case 2:
-	  scalefactor[ch][sb][2] =
-	  scalefactor[ch][sb][1] =
-	  scalefactor[ch][sb][0];
-	  break;
-
-	case 0:
-	  scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6);
-	  /* fall through */
-
-	case 1:
-	case 3:
-	  scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6);
-	}
-
-	if (scfsi[ch][sb] & 1)
-	  scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1];
-
-# if defined(OPT_STRICT)
-	/*
-	 * Scalefactor index 63 does not appear in Table B.1 of
-	 * ISO/IEC 11172-3. Nonetheless, other implementations accept it,
-	 * so we only reject it if OPT_STRICT is defined.
-	 */
-	if (scalefactor[ch][sb][0] == 63 ||
-	    scalefactor[ch][sb][1] == 63 ||
-	    scalefactor[ch][sb][2] == 63) {
-	  stream->error = MAD_ERROR_BADSCALEFACTOR;
-	  return -1;
-	}
-# endif
-      }
-    }
-  }
-
-  /* decode samples */
-
-  for (gr = 0; gr < 12; ++gr) {
-    for (sb = 0; sb < bound; ++sb) {
-      for (ch = 0; ch < nch; ++ch) {
-	if ((index = allocation[ch][sb])) {
-	  index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
-
-	  II_samples(&stream->ptr, &qc_table[index], samples);
-
-	  for (s = 0; s < 3; ++s) {
-	    frame->sbsample[ch][3 * gr + s][sb] =
-	      mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
-	  }
-	}
-	else {
-	  for (s = 0; s < 3; ++s)
-	    frame->sbsample[ch][3 * gr + s][sb] = 0;
-	}
-      }
-    }
-
-    for (sb = bound; sb < sblimit; ++sb) {
-      if ((index = allocation[0][sb])) {
-	index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
-
-	II_samples(&stream->ptr, &qc_table[index], samples);
-
-	for (ch = 0; ch < nch; ++ch) {
-	  for (s = 0; s < 3; ++s) {
-	    frame->sbsample[ch][3 * gr + s][sb] =
-	      mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
-	  }
-	}
-      }
-      else {
-	for (ch = 0; ch < nch; ++ch) {
-	  for (s = 0; s < 3; ++s)
-	    frame->sbsample[ch][3 * gr + s][sb] = 0;
-	}
-      }
-    }
-
-    for (ch = 0; ch < nch; ++ch) {
-      for (s = 0; s < 3; ++s) {
-	for (sb = sblimit; sb < 32; ++sb)
-	  frame->sbsample[ch][3 * gr + s][sb] = 0;
-      }
-    }
-  }
-
-  return 0;
-}
--- a/sys/src/games/mp3dec/layer12.h
+++ /dev/null
@@ -1,31 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifndef LIBMAD_LAYER12_H
-# define LIBMAD_LAYER12_H
-
-# include "stream.h"
-# include "frame.h"
-
-int mad_layer_I(struct mad_stream *, struct mad_frame *);
-int mad_layer_II(struct mad_stream *, struct mad_frame *);
-
-# endif
--- a/sys/src/games/mp3dec/layer3.c
+++ /dev/null
@@ -1,2687 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: layer3.c,v 1.43 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "fixed.h"
-# include "bit.h"
-# include "stream.h"
-# include "frame.h"
-# include "huffman.h"
-# include "layer3.h"
-
-#define CHAR_BIT 8 /* duh */
-
-/* --- Layer III ----------------------------------------------------------- */
-
-enum {
-  count1table_select = 0x01,
-  scalefac_scale     = 0x02,
-  preflag	     = 0x04,
-  mixed_block_flag   = 0x08
-};
-
-enum {
-  I_STEREO  = 0x1,
-  MS_STEREO = 0x2
-};
-
-struct sideinfo {
-  unsigned int main_data_begin;
-  unsigned int private_bits;
-
-  unsigned char scfsi[2];
-
-  struct granule {
-    struct channel {
-      /* from side info */
-      unsigned short part2_3_length;
-      unsigned short big_values;
-      unsigned short global_gain;
-      unsigned short scalefac_compress;
-
-      unsigned char flags;
-      unsigned char block_type;
-      unsigned char table_select[3];
-      unsigned char subblock_gain[3];
-      unsigned char region0_count;
-      unsigned char region1_count;
-
-      /* from main_data */
-      unsigned char scalefac[39];	/* scalefac_l and/or scalefac_s */
-    } ch[2];
-  } gr[2];
-};
-
-/*
- * scalefactor bit lengths
- * derived from section 2.4.2.7 of ISO/IEC 11172-3
- */
-static
-struct {
-  unsigned char slen1;
-  unsigned char slen2;
-} const sflen_table[16] = {
-  { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 },
-  { 3, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 },
-  { 2, 1 }, { 2, 2 }, { 2, 3 }, { 3, 1 },
-  { 3, 2 }, { 3, 3 }, { 4, 2 }, { 4, 3 }
-};
-
-/*
- * number of LSF scalefactor band values
- * derived from section 2.4.3.2 of ISO/IEC 13818-3
- */
-static
-unsigned char const nsfb_table[6][3][4] = {
-  { {  6,  5,  5, 5 },
-    {  9,  9,  9, 9 },
-    {  6,  9,  9, 9 } },
-
-  { {  6,  5,  7, 3 },
-    {  9,  9, 12, 6 },
-    {  6,  9, 12, 6 } },
-
-  { { 11, 10,  0, 0 },
-    { 18, 18,  0, 0 },
-    { 15, 18,  0, 0 } },
-
-  { {  7,  7,  7, 0 },
-    { 12, 12, 12, 0 },
-    {  6, 15, 12, 0 } },
-
-  { {  6,  6,  6, 3 },
-    { 12,  9,  9, 6 },
-    {  6, 12,  9, 6 } },
-
-  { {  8,  8,  5, 0 },
-    { 15, 12,  9, 0 },
-    {  6, 18,  9, 0 } }
-};
-
-/*
- * MPEG-1 scalefactor band widths
- * derived from Table B.8 of ISO/IEC 11172-3
- */
-static
-unsigned char const sfb_48000_long[] = {
-   4,  4,  4,  4,  4,  4,  6,  6,  6,   8,  10,
-  12, 16, 18, 22, 28, 34, 40, 46, 54,  54, 192
-};
-
-static
-unsigned char const sfb_44100_long[] = {
-   4,  4,  4,  4,  4,  4,  6,  6,  8,   8,  10,
-  12, 16, 20, 24, 28, 34, 42, 50, 54,  76, 158
-};
-
-static
-unsigned char const sfb_32000_long[] = {
-   4,  4,  4,  4,  4,  4,  6,  6,  8,  10,  12,
-  16, 20, 24, 30, 38, 46, 56, 68, 84, 102,  26
-};
-
-static
-unsigned char const sfb_48000_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
-   6,  6,  6,  6,  6, 10, 10, 10, 12, 12, 12, 14, 14,
-  14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66
-};
-
-static
-unsigned char const sfb_44100_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
-   6,  6,  8,  8,  8, 10, 10, 10, 12, 12, 12, 14, 14,
-  14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56
-};
-
-static
-unsigned char const sfb_32000_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  6,
-   6,  6,  8,  8,  8, 12, 12, 12, 16, 16, 16, 20, 20,
-  20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12
-};
-
-static
-unsigned char const sfb_48000_mixed[] = {
-  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
-  /* short */  4,  4,  4,  6,  6,  6,  6,  6,  6, 10,
-              10, 10, 12, 12, 12, 14, 14, 14, 16, 16,
-              16, 20, 20, 20, 26, 26, 26, 66, 66, 66
-};
-
-static
-unsigned char const sfb_44100_mixed[] = {
-  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
-  /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,
-              10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
-              18, 22, 22, 22, 30, 30, 30, 56, 56, 56
-};
-
-static
-unsigned char const sfb_32000_mixed[] = {
-  /* long */   4,  4,  4,  4,  4,  4,  6,  6,
-  /* short */  4,  4,  4,  6,  6,  6,  8,  8,  8, 12,
-              12, 12, 16, 16, 16, 20, 20, 20, 26, 26,
-              26, 34, 34, 34, 42, 42, 42, 12, 12, 12
-};
-
-/*
- * MPEG-2 scalefactor band widths
- * derived from Table B.2 of ISO/IEC 13818-3
- */
-static
-unsigned char const sfb_24000_long[] = {
-   6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
-  18, 22, 26, 32, 38, 46, 54, 62, 70,  76,  36
-};
-
-static
-unsigned char const sfb_22050_long[] = {
-   6,  6,  6,  6,  6,  6,  8, 10, 12,  14,  16,
-  20, 24, 28, 32, 38, 46, 52, 60, 68,  58,  54
-};
-
-# define sfb_16000_long  sfb_22050_long
-
-static
-unsigned char const sfb_24000_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
-   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
-  18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12
-};
-
-static
-unsigned char const sfb_22050_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  6,
-   6,  6,  8,  8,  8, 10, 10, 10, 14, 14, 14, 18, 18,
-  18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18
-};
-
-static
-unsigned char const sfb_16000_short[] = {
-   4,  4,  4,  4,  4,  4,  4,  4,  4,  6,  6,  6,  8,
-   8,  8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18,
-  18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18
-};
-
-static
-unsigned char const sfb_24000_mixed[] = {
-  /* long */   6,  6,  6,  6,  6,  6,
-  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
-              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
-              24, 32, 32, 32, 44, 44, 44, 12, 12, 12
-};
-
-static
-unsigned char const sfb_22050_mixed[] = {
-  /* long */   6,  6,  6,  6,  6,  6,
-  /* short */  6,  6,  6,  6,  6,  6,  8,  8,  8, 10,
-              10, 10, 14, 14, 14, 18, 18, 18, 26, 26,
-              26, 32, 32, 32, 42, 42, 42, 18, 18, 18
-};
-
-static
-unsigned char const sfb_16000_mixed[] = {
-  /* long */   6,  6,  6,  6,  6,  6,
-  /* short */  6,  6,  6,  8,  8,  8, 10, 10, 10, 12,
-              12, 12, 14, 14, 14, 18, 18, 18, 24, 24,
-              24, 30, 30, 30, 40, 40, 40, 18, 18, 18
-};
-
-/*
- * MPEG 2.5 scalefactor band widths
- * derived from public sources
- */
-# define sfb_12000_long  sfb_16000_long
-# define sfb_11025_long  sfb_12000_long
-
-static
-unsigned char const sfb_8000_long[] = {
-  12, 12, 12, 12, 12, 12, 16, 20, 24,  28,  32,
-  40, 48, 56, 64, 76, 90,  2,  2,  2,   2,   2
-};
-
-# define sfb_12000_short  sfb_16000_short
-# define sfb_11025_short  sfb_12000_short
-
-static
-unsigned char const sfb_8000_short[] = {
-   8,  8,  8,  8,  8,  8,  8,  8,  8, 12, 12, 12, 16,
-  16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36,
-  36,  2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
-};
-
-# define sfb_12000_mixed  sfb_16000_mixed
-# define sfb_11025_mixed  sfb_12000_mixed
-
-/* the 8000 Hz short block scalefactor bands do not break after
-   the first 36 frequency lines, so this is probably wrong */
-static
-unsigned char const sfb_8000_mixed[] = {
-  /* long */  12, 12, 12,
-  /* short */  4,  4,  4,  8,  8,  8, 12, 12, 12, 16, 16, 16,
-              20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36,
-               2,  2,  2,  2,  2,  2,  2,  2,  2, 26, 26, 26
-};
-
-static
-struct {
-  unsigned char const *l;
-  unsigned char const *s;
-  unsigned char const *m;
-} const sfbwidth_table[9] = {
-  { sfb_48000_long, sfb_48000_short, sfb_48000_mixed },
-  { sfb_44100_long, sfb_44100_short, sfb_44100_mixed },
-  { sfb_32000_long, sfb_32000_short, sfb_32000_mixed },
-  { sfb_24000_long, sfb_24000_short, sfb_24000_mixed },
-  { sfb_22050_long, sfb_22050_short, sfb_22050_mixed },
-  { sfb_16000_long, sfb_16000_short, sfb_16000_mixed },
-  { sfb_12000_long, sfb_12000_short, sfb_12000_mixed },
-  { sfb_11025_long, sfb_11025_short, sfb_11025_mixed },
-  {  sfb_8000_long,  sfb_8000_short,  sfb_8000_mixed }
-};
-
-/*
- * scalefactor band preemphasis (used only when preflag is set)
- * derived from Table B.6 of ISO/IEC 11172-3
- */
-static
-unsigned char const pretab[22] = {
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0
-};
-
-/*
- * table for requantization
- *
- * rq_table[x].mantissa * 2^(rq_table[x].exponent) = x^(4/3)
- */
-static
-struct fixedfloat {
-  unsigned long mantissa; //   : 27;
-  unsigned short exponent; // :  5;
-} const rq_table[8207] = {
-# include "rq_table.dat"
-};
-
-/*
- * fractional powers of two
- * used for requantization and joint stereo decoding
- *
- * root_table[3 + x] = 2^(x/4)
- */
-static
-mad_fixed_t const root_table[7] = {
-  MAD_F(0x09837f05) /* 2^(-3/4) == 0.59460355750136 */,
-  MAD_F(0x0b504f33) /* 2^(-2/4) == 0.70710678118655 */,
-  MAD_F(0x0d744fcd) /* 2^(-1/4) == 0.84089641525371 */,
-  MAD_F(0x10000000) /* 2^( 0/4) == 1.00000000000000 */,
-  MAD_F(0x1306fe0a) /* 2^(+1/4) == 1.18920711500272 */,
-  MAD_F(0x16a09e66) /* 2^(+2/4) == 1.41421356237310 */,
-  MAD_F(0x1ae89f99) /* 2^(+3/4) == 1.68179283050743 */
-};
-
-/*
- * coefficients for aliasing reduction
- * derived from Table B.9 of ISO/IEC 11172-3
- *
- *  c[]  = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 }
- * cs[i] =    1 / sqrt(1 + c[i]^2)
- * ca[i] = c[i] / sqrt(1 + c[i]^2)
- */
-static
-mad_fixed_t const cs[8] = {
-  +MAD_F(0x0db84a81) /* +0.857492926 */, +MAD_F(0x0e1b9d7f) /* +0.881741997 */,
-  +MAD_F(0x0f31adcf) /* +0.949628649 */, +MAD_F(0x0fbba815) /* +0.983314592 */,
-  +MAD_F(0x0feda417) /* +0.995517816 */, +MAD_F(0x0ffc8fc8) /* +0.999160558 */,
-  +MAD_F(0x0fff964c) /* +0.999899195 */, +MAD_F(0x0ffff8d3) /* +0.999993155 */
-};
-
-static
-mad_fixed_t const ca[8] = {
-  -MAD_F(0x083b5fe7) /* -0.514495755 */, -MAD_F(0x078c36d2) /* -0.471731969 */,
-  -MAD_F(0x05039814) /* -0.313377454 */, -MAD_F(0x02e91dd1) /* -0.181913200 */,
-  -MAD_F(0x0183603a) /* -0.094574193 */, -MAD_F(0x00a7cb87) /* -0.040965583 */,
-  -MAD_F(0x003a2847) /* -0.014198569 */, -MAD_F(0x000f27b4) /* -0.003699975 */
-};
-
-/*
- * IMDCT coefficients for short blocks
- * derived from section 2.4.3.4.10.2 of ISO/IEC 11172-3
- *
- * imdct_s[i/even][k] = cos((PI / 24) * (2 *       (i / 2) + 7) * (2 * k + 1))
- * imdct_s[i /odd][k] = cos((PI / 24) * (2 * (6 + (i-1)/2) + 7) * (2 * k + 1))
- */
-static
-mad_fixed_t const imdct_s[6][6] = {
-# include "imdct_s.dat"
-};
-
-# if !defined(ASO_IMDCT)
-/*
- * windowing coefficients for long blocks
- * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
- *
- * window_l[i] = sin((PI / 36) * (i + 1/2))
- */
-static
-mad_fixed_t const window_l[36] = {
-  MAD_F(0x00b2aa3e) /* 0.043619387 */, MAD_F(0x0216a2a2) /* 0.130526192 */,
-  MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x04cfb0e2) /* 0.300705800 */,
-  MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x07635284) /* 0.461748613 */,
-  MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x09bd7ca0) /* 0.608761429 */,
-  MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x0bcbe352) /* 0.737277337 */,
-  MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0d7e8807) /* 0.843391446 */,
-
-  MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0ec835e8) /* 0.923879533 */,
-  MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0f9ee890) /* 0.976296007 */,
-  MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ffc19fd) /* 0.999048222 */,
-  MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0fdcf549) /* 0.991444861 */,
-  MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0f426cb5) /* 0.953716951 */,
-  MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0e313245) /* 0.887010833 */,
-
-  MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0cb19346) /* 0.793353340 */,
-  MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0acf37ad) /* 0.675590208 */,
-  MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0898c779) /* 0.537299608 */,
-  MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x061f78aa) /* 0.382683432 */,
-  MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x03768962) /* 0.216439614 */,
-  MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x00b2aa3e) /* 0.043619387 */,
-};
-# endif  /* ASO_IMDCT */
-
-/*
- * windowing coefficients for short blocks
- * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3
- *
- * window_s[i] = sin((PI / 12) * (i + 1/2))
- */
-static
-mad_fixed_t const window_s[12] = {
-  MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x061f78aa) /* 0.382683432 */,
-  MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0cb19346) /* 0.793353340 */,
-  MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0fdcf549) /* 0.991444861 */,
-  MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ec835e8) /* 0.923879533 */,
-  MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x09bd7ca0) /* 0.608761429 */,
-  MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0216a2a2) /* 0.130526192 */,
-};
-
-/*
- * coefficients for intensity stereo processing
- * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3
- *
- * is_ratio[i] = tan(i * (PI / 12))
- * is_table[i] = is_ratio[i] / (1 + is_ratio[i])
- */
-static
-mad_fixed_t const is_table[7] = {
-  MAD_F(0x00000000) /* 0.000000000 */,
-  MAD_F(0x0361962f) /* 0.211324865 */,
-  MAD_F(0x05db3d74) /* 0.366025404 */,
-  MAD_F(0x08000000) /* 0.500000000 */,
-  MAD_F(0x0a24c28c) /* 0.633974596 */,
-  MAD_F(0x0c9e69d1) /* 0.788675135 */,
-  MAD_F(0x10000000) /* 1.000000000 */
-};
-
-/*
- * coefficients for LSF intensity stereo processing
- * derived from section 2.4.3.2 of ISO/IEC 13818-3
- *
- * is_lsf_table[0][i] = (1 / sqrt(sqrt(2)))^(i + 1)
- * is_lsf_table[1][i] = (1 /      sqrt(2)) ^(i + 1)
- */
-static
-mad_fixed_t const is_lsf_table[2][15] = {
-  {
-    MAD_F(0x0d744fcd) /* 0.840896415 */,
-    MAD_F(0x0b504f33) /* 0.707106781 */,
-    MAD_F(0x09837f05) /* 0.594603558 */,
-    MAD_F(0x08000000) /* 0.500000000 */,
-    MAD_F(0x06ba27e6) /* 0.420448208 */,
-    MAD_F(0x05a8279a) /* 0.353553391 */,
-    MAD_F(0x04c1bf83) /* 0.297301779 */,
-    MAD_F(0x04000000) /* 0.250000000 */,
-    MAD_F(0x035d13f3) /* 0.210224104 */,
-    MAD_F(0x02d413cd) /* 0.176776695 */,
-    MAD_F(0x0260dfc1) /* 0.148650889 */,
-    MAD_F(0x02000000) /* 0.125000000 */,
-    MAD_F(0x01ae89fa) /* 0.105112052 */,
-    MAD_F(0x016a09e6) /* 0.088388348 */,
-    MAD_F(0x01306fe1) /* 0.074325445 */
-  }, {
-    MAD_F(0x0b504f33) /* 0.707106781 */,
-    MAD_F(0x08000000) /* 0.500000000 */,
-    MAD_F(0x05a8279a) /* 0.353553391 */,
-    MAD_F(0x04000000) /* 0.250000000 */,
-    MAD_F(0x02d413cd) /* 0.176776695 */,
-    MAD_F(0x02000000) /* 0.125000000 */,
-    MAD_F(0x016a09e6) /* 0.088388348 */,
-    MAD_F(0x01000000) /* 0.062500000 */,
-    MAD_F(0x00b504f3) /* 0.044194174 */,
-    MAD_F(0x00800000) /* 0.031250000 */,
-    MAD_F(0x005a827a) /* 0.022097087 */,
-    MAD_F(0x00400000) /* 0.015625000 */,
-    MAD_F(0x002d413d) /* 0.011048543 */,
-    MAD_F(0x00200000) /* 0.007812500 */,
-    MAD_F(0x0016a09e) /* 0.005524272 */
-  }
-};
-
-/*
- * NAME:	III_sideinfo()
- * DESCRIPTION:	decode frame side information from a bitstream
- */
-static
-enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch,
-			    int lsf, struct sideinfo *si,
-			    unsigned int *data_bitlen,
-			    unsigned int *priv_bitlen)
-{
-  unsigned int ngr, gr, ch, i;
-  enum mad_error result = MAD_ERROR_NONE;
-
-  *data_bitlen = 0;
-  *priv_bitlen = lsf ? ((nch == 1) ? 1 : 2) : ((nch == 1) ? 5 : 3);
-
-  si->main_data_begin = mad_bit_read(ptr, lsf ? 8 : 9);
-  si->private_bits    = mad_bit_read(ptr, *priv_bitlen);
-
-  ngr = 1;
-  if (!lsf) {
-    ngr = 2;
-
-    for (ch = 0; ch < nch; ++ch)
-      si->scfsi[ch] = mad_bit_read(ptr, 4);
-  }
-
-  for (gr = 0; gr < ngr; ++gr) {
-    struct granule *granule = &si->gr[gr];
-
-    for (ch = 0; ch < nch; ++ch) {
-      struct channel *channel = &granule->ch[ch];
-
-      channel->part2_3_length    = mad_bit_read(ptr, 12);
-      channel->big_values        = mad_bit_read(ptr, 9);
-      channel->global_gain       = mad_bit_read(ptr, 8);
-      channel->scalefac_compress = mad_bit_read(ptr, lsf ? 9 : 4);
-
-      *data_bitlen += channel->part2_3_length;
-
-      if (channel->big_values > 288 && result == 0)
-	result = MAD_ERROR_BADBIGVALUES;
-
-      channel->flags = 0;
-
-      /* window_switching_flag */
-      if (mad_bit_read(ptr, 1)) {
-	channel->block_type = mad_bit_read(ptr, 2);
-
-	if (channel->block_type == 0 && result == 0)
-	  result = MAD_ERROR_BADBLOCKTYPE;
-
-	if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0)
-	  result = MAD_ERROR_BADSCFSI;
-
-	channel->region0_count = 7;
-	channel->region1_count = 36;
-
-	if (mad_bit_read(ptr, 1))
-	  channel->flags |= mixed_block_flag;
-	else if (channel->block_type == 2)
-	  channel->region0_count = 8;
-
-	for (i = 0; i < 2; ++i)
-	  channel->table_select[i] = mad_bit_read(ptr, 5);
-
-# if defined(DEBUG)
-	channel->table_select[2] = 4;  /* not used */
-# endif
-
-	for (i = 0; i < 3; ++i)
-	  channel->subblock_gain[i] = mad_bit_read(ptr, 3);
-      }
-      else {
-	channel->block_type = 0;
-
-	for (i = 0; i < 3; ++i)
-	  channel->table_select[i] = mad_bit_read(ptr, 5);
-
-	channel->region0_count = mad_bit_read(ptr, 4);
-	channel->region1_count = mad_bit_read(ptr, 3);
-      }
-
-      /* [preflag,] scalefac_scale, count1table_select */
-      channel->flags |= mad_bit_read(ptr, lsf ? 2 : 3);
-    }
-  }
-
-  return result;
-}
-
-/*
- * NAME:	III_scalefactors_lsf()
- * DESCRIPTION:	decode channel scalefactors for LSF from a bitstream
- */
-static
-unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
-				  struct channel *channel,
-				  struct channel *gr1ch, int mode_extension)
-{
-  struct mad_bitptr start;
-  unsigned int scalefac_compress, index, slen[4], part, n, i;
-  unsigned char const *nsfb;
-
-  start = *ptr;
-
-  scalefac_compress = channel->scalefac_compress;
-  index = (channel->block_type == 2) ?
-    ((channel->flags & mixed_block_flag) ? 2 : 1) : 0;
-
-  if (!((mode_extension & I_STEREO) && gr1ch)) {
-    if (scalefac_compress < 400) {
-      slen[0] = (scalefac_compress >> 4) / 5;
-      slen[1] = (scalefac_compress >> 4) % 5;
-      slen[2] = (scalefac_compress % 16) >> 2;
-      slen[3] =  scalefac_compress %  4;
-
-      nsfb = nsfb_table[0][index];
-    }
-    else if (scalefac_compress < 500) {
-      scalefac_compress -= 400;
-
-      slen[0] = (scalefac_compress >> 2) / 5;
-      slen[1] = (scalefac_compress >> 2) % 5;
-      slen[2] =  scalefac_compress %  4;
-      slen[3] = 0;
-
-      nsfb = nsfb_table[1][index];
-    }
-    else {
-      scalefac_compress -= 500;
-
-      slen[0] = scalefac_compress / 3;
-      slen[1] = scalefac_compress % 3;
-      slen[2] = 0;
-      slen[3] = 0;
-
-      channel->flags |= preflag;
-
-      nsfb = nsfb_table[2][index];
-    }
-
-    n = 0;
-    for (part = 0; part < 4; ++part) {
-      for (i = 0; i < nsfb[part]; ++i)
-	channel->scalefac[n++] = mad_bit_read(ptr, slen[part]);
-    }
-
-    while (n < 39)
-      channel->scalefac[n++] = 0;
-  }
-  else {  /* (mode_extension & I_STEREO) && gr1ch (i.e. ch == 1) */
-    scalefac_compress >>= 1;
-
-    if (scalefac_compress < 180) {
-      slen[0] =  scalefac_compress / 36;
-      slen[1] = (scalefac_compress % 36) / 6;
-      slen[2] = (scalefac_compress % 36) % 6;
-      slen[3] = 0;
-
-      nsfb = nsfb_table[3][index];
-    }
-    else if (scalefac_compress < 244) {
-      scalefac_compress -= 180;
-
-      slen[0] = (scalefac_compress % 64) >> 4;
-      slen[1] = (scalefac_compress % 16) >> 2;
-      slen[2] =  scalefac_compress %  4;
-      slen[3] = 0;
-
-      nsfb = nsfb_table[4][index];
-    }
-    else {
-      scalefac_compress -= 244;
-
-      slen[0] = scalefac_compress / 3;
-      slen[1] = scalefac_compress % 3;
-      slen[2] = 0;
-      slen[3] = 0;
-
-      nsfb = nsfb_table[5][index];
-    }
-
-    n = 0;
-    for (part = 0; part < 4; ++part) {
-      unsigned int max, is_pos;
-
-      max = (1 << slen[part]) - 1;
-
-      for (i = 0; i < nsfb[part]; ++i) {
-	is_pos = mad_bit_read(ptr, slen[part]);
-
-	channel->scalefac[n] = is_pos;
-	gr1ch->scalefac[n++] = (is_pos == max);
-      }
-    }
-
-    while (n < 39) {
-      channel->scalefac[n] = 0;
-      gr1ch->scalefac[n++] = 0;  /* apparently not illegal */
-    }
-  }
-
-  return mad_bit_length(&start, ptr);
-}
-
-/*
- * NAME:	III_scalefactors()
- * DESCRIPTION:	decode channel scalefactors of one granule from a bitstream
- */
-static
-unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
-			      struct channel const *gr0ch, unsigned int scfsi)
-{
-  struct mad_bitptr start;
-  unsigned int slen1, slen2, sfbi;
-
-  start = *ptr;
-
-  slen1 = sflen_table[channel->scalefac_compress].slen1;
-  slen2 = sflen_table[channel->scalefac_compress].slen2;
-
-  if (channel->block_type == 2) {
-    unsigned int nsfb;
-
-    sfbi = 0;
-
-    nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3;
-    while (nsfb--)
-      channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1);
-
-    nsfb = 6 * 3;
-    while (nsfb--)
-      channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2);
-
-    nsfb = 1 * 3;
-    while (nsfb--)
-      channel->scalefac[sfbi++] = 0;
-  }
-  else {  /* channel->block_type != 2 */
-    if (scfsi & 0x8) {
-      for (sfbi = 0; sfbi < 6; ++sfbi)
-	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
-    }
-    else {
-      for (sfbi = 0; sfbi < 6; ++sfbi)
-	channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
-    }
-
-    if (scfsi & 0x4) {
-      for (sfbi = 6; sfbi < 11; ++sfbi)
-	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
-    }
-    else {
-      for (sfbi = 6; sfbi < 11; ++sfbi)
-	channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
-    }
-
-    if (scfsi & 0x2) {
-      for (sfbi = 11; sfbi < 16; ++sfbi)
-	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
-    }
-    else {
-      for (sfbi = 11; sfbi < 16; ++sfbi)
-	channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
-    }
-
-    if (scfsi & 0x1) {
-      for (sfbi = 16; sfbi < 21; ++sfbi)
-	channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
-    }
-    else {
-      for (sfbi = 16; sfbi < 21; ++sfbi)
-	channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
-    }
-
-    channel->scalefac[21] = 0;
-  }
-
-  return mad_bit_length(&start, ptr);
-}
-
-/*
- * The Layer III formula for requantization and scaling is defined by
- * section 2.4.3.4.7.1 of ISO/IEC 11172-3, as follows:
- *
- *   long blocks:
- *   xr[i] = sign(is[i]) * abs(is[i])^(4/3) *
- *           2^((1/4) * (global_gain - 210)) *
- *           2^-(scalefac_multiplier *
- *               (scalefac_l[sfb] + preflag * pretab[sfb]))
- *
- *   short blocks:
- *   xr[i] = sign(is[i]) * abs(is[i])^(4/3) *
- *           2^((1/4) * (global_gain - 210 - 8 * subblock_gain[w])) *
- *           2^-(scalefac_multiplier * scalefac_s[sfb][w])
- *
- *   where:
- *   scalefac_multiplier = (scalefac_scale + 1) / 2
- *
- * The routines III_exponents() and III_requantize() facilitate this
- * calculation.
- */
-
-/*
- * NAME:	III_exponents()
- * DESCRIPTION:	calculate scalefactor exponents
- */
-static
-void III_exponents(struct channel const *channel,
-		   unsigned char const *sfbwidth, signed int exponents[39])
-{
-  signed int gain;
-  unsigned int scalefac_multiplier, sfbi;
-
-  gain = (signed int) channel->global_gain - 210;
-  scalefac_multiplier = (channel->flags & scalefac_scale) ? 2 : 1;
-
-  if (channel->block_type == 2) {
-    unsigned int l;
-    signed int gain0, gain1, gain2;
-
-    sfbi = l = 0;
-
-    if (channel->flags & mixed_block_flag) {
-      unsigned int premask;
-
-      premask = (channel->flags & preflag) ? ~0 : 0;
-
-      /* long block subbands 0-1 */
-
-      while (l < 36) {
-	exponents[sfbi] = gain -
-	  (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) <<
-			scalefac_multiplier);
-
-	l += sfbwidth[sfbi++];
-      }
-    }
-
-    /* this is probably wrong for 8000 Hz short/mixed blocks */
-
-    gain0 = gain - 8 * (signed int) channel->subblock_gain[0];
-    gain1 = gain - 8 * (signed int) channel->subblock_gain[1];
-    gain2 = gain - 8 * (signed int) channel->subblock_gain[2];
-
-    while (l < 576) {
-      exponents[sfbi + 0] = gain0 -
-	(signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier);
-      exponents[sfbi + 1] = gain1 -
-	(signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier);
-      exponents[sfbi + 2] = gain2 -
-	(signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier);
-
-      l    += 3 * sfbwidth[sfbi];
-      sfbi += 3;
-    }
-  }
-  else {  /* channel->block_type != 2 */
-    if (channel->flags & preflag) {
-      for (sfbi = 0; sfbi < 22; ++sfbi) {
-	exponents[sfbi] = gain -
-	  (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) <<
-			scalefac_multiplier);
-      }
-    }
-    else {
-      for (sfbi = 0; sfbi < 22; ++sfbi) {
-	exponents[sfbi] = gain -
-	  (signed int) (channel->scalefac[sfbi] << scalefac_multiplier);
-      }
-    }
-  }
-}
-
-/*
- * NAME:	III_requantize()
- * DESCRIPTION:	requantize one (positive) value
- */
-static
-mad_fixed_t III_requantize(unsigned int value, signed int exp)
-{
-  mad_fixed_t requantized;
-  signed int frac;
-  struct fixedfloat const *power;
-
-  frac = exp % 4;  /* assumes sign(frac) == sign(exp) */
-  exp /= 4;
-
-  power = &rq_table[value];
-  requantized = power->mantissa;
-  exp += power->exponent;
-
-  if (exp < 0) {
-    if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) {
-      /* underflow */
-      requantized = 0;
-    }
-    else {
-      requantized += 1L << (-exp - 1);
-      requantized >>= -exp;
-    }
-  }
-  else {
-    if (exp >= 5) {
-      /* overflow */
-# if defined(DEBUG)
-      fprintf(stderr, "requantize overflow (%f * 2^%d)\n",
-	      mad_f_todouble(requantized), exp);
-# endif
-      requantized = MAD_F_MAX;
-    }
-    else
-      requantized <<= exp;
-  }
-
-  return frac ? mad_f_mul(requantized, root_table[3 + frac]) : requantized;
-}
-
-/* we must take care that sz >= bits and sz < sizeof(long) lest bits == 0 */
-# define MASK(cache, sz, bits)	\
-    (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1))
-# define MASK1BIT(cache, sz)  \
-    ((cache) & (1 << ((sz) - 1)))
-
-/*
- * NAME:	III_huffdecode()
- * DESCRIPTION:	decode Huffman code words of one channel of one granule
- */
-static
-enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
-			      struct channel *channel,
-			      unsigned char const *sfbwidth,
-			      unsigned int part2_length)
-{
-  signed int exponents[39], exp;
-  signed int const *expptr;
-  struct mad_bitptr peek;
-  signed int bits_left, cachesz;
-  register mad_fixed_t *xrptr;
-  mad_fixed_t const *sfbound;
-  register unsigned long bitcache;
-
-  bits_left = (signed) channel->part2_3_length - (signed) part2_length;
-  if (bits_left < 0)
-    return MAD_ERROR_BADPART3LEN;
-
-  III_exponents(channel, sfbwidth, exponents);
-
-  peek = *ptr;
-  mad_bit_skip(ptr, bits_left);
-
-  /* align bit reads to byte boundaries */
-  cachesz  = mad_bit_bitsleft(&peek);
-  cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7;
-
-  bitcache   = mad_bit_read(&peek, cachesz);
-  bits_left -= cachesz;
-
-  xrptr = &xr[0];
-
-  /* big_values */
-  {
-    unsigned int region, rcount;
-    struct hufftable const *entry;
-    struct huffpair const *table;
-    unsigned int linbits, startbits, big_values, reqhits;
-    mad_fixed_t reqcache[16];
-
-    sfbound = xrptr + *sfbwidth++;
-    rcount  = channel->region0_count + 1;
-
-    entry     = &mad_huff_pair_table[channel->table_select[region = 0]];
-    table     = entry->table;
-    linbits   = entry->linbits;
-    startbits = entry->startbits;
-
-    if (table == 0)
-      return MAD_ERROR_BADHUFFTABLE;
-
-    expptr  = &exponents[0];
-    exp     = *expptr++;
-    reqhits = 0;
-
-    big_values = channel->big_values;
-
-    while (big_values-- && cachesz + bits_left > 0) {
-      struct huffpair const *pair;
-      unsigned int clumpsz, value;
-      register mad_fixed_t requantized;
-
-      if (xrptr == sfbound) {
-	sfbound += *sfbwidth++;
-
-	/* change table if region boundary */
-
-	if (--rcount == 0) {
-	  if (region == 0)
-	    rcount = channel->region1_count + 1;
-	  else
-	    rcount = 0;  /* all remaining */
-
-	  entry     = &mad_huff_pair_table[channel->table_select[++region]];
-	  table     = entry->table;
-	  linbits   = entry->linbits;
-	  startbits = entry->startbits;
-
-	  if (table == 0)
-	    return MAD_ERROR_BADHUFFTABLE;
-	}
-
-	if (exp != *expptr) {
-	  exp = *expptr;
-	  reqhits = 0;
-	}
-
-	++expptr;
-      }
-
-      if (cachesz < 21) {
-	unsigned int bits;
-
-	bits       = ((32 - 1 - 21) + (21 - cachesz)) & ~7;
-	bitcache   = (bitcache << bits) | mad_bit_read(&peek, bits);
-	cachesz   += bits;
-	bits_left -= bits;
-      }
-
-      /* hcod (0..19) */
-
-      clumpsz = startbits;
-      pair    = &table[MASK(bitcache, cachesz, clumpsz)];
-
-      while (!pair->final) {
-	cachesz -= clumpsz;
-
-	clumpsz = pair->ptr.bits;
-	pair    = &table[pair->ptr.offset + MASK(bitcache, cachesz, clumpsz)];
-      }
-
-      cachesz -= pair->value.hlen;
-
-      if (linbits) {
-	/* x (0..14) */
-
-	value = pair->value.x;
-
-	switch (value) {
-	case 0:
-	  xrptr[0] = 0;
-	  break;
-
-	case 15:
-	  if (cachesz < linbits + 2) {
-	    bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
-	    cachesz   += 16;
-	    bits_left -= 16;
-	  }
-
-	  value += MASK(bitcache, cachesz, linbits);
-	  cachesz -= linbits;
-
-	  requantized = III_requantize(value, exp);
-	  goto x_final;
-
-	default:
-	  if (reqhits & (1 << value))
-	    requantized = reqcache[value];
-	  else {
-	    reqhits |= (1 << value);
-	    requantized = reqcache[value] = III_requantize(value, exp);
-	  }
-
-	x_final:
-	  xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
-	    -requantized : requantized;
-	}
-
-	/* y (0..14) */
-
-	value = pair->value.y;
-
-	switch (value) {
-	case 0:
-	  xrptr[1] = 0;
-	  break;
-
-	case 15:
-	  if (cachesz < linbits + 1) {
-	    bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
-	    cachesz   += 16;
-	    bits_left -= 16;
-	  }
-
-	  value += MASK(bitcache, cachesz, linbits);
-	  cachesz -= linbits;
-
-	  requantized = III_requantize(value, exp);
-	  goto y_final;
-
-	default:
-	  if (reqhits & (1 << value))
-	    requantized = reqcache[value];
-	  else {
-	    reqhits |= (1 << value);
-	    requantized = reqcache[value] = III_requantize(value, exp);
-	  }
-
-	y_final:
-	  xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
-	    -requantized : requantized;
-	}
-      }
-      else {
-	/* x (0..1) */
-
-	value = pair->value.x;
-
-	if (value == 0)
-	  xrptr[0] = 0;
-	else {
-	  if (reqhits & (1 << value))
-	    requantized = reqcache[value];
-	  else {
-	    reqhits |= (1 << value);
-	    requantized = reqcache[value] = III_requantize(value, exp);
-	  }
-
-	  xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
-	    -requantized : requantized;
-	}
-
-	/* y (0..1) */
-
-	value = pair->value.y;
-
-	if (value == 0)
-	  xrptr[1] = 0;
-	else {
-	  if (reqhits & (1 << value))
-	    requantized = reqcache[value];
-	  else {
-	    reqhits |= (1 << value);
-	    requantized = reqcache[value] = III_requantize(value, exp);
-	  }
-
-	  xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
-	    -requantized : requantized;
-	}
-      }
-
-      xrptr += 2;
-    }
-  }
-
-  if (cachesz + bits_left < 0)
-    return MAD_ERROR_BADHUFFDATA;  /* big_values overrun */
-
-  /* count1 */
-  {
-    struct huffquad const *table;
-    register mad_fixed_t requantized;
-
-    table = mad_huff_quad_table[channel->flags & count1table_select];
-
-    requantized = III_requantize(1, exp);
-
-    while (cachesz + bits_left > 0 && xrptr <= &xr[572]) {
-      struct huffquad const *quad;
-
-      /* hcod (1..6) */
-
-      if (cachesz < 10) {
-	bitcache   = (bitcache << 16) | mad_bit_read(&peek, 16);
-	cachesz   += 16;
-	bits_left -= 16;
-      }
-
-      quad = &table[MASK(bitcache, cachesz, 4)];
-
-      /* quad tables guaranteed to have at most one extra lookup */
-      if (!quad->final) {
-	cachesz -= 4;
-
-	quad = &table[quad->ptr.offset +
-		      MASK(bitcache, cachesz, quad->ptr.bits)];
-      }
-
-      cachesz -= quad->value.hlen;
-
-      if (xrptr == sfbound) {
-	sfbound += *sfbwidth++;
-
-	if (exp != *expptr) {
-	  exp = *expptr;
-	  requantized = III_requantize(1, exp);
-	}
-
-	++expptr;
-      }
-
-      /* v (0..1) */
-
-      xrptr[0] = quad->value.v ?
-	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
-
-      /* w (0..1) */
-
-      xrptr[1] = quad->value.w ?
-	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
-
-      xrptr += 2;
-
-      if (xrptr == sfbound) {
-	sfbound += *sfbwidth++;
-
-	if (exp != *expptr) {
-	  exp = *expptr;
-	  requantized = III_requantize(1, exp);
-	}
-
-	++expptr;
-      }
-
-      /* x (0..1) */
-
-      xrptr[0] = quad->value.x ?
-	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
-
-      /* y (0..1) */
-
-      xrptr[1] = quad->value.y ?
-	(MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0;
-
-      xrptr += 2;
-    }
-
-    if (cachesz + bits_left < 0) {
-# if 0 && defined(DEBUG)
-      fprintf(stderr, "huffman count1 overrun (%d bits)\n",
-	      -(cachesz + bits_left));
-# endif
-
-      /* technically the bitstream is misformatted, but apparently
-	 some encoders are just a bit sloppy with stuffing bits */
-
-      xrptr -= 4;
-    }
-  }
-
-  assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT);
-
-# if 0 && defined(DEBUG)
-  if (bits_left < 0)
-    fprintf(stderr, "read %d bits too many\n", -bits_left);
-  else if (cachesz + bits_left > 0)
-    fprintf(stderr, "%d stuffing bits\n", cachesz + bits_left);
-# endif
-
-  /* rzero */
-  while (xrptr < &xr[576]) {
-    xrptr[0] = 0;
-    xrptr[1] = 0;
-
-    xrptr += 2;
-  }
-
-  return MAD_ERROR_NONE;
-}
-
-# undef MASK
-# undef MASK1BIT
-
-/*
- * NAME:	III_reorder()
- * DESCRIPTION:	reorder frequency lines of a short block into subband order
- */
-static
-void III_reorder(mad_fixed_t xr[576], struct channel const *channel,
-		 unsigned char const sfbwidth[39])
-{
-  mad_fixed_t tmp[32][3][6];
-  unsigned int sb, l, f, w, sbw[3], sw[3];
-
-  /* this is probably wrong for 8000 Hz mixed blocks */
-
-  sb = 0;
-  if (channel->flags & mixed_block_flag) {
-    sb = 2;
-
-    l = 0;
-    while (l < 36)
-      l += *sfbwidth++;
-  }
-
-  for (w = 0; w < 3; ++w) {
-    sbw[w] = sb;
-    sw[w]  = 0;
-  }
-
-  f = *sfbwidth++;
-  w = 0;
-
-  for (l = 18 * sb; l < 576; ++l) {
-    if (f-- == 0) {
-      f = *sfbwidth++ - 1;
-      w = (w + 1) % 3;
-    }
-
-    tmp[sbw[w]][w][sw[w]++] = xr[l];
-
-    if (sw[w] == 6) {
-      sw[w] = 0;
-      ++sbw[w];
-    }
-  }
-
-  memcpy(&xr[18 * sb], &tmp[sb], (576 - 18 * sb) * sizeof(mad_fixed_t));
-}
-
-/*
- * NAME:	III_stereo()
- * DESCRIPTION:	perform joint stereo processing on a granule
- */
-static
-enum mad_error III_stereo(mad_fixed_t xr[2][576],
-			  struct granule const *granule,
-			  struct mad_header *header,
-			  unsigned char const *sfbwidth)
-{
-  short modes[39];
-  unsigned int sfbi, l, n, i;
-
-  if (granule->ch[0].block_type !=
-      granule->ch[1].block_type ||
-      (granule->ch[0].flags & mixed_block_flag) !=
-      (granule->ch[1].flags & mixed_block_flag))
-    return MAD_ERROR_BADSTEREO;
-
-  for (i = 0; i < 39; ++i)
-    modes[i] = header->mode_extension;
-
-  /* intensity stereo */
-
-  if (header->mode_extension & I_STEREO) {
-    struct channel const *right_ch = &granule->ch[1];
-    mad_fixed_t const *right_xr = xr[1];
-    unsigned int is_pos;
-
-    header->flags |= MAD_FLAG_I_STEREO;
-
-    /* first determine which scalefactor bands are to be processed */
-
-    if (right_ch->block_type == 2) {
-      unsigned int lower, start, max, bound[3], w;
-
-      lower = start = max = bound[0] = bound[1] = bound[2] = 0;
-
-      sfbi = l = 0;
-
-      if (right_ch->flags & mixed_block_flag) {
-	while (l < 36) {
-	  n = sfbwidth[sfbi++];
-
-	  for (i = 0; i < n; ++i) {
-	    if (right_xr[i]) {
-	      lower = sfbi;
-	      break;
-	    }
-	  }
-
-	  right_xr += n;
-	  l += n;
-	}
-
-	start = sfbi;
-      }
-
-      w = 0;
-      while (l < 576) {
-	n = sfbwidth[sfbi++];
-
-	for (i = 0; i < n; ++i) {
-	  if (right_xr[i]) {
-	    max = bound[w] = sfbi;
-	    break;
-	  }
-	}
-
-	right_xr += n;
-	l += n;
-	w = (w + 1) % 3;
-      }
-
-      if (max)
-	lower = start;
-
-      /* long blocks */
-
-      for (i = 0; i < lower; ++i)
-	modes[i] = header->mode_extension & ~I_STEREO;
-
-      /* short blocks */
-
-      w = 0;
-      for (i = start; i < max; ++i) {
-	if (i < bound[w])
-	  modes[i] = header->mode_extension & ~I_STEREO;
-
-	w = (w + 1) % 3;
-      }
-    }
-    else {  /* right_ch->block_type != 2 */
-      unsigned int bound;
-
-      bound = 0;
-      for (sfbi = l = 0; l < 576; l += n) {
-	n = sfbwidth[sfbi++];
-
-	for (i = 0; i < n; ++i) {
-	  if (right_xr[i]) {
-	    bound = sfbi;
-	    break;
-	  }
-	}
-
-	right_xr += n;
-      }
-
-      for (i = 0; i < bound; ++i)
-	modes[i] = header->mode_extension & ~I_STEREO;
-    }
-
-    /* now do the actual processing */
-
-    if (header->flags & MAD_FLAG_LSF_EXT) {
-      unsigned char const *illegal_pos = granule[1].ch[1].scalefac;
-      mad_fixed_t const *lsf_scale;
-
-      /* intensity_scale */
-      lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1];
-
-      for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
-	n = sfbwidth[sfbi];
-
-	if (!(modes[sfbi] & I_STEREO))
-	  continue;
-
-	if (illegal_pos[sfbi]) {
-	  modes[sfbi] &= ~I_STEREO;
-	  continue;
-	}
-
-	is_pos = right_ch->scalefac[sfbi];
-
-	for (i = 0; i < n; ++i) {
-	  register mad_fixed_t left;
-
-	  left = xr[0][l + i];
-
-	  if (is_pos == 0)
-	    xr[1][l + i] = left;
-	  else {
-	    register mad_fixed_t opposite;
-
-	    opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]);
-
-	    if (is_pos & 1) {
-	      xr[0][l + i] = opposite;
-	      xr[1][l + i] = left;
-	    }
-	    else
-	      xr[1][l + i] = opposite;
-	  }
-	}
-      }
-    }
-    else {  /* !(header->flags & MAD_FLAG_LSF_EXT) */
-      for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
-	n = sfbwidth[sfbi];
-
-	if (!(modes[sfbi] & I_STEREO))
-	  continue;
-
-	is_pos = right_ch->scalefac[sfbi];
-
-	if (is_pos >= 7) {  /* illegal intensity position */
-	  modes[sfbi] &= ~I_STEREO;
-	  continue;
-	}
-
-	for (i = 0; i < n; ++i) {
-	  register mad_fixed_t left;
-
-	  left = xr[0][l + i];
-
-	  xr[0][l + i] = mad_f_mul(left, is_table[    is_pos]);
-	  xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]);
-	}
-      }
-    }
-  }
-
-  /* middle/side stereo */
-
-  if (header->mode_extension & MS_STEREO) {
-    register mad_fixed_t invsqrt2;
-
-    header->flags |= MAD_FLAG_MS_STEREO;
-
-    invsqrt2 = root_table[3 + -2];
-
-    for (sfbi = l = 0; l < 576; ++sfbi, l += n) {
-      n = sfbwidth[sfbi];
-
-      if (modes[sfbi] != MS_STEREO)
-	continue;
-
-      for (i = 0; i < n; ++i) {
-	register mad_fixed_t m, s;
-
-	m = xr[0][l + i];
-	s = xr[1][l + i];
-
-	xr[0][l + i] = mad_f_mul(m + s, invsqrt2);  /* l = (m + s) / sqrt(2) */
-	xr[1][l + i] = mad_f_mul(m - s, invsqrt2);  /* r = (m - s) / sqrt(2) */
-      }
-    }
-  }
-
-  return MAD_ERROR_NONE;
-}
-
-/*
- * NAME:	III_aliasreduce()
- * DESCRIPTION:	perform frequency line alias reduction
- */
-static
-void III_aliasreduce(mad_fixed_t xr[576], int lines)
-{
-  mad_fixed_t const *bound;
-  int i;
-
-  bound = &xr[lines];
-  for (xr += 18; xr < bound; xr += 18) {
-    for (i = 0; i < 8; ++i) {
-      register mad_fixed_t a, b;
-      register mad_fixed64hi_t hi;
-      register mad_fixed64lo_t lo;
-
-      a = xr[-1 - i];
-      b = xr[     i];
-
-# if defined(ASO_ZEROCHECK)
-      if (a | b) {
-# endif
-	MAD_F_ML0(hi, lo,  a, cs[i]);
-	MAD_F_MLA(hi, lo, -b, ca[i]);
-
-	xr[-1 - i] = MAD_F_MLZ(hi, lo);
-
-	MAD_F_ML0(hi, lo,  b, cs[i]);
-	MAD_F_MLA(hi, lo,  a, ca[i]);
-
-	xr[     i] = MAD_F_MLZ(hi, lo);
-# if defined(ASO_ZEROCHECK)
-      }
-# endif
-    }
-  }
-}
-
-# if defined(ASO_IMDCT)
-void III_imdct_l(mad_fixed_t const [18], mad_fixed_t [36], unsigned int);
-# else
-#  if 1
-static
-void fastsdct(mad_fixed_t const x[9], mad_fixed_t y[18])
-{
-  mad_fixed_t a0,  a1,  a2,  a3,  a4,  a5,  a6,  a7,  a8,  a9,  a10, a11, a12;
-  mad_fixed_t a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25;
-  mad_fixed_t m0,  m1,  m2,  m3,  m4,  m5,  m6,  m7;
-
-  enum {
-    c0 =  MAD_F(0x1f838b8d),  /* 2 * cos( 1 * PI / 18) */
-    c1 =  MAD_F(0x1bb67ae8),  /* 2 * cos( 3 * PI / 18) */
-    c2 =  MAD_F(0x18836fa3),  /* 2 * cos( 4 * PI / 18) */
-    c3 =  MAD_F(0x1491b752),  /* 2 * cos( 5 * PI / 18) */
-    c4 =  MAD_F(0x0af1d43a),  /* 2 * cos( 7 * PI / 18) */
-    c5 =  MAD_F(0x058e86a0),  /* 2 * cos( 8 * PI / 18) */
-    c6 = -MAD_F(0x1e11f642)   /* 2 * cos(16 * PI / 18) */
-  };
-
-  a0 = x[3] + x[5];
-  a1 = x[3] - x[5];
-  a2 = x[6] + x[2];
-  a3 = x[6] - x[2];
-  a4 = x[1] + x[7];
-  a5 = x[1] - x[7];
-  a6 = x[8] + x[0];
-  a7 = x[8] - x[0];
-
-  a8  = a0  + a2;
-  a9  = a0  - a2;
-  a10 = a0  - a6;
-  a11 = a2  - a6;
-  a12 = a8  + a6;
-  a13 = a1  - a3;
-  a14 = a13 + a7;
-  a15 = a3  + a7;
-  a16 = a1  - a7;
-  a17 = a1  + a3;
-
-  m0 = mad_f_mul(a17, -c3);
-  m1 = mad_f_mul(a16, -c0);
-  m2 = mad_f_mul(a15, -c4);
-  m3 = mad_f_mul(a14, -c1);
-  m4 = mad_f_mul(a5,  -c1);
-  m5 = mad_f_mul(a11, -c6);
-  m6 = mad_f_mul(a10, -c5);
-  m7 = mad_f_mul(a9,  -c2);
-
-  a18 =     x[4] + a4;
-  a19 = 2 * x[4] - a4;
-  a20 = a19 + m5;
-  a21 = a19 - m5;
-  a22 = a19 + m6;
-  a23 = m4  + m2;
-  a24 = m4  - m2;
-  a25 = m4  + m1;
-
-  /* output to every other slot for convenience */
-
-  y[ 0] = a18 + a12;
-  y[ 2] = m0  - a25;
-  y[ 4] = m7  - a20;
-  y[ 6] = m3;
-  y[ 8] = a21 - m6;
-  y[10] = a24 - m1;
-  y[12] = a12 - 2 * a18;
-  y[14] = a23 + m0;
-  y[16] = a22 + m7;
-}
-
-static inline
-void sdctII(mad_fixed_t const x[18], mad_fixed_t X[18])
-{
-  mad_fixed_t tmp[9];
-  int i;
-
-  /* scale[i] = 2 * cos(PI * (2 * i + 1) / (2 * 18)) */
-  static mad_fixed_t const scale[9] = {
-    MAD_F(0x1fe0d3b4), MAD_F(0x1ee8dd47), MAD_F(0x1d007930),
-    MAD_F(0x1a367e59), MAD_F(0x16a09e66), MAD_F(0x125abcf8),
-    MAD_F(0x0d8616bc), MAD_F(0x08483ee1), MAD_F(0x02c9fad7)
-  };
-
-  /* divide the 18-point SDCT-II into two 9-point SDCT-IIs */
-
-  /* even input butterfly */
-
-  for (i = 0; i < 9; i += 3) {
-    tmp[i + 0] = x[i + 0] + x[18 - (i + 0) - 1];
-    tmp[i + 1] = x[i + 1] + x[18 - (i + 1) - 1];
-    tmp[i + 2] = x[i + 2] + x[18 - (i + 2) - 1];
-  }
-
-  fastsdct(tmp, &X[0]);
-
-  /* odd input butterfly and scaling */
-
-  for (i = 0; i < 9; i += 3) {
-    tmp[i + 0] = mad_f_mul(x[i + 0] - x[18 - (i + 0) - 1], scale[i + 0]);
-    tmp[i + 1] = mad_f_mul(x[i + 1] - x[18 - (i + 1) - 1], scale[i + 1]);
-    tmp[i + 2] = mad_f_mul(x[i + 2] - x[18 - (i + 2) - 1], scale[i + 2]);
-  }
-
-  fastsdct(tmp, &X[1]);
-
-  /* output accumulation */
-
-  for (i = 3; i < 18; i += 8) {
-    X[i + 0] -= X[(i + 0) - 2];
-    X[i + 2] -= X[(i + 2) - 2];
-    X[i + 4] -= X[(i + 4) - 2];
-    X[i + 6] -= X[(i + 6) - 2];
-  }
-}
-
-static inline
-void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18])
-{
-  mad_fixed_t tmp[18];
-  int i;
-
-  /* scale[i] = 2 * cos(PI * (2 * i + 1) / (4 * 18)) */
-  static mad_fixed_t const scale[18] = {
-    MAD_F(0x1ff833fa), MAD_F(0x1fb9ea93), MAD_F(0x1f3dd120),
-    MAD_F(0x1e84d969), MAD_F(0x1d906bcf), MAD_F(0x1c62648b),
-    MAD_F(0x1afd100f), MAD_F(0x1963268b), MAD_F(0x1797c6a4),
-    MAD_F(0x159e6f5b), MAD_F(0x137af940), MAD_F(0x11318ef3),
-    MAD_F(0x0ec6a507), MAD_F(0x0c3ef153), MAD_F(0x099f61c5),
-    MAD_F(0x06ed12c5), MAD_F(0x042d4544), MAD_F(0x0165547c)
-  };
-
-  /* scaling */
-
-  for (i = 0; i < 18; i += 3) {
-    tmp[i + 0] = mad_f_mul(y[i + 0], scale[i + 0]);
-    tmp[i + 1] = mad_f_mul(y[i + 1], scale[i + 1]);
-    tmp[i + 2] = mad_f_mul(y[i + 2], scale[i + 2]);
-  }
-
-  /* SDCT-II */
-
-  sdctII(tmp, X);
-
-  /* scale reduction and output accumulation */
-
-  X[0] /= 2;
-  for (i = 1; i < 17; i += 4) {
-    X[i + 0] = X[i + 0] / 2 - X[(i + 0) - 1];
-    X[i + 1] = X[i + 1] / 2 - X[(i + 1) - 1];
-    X[i + 2] = X[i + 2] / 2 - X[(i + 2) - 1];
-    X[i + 3] = X[i + 3] / 2 - X[(i + 3) - 1];
-  }
-  X[17] = X[17] / 2 - X[16];
-}
-
-/*
- * NAME:	imdct36
- * DESCRIPTION:	perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm
- */
-static inline
-void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36])
-{
-  mad_fixed_t tmp[18];
-  int i;
-
-  /* DCT-IV */
-
-  dctIV(x, tmp);
-
-  /* convert 18-point DCT-IV to 36-point IMDCT */
-
-  for (i =  0; i <  9; i += 3) {
-    y[i + 0] =  tmp[9 + (i + 0)];
-    y[i + 1] =  tmp[9 + (i + 1)];
-    y[i + 2] =  tmp[9 + (i + 2)];
-  }
-  for (i =  9; i < 27; i += 3) {
-    y[i + 0] = -tmp[36 - (9 + (i + 0)) - 1];
-    y[i + 1] = -tmp[36 - (9 + (i + 1)) - 1];
-    y[i + 2] = -tmp[36 - (9 + (i + 2)) - 1];
-  }
-  for (i = 27; i < 36; i += 3) {
-    y[i + 0] = -tmp[(i + 0) - 27];
-    y[i + 1] = -tmp[(i + 1) - 27];
-    y[i + 2] = -tmp[(i + 2) - 27];
-  }
-}
-#  else
-/*
- * NAME:	imdct36
- * DESCRIPTION:	perform X[18]->x[36] IMDCT
- */
-static inline
-void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36])
-{
-  mad_fixed_t t0, t1, t2,  t3,  t4,  t5,  t6,  t7;
-  mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15;
-  register mad_fixed64hi_t hi;
-  register mad_fixed64lo_t lo;
-
-  MAD_F_ML0(hi, lo, X[4],  MAD_F(0x0ec835e8));
-  MAD_F_MLA(hi, lo, X[13], MAD_F(0x061f78aa));
-
-  t6 = MAD_F_MLZ(hi, lo);
-
-  MAD_F_MLA(hi, lo, (t14 = X[1] - X[10]), -MAD_F(0x061f78aa));
-  MAD_F_MLA(hi, lo, (t15 = X[7] + X[16]), -MAD_F(0x0ec835e8));
-
-  t0 = MAD_F_MLZ(hi, lo);
-
-  MAD_F_MLA(hi, lo, (t8  = X[0] - X[11] - X[12]),  MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, (t9  = X[2] - X[9]  - X[14]),  MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, (t10 = X[3] - X[8]  - X[15]), -MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, (t11 = X[5] - X[6]  - X[17]), -MAD_F(0x0fdcf549));
-
-  x[7]  = MAD_F_MLZ(hi, lo);
-  x[10] = -x[7];
-
-  MAD_F_ML0(hi, lo, t8,  -MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, t9,   MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, t10,  MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, t11, -MAD_F(0x09bd7ca0));
-
-  x[19] = x[34] = MAD_F_MLZ(hi, lo) - t0;
-
-  t12 = X[0] - X[3] + X[8] - X[11] - X[12] + X[15];
-  t13 = X[2] + X[5] - X[6] - X[9]  - X[14] - X[17];
-
-  MAD_F_ML0(hi, lo, t12, -MAD_F(0x0ec835e8));
-  MAD_F_MLA(hi, lo, t13,  MAD_F(0x061f78aa));
-
-  x[22] = x[31] = MAD_F_MLZ(hi, lo) + t0;
-
-  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, X[7],   MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, X[10], -MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, X[16],  MAD_F(0x0cb19346));
-
-  t1 = MAD_F_MLZ(hi, lo) + t6;
-
-  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0f9ee890));
-
-  x[6]  = MAD_F_MLZ(hi, lo) + t1;
-  x[11] = -x[6];
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x04cfb0e2));
-
-  x[23] = x[30] = MAD_F_MLZ(hi, lo) + t1;
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0acf37ad));
-
-  x[18] = x[35] = MAD_F_MLZ(hi, lo) - t1;
-
-  MAD_F_ML0(hi, lo, X[4],   MAD_F(0x061f78aa));
-  MAD_F_MLA(hi, lo, X[13], -MAD_F(0x0ec835e8));
-
-  t7 = MAD_F_MLZ(hi, lo);
-
-  MAD_F_MLA(hi, lo, X[1],  -MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, X[7],   MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, X[10],  MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, X[16], -MAD_F(0x09bd7ca0));
-
-  t2 = MAD_F_MLZ(hi, lo);
-
-  MAD_F_MLA(hi, lo, X[0],   MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x0f426cb5));
-
-  x[5]  = MAD_F_MLZ(hi, lo);
-  x[12] = -x[5];
-
-  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0bcbe352));
-
-  x[0]  = MAD_F_MLZ(hi, lo) + t2;
-  x[17] = -x[0];
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x03768962));
-
-  x[24] = x[29] = MAD_F_MLZ(hi, lo) + t2;
-
-  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, X[7],  -MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, X[10],  MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, X[16],  MAD_F(0x0fdcf549));
-
-  t3 = MAD_F_MLZ(hi, lo) + t7;
-
-  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0ffc19fd));
-
-  x[8] = MAD_F_MLZ(hi, lo) + t3;
-  x[9] = -x[8];
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x07635284));
-
-  x[21] = x[32] = MAD_F_MLZ(hi, lo) + t3;
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0898c779));
-
-  x[20] = x[33] = MAD_F_MLZ(hi, lo) - t3;
-
-  MAD_F_ML0(hi, lo, t14, -MAD_F(0x0ec835e8));
-  MAD_F_MLA(hi, lo, t15,  MAD_F(0x061f78aa));
-
-  t4 = MAD_F_MLZ(hi, lo) - t7;
-
-  MAD_F_ML0(hi, lo, t12, MAD_F(0x061f78aa));
-  MAD_F_MLA(hi, lo, t13, MAD_F(0x0ec835e8));
-
-  x[4]  = MAD_F_MLZ(hi, lo) + t4;
-  x[13] = -x[4];
-
-  MAD_F_ML0(hi, lo, t8,   MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, t9,  -MAD_F(0x0216a2a2));
-  MAD_F_MLA(hi, lo, t10,  MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, t11, -MAD_F(0x0cb19346));
-
-  x[1]  = MAD_F_MLZ(hi, lo) + t4;
-  x[16] = -x[1];
-
-  MAD_F_ML0(hi, lo, t8,  -MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, t9,  -MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, t10, -MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, t11, -MAD_F(0x0216a2a2));
-
-  x[25] = x[28] = MAD_F_MLZ(hi, lo) + t4;
-
-  MAD_F_ML0(hi, lo, X[1],  -MAD_F(0x0fdcf549));
-  MAD_F_MLA(hi, lo, X[7],  -MAD_F(0x0cb19346));
-  MAD_F_MLA(hi, lo, X[10], -MAD_F(0x09bd7ca0));
-  MAD_F_MLA(hi, lo, X[16], -MAD_F(0x0216a2a2));
-
-  t5 = MAD_F_MLZ(hi, lo) - t6;
-
-  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[6],   MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[9],   MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[12],  MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[15],  MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0d7e8807));
-
-  x[2]  = MAD_F_MLZ(hi, lo) + t5;
-  x[15] = -x[2];
-
-  MAD_F_ML0(hi, lo, X[0],   MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[2],   MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[3],   MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[5],   MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x00b2aa3e));
-  MAD_F_MLA(hi, lo, X[8],   MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[11],  MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[14],  MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[17],  MAD_F(0x0e313245));
-
-  x[3]  = MAD_F_MLZ(hi, lo) + t5;
-  x[14] = -x[3];
-
-  MAD_F_ML0(hi, lo, X[0],  -MAD_F(0x0ffc19fd));
-  MAD_F_MLA(hi, lo, X[2],  -MAD_F(0x0f9ee890));
-  MAD_F_MLA(hi, lo, X[3],  -MAD_F(0x0f426cb5));
-  MAD_F_MLA(hi, lo, X[5],  -MAD_F(0x0e313245));
-  MAD_F_MLA(hi, lo, X[6],  -MAD_F(0x0d7e8807));
-  MAD_F_MLA(hi, lo, X[8],  -MAD_F(0x0bcbe352));
-  MAD_F_MLA(hi, lo, X[9],  -MAD_F(0x0acf37ad));
-  MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0898c779));
-  MAD_F_MLA(hi, lo, X[12], -MAD_F(0x07635284));
-  MAD_F_MLA(hi, lo, X[14], -MAD_F(0x04cfb0e2));
-  MAD_F_MLA(hi, lo, X[15], -MAD_F(0x03768962));
-  MAD_F_MLA(hi, lo, X[17], -MAD_F(0x00b2aa3e));
-
-  x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5;
-}
-#  endif
-
-/*
- * NAME:	III_imdct_l()
- * DESCRIPTION:	perform IMDCT and windowing for long blocks
- */
-static
-void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36],
-		 unsigned int block_type)
-{
-  unsigned int i;
-
-  /* IMDCT */
-
-  imdct36(X, z);
-
-  /* windowing */
-
-  switch (block_type) {
-  case 0:  /* normal window */
-# if defined(ASO_INTERLEAVE1)
-    {
-      register mad_fixed_t tmp1, tmp2;
-
-      tmp1 = window_l[0];
-      tmp2 = window_l[1];
-
-      for (i = 0; i < 34; i += 2) {
-	z[i + 0] = mad_f_mul(z[i + 0], tmp1);
-	tmp1 = window_l[i + 2];
-	z[i + 1] = mad_f_mul(z[i + 1], tmp2);
-	tmp2 = window_l[i + 3];
-      }
-
-      z[34] = mad_f_mul(z[34], tmp1);
-      z[35] = mad_f_mul(z[35], tmp2);
-    }
-# elif defined(ASO_INTERLEAVE2)
-    {
-      register mad_fixed_t tmp1, tmp2;
-
-      tmp1 = z[0];
-      tmp2 = window_l[0];
-
-      for (i = 0; i < 35; ++i) {
-	z[i] = mad_f_mul(tmp1, tmp2);
-	tmp1 = z[i + 1];
-	tmp2 = window_l[i + 1];
-      }
-
-      z[35] = mad_f_mul(tmp1, tmp2);
-    }
-# elif 1
-    for (i = 0; i < 36; i += 4) {
-      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
-      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
-      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
-      z[i + 3] = mad_f_mul(z[i + 3], window_l[i + 3]);
-    }
-# else
-    for (i =  0; i < 36; ++i) z[i] = mad_f_mul(z[i], window_l[i]);
-# endif
-    break;
-
-  case 1:  /* start block */
-    for (i =  0; i < 18; i += 3) {
-      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
-      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
-      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
-    }
-    /*  (i = 18; i < 24; ++i) z[i] unchanged */
-    for (i = 24; i < 30; ++i) z[i] = mad_f_mul(z[i], window_s[i - 18]);
-    for (i = 30; i < 36; ++i) z[i] = 0;
-    break;
-
-  case 3:  /* stop block */
-    for (i =  0; i <  6; ++i) z[i] = 0;
-    for (i =  6; i < 12; ++i) z[i] = mad_f_mul(z[i], window_s[i - 6]);
-    /*  (i = 12; i < 18; ++i) z[i] unchanged */
-    for (i = 18; i < 36; i += 3) {
-      z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
-      z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
-      z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
-    }
-    break;
-  }
-}
-# endif  /* ASO_IMDCT */
-
-/*
- * NAME:	III_imdct_s()
- * DESCRIPTION:	perform IMDCT and windowing for short blocks
- */
-static
-void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36])
-{
-  mad_fixed_t y[36], *yptr;
-  mad_fixed_t const *wptr;
-  int w, i;
-  register mad_fixed64hi_t hi;
-  register mad_fixed64lo_t lo;
-
-  /* IMDCT */
-
-  yptr = &y[0];
-
-  for (w = 0; w < 3; ++w) {
-    register mad_fixed_t const (*s)[6];
-
-    s = imdct_s;
-
-    for (i = 0; i < 3; ++i) {
-      MAD_F_ML0(hi, lo, X[0], (*s)[0]);
-      MAD_F_MLA(hi, lo, X[1], (*s)[1]);
-      MAD_F_MLA(hi, lo, X[2], (*s)[2]);
-      MAD_F_MLA(hi, lo, X[3], (*s)[3]);
-      MAD_F_MLA(hi, lo, X[4], (*s)[4]);
-      MAD_F_MLA(hi, lo, X[5], (*s)[5]);
-
-      yptr[i + 0] = MAD_F_MLZ(hi, lo);
-      yptr[5 - i] = -yptr[i + 0];
-
-      ++s;
-
-      MAD_F_ML0(hi, lo, X[0], (*s)[0]);
-      MAD_F_MLA(hi, lo, X[1], (*s)[1]);
-      MAD_F_MLA(hi, lo, X[2], (*s)[2]);
-      MAD_F_MLA(hi, lo, X[3], (*s)[3]);
-      MAD_F_MLA(hi, lo, X[4], (*s)[4]);
-      MAD_F_MLA(hi, lo, X[5], (*s)[5]);
-
-      yptr[ i + 6] = MAD_F_MLZ(hi, lo);
-      yptr[11 - i] = yptr[i + 6];
-
-      ++s;
-    }
-
-    yptr += 12;
-    X    += 6;
-  }
-
-  /* windowing, overlapping and concatenation */
-
-  yptr = &y[0];
-  wptr = &window_s[0];
-
-  for (i = 0; i < 6; ++i) {
-    z[i +  0] = 0;
-    z[i +  6] = mad_f_mul(yptr[ 0 + 0], wptr[0]);
-
-    MAD_F_ML0(hi, lo, yptr[ 0 + 6], wptr[6]);
-    MAD_F_MLA(hi, lo, yptr[12 + 0], wptr[0]);
-
-    z[i + 12] = MAD_F_MLZ(hi, lo);
-
-    MAD_F_ML0(hi, lo, yptr[12 + 6], wptr[6]);
-    MAD_F_MLA(hi, lo, yptr[24 + 0], wptr[0]);
-
-    z[i + 18] = MAD_F_MLZ(hi, lo);
-
-    z[i + 24] = mad_f_mul(yptr[24 + 6], wptr[6]);
-    z[i + 30] = 0;
-
-    ++yptr;
-    ++wptr;
-  }
-}
-
-/*
- * NAME:	III_overlap()
- * DESCRIPTION:	perform overlap-add of windowed IMDCT outputs
- */
-static
-void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18],
-		 mad_fixed_t sample[18][32], unsigned int sb)
-{
-  unsigned int i;
-
-# if defined(ASO_INTERLEAVE2)
-  {
-    register mad_fixed_t tmp1, tmp2;
-
-    tmp1 = overlap[0];
-    tmp2 = overlap[1];
-
-    for (i = 0; i < 16; i += 2) {
-      sample[i + 0][sb] = output[i + 0 +  0] + tmp1;
-      overlap[i + 0]    = output[i + 0 + 18];
-      tmp1 = overlap[i + 2];
-
-      sample[i + 1][sb] = output[i + 1 +  0] + tmp2;
-      overlap[i + 1]    = output[i + 1 + 18];
-      tmp2 = overlap[i + 3];
-    }
-
-    sample[16][sb] = output[16 +  0] + tmp1;
-    overlap[16]    = output[16 + 18];
-    sample[17][sb] = output[17 +  0] + tmp2;
-    overlap[17]    = output[17 + 18];
-  }
-# elif 0
-  for (i = 0; i < 18; i += 2) {
-    sample[i + 0][sb] = output[i + 0 +  0] + overlap[i + 0];
-    overlap[i + 0]    = output[i + 0 + 18];
-
-    sample[i + 1][sb] = output[i + 1 +  0] + overlap[i + 1];
-    overlap[i + 1]    = output[i + 1 + 18];
-  }
-# else
-  for (i = 0; i < 18; ++i) {
-    sample[i][sb] = output[i +  0] + overlap[i];
-    overlap[i]    = output[i + 18];
-  }
-# endif
-}
-
-/*
- * NAME:	III_overlap_z()
- * DESCRIPTION:	perform "overlap-add" of zero IMDCT outputs
- */
-static inline
-void III_overlap_z(mad_fixed_t overlap[18],
-		   mad_fixed_t sample[18][32], unsigned int sb)
-{
-  unsigned int i;
-
-# if defined(ASO_INTERLEAVE2)
-  {
-    register mad_fixed_t tmp1, tmp2;
-
-    tmp1 = overlap[0];
-    tmp2 = overlap[1];
-
-    for (i = 0; i < 16; i += 2) {
-      sample[i + 0][sb] = tmp1;
-      overlap[i + 0]    = 0;
-      tmp1 = overlap[i + 2];
-
-      sample[i + 1][sb] = tmp2;
-      overlap[i + 1]    = 0;
-      tmp2 = overlap[i + 3];
-    }
-
-    sample[16][sb] = tmp1;
-    overlap[16]    = 0;
-    sample[17][sb] = tmp2;
-    overlap[17]    = 0;
-  }
-# else
-  for (i = 0; i < 18; ++i) {
-    sample[i][sb] = overlap[i];
-    overlap[i]    = 0;
-  }
-# endif
-}
-
-/*
- * NAME:	III_freqinver()
- * DESCRIPTION:	perform subband frequency inversion for odd sample lines
- */
-static
-void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb)
-{
-  unsigned int i;
-
-# if 1 || defined(ASO_INTERLEAVE1) || defined(ASO_INTERLEAVE2)
-  {
-    register mad_fixed_t tmp1, tmp2;
-
-    tmp1 = sample[1][sb];
-    tmp2 = sample[3][sb];
-
-    for (i = 1; i < 13; i += 4) {
-      sample[i + 0][sb] = -tmp1;
-      tmp1 = sample[i + 4][sb];
-      sample[i + 2][sb] = -tmp2;
-      tmp2 = sample[i + 6][sb];
-    }
-
-    sample[13][sb] = -tmp1;
-    tmp1 = sample[17][sb];
-    sample[15][sb] = -tmp2;
-    sample[17][sb] = -tmp1;
-  }
-# else
-  for (i = 1; i < 18; i += 2)
-    sample[i][sb] = -sample[i][sb];
-# endif
-}
-
-/*
- * NAME:	III_decode()
- * DESCRIPTION:	decode frame main_data
- */
-static
-enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame,
-			  struct sideinfo *si, unsigned int nch)
-{
-  struct mad_header *header = &frame->header;
-  unsigned int sfreqi, ngr, gr;
-
-  {
-    unsigned int sfreq;
-
-    sfreq = header->samplerate;
-    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
-      sfreq *= 2;
-
-    /* 48000 => 0, 44100 => 1, 32000 => 2,
-       24000 => 3, 22050 => 4, 16000 => 5 */
-    sfreqi = ((sfreq >>  7) & 0x000f) +
-             ((sfreq >> 15) & 0x0001) - 8;
-
-    if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
-      sfreqi += 3;
-  }
-
-  /* scalefactors, Huffman decoding, requantization */
-
-  ngr = (header->flags & MAD_FLAG_LSF_EXT) ? 1 : 2;
-
-  for (gr = 0; gr < ngr; ++gr) {
-    struct granule *granule = &si->gr[gr];
-    unsigned char const *sfbwidth[2];
-    mad_fixed_t xr[2][576];
-    unsigned int ch;
-    enum mad_error error;
-
-    for (ch = 0; ch < nch; ++ch) {
-      struct channel *channel = &granule->ch[ch];
-      unsigned int part2_length;
-
-      sfbwidth[ch] = sfbwidth_table[sfreqi].l;
-      if (channel->block_type == 2) {
-	sfbwidth[ch] = (channel->flags & mixed_block_flag) ?
-	  sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s;
-      }
-
-      if (header->flags & MAD_FLAG_LSF_EXT) {
-	part2_length = III_scalefactors_lsf(ptr, channel,
-					    ch == 0 ? 0 : &si->gr[1].ch[1],
-					    header->mode_extension);
-      }
-      else {
-	part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch],
-					gr == 0 ? 0 : si->scfsi[ch]);
-      }
-
-      error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length);
-      if (error)
-	return error;
-    }
-
-    /* joint stereo processing */
-
-    if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) {
-      error = III_stereo(xr, granule, header, sfbwidth[0]);
-      if (error)
-	return error;
-    }
-
-    /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */
-
-    for (ch = 0; ch < nch; ++ch) {
-      struct channel const *channel = &granule->ch[ch];
-      mad_fixed_t (*sample)[32] = &frame->sbsample[ch][18 * gr];
-      unsigned int sb, l, i, sblimit;
-      mad_fixed_t output[36];
-
-      if (channel->block_type == 2) {
-	III_reorder(xr[ch], channel, sfbwidth[ch]);
-
-# if !defined(OPT_STRICT)
-	/*
-	 * According to ISO/IEC 11172-3, "Alias reduction is not applied for
-	 * granules with block_type == 2 (short block)." However, other
-	 * sources suggest alias reduction should indeed be performed on the
-	 * lower two subbands of mixed blocks. Most other implementations do
-	 * this, so by default we will too.
-	 */
-	if (channel->flags & mixed_block_flag)
-	  III_aliasreduce(xr[ch], 36);
-# endif
-      }
-      else
-	III_aliasreduce(xr[ch], 576);
-
-      l = 0;
-
-      /* subbands 0-1 */
-
-      if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) {
-	unsigned int block_type;
-
-	block_type = channel->block_type;
-	if (channel->flags & mixed_block_flag)
-	  block_type = 0;
-
-	/* long blocks */
-	for (sb = 0; sb < 2; ++sb, l += 18) {
-	  III_imdct_l(&xr[ch][l], output, block_type);
-	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
-	}
-      }
-      else {
-	/* short blocks */
-	for (sb = 0; sb < 2; ++sb, l += 18) {
-	  III_imdct_s(&xr[ch][l], output);
-	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
-	}
-      }
-
-      III_freqinver(sample, 1);
-
-      /* (nonzero) subbands 2-31 */
-
-      i = 576;
-      while (i > 36 && xr[ch][i - 1] == 0)
-	--i;
-
-      sblimit = 32 - (576 - i) / 18;
-
-      if (channel->block_type != 2) {
-	/* long blocks */
-	for (sb = 2; sb < sblimit; ++sb, l += 18) {
-	  III_imdct_l(&xr[ch][l], output, channel->block_type);
-	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
-
-	  if (sb & 1)
-	    III_freqinver(sample, sb);
-	}
-      }
-      else {
-	/* short blocks */
-	for (sb = 2; sb < sblimit; ++sb, l += 18) {
-	  III_imdct_s(&xr[ch][l], output);
-	  III_overlap(output, (*frame->overlap)[ch][sb], sample, sb);
-
-	  if (sb & 1)
-	    III_freqinver(sample, sb);
-	}
-      }
-
-      /* remaining (zero) subbands */
-
-      for (sb = sblimit; sb < 32; ++sb) {
-	III_overlap_z((*frame->overlap)[ch][sb], sample, sb);
-
-	if (sb & 1)
-	  III_freqinver(sample, sb);
-      }
-    }
-  }
-
-  return MAD_ERROR_NONE;
-}
-
-/*
- * NAME:	layer->III()
- * DESCRIPTION:	decode a single Layer III frame
- */
-int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
-{
-  struct mad_header *header = &frame->header;
-  unsigned int nch, priv_bitlen, next_md_begin = 0;
-  unsigned int si_len, data_bitlen, md_len;
-  unsigned int frame_space, frame_used, frame_free;
-  struct mad_bitptr ptr;
-  struct sideinfo si;
-  enum mad_error error;
-  int result = 0;
-
-  /* allocate Layer III dynamic structures */
-
-  if (stream->main_data == 0) {
-    stream->main_data = malloc(MAD_BUFFER_MDLEN);
-    if (stream->main_data == 0) {
-      stream->error = MAD_ERROR_NOMEM;
-      return -1;
-    }
-  }
-
-  if (frame->overlap == 0) {
-    frame->overlap = calloc(2 * 32 * 18, sizeof(mad_fixed_t));
-    if (frame->overlap == 0) {
-      stream->error = MAD_ERROR_NOMEM;
-      return -1;
-    }
-  }
-
-  nch = MAD_NCHANNELS(header);
-  si_len = (header->flags & MAD_FLAG_LSF_EXT) ?
-    (nch == 1 ? 9 : 17) : (nch == 1 ? 17 : 32);
-
-  /* check frame sanity */
-
-  if (stream->next_frame - mad_bit_nextbyte(&stream->ptr) <
-      (signed int) si_len) {
-    stream->error = MAD_ERROR_BADFRAMELEN;
-    stream->md_len = 0;
-    return -1;
-  }
-
-  /* check CRC word */
-
-  if (header->flags & MAD_FLAG_PROTECTION) {
-    header->crc_check =
-      mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check);
-
-    if (header->crc_check != header->crc_target &&
-	!(frame->options & MAD_OPTION_IGNORECRC)) {
-      stream->error = MAD_ERROR_BADCRC;
-      result = -1;
-    }
-  }
-
-  /* decode frame side information */
-
-  error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT,
-		       &si, &data_bitlen, &priv_bitlen);
-  if (error && result == 0) {
-    stream->error = error;
-    result = -1;
-  }
-
-  header->flags        |= priv_bitlen;
-  header->private_bits |= si.private_bits;
-
-  /* find main_data of next frame */
-
-  {
-    struct mad_bitptr peek;
-    unsigned long header;
-
-    mad_bit_init(&peek, stream->next_frame);
-
-    header = mad_bit_read(&peek, 32);
-    if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) {
-      if (!(header & 0x00010000L))  /* protection_bit */
-	mad_bit_skip(&peek, 16);  /* crc_check */
-
-      next_md_begin =
-	mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8);
-    }
-
-    mad_bit_finish(&peek);
-  }
-
-  /* find main_data of this frame */
-
-  frame_space = stream->next_frame - mad_bit_nextbyte(&stream->ptr);
-
-  if (next_md_begin > si.main_data_begin + frame_space)
-    next_md_begin = 0;
-
-  md_len = si.main_data_begin + frame_space - next_md_begin;
-
-  frame_used = 0;
-
-  if (si.main_data_begin == 0) {
-    ptr = stream->ptr;
-    stream->md_len = 0;
-
-    frame_used = md_len;
-  }
-  else {
-    if (si.main_data_begin > stream->md_len) {
-      if (result == 0) {
-	stream->error = MAD_ERROR_BADDATAPTR;
-	result = -1;
-      }
-    }
-    else {
-      mad_bit_init(&ptr,
-		   *stream->main_data + stream->md_len - si.main_data_begin);
-
-      if (md_len > si.main_data_begin) {
-	assert(stream->md_len + md_len -
-	       si.main_data_begin <= MAD_BUFFER_MDLEN);
-
-	memcpy(*stream->main_data + stream->md_len,
-	       mad_bit_nextbyte(&stream->ptr),
-	       frame_used = md_len - si.main_data_begin);
-	stream->md_len += frame_used;
-      }
-    }
-  }
-
-  frame_free = frame_space - frame_used;
-
-  /* decode main_data */
-
-  if (result == 0) {
-    error = III_decode(&ptr, frame, &si, nch);
-    if (error) {
-      stream->error = error;
-      result = -1;
-    }
-
-    /* designate ancillary bits */
-
-    stream->anc_ptr    = ptr;
-    stream->anc_bitlen = md_len * CHAR_BIT - data_bitlen;
-  }
-
-# if 0 && defined(DEBUG)
-  fprintf(stderr,
-	  "main_data_begin:%u, md_len:%u, frame_free:%u, "
-	  "data_bitlen:%u, anc_bitlen: %u\n",
-	  si.main_data_begin, md_len, frame_free,
-	  data_bitlen, stream->anc_bitlen);
-# endif
-
-  /* preload main_data buffer with up to 511 bytes for next frame(s) */
-
-  if (frame_free >= next_md_begin) {
-    memcpy(*stream->main_data,
-	   stream->next_frame - next_md_begin, next_md_begin);
-    stream->md_len = next_md_begin;
-  }
-  else {
-    if (md_len < si.main_data_begin) {
-      unsigned int extra;
-
-      extra = si.main_data_begin - md_len;
-      if (extra + frame_free > next_md_begin)
-	extra = next_md_begin - frame_free;
-
-      if (extra < stream->md_len) {
-	memmove(*stream->main_data,
-		*stream->main_data + stream->md_len - extra, extra);
-	stream->md_len = extra;
-      }
-    }
-    else
-      stream->md_len = 0;
-
-    memcpy(*stream->main_data + stream->md_len,
-	   stream->next_frame - frame_free, frame_free);
-    stream->md_len += frame_free;
-  }
-
-  return result;
-}
--- a/sys/src/games/mp3dec/layer3.h
+++ /dev/null
@@ -1,30 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $
- */
-
-# ifndef LIBMAD_LAYER3_H
-# define LIBMAD_LAYER3_H
-
-# include "stream.h"
-# include "frame.h"
-
-int mad_layer_III(struct mad_stream *, struct mad_frame *);
-
-# endif
--- a/sys/src/games/mp3dec/mad.h
+++ /dev/null
@@ -1,950 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * If you would like to negotiate alternate licensing terms, you may do
- * so by contacting: Underbit Technologies, Inc. <[email protected]>
- */
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-# define FPM_INTEL
-
-
-
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-
-
-/* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */
-
-# ifndef LIBMAD_VERSION_H
-# define LIBMAD_VERSION_H
-
-# define MAD_VERSION_MAJOR	0
-# define MAD_VERSION_MINOR	15
-# define MAD_VERSION_PATCH	1
-# define MAD_VERSION_EXTRA	" (beta)"
-
-# define MAD_VERSION_STRINGIZE(str)	#str
-# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)
-
-# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_MINOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_PATCH)  \
-				MAD_VERSION_EXTRA
-
-# define MAD_PUBLISHYEAR	"2000-2004"
-# define MAD_AUTHOR		"Underbit Technologies, Inc."
-# define MAD_EMAIL		"[email protected]"
-
-extern char const mad_version[];
-extern char const mad_copyright[];
-extern char const mad_author[];
-extern char const mad_build[];
-
-# endif
-
-/* Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp */
-
-# ifndef LIBMAD_FIXED_H
-# define LIBMAD_FIXED_H
-
-# if SIZEOF_INT >= 4
-typedef   signed int mad_fixed_t;
-
-typedef   signed int mad_fixed64hi_t;
-typedef unsigned int mad_fixed64lo_t;
-# else
-typedef   signed long mad_fixed_t;
-
-typedef   signed long mad_fixed64hi_t;
-typedef unsigned long mad_fixed64lo_t;
-# endif
-
-# if defined(_MSC_VER)
-#  define mad_fixed64_t  signed __int64
-# elif 1 || defined(__GNUC__)
-#  define mad_fixed64_t  signed long long
-# endif
-
-# if defined(FPM_FLOAT)
-typedef double mad_sample_t;
-# else
-typedef mad_fixed_t mad_sample_t;
-# endif
-
-/*
- * Fixed-point format: 0xABBBBBBB
- * A == whole part      (sign + 3 bits)
- * B == fractional part (28 bits)
- *
- * Values are signed two's complement, so the effective range is:
- * 0x80000000 to 0x7fffffff
- *       -8.0 to +7.9999999962747097015380859375
- *
- * The smallest representable value is:
- * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
- *
- * 28 bits of fractional accuracy represent about
- * 8.6 digits of decimal accuracy.
- *
- * Fixed-point numbers can be added or subtracted as normal
- * integers, but multiplication requires shifting the 64-bit result
- * from 56 fractional bits back to 28 (and rounding.)
- *
- * Changing the definition of MAD_F_FRACBITS is only partially
- * supported, and must be done with care.
- */
-
-# define MAD_F_FRACBITS		28
-
-#  define MAD_F(x)		((mad_fixed_t) (x##L))
-
-# define MAD_F_MIN		((mad_fixed_t) -0x80000000L)
-# define MAD_F_MAX		((mad_fixed_t) +0x7fffffffL)
-
-# define MAD_F_ONE		MAD_F(0x10000000)
-
-# define mad_f_tofixed(x)	((mad_fixed_t)  \
-				 ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5))
-# define mad_f_todouble(x)	((double)  \
-				 ((x) / (double) (1L << MAD_F_FRACBITS)))
-
-# define mad_f_intpart(x)	((x) >> MAD_F_FRACBITS)
-# define mad_f_fracpart(x)	((x) & ((1L << MAD_F_FRACBITS) - 1))
-				/* (x should be positive) */
-
-# define mad_f_fromint(x)	((x) << MAD_F_FRACBITS)
-
-# define mad_f_add(x, y)	((x) + (y))
-# define mad_f_sub(x, y)	((x) - (y))
-
-# if defined(FPM_FLOAT)
-#  error "FPM_FLOAT not yet supported"
-
-#  undef MAD_F
-#  define MAD_F(x)		mad_f_todouble(x)
-
-#  define mad_f_mul(x, y)	((x) * (y))
-#  define mad_f_scale64
-
-#  undef ASO_ZEROCHECK
-
-# elif defined(FPM_64BIT)
-
-/*
- * This version should be the most accurate if 64-bit types are supported by
- * the compiler, although it may not be the most efficient.
- */
-#  if defined(OPT_ACCURACY)
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t)  \
-     ((((mad_fixed64_t) (x) * (y)) +  \
-       (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS))
-#  else
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS))
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Intel --------------------------------------------------------------- */
-
-# elif defined(FPM_INTEL)
-
-#  if defined(_MSC_VER)
-#   pragma warning(push)
-#   pragma warning(disable: 4035)  /* no return value */
-static __forceinline
-mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
-{
-  enum {
-    fracbits = MAD_F_FRACBITS
-  };
-
-  __asm {
-    mov eax, x
-    imul y
-    shrd eax, edx, fracbits
-  }
-
-  /* implicit return of eax */
-}
-#   pragma warning(pop)
-
-#   define mad_f_mul		mad_f_mul_inline
-#   define mad_f_scale64
-#  else
-/*
- * This Intel version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#   define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("imull %3"  \
-	 : "=a" (lo), "=d" (hi)  \
-	 : "%a" (x), "rm" (y)  \
-	 : "cc")
-
-#   if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#    define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addl %2,%0\n\t"  \
-	    "adcl %3,%1"  \
-	    : "=rm" (lo), "=rm" (hi)  \
-	    : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi)  \
-	    : "cc");  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   if defined(OPT_ACCURACY)
-/*
- * Surprisingly, this is faster than SHRD followed by ADC.
- */
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed64hi_t __hi_;  \
-       mad_fixed64lo_t __lo_;  \
-       mad_fixed_t __result;  \
-       asm ("addl %4,%2\n\t"  \
-	    "adcl %5,%3"  \
-	    : "=rm" (__lo_), "=rm" (__hi_)  \
-	    : "0" (lo), "1" (hi),  \
-	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
-	    : "cc");  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   elif defined(OPT_INTEL)
-/*
- * Alternate Intel scaling that may or may not perform better.
- */
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("shrl %3,%1\n\t"  \
-	    "shll %4,%2\n\t"  \
-	    "orl %2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi),  \
-	      "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   else
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   define MAD_F_SCALEBITS  MAD_F_FRACBITS
-#  endif
-
-/* --- ARM ----------------------------------------------------------------- */
-
-# elif defined(FPM_ARM)
-
-/* 
- * This ARM V4 version is as accurate as FPM_64BIT but much faster. The
- * least significant bit is properly rounded at no CPU cycle cost!
- */
-# if 1
-/*
- * This is faster than the default implementation via MAD_F_MLX() and
- * mad_f_scale64().
- */
-#  define mad_f_mul(x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       mad_fixed_t __result;  \
-       asm ("smull	%0, %1, %3, %4\n\t"  \
-	    "movs	%0, %0, lsr %5\n\t"  \
-	    "adc	%2, %0, %1, lsl %6"  \
-	    : "=&r" (__lo), "=&r" (__hi), "=r" (__result)  \
-	    : "%r" (x), "r" (y),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-# endif
-
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smull	%0, %1, %2, %3"  \
-	 : "=&r" (lo), "=&r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("smlal	%0, %1, %2, %3"  \
-	 : "+r" (lo), "+r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLN(hi, lo)  \
-    asm ("rsbs	%0, %2, #0\n\t"  \
-	 "rsc	%1, %3, #0"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "0" (lo), "1" (hi)  \
-	 : "cc")
-
-#  define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("movs	%0, %1, lsr %3\n\t"  \
-	    "adc	%0, %0, %2, lsl %4"  \
-	    : "=&r" (__result)  \
-	    : "r" (lo), "r" (hi),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- MIPS ---------------------------------------------------------------- */
-
-# elif defined(FPM_MIPS)
-
-/*
- * This MIPS version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" (x), "r" (y))
-
-# if defined(HAVE_MADD_ASM)
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" (x), "r" (y))
-# elif defined(HAVE_MADD16_ASM)
-/*
- * This loses significant accuracy due to the 16-bit integer limit in the
- * multiply/accumulate instruction.
- */
-#  define MAD_F_ML0(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd16	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
-# endif
-
-# if defined(OPT_SPEED)
-#  define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS)))
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* --- SPARC --------------------------------------------------------------- */
-
-# elif defined(FPM_SPARC)
-
-/*
- * This SPARC V8 version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smul %2, %3, %0\n\t"  \
-	 "rd %%y, %1"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "%r" (x), "rI" (y))
-
-/* --- PowerPC ------------------------------------------------------------- */
-
-# elif defined(FPM_PPC)
-
-/*
- * This PowerPC version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    do {  \
-      asm ("mullw %0,%1,%2"  \
-	   : "=r" (lo)  \
-	   : "%r" (x), "r" (y));  \
-      asm ("mulhw %0,%1,%2"  \
-	   : "=r" (hi)  \
-	   : "%r" (x), "r" (y));  \
-    }  \
-    while (0)
-
-#  if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#   define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addc %0,%2,%3\n\t"  \
-	    "adde %1,%4,%5"  \
-	    : "=r" (lo), "=r" (hi)  \
-	    : "%r" (lo), "r" (__lo),  \
-	      "%r" (hi), "r" (__hi)  \
-	    : "xer");  \
-    })
-#  endif
-
-#  if defined(OPT_ACCURACY)
-/*
- * This is slower than the truncating version below it.
- */
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result, __round;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("extrwi %0,%1,1,0"  \
-	    : "=r" (__round)  \
-	    : "r" (__result));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       asm ("add %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "%r" (__result), "r" (__round));  \
-       __result;  \
-    })
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       __result;  \
-    })
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Default ------------------------------------------------------------- */
-
-# elif defined(FPM_DEFAULT)
-
-/*
- * This version is the most portable but it loses significant accuracy.
- * Furthermore, accuracy is biased against the second argument, so care
- * should be taken when ordering operands.
- *
- * The scale factors are constant as this is not used with SSO.
- *
- * Pre-rounding is required to stay within the limits of compliance.
- */
-#  if defined(OPT_SPEED)
-#   define mad_f_mul(x, y)	(((x) >> 12) * ((y) >> 16))
-#  else
-#   define mad_f_mul(x, y)	((((x) + (1L << 11)) >> 12) *  \
-				 (((y) + (1L << 15)) >> 16))
-#  endif
-
-/* ------------------------------------------------------------------------- */
-
-# else
-#  error "no FPM selected"
-# endif
-
-/* default implementations */
-
-# if !defined(mad_f_mul)
-#  define mad_f_mul(x, y)  \
-    ({ register mad_fixed64hi_t __hi;  \
-       register mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       mad_f_scale64(__hi, __lo);  \
-    })
-# endif
-
-# if !defined(MAD_F_MLA)
-#  define MAD_F_ML0(hi, lo, x, y)	((lo)  = mad_f_mul((x), (y)))
-#  define MAD_F_MLA(hi, lo, x, y)	((lo) += mad_f_mul((x), (y)))
-#  define MAD_F_MLN(hi, lo)		((lo)  = -(lo))
-#  define MAD_F_MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
-# endif
-
-# if !defined(MAD_F_ML0)
-#  define MAD_F_ML0(hi, lo, x, y)	MAD_F_MLX((hi), (lo), (x), (y))
-# endif
-
-# if !defined(MAD_F_MLN)
-#  define MAD_F_MLN(hi, lo)		((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi))
-# endif
-
-# if !defined(MAD_F_MLZ)
-#  define MAD_F_MLZ(hi, lo)		mad_f_scale64((hi), (lo))
-# endif
-
-# if !defined(mad_f_scale64)
-#  if defined(OPT_ACCURACY)
-#   define mad_f_scale64(hi, lo)  \
-    ((((mad_fixed_t)  \
-       (((hi) << (32 - (MAD_F_SCALEBITS - 1))) |  \
-	((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1)
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t)  \
-     (((hi) << (32 - MAD_F_SCALEBITS)) |  \
-      ((lo) >> MAD_F_SCALEBITS)))
-#  endif
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* C routines */
-
-mad_fixed_t mad_f_abs(mad_fixed_t);
-mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t);
-
-# endif
-
-/* Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp */
-
-# ifndef LIBMAD_BIT_H
-# define LIBMAD_BIT_H
-
-struct mad_bitptr {
-  unsigned char const *byte;
-  unsigned short cache;
-  unsigned short left;
-};
-
-void mad_bit_init(struct mad_bitptr *, unsigned char const *);
-
-# define mad_bit_finish(bitptr)		/* nothing */
-
-unsigned int mad_bit_length(struct mad_bitptr const *,
-			    struct mad_bitptr const *);
-
-# define mad_bit_bitsleft(bitptr)  ((bitptr)->left)
-unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
-
-void mad_bit_skip(struct mad_bitptr *, unsigned int);
-unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
-void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
-
-unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
-
-# endif
-
-/* Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp */
-
-# ifndef LIBMAD_TIMER_H
-# define LIBMAD_TIMER_H
-
-typedef struct {
-  signed long seconds;		/* whole seconds */
-  unsigned long fraction;	/* 1/MAD_TIMER_RESOLUTION seconds */
-} mad_timer_t;
-
-extern mad_timer_t const mad_timer_zero;
-
-# define MAD_TIMER_RESOLUTION	352800000UL
-
-enum mad_units {
-  MAD_UNITS_HOURS	 =    -2,
-  MAD_UNITS_MINUTES	 =    -1,
-  MAD_UNITS_SECONDS	 =     0,
-
-  /* metric units */
-
-  MAD_UNITS_DECISECONDS	 =    10,
-  MAD_UNITS_CENTISECONDS =   100,
-  MAD_UNITS_MILLISECONDS =  1000,
-
-  /* audio sample units */
-
-  MAD_UNITS_8000_HZ	 =  8000,
-  MAD_UNITS_11025_HZ	 = 11025,
-  MAD_UNITS_12000_HZ	 = 12000,
-
-  MAD_UNITS_16000_HZ	 = 16000,
-  MAD_UNITS_22050_HZ	 = 22050,
-  MAD_UNITS_24000_HZ	 = 24000,
-
-  MAD_UNITS_32000_HZ	 = 32000,
-  MAD_UNITS_44100_HZ	 = 44100,
-  MAD_UNITS_48000_HZ	 = 48000,
-
-  /* video frame/field units */
-
-  MAD_UNITS_24_FPS	 =    24,
-  MAD_UNITS_25_FPS	 =    25,
-  MAD_UNITS_30_FPS	 =    30,
-  MAD_UNITS_48_FPS	 =    48,
-  MAD_UNITS_50_FPS	 =    50,
-  MAD_UNITS_60_FPS	 =    60,
-
-  /* CD audio frames */
-
-  MAD_UNITS_75_FPS	 =    75,
-
-  /* video drop-frame units */
-
-  MAD_UNITS_23_976_FPS	 =   -24,
-  MAD_UNITS_24_975_FPS	 =   -25,
-  MAD_UNITS_29_97_FPS	 =   -30,
-  MAD_UNITS_47_952_FPS	 =   -48,
-  MAD_UNITS_49_95_FPS	 =   -50,
-  MAD_UNITS_59_94_FPS	 =   -60
-};
-
-# define mad_timer_reset(timer)	((void) (*(timer) = mad_timer_zero))
-
-int mad_timer_compare(mad_timer_t, mad_timer_t);
-
-# define mad_timer_sign(timer)	mad_timer_compare((timer), mad_timer_zero)
-
-void mad_timer_negate(mad_timer_t *);
-mad_timer_t mad_timer_abs(mad_timer_t);
-
-void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long);
-void mad_timer_add(mad_timer_t *, mad_timer_t);
-void mad_timer_multiply(mad_timer_t *, signed long);
-
-signed long mad_timer_count(mad_timer_t, enum mad_units);
-unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
-void mad_timer_string(mad_timer_t, char *, char const *,
-		      enum mad_units, enum mad_units, unsigned long);
-
-# endif
-
-/* Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp */
-
-# ifndef LIBMAD_STREAM_H
-# define LIBMAD_STREAM_H
-
-
-# define MAD_BUFFER_GUARD	8
-# define MAD_BUFFER_MDLEN	(511 + 2048 + MAD_BUFFER_GUARD)
-
-enum mad_error {
-  MAD_ERROR_NONE	   = 0x0000,	/* no error */
-
-  MAD_ERROR_BUFLEN	   = 0x0001,	/* input buffer too small (or EOF) */
-  MAD_ERROR_BUFPTR	   = 0x0002,	/* invalid (null) buffer pointer */
-
-  MAD_ERROR_NOMEM	   = 0x0031,	/* not enough memory */
-
-  MAD_ERROR_LOSTSYNC	   = 0x0101,	/* lost synchronization */
-  MAD_ERROR_BADLAYER	   = 0x0102,	/* reserved header layer value */
-  MAD_ERROR_BADBITRATE	   = 0x0103,	/* forbidden bitrate value */
-  MAD_ERROR_BADSAMPLERATE  = 0x0104,	/* reserved sample frequency value */
-  MAD_ERROR_BADEMPHASIS	   = 0x0105,	/* reserved emphasis value */
-
-  MAD_ERROR_BADCRC	   = 0x0201,	/* CRC check failed */
-  MAD_ERROR_BADBITALLOC	   = 0x0211,	/* forbidden bit allocation value */
-  MAD_ERROR_BADSCALEFACTOR = 0x0221,	/* bad scalefactor index */
-  MAD_ERROR_BADMODE        = 0x0222,	/* bad bitrate/mode combination */
-  MAD_ERROR_BADFRAMELEN	   = 0x0231,	/* bad frame length */
-  MAD_ERROR_BADBIGVALUES   = 0x0232,	/* bad big_values count */
-  MAD_ERROR_BADBLOCKTYPE   = 0x0233,	/* reserved block_type */
-  MAD_ERROR_BADSCFSI	   = 0x0234,	/* bad scalefactor selection info */
-  MAD_ERROR_BADDATAPTR	   = 0x0235,	/* bad main_data_begin pointer */
-  MAD_ERROR_BADPART3LEN	   = 0x0236,	/* bad audio data length */
-  MAD_ERROR_BADHUFFTABLE   = 0x0237,	/* bad Huffman table select */
-  MAD_ERROR_BADHUFFDATA	   = 0x0238,	/* Huffman data overrun */
-  MAD_ERROR_BADSTEREO	   = 0x0239	/* incompatible block_type for JS */
-};
-
-# define MAD_RECOVERABLE(error)	((error) & 0xff00)
-
-struct mad_stream {
-  unsigned char const *buffer;		/* input bitstream buffer */
-  unsigned char const *bufend;		/* end of buffer */
-  unsigned long skiplen;		/* bytes to skip before next frame */
-
-  int sync;				/* stream sync found */
-  unsigned long freerate;		/* free bitrate (fixed) */
-
-  unsigned char const *this_frame;	/* start of current frame */
-  unsigned char const *next_frame;	/* start of next frame */
-  struct mad_bitptr ptr;		/* current processing bit pointer */
-
-  struct mad_bitptr anc_ptr;		/* ancillary bits pointer */
-  unsigned int anc_bitlen;		/* number of ancillary bits */
-
-  unsigned char (*main_data)[MAD_BUFFER_MDLEN];
-					/* Layer III main_data() */
-  unsigned int md_len;			/* bytes in main_data */
-
-  int options;				/* decoding options (see below) */
-  enum mad_error error;			/* error code (see above) */
-};
-
-enum {
-  MAD_OPTION_IGNORECRC      = 0x0001,	/* ignore CRC errors */
-  MAD_OPTION_HALFSAMPLERATE = 0x0002	/* generate PCM at 1/2 sample rate */
-# if 0  /* not yet implemented */
-  MAD_OPTION_LEFTCHANNEL    = 0x0010,	/* decode left channel only */
-  MAD_OPTION_RIGHTCHANNEL   = 0x0020,	/* decode right channel only */
-  MAD_OPTION_SINGLECHANNEL  = 0x0030	/* combine channels */
-# endif
-};
-
-void mad_stream_init(struct mad_stream *);
-void mad_stream_finish(struct mad_stream *);
-
-# define mad_stream_options(stream, opts)  \
-    ((void) ((stream)->options = (opts)))
-
-void mad_stream_buffer(struct mad_stream *,
-		       unsigned char const *, unsigned long);
-void mad_stream_skip(struct mad_stream *, unsigned long);
-
-int mad_stream_sync(struct mad_stream *);
-
-char const *mad_stream_errorstr(struct mad_stream const *);
-
-# endif
-
-/* Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp */
-
-# ifndef LIBMAD_FRAME_H
-# define LIBMAD_FRAME_H
-
-
-enum mad_layer {
-  MAD_LAYER_I   = 1,			/* Layer I */
-  MAD_LAYER_II  = 2,			/* Layer II */
-  MAD_LAYER_III = 3			/* Layer III */
-};
-
-enum mad_mode {
-  MAD_MODE_SINGLE_CHANNEL = 0,		/* single channel */
-  MAD_MODE_DUAL_CHANNEL	  = 1,		/* dual channel */
-  MAD_MODE_JOINT_STEREO	  = 2,		/* joint (MS/intensity) stereo */
-  MAD_MODE_STEREO	  = 3		/* normal LR stereo */
-};
-
-enum mad_emphasis {
-  MAD_EMPHASIS_NONE	  = 0,		/* no emphasis */
-  MAD_EMPHASIS_50_15_US	  = 1,		/* 50/15 microseconds emphasis */
-  MAD_EMPHASIS_CCITT_J_17 = 3,		/* CCITT J.17 emphasis */
-  MAD_EMPHASIS_RESERVED   = 2		/* unknown emphasis */
-};
-
-struct mad_header {
-  enum mad_layer layer;			/* audio layer (1, 2, or 3) */
-  enum mad_mode mode;			/* channel mode (see above) */
-  int mode_extension;			/* additional mode info */
-  enum mad_emphasis emphasis;		/* de-emphasis to use (see above) */
-
-  unsigned long bitrate;		/* stream bitrate (bps) */
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-
-  unsigned short crc_check;		/* frame CRC accumulator */
-  unsigned short crc_target;		/* final target CRC checksum */
-
-  int flags;				/* flags (see below) */
-  int private_bits;			/* private bits (see below) */
-
-  mad_timer_t duration;			/* audio playing time of frame */
-};
-
-struct mad_frame {
-  struct mad_header header;		/* MPEG audio header */
-
-  int options;				/* decoding options (from stream) */
-
-  mad_fixed_t sbsample[2][36][32];	/* synthesis subband filter samples */
-  mad_fixed_t (*overlap)[2][32][18];	/* Layer III block overlap data */
-};
-
-# define MAD_NCHANNELS(header)		((header)->mode ? 2 : 1)
-# define MAD_NSBSAMPLES(header)  \
-  ((header)->layer == MAD_LAYER_I ? 12 :  \
-   (((header)->layer == MAD_LAYER_III &&  \
-     ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
-
-enum {
-  MAD_FLAG_NPRIVATE_III	= 0x0007,	/* number of Layer III private bits */
-  MAD_FLAG_INCOMPLETE	= 0x0008,	/* header but not data is decoded */
-
-  MAD_FLAG_PROTECTION	= 0x0010,	/* frame has CRC protection */
-  MAD_FLAG_COPYRIGHT	= 0x0020,	/* frame is copyright */
-  MAD_FLAG_ORIGINAL	= 0x0040,	/* frame is original (else copy) */
-  MAD_FLAG_PADDING	= 0x0080,	/* frame has additional slot */
-
-  MAD_FLAG_I_STEREO	= 0x0100,	/* uses intensity joint stereo */
-  MAD_FLAG_MS_STEREO	= 0x0200,	/* uses middle/side joint stereo */
-  MAD_FLAG_FREEFORMAT	= 0x0400,	/* uses free format bitrate */
-
-  MAD_FLAG_LSF_EXT	= 0x1000,	/* lower sampling freq. extension */
-  MAD_FLAG_MC_EXT	= 0x2000,	/* multichannel audio extension */
-  MAD_FLAG_MPEG_2_5_EXT	= 0x4000	/* MPEG 2.5 (unofficial) extension */
-};
-
-enum {
-  MAD_PRIVATE_HEADER	= 0x0100,	/* header private bit */
-  MAD_PRIVATE_III	= 0x001f	/* Layer III private bits (up to 5) */
-};
-
-void mad_header_init(struct mad_header *);
-
-# define mad_header_finish(header)  /* nothing */
-
-int mad_header_decode(struct mad_header *, struct mad_stream *);
-
-void mad_frame_init(struct mad_frame *);
-void mad_frame_finish(struct mad_frame *);
-
-int mad_frame_decode(struct mad_frame *, struct mad_stream *);
-
-void mad_frame_mute(struct mad_frame *);
-
-# endif
-
-/* Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp */
-
-# ifndef LIBMAD_SYNTH_H
-# define LIBMAD_SYNTH_H
-
-
-struct mad_pcm {
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-  unsigned short channels;		/* number of channels */
-  unsigned short length;		/* number of samples per channel */
-  mad_fixed_t samples[2][1152];		/* PCM output samples [ch][sample] */
-};
-
-struct mad_synth {
-  mad_fixed_t filter[2][2][2][16][8];	/* polyphase filterbank outputs */
-  					/* [ch][eo][peo][s][v] */
-
-  unsigned int phase;			/* current processing phase */
-
-  struct mad_pcm pcm;			/* PCM output */
-};
-
-/* single channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_SINGLE = 0
-};
-
-/* dual channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_DUAL_1 = 0,
-  MAD_PCM_CHANNEL_DUAL_2 = 1
-};
-
-/* stereo PCM selector */
-enum {
-  MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
-  MAD_PCM_CHANNEL_STEREO_RIGHT = 1
-};
-
-void mad_synth_init(struct mad_synth *);
-
-# define mad_synth_finish(synth)  /* nothing */
-
-void mad_synth_mute(struct mad_synth *);
-
-void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
-
-# endif
-
-/* Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp */
-
-# ifndef LIBMAD_DECODER_H
-# define LIBMAD_DECODER_H
-
-
-enum mad_decoder_mode {
-  MAD_DECODER_MODE_SYNC  = 0,
-  MAD_DECODER_MODE_ASYNC
-};
-
-enum mad_flow {
-  MAD_FLOW_CONTINUE = 0x0000,	/* continue normally */
-  MAD_FLOW_STOP     = 0x0010,	/* stop decoding normally */
-  MAD_FLOW_BREAK    = 0x0011,	/* stop decoding and signal an error */
-  MAD_FLOW_IGNORE   = 0x0020	/* ignore the current frame */
-};
-
-struct mad_decoder {
-  enum mad_decoder_mode mode;
-
-  int options;
-
-  struct {
-    long pid;
-    int in;
-    int out;
-  } async;
-
-  struct {
-    struct mad_stream stream;
-    struct mad_frame frame;
-    struct mad_synth synth;
-  } *sync;
-
-  void *cb_data;
-
-  enum mad_flow (*input_func)(void *, struct mad_stream *);
-  enum mad_flow (*header_func)(void *, struct mad_header const *);
-  enum mad_flow (*filter_func)(void *,
-			       struct mad_stream const *, struct mad_frame *);
-  enum mad_flow (*output_func)(void *,
-			       struct mad_header const *, struct mad_pcm *);
-  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
-  enum mad_flow (*message_func)(void *, void *, unsigned int *);
-};
-
-void mad_decoder_init(struct mad_decoder *, void *,
-		      enum mad_flow (*)(void *, struct mad_stream *),
-		      enum mad_flow (*)(void *, struct mad_header const *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream const *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *,
-					struct mad_header const *,
-					struct mad_pcm *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *, void *, unsigned int *));
-int mad_decoder_finish(struct mad_decoder *);
-
-# define mad_decoder_options(decoder, opts)  \
-    ((void) ((decoder)->options = (opts)))
-
-int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode);
-int mad_decoder_message(struct mad_decoder *, void *, unsigned int *);
-
-# endif
-
-# ifdef __cplusplus
-}
-# endif
--- a/sys/src/games/mp3dec/main.c
+++ /dev/null
@@ -1,225 +1,0 @@
-/*
- * Simple mp3 player.  Derived from libmad's example minimad.c.
- */
-#include <u.h>
-#include <libc.h>
-#include "mad.h"
-
-/* Current input file */
-char *name;
-vlong offset;
-int rate = 44100;
-int debug = 0;
-
-char *outfile;
-int vfd; /* /dev/volume */
-
-static enum mad_flow
-input(void *data, struct mad_stream *stream)
-{
-	int fd, n, m;
-	static uchar buf[32768];
-
-	fd = (int)data;
-	n = stream->bufend - stream->next_frame;
-	memmove(buf, stream->next_frame, n);
-	m = read(fd, buf+n, sizeof buf-n);
-	offset += m;
-	if(m < 0)
-		sysfatal("reading input: %r");
-	if(m == 0)
-		return MAD_FLOW_STOP;
-	n += m;
-	mad_stream_buffer(stream, buf, n);
-	return MAD_FLOW_CONTINUE;
-}
-
-/*
- * Dither 28-bit down to 16-bit.  From mpg321. 
- * I'm skeptical, but it's supposed to make the
- * samples sound better than just truncation.
- */
-typedef struct Dither Dither;
-struct Dither
-{
-	mad_fixed_t error[3];
-	mad_fixed_t random;
-};
-
-#define PRNG(x) (((x)*0x19660dL + 0x3c6ef35fL) & 0xffffffffL)
-
-enum
-{
-	FracBits = MAD_F_FRACBITS,
-	OutBits = 16,
-	Round = 1 << (FracBits+1-OutBits-1),	// sic
-	ScaleBits = FracBits + 1 - OutBits,
-	LowMask  = (1<<ScaleBits) - 1,
-	Min = -MAD_F_ONE,
-	Max = MAD_F_ONE - 1,
-};
-
-int
-audiodither(mad_fixed_t v, Dither *d)
-{
-	int out;
-	mad_fixed_t random;
-
-	/* noise shape */
-	v += d->error[0] - d->error[1] + d->error[2];
-	d->error[2] = d->error[1];
-	d->error[1] = d->error[0] / 2;
-	
-	/* bias */
-	out = v + Round;
-	
-	/* dither */
-	random = PRNG(d->random);
-	out += (random & LowMask) - (d->random & LowMask);
-	d->random = random;
-	
-	/* clip */
-	if(out > Max){
-		out = Max;
-		if(v > Max)
-			v = Max;
-	}else if(out < Min){
-		out = Min;
-		if(v < Min)
-			v = Min;
-	}
-	
-	/* quantize */
-	out &= ~LowMask;
-	
-	/* error feedback */
-	d->error[0] = v - out;
-	
-	/* scale */
-	return out >> ScaleBits;
-}
-
-static enum mad_flow
-output(void *data, struct mad_header const* header, struct mad_pcm *pcm)
-{
-	int i, n, v;
-	mad_fixed_t const *left, *right;
-	static Dither d;
-	static uchar buf[16384], *p;
-
-	if(pcm->samplerate != rate){
-		rate = pcm->samplerate;
-		if(vfd < 0)
-			fprint(2, "warning: audio sample rate is %d Hz\n", rate);
-		else
-			fprint(vfd, "speed %d", rate);
-	}
-	p = buf;
-	memset(&d, 0, sizeof d);
-	n = pcm->length;
-	switch(pcm->channels){
-	case 1:
-		left = pcm->samples[0];
-		for(i=0; i<n; i++){
-			v = audiodither(*left++, &d);
-			/* stereoize */
-			*p++ = v;
-			*p++ = v>>8;
-			*p++ = v;
-			*p++ = v>>8;
-		}
-		break;
-	case 2:
-		left = pcm->samples[0];
-		right = pcm->samples[1];
-		for(i=0; i<n; i++){
-			v = audiodither(*left++, &d);
-			*p++ = v;
-			*p++ = v>>8;
-			v = audiodither(*right++, &d);
-			*p++ = v;
-			*p++ = v>>8;
-		}
-		break;
-	}
-	assert(p<=buf+sizeof buf);
-	write(1, buf, p-buf);
-	return MAD_FLOW_CONTINUE;
-}
-
-static enum mad_flow
-error(void *data, struct mad_stream *stream, struct mad_frame *frame)
-{
-	if(stream->error == MAD_ERROR_LOSTSYNC){
-		if(memcmp(stream->this_frame, "TAG", 3)==0){
-			mad_stream_skip(stream, 128);
-			return MAD_FLOW_CONTINUE;
-		}
-	}
-	if(debug)
-		fprint(2, "%s:#%lld: %s\n",
-			name, offset-(stream->bufend-stream->next_frame),
-			mad_stream_errorstr(stream));
-	return MAD_FLOW_CONTINUE;
-}
-
-void
-play(int fd, char *nam)
-{
-	struct mad_decoder decoder;
-	
-	name = nam;
-	mad_decoder_init(&decoder, (void*)fd, input, nil, nil, output, error, nil);
-	mad_decoder_run(&decoder, MAD_DECODER_MODE_SYNC);
-	mad_decoder_finish(&decoder);
-}
-
-void
-usage(void)
-{
-	fprint(2, "usage: mp3dec [ -d ] [ -o outfile ] [ file ... ]\n");
-	exits("usage");
-}
-
-void
-main(int argc, char **argv)
-{
-	int i, fd;
-	char *p;
-
-	ARGBEGIN{
-	case 'o':
-		outfile = EARGF(usage());
-		break;
-	case 'd':
-		debug++;
-		break;
-	default:
-		usage();
-	}ARGEND
-	
-	if(outfile){
-		if((fd = create(outfile, OWRITE, 0666)) < 0)
-			sysfatal("create %s: %r", outfile);
-	}else{
-		if((fd = open("/dev/audio", OWRITE)) < 0)
-			sysfatal("open /dev/audio: %r");
-		vfd = open("/dev/volume", OWRITE);
-	}
-	if(fd != 1){
-		dup(fd, 1);
-		close(fd);
-	}
-
-	if(argc == 0){
-		play(0, "standard input");
-	}else{
-		for(i=0; i<argc; i++){
-			if((fd = open(argv[i], OREAD)) < 0)
-				sysfatal("open %s: %r", argv[i]);
-			play(fd, argv[i]);
-			close(fd);
-		}
-	}
-	exits(0);
-}
--- a/sys/src/games/mp3dec/mkfile
+++ /dev/null
@@ -1,21 +1,0 @@
-</$objtype/mkfile
-
-OFILES=\
-	bit.$O\
-	decoder.$O\
-	fixed.$O\
-	frame.$O\
-	huffman.$O\
-	layer12.$O\
-	layer3.$O\
-	stream.$O\
-	synth.$O\
-	version.$O\
-	main.$O\
-
-TARG=mp3dec
-BIN=/$objtype/bin/games
-
-</sys/src/cmd/mkone
-
-CFLAGS=-FVp -DFPM_DEFAULT
--- a/sys/src/games/mp3dec/qc_table.dat
+++ /dev/null
@@ -1,77 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: qc_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
- */
-
-/*
- * These are the Layer II classes of quantization.
- * The table is derived from Table B.4 of ISO/IEC 11172-3.
- */
-
-  {     3, 2,  5,
-    MAD_F(0x15555555) /* 1.33333333333 => 1.33333333209, e  0.00000000124 */,
-    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
-  {     5, 3,  7,
-    MAD_F(0x1999999a) /* 1.60000000000 => 1.60000000149, e -0.00000000149 */,
-    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
-  {     7, 0,  3,
-    MAD_F(0x12492492) /* 1.14285714286 => 1.14285714179, e  0.00000000107 */,
-    MAD_F(0x04000000) /* 0.25000000000 => 0.25000000000, e  0.00000000000 */ },
-  {     9, 4, 10,
-    MAD_F(0x1c71c71c) /* 1.77777777777 => 1.77777777612, e  0.00000000165 */,
-    MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e  0.00000000000 */ },
-  {    15, 0,  4,
-    MAD_F(0x11111111) /* 1.06666666666 => 1.06666666642, e  0.00000000024 */,
-    MAD_F(0x02000000) /* 0.12500000000 => 0.12500000000, e  0.00000000000 */ },
-  {    31, 0,  5,
-    MAD_F(0x10842108) /* 1.03225806452 => 1.03225806355, e  0.00000000097 */,
-    MAD_F(0x01000000) /* 0.06250000000 => 0.06250000000, e  0.00000000000 */ },
-  {    63, 0,  6,
-    MAD_F(0x10410410) /* 1.01587301587 => 1.01587301493, e  0.00000000094 */,
-    MAD_F(0x00800000) /* 0.03125000000 => 0.03125000000, e  0.00000000000 */ },
-  {   127, 0,  7,
-    MAD_F(0x10204081) /* 1.00787401575 => 1.00787401572, e  0.00000000003 */,
-    MAD_F(0x00400000) /* 0.01562500000 => 0.01562500000, e  0.00000000000 */ },
-  {   255, 0,  8,
-    MAD_F(0x10101010) /* 1.00392156863 => 1.00392156839, e  0.00000000024 */,
-    MAD_F(0x00200000) /* 0.00781250000 => 0.00781250000, e  0.00000000000 */ },
-  {   511, 0,  9,
-    MAD_F(0x10080402) /* 1.00195694716 => 1.00195694715, e  0.00000000001 */,
-    MAD_F(0x00100000) /* 0.00390625000 => 0.00390625000, e  0.00000000000 */ },
-  {  1023, 0, 10,
-    MAD_F(0x10040100) /* 1.00097751711 => 1.00097751617, e  0.00000000094 */,
-    MAD_F(0x00080000) /* 0.00195312500 => 0.00195312500, e  0.00000000000 */ },
-  {  2047, 0, 11,
-    MAD_F(0x10020040) /* 1.00048851979 => 1.00048851967, e  0.00000000012 */,
-    MAD_F(0x00040000) /* 0.00097656250 => 0.00097656250, e  0.00000000000 */ },
-  {  4095, 0, 12,
-    MAD_F(0x10010010) /* 1.00024420024 => 1.00024420023, e  0.00000000001 */,
-    MAD_F(0x00020000) /* 0.00048828125 => 0.00048828125, e  0.00000000000 */ },
-  {  8191, 0, 13,
-    MAD_F(0x10008004) /* 1.00012208522 => 1.00012208521, e  0.00000000001 */,
-    MAD_F(0x00010000) /* 0.00024414063 => 0.00024414062, e  0.00000000000 */ },
-  { 16383, 0, 14,
-    MAD_F(0x10004001) /* 1.00006103888 => 1.00006103888, e -0.00000000000 */,
-    MAD_F(0x00008000) /* 0.00012207031 => 0.00012207031, e -0.00000000000 */ },
-  { 32767, 0, 15,
-    MAD_F(0x10002000) /* 1.00003051851 => 1.00003051758, e  0.00000000093 */,
-    MAD_F(0x00004000) /* 0.00006103516 => 0.00006103516, e  0.00000000000 */ },
-  { 65535, 0, 16,
-    MAD_F(0x10001000) /* 1.00001525902 => 1.00001525879, e  0.00000000023 */,
-    MAD_F(0x00002000) /* 0.00003051758 => 0.00003051758, e  0.00000000000 */ }
--- a/sys/src/games/mp3dec/rq_table.dat
+++ /dev/null
@@ -1,8747 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: rq_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
- */
-
-/*
- * This is the lookup table used to compute x^(4/3) for Layer III
- * requantization. To maintain the best possible accuracy, the value is
- * stored as a normalized mantissa with exponent. The requantization
- * algorithm recombines these parts with appropriate scaling.
- */
-
-  /*    0 */  { MAD_F(0x00000000) /* 0.000000000 */,  0 },
-  /*    1 */  { MAD_F(0x04000000) /* 0.250000000 */,  2 },
-  /*    2 */  { MAD_F(0x050a28be) /* 0.314980262 */,  3 },
-  /*    3 */  { MAD_F(0x0453a5cd) /* 0.270421794 */,  4 },
-  /*    4 */  { MAD_F(0x06597fa9) /* 0.396850263 */,  4 },
-  /*    5 */  { MAD_F(0x04466275) /* 0.267183742 */,  5 },
-  /*    6 */  { MAD_F(0x05738c72) /* 0.340710111 */,  5 },
-  /*    7 */  { MAD_F(0x06b1fc81) /* 0.418453696 */,  5 },
-  /*    8 */  { MAD_F(0x04000000) /* 0.250000000 */,  6 },
-  /*    9 */  { MAD_F(0x04ae20d7) /* 0.292511788 */,  6 },
-  /*   10 */  { MAD_F(0x0562d694) /* 0.336630420 */,  6 },
-  /*   11 */  { MAD_F(0x061dae96) /* 0.382246578 */,  6 },
-  /*   12 */  { MAD_F(0x06de47f4) /* 0.429267841 */,  6 },
-  /*   13 */  { MAD_F(0x07a44f7a) /* 0.477614858 */,  6 },
-  /*   14 */  { MAD_F(0x0437be65) /* 0.263609310 */,  7 },
-  /*   15 */  { MAD_F(0x049fc824) /* 0.289009227 */,  7 },
-
-  /*   16 */  { MAD_F(0x050a28be) /* 0.314980262 */,  7 },
-  /*   17 */  { MAD_F(0x0576c6f5) /* 0.341498336 */,  7 },
-  /*   18 */  { MAD_F(0x05e58c0b) /* 0.368541759 */,  7 },
-  /*   19 */  { MAD_F(0x06566361) /* 0.396090870 */,  7 },
-  /*   20 */  { MAD_F(0x06c93a2e) /* 0.424127753 */,  7 },
-  /*   21 */  { MAD_F(0x073dff3e) /* 0.452635998 */,  7 },
-  /*   22 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */,  7 },
-  /*   23 */  { MAD_F(0x04168b05) /* 0.255503674 */,  8 },
-  /*   24 */  { MAD_F(0x0453a5cd) /* 0.270421794 */,  8 },
-  /*   25 */  { MAD_F(0x04919b6a) /* 0.285548607 */,  8 },
-  /*   26 */  { MAD_F(0x04d065fb) /* 0.300878507 */,  8 },
-  /*   27 */  { MAD_F(0x05100000) /* 0.316406250 */,  8 },
-  /*   28 */  { MAD_F(0x05506451) /* 0.332126919 */,  8 },
-  /*   29 */  { MAD_F(0x05918e15) /* 0.348035890 */,  8 },
-  /*   30 */  { MAD_F(0x05d378bb) /* 0.364128809 */,  8 },
-  /*   31 */  { MAD_F(0x06161ff3) /* 0.380401563 */,  8 },
-
-  /*   32 */  { MAD_F(0x06597fa9) /* 0.396850263 */,  8 },
-  /*   33 */  { MAD_F(0x069d9400) /* 0.413471222 */,  8 },
-  /*   34 */  { MAD_F(0x06e2594c) /* 0.430260942 */,  8 },
-  /*   35 */  { MAD_F(0x0727cc11) /* 0.447216097 */,  8 },
-  /*   36 */  { MAD_F(0x076de8fc) /* 0.464333519 */,  8 },
-  /*   37 */  { MAD_F(0x07b4ace3) /* 0.481610189 */,  8 },
-  /*   38 */  { MAD_F(0x07fc14bf) /* 0.499043224 */,  8 },
-  /*   39 */  { MAD_F(0x04220ed7) /* 0.258314934 */,  9 },
-  /*   40 */  { MAD_F(0x04466275) /* 0.267183742 */,  9 },
-  /*   41 */  { MAD_F(0x046b03e7) /* 0.276126771 */,  9 },
-  /*   42 */  { MAD_F(0x048ff1e8) /* 0.285142811 */,  9 },
-  /*   43 */  { MAD_F(0x04b52b3f) /* 0.294230696 */,  9 },
-  /*   44 */  { MAD_F(0x04daaec0) /* 0.303389310 */,  9 },
-  /*   45 */  { MAD_F(0x05007b49) /* 0.312617576 */,  9 },
-  /*   46 */  { MAD_F(0x05268fc6) /* 0.321914457 */,  9 },
-  /*   47 */  { MAD_F(0x054ceb2a) /* 0.331278957 */,  9 },
-
-  /*   48 */  { MAD_F(0x05738c72) /* 0.340710111 */,  9 },
-  /*   49 */  { MAD_F(0x059a72a5) /* 0.350206992 */,  9 },
-  /*   50 */  { MAD_F(0x05c19cd3) /* 0.359768701 */,  9 },
-  /*   51 */  { MAD_F(0x05e90a12) /* 0.369394372 */,  9 },
-  /*   52 */  { MAD_F(0x0610b982) /* 0.379083164 */,  9 },
-  /*   53 */  { MAD_F(0x0638aa48) /* 0.388834268 */,  9 },
-  /*   54 */  { MAD_F(0x0660db91) /* 0.398646895 */,  9 },
-  /*   55 */  { MAD_F(0x06894c90) /* 0.408520284 */,  9 },
-  /*   56 */  { MAD_F(0x06b1fc81) /* 0.418453696 */,  9 },
-  /*   57 */  { MAD_F(0x06daeaa1) /* 0.428446415 */,  9 },
-  /*   58 */  { MAD_F(0x07041636) /* 0.438497744 */,  9 },
-  /*   59 */  { MAD_F(0x072d7e8b) /* 0.448607009 */,  9 },
-  /*   60 */  { MAD_F(0x075722ef) /* 0.458773552 */,  9 },
-  /*   61 */  { MAD_F(0x078102b8) /* 0.468996735 */,  9 },
-  /*   62 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */,  9 },
-  /*   63 */  { MAD_F(0x07d571e0) /* 0.489610555 */,  9 },
-
-  /*   64 */  { MAD_F(0x04000000) /* 0.250000000 */, 10 },
-  /*   65 */  { MAD_F(0x04156381) /* 0.255221850 */, 10 },
-  /*   66 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 10 },
-  /*   67 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 10 },
-  /*   68 */  { MAD_F(0x045635cf) /* 0.271047409 */, 10 },
-  /*   69 */  { MAD_F(0x046c083e) /* 0.276375048 */, 10 },
-  /*   70 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 10 },
-  /*   71 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 10 },
-  /*   72 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 10 },
-  /*   73 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 10 },
-  /*   74 */  { MAD_F(0x04dab524) /* 0.303395408 */, 10 },
-  /*   75 */  { MAD_F(0x04f12624) /* 0.308874267 */, 10 },
-  /*   76 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 10 },
-  /*   77 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 10 },
-  /*   78 */  { MAD_F(0x053511cb) /* 0.325456423 */, 10 },
-  /*   79 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 10 },
-
-  /*   80 */  { MAD_F(0x0562d694) /* 0.336630420 */, 10 },
-  /*   81 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 10 },
-  /*   82 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 10 },
-  /*   83 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 10 },
-  /*   84 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 10 },
-  /*   85 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 10 },
-  /*   86 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 10 },
-  /*   87 */  { MAD_F(0x0606012b) /* 0.376465960 */, 10 },
-  /*   88 */  { MAD_F(0x061dae96) /* 0.382246578 */, 10 },
-  /*   89 */  { MAD_F(0x06357302) /* 0.388049134 */, 10 },
-  /*   90 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 10 },
-  /*   91 */  { MAD_F(0x0665402d) /* 0.399719406 */, 10 },
-  /*   92 */  { MAD_F(0x067d4896) /* 0.405586801 */, 10 },
-  /*   93 */  { MAD_F(0x06956753) /* 0.411475493 */, 10 },
-  /*   94 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 10 },
-  /*   95 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 10 },
-
-  /*   96 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 10 },
-  /*   97 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 10 },
-  /*   98 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 10 },
-  /*   99 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 10 },
-  /*  100 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 10 },
-  /*  101 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 10 },
-  /*  102 */  { MAD_F(0x07724f64) /* 0.465407744 */, 10 },
-  /*  103 */  { MAD_F(0x078b4514) /* 0.471501425 */, 10 },
-  /*  104 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 10 },
-  /*  105 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 10 },
-  /*  106 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 10 },
-  /*  107 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 10 },
-  /*  108 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 11 },
-  /*  109 */  { MAD_F(0x04115aca) /* 0.254236974 */, 11 },
-  /*  110 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 11 },
-  /*  111 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 11 },
-
-  /*  112 */  { MAD_F(0x0437be65) /* 0.263609310 */, 11 },
-  /*  113 */  { MAD_F(0x04449dee) /* 0.266752177 */, 11 },
-  /*  114 */  { MAD_F(0x04518733) /* 0.269904329 */, 11 },
-  /*  115 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 11 },
-  /*  116 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 11 },
-  /*  117 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 11 },
-  /*  118 */  { MAD_F(0x04858c83) /* 0.282604707 */, 11 },
-  /*  119 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 11 },
-  /*  120 */  { MAD_F(0x049fc824) /* 0.289009227 */, 11 },
-  /*  121 */  { MAD_F(0x04acf402) /* 0.292224893 */, 11 },
-  /*  122 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 11 },
-  /*  123 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 11 },
-  /*  124 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 11 },
-  /*  125 */  { MAD_F(0x04e20000) /* 0.305175781 */, 11 },
-  /*  126 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 11 },
-  /*  127 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 11 },
-
-  /*  128 */  { MAD_F(0x050a28be) /* 0.314980262 */, 11 },
-  /*  129 */  { MAD_F(0x05179da4) /* 0.318265572 */, 11 },
-  /*  130 */  { MAD_F(0x05251b73) /* 0.321559381 */, 11 },
-  /*  131 */  { MAD_F(0x0532a220) /* 0.324861647 */, 11 },
-  /*  132 */  { MAD_F(0x054031a0) /* 0.328172327 */, 11 },
-  /*  133 */  { MAD_F(0x054dc9e7) /* 0.331491377 */, 11 },
-  /*  134 */  { MAD_F(0x055b6ae9) /* 0.334818756 */, 11 },
-  /*  135 */  { MAD_F(0x0569149c) /* 0.338154423 */, 11 },
-  /*  136 */  { MAD_F(0x0576c6f5) /* 0.341498336 */, 11 },
-  /*  137 */  { MAD_F(0x058481e9) /* 0.344850455 */, 11 },
-  /*  138 */  { MAD_F(0x0592456d) /* 0.348210741 */, 11 },
-  /*  139 */  { MAD_F(0x05a01176) /* 0.351579152 */, 11 },
-  /*  140 */  { MAD_F(0x05ade5fa) /* 0.354955651 */, 11 },
-  /*  141 */  { MAD_F(0x05bbc2ef) /* 0.358340200 */, 11 },
-  /*  142 */  { MAD_F(0x05c9a84a) /* 0.361732758 */, 11 },
-  /*  143 */  { MAD_F(0x05d79601) /* 0.365133291 */, 11 },
-
-  /*  144 */  { MAD_F(0x05e58c0b) /* 0.368541759 */, 11 },
-  /*  145 */  { MAD_F(0x05f38a5d) /* 0.371958126 */, 11 },
-  /*  146 */  { MAD_F(0x060190ee) /* 0.375382356 */, 11 },
-  /*  147 */  { MAD_F(0x060f9fb3) /* 0.378814413 */, 11 },
-  /*  148 */  { MAD_F(0x061db6a5) /* 0.382254261 */, 11 },
-  /*  149 */  { MAD_F(0x062bd5b8) /* 0.385701865 */, 11 },
-  /*  150 */  { MAD_F(0x0639fce4) /* 0.389157191 */, 11 },
-  /*  151 */  { MAD_F(0x06482c1f) /* 0.392620204 */, 11 },
-  /*  152 */  { MAD_F(0x06566361) /* 0.396090870 */, 11 },
-  /*  153 */  { MAD_F(0x0664a2a0) /* 0.399569155 */, 11 },
-  /*  154 */  { MAD_F(0x0672e9d4) /* 0.403055027 */, 11 },
-  /*  155 */  { MAD_F(0x068138f3) /* 0.406548452 */, 11 },
-  /*  156 */  { MAD_F(0x068f8ff5) /* 0.410049398 */, 11 },
-  /*  157 */  { MAD_F(0x069deed1) /* 0.413557833 */, 11 },
-  /*  158 */  { MAD_F(0x06ac557f) /* 0.417073724 */, 11 },
-  /*  159 */  { MAD_F(0x06bac3f6) /* 0.420597041 */, 11 },
-
-  /*  160 */  { MAD_F(0x06c93a2e) /* 0.424127753 */, 11 },
-  /*  161 */  { MAD_F(0x06d7b81f) /* 0.427665827 */, 11 },
-  /*  162 */  { MAD_F(0x06e63dc0) /* 0.431211234 */, 11 },
-  /*  163 */  { MAD_F(0x06f4cb09) /* 0.434763944 */, 11 },
-  /*  164 */  { MAD_F(0x07035ff3) /* 0.438323927 */, 11 },
-  /*  165 */  { MAD_F(0x0711fc75) /* 0.441891153 */, 11 },
-  /*  166 */  { MAD_F(0x0720a087) /* 0.445465593 */, 11 },
-  /*  167 */  { MAD_F(0x072f4c22) /* 0.449047217 */, 11 },
-  /*  168 */  { MAD_F(0x073dff3e) /* 0.452635998 */, 11 },
-  /*  169 */  { MAD_F(0x074cb9d3) /* 0.456231906 */, 11 },
-  /*  170 */  { MAD_F(0x075b7bdb) /* 0.459834914 */, 11 },
-  /*  171 */  { MAD_F(0x076a454c) /* 0.463444993 */, 11 },
-  /*  172 */  { MAD_F(0x07791620) /* 0.467062117 */, 11 },
-  /*  173 */  { MAD_F(0x0787ee50) /* 0.470686258 */, 11 },
-  /*  174 */  { MAD_F(0x0796cdd4) /* 0.474317388 */, 11 },
-  /*  175 */  { MAD_F(0x07a5b4a5) /* 0.477955481 */, 11 },
-
-  /*  176 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */, 11 },
-  /*  177 */  { MAD_F(0x07c39812) /* 0.485252449 */, 11 },
-  /*  178 */  { MAD_F(0x07d294a0) /* 0.488911273 */, 11 },
-  /*  179 */  { MAD_F(0x07e1985f) /* 0.492576954 */, 11 },
-  /*  180 */  { MAD_F(0x07f0a348) /* 0.496249468 */, 11 },
-  /*  181 */  { MAD_F(0x07ffb554) /* 0.499928790 */, 11 },
-  /*  182 */  { MAD_F(0x0407673f) /* 0.251807447 */, 12 },
-  /*  183 */  { MAD_F(0x040ef75e) /* 0.253653877 */, 12 },
-  /*  184 */  { MAD_F(0x04168b05) /* 0.255503674 */, 12 },
-  /*  185 */  { MAD_F(0x041e2230) /* 0.257356825 */, 12 },
-  /*  186 */  { MAD_F(0x0425bcdd) /* 0.259213318 */, 12 },
-  /*  187 */  { MAD_F(0x042d5b07) /* 0.261073141 */, 12 },
-  /*  188 */  { MAD_F(0x0434fcad) /* 0.262936282 */, 12 },
-  /*  189 */  { MAD_F(0x043ca1c9) /* 0.264802730 */, 12 },
-  /*  190 */  { MAD_F(0x04444a5a) /* 0.266672472 */, 12 },
-  /*  191 */  { MAD_F(0x044bf65d) /* 0.268545497 */, 12 },
-
-  /*  192 */  { MAD_F(0x0453a5cd) /* 0.270421794 */, 12 },
-  /*  193 */  { MAD_F(0x045b58a9) /* 0.272301352 */, 12 },
-  /*  194 */  { MAD_F(0x04630eed) /* 0.274184158 */, 12 },
-  /*  195 */  { MAD_F(0x046ac896) /* 0.276070203 */, 12 },
-  /*  196 */  { MAD_F(0x047285a2) /* 0.277959474 */, 12 },
-  /*  197 */  { MAD_F(0x047a460c) /* 0.279851960 */, 12 },
-  /*  198 */  { MAD_F(0x048209d3) /* 0.281747652 */, 12 },
-  /*  199 */  { MAD_F(0x0489d0f4) /* 0.283646538 */, 12 },
-  /*  200 */  { MAD_F(0x04919b6a) /* 0.285548607 */, 12 },
-  /*  201 */  { MAD_F(0x04996935) /* 0.287453849 */, 12 },
-  /*  202 */  { MAD_F(0x04a13a50) /* 0.289362253 */, 12 },
-  /*  203 */  { MAD_F(0x04a90eba) /* 0.291273810 */, 12 },
-  /*  204 */  { MAD_F(0x04b0e66e) /* 0.293188507 */, 12 },
-  /*  205 */  { MAD_F(0x04b8c16c) /* 0.295106336 */, 12 },
-  /*  206 */  { MAD_F(0x04c09faf) /* 0.297027285 */, 12 },
-  /*  207 */  { MAD_F(0x04c88135) /* 0.298951346 */, 12 },
-
-  /*  208 */  { MAD_F(0x04d065fb) /* 0.300878507 */, 12 },
-  /*  209 */  { MAD_F(0x04d84dff) /* 0.302808759 */, 12 },
-  /*  210 */  { MAD_F(0x04e0393e) /* 0.304742092 */, 12 },
-  /*  211 */  { MAD_F(0x04e827b6) /* 0.306678497 */, 12 },
-  /*  212 */  { MAD_F(0x04f01963) /* 0.308617963 */, 12 },
-  /*  213 */  { MAD_F(0x04f80e44) /* 0.310560480 */, 12 },
-  /*  214 */  { MAD_F(0x05000655) /* 0.312506041 */, 12 },
-  /*  215 */  { MAD_F(0x05080195) /* 0.314454634 */, 12 },
-  /*  216 */  { MAD_F(0x05100000) /* 0.316406250 */, 12 },
-  /*  217 */  { MAD_F(0x05180194) /* 0.318360880 */, 12 },
-  /*  218 */  { MAD_F(0x0520064f) /* 0.320318516 */, 12 },
-  /*  219 */  { MAD_F(0x05280e2d) /* 0.322279147 */, 12 },
-  /*  220 */  { MAD_F(0x0530192e) /* 0.324242764 */, 12 },
-  /*  221 */  { MAD_F(0x0538274e) /* 0.326209359 */, 12 },
-  /*  222 */  { MAD_F(0x0540388a) /* 0.328178922 */, 12 },
-  /*  223 */  { MAD_F(0x05484ce2) /* 0.330151445 */, 12 },
-
-  /*  224 */  { MAD_F(0x05506451) /* 0.332126919 */, 12 },
-  /*  225 */  { MAD_F(0x05587ed5) /* 0.334105334 */, 12 },
-  /*  226 */  { MAD_F(0x05609c6e) /* 0.336086683 */, 12 },
-  /*  227 */  { MAD_F(0x0568bd17) /* 0.338070956 */, 12 },
-  /*  228 */  { MAD_F(0x0570e0cf) /* 0.340058145 */, 12 },
-  /*  229 */  { MAD_F(0x05790793) /* 0.342048241 */, 12 },
-  /*  230 */  { MAD_F(0x05813162) /* 0.344041237 */, 12 },
-  /*  231 */  { MAD_F(0x05895e39) /* 0.346037122 */, 12 },
-  /*  232 */  { MAD_F(0x05918e15) /* 0.348035890 */, 12 },
-  /*  233 */  { MAD_F(0x0599c0f4) /* 0.350037532 */, 12 },
-  /*  234 */  { MAD_F(0x05a1f6d5) /* 0.352042040 */, 12 },
-  /*  235 */  { MAD_F(0x05aa2fb5) /* 0.354049405 */, 12 },
-  /*  236 */  { MAD_F(0x05b26b92) /* 0.356059619 */, 12 },
-  /*  237 */  { MAD_F(0x05baaa69) /* 0.358072674 */, 12 },
-  /*  238 */  { MAD_F(0x05c2ec39) /* 0.360088563 */, 12 },
-  /*  239 */  { MAD_F(0x05cb3100) /* 0.362107278 */, 12 },
-
-  /*  240 */  { MAD_F(0x05d378bb) /* 0.364128809 */, 12 },
-  /*  241 */  { MAD_F(0x05dbc368) /* 0.366153151 */, 12 },
-  /*  242 */  { MAD_F(0x05e41105) /* 0.368180294 */, 12 },
-  /*  243 */  { MAD_F(0x05ec6190) /* 0.370210231 */, 12 },
-  /*  244 */  { MAD_F(0x05f4b507) /* 0.372242955 */, 12 },
-  /*  245 */  { MAD_F(0x05fd0b68) /* 0.374278458 */, 12 },
-  /*  246 */  { MAD_F(0x060564b1) /* 0.376316732 */, 12 },
-  /*  247 */  { MAD_F(0x060dc0e0) /* 0.378357769 */, 12 },
-  /*  248 */  { MAD_F(0x06161ff3) /* 0.380401563 */, 12 },
-  /*  249 */  { MAD_F(0x061e81e8) /* 0.382448106 */, 12 },
-  /*  250 */  { MAD_F(0x0626e6bc) /* 0.384497391 */, 12 },
-  /*  251 */  { MAD_F(0x062f4e6f) /* 0.386549409 */, 12 },
-  /*  252 */  { MAD_F(0x0637b8fd) /* 0.388604155 */, 12 },
-  /*  253 */  { MAD_F(0x06402666) /* 0.390661620 */, 12 },
-  /*  254 */  { MAD_F(0x064896a7) /* 0.392721798 */, 12 },
-  /*  255 */  { MAD_F(0x065109be) /* 0.394784681 */, 12 },
-
-  /*  256 */  { MAD_F(0x06597fa9) /* 0.396850263 */, 12 },
-  /*  257 */  { MAD_F(0x0661f867) /* 0.398918536 */, 12 },
-  /*  258 */  { MAD_F(0x066a73f5) /* 0.400989493 */, 12 },
-  /*  259 */  { MAD_F(0x0672f252) /* 0.403063128 */, 12 },
-  /*  260 */  { MAD_F(0x067b737c) /* 0.405139433 */, 12 },
-  /*  261 */  { MAD_F(0x0683f771) /* 0.407218402 */, 12 },
-  /*  262 */  { MAD_F(0x068c7e2f) /* 0.409300027 */, 12 },
-  /*  263 */  { MAD_F(0x069507b5) /* 0.411384303 */, 12 },
-  /*  264 */  { MAD_F(0x069d9400) /* 0.413471222 */, 12 },
-  /*  265 */  { MAD_F(0x06a6230f) /* 0.415560778 */, 12 },
-  /*  266 */  { MAD_F(0x06aeb4e0) /* 0.417652964 */, 12 },
-  /*  267 */  { MAD_F(0x06b74971) /* 0.419747773 */, 12 },
-  /*  268 */  { MAD_F(0x06bfe0c0) /* 0.421845199 */, 12 },
-  /*  269 */  { MAD_F(0x06c87acc) /* 0.423945235 */, 12 },
-  /*  270 */  { MAD_F(0x06d11794) /* 0.426047876 */, 12 },
-  /*  271 */  { MAD_F(0x06d9b714) /* 0.428153114 */, 12 },
-
-  /*  272 */  { MAD_F(0x06e2594c) /* 0.430260942 */, 12 },
-  /*  273 */  { MAD_F(0x06eafe3a) /* 0.432371356 */, 12 },
-  /*  274 */  { MAD_F(0x06f3a5dc) /* 0.434484348 */, 12 },
-  /*  275 */  { MAD_F(0x06fc5030) /* 0.436599912 */, 12 },
-  /*  276 */  { MAD_F(0x0704fd35) /* 0.438718042 */, 12 },
-  /*  277 */  { MAD_F(0x070dacea) /* 0.440838732 */, 12 },
-  /*  278 */  { MAD_F(0x07165f4b) /* 0.442961975 */, 12 },
-  /*  279 */  { MAD_F(0x071f1459) /* 0.445087765 */, 12 },
-  /*  280 */  { MAD_F(0x0727cc11) /* 0.447216097 */, 12 },
-  /*  281 */  { MAD_F(0x07308671) /* 0.449346964 */, 12 },
-  /*  282 */  { MAD_F(0x07394378) /* 0.451480360 */, 12 },
-  /*  283 */  { MAD_F(0x07420325) /* 0.453616280 */, 12 },
-  /*  284 */  { MAD_F(0x074ac575) /* 0.455754717 */, 12 },
-  /*  285 */  { MAD_F(0x07538a67) /* 0.457895665 */, 12 },
-  /*  286 */  { MAD_F(0x075c51fa) /* 0.460039119 */, 12 },
-  /*  287 */  { MAD_F(0x07651c2c) /* 0.462185072 */, 12 },
-
-  /*  288 */  { MAD_F(0x076de8fc) /* 0.464333519 */, 12 },
-  /*  289 */  { MAD_F(0x0776b867) /* 0.466484455 */, 12 },
-  /*  290 */  { MAD_F(0x077f8a6d) /* 0.468637872 */, 12 },
-  /*  291 */  { MAD_F(0x07885f0b) /* 0.470793767 */, 12 },
-  /*  292 */  { MAD_F(0x07913641) /* 0.472952132 */, 12 },
-  /*  293 */  { MAD_F(0x079a100c) /* 0.475112962 */, 12 },
-  /*  294 */  { MAD_F(0x07a2ec6c) /* 0.477276252 */, 12 },
-  /*  295 */  { MAD_F(0x07abcb5f) /* 0.479441997 */, 12 },
-  /*  296 */  { MAD_F(0x07b4ace3) /* 0.481610189 */, 12 },
-  /*  297 */  { MAD_F(0x07bd90f6) /* 0.483780825 */, 12 },
-  /*  298 */  { MAD_F(0x07c67798) /* 0.485953899 */, 12 },
-  /*  299 */  { MAD_F(0x07cf60c7) /* 0.488129404 */, 12 },
-  /*  300 */  { MAD_F(0x07d84c81) /* 0.490307336 */, 12 },
-  /*  301 */  { MAD_F(0x07e13ac5) /* 0.492487690 */, 12 },
-  /*  302 */  { MAD_F(0x07ea2b92) /* 0.494670459 */, 12 },
-  /*  303 */  { MAD_F(0x07f31ee6) /* 0.496855639 */, 12 },
-
-  /*  304 */  { MAD_F(0x07fc14bf) /* 0.499043224 */, 12 },
-  /*  305 */  { MAD_F(0x0402868e) /* 0.250616605 */, 13 },
-  /*  306 */  { MAD_F(0x040703ff) /* 0.251712795 */, 13 },
-  /*  307 */  { MAD_F(0x040b82b0) /* 0.252810180 */, 13 },
-  /*  308 */  { MAD_F(0x041002a1) /* 0.253908756 */, 13 },
-  /*  309 */  { MAD_F(0x041483d1) /* 0.255008523 */, 13 },
-  /*  310 */  { MAD_F(0x04190640) /* 0.256109476 */, 13 },
-  /*  311 */  { MAD_F(0x041d89ed) /* 0.257211614 */, 13 },
-  /*  312 */  { MAD_F(0x04220ed7) /* 0.258314934 */, 13 },
-  /*  313 */  { MAD_F(0x042694fe) /* 0.259419433 */, 13 },
-  /*  314 */  { MAD_F(0x042b1c60) /* 0.260525110 */, 13 },
-  /*  315 */  { MAD_F(0x042fa4fe) /* 0.261631960 */, 13 },
-  /*  316 */  { MAD_F(0x04342ed7) /* 0.262739982 */, 13 },
-  /*  317 */  { MAD_F(0x0438b9e9) /* 0.263849174 */, 13 },
-  /*  318 */  { MAD_F(0x043d4635) /* 0.264959533 */, 13 },
-  /*  319 */  { MAD_F(0x0441d3b9) /* 0.266071056 */, 13 },
-
-  /*  320 */  { MAD_F(0x04466275) /* 0.267183742 */, 13 },
-  /*  321 */  { MAD_F(0x044af269) /* 0.268297587 */, 13 },
-  /*  322 */  { MAD_F(0x044f8393) /* 0.269412589 */, 13 },
-  /*  323 */  { MAD_F(0x045415f3) /* 0.270528746 */, 13 },
-  /*  324 */  { MAD_F(0x0458a989) /* 0.271646056 */, 13 },
-  /*  325 */  { MAD_F(0x045d3e53) /* 0.272764515 */, 13 },
-  /*  326 */  { MAD_F(0x0461d451) /* 0.273884123 */, 13 },
-  /*  327 */  { MAD_F(0x04666b83) /* 0.275004875 */, 13 },
-  /*  328 */  { MAD_F(0x046b03e7) /* 0.276126771 */, 13 },
-  /*  329 */  { MAD_F(0x046f9d7e) /* 0.277249808 */, 13 },
-  /*  330 */  { MAD_F(0x04743847) /* 0.278373983 */, 13 },
-  /*  331 */  { MAD_F(0x0478d440) /* 0.279499294 */, 13 },
-  /*  332 */  { MAD_F(0x047d716a) /* 0.280625739 */, 13 },
-  /*  333 */  { MAD_F(0x04820fc3) /* 0.281753315 */, 13 },
-  /*  334 */  { MAD_F(0x0486af4c) /* 0.282882021 */, 13 },
-  /*  335 */  { MAD_F(0x048b5003) /* 0.284011853 */, 13 },
-
-  /*  336 */  { MAD_F(0x048ff1e8) /* 0.285142811 */, 13 },
-  /*  337 */  { MAD_F(0x049494fb) /* 0.286274891 */, 13 },
-  /*  338 */  { MAD_F(0x0499393a) /* 0.287408091 */, 13 },
-  /*  339 */  { MAD_F(0x049ddea5) /* 0.288542409 */, 13 },
-  /*  340 */  { MAD_F(0x04a2853c) /* 0.289677844 */, 13 },
-  /*  341 */  { MAD_F(0x04a72cfe) /* 0.290814392 */, 13 },
-  /*  342 */  { MAD_F(0x04abd5ea) /* 0.291952051 */, 13 },
-  /*  343 */  { MAD_F(0x04b08000) /* 0.293090820 */, 13 },
-  /*  344 */  { MAD_F(0x04b52b3f) /* 0.294230696 */, 13 },
-  /*  345 */  { MAD_F(0x04b9d7a7) /* 0.295371678 */, 13 },
-  /*  346 */  { MAD_F(0x04be8537) /* 0.296513762 */, 13 },
-  /*  347 */  { MAD_F(0x04c333ee) /* 0.297656947 */, 13 },
-  /*  348 */  { MAD_F(0x04c7e3cc) /* 0.298801231 */, 13 },
-  /*  349 */  { MAD_F(0x04cc94d1) /* 0.299946611 */, 13 },
-  /*  350 */  { MAD_F(0x04d146fb) /* 0.301093085 */, 13 },
-  /*  351 */  { MAD_F(0x04d5fa4b) /* 0.302240653 */, 13 },
-
-  /*  352 */  { MAD_F(0x04daaec0) /* 0.303389310 */, 13 },
-  /*  353 */  { MAD_F(0x04df6458) /* 0.304539056 */, 13 },
-  /*  354 */  { MAD_F(0x04e41b14) /* 0.305689888 */, 13 },
-  /*  355 */  { MAD_F(0x04e8d2f3) /* 0.306841804 */, 13 },
-  /*  356 */  { MAD_F(0x04ed8bf5) /* 0.307994802 */, 13 },
-  /*  357 */  { MAD_F(0x04f24618) /* 0.309148880 */, 13 },
-  /*  358 */  { MAD_F(0x04f7015d) /* 0.310304037 */, 13 },
-  /*  359 */  { MAD_F(0x04fbbdc3) /* 0.311460269 */, 13 },
-  /*  360 */  { MAD_F(0x05007b49) /* 0.312617576 */, 13 },
-  /*  361 */  { MAD_F(0x050539ef) /* 0.313775954 */, 13 },
-  /*  362 */  { MAD_F(0x0509f9b4) /* 0.314935403 */, 13 },
-  /*  363 */  { MAD_F(0x050eba98) /* 0.316095920 */, 13 },
-  /*  364 */  { MAD_F(0x05137c9a) /* 0.317257503 */, 13 },
-  /*  365 */  { MAD_F(0x05183fba) /* 0.318420150 */, 13 },
-  /*  366 */  { MAD_F(0x051d03f7) /* 0.319583859 */, 13 },
-  /*  367 */  { MAD_F(0x0521c950) /* 0.320748629 */, 13 },
-
-  /*  368 */  { MAD_F(0x05268fc6) /* 0.321914457 */, 13 },
-  /*  369 */  { MAD_F(0x052b5757) /* 0.323081342 */, 13 },
-  /*  370 */  { MAD_F(0x05302003) /* 0.324249281 */, 13 },
-  /*  371 */  { MAD_F(0x0534e9ca) /* 0.325418273 */, 13 },
-  /*  372 */  { MAD_F(0x0539b4ab) /* 0.326588316 */, 13 },
-  /*  373 */  { MAD_F(0x053e80a6) /* 0.327759407 */, 13 },
-  /*  374 */  { MAD_F(0x05434db9) /* 0.328931546 */, 13 },
-  /*  375 */  { MAD_F(0x05481be5) /* 0.330104730 */, 13 },
-  /*  376 */  { MAD_F(0x054ceb2a) /* 0.331278957 */, 13 },
-  /*  377 */  { MAD_F(0x0551bb85) /* 0.332454225 */, 13 },
-  /*  378 */  { MAD_F(0x05568cf8) /* 0.333630533 */, 13 },
-  /*  379 */  { MAD_F(0x055b5f81) /* 0.334807879 */, 13 },
-  /*  380 */  { MAD_F(0x05603321) /* 0.335986261 */, 13 },
-  /*  381 */  { MAD_F(0x056507d6) /* 0.337165677 */, 13 },
-  /*  382 */  { MAD_F(0x0569dda0) /* 0.338346125 */, 13 },
-  /*  383 */  { MAD_F(0x056eb47f) /* 0.339527604 */, 13 },
-
-  /*  384 */  { MAD_F(0x05738c72) /* 0.340710111 */, 13 },
-  /*  385 */  { MAD_F(0x05786578) /* 0.341893646 */, 13 },
-  /*  386 */  { MAD_F(0x057d3f92) /* 0.343078205 */, 13 },
-  /*  387 */  { MAD_F(0x05821abf) /* 0.344263788 */, 13 },
-  /*  388 */  { MAD_F(0x0586f6fd) /* 0.345450393 */, 13 },
-  /*  389 */  { MAD_F(0x058bd44e) /* 0.346638017 */, 13 },
-  /*  390 */  { MAD_F(0x0590b2b0) /* 0.347826659 */, 13 },
-  /*  391 */  { MAD_F(0x05959222) /* 0.349016318 */, 13 },
-  /*  392 */  { MAD_F(0x059a72a5) /* 0.350206992 */, 13 },
-  /*  393 */  { MAD_F(0x059f5438) /* 0.351398678 */, 13 },
-  /*  394 */  { MAD_F(0x05a436da) /* 0.352591376 */, 13 },
-  /*  395 */  { MAD_F(0x05a91a8c) /* 0.353785083 */, 13 },
-  /*  396 */  { MAD_F(0x05adff4c) /* 0.354979798 */, 13 },
-  /*  397 */  { MAD_F(0x05b2e51a) /* 0.356175519 */, 13 },
-  /*  398 */  { MAD_F(0x05b7cbf5) /* 0.357372244 */, 13 },
-  /*  399 */  { MAD_F(0x05bcb3de) /* 0.358569972 */, 13 },
-
-  /*  400 */  { MAD_F(0x05c19cd3) /* 0.359768701 */, 13 },
-  /*  401 */  { MAD_F(0x05c686d5) /* 0.360968429 */, 13 },
-  /*  402 */  { MAD_F(0x05cb71e2) /* 0.362169156 */, 13 },
-  /*  403 */  { MAD_F(0x05d05dfb) /* 0.363370878 */, 13 },
-  /*  404 */  { MAD_F(0x05d54b1f) /* 0.364573594 */, 13 },
-  /*  405 */  { MAD_F(0x05da394d) /* 0.365777304 */, 13 },
-  /*  406 */  { MAD_F(0x05df2885) /* 0.366982004 */, 13 },
-  /*  407 */  { MAD_F(0x05e418c7) /* 0.368187694 */, 13 },
-  /*  408 */  { MAD_F(0x05e90a12) /* 0.369394372 */, 13 },
-  /*  409 */  { MAD_F(0x05edfc66) /* 0.370602036 */, 13 },
-  /*  410 */  { MAD_F(0x05f2efc2) /* 0.371810684 */, 13 },
-  /*  411 */  { MAD_F(0x05f7e426) /* 0.373020316 */, 13 },
-  /*  412 */  { MAD_F(0x05fcd992) /* 0.374230929 */, 13 },
-  /*  413 */  { MAD_F(0x0601d004) /* 0.375442522 */, 13 },
-  /*  414 */  { MAD_F(0x0606c77d) /* 0.376655093 */, 13 },
-  /*  415 */  { MAD_F(0x060bbffd) /* 0.377868641 */, 13 },
-
-  /*  416 */  { MAD_F(0x0610b982) /* 0.379083164 */, 13 },
-  /*  417 */  { MAD_F(0x0615b40c) /* 0.380298661 */, 13 },
-  /*  418 */  { MAD_F(0x061aaf9c) /* 0.381515130 */, 13 },
-  /*  419 */  { MAD_F(0x061fac2f) /* 0.382732569 */, 13 },
-  /*  420 */  { MAD_F(0x0624a9c7) /* 0.383950977 */, 13 },
-  /*  421 */  { MAD_F(0x0629a863) /* 0.385170352 */, 13 },
-  /*  422 */  { MAD_F(0x062ea802) /* 0.386390694 */, 13 },
-  /*  423 */  { MAD_F(0x0633a8a3) /* 0.387611999 */, 13 },
-  /*  424 */  { MAD_F(0x0638aa48) /* 0.388834268 */, 13 },
-  /*  425 */  { MAD_F(0x063dacee) /* 0.390057497 */, 13 },
-  /*  426 */  { MAD_F(0x0642b096) /* 0.391281687 */, 13 },
-  /*  427 */  { MAD_F(0x0647b53f) /* 0.392506834 */, 13 },
-  /*  428 */  { MAD_F(0x064cbae9) /* 0.393732939 */, 13 },
-  /*  429 */  { MAD_F(0x0651c193) /* 0.394959999 */, 13 },
-  /*  430 */  { MAD_F(0x0656c93d) /* 0.396188012 */, 13 },
-  /*  431 */  { MAD_F(0x065bd1e7) /* 0.397416978 */, 13 },
-
-  /*  432 */  { MAD_F(0x0660db91) /* 0.398646895 */, 13 },
-  /*  433 */  { MAD_F(0x0665e639) /* 0.399877761 */, 13 },
-  /*  434 */  { MAD_F(0x066af1df) /* 0.401109575 */, 13 },
-  /*  435 */  { MAD_F(0x066ffe84) /* 0.402342335 */, 13 },
-  /*  436 */  { MAD_F(0x06750c26) /* 0.403576041 */, 13 },
-  /*  437 */  { MAD_F(0x067a1ac6) /* 0.404810690 */, 13 },
-  /*  438 */  { MAD_F(0x067f2a62) /* 0.406046281 */, 13 },
-  /*  439 */  { MAD_F(0x06843afb) /* 0.407282813 */, 13 },
-  /*  440 */  { MAD_F(0x06894c90) /* 0.408520284 */, 13 },
-  /*  441 */  { MAD_F(0x068e5f21) /* 0.409758693 */, 13 },
-  /*  442 */  { MAD_F(0x069372ae) /* 0.410998038 */, 13 },
-  /*  443 */  { MAD_F(0x06988735) /* 0.412238319 */, 13 },
-  /*  444 */  { MAD_F(0x069d9cb7) /* 0.413479532 */, 13 },
-  /*  445 */  { MAD_F(0x06a2b333) /* 0.414721679 */, 13 },
-  /*  446 */  { MAD_F(0x06a7caa9) /* 0.415964756 */, 13 },
-  /*  447 */  { MAD_F(0x06ace318) /* 0.417208762 */, 13 },
-
-  /*  448 */  { MAD_F(0x06b1fc81) /* 0.418453696 */, 13 },
-  /*  449 */  { MAD_F(0x06b716e2) /* 0.419699557 */, 13 },
-  /*  450 */  { MAD_F(0x06bc323b) /* 0.420946343 */, 13 },
-  /*  451 */  { MAD_F(0x06c14e8d) /* 0.422194054 */, 13 },
-  /*  452 */  { MAD_F(0x06c66bd6) /* 0.423442686 */, 13 },
-  /*  453 */  { MAD_F(0x06cb8a17) /* 0.424692240 */, 13 },
-  /*  454 */  { MAD_F(0x06d0a94e) /* 0.425942714 */, 13 },
-  /*  455 */  { MAD_F(0x06d5c97c) /* 0.427194106 */, 13 },
-  /*  456 */  { MAD_F(0x06daeaa1) /* 0.428446415 */, 13 },
-  /*  457 */  { MAD_F(0x06e00cbb) /* 0.429699640 */, 13 },
-  /*  458 */  { MAD_F(0x06e52fca) /* 0.430953779 */, 13 },
-  /*  459 */  { MAD_F(0x06ea53cf) /* 0.432208832 */, 13 },
-  /*  460 */  { MAD_F(0x06ef78c8) /* 0.433464796 */, 13 },
-  /*  461 */  { MAD_F(0x06f49eb6) /* 0.434721671 */, 13 },
-  /*  462 */  { MAD_F(0x06f9c597) /* 0.435979455 */, 13 },
-  /*  463 */  { MAD_F(0x06feed6d) /* 0.437238146 */, 13 },
-
-  /*  464 */  { MAD_F(0x07041636) /* 0.438497744 */, 13 },
-  /*  465 */  { MAD_F(0x07093ff2) /* 0.439758248 */, 13 },
-  /*  466 */  { MAD_F(0x070e6aa0) /* 0.441019655 */, 13 },
-  /*  467 */  { MAD_F(0x07139641) /* 0.442281965 */, 13 },
-  /*  468 */  { MAD_F(0x0718c2d3) /* 0.443545176 */, 13 },
-  /*  469 */  { MAD_F(0x071df058) /* 0.444809288 */, 13 },
-  /*  470 */  { MAD_F(0x07231ecd) /* 0.446074298 */, 13 },
-  /*  471 */  { MAD_F(0x07284e34) /* 0.447340205 */, 13 },
-  /*  472 */  { MAD_F(0x072d7e8b) /* 0.448607009 */, 13 },
-  /*  473 */  { MAD_F(0x0732afd2) /* 0.449874708 */, 13 },
-  /*  474 */  { MAD_F(0x0737e209) /* 0.451143300 */, 13 },
-  /*  475 */  { MAD_F(0x073d1530) /* 0.452412785 */, 13 },
-  /*  476 */  { MAD_F(0x07424946) /* 0.453683161 */, 13 },
-  /*  477 */  { MAD_F(0x07477e4b) /* 0.454954427 */, 13 },
-  /*  478 */  { MAD_F(0x074cb43e) /* 0.456226581 */, 13 },
-  /*  479 */  { MAD_F(0x0751eb20) /* 0.457499623 */, 13 },
-
-  /*  480 */  { MAD_F(0x075722ef) /* 0.458773552 */, 13 },
-  /*  481 */  { MAD_F(0x075c5bac) /* 0.460048365 */, 13 },
-  /*  482 */  { MAD_F(0x07619557) /* 0.461324062 */, 13 },
-  /*  483 */  { MAD_F(0x0766cfee) /* 0.462600642 */, 13 },
-  /*  484 */  { MAD_F(0x076c0b72) /* 0.463878102 */, 13 },
-  /*  485 */  { MAD_F(0x077147e2) /* 0.465156443 */, 13 },
-  /*  486 */  { MAD_F(0x0776853e) /* 0.466435663 */, 13 },
-  /*  487 */  { MAD_F(0x077bc385) /* 0.467715761 */, 13 },
-  /*  488 */  { MAD_F(0x078102b8) /* 0.468996735 */, 13 },
-  /*  489 */  { MAD_F(0x078642d6) /* 0.470278584 */, 13 },
-  /*  490 */  { MAD_F(0x078b83de) /* 0.471561307 */, 13 },
-  /*  491 */  { MAD_F(0x0790c5d1) /* 0.472844904 */, 13 },
-  /*  492 */  { MAD_F(0x079608ae) /* 0.474129372 */, 13 },
-  /*  493 */  { MAD_F(0x079b4c74) /* 0.475414710 */, 13 },
-  /*  494 */  { MAD_F(0x07a09124) /* 0.476700918 */, 13 },
-  /*  495 */  { MAD_F(0x07a5d6bd) /* 0.477987994 */, 13 },
-
-  /*  496 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */, 13 },
-  /*  497 */  { MAD_F(0x07b064a8) /* 0.480564746 */, 13 },
-  /*  498 */  { MAD_F(0x07b5acfb) /* 0.481854420 */, 13 },
-  /*  499 */  { MAD_F(0x07baf635) /* 0.483144957 */, 13 },
-  /*  500 */  { MAD_F(0x07c04056) /* 0.484436356 */, 13 },
-  /*  501 */  { MAD_F(0x07c58b5f) /* 0.485728617 */, 13 },
-  /*  502 */  { MAD_F(0x07cad74e) /* 0.487021738 */, 13 },
-  /*  503 */  { MAD_F(0x07d02424) /* 0.488315717 */, 13 },
-  /*  504 */  { MAD_F(0x07d571e0) /* 0.489610555 */, 13 },
-  /*  505 */  { MAD_F(0x07dac083) /* 0.490906249 */, 13 },
-  /*  506 */  { MAD_F(0x07e0100a) /* 0.492202799 */, 13 },
-  /*  507 */  { MAD_F(0x07e56078) /* 0.493500203 */, 13 },
-  /*  508 */  { MAD_F(0x07eab1ca) /* 0.494798460 */, 13 },
-  /*  509 */  { MAD_F(0x07f00401) /* 0.496097570 */, 13 },
-  /*  510 */  { MAD_F(0x07f5571d) /* 0.497397530 */, 13 },
-  /*  511 */  { MAD_F(0x07faab1c) /* 0.498698341 */, 13 },
-
-  /*  512 */  { MAD_F(0x04000000) /* 0.250000000 */, 14 },
-  /*  513 */  { MAD_F(0x0402aae3) /* 0.250651254 */, 14 },
-  /*  514 */  { MAD_F(0x04055638) /* 0.251302930 */, 14 },
-  /*  515 */  { MAD_F(0x040801ff) /* 0.251955030 */, 14 },
-  /*  516 */  { MAD_F(0x040aae37) /* 0.252607552 */, 14 },
-  /*  517 */  { MAD_F(0x040d5ae0) /* 0.253260495 */, 14 },
-  /*  518 */  { MAD_F(0x041007fa) /* 0.253913860 */, 14 },
-  /*  519 */  { MAD_F(0x0412b586) /* 0.254567645 */, 14 },
-  /*  520 */  { MAD_F(0x04156381) /* 0.255221850 */, 14 },
-  /*  521 */  { MAD_F(0x041811ee) /* 0.255876475 */, 14 },
-  /*  522 */  { MAD_F(0x041ac0cb) /* 0.256531518 */, 14 },
-  /*  523 */  { MAD_F(0x041d7018) /* 0.257186980 */, 14 },
-  /*  524 */  { MAD_F(0x04201fd5) /* 0.257842860 */, 14 },
-  /*  525 */  { MAD_F(0x0422d003) /* 0.258499157 */, 14 },
-  /*  526 */  { MAD_F(0x042580a0) /* 0.259155872 */, 14 },
-  /*  527 */  { MAD_F(0x042831ad) /* 0.259813002 */, 14 },
-
-  /*  528 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 14 },
-  /*  529 */  { MAD_F(0x042d9516) /* 0.261128510 */, 14 },
-  /*  530 */  { MAD_F(0x04304772) /* 0.261786886 */, 14 },
-  /*  531 */  { MAD_F(0x0432fa3d) /* 0.262445676 */, 14 },
-  /*  532 */  { MAD_F(0x0435ad76) /* 0.263104880 */, 14 },
-  /*  533 */  { MAD_F(0x0438611f) /* 0.263764497 */, 14 },
-  /*  534 */  { MAD_F(0x043b1536) /* 0.264424527 */, 14 },
-  /*  535 */  { MAD_F(0x043dc9bc) /* 0.265084969 */, 14 },
-  /*  536 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 14 },
-  /*  537 */  { MAD_F(0x04433414) /* 0.266407088 */, 14 },
-  /*  538 */  { MAD_F(0x0445e9e5) /* 0.267068763 */, 14 },
-  /*  539 */  { MAD_F(0x0448a024) /* 0.267730848 */, 14 },
-  /*  540 */  { MAD_F(0x044b56d1) /* 0.268393343 */, 14 },
-  /*  541 */  { MAD_F(0x044e0dec) /* 0.269056248 */, 14 },
-  /*  542 */  { MAD_F(0x0450c575) /* 0.269719560 */, 14 },
-  /*  543 */  { MAD_F(0x04537d6b) /* 0.270383281 */, 14 },
-
-  /*  544 */  { MAD_F(0x045635cf) /* 0.271047409 */, 14 },
-  /*  545 */  { MAD_F(0x0458ee9f) /* 0.271711944 */, 14 },
-  /*  546 */  { MAD_F(0x045ba7dd) /* 0.272376886 */, 14 },
-  /*  547 */  { MAD_F(0x045e6188) /* 0.273042234 */, 14 },
-  /*  548 */  { MAD_F(0x04611ba0) /* 0.273707988 */, 14 },
-  /*  549 */  { MAD_F(0x0463d625) /* 0.274374147 */, 14 },
-  /*  550 */  { MAD_F(0x04669116) /* 0.275040710 */, 14 },
-  /*  551 */  { MAD_F(0x04694c74) /* 0.275707677 */, 14 },
-  /*  552 */  { MAD_F(0x046c083e) /* 0.276375048 */, 14 },
-  /*  553 */  { MAD_F(0x046ec474) /* 0.277042822 */, 14 },
-  /*  554 */  { MAD_F(0x04718116) /* 0.277710999 */, 14 },
-  /*  555 */  { MAD_F(0x04743e25) /* 0.278379578 */, 14 },
-  /*  556 */  { MAD_F(0x0476fb9f) /* 0.279048558 */, 14 },
-  /*  557 */  { MAD_F(0x0479b984) /* 0.279717940 */, 14 },
-  /*  558 */  { MAD_F(0x047c77d6) /* 0.280387722 */, 14 },
-  /*  559 */  { MAD_F(0x047f3693) /* 0.281057905 */, 14 },
-
-  /*  560 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 14 },
-  /*  561 */  { MAD_F(0x0484b54e) /* 0.282399469 */, 14 },
-  /*  562 */  { MAD_F(0x0487754c) /* 0.283070849 */, 14 },
-  /*  563 */  { MAD_F(0x048a35b6) /* 0.283742628 */, 14 },
-  /*  564 */  { MAD_F(0x048cf68a) /* 0.284414805 */, 14 },
-  /*  565 */  { MAD_F(0x048fb7c8) /* 0.285087379 */, 14 },
-  /*  566 */  { MAD_F(0x04927972) /* 0.285760350 */, 14 },
-  /*  567 */  { MAD_F(0x04953b85) /* 0.286433717 */, 14 },
-  /*  568 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 14 },
-  /*  569 */  { MAD_F(0x049ac0eb) /* 0.287781640 */, 14 },
-  /*  570 */  { MAD_F(0x049d843e) /* 0.288456194 */, 14 },
-  /*  571 */  { MAD_F(0x04a047fa) /* 0.289131142 */, 14 },
-  /*  572 */  { MAD_F(0x04a30c20) /* 0.289806485 */, 14 },
-  /*  573 */  { MAD_F(0x04a5d0af) /* 0.290482221 */, 14 },
-  /*  574 */  { MAD_F(0x04a895a8) /* 0.291158351 */, 14 },
-  /*  575 */  { MAD_F(0x04ab5b0b) /* 0.291834873 */, 14 },
-
-  /*  576 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 14 },
-  /*  577 */  { MAD_F(0x04b0e70c) /* 0.293189094 */, 14 },
-  /*  578 */  { MAD_F(0x04b3adaa) /* 0.293866792 */, 14 },
-  /*  579 */  { MAD_F(0x04b674b1) /* 0.294544881 */, 14 },
-  /*  580 */  { MAD_F(0x04b93c21) /* 0.295223360 */, 14 },
-  /*  581 */  { MAD_F(0x04bc03fa) /* 0.295902229 */, 14 },
-  /*  582 */  { MAD_F(0x04becc3b) /* 0.296581488 */, 14 },
-  /*  583 */  { MAD_F(0x04c194e4) /* 0.297261136 */, 14 },
-  /*  584 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 14 },
-  /*  585 */  { MAD_F(0x04c72771) /* 0.298621598 */, 14 },
-  /*  586 */  { MAD_F(0x04c9f153) /* 0.299302411 */, 14 },
-  /*  587 */  { MAD_F(0x04ccbb9d) /* 0.299983611 */, 14 },
-  /*  588 */  { MAD_F(0x04cf864f) /* 0.300665198 */, 14 },
-  /*  589 */  { MAD_F(0x04d25169) /* 0.301347172 */, 14 },
-  /*  590 */  { MAD_F(0x04d51ceb) /* 0.302029532 */, 14 },
-  /*  591 */  { MAD_F(0x04d7e8d4) /* 0.302712277 */, 14 },
-
-  /*  592 */  { MAD_F(0x04dab524) /* 0.303395408 */, 14 },
-  /*  593 */  { MAD_F(0x04dd81dc) /* 0.304078923 */, 14 },
-  /*  594 */  { MAD_F(0x04e04efb) /* 0.304762823 */, 14 },
-  /*  595 */  { MAD_F(0x04e31c81) /* 0.305447106 */, 14 },
-  /*  596 */  { MAD_F(0x04e5ea6e) /* 0.306131773 */, 14 },
-  /*  597 */  { MAD_F(0x04e8b8c2) /* 0.306816823 */, 14 },
-  /*  598 */  { MAD_F(0x04eb877c) /* 0.307502256 */, 14 },
-  /*  599 */  { MAD_F(0x04ee569d) /* 0.308188071 */, 14 },
-  /*  600 */  { MAD_F(0x04f12624) /* 0.308874267 */, 14 },
-  /*  601 */  { MAD_F(0x04f3f612) /* 0.309560845 */, 14 },
-  /*  602 */  { MAD_F(0x04f6c666) /* 0.310247804 */, 14 },
-  /*  603 */  { MAD_F(0x04f99721) /* 0.310935143 */, 14 },
-  /*  604 */  { MAD_F(0x04fc6841) /* 0.311622862 */, 14 },
-  /*  605 */  { MAD_F(0x04ff39c7) /* 0.312310961 */, 14 },
-  /*  606 */  { MAD_F(0x05020bb3) /* 0.312999439 */, 14 },
-  /*  607 */  { MAD_F(0x0504de05) /* 0.313688296 */, 14 },
-
-  /*  608 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 14 },
-  /*  609 */  { MAD_F(0x050a83d8) /* 0.315067145 */, 14 },
-  /*  610 */  { MAD_F(0x050d575b) /* 0.315757136 */, 14 },
-  /*  611 */  { MAD_F(0x05102b42) /* 0.316447504 */, 14 },
-  /*  612 */  { MAD_F(0x0512ff8e) /* 0.317138249 */, 14 },
-  /*  613 */  { MAD_F(0x0515d440) /* 0.317829370 */, 14 },
-  /*  614 */  { MAD_F(0x0518a956) /* 0.318520867 */, 14 },
-  /*  615 */  { MAD_F(0x051b7ed1) /* 0.319212739 */, 14 },
-  /*  616 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 14 },
-  /*  617 */  { MAD_F(0x05212af5) /* 0.320597609 */, 14 },
-  /*  618 */  { MAD_F(0x0524019e) /* 0.321290606 */, 14 },
-  /*  619 */  { MAD_F(0x0526d8ab) /* 0.321983976 */, 14 },
-  /*  620 */  { MAD_F(0x0529b01d) /* 0.322677720 */, 14 },
-  /*  621 */  { MAD_F(0x052c87f2) /* 0.323371837 */, 14 },
-  /*  622 */  { MAD_F(0x052f602c) /* 0.324066327 */, 14 },
-  /*  623 */  { MAD_F(0x053238ca) /* 0.324761189 */, 14 },
-
-  /*  624 */  { MAD_F(0x053511cb) /* 0.325456423 */, 14 },
-  /*  625 */  { MAD_F(0x0537eb30) /* 0.326152028 */, 14 },
-  /*  626 */  { MAD_F(0x053ac4f9) /* 0.326848005 */, 14 },
-  /*  627 */  { MAD_F(0x053d9f25) /* 0.327544352 */, 14 },
-  /*  628 */  { MAD_F(0x054079b5) /* 0.328241070 */, 14 },
-  /*  629 */  { MAD_F(0x054354a8) /* 0.328938157 */, 14 },
-  /*  630 */  { MAD_F(0x05462ffe) /* 0.329635614 */, 14 },
-  /*  631 */  { MAD_F(0x05490bb7) /* 0.330333440 */, 14 },
-  /*  632 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 14 },
-  /*  633 */  { MAD_F(0x054ec453) /* 0.331730198 */, 14 },
-  /*  634 */  { MAD_F(0x0551a134) /* 0.332429129 */, 14 },
-  /*  635 */  { MAD_F(0x05547e79) /* 0.333128427 */, 14 },
-  /*  636 */  { MAD_F(0x05575c20) /* 0.333828093 */, 14 },
-  /*  637 */  { MAD_F(0x055a3a2a) /* 0.334528126 */, 14 },
-  /*  638 */  { MAD_F(0x055d1896) /* 0.335228525 */, 14 },
-  /*  639 */  { MAD_F(0x055ff764) /* 0.335929290 */, 14 },
-
-  /*  640 */  { MAD_F(0x0562d694) /* 0.336630420 */, 14 },
-  /*  641 */  { MAD_F(0x0565b627) /* 0.337331916 */, 14 },
-  /*  642 */  { MAD_F(0x0568961b) /* 0.338033777 */, 14 },
-  /*  643 */  { MAD_F(0x056b7671) /* 0.338736002 */, 14 },
-  /*  644 */  { MAD_F(0x056e5729) /* 0.339438592 */, 14 },
-  /*  645 */  { MAD_F(0x05713843) /* 0.340141545 */, 14 },
-  /*  646 */  { MAD_F(0x057419be) /* 0.340844862 */, 14 },
-  /*  647 */  { MAD_F(0x0576fb9a) /* 0.341548541 */, 14 },
-  /*  648 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 14 },
-  /*  649 */  { MAD_F(0x057cc077) /* 0.342956988 */, 14 },
-  /*  650 */  { MAD_F(0x057fa378) /* 0.343661754 */, 14 },
-  /*  651 */  { MAD_F(0x058286d9) /* 0.344366882 */, 14 },
-  /*  652 */  { MAD_F(0x05856a9b) /* 0.345072371 */, 14 },
-  /*  653 */  { MAD_F(0x05884ebe) /* 0.345778221 */, 14 },
-  /*  654 */  { MAD_F(0x058b3342) /* 0.346484431 */, 14 },
-  /*  655 */  { MAD_F(0x058e1827) /* 0.347191002 */, 14 },
-
-  /*  656 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 14 },
-  /*  657 */  { MAD_F(0x0593e311) /* 0.348605221 */, 14 },
-  /*  658 */  { MAD_F(0x0596c917) /* 0.349312869 */, 14 },
-  /*  659 */  { MAD_F(0x0599af7d) /* 0.350020876 */, 14 },
-  /*  660 */  { MAD_F(0x059c9643) /* 0.350729240 */, 14 },
-  /*  661 */  { MAD_F(0x059f7d6a) /* 0.351437963 */, 14 },
-  /*  662 */  { MAD_F(0x05a264f0) /* 0.352147044 */, 14 },
-  /*  663 */  { MAD_F(0x05a54cd6) /* 0.352856481 */, 14 },
-  /*  664 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 14 },
-  /*  665 */  { MAD_F(0x05ab1dc2) /* 0.354276426 */, 14 },
-  /*  666 */  { MAD_F(0x05ae06c7) /* 0.354986932 */, 14 },
-  /*  667 */  { MAD_F(0x05b0f02b) /* 0.355697795 */, 14 },
-  /*  668 */  { MAD_F(0x05b3d9f0) /* 0.356409012 */, 14 },
-  /*  669 */  { MAD_F(0x05b6c413) /* 0.357120585 */, 14 },
-  /*  670 */  { MAD_F(0x05b9ae95) /* 0.357832512 */, 14 },
-  /*  671 */  { MAD_F(0x05bc9977) /* 0.358544794 */, 14 },
-
-  /*  672 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 14 },
-  /*  673 */  { MAD_F(0x05c27057) /* 0.359970419 */, 14 },
-  /*  674 */  { MAD_F(0x05c55c56) /* 0.360683761 */, 14 },
-  /*  675 */  { MAD_F(0x05c848b3) /* 0.361397456 */, 14 },
-  /*  676 */  { MAD_F(0x05cb356e) /* 0.362111504 */, 14 },
-  /*  677 */  { MAD_F(0x05ce2289) /* 0.362825904 */, 14 },
-  /*  678 */  { MAD_F(0x05d11001) /* 0.363540655 */, 14 },
-  /*  679 */  { MAD_F(0x05d3fdd8) /* 0.364255759 */, 14 },
-  /*  680 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 14 },
-  /*  681 */  { MAD_F(0x05d9daa1) /* 0.365687018 */, 14 },
-  /*  682 */  { MAD_F(0x05dcc993) /* 0.366403174 */, 14 },
-  /*  683 */  { MAD_F(0x05dfb8e2) /* 0.367119680 */, 14 },
-  /*  684 */  { MAD_F(0x05e2a890) /* 0.367836535 */, 14 },
-  /*  685 */  { MAD_F(0x05e5989b) /* 0.368553740 */, 14 },
-  /*  686 */  { MAD_F(0x05e88904) /* 0.369271294 */, 14 },
-  /*  687 */  { MAD_F(0x05eb79cb) /* 0.369989197 */, 14 },
-
-  /*  688 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 14 },
-  /*  689 */  { MAD_F(0x05f15c70) /* 0.371426047 */, 14 },
-  /*  690 */  { MAD_F(0x05f44e4f) /* 0.372144994 */, 14 },
-  /*  691 */  { MAD_F(0x05f7408b) /* 0.372864289 */, 14 },
-  /*  692 */  { MAD_F(0x05fa3324) /* 0.373583930 */, 14 },
-  /*  693 */  { MAD_F(0x05fd261b) /* 0.374303918 */, 14 },
-  /*  694 */  { MAD_F(0x0600196e) /* 0.375024253 */, 14 },
-  /*  695 */  { MAD_F(0x06030d1e) /* 0.375744934 */, 14 },
-  /*  696 */  { MAD_F(0x0606012b) /* 0.376465960 */, 14 },
-  /*  697 */  { MAD_F(0x0608f595) /* 0.377187332 */, 14 },
-  /*  698 */  { MAD_F(0x060bea5c) /* 0.377909049 */, 14 },
-  /*  699 */  { MAD_F(0x060edf7f) /* 0.378631110 */, 14 },
-  /*  700 */  { MAD_F(0x0611d4fe) /* 0.379353516 */, 14 },
-  /*  701 */  { MAD_F(0x0614cada) /* 0.380076266 */, 14 },
-  /*  702 */  { MAD_F(0x0617c112) /* 0.380799360 */, 14 },
-  /*  703 */  { MAD_F(0x061ab7a6) /* 0.381522798 */, 14 },
-
-  /*  704 */  { MAD_F(0x061dae96) /* 0.382246578 */, 14 },
-  /*  705 */  { MAD_F(0x0620a5e3) /* 0.382970701 */, 14 },
-  /*  706 */  { MAD_F(0x06239d8b) /* 0.383695167 */, 14 },
-  /*  707 */  { MAD_F(0x0626958f) /* 0.384419975 */, 14 },
-  /*  708 */  { MAD_F(0x06298def) /* 0.385145124 */, 14 },
-  /*  709 */  { MAD_F(0x062c86aa) /* 0.385870615 */, 14 },
-  /*  710 */  { MAD_F(0x062f7fc1) /* 0.386596448 */, 14 },
-  /*  711 */  { MAD_F(0x06327934) /* 0.387322621 */, 14 },
-  /*  712 */  { MAD_F(0x06357302) /* 0.388049134 */, 14 },
-  /*  713 */  { MAD_F(0x06386d2b) /* 0.388775988 */, 14 },
-  /*  714 */  { MAD_F(0x063b67b0) /* 0.389503182 */, 14 },
-  /*  715 */  { MAD_F(0x063e6290) /* 0.390230715 */, 14 },
-  /*  716 */  { MAD_F(0x06415dcb) /* 0.390958588 */, 14 },
-  /*  717 */  { MAD_F(0x06445960) /* 0.391686799 */, 14 },
-  /*  718 */  { MAD_F(0x06475551) /* 0.392415349 */, 14 },
-  /*  719 */  { MAD_F(0x064a519c) /* 0.393144238 */, 14 },
-
-  /*  720 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 14 },
-  /*  721 */  { MAD_F(0x06504b44) /* 0.394603028 */, 14 },
-  /*  722 */  { MAD_F(0x0653489f) /* 0.395332930 */, 14 },
-  /*  723 */  { MAD_F(0x06564655) /* 0.396063168 */, 14 },
-  /*  724 */  { MAD_F(0x06594465) /* 0.396793743 */, 14 },
-  /*  725 */  { MAD_F(0x065c42d0) /* 0.397524655 */, 14 },
-  /*  726 */  { MAD_F(0x065f4195) /* 0.398255903 */, 14 },
-  /*  727 */  { MAD_F(0x066240b4) /* 0.398987487 */, 14 },
-  /*  728 */  { MAD_F(0x0665402d) /* 0.399719406 */, 14 },
-  /*  729 */  { MAD_F(0x06684000) /* 0.400451660 */, 14 },
-  /*  730 */  { MAD_F(0x066b402d) /* 0.401184249 */, 14 },
-  /*  731 */  { MAD_F(0x066e40b3) /* 0.401917173 */, 14 },
-  /*  732 */  { MAD_F(0x06714194) /* 0.402650431 */, 14 },
-  /*  733 */  { MAD_F(0x067442ce) /* 0.403384024 */, 14 },
-  /*  734 */  { MAD_F(0x06774462) /* 0.404117949 */, 14 },
-  /*  735 */  { MAD_F(0x067a464f) /* 0.404852209 */, 14 },
-
-  /*  736 */  { MAD_F(0x067d4896) /* 0.405586801 */, 14 },
-  /*  737 */  { MAD_F(0x06804b36) /* 0.406321726 */, 14 },
-  /*  738 */  { MAD_F(0x06834e2f) /* 0.407056983 */, 14 },
-  /*  739 */  { MAD_F(0x06865181) /* 0.407792573 */, 14 },
-  /*  740 */  { MAD_F(0x0689552c) /* 0.408528495 */, 14 },
-  /*  741 */  { MAD_F(0x068c5931) /* 0.409264748 */, 14 },
-  /*  742 */  { MAD_F(0x068f5d8e) /* 0.410001332 */, 14 },
-  /*  743 */  { MAD_F(0x06926245) /* 0.410738247 */, 14 },
-  /*  744 */  { MAD_F(0x06956753) /* 0.411475493 */, 14 },
-  /*  745 */  { MAD_F(0x06986cbb) /* 0.412213070 */, 14 },
-  /*  746 */  { MAD_F(0x069b727b) /* 0.412950976 */, 14 },
-  /*  747 */  { MAD_F(0x069e7894) /* 0.413689213 */, 14 },
-  /*  748 */  { MAD_F(0x06a17f05) /* 0.414427779 */, 14 },
-  /*  749 */  { MAD_F(0x06a485cf) /* 0.415166674 */, 14 },
-  /*  750 */  { MAD_F(0x06a78cf1) /* 0.415905897 */, 14 },
-  /*  751 */  { MAD_F(0x06aa946b) /* 0.416645450 */, 14 },
-
-  /*  752 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 14 },
-  /*  753 */  { MAD_F(0x06b0a468) /* 0.418125540 */, 14 },
-  /*  754 */  { MAD_F(0x06b3acea) /* 0.418866076 */, 14 },
-  /*  755 */  { MAD_F(0x06b6b5c4) /* 0.419606940 */, 14 },
-  /*  756 */  { MAD_F(0x06b9bef6) /* 0.420348132 */, 14 },
-  /*  757 */  { MAD_F(0x06bcc880) /* 0.421089650 */, 14 },
-  /*  758 */  { MAD_F(0x06bfd261) /* 0.421831494 */, 14 },
-  /*  759 */  { MAD_F(0x06c2dc9a) /* 0.422573665 */, 14 },
-  /*  760 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 14 },
-  /*  761 */  { MAD_F(0x06c8f213) /* 0.424058985 */, 14 },
-  /*  762 */  { MAD_F(0x06cbfd52) /* 0.424802133 */, 14 },
-  /*  763 */  { MAD_F(0x06cf08e9) /* 0.425545607 */, 14 },
-  /*  764 */  { MAD_F(0x06d214d7) /* 0.426289405 */, 14 },
-  /*  765 */  { MAD_F(0x06d5211c) /* 0.427033528 */, 14 },
-  /*  766 */  { MAD_F(0x06d82db8) /* 0.427777975 */, 14 },
-  /*  767 */  { MAD_F(0x06db3aaa) /* 0.428522746 */, 14 },
-
-  /*  768 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 14 },
-  /*  769 */  { MAD_F(0x06e15595) /* 0.430013259 */, 14 },
-  /*  770 */  { MAD_F(0x06e4638d) /* 0.430759001 */, 14 },
-  /*  771 */  { MAD_F(0x06e771db) /* 0.431505065 */, 14 },
-  /*  772 */  { MAD_F(0x06ea807f) /* 0.432251452 */, 14 },
-  /*  773 */  { MAD_F(0x06ed8f7b) /* 0.432998162 */, 14 },
-  /*  774 */  { MAD_F(0x06f09ecc) /* 0.433745193 */, 14 },
-  /*  775 */  { MAD_F(0x06f3ae75) /* 0.434492546 */, 14 },
-  /*  776 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 14 },
-  /*  777 */  { MAD_F(0x06f9cec8) /* 0.435988217 */, 14 },
-  /*  778 */  { MAD_F(0x06fcdf72) /* 0.436736534 */, 14 },
-  /*  779 */  { MAD_F(0x06fff073) /* 0.437485172 */, 14 },
-  /*  780 */  { MAD_F(0x070301ca) /* 0.438234130 */, 14 },
-  /*  781 */  { MAD_F(0x07061377) /* 0.438983408 */, 14 },
-  /*  782 */  { MAD_F(0x0709257a) /* 0.439733006 */, 14 },
-  /*  783 */  { MAD_F(0x070c37d2) /* 0.440482924 */, 14 },
-
-  /*  784 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 14 },
-  /*  785 */  { MAD_F(0x07125d84) /* 0.441983717 */, 14 },
-  /*  786 */  { MAD_F(0x071570de) /* 0.442734592 */, 14 },
-  /*  787 */  { MAD_F(0x0718848d) /* 0.443485785 */, 14 },
-  /*  788 */  { MAD_F(0x071b9891) /* 0.444237296 */, 14 },
-  /*  789 */  { MAD_F(0x071eaceb) /* 0.444989126 */, 14 },
-  /*  790 */  { MAD_F(0x0721c19a) /* 0.445741273 */, 14 },
-  /*  791 */  { MAD_F(0x0724d69e) /* 0.446493738 */, 14 },
-  /*  792 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 14 },
-  /*  793 */  { MAD_F(0x072b01a6) /* 0.447999618 */, 14 },
-  /*  794 */  { MAD_F(0x072e17a9) /* 0.448753033 */, 14 },
-  /*  795 */  { MAD_F(0x07312e01) /* 0.449506765 */, 14 },
-  /*  796 */  { MAD_F(0x073444ae) /* 0.450260813 */, 14 },
-  /*  797 */  { MAD_F(0x07375bb0) /* 0.451015176 */, 14 },
-  /*  798 */  { MAD_F(0x073a7307) /* 0.451769856 */, 14 },
-  /*  799 */  { MAD_F(0x073d8ab2) /* 0.452524850 */, 14 },
-
-  /*  800 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 14 },
-  /*  801 */  { MAD_F(0x0743bb06) /* 0.454035784 */, 14 },
-  /*  802 */  { MAD_F(0x0746d3af) /* 0.454791723 */, 14 },
-  /*  803 */  { MAD_F(0x0749ecac) /* 0.455547976 */, 14 },
-  /*  804 */  { MAD_F(0x074d05fe) /* 0.456304543 */, 14 },
-  /*  805 */  { MAD_F(0x07501fa3) /* 0.457061423 */, 14 },
-  /*  806 */  { MAD_F(0x0753399d) /* 0.457818618 */, 14 },
-  /*  807 */  { MAD_F(0x075653eb) /* 0.458576125 */, 14 },
-  /*  808 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 14 },
-  /*  809 */  { MAD_F(0x075c8983) /* 0.460092079 */, 14 },
-  /*  810 */  { MAD_F(0x075fa4cc) /* 0.460850524 */, 14 },
-  /*  811 */  { MAD_F(0x0762c06a) /* 0.461609282 */, 14 },
-  /*  812 */  { MAD_F(0x0765dc5b) /* 0.462368352 */, 14 },
-  /*  813 */  { MAD_F(0x0768f8a0) /* 0.463127733 */, 14 },
-  /*  814 */  { MAD_F(0x076c1538) /* 0.463887426 */, 14 },
-  /*  815 */  { MAD_F(0x076f3224) /* 0.464647430 */, 14 },
-
-  /*  816 */  { MAD_F(0x07724f64) /* 0.465407744 */, 14 },
-  /*  817 */  { MAD_F(0x07756cf7) /* 0.466168370 */, 14 },
-  /*  818 */  { MAD_F(0x07788add) /* 0.466929306 */, 14 },
-  /*  819 */  { MAD_F(0x077ba916) /* 0.467690552 */, 14 },
-  /*  820 */  { MAD_F(0x077ec7a3) /* 0.468452108 */, 14 },
-  /*  821 */  { MAD_F(0x0781e683) /* 0.469213973 */, 14 },
-  /*  822 */  { MAD_F(0x078505b5) /* 0.469976148 */, 14 },
-  /*  823 */  { MAD_F(0x0788253b) /* 0.470738632 */, 14 },
-  /*  824 */  { MAD_F(0x078b4514) /* 0.471501425 */, 14 },
-  /*  825 */  { MAD_F(0x078e653f) /* 0.472264527 */, 14 },
-  /*  826 */  { MAD_F(0x079185be) /* 0.473027937 */, 14 },
-  /*  827 */  { MAD_F(0x0794a68f) /* 0.473791655 */, 14 },
-  /*  828 */  { MAD_F(0x0797c7b2) /* 0.474555681 */, 14 },
-  /*  829 */  { MAD_F(0x079ae929) /* 0.475320014 */, 14 },
-  /*  830 */  { MAD_F(0x079e0af1) /* 0.476084655 */, 14 },
-  /*  831 */  { MAD_F(0x07a12d0c) /* 0.476849603 */, 14 },
-
-  /*  832 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 14 },
-  /*  833 */  { MAD_F(0x07a7723a) /* 0.478380420 */, 14 },
-  /*  834 */  { MAD_F(0x07aa954c) /* 0.479146288 */, 14 },
-  /*  835 */  { MAD_F(0x07adb8b0) /* 0.479912463 */, 14 },
-  /*  836 */  { MAD_F(0x07b0dc67) /* 0.480678943 */, 14 },
-  /*  837 */  { MAD_F(0x07b4006f) /* 0.481445729 */, 14 },
-  /*  838 */  { MAD_F(0x07b724ca) /* 0.482212820 */, 14 },
-  /*  839 */  { MAD_F(0x07ba4976) /* 0.482980216 */, 14 },
-  /*  840 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 14 },
-  /*  841 */  { MAD_F(0x07c093c5) /* 0.484515924 */, 14 },
-  /*  842 */  { MAD_F(0x07c3b967) /* 0.485284235 */, 14 },
-  /*  843 */  { MAD_F(0x07c6df5a) /* 0.486052849 */, 14 },
-  /*  844 */  { MAD_F(0x07ca059f) /* 0.486821768 */, 14 },
-  /*  845 */  { MAD_F(0x07cd2c36) /* 0.487590991 */, 14 },
-  /*  846 */  { MAD_F(0x07d0531e) /* 0.488360517 */, 14 },
-  /*  847 */  { MAD_F(0x07d37a57) /* 0.489130346 */, 14 },
-
-  /*  848 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 14 },
-  /*  849 */  { MAD_F(0x07d9c9be) /* 0.490670914 */, 14 },
-  /*  850 */  { MAD_F(0x07dcf1ec) /* 0.491441651 */, 14 },
-  /*  851 */  { MAD_F(0x07e01a6a) /* 0.492212691 */, 14 },
-  /*  852 */  { MAD_F(0x07e3433a) /* 0.492984033 */, 14 },
-  /*  853 */  { MAD_F(0x07e66c5a) /* 0.493755677 */, 14 },
-  /*  854 */  { MAD_F(0x07e995cc) /* 0.494527623 */, 14 },
-  /*  855 */  { MAD_F(0x07ecbf8e) /* 0.495299870 */, 14 },
-  /*  856 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 14 },
-  /*  857 */  { MAD_F(0x07f31405) /* 0.496845266 */, 14 },
-  /*  858 */  { MAD_F(0x07f63eba) /* 0.497618416 */, 14 },
-  /*  859 */  { MAD_F(0x07f969c0) /* 0.498391866 */, 14 },
-  /*  860 */  { MAD_F(0x07fc9516) /* 0.499165616 */, 14 },
-  /*  861 */  { MAD_F(0x07ffc0bc) /* 0.499939666 */, 14 },
-  /*  862 */  { MAD_F(0x04017659) /* 0.250357008 */, 15 },
-  /*  863 */  { MAD_F(0x04030c7d) /* 0.250744333 */, 15 },
-
-  /*  864 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 15 },
-  /*  865 */  { MAD_F(0x0406393d) /* 0.251519431 */, 15 },
-  /*  866 */  { MAD_F(0x0407cfd9) /* 0.251907204 */, 15 },
-  /*  867 */  { MAD_F(0x0409669d) /* 0.252295127 */, 15 },
-  /*  868 */  { MAD_F(0x040afd89) /* 0.252683198 */, 15 },
-  /*  869 */  { MAD_F(0x040c949e) /* 0.253071419 */, 15 },
-  /*  870 */  { MAD_F(0x040e2bda) /* 0.253459789 */, 15 },
-  /*  871 */  { MAD_F(0x040fc33e) /* 0.253848307 */, 15 },
-  /*  872 */  { MAD_F(0x04115aca) /* 0.254236974 */, 15 },
-  /*  873 */  { MAD_F(0x0412f27e) /* 0.254625790 */, 15 },
-  /*  874 */  { MAD_F(0x04148a5a) /* 0.255014755 */, 15 },
-  /*  875 */  { MAD_F(0x0416225d) /* 0.255403867 */, 15 },
-  /*  876 */  { MAD_F(0x0417ba89) /* 0.255793128 */, 15 },
-  /*  877 */  { MAD_F(0x041952dc) /* 0.256182537 */, 15 },
-  /*  878 */  { MAD_F(0x041aeb57) /* 0.256572095 */, 15 },
-  /*  879 */  { MAD_F(0x041c83fa) /* 0.256961800 */, 15 },
-
-  /*  880 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 15 },
-  /*  881 */  { MAD_F(0x041fb5b6) /* 0.257741653 */, 15 },
-  /*  882 */  { MAD_F(0x04214ed0) /* 0.258131801 */, 15 },
-  /*  883 */  { MAD_F(0x0422e811) /* 0.258522097 */, 15 },
-  /*  884 */  { MAD_F(0x04248179) /* 0.258912540 */, 15 },
-  /*  885 */  { MAD_F(0x04261b0a) /* 0.259303130 */, 15 },
-  /*  886 */  { MAD_F(0x0427b4c2) /* 0.259693868 */, 15 },
-  /*  887 */  { MAD_F(0x04294ea1) /* 0.260084752 */, 15 },
-  /*  888 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 15 },
-  /*  889 */  { MAD_F(0x042c82d6) /* 0.260866961 */, 15 },
-  /*  890 */  { MAD_F(0x042e1d2b) /* 0.261258286 */, 15 },
-  /*  891 */  { MAD_F(0x042fb7a8) /* 0.261649758 */, 15 },
-  /*  892 */  { MAD_F(0x0431524c) /* 0.262041376 */, 15 },
-  /*  893 */  { MAD_F(0x0432ed17) /* 0.262433140 */, 15 },
-  /*  894 */  { MAD_F(0x0434880a) /* 0.262825051 */, 15 },
-  /*  895 */  { MAD_F(0x04362324) /* 0.263217107 */, 15 },
-
-  /*  896 */  { MAD_F(0x0437be65) /* 0.263609310 */, 15 },
-  /*  897 */  { MAD_F(0x043959cd) /* 0.264001659 */, 15 },
-  /*  898 */  { MAD_F(0x043af55d) /* 0.264394153 */, 15 },
-  /*  899 */  { MAD_F(0x043c9113) /* 0.264786794 */, 15 },
-  /*  900 */  { MAD_F(0x043e2cf1) /* 0.265179580 */, 15 },
-  /*  901 */  { MAD_F(0x043fc8f6) /* 0.265572511 */, 15 },
-  /*  902 */  { MAD_F(0x04416522) /* 0.265965588 */, 15 },
-  /*  903 */  { MAD_F(0x04430174) /* 0.266358810 */, 15 },
-  /*  904 */  { MAD_F(0x04449dee) /* 0.266752177 */, 15 },
-  /*  905 */  { MAD_F(0x04463a8f) /* 0.267145689 */, 15 },
-  /*  906 */  { MAD_F(0x0447d756) /* 0.267539347 */, 15 },
-  /*  907 */  { MAD_F(0x04497445) /* 0.267933149 */, 15 },
-  /*  908 */  { MAD_F(0x044b115a) /* 0.268327096 */, 15 },
-  /*  909 */  { MAD_F(0x044cae96) /* 0.268721187 */, 15 },
-  /*  910 */  { MAD_F(0x044e4bf9) /* 0.269115423 */, 15 },
-  /*  911 */  { MAD_F(0x044fe983) /* 0.269509804 */, 15 },
-
-  /*  912 */  { MAD_F(0x04518733) /* 0.269904329 */, 15 },
-  /*  913 */  { MAD_F(0x0453250a) /* 0.270298998 */, 15 },
-  /*  914 */  { MAD_F(0x0454c308) /* 0.270693811 */, 15 },
-  /*  915 */  { MAD_F(0x0456612d) /* 0.271088768 */, 15 },
-  /*  916 */  { MAD_F(0x0457ff78) /* 0.271483869 */, 15 },
-  /*  917 */  { MAD_F(0x04599dea) /* 0.271879114 */, 15 },
-  /*  918 */  { MAD_F(0x045b3c82) /* 0.272274503 */, 15 },
-  /*  919 */  { MAD_F(0x045cdb41) /* 0.272670035 */, 15 },
-  /*  920 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 15 },
-  /*  921 */  { MAD_F(0x04601932) /* 0.273461530 */, 15 },
-  /*  922 */  { MAD_F(0x0461b864) /* 0.273857492 */, 15 },
-  /*  923 */  { MAD_F(0x046357bd) /* 0.274253597 */, 15 },
-  /*  924 */  { MAD_F(0x0464f73c) /* 0.274649846 */, 15 },
-  /*  925 */  { MAD_F(0x046696e2) /* 0.275046238 */, 15 },
-  /*  926 */  { MAD_F(0x046836ae) /* 0.275442772 */, 15 },
-  /*  927 */  { MAD_F(0x0469d6a0) /* 0.275839449 */, 15 },
-
-  /*  928 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 15 },
-  /*  929 */  { MAD_F(0x046d16f7) /* 0.276633232 */, 15 },
-  /*  930 */  { MAD_F(0x046eb75c) /* 0.277030337 */, 15 },
-  /*  931 */  { MAD_F(0x047057e8) /* 0.277427584 */, 15 },
-  /*  932 */  { MAD_F(0x0471f899) /* 0.277824973 */, 15 },
-  /*  933 */  { MAD_F(0x04739971) /* 0.278222505 */, 15 },
-  /*  934 */  { MAD_F(0x04753a6f) /* 0.278620179 */, 15 },
-  /*  935 */  { MAD_F(0x0476db92) /* 0.279017995 */, 15 },
-  /*  936 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 15 },
-  /*  937 */  { MAD_F(0x047a1e4c) /* 0.279814051 */, 15 },
-  /*  938 */  { MAD_F(0x047bbfe2) /* 0.280212292 */, 15 },
-  /*  939 */  { MAD_F(0x047d619e) /* 0.280610675 */, 15 },
-  /*  940 */  { MAD_F(0x047f0380) /* 0.281009199 */, 15 },
-  /*  941 */  { MAD_F(0x0480a588) /* 0.281407864 */, 15 },
-  /*  942 */  { MAD_F(0x048247b6) /* 0.281806670 */, 15 },
-  /*  943 */  { MAD_F(0x0483ea0a) /* 0.282205618 */, 15 },
-
-  /*  944 */  { MAD_F(0x04858c83) /* 0.282604707 */, 15 },
-  /*  945 */  { MAD_F(0x04872f22) /* 0.283003936 */, 15 },
-  /*  946 */  { MAD_F(0x0488d1e8) /* 0.283403307 */, 15 },
-  /*  947 */  { MAD_F(0x048a74d3) /* 0.283802818 */, 15 },
-  /*  948 */  { MAD_F(0x048c17e3) /* 0.284202470 */, 15 },
-  /*  949 */  { MAD_F(0x048dbb1a) /* 0.284602263 */, 15 },
-  /*  950 */  { MAD_F(0x048f5e76) /* 0.285002195 */, 15 },
-  /*  951 */  { MAD_F(0x049101f8) /* 0.285402269 */, 15 },
-  /*  952 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 15 },
-  /*  953 */  { MAD_F(0x0494496c) /* 0.286202836 */, 15 },
-  /*  954 */  { MAD_F(0x0495ed5f) /* 0.286603329 */, 15 },
-  /*  955 */  { MAD_F(0x04979177) /* 0.287003963 */, 15 },
-  /*  956 */  { MAD_F(0x049935b5) /* 0.287404737 */, 15 },
-  /*  957 */  { MAD_F(0x049ada19) /* 0.287805650 */, 15 },
-  /*  958 */  { MAD_F(0x049c7ea1) /* 0.288206703 */, 15 },
-  /*  959 */  { MAD_F(0x049e2350) /* 0.288607895 */, 15 },
-
-  /*  960 */  { MAD_F(0x049fc824) /* 0.289009227 */, 15 },
-  /*  961 */  { MAD_F(0x04a16d1d) /* 0.289410699 */, 15 },
-  /*  962 */  { MAD_F(0x04a3123b) /* 0.289812309 */, 15 },
-  /*  963 */  { MAD_F(0x04a4b77f) /* 0.290214059 */, 15 },
-  /*  964 */  { MAD_F(0x04a65ce8) /* 0.290615948 */, 15 },
-  /*  965 */  { MAD_F(0x04a80277) /* 0.291017976 */, 15 },
-  /*  966 */  { MAD_F(0x04a9a82b) /* 0.291420143 */, 15 },
-  /*  967 */  { MAD_F(0x04ab4e04) /* 0.291822449 */, 15 },
-  /*  968 */  { MAD_F(0x04acf402) /* 0.292224893 */, 15 },
-  /*  969 */  { MAD_F(0x04ae9a26) /* 0.292627476 */, 15 },
-  /*  970 */  { MAD_F(0x04b0406e) /* 0.293030197 */, 15 },
-  /*  971 */  { MAD_F(0x04b1e6dc) /* 0.293433057 */, 15 },
-  /*  972 */  { MAD_F(0x04b38d6f) /* 0.293836055 */, 15 },
-  /*  973 */  { MAD_F(0x04b53427) /* 0.294239192 */, 15 },
-  /*  974 */  { MAD_F(0x04b6db05) /* 0.294642466 */, 15 },
-  /*  975 */  { MAD_F(0x04b88207) /* 0.295045879 */, 15 },
-
-  /*  976 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 15 },
-  /*  977 */  { MAD_F(0x04bbd07a) /* 0.295853118 */, 15 },
-  /*  978 */  { MAD_F(0x04bd77ec) /* 0.296256944 */, 15 },
-  /*  979 */  { MAD_F(0x04bf1f82) /* 0.296660907 */, 15 },
-  /*  980 */  { MAD_F(0x04c0c73d) /* 0.297065009 */, 15 },
-  /*  981 */  { MAD_F(0x04c26f1d) /* 0.297469248 */, 15 },
-  /*  982 */  { MAD_F(0x04c41722) /* 0.297873624 */, 15 },
-  /*  983 */  { MAD_F(0x04c5bf4c) /* 0.298278137 */, 15 },
-  /*  984 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 15 },
-  /*  985 */  { MAD_F(0x04c9100d) /* 0.299087576 */, 15 },
-  /*  986 */  { MAD_F(0x04cab8a6) /* 0.299492500 */, 15 },
-  /*  987 */  { MAD_F(0x04cc6163) /* 0.299897562 */, 15 },
-  /*  988 */  { MAD_F(0x04ce0a44) /* 0.300302761 */, 15 },
-  /*  989 */  { MAD_F(0x04cfb34b) /* 0.300708096 */, 15 },
-  /*  990 */  { MAD_F(0x04d15c76) /* 0.301113568 */, 15 },
-  /*  991 */  { MAD_F(0x04d305c5) /* 0.301519176 */, 15 },
-
-  /*  992 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 15 },
-  /*  993 */  { MAD_F(0x04d658d2) /* 0.302330802 */, 15 },
-  /*  994 */  { MAD_F(0x04d80290) /* 0.302736820 */, 15 },
-  /*  995 */  { MAD_F(0x04d9ac72) /* 0.303142973 */, 15 },
-  /*  996 */  { MAD_F(0x04db5679) /* 0.303549263 */, 15 },
-  /*  997 */  { MAD_F(0x04dd00a4) /* 0.303955689 */, 15 },
-  /*  998 */  { MAD_F(0x04deaaf3) /* 0.304362251 */, 15 },
-  /*  999 */  { MAD_F(0x04e05567) /* 0.304768948 */, 15 },
-  /* 1000 */  { MAD_F(0x04e20000) /* 0.305175781 */, 15 },
-  /* 1001 */  { MAD_F(0x04e3aabd) /* 0.305582750 */, 15 },
-  /* 1002 */  { MAD_F(0x04e5559e) /* 0.305989854 */, 15 },
-  /* 1003 */  { MAD_F(0x04e700a3) /* 0.306397094 */, 15 },
-  /* 1004 */  { MAD_F(0x04e8abcd) /* 0.306804470 */, 15 },
-  /* 1005 */  { MAD_F(0x04ea571c) /* 0.307211980 */, 15 },
-  /* 1006 */  { MAD_F(0x04ec028e) /* 0.307619626 */, 15 },
-  /* 1007 */  { MAD_F(0x04edae25) /* 0.308027406 */, 15 },
-
-  /* 1008 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 15 },
-  /* 1009 */  { MAD_F(0x04f105bf) /* 0.308843373 */, 15 },
-  /* 1010 */  { MAD_F(0x04f2b1c3) /* 0.309251558 */, 15 },
-  /* 1011 */  { MAD_F(0x04f45dea) /* 0.309659879 */, 15 },
-  /* 1012 */  { MAD_F(0x04f60a36) /* 0.310068333 */, 15 },
-  /* 1013 */  { MAD_F(0x04f7b6a6) /* 0.310476923 */, 15 },
-  /* 1014 */  { MAD_F(0x04f9633a) /* 0.310885647 */, 15 },
-  /* 1015 */  { MAD_F(0x04fb0ff2) /* 0.311294505 */, 15 },
-  /* 1016 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 15 },
-  /* 1017 */  { MAD_F(0x04fe69ce) /* 0.312112625 */, 15 },
-  /* 1018 */  { MAD_F(0x050016f3) /* 0.312521885 */, 15 },
-  /* 1019 */  { MAD_F(0x0501c43b) /* 0.312931280 */, 15 },
-  /* 1020 */  { MAD_F(0x050371a7) /* 0.313340809 */, 15 },
-  /* 1021 */  { MAD_F(0x05051f37) /* 0.313750472 */, 15 },
-  /* 1022 */  { MAD_F(0x0506cceb) /* 0.314160269 */, 15 },
-  /* 1023 */  { MAD_F(0x05087ac2) /* 0.314570199 */, 15 },
-
-  /* 1024 */  { MAD_F(0x050a28be) /* 0.314980262 */, 15 },
-  /* 1025 */  { MAD_F(0x050bd6de) /* 0.315390460 */, 15 },
-  /* 1026 */  { MAD_F(0x050d8521) /* 0.315800790 */, 15 },
-  /* 1027 */  { MAD_F(0x050f3388) /* 0.316211255 */, 15 },
-  /* 1028 */  { MAD_F(0x0510e213) /* 0.316621852 */, 15 },
-  /* 1029 */  { MAD_F(0x051290c2) /* 0.317032582 */, 15 },
-  /* 1030 */  { MAD_F(0x05143f94) /* 0.317443446 */, 15 },
-  /* 1031 */  { MAD_F(0x0515ee8a) /* 0.317854442 */, 15 },
-  /* 1032 */  { MAD_F(0x05179da4) /* 0.318265572 */, 15 },
-  /* 1033 */  { MAD_F(0x05194ce1) /* 0.318676834 */, 15 },
-  /* 1034 */  { MAD_F(0x051afc42) /* 0.319088229 */, 15 },
-  /* 1035 */  { MAD_F(0x051cabc7) /* 0.319499756 */, 15 },
-  /* 1036 */  { MAD_F(0x051e5b6f) /* 0.319911417 */, 15 },
-  /* 1037 */  { MAD_F(0x05200b3a) /* 0.320323209 */, 15 },
-  /* 1038 */  { MAD_F(0x0521bb2a) /* 0.320735134 */, 15 },
-  /* 1039 */  { MAD_F(0x05236b3d) /* 0.321147192 */, 15 },
-
-  /* 1040 */  { MAD_F(0x05251b73) /* 0.321559381 */, 15 },
-  /* 1041 */  { MAD_F(0x0526cbcd) /* 0.321971703 */, 15 },
-  /* 1042 */  { MAD_F(0x05287c4a) /* 0.322384156 */, 15 },
-  /* 1043 */  { MAD_F(0x052a2cea) /* 0.322796742 */, 15 },
-  /* 1044 */  { MAD_F(0x052bddae) /* 0.323209460 */, 15 },
-  /* 1045 */  { MAD_F(0x052d8e96) /* 0.323622309 */, 15 },
-  /* 1046 */  { MAD_F(0x052f3fa1) /* 0.324035290 */, 15 },
-  /* 1047 */  { MAD_F(0x0530f0cf) /* 0.324448403 */, 15 },
-  /* 1048 */  { MAD_F(0x0532a220) /* 0.324861647 */, 15 },
-  /* 1049 */  { MAD_F(0x05345395) /* 0.325275023 */, 15 },
-  /* 1050 */  { MAD_F(0x0536052d) /* 0.325688530 */, 15 },
-  /* 1051 */  { MAD_F(0x0537b6e8) /* 0.326102168 */, 15 },
-  /* 1052 */  { MAD_F(0x053968c6) /* 0.326515938 */, 15 },
-  /* 1053 */  { MAD_F(0x053b1ac8) /* 0.326929839 */, 15 },
-  /* 1054 */  { MAD_F(0x053ccced) /* 0.327343870 */, 15 },
-  /* 1055 */  { MAD_F(0x053e7f35) /* 0.327758033 */, 15 },
-
-  /* 1056 */  { MAD_F(0x054031a0) /* 0.328172327 */, 15 },
-  /* 1057 */  { MAD_F(0x0541e42e) /* 0.328586751 */, 15 },
-  /* 1058 */  { MAD_F(0x054396df) /* 0.329001306 */, 15 },
-  /* 1059 */  { MAD_F(0x054549b4) /* 0.329415992 */, 15 },
-  /* 1060 */  { MAD_F(0x0546fcab) /* 0.329830808 */, 15 },
-  /* 1061 */  { MAD_F(0x0548afc6) /* 0.330245755 */, 15 },
-  /* 1062 */  { MAD_F(0x054a6303) /* 0.330660832 */, 15 },
-  /* 1063 */  { MAD_F(0x054c1663) /* 0.331076039 */, 15 },
-  /* 1064 */  { MAD_F(0x054dc9e7) /* 0.331491377 */, 15 },
-  /* 1065 */  { MAD_F(0x054f7d8d) /* 0.331906845 */, 15 },
-  /* 1066 */  { MAD_F(0x05513156) /* 0.332322443 */, 15 },
-  /* 1067 */  { MAD_F(0x0552e542) /* 0.332738170 */, 15 },
-  /* 1068 */  { MAD_F(0x05549951) /* 0.333154028 */, 15 },
-  /* 1069 */  { MAD_F(0x05564d83) /* 0.333570016 */, 15 },
-  /* 1070 */  { MAD_F(0x055801d8) /* 0.333986133 */, 15 },
-  /* 1071 */  { MAD_F(0x0559b64f) /* 0.334402380 */, 15 },
-
-  /* 1072 */  { MAD_F(0x055b6ae9) /* 0.334818756 */, 15 },
-  /* 1073 */  { MAD_F(0x055d1fa6) /* 0.335235262 */, 15 },
-  /* 1074 */  { MAD_F(0x055ed486) /* 0.335651898 */, 15 },
-  /* 1075 */  { MAD_F(0x05608988) /* 0.336068662 */, 15 },
-  /* 1076 */  { MAD_F(0x05623ead) /* 0.336485556 */, 15 },
-  /* 1077 */  { MAD_F(0x0563f3f5) /* 0.336902579 */, 15 },
-  /* 1078 */  { MAD_F(0x0565a960) /* 0.337319732 */, 15 },
-  /* 1079 */  { MAD_F(0x05675eed) /* 0.337737013 */, 15 },
-  /* 1080 */  { MAD_F(0x0569149c) /* 0.338154423 */, 15 },
-  /* 1081 */  { MAD_F(0x056aca6f) /* 0.338571962 */, 15 },
-  /* 1082 */  { MAD_F(0x056c8064) /* 0.338989630 */, 15 },
-  /* 1083 */  { MAD_F(0x056e367b) /* 0.339407426 */, 15 },
-  /* 1084 */  { MAD_F(0x056fecb5) /* 0.339825351 */, 15 },
-  /* 1085 */  { MAD_F(0x0571a311) /* 0.340243405 */, 15 },
-  /* 1086 */  { MAD_F(0x05735990) /* 0.340661587 */, 15 },
-  /* 1087 */  { MAD_F(0x05751032) /* 0.341079898 */, 15 },
-
-  /* 1088 */  { MAD_F(0x0576c6f5) /* 0.341498336 */, 15 },
-  /* 1089 */  { MAD_F(0x05787ddc) /* 0.341916903 */, 15 },
-  /* 1090 */  { MAD_F(0x057a34e4) /* 0.342335598 */, 15 },
-  /* 1091 */  { MAD_F(0x057bec0f) /* 0.342754421 */, 15 },
-  /* 1092 */  { MAD_F(0x057da35d) /* 0.343173373 */, 15 },
-  /* 1093 */  { MAD_F(0x057f5acc) /* 0.343592452 */, 15 },
-  /* 1094 */  { MAD_F(0x0581125e) /* 0.344011659 */, 15 },
-  /* 1095 */  { MAD_F(0x0582ca12) /* 0.344430993 */, 15 },
-  /* 1096 */  { MAD_F(0x058481e9) /* 0.344850455 */, 15 },
-  /* 1097 */  { MAD_F(0x058639e2) /* 0.345270045 */, 15 },
-  /* 1098 */  { MAD_F(0x0587f1fd) /* 0.345689763 */, 15 },
-  /* 1099 */  { MAD_F(0x0589aa3a) /* 0.346109608 */, 15 },
-  /* 1100 */  { MAD_F(0x058b629a) /* 0.346529580 */, 15 },
-  /* 1101 */  { MAD_F(0x058d1b1b) /* 0.346949679 */, 15 },
-  /* 1102 */  { MAD_F(0x058ed3bf) /* 0.347369906 */, 15 },
-  /* 1103 */  { MAD_F(0x05908c85) /* 0.347790260 */, 15 },
-
-  /* 1104 */  { MAD_F(0x0592456d) /* 0.348210741 */, 15 },
-  /* 1105 */  { MAD_F(0x0593fe77) /* 0.348631348 */, 15 },
-  /* 1106 */  { MAD_F(0x0595b7a3) /* 0.349052083 */, 15 },
-  /* 1107 */  { MAD_F(0x059770f1) /* 0.349472945 */, 15 },
-  /* 1108 */  { MAD_F(0x05992a61) /* 0.349893933 */, 15 },
-  /* 1109 */  { MAD_F(0x059ae3f3) /* 0.350315048 */, 15 },
-  /* 1110 */  { MAD_F(0x059c9da8) /* 0.350736290 */, 15 },
-  /* 1111 */  { MAD_F(0x059e577e) /* 0.351157658 */, 15 },
-  /* 1112 */  { MAD_F(0x05a01176) /* 0.351579152 */, 15 },
-  /* 1113 */  { MAD_F(0x05a1cb90) /* 0.352000773 */, 15 },
-  /* 1114 */  { MAD_F(0x05a385cc) /* 0.352422520 */, 15 },
-  /* 1115 */  { MAD_F(0x05a5402a) /* 0.352844394 */, 15 },
-  /* 1116 */  { MAD_F(0x05a6faa9) /* 0.353266393 */, 15 },
-  /* 1117 */  { MAD_F(0x05a8b54b) /* 0.353688519 */, 15 },
-  /* 1118 */  { MAD_F(0x05aa700e) /* 0.354110771 */, 15 },
-  /* 1119 */  { MAD_F(0x05ac2af3) /* 0.354533148 */, 15 },
-
-  /* 1120 */  { MAD_F(0x05ade5fa) /* 0.354955651 */, 15 },
-  /* 1121 */  { MAD_F(0x05afa123) /* 0.355378281 */, 15 },
-  /* 1122 */  { MAD_F(0x05b15c6d) /* 0.355801035 */, 15 },
-  /* 1123 */  { MAD_F(0x05b317d9) /* 0.356223916 */, 15 },
-  /* 1124 */  { MAD_F(0x05b4d367) /* 0.356646922 */, 15 },
-  /* 1125 */  { MAD_F(0x05b68f16) /* 0.357070053 */, 15 },
-  /* 1126 */  { MAD_F(0x05b84ae7) /* 0.357493310 */, 15 },
-  /* 1127 */  { MAD_F(0x05ba06da) /* 0.357916692 */, 15 },
-  /* 1128 */  { MAD_F(0x05bbc2ef) /* 0.358340200 */, 15 },
-  /* 1129 */  { MAD_F(0x05bd7f25) /* 0.358763832 */, 15 },
-  /* 1130 */  { MAD_F(0x05bf3b7c) /* 0.359187590 */, 15 },
-  /* 1131 */  { MAD_F(0x05c0f7f5) /* 0.359611472 */, 15 },
-  /* 1132 */  { MAD_F(0x05c2b490) /* 0.360035480 */, 15 },
-  /* 1133 */  { MAD_F(0x05c4714c) /* 0.360459613 */, 15 },
-  /* 1134 */  { MAD_F(0x05c62e2a) /* 0.360883870 */, 15 },
-  /* 1135 */  { MAD_F(0x05c7eb29) /* 0.361308252 */, 15 },
-
-  /* 1136 */  { MAD_F(0x05c9a84a) /* 0.361732758 */, 15 },
-  /* 1137 */  { MAD_F(0x05cb658c) /* 0.362157390 */, 15 },
-  /* 1138 */  { MAD_F(0x05cd22ef) /* 0.362582145 */, 15 },
-  /* 1139 */  { MAD_F(0x05cee074) /* 0.363007026 */, 15 },
-  /* 1140 */  { MAD_F(0x05d09e1b) /* 0.363432030 */, 15 },
-  /* 1141 */  { MAD_F(0x05d25be2) /* 0.363857159 */, 15 },
-  /* 1142 */  { MAD_F(0x05d419cb) /* 0.364282412 */, 15 },
-  /* 1143 */  { MAD_F(0x05d5d7d5) /* 0.364707789 */, 15 },
-  /* 1144 */  { MAD_F(0x05d79601) /* 0.365133291 */, 15 },
-  /* 1145 */  { MAD_F(0x05d9544e) /* 0.365558916 */, 15 },
-  /* 1146 */  { MAD_F(0x05db12bc) /* 0.365984665 */, 15 },
-  /* 1147 */  { MAD_F(0x05dcd14c) /* 0.366410538 */, 15 },
-  /* 1148 */  { MAD_F(0x05de8ffc) /* 0.366836535 */, 15 },
-  /* 1149 */  { MAD_F(0x05e04ece) /* 0.367262655 */, 15 },
-  /* 1150 */  { MAD_F(0x05e20dc1) /* 0.367688900 */, 15 },
-  /* 1151 */  { MAD_F(0x05e3ccd5) /* 0.368115267 */, 15 },
-
-  /* 1152 */  { MAD_F(0x05e58c0b) /* 0.368541759 */, 15 },
-  /* 1153 */  { MAD_F(0x05e74b61) /* 0.368968373 */, 15 },
-  /* 1154 */  { MAD_F(0x05e90ad9) /* 0.369395111 */, 15 },
-  /* 1155 */  { MAD_F(0x05eaca72) /* 0.369821973 */, 15 },
-  /* 1156 */  { MAD_F(0x05ec8a2b) /* 0.370248957 */, 15 },
-  /* 1157 */  { MAD_F(0x05ee4a06) /* 0.370676065 */, 15 },
-  /* 1158 */  { MAD_F(0x05f00a02) /* 0.371103295 */, 15 },
-  /* 1159 */  { MAD_F(0x05f1ca1f) /* 0.371530649 */, 15 },
-  /* 1160 */  { MAD_F(0x05f38a5d) /* 0.371958126 */, 15 },
-  /* 1161 */  { MAD_F(0x05f54abc) /* 0.372385725 */, 15 },
-  /* 1162 */  { MAD_F(0x05f70b3c) /* 0.372813448 */, 15 },
-  /* 1163 */  { MAD_F(0x05f8cbdc) /* 0.373241292 */, 15 },
-  /* 1164 */  { MAD_F(0x05fa8c9e) /* 0.373669260 */, 15 },
-  /* 1165 */  { MAD_F(0x05fc4d81) /* 0.374097350 */, 15 },
-  /* 1166 */  { MAD_F(0x05fe0e84) /* 0.374525563 */, 15 },
-  /* 1167 */  { MAD_F(0x05ffcfa8) /* 0.374953898 */, 15 },
-
-  /* 1168 */  { MAD_F(0x060190ee) /* 0.375382356 */, 15 },
-  /* 1169 */  { MAD_F(0x06035254) /* 0.375810936 */, 15 },
-  /* 1170 */  { MAD_F(0x060513da) /* 0.376239638 */, 15 },
-  /* 1171 */  { MAD_F(0x0606d582) /* 0.376668462 */, 15 },
-  /* 1172 */  { MAD_F(0x0608974a) /* 0.377097408 */, 15 },
-  /* 1173 */  { MAD_F(0x060a5934) /* 0.377526476 */, 15 },
-  /* 1174 */  { MAD_F(0x060c1b3d) /* 0.377955667 */, 15 },
-  /* 1175 */  { MAD_F(0x060ddd68) /* 0.378384979 */, 15 },
-  /* 1176 */  { MAD_F(0x060f9fb3) /* 0.378814413 */, 15 },
-  /* 1177 */  { MAD_F(0x0611621f) /* 0.379243968 */, 15 },
-  /* 1178 */  { MAD_F(0x061324ac) /* 0.379673646 */, 15 },
-  /* 1179 */  { MAD_F(0x0614e759) /* 0.380103444 */, 15 },
-  /* 1180 */  { MAD_F(0x0616aa27) /* 0.380533365 */, 15 },
-  /* 1181 */  { MAD_F(0x06186d16) /* 0.380963407 */, 15 },
-  /* 1182 */  { MAD_F(0x061a3025) /* 0.381393570 */, 15 },
-  /* 1183 */  { MAD_F(0x061bf354) /* 0.381823855 */, 15 },
-
-  /* 1184 */  { MAD_F(0x061db6a5) /* 0.382254261 */, 15 },
-  /* 1185 */  { MAD_F(0x061f7a15) /* 0.382684788 */, 15 },
-  /* 1186 */  { MAD_F(0x06213da7) /* 0.383115436 */, 15 },
-  /* 1187 */  { MAD_F(0x06230158) /* 0.383546205 */, 15 },
-  /* 1188 */  { MAD_F(0x0624c52a) /* 0.383977096 */, 15 },
-  /* 1189 */  { MAD_F(0x0626891d) /* 0.384408107 */, 15 },
-  /* 1190 */  { MAD_F(0x06284d30) /* 0.384839239 */, 15 },
-  /* 1191 */  { MAD_F(0x062a1164) /* 0.385270492 */, 15 },
-  /* 1192 */  { MAD_F(0x062bd5b8) /* 0.385701865 */, 15 },
-  /* 1193 */  { MAD_F(0x062d9a2c) /* 0.386133359 */, 15 },
-  /* 1194 */  { MAD_F(0x062f5ec1) /* 0.386564974 */, 15 },
-  /* 1195 */  { MAD_F(0x06312376) /* 0.386996709 */, 15 },
-  /* 1196 */  { MAD_F(0x0632e84b) /* 0.387428565 */, 15 },
-  /* 1197 */  { MAD_F(0x0634ad41) /* 0.387860541 */, 15 },
-  /* 1198 */  { MAD_F(0x06367257) /* 0.388292637 */, 15 },
-  /* 1199 */  { MAD_F(0x0638378d) /* 0.388724854 */, 15 },
-
-  /* 1200 */  { MAD_F(0x0639fce4) /* 0.389157191 */, 15 },
-  /* 1201 */  { MAD_F(0x063bc25b) /* 0.389589648 */, 15 },
-  /* 1202 */  { MAD_F(0x063d87f2) /* 0.390022225 */, 15 },
-  /* 1203 */  { MAD_F(0x063f4da9) /* 0.390454922 */, 15 },
-  /* 1204 */  { MAD_F(0x06411380) /* 0.390887739 */, 15 },
-  /* 1205 */  { MAD_F(0x0642d978) /* 0.391320675 */, 15 },
-  /* 1206 */  { MAD_F(0x06449f8f) /* 0.391753732 */, 15 },
-  /* 1207 */  { MAD_F(0x064665c7) /* 0.392186908 */, 15 },
-  /* 1208 */  { MAD_F(0x06482c1f) /* 0.392620204 */, 15 },
-  /* 1209 */  { MAD_F(0x0649f297) /* 0.393053619 */, 15 },
-  /* 1210 */  { MAD_F(0x064bb92f) /* 0.393487154 */, 15 },
-  /* 1211 */  { MAD_F(0x064d7fe8) /* 0.393920808 */, 15 },
-  /* 1212 */  { MAD_F(0x064f46c0) /* 0.394354582 */, 15 },
-  /* 1213 */  { MAD_F(0x06510db8) /* 0.394788475 */, 15 },
-  /* 1214 */  { MAD_F(0x0652d4d0) /* 0.395222488 */, 15 },
-  /* 1215 */  { MAD_F(0x06549c09) /* 0.395656619 */, 15 },
-
-  /* 1216 */  { MAD_F(0x06566361) /* 0.396090870 */, 15 },
-  /* 1217 */  { MAD_F(0x06582ad9) /* 0.396525239 */, 15 },
-  /* 1218 */  { MAD_F(0x0659f271) /* 0.396959728 */, 15 },
-  /* 1219 */  { MAD_F(0x065bba29) /* 0.397394336 */, 15 },
-  /* 1220 */  { MAD_F(0x065d8201) /* 0.397829062 */, 15 },
-  /* 1221 */  { MAD_F(0x065f49f9) /* 0.398263907 */, 15 },
-  /* 1222 */  { MAD_F(0x06611211) /* 0.398698871 */, 15 },
-  /* 1223 */  { MAD_F(0x0662da49) /* 0.399133954 */, 15 },
-  /* 1224 */  { MAD_F(0x0664a2a0) /* 0.399569155 */, 15 },
-  /* 1225 */  { MAD_F(0x06666b17) /* 0.400004475 */, 15 },
-  /* 1226 */  { MAD_F(0x066833ae) /* 0.400439913 */, 15 },
-  /* 1227 */  { MAD_F(0x0669fc65) /* 0.400875470 */, 15 },
-  /* 1228 */  { MAD_F(0x066bc53c) /* 0.401311145 */, 15 },
-  /* 1229 */  { MAD_F(0x066d8e32) /* 0.401746938 */, 15 },
-  /* 1230 */  { MAD_F(0x066f5748) /* 0.402182850 */, 15 },
-  /* 1231 */  { MAD_F(0x0671207e) /* 0.402618879 */, 15 },
-
-  /* 1232 */  { MAD_F(0x0672e9d4) /* 0.403055027 */, 15 },
-  /* 1233 */  { MAD_F(0x0674b349) /* 0.403491293 */, 15 },
-  /* 1234 */  { MAD_F(0x06767cde) /* 0.403927676 */, 15 },
-  /* 1235 */  { MAD_F(0x06784692) /* 0.404364178 */, 15 },
-  /* 1236 */  { MAD_F(0x067a1066) /* 0.404800797 */, 15 },
-  /* 1237 */  { MAD_F(0x067bda5a) /* 0.405237535 */, 15 },
-  /* 1238 */  { MAD_F(0x067da46d) /* 0.405674390 */, 15 },
-  /* 1239 */  { MAD_F(0x067f6ea0) /* 0.406111362 */, 15 },
-  /* 1240 */  { MAD_F(0x068138f3) /* 0.406548452 */, 15 },
-  /* 1241 */  { MAD_F(0x06830365) /* 0.406985660 */, 15 },
-  /* 1242 */  { MAD_F(0x0684cdf6) /* 0.407422985 */, 15 },
-  /* 1243 */  { MAD_F(0x068698a8) /* 0.407860427 */, 15 },
-  /* 1244 */  { MAD_F(0x06886378) /* 0.408297987 */, 15 },
-  /* 1245 */  { MAD_F(0x068a2e68) /* 0.408735664 */, 15 },
-  /* 1246 */  { MAD_F(0x068bf978) /* 0.409173458 */, 15 },
-  /* 1247 */  { MAD_F(0x068dc4a7) /* 0.409611370 */, 15 },
-
-  /* 1248 */  { MAD_F(0x068f8ff5) /* 0.410049398 */, 15 },
-  /* 1249 */  { MAD_F(0x06915b63) /* 0.410487544 */, 15 },
-  /* 1250 */  { MAD_F(0x069326f0) /* 0.410925806 */, 15 },
-  /* 1251 */  { MAD_F(0x0694f29c) /* 0.411364185 */, 15 },
-  /* 1252 */  { MAD_F(0x0696be68) /* 0.411802681 */, 15 },
-  /* 1253 */  { MAD_F(0x06988a54) /* 0.412241294 */, 15 },
-  /* 1254 */  { MAD_F(0x069a565e) /* 0.412680024 */, 15 },
-  /* 1255 */  { MAD_F(0x069c2288) /* 0.413118870 */, 15 },
-  /* 1256 */  { MAD_F(0x069deed1) /* 0.413557833 */, 15 },
-  /* 1257 */  { MAD_F(0x069fbb3a) /* 0.413996912 */, 15 },
-  /* 1258 */  { MAD_F(0x06a187c1) /* 0.414436108 */, 15 },
-  /* 1259 */  { MAD_F(0x06a35468) /* 0.414875420 */, 15 },
-  /* 1260 */  { MAD_F(0x06a5212f) /* 0.415314849 */, 15 },
-  /* 1261 */  { MAD_F(0x06a6ee14) /* 0.415754393 */, 15 },
-  /* 1262 */  { MAD_F(0x06a8bb18) /* 0.416194054 */, 15 },
-  /* 1263 */  { MAD_F(0x06aa883c) /* 0.416633831 */, 15 },
-
-  /* 1264 */  { MAD_F(0x06ac557f) /* 0.417073724 */, 15 },
-  /* 1265 */  { MAD_F(0x06ae22e1) /* 0.417513734 */, 15 },
-  /* 1266 */  { MAD_F(0x06aff062) /* 0.417953859 */, 15 },
-  /* 1267 */  { MAD_F(0x06b1be03) /* 0.418394100 */, 15 },
-  /* 1268 */  { MAD_F(0x06b38bc2) /* 0.418834457 */, 15 },
-  /* 1269 */  { MAD_F(0x06b559a1) /* 0.419274929 */, 15 },
-  /* 1270 */  { MAD_F(0x06b7279e) /* 0.419715518 */, 15 },
-  /* 1271 */  { MAD_F(0x06b8f5bb) /* 0.420156222 */, 15 },
-  /* 1272 */  { MAD_F(0x06bac3f6) /* 0.420597041 */, 15 },
-  /* 1273 */  { MAD_F(0x06bc9251) /* 0.421037977 */, 15 },
-  /* 1274 */  { MAD_F(0x06be60cb) /* 0.421479027 */, 15 },
-  /* 1275 */  { MAD_F(0x06c02f63) /* 0.421920193 */, 15 },
-  /* 1276 */  { MAD_F(0x06c1fe1b) /* 0.422361475 */, 15 },
-  /* 1277 */  { MAD_F(0x06c3ccf1) /* 0.422802871 */, 15 },
-  /* 1278 */  { MAD_F(0x06c59be7) /* 0.423244383 */, 15 },
-  /* 1279 */  { MAD_F(0x06c76afb) /* 0.423686010 */, 15 },
-
-  /* 1280 */  { MAD_F(0x06c93a2e) /* 0.424127753 */, 15 },
-  /* 1281 */  { MAD_F(0x06cb0981) /* 0.424569610 */, 15 },
-  /* 1282 */  { MAD_F(0x06ccd8f2) /* 0.425011582 */, 15 },
-  /* 1283 */  { MAD_F(0x06cea881) /* 0.425453669 */, 15 },
-  /* 1284 */  { MAD_F(0x06d07830) /* 0.425895871 */, 15 },
-  /* 1285 */  { MAD_F(0x06d247fe) /* 0.426338188 */, 15 },
-  /* 1286 */  { MAD_F(0x06d417ea) /* 0.426780620 */, 15 },
-  /* 1287 */  { MAD_F(0x06d5e7f5) /* 0.427223166 */, 15 },
-  /* 1288 */  { MAD_F(0x06d7b81f) /* 0.427665827 */, 15 },
-  /* 1289 */  { MAD_F(0x06d98868) /* 0.428108603 */, 15 },
-  /* 1290 */  { MAD_F(0x06db58cf) /* 0.428551493 */, 15 },
-  /* 1291 */  { MAD_F(0x06dd2955) /* 0.428994497 */, 15 },
-  /* 1292 */  { MAD_F(0x06def9fa) /* 0.429437616 */, 15 },
-  /* 1293 */  { MAD_F(0x06e0cabe) /* 0.429880849 */, 15 },
-  /* 1294 */  { MAD_F(0x06e29ba0) /* 0.430324197 */, 15 },
-  /* 1295 */  { MAD_F(0x06e46ca1) /* 0.430767659 */, 15 },
-
-  /* 1296 */  { MAD_F(0x06e63dc0) /* 0.431211234 */, 15 },
-  /* 1297 */  { MAD_F(0x06e80efe) /* 0.431654924 */, 15 },
-  /* 1298 */  { MAD_F(0x06e9e05b) /* 0.432098728 */, 15 },
-  /* 1299 */  { MAD_F(0x06ebb1d6) /* 0.432542647 */, 15 },
-  /* 1300 */  { MAD_F(0x06ed8370) /* 0.432986678 */, 15 },
-  /* 1301 */  { MAD_F(0x06ef5529) /* 0.433430824 */, 15 },
-  /* 1302 */  { MAD_F(0x06f12700) /* 0.433875084 */, 15 },
-  /* 1303 */  { MAD_F(0x06f2f8f5) /* 0.434319457 */, 15 },
-  /* 1304 */  { MAD_F(0x06f4cb09) /* 0.434763944 */, 15 },
-  /* 1305 */  { MAD_F(0x06f69d3c) /* 0.435208545 */, 15 },
-  /* 1306 */  { MAD_F(0x06f86f8d) /* 0.435653259 */, 15 },
-  /* 1307 */  { MAD_F(0x06fa41fd) /* 0.436098087 */, 15 },
-  /* 1308 */  { MAD_F(0x06fc148b) /* 0.436543029 */, 15 },
-  /* 1309 */  { MAD_F(0x06fde737) /* 0.436988083 */, 15 },
-  /* 1310 */  { MAD_F(0x06ffba02) /* 0.437433251 */, 15 },
-  /* 1311 */  { MAD_F(0x07018ceb) /* 0.437878533 */, 15 },
-
-  /* 1312 */  { MAD_F(0x07035ff3) /* 0.438323927 */, 15 },
-  /* 1313 */  { MAD_F(0x07053319) /* 0.438769435 */, 15 },
-  /* 1314 */  { MAD_F(0x0707065d) /* 0.439215056 */, 15 },
-  /* 1315 */  { MAD_F(0x0708d9c0) /* 0.439660790 */, 15 },
-  /* 1316 */  { MAD_F(0x070aad41) /* 0.440106636 */, 15 },
-  /* 1317 */  { MAD_F(0x070c80e1) /* 0.440552596 */, 15 },
-  /* 1318 */  { MAD_F(0x070e549f) /* 0.440998669 */, 15 },
-  /* 1319 */  { MAD_F(0x0710287b) /* 0.441444855 */, 15 },
-  /* 1320 */  { MAD_F(0x0711fc75) /* 0.441891153 */, 15 },
-  /* 1321 */  { MAD_F(0x0713d08d) /* 0.442337564 */, 15 },
-  /* 1322 */  { MAD_F(0x0715a4c4) /* 0.442784088 */, 15 },
-  /* 1323 */  { MAD_F(0x07177919) /* 0.443230724 */, 15 },
-  /* 1324 */  { MAD_F(0x07194d8c) /* 0.443677473 */, 15 },
-  /* 1325 */  { MAD_F(0x071b221e) /* 0.444124334 */, 15 },
-  /* 1326 */  { MAD_F(0x071cf6ce) /* 0.444571308 */, 15 },
-  /* 1327 */  { MAD_F(0x071ecb9b) /* 0.445018394 */, 15 },
-
-  /* 1328 */  { MAD_F(0x0720a087) /* 0.445465593 */, 15 },
-  /* 1329 */  { MAD_F(0x07227591) /* 0.445912903 */, 15 },
-  /* 1330 */  { MAD_F(0x07244ab9) /* 0.446360326 */, 15 },
-  /* 1331 */  { MAD_F(0x07262000) /* 0.446807861 */, 15 },
-  /* 1332 */  { MAD_F(0x0727f564) /* 0.447255509 */, 15 },
-  /* 1333 */  { MAD_F(0x0729cae7) /* 0.447703268 */, 15 },
-  /* 1334 */  { MAD_F(0x072ba087) /* 0.448151139 */, 15 },
-  /* 1335 */  { MAD_F(0x072d7646) /* 0.448599122 */, 15 },
-  /* 1336 */  { MAD_F(0x072f4c22) /* 0.449047217 */, 15 },
-  /* 1337 */  { MAD_F(0x0731221d) /* 0.449495424 */, 15 },
-  /* 1338 */  { MAD_F(0x0732f835) /* 0.449943742 */, 15 },
-  /* 1339 */  { MAD_F(0x0734ce6c) /* 0.450392173 */, 15 },
-  /* 1340 */  { MAD_F(0x0736a4c1) /* 0.450840715 */, 15 },
-  /* 1341 */  { MAD_F(0x07387b33) /* 0.451289368 */, 15 },
-  /* 1342 */  { MAD_F(0x073a51c4) /* 0.451738133 */, 15 },
-  /* 1343 */  { MAD_F(0x073c2872) /* 0.452187010 */, 15 },
-
-  /* 1344 */  { MAD_F(0x073dff3e) /* 0.452635998 */, 15 },
-  /* 1345 */  { MAD_F(0x073fd628) /* 0.453085097 */, 15 },
-  /* 1346 */  { MAD_F(0x0741ad30) /* 0.453534308 */, 15 },
-  /* 1347 */  { MAD_F(0x07438456) /* 0.453983630 */, 15 },
-  /* 1348 */  { MAD_F(0x07455b9a) /* 0.454433063 */, 15 },
-  /* 1349 */  { MAD_F(0x074732fc) /* 0.454882607 */, 15 },
-  /* 1350 */  { MAD_F(0x07490a7b) /* 0.455332262 */, 15 },
-  /* 1351 */  { MAD_F(0x074ae218) /* 0.455782029 */, 15 },
-  /* 1352 */  { MAD_F(0x074cb9d3) /* 0.456231906 */, 15 },
-  /* 1353 */  { MAD_F(0x074e91ac) /* 0.456681894 */, 15 },
-  /* 1354 */  { MAD_F(0x075069a3) /* 0.457131993 */, 15 },
-  /* 1355 */  { MAD_F(0x075241b7) /* 0.457582203 */, 15 },
-  /* 1356 */  { MAD_F(0x075419e9) /* 0.458032524 */, 15 },
-  /* 1357 */  { MAD_F(0x0755f239) /* 0.458482956 */, 15 },
-  /* 1358 */  { MAD_F(0x0757caa7) /* 0.458933498 */, 15 },
-  /* 1359 */  { MAD_F(0x0759a332) /* 0.459384151 */, 15 },
-
-  /* 1360 */  { MAD_F(0x075b7bdb) /* 0.459834914 */, 15 },
-  /* 1361 */  { MAD_F(0x075d54a1) /* 0.460285788 */, 15 },
-  /* 1362 */  { MAD_F(0x075f2d85) /* 0.460736772 */, 15 },
-  /* 1363 */  { MAD_F(0x07610687) /* 0.461187867 */, 15 },
-  /* 1364 */  { MAD_F(0x0762dfa6) /* 0.461639071 */, 15 },
-  /* 1365 */  { MAD_F(0x0764b8e3) /* 0.462090387 */, 15 },
-  /* 1366 */  { MAD_F(0x0766923e) /* 0.462541812 */, 15 },
-  /* 1367 */  { MAD_F(0x07686bb6) /* 0.462993348 */, 15 },
-  /* 1368 */  { MAD_F(0x076a454c) /* 0.463444993 */, 15 },
-  /* 1369 */  { MAD_F(0x076c1eff) /* 0.463896749 */, 15 },
-  /* 1370 */  { MAD_F(0x076df8d0) /* 0.464348615 */, 15 },
-  /* 1371 */  { MAD_F(0x076fd2be) /* 0.464800591 */, 15 },
-  /* 1372 */  { MAD_F(0x0771acca) /* 0.465252676 */, 15 },
-  /* 1373 */  { MAD_F(0x077386f3) /* 0.465704872 */, 15 },
-  /* 1374 */  { MAD_F(0x0775613a) /* 0.466157177 */, 15 },
-  /* 1375 */  { MAD_F(0x07773b9e) /* 0.466609592 */, 15 },
-
-  /* 1376 */  { MAD_F(0x07791620) /* 0.467062117 */, 15 },
-  /* 1377 */  { MAD_F(0x077af0bf) /* 0.467514751 */, 15 },
-  /* 1378 */  { MAD_F(0x077ccb7c) /* 0.467967495 */, 15 },
-  /* 1379 */  { MAD_F(0x077ea656) /* 0.468420349 */, 15 },
-  /* 1380 */  { MAD_F(0x0780814d) /* 0.468873312 */, 15 },
-  /* 1381 */  { MAD_F(0x07825c62) /* 0.469326384 */, 15 },
-  /* 1382 */  { MAD_F(0x07843794) /* 0.469779566 */, 15 },
-  /* 1383 */  { MAD_F(0x078612e3) /* 0.470232857 */, 15 },
-  /* 1384 */  { MAD_F(0x0787ee50) /* 0.470686258 */, 15 },
-  /* 1385 */  { MAD_F(0x0789c9da) /* 0.471139767 */, 15 },
-  /* 1386 */  { MAD_F(0x078ba581) /* 0.471593386 */, 15 },
-  /* 1387 */  { MAD_F(0x078d8146) /* 0.472047114 */, 15 },
-  /* 1388 */  { MAD_F(0x078f5d28) /* 0.472500951 */, 15 },
-  /* 1389 */  { MAD_F(0x07913927) /* 0.472954896 */, 15 },
-  /* 1390 */  { MAD_F(0x07931543) /* 0.473408951 */, 15 },
-  /* 1391 */  { MAD_F(0x0794f17d) /* 0.473863115 */, 15 },
-
-  /* 1392 */  { MAD_F(0x0796cdd4) /* 0.474317388 */, 15 },
-  /* 1393 */  { MAD_F(0x0798aa48) /* 0.474771769 */, 15 },
-  /* 1394 */  { MAD_F(0x079a86d9) /* 0.475226259 */, 15 },
-  /* 1395 */  { MAD_F(0x079c6388) /* 0.475680858 */, 15 },
-  /* 1396 */  { MAD_F(0x079e4053) /* 0.476135565 */, 15 },
-  /* 1397 */  { MAD_F(0x07a01d3c) /* 0.476590381 */, 15 },
-  /* 1398 */  { MAD_F(0x07a1fa42) /* 0.477045306 */, 15 },
-  /* 1399 */  { MAD_F(0x07a3d765) /* 0.477500339 */, 15 },
-  /* 1400 */  { MAD_F(0x07a5b4a5) /* 0.477955481 */, 15 },
-  /* 1401 */  { MAD_F(0x07a79202) /* 0.478410731 */, 15 },
-  /* 1402 */  { MAD_F(0x07a96f7d) /* 0.478866089 */, 15 },
-  /* 1403 */  { MAD_F(0x07ab4d14) /* 0.479321555 */, 15 },
-  /* 1404 */  { MAD_F(0x07ad2ac8) /* 0.479777130 */, 15 },
-  /* 1405 */  { MAD_F(0x07af089a) /* 0.480232813 */, 15 },
-  /* 1406 */  { MAD_F(0x07b0e688) /* 0.480688604 */, 15 },
-  /* 1407 */  { MAD_F(0x07b2c494) /* 0.481144503 */, 15 },
-
-  /* 1408 */  { MAD_F(0x07b4a2bc) /* 0.481600510 */, 15 },
-  /* 1409 */  { MAD_F(0x07b68102) /* 0.482056625 */, 15 },
-  /* 1410 */  { MAD_F(0x07b85f64) /* 0.482512848 */, 15 },
-  /* 1411 */  { MAD_F(0x07ba3de4) /* 0.482969179 */, 15 },
-  /* 1412 */  { MAD_F(0x07bc1c80) /* 0.483425618 */, 15 },
-  /* 1413 */  { MAD_F(0x07bdfb39) /* 0.483882164 */, 15 },
-  /* 1414 */  { MAD_F(0x07bfda0f) /* 0.484338818 */, 15 },
-  /* 1415 */  { MAD_F(0x07c1b902) /* 0.484795580 */, 15 },
-  /* 1416 */  { MAD_F(0x07c39812) /* 0.485252449 */, 15 },
-  /* 1417 */  { MAD_F(0x07c5773f) /* 0.485709426 */, 15 },
-  /* 1418 */  { MAD_F(0x07c75689) /* 0.486166511 */, 15 },
-  /* 1419 */  { MAD_F(0x07c935ef) /* 0.486623703 */, 15 },
-  /* 1420 */  { MAD_F(0x07cb1573) /* 0.487081002 */, 15 },
-  /* 1421 */  { MAD_F(0x07ccf513) /* 0.487538409 */, 15 },
-  /* 1422 */  { MAD_F(0x07ced4d0) /* 0.487995923 */, 15 },
-  /* 1423 */  { MAD_F(0x07d0b4aa) /* 0.488453544 */, 15 },
-
-  /* 1424 */  { MAD_F(0x07d294a0) /* 0.488911273 */, 15 },
-  /* 1425 */  { MAD_F(0x07d474b3) /* 0.489369108 */, 15 },
-  /* 1426 */  { MAD_F(0x07d654e4) /* 0.489827051 */, 15 },
-  /* 1427 */  { MAD_F(0x07d83530) /* 0.490285101 */, 15 },
-  /* 1428 */  { MAD_F(0x07da159a) /* 0.490743258 */, 15 },
-  /* 1429 */  { MAD_F(0x07dbf620) /* 0.491201522 */, 15 },
-  /* 1430 */  { MAD_F(0x07ddd6c3) /* 0.491659892 */, 15 },
-  /* 1431 */  { MAD_F(0x07dfb783) /* 0.492118370 */, 15 },
-  /* 1432 */  { MAD_F(0x07e1985f) /* 0.492576954 */, 15 },
-  /* 1433 */  { MAD_F(0x07e37958) /* 0.493035645 */, 15 },
-  /* 1434 */  { MAD_F(0x07e55a6e) /* 0.493494443 */, 15 },
-  /* 1435 */  { MAD_F(0x07e73ba0) /* 0.493953348 */, 15 },
-  /* 1436 */  { MAD_F(0x07e91cef) /* 0.494412359 */, 15 },
-  /* 1437 */  { MAD_F(0x07eafe5a) /* 0.494871476 */, 15 },
-  /* 1438 */  { MAD_F(0x07ecdfe2) /* 0.495330701 */, 15 },
-  /* 1439 */  { MAD_F(0x07eec187) /* 0.495790031 */, 15 },
-
-  /* 1440 */  { MAD_F(0x07f0a348) /* 0.496249468 */, 15 },
-  /* 1441 */  { MAD_F(0x07f28526) /* 0.496709012 */, 15 },
-  /* 1442 */  { MAD_F(0x07f46720) /* 0.497168662 */, 15 },
-  /* 1443 */  { MAD_F(0x07f64937) /* 0.497628418 */, 15 },
-  /* 1444 */  { MAD_F(0x07f82b6a) /* 0.498088280 */, 15 },
-  /* 1445 */  { MAD_F(0x07fa0dba) /* 0.498548248 */, 15 },
-  /* 1446 */  { MAD_F(0x07fbf026) /* 0.499008323 */, 15 },
-  /* 1447 */  { MAD_F(0x07fdd2af) /* 0.499468503 */, 15 },
-  /* 1448 */  { MAD_F(0x07ffb554) /* 0.499928790 */, 15 },
-  /* 1449 */  { MAD_F(0x0400cc0b) /* 0.250194591 */, 16 },
-  /* 1450 */  { MAD_F(0x0401bd7a) /* 0.250424840 */, 16 },
-  /* 1451 */  { MAD_F(0x0402aef7) /* 0.250655143 */, 16 },
-  /* 1452 */  { MAD_F(0x0403a083) /* 0.250885498 */, 16 },
-  /* 1453 */  { MAD_F(0x0404921c) /* 0.251115906 */, 16 },
-  /* 1454 */  { MAD_F(0x040583c4) /* 0.251346367 */, 16 },
-  /* 1455 */  { MAD_F(0x0406757a) /* 0.251576880 */, 16 },
-
-  /* 1456 */  { MAD_F(0x0407673f) /* 0.251807447 */, 16 },
-  /* 1457 */  { MAD_F(0x04085911) /* 0.252038066 */, 16 },
-  /* 1458 */  { MAD_F(0x04094af1) /* 0.252268738 */, 16 },
-  /* 1459 */  { MAD_F(0x040a3ce0) /* 0.252499463 */, 16 },
-  /* 1460 */  { MAD_F(0x040b2edd) /* 0.252730240 */, 16 },
-  /* 1461 */  { MAD_F(0x040c20e8) /* 0.252961071 */, 16 },
-  /* 1462 */  { MAD_F(0x040d1301) /* 0.253191953 */, 16 },
-  /* 1463 */  { MAD_F(0x040e0529) /* 0.253422889 */, 16 },
-  /* 1464 */  { MAD_F(0x040ef75e) /* 0.253653877 */, 16 },
-  /* 1465 */  { MAD_F(0x040fe9a1) /* 0.253884918 */, 16 },
-  /* 1466 */  { MAD_F(0x0410dbf3) /* 0.254116011 */, 16 },
-  /* 1467 */  { MAD_F(0x0411ce53) /* 0.254347157 */, 16 },
-  /* 1468 */  { MAD_F(0x0412c0c1) /* 0.254578356 */, 16 },
-  /* 1469 */  { MAD_F(0x0413b33d) /* 0.254809606 */, 16 },
-  /* 1470 */  { MAD_F(0x0414a5c7) /* 0.255040910 */, 16 },
-  /* 1471 */  { MAD_F(0x0415985f) /* 0.255272266 */, 16 },
-
-  /* 1472 */  { MAD_F(0x04168b05) /* 0.255503674 */, 16 },
-  /* 1473 */  { MAD_F(0x04177db9) /* 0.255735135 */, 16 },
-  /* 1474 */  { MAD_F(0x0418707c) /* 0.255966648 */, 16 },
-  /* 1475 */  { MAD_F(0x0419634c) /* 0.256198213 */, 16 },
-  /* 1476 */  { MAD_F(0x041a562a) /* 0.256429831 */, 16 },
-  /* 1477 */  { MAD_F(0x041b4917) /* 0.256661501 */, 16 },
-  /* 1478 */  { MAD_F(0x041c3c11) /* 0.256893223 */, 16 },
-  /* 1479 */  { MAD_F(0x041d2f1a) /* 0.257124998 */, 16 },
-  /* 1480 */  { MAD_F(0x041e2230) /* 0.257356825 */, 16 },
-  /* 1481 */  { MAD_F(0x041f1555) /* 0.257588704 */, 16 },
-  /* 1482 */  { MAD_F(0x04200888) /* 0.257820635 */, 16 },
-  /* 1483 */  { MAD_F(0x0420fbc8) /* 0.258052619 */, 16 },
-  /* 1484 */  { MAD_F(0x0421ef17) /* 0.258284654 */, 16 },
-  /* 1485 */  { MAD_F(0x0422e273) /* 0.258516742 */, 16 },
-  /* 1486 */  { MAD_F(0x0423d5de) /* 0.258748882 */, 16 },
-  /* 1487 */  { MAD_F(0x0424c956) /* 0.258981074 */, 16 },
-
-  /* 1488 */  { MAD_F(0x0425bcdd) /* 0.259213318 */, 16 },
-  /* 1489 */  { MAD_F(0x0426b071) /* 0.259445614 */, 16 },
-  /* 1490 */  { MAD_F(0x0427a414) /* 0.259677962 */, 16 },
-  /* 1491 */  { MAD_F(0x042897c4) /* 0.259910362 */, 16 },
-  /* 1492 */  { MAD_F(0x04298b83) /* 0.260142814 */, 16 },
-  /* 1493 */  { MAD_F(0x042a7f4f) /* 0.260375318 */, 16 },
-  /* 1494 */  { MAD_F(0x042b7329) /* 0.260607874 */, 16 },
-  /* 1495 */  { MAD_F(0x042c6711) /* 0.260840481 */, 16 },
-  /* 1496 */  { MAD_F(0x042d5b07) /* 0.261073141 */, 16 },
-  /* 1497 */  { MAD_F(0x042e4f0b) /* 0.261305852 */, 16 },
-  /* 1498 */  { MAD_F(0x042f431d) /* 0.261538616 */, 16 },
-  /* 1499 */  { MAD_F(0x0430373d) /* 0.261771431 */, 16 },
-  /* 1500 */  { MAD_F(0x04312b6b) /* 0.262004297 */, 16 },
-  /* 1501 */  { MAD_F(0x04321fa6) /* 0.262237216 */, 16 },
-  /* 1502 */  { MAD_F(0x043313f0) /* 0.262470186 */, 16 },
-  /* 1503 */  { MAD_F(0x04340847) /* 0.262703208 */, 16 },
-
-  /* 1504 */  { MAD_F(0x0434fcad) /* 0.262936282 */, 16 },
-  /* 1505 */  { MAD_F(0x0435f120) /* 0.263169407 */, 16 },
-  /* 1506 */  { MAD_F(0x0436e5a1) /* 0.263402584 */, 16 },
-  /* 1507 */  { MAD_F(0x0437da2f) /* 0.263635813 */, 16 },
-  /* 1508 */  { MAD_F(0x0438cecc) /* 0.263869093 */, 16 },
-  /* 1509 */  { MAD_F(0x0439c377) /* 0.264102425 */, 16 },
-  /* 1510 */  { MAD_F(0x043ab82f) /* 0.264335808 */, 16 },
-  /* 1511 */  { MAD_F(0x043bacf5) /* 0.264569243 */, 16 },
-  /* 1512 */  { MAD_F(0x043ca1c9) /* 0.264802730 */, 16 },
-  /* 1513 */  { MAD_F(0x043d96ab) /* 0.265036267 */, 16 },
-  /* 1514 */  { MAD_F(0x043e8b9b) /* 0.265269857 */, 16 },
-  /* 1515 */  { MAD_F(0x043f8098) /* 0.265503498 */, 16 },
-  /* 1516 */  { MAD_F(0x044075a3) /* 0.265737190 */, 16 },
-  /* 1517 */  { MAD_F(0x04416abc) /* 0.265970933 */, 16 },
-  /* 1518 */  { MAD_F(0x04425fe3) /* 0.266204728 */, 16 },
-  /* 1519 */  { MAD_F(0x04435518) /* 0.266438574 */, 16 },
-
-  /* 1520 */  { MAD_F(0x04444a5a) /* 0.266672472 */, 16 },
-  /* 1521 */  { MAD_F(0x04453fab) /* 0.266906421 */, 16 },
-  /* 1522 */  { MAD_F(0x04463508) /* 0.267140421 */, 16 },
-  /* 1523 */  { MAD_F(0x04472a74) /* 0.267374472 */, 16 },
-  /* 1524 */  { MAD_F(0x04481fee) /* 0.267608575 */, 16 },
-  /* 1525 */  { MAD_F(0x04491575) /* 0.267842729 */, 16 },
-  /* 1526 */  { MAD_F(0x044a0b0a) /* 0.268076934 */, 16 },
-  /* 1527 */  { MAD_F(0x044b00ac) /* 0.268311190 */, 16 },
-  /* 1528 */  { MAD_F(0x044bf65d) /* 0.268545497 */, 16 },
-  /* 1529 */  { MAD_F(0x044cec1b) /* 0.268779856 */, 16 },
-  /* 1530 */  { MAD_F(0x044de1e7) /* 0.269014265 */, 16 },
-  /* 1531 */  { MAD_F(0x044ed7c0) /* 0.269248726 */, 16 },
-  /* 1532 */  { MAD_F(0x044fcda8) /* 0.269483238 */, 16 },
-  /* 1533 */  { MAD_F(0x0450c39c) /* 0.269717800 */, 16 },
-  /* 1534 */  { MAD_F(0x0451b99f) /* 0.269952414 */, 16 },
-  /* 1535 */  { MAD_F(0x0452afaf) /* 0.270187079 */, 16 },
-
-  /* 1536 */  { MAD_F(0x0453a5cd) /* 0.270421794 */, 16 },
-  /* 1537 */  { MAD_F(0x04549bf9) /* 0.270656561 */, 16 },
-  /* 1538 */  { MAD_F(0x04559232) /* 0.270891379 */, 16 },
-  /* 1539 */  { MAD_F(0x04568879) /* 0.271126247 */, 16 },
-  /* 1540 */  { MAD_F(0x04577ece) /* 0.271361166 */, 16 },
-  /* 1541 */  { MAD_F(0x04587530) /* 0.271596136 */, 16 },
-  /* 1542 */  { MAD_F(0x04596ba0) /* 0.271831157 */, 16 },
-  /* 1543 */  { MAD_F(0x045a621e) /* 0.272066229 */, 16 },
-  /* 1544 */  { MAD_F(0x045b58a9) /* 0.272301352 */, 16 },
-  /* 1545 */  { MAD_F(0x045c4f42) /* 0.272536525 */, 16 },
-  /* 1546 */  { MAD_F(0x045d45e9) /* 0.272771749 */, 16 },
-  /* 1547 */  { MAD_F(0x045e3c9d) /* 0.273007024 */, 16 },
-  /* 1548 */  { MAD_F(0x045f335e) /* 0.273242350 */, 16 },
-  /* 1549 */  { MAD_F(0x04602a2e) /* 0.273477726 */, 16 },
-  /* 1550 */  { MAD_F(0x0461210b) /* 0.273713153 */, 16 },
-  /* 1551 */  { MAD_F(0x046217f5) /* 0.273948630 */, 16 },
-
-  /* 1552 */  { MAD_F(0x04630eed) /* 0.274184158 */, 16 },
-  /* 1553 */  { MAD_F(0x046405f3) /* 0.274419737 */, 16 },
-  /* 1554 */  { MAD_F(0x0464fd06) /* 0.274655366 */, 16 },
-  /* 1555 */  { MAD_F(0x0465f427) /* 0.274891046 */, 16 },
-  /* 1556 */  { MAD_F(0x0466eb55) /* 0.275126776 */, 16 },
-  /* 1557 */  { MAD_F(0x0467e291) /* 0.275362557 */, 16 },
-  /* 1558 */  { MAD_F(0x0468d9db) /* 0.275598389 */, 16 },
-  /* 1559 */  { MAD_F(0x0469d132) /* 0.275834270 */, 16 },
-  /* 1560 */  { MAD_F(0x046ac896) /* 0.276070203 */, 16 },
-  /* 1561 */  { MAD_F(0x046bc009) /* 0.276306185 */, 16 },
-  /* 1562 */  { MAD_F(0x046cb788) /* 0.276542218 */, 16 },
-  /* 1563 */  { MAD_F(0x046daf15) /* 0.276778302 */, 16 },
-  /* 1564 */  { MAD_F(0x046ea6b0) /* 0.277014435 */, 16 },
-  /* 1565 */  { MAD_F(0x046f9e58) /* 0.277250619 */, 16 },
-  /* 1566 */  { MAD_F(0x0470960e) /* 0.277486854 */, 16 },
-  /* 1567 */  { MAD_F(0x04718dd1) /* 0.277723139 */, 16 },
-
-  /* 1568 */  { MAD_F(0x047285a2) /* 0.277959474 */, 16 },
-  /* 1569 */  { MAD_F(0x04737d80) /* 0.278195859 */, 16 },
-  /* 1570 */  { MAD_F(0x0474756c) /* 0.278432294 */, 16 },
-  /* 1571 */  { MAD_F(0x04756d65) /* 0.278668780 */, 16 },
-  /* 1572 */  { MAD_F(0x0476656b) /* 0.278905316 */, 16 },
-  /* 1573 */  { MAD_F(0x04775d7f) /* 0.279141902 */, 16 },
-  /* 1574 */  { MAD_F(0x047855a1) /* 0.279378538 */, 16 },
-  /* 1575 */  { MAD_F(0x04794dd0) /* 0.279615224 */, 16 },
-  /* 1576 */  { MAD_F(0x047a460c) /* 0.279851960 */, 16 },
-  /* 1577 */  { MAD_F(0x047b3e56) /* 0.280088747 */, 16 },
-  /* 1578 */  { MAD_F(0x047c36ae) /* 0.280325583 */, 16 },
-  /* 1579 */  { MAD_F(0x047d2f12) /* 0.280562470 */, 16 },
-  /* 1580 */  { MAD_F(0x047e2784) /* 0.280799406 */, 16 },
-  /* 1581 */  { MAD_F(0x047f2004) /* 0.281036393 */, 16 },
-  /* 1582 */  { MAD_F(0x04801891) /* 0.281273429 */, 16 },
-  /* 1583 */  { MAD_F(0x0481112b) /* 0.281510516 */, 16 },
-
-  /* 1584 */  { MAD_F(0x048209d3) /* 0.281747652 */, 16 },
-  /* 1585 */  { MAD_F(0x04830288) /* 0.281984838 */, 16 },
-  /* 1586 */  { MAD_F(0x0483fb4b) /* 0.282222075 */, 16 },
-  /* 1587 */  { MAD_F(0x0484f41b) /* 0.282459361 */, 16 },
-  /* 1588 */  { MAD_F(0x0485ecf8) /* 0.282696697 */, 16 },
-  /* 1589 */  { MAD_F(0x0486e5e3) /* 0.282934082 */, 16 },
-  /* 1590 */  { MAD_F(0x0487dedb) /* 0.283171518 */, 16 },
-  /* 1591 */  { MAD_F(0x0488d7e1) /* 0.283409003 */, 16 },
-  /* 1592 */  { MAD_F(0x0489d0f4) /* 0.283646538 */, 16 },
-  /* 1593 */  { MAD_F(0x048aca14) /* 0.283884123 */, 16 },
-  /* 1594 */  { MAD_F(0x048bc341) /* 0.284121757 */, 16 },
-  /* 1595 */  { MAD_F(0x048cbc7c) /* 0.284359441 */, 16 },
-  /* 1596 */  { MAD_F(0x048db5c4) /* 0.284597175 */, 16 },
-  /* 1597 */  { MAD_F(0x048eaf1a) /* 0.284834959 */, 16 },
-  /* 1598 */  { MAD_F(0x048fa87d) /* 0.285072792 */, 16 },
-  /* 1599 */  { MAD_F(0x0490a1ed) /* 0.285310675 */, 16 },
-
-  /* 1600 */  { MAD_F(0x04919b6a) /* 0.285548607 */, 16 },
-  /* 1601 */  { MAD_F(0x049294f5) /* 0.285786589 */, 16 },
-  /* 1602 */  { MAD_F(0x04938e8d) /* 0.286024621 */, 16 },
-  /* 1603 */  { MAD_F(0x04948833) /* 0.286262702 */, 16 },
-  /* 1604 */  { MAD_F(0x049581e5) /* 0.286500832 */, 16 },
-  /* 1605 */  { MAD_F(0x04967ba5) /* 0.286739012 */, 16 },
-  /* 1606 */  { MAD_F(0x04977573) /* 0.286977242 */, 16 },
-  /* 1607 */  { MAD_F(0x04986f4d) /* 0.287215521 */, 16 },
-  /* 1608 */  { MAD_F(0x04996935) /* 0.287453849 */, 16 },
-  /* 1609 */  { MAD_F(0x049a632a) /* 0.287692227 */, 16 },
-  /* 1610 */  { MAD_F(0x049b5d2c) /* 0.287930654 */, 16 },
-  /* 1611 */  { MAD_F(0x049c573c) /* 0.288169131 */, 16 },
-  /* 1612 */  { MAD_F(0x049d5159) /* 0.288407657 */, 16 },
-  /* 1613 */  { MAD_F(0x049e4b83) /* 0.288646232 */, 16 },
-  /* 1614 */  { MAD_F(0x049f45ba) /* 0.288884857 */, 16 },
-  /* 1615 */  { MAD_F(0x04a03ffe) /* 0.289123530 */, 16 },
-
-  /* 1616 */  { MAD_F(0x04a13a50) /* 0.289362253 */, 16 },
-  /* 1617 */  { MAD_F(0x04a234af) /* 0.289601026 */, 16 },
-  /* 1618 */  { MAD_F(0x04a32f1b) /* 0.289839847 */, 16 },
-  /* 1619 */  { MAD_F(0x04a42995) /* 0.290078718 */, 16 },
-  /* 1620 */  { MAD_F(0x04a5241b) /* 0.290317638 */, 16 },
-  /* 1621 */  { MAD_F(0x04a61eaf) /* 0.290556607 */, 16 },
-  /* 1622 */  { MAD_F(0x04a71950) /* 0.290795626 */, 16 },
-  /* 1623 */  { MAD_F(0x04a813fe) /* 0.291034693 */, 16 },
-  /* 1624 */  { MAD_F(0x04a90eba) /* 0.291273810 */, 16 },
-  /* 1625 */  { MAD_F(0x04aa0982) /* 0.291512975 */, 16 },
-  /* 1626 */  { MAD_F(0x04ab0458) /* 0.291752190 */, 16 },
-  /* 1627 */  { MAD_F(0x04abff3b) /* 0.291991453 */, 16 },
-  /* 1628 */  { MAD_F(0x04acfa2b) /* 0.292230766 */, 16 },
-  /* 1629 */  { MAD_F(0x04adf528) /* 0.292470128 */, 16 },
-  /* 1630 */  { MAD_F(0x04aef032) /* 0.292709539 */, 16 },
-  /* 1631 */  { MAD_F(0x04afeb4a) /* 0.292948998 */, 16 },
-
-  /* 1632 */  { MAD_F(0x04b0e66e) /* 0.293188507 */, 16 },
-  /* 1633 */  { MAD_F(0x04b1e1a0) /* 0.293428065 */, 16 },
-  /* 1634 */  { MAD_F(0x04b2dcdf) /* 0.293667671 */, 16 },
-  /* 1635 */  { MAD_F(0x04b3d82b) /* 0.293907326 */, 16 },
-  /* 1636 */  { MAD_F(0x04b4d384) /* 0.294147031 */, 16 },
-  /* 1637 */  { MAD_F(0x04b5ceea) /* 0.294386784 */, 16 },
-  /* 1638 */  { MAD_F(0x04b6ca5e) /* 0.294626585 */, 16 },
-  /* 1639 */  { MAD_F(0x04b7c5de) /* 0.294866436 */, 16 },
-  /* 1640 */  { MAD_F(0x04b8c16c) /* 0.295106336 */, 16 },
-  /* 1641 */  { MAD_F(0x04b9bd06) /* 0.295346284 */, 16 },
-  /* 1642 */  { MAD_F(0x04bab8ae) /* 0.295586281 */, 16 },
-  /* 1643 */  { MAD_F(0x04bbb463) /* 0.295826327 */, 16 },
-  /* 1644 */  { MAD_F(0x04bcb024) /* 0.296066421 */, 16 },
-  /* 1645 */  { MAD_F(0x04bdabf3) /* 0.296306564 */, 16 },
-  /* 1646 */  { MAD_F(0x04bea7cf) /* 0.296546756 */, 16 },
-  /* 1647 */  { MAD_F(0x04bfa3b8) /* 0.296786996 */, 16 },
-
-  /* 1648 */  { MAD_F(0x04c09faf) /* 0.297027285 */, 16 },
-  /* 1649 */  { MAD_F(0x04c19bb2) /* 0.297267623 */, 16 },
-  /* 1650 */  { MAD_F(0x04c297c2) /* 0.297508009 */, 16 },
-  /* 1651 */  { MAD_F(0x04c393df) /* 0.297748444 */, 16 },
-  /* 1652 */  { MAD_F(0x04c49009) /* 0.297988927 */, 16 },
-  /* 1653 */  { MAD_F(0x04c58c41) /* 0.298229459 */, 16 },
-  /* 1654 */  { MAD_F(0x04c68885) /* 0.298470039 */, 16 },
-  /* 1655 */  { MAD_F(0x04c784d6) /* 0.298710668 */, 16 },
-  /* 1656 */  { MAD_F(0x04c88135) /* 0.298951346 */, 16 },
-  /* 1657 */  { MAD_F(0x04c97da0) /* 0.299192071 */, 16 },
-  /* 1658 */  { MAD_F(0x04ca7a18) /* 0.299432846 */, 16 },
-  /* 1659 */  { MAD_F(0x04cb769e) /* 0.299673668 */, 16 },
-  /* 1660 */  { MAD_F(0x04cc7330) /* 0.299914539 */, 16 },
-  /* 1661 */  { MAD_F(0x04cd6fcf) /* 0.300155459 */, 16 },
-  /* 1662 */  { MAD_F(0x04ce6c7b) /* 0.300396426 */, 16 },
-  /* 1663 */  { MAD_F(0x04cf6935) /* 0.300637443 */, 16 },
-
-  /* 1664 */  { MAD_F(0x04d065fb) /* 0.300878507 */, 16 },
-  /* 1665 */  { MAD_F(0x04d162ce) /* 0.301119620 */, 16 },
-  /* 1666 */  { MAD_F(0x04d25fae) /* 0.301360781 */, 16 },
-  /* 1667 */  { MAD_F(0x04d35c9b) /* 0.301601990 */, 16 },
-  /* 1668 */  { MAD_F(0x04d45995) /* 0.301843247 */, 16 },
-  /* 1669 */  { MAD_F(0x04d5569c) /* 0.302084553 */, 16 },
-  /* 1670 */  { MAD_F(0x04d653b0) /* 0.302325907 */, 16 },
-  /* 1671 */  { MAD_F(0x04d750d1) /* 0.302567309 */, 16 },
-  /* 1672 */  { MAD_F(0x04d84dff) /* 0.302808759 */, 16 },
-  /* 1673 */  { MAD_F(0x04d94b3a) /* 0.303050257 */, 16 },
-  /* 1674 */  { MAD_F(0x04da4881) /* 0.303291804 */, 16 },
-  /* 1675 */  { MAD_F(0x04db45d6) /* 0.303533399 */, 16 },
-  /* 1676 */  { MAD_F(0x04dc4337) /* 0.303775041 */, 16 },
-  /* 1677 */  { MAD_F(0x04dd40a6) /* 0.304016732 */, 16 },
-  /* 1678 */  { MAD_F(0x04de3e21) /* 0.304258471 */, 16 },
-  /* 1679 */  { MAD_F(0x04df3ba9) /* 0.304500257 */, 16 },
-
-  /* 1680 */  { MAD_F(0x04e0393e) /* 0.304742092 */, 16 },
-  /* 1681 */  { MAD_F(0x04e136e0) /* 0.304983975 */, 16 },
-  /* 1682 */  { MAD_F(0x04e2348f) /* 0.305225906 */, 16 },
-  /* 1683 */  { MAD_F(0x04e3324b) /* 0.305467885 */, 16 },
-  /* 1684 */  { MAD_F(0x04e43013) /* 0.305709911 */, 16 },
-  /* 1685 */  { MAD_F(0x04e52de9) /* 0.305951986 */, 16 },
-  /* 1686 */  { MAD_F(0x04e62bcb) /* 0.306194108 */, 16 },
-  /* 1687 */  { MAD_F(0x04e729ba) /* 0.306436279 */, 16 },
-  /* 1688 */  { MAD_F(0x04e827b6) /* 0.306678497 */, 16 },
-  /* 1689 */  { MAD_F(0x04e925bf) /* 0.306920763 */, 16 },
-  /* 1690 */  { MAD_F(0x04ea23d4) /* 0.307163077 */, 16 },
-  /* 1691 */  { MAD_F(0x04eb21f7) /* 0.307405438 */, 16 },
-  /* 1692 */  { MAD_F(0x04ec2026) /* 0.307647848 */, 16 },
-  /* 1693 */  { MAD_F(0x04ed1e62) /* 0.307890305 */, 16 },
-  /* 1694 */  { MAD_F(0x04ee1cab) /* 0.308132810 */, 16 },
-  /* 1695 */  { MAD_F(0x04ef1b01) /* 0.308375362 */, 16 },
-
-  /* 1696 */  { MAD_F(0x04f01963) /* 0.308617963 */, 16 },
-  /* 1697 */  { MAD_F(0x04f117d3) /* 0.308860611 */, 16 },
-  /* 1698 */  { MAD_F(0x04f2164f) /* 0.309103306 */, 16 },
-  /* 1699 */  { MAD_F(0x04f314d8) /* 0.309346050 */, 16 },
-  /* 1700 */  { MAD_F(0x04f4136d) /* 0.309588841 */, 16 },
-  /* 1701 */  { MAD_F(0x04f51210) /* 0.309831679 */, 16 },
-  /* 1702 */  { MAD_F(0x04f610bf) /* 0.310074565 */, 16 },
-  /* 1703 */  { MAD_F(0x04f70f7b) /* 0.310317499 */, 16 },
-  /* 1704 */  { MAD_F(0x04f80e44) /* 0.310560480 */, 16 },
-  /* 1705 */  { MAD_F(0x04f90d19) /* 0.310803509 */, 16 },
-  /* 1706 */  { MAD_F(0x04fa0bfc) /* 0.311046586 */, 16 },
-  /* 1707 */  { MAD_F(0x04fb0aeb) /* 0.311289710 */, 16 },
-  /* 1708 */  { MAD_F(0x04fc09e7) /* 0.311532881 */, 16 },
-  /* 1709 */  { MAD_F(0x04fd08ef) /* 0.311776100 */, 16 },
-  /* 1710 */  { MAD_F(0x04fe0805) /* 0.312019366 */, 16 },
-  /* 1711 */  { MAD_F(0x04ff0727) /* 0.312262680 */, 16 },
-
-  /* 1712 */  { MAD_F(0x05000655) /* 0.312506041 */, 16 },
-  /* 1713 */  { MAD_F(0x05010591) /* 0.312749449 */, 16 },
-  /* 1714 */  { MAD_F(0x050204d9) /* 0.312992905 */, 16 },
-  /* 1715 */  { MAD_F(0x0503042e) /* 0.313236408 */, 16 },
-  /* 1716 */  { MAD_F(0x0504038f) /* 0.313479959 */, 16 },
-  /* 1717 */  { MAD_F(0x050502fe) /* 0.313723556 */, 16 },
-  /* 1718 */  { MAD_F(0x05060279) /* 0.313967202 */, 16 },
-  /* 1719 */  { MAD_F(0x05070200) /* 0.314210894 */, 16 },
-  /* 1720 */  { MAD_F(0x05080195) /* 0.314454634 */, 16 },
-  /* 1721 */  { MAD_F(0x05090136) /* 0.314698420 */, 16 },
-  /* 1722 */  { MAD_F(0x050a00e3) /* 0.314942255 */, 16 },
-  /* 1723 */  { MAD_F(0x050b009e) /* 0.315186136 */, 16 },
-  /* 1724 */  { MAD_F(0x050c0065) /* 0.315430064 */, 16 },
-  /* 1725 */  { MAD_F(0x050d0039) /* 0.315674040 */, 16 },
-  /* 1726 */  { MAD_F(0x050e0019) /* 0.315918063 */, 16 },
-  /* 1727 */  { MAD_F(0x050f0006) /* 0.316162133 */, 16 },
-
-  /* 1728 */  { MAD_F(0x05100000) /* 0.316406250 */, 16 },
-  /* 1729 */  { MAD_F(0x05110006) /* 0.316650414 */, 16 },
-  /* 1730 */  { MAD_F(0x05120019) /* 0.316894625 */, 16 },
-  /* 1731 */  { MAD_F(0x05130039) /* 0.317138884 */, 16 },
-  /* 1732 */  { MAD_F(0x05140065) /* 0.317383189 */, 16 },
-  /* 1733 */  { MAD_F(0x0515009e) /* 0.317627541 */, 16 },
-  /* 1734 */  { MAD_F(0x051600e3) /* 0.317871941 */, 16 },
-  /* 1735 */  { MAD_F(0x05170135) /* 0.318116387 */, 16 },
-  /* 1736 */  { MAD_F(0x05180194) /* 0.318360880 */, 16 },
-  /* 1737 */  { MAD_F(0x051901ff) /* 0.318605421 */, 16 },
-  /* 1738 */  { MAD_F(0x051a0277) /* 0.318850008 */, 16 },
-  /* 1739 */  { MAD_F(0x051b02fc) /* 0.319094642 */, 16 },
-  /* 1740 */  { MAD_F(0x051c038d) /* 0.319339323 */, 16 },
-  /* 1741 */  { MAD_F(0x051d042a) /* 0.319584051 */, 16 },
-  /* 1742 */  { MAD_F(0x051e04d4) /* 0.319828826 */, 16 },
-  /* 1743 */  { MAD_F(0x051f058b) /* 0.320073647 */, 16 },
-
-  /* 1744 */  { MAD_F(0x0520064f) /* 0.320318516 */, 16 },
-  /* 1745 */  { MAD_F(0x0521071f) /* 0.320563431 */, 16 },
-  /* 1746 */  { MAD_F(0x052207fb) /* 0.320808393 */, 16 },
-  /* 1747 */  { MAD_F(0x052308e4) /* 0.321053402 */, 16 },
-  /* 1748 */  { MAD_F(0x052409da) /* 0.321298457 */, 16 },
-  /* 1749 */  { MAD_F(0x05250adc) /* 0.321543560 */, 16 },
-  /* 1750 */  { MAD_F(0x05260bea) /* 0.321788709 */, 16 },
-  /* 1751 */  { MAD_F(0x05270d06) /* 0.322033904 */, 16 },
-  /* 1752 */  { MAD_F(0x05280e2d) /* 0.322279147 */, 16 },
-  /* 1753 */  { MAD_F(0x05290f62) /* 0.322524436 */, 16 },
-  /* 1754 */  { MAD_F(0x052a10a3) /* 0.322769771 */, 16 },
-  /* 1755 */  { MAD_F(0x052b11f0) /* 0.323015154 */, 16 },
-  /* 1756 */  { MAD_F(0x052c134a) /* 0.323260583 */, 16 },
-  /* 1757 */  { MAD_F(0x052d14b0) /* 0.323506058 */, 16 },
-  /* 1758 */  { MAD_F(0x052e1623) /* 0.323751580 */, 16 },
-  /* 1759 */  { MAD_F(0x052f17a2) /* 0.323997149 */, 16 },
-
-  /* 1760 */  { MAD_F(0x0530192e) /* 0.324242764 */, 16 },
-  /* 1761 */  { MAD_F(0x05311ac6) /* 0.324488426 */, 16 },
-  /* 1762 */  { MAD_F(0x05321c6b) /* 0.324734134 */, 16 },
-  /* 1763 */  { MAD_F(0x05331e1c) /* 0.324979889 */, 16 },
-  /* 1764 */  { MAD_F(0x05341fda) /* 0.325225690 */, 16 },
-  /* 1765 */  { MAD_F(0x053521a4) /* 0.325471538 */, 16 },
-  /* 1766 */  { MAD_F(0x0536237b) /* 0.325717432 */, 16 },
-  /* 1767 */  { MAD_F(0x0537255e) /* 0.325963372 */, 16 },
-  /* 1768 */  { MAD_F(0x0538274e) /* 0.326209359 */, 16 },
-  /* 1769 */  { MAD_F(0x0539294a) /* 0.326455392 */, 16 },
-  /* 1770 */  { MAD_F(0x053a2b52) /* 0.326701472 */, 16 },
-  /* 1771 */  { MAD_F(0x053b2d67) /* 0.326947598 */, 16 },
-  /* 1772 */  { MAD_F(0x053c2f89) /* 0.327193770 */, 16 },
-  /* 1773 */  { MAD_F(0x053d31b6) /* 0.327439989 */, 16 },
-  /* 1774 */  { MAD_F(0x053e33f1) /* 0.327686254 */, 16 },
-  /* 1775 */  { MAD_F(0x053f3637) /* 0.327932565 */, 16 },
-
-  /* 1776 */  { MAD_F(0x0540388a) /* 0.328178922 */, 16 },
-  /* 1777 */  { MAD_F(0x05413aea) /* 0.328425326 */, 16 },
-  /* 1778 */  { MAD_F(0x05423d56) /* 0.328671776 */, 16 },
-  /* 1779 */  { MAD_F(0x05433fce) /* 0.328918272 */, 16 },
-  /* 1780 */  { MAD_F(0x05444253) /* 0.329164814 */, 16 },
-  /* 1781 */  { MAD_F(0x054544e4) /* 0.329411403 */, 16 },
-  /* 1782 */  { MAD_F(0x05464781) /* 0.329658038 */, 16 },
-  /* 1783 */  { MAD_F(0x05474a2b) /* 0.329904718 */, 16 },
-  /* 1784 */  { MAD_F(0x05484ce2) /* 0.330151445 */, 16 },
-  /* 1785 */  { MAD_F(0x05494fa4) /* 0.330398218 */, 16 },
-  /* 1786 */  { MAD_F(0x054a5273) /* 0.330645037 */, 16 },
-  /* 1787 */  { MAD_F(0x054b554e) /* 0.330891903 */, 16 },
-  /* 1788 */  { MAD_F(0x054c5836) /* 0.331138814 */, 16 },
-  /* 1789 */  { MAD_F(0x054d5b2a) /* 0.331385771 */, 16 },
-  /* 1790 */  { MAD_F(0x054e5e2b) /* 0.331632774 */, 16 },
-  /* 1791 */  { MAD_F(0x054f6138) /* 0.331879824 */, 16 },
-
-  /* 1792 */  { MAD_F(0x05506451) /* 0.332126919 */, 16 },
-  /* 1793 */  { MAD_F(0x05516776) /* 0.332374060 */, 16 },
-  /* 1794 */  { MAD_F(0x05526aa8) /* 0.332621247 */, 16 },
-  /* 1795 */  { MAD_F(0x05536de6) /* 0.332868480 */, 16 },
-  /* 1796 */  { MAD_F(0x05547131) /* 0.333115759 */, 16 },
-  /* 1797 */  { MAD_F(0x05557487) /* 0.333363084 */, 16 },
-  /* 1798 */  { MAD_F(0x055677ea) /* 0.333610455 */, 16 },
-  /* 1799 */  { MAD_F(0x05577b5a) /* 0.333857872 */, 16 },
-  /* 1800 */  { MAD_F(0x05587ed5) /* 0.334105334 */, 16 },
-  /* 1801 */  { MAD_F(0x0559825e) /* 0.334352843 */, 16 },
-  /* 1802 */  { MAD_F(0x055a85f2) /* 0.334600397 */, 16 },
-  /* 1803 */  { MAD_F(0x055b8992) /* 0.334847997 */, 16 },
-  /* 1804 */  { MAD_F(0x055c8d3f) /* 0.335095642 */, 16 },
-  /* 1805 */  { MAD_F(0x055d90f9) /* 0.335343334 */, 16 },
-  /* 1806 */  { MAD_F(0x055e94be) /* 0.335591071 */, 16 },
-  /* 1807 */  { MAD_F(0x055f9890) /* 0.335838854 */, 16 },
-
-  /* 1808 */  { MAD_F(0x05609c6e) /* 0.336086683 */, 16 },
-  /* 1809 */  { MAD_F(0x0561a058) /* 0.336334557 */, 16 },
-  /* 1810 */  { MAD_F(0x0562a44f) /* 0.336582477 */, 16 },
-  /* 1811 */  { MAD_F(0x0563a851) /* 0.336830443 */, 16 },
-  /* 1812 */  { MAD_F(0x0564ac60) /* 0.337078454 */, 16 },
-  /* 1813 */  { MAD_F(0x0565b07c) /* 0.337326511 */, 16 },
-  /* 1814 */  { MAD_F(0x0566b4a3) /* 0.337574614 */, 16 },
-  /* 1815 */  { MAD_F(0x0567b8d7) /* 0.337822762 */, 16 },
-  /* 1816 */  { MAD_F(0x0568bd17) /* 0.338070956 */, 16 },
-  /* 1817 */  { MAD_F(0x0569c163) /* 0.338319195 */, 16 },
-  /* 1818 */  { MAD_F(0x056ac5bc) /* 0.338567480 */, 16 },
-  /* 1819 */  { MAD_F(0x056bca20) /* 0.338815811 */, 16 },
-  /* 1820 */  { MAD_F(0x056cce91) /* 0.339064186 */, 16 },
-  /* 1821 */  { MAD_F(0x056dd30e) /* 0.339312608 */, 16 },
-  /* 1822 */  { MAD_F(0x056ed798) /* 0.339561075 */, 16 },
-  /* 1823 */  { MAD_F(0x056fdc2d) /* 0.339809587 */, 16 },
-
-  /* 1824 */  { MAD_F(0x0570e0cf) /* 0.340058145 */, 16 },
-  /* 1825 */  { MAD_F(0x0571e57d) /* 0.340306748 */, 16 },
-  /* 1826 */  { MAD_F(0x0572ea37) /* 0.340555397 */, 16 },
-  /* 1827 */  { MAD_F(0x0573eefd) /* 0.340804091 */, 16 },
-  /* 1828 */  { MAD_F(0x0574f3d0) /* 0.341052830 */, 16 },
-  /* 1829 */  { MAD_F(0x0575f8ae) /* 0.341301615 */, 16 },
-  /* 1830 */  { MAD_F(0x0576fd99) /* 0.341550445 */, 16 },
-  /* 1831 */  { MAD_F(0x05780290) /* 0.341799321 */, 16 },
-  /* 1832 */  { MAD_F(0x05790793) /* 0.342048241 */, 16 },
-  /* 1833 */  { MAD_F(0x057a0ca3) /* 0.342297207 */, 16 },
-  /* 1834 */  { MAD_F(0x057b11be) /* 0.342546219 */, 16 },
-  /* 1835 */  { MAD_F(0x057c16e6) /* 0.342795275 */, 16 },
-  /* 1836 */  { MAD_F(0x057d1c1a) /* 0.343044377 */, 16 },
-  /* 1837 */  { MAD_F(0x057e2159) /* 0.343293524 */, 16 },
-  /* 1838 */  { MAD_F(0x057f26a6) /* 0.343542717 */, 16 },
-  /* 1839 */  { MAD_F(0x05802bfe) /* 0.343791954 */, 16 },
-
-  /* 1840 */  { MAD_F(0x05813162) /* 0.344041237 */, 16 },
-  /* 1841 */  { MAD_F(0x058236d2) /* 0.344290564 */, 16 },
-  /* 1842 */  { MAD_F(0x05833c4f) /* 0.344539937 */, 16 },
-  /* 1843 */  { MAD_F(0x058441d8) /* 0.344789356 */, 16 },
-  /* 1844 */  { MAD_F(0x0585476c) /* 0.345038819 */, 16 },
-  /* 1845 */  { MAD_F(0x05864d0d) /* 0.345288327 */, 16 },
-  /* 1846 */  { MAD_F(0x058752ba) /* 0.345537880 */, 16 },
-  /* 1847 */  { MAD_F(0x05885873) /* 0.345787479 */, 16 },
-  /* 1848 */  { MAD_F(0x05895e39) /* 0.346037122 */, 16 },
-  /* 1849 */  { MAD_F(0x058a640a) /* 0.346286811 */, 16 },
-  /* 1850 */  { MAD_F(0x058b69e7) /* 0.346536545 */, 16 },
-  /* 1851 */  { MAD_F(0x058c6fd1) /* 0.346786323 */, 16 },
-  /* 1852 */  { MAD_F(0x058d75c6) /* 0.347036147 */, 16 },
-  /* 1853 */  { MAD_F(0x058e7bc8) /* 0.347286015 */, 16 },
-  /* 1854 */  { MAD_F(0x058f81d5) /* 0.347535929 */, 16 },
-  /* 1855 */  { MAD_F(0x059087ef) /* 0.347785887 */, 16 },
-
-  /* 1856 */  { MAD_F(0x05918e15) /* 0.348035890 */, 16 },
-  /* 1857 */  { MAD_F(0x05929447) /* 0.348285939 */, 16 },
-  /* 1858 */  { MAD_F(0x05939a84) /* 0.348536032 */, 16 },
-  /* 1859 */  { MAD_F(0x0594a0ce) /* 0.348786170 */, 16 },
-  /* 1860 */  { MAD_F(0x0595a724) /* 0.349036353 */, 16 },
-  /* 1861 */  { MAD_F(0x0596ad86) /* 0.349286580 */, 16 },
-  /* 1862 */  { MAD_F(0x0597b3f4) /* 0.349536853 */, 16 },
-  /* 1863 */  { MAD_F(0x0598ba6e) /* 0.349787170 */, 16 },
-  /* 1864 */  { MAD_F(0x0599c0f4) /* 0.350037532 */, 16 },
-  /* 1865 */  { MAD_F(0x059ac786) /* 0.350287939 */, 16 },
-  /* 1866 */  { MAD_F(0x059bce25) /* 0.350538391 */, 16 },
-  /* 1867 */  { MAD_F(0x059cd4cf) /* 0.350788887 */, 16 },
-  /* 1868 */  { MAD_F(0x059ddb85) /* 0.351039428 */, 16 },
-  /* 1869 */  { MAD_F(0x059ee247) /* 0.351290014 */, 16 },
-  /* 1870 */  { MAD_F(0x059fe915) /* 0.351540645 */, 16 },
-  /* 1871 */  { MAD_F(0x05a0efef) /* 0.351791320 */, 16 },
-
-  /* 1872 */  { MAD_F(0x05a1f6d5) /* 0.352042040 */, 16 },
-  /* 1873 */  { MAD_F(0x05a2fdc7) /* 0.352292804 */, 16 },
-  /* 1874 */  { MAD_F(0x05a404c5) /* 0.352543613 */, 16 },
-  /* 1875 */  { MAD_F(0x05a50bcf) /* 0.352794467 */, 16 },
-  /* 1876 */  { MAD_F(0x05a612e5) /* 0.353045365 */, 16 },
-  /* 1877 */  { MAD_F(0x05a71a07) /* 0.353296308 */, 16 },
-  /* 1878 */  { MAD_F(0x05a82135) /* 0.353547296 */, 16 },
-  /* 1879 */  { MAD_F(0x05a9286f) /* 0.353798328 */, 16 },
-  /* 1880 */  { MAD_F(0x05aa2fb5) /* 0.354049405 */, 16 },
-  /* 1881 */  { MAD_F(0x05ab3707) /* 0.354300526 */, 16 },
-  /* 1882 */  { MAD_F(0x05ac3e65) /* 0.354551691 */, 16 },
-  /* 1883 */  { MAD_F(0x05ad45ce) /* 0.354802901 */, 16 },
-  /* 1884 */  { MAD_F(0x05ae4d44) /* 0.355054156 */, 16 },
-  /* 1885 */  { MAD_F(0x05af54c6) /* 0.355305455 */, 16 },
-  /* 1886 */  { MAD_F(0x05b05c53) /* 0.355556799 */, 16 },
-  /* 1887 */  { MAD_F(0x05b163ed) /* 0.355808187 */, 16 },
-
-  /* 1888 */  { MAD_F(0x05b26b92) /* 0.356059619 */, 16 },
-  /* 1889 */  { MAD_F(0x05b37343) /* 0.356311096 */, 16 },
-  /* 1890 */  { MAD_F(0x05b47b00) /* 0.356562617 */, 16 },
-  /* 1891 */  { MAD_F(0x05b582c9) /* 0.356814182 */, 16 },
-  /* 1892 */  { MAD_F(0x05b68a9e) /* 0.357065792 */, 16 },
-  /* 1893 */  { MAD_F(0x05b7927f) /* 0.357317446 */, 16 },
-  /* 1894 */  { MAD_F(0x05b89a6c) /* 0.357569145 */, 16 },
-  /* 1895 */  { MAD_F(0x05b9a265) /* 0.357820887 */, 16 },
-  /* 1896 */  { MAD_F(0x05baaa69) /* 0.358072674 */, 16 },
-  /* 1897 */  { MAD_F(0x05bbb27a) /* 0.358324506 */, 16 },
-  /* 1898 */  { MAD_F(0x05bcba96) /* 0.358576381 */, 16 },
-  /* 1899 */  { MAD_F(0x05bdc2be) /* 0.358828301 */, 16 },
-  /* 1900 */  { MAD_F(0x05becaf2) /* 0.359080265 */, 16 },
-  /* 1901 */  { MAD_F(0x05bfd332) /* 0.359332273 */, 16 },
-  /* 1902 */  { MAD_F(0x05c0db7e) /* 0.359584326 */, 16 },
-  /* 1903 */  { MAD_F(0x05c1e3d6) /* 0.359836423 */, 16 },
-
-  /* 1904 */  { MAD_F(0x05c2ec39) /* 0.360088563 */, 16 },
-  /* 1905 */  { MAD_F(0x05c3f4a9) /* 0.360340748 */, 16 },
-  /* 1906 */  { MAD_F(0x05c4fd24) /* 0.360592977 */, 16 },
-  /* 1907 */  { MAD_F(0x05c605ab) /* 0.360845251 */, 16 },
-  /* 1908 */  { MAD_F(0x05c70e3e) /* 0.361097568 */, 16 },
-  /* 1909 */  { MAD_F(0x05c816dd) /* 0.361349929 */, 16 },
-  /* 1910 */  { MAD_F(0x05c91f87) /* 0.361602335 */, 16 },
-  /* 1911 */  { MAD_F(0x05ca283e) /* 0.361854784 */, 16 },
-  /* 1912 */  { MAD_F(0x05cb3100) /* 0.362107278 */, 16 },
-  /* 1913 */  { MAD_F(0x05cc39ce) /* 0.362359815 */, 16 },
-  /* 1914 */  { MAD_F(0x05cd42a8) /* 0.362612397 */, 16 },
-  /* 1915 */  { MAD_F(0x05ce4b8d) /* 0.362865022 */, 16 },
-  /* 1916 */  { MAD_F(0x05cf547f) /* 0.363117692 */, 16 },
-  /* 1917 */  { MAD_F(0x05d05d7c) /* 0.363370405 */, 16 },
-  /* 1918 */  { MAD_F(0x05d16685) /* 0.363623163 */, 16 },
-  /* 1919 */  { MAD_F(0x05d26f9a) /* 0.363875964 */, 16 },
-
-  /* 1920 */  { MAD_F(0x05d378bb) /* 0.364128809 */, 16 },
-  /* 1921 */  { MAD_F(0x05d481e7) /* 0.364381698 */, 16 },
-  /* 1922 */  { MAD_F(0x05d58b1f) /* 0.364634632 */, 16 },
-  /* 1923 */  { MAD_F(0x05d69463) /* 0.364887608 */, 16 },
-  /* 1924 */  { MAD_F(0x05d79db3) /* 0.365140629 */, 16 },
-  /* 1925 */  { MAD_F(0x05d8a70f) /* 0.365393694 */, 16 },
-  /* 1926 */  { MAD_F(0x05d9b076) /* 0.365646802 */, 16 },
-  /* 1927 */  { MAD_F(0x05dab9e9) /* 0.365899955 */, 16 },
-  /* 1928 */  { MAD_F(0x05dbc368) /* 0.366153151 */, 16 },
-  /* 1929 */  { MAD_F(0x05dcccf2) /* 0.366406390 */, 16 },
-  /* 1930 */  { MAD_F(0x05ddd689) /* 0.366659674 */, 16 },
-  /* 1931 */  { MAD_F(0x05dee02b) /* 0.366913001 */, 16 },
-  /* 1932 */  { MAD_F(0x05dfe9d8) /* 0.367166372 */, 16 },
-  /* 1933 */  { MAD_F(0x05e0f392) /* 0.367419787 */, 16 },
-  /* 1934 */  { MAD_F(0x05e1fd57) /* 0.367673246 */, 16 },
-  /* 1935 */  { MAD_F(0x05e30728) /* 0.367926748 */, 16 },
-
-  /* 1936 */  { MAD_F(0x05e41105) /* 0.368180294 */, 16 },
-  /* 1937 */  { MAD_F(0x05e51aed) /* 0.368433883 */, 16 },
-  /* 1938 */  { MAD_F(0x05e624e1) /* 0.368687517 */, 16 },
-  /* 1939 */  { MAD_F(0x05e72ee1) /* 0.368941193 */, 16 },
-  /* 1940 */  { MAD_F(0x05e838ed) /* 0.369194914 */, 16 },
-  /* 1941 */  { MAD_F(0x05e94304) /* 0.369448678 */, 16 },
-  /* 1942 */  { MAD_F(0x05ea4d27) /* 0.369702485 */, 16 },
-  /* 1943 */  { MAD_F(0x05eb5756) /* 0.369956336 */, 16 },
-  /* 1944 */  { MAD_F(0x05ec6190) /* 0.370210231 */, 16 },
-  /* 1945 */  { MAD_F(0x05ed6bd6) /* 0.370464169 */, 16 },
-  /* 1946 */  { MAD_F(0x05ee7628) /* 0.370718151 */, 16 },
-  /* 1947 */  { MAD_F(0x05ef8085) /* 0.370972177 */, 16 },
-  /* 1948 */  { MAD_F(0x05f08aee) /* 0.371226245 */, 16 },
-  /* 1949 */  { MAD_F(0x05f19563) /* 0.371480358 */, 16 },
-  /* 1950 */  { MAD_F(0x05f29fe3) /* 0.371734513 */, 16 },
-  /* 1951 */  { MAD_F(0x05f3aa6f) /* 0.371988712 */, 16 },
-
-  /* 1952 */  { MAD_F(0x05f4b507) /* 0.372242955 */, 16 },
-  /* 1953 */  { MAD_F(0x05f5bfab) /* 0.372497241 */, 16 },
-  /* 1954 */  { MAD_F(0x05f6ca5a) /* 0.372751570 */, 16 },
-  /* 1955 */  { MAD_F(0x05f7d514) /* 0.373005943 */, 16 },
-  /* 1956 */  { MAD_F(0x05f8dfdb) /* 0.373260359 */, 16 },
-  /* 1957 */  { MAD_F(0x05f9eaad) /* 0.373514819 */, 16 },
-  /* 1958 */  { MAD_F(0x05faf58a) /* 0.373769322 */, 16 },
-  /* 1959 */  { MAD_F(0x05fc0073) /* 0.374023868 */, 16 },
-  /* 1960 */  { MAD_F(0x05fd0b68) /* 0.374278458 */, 16 },
-  /* 1961 */  { MAD_F(0x05fe1669) /* 0.374533091 */, 16 },
-  /* 1962 */  { MAD_F(0x05ff2175) /* 0.374787767 */, 16 },
-  /* 1963 */  { MAD_F(0x06002c8d) /* 0.375042486 */, 16 },
-  /* 1964 */  { MAD_F(0x060137b0) /* 0.375297249 */, 16 },
-  /* 1965 */  { MAD_F(0x060242df) /* 0.375552055 */, 16 },
-  /* 1966 */  { MAD_F(0x06034e19) /* 0.375806904 */, 16 },
-  /* 1967 */  { MAD_F(0x0604595f) /* 0.376061796 */, 16 },
-
-  /* 1968 */  { MAD_F(0x060564b1) /* 0.376316732 */, 16 },
-  /* 1969 */  { MAD_F(0x0606700f) /* 0.376571710 */, 16 },
-  /* 1970 */  { MAD_F(0x06077b77) /* 0.376826732 */, 16 },
-  /* 1971 */  { MAD_F(0x060886ec) /* 0.377081797 */, 16 },
-  /* 1972 */  { MAD_F(0x0609926c) /* 0.377336905 */, 16 },
-  /* 1973 */  { MAD_F(0x060a9df8) /* 0.377592057 */, 16 },
-  /* 1974 */  { MAD_F(0x060ba98f) /* 0.377847251 */, 16 },
-  /* 1975 */  { MAD_F(0x060cb532) /* 0.378102489 */, 16 },
-  /* 1976 */  { MAD_F(0x060dc0e0) /* 0.378357769 */, 16 },
-  /* 1977 */  { MAD_F(0x060ecc9a) /* 0.378613093 */, 16 },
-  /* 1978 */  { MAD_F(0x060fd860) /* 0.378868460 */, 16 },
-  /* 1979 */  { MAD_F(0x0610e431) /* 0.379123870 */, 16 },
-  /* 1980 */  { MAD_F(0x0611f00d) /* 0.379379322 */, 16 },
-  /* 1981 */  { MAD_F(0x0612fbf5) /* 0.379634818 */, 16 },
-  /* 1982 */  { MAD_F(0x061407e9) /* 0.379890357 */, 16 },
-  /* 1983 */  { MAD_F(0x061513e8) /* 0.380145939 */, 16 },
-
-  /* 1984 */  { MAD_F(0x06161ff3) /* 0.380401563 */, 16 },
-  /* 1985 */  { MAD_F(0x06172c09) /* 0.380657231 */, 16 },
-  /* 1986 */  { MAD_F(0x0618382b) /* 0.380912942 */, 16 },
-  /* 1987 */  { MAD_F(0x06194458) /* 0.381168695 */, 16 },
-  /* 1988 */  { MAD_F(0x061a5091) /* 0.381424492 */, 16 },
-  /* 1989 */  { MAD_F(0x061b5cd5) /* 0.381680331 */, 16 },
-  /* 1990 */  { MAD_F(0x061c6925) /* 0.381936213 */, 16 },
-  /* 1991 */  { MAD_F(0x061d7581) /* 0.382192138 */, 16 },
-  /* 1992 */  { MAD_F(0x061e81e8) /* 0.382448106 */, 16 },
-  /* 1993 */  { MAD_F(0x061f8e5a) /* 0.382704117 */, 16 },
-  /* 1994 */  { MAD_F(0x06209ad8) /* 0.382960171 */, 16 },
-  /* 1995 */  { MAD_F(0x0621a761) /* 0.383216267 */, 16 },
-  /* 1996 */  { MAD_F(0x0622b3f6) /* 0.383472406 */, 16 },
-  /* 1997 */  { MAD_F(0x0623c096) /* 0.383728588 */, 16 },
-  /* 1998 */  { MAD_F(0x0624cd42) /* 0.383984813 */, 16 },
-  /* 1999 */  { MAD_F(0x0625d9f9) /* 0.384241080 */, 16 },
-
-  /* 2000 */  { MAD_F(0x0626e6bc) /* 0.384497391 */, 16 },
-  /* 2001 */  { MAD_F(0x0627f38a) /* 0.384753744 */, 16 },
-  /* 2002 */  { MAD_F(0x06290064) /* 0.385010139 */, 16 },
-  /* 2003 */  { MAD_F(0x062a0d49) /* 0.385266578 */, 16 },
-  /* 2004 */  { MAD_F(0x062b1a3a) /* 0.385523059 */, 16 },
-  /* 2005 */  { MAD_F(0x062c2736) /* 0.385779582 */, 16 },
-  /* 2006 */  { MAD_F(0x062d343d) /* 0.386036149 */, 16 },
-  /* 2007 */  { MAD_F(0x062e4150) /* 0.386292758 */, 16 },
-  /* 2008 */  { MAD_F(0x062f4e6f) /* 0.386549409 */, 16 },
-  /* 2009 */  { MAD_F(0x06305b99) /* 0.386806104 */, 16 },
-  /* 2010 */  { MAD_F(0x063168ce) /* 0.387062840 */, 16 },
-  /* 2011 */  { MAD_F(0x0632760f) /* 0.387319620 */, 16 },
-  /* 2012 */  { MAD_F(0x0633835b) /* 0.387576442 */, 16 },
-  /* 2013 */  { MAD_F(0x063490b2) /* 0.387833306 */, 16 },
-  /* 2014 */  { MAD_F(0x06359e15) /* 0.388090213 */, 16 },
-  /* 2015 */  { MAD_F(0x0636ab83) /* 0.388347163 */, 16 },
-
-  /* 2016 */  { MAD_F(0x0637b8fd) /* 0.388604155 */, 16 },
-  /* 2017 */  { MAD_F(0x0638c682) /* 0.388861190 */, 16 },
-  /* 2018 */  { MAD_F(0x0639d413) /* 0.389118267 */, 16 },
-  /* 2019 */  { MAD_F(0x063ae1af) /* 0.389375386 */, 16 },
-  /* 2020 */  { MAD_F(0x063bef56) /* 0.389632548 */, 16 },
-  /* 2021 */  { MAD_F(0x063cfd09) /* 0.389889752 */, 16 },
-  /* 2022 */  { MAD_F(0x063e0ac7) /* 0.390146999 */, 16 },
-  /* 2023 */  { MAD_F(0x063f1891) /* 0.390404289 */, 16 },
-  /* 2024 */  { MAD_F(0x06402666) /* 0.390661620 */, 16 },
-  /* 2025 */  { MAD_F(0x06413446) /* 0.390918994 */, 16 },
-  /* 2026 */  { MAD_F(0x06424232) /* 0.391176411 */, 16 },
-  /* 2027 */  { MAD_F(0x06435029) /* 0.391433869 */, 16 },
-  /* 2028 */  { MAD_F(0x06445e2b) /* 0.391691371 */, 16 },
-  /* 2029 */  { MAD_F(0x06456c39) /* 0.391948914 */, 16 },
-  /* 2030 */  { MAD_F(0x06467a52) /* 0.392206500 */, 16 },
-  /* 2031 */  { MAD_F(0x06478877) /* 0.392464128 */, 16 },
-
-  /* 2032 */  { MAD_F(0x064896a7) /* 0.392721798 */, 16 },
-  /* 2033 */  { MAD_F(0x0649a4e2) /* 0.392979511 */, 16 },
-  /* 2034 */  { MAD_F(0x064ab328) /* 0.393237266 */, 16 },
-  /* 2035 */  { MAD_F(0x064bc17a) /* 0.393495063 */, 16 },
-  /* 2036 */  { MAD_F(0x064ccfd8) /* 0.393752902 */, 16 },
-  /* 2037 */  { MAD_F(0x064dde40) /* 0.394010784 */, 16 },
-  /* 2038 */  { MAD_F(0x064eecb4) /* 0.394268707 */, 16 },
-  /* 2039 */  { MAD_F(0x064ffb33) /* 0.394526673 */, 16 },
-  /* 2040 */  { MAD_F(0x065109be) /* 0.394784681 */, 16 },
-  /* 2041 */  { MAD_F(0x06521854) /* 0.395042732 */, 16 },
-  /* 2042 */  { MAD_F(0x065326f5) /* 0.395300824 */, 16 },
-  /* 2043 */  { MAD_F(0x065435a1) /* 0.395558959 */, 16 },
-  /* 2044 */  { MAD_F(0x06554459) /* 0.395817135 */, 16 },
-  /* 2045 */  { MAD_F(0x0656531c) /* 0.396075354 */, 16 },
-  /* 2046 */  { MAD_F(0x065761ea) /* 0.396333615 */, 16 },
-  /* 2047 */  { MAD_F(0x065870c4) /* 0.396591918 */, 16 },
-
-  /* 2048 */  { MAD_F(0x06597fa9) /* 0.396850263 */, 16 },
-  /* 2049 */  { MAD_F(0x065a8e99) /* 0.397108650 */, 16 },
-  /* 2050 */  { MAD_F(0x065b9d95) /* 0.397367079 */, 16 },
-  /* 2051 */  { MAD_F(0x065cac9c) /* 0.397625550 */, 16 },
-  /* 2052 */  { MAD_F(0x065dbbae) /* 0.397884063 */, 16 },
-  /* 2053 */  { MAD_F(0x065ecacb) /* 0.398142619 */, 16 },
-  /* 2054 */  { MAD_F(0x065fd9f4) /* 0.398401216 */, 16 },
-  /* 2055 */  { MAD_F(0x0660e928) /* 0.398659855 */, 16 },
-  /* 2056 */  { MAD_F(0x0661f867) /* 0.398918536 */, 16 },
-  /* 2057 */  { MAD_F(0x066307b1) /* 0.399177259 */, 16 },
-  /* 2058 */  { MAD_F(0x06641707) /* 0.399436024 */, 16 },
-  /* 2059 */  { MAD_F(0x06652668) /* 0.399694831 */, 16 },
-  /* 2060 */  { MAD_F(0x066635d4) /* 0.399953679 */, 16 },
-  /* 2061 */  { MAD_F(0x0667454c) /* 0.400212570 */, 16 },
-  /* 2062 */  { MAD_F(0x066854ce) /* 0.400471503 */, 16 },
-  /* 2063 */  { MAD_F(0x0669645c) /* 0.400730477 */, 16 },
-
-  /* 2064 */  { MAD_F(0x066a73f5) /* 0.400989493 */, 16 },
-  /* 2065 */  { MAD_F(0x066b839a) /* 0.401248551 */, 16 },
-  /* 2066 */  { MAD_F(0x066c9349) /* 0.401507651 */, 16 },
-  /* 2067 */  { MAD_F(0x066da304) /* 0.401766793 */, 16 },
-  /* 2068 */  { MAD_F(0x066eb2ca) /* 0.402025976 */, 16 },
-  /* 2069 */  { MAD_F(0x066fc29b) /* 0.402285202 */, 16 },
-  /* 2070 */  { MAD_F(0x0670d278) /* 0.402544469 */, 16 },
-  /* 2071 */  { MAD_F(0x0671e25f) /* 0.402803777 */, 16 },
-  /* 2072 */  { MAD_F(0x0672f252) /* 0.403063128 */, 16 },
-  /* 2073 */  { MAD_F(0x06740250) /* 0.403322520 */, 16 },
-  /* 2074 */  { MAD_F(0x0675125a) /* 0.403581954 */, 16 },
-  /* 2075 */  { MAD_F(0x0676226e) /* 0.403841430 */, 16 },
-  /* 2076 */  { MAD_F(0x0677328e) /* 0.404100947 */, 16 },
-  /* 2077 */  { MAD_F(0x067842b9) /* 0.404360506 */, 16 },
-  /* 2078 */  { MAD_F(0x067952ef) /* 0.404620107 */, 16 },
-  /* 2079 */  { MAD_F(0x067a6330) /* 0.404879749 */, 16 },
-
-  /* 2080 */  { MAD_F(0x067b737c) /* 0.405139433 */, 16 },
-  /* 2081 */  { MAD_F(0x067c83d4) /* 0.405399159 */, 16 },
-  /* 2082 */  { MAD_F(0x067d9436) /* 0.405658926 */, 16 },
-  /* 2083 */  { MAD_F(0x067ea4a4) /* 0.405918735 */, 16 },
-  /* 2084 */  { MAD_F(0x067fb51d) /* 0.406178585 */, 16 },
-  /* 2085 */  { MAD_F(0x0680c5a2) /* 0.406438477 */, 16 },
-  /* 2086 */  { MAD_F(0x0681d631) /* 0.406698410 */, 16 },
-  /* 2087 */  { MAD_F(0x0682e6cb) /* 0.406958385 */, 16 },
-  /* 2088 */  { MAD_F(0x0683f771) /* 0.407218402 */, 16 },
-  /* 2089 */  { MAD_F(0x06850822) /* 0.407478460 */, 16 },
-  /* 2090 */  { MAD_F(0x068618de) /* 0.407738559 */, 16 },
-  /* 2091 */  { MAD_F(0x068729a5) /* 0.407998700 */, 16 },
-  /* 2092 */  { MAD_F(0x06883a77) /* 0.408258883 */, 16 },
-  /* 2093 */  { MAD_F(0x06894b55) /* 0.408519107 */, 16 },
-  /* 2094 */  { MAD_F(0x068a5c3d) /* 0.408779372 */, 16 },
-  /* 2095 */  { MAD_F(0x068b6d31) /* 0.409039679 */, 16 },
-
-  /* 2096 */  { MAD_F(0x068c7e2f) /* 0.409300027 */, 16 },
-  /* 2097 */  { MAD_F(0x068d8f39) /* 0.409560417 */, 16 },
-  /* 2098 */  { MAD_F(0x068ea04e) /* 0.409820848 */, 16 },
-  /* 2099 */  { MAD_F(0x068fb16e) /* 0.410081321 */, 16 },
-  /* 2100 */  { MAD_F(0x0690c299) /* 0.410341834 */, 16 },
-  /* 2101 */  { MAD_F(0x0691d3cf) /* 0.410602390 */, 16 },
-  /* 2102 */  { MAD_F(0x0692e511) /* 0.410862986 */, 16 },
-  /* 2103 */  { MAD_F(0x0693f65d) /* 0.411123624 */, 16 },
-  /* 2104 */  { MAD_F(0x069507b5) /* 0.411384303 */, 16 },
-  /* 2105 */  { MAD_F(0x06961917) /* 0.411645024 */, 16 },
-  /* 2106 */  { MAD_F(0x06972a85) /* 0.411905785 */, 16 },
-  /* 2107 */  { MAD_F(0x06983bfe) /* 0.412166588 */, 16 },
-  /* 2108 */  { MAD_F(0x06994d82) /* 0.412427433 */, 16 },
-  /* 2109 */  { MAD_F(0x069a5f11) /* 0.412688318 */, 16 },
-  /* 2110 */  { MAD_F(0x069b70ab) /* 0.412949245 */, 16 },
-  /* 2111 */  { MAD_F(0x069c8250) /* 0.413210213 */, 16 },
-
-  /* 2112 */  { MAD_F(0x069d9400) /* 0.413471222 */, 16 },
-  /* 2113 */  { MAD_F(0x069ea5bb) /* 0.413732273 */, 16 },
-  /* 2114 */  { MAD_F(0x069fb781) /* 0.413993364 */, 16 },
-  /* 2115 */  { MAD_F(0x06a0c953) /* 0.414254497 */, 16 },
-  /* 2116 */  { MAD_F(0x06a1db2f) /* 0.414515671 */, 16 },
-  /* 2117 */  { MAD_F(0x06a2ed16) /* 0.414776886 */, 16 },
-  /* 2118 */  { MAD_F(0x06a3ff09) /* 0.415038142 */, 16 },
-  /* 2119 */  { MAD_F(0x06a51106) /* 0.415299440 */, 16 },
-  /* 2120 */  { MAD_F(0x06a6230f) /* 0.415560778 */, 16 },
-  /* 2121 */  { MAD_F(0x06a73522) /* 0.415822157 */, 16 },
-  /* 2122 */  { MAD_F(0x06a84741) /* 0.416083578 */, 16 },
-  /* 2123 */  { MAD_F(0x06a9596a) /* 0.416345040 */, 16 },
-  /* 2124 */  { MAD_F(0x06aa6b9f) /* 0.416606542 */, 16 },
-  /* 2125 */  { MAD_F(0x06ab7ddf) /* 0.416868086 */, 16 },
-  /* 2126 */  { MAD_F(0x06ac9029) /* 0.417129671 */, 16 },
-  /* 2127 */  { MAD_F(0x06ada27f) /* 0.417391297 */, 16 },
-
-  /* 2128 */  { MAD_F(0x06aeb4e0) /* 0.417652964 */, 16 },
-  /* 2129 */  { MAD_F(0x06afc74b) /* 0.417914672 */, 16 },
-  /* 2130 */  { MAD_F(0x06b0d9c2) /* 0.418176420 */, 16 },
-  /* 2131 */  { MAD_F(0x06b1ec43) /* 0.418438210 */, 16 },
-  /* 2132 */  { MAD_F(0x06b2fed0) /* 0.418700041 */, 16 },
-  /* 2133 */  { MAD_F(0x06b41168) /* 0.418961912 */, 16 },
-  /* 2134 */  { MAD_F(0x06b5240a) /* 0.419223825 */, 16 },
-  /* 2135 */  { MAD_F(0x06b636b8) /* 0.419485778 */, 16 },
-  /* 2136 */  { MAD_F(0x06b74971) /* 0.419747773 */, 16 },
-  /* 2137 */  { MAD_F(0x06b85c34) /* 0.420009808 */, 16 },
-  /* 2138 */  { MAD_F(0x06b96f03) /* 0.420271884 */, 16 },
-  /* 2139 */  { MAD_F(0x06ba81dc) /* 0.420534001 */, 16 },
-  /* 2140 */  { MAD_F(0x06bb94c1) /* 0.420796159 */, 16 },
-  /* 2141 */  { MAD_F(0x06bca7b0) /* 0.421058358 */, 16 },
-  /* 2142 */  { MAD_F(0x06bdbaaa) /* 0.421320597 */, 16 },
-  /* 2143 */  { MAD_F(0x06becdb0) /* 0.421582878 */, 16 },
-
-  /* 2144 */  { MAD_F(0x06bfe0c0) /* 0.421845199 */, 16 },
-  /* 2145 */  { MAD_F(0x06c0f3db) /* 0.422107561 */, 16 },
-  /* 2146 */  { MAD_F(0x06c20702) /* 0.422369964 */, 16 },
-  /* 2147 */  { MAD_F(0x06c31a33) /* 0.422632407 */, 16 },
-  /* 2148 */  { MAD_F(0x06c42d6f) /* 0.422894891 */, 16 },
-  /* 2149 */  { MAD_F(0x06c540b6) /* 0.423157416 */, 16 },
-  /* 2150 */  { MAD_F(0x06c65408) /* 0.423419982 */, 16 },
-  /* 2151 */  { MAD_F(0x06c76765) /* 0.423682588 */, 16 },
-  /* 2152 */  { MAD_F(0x06c87acc) /* 0.423945235 */, 16 },
-  /* 2153 */  { MAD_F(0x06c98e3f) /* 0.424207923 */, 16 },
-  /* 2154 */  { MAD_F(0x06caa1bd) /* 0.424470652 */, 16 },
-  /* 2155 */  { MAD_F(0x06cbb545) /* 0.424733421 */, 16 },
-  /* 2156 */  { MAD_F(0x06ccc8d9) /* 0.424996230 */, 16 },
-  /* 2157 */  { MAD_F(0x06cddc77) /* 0.425259081 */, 16 },
-  /* 2158 */  { MAD_F(0x06cef020) /* 0.425521972 */, 16 },
-  /* 2159 */  { MAD_F(0x06d003d4) /* 0.425784903 */, 16 },
-
-  /* 2160 */  { MAD_F(0x06d11794) /* 0.426047876 */, 16 },
-  /* 2161 */  { MAD_F(0x06d22b5e) /* 0.426310889 */, 16 },
-  /* 2162 */  { MAD_F(0x06d33f32) /* 0.426573942 */, 16 },
-  /* 2163 */  { MAD_F(0x06d45312) /* 0.426837036 */, 16 },
-  /* 2164 */  { MAD_F(0x06d566fd) /* 0.427100170 */, 16 },
-  /* 2165 */  { MAD_F(0x06d67af2) /* 0.427363345 */, 16 },
-  /* 2166 */  { MAD_F(0x06d78ef3) /* 0.427626561 */, 16 },
-  /* 2167 */  { MAD_F(0x06d8a2fe) /* 0.427889817 */, 16 },
-  /* 2168 */  { MAD_F(0x06d9b714) /* 0.428153114 */, 16 },
-  /* 2169 */  { MAD_F(0x06dacb35) /* 0.428416451 */, 16 },
-  /* 2170 */  { MAD_F(0x06dbdf61) /* 0.428679828 */, 16 },
-  /* 2171 */  { MAD_F(0x06dcf398) /* 0.428943246 */, 16 },
-  /* 2172 */  { MAD_F(0x06de07d9) /* 0.429206704 */, 16 },
-  /* 2173 */  { MAD_F(0x06df1c26) /* 0.429470203 */, 16 },
-  /* 2174 */  { MAD_F(0x06e0307d) /* 0.429733743 */, 16 },
-  /* 2175 */  { MAD_F(0x06e144df) /* 0.429997322 */, 16 },
-
-  /* 2176 */  { MAD_F(0x06e2594c) /* 0.430260942 */, 16 },
-  /* 2177 */  { MAD_F(0x06e36dc4) /* 0.430524603 */, 16 },
-  /* 2178 */  { MAD_F(0x06e48246) /* 0.430788304 */, 16 },
-  /* 2179 */  { MAD_F(0x06e596d4) /* 0.431052045 */, 16 },
-  /* 2180 */  { MAD_F(0x06e6ab6c) /* 0.431315826 */, 16 },
-  /* 2181 */  { MAD_F(0x06e7c00f) /* 0.431579648 */, 16 },
-  /* 2182 */  { MAD_F(0x06e8d4bd) /* 0.431843511 */, 16 },
-  /* 2183 */  { MAD_F(0x06e9e976) /* 0.432107413 */, 16 },
-  /* 2184 */  { MAD_F(0x06eafe3a) /* 0.432371356 */, 16 },
-  /* 2185 */  { MAD_F(0x06ec1308) /* 0.432635339 */, 16 },
-  /* 2186 */  { MAD_F(0x06ed27e2) /* 0.432899362 */, 16 },
-  /* 2187 */  { MAD_F(0x06ee3cc6) /* 0.433163426 */, 16 },
-  /* 2188 */  { MAD_F(0x06ef51b4) /* 0.433427530 */, 16 },
-  /* 2189 */  { MAD_F(0x06f066ae) /* 0.433691674 */, 16 },
-  /* 2190 */  { MAD_F(0x06f17bb3) /* 0.433955859 */, 16 },
-  /* 2191 */  { MAD_F(0x06f290c2) /* 0.434220083 */, 16 },
-
-  /* 2192 */  { MAD_F(0x06f3a5dc) /* 0.434484348 */, 16 },
-  /* 2193 */  { MAD_F(0x06f4bb01) /* 0.434748653 */, 16 },
-  /* 2194 */  { MAD_F(0x06f5d030) /* 0.435012998 */, 16 },
-  /* 2195 */  { MAD_F(0x06f6e56b) /* 0.435277383 */, 16 },
-  /* 2196 */  { MAD_F(0x06f7fab0) /* 0.435541809 */, 16 },
-  /* 2197 */  { MAD_F(0x06f91000) /* 0.435806274 */, 16 },
-  /* 2198 */  { MAD_F(0x06fa255a) /* 0.436070780 */, 16 },
-  /* 2199 */  { MAD_F(0x06fb3ac0) /* 0.436335326 */, 16 },
-  /* 2200 */  { MAD_F(0x06fc5030) /* 0.436599912 */, 16 },
-  /* 2201 */  { MAD_F(0x06fd65ab) /* 0.436864538 */, 16 },
-  /* 2202 */  { MAD_F(0x06fe7b31) /* 0.437129204 */, 16 },
-  /* 2203 */  { MAD_F(0x06ff90c2) /* 0.437393910 */, 16 },
-  /* 2204 */  { MAD_F(0x0700a65d) /* 0.437658657 */, 16 },
-  /* 2205 */  { MAD_F(0x0701bc03) /* 0.437923443 */, 16 },
-  /* 2206 */  { MAD_F(0x0702d1b4) /* 0.438188269 */, 16 },
-  /* 2207 */  { MAD_F(0x0703e76f) /* 0.438453136 */, 16 },
-
-  /* 2208 */  { MAD_F(0x0704fd35) /* 0.438718042 */, 16 },
-  /* 2209 */  { MAD_F(0x07061306) /* 0.438982988 */, 16 },
-  /* 2210 */  { MAD_F(0x070728e2) /* 0.439247975 */, 16 },
-  /* 2211 */  { MAD_F(0x07083ec9) /* 0.439513001 */, 16 },
-  /* 2212 */  { MAD_F(0x070954ba) /* 0.439778067 */, 16 },
-  /* 2213 */  { MAD_F(0x070a6ab6) /* 0.440043173 */, 16 },
-  /* 2214 */  { MAD_F(0x070b80bc) /* 0.440308320 */, 16 },
-  /* 2215 */  { MAD_F(0x070c96ce) /* 0.440573506 */, 16 },
-  /* 2216 */  { MAD_F(0x070dacea) /* 0.440838732 */, 16 },
-  /* 2217 */  { MAD_F(0x070ec310) /* 0.441103997 */, 16 },
-  /* 2218 */  { MAD_F(0x070fd942) /* 0.441369303 */, 16 },
-  /* 2219 */  { MAD_F(0x0710ef7e) /* 0.441634649 */, 16 },
-  /* 2220 */  { MAD_F(0x071205c5) /* 0.441900034 */, 16 },
-  /* 2221 */  { MAD_F(0x07131c17) /* 0.442165460 */, 16 },
-  /* 2222 */  { MAD_F(0x07143273) /* 0.442430925 */, 16 },
-  /* 2223 */  { MAD_F(0x071548da) /* 0.442696430 */, 16 },
-
-  /* 2224 */  { MAD_F(0x07165f4b) /* 0.442961975 */, 16 },
-  /* 2225 */  { MAD_F(0x071775c8) /* 0.443227559 */, 16 },
-  /* 2226 */  { MAD_F(0x07188c4f) /* 0.443493184 */, 16 },
-  /* 2227 */  { MAD_F(0x0719a2e0) /* 0.443758848 */, 16 },
-  /* 2228 */  { MAD_F(0x071ab97d) /* 0.444024552 */, 16 },
-  /* 2229 */  { MAD_F(0x071bd024) /* 0.444290296 */, 16 },
-  /* 2230 */  { MAD_F(0x071ce6d6) /* 0.444556079 */, 16 },
-  /* 2231 */  { MAD_F(0x071dfd92) /* 0.444821902 */, 16 },
-  /* 2232 */  { MAD_F(0x071f1459) /* 0.445087765 */, 16 },
-  /* 2233 */  { MAD_F(0x07202b2b) /* 0.445353668 */, 16 },
-  /* 2234 */  { MAD_F(0x07214207) /* 0.445619610 */, 16 },
-  /* 2235 */  { MAD_F(0x072258ee) /* 0.445885592 */, 16 },
-  /* 2236 */  { MAD_F(0x07236fe0) /* 0.446151614 */, 16 },
-  /* 2237 */  { MAD_F(0x072486dc) /* 0.446417675 */, 16 },
-  /* 2238 */  { MAD_F(0x07259de3) /* 0.446683776 */, 16 },
-  /* 2239 */  { MAD_F(0x0726b4f4) /* 0.446949917 */, 16 },
-
-  /* 2240 */  { MAD_F(0x0727cc11) /* 0.447216097 */, 16 },
-  /* 2241 */  { MAD_F(0x0728e338) /* 0.447482317 */, 16 },
-  /* 2242 */  { MAD_F(0x0729fa69) /* 0.447748576 */, 16 },
-  /* 2243 */  { MAD_F(0x072b11a5) /* 0.448014875 */, 16 },
-  /* 2244 */  { MAD_F(0x072c28ec) /* 0.448281214 */, 16 },
-  /* 2245 */  { MAD_F(0x072d403d) /* 0.448547592 */, 16 },
-  /* 2246 */  { MAD_F(0x072e5799) /* 0.448814010 */, 16 },
-  /* 2247 */  { MAD_F(0x072f6f00) /* 0.449080467 */, 16 },
-  /* 2248 */  { MAD_F(0x07308671) /* 0.449346964 */, 16 },
-  /* 2249 */  { MAD_F(0x07319ded) /* 0.449613501 */, 16 },
-  /* 2250 */  { MAD_F(0x0732b573) /* 0.449880076 */, 16 },
-  /* 2251 */  { MAD_F(0x0733cd04) /* 0.450146692 */, 16 },
-  /* 2252 */  { MAD_F(0x0734e4a0) /* 0.450413347 */, 16 },
-  /* 2253 */  { MAD_F(0x0735fc46) /* 0.450680041 */, 16 },
-  /* 2254 */  { MAD_F(0x073713f7) /* 0.450946775 */, 16 },
-  /* 2255 */  { MAD_F(0x07382bb2) /* 0.451213548 */, 16 },
-
-  /* 2256 */  { MAD_F(0x07394378) /* 0.451480360 */, 16 },
-  /* 2257 */  { MAD_F(0x073a5b49) /* 0.451747213 */, 16 },
-  /* 2258 */  { MAD_F(0x073b7324) /* 0.452014104 */, 16 },
-  /* 2259 */  { MAD_F(0x073c8b0a) /* 0.452281035 */, 16 },
-  /* 2260 */  { MAD_F(0x073da2fa) /* 0.452548005 */, 16 },
-  /* 2261 */  { MAD_F(0x073ebaf5) /* 0.452815015 */, 16 },
-  /* 2262 */  { MAD_F(0x073fd2fa) /* 0.453082064 */, 16 },
-  /* 2263 */  { MAD_F(0x0740eb0a) /* 0.453349152 */, 16 },
-  /* 2264 */  { MAD_F(0x07420325) /* 0.453616280 */, 16 },
-  /* 2265 */  { MAD_F(0x07431b4a) /* 0.453883447 */, 16 },
-  /* 2266 */  { MAD_F(0x0744337a) /* 0.454150653 */, 16 },
-  /* 2267 */  { MAD_F(0x07454bb4) /* 0.454417899 */, 16 },
-  /* 2268 */  { MAD_F(0x074663f8) /* 0.454685184 */, 16 },
-  /* 2269 */  { MAD_F(0x07477c48) /* 0.454952508 */, 16 },
-  /* 2270 */  { MAD_F(0x074894a2) /* 0.455219872 */, 16 },
-  /* 2271 */  { MAD_F(0x0749ad06) /* 0.455487275 */, 16 },
-
-  /* 2272 */  { MAD_F(0x074ac575) /* 0.455754717 */, 16 },
-  /* 2273 */  { MAD_F(0x074bddee) /* 0.456022198 */, 16 },
-  /* 2274 */  { MAD_F(0x074cf672) /* 0.456289719 */, 16 },
-  /* 2275 */  { MAD_F(0x074e0f01) /* 0.456557278 */, 16 },
-  /* 2276 */  { MAD_F(0x074f279a) /* 0.456824877 */, 16 },
-  /* 2277 */  { MAD_F(0x0750403e) /* 0.457092516 */, 16 },
-  /* 2278 */  { MAD_F(0x075158ec) /* 0.457360193 */, 16 },
-  /* 2279 */  { MAD_F(0x075271a4) /* 0.457627909 */, 16 },
-  /* 2280 */  { MAD_F(0x07538a67) /* 0.457895665 */, 16 },
-  /* 2281 */  { MAD_F(0x0754a335) /* 0.458163460 */, 16 },
-  /* 2282 */  { MAD_F(0x0755bc0d) /* 0.458431294 */, 16 },
-  /* 2283 */  { MAD_F(0x0756d4f0) /* 0.458699167 */, 16 },
-  /* 2284 */  { MAD_F(0x0757eddd) /* 0.458967079 */, 16 },
-  /* 2285 */  { MAD_F(0x075906d5) /* 0.459235030 */, 16 },
-  /* 2286 */  { MAD_F(0x075a1fd7) /* 0.459503021 */, 16 },
-  /* 2287 */  { MAD_F(0x075b38e3) /* 0.459771050 */, 16 },
-
-  /* 2288 */  { MAD_F(0x075c51fa) /* 0.460039119 */, 16 },
-  /* 2289 */  { MAD_F(0x075d6b1c) /* 0.460307226 */, 16 },
-  /* 2290 */  { MAD_F(0x075e8448) /* 0.460575373 */, 16 },
-  /* 2291 */  { MAD_F(0x075f9d7f) /* 0.460843559 */, 16 },
-  /* 2292 */  { MAD_F(0x0760b6c0) /* 0.461111783 */, 16 },
-  /* 2293 */  { MAD_F(0x0761d00b) /* 0.461380047 */, 16 },
-  /* 2294 */  { MAD_F(0x0762e961) /* 0.461648350 */, 16 },
-  /* 2295 */  { MAD_F(0x076402c1) /* 0.461916691 */, 16 },
-  /* 2296 */  { MAD_F(0x07651c2c) /* 0.462185072 */, 16 },
-  /* 2297 */  { MAD_F(0x076635a2) /* 0.462453492 */, 16 },
-  /* 2298 */  { MAD_F(0x07674f22) /* 0.462721950 */, 16 },
-  /* 2299 */  { MAD_F(0x076868ac) /* 0.462990448 */, 16 },
-  /* 2300 */  { MAD_F(0x07698240) /* 0.463258984 */, 16 },
-  /* 2301 */  { MAD_F(0x076a9be0) /* 0.463527560 */, 16 },
-  /* 2302 */  { MAD_F(0x076bb589) /* 0.463796174 */, 16 },
-  /* 2303 */  { MAD_F(0x076ccf3d) /* 0.464064827 */, 16 },
-
-  /* 2304 */  { MAD_F(0x076de8fc) /* 0.464333519 */, 16 },
-  /* 2305 */  { MAD_F(0x076f02c5) /* 0.464602250 */, 16 },
-  /* 2306 */  { MAD_F(0x07701c98) /* 0.464871020 */, 16 },
-  /* 2307 */  { MAD_F(0x07713676) /* 0.465139829 */, 16 },
-  /* 2308 */  { MAD_F(0x0772505e) /* 0.465408676 */, 16 },
-  /* 2309 */  { MAD_F(0x07736a51) /* 0.465677563 */, 16 },
-  /* 2310 */  { MAD_F(0x0774844e) /* 0.465946488 */, 16 },
-  /* 2311 */  { MAD_F(0x07759e55) /* 0.466215452 */, 16 },
-  /* 2312 */  { MAD_F(0x0776b867) /* 0.466484455 */, 16 },
-  /* 2313 */  { MAD_F(0x0777d283) /* 0.466753496 */, 16 },
-  /* 2314 */  { MAD_F(0x0778ecaa) /* 0.467022577 */, 16 },
-  /* 2315 */  { MAD_F(0x077a06db) /* 0.467291696 */, 16 },
-  /* 2316 */  { MAD_F(0x077b2117) /* 0.467560854 */, 16 },
-  /* 2317 */  { MAD_F(0x077c3b5d) /* 0.467830050 */, 16 },
-  /* 2318 */  { MAD_F(0x077d55ad) /* 0.468099285 */, 16 },
-  /* 2319 */  { MAD_F(0x077e7008) /* 0.468368560 */, 16 },
-
-  /* 2320 */  { MAD_F(0x077f8a6d) /* 0.468637872 */, 16 },
-  /* 2321 */  { MAD_F(0x0780a4dc) /* 0.468907224 */, 16 },
-  /* 2322 */  { MAD_F(0x0781bf56) /* 0.469176614 */, 16 },
-  /* 2323 */  { MAD_F(0x0782d9da) /* 0.469446043 */, 16 },
-  /* 2324 */  { MAD_F(0x0783f469) /* 0.469715510 */, 16 },
-  /* 2325 */  { MAD_F(0x07850f02) /* 0.469985016 */, 16 },
-  /* 2326 */  { MAD_F(0x078629a5) /* 0.470254561 */, 16 },
-  /* 2327 */  { MAD_F(0x07874453) /* 0.470524145 */, 16 },
-  /* 2328 */  { MAD_F(0x07885f0b) /* 0.470793767 */, 16 },
-  /* 2329 */  { MAD_F(0x078979ce) /* 0.471063427 */, 16 },
-  /* 2330 */  { MAD_F(0x078a949a) /* 0.471333126 */, 16 },
-  /* 2331 */  { MAD_F(0x078baf72) /* 0.471602864 */, 16 },
-  /* 2332 */  { MAD_F(0x078cca53) /* 0.471872641 */, 16 },
-  /* 2333 */  { MAD_F(0x078de53f) /* 0.472142456 */, 16 },
-  /* 2334 */  { MAD_F(0x078f0035) /* 0.472412309 */, 16 },
-  /* 2335 */  { MAD_F(0x07901b36) /* 0.472682201 */, 16 },
-
-  /* 2336 */  { MAD_F(0x07913641) /* 0.472952132 */, 16 },
-  /* 2337 */  { MAD_F(0x07925156) /* 0.473222101 */, 16 },
-  /* 2338 */  { MAD_F(0x07936c76) /* 0.473492108 */, 16 },
-  /* 2339 */  { MAD_F(0x079487a0) /* 0.473762155 */, 16 },
-  /* 2340 */  { MAD_F(0x0795a2d4) /* 0.474032239 */, 16 },
-  /* 2341 */  { MAD_F(0x0796be13) /* 0.474302362 */, 16 },
-  /* 2342 */  { MAD_F(0x0797d95c) /* 0.474572524 */, 16 },
-  /* 2343 */  { MAD_F(0x0798f4af) /* 0.474842724 */, 16 },
-  /* 2344 */  { MAD_F(0x079a100c) /* 0.475112962 */, 16 },
-  /* 2345 */  { MAD_F(0x079b2b74) /* 0.475383239 */, 16 },
-  /* 2346 */  { MAD_F(0x079c46e7) /* 0.475653554 */, 16 },
-  /* 2347 */  { MAD_F(0x079d6263) /* 0.475923908 */, 16 },
-  /* 2348 */  { MAD_F(0x079e7dea) /* 0.476194300 */, 16 },
-  /* 2349 */  { MAD_F(0x079f997b) /* 0.476464731 */, 16 },
-  /* 2350 */  { MAD_F(0x07a0b516) /* 0.476735200 */, 16 },
-  /* 2351 */  { MAD_F(0x07a1d0bc) /* 0.477005707 */, 16 },
-
-  /* 2352 */  { MAD_F(0x07a2ec6c) /* 0.477276252 */, 16 },
-  /* 2353 */  { MAD_F(0x07a40827) /* 0.477546836 */, 16 },
-  /* 2354 */  { MAD_F(0x07a523eb) /* 0.477817459 */, 16 },
-  /* 2355 */  { MAD_F(0x07a63fba) /* 0.478088119 */, 16 },
-  /* 2356 */  { MAD_F(0x07a75b93) /* 0.478358818 */, 16 },
-  /* 2357 */  { MAD_F(0x07a87777) /* 0.478629555 */, 16 },
-  /* 2358 */  { MAD_F(0x07a99364) /* 0.478900331 */, 16 },
-  /* 2359 */  { MAD_F(0x07aaaf5c) /* 0.479171145 */, 16 },
-  /* 2360 */  { MAD_F(0x07abcb5f) /* 0.479441997 */, 16 },
-  /* 2361 */  { MAD_F(0x07ace76b) /* 0.479712887 */, 16 },
-  /* 2362 */  { MAD_F(0x07ae0382) /* 0.479983816 */, 16 },
-  /* 2363 */  { MAD_F(0x07af1fa3) /* 0.480254782 */, 16 },
-  /* 2364 */  { MAD_F(0x07b03bcf) /* 0.480525787 */, 16 },
-  /* 2365 */  { MAD_F(0x07b15804) /* 0.480796831 */, 16 },
-  /* 2366 */  { MAD_F(0x07b27444) /* 0.481067912 */, 16 },
-  /* 2367 */  { MAD_F(0x07b3908e) /* 0.481339032 */, 16 },
-
-  /* 2368 */  { MAD_F(0x07b4ace3) /* 0.481610189 */, 16 },
-  /* 2369 */  { MAD_F(0x07b5c941) /* 0.481881385 */, 16 },
-  /* 2370 */  { MAD_F(0x07b6e5aa) /* 0.482152620 */, 16 },
-  /* 2371 */  { MAD_F(0x07b8021d) /* 0.482423892 */, 16 },
-  /* 2372 */  { MAD_F(0x07b91e9b) /* 0.482695202 */, 16 },
-  /* 2373 */  { MAD_F(0x07ba3b22) /* 0.482966551 */, 16 },
-  /* 2374 */  { MAD_F(0x07bb57b4) /* 0.483237938 */, 16 },
-  /* 2375 */  { MAD_F(0x07bc7450) /* 0.483509362 */, 16 },
-  /* 2376 */  { MAD_F(0x07bd90f6) /* 0.483780825 */, 16 },
-  /* 2377 */  { MAD_F(0x07beada7) /* 0.484052326 */, 16 },
-  /* 2378 */  { MAD_F(0x07bfca61) /* 0.484323865 */, 16 },
-  /* 2379 */  { MAD_F(0x07c0e726) /* 0.484595443 */, 16 },
-  /* 2380 */  { MAD_F(0x07c203f5) /* 0.484867058 */, 16 },
-  /* 2381 */  { MAD_F(0x07c320cf) /* 0.485138711 */, 16 },
-  /* 2382 */  { MAD_F(0x07c43db2) /* 0.485410402 */, 16 },
-  /* 2383 */  { MAD_F(0x07c55aa0) /* 0.485682131 */, 16 },
-
-  /* 2384 */  { MAD_F(0x07c67798) /* 0.485953899 */, 16 },
-  /* 2385 */  { MAD_F(0x07c7949a) /* 0.486225704 */, 16 },
-  /* 2386 */  { MAD_F(0x07c8b1a7) /* 0.486497547 */, 16 },
-  /* 2387 */  { MAD_F(0x07c9cebd) /* 0.486769429 */, 16 },
-  /* 2388 */  { MAD_F(0x07caebde) /* 0.487041348 */, 16 },
-  /* 2389 */  { MAD_F(0x07cc0909) /* 0.487313305 */, 16 },
-  /* 2390 */  { MAD_F(0x07cd263e) /* 0.487585300 */, 16 },
-  /* 2391 */  { MAD_F(0x07ce437d) /* 0.487857333 */, 16 },
-  /* 2392 */  { MAD_F(0x07cf60c7) /* 0.488129404 */, 16 },
-  /* 2393 */  { MAD_F(0x07d07e1b) /* 0.488401513 */, 16 },
-  /* 2394 */  { MAD_F(0x07d19b79) /* 0.488673660 */, 16 },
-  /* 2395 */  { MAD_F(0x07d2b8e1) /* 0.488945845 */, 16 },
-  /* 2396 */  { MAD_F(0x07d3d653) /* 0.489218067 */, 16 },
-  /* 2397 */  { MAD_F(0x07d4f3cf) /* 0.489490328 */, 16 },
-  /* 2398 */  { MAD_F(0x07d61156) /* 0.489762626 */, 16 },
-  /* 2399 */  { MAD_F(0x07d72ee6) /* 0.490034962 */, 16 },
-
-  /* 2400 */  { MAD_F(0x07d84c81) /* 0.490307336 */, 16 },
-  /* 2401 */  { MAD_F(0x07d96a26) /* 0.490579748 */, 16 },
-  /* 2402 */  { MAD_F(0x07da87d5) /* 0.490852198 */, 16 },
-  /* 2403 */  { MAD_F(0x07dba58f) /* 0.491124686 */, 16 },
-  /* 2404 */  { MAD_F(0x07dcc352) /* 0.491397211 */, 16 },
-  /* 2405 */  { MAD_F(0x07dde120) /* 0.491669774 */, 16 },
-  /* 2406 */  { MAD_F(0x07defef7) /* 0.491942375 */, 16 },
-  /* 2407 */  { MAD_F(0x07e01cd9) /* 0.492215014 */, 16 },
-  /* 2408 */  { MAD_F(0x07e13ac5) /* 0.492487690 */, 16 },
-  /* 2409 */  { MAD_F(0x07e258bc) /* 0.492760404 */, 16 },
-  /* 2410 */  { MAD_F(0x07e376bc) /* 0.493033156 */, 16 },
-  /* 2411 */  { MAD_F(0x07e494c6) /* 0.493305946 */, 16 },
-  /* 2412 */  { MAD_F(0x07e5b2db) /* 0.493578773 */, 16 },
-  /* 2413 */  { MAD_F(0x07e6d0f9) /* 0.493851638 */, 16 },
-  /* 2414 */  { MAD_F(0x07e7ef22) /* 0.494124541 */, 16 },
-  /* 2415 */  { MAD_F(0x07e90d55) /* 0.494397481 */, 16 },
-
-  /* 2416 */  { MAD_F(0x07ea2b92) /* 0.494670459 */, 16 },
-  /* 2417 */  { MAD_F(0x07eb49d9) /* 0.494943475 */, 16 },
-  /* 2418 */  { MAD_F(0x07ec682a) /* 0.495216529 */, 16 },
-  /* 2419 */  { MAD_F(0x07ed8686) /* 0.495489620 */, 16 },
-  /* 2420 */  { MAD_F(0x07eea4eb) /* 0.495762748 */, 16 },
-  /* 2421 */  { MAD_F(0x07efc35b) /* 0.496035915 */, 16 },
-  /* 2422 */  { MAD_F(0x07f0e1d4) /* 0.496309119 */, 16 },
-  /* 2423 */  { MAD_F(0x07f20058) /* 0.496582360 */, 16 },
-  /* 2424 */  { MAD_F(0x07f31ee6) /* 0.496855639 */, 16 },
-  /* 2425 */  { MAD_F(0x07f43d7e) /* 0.497128956 */, 16 },
-  /* 2426 */  { MAD_F(0x07f55c20) /* 0.497402310 */, 16 },
-  /* 2427 */  { MAD_F(0x07f67acc) /* 0.497675702 */, 16 },
-  /* 2428 */  { MAD_F(0x07f79982) /* 0.497949132 */, 16 },
-  /* 2429 */  { MAD_F(0x07f8b842) /* 0.498222598 */, 16 },
-  /* 2430 */  { MAD_F(0x07f9d70c) /* 0.498496103 */, 16 },
-  /* 2431 */  { MAD_F(0x07faf5e1) /* 0.498769645 */, 16 },
-
-  /* 2432 */  { MAD_F(0x07fc14bf) /* 0.499043224 */, 16 },
-  /* 2433 */  { MAD_F(0x07fd33a8) /* 0.499316841 */, 16 },
-  /* 2434 */  { MAD_F(0x07fe529a) /* 0.499590496 */, 16 },
-  /* 2435 */  { MAD_F(0x07ff7197) /* 0.499864188 */, 16 },
-  /* 2436 */  { MAD_F(0x0400484f) /* 0.250068959 */, 17 },
-  /* 2437 */  { MAD_F(0x0400d7d7) /* 0.250205842 */, 17 },
-  /* 2438 */  { MAD_F(0x04016764) /* 0.250342744 */, 17 },
-  /* 2439 */  { MAD_F(0x0401f6f7) /* 0.250479665 */, 17 },
-  /* 2440 */  { MAD_F(0x0402868e) /* 0.250616605 */, 17 },
-  /* 2441 */  { MAD_F(0x0403162b) /* 0.250753563 */, 17 },
-  /* 2442 */  { MAD_F(0x0403a5cc) /* 0.250890540 */, 17 },
-  /* 2443 */  { MAD_F(0x04043573) /* 0.251027536 */, 17 },
-  /* 2444 */  { MAD_F(0x0404c51e) /* 0.251164550 */, 17 },
-  /* 2445 */  { MAD_F(0x040554cf) /* 0.251301583 */, 17 },
-  /* 2446 */  { MAD_F(0x0405e484) /* 0.251438635 */, 17 },
-  /* 2447 */  { MAD_F(0x0406743f) /* 0.251575706 */, 17 },
-
-  /* 2448 */  { MAD_F(0x040703ff) /* 0.251712795 */, 17 },
-  /* 2449 */  { MAD_F(0x040793c3) /* 0.251849903 */, 17 },
-  /* 2450 */  { MAD_F(0x0408238d) /* 0.251987029 */, 17 },
-  /* 2451 */  { MAD_F(0x0408b35b) /* 0.252124174 */, 17 },
-  /* 2452 */  { MAD_F(0x0409432f) /* 0.252261338 */, 17 },
-  /* 2453 */  { MAD_F(0x0409d308) /* 0.252398520 */, 17 },
-  /* 2454 */  { MAD_F(0x040a62e5) /* 0.252535721 */, 17 },
-  /* 2455 */  { MAD_F(0x040af2c8) /* 0.252672941 */, 17 },
-  /* 2456 */  { MAD_F(0x040b82b0) /* 0.252810180 */, 17 },
-  /* 2457 */  { MAD_F(0x040c129c) /* 0.252947436 */, 17 },
-  /* 2458 */  { MAD_F(0x040ca28e) /* 0.253084712 */, 17 },
-  /* 2459 */  { MAD_F(0x040d3284) /* 0.253222006 */, 17 },
-  /* 2460 */  { MAD_F(0x040dc280) /* 0.253359319 */, 17 },
-  /* 2461 */  { MAD_F(0x040e5281) /* 0.253496651 */, 17 },
-  /* 2462 */  { MAD_F(0x040ee286) /* 0.253634001 */, 17 },
-  /* 2463 */  { MAD_F(0x040f7291) /* 0.253771369 */, 17 },
-
-  /* 2464 */  { MAD_F(0x041002a1) /* 0.253908756 */, 17 },
-  /* 2465 */  { MAD_F(0x041092b5) /* 0.254046162 */, 17 },
-  /* 2466 */  { MAD_F(0x041122cf) /* 0.254183587 */, 17 },
-  /* 2467 */  { MAD_F(0x0411b2ed) /* 0.254321030 */, 17 },
-  /* 2468 */  { MAD_F(0x04124311) /* 0.254458491 */, 17 },
-  /* 2469 */  { MAD_F(0x0412d339) /* 0.254595971 */, 17 },
-  /* 2470 */  { MAD_F(0x04136367) /* 0.254733470 */, 17 },
-  /* 2471 */  { MAD_F(0x0413f399) /* 0.254870987 */, 17 },
-  /* 2472 */  { MAD_F(0x041483d1) /* 0.255008523 */, 17 },
-  /* 2473 */  { MAD_F(0x0415140d) /* 0.255146077 */, 17 },
-  /* 2474 */  { MAD_F(0x0415a44f) /* 0.255283650 */, 17 },
-  /* 2475 */  { MAD_F(0x04163495) /* 0.255421241 */, 17 },
-  /* 2476 */  { MAD_F(0x0416c4e1) /* 0.255558851 */, 17 },
-  /* 2477 */  { MAD_F(0x04175531) /* 0.255696480 */, 17 },
-  /* 2478 */  { MAD_F(0x0417e586) /* 0.255834127 */, 17 },
-  /* 2479 */  { MAD_F(0x041875e1) /* 0.255971792 */, 17 },
-
-  /* 2480 */  { MAD_F(0x04190640) /* 0.256109476 */, 17 },
-  /* 2481 */  { MAD_F(0x041996a4) /* 0.256247179 */, 17 },
-  /* 2482 */  { MAD_F(0x041a270d) /* 0.256384900 */, 17 },
-  /* 2483 */  { MAD_F(0x041ab77b) /* 0.256522639 */, 17 },
-  /* 2484 */  { MAD_F(0x041b47ef) /* 0.256660397 */, 17 },
-  /* 2485 */  { MAD_F(0x041bd867) /* 0.256798174 */, 17 },
-  /* 2486 */  { MAD_F(0x041c68e4) /* 0.256935969 */, 17 },
-  /* 2487 */  { MAD_F(0x041cf966) /* 0.257073782 */, 17 },
-  /* 2488 */  { MAD_F(0x041d89ed) /* 0.257211614 */, 17 },
-  /* 2489 */  { MAD_F(0x041e1a79) /* 0.257349465 */, 17 },
-  /* 2490 */  { MAD_F(0x041eab0a) /* 0.257487334 */, 17 },
-  /* 2491 */  { MAD_F(0x041f3b9f) /* 0.257625221 */, 17 },
-  /* 2492 */  { MAD_F(0x041fcc3a) /* 0.257763127 */, 17 },
-  /* 2493 */  { MAD_F(0x04205cda) /* 0.257901051 */, 17 },
-  /* 2494 */  { MAD_F(0x0420ed7f) /* 0.258038994 */, 17 },
-  /* 2495 */  { MAD_F(0x04217e28) /* 0.258176955 */, 17 },
-
-  /* 2496 */  { MAD_F(0x04220ed7) /* 0.258314934 */, 17 },
-  /* 2497 */  { MAD_F(0x04229f8a) /* 0.258452932 */, 17 },
-  /* 2498 */  { MAD_F(0x04233043) /* 0.258590948 */, 17 },
-  /* 2499 */  { MAD_F(0x0423c100) /* 0.258728983 */, 17 },
-  /* 2500 */  { MAD_F(0x042451c3) /* 0.258867036 */, 17 },
-  /* 2501 */  { MAD_F(0x0424e28a) /* 0.259005108 */, 17 },
-  /* 2502 */  { MAD_F(0x04257356) /* 0.259143198 */, 17 },
-  /* 2503 */  { MAD_F(0x04260428) /* 0.259281307 */, 17 },
-  /* 2504 */  { MAD_F(0x042694fe) /* 0.259419433 */, 17 },
-  /* 2505 */  { MAD_F(0x042725d9) /* 0.259557579 */, 17 },
-  /* 2506 */  { MAD_F(0x0427b6b9) /* 0.259695742 */, 17 },
-  /* 2507 */  { MAD_F(0x0428479e) /* 0.259833924 */, 17 },
-  /* 2508 */  { MAD_F(0x0428d888) /* 0.259972124 */, 17 },
-  /* 2509 */  { MAD_F(0x04296976) /* 0.260110343 */, 17 },
-  /* 2510 */  { MAD_F(0x0429fa6a) /* 0.260248580 */, 17 },
-  /* 2511 */  { MAD_F(0x042a8b63) /* 0.260386836 */, 17 },
-
-  /* 2512 */  { MAD_F(0x042b1c60) /* 0.260525110 */, 17 },
-  /* 2513 */  { MAD_F(0x042bad63) /* 0.260663402 */, 17 },
-  /* 2514 */  { MAD_F(0x042c3e6a) /* 0.260801712 */, 17 },
-  /* 2515 */  { MAD_F(0x042ccf77) /* 0.260940041 */, 17 },
-  /* 2516 */  { MAD_F(0x042d6088) /* 0.261078388 */, 17 },
-  /* 2517 */  { MAD_F(0x042df19e) /* 0.261216754 */, 17 },
-  /* 2518 */  { MAD_F(0x042e82b9) /* 0.261355137 */, 17 },
-  /* 2519 */  { MAD_F(0x042f13d9) /* 0.261493540 */, 17 },
-  /* 2520 */  { MAD_F(0x042fa4fe) /* 0.261631960 */, 17 },
-  /* 2521 */  { MAD_F(0x04303628) /* 0.261770399 */, 17 },
-  /* 2522 */  { MAD_F(0x0430c757) /* 0.261908856 */, 17 },
-  /* 2523 */  { MAD_F(0x0431588b) /* 0.262047331 */, 17 },
-  /* 2524 */  { MAD_F(0x0431e9c3) /* 0.262185825 */, 17 },
-  /* 2525 */  { MAD_F(0x04327b01) /* 0.262324337 */, 17 },
-  /* 2526 */  { MAD_F(0x04330c43) /* 0.262462867 */, 17 },
-  /* 2527 */  { MAD_F(0x04339d8a) /* 0.262601416 */, 17 },
-
-  /* 2528 */  { MAD_F(0x04342ed7) /* 0.262739982 */, 17 },
-  /* 2529 */  { MAD_F(0x0434c028) /* 0.262878568 */, 17 },
-  /* 2530 */  { MAD_F(0x0435517e) /* 0.263017171 */, 17 },
-  /* 2531 */  { MAD_F(0x0435e2d9) /* 0.263155792 */, 17 },
-  /* 2532 */  { MAD_F(0x04367439) /* 0.263294432 */, 17 },
-  /* 2533 */  { MAD_F(0x0437059e) /* 0.263433090 */, 17 },
-  /* 2534 */  { MAD_F(0x04379707) /* 0.263571767 */, 17 },
-  /* 2535 */  { MAD_F(0x04382876) /* 0.263710461 */, 17 },
-  /* 2536 */  { MAD_F(0x0438b9e9) /* 0.263849174 */, 17 },
-  /* 2537 */  { MAD_F(0x04394b61) /* 0.263987905 */, 17 },
-  /* 2538 */  { MAD_F(0x0439dcdf) /* 0.264126655 */, 17 },
-  /* 2539 */  { MAD_F(0x043a6e61) /* 0.264265422 */, 17 },
-  /* 2540 */  { MAD_F(0x043affe8) /* 0.264404208 */, 17 },
-  /* 2541 */  { MAD_F(0x043b9174) /* 0.264543012 */, 17 },
-  /* 2542 */  { MAD_F(0x043c2305) /* 0.264681834 */, 17 },
-  /* 2543 */  { MAD_F(0x043cb49a) /* 0.264820674 */, 17 },
-
-  /* 2544 */  { MAD_F(0x043d4635) /* 0.264959533 */, 17 },
-  /* 2545 */  { MAD_F(0x043dd7d4) /* 0.265098410 */, 17 },
-  /* 2546 */  { MAD_F(0x043e6979) /* 0.265237305 */, 17 },
-  /* 2547 */  { MAD_F(0x043efb22) /* 0.265376218 */, 17 },
-  /* 2548 */  { MAD_F(0x043f8cd0) /* 0.265515149 */, 17 },
-  /* 2549 */  { MAD_F(0x04401e83) /* 0.265654099 */, 17 },
-  /* 2550 */  { MAD_F(0x0440b03b) /* 0.265793066 */, 17 },
-  /* 2551 */  { MAD_F(0x044141f7) /* 0.265932052 */, 17 },
-  /* 2552 */  { MAD_F(0x0441d3b9) /* 0.266071056 */, 17 },
-  /* 2553 */  { MAD_F(0x04426580) /* 0.266210078 */, 17 },
-  /* 2554 */  { MAD_F(0x0442f74b) /* 0.266349119 */, 17 },
-  /* 2555 */  { MAD_F(0x0443891b) /* 0.266488177 */, 17 },
-  /* 2556 */  { MAD_F(0x04441af0) /* 0.266627254 */, 17 },
-  /* 2557 */  { MAD_F(0x0444acca) /* 0.266766349 */, 17 },
-  /* 2558 */  { MAD_F(0x04453ea9) /* 0.266905462 */, 17 },
-  /* 2559 */  { MAD_F(0x0445d08d) /* 0.267044593 */, 17 },
-
-  /* 2560 */  { MAD_F(0x04466275) /* 0.267183742 */, 17 },
-  /* 2561 */  { MAD_F(0x0446f463) /* 0.267322909 */, 17 },
-  /* 2562 */  { MAD_F(0x04478655) /* 0.267462094 */, 17 },
-  /* 2563 */  { MAD_F(0x0448184c) /* 0.267601298 */, 17 },
-  /* 2564 */  { MAD_F(0x0448aa48) /* 0.267740519 */, 17 },
-  /* 2565 */  { MAD_F(0x04493c49) /* 0.267879759 */, 17 },
-  /* 2566 */  { MAD_F(0x0449ce4f) /* 0.268019017 */, 17 },
-  /* 2567 */  { MAD_F(0x044a6059) /* 0.268158293 */, 17 },
-  /* 2568 */  { MAD_F(0x044af269) /* 0.268297587 */, 17 },
-  /* 2569 */  { MAD_F(0x044b847d) /* 0.268436899 */, 17 },
-  /* 2570 */  { MAD_F(0x044c1696) /* 0.268576229 */, 17 },
-  /* 2571 */  { MAD_F(0x044ca8b4) /* 0.268715577 */, 17 },
-  /* 2572 */  { MAD_F(0x044d3ad7) /* 0.268854943 */, 17 },
-  /* 2573 */  { MAD_F(0x044dccff) /* 0.268994328 */, 17 },
-  /* 2574 */  { MAD_F(0x044e5f2b) /* 0.269133730 */, 17 },
-  /* 2575 */  { MAD_F(0x044ef15d) /* 0.269273150 */, 17 },
-
-  /* 2576 */  { MAD_F(0x044f8393) /* 0.269412589 */, 17 },
-  /* 2577 */  { MAD_F(0x045015ce) /* 0.269552045 */, 17 },
-  /* 2578 */  { MAD_F(0x0450a80e) /* 0.269691520 */, 17 },
-  /* 2579 */  { MAD_F(0x04513a53) /* 0.269831013 */, 17 },
-  /* 2580 */  { MAD_F(0x0451cc9c) /* 0.269970523 */, 17 },
-  /* 2581 */  { MAD_F(0x04525eeb) /* 0.270110052 */, 17 },
-  /* 2582 */  { MAD_F(0x0452f13e) /* 0.270249599 */, 17 },
-  /* 2583 */  { MAD_F(0x04538396) /* 0.270389163 */, 17 },
-  /* 2584 */  { MAD_F(0x045415f3) /* 0.270528746 */, 17 },
-  /* 2585 */  { MAD_F(0x0454a855) /* 0.270668347 */, 17 },
-  /* 2586 */  { MAD_F(0x04553abb) /* 0.270807965 */, 17 },
-  /* 2587 */  { MAD_F(0x0455cd27) /* 0.270947602 */, 17 },
-  /* 2588 */  { MAD_F(0x04565f97) /* 0.271087257 */, 17 },
-  /* 2589 */  { MAD_F(0x0456f20c) /* 0.271226930 */, 17 },
-  /* 2590 */  { MAD_F(0x04578486) /* 0.271366620 */, 17 },
-  /* 2591 */  { MAD_F(0x04581705) /* 0.271506329 */, 17 },
-
-  /* 2592 */  { MAD_F(0x0458a989) /* 0.271646056 */, 17 },
-  /* 2593 */  { MAD_F(0x04593c11) /* 0.271785800 */, 17 },
-  /* 2594 */  { MAD_F(0x0459ce9e) /* 0.271925563 */, 17 },
-  /* 2595 */  { MAD_F(0x045a6130) /* 0.272065343 */, 17 },
-  /* 2596 */  { MAD_F(0x045af3c7) /* 0.272205142 */, 17 },
-  /* 2597 */  { MAD_F(0x045b8663) /* 0.272344958 */, 17 },
-  /* 2598 */  { MAD_F(0x045c1903) /* 0.272484793 */, 17 },
-  /* 2599 */  { MAD_F(0x045caba9) /* 0.272624645 */, 17 },
-  /* 2600 */  { MAD_F(0x045d3e53) /* 0.272764515 */, 17 },
-  /* 2601 */  { MAD_F(0x045dd102) /* 0.272904403 */, 17 },
-  /* 2602 */  { MAD_F(0x045e63b6) /* 0.273044310 */, 17 },
-  /* 2603 */  { MAD_F(0x045ef66e) /* 0.273184234 */, 17 },
-  /* 2604 */  { MAD_F(0x045f892b) /* 0.273324176 */, 17 },
-  /* 2605 */  { MAD_F(0x04601bee) /* 0.273464136 */, 17 },
-  /* 2606 */  { MAD_F(0x0460aeb5) /* 0.273604113 */, 17 },
-  /* 2607 */  { MAD_F(0x04614180) /* 0.273744109 */, 17 },
-
-  /* 2608 */  { MAD_F(0x0461d451) /* 0.273884123 */, 17 },
-  /* 2609 */  { MAD_F(0x04626727) /* 0.274024154 */, 17 },
-  /* 2610 */  { MAD_F(0x0462fa01) /* 0.274164204 */, 17 },
-  /* 2611 */  { MAD_F(0x04638ce0) /* 0.274304271 */, 17 },
-  /* 2612 */  { MAD_F(0x04641fc4) /* 0.274444356 */, 17 },
-  /* 2613 */  { MAD_F(0x0464b2ac) /* 0.274584459 */, 17 },
-  /* 2614 */  { MAD_F(0x0465459a) /* 0.274724580 */, 17 },
-  /* 2615 */  { MAD_F(0x0465d88c) /* 0.274864719 */, 17 },
-  /* 2616 */  { MAD_F(0x04666b83) /* 0.275004875 */, 17 },
-  /* 2617 */  { MAD_F(0x0466fe7f) /* 0.275145050 */, 17 },
-  /* 2618 */  { MAD_F(0x0467917f) /* 0.275285242 */, 17 },
-  /* 2619 */  { MAD_F(0x04682485) /* 0.275425452 */, 17 },
-  /* 2620 */  { MAD_F(0x0468b78f) /* 0.275565681 */, 17 },
-  /* 2621 */  { MAD_F(0x04694a9e) /* 0.275705926 */, 17 },
-  /* 2622 */  { MAD_F(0x0469ddb2) /* 0.275846190 */, 17 },
-  /* 2623 */  { MAD_F(0x046a70ca) /* 0.275986472 */, 17 },
-
-  /* 2624 */  { MAD_F(0x046b03e7) /* 0.276126771 */, 17 },
-  /* 2625 */  { MAD_F(0x046b970a) /* 0.276267088 */, 17 },
-  /* 2626 */  { MAD_F(0x046c2a31) /* 0.276407423 */, 17 },
-  /* 2627 */  { MAD_F(0x046cbd5c) /* 0.276547776 */, 17 },
-  /* 2628 */  { MAD_F(0x046d508d) /* 0.276688147 */, 17 },
-  /* 2629 */  { MAD_F(0x046de3c2) /* 0.276828535 */, 17 },
-  /* 2630 */  { MAD_F(0x046e76fc) /* 0.276968942 */, 17 },
-  /* 2631 */  { MAD_F(0x046f0a3b) /* 0.277109366 */, 17 },
-  /* 2632 */  { MAD_F(0x046f9d7e) /* 0.277249808 */, 17 },
-  /* 2633 */  { MAD_F(0x047030c7) /* 0.277390267 */, 17 },
-  /* 2634 */  { MAD_F(0x0470c414) /* 0.277530745 */, 17 },
-  /* 2635 */  { MAD_F(0x04715766) /* 0.277671240 */, 17 },
-  /* 2636 */  { MAD_F(0x0471eabc) /* 0.277811753 */, 17 },
-  /* 2637 */  { MAD_F(0x04727e18) /* 0.277952284 */, 17 },
-  /* 2638 */  { MAD_F(0x04731178) /* 0.278092832 */, 17 },
-  /* 2639 */  { MAD_F(0x0473a4dd) /* 0.278233399 */, 17 },
-
-  /* 2640 */  { MAD_F(0x04743847) /* 0.278373983 */, 17 },
-  /* 2641 */  { MAD_F(0x0474cbb5) /* 0.278514584 */, 17 },
-  /* 2642 */  { MAD_F(0x04755f29) /* 0.278655204 */, 17 },
-  /* 2643 */  { MAD_F(0x0475f2a1) /* 0.278795841 */, 17 },
-  /* 2644 */  { MAD_F(0x0476861d) /* 0.278936496 */, 17 },
-  /* 2645 */  { MAD_F(0x0477199f) /* 0.279077169 */, 17 },
-  /* 2646 */  { MAD_F(0x0477ad25) /* 0.279217860 */, 17 },
-  /* 2647 */  { MAD_F(0x047840b0) /* 0.279358568 */, 17 },
-  /* 2648 */  { MAD_F(0x0478d440) /* 0.279499294 */, 17 },
-  /* 2649 */  { MAD_F(0x047967d5) /* 0.279640037 */, 17 },
-  /* 2650 */  { MAD_F(0x0479fb6e) /* 0.279780799 */, 17 },
-  /* 2651 */  { MAD_F(0x047a8f0c) /* 0.279921578 */, 17 },
-  /* 2652 */  { MAD_F(0x047b22af) /* 0.280062375 */, 17 },
-  /* 2653 */  { MAD_F(0x047bb657) /* 0.280203189 */, 17 },
-  /* 2654 */  { MAD_F(0x047c4a03) /* 0.280344021 */, 17 },
-  /* 2655 */  { MAD_F(0x047cddb4) /* 0.280484871 */, 17 },
-
-  /* 2656 */  { MAD_F(0x047d716a) /* 0.280625739 */, 17 },
-  /* 2657 */  { MAD_F(0x047e0524) /* 0.280766624 */, 17 },
-  /* 2658 */  { MAD_F(0x047e98e4) /* 0.280907527 */, 17 },
-  /* 2659 */  { MAD_F(0x047f2ca8) /* 0.281048447 */, 17 },
-  /* 2660 */  { MAD_F(0x047fc071) /* 0.281189385 */, 17 },
-  /* 2661 */  { MAD_F(0x0480543e) /* 0.281330341 */, 17 },
-  /* 2662 */  { MAD_F(0x0480e811) /* 0.281471315 */, 17 },
-  /* 2663 */  { MAD_F(0x04817be8) /* 0.281612306 */, 17 },
-  /* 2664 */  { MAD_F(0x04820fc3) /* 0.281753315 */, 17 },
-  /* 2665 */  { MAD_F(0x0482a3a4) /* 0.281894341 */, 17 },
-  /* 2666 */  { MAD_F(0x04833789) /* 0.282035386 */, 17 },
-  /* 2667 */  { MAD_F(0x0483cb73) /* 0.282176447 */, 17 },
-  /* 2668 */  { MAD_F(0x04845f62) /* 0.282317527 */, 17 },
-  /* 2669 */  { MAD_F(0x0484f355) /* 0.282458624 */, 17 },
-  /* 2670 */  { MAD_F(0x0485874d) /* 0.282599738 */, 17 },
-  /* 2671 */  { MAD_F(0x04861b4a) /* 0.282740871 */, 17 },
-
-  /* 2672 */  { MAD_F(0x0486af4c) /* 0.282882021 */, 17 },
-  /* 2673 */  { MAD_F(0x04874352) /* 0.283023188 */, 17 },
-  /* 2674 */  { MAD_F(0x0487d75d) /* 0.283164373 */, 17 },
-  /* 2675 */  { MAD_F(0x04886b6d) /* 0.283305576 */, 17 },
-  /* 2676 */  { MAD_F(0x0488ff82) /* 0.283446796 */, 17 },
-  /* 2677 */  { MAD_F(0x0489939b) /* 0.283588034 */, 17 },
-  /* 2678 */  { MAD_F(0x048a27b9) /* 0.283729290 */, 17 },
-  /* 2679 */  { MAD_F(0x048abbdc) /* 0.283870563 */, 17 },
-  /* 2680 */  { MAD_F(0x048b5003) /* 0.284011853 */, 17 },
-  /* 2681 */  { MAD_F(0x048be42f) /* 0.284153161 */, 17 },
-  /* 2682 */  { MAD_F(0x048c7860) /* 0.284294487 */, 17 },
-  /* 2683 */  { MAD_F(0x048d0c96) /* 0.284435831 */, 17 },
-  /* 2684 */  { MAD_F(0x048da0d0) /* 0.284577192 */, 17 },
-  /* 2685 */  { MAD_F(0x048e350f) /* 0.284718570 */, 17 },
-  /* 2686 */  { MAD_F(0x048ec953) /* 0.284859966 */, 17 },
-  /* 2687 */  { MAD_F(0x048f5d9b) /* 0.285001380 */, 17 },
-
-  /* 2688 */  { MAD_F(0x048ff1e8) /* 0.285142811 */, 17 },
-  /* 2689 */  { MAD_F(0x0490863a) /* 0.285284259 */, 17 },
-  /* 2690 */  { MAD_F(0x04911a91) /* 0.285425726 */, 17 },
-  /* 2691 */  { MAD_F(0x0491aeec) /* 0.285567209 */, 17 },
-  /* 2692 */  { MAD_F(0x0492434c) /* 0.285708711 */, 17 },
-  /* 2693 */  { MAD_F(0x0492d7b0) /* 0.285850229 */, 17 },
-  /* 2694 */  { MAD_F(0x04936c1a) /* 0.285991766 */, 17 },
-  /* 2695 */  { MAD_F(0x04940088) /* 0.286133319 */, 17 },
-  /* 2696 */  { MAD_F(0x049494fb) /* 0.286274891 */, 17 },
-  /* 2697 */  { MAD_F(0x04952972) /* 0.286416480 */, 17 },
-  /* 2698 */  { MAD_F(0x0495bdee) /* 0.286558086 */, 17 },
-  /* 2699 */  { MAD_F(0x0496526f) /* 0.286699710 */, 17 },
-  /* 2700 */  { MAD_F(0x0496e6f5) /* 0.286841351 */, 17 },
-  /* 2701 */  { MAD_F(0x04977b7f) /* 0.286983010 */, 17 },
-  /* 2702 */  { MAD_F(0x0498100e) /* 0.287124686 */, 17 },
-  /* 2703 */  { MAD_F(0x0498a4a1) /* 0.287266380 */, 17 },
-
-  /* 2704 */  { MAD_F(0x0499393a) /* 0.287408091 */, 17 },
-  /* 2705 */  { MAD_F(0x0499cdd7) /* 0.287549820 */, 17 },
-  /* 2706 */  { MAD_F(0x049a6278) /* 0.287691566 */, 17 },
-  /* 2707 */  { MAD_F(0x049af71f) /* 0.287833330 */, 17 },
-  /* 2708 */  { MAD_F(0x049b8bca) /* 0.287975111 */, 17 },
-  /* 2709 */  { MAD_F(0x049c207a) /* 0.288116909 */, 17 },
-  /* 2710 */  { MAD_F(0x049cb52e) /* 0.288258725 */, 17 },
-  /* 2711 */  { MAD_F(0x049d49e7) /* 0.288400559 */, 17 },
-  /* 2712 */  { MAD_F(0x049ddea5) /* 0.288542409 */, 17 },
-  /* 2713 */  { MAD_F(0x049e7367) /* 0.288684278 */, 17 },
-  /* 2714 */  { MAD_F(0x049f082f) /* 0.288826163 */, 17 },
-  /* 2715 */  { MAD_F(0x049f9cfa) /* 0.288968067 */, 17 },
-  /* 2716 */  { MAD_F(0x04a031cb) /* 0.289109987 */, 17 },
-  /* 2717 */  { MAD_F(0x04a0c6a0) /* 0.289251925 */, 17 },
-  /* 2718 */  { MAD_F(0x04a15b7a) /* 0.289393881 */, 17 },
-  /* 2719 */  { MAD_F(0x04a1f059) /* 0.289535854 */, 17 },
-
-  /* 2720 */  { MAD_F(0x04a2853c) /* 0.289677844 */, 17 },
-  /* 2721 */  { MAD_F(0x04a31a24) /* 0.289819851 */, 17 },
-  /* 2722 */  { MAD_F(0x04a3af10) /* 0.289961876 */, 17 },
-  /* 2723 */  { MAD_F(0x04a44401) /* 0.290103919 */, 17 },
-  /* 2724 */  { MAD_F(0x04a4d8f7) /* 0.290245979 */, 17 },
-  /* 2725 */  { MAD_F(0x04a56df2) /* 0.290388056 */, 17 },
-  /* 2726 */  { MAD_F(0x04a602f1) /* 0.290530150 */, 17 },
-  /* 2727 */  { MAD_F(0x04a697f5) /* 0.290672262 */, 17 },
-  /* 2728 */  { MAD_F(0x04a72cfe) /* 0.290814392 */, 17 },
-  /* 2729 */  { MAD_F(0x04a7c20b) /* 0.290956538 */, 17 },
-  /* 2730 */  { MAD_F(0x04a8571d) /* 0.291098703 */, 17 },
-  /* 2731 */  { MAD_F(0x04a8ec33) /* 0.291240884 */, 17 },
-  /* 2732 */  { MAD_F(0x04a9814e) /* 0.291383083 */, 17 },
-  /* 2733 */  { MAD_F(0x04aa166e) /* 0.291525299 */, 17 },
-  /* 2734 */  { MAD_F(0x04aaab93) /* 0.291667532 */, 17 },
-  /* 2735 */  { MAD_F(0x04ab40bc) /* 0.291809783 */, 17 },
-
-  /* 2736 */  { MAD_F(0x04abd5ea) /* 0.291952051 */, 17 },
-  /* 2737 */  { MAD_F(0x04ac6b1c) /* 0.292094337 */, 17 },
-  /* 2738 */  { MAD_F(0x04ad0053) /* 0.292236640 */, 17 },
-  /* 2739 */  { MAD_F(0x04ad958f) /* 0.292378960 */, 17 },
-  /* 2740 */  { MAD_F(0x04ae2ad0) /* 0.292521297 */, 17 },
-  /* 2741 */  { MAD_F(0x04aec015) /* 0.292663652 */, 17 },
-  /* 2742 */  { MAD_F(0x04af555e) /* 0.292806024 */, 17 },
-  /* 2743 */  { MAD_F(0x04afeaad) /* 0.292948414 */, 17 },
-  /* 2744 */  { MAD_F(0x04b08000) /* 0.293090820 */, 17 },
-  /* 2745 */  { MAD_F(0x04b11557) /* 0.293233244 */, 17 },
-  /* 2746 */  { MAD_F(0x04b1aab4) /* 0.293375686 */, 17 },
-  /* 2747 */  { MAD_F(0x04b24015) /* 0.293518144 */, 17 },
-  /* 2748 */  { MAD_F(0x04b2d57a) /* 0.293660620 */, 17 },
-  /* 2749 */  { MAD_F(0x04b36ae4) /* 0.293803113 */, 17 },
-  /* 2750 */  { MAD_F(0x04b40053) /* 0.293945624 */, 17 },
-  /* 2751 */  { MAD_F(0x04b495c7) /* 0.294088151 */, 17 },
-
-  /* 2752 */  { MAD_F(0x04b52b3f) /* 0.294230696 */, 17 },
-  /* 2753 */  { MAD_F(0x04b5c0bc) /* 0.294373259 */, 17 },
-  /* 2754 */  { MAD_F(0x04b6563d) /* 0.294515838 */, 17 },
-  /* 2755 */  { MAD_F(0x04b6ebc3) /* 0.294658435 */, 17 },
-  /* 2756 */  { MAD_F(0x04b7814e) /* 0.294801049 */, 17 },
-  /* 2757 */  { MAD_F(0x04b816dd) /* 0.294943680 */, 17 },
-  /* 2758 */  { MAD_F(0x04b8ac71) /* 0.295086329 */, 17 },
-  /* 2759 */  { MAD_F(0x04b9420a) /* 0.295228995 */, 17 },
-  /* 2760 */  { MAD_F(0x04b9d7a7) /* 0.295371678 */, 17 },
-  /* 2761 */  { MAD_F(0x04ba6d49) /* 0.295514378 */, 17 },
-  /* 2762 */  { MAD_F(0x04bb02ef) /* 0.295657095 */, 17 },
-  /* 2763 */  { MAD_F(0x04bb989a) /* 0.295799830 */, 17 },
-  /* 2764 */  { MAD_F(0x04bc2e4a) /* 0.295942582 */, 17 },
-  /* 2765 */  { MAD_F(0x04bcc3fe) /* 0.296085351 */, 17 },
-  /* 2766 */  { MAD_F(0x04bd59b7) /* 0.296228138 */, 17 },
-  /* 2767 */  { MAD_F(0x04bdef74) /* 0.296370941 */, 17 },
-
-  /* 2768 */  { MAD_F(0x04be8537) /* 0.296513762 */, 17 },
-  /* 2769 */  { MAD_F(0x04bf1afd) /* 0.296656600 */, 17 },
-  /* 2770 */  { MAD_F(0x04bfb0c9) /* 0.296799455 */, 17 },
-  /* 2771 */  { MAD_F(0x04c04699) /* 0.296942327 */, 17 },
-  /* 2772 */  { MAD_F(0x04c0dc6d) /* 0.297085217 */, 17 },
-  /* 2773 */  { MAD_F(0x04c17247) /* 0.297228124 */, 17 },
-  /* 2774 */  { MAD_F(0x04c20824) /* 0.297371048 */, 17 },
-  /* 2775 */  { MAD_F(0x04c29e07) /* 0.297513989 */, 17 },
-  /* 2776 */  { MAD_F(0x04c333ee) /* 0.297656947 */, 17 },
-  /* 2777 */  { MAD_F(0x04c3c9da) /* 0.297799922 */, 17 },
-  /* 2778 */  { MAD_F(0x04c45fca) /* 0.297942915 */, 17 },
-  /* 2779 */  { MAD_F(0x04c4f5bf) /* 0.298085925 */, 17 },
-  /* 2780 */  { MAD_F(0x04c58bb8) /* 0.298228951 */, 17 },
-  /* 2781 */  { MAD_F(0x04c621b6) /* 0.298371996 */, 17 },
-  /* 2782 */  { MAD_F(0x04c6b7b9) /* 0.298515057 */, 17 },
-  /* 2783 */  { MAD_F(0x04c74dc0) /* 0.298658135 */, 17 },
-
-  /* 2784 */  { MAD_F(0x04c7e3cc) /* 0.298801231 */, 17 },
-  /* 2785 */  { MAD_F(0x04c879dd) /* 0.298944343 */, 17 },
-  /* 2786 */  { MAD_F(0x04c90ff2) /* 0.299087473 */, 17 },
-  /* 2787 */  { MAD_F(0x04c9a60c) /* 0.299230620 */, 17 },
-  /* 2788 */  { MAD_F(0x04ca3c2a) /* 0.299373784 */, 17 },
-  /* 2789 */  { MAD_F(0x04cad24d) /* 0.299516965 */, 17 },
-  /* 2790 */  { MAD_F(0x04cb6874) /* 0.299660163 */, 17 },
-  /* 2791 */  { MAD_F(0x04cbfea0) /* 0.299803378 */, 17 },
-  /* 2792 */  { MAD_F(0x04cc94d1) /* 0.299946611 */, 17 },
-  /* 2793 */  { MAD_F(0x04cd2b06) /* 0.300089860 */, 17 },
-  /* 2794 */  { MAD_F(0x04cdc140) /* 0.300233127 */, 17 },
-  /* 2795 */  { MAD_F(0x04ce577f) /* 0.300376411 */, 17 },
-  /* 2796 */  { MAD_F(0x04ceedc2) /* 0.300519711 */, 17 },
-  /* 2797 */  { MAD_F(0x04cf8409) /* 0.300663029 */, 17 },
-  /* 2798 */  { MAD_F(0x04d01a55) /* 0.300806364 */, 17 },
-  /* 2799 */  { MAD_F(0x04d0b0a6) /* 0.300949716 */, 17 },
-
-  /* 2800 */  { MAD_F(0x04d146fb) /* 0.301093085 */, 17 },
-  /* 2801 */  { MAD_F(0x04d1dd55) /* 0.301236472 */, 17 },
-  /* 2802 */  { MAD_F(0x04d273b4) /* 0.301379875 */, 17 },
-  /* 2803 */  { MAD_F(0x04d30a17) /* 0.301523295 */, 17 },
-  /* 2804 */  { MAD_F(0x04d3a07f) /* 0.301666733 */, 17 },
-  /* 2805 */  { MAD_F(0x04d436eb) /* 0.301810187 */, 17 },
-  /* 2806 */  { MAD_F(0x04d4cd5c) /* 0.301953659 */, 17 },
-  /* 2807 */  { MAD_F(0x04d563d1) /* 0.302097147 */, 17 },
-  /* 2808 */  { MAD_F(0x04d5fa4b) /* 0.302240653 */, 17 },
-  /* 2809 */  { MAD_F(0x04d690ca) /* 0.302384175 */, 17 },
-  /* 2810 */  { MAD_F(0x04d7274d) /* 0.302527715 */, 17 },
-  /* 2811 */  { MAD_F(0x04d7bdd5) /* 0.302671271 */, 17 },
-  /* 2812 */  { MAD_F(0x04d85461) /* 0.302814845 */, 17 },
-  /* 2813 */  { MAD_F(0x04d8eaf2) /* 0.302958436 */, 17 },
-  /* 2814 */  { MAD_F(0x04d98187) /* 0.303102044 */, 17 },
-  /* 2815 */  { MAD_F(0x04da1821) /* 0.303245668 */, 17 },
-
-  /* 2816 */  { MAD_F(0x04daaec0) /* 0.303389310 */, 17 },
-  /* 2817 */  { MAD_F(0x04db4563) /* 0.303532969 */, 17 },
-  /* 2818 */  { MAD_F(0x04dbdc0a) /* 0.303676645 */, 17 },
-  /* 2819 */  { MAD_F(0x04dc72b7) /* 0.303820337 */, 17 },
-  /* 2820 */  { MAD_F(0x04dd0967) /* 0.303964047 */, 17 },
-  /* 2821 */  { MAD_F(0x04dda01d) /* 0.304107774 */, 17 },
-  /* 2822 */  { MAD_F(0x04de36d7) /* 0.304251517 */, 17 },
-  /* 2823 */  { MAD_F(0x04decd95) /* 0.304395278 */, 17 },
-  /* 2824 */  { MAD_F(0x04df6458) /* 0.304539056 */, 17 },
-  /* 2825 */  { MAD_F(0x04dffb20) /* 0.304682850 */, 17 },
-  /* 2826 */  { MAD_F(0x04e091ec) /* 0.304826662 */, 17 },
-  /* 2827 */  { MAD_F(0x04e128bc) /* 0.304970491 */, 17 },
-  /* 2828 */  { MAD_F(0x04e1bf92) /* 0.305114336 */, 17 },
-  /* 2829 */  { MAD_F(0x04e2566b) /* 0.305258199 */, 17 },
-  /* 2830 */  { MAD_F(0x04e2ed4a) /* 0.305402078 */, 17 },
-  /* 2831 */  { MAD_F(0x04e3842d) /* 0.305545974 */, 17 },
-
-  /* 2832 */  { MAD_F(0x04e41b14) /* 0.305689888 */, 17 },
-  /* 2833 */  { MAD_F(0x04e4b200) /* 0.305833818 */, 17 },
-  /* 2834 */  { MAD_F(0x04e548f1) /* 0.305977765 */, 17 },
-  /* 2835 */  { MAD_F(0x04e5dfe6) /* 0.306121729 */, 17 },
-  /* 2836 */  { MAD_F(0x04e676df) /* 0.306265710 */, 17 },
-  /* 2837 */  { MAD_F(0x04e70dde) /* 0.306409708 */, 17 },
-  /* 2838 */  { MAD_F(0x04e7a4e0) /* 0.306553723 */, 17 },
-  /* 2839 */  { MAD_F(0x04e83be7) /* 0.306697755 */, 17 },
-  /* 2840 */  { MAD_F(0x04e8d2f3) /* 0.306841804 */, 17 },
-  /* 2841 */  { MAD_F(0x04e96a04) /* 0.306985869 */, 17 },
-  /* 2842 */  { MAD_F(0x04ea0118) /* 0.307129952 */, 17 },
-  /* 2843 */  { MAD_F(0x04ea9832) /* 0.307274051 */, 17 },
-  /* 2844 */  { MAD_F(0x04eb2f50) /* 0.307418168 */, 17 },
-  /* 2845 */  { MAD_F(0x04ebc672) /* 0.307562301 */, 17 },
-  /* 2846 */  { MAD_F(0x04ec5d99) /* 0.307706451 */, 17 },
-  /* 2847 */  { MAD_F(0x04ecf4c5) /* 0.307850618 */, 17 },
-
-  /* 2848 */  { MAD_F(0x04ed8bf5) /* 0.307994802 */, 17 },
-  /* 2849 */  { MAD_F(0x04ee2329) /* 0.308139003 */, 17 },
-  /* 2850 */  { MAD_F(0x04eeba63) /* 0.308283220 */, 17 },
-  /* 2851 */  { MAD_F(0x04ef51a0) /* 0.308427455 */, 17 },
-  /* 2852 */  { MAD_F(0x04efe8e2) /* 0.308571706 */, 17 },
-  /* 2853 */  { MAD_F(0x04f08029) /* 0.308715974 */, 17 },
-  /* 2854 */  { MAD_F(0x04f11774) /* 0.308860260 */, 17 },
-  /* 2855 */  { MAD_F(0x04f1aec4) /* 0.309004561 */, 17 },
-  /* 2856 */  { MAD_F(0x04f24618) /* 0.309148880 */, 17 },
-  /* 2857 */  { MAD_F(0x04f2dd71) /* 0.309293216 */, 17 },
-  /* 2858 */  { MAD_F(0x04f374cf) /* 0.309437568 */, 17 },
-  /* 2859 */  { MAD_F(0x04f40c30) /* 0.309581938 */, 17 },
-  /* 2860 */  { MAD_F(0x04f4a397) /* 0.309726324 */, 17 },
-  /* 2861 */  { MAD_F(0x04f53b02) /* 0.309870727 */, 17 },
-  /* 2862 */  { MAD_F(0x04f5d271) /* 0.310015147 */, 17 },
-  /* 2863 */  { MAD_F(0x04f669e5) /* 0.310159583 */, 17 },
-
-  /* 2864 */  { MAD_F(0x04f7015d) /* 0.310304037 */, 17 },
-  /* 2865 */  { MAD_F(0x04f798da) /* 0.310448507 */, 17 },
-  /* 2866 */  { MAD_F(0x04f8305c) /* 0.310592994 */, 17 },
-  /* 2867 */  { MAD_F(0x04f8c7e2) /* 0.310737498 */, 17 },
-  /* 2868 */  { MAD_F(0x04f95f6c) /* 0.310882018 */, 17 },
-  /* 2869 */  { MAD_F(0x04f9f6fb) /* 0.311026556 */, 17 },
-  /* 2870 */  { MAD_F(0x04fa8e8f) /* 0.311171110 */, 17 },
-  /* 2871 */  { MAD_F(0x04fb2627) /* 0.311315681 */, 17 },
-  /* 2872 */  { MAD_F(0x04fbbdc3) /* 0.311460269 */, 17 },
-  /* 2873 */  { MAD_F(0x04fc5564) /* 0.311604874 */, 17 },
-  /* 2874 */  { MAD_F(0x04fced0a) /* 0.311749495 */, 17 },
-  /* 2875 */  { MAD_F(0x04fd84b4) /* 0.311894133 */, 17 },
-  /* 2876 */  { MAD_F(0x04fe1c62) /* 0.312038788 */, 17 },
-  /* 2877 */  { MAD_F(0x04feb415) /* 0.312183460 */, 17 },
-  /* 2878 */  { MAD_F(0x04ff4bcd) /* 0.312328148 */, 17 },
-  /* 2879 */  { MAD_F(0x04ffe389) /* 0.312472854 */, 17 },
-
-  /* 2880 */  { MAD_F(0x05007b49) /* 0.312617576 */, 17 },
-  /* 2881 */  { MAD_F(0x0501130e) /* 0.312762314 */, 17 },
-  /* 2882 */  { MAD_F(0x0501aad8) /* 0.312907070 */, 17 },
-  /* 2883 */  { MAD_F(0x050242a6) /* 0.313051842 */, 17 },
-  /* 2884 */  { MAD_F(0x0502da78) /* 0.313196631 */, 17 },
-  /* 2885 */  { MAD_F(0x0503724f) /* 0.313341437 */, 17 },
-  /* 2886 */  { MAD_F(0x05040a2b) /* 0.313486259 */, 17 },
-  /* 2887 */  { MAD_F(0x0504a20b) /* 0.313631098 */, 17 },
-  /* 2888 */  { MAD_F(0x050539ef) /* 0.313775954 */, 17 },
-  /* 2889 */  { MAD_F(0x0505d1d8) /* 0.313920827 */, 17 },
-  /* 2890 */  { MAD_F(0x050669c5) /* 0.314065716 */, 17 },
-  /* 2891 */  { MAD_F(0x050701b7) /* 0.314210622 */, 17 },
-  /* 2892 */  { MAD_F(0x050799ae) /* 0.314355545 */, 17 },
-  /* 2893 */  { MAD_F(0x050831a9) /* 0.314500484 */, 17 },
-  /* 2894 */  { MAD_F(0x0508c9a8) /* 0.314645440 */, 17 },
-  /* 2895 */  { MAD_F(0x050961ac) /* 0.314790413 */, 17 },
-
-  /* 2896 */  { MAD_F(0x0509f9b4) /* 0.314935403 */, 17 },
-  /* 2897 */  { MAD_F(0x050a91c1) /* 0.315080409 */, 17 },
-  /* 2898 */  { MAD_F(0x050b29d2) /* 0.315225432 */, 17 },
-  /* 2899 */  { MAD_F(0x050bc1e8) /* 0.315370472 */, 17 },
-  /* 2900 */  { MAD_F(0x050c5a02) /* 0.315515528 */, 17 },
-  /* 2901 */  { MAD_F(0x050cf221) /* 0.315660601 */, 17 },
-  /* 2902 */  { MAD_F(0x050d8a44) /* 0.315805690 */, 17 },
-  /* 2903 */  { MAD_F(0x050e226c) /* 0.315950797 */, 17 },
-  /* 2904 */  { MAD_F(0x050eba98) /* 0.316095920 */, 17 },
-  /* 2905 */  { MAD_F(0x050f52c9) /* 0.316241059 */, 17 },
-  /* 2906 */  { MAD_F(0x050feafe) /* 0.316386216 */, 17 },
-  /* 2907 */  { MAD_F(0x05108337) /* 0.316531388 */, 17 },
-  /* 2908 */  { MAD_F(0x05111b75) /* 0.316676578 */, 17 },
-  /* 2909 */  { MAD_F(0x0511b3b8) /* 0.316821784 */, 17 },
-  /* 2910 */  { MAD_F(0x05124bff) /* 0.316967007 */, 17 },
-  /* 2911 */  { MAD_F(0x0512e44a) /* 0.317112247 */, 17 },
-
-  /* 2912 */  { MAD_F(0x05137c9a) /* 0.317257503 */, 17 },
-  /* 2913 */  { MAD_F(0x051414ee) /* 0.317402775 */, 17 },
-  /* 2914 */  { MAD_F(0x0514ad47) /* 0.317548065 */, 17 },
-  /* 2915 */  { MAD_F(0x051545a5) /* 0.317693371 */, 17 },
-  /* 2916 */  { MAD_F(0x0515de06) /* 0.317838693 */, 17 },
-  /* 2917 */  { MAD_F(0x0516766d) /* 0.317984033 */, 17 },
-  /* 2918 */  { MAD_F(0x05170ed7) /* 0.318129388 */, 17 },
-  /* 2919 */  { MAD_F(0x0517a746) /* 0.318274761 */, 17 },
-  /* 2920 */  { MAD_F(0x05183fba) /* 0.318420150 */, 17 },
-  /* 2921 */  { MAD_F(0x0518d832) /* 0.318565555 */, 17 },
-  /* 2922 */  { MAD_F(0x051970ae) /* 0.318710978 */, 17 },
-  /* 2923 */  { MAD_F(0x051a092f) /* 0.318856416 */, 17 },
-  /* 2924 */  { MAD_F(0x051aa1b5) /* 0.319001872 */, 17 },
-  /* 2925 */  { MAD_F(0x051b3a3f) /* 0.319147344 */, 17 },
-  /* 2926 */  { MAD_F(0x051bd2cd) /* 0.319292832 */, 17 },
-  /* 2927 */  { MAD_F(0x051c6b60) /* 0.319438338 */, 17 },
-
-  /* 2928 */  { MAD_F(0x051d03f7) /* 0.319583859 */, 17 },
-  /* 2929 */  { MAD_F(0x051d9c92) /* 0.319729398 */, 17 },
-  /* 2930 */  { MAD_F(0x051e3532) /* 0.319874952 */, 17 },
-  /* 2931 */  { MAD_F(0x051ecdd7) /* 0.320020524 */, 17 },
-  /* 2932 */  { MAD_F(0x051f6680) /* 0.320166112 */, 17 },
-  /* 2933 */  { MAD_F(0x051fff2d) /* 0.320311716 */, 17 },
-  /* 2934 */  { MAD_F(0x052097df) /* 0.320457337 */, 17 },
-  /* 2935 */  { MAD_F(0x05213095) /* 0.320602975 */, 17 },
-  /* 2936 */  { MAD_F(0x0521c950) /* 0.320748629 */, 17 },
-  /* 2937 */  { MAD_F(0x0522620f) /* 0.320894300 */, 17 },
-  /* 2938 */  { MAD_F(0x0522fad3) /* 0.321039987 */, 17 },
-  /* 2939 */  { MAD_F(0x0523939b) /* 0.321185691 */, 17 },
-  /* 2940 */  { MAD_F(0x05242c68) /* 0.321331411 */, 17 },
-  /* 2941 */  { MAD_F(0x0524c538) /* 0.321477148 */, 17 },
-  /* 2942 */  { MAD_F(0x05255e0e) /* 0.321622901 */, 17 },
-  /* 2943 */  { MAD_F(0x0525f6e8) /* 0.321768671 */, 17 },
-
-  /* 2944 */  { MAD_F(0x05268fc6) /* 0.321914457 */, 17 },
-  /* 2945 */  { MAD_F(0x052728a9) /* 0.322060260 */, 17 },
-  /* 2946 */  { MAD_F(0x0527c190) /* 0.322206079 */, 17 },
-  /* 2947 */  { MAD_F(0x05285a7b) /* 0.322351915 */, 17 },
-  /* 2948 */  { MAD_F(0x0528f36b) /* 0.322497768 */, 17 },
-  /* 2949 */  { MAD_F(0x05298c5f) /* 0.322643636 */, 17 },
-  /* 2950 */  { MAD_F(0x052a2558) /* 0.322789522 */, 17 },
-  /* 2951 */  { MAD_F(0x052abe55) /* 0.322935424 */, 17 },
-  /* 2952 */  { MAD_F(0x052b5757) /* 0.323081342 */, 17 },
-  /* 2953 */  { MAD_F(0x052bf05d) /* 0.323227277 */, 17 },
-  /* 2954 */  { MAD_F(0x052c8968) /* 0.323373228 */, 17 },
-  /* 2955 */  { MAD_F(0x052d2277) /* 0.323519196 */, 17 },
-  /* 2956 */  { MAD_F(0x052dbb8a) /* 0.323665180 */, 17 },
-  /* 2957 */  { MAD_F(0x052e54a2) /* 0.323811180 */, 17 },
-  /* 2958 */  { MAD_F(0x052eedbe) /* 0.323957197 */, 17 },
-  /* 2959 */  { MAD_F(0x052f86de) /* 0.324103231 */, 17 },
-
-  /* 2960 */  { MAD_F(0x05302003) /* 0.324249281 */, 17 },
-  /* 2961 */  { MAD_F(0x0530b92d) /* 0.324395347 */, 17 },
-  /* 2962 */  { MAD_F(0x0531525b) /* 0.324541430 */, 17 },
-  /* 2963 */  { MAD_F(0x0531eb8d) /* 0.324687530 */, 17 },
-  /* 2964 */  { MAD_F(0x053284c4) /* 0.324833646 */, 17 },
-  /* 2965 */  { MAD_F(0x05331dff) /* 0.324979778 */, 17 },
-  /* 2966 */  { MAD_F(0x0533b73e) /* 0.325125926 */, 17 },
-  /* 2967 */  { MAD_F(0x05345082) /* 0.325272091 */, 17 },
-  /* 2968 */  { MAD_F(0x0534e9ca) /* 0.325418273 */, 17 },
-  /* 2969 */  { MAD_F(0x05358317) /* 0.325564471 */, 17 },
-  /* 2970 */  { MAD_F(0x05361c68) /* 0.325710685 */, 17 },
-  /* 2971 */  { MAD_F(0x0536b5be) /* 0.325856916 */, 17 },
-  /* 2972 */  { MAD_F(0x05374f17) /* 0.326003163 */, 17 },
-  /* 2973 */  { MAD_F(0x0537e876) /* 0.326149427 */, 17 },
-  /* 2974 */  { MAD_F(0x053881d9) /* 0.326295707 */, 17 },
-  /* 2975 */  { MAD_F(0x05391b40) /* 0.326442003 */, 17 },
-
-  /* 2976 */  { MAD_F(0x0539b4ab) /* 0.326588316 */, 17 },
-  /* 2977 */  { MAD_F(0x053a4e1b) /* 0.326734645 */, 17 },
-  /* 2978 */  { MAD_F(0x053ae78f) /* 0.326880990 */, 17 },
-  /* 2979 */  { MAD_F(0x053b8108) /* 0.327027352 */, 17 },
-  /* 2980 */  { MAD_F(0x053c1a85) /* 0.327173730 */, 17 },
-  /* 2981 */  { MAD_F(0x053cb407) /* 0.327320125 */, 17 },
-  /* 2982 */  { MAD_F(0x053d4d8d) /* 0.327466536 */, 17 },
-  /* 2983 */  { MAD_F(0x053de717) /* 0.327612963 */, 17 },
-  /* 2984 */  { MAD_F(0x053e80a6) /* 0.327759407 */, 17 },
-  /* 2985 */  { MAD_F(0x053f1a39) /* 0.327905867 */, 17 },
-  /* 2986 */  { MAD_F(0x053fb3d0) /* 0.328052344 */, 17 },
-  /* 2987 */  { MAD_F(0x05404d6c) /* 0.328198837 */, 17 },
-  /* 2988 */  { MAD_F(0x0540e70c) /* 0.328345346 */, 17 },
-  /* 2989 */  { MAD_F(0x054180b1) /* 0.328491871 */, 17 },
-  /* 2990 */  { MAD_F(0x05421a5a) /* 0.328638413 */, 17 },
-  /* 2991 */  { MAD_F(0x0542b407) /* 0.328784971 */, 17 },
-
-  /* 2992 */  { MAD_F(0x05434db9) /* 0.328931546 */, 17 },
-  /* 2993 */  { MAD_F(0x0543e76f) /* 0.329078137 */, 17 },
-  /* 2994 */  { MAD_F(0x0544812a) /* 0.329224744 */, 17 },
-  /* 2995 */  { MAD_F(0x05451ae9) /* 0.329371367 */, 17 },
-  /* 2996 */  { MAD_F(0x0545b4ac) /* 0.329518007 */, 17 },
-  /* 2997 */  { MAD_F(0x05464e74) /* 0.329664663 */, 17 },
-  /* 2998 */  { MAD_F(0x0546e840) /* 0.329811336 */, 17 },
-  /* 2999 */  { MAD_F(0x05478211) /* 0.329958024 */, 17 },
-  /* 3000 */  { MAD_F(0x05481be5) /* 0.330104730 */, 17 },
-  /* 3001 */  { MAD_F(0x0548b5bf) /* 0.330251451 */, 17 },
-  /* 3002 */  { MAD_F(0x05494f9c) /* 0.330398189 */, 17 },
-  /* 3003 */  { MAD_F(0x0549e97e) /* 0.330544943 */, 17 },
-  /* 3004 */  { MAD_F(0x054a8364) /* 0.330691713 */, 17 },
-  /* 3005 */  { MAD_F(0x054b1d4f) /* 0.330838499 */, 17 },
-  /* 3006 */  { MAD_F(0x054bb73e) /* 0.330985302 */, 17 },
-  /* 3007 */  { MAD_F(0x054c5132) /* 0.331132121 */, 17 },
-
-  /* 3008 */  { MAD_F(0x054ceb2a) /* 0.331278957 */, 17 },
-  /* 3009 */  { MAD_F(0x054d8526) /* 0.331425808 */, 17 },
-  /* 3010 */  { MAD_F(0x054e1f26) /* 0.331572676 */, 17 },
-  /* 3011 */  { MAD_F(0x054eb92b) /* 0.331719560 */, 17 },
-  /* 3012 */  { MAD_F(0x054f5334) /* 0.331866461 */, 17 },
-  /* 3013 */  { MAD_F(0x054fed42) /* 0.332013377 */, 17 },
-  /* 3014 */  { MAD_F(0x05508754) /* 0.332160310 */, 17 },
-  /* 3015 */  { MAD_F(0x0551216b) /* 0.332307260 */, 17 },
-  /* 3016 */  { MAD_F(0x0551bb85) /* 0.332454225 */, 17 },
-  /* 3017 */  { MAD_F(0x055255a4) /* 0.332601207 */, 17 },
-  /* 3018 */  { MAD_F(0x0552efc8) /* 0.332748205 */, 17 },
-  /* 3019 */  { MAD_F(0x055389f0) /* 0.332895219 */, 17 },
-  /* 3020 */  { MAD_F(0x0554241c) /* 0.333042249 */, 17 },
-  /* 3021 */  { MAD_F(0x0554be4c) /* 0.333189296 */, 17 },
-  /* 3022 */  { MAD_F(0x05555881) /* 0.333336359 */, 17 },
-  /* 3023 */  { MAD_F(0x0555f2ba) /* 0.333483438 */, 17 },
-
-  /* 3024 */  { MAD_F(0x05568cf8) /* 0.333630533 */, 17 },
-  /* 3025 */  { MAD_F(0x0557273a) /* 0.333777645 */, 17 },
-  /* 3026 */  { MAD_F(0x0557c180) /* 0.333924772 */, 17 },
-  /* 3027 */  { MAD_F(0x05585bcb) /* 0.334071916 */, 17 },
-  /* 3028 */  { MAD_F(0x0558f61a) /* 0.334219076 */, 17 },
-  /* 3029 */  { MAD_F(0x0559906d) /* 0.334366253 */, 17 },
-  /* 3030 */  { MAD_F(0x055a2ac5) /* 0.334513445 */, 17 },
-  /* 3031 */  { MAD_F(0x055ac521) /* 0.334660654 */, 17 },
-  /* 3032 */  { MAD_F(0x055b5f81) /* 0.334807879 */, 17 },
-  /* 3033 */  { MAD_F(0x055bf9e6) /* 0.334955120 */, 17 },
-  /* 3034 */  { MAD_F(0x055c944f) /* 0.335102377 */, 17 },
-  /* 3035 */  { MAD_F(0x055d2ebd) /* 0.335249651 */, 17 },
-  /* 3036 */  { MAD_F(0x055dc92e) /* 0.335396941 */, 17 },
-  /* 3037 */  { MAD_F(0x055e63a5) /* 0.335544246 */, 17 },
-  /* 3038 */  { MAD_F(0x055efe1f) /* 0.335691568 */, 17 },
-  /* 3039 */  { MAD_F(0x055f989e) /* 0.335838906 */, 17 },
-
-  /* 3040 */  { MAD_F(0x05603321) /* 0.335986261 */, 17 },
-  /* 3041 */  { MAD_F(0x0560cda8) /* 0.336133631 */, 17 },
-  /* 3042 */  { MAD_F(0x05616834) /* 0.336281018 */, 17 },
-  /* 3043 */  { MAD_F(0x056202c4) /* 0.336428421 */, 17 },
-  /* 3044 */  { MAD_F(0x05629d59) /* 0.336575840 */, 17 },
-  /* 3045 */  { MAD_F(0x056337f2) /* 0.336723275 */, 17 },
-  /* 3046 */  { MAD_F(0x0563d28f) /* 0.336870726 */, 17 },
-  /* 3047 */  { MAD_F(0x05646d30) /* 0.337018193 */, 17 },
-  /* 3048 */  { MAD_F(0x056507d6) /* 0.337165677 */, 17 },
-  /* 3049 */  { MAD_F(0x0565a280) /* 0.337313176 */, 17 },
-  /* 3050 */  { MAD_F(0x05663d2f) /* 0.337460692 */, 17 },
-  /* 3051 */  { MAD_F(0x0566d7e1) /* 0.337608224 */, 17 },
-  /* 3052 */  { MAD_F(0x05677298) /* 0.337755772 */, 17 },
-  /* 3053 */  { MAD_F(0x05680d54) /* 0.337903336 */, 17 },
-  /* 3054 */  { MAD_F(0x0568a814) /* 0.338050916 */, 17 },
-  /* 3055 */  { MAD_F(0x056942d8) /* 0.338198513 */, 17 },
-
-  /* 3056 */  { MAD_F(0x0569dda0) /* 0.338346125 */, 17 },
-  /* 3057 */  { MAD_F(0x056a786d) /* 0.338493753 */, 17 },
-  /* 3058 */  { MAD_F(0x056b133e) /* 0.338641398 */, 17 },
-  /* 3059 */  { MAD_F(0x056bae13) /* 0.338789059 */, 17 },
-  /* 3060 */  { MAD_F(0x056c48ed) /* 0.338936736 */, 17 },
-  /* 3061 */  { MAD_F(0x056ce3cb) /* 0.339084429 */, 17 },
-  /* 3062 */  { MAD_F(0x056d7ead) /* 0.339232138 */, 17 },
-  /* 3063 */  { MAD_F(0x056e1994) /* 0.339379863 */, 17 },
-  /* 3064 */  { MAD_F(0x056eb47f) /* 0.339527604 */, 17 },
-  /* 3065 */  { MAD_F(0x056f4f6e) /* 0.339675361 */, 17 },
-  /* 3066 */  { MAD_F(0x056fea62) /* 0.339823134 */, 17 },
-  /* 3067 */  { MAD_F(0x0570855a) /* 0.339970924 */, 17 },
-  /* 3068 */  { MAD_F(0x05712056) /* 0.340118729 */, 17 },
-  /* 3069 */  { MAD_F(0x0571bb56) /* 0.340266550 */, 17 },
-  /* 3070 */  { MAD_F(0x0572565b) /* 0.340414388 */, 17 },
-  /* 3071 */  { MAD_F(0x0572f164) /* 0.340562242 */, 17 },
-
-  /* 3072 */  { MAD_F(0x05738c72) /* 0.340710111 */, 17 },
-  /* 3073 */  { MAD_F(0x05742784) /* 0.340857997 */, 17 },
-  /* 3074 */  { MAD_F(0x0574c29a) /* 0.341005899 */, 17 },
-  /* 3075 */  { MAD_F(0x05755db4) /* 0.341153816 */, 17 },
-  /* 3076 */  { MAD_F(0x0575f8d3) /* 0.341301750 */, 17 },
-  /* 3077 */  { MAD_F(0x057693f6) /* 0.341449700 */, 17 },
-  /* 3078 */  { MAD_F(0x05772f1d) /* 0.341597666 */, 17 },
-  /* 3079 */  { MAD_F(0x0577ca49) /* 0.341745648 */, 17 },
-  /* 3080 */  { MAD_F(0x05786578) /* 0.341893646 */, 17 },
-  /* 3081 */  { MAD_F(0x057900ad) /* 0.342041659 */, 17 },
-  /* 3082 */  { MAD_F(0x05799be5) /* 0.342189689 */, 17 },
-  /* 3083 */  { MAD_F(0x057a3722) /* 0.342337735 */, 17 },
-  /* 3084 */  { MAD_F(0x057ad263) /* 0.342485797 */, 17 },
-  /* 3085 */  { MAD_F(0x057b6da8) /* 0.342633875 */, 17 },
-  /* 3086 */  { MAD_F(0x057c08f2) /* 0.342781969 */, 17 },
-  /* 3087 */  { MAD_F(0x057ca440) /* 0.342930079 */, 17 },
-
-  /* 3088 */  { MAD_F(0x057d3f92) /* 0.343078205 */, 17 },
-  /* 3089 */  { MAD_F(0x057ddae9) /* 0.343226347 */, 17 },
-  /* 3090 */  { MAD_F(0x057e7644) /* 0.343374505 */, 17 },
-  /* 3091 */  { MAD_F(0x057f11a3) /* 0.343522679 */, 17 },
-  /* 3092 */  { MAD_F(0x057fad06) /* 0.343670869 */, 17 },
-  /* 3093 */  { MAD_F(0x0580486e) /* 0.343819075 */, 17 },
-  /* 3094 */  { MAD_F(0x0580e3da) /* 0.343967296 */, 17 },
-  /* 3095 */  { MAD_F(0x05817f4a) /* 0.344115534 */, 17 },
-  /* 3096 */  { MAD_F(0x05821abf) /* 0.344263788 */, 17 },
-  /* 3097 */  { MAD_F(0x0582b638) /* 0.344412058 */, 17 },
-  /* 3098 */  { MAD_F(0x058351b5) /* 0.344560343 */, 17 },
-  /* 3099 */  { MAD_F(0x0583ed36) /* 0.344708645 */, 17 },
-  /* 3100 */  { MAD_F(0x058488bc) /* 0.344856963 */, 17 },
-  /* 3101 */  { MAD_F(0x05852446) /* 0.345005296 */, 17 },
-  /* 3102 */  { MAD_F(0x0585bfd4) /* 0.345153646 */, 17 },
-  /* 3103 */  { MAD_F(0x05865b67) /* 0.345302011 */, 17 },
-
-  /* 3104 */  { MAD_F(0x0586f6fd) /* 0.345450393 */, 17 },
-  /* 3105 */  { MAD_F(0x05879298) /* 0.345598790 */, 17 },
-  /* 3106 */  { MAD_F(0x05882e38) /* 0.345747203 */, 17 },
-  /* 3107 */  { MAD_F(0x0588c9dc) /* 0.345895632 */, 17 },
-  /* 3108 */  { MAD_F(0x05896583) /* 0.346044077 */, 17 },
-  /* 3109 */  { MAD_F(0x058a0130) /* 0.346192538 */, 17 },
-  /* 3110 */  { MAD_F(0x058a9ce0) /* 0.346341015 */, 17 },
-  /* 3111 */  { MAD_F(0x058b3895) /* 0.346489508 */, 17 },
-  /* 3112 */  { MAD_F(0x058bd44e) /* 0.346638017 */, 17 },
-  /* 3113 */  { MAD_F(0x058c700b) /* 0.346786542 */, 17 },
-  /* 3114 */  { MAD_F(0x058d0bcd) /* 0.346935082 */, 17 },
-  /* 3115 */  { MAD_F(0x058da793) /* 0.347083639 */, 17 },
-  /* 3116 */  { MAD_F(0x058e435d) /* 0.347232211 */, 17 },
-  /* 3117 */  { MAD_F(0x058edf2b) /* 0.347380799 */, 17 },
-  /* 3118 */  { MAD_F(0x058f7afe) /* 0.347529403 */, 17 },
-  /* 3119 */  { MAD_F(0x059016d5) /* 0.347678023 */, 17 },
-
-  /* 3120 */  { MAD_F(0x0590b2b0) /* 0.347826659 */, 17 },
-  /* 3121 */  { MAD_F(0x05914e8f) /* 0.347975311 */, 17 },
-  /* 3122 */  { MAD_F(0x0591ea73) /* 0.348123979 */, 17 },
-  /* 3123 */  { MAD_F(0x0592865b) /* 0.348272662 */, 17 },
-  /* 3124 */  { MAD_F(0x05932247) /* 0.348421362 */, 17 },
-  /* 3125 */  { MAD_F(0x0593be37) /* 0.348570077 */, 17 },
-  /* 3126 */  { MAD_F(0x05945a2c) /* 0.348718808 */, 17 },
-  /* 3127 */  { MAD_F(0x0594f625) /* 0.348867555 */, 17 },
-  /* 3128 */  { MAD_F(0x05959222) /* 0.349016318 */, 17 },
-  /* 3129 */  { MAD_F(0x05962e24) /* 0.349165097 */, 17 },
-  /* 3130 */  { MAD_F(0x0596ca2a) /* 0.349313892 */, 17 },
-  /* 3131 */  { MAD_F(0x05976634) /* 0.349462702 */, 17 },
-  /* 3132 */  { MAD_F(0x05980242) /* 0.349611528 */, 17 },
-  /* 3133 */  { MAD_F(0x05989e54) /* 0.349760370 */, 17 },
-  /* 3134 */  { MAD_F(0x05993a6b) /* 0.349909228 */, 17 },
-  /* 3135 */  { MAD_F(0x0599d686) /* 0.350058102 */, 17 },
-
-  /* 3136 */  { MAD_F(0x059a72a5) /* 0.350206992 */, 17 },
-  /* 3137 */  { MAD_F(0x059b0ec9) /* 0.350355897 */, 17 },
-  /* 3138 */  { MAD_F(0x059baaf1) /* 0.350504818 */, 17 },
-  /* 3139 */  { MAD_F(0x059c471d) /* 0.350653756 */, 17 },
-  /* 3140 */  { MAD_F(0x059ce34d) /* 0.350802708 */, 17 },
-  /* 3141 */  { MAD_F(0x059d7f81) /* 0.350951677 */, 17 },
-  /* 3142 */  { MAD_F(0x059e1bba) /* 0.351100662 */, 17 },
-  /* 3143 */  { MAD_F(0x059eb7f7) /* 0.351249662 */, 17 },
-  /* 3144 */  { MAD_F(0x059f5438) /* 0.351398678 */, 17 },
-  /* 3145 */  { MAD_F(0x059ff07e) /* 0.351547710 */, 17 },
-  /* 3146 */  { MAD_F(0x05a08cc7) /* 0.351696758 */, 17 },
-  /* 3147 */  { MAD_F(0x05a12915) /* 0.351845821 */, 17 },
-  /* 3148 */  { MAD_F(0x05a1c567) /* 0.351994901 */, 17 },
-  /* 3149 */  { MAD_F(0x05a261be) /* 0.352143996 */, 17 },
-  /* 3150 */  { MAD_F(0x05a2fe18) /* 0.352293107 */, 17 },
-  /* 3151 */  { MAD_F(0x05a39a77) /* 0.352442233 */, 17 },
-
-  /* 3152 */  { MAD_F(0x05a436da) /* 0.352591376 */, 17 },
-  /* 3153 */  { MAD_F(0x05a4d342) /* 0.352740534 */, 17 },
-  /* 3154 */  { MAD_F(0x05a56fad) /* 0.352889708 */, 17 },
-  /* 3155 */  { MAD_F(0x05a60c1d) /* 0.353038898 */, 17 },
-  /* 3156 */  { MAD_F(0x05a6a891) /* 0.353188103 */, 17 },
-  /* 3157 */  { MAD_F(0x05a7450a) /* 0.353337325 */, 17 },
-  /* 3158 */  { MAD_F(0x05a7e186) /* 0.353486562 */, 17 },
-  /* 3159 */  { MAD_F(0x05a87e07) /* 0.353635814 */, 17 },
-  /* 3160 */  { MAD_F(0x05a91a8c) /* 0.353785083 */, 17 },
-  /* 3161 */  { MAD_F(0x05a9b715) /* 0.353934367 */, 17 },
-  /* 3162 */  { MAD_F(0x05aa53a2) /* 0.354083667 */, 17 },
-  /* 3163 */  { MAD_F(0x05aaf034) /* 0.354232983 */, 17 },
-  /* 3164 */  { MAD_F(0x05ab8cca) /* 0.354382314 */, 17 },
-  /* 3165 */  { MAD_F(0x05ac2964) /* 0.354531662 */, 17 },
-  /* 3166 */  { MAD_F(0x05acc602) /* 0.354681025 */, 17 },
-  /* 3167 */  { MAD_F(0x05ad62a5) /* 0.354830403 */, 17 },
-
-  /* 3168 */  { MAD_F(0x05adff4c) /* 0.354979798 */, 17 },
-  /* 3169 */  { MAD_F(0x05ae9bf7) /* 0.355129208 */, 17 },
-  /* 3170 */  { MAD_F(0x05af38a6) /* 0.355278634 */, 17 },
-  /* 3171 */  { MAD_F(0x05afd559) /* 0.355428075 */, 17 },
-  /* 3172 */  { MAD_F(0x05b07211) /* 0.355577533 */, 17 },
-  /* 3173 */  { MAD_F(0x05b10ecd) /* 0.355727006 */, 17 },
-  /* 3174 */  { MAD_F(0x05b1ab8d) /* 0.355876494 */, 17 },
-  /* 3175 */  { MAD_F(0x05b24851) /* 0.356025999 */, 17 },
-  /* 3176 */  { MAD_F(0x05b2e51a) /* 0.356175519 */, 17 },
-  /* 3177 */  { MAD_F(0x05b381e6) /* 0.356325054 */, 17 },
-  /* 3178 */  { MAD_F(0x05b41eb7) /* 0.356474606 */, 17 },
-  /* 3179 */  { MAD_F(0x05b4bb8c) /* 0.356624173 */, 17 },
-  /* 3180 */  { MAD_F(0x05b55866) /* 0.356773756 */, 17 },
-  /* 3181 */  { MAD_F(0x05b5f543) /* 0.356923354 */, 17 },
-  /* 3182 */  { MAD_F(0x05b69225) /* 0.357072969 */, 17 },
-  /* 3183 */  { MAD_F(0x05b72f0b) /* 0.357222598 */, 17 },
-
-  /* 3184 */  { MAD_F(0x05b7cbf5) /* 0.357372244 */, 17 },
-  /* 3185 */  { MAD_F(0x05b868e3) /* 0.357521905 */, 17 },
-  /* 3186 */  { MAD_F(0x05b905d6) /* 0.357671582 */, 17 },
-  /* 3187 */  { MAD_F(0x05b9a2cd) /* 0.357821275 */, 17 },
-  /* 3188 */  { MAD_F(0x05ba3fc8) /* 0.357970983 */, 17 },
-  /* 3189 */  { MAD_F(0x05badcc7) /* 0.358120707 */, 17 },
-  /* 3190 */  { MAD_F(0x05bb79ca) /* 0.358270446 */, 17 },
-  /* 3191 */  { MAD_F(0x05bc16d2) /* 0.358420201 */, 17 },
-  /* 3192 */  { MAD_F(0x05bcb3de) /* 0.358569972 */, 17 },
-  /* 3193 */  { MAD_F(0x05bd50ee) /* 0.358719758 */, 17 },
-  /* 3194 */  { MAD_F(0x05bdee02) /* 0.358869560 */, 17 },
-  /* 3195 */  { MAD_F(0x05be8b1a) /* 0.359019378 */, 17 },
-  /* 3196 */  { MAD_F(0x05bf2837) /* 0.359169211 */, 17 },
-  /* 3197 */  { MAD_F(0x05bfc558) /* 0.359319060 */, 17 },
-  /* 3198 */  { MAD_F(0x05c0627d) /* 0.359468925 */, 17 },
-  /* 3199 */  { MAD_F(0x05c0ffa6) /* 0.359618805 */, 17 },
-
-  /* 3200 */  { MAD_F(0x05c19cd3) /* 0.359768701 */, 17 },
-  /* 3201 */  { MAD_F(0x05c23a05) /* 0.359918612 */, 17 },
-  /* 3202 */  { MAD_F(0x05c2d73a) /* 0.360068540 */, 17 },
-  /* 3203 */  { MAD_F(0x05c37474) /* 0.360218482 */, 17 },
-  /* 3204 */  { MAD_F(0x05c411b2) /* 0.360368440 */, 17 },
-  /* 3205 */  { MAD_F(0x05c4aef5) /* 0.360518414 */, 17 },
-  /* 3206 */  { MAD_F(0x05c54c3b) /* 0.360668404 */, 17 },
-  /* 3207 */  { MAD_F(0x05c5e986) /* 0.360818409 */, 17 },
-  /* 3208 */  { MAD_F(0x05c686d5) /* 0.360968429 */, 17 },
-  /* 3209 */  { MAD_F(0x05c72428) /* 0.361118466 */, 17 },
-  /* 3210 */  { MAD_F(0x05c7c17f) /* 0.361268517 */, 17 },
-  /* 3211 */  { MAD_F(0x05c85eda) /* 0.361418585 */, 17 },
-  /* 3212 */  { MAD_F(0x05c8fc3a) /* 0.361568668 */, 17 },
-  /* 3213 */  { MAD_F(0x05c9999e) /* 0.361718766 */, 17 },
-  /* 3214 */  { MAD_F(0x05ca3706) /* 0.361868881 */, 17 },
-  /* 3215 */  { MAD_F(0x05cad472) /* 0.362019010 */, 17 },
-
-  /* 3216 */  { MAD_F(0x05cb71e2) /* 0.362169156 */, 17 },
-  /* 3217 */  { MAD_F(0x05cc0f57) /* 0.362319316 */, 17 },
-  /* 3218 */  { MAD_F(0x05ccaccf) /* 0.362469493 */, 17 },
-  /* 3219 */  { MAD_F(0x05cd4a4c) /* 0.362619685 */, 17 },
-  /* 3220 */  { MAD_F(0x05cde7cd) /* 0.362769892 */, 17 },
-  /* 3221 */  { MAD_F(0x05ce8552) /* 0.362920115 */, 17 },
-  /* 3222 */  { MAD_F(0x05cf22dc) /* 0.363070354 */, 17 },
-  /* 3223 */  { MAD_F(0x05cfc069) /* 0.363220608 */, 17 },
-  /* 3224 */  { MAD_F(0x05d05dfb) /* 0.363370878 */, 17 },
-  /* 3225 */  { MAD_F(0x05d0fb91) /* 0.363521163 */, 17 },
-  /* 3226 */  { MAD_F(0x05d1992b) /* 0.363671464 */, 17 },
-  /* 3227 */  { MAD_F(0x05d236c9) /* 0.363821780 */, 17 },
-  /* 3228 */  { MAD_F(0x05d2d46c) /* 0.363972112 */, 17 },
-  /* 3229 */  { MAD_F(0x05d37212) /* 0.364122459 */, 17 },
-  /* 3230 */  { MAD_F(0x05d40fbd) /* 0.364272822 */, 17 },
-  /* 3231 */  { MAD_F(0x05d4ad6c) /* 0.364423200 */, 17 },
-
-  /* 3232 */  { MAD_F(0x05d54b1f) /* 0.364573594 */, 17 },
-  /* 3233 */  { MAD_F(0x05d5e8d6) /* 0.364724004 */, 17 },
-  /* 3234 */  { MAD_F(0x05d68691) /* 0.364874429 */, 17 },
-  /* 3235 */  { MAD_F(0x05d72451) /* 0.365024869 */, 17 },
-  /* 3236 */  { MAD_F(0x05d7c215) /* 0.365175325 */, 17 },
-  /* 3237 */  { MAD_F(0x05d85fdc) /* 0.365325796 */, 17 },
-  /* 3238 */  { MAD_F(0x05d8fda8) /* 0.365476283 */, 17 },
-  /* 3239 */  { MAD_F(0x05d99b79) /* 0.365626786 */, 17 },
-  /* 3240 */  { MAD_F(0x05da394d) /* 0.365777304 */, 17 },
-  /* 3241 */  { MAD_F(0x05dad726) /* 0.365927837 */, 17 },
-  /* 3242 */  { MAD_F(0x05db7502) /* 0.366078386 */, 17 },
-  /* 3243 */  { MAD_F(0x05dc12e3) /* 0.366228950 */, 17 },
-  /* 3244 */  { MAD_F(0x05dcb0c8) /* 0.366379530 */, 17 },
-  /* 3245 */  { MAD_F(0x05dd4eb1) /* 0.366530125 */, 17 },
-  /* 3246 */  { MAD_F(0x05ddec9e) /* 0.366680736 */, 17 },
-  /* 3247 */  { MAD_F(0x05de8a90) /* 0.366831362 */, 17 },
-
-  /* 3248 */  { MAD_F(0x05df2885) /* 0.366982004 */, 17 },
-  /* 3249 */  { MAD_F(0x05dfc67f) /* 0.367132661 */, 17 },
-  /* 3250 */  { MAD_F(0x05e0647d) /* 0.367283334 */, 17 },
-  /* 3251 */  { MAD_F(0x05e1027f) /* 0.367434022 */, 17 },
-  /* 3252 */  { MAD_F(0x05e1a085) /* 0.367584725 */, 17 },
-  /* 3253 */  { MAD_F(0x05e23e8f) /* 0.367735444 */, 17 },
-  /* 3254 */  { MAD_F(0x05e2dc9e) /* 0.367886179 */, 17 },
-  /* 3255 */  { MAD_F(0x05e37ab0) /* 0.368036929 */, 17 },
-  /* 3256 */  { MAD_F(0x05e418c7) /* 0.368187694 */, 17 },
-  /* 3257 */  { MAD_F(0x05e4b6e2) /* 0.368338475 */, 17 },
-  /* 3258 */  { MAD_F(0x05e55501) /* 0.368489271 */, 17 },
-  /* 3259 */  { MAD_F(0x05e5f324) /* 0.368640082 */, 17 },
-  /* 3260 */  { MAD_F(0x05e6914c) /* 0.368790909 */, 17 },
-  /* 3261 */  { MAD_F(0x05e72f77) /* 0.368941752 */, 17 },
-  /* 3262 */  { MAD_F(0x05e7cda7) /* 0.369092610 */, 17 },
-  /* 3263 */  { MAD_F(0x05e86bda) /* 0.369243483 */, 17 },
-
-  /* 3264 */  { MAD_F(0x05e90a12) /* 0.369394372 */, 17 },
-  /* 3265 */  { MAD_F(0x05e9a84e) /* 0.369545276 */, 17 },
-  /* 3266 */  { MAD_F(0x05ea468e) /* 0.369696195 */, 17 },
-  /* 3267 */  { MAD_F(0x05eae4d3) /* 0.369847130 */, 17 },
-  /* 3268 */  { MAD_F(0x05eb831b) /* 0.369998080 */, 17 },
-  /* 3269 */  { MAD_F(0x05ec2168) /* 0.370149046 */, 17 },
-  /* 3270 */  { MAD_F(0x05ecbfb8) /* 0.370300027 */, 17 },
-  /* 3271 */  { MAD_F(0x05ed5e0d) /* 0.370451024 */, 17 },
-  /* 3272 */  { MAD_F(0x05edfc66) /* 0.370602036 */, 17 },
-  /* 3273 */  { MAD_F(0x05ee9ac3) /* 0.370753063 */, 17 },
-  /* 3274 */  { MAD_F(0x05ef3924) /* 0.370904105 */, 17 },
-  /* 3275 */  { MAD_F(0x05efd78a) /* 0.371055163 */, 17 },
-  /* 3276 */  { MAD_F(0x05f075f3) /* 0.371206237 */, 17 },
-  /* 3277 */  { MAD_F(0x05f11461) /* 0.371357326 */, 17 },
-  /* 3278 */  { MAD_F(0x05f1b2d3) /* 0.371508430 */, 17 },
-  /* 3279 */  { MAD_F(0x05f25148) /* 0.371659549 */, 17 },
-
-  /* 3280 */  { MAD_F(0x05f2efc2) /* 0.371810684 */, 17 },
-  /* 3281 */  { MAD_F(0x05f38e40) /* 0.371961834 */, 17 },
-  /* 3282 */  { MAD_F(0x05f42cc3) /* 0.372113000 */, 17 },
-  /* 3283 */  { MAD_F(0x05f4cb49) /* 0.372264181 */, 17 },
-  /* 3284 */  { MAD_F(0x05f569d3) /* 0.372415377 */, 17 },
-  /* 3285 */  { MAD_F(0x05f60862) /* 0.372566589 */, 17 },
-  /* 3286 */  { MAD_F(0x05f6a6f5) /* 0.372717816 */, 17 },
-  /* 3287 */  { MAD_F(0x05f7458b) /* 0.372869058 */, 17 },
-  /* 3288 */  { MAD_F(0x05f7e426) /* 0.373020316 */, 17 },
-  /* 3289 */  { MAD_F(0x05f882c5) /* 0.373171589 */, 17 },
-  /* 3290 */  { MAD_F(0x05f92169) /* 0.373322877 */, 17 },
-  /* 3291 */  { MAD_F(0x05f9c010) /* 0.373474181 */, 17 },
-  /* 3292 */  { MAD_F(0x05fa5ebb) /* 0.373625500 */, 17 },
-  /* 3293 */  { MAD_F(0x05fafd6b) /* 0.373776834 */, 17 },
-  /* 3294 */  { MAD_F(0x05fb9c1e) /* 0.373928184 */, 17 },
-  /* 3295 */  { MAD_F(0x05fc3ad6) /* 0.374079549 */, 17 },
-
-  /* 3296 */  { MAD_F(0x05fcd992) /* 0.374230929 */, 17 },
-  /* 3297 */  { MAD_F(0x05fd7852) /* 0.374382325 */, 17 },
-  /* 3298 */  { MAD_F(0x05fe1716) /* 0.374533735 */, 17 },
-  /* 3299 */  { MAD_F(0x05feb5de) /* 0.374685162 */, 17 },
-  /* 3300 */  { MAD_F(0x05ff54aa) /* 0.374836603 */, 17 },
-  /* 3301 */  { MAD_F(0x05fff37b) /* 0.374988060 */, 17 },
-  /* 3302 */  { MAD_F(0x0600924f) /* 0.375139532 */, 17 },
-  /* 3303 */  { MAD_F(0x06013128) /* 0.375291019 */, 17 },
-  /* 3304 */  { MAD_F(0x0601d004) /* 0.375442522 */, 17 },
-  /* 3305 */  { MAD_F(0x06026ee5) /* 0.375594040 */, 17 },
-  /* 3306 */  { MAD_F(0x06030dca) /* 0.375745573 */, 17 },
-  /* 3307 */  { MAD_F(0x0603acb3) /* 0.375897122 */, 17 },
-  /* 3308 */  { MAD_F(0x06044ba0) /* 0.376048685 */, 17 },
-  /* 3309 */  { MAD_F(0x0604ea91) /* 0.376200265 */, 17 },
-  /* 3310 */  { MAD_F(0x06058987) /* 0.376351859 */, 17 },
-  /* 3311 */  { MAD_F(0x06062880) /* 0.376503468 */, 17 },
-
-  /* 3312 */  { MAD_F(0x0606c77d) /* 0.376655093 */, 17 },
-  /* 3313 */  { MAD_F(0x0607667f) /* 0.376806733 */, 17 },
-  /* 3314 */  { MAD_F(0x06080585) /* 0.376958389 */, 17 },
-  /* 3315 */  { MAD_F(0x0608a48f) /* 0.377110059 */, 17 },
-  /* 3316 */  { MAD_F(0x0609439c) /* 0.377261745 */, 17 },
-  /* 3317 */  { MAD_F(0x0609e2ae) /* 0.377413446 */, 17 },
-  /* 3318 */  { MAD_F(0x060a81c4) /* 0.377565163 */, 17 },
-  /* 3319 */  { MAD_F(0x060b20df) /* 0.377716894 */, 17 },
-  /* 3320 */  { MAD_F(0x060bbffd) /* 0.377868641 */, 17 },
-  /* 3321 */  { MAD_F(0x060c5f1f) /* 0.378020403 */, 17 },
-  /* 3322 */  { MAD_F(0x060cfe46) /* 0.378172181 */, 17 },
-  /* 3323 */  { MAD_F(0x060d9d70) /* 0.378323973 */, 17 },
-  /* 3324 */  { MAD_F(0x060e3c9f) /* 0.378475781 */, 17 },
-  /* 3325 */  { MAD_F(0x060edbd1) /* 0.378627604 */, 17 },
-  /* 3326 */  { MAD_F(0x060f7b08) /* 0.378779442 */, 17 },
-  /* 3327 */  { MAD_F(0x06101a43) /* 0.378931296 */, 17 },
-
-  /* 3328 */  { MAD_F(0x0610b982) /* 0.379083164 */, 17 },
-  /* 3329 */  { MAD_F(0x061158c5) /* 0.379235048 */, 17 },
-  /* 3330 */  { MAD_F(0x0611f80c) /* 0.379386947 */, 17 },
-  /* 3331 */  { MAD_F(0x06129757) /* 0.379538862 */, 17 },
-  /* 3332 */  { MAD_F(0x061336a6) /* 0.379690791 */, 17 },
-  /* 3333 */  { MAD_F(0x0613d5fa) /* 0.379842736 */, 17 },
-  /* 3334 */  { MAD_F(0x06147551) /* 0.379994696 */, 17 },
-  /* 3335 */  { MAD_F(0x061514ad) /* 0.380146671 */, 17 },
-  /* 3336 */  { MAD_F(0x0615b40c) /* 0.380298661 */, 17 },
-  /* 3337 */  { MAD_F(0x06165370) /* 0.380450666 */, 17 },
-  /* 3338 */  { MAD_F(0x0616f2d8) /* 0.380602687 */, 17 },
-  /* 3339 */  { MAD_F(0x06179243) /* 0.380754723 */, 17 },
-  /* 3340 */  { MAD_F(0x061831b3) /* 0.380906774 */, 17 },
-  /* 3341 */  { MAD_F(0x0618d127) /* 0.381058840 */, 17 },
-  /* 3342 */  { MAD_F(0x0619709f) /* 0.381210921 */, 17 },
-  /* 3343 */  { MAD_F(0x061a101b) /* 0.381363018 */, 17 },
-
-  /* 3344 */  { MAD_F(0x061aaf9c) /* 0.381515130 */, 17 },
-  /* 3345 */  { MAD_F(0x061b4f20) /* 0.381667257 */, 17 },
-  /* 3346 */  { MAD_F(0x061beea8) /* 0.381819399 */, 17 },
-  /* 3347 */  { MAD_F(0x061c8e34) /* 0.381971556 */, 17 },
-  /* 3348 */  { MAD_F(0x061d2dc5) /* 0.382123728 */, 17 },
-  /* 3349 */  { MAD_F(0x061dcd59) /* 0.382275916 */, 17 },
-  /* 3350 */  { MAD_F(0x061e6cf2) /* 0.382428118 */, 17 },
-  /* 3351 */  { MAD_F(0x061f0c8f) /* 0.382580336 */, 17 },
-  /* 3352 */  { MAD_F(0x061fac2f) /* 0.382732569 */, 17 },
-  /* 3353 */  { MAD_F(0x06204bd4) /* 0.382884817 */, 17 },
-  /* 3354 */  { MAD_F(0x0620eb7d) /* 0.383037080 */, 17 },
-  /* 3355 */  { MAD_F(0x06218b2a) /* 0.383189358 */, 17 },
-  /* 3356 */  { MAD_F(0x06222adb) /* 0.383341652 */, 17 },
-  /* 3357 */  { MAD_F(0x0622ca90) /* 0.383493960 */, 17 },
-  /* 3358 */  { MAD_F(0x06236a49) /* 0.383646284 */, 17 },
-  /* 3359 */  { MAD_F(0x06240a06) /* 0.383798623 */, 17 },
-
-  /* 3360 */  { MAD_F(0x0624a9c7) /* 0.383950977 */, 17 },
-  /* 3361 */  { MAD_F(0x0625498d) /* 0.384103346 */, 17 },
-  /* 3362 */  { MAD_F(0x0625e956) /* 0.384255730 */, 17 },
-  /* 3363 */  { MAD_F(0x06268923) /* 0.384408129 */, 17 },
-  /* 3364 */  { MAD_F(0x062728f5) /* 0.384560544 */, 17 },
-  /* 3365 */  { MAD_F(0x0627c8ca) /* 0.384712973 */, 17 },
-  /* 3366 */  { MAD_F(0x062868a4) /* 0.384865418 */, 17 },
-  /* 3367 */  { MAD_F(0x06290881) /* 0.385017878 */, 17 },
-  /* 3368 */  { MAD_F(0x0629a863) /* 0.385170352 */, 17 },
-  /* 3369 */  { MAD_F(0x062a4849) /* 0.385322842 */, 17 },
-  /* 3370 */  { MAD_F(0x062ae832) /* 0.385475347 */, 17 },
-  /* 3371 */  { MAD_F(0x062b8820) /* 0.385627867 */, 17 },
-  /* 3372 */  { MAD_F(0x062c2812) /* 0.385780402 */, 17 },
-  /* 3373 */  { MAD_F(0x062cc808) /* 0.385932953 */, 17 },
-  /* 3374 */  { MAD_F(0x062d6802) /* 0.386085518 */, 17 },
-  /* 3375 */  { MAD_F(0x062e0800) /* 0.386238098 */, 17 },
-
-  /* 3376 */  { MAD_F(0x062ea802) /* 0.386390694 */, 17 },
-  /* 3377 */  { MAD_F(0x062f4808) /* 0.386543304 */, 17 },
-  /* 3378 */  { MAD_F(0x062fe812) /* 0.386695930 */, 17 },
-  /* 3379 */  { MAD_F(0x06308820) /* 0.386848570 */, 17 },
-  /* 3380 */  { MAD_F(0x06312832) /* 0.387001226 */, 17 },
-  /* 3381 */  { MAD_F(0x0631c849) /* 0.387153897 */, 17 },
-  /* 3382 */  { MAD_F(0x06326863) /* 0.387306582 */, 17 },
-  /* 3383 */  { MAD_F(0x06330881) /* 0.387459283 */, 17 },
-  /* 3384 */  { MAD_F(0x0633a8a3) /* 0.387611999 */, 17 },
-  /* 3385 */  { MAD_F(0x063448ca) /* 0.387764730 */, 17 },
-  /* 3386 */  { MAD_F(0x0634e8f4) /* 0.387917476 */, 17 },
-  /* 3387 */  { MAD_F(0x06358923) /* 0.388070237 */, 17 },
-  /* 3388 */  { MAD_F(0x06362955) /* 0.388223013 */, 17 },
-  /* 3389 */  { MAD_F(0x0636c98c) /* 0.388375804 */, 17 },
-  /* 3390 */  { MAD_F(0x063769c6) /* 0.388528610 */, 17 },
-  /* 3391 */  { MAD_F(0x06380a05) /* 0.388681431 */, 17 },
-
-  /* 3392 */  { MAD_F(0x0638aa48) /* 0.388834268 */, 17 },
-  /* 3393 */  { MAD_F(0x06394a8e) /* 0.388987119 */, 17 },
-  /* 3394 */  { MAD_F(0x0639ead9) /* 0.389139985 */, 17 },
-  /* 3395 */  { MAD_F(0x063a8b28) /* 0.389292866 */, 17 },
-  /* 3396 */  { MAD_F(0x063b2b7b) /* 0.389445762 */, 17 },
-  /* 3397 */  { MAD_F(0x063bcbd1) /* 0.389598674 */, 17 },
-  /* 3398 */  { MAD_F(0x063c6c2c) /* 0.389751600 */, 17 },
-  /* 3399 */  { MAD_F(0x063d0c8b) /* 0.389904541 */, 17 },
-  /* 3400 */  { MAD_F(0x063dacee) /* 0.390057497 */, 17 },
-  /* 3401 */  { MAD_F(0x063e4d55) /* 0.390210468 */, 17 },
-  /* 3402 */  { MAD_F(0x063eedc0) /* 0.390363455 */, 17 },
-  /* 3403 */  { MAD_F(0x063f8e2f) /* 0.390516456 */, 17 },
-  /* 3404 */  { MAD_F(0x06402ea2) /* 0.390669472 */, 17 },
-  /* 3405 */  { MAD_F(0x0640cf19) /* 0.390822503 */, 17 },
-  /* 3406 */  { MAD_F(0x06416f94) /* 0.390975549 */, 17 },
-  /* 3407 */  { MAD_F(0x06421013) /* 0.391128611 */, 17 },
-
-  /* 3408 */  { MAD_F(0x0642b096) /* 0.391281687 */, 17 },
-  /* 3409 */  { MAD_F(0x0643511d) /* 0.391434778 */, 17 },
-  /* 3410 */  { MAD_F(0x0643f1a8) /* 0.391587884 */, 17 },
-  /* 3411 */  { MAD_F(0x06449237) /* 0.391741005 */, 17 },
-  /* 3412 */  { MAD_F(0x064532ca) /* 0.391894141 */, 17 },
-  /* 3413 */  { MAD_F(0x0645d361) /* 0.392047292 */, 17 },
-  /* 3414 */  { MAD_F(0x064673fc) /* 0.392200458 */, 17 },
-  /* 3415 */  { MAD_F(0x0647149c) /* 0.392353638 */, 17 },
-  /* 3416 */  { MAD_F(0x0647b53f) /* 0.392506834 */, 17 },
-  /* 3417 */  { MAD_F(0x064855e6) /* 0.392660045 */, 17 },
-  /* 3418 */  { MAD_F(0x0648f691) /* 0.392813271 */, 17 },
-  /* 3419 */  { MAD_F(0x06499740) /* 0.392966511 */, 17 },
-  /* 3420 */  { MAD_F(0x064a37f4) /* 0.393119767 */, 17 },
-  /* 3421 */  { MAD_F(0x064ad8ab) /* 0.393273038 */, 17 },
-  /* 3422 */  { MAD_F(0x064b7966) /* 0.393426323 */, 17 },
-  /* 3423 */  { MAD_F(0x064c1a25) /* 0.393579623 */, 17 },
-
-  /* 3424 */  { MAD_F(0x064cbae9) /* 0.393732939 */, 17 },
-  /* 3425 */  { MAD_F(0x064d5bb0) /* 0.393886269 */, 17 },
-  /* 3426 */  { MAD_F(0x064dfc7b) /* 0.394039614 */, 17 },
-  /* 3427 */  { MAD_F(0x064e9d4b) /* 0.394192974 */, 17 },
-  /* 3428 */  { MAD_F(0x064f3e1e) /* 0.394346349 */, 17 },
-  /* 3429 */  { MAD_F(0x064fdef5) /* 0.394499739 */, 17 },
-  /* 3430 */  { MAD_F(0x06507fd0) /* 0.394653144 */, 17 },
-  /* 3431 */  { MAD_F(0x065120b0) /* 0.394806564 */, 17 },
-  /* 3432 */  { MAD_F(0x0651c193) /* 0.394959999 */, 17 },
-  /* 3433 */  { MAD_F(0x0652627a) /* 0.395113448 */, 17 },
-  /* 3434 */  { MAD_F(0x06530366) /* 0.395266913 */, 17 },
-  /* 3435 */  { MAD_F(0x0653a455) /* 0.395420392 */, 17 },
-  /* 3436 */  { MAD_F(0x06544548) /* 0.395573886 */, 17 },
-  /* 3437 */  { MAD_F(0x0654e640) /* 0.395727395 */, 17 },
-  /* 3438 */  { MAD_F(0x0655873b) /* 0.395880919 */, 17 },
-  /* 3439 */  { MAD_F(0x0656283a) /* 0.396034458 */, 17 },
-
-  /* 3440 */  { MAD_F(0x0656c93d) /* 0.396188012 */, 17 },
-  /* 3441 */  { MAD_F(0x06576a45) /* 0.396341581 */, 17 },
-  /* 3442 */  { MAD_F(0x06580b50) /* 0.396495164 */, 17 },
-  /* 3443 */  { MAD_F(0x0658ac5f) /* 0.396648763 */, 17 },
-  /* 3444 */  { MAD_F(0x06594d73) /* 0.396802376 */, 17 },
-  /* 3445 */  { MAD_F(0x0659ee8a) /* 0.396956004 */, 17 },
-  /* 3446 */  { MAD_F(0x065a8fa5) /* 0.397109647 */, 17 },
-  /* 3447 */  { MAD_F(0x065b30c4) /* 0.397263305 */, 17 },
-  /* 3448 */  { MAD_F(0x065bd1e7) /* 0.397416978 */, 17 },
-  /* 3449 */  { MAD_F(0x065c730f) /* 0.397570666 */, 17 },
-  /* 3450 */  { MAD_F(0x065d143a) /* 0.397724368 */, 17 },
-  /* 3451 */  { MAD_F(0x065db569) /* 0.397878085 */, 17 },
-  /* 3452 */  { MAD_F(0x065e569c) /* 0.398031818 */, 17 },
-  /* 3453 */  { MAD_F(0x065ef7d3) /* 0.398185565 */, 17 },
-  /* 3454 */  { MAD_F(0x065f990e) /* 0.398339326 */, 17 },
-  /* 3455 */  { MAD_F(0x06603a4e) /* 0.398493103 */, 17 },
-
-  /* 3456 */  { MAD_F(0x0660db91) /* 0.398646895 */, 17 },
-  /* 3457 */  { MAD_F(0x06617cd8) /* 0.398800701 */, 17 },
-  /* 3458 */  { MAD_F(0x06621e23) /* 0.398954522 */, 17 },
-  /* 3459 */  { MAD_F(0x0662bf72) /* 0.399108358 */, 17 },
-  /* 3460 */  { MAD_F(0x066360c5) /* 0.399262209 */, 17 },
-  /* 3461 */  { MAD_F(0x0664021c) /* 0.399416075 */, 17 },
-  /* 3462 */  { MAD_F(0x0664a377) /* 0.399569955 */, 17 },
-  /* 3463 */  { MAD_F(0x066544d6) /* 0.399723851 */, 17 },
-  /* 3464 */  { MAD_F(0x0665e639) /* 0.399877761 */, 17 },
-  /* 3465 */  { MAD_F(0x066687a0) /* 0.400031686 */, 17 },
-  /* 3466 */  { MAD_F(0x0667290b) /* 0.400185625 */, 17 },
-  /* 3467 */  { MAD_F(0x0667ca79) /* 0.400339580 */, 17 },
-  /* 3468 */  { MAD_F(0x06686bec) /* 0.400493549 */, 17 },
-  /* 3469 */  { MAD_F(0x06690d63) /* 0.400647534 */, 17 },
-  /* 3470 */  { MAD_F(0x0669aede) /* 0.400801533 */, 17 },
-  /* 3471 */  { MAD_F(0x066a505d) /* 0.400955546 */, 17 },
-
-  /* 3472 */  { MAD_F(0x066af1df) /* 0.401109575 */, 17 },
-  /* 3473 */  { MAD_F(0x066b9366) /* 0.401263618 */, 17 },
-  /* 3474 */  { MAD_F(0x066c34f1) /* 0.401417676 */, 17 },
-  /* 3475 */  { MAD_F(0x066cd67f) /* 0.401571749 */, 17 },
-  /* 3476 */  { MAD_F(0x066d7812) /* 0.401725837 */, 17 },
-  /* 3477 */  { MAD_F(0x066e19a9) /* 0.401879939 */, 17 },
-  /* 3478 */  { MAD_F(0x066ebb43) /* 0.402034056 */, 17 },
-  /* 3479 */  { MAD_F(0x066f5ce2) /* 0.402188188 */, 17 },
-  /* 3480 */  { MAD_F(0x066ffe84) /* 0.402342335 */, 17 },
-  /* 3481 */  { MAD_F(0x0670a02a) /* 0.402496497 */, 17 },
-  /* 3482 */  { MAD_F(0x067141d5) /* 0.402650673 */, 17 },
-  /* 3483 */  { MAD_F(0x0671e383) /* 0.402804864 */, 17 },
-  /* 3484 */  { MAD_F(0x06728535) /* 0.402959070 */, 17 },
-  /* 3485 */  { MAD_F(0x067326ec) /* 0.403113291 */, 17 },
-  /* 3486 */  { MAD_F(0x0673c8a6) /* 0.403267526 */, 17 },
-  /* 3487 */  { MAD_F(0x06746a64) /* 0.403421776 */, 17 },
-
-  /* 3488 */  { MAD_F(0x06750c26) /* 0.403576041 */, 17 },
-  /* 3489 */  { MAD_F(0x0675adec) /* 0.403730320 */, 17 },
-  /* 3490 */  { MAD_F(0x06764fb6) /* 0.403884615 */, 17 },
-  /* 3491 */  { MAD_F(0x0676f184) /* 0.404038924 */, 17 },
-  /* 3492 */  { MAD_F(0x06779356) /* 0.404193247 */, 17 },
-  /* 3493 */  { MAD_F(0x0678352c) /* 0.404347586 */, 17 },
-  /* 3494 */  { MAD_F(0x0678d706) /* 0.404501939 */, 17 },
-  /* 3495 */  { MAD_F(0x067978e4) /* 0.404656307 */, 17 },
-  /* 3496 */  { MAD_F(0x067a1ac6) /* 0.404810690 */, 17 },
-  /* 3497 */  { MAD_F(0x067abcac) /* 0.404965087 */, 17 },
-  /* 3498 */  { MAD_F(0x067b5e95) /* 0.405119499 */, 17 },
-  /* 3499 */  { MAD_F(0x067c0083) /* 0.405273926 */, 17 },
-  /* 3500 */  { MAD_F(0x067ca275) /* 0.405428368 */, 17 },
-  /* 3501 */  { MAD_F(0x067d446a) /* 0.405582824 */, 17 },
-  /* 3502 */  { MAD_F(0x067de664) /* 0.405737295 */, 17 },
-  /* 3503 */  { MAD_F(0x067e8861) /* 0.405891781 */, 17 },
-
-  /* 3504 */  { MAD_F(0x067f2a62) /* 0.406046281 */, 17 },
-  /* 3505 */  { MAD_F(0x067fcc68) /* 0.406200796 */, 17 },
-  /* 3506 */  { MAD_F(0x06806e71) /* 0.406355326 */, 17 },
-  /* 3507 */  { MAD_F(0x0681107e) /* 0.406509870 */, 17 },
-  /* 3508 */  { MAD_F(0x0681b28f) /* 0.406664429 */, 17 },
-  /* 3509 */  { MAD_F(0x068254a4) /* 0.406819003 */, 17 },
-  /* 3510 */  { MAD_F(0x0682f6bd) /* 0.406973592 */, 17 },
-  /* 3511 */  { MAD_F(0x068398da) /* 0.407128195 */, 17 },
-  /* 3512 */  { MAD_F(0x06843afb) /* 0.407282813 */, 17 },
-  /* 3513 */  { MAD_F(0x0684dd20) /* 0.407437445 */, 17 },
-  /* 3514 */  { MAD_F(0x06857f49) /* 0.407592093 */, 17 },
-  /* 3515 */  { MAD_F(0x06862176) /* 0.407746754 */, 17 },
-  /* 3516 */  { MAD_F(0x0686c3a6) /* 0.407901431 */, 17 },
-  /* 3517 */  { MAD_F(0x068765db) /* 0.408056122 */, 17 },
-  /* 3518 */  { MAD_F(0x06880814) /* 0.408210828 */, 17 },
-  /* 3519 */  { MAD_F(0x0688aa50) /* 0.408365549 */, 17 },
-
-  /* 3520 */  { MAD_F(0x06894c90) /* 0.408520284 */, 17 },
-  /* 3521 */  { MAD_F(0x0689eed5) /* 0.408675034 */, 17 },
-  /* 3522 */  { MAD_F(0x068a911d) /* 0.408829798 */, 17 },
-  /* 3523 */  { MAD_F(0x068b3369) /* 0.408984577 */, 17 },
-  /* 3524 */  { MAD_F(0x068bd5b9) /* 0.409139371 */, 17 },
-  /* 3525 */  { MAD_F(0x068c780e) /* 0.409294180 */, 17 },
-  /* 3526 */  { MAD_F(0x068d1a66) /* 0.409449003 */, 17 },
-  /* 3527 */  { MAD_F(0x068dbcc1) /* 0.409603840 */, 17 },
-  /* 3528 */  { MAD_F(0x068e5f21) /* 0.409758693 */, 17 },
-  /* 3529 */  { MAD_F(0x068f0185) /* 0.409913560 */, 17 },
-  /* 3530 */  { MAD_F(0x068fa3ed) /* 0.410068441 */, 17 },
-  /* 3531 */  { MAD_F(0x06904658) /* 0.410223338 */, 17 },
-  /* 3532 */  { MAD_F(0x0690e8c8) /* 0.410378249 */, 17 },
-  /* 3533 */  { MAD_F(0x06918b3c) /* 0.410533174 */, 17 },
-  /* 3534 */  { MAD_F(0x06922db3) /* 0.410688114 */, 17 },
-  /* 3535 */  { MAD_F(0x0692d02e) /* 0.410843069 */, 17 },
-
-  /* 3536 */  { MAD_F(0x069372ae) /* 0.410998038 */, 17 },
-  /* 3537 */  { MAD_F(0x06941531) /* 0.411153022 */, 17 },
-  /* 3538 */  { MAD_F(0x0694b7b8) /* 0.411308021 */, 17 },
-  /* 3539 */  { MAD_F(0x06955a43) /* 0.411463034 */, 17 },
-  /* 3540 */  { MAD_F(0x0695fcd2) /* 0.411618062 */, 17 },
-  /* 3541 */  { MAD_F(0x06969f65) /* 0.411773104 */, 17 },
-  /* 3542 */  { MAD_F(0x069741fb) /* 0.411928161 */, 17 },
-  /* 3543 */  { MAD_F(0x0697e496) /* 0.412083232 */, 17 },
-  /* 3544 */  { MAD_F(0x06988735) /* 0.412238319 */, 17 },
-  /* 3545 */  { MAD_F(0x069929d7) /* 0.412393419 */, 17 },
-  /* 3546 */  { MAD_F(0x0699cc7e) /* 0.412548535 */, 17 },
-  /* 3547 */  { MAD_F(0x069a6f28) /* 0.412703664 */, 17 },
-  /* 3548 */  { MAD_F(0x069b11d6) /* 0.412858809 */, 17 },
-  /* 3549 */  { MAD_F(0x069bb489) /* 0.413013968 */, 17 },
-  /* 3550 */  { MAD_F(0x069c573f) /* 0.413169142 */, 17 },
-  /* 3551 */  { MAD_F(0x069cf9f9) /* 0.413324330 */, 17 },
-
-  /* 3552 */  { MAD_F(0x069d9cb7) /* 0.413479532 */, 17 },
-  /* 3553 */  { MAD_F(0x069e3f78) /* 0.413634750 */, 17 },
-  /* 3554 */  { MAD_F(0x069ee23e) /* 0.413789982 */, 17 },
-  /* 3555 */  { MAD_F(0x069f8508) /* 0.413945228 */, 17 },
-  /* 3556 */  { MAD_F(0x06a027d5) /* 0.414100489 */, 17 },
-  /* 3557 */  { MAD_F(0x06a0caa7) /* 0.414255765 */, 17 },
-  /* 3558 */  { MAD_F(0x06a16d7c) /* 0.414411055 */, 17 },
-  /* 3559 */  { MAD_F(0x06a21055) /* 0.414566359 */, 17 },
-  /* 3560 */  { MAD_F(0x06a2b333) /* 0.414721679 */, 17 },
-  /* 3561 */  { MAD_F(0x06a35614) /* 0.414877012 */, 17 },
-  /* 3562 */  { MAD_F(0x06a3f8f9) /* 0.415032361 */, 17 },
-  /* 3563 */  { MAD_F(0x06a49be2) /* 0.415187723 */, 17 },
-  /* 3564 */  { MAD_F(0x06a53ece) /* 0.415343101 */, 17 },
-  /* 3565 */  { MAD_F(0x06a5e1bf) /* 0.415498493 */, 17 },
-  /* 3566 */  { MAD_F(0x06a684b4) /* 0.415653899 */, 17 },
-  /* 3567 */  { MAD_F(0x06a727ac) /* 0.415809320 */, 17 },
-
-  /* 3568 */  { MAD_F(0x06a7caa9) /* 0.415964756 */, 17 },
-  /* 3569 */  { MAD_F(0x06a86da9) /* 0.416120206 */, 17 },
-  /* 3570 */  { MAD_F(0x06a910ad) /* 0.416275670 */, 17 },
-  /* 3571 */  { MAD_F(0x06a9b3b5) /* 0.416431149 */, 17 },
-  /* 3572 */  { MAD_F(0x06aa56c1) /* 0.416586643 */, 17 },
-  /* 3573 */  { MAD_F(0x06aaf9d1) /* 0.416742151 */, 17 },
-  /* 3574 */  { MAD_F(0x06ab9ce5) /* 0.416897673 */, 17 },
-  /* 3575 */  { MAD_F(0x06ac3ffc) /* 0.417053210 */, 17 },
-  /* 3576 */  { MAD_F(0x06ace318) /* 0.417208762 */, 17 },
-  /* 3577 */  { MAD_F(0x06ad8637) /* 0.417364328 */, 17 },
-  /* 3578 */  { MAD_F(0x06ae295b) /* 0.417519909 */, 17 },
-  /* 3579 */  { MAD_F(0x06aecc82) /* 0.417675504 */, 17 },
-  /* 3580 */  { MAD_F(0x06af6fad) /* 0.417831113 */, 17 },
-  /* 3581 */  { MAD_F(0x06b012dc) /* 0.417986737 */, 17 },
-  /* 3582 */  { MAD_F(0x06b0b60f) /* 0.418142376 */, 17 },
-  /* 3583 */  { MAD_F(0x06b15946) /* 0.418298029 */, 17 },
-
-  /* 3584 */  { MAD_F(0x06b1fc81) /* 0.418453696 */, 17 },
-  /* 3585 */  { MAD_F(0x06b29fbf) /* 0.418609378 */, 17 },
-  /* 3586 */  { MAD_F(0x06b34302) /* 0.418765075 */, 17 },
-  /* 3587 */  { MAD_F(0x06b3e648) /* 0.418920786 */, 17 },
-  /* 3588 */  { MAD_F(0x06b48992) /* 0.419076511 */, 17 },
-  /* 3589 */  { MAD_F(0x06b52ce0) /* 0.419232251 */, 17 },
-  /* 3590 */  { MAD_F(0x06b5d032) /* 0.419388005 */, 17 },
-  /* 3591 */  { MAD_F(0x06b67388) /* 0.419543774 */, 17 },
-  /* 3592 */  { MAD_F(0x06b716e2) /* 0.419699557 */, 17 },
-  /* 3593 */  { MAD_F(0x06b7ba3f) /* 0.419855355 */, 17 },
-  /* 3594 */  { MAD_F(0x06b85da1) /* 0.420011167 */, 17 },
-  /* 3595 */  { MAD_F(0x06b90106) /* 0.420166994 */, 17 },
-  /* 3596 */  { MAD_F(0x06b9a470) /* 0.420322835 */, 17 },
-  /* 3597 */  { MAD_F(0x06ba47dd) /* 0.420478690 */, 17 },
-  /* 3598 */  { MAD_F(0x06baeb4e) /* 0.420634560 */, 17 },
-  /* 3599 */  { MAD_F(0x06bb8ec3) /* 0.420790445 */, 17 },
-
-  /* 3600 */  { MAD_F(0x06bc323b) /* 0.420946343 */, 17 },
-  /* 3601 */  { MAD_F(0x06bcd5b8) /* 0.421102257 */, 17 },
-  /* 3602 */  { MAD_F(0x06bd7939) /* 0.421258184 */, 17 },
-  /* 3603 */  { MAD_F(0x06be1cbd) /* 0.421414127 */, 17 },
-  /* 3604 */  { MAD_F(0x06bec045) /* 0.421570083 */, 17 },
-  /* 3605 */  { MAD_F(0x06bf63d1) /* 0.421726054 */, 17 },
-  /* 3606 */  { MAD_F(0x06c00761) /* 0.421882040 */, 17 },
-  /* 3607 */  { MAD_F(0x06c0aaf5) /* 0.422038039 */, 17 },
-  /* 3608 */  { MAD_F(0x06c14e8d) /* 0.422194054 */, 17 },
-  /* 3609 */  { MAD_F(0x06c1f229) /* 0.422350082 */, 17 },
-  /* 3610 */  { MAD_F(0x06c295c8) /* 0.422506125 */, 17 },
-  /* 3611 */  { MAD_F(0x06c3396c) /* 0.422662183 */, 17 },
-  /* 3612 */  { MAD_F(0x06c3dd13) /* 0.422818255 */, 17 },
-  /* 3613 */  { MAD_F(0x06c480be) /* 0.422974341 */, 17 },
-  /* 3614 */  { MAD_F(0x06c5246d) /* 0.423130442 */, 17 },
-  /* 3615 */  { MAD_F(0x06c5c820) /* 0.423286557 */, 17 },
-
-  /* 3616 */  { MAD_F(0x06c66bd6) /* 0.423442686 */, 17 },
-  /* 3617 */  { MAD_F(0x06c70f91) /* 0.423598830 */, 17 },
-  /* 3618 */  { MAD_F(0x06c7b34f) /* 0.423754988 */, 17 },
-  /* 3619 */  { MAD_F(0x06c85712) /* 0.423911161 */, 17 },
-  /* 3620 */  { MAD_F(0x06c8fad8) /* 0.424067348 */, 17 },
-  /* 3621 */  { MAD_F(0x06c99ea2) /* 0.424223550 */, 17 },
-  /* 3622 */  { MAD_F(0x06ca4270) /* 0.424379765 */, 17 },
-  /* 3623 */  { MAD_F(0x06cae641) /* 0.424535996 */, 17 },
-  /* 3624 */  { MAD_F(0x06cb8a17) /* 0.424692240 */, 17 },
-  /* 3625 */  { MAD_F(0x06cc2df0) /* 0.424848499 */, 17 },
-  /* 3626 */  { MAD_F(0x06ccd1ce) /* 0.425004772 */, 17 },
-  /* 3627 */  { MAD_F(0x06cd75af) /* 0.425161060 */, 17 },
-  /* 3628 */  { MAD_F(0x06ce1994) /* 0.425317362 */, 17 },
-  /* 3629 */  { MAD_F(0x06cebd7d) /* 0.425473678 */, 17 },
-  /* 3630 */  { MAD_F(0x06cf6169) /* 0.425630009 */, 17 },
-  /* 3631 */  { MAD_F(0x06d0055a) /* 0.425786354 */, 17 },
-
-  /* 3632 */  { MAD_F(0x06d0a94e) /* 0.425942714 */, 17 },
-  /* 3633 */  { MAD_F(0x06d14d47) /* 0.426099088 */, 17 },
-  /* 3634 */  { MAD_F(0x06d1f143) /* 0.426255476 */, 17 },
-  /* 3635 */  { MAD_F(0x06d29543) /* 0.426411878 */, 17 },
-  /* 3636 */  { MAD_F(0x06d33947) /* 0.426568295 */, 17 },
-  /* 3637 */  { MAD_F(0x06d3dd4e) /* 0.426724726 */, 17 },
-  /* 3638 */  { MAD_F(0x06d4815a) /* 0.426881172 */, 17 },
-  /* 3639 */  { MAD_F(0x06d52569) /* 0.427037632 */, 17 },
-  /* 3640 */  { MAD_F(0x06d5c97c) /* 0.427194106 */, 17 },
-  /* 3641 */  { MAD_F(0x06d66d93) /* 0.427350594 */, 17 },
-  /* 3642 */  { MAD_F(0x06d711ae) /* 0.427507097 */, 17 },
-  /* 3643 */  { MAD_F(0x06d7b5cd) /* 0.427663614 */, 17 },
-  /* 3644 */  { MAD_F(0x06d859f0) /* 0.427820146 */, 17 },
-  /* 3645 */  { MAD_F(0x06d8fe16) /* 0.427976692 */, 17 },
-  /* 3646 */  { MAD_F(0x06d9a240) /* 0.428133252 */, 17 },
-  /* 3647 */  { MAD_F(0x06da466f) /* 0.428289826 */, 17 },
-
-  /* 3648 */  { MAD_F(0x06daeaa1) /* 0.428446415 */, 17 },
-  /* 3649 */  { MAD_F(0x06db8ed6) /* 0.428603018 */, 17 },
-  /* 3650 */  { MAD_F(0x06dc3310) /* 0.428759635 */, 17 },
-  /* 3651 */  { MAD_F(0x06dcd74d) /* 0.428916267 */, 17 },
-  /* 3652 */  { MAD_F(0x06dd7b8f) /* 0.429072913 */, 17 },
-  /* 3653 */  { MAD_F(0x06de1fd4) /* 0.429229573 */, 17 },
-  /* 3654 */  { MAD_F(0x06dec41d) /* 0.429386248 */, 17 },
-  /* 3655 */  { MAD_F(0x06df686a) /* 0.429542937 */, 17 },
-  /* 3656 */  { MAD_F(0x06e00cbb) /* 0.429699640 */, 17 },
-  /* 3657 */  { MAD_F(0x06e0b10f) /* 0.429856357 */, 17 },
-  /* 3658 */  { MAD_F(0x06e15567) /* 0.430013089 */, 17 },
-  /* 3659 */  { MAD_F(0x06e1f9c4) /* 0.430169835 */, 17 },
-  /* 3660 */  { MAD_F(0x06e29e24) /* 0.430326595 */, 17 },
-  /* 3661 */  { MAD_F(0x06e34287) /* 0.430483370 */, 17 },
-  /* 3662 */  { MAD_F(0x06e3e6ef) /* 0.430640159 */, 17 },
-  /* 3663 */  { MAD_F(0x06e48b5b) /* 0.430796962 */, 17 },
-
-  /* 3664 */  { MAD_F(0x06e52fca) /* 0.430953779 */, 17 },
-  /* 3665 */  { MAD_F(0x06e5d43d) /* 0.431110611 */, 17 },
-  /* 3666 */  { MAD_F(0x06e678b4) /* 0.431267457 */, 17 },
-  /* 3667 */  { MAD_F(0x06e71d2f) /* 0.431424317 */, 17 },
-  /* 3668 */  { MAD_F(0x06e7c1ae) /* 0.431581192 */, 17 },
-  /* 3669 */  { MAD_F(0x06e86630) /* 0.431738080 */, 17 },
-  /* 3670 */  { MAD_F(0x06e90ab7) /* 0.431894983 */, 17 },
-  /* 3671 */  { MAD_F(0x06e9af41) /* 0.432051900 */, 17 },
-  /* 3672 */  { MAD_F(0x06ea53cf) /* 0.432208832 */, 17 },
-  /* 3673 */  { MAD_F(0x06eaf860) /* 0.432365778 */, 17 },
-  /* 3674 */  { MAD_F(0x06eb9cf6) /* 0.432522737 */, 17 },
-  /* 3675 */  { MAD_F(0x06ec418f) /* 0.432679712 */, 17 },
-  /* 3676 */  { MAD_F(0x06ece62d) /* 0.432836700 */, 17 },
-  /* 3677 */  { MAD_F(0x06ed8ace) /* 0.432993703 */, 17 },
-  /* 3678 */  { MAD_F(0x06ee2f73) /* 0.433150720 */, 17 },
-  /* 3679 */  { MAD_F(0x06eed41b) /* 0.433307751 */, 17 },
-
-  /* 3680 */  { MAD_F(0x06ef78c8) /* 0.433464796 */, 17 },
-  /* 3681 */  { MAD_F(0x06f01d78) /* 0.433621856 */, 17 },
-  /* 3682 */  { MAD_F(0x06f0c22c) /* 0.433778929 */, 17 },
-  /* 3683 */  { MAD_F(0x06f166e4) /* 0.433936017 */, 17 },
-  /* 3684 */  { MAD_F(0x06f20ba0) /* 0.434093120 */, 17 },
-  /* 3685 */  { MAD_F(0x06f2b060) /* 0.434250236 */, 17 },
-  /* 3686 */  { MAD_F(0x06f35523) /* 0.434407367 */, 17 },
-  /* 3687 */  { MAD_F(0x06f3f9eb) /* 0.434564512 */, 17 },
-  /* 3688 */  { MAD_F(0x06f49eb6) /* 0.434721671 */, 17 },
-  /* 3689 */  { MAD_F(0x06f54385) /* 0.434878844 */, 17 },
-  /* 3690 */  { MAD_F(0x06f5e857) /* 0.435036032 */, 17 },
-  /* 3691 */  { MAD_F(0x06f68d2e) /* 0.435193233 */, 17 },
-  /* 3692 */  { MAD_F(0x06f73208) /* 0.435350449 */, 17 },
-  /* 3693 */  { MAD_F(0x06f7d6e6) /* 0.435507679 */, 17 },
-  /* 3694 */  { MAD_F(0x06f87bc8) /* 0.435664924 */, 17 },
-  /* 3695 */  { MAD_F(0x06f920ae) /* 0.435822182 */, 17 },
-
-  /* 3696 */  { MAD_F(0x06f9c597) /* 0.435979455 */, 17 },
-  /* 3697 */  { MAD_F(0x06fa6a85) /* 0.436136741 */, 17 },
-  /* 3698 */  { MAD_F(0x06fb0f76) /* 0.436294042 */, 17 },
-  /* 3699 */  { MAD_F(0x06fbb46b) /* 0.436451358 */, 17 },
-  /* 3700 */  { MAD_F(0x06fc5964) /* 0.436608687 */, 17 },
-  /* 3701 */  { MAD_F(0x06fcfe60) /* 0.436766031 */, 17 },
-  /* 3702 */  { MAD_F(0x06fda361) /* 0.436923388 */, 17 },
-  /* 3703 */  { MAD_F(0x06fe4865) /* 0.437080760 */, 17 },
-  /* 3704 */  { MAD_F(0x06feed6d) /* 0.437238146 */, 17 },
-  /* 3705 */  { MAD_F(0x06ff9279) /* 0.437395547 */, 17 },
-  /* 3706 */  { MAD_F(0x07003788) /* 0.437552961 */, 17 },
-  /* 3707 */  { MAD_F(0x0700dc9c) /* 0.437710389 */, 17 },
-  /* 3708 */  { MAD_F(0x070181b3) /* 0.437867832 */, 17 },
-  /* 3709 */  { MAD_F(0x070226ce) /* 0.438025289 */, 17 },
-  /* 3710 */  { MAD_F(0x0702cbed) /* 0.438182760 */, 17 },
-  /* 3711 */  { MAD_F(0x0703710f) /* 0.438340245 */, 17 },
-
-  /* 3712 */  { MAD_F(0x07041636) /* 0.438497744 */, 17 },
-  /* 3713 */  { MAD_F(0x0704bb60) /* 0.438655258 */, 17 },
-  /* 3714 */  { MAD_F(0x0705608e) /* 0.438812785 */, 17 },
-  /* 3715 */  { MAD_F(0x070605c0) /* 0.438970327 */, 17 },
-  /* 3716 */  { MAD_F(0x0706aaf5) /* 0.439127883 */, 17 },
-  /* 3717 */  { MAD_F(0x0707502f) /* 0.439285453 */, 17 },
-  /* 3718 */  { MAD_F(0x0707f56c) /* 0.439443037 */, 17 },
-  /* 3719 */  { MAD_F(0x07089aad) /* 0.439600635 */, 17 },
-  /* 3720 */  { MAD_F(0x07093ff2) /* 0.439758248 */, 17 },
-  /* 3721 */  { MAD_F(0x0709e53a) /* 0.439915874 */, 17 },
-  /* 3722 */  { MAD_F(0x070a8a86) /* 0.440073515 */, 17 },
-  /* 3723 */  { MAD_F(0x070b2fd7) /* 0.440231170 */, 17 },
-  /* 3724 */  { MAD_F(0x070bd52a) /* 0.440388839 */, 17 },
-  /* 3725 */  { MAD_F(0x070c7a82) /* 0.440546522 */, 17 },
-  /* 3726 */  { MAD_F(0x070d1fde) /* 0.440704219 */, 17 },
-  /* 3727 */  { MAD_F(0x070dc53d) /* 0.440861930 */, 17 },
-
-  /* 3728 */  { MAD_F(0x070e6aa0) /* 0.441019655 */, 17 },
-  /* 3729 */  { MAD_F(0x070f1007) /* 0.441177395 */, 17 },
-  /* 3730 */  { MAD_F(0x070fb571) /* 0.441335148 */, 17 },
-  /* 3731 */  { MAD_F(0x07105ae0) /* 0.441492916 */, 17 },
-  /* 3732 */  { MAD_F(0x07110052) /* 0.441650697 */, 17 },
-  /* 3733 */  { MAD_F(0x0711a5c8) /* 0.441808493 */, 17 },
-  /* 3734 */  { MAD_F(0x07124b42) /* 0.441966303 */, 17 },
-  /* 3735 */  { MAD_F(0x0712f0bf) /* 0.442124127 */, 17 },
-  /* 3736 */  { MAD_F(0x07139641) /* 0.442281965 */, 17 },
-  /* 3737 */  { MAD_F(0x07143bc6) /* 0.442439817 */, 17 },
-  /* 3738 */  { MAD_F(0x0714e14f) /* 0.442597683 */, 17 },
-  /* 3739 */  { MAD_F(0x071586db) /* 0.442755564 */, 17 },
-  /* 3740 */  { MAD_F(0x07162c6c) /* 0.442913458 */, 17 },
-  /* 3741 */  { MAD_F(0x0716d200) /* 0.443071366 */, 17 },
-  /* 3742 */  { MAD_F(0x07177798) /* 0.443229289 */, 17 },
-  /* 3743 */  { MAD_F(0x07181d34) /* 0.443387226 */, 17 },
-
-  /* 3744 */  { MAD_F(0x0718c2d3) /* 0.443545176 */, 17 },
-  /* 3745 */  { MAD_F(0x07196877) /* 0.443703141 */, 17 },
-  /* 3746 */  { MAD_F(0x071a0e1e) /* 0.443861120 */, 17 },
-  /* 3747 */  { MAD_F(0x071ab3c9) /* 0.444019113 */, 17 },
-  /* 3748 */  { MAD_F(0x071b5977) /* 0.444177119 */, 17 },
-  /* 3749 */  { MAD_F(0x071bff2a) /* 0.444335140 */, 17 },
-  /* 3750 */  { MAD_F(0x071ca4e0) /* 0.444493175 */, 17 },
-  /* 3751 */  { MAD_F(0x071d4a9a) /* 0.444651224 */, 17 },
-  /* 3752 */  { MAD_F(0x071df058) /* 0.444809288 */, 17 },
-  /* 3753 */  { MAD_F(0x071e9619) /* 0.444967365 */, 17 },
-  /* 3754 */  { MAD_F(0x071f3bde) /* 0.445125456 */, 17 },
-  /* 3755 */  { MAD_F(0x071fe1a8) /* 0.445283561 */, 17 },
-  /* 3756 */  { MAD_F(0x07208774) /* 0.445441680 */, 17 },
-  /* 3757 */  { MAD_F(0x07212d45) /* 0.445599814 */, 17 },
-  /* 3758 */  { MAD_F(0x0721d319) /* 0.445757961 */, 17 },
-  /* 3759 */  { MAD_F(0x072278f1) /* 0.445916122 */, 17 },
-
-  /* 3760 */  { MAD_F(0x07231ecd) /* 0.446074298 */, 17 },
-  /* 3761 */  { MAD_F(0x0723c4ad) /* 0.446232487 */, 17 },
-  /* 3762 */  { MAD_F(0x07246a90) /* 0.446390690 */, 17 },
-  /* 3763 */  { MAD_F(0x07251077) /* 0.446548908 */, 17 },
-  /* 3764 */  { MAD_F(0x0725b662) /* 0.446707139 */, 17 },
-  /* 3765 */  { MAD_F(0x07265c51) /* 0.446865385 */, 17 },
-  /* 3766 */  { MAD_F(0x07270244) /* 0.447023644 */, 17 },
-  /* 3767 */  { MAD_F(0x0727a83a) /* 0.447181918 */, 17 },
-  /* 3768 */  { MAD_F(0x07284e34) /* 0.447340205 */, 17 },
-  /* 3769 */  { MAD_F(0x0728f431) /* 0.447498507 */, 17 },
-  /* 3770 */  { MAD_F(0x07299a33) /* 0.447656822 */, 17 },
-  /* 3771 */  { MAD_F(0x072a4038) /* 0.447815152 */, 17 },
-  /* 3772 */  { MAD_F(0x072ae641) /* 0.447973495 */, 17 },
-  /* 3773 */  { MAD_F(0x072b8c4e) /* 0.448131853 */, 17 },
-  /* 3774 */  { MAD_F(0x072c325e) /* 0.448290224 */, 17 },
-  /* 3775 */  { MAD_F(0x072cd873) /* 0.448448609 */, 17 },
-
-  /* 3776 */  { MAD_F(0x072d7e8b) /* 0.448607009 */, 17 },
-  /* 3777 */  { MAD_F(0x072e24a7) /* 0.448765422 */, 17 },
-  /* 3778 */  { MAD_F(0x072ecac6) /* 0.448923850 */, 17 },
-  /* 3779 */  { MAD_F(0x072f70e9) /* 0.449082291 */, 17 },
-  /* 3780 */  { MAD_F(0x07301710) /* 0.449240746 */, 17 },
-  /* 3781 */  { MAD_F(0x0730bd3b) /* 0.449399216 */, 17 },
-  /* 3782 */  { MAD_F(0x0731636a) /* 0.449557699 */, 17 },
-  /* 3783 */  { MAD_F(0x0732099c) /* 0.449716196 */, 17 },
-  /* 3784 */  { MAD_F(0x0732afd2) /* 0.449874708 */, 17 },
-  /* 3785 */  { MAD_F(0x0733560c) /* 0.450033233 */, 17 },
-  /* 3786 */  { MAD_F(0x0733fc49) /* 0.450191772 */, 17 },
-  /* 3787 */  { MAD_F(0x0734a28b) /* 0.450350325 */, 17 },
-  /* 3788 */  { MAD_F(0x073548d0) /* 0.450508892 */, 17 },
-  /* 3789 */  { MAD_F(0x0735ef18) /* 0.450667473 */, 17 },
-  /* 3790 */  { MAD_F(0x07369565) /* 0.450826068 */, 17 },
-  /* 3791 */  { MAD_F(0x07373bb5) /* 0.450984677 */, 17 },
-
-  /* 3792 */  { MAD_F(0x0737e209) /* 0.451143300 */, 17 },
-  /* 3793 */  { MAD_F(0x07388861) /* 0.451301937 */, 17 },
-  /* 3794 */  { MAD_F(0x07392ebc) /* 0.451460588 */, 17 },
-  /* 3795 */  { MAD_F(0x0739d51c) /* 0.451619252 */, 17 },
-  /* 3796 */  { MAD_F(0x073a7b7f) /* 0.451777931 */, 17 },
-  /* 3797 */  { MAD_F(0x073b21e5) /* 0.451936623 */, 17 },
-  /* 3798 */  { MAD_F(0x073bc850) /* 0.452095330 */, 17 },
-  /* 3799 */  { MAD_F(0x073c6ebe) /* 0.452254050 */, 17 },
-  /* 3800 */  { MAD_F(0x073d1530) /* 0.452412785 */, 17 },
-  /* 3801 */  { MAD_F(0x073dbba6) /* 0.452571533 */, 17 },
-  /* 3802 */  { MAD_F(0x073e621f) /* 0.452730295 */, 17 },
-  /* 3803 */  { MAD_F(0x073f089c) /* 0.452889071 */, 17 },
-  /* 3804 */  { MAD_F(0x073faf1d) /* 0.453047861 */, 17 },
-  /* 3805 */  { MAD_F(0x074055a2) /* 0.453206665 */, 17 },
-  /* 3806 */  { MAD_F(0x0740fc2a) /* 0.453365483 */, 17 },
-  /* 3807 */  { MAD_F(0x0741a2b6) /* 0.453524315 */, 17 },
-
-  /* 3808 */  { MAD_F(0x07424946) /* 0.453683161 */, 17 },
-  /* 3809 */  { MAD_F(0x0742efd9) /* 0.453842020 */, 17 },
-  /* 3810 */  { MAD_F(0x07439671) /* 0.454000894 */, 17 },
-  /* 3811 */  { MAD_F(0x07443d0c) /* 0.454159781 */, 17 },
-  /* 3812 */  { MAD_F(0x0744e3aa) /* 0.454318683 */, 17 },
-  /* 3813 */  { MAD_F(0x07458a4d) /* 0.454477598 */, 17 },
-  /* 3814 */  { MAD_F(0x074630f3) /* 0.454636527 */, 17 },
-  /* 3815 */  { MAD_F(0x0746d79d) /* 0.454795470 */, 17 },
-  /* 3816 */  { MAD_F(0x07477e4b) /* 0.454954427 */, 17 },
-  /* 3817 */  { MAD_F(0x074824fc) /* 0.455113397 */, 17 },
-  /* 3818 */  { MAD_F(0x0748cbb1) /* 0.455272382 */, 17 },
-  /* 3819 */  { MAD_F(0x0749726a) /* 0.455431381 */, 17 },
-  /* 3820 */  { MAD_F(0x074a1927) /* 0.455590393 */, 17 },
-  /* 3821 */  { MAD_F(0x074abfe7) /* 0.455749419 */, 17 },
-  /* 3822 */  { MAD_F(0x074b66ab) /* 0.455908459 */, 17 },
-  /* 3823 */  { MAD_F(0x074c0d73) /* 0.456067513 */, 17 },
-
-  /* 3824 */  { MAD_F(0x074cb43e) /* 0.456226581 */, 17 },
-  /* 3825 */  { MAD_F(0x074d5b0d) /* 0.456385663 */, 17 },
-  /* 3826 */  { MAD_F(0x074e01e0) /* 0.456544759 */, 17 },
-  /* 3827 */  { MAD_F(0x074ea8b7) /* 0.456703868 */, 17 },
-  /* 3828 */  { MAD_F(0x074f4f91) /* 0.456862992 */, 17 },
-  /* 3829 */  { MAD_F(0x074ff66f) /* 0.457022129 */, 17 },
-  /* 3830 */  { MAD_F(0x07509d51) /* 0.457181280 */, 17 },
-  /* 3831 */  { MAD_F(0x07514437) /* 0.457340445 */, 17 },
-  /* 3832 */  { MAD_F(0x0751eb20) /* 0.457499623 */, 17 },
-  /* 3833 */  { MAD_F(0x0752920d) /* 0.457658816 */, 17 },
-  /* 3834 */  { MAD_F(0x075338fd) /* 0.457818022 */, 17 },
-  /* 3835 */  { MAD_F(0x0753dff2) /* 0.457977243 */, 17 },
-  /* 3836 */  { MAD_F(0x075486ea) /* 0.458136477 */, 17 },
-  /* 3837 */  { MAD_F(0x07552de6) /* 0.458295725 */, 17 },
-  /* 3838 */  { MAD_F(0x0755d4e5) /* 0.458454987 */, 17 },
-  /* 3839 */  { MAD_F(0x07567be8) /* 0.458614262 */, 17 },
-
-  /* 3840 */  { MAD_F(0x075722ef) /* 0.458773552 */, 17 },
-  /* 3841 */  { MAD_F(0x0757c9fa) /* 0.458932855 */, 17 },
-  /* 3842 */  { MAD_F(0x07587108) /* 0.459092172 */, 17 },
-  /* 3843 */  { MAD_F(0x0759181a) /* 0.459251503 */, 17 },
-  /* 3844 */  { MAD_F(0x0759bf30) /* 0.459410848 */, 17 },
-  /* 3845 */  { MAD_F(0x075a664a) /* 0.459570206 */, 17 },
-  /* 3846 */  { MAD_F(0x075b0d67) /* 0.459729579 */, 17 },
-  /* 3847 */  { MAD_F(0x075bb488) /* 0.459888965 */, 17 },
-  /* 3848 */  { MAD_F(0x075c5bac) /* 0.460048365 */, 17 },
-  /* 3849 */  { MAD_F(0x075d02d5) /* 0.460207779 */, 17 },
-  /* 3850 */  { MAD_F(0x075daa01) /* 0.460367206 */, 17 },
-  /* 3851 */  { MAD_F(0x075e5130) /* 0.460526648 */, 17 },
-  /* 3852 */  { MAD_F(0x075ef864) /* 0.460686103 */, 17 },
-  /* 3853 */  { MAD_F(0x075f9f9b) /* 0.460845572 */, 17 },
-  /* 3854 */  { MAD_F(0x076046d6) /* 0.461005055 */, 17 },
-  /* 3855 */  { MAD_F(0x0760ee14) /* 0.461164552 */, 17 },
-
-  /* 3856 */  { MAD_F(0x07619557) /* 0.461324062 */, 17 },
-  /* 3857 */  { MAD_F(0x07623c9d) /* 0.461483586 */, 17 },
-  /* 3858 */  { MAD_F(0x0762e3e6) /* 0.461643124 */, 17 },
-  /* 3859 */  { MAD_F(0x07638b34) /* 0.461802676 */, 17 },
-  /* 3860 */  { MAD_F(0x07643285) /* 0.461962242 */, 17 },
-  /* 3861 */  { MAD_F(0x0764d9d9) /* 0.462121821 */, 17 },
-  /* 3862 */  { MAD_F(0x07658132) /* 0.462281414 */, 17 },
-  /* 3863 */  { MAD_F(0x0766288e) /* 0.462441021 */, 17 },
-  /* 3864 */  { MAD_F(0x0766cfee) /* 0.462600642 */, 17 },
-  /* 3865 */  { MAD_F(0x07677751) /* 0.462760276 */, 17 },
-  /* 3866 */  { MAD_F(0x07681eb9) /* 0.462919924 */, 17 },
-  /* 3867 */  { MAD_F(0x0768c624) /* 0.463079586 */, 17 },
-  /* 3868 */  { MAD_F(0x07696d92) /* 0.463239262 */, 17 },
-  /* 3869 */  { MAD_F(0x076a1505) /* 0.463398951 */, 17 },
-  /* 3870 */  { MAD_F(0x076abc7b) /* 0.463558655 */, 17 },
-  /* 3871 */  { MAD_F(0x076b63f4) /* 0.463718372 */, 17 },
-
-  /* 3872 */  { MAD_F(0x076c0b72) /* 0.463878102 */, 17 },
-  /* 3873 */  { MAD_F(0x076cb2f3) /* 0.464037847 */, 17 },
-  /* 3874 */  { MAD_F(0x076d5a78) /* 0.464197605 */, 17 },
-  /* 3875 */  { MAD_F(0x076e0200) /* 0.464357377 */, 17 },
-  /* 3876 */  { MAD_F(0x076ea98c) /* 0.464517163 */, 17 },
-  /* 3877 */  { MAD_F(0x076f511c) /* 0.464676962 */, 17 },
-  /* 3878 */  { MAD_F(0x076ff8b0) /* 0.464836776 */, 17 },
-  /* 3879 */  { MAD_F(0x0770a047) /* 0.464996603 */, 17 },
-  /* 3880 */  { MAD_F(0x077147e2) /* 0.465156443 */, 17 },
-  /* 3881 */  { MAD_F(0x0771ef80) /* 0.465316298 */, 17 },
-  /* 3882 */  { MAD_F(0x07729723) /* 0.465476166 */, 17 },
-  /* 3883 */  { MAD_F(0x07733ec9) /* 0.465636048 */, 17 },
-  /* 3884 */  { MAD_F(0x0773e672) /* 0.465795943 */, 17 },
-  /* 3885 */  { MAD_F(0x07748e20) /* 0.465955853 */, 17 },
-  /* 3886 */  { MAD_F(0x077535d1) /* 0.466115776 */, 17 },
-  /* 3887 */  { MAD_F(0x0775dd85) /* 0.466275713 */, 17 },
-
-  /* 3888 */  { MAD_F(0x0776853e) /* 0.466435663 */, 17 },
-  /* 3889 */  { MAD_F(0x07772cfa) /* 0.466595627 */, 17 },
-  /* 3890 */  { MAD_F(0x0777d4ba) /* 0.466755605 */, 17 },
-  /* 3891 */  { MAD_F(0x07787c7d) /* 0.466915597 */, 17 },
-  /* 3892 */  { MAD_F(0x07792444) /* 0.467075602 */, 17 },
-  /* 3893 */  { MAD_F(0x0779cc0f) /* 0.467235621 */, 17 },
-  /* 3894 */  { MAD_F(0x077a73dd) /* 0.467395654 */, 17 },
-  /* 3895 */  { MAD_F(0x077b1baf) /* 0.467555701 */, 17 },
-  /* 3896 */  { MAD_F(0x077bc385) /* 0.467715761 */, 17 },
-  /* 3897 */  { MAD_F(0x077c6b5f) /* 0.467875835 */, 17 },
-  /* 3898 */  { MAD_F(0x077d133c) /* 0.468035922 */, 17 },
-  /* 3899 */  { MAD_F(0x077dbb1d) /* 0.468196023 */, 17 },
-  /* 3900 */  { MAD_F(0x077e6301) /* 0.468356138 */, 17 },
-  /* 3901 */  { MAD_F(0x077f0ae9) /* 0.468516267 */, 17 },
-  /* 3902 */  { MAD_F(0x077fb2d5) /* 0.468676409 */, 17 },
-  /* 3903 */  { MAD_F(0x07805ac5) /* 0.468836565 */, 17 },
-
-  /* 3904 */  { MAD_F(0x078102b8) /* 0.468996735 */, 17 },
-  /* 3905 */  { MAD_F(0x0781aaaf) /* 0.469156918 */, 17 },
-  /* 3906 */  { MAD_F(0x078252aa) /* 0.469317115 */, 17 },
-  /* 3907 */  { MAD_F(0x0782faa8) /* 0.469477326 */, 17 },
-  /* 3908 */  { MAD_F(0x0783a2aa) /* 0.469637550 */, 17 },
-  /* 3909 */  { MAD_F(0x07844aaf) /* 0.469797788 */, 17 },
-  /* 3910 */  { MAD_F(0x0784f2b8) /* 0.469958040 */, 17 },
-  /* 3911 */  { MAD_F(0x07859ac5) /* 0.470118305 */, 17 },
-  /* 3912 */  { MAD_F(0x078642d6) /* 0.470278584 */, 17 },
-  /* 3913 */  { MAD_F(0x0786eaea) /* 0.470438877 */, 17 },
-  /* 3914 */  { MAD_F(0x07879302) /* 0.470599183 */, 17 },
-  /* 3915 */  { MAD_F(0x07883b1e) /* 0.470759503 */, 17 },
-  /* 3916 */  { MAD_F(0x0788e33d) /* 0.470919836 */, 17 },
-  /* 3917 */  { MAD_F(0x07898b60) /* 0.471080184 */, 17 },
-  /* 3918 */  { MAD_F(0x078a3386) /* 0.471240545 */, 17 },
-  /* 3919 */  { MAD_F(0x078adbb0) /* 0.471400919 */, 17 },
-
-  /* 3920 */  { MAD_F(0x078b83de) /* 0.471561307 */, 17 },
-  /* 3921 */  { MAD_F(0x078c2c10) /* 0.471721709 */, 17 },
-  /* 3922 */  { MAD_F(0x078cd445) /* 0.471882125 */, 17 },
-  /* 3923 */  { MAD_F(0x078d7c7e) /* 0.472042554 */, 17 },
-  /* 3924 */  { MAD_F(0x078e24ba) /* 0.472202996 */, 17 },
-  /* 3925 */  { MAD_F(0x078eccfb) /* 0.472363453 */, 17 },
-  /* 3926 */  { MAD_F(0x078f753e) /* 0.472523923 */, 17 },
-  /* 3927 */  { MAD_F(0x07901d86) /* 0.472684406 */, 17 },
-  /* 3928 */  { MAD_F(0x0790c5d1) /* 0.472844904 */, 17 },
-  /* 3929 */  { MAD_F(0x07916e20) /* 0.473005414 */, 17 },
-  /* 3930 */  { MAD_F(0x07921672) /* 0.473165939 */, 17 },
-  /* 3931 */  { MAD_F(0x0792bec8) /* 0.473326477 */, 17 },
-  /* 3932 */  { MAD_F(0x07936722) /* 0.473487029 */, 17 },
-  /* 3933 */  { MAD_F(0x07940f80) /* 0.473647594 */, 17 },
-  /* 3934 */  { MAD_F(0x0794b7e1) /* 0.473808173 */, 17 },
-  /* 3935 */  { MAD_F(0x07956045) /* 0.473968765 */, 17 },
-
-  /* 3936 */  { MAD_F(0x079608ae) /* 0.474129372 */, 17 },
-  /* 3937 */  { MAD_F(0x0796b11a) /* 0.474289991 */, 17 },
-  /* 3938 */  { MAD_F(0x0797598a) /* 0.474450625 */, 17 },
-  /* 3939 */  { MAD_F(0x079801fd) /* 0.474611272 */, 17 },
-  /* 3940 */  { MAD_F(0x0798aa74) /* 0.474771932 */, 17 },
-  /* 3941 */  { MAD_F(0x079952ee) /* 0.474932606 */, 17 },
-  /* 3942 */  { MAD_F(0x0799fb6d) /* 0.475093294 */, 17 },
-  /* 3943 */  { MAD_F(0x079aa3ef) /* 0.475253995 */, 17 },
-  /* 3944 */  { MAD_F(0x079b4c74) /* 0.475414710 */, 17 },
-  /* 3945 */  { MAD_F(0x079bf4fd) /* 0.475575439 */, 17 },
-  /* 3946 */  { MAD_F(0x079c9d8a) /* 0.475736181 */, 17 },
-  /* 3947 */  { MAD_F(0x079d461b) /* 0.475896936 */, 17 },
-  /* 3948 */  { MAD_F(0x079deeaf) /* 0.476057705 */, 17 },
-  /* 3949 */  { MAD_F(0x079e9747) /* 0.476218488 */, 17 },
-  /* 3950 */  { MAD_F(0x079f3fe2) /* 0.476379285 */, 17 },
-  /* 3951 */  { MAD_F(0x079fe881) /* 0.476540095 */, 17 },
-
-  /* 3952 */  { MAD_F(0x07a09124) /* 0.476700918 */, 17 },
-  /* 3953 */  { MAD_F(0x07a139ca) /* 0.476861755 */, 17 },
-  /* 3954 */  { MAD_F(0x07a1e274) /* 0.477022606 */, 17 },
-  /* 3955 */  { MAD_F(0x07a28b22) /* 0.477183470 */, 17 },
-  /* 3956 */  { MAD_F(0x07a333d3) /* 0.477344348 */, 17 },
-  /* 3957 */  { MAD_F(0x07a3dc88) /* 0.477505239 */, 17 },
-  /* 3958 */  { MAD_F(0x07a48541) /* 0.477666144 */, 17 },
-  /* 3959 */  { MAD_F(0x07a52dfd) /* 0.477827062 */, 17 },
-  /* 3960 */  { MAD_F(0x07a5d6bd) /* 0.477987994 */, 17 },
-  /* 3961 */  { MAD_F(0x07a67f80) /* 0.478148940 */, 17 },
-  /* 3962 */  { MAD_F(0x07a72847) /* 0.478309899 */, 17 },
-  /* 3963 */  { MAD_F(0x07a7d112) /* 0.478470871 */, 17 },
-  /* 3964 */  { MAD_F(0x07a879e1) /* 0.478631857 */, 17 },
-  /* 3965 */  { MAD_F(0x07a922b3) /* 0.478792857 */, 17 },
-  /* 3966 */  { MAD_F(0x07a9cb88) /* 0.478953870 */, 17 },
-  /* 3967 */  { MAD_F(0x07aa7462) /* 0.479114897 */, 17 },
-
-  /* 3968 */  { MAD_F(0x07ab1d3e) /* 0.479275937 */, 17 },
-  /* 3969 */  { MAD_F(0x07abc61f) /* 0.479436991 */, 17 },
-  /* 3970 */  { MAD_F(0x07ac6f03) /* 0.479598058 */, 17 },
-  /* 3971 */  { MAD_F(0x07ad17eb) /* 0.479759139 */, 17 },
-  /* 3972 */  { MAD_F(0x07adc0d6) /* 0.479920233 */, 17 },
-  /* 3973 */  { MAD_F(0x07ae69c6) /* 0.480081341 */, 17 },
-  /* 3974 */  { MAD_F(0x07af12b8) /* 0.480242463 */, 17 },
-  /* 3975 */  { MAD_F(0x07afbbaf) /* 0.480403598 */, 17 },
-  /* 3976 */  { MAD_F(0x07b064a8) /* 0.480564746 */, 17 },
-  /* 3977 */  { MAD_F(0x07b10da6) /* 0.480725908 */, 17 },
-  /* 3978 */  { MAD_F(0x07b1b6a7) /* 0.480887083 */, 17 },
-  /* 3979 */  { MAD_F(0x07b25fac) /* 0.481048272 */, 17 },
-  /* 3980 */  { MAD_F(0x07b308b5) /* 0.481209475 */, 17 },
-  /* 3981 */  { MAD_F(0x07b3b1c1) /* 0.481370691 */, 17 },
-  /* 3982 */  { MAD_F(0x07b45ad0) /* 0.481531920 */, 17 },
-  /* 3983 */  { MAD_F(0x07b503e4) /* 0.481693163 */, 17 },
-
-  /* 3984 */  { MAD_F(0x07b5acfb) /* 0.481854420 */, 17 },
-  /* 3985 */  { MAD_F(0x07b65615) /* 0.482015690 */, 17 },
-  /* 3986 */  { MAD_F(0x07b6ff33) /* 0.482176973 */, 17 },
-  /* 3987 */  { MAD_F(0x07b7a855) /* 0.482338270 */, 17 },
-  /* 3988 */  { MAD_F(0x07b8517b) /* 0.482499580 */, 17 },
-  /* 3989 */  { MAD_F(0x07b8faa4) /* 0.482660904 */, 17 },
-  /* 3990 */  { MAD_F(0x07b9a3d0) /* 0.482822242 */, 17 },
-  /* 3991 */  { MAD_F(0x07ba4d01) /* 0.482983592 */, 17 },
-  /* 3992 */  { MAD_F(0x07baf635) /* 0.483144957 */, 17 },
-  /* 3993 */  { MAD_F(0x07bb9f6c) /* 0.483306335 */, 17 },
-  /* 3994 */  { MAD_F(0x07bc48a7) /* 0.483467726 */, 17 },
-  /* 3995 */  { MAD_F(0x07bcf1e6) /* 0.483629131 */, 17 },
-  /* 3996 */  { MAD_F(0x07bd9b28) /* 0.483790549 */, 17 },
-  /* 3997 */  { MAD_F(0x07be446e) /* 0.483951980 */, 17 },
-  /* 3998 */  { MAD_F(0x07beedb8) /* 0.484113426 */, 17 },
-  /* 3999 */  { MAD_F(0x07bf9705) /* 0.484274884 */, 17 },
-
-  /* 4000 */  { MAD_F(0x07c04056) /* 0.484436356 */, 17 },
-  /* 4001 */  { MAD_F(0x07c0e9aa) /* 0.484597842 */, 17 },
-  /* 4002 */  { MAD_F(0x07c19302) /* 0.484759341 */, 17 },
-  /* 4003 */  { MAD_F(0x07c23c5e) /* 0.484920853 */, 17 },
-  /* 4004 */  { MAD_F(0x07c2e5bd) /* 0.485082379 */, 17 },
-  /* 4005 */  { MAD_F(0x07c38f20) /* 0.485243918 */, 17 },
-  /* 4006 */  { MAD_F(0x07c43887) /* 0.485405471 */, 17 },
-  /* 4007 */  { MAD_F(0x07c4e1f1) /* 0.485567037 */, 17 },
-  /* 4008 */  { MAD_F(0x07c58b5f) /* 0.485728617 */, 17 },
-  /* 4009 */  { MAD_F(0x07c634d0) /* 0.485890210 */, 17 },
-  /* 4010 */  { MAD_F(0x07c6de45) /* 0.486051817 */, 17 },
-  /* 4011 */  { MAD_F(0x07c787bd) /* 0.486213436 */, 17 },
-  /* 4012 */  { MAD_F(0x07c83139) /* 0.486375070 */, 17 },
-  /* 4013 */  { MAD_F(0x07c8dab9) /* 0.486536717 */, 17 },
-  /* 4014 */  { MAD_F(0x07c9843c) /* 0.486698377 */, 17 },
-  /* 4015 */  { MAD_F(0x07ca2dc3) /* 0.486860051 */, 17 },
-
-  /* 4016 */  { MAD_F(0x07cad74e) /* 0.487021738 */, 17 },
-  /* 4017 */  { MAD_F(0x07cb80dc) /* 0.487183438 */, 17 },
-  /* 4018 */  { MAD_F(0x07cc2a6e) /* 0.487345152 */, 17 },
-  /* 4019 */  { MAD_F(0x07ccd403) /* 0.487506879 */, 17 },
-  /* 4020 */  { MAD_F(0x07cd7d9c) /* 0.487668620 */, 17 },
-  /* 4021 */  { MAD_F(0x07ce2739) /* 0.487830374 */, 17 },
-  /* 4022 */  { MAD_F(0x07ced0d9) /* 0.487992142 */, 17 },
-  /* 4023 */  { MAD_F(0x07cf7a7d) /* 0.488153923 */, 17 },
-  /* 4024 */  { MAD_F(0x07d02424) /* 0.488315717 */, 17 },
-  /* 4025 */  { MAD_F(0x07d0cdcf) /* 0.488477525 */, 17 },
-  /* 4026 */  { MAD_F(0x07d1777e) /* 0.488639346 */, 17 },
-  /* 4027 */  { MAD_F(0x07d22130) /* 0.488801181 */, 17 },
-  /* 4028 */  { MAD_F(0x07d2cae5) /* 0.488963029 */, 17 },
-  /* 4029 */  { MAD_F(0x07d3749f) /* 0.489124890 */, 17 },
-  /* 4030 */  { MAD_F(0x07d41e5c) /* 0.489286765 */, 17 },
-  /* 4031 */  { MAD_F(0x07d4c81c) /* 0.489448653 */, 17 },
-
-  /* 4032 */  { MAD_F(0x07d571e0) /* 0.489610555 */, 17 },
-  /* 4033 */  { MAD_F(0x07d61ba8) /* 0.489772470 */, 17 },
-  /* 4034 */  { MAD_F(0x07d6c573) /* 0.489934398 */, 17 },
-  /* 4035 */  { MAD_F(0x07d76f42) /* 0.490096340 */, 17 },
-  /* 4036 */  { MAD_F(0x07d81915) /* 0.490258295 */, 17 },
-  /* 4037 */  { MAD_F(0x07d8c2eb) /* 0.490420263 */, 17 },
-  /* 4038 */  { MAD_F(0x07d96cc4) /* 0.490582245 */, 17 },
-  /* 4039 */  { MAD_F(0x07da16a2) /* 0.490744240 */, 17 },
-  /* 4040 */  { MAD_F(0x07dac083) /* 0.490906249 */, 17 },
-  /* 4041 */  { MAD_F(0x07db6a67) /* 0.491068271 */, 17 },
-  /* 4042 */  { MAD_F(0x07dc144f) /* 0.491230306 */, 17 },
-  /* 4043 */  { MAD_F(0x07dcbe3b) /* 0.491392355 */, 17 },
-  /* 4044 */  { MAD_F(0x07dd682a) /* 0.491554417 */, 17 },
-  /* 4045 */  { MAD_F(0x07de121d) /* 0.491716492 */, 17 },
-  /* 4046 */  { MAD_F(0x07debc13) /* 0.491878581 */, 17 },
-  /* 4047 */  { MAD_F(0x07df660d) /* 0.492040683 */, 17 },
-
-  /* 4048 */  { MAD_F(0x07e0100a) /* 0.492202799 */, 17 },
-  /* 4049 */  { MAD_F(0x07e0ba0c) /* 0.492364928 */, 17 },
-  /* 4050 */  { MAD_F(0x07e16410) /* 0.492527070 */, 17 },
-  /* 4051 */  { MAD_F(0x07e20e19) /* 0.492689225 */, 17 },
-  /* 4052 */  { MAD_F(0x07e2b824) /* 0.492851394 */, 17 },
-  /* 4053 */  { MAD_F(0x07e36234) /* 0.493013576 */, 17 },
-  /* 4054 */  { MAD_F(0x07e40c47) /* 0.493175772 */, 17 },
-  /* 4055 */  { MAD_F(0x07e4b65e) /* 0.493337981 */, 17 },
-  /* 4056 */  { MAD_F(0x07e56078) /* 0.493500203 */, 17 },
-  /* 4057 */  { MAD_F(0x07e60a95) /* 0.493662438 */, 17 },
-  /* 4058 */  { MAD_F(0x07e6b4b7) /* 0.493824687 */, 17 },
-  /* 4059 */  { MAD_F(0x07e75edc) /* 0.493986949 */, 17 },
-  /* 4060 */  { MAD_F(0x07e80904) /* 0.494149225 */, 17 },
-  /* 4061 */  { MAD_F(0x07e8b330) /* 0.494311514 */, 17 },
-  /* 4062 */  { MAD_F(0x07e95d60) /* 0.494473816 */, 17 },
-  /* 4063 */  { MAD_F(0x07ea0793) /* 0.494636131 */, 17 },
-
-  /* 4064 */  { MAD_F(0x07eab1ca) /* 0.494798460 */, 17 },
-  /* 4065 */  { MAD_F(0x07eb5c04) /* 0.494960802 */, 17 },
-  /* 4066 */  { MAD_F(0x07ec0642) /* 0.495123158 */, 17 },
-  /* 4067 */  { MAD_F(0x07ecb084) /* 0.495285526 */, 17 },
-  /* 4068 */  { MAD_F(0x07ed5ac9) /* 0.495447908 */, 17 },
-  /* 4069 */  { MAD_F(0x07ee0512) /* 0.495610304 */, 17 },
-  /* 4070 */  { MAD_F(0x07eeaf5e) /* 0.495772712 */, 17 },
-  /* 4071 */  { MAD_F(0x07ef59ae) /* 0.495935134 */, 17 },
-  /* 4072 */  { MAD_F(0x07f00401) /* 0.496097570 */, 17 },
-  /* 4073 */  { MAD_F(0x07f0ae58) /* 0.496260018 */, 17 },
-  /* 4074 */  { MAD_F(0x07f158b3) /* 0.496422480 */, 17 },
-  /* 4075 */  { MAD_F(0x07f20311) /* 0.496584955 */, 17 },
-  /* 4076 */  { MAD_F(0x07f2ad72) /* 0.496747444 */, 17 },
-  /* 4077 */  { MAD_F(0x07f357d8) /* 0.496909945 */, 17 },
-  /* 4078 */  { MAD_F(0x07f40240) /* 0.497072460 */, 17 },
-  /* 4079 */  { MAD_F(0x07f4acad) /* 0.497234989 */, 17 },
-
-  /* 4080 */  { MAD_F(0x07f5571d) /* 0.497397530 */, 17 },
-  /* 4081 */  { MAD_F(0x07f60190) /* 0.497560085 */, 17 },
-  /* 4082 */  { MAD_F(0x07f6ac07) /* 0.497722653 */, 17 },
-  /* 4083 */  { MAD_F(0x07f75682) /* 0.497885235 */, 17 },
-  /* 4084 */  { MAD_F(0x07f80100) /* 0.498047829 */, 17 },
-  /* 4085 */  { MAD_F(0x07f8ab82) /* 0.498210437 */, 17 },
-  /* 4086 */  { MAD_F(0x07f95607) /* 0.498373058 */, 17 },
-  /* 4087 */  { MAD_F(0x07fa0090) /* 0.498535693 */, 17 },
-  /* 4088 */  { MAD_F(0x07faab1c) /* 0.498698341 */, 17 },
-  /* 4089 */  { MAD_F(0x07fb55ac) /* 0.498861002 */, 17 },
-  /* 4090 */  { MAD_F(0x07fc0040) /* 0.499023676 */, 17 },
-  /* 4091 */  { MAD_F(0x07fcaad7) /* 0.499186364 */, 17 },
-  /* 4092 */  { MAD_F(0x07fd5572) /* 0.499349064 */, 17 },
-  /* 4093 */  { MAD_F(0x07fe0010) /* 0.499511778 */, 17 },
-  /* 4094 */  { MAD_F(0x07feaab2) /* 0.499674506 */, 17 },
-  /* 4095 */  { MAD_F(0x07ff5557) /* 0.499837246 */, 17 },
-
-  /* 4096 */  { MAD_F(0x04000000) /* 0.250000000 */, 18 },
-  /* 4097 */  { MAD_F(0x04005556) /* 0.250081384 */, 18 },
-  /* 4098 */  { MAD_F(0x0400aaae) /* 0.250162774 */, 18 },
-  /* 4099 */  { MAD_F(0x04010008) /* 0.250244170 */, 18 },
-  /* 4100 */  { MAD_F(0x04015563) /* 0.250325574 */, 18 },
-  /* 4101 */  { MAD_F(0x0401aac1) /* 0.250406984 */, 18 },
-  /* 4102 */  { MAD_F(0x04020020) /* 0.250488400 */, 18 },
-  /* 4103 */  { MAD_F(0x04025581) /* 0.250569824 */, 18 },
-  /* 4104 */  { MAD_F(0x0402aae3) /* 0.250651254 */, 18 },
-  /* 4105 */  { MAD_F(0x04030048) /* 0.250732690 */, 18 },
-  /* 4106 */  { MAD_F(0x040355ae) /* 0.250814133 */, 18 },
-  /* 4107 */  { MAD_F(0x0403ab16) /* 0.250895583 */, 18 },
-  /* 4108 */  { MAD_F(0x04040080) /* 0.250977039 */, 18 },
-  /* 4109 */  { MAD_F(0x040455eb) /* 0.251058502 */, 18 },
-  /* 4110 */  { MAD_F(0x0404ab59) /* 0.251139971 */, 18 },
-  /* 4111 */  { MAD_F(0x040500c8) /* 0.251221448 */, 18 },
-
-  /* 4112 */  { MAD_F(0x04055638) /* 0.251302930 */, 18 },
-  /* 4113 */  { MAD_F(0x0405abab) /* 0.251384420 */, 18 },
-  /* 4114 */  { MAD_F(0x0406011f) /* 0.251465916 */, 18 },
-  /* 4115 */  { MAD_F(0x04065696) /* 0.251547418 */, 18 },
-  /* 4116 */  { MAD_F(0x0406ac0e) /* 0.251628927 */, 18 },
-  /* 4117 */  { MAD_F(0x04070187) /* 0.251710443 */, 18 },
-  /* 4118 */  { MAD_F(0x04075703) /* 0.251791965 */, 18 },
-  /* 4119 */  { MAD_F(0x0407ac80) /* 0.251873494 */, 18 },
-  /* 4120 */  { MAD_F(0x040801ff) /* 0.251955030 */, 18 },
-  /* 4121 */  { MAD_F(0x04085780) /* 0.252036572 */, 18 },
-  /* 4122 */  { MAD_F(0x0408ad02) /* 0.252118121 */, 18 },
-  /* 4123 */  { MAD_F(0x04090287) /* 0.252199676 */, 18 },
-  /* 4124 */  { MAD_F(0x0409580d) /* 0.252281238 */, 18 },
-  /* 4125 */  { MAD_F(0x0409ad95) /* 0.252362807 */, 18 },
-  /* 4126 */  { MAD_F(0x040a031e) /* 0.252444382 */, 18 },
-  /* 4127 */  { MAD_F(0x040a58aa) /* 0.252525963 */, 18 },
-
-  /* 4128 */  { MAD_F(0x040aae37) /* 0.252607552 */, 18 },
-  /* 4129 */  { MAD_F(0x040b03c6) /* 0.252689147 */, 18 },
-  /* 4130 */  { MAD_F(0x040b5957) /* 0.252770748 */, 18 },
-  /* 4131 */  { MAD_F(0x040baee9) /* 0.252852356 */, 18 },
-  /* 4132 */  { MAD_F(0x040c047e) /* 0.252933971 */, 18 },
-  /* 4133 */  { MAD_F(0x040c5a14) /* 0.253015592 */, 18 },
-  /* 4134 */  { MAD_F(0x040cafab) /* 0.253097220 */, 18 },
-  /* 4135 */  { MAD_F(0x040d0545) /* 0.253178854 */, 18 },
-  /* 4136 */  { MAD_F(0x040d5ae0) /* 0.253260495 */, 18 },
-  /* 4137 */  { MAD_F(0x040db07d) /* 0.253342143 */, 18 },
-  /* 4138 */  { MAD_F(0x040e061c) /* 0.253423797 */, 18 },
-  /* 4139 */  { MAD_F(0x040e5bbd) /* 0.253505457 */, 18 },
-  /* 4140 */  { MAD_F(0x040eb15f) /* 0.253587125 */, 18 },
-  /* 4141 */  { MAD_F(0x040f0703) /* 0.253668799 */, 18 },
-  /* 4142 */  { MAD_F(0x040f5ca9) /* 0.253750479 */, 18 },
-  /* 4143 */  { MAD_F(0x040fb251) /* 0.253832166 */, 18 },
-
-  /* 4144 */  { MAD_F(0x041007fa) /* 0.253913860 */, 18 },
-  /* 4145 */  { MAD_F(0x04105da6) /* 0.253995560 */, 18 },
-  /* 4146 */  { MAD_F(0x0410b353) /* 0.254077266 */, 18 },
-  /* 4147 */  { MAD_F(0x04110901) /* 0.254158980 */, 18 },
-  /* 4148 */  { MAD_F(0x04115eb2) /* 0.254240700 */, 18 },
-  /* 4149 */  { MAD_F(0x0411b464) /* 0.254322426 */, 18 },
-  /* 4150 */  { MAD_F(0x04120a18) /* 0.254404159 */, 18 },
-  /* 4151 */  { MAD_F(0x04125fce) /* 0.254485899 */, 18 },
-  /* 4152 */  { MAD_F(0x0412b586) /* 0.254567645 */, 18 },
-  /* 4153 */  { MAD_F(0x04130b3f) /* 0.254649397 */, 18 },
-  /* 4154 */  { MAD_F(0x041360fa) /* 0.254731157 */, 18 },
-  /* 4155 */  { MAD_F(0x0413b6b7) /* 0.254812922 */, 18 },
-  /* 4156 */  { MAD_F(0x04140c75) /* 0.254894695 */, 18 },
-  /* 4157 */  { MAD_F(0x04146236) /* 0.254976474 */, 18 },
-  /* 4158 */  { MAD_F(0x0414b7f8) /* 0.255058259 */, 18 },
-  /* 4159 */  { MAD_F(0x04150dbc) /* 0.255140051 */, 18 },
-
-  /* 4160 */  { MAD_F(0x04156381) /* 0.255221850 */, 18 },
-  /* 4161 */  { MAD_F(0x0415b949) /* 0.255303655 */, 18 },
-  /* 4162 */  { MAD_F(0x04160f12) /* 0.255385467 */, 18 },
-  /* 4163 */  { MAD_F(0x041664dd) /* 0.255467285 */, 18 },
-  /* 4164 */  { MAD_F(0x0416baaa) /* 0.255549110 */, 18 },
-  /* 4165 */  { MAD_F(0x04171078) /* 0.255630941 */, 18 },
-  /* 4166 */  { MAD_F(0x04176648) /* 0.255712779 */, 18 },
-  /* 4167 */  { MAD_F(0x0417bc1a) /* 0.255794624 */, 18 },
-  /* 4168 */  { MAD_F(0x041811ee) /* 0.255876475 */, 18 },
-  /* 4169 */  { MAD_F(0x041867c3) /* 0.255958332 */, 18 },
-  /* 4170 */  { MAD_F(0x0418bd9b) /* 0.256040196 */, 18 },
-  /* 4171 */  { MAD_F(0x04191374) /* 0.256122067 */, 18 },
-  /* 4172 */  { MAD_F(0x0419694e) /* 0.256203944 */, 18 },
-  /* 4173 */  { MAD_F(0x0419bf2b) /* 0.256285828 */, 18 },
-  /* 4174 */  { MAD_F(0x041a1509) /* 0.256367718 */, 18 },
-  /* 4175 */  { MAD_F(0x041a6ae9) /* 0.256449615 */, 18 },
-
-  /* 4176 */  { MAD_F(0x041ac0cb) /* 0.256531518 */, 18 },
-  /* 4177 */  { MAD_F(0x041b16ae) /* 0.256613428 */, 18 },
-  /* 4178 */  { MAD_F(0x041b6c94) /* 0.256695344 */, 18 },
-  /* 4179 */  { MAD_F(0x041bc27b) /* 0.256777267 */, 18 },
-  /* 4180 */  { MAD_F(0x041c1863) /* 0.256859197 */, 18 },
-  /* 4181 */  { MAD_F(0x041c6e4e) /* 0.256941133 */, 18 },
-  /* 4182 */  { MAD_F(0x041cc43a) /* 0.257023076 */, 18 },
-  /* 4183 */  { MAD_F(0x041d1a28) /* 0.257105025 */, 18 },
-  /* 4184 */  { MAD_F(0x041d7018) /* 0.257186980 */, 18 },
-  /* 4185 */  { MAD_F(0x041dc60a) /* 0.257268942 */, 18 },
-  /* 4186 */  { MAD_F(0x041e1bfd) /* 0.257350911 */, 18 },
-  /* 4187 */  { MAD_F(0x041e71f2) /* 0.257432886 */, 18 },
-  /* 4188 */  { MAD_F(0x041ec7e9) /* 0.257514868 */, 18 },
-  /* 4189 */  { MAD_F(0x041f1de1) /* 0.257596856 */, 18 },
-  /* 4190 */  { MAD_F(0x041f73dc) /* 0.257678851 */, 18 },
-  /* 4191 */  { MAD_F(0x041fc9d8) /* 0.257760852 */, 18 },
-
-  /* 4192 */  { MAD_F(0x04201fd5) /* 0.257842860 */, 18 },
-  /* 4193 */  { MAD_F(0x042075d5) /* 0.257924875 */, 18 },
-  /* 4194 */  { MAD_F(0x0420cbd6) /* 0.258006895 */, 18 },
-  /* 4195 */  { MAD_F(0x042121d9) /* 0.258088923 */, 18 },
-  /* 4196 */  { MAD_F(0x042177de) /* 0.258170957 */, 18 },
-  /* 4197 */  { MAD_F(0x0421cde5) /* 0.258252997 */, 18 },
-  /* 4198 */  { MAD_F(0x042223ed) /* 0.258335044 */, 18 },
-  /* 4199 */  { MAD_F(0x042279f7) /* 0.258417097 */, 18 },
-  /* 4200 */  { MAD_F(0x0422d003) /* 0.258499157 */, 18 },
-  /* 4201 */  { MAD_F(0x04232611) /* 0.258581224 */, 18 },
-  /* 4202 */  { MAD_F(0x04237c20) /* 0.258663297 */, 18 },
-  /* 4203 */  { MAD_F(0x0423d231) /* 0.258745376 */, 18 },
-  /* 4204 */  { MAD_F(0x04242844) /* 0.258827462 */, 18 },
-  /* 4205 */  { MAD_F(0x04247e58) /* 0.258909555 */, 18 },
-  /* 4206 */  { MAD_F(0x0424d46e) /* 0.258991654 */, 18 },
-  /* 4207 */  { MAD_F(0x04252a87) /* 0.259073760 */, 18 },
-
-  /* 4208 */  { MAD_F(0x042580a0) /* 0.259155872 */, 18 },
-  /* 4209 */  { MAD_F(0x0425d6bc) /* 0.259237990 */, 18 },
-  /* 4210 */  { MAD_F(0x04262cd9) /* 0.259320115 */, 18 },
-  /* 4211 */  { MAD_F(0x042682f8) /* 0.259402247 */, 18 },
-  /* 4212 */  { MAD_F(0x0426d919) /* 0.259484385 */, 18 },
-  /* 4213 */  { MAD_F(0x04272f3b) /* 0.259566529 */, 18 },
-  /* 4214 */  { MAD_F(0x04278560) /* 0.259648680 */, 18 },
-  /* 4215 */  { MAD_F(0x0427db86) /* 0.259730838 */, 18 },
-  /* 4216 */  { MAD_F(0x042831ad) /* 0.259813002 */, 18 },
-  /* 4217 */  { MAD_F(0x042887d7) /* 0.259895173 */, 18 },
-  /* 4218 */  { MAD_F(0x0428de02) /* 0.259977350 */, 18 },
-  /* 4219 */  { MAD_F(0x0429342f) /* 0.260059533 */, 18 },
-  /* 4220 */  { MAD_F(0x04298a5e) /* 0.260141723 */, 18 },
-  /* 4221 */  { MAD_F(0x0429e08e) /* 0.260223920 */, 18 },
-  /* 4222 */  { MAD_F(0x042a36c0) /* 0.260306123 */, 18 },
-  /* 4223 */  { MAD_F(0x042a8cf4) /* 0.260388332 */, 18 },
-
-  /* 4224 */  { MAD_F(0x042ae32a) /* 0.260470548 */, 18 },
-  /* 4225 */  { MAD_F(0x042b3962) /* 0.260552771 */, 18 },
-  /* 4226 */  { MAD_F(0x042b8f9b) /* 0.260635000 */, 18 },
-  /* 4227 */  { MAD_F(0x042be5d6) /* 0.260717235 */, 18 },
-  /* 4228 */  { MAD_F(0x042c3c12) /* 0.260799477 */, 18 },
-  /* 4229 */  { MAD_F(0x042c9251) /* 0.260881725 */, 18 },
-  /* 4230 */  { MAD_F(0x042ce891) /* 0.260963980 */, 18 },
-  /* 4231 */  { MAD_F(0x042d3ed3) /* 0.261046242 */, 18 },
-  /* 4232 */  { MAD_F(0x042d9516) /* 0.261128510 */, 18 },
-  /* 4233 */  { MAD_F(0x042deb5c) /* 0.261210784 */, 18 },
-  /* 4234 */  { MAD_F(0x042e41a3) /* 0.261293065 */, 18 },
-  /* 4235 */  { MAD_F(0x042e97ec) /* 0.261375352 */, 18 },
-  /* 4236 */  { MAD_F(0x042eee36) /* 0.261457646 */, 18 },
-  /* 4237 */  { MAD_F(0x042f4482) /* 0.261539946 */, 18 },
-  /* 4238 */  { MAD_F(0x042f9ad1) /* 0.261622253 */, 18 },
-  /* 4239 */  { MAD_F(0x042ff120) /* 0.261704566 */, 18 },
-
-  /* 4240 */  { MAD_F(0x04304772) /* 0.261786886 */, 18 },
-  /* 4241 */  { MAD_F(0x04309dc5) /* 0.261869212 */, 18 },
-  /* 4242 */  { MAD_F(0x0430f41a) /* 0.261951545 */, 18 },
-  /* 4243 */  { MAD_F(0x04314a71) /* 0.262033884 */, 18 },
-  /* 4244 */  { MAD_F(0x0431a0c9) /* 0.262116229 */, 18 },
-  /* 4245 */  { MAD_F(0x0431f723) /* 0.262198581 */, 18 },
-  /* 4246 */  { MAD_F(0x04324d7f) /* 0.262280940 */, 18 },
-  /* 4247 */  { MAD_F(0x0432a3dd) /* 0.262363305 */, 18 },
-  /* 4248 */  { MAD_F(0x0432fa3d) /* 0.262445676 */, 18 },
-  /* 4249 */  { MAD_F(0x0433509e) /* 0.262528054 */, 18 },
-  /* 4250 */  { MAD_F(0x0433a701) /* 0.262610438 */, 18 },
-  /* 4251 */  { MAD_F(0x0433fd65) /* 0.262692829 */, 18 },
-  /* 4252 */  { MAD_F(0x043453cc) /* 0.262775227 */, 18 },
-  /* 4253 */  { MAD_F(0x0434aa34) /* 0.262857630 */, 18 },
-  /* 4254 */  { MAD_F(0x0435009d) /* 0.262940040 */, 18 },
-  /* 4255 */  { MAD_F(0x04355709) /* 0.263022457 */, 18 },
-
-  /* 4256 */  { MAD_F(0x0435ad76) /* 0.263104880 */, 18 },
-  /* 4257 */  { MAD_F(0x043603e5) /* 0.263187310 */, 18 },
-  /* 4258 */  { MAD_F(0x04365a56) /* 0.263269746 */, 18 },
-  /* 4259 */  { MAD_F(0x0436b0c9) /* 0.263352188 */, 18 },
-  /* 4260 */  { MAD_F(0x0437073d) /* 0.263434637 */, 18 },
-  /* 4261 */  { MAD_F(0x04375db3) /* 0.263517093 */, 18 },
-  /* 4262 */  { MAD_F(0x0437b42a) /* 0.263599554 */, 18 },
-  /* 4263 */  { MAD_F(0x04380aa4) /* 0.263682023 */, 18 },
-  /* 4264 */  { MAD_F(0x0438611f) /* 0.263764497 */, 18 },
-  /* 4265 */  { MAD_F(0x0438b79c) /* 0.263846979 */, 18 },
-  /* 4266 */  { MAD_F(0x04390e1a) /* 0.263929466 */, 18 },
-  /* 4267 */  { MAD_F(0x0439649b) /* 0.264011960 */, 18 },
-  /* 4268 */  { MAD_F(0x0439bb1d) /* 0.264094461 */, 18 },
-  /* 4269 */  { MAD_F(0x043a11a1) /* 0.264176968 */, 18 },
-  /* 4270 */  { MAD_F(0x043a6826) /* 0.264259481 */, 18 },
-  /* 4271 */  { MAD_F(0x043abead) /* 0.264342001 */, 18 },
-
-  /* 4272 */  { MAD_F(0x043b1536) /* 0.264424527 */, 18 },
-  /* 4273 */  { MAD_F(0x043b6bc1) /* 0.264507060 */, 18 },
-  /* 4274 */  { MAD_F(0x043bc24d) /* 0.264589599 */, 18 },
-  /* 4275 */  { MAD_F(0x043c18dc) /* 0.264672145 */, 18 },
-  /* 4276 */  { MAD_F(0x043c6f6c) /* 0.264754697 */, 18 },
-  /* 4277 */  { MAD_F(0x043cc5fd) /* 0.264837255 */, 18 },
-  /* 4278 */  { MAD_F(0x043d1c91) /* 0.264919820 */, 18 },
-  /* 4279 */  { MAD_F(0x043d7326) /* 0.265002392 */, 18 },
-  /* 4280 */  { MAD_F(0x043dc9bc) /* 0.265084969 */, 18 },
-  /* 4281 */  { MAD_F(0x043e2055) /* 0.265167554 */, 18 },
-  /* 4282 */  { MAD_F(0x043e76ef) /* 0.265250144 */, 18 },
-  /* 4283 */  { MAD_F(0x043ecd8b) /* 0.265332741 */, 18 },
-  /* 4284 */  { MAD_F(0x043f2429) /* 0.265415345 */, 18 },
-  /* 4285 */  { MAD_F(0x043f7ac8) /* 0.265497955 */, 18 },
-  /* 4286 */  { MAD_F(0x043fd169) /* 0.265580571 */, 18 },
-  /* 4287 */  { MAD_F(0x0440280c) /* 0.265663194 */, 18 },
-
-  /* 4288 */  { MAD_F(0x04407eb1) /* 0.265745823 */, 18 },
-  /* 4289 */  { MAD_F(0x0440d557) /* 0.265828459 */, 18 },
-  /* 4290 */  { MAD_F(0x04412bff) /* 0.265911101 */, 18 },
-  /* 4291 */  { MAD_F(0x044182a9) /* 0.265993749 */, 18 },
-  /* 4292 */  { MAD_F(0x0441d955) /* 0.266076404 */, 18 },
-  /* 4293 */  { MAD_F(0x04423002) /* 0.266159065 */, 18 },
-  /* 4294 */  { MAD_F(0x044286b1) /* 0.266241733 */, 18 },
-  /* 4295 */  { MAD_F(0x0442dd61) /* 0.266324407 */, 18 },
-  /* 4296 */  { MAD_F(0x04433414) /* 0.266407088 */, 18 },
-  /* 4297 */  { MAD_F(0x04438ac8) /* 0.266489775 */, 18 },
-  /* 4298 */  { MAD_F(0x0443e17e) /* 0.266572468 */, 18 },
-  /* 4299 */  { MAD_F(0x04443835) /* 0.266655168 */, 18 },
-  /* 4300 */  { MAD_F(0x04448eef) /* 0.266737874 */, 18 },
-  /* 4301 */  { MAD_F(0x0444e5aa) /* 0.266820587 */, 18 },
-  /* 4302 */  { MAD_F(0x04453c66) /* 0.266903306 */, 18 },
-  /* 4303 */  { MAD_F(0x04459325) /* 0.266986031 */, 18 },
-
-  /* 4304 */  { MAD_F(0x0445e9e5) /* 0.267068763 */, 18 },
-  /* 4305 */  { MAD_F(0x044640a7) /* 0.267151501 */, 18 },
-  /* 4306 */  { MAD_F(0x0446976a) /* 0.267234246 */, 18 },
-  /* 4307 */  { MAD_F(0x0446ee30) /* 0.267316997 */, 18 },
-  /* 4308 */  { MAD_F(0x044744f7) /* 0.267399755 */, 18 },
-  /* 4309 */  { MAD_F(0x04479bc0) /* 0.267482518 */, 18 },
-  /* 4310 */  { MAD_F(0x0447f28a) /* 0.267565289 */, 18 },
-  /* 4311 */  { MAD_F(0x04484956) /* 0.267648065 */, 18 },
-  /* 4312 */  { MAD_F(0x0448a024) /* 0.267730848 */, 18 },
-  /* 4313 */  { MAD_F(0x0448f6f4) /* 0.267813638 */, 18 },
-  /* 4314 */  { MAD_F(0x04494dc5) /* 0.267896434 */, 18 },
-  /* 4315 */  { MAD_F(0x0449a498) /* 0.267979236 */, 18 },
-  /* 4316 */  { MAD_F(0x0449fb6d) /* 0.268062045 */, 18 },
-  /* 4317 */  { MAD_F(0x044a5243) /* 0.268144860 */, 18 },
-  /* 4318 */  { MAD_F(0x044aa91c) /* 0.268227681 */, 18 },
-  /* 4319 */  { MAD_F(0x044afff6) /* 0.268310509 */, 18 },
-
-  /* 4320 */  { MAD_F(0x044b56d1) /* 0.268393343 */, 18 },
-  /* 4321 */  { MAD_F(0x044badaf) /* 0.268476184 */, 18 },
-  /* 4322 */  { MAD_F(0x044c048e) /* 0.268559031 */, 18 },
-  /* 4323 */  { MAD_F(0x044c5b6f) /* 0.268641885 */, 18 },
-  /* 4324 */  { MAD_F(0x044cb251) /* 0.268724744 */, 18 },
-  /* 4325 */  { MAD_F(0x044d0935) /* 0.268807611 */, 18 },
-  /* 4326 */  { MAD_F(0x044d601b) /* 0.268890483 */, 18 },
-  /* 4327 */  { MAD_F(0x044db703) /* 0.268973362 */, 18 },
-  /* 4328 */  { MAD_F(0x044e0dec) /* 0.269056248 */, 18 },
-  /* 4329 */  { MAD_F(0x044e64d7) /* 0.269139139 */, 18 },
-  /* 4330 */  { MAD_F(0x044ebbc4) /* 0.269222037 */, 18 },
-  /* 4331 */  { MAD_F(0x044f12b3) /* 0.269304942 */, 18 },
-  /* 4332 */  { MAD_F(0x044f69a3) /* 0.269387853 */, 18 },
-  /* 4333 */  { MAD_F(0x044fc095) /* 0.269470770 */, 18 },
-  /* 4334 */  { MAD_F(0x04501788) /* 0.269553694 */, 18 },
-  /* 4335 */  { MAD_F(0x04506e7e) /* 0.269636624 */, 18 },
-
-  /* 4336 */  { MAD_F(0x0450c575) /* 0.269719560 */, 18 },
-  /* 4337 */  { MAD_F(0x04511c6e) /* 0.269802503 */, 18 },
-  /* 4338 */  { MAD_F(0x04517368) /* 0.269885452 */, 18 },
-  /* 4339 */  { MAD_F(0x0451ca64) /* 0.269968408 */, 18 },
-  /* 4340 */  { MAD_F(0x04522162) /* 0.270051370 */, 18 },
-  /* 4341 */  { MAD_F(0x04527862) /* 0.270134338 */, 18 },
-  /* 4342 */  { MAD_F(0x0452cf63) /* 0.270217312 */, 18 },
-  /* 4343 */  { MAD_F(0x04532666) /* 0.270300293 */, 18 },
-  /* 4344 */  { MAD_F(0x04537d6b) /* 0.270383281 */, 18 },
-  /* 4345 */  { MAD_F(0x0453d472) /* 0.270466275 */, 18 },
-  /* 4346 */  { MAD_F(0x04542b7a) /* 0.270549275 */, 18 },
-  /* 4347 */  { MAD_F(0x04548284) /* 0.270632281 */, 18 },
-  /* 4348 */  { MAD_F(0x0454d98f) /* 0.270715294 */, 18 },
-  /* 4349 */  { MAD_F(0x0455309c) /* 0.270798313 */, 18 },
-  /* 4350 */  { MAD_F(0x045587ab) /* 0.270881339 */, 18 },
-  /* 4351 */  { MAD_F(0x0455debc) /* 0.270964371 */, 18 },
-
-  /* 4352 */  { MAD_F(0x045635cf) /* 0.271047409 */, 18 },
-  /* 4353 */  { MAD_F(0x04568ce3) /* 0.271130454 */, 18 },
-  /* 4354 */  { MAD_F(0x0456e3f9) /* 0.271213505 */, 18 },
-  /* 4355 */  { MAD_F(0x04573b10) /* 0.271296562 */, 18 },
-  /* 4356 */  { MAD_F(0x04579229) /* 0.271379626 */, 18 },
-  /* 4357 */  { MAD_F(0x0457e944) /* 0.271462696 */, 18 },
-  /* 4358 */  { MAD_F(0x04584061) /* 0.271545772 */, 18 },
-  /* 4359 */  { MAD_F(0x0458977f) /* 0.271628855 */, 18 },
-  /* 4360 */  { MAD_F(0x0458ee9f) /* 0.271711944 */, 18 },
-  /* 4361 */  { MAD_F(0x045945c1) /* 0.271795040 */, 18 },
-  /* 4362 */  { MAD_F(0x04599ce5) /* 0.271878142 */, 18 },
-  /* 4363 */  { MAD_F(0x0459f40a) /* 0.271961250 */, 18 },
-  /* 4364 */  { MAD_F(0x045a4b31) /* 0.272044365 */, 18 },
-  /* 4365 */  { MAD_F(0x045aa259) /* 0.272127486 */, 18 },
-  /* 4366 */  { MAD_F(0x045af984) /* 0.272210613 */, 18 },
-  /* 4367 */  { MAD_F(0x045b50b0) /* 0.272293746 */, 18 },
-
-  /* 4368 */  { MAD_F(0x045ba7dd) /* 0.272376886 */, 18 },
-  /* 4369 */  { MAD_F(0x045bff0d) /* 0.272460033 */, 18 },
-  /* 4370 */  { MAD_F(0x045c563e) /* 0.272543185 */, 18 },
-  /* 4371 */  { MAD_F(0x045cad71) /* 0.272626344 */, 18 },
-  /* 4372 */  { MAD_F(0x045d04a5) /* 0.272709510 */, 18 },
-  /* 4373 */  { MAD_F(0x045d5bdc) /* 0.272792681 */, 18 },
-  /* 4374 */  { MAD_F(0x045db313) /* 0.272875859 */, 18 },
-  /* 4375 */  { MAD_F(0x045e0a4d) /* 0.272959044 */, 18 },
-  /* 4376 */  { MAD_F(0x045e6188) /* 0.273042234 */, 18 },
-  /* 4377 */  { MAD_F(0x045eb8c5) /* 0.273125431 */, 18 },
-  /* 4378 */  { MAD_F(0x045f1004) /* 0.273208635 */, 18 },
-  /* 4379 */  { MAD_F(0x045f6745) /* 0.273291844 */, 18 },
-  /* 4380 */  { MAD_F(0x045fbe87) /* 0.273375060 */, 18 },
-  /* 4381 */  { MAD_F(0x046015cb) /* 0.273458283 */, 18 },
-  /* 4382 */  { MAD_F(0x04606d10) /* 0.273541511 */, 18 },
-  /* 4383 */  { MAD_F(0x0460c457) /* 0.273624747 */, 18 },
-
-  /* 4384 */  { MAD_F(0x04611ba0) /* 0.273707988 */, 18 },
-  /* 4385 */  { MAD_F(0x046172eb) /* 0.273791236 */, 18 },
-  /* 4386 */  { MAD_F(0x0461ca37) /* 0.273874490 */, 18 },
-  /* 4387 */  { MAD_F(0x04622185) /* 0.273957750 */, 18 },
-  /* 4388 */  { MAD_F(0x046278d5) /* 0.274041017 */, 18 },
-  /* 4389 */  { MAD_F(0x0462d026) /* 0.274124290 */, 18 },
-  /* 4390 */  { MAD_F(0x0463277a) /* 0.274207569 */, 18 },
-  /* 4391 */  { MAD_F(0x04637ece) /* 0.274290855 */, 18 },
-  /* 4392 */  { MAD_F(0x0463d625) /* 0.274374147 */, 18 },
-  /* 4393 */  { MAD_F(0x04642d7d) /* 0.274457445 */, 18 },
-  /* 4394 */  { MAD_F(0x046484d7) /* 0.274540749 */, 18 },
-  /* 4395 */  { MAD_F(0x0464dc33) /* 0.274624060 */, 18 },
-  /* 4396 */  { MAD_F(0x04653390) /* 0.274707378 */, 18 },
-  /* 4397 */  { MAD_F(0x04658aef) /* 0.274790701 */, 18 },
-  /* 4398 */  { MAD_F(0x0465e250) /* 0.274874031 */, 18 },
-  /* 4399 */  { MAD_F(0x046639b2) /* 0.274957367 */, 18 },
-
-  /* 4400 */  { MAD_F(0x04669116) /* 0.275040710 */, 18 },
-  /* 4401 */  { MAD_F(0x0466e87c) /* 0.275124059 */, 18 },
-  /* 4402 */  { MAD_F(0x04673fe3) /* 0.275207414 */, 18 },
-  /* 4403 */  { MAD_F(0x0467974d) /* 0.275290775 */, 18 },
-  /* 4404 */  { MAD_F(0x0467eeb7) /* 0.275374143 */, 18 },
-  /* 4405 */  { MAD_F(0x04684624) /* 0.275457517 */, 18 },
-  /* 4406 */  { MAD_F(0x04689d92) /* 0.275540897 */, 18 },
-  /* 4407 */  { MAD_F(0x0468f502) /* 0.275624284 */, 18 },
-  /* 4408 */  { MAD_F(0x04694c74) /* 0.275707677 */, 18 },
-  /* 4409 */  { MAD_F(0x0469a3e7) /* 0.275791076 */, 18 },
-  /* 4410 */  { MAD_F(0x0469fb5c) /* 0.275874482 */, 18 },
-  /* 4411 */  { MAD_F(0x046a52d3) /* 0.275957894 */, 18 },
-  /* 4412 */  { MAD_F(0x046aaa4b) /* 0.276041312 */, 18 },
-  /* 4413 */  { MAD_F(0x046b01c5) /* 0.276124737 */, 18 },
-  /* 4414 */  { MAD_F(0x046b5941) /* 0.276208167 */, 18 },
-  /* 4415 */  { MAD_F(0x046bb0bf) /* 0.276291605 */, 18 },
-
-  /* 4416 */  { MAD_F(0x046c083e) /* 0.276375048 */, 18 },
-  /* 4417 */  { MAD_F(0x046c5fbf) /* 0.276458498 */, 18 },
-  /* 4418 */  { MAD_F(0x046cb741) /* 0.276541954 */, 18 },
-  /* 4419 */  { MAD_F(0x046d0ec5) /* 0.276625416 */, 18 },
-  /* 4420 */  { MAD_F(0x046d664b) /* 0.276708885 */, 18 },
-  /* 4421 */  { MAD_F(0x046dbdd3) /* 0.276792360 */, 18 },
-  /* 4422 */  { MAD_F(0x046e155c) /* 0.276875841 */, 18 },
-  /* 4423 */  { MAD_F(0x046e6ce7) /* 0.276959328 */, 18 },
-  /* 4424 */  { MAD_F(0x046ec474) /* 0.277042822 */, 18 },
-  /* 4425 */  { MAD_F(0x046f1c02) /* 0.277126322 */, 18 },
-  /* 4426 */  { MAD_F(0x046f7392) /* 0.277209829 */, 18 },
-  /* 4427 */  { MAD_F(0x046fcb24) /* 0.277293341 */, 18 },
-  /* 4428 */  { MAD_F(0x047022b8) /* 0.277376860 */, 18 },
-  /* 4429 */  { MAD_F(0x04707a4d) /* 0.277460385 */, 18 },
-  /* 4430 */  { MAD_F(0x0470d1e4) /* 0.277543917 */, 18 },
-  /* 4431 */  { MAD_F(0x0471297c) /* 0.277627455 */, 18 },
-
-  /* 4432 */  { MAD_F(0x04718116) /* 0.277710999 */, 18 },
-  /* 4433 */  { MAD_F(0x0471d8b2) /* 0.277794549 */, 18 },
-  /* 4434 */  { MAD_F(0x04723050) /* 0.277878106 */, 18 },
-  /* 4435 */  { MAD_F(0x047287ef) /* 0.277961669 */, 18 },
-  /* 4436 */  { MAD_F(0x0472df90) /* 0.278045238 */, 18 },
-  /* 4437 */  { MAD_F(0x04733733) /* 0.278128813 */, 18 },
-  /* 4438 */  { MAD_F(0x04738ed7) /* 0.278212395 */, 18 },
-  /* 4439 */  { MAD_F(0x0473e67d) /* 0.278295983 */, 18 },
-  /* 4440 */  { MAD_F(0x04743e25) /* 0.278379578 */, 18 },
-  /* 4441 */  { MAD_F(0x047495ce) /* 0.278463178 */, 18 },
-  /* 4442 */  { MAD_F(0x0474ed79) /* 0.278546785 */, 18 },
-  /* 4443 */  { MAD_F(0x04754526) /* 0.278630398 */, 18 },
-  /* 4444 */  { MAD_F(0x04759cd4) /* 0.278714018 */, 18 },
-  /* 4445 */  { MAD_F(0x0475f484) /* 0.278797643 */, 18 },
-  /* 4446 */  { MAD_F(0x04764c36) /* 0.278881275 */, 18 },
-  /* 4447 */  { MAD_F(0x0476a3ea) /* 0.278964914 */, 18 },
-
-  /* 4448 */  { MAD_F(0x0476fb9f) /* 0.279048558 */, 18 },
-  /* 4449 */  { MAD_F(0x04775356) /* 0.279132209 */, 18 },
-  /* 4450 */  { MAD_F(0x0477ab0e) /* 0.279215866 */, 18 },
-  /* 4451 */  { MAD_F(0x047802c8) /* 0.279299529 */, 18 },
-  /* 4452 */  { MAD_F(0x04785a84) /* 0.279383199 */, 18 },
-  /* 4453 */  { MAD_F(0x0478b242) /* 0.279466875 */, 18 },
-  /* 4454 */  { MAD_F(0x04790a01) /* 0.279550557 */, 18 },
-  /* 4455 */  { MAD_F(0x047961c2) /* 0.279634245 */, 18 },
-  /* 4456 */  { MAD_F(0x0479b984) /* 0.279717940 */, 18 },
-  /* 4457 */  { MAD_F(0x047a1149) /* 0.279801641 */, 18 },
-  /* 4458 */  { MAD_F(0x047a690f) /* 0.279885348 */, 18 },
-  /* 4459 */  { MAD_F(0x047ac0d6) /* 0.279969061 */, 18 },
-  /* 4460 */  { MAD_F(0x047b18a0) /* 0.280052781 */, 18 },
-  /* 4461 */  { MAD_F(0x047b706b) /* 0.280136507 */, 18 },
-  /* 4462 */  { MAD_F(0x047bc837) /* 0.280220239 */, 18 },
-  /* 4463 */  { MAD_F(0x047c2006) /* 0.280303978 */, 18 },
-
-  /* 4464 */  { MAD_F(0x047c77d6) /* 0.280387722 */, 18 },
-  /* 4465 */  { MAD_F(0x047ccfa8) /* 0.280471473 */, 18 },
-  /* 4466 */  { MAD_F(0x047d277b) /* 0.280555230 */, 18 },
-  /* 4467 */  { MAD_F(0x047d7f50) /* 0.280638994 */, 18 },
-  /* 4468 */  { MAD_F(0x047dd727) /* 0.280722764 */, 18 },
-  /* 4469 */  { MAD_F(0x047e2eff) /* 0.280806540 */, 18 },
-  /* 4470 */  { MAD_F(0x047e86d9) /* 0.280890322 */, 18 },
-  /* 4471 */  { MAD_F(0x047edeb5) /* 0.280974110 */, 18 },
-  /* 4472 */  { MAD_F(0x047f3693) /* 0.281057905 */, 18 },
-  /* 4473 */  { MAD_F(0x047f8e72) /* 0.281141706 */, 18 },
-  /* 4474 */  { MAD_F(0x047fe653) /* 0.281225513 */, 18 },
-  /* 4475 */  { MAD_F(0x04803e35) /* 0.281309326 */, 18 },
-  /* 4476 */  { MAD_F(0x04809619) /* 0.281393146 */, 18 },
-  /* 4477 */  { MAD_F(0x0480edff) /* 0.281476972 */, 18 },
-  /* 4478 */  { MAD_F(0x048145e7) /* 0.281560804 */, 18 },
-  /* 4479 */  { MAD_F(0x04819dd0) /* 0.281644643 */, 18 },
-
-  /* 4480 */  { MAD_F(0x0481f5bb) /* 0.281728487 */, 18 },
-  /* 4481 */  { MAD_F(0x04824da7) /* 0.281812338 */, 18 },
-  /* 4482 */  { MAD_F(0x0482a595) /* 0.281896195 */, 18 },
-  /* 4483 */  { MAD_F(0x0482fd85) /* 0.281980059 */, 18 },
-  /* 4484 */  { MAD_F(0x04835577) /* 0.282063928 */, 18 },
-  /* 4485 */  { MAD_F(0x0483ad6a) /* 0.282147804 */, 18 },
-  /* 4486 */  { MAD_F(0x0484055f) /* 0.282231686 */, 18 },
-  /* 4487 */  { MAD_F(0x04845d56) /* 0.282315574 */, 18 },
-  /* 4488 */  { MAD_F(0x0484b54e) /* 0.282399469 */, 18 },
-  /* 4489 */  { MAD_F(0x04850d48) /* 0.282483370 */, 18 },
-  /* 4490 */  { MAD_F(0x04856544) /* 0.282567277 */, 18 },
-  /* 4491 */  { MAD_F(0x0485bd41) /* 0.282651190 */, 18 },
-  /* 4492 */  { MAD_F(0x04861540) /* 0.282735109 */, 18 },
-  /* 4493 */  { MAD_F(0x04866d40) /* 0.282819035 */, 18 },
-  /* 4494 */  { MAD_F(0x0486c543) /* 0.282902967 */, 18 },
-  /* 4495 */  { MAD_F(0x04871d47) /* 0.282986905 */, 18 },
-
-  /* 4496 */  { MAD_F(0x0487754c) /* 0.283070849 */, 18 },
-  /* 4497 */  { MAD_F(0x0487cd54) /* 0.283154800 */, 18 },
-  /* 4498 */  { MAD_F(0x0488255d) /* 0.283238757 */, 18 },
-  /* 4499 */  { MAD_F(0x04887d67) /* 0.283322720 */, 18 },
-  /* 4500 */  { MAD_F(0x0488d574) /* 0.283406689 */, 18 },
-  /* 4501 */  { MAD_F(0x04892d82) /* 0.283490665 */, 18 },
-  /* 4502 */  { MAD_F(0x04898591) /* 0.283574646 */, 18 },
-  /* 4503 */  { MAD_F(0x0489dda3) /* 0.283658634 */, 18 },
-  /* 4504 */  { MAD_F(0x048a35b6) /* 0.283742628 */, 18 },
-  /* 4505 */  { MAD_F(0x048a8dca) /* 0.283826629 */, 18 },
-  /* 4506 */  { MAD_F(0x048ae5e1) /* 0.283910635 */, 18 },
-  /* 4507 */  { MAD_F(0x048b3df9) /* 0.283994648 */, 18 },
-  /* 4508 */  { MAD_F(0x048b9612) /* 0.284078667 */, 18 },
-  /* 4509 */  { MAD_F(0x048bee2e) /* 0.284162692 */, 18 },
-  /* 4510 */  { MAD_F(0x048c464b) /* 0.284246723 */, 18 },
-  /* 4511 */  { MAD_F(0x048c9e69) /* 0.284330761 */, 18 },
-
-  /* 4512 */  { MAD_F(0x048cf68a) /* 0.284414805 */, 18 },
-  /* 4513 */  { MAD_F(0x048d4eac) /* 0.284498855 */, 18 },
-  /* 4514 */  { MAD_F(0x048da6cf) /* 0.284582911 */, 18 },
-  /* 4515 */  { MAD_F(0x048dfef5) /* 0.284666974 */, 18 },
-  /* 4516 */  { MAD_F(0x048e571c) /* 0.284751042 */, 18 },
-  /* 4517 */  { MAD_F(0x048eaf44) /* 0.284835117 */, 18 },
-  /* 4518 */  { MAD_F(0x048f076f) /* 0.284919198 */, 18 },
-  /* 4519 */  { MAD_F(0x048f5f9b) /* 0.285003285 */, 18 },
-  /* 4520 */  { MAD_F(0x048fb7c8) /* 0.285087379 */, 18 },
-  /* 4521 */  { MAD_F(0x04900ff8) /* 0.285171479 */, 18 },
-  /* 4522 */  { MAD_F(0x04906829) /* 0.285255584 */, 18 },
-  /* 4523 */  { MAD_F(0x0490c05b) /* 0.285339697 */, 18 },
-  /* 4524 */  { MAD_F(0x04911890) /* 0.285423815 */, 18 },
-  /* 4525 */  { MAD_F(0x049170c6) /* 0.285507939 */, 18 },
-  /* 4526 */  { MAD_F(0x0491c8fd) /* 0.285592070 */, 18 },
-  /* 4527 */  { MAD_F(0x04922137) /* 0.285676207 */, 18 },
-
-  /* 4528 */  { MAD_F(0x04927972) /* 0.285760350 */, 18 },
-  /* 4529 */  { MAD_F(0x0492d1ae) /* 0.285844499 */, 18 },
-  /* 4530 */  { MAD_F(0x049329ed) /* 0.285928655 */, 18 },
-  /* 4531 */  { MAD_F(0x0493822c) /* 0.286012816 */, 18 },
-  /* 4532 */  { MAD_F(0x0493da6e) /* 0.286096984 */, 18 },
-  /* 4533 */  { MAD_F(0x049432b1) /* 0.286181158 */, 18 },
-  /* 4534 */  { MAD_F(0x04948af6) /* 0.286265338 */, 18 },
-  /* 4535 */  { MAD_F(0x0494e33d) /* 0.286349525 */, 18 },
-  /* 4536 */  { MAD_F(0x04953b85) /* 0.286433717 */, 18 },
-  /* 4537 */  { MAD_F(0x049593cf) /* 0.286517916 */, 18 },
-  /* 4538 */  { MAD_F(0x0495ec1b) /* 0.286602121 */, 18 },
-  /* 4539 */  { MAD_F(0x04964468) /* 0.286686332 */, 18 },
-  /* 4540 */  { MAD_F(0x04969cb7) /* 0.286770550 */, 18 },
-  /* 4541 */  { MAD_F(0x0496f508) /* 0.286854773 */, 18 },
-  /* 4542 */  { MAD_F(0x04974d5a) /* 0.286939003 */, 18 },
-  /* 4543 */  { MAD_F(0x0497a5ae) /* 0.287023239 */, 18 },
-
-  /* 4544 */  { MAD_F(0x0497fe03) /* 0.287107481 */, 18 },
-  /* 4545 */  { MAD_F(0x0498565a) /* 0.287191729 */, 18 },
-  /* 4546 */  { MAD_F(0x0498aeb3) /* 0.287275983 */, 18 },
-  /* 4547 */  { MAD_F(0x0499070e) /* 0.287360244 */, 18 },
-  /* 4548 */  { MAD_F(0x04995f6a) /* 0.287444511 */, 18 },
-  /* 4549 */  { MAD_F(0x0499b7c8) /* 0.287528784 */, 18 },
-  /* 4550 */  { MAD_F(0x049a1027) /* 0.287613063 */, 18 },
-  /* 4551 */  { MAD_F(0x049a6889) /* 0.287697348 */, 18 },
-  /* 4552 */  { MAD_F(0x049ac0eb) /* 0.287781640 */, 18 },
-  /* 4553 */  { MAD_F(0x049b1950) /* 0.287865937 */, 18 },
-  /* 4554 */  { MAD_F(0x049b71b6) /* 0.287950241 */, 18 },
-  /* 4555 */  { MAD_F(0x049bca1e) /* 0.288034551 */, 18 },
-  /* 4556 */  { MAD_F(0x049c2287) /* 0.288118867 */, 18 },
-  /* 4557 */  { MAD_F(0x049c7af2) /* 0.288203190 */, 18 },
-  /* 4558 */  { MAD_F(0x049cd35f) /* 0.288287518 */, 18 },
-  /* 4559 */  { MAD_F(0x049d2bce) /* 0.288371853 */, 18 },
-
-  /* 4560 */  { MAD_F(0x049d843e) /* 0.288456194 */, 18 },
-  /* 4561 */  { MAD_F(0x049ddcaf) /* 0.288540541 */, 18 },
-  /* 4562 */  { MAD_F(0x049e3523) /* 0.288624894 */, 18 },
-  /* 4563 */  { MAD_F(0x049e8d98) /* 0.288709253 */, 18 },
-  /* 4564 */  { MAD_F(0x049ee60e) /* 0.288793619 */, 18 },
-  /* 4565 */  { MAD_F(0x049f3e87) /* 0.288877990 */, 18 },
-  /* 4566 */  { MAD_F(0x049f9701) /* 0.288962368 */, 18 },
-  /* 4567 */  { MAD_F(0x049fef7c) /* 0.289046752 */, 18 },
-  /* 4568 */  { MAD_F(0x04a047fa) /* 0.289131142 */, 18 },
-  /* 4569 */  { MAD_F(0x04a0a079) /* 0.289215538 */, 18 },
-  /* 4570 */  { MAD_F(0x04a0f8f9) /* 0.289299941 */, 18 },
-  /* 4571 */  { MAD_F(0x04a1517c) /* 0.289384349 */, 18 },
-  /* 4572 */  { MAD_F(0x04a1a9ff) /* 0.289468764 */, 18 },
-  /* 4573 */  { MAD_F(0x04a20285) /* 0.289553185 */, 18 },
-  /* 4574 */  { MAD_F(0x04a25b0c) /* 0.289637612 */, 18 },
-  /* 4575 */  { MAD_F(0x04a2b395) /* 0.289722045 */, 18 },
-
-  /* 4576 */  { MAD_F(0x04a30c20) /* 0.289806485 */, 18 },
-  /* 4577 */  { MAD_F(0x04a364ac) /* 0.289890930 */, 18 },
-  /* 4578 */  { MAD_F(0x04a3bd3a) /* 0.289975382 */, 18 },
-  /* 4579 */  { MAD_F(0x04a415c9) /* 0.290059840 */, 18 },
-  /* 4580 */  { MAD_F(0x04a46e5a) /* 0.290144304 */, 18 },
-  /* 4581 */  { MAD_F(0x04a4c6ed) /* 0.290228774 */, 18 },
-  /* 4582 */  { MAD_F(0x04a51f81) /* 0.290313250 */, 18 },
-  /* 4583 */  { MAD_F(0x04a57818) /* 0.290397733 */, 18 },
-  /* 4584 */  { MAD_F(0x04a5d0af) /* 0.290482221 */, 18 },
-  /* 4585 */  { MAD_F(0x04a62949) /* 0.290566716 */, 18 },
-  /* 4586 */  { MAD_F(0x04a681e4) /* 0.290651217 */, 18 },
-  /* 4587 */  { MAD_F(0x04a6da80) /* 0.290735724 */, 18 },
-  /* 4588 */  { MAD_F(0x04a7331f) /* 0.290820237 */, 18 },
-  /* 4589 */  { MAD_F(0x04a78bbf) /* 0.290904756 */, 18 },
-  /* 4590 */  { MAD_F(0x04a7e460) /* 0.290989281 */, 18 },
-  /* 4591 */  { MAD_F(0x04a83d03) /* 0.291073813 */, 18 },
-
-  /* 4592 */  { MAD_F(0x04a895a8) /* 0.291158351 */, 18 },
-  /* 4593 */  { MAD_F(0x04a8ee4f) /* 0.291242894 */, 18 },
-  /* 4594 */  { MAD_F(0x04a946f7) /* 0.291327444 */, 18 },
-  /* 4595 */  { MAD_F(0x04a99fa1) /* 0.291412001 */, 18 },
-  /* 4596 */  { MAD_F(0x04a9f84c) /* 0.291496563 */, 18 },
-  /* 4597 */  { MAD_F(0x04aa50fa) /* 0.291581131 */, 18 },
-  /* 4598 */  { MAD_F(0x04aaa9a8) /* 0.291665706 */, 18 },
-  /* 4599 */  { MAD_F(0x04ab0259) /* 0.291750286 */, 18 },
-  /* 4600 */  { MAD_F(0x04ab5b0b) /* 0.291834873 */, 18 },
-  /* 4601 */  { MAD_F(0x04abb3bf) /* 0.291919466 */, 18 },
-  /* 4602 */  { MAD_F(0x04ac0c74) /* 0.292004065 */, 18 },
-  /* 4603 */  { MAD_F(0x04ac652b) /* 0.292088670 */, 18 },
-  /* 4604 */  { MAD_F(0x04acbde4) /* 0.292173281 */, 18 },
-  /* 4605 */  { MAD_F(0x04ad169e) /* 0.292257899 */, 18 },
-  /* 4606 */  { MAD_F(0x04ad6f5a) /* 0.292342522 */, 18 },
-  /* 4607 */  { MAD_F(0x04adc818) /* 0.292427152 */, 18 },
-
-  /* 4608 */  { MAD_F(0x04ae20d7) /* 0.292511788 */, 18 },
-  /* 4609 */  { MAD_F(0x04ae7998) /* 0.292596430 */, 18 },
-  /* 4610 */  { MAD_F(0x04aed25a) /* 0.292681078 */, 18 },
-  /* 4611 */  { MAD_F(0x04af2b1e) /* 0.292765732 */, 18 },
-  /* 4612 */  { MAD_F(0x04af83e4) /* 0.292850392 */, 18 },
-  /* 4613 */  { MAD_F(0x04afdcac) /* 0.292935058 */, 18 },
-  /* 4614 */  { MAD_F(0x04b03575) /* 0.293019731 */, 18 },
-  /* 4615 */  { MAD_F(0x04b08e40) /* 0.293104409 */, 18 },
-  /* 4616 */  { MAD_F(0x04b0e70c) /* 0.293189094 */, 18 },
-  /* 4617 */  { MAD_F(0x04b13fda) /* 0.293273785 */, 18 },
-  /* 4618 */  { MAD_F(0x04b198aa) /* 0.293358482 */, 18 },
-  /* 4619 */  { MAD_F(0x04b1f17b) /* 0.293443185 */, 18 },
-  /* 4620 */  { MAD_F(0x04b24a4e) /* 0.293527894 */, 18 },
-  /* 4621 */  { MAD_F(0x04b2a322) /* 0.293612609 */, 18 },
-  /* 4622 */  { MAD_F(0x04b2fbf9) /* 0.293697331 */, 18 },
-  /* 4623 */  { MAD_F(0x04b354d1) /* 0.293782058 */, 18 },
-
-  /* 4624 */  { MAD_F(0x04b3adaa) /* 0.293866792 */, 18 },
-  /* 4625 */  { MAD_F(0x04b40685) /* 0.293951532 */, 18 },
-  /* 4626 */  { MAD_F(0x04b45f62) /* 0.294036278 */, 18 },
-  /* 4627 */  { MAD_F(0x04b4b840) /* 0.294121029 */, 18 },
-  /* 4628 */  { MAD_F(0x04b51120) /* 0.294205788 */, 18 },
-  /* 4629 */  { MAD_F(0x04b56a02) /* 0.294290552 */, 18 },
-  /* 4630 */  { MAD_F(0x04b5c2e6) /* 0.294375322 */, 18 },
-  /* 4631 */  { MAD_F(0x04b61bcb) /* 0.294460098 */, 18 },
-  /* 4632 */  { MAD_F(0x04b674b1) /* 0.294544881 */, 18 },
-  /* 4633 */  { MAD_F(0x04b6cd99) /* 0.294629669 */, 18 },
-  /* 4634 */  { MAD_F(0x04b72683) /* 0.294714464 */, 18 },
-  /* 4635 */  { MAD_F(0x04b77f6f) /* 0.294799265 */, 18 },
-  /* 4636 */  { MAD_F(0x04b7d85c) /* 0.294884072 */, 18 },
-  /* 4637 */  { MAD_F(0x04b8314b) /* 0.294968885 */, 18 },
-  /* 4638 */  { MAD_F(0x04b88a3b) /* 0.295053704 */, 18 },
-  /* 4639 */  { MAD_F(0x04b8e32d) /* 0.295138529 */, 18 },
-
-  /* 4640 */  { MAD_F(0x04b93c21) /* 0.295223360 */, 18 },
-  /* 4641 */  { MAD_F(0x04b99516) /* 0.295308197 */, 18 },
-  /* 4642 */  { MAD_F(0x04b9ee0d) /* 0.295393041 */, 18 },
-  /* 4643 */  { MAD_F(0x04ba4706) /* 0.295477890 */, 18 },
-  /* 4644 */  { MAD_F(0x04baa000) /* 0.295562746 */, 18 },
-  /* 4645 */  { MAD_F(0x04baf8fc) /* 0.295647608 */, 18 },
-  /* 4646 */  { MAD_F(0x04bb51fa) /* 0.295732476 */, 18 },
-  /* 4647 */  { MAD_F(0x04bbaaf9) /* 0.295817349 */, 18 },
-  /* 4648 */  { MAD_F(0x04bc03fa) /* 0.295902229 */, 18 },
-  /* 4649 */  { MAD_F(0x04bc5cfc) /* 0.295987115 */, 18 },
-  /* 4650 */  { MAD_F(0x04bcb600) /* 0.296072008 */, 18 },
-  /* 4651 */  { MAD_F(0x04bd0f06) /* 0.296156906 */, 18 },
-  /* 4652 */  { MAD_F(0x04bd680d) /* 0.296241810 */, 18 },
-  /* 4653 */  { MAD_F(0x04bdc116) /* 0.296326721 */, 18 },
-  /* 4654 */  { MAD_F(0x04be1a21) /* 0.296411637 */, 18 },
-  /* 4655 */  { MAD_F(0x04be732d) /* 0.296496560 */, 18 },
-
-  /* 4656 */  { MAD_F(0x04becc3b) /* 0.296581488 */, 18 },
-  /* 4657 */  { MAD_F(0x04bf254a) /* 0.296666423 */, 18 },
-  /* 4658 */  { MAD_F(0x04bf7e5b) /* 0.296751364 */, 18 },
-  /* 4659 */  { MAD_F(0x04bfd76e) /* 0.296836311 */, 18 },
-  /* 4660 */  { MAD_F(0x04c03083) /* 0.296921264 */, 18 },
-  /* 4661 */  { MAD_F(0x04c08999) /* 0.297006223 */, 18 },
-  /* 4662 */  { MAD_F(0x04c0e2b0) /* 0.297091188 */, 18 },
-  /* 4663 */  { MAD_F(0x04c13bca) /* 0.297176159 */, 18 },
-  /* 4664 */  { MAD_F(0x04c194e4) /* 0.297261136 */, 18 },
-  /* 4665 */  { MAD_F(0x04c1ee01) /* 0.297346120 */, 18 },
-  /* 4666 */  { MAD_F(0x04c2471f) /* 0.297431109 */, 18 },
-  /* 4667 */  { MAD_F(0x04c2a03f) /* 0.297516105 */, 18 },
-  /* 4668 */  { MAD_F(0x04c2f960) /* 0.297601106 */, 18 },
-  /* 4669 */  { MAD_F(0x04c35283) /* 0.297686114 */, 18 },
-  /* 4670 */  { MAD_F(0x04c3aba8) /* 0.297771128 */, 18 },
-  /* 4671 */  { MAD_F(0x04c404ce) /* 0.297856147 */, 18 },
-
-  /* 4672 */  { MAD_F(0x04c45df6) /* 0.297941173 */, 18 },
-  /* 4673 */  { MAD_F(0x04c4b720) /* 0.298026205 */, 18 },
-  /* 4674 */  { MAD_F(0x04c5104b) /* 0.298111243 */, 18 },
-  /* 4675 */  { MAD_F(0x04c56978) /* 0.298196287 */, 18 },
-  /* 4676 */  { MAD_F(0x04c5c2a7) /* 0.298281337 */, 18 },
-  /* 4677 */  { MAD_F(0x04c61bd7) /* 0.298366393 */, 18 },
-  /* 4678 */  { MAD_F(0x04c67508) /* 0.298451456 */, 18 },
-  /* 4679 */  { MAD_F(0x04c6ce3c) /* 0.298536524 */, 18 },
-  /* 4680 */  { MAD_F(0x04c72771) /* 0.298621598 */, 18 },
-  /* 4681 */  { MAD_F(0x04c780a7) /* 0.298706679 */, 18 },
-  /* 4682 */  { MAD_F(0x04c7d9df) /* 0.298791765 */, 18 },
-  /* 4683 */  { MAD_F(0x04c83319) /* 0.298876858 */, 18 },
-  /* 4684 */  { MAD_F(0x04c88c55) /* 0.298961956 */, 18 },
-  /* 4685 */  { MAD_F(0x04c8e592) /* 0.299047061 */, 18 },
-  /* 4686 */  { MAD_F(0x04c93ed1) /* 0.299132172 */, 18 },
-  /* 4687 */  { MAD_F(0x04c99811) /* 0.299217288 */, 18 },
-
-  /* 4688 */  { MAD_F(0x04c9f153) /* 0.299302411 */, 18 },
-  /* 4689 */  { MAD_F(0x04ca4a97) /* 0.299387540 */, 18 },
-  /* 4690 */  { MAD_F(0x04caa3dc) /* 0.299472675 */, 18 },
-  /* 4691 */  { MAD_F(0x04cafd23) /* 0.299557816 */, 18 },
-  /* 4692 */  { MAD_F(0x04cb566b) /* 0.299642963 */, 18 },
-  /* 4693 */  { MAD_F(0x04cbafb5) /* 0.299728116 */, 18 },
-  /* 4694 */  { MAD_F(0x04cc0901) /* 0.299813275 */, 18 },
-  /* 4695 */  { MAD_F(0x04cc624e) /* 0.299898440 */, 18 },
-  /* 4696 */  { MAD_F(0x04ccbb9d) /* 0.299983611 */, 18 },
-  /* 4697 */  { MAD_F(0x04cd14ee) /* 0.300068789 */, 18 },
-  /* 4698 */  { MAD_F(0x04cd6e40) /* 0.300153972 */, 18 },
-  /* 4699 */  { MAD_F(0x04cdc794) /* 0.300239161 */, 18 },
-  /* 4700 */  { MAD_F(0x04ce20e9) /* 0.300324357 */, 18 },
-  /* 4701 */  { MAD_F(0x04ce7a40) /* 0.300409558 */, 18 },
-  /* 4702 */  { MAD_F(0x04ced399) /* 0.300494765 */, 18 },
-  /* 4703 */  { MAD_F(0x04cf2cf3) /* 0.300579979 */, 18 },
-
-  /* 4704 */  { MAD_F(0x04cf864f) /* 0.300665198 */, 18 },
-  /* 4705 */  { MAD_F(0x04cfdfad) /* 0.300750424 */, 18 },
-  /* 4706 */  { MAD_F(0x04d0390c) /* 0.300835656 */, 18 },
-  /* 4707 */  { MAD_F(0x04d0926d) /* 0.300920893 */, 18 },
-  /* 4708 */  { MAD_F(0x04d0ebcf) /* 0.301006137 */, 18 },
-  /* 4709 */  { MAD_F(0x04d14533) /* 0.301091387 */, 18 },
-  /* 4710 */  { MAD_F(0x04d19e99) /* 0.301176643 */, 18 },
-  /* 4711 */  { MAD_F(0x04d1f800) /* 0.301261904 */, 18 },
-  /* 4712 */  { MAD_F(0x04d25169) /* 0.301347172 */, 18 },
-  /* 4713 */  { MAD_F(0x04d2aad4) /* 0.301432446 */, 18 },
-  /* 4714 */  { MAD_F(0x04d30440) /* 0.301517726 */, 18 },
-  /* 4715 */  { MAD_F(0x04d35dae) /* 0.301603012 */, 18 },
-  /* 4716 */  { MAD_F(0x04d3b71d) /* 0.301688304 */, 18 },
-  /* 4717 */  { MAD_F(0x04d4108e) /* 0.301773602 */, 18 },
-  /* 4718 */  { MAD_F(0x04d46a01) /* 0.301858906 */, 18 },
-  /* 4719 */  { MAD_F(0x04d4c375) /* 0.301944216 */, 18 },
-
-  /* 4720 */  { MAD_F(0x04d51ceb) /* 0.302029532 */, 18 },
-  /* 4721 */  { MAD_F(0x04d57662) /* 0.302114854 */, 18 },
-  /* 4722 */  { MAD_F(0x04d5cfdb) /* 0.302200182 */, 18 },
-  /* 4723 */  { MAD_F(0x04d62956) /* 0.302285516 */, 18 },
-  /* 4724 */  { MAD_F(0x04d682d2) /* 0.302370856 */, 18 },
-  /* 4725 */  { MAD_F(0x04d6dc50) /* 0.302456203 */, 18 },
-  /* 4726 */  { MAD_F(0x04d735d0) /* 0.302541555 */, 18 },
-  /* 4727 */  { MAD_F(0x04d78f51) /* 0.302626913 */, 18 },
-  /* 4728 */  { MAD_F(0x04d7e8d4) /* 0.302712277 */, 18 },
-  /* 4729 */  { MAD_F(0x04d84258) /* 0.302797648 */, 18 },
-  /* 4730 */  { MAD_F(0x04d89bde) /* 0.302883024 */, 18 },
-  /* 4731 */  { MAD_F(0x04d8f566) /* 0.302968406 */, 18 },
-  /* 4732 */  { MAD_F(0x04d94eef) /* 0.303053794 */, 18 },
-  /* 4733 */  { MAD_F(0x04d9a87a) /* 0.303139189 */, 18 },
-  /* 4734 */  { MAD_F(0x04da0207) /* 0.303224589 */, 18 },
-  /* 4735 */  { MAD_F(0x04da5b95) /* 0.303309995 */, 18 },
-
-  /* 4736 */  { MAD_F(0x04dab524) /* 0.303395408 */, 18 },
-  /* 4737 */  { MAD_F(0x04db0eb6) /* 0.303480826 */, 18 },
-  /* 4738 */  { MAD_F(0x04db6849) /* 0.303566251 */, 18 },
-  /* 4739 */  { MAD_F(0x04dbc1dd) /* 0.303651681 */, 18 },
-  /* 4740 */  { MAD_F(0x04dc1b73) /* 0.303737117 */, 18 },
-  /* 4741 */  { MAD_F(0x04dc750b) /* 0.303822560 */, 18 },
-  /* 4742 */  { MAD_F(0x04dccea5) /* 0.303908008 */, 18 },
-  /* 4743 */  { MAD_F(0x04dd2840) /* 0.303993463 */, 18 },
-  /* 4744 */  { MAD_F(0x04dd81dc) /* 0.304078923 */, 18 },
-  /* 4745 */  { MAD_F(0x04dddb7a) /* 0.304164390 */, 18 },
-  /* 4746 */  { MAD_F(0x04de351a) /* 0.304249862 */, 18 },
-  /* 4747 */  { MAD_F(0x04de8ebc) /* 0.304335340 */, 18 },
-  /* 4748 */  { MAD_F(0x04dee85f) /* 0.304420825 */, 18 },
-  /* 4749 */  { MAD_F(0x04df4203) /* 0.304506315 */, 18 },
-  /* 4750 */  { MAD_F(0x04df9baa) /* 0.304591812 */, 18 },
-  /* 4751 */  { MAD_F(0x04dff552) /* 0.304677314 */, 18 },
-
-  /* 4752 */  { MAD_F(0x04e04efb) /* 0.304762823 */, 18 },
-  /* 4753 */  { MAD_F(0x04e0a8a6) /* 0.304848337 */, 18 },
-  /* 4754 */  { MAD_F(0x04e10253) /* 0.304933858 */, 18 },
-  /* 4755 */  { MAD_F(0x04e15c01) /* 0.305019384 */, 18 },
-  /* 4756 */  { MAD_F(0x04e1b5b1) /* 0.305104917 */, 18 },
-  /* 4757 */  { MAD_F(0x04e20f63) /* 0.305190455 */, 18 },
-  /* 4758 */  { MAD_F(0x04e26916) /* 0.305275999 */, 18 },
-  /* 4759 */  { MAD_F(0x04e2c2cb) /* 0.305361550 */, 18 },
-  /* 4760 */  { MAD_F(0x04e31c81) /* 0.305447106 */, 18 },
-  /* 4761 */  { MAD_F(0x04e37639) /* 0.305532669 */, 18 },
-  /* 4762 */  { MAD_F(0x04e3cff3) /* 0.305618237 */, 18 },
-  /* 4763 */  { MAD_F(0x04e429ae) /* 0.305703811 */, 18 },
-  /* 4764 */  { MAD_F(0x04e4836b) /* 0.305789392 */, 18 },
-  /* 4765 */  { MAD_F(0x04e4dd29) /* 0.305874978 */, 18 },
-  /* 4766 */  { MAD_F(0x04e536e9) /* 0.305960571 */, 18 },
-  /* 4767 */  { MAD_F(0x04e590ab) /* 0.306046169 */, 18 },
-
-  /* 4768 */  { MAD_F(0x04e5ea6e) /* 0.306131773 */, 18 },
-  /* 4769 */  { MAD_F(0x04e64433) /* 0.306217383 */, 18 },
-  /* 4770 */  { MAD_F(0x04e69df9) /* 0.306303000 */, 18 },
-  /* 4771 */  { MAD_F(0x04e6f7c1) /* 0.306388622 */, 18 },
-  /* 4772 */  { MAD_F(0x04e7518b) /* 0.306474250 */, 18 },
-  /* 4773 */  { MAD_F(0x04e7ab56) /* 0.306559885 */, 18 },
-  /* 4774 */  { MAD_F(0x04e80523) /* 0.306645525 */, 18 },
-  /* 4775 */  { MAD_F(0x04e85ef2) /* 0.306731171 */, 18 },
-  /* 4776 */  { MAD_F(0x04e8b8c2) /* 0.306816823 */, 18 },
-  /* 4777 */  { MAD_F(0x04e91293) /* 0.306902481 */, 18 },
-  /* 4778 */  { MAD_F(0x04e96c67) /* 0.306988145 */, 18 },
-  /* 4779 */  { MAD_F(0x04e9c63b) /* 0.307073816 */, 18 },
-  /* 4780 */  { MAD_F(0x04ea2012) /* 0.307159492 */, 18 },
-  /* 4781 */  { MAD_F(0x04ea79ea) /* 0.307245174 */, 18 },
-  /* 4782 */  { MAD_F(0x04ead3c4) /* 0.307330862 */, 18 },
-  /* 4783 */  { MAD_F(0x04eb2d9f) /* 0.307416556 */, 18 },
-
-  /* 4784 */  { MAD_F(0x04eb877c) /* 0.307502256 */, 18 },
-  /* 4785 */  { MAD_F(0x04ebe15b) /* 0.307587962 */, 18 },
-  /* 4786 */  { MAD_F(0x04ec3b3b) /* 0.307673674 */, 18 },
-  /* 4787 */  { MAD_F(0x04ec951c) /* 0.307759392 */, 18 },
-  /* 4788 */  { MAD_F(0x04ecef00) /* 0.307845115 */, 18 },
-  /* 4789 */  { MAD_F(0x04ed48e5) /* 0.307930845 */, 18 },
-  /* 4790 */  { MAD_F(0x04eda2cb) /* 0.308016581 */, 18 },
-  /* 4791 */  { MAD_F(0x04edfcb3) /* 0.308102323 */, 18 },
-  /* 4792 */  { MAD_F(0x04ee569d) /* 0.308188071 */, 18 },
-  /* 4793 */  { MAD_F(0x04eeb088) /* 0.308273824 */, 18 },
-  /* 4794 */  { MAD_F(0x04ef0a75) /* 0.308359584 */, 18 },
-  /* 4795 */  { MAD_F(0x04ef6464) /* 0.308445350 */, 18 },
-  /* 4796 */  { MAD_F(0x04efbe54) /* 0.308531121 */, 18 },
-  /* 4797 */  { MAD_F(0x04f01846) /* 0.308616899 */, 18 },
-  /* 4798 */  { MAD_F(0x04f07239) /* 0.308702682 */, 18 },
-  /* 4799 */  { MAD_F(0x04f0cc2e) /* 0.308788472 */, 18 },
-
-  /* 4800 */  { MAD_F(0x04f12624) /* 0.308874267 */, 18 },
-  /* 4801 */  { MAD_F(0x04f1801d) /* 0.308960068 */, 18 },
-  /* 4802 */  { MAD_F(0x04f1da16) /* 0.309045876 */, 18 },
-  /* 4803 */  { MAD_F(0x04f23412) /* 0.309131689 */, 18 },
-  /* 4804 */  { MAD_F(0x04f28e0f) /* 0.309217508 */, 18 },
-  /* 4805 */  { MAD_F(0x04f2e80d) /* 0.309303334 */, 18 },
-  /* 4806 */  { MAD_F(0x04f3420d) /* 0.309389165 */, 18 },
-  /* 4807 */  { MAD_F(0x04f39c0f) /* 0.309475002 */, 18 },
-  /* 4808 */  { MAD_F(0x04f3f612) /* 0.309560845 */, 18 },
-  /* 4809 */  { MAD_F(0x04f45017) /* 0.309646694 */, 18 },
-  /* 4810 */  { MAD_F(0x04f4aa1e) /* 0.309732549 */, 18 },
-  /* 4811 */  { MAD_F(0x04f50426) /* 0.309818410 */, 18 },
-  /* 4812 */  { MAD_F(0x04f55e30) /* 0.309904277 */, 18 },
-  /* 4813 */  { MAD_F(0x04f5b83b) /* 0.309990150 */, 18 },
-  /* 4814 */  { MAD_F(0x04f61248) /* 0.310076028 */, 18 },
-  /* 4815 */  { MAD_F(0x04f66c56) /* 0.310161913 */, 18 },
-
-  /* 4816 */  { MAD_F(0x04f6c666) /* 0.310247804 */, 18 },
-  /* 4817 */  { MAD_F(0x04f72078) /* 0.310333700 */, 18 },
-  /* 4818 */  { MAD_F(0x04f77a8b) /* 0.310419603 */, 18 },
-  /* 4819 */  { MAD_F(0x04f7d4a0) /* 0.310505511 */, 18 },
-  /* 4820 */  { MAD_F(0x04f82eb7) /* 0.310591426 */, 18 },
-  /* 4821 */  { MAD_F(0x04f888cf) /* 0.310677346 */, 18 },
-  /* 4822 */  { MAD_F(0x04f8e2e9) /* 0.310763272 */, 18 },
-  /* 4823 */  { MAD_F(0x04f93d04) /* 0.310849205 */, 18 },
-  /* 4824 */  { MAD_F(0x04f99721) /* 0.310935143 */, 18 },
-  /* 4825 */  { MAD_F(0x04f9f13f) /* 0.311021087 */, 18 },
-  /* 4826 */  { MAD_F(0x04fa4b5f) /* 0.311107037 */, 18 },
-  /* 4827 */  { MAD_F(0x04faa581) /* 0.311192993 */, 18 },
-  /* 4828 */  { MAD_F(0x04faffa4) /* 0.311278955 */, 18 },
-  /* 4829 */  { MAD_F(0x04fb59c9) /* 0.311364923 */, 18 },
-  /* 4830 */  { MAD_F(0x04fbb3ef) /* 0.311450897 */, 18 },
-  /* 4831 */  { MAD_F(0x04fc0e17) /* 0.311536877 */, 18 },
-
-  /* 4832 */  { MAD_F(0x04fc6841) /* 0.311622862 */, 18 },
-  /* 4833 */  { MAD_F(0x04fcc26c) /* 0.311708854 */, 18 },
-  /* 4834 */  { MAD_F(0x04fd1c99) /* 0.311794851 */, 18 },
-  /* 4835 */  { MAD_F(0x04fd76c7) /* 0.311880855 */, 18 },
-  /* 4836 */  { MAD_F(0x04fdd0f7) /* 0.311966864 */, 18 },
-  /* 4837 */  { MAD_F(0x04fe2b29) /* 0.312052880 */, 18 },
-  /* 4838 */  { MAD_F(0x04fe855c) /* 0.312138901 */, 18 },
-  /* 4839 */  { MAD_F(0x04fedf91) /* 0.312224928 */, 18 },
-  /* 4840 */  { MAD_F(0x04ff39c7) /* 0.312310961 */, 18 },
-  /* 4841 */  { MAD_F(0x04ff93ff) /* 0.312397000 */, 18 },
-  /* 4842 */  { MAD_F(0x04ffee38) /* 0.312483045 */, 18 },
-  /* 4843 */  { MAD_F(0x05004874) /* 0.312569096 */, 18 },
-  /* 4844 */  { MAD_F(0x0500a2b0) /* 0.312655153 */, 18 },
-  /* 4845 */  { MAD_F(0x0500fcef) /* 0.312741216 */, 18 },
-  /* 4846 */  { MAD_F(0x0501572e) /* 0.312827284 */, 18 },
-  /* 4847 */  { MAD_F(0x0501b170) /* 0.312913359 */, 18 },
-
-  /* 4848 */  { MAD_F(0x05020bb3) /* 0.312999439 */, 18 },
-  /* 4849 */  { MAD_F(0x050265f8) /* 0.313085526 */, 18 },
-  /* 4850 */  { MAD_F(0x0502c03e) /* 0.313171618 */, 18 },
-  /* 4851 */  { MAD_F(0x05031a86) /* 0.313257716 */, 18 },
-  /* 4852 */  { MAD_F(0x050374cf) /* 0.313343820 */, 18 },
-  /* 4853 */  { MAD_F(0x0503cf1a) /* 0.313429931 */, 18 },
-  /* 4854 */  { MAD_F(0x05042967) /* 0.313516047 */, 18 },
-  /* 4855 */  { MAD_F(0x050483b5) /* 0.313602168 */, 18 },
-  /* 4856 */  { MAD_F(0x0504de05) /* 0.313688296 */, 18 },
-  /* 4857 */  { MAD_F(0x05053856) /* 0.313774430 */, 18 },
-  /* 4858 */  { MAD_F(0x050592a9) /* 0.313860570 */, 18 },
-  /* 4859 */  { MAD_F(0x0505ecfd) /* 0.313946715 */, 18 },
-  /* 4860 */  { MAD_F(0x05064754) /* 0.314032867 */, 18 },
-  /* 4861 */  { MAD_F(0x0506a1ab) /* 0.314119024 */, 18 },
-  /* 4862 */  { MAD_F(0x0506fc04) /* 0.314205187 */, 18 },
-  /* 4863 */  { MAD_F(0x0507565f) /* 0.314291357 */, 18 },
-
-  /* 4864 */  { MAD_F(0x0507b0bc) /* 0.314377532 */, 18 },
-  /* 4865 */  { MAD_F(0x05080b1a) /* 0.314463713 */, 18 },
-  /* 4866 */  { MAD_F(0x05086579) /* 0.314549900 */, 18 },
-  /* 4867 */  { MAD_F(0x0508bfdb) /* 0.314636092 */, 18 },
-  /* 4868 */  { MAD_F(0x05091a3d) /* 0.314722291 */, 18 },
-  /* 4869 */  { MAD_F(0x050974a2) /* 0.314808496 */, 18 },
-  /* 4870 */  { MAD_F(0x0509cf08) /* 0.314894706 */, 18 },
-  /* 4871 */  { MAD_F(0x050a296f) /* 0.314980923 */, 18 },
-  /* 4872 */  { MAD_F(0x050a83d8) /* 0.315067145 */, 18 },
-  /* 4873 */  { MAD_F(0x050ade43) /* 0.315153373 */, 18 },
-  /* 4874 */  { MAD_F(0x050b38af) /* 0.315239607 */, 18 },
-  /* 4875 */  { MAD_F(0x050b931d) /* 0.315325847 */, 18 },
-  /* 4876 */  { MAD_F(0x050bed8d) /* 0.315412093 */, 18 },
-  /* 4877 */  { MAD_F(0x050c47fe) /* 0.315498345 */, 18 },
-  /* 4878 */  { MAD_F(0x050ca271) /* 0.315584603 */, 18 },
-  /* 4879 */  { MAD_F(0x050cfce5) /* 0.315670866 */, 18 },
-
-  /* 4880 */  { MAD_F(0x050d575b) /* 0.315757136 */, 18 },
-  /* 4881 */  { MAD_F(0x050db1d2) /* 0.315843411 */, 18 },
-  /* 4882 */  { MAD_F(0x050e0c4b) /* 0.315929693 */, 18 },
-  /* 4883 */  { MAD_F(0x050e66c5) /* 0.316015980 */, 18 },
-  /* 4884 */  { MAD_F(0x050ec141) /* 0.316102273 */, 18 },
-  /* 4885 */  { MAD_F(0x050f1bbf) /* 0.316188572 */, 18 },
-  /* 4886 */  { MAD_F(0x050f763e) /* 0.316274877 */, 18 },
-  /* 4887 */  { MAD_F(0x050fd0bf) /* 0.316361187 */, 18 },
-  /* 4888 */  { MAD_F(0x05102b42) /* 0.316447504 */, 18 },
-  /* 4889 */  { MAD_F(0x051085c6) /* 0.316533826 */, 18 },
-  /* 4890 */  { MAD_F(0x0510e04b) /* 0.316620155 */, 18 },
-  /* 4891 */  { MAD_F(0x05113ad3) /* 0.316706489 */, 18 },
-  /* 4892 */  { MAD_F(0x0511955b) /* 0.316792829 */, 18 },
-  /* 4893 */  { MAD_F(0x0511efe6) /* 0.316879175 */, 18 },
-  /* 4894 */  { MAD_F(0x05124a72) /* 0.316965527 */, 18 },
-  /* 4895 */  { MAD_F(0x0512a4ff) /* 0.317051885 */, 18 },
-
-  /* 4896 */  { MAD_F(0x0512ff8e) /* 0.317138249 */, 18 },
-  /* 4897 */  { MAD_F(0x05135a1f) /* 0.317224618 */, 18 },
-  /* 4898 */  { MAD_F(0x0513b4b1) /* 0.317310994 */, 18 },
-  /* 4899 */  { MAD_F(0x05140f45) /* 0.317397375 */, 18 },
-  /* 4900 */  { MAD_F(0x051469da) /* 0.317483762 */, 18 },
-  /* 4901 */  { MAD_F(0x0514c471) /* 0.317570155 */, 18 },
-  /* 4902 */  { MAD_F(0x05151f0a) /* 0.317656554 */, 18 },
-  /* 4903 */  { MAD_F(0x051579a4) /* 0.317742959 */, 18 },
-  /* 4904 */  { MAD_F(0x0515d440) /* 0.317829370 */, 18 },
-  /* 4905 */  { MAD_F(0x05162edd) /* 0.317915786 */, 18 },
-  /* 4906 */  { MAD_F(0x0516897c) /* 0.318002209 */, 18 },
-  /* 4907 */  { MAD_F(0x0516e41c) /* 0.318088637 */, 18 },
-  /* 4908 */  { MAD_F(0x05173ebe) /* 0.318175071 */, 18 },
-  /* 4909 */  { MAD_F(0x05179962) /* 0.318261511 */, 18 },
-  /* 4910 */  { MAD_F(0x0517f407) /* 0.318347957 */, 18 },
-  /* 4911 */  { MAD_F(0x05184eae) /* 0.318434409 */, 18 },
-
-  /* 4912 */  { MAD_F(0x0518a956) /* 0.318520867 */, 18 },
-  /* 4913 */  { MAD_F(0x05190400) /* 0.318607330 */, 18 },
-  /* 4914 */  { MAD_F(0x05195eab) /* 0.318693800 */, 18 },
-  /* 4915 */  { MAD_F(0x0519b958) /* 0.318780275 */, 18 },
-  /* 4916 */  { MAD_F(0x051a1407) /* 0.318866756 */, 18 },
-  /* 4917 */  { MAD_F(0x051a6eb7) /* 0.318953243 */, 18 },
-  /* 4918 */  { MAD_F(0x051ac969) /* 0.319039736 */, 18 },
-  /* 4919 */  { MAD_F(0x051b241c) /* 0.319126235 */, 18 },
-  /* 4920 */  { MAD_F(0x051b7ed1) /* 0.319212739 */, 18 },
-  /* 4921 */  { MAD_F(0x051bd987) /* 0.319299250 */, 18 },
-  /* 4922 */  { MAD_F(0x051c3440) /* 0.319385766 */, 18 },
-  /* 4923 */  { MAD_F(0x051c8ef9) /* 0.319472288 */, 18 },
-  /* 4924 */  { MAD_F(0x051ce9b4) /* 0.319558816 */, 18 },
-  /* 4925 */  { MAD_F(0x051d4471) /* 0.319645350 */, 18 },
-  /* 4926 */  { MAD_F(0x051d9f2f) /* 0.319731890 */, 18 },
-  /* 4927 */  { MAD_F(0x051df9ef) /* 0.319818435 */, 18 },
-
-  /* 4928 */  { MAD_F(0x051e54b1) /* 0.319904987 */, 18 },
-  /* 4929 */  { MAD_F(0x051eaf74) /* 0.319991544 */, 18 },
-  /* 4930 */  { MAD_F(0x051f0a38) /* 0.320078107 */, 18 },
-  /* 4931 */  { MAD_F(0x051f64ff) /* 0.320164676 */, 18 },
-  /* 4932 */  { MAD_F(0x051fbfc6) /* 0.320251251 */, 18 },
-  /* 4933 */  { MAD_F(0x05201a90) /* 0.320337832 */, 18 },
-  /* 4934 */  { MAD_F(0x0520755b) /* 0.320424419 */, 18 },
-  /* 4935 */  { MAD_F(0x0520d027) /* 0.320511011 */, 18 },
-  /* 4936 */  { MAD_F(0x05212af5) /* 0.320597609 */, 18 },
-  /* 4937 */  { MAD_F(0x052185c5) /* 0.320684213 */, 18 },
-  /* 4938 */  { MAD_F(0x0521e096) /* 0.320770823 */, 18 },
-  /* 4939 */  { MAD_F(0x05223b69) /* 0.320857439 */, 18 },
-  /* 4940 */  { MAD_F(0x0522963d) /* 0.320944061 */, 18 },
-  /* 4941 */  { MAD_F(0x0522f113) /* 0.321030688 */, 18 },
-  /* 4942 */  { MAD_F(0x05234bea) /* 0.321117322 */, 18 },
-  /* 4943 */  { MAD_F(0x0523a6c3) /* 0.321203961 */, 18 },
-
-  /* 4944 */  { MAD_F(0x0524019e) /* 0.321290606 */, 18 },
-  /* 4945 */  { MAD_F(0x05245c7a) /* 0.321377257 */, 18 },
-  /* 4946 */  { MAD_F(0x0524b758) /* 0.321463913 */, 18 },
-  /* 4947 */  { MAD_F(0x05251237) /* 0.321550576 */, 18 },
-  /* 4948 */  { MAD_F(0x05256d18) /* 0.321637244 */, 18 },
-  /* 4949 */  { MAD_F(0x0525c7fb) /* 0.321723919 */, 18 },
-  /* 4950 */  { MAD_F(0x052622df) /* 0.321810599 */, 18 },
-  /* 4951 */  { MAD_F(0x05267dc4) /* 0.321897285 */, 18 },
-  /* 4952 */  { MAD_F(0x0526d8ab) /* 0.321983976 */, 18 },
-  /* 4953 */  { MAD_F(0x05273394) /* 0.322070674 */, 18 },
-  /* 4954 */  { MAD_F(0x05278e7e) /* 0.322157377 */, 18 },
-  /* 4955 */  { MAD_F(0x0527e96a) /* 0.322244087 */, 18 },
-  /* 4956 */  { MAD_F(0x05284457) /* 0.322330802 */, 18 },
-  /* 4957 */  { MAD_F(0x05289f46) /* 0.322417523 */, 18 },
-  /* 4958 */  { MAD_F(0x0528fa37) /* 0.322504249 */, 18 },
-  /* 4959 */  { MAD_F(0x05295529) /* 0.322590982 */, 18 },
-
-  /* 4960 */  { MAD_F(0x0529b01d) /* 0.322677720 */, 18 },
-  /* 4961 */  { MAD_F(0x052a0b12) /* 0.322764465 */, 18 },
-  /* 4962 */  { MAD_F(0x052a6609) /* 0.322851215 */, 18 },
-  /* 4963 */  { MAD_F(0x052ac101) /* 0.322937971 */, 18 },
-  /* 4964 */  { MAD_F(0x052b1bfb) /* 0.323024732 */, 18 },
-  /* 4965 */  { MAD_F(0x052b76f7) /* 0.323111500 */, 18 },
-  /* 4966 */  { MAD_F(0x052bd1f4) /* 0.323198273 */, 18 },
-  /* 4967 */  { MAD_F(0x052c2cf2) /* 0.323285052 */, 18 },
-  /* 4968 */  { MAD_F(0x052c87f2) /* 0.323371837 */, 18 },
-  /* 4969 */  { MAD_F(0x052ce2f4) /* 0.323458628 */, 18 },
-  /* 4970 */  { MAD_F(0x052d3df7) /* 0.323545425 */, 18 },
-  /* 4971 */  { MAD_F(0x052d98fc) /* 0.323632227 */, 18 },
-  /* 4972 */  { MAD_F(0x052df403) /* 0.323719036 */, 18 },
-  /* 4973 */  { MAD_F(0x052e4f0b) /* 0.323805850 */, 18 },
-  /* 4974 */  { MAD_F(0x052eaa14) /* 0.323892670 */, 18 },
-  /* 4975 */  { MAD_F(0x052f051f) /* 0.323979496 */, 18 },
-
-  /* 4976 */  { MAD_F(0x052f602c) /* 0.324066327 */, 18 },
-  /* 4977 */  { MAD_F(0x052fbb3a) /* 0.324153165 */, 18 },
-  /* 4978 */  { MAD_F(0x0530164a) /* 0.324240008 */, 18 },
-  /* 4979 */  { MAD_F(0x0530715b) /* 0.324326857 */, 18 },
-  /* 4980 */  { MAD_F(0x0530cc6e) /* 0.324413712 */, 18 },
-  /* 4981 */  { MAD_F(0x05312783) /* 0.324500572 */, 18 },
-  /* 4982 */  { MAD_F(0x05318299) /* 0.324587439 */, 18 },
-  /* 4983 */  { MAD_F(0x0531ddb0) /* 0.324674311 */, 18 },
-  /* 4984 */  { MAD_F(0x053238ca) /* 0.324761189 */, 18 },
-  /* 4985 */  { MAD_F(0x053293e4) /* 0.324848073 */, 18 },
-  /* 4986 */  { MAD_F(0x0532ef01) /* 0.324934963 */, 18 },
-  /* 4987 */  { MAD_F(0x05334a1e) /* 0.325021858 */, 18 },
-  /* 4988 */  { MAD_F(0x0533a53e) /* 0.325108760 */, 18 },
-  /* 4989 */  { MAD_F(0x0534005f) /* 0.325195667 */, 18 },
-  /* 4990 */  { MAD_F(0x05345b81) /* 0.325282580 */, 18 },
-  /* 4991 */  { MAD_F(0x0534b6a5) /* 0.325369498 */, 18 },
-
-  /* 4992 */  { MAD_F(0x053511cb) /* 0.325456423 */, 18 },
-  /* 4993 */  { MAD_F(0x05356cf2) /* 0.325543353 */, 18 },
-  /* 4994 */  { MAD_F(0x0535c81b) /* 0.325630290 */, 18 },
-  /* 4995 */  { MAD_F(0x05362345) /* 0.325717232 */, 18 },
-  /* 4996 */  { MAD_F(0x05367e71) /* 0.325804179 */, 18 },
-  /* 4997 */  { MAD_F(0x0536d99f) /* 0.325891133 */, 18 },
-  /* 4998 */  { MAD_F(0x053734ce) /* 0.325978092 */, 18 },
-  /* 4999 */  { MAD_F(0x05378ffe) /* 0.326065057 */, 18 },
-  /* 5000 */  { MAD_F(0x0537eb30) /* 0.326152028 */, 18 },
-  /* 5001 */  { MAD_F(0x05384664) /* 0.326239005 */, 18 },
-  /* 5002 */  { MAD_F(0x0538a199) /* 0.326325988 */, 18 },
-  /* 5003 */  { MAD_F(0x0538fcd0) /* 0.326412976 */, 18 },
-  /* 5004 */  { MAD_F(0x05395808) /* 0.326499970 */, 18 },
-  /* 5005 */  { MAD_F(0x0539b342) /* 0.326586970 */, 18 },
-  /* 5006 */  { MAD_F(0x053a0e7d) /* 0.326673976 */, 18 },
-  /* 5007 */  { MAD_F(0x053a69ba) /* 0.326760988 */, 18 },
-
-  /* 5008 */  { MAD_F(0x053ac4f9) /* 0.326848005 */, 18 },
-  /* 5009 */  { MAD_F(0x053b2039) /* 0.326935028 */, 18 },
-  /* 5010 */  { MAD_F(0x053b7b7b) /* 0.327022057 */, 18 },
-  /* 5011 */  { MAD_F(0x053bd6be) /* 0.327109092 */, 18 },
-  /* 5012 */  { MAD_F(0x053c3203) /* 0.327196132 */, 18 },
-  /* 5013 */  { MAD_F(0x053c8d49) /* 0.327283178 */, 18 },
-  /* 5014 */  { MAD_F(0x053ce891) /* 0.327370231 */, 18 },
-  /* 5015 */  { MAD_F(0x053d43da) /* 0.327457288 */, 18 },
-  /* 5016 */  { MAD_F(0x053d9f25) /* 0.327544352 */, 18 },
-  /* 5017 */  { MAD_F(0x053dfa72) /* 0.327631421 */, 18 },
-  /* 5018 */  { MAD_F(0x053e55c0) /* 0.327718497 */, 18 },
-  /* 5019 */  { MAD_F(0x053eb10f) /* 0.327805578 */, 18 },
-  /* 5020 */  { MAD_F(0x053f0c61) /* 0.327892665 */, 18 },
-  /* 5021 */  { MAD_F(0x053f67b3) /* 0.327979757 */, 18 },
-  /* 5022 */  { MAD_F(0x053fc308) /* 0.328066855 */, 18 },
-  /* 5023 */  { MAD_F(0x05401e5e) /* 0.328153960 */, 18 },
-
-  /* 5024 */  { MAD_F(0x054079b5) /* 0.328241070 */, 18 },
-  /* 5025 */  { MAD_F(0x0540d50e) /* 0.328328185 */, 18 },
-  /* 5026 */  { MAD_F(0x05413068) /* 0.328415307 */, 18 },
-  /* 5027 */  { MAD_F(0x05418bc4) /* 0.328502434 */, 18 },
-  /* 5028 */  { MAD_F(0x0541e722) /* 0.328589567 */, 18 },
-  /* 5029 */  { MAD_F(0x05424281) /* 0.328676706 */, 18 },
-  /* 5030 */  { MAD_F(0x05429de2) /* 0.328763850 */, 18 },
-  /* 5031 */  { MAD_F(0x0542f944) /* 0.328851001 */, 18 },
-  /* 5032 */  { MAD_F(0x054354a8) /* 0.328938157 */, 18 },
-  /* 5033 */  { MAD_F(0x0543b00d) /* 0.329025319 */, 18 },
-  /* 5034 */  { MAD_F(0x05440b74) /* 0.329112486 */, 18 },
-  /* 5035 */  { MAD_F(0x054466dd) /* 0.329199660 */, 18 },
-  /* 5036 */  { MAD_F(0x0544c247) /* 0.329286839 */, 18 },
-  /* 5037 */  { MAD_F(0x05451db2) /* 0.329374024 */, 18 },
-  /* 5038 */  { MAD_F(0x0545791f) /* 0.329461215 */, 18 },
-  /* 5039 */  { MAD_F(0x0545d48e) /* 0.329548411 */, 18 },
-
-  /* 5040 */  { MAD_F(0x05462ffe) /* 0.329635614 */, 18 },
-  /* 5041 */  { MAD_F(0x05468b70) /* 0.329722822 */, 18 },
-  /* 5042 */  { MAD_F(0x0546e6e3) /* 0.329810036 */, 18 },
-  /* 5043 */  { MAD_F(0x05474258) /* 0.329897255 */, 18 },
-  /* 5044 */  { MAD_F(0x05479dce) /* 0.329984481 */, 18 },
-  /* 5045 */  { MAD_F(0x0547f946) /* 0.330071712 */, 18 },
-  /* 5046 */  { MAD_F(0x054854c0) /* 0.330158949 */, 18 },
-  /* 5047 */  { MAD_F(0x0548b03b) /* 0.330246191 */, 18 },
-  /* 5048 */  { MAD_F(0x05490bb7) /* 0.330333440 */, 18 },
-  /* 5049 */  { MAD_F(0x05496735) /* 0.330420694 */, 18 },
-  /* 5050 */  { MAD_F(0x0549c2b5) /* 0.330507954 */, 18 },
-  /* 5051 */  { MAD_F(0x054a1e36) /* 0.330595220 */, 18 },
-  /* 5052 */  { MAD_F(0x054a79b9) /* 0.330682491 */, 18 },
-  /* 5053 */  { MAD_F(0x054ad53d) /* 0.330769768 */, 18 },
-  /* 5054 */  { MAD_F(0x054b30c3) /* 0.330857051 */, 18 },
-  /* 5055 */  { MAD_F(0x054b8c4b) /* 0.330944340 */, 18 },
-
-  /* 5056 */  { MAD_F(0x054be7d4) /* 0.331031635 */, 18 },
-  /* 5057 */  { MAD_F(0x054c435e) /* 0.331118935 */, 18 },
-  /* 5058 */  { MAD_F(0x054c9eea) /* 0.331206241 */, 18 },
-  /* 5059 */  { MAD_F(0x054cfa78) /* 0.331293553 */, 18 },
-  /* 5060 */  { MAD_F(0x054d5607) /* 0.331380870 */, 18 },
-  /* 5061 */  { MAD_F(0x054db197) /* 0.331468193 */, 18 },
-  /* 5062 */  { MAD_F(0x054e0d2a) /* 0.331555522 */, 18 },
-  /* 5063 */  { MAD_F(0x054e68bd) /* 0.331642857 */, 18 },
-  /* 5064 */  { MAD_F(0x054ec453) /* 0.331730198 */, 18 },
-  /* 5065 */  { MAD_F(0x054f1fe9) /* 0.331817544 */, 18 },
-  /* 5066 */  { MAD_F(0x054f7b82) /* 0.331904896 */, 18 },
-  /* 5067 */  { MAD_F(0x054fd71c) /* 0.331992254 */, 18 },
-  /* 5068 */  { MAD_F(0x055032b7) /* 0.332079617 */, 18 },
-  /* 5069 */  { MAD_F(0x05508e54) /* 0.332166986 */, 18 },
-  /* 5070 */  { MAD_F(0x0550e9f3) /* 0.332254361 */, 18 },
-  /* 5071 */  { MAD_F(0x05514593) /* 0.332341742 */, 18 },
-
-  /* 5072 */  { MAD_F(0x0551a134) /* 0.332429129 */, 18 },
-  /* 5073 */  { MAD_F(0x0551fcd8) /* 0.332516521 */, 18 },
-  /* 5074 */  { MAD_F(0x0552587c) /* 0.332603919 */, 18 },
-  /* 5075 */  { MAD_F(0x0552b423) /* 0.332691323 */, 18 },
-  /* 5076 */  { MAD_F(0x05530fca) /* 0.332778732 */, 18 },
-  /* 5077 */  { MAD_F(0x05536b74) /* 0.332866147 */, 18 },
-  /* 5078 */  { MAD_F(0x0553c71f) /* 0.332953568 */, 18 },
-  /* 5079 */  { MAD_F(0x055422cb) /* 0.333040995 */, 18 },
-  /* 5080 */  { MAD_F(0x05547e79) /* 0.333128427 */, 18 },
-  /* 5081 */  { MAD_F(0x0554da29) /* 0.333215865 */, 18 },
-  /* 5082 */  { MAD_F(0x055535da) /* 0.333303309 */, 18 },
-  /* 5083 */  { MAD_F(0x0555918c) /* 0.333390759 */, 18 },
-  /* 5084 */  { MAD_F(0x0555ed40) /* 0.333478214 */, 18 },
-  /* 5085 */  { MAD_F(0x055648f6) /* 0.333565675 */, 18 },
-  /* 5086 */  { MAD_F(0x0556a4ad) /* 0.333653142 */, 18 },
-  /* 5087 */  { MAD_F(0x05570066) /* 0.333740615 */, 18 },
-
-  /* 5088 */  { MAD_F(0x05575c20) /* 0.333828093 */, 18 },
-  /* 5089 */  { MAD_F(0x0557b7dc) /* 0.333915577 */, 18 },
-  /* 5090 */  { MAD_F(0x05581399) /* 0.334003067 */, 18 },
-  /* 5091 */  { MAD_F(0x05586f58) /* 0.334090562 */, 18 },
-  /* 5092 */  { MAD_F(0x0558cb19) /* 0.334178063 */, 18 },
-  /* 5093 */  { MAD_F(0x055926db) /* 0.334265570 */, 18 },
-  /* 5094 */  { MAD_F(0x0559829e) /* 0.334353083 */, 18 },
-  /* 5095 */  { MAD_F(0x0559de63) /* 0.334440601 */, 18 },
-  /* 5096 */  { MAD_F(0x055a3a2a) /* 0.334528126 */, 18 },
-  /* 5097 */  { MAD_F(0x055a95f2) /* 0.334615655 */, 18 },
-  /* 5098 */  { MAD_F(0x055af1bb) /* 0.334703191 */, 18 },
-  /* 5099 */  { MAD_F(0x055b4d87) /* 0.334790732 */, 18 },
-  /* 5100 */  { MAD_F(0x055ba953) /* 0.334878279 */, 18 },
-  /* 5101 */  { MAD_F(0x055c0522) /* 0.334965832 */, 18 },
-  /* 5102 */  { MAD_F(0x055c60f1) /* 0.335053391 */, 18 },
-  /* 5103 */  { MAD_F(0x055cbcc3) /* 0.335140955 */, 18 },
-
-  /* 5104 */  { MAD_F(0x055d1896) /* 0.335228525 */, 18 },
-  /* 5105 */  { MAD_F(0x055d746a) /* 0.335316100 */, 18 },
-  /* 5106 */  { MAD_F(0x055dd040) /* 0.335403682 */, 18 },
-  /* 5107 */  { MAD_F(0x055e2c17) /* 0.335491269 */, 18 },
-  /* 5108 */  { MAD_F(0x055e87f0) /* 0.335578861 */, 18 },
-  /* 5109 */  { MAD_F(0x055ee3cb) /* 0.335666460 */, 18 },
-  /* 5110 */  { MAD_F(0x055f3fa7) /* 0.335754064 */, 18 },
-  /* 5111 */  { MAD_F(0x055f9b85) /* 0.335841674 */, 18 },
-  /* 5112 */  { MAD_F(0x055ff764) /* 0.335929290 */, 18 },
-  /* 5113 */  { MAD_F(0x05605344) /* 0.336016911 */, 18 },
-  /* 5114 */  { MAD_F(0x0560af27) /* 0.336104538 */, 18 },
-  /* 5115 */  { MAD_F(0x05610b0a) /* 0.336192171 */, 18 },
-  /* 5116 */  { MAD_F(0x056166f0) /* 0.336279809 */, 18 },
-  /* 5117 */  { MAD_F(0x0561c2d7) /* 0.336367453 */, 18 },
-  /* 5118 */  { MAD_F(0x05621ebf) /* 0.336455103 */, 18 },
-  /* 5119 */  { MAD_F(0x05627aa9) /* 0.336542759 */, 18 },
-
-  /* 5120 */  { MAD_F(0x0562d694) /* 0.336630420 */, 18 },
-  /* 5121 */  { MAD_F(0x05633281) /* 0.336718087 */, 18 },
-  /* 5122 */  { MAD_F(0x05638e70) /* 0.336805760 */, 18 },
-  /* 5123 */  { MAD_F(0x0563ea60) /* 0.336893439 */, 18 },
-  /* 5124 */  { MAD_F(0x05644651) /* 0.336981123 */, 18 },
-  /* 5125 */  { MAD_F(0x0564a244) /* 0.337068813 */, 18 },
-  /* 5126 */  { MAD_F(0x0564fe39) /* 0.337156508 */, 18 },
-  /* 5127 */  { MAD_F(0x05655a2f) /* 0.337244209 */, 18 },
-  /* 5128 */  { MAD_F(0x0565b627) /* 0.337331916 */, 18 },
-  /* 5129 */  { MAD_F(0x05661220) /* 0.337419629 */, 18 },
-  /* 5130 */  { MAD_F(0x05666e1a) /* 0.337507347 */, 18 },
-  /* 5131 */  { MAD_F(0x0566ca17) /* 0.337595071 */, 18 },
-  /* 5132 */  { MAD_F(0x05672614) /* 0.337682801 */, 18 },
-  /* 5133 */  { MAD_F(0x05678214) /* 0.337770537 */, 18 },
-  /* 5134 */  { MAD_F(0x0567de15) /* 0.337858278 */, 18 },
-  /* 5135 */  { MAD_F(0x05683a17) /* 0.337946025 */, 18 },
-
-  /* 5136 */  { MAD_F(0x0568961b) /* 0.338033777 */, 18 },
-  /* 5137 */  { MAD_F(0x0568f220) /* 0.338121535 */, 18 },
-  /* 5138 */  { MAD_F(0x05694e27) /* 0.338209299 */, 18 },
-  /* 5139 */  { MAD_F(0x0569aa30) /* 0.338297069 */, 18 },
-  /* 5140 */  { MAD_F(0x056a063a) /* 0.338384844 */, 18 },
-  /* 5141 */  { MAD_F(0x056a6245) /* 0.338472625 */, 18 },
-  /* 5142 */  { MAD_F(0x056abe52) /* 0.338560412 */, 18 },
-  /* 5143 */  { MAD_F(0x056b1a61) /* 0.338648204 */, 18 },
-  /* 5144 */  { MAD_F(0x056b7671) /* 0.338736002 */, 18 },
-  /* 5145 */  { MAD_F(0x056bd283) /* 0.338823806 */, 18 },
-  /* 5146 */  { MAD_F(0x056c2e96) /* 0.338911616 */, 18 },
-  /* 5147 */  { MAD_F(0x056c8aab) /* 0.338999431 */, 18 },
-  /* 5148 */  { MAD_F(0x056ce6c1) /* 0.339087252 */, 18 },
-  /* 5149 */  { MAD_F(0x056d42d9) /* 0.339175078 */, 18 },
-  /* 5150 */  { MAD_F(0x056d9ef2) /* 0.339262910 */, 18 },
-  /* 5151 */  { MAD_F(0x056dfb0d) /* 0.339350748 */, 18 },
-
-  /* 5152 */  { MAD_F(0x056e5729) /* 0.339438592 */, 18 },
-  /* 5153 */  { MAD_F(0x056eb347) /* 0.339526441 */, 18 },
-  /* 5154 */  { MAD_F(0x056f0f66) /* 0.339614296 */, 18 },
-  /* 5155 */  { MAD_F(0x056f6b87) /* 0.339702157 */, 18 },
-  /* 5156 */  { MAD_F(0x056fc7aa) /* 0.339790023 */, 18 },
-  /* 5157 */  { MAD_F(0x057023cd) /* 0.339877895 */, 18 },
-  /* 5158 */  { MAD_F(0x05707ff3) /* 0.339965773 */, 18 },
-  /* 5159 */  { MAD_F(0x0570dc1a) /* 0.340053656 */, 18 },
-  /* 5160 */  { MAD_F(0x05713843) /* 0.340141545 */, 18 },
-  /* 5161 */  { MAD_F(0x0571946d) /* 0.340229440 */, 18 },
-  /* 5162 */  { MAD_F(0x0571f098) /* 0.340317340 */, 18 },
-  /* 5163 */  { MAD_F(0x05724cc5) /* 0.340405246 */, 18 },
-  /* 5164 */  { MAD_F(0x0572a8f4) /* 0.340493158 */, 18 },
-  /* 5165 */  { MAD_F(0x05730524) /* 0.340581075 */, 18 },
-  /* 5166 */  { MAD_F(0x05736156) /* 0.340668999 */, 18 },
-  /* 5167 */  { MAD_F(0x0573bd89) /* 0.340756927 */, 18 },
-
-  /* 5168 */  { MAD_F(0x057419be) /* 0.340844862 */, 18 },
-  /* 5169 */  { MAD_F(0x057475f4) /* 0.340932802 */, 18 },
-  /* 5170 */  { MAD_F(0x0574d22c) /* 0.341020748 */, 18 },
-  /* 5171 */  { MAD_F(0x05752e65) /* 0.341108699 */, 18 },
-  /* 5172 */  { MAD_F(0x05758aa0) /* 0.341196656 */, 18 },
-  /* 5173 */  { MAD_F(0x0575e6dc) /* 0.341284619 */, 18 },
-  /* 5174 */  { MAD_F(0x0576431a) /* 0.341372587 */, 18 },
-  /* 5175 */  { MAD_F(0x05769f59) /* 0.341460562 */, 18 },
-  /* 5176 */  { MAD_F(0x0576fb9a) /* 0.341548541 */, 18 },
-  /* 5177 */  { MAD_F(0x057757dd) /* 0.341636527 */, 18 },
-  /* 5178 */  { MAD_F(0x0577b421) /* 0.341724518 */, 18 },
-  /* 5179 */  { MAD_F(0x05781066) /* 0.341812515 */, 18 },
-  /* 5180 */  { MAD_F(0x05786cad) /* 0.341900517 */, 18 },
-  /* 5181 */  { MAD_F(0x0578c8f5) /* 0.341988525 */, 18 },
-  /* 5182 */  { MAD_F(0x0579253f) /* 0.342076539 */, 18 },
-  /* 5183 */  { MAD_F(0x0579818b) /* 0.342164558 */, 18 },
-
-  /* 5184 */  { MAD_F(0x0579ddd8) /* 0.342252584 */, 18 },
-  /* 5185 */  { MAD_F(0x057a3a27) /* 0.342340614 */, 18 },
-  /* 5186 */  { MAD_F(0x057a9677) /* 0.342428651 */, 18 },
-  /* 5187 */  { MAD_F(0x057af2c8) /* 0.342516693 */, 18 },
-  /* 5188 */  { MAD_F(0x057b4f1c) /* 0.342604741 */, 18 },
-  /* 5189 */  { MAD_F(0x057bab70) /* 0.342692794 */, 18 },
-  /* 5190 */  { MAD_F(0x057c07c6) /* 0.342780853 */, 18 },
-  /* 5191 */  { MAD_F(0x057c641e) /* 0.342868918 */, 18 },
-  /* 5192 */  { MAD_F(0x057cc077) /* 0.342956988 */, 18 },
-  /* 5193 */  { MAD_F(0x057d1cd2) /* 0.343045064 */, 18 },
-  /* 5194 */  { MAD_F(0x057d792e) /* 0.343133146 */, 18 },
-  /* 5195 */  { MAD_F(0x057dd58c) /* 0.343221233 */, 18 },
-  /* 5196 */  { MAD_F(0x057e31eb) /* 0.343309326 */, 18 },
-  /* 5197 */  { MAD_F(0x057e8e4c) /* 0.343397425 */, 18 },
-  /* 5198 */  { MAD_F(0x057eeaae) /* 0.343485529 */, 18 },
-  /* 5199 */  { MAD_F(0x057f4712) /* 0.343573639 */, 18 },
-
-  /* 5200 */  { MAD_F(0x057fa378) /* 0.343661754 */, 18 },
-  /* 5201 */  { MAD_F(0x057fffde) /* 0.343749876 */, 18 },
-  /* 5202 */  { MAD_F(0x05805c47) /* 0.343838003 */, 18 },
-  /* 5203 */  { MAD_F(0x0580b8b1) /* 0.343926135 */, 18 },
-  /* 5204 */  { MAD_F(0x0581151c) /* 0.344014273 */, 18 },
-  /* 5205 */  { MAD_F(0x05817189) /* 0.344102417 */, 18 },
-  /* 5206 */  { MAD_F(0x0581cdf7) /* 0.344190566 */, 18 },
-  /* 5207 */  { MAD_F(0x05822a67) /* 0.344278722 */, 18 },
-  /* 5208 */  { MAD_F(0x058286d9) /* 0.344366882 */, 18 },
-  /* 5209 */  { MAD_F(0x0582e34c) /* 0.344455049 */, 18 },
-  /* 5210 */  { MAD_F(0x05833fc0) /* 0.344543221 */, 18 },
-  /* 5211 */  { MAD_F(0x05839c36) /* 0.344631398 */, 18 },
-  /* 5212 */  { MAD_F(0x0583f8ae) /* 0.344719582 */, 18 },
-  /* 5213 */  { MAD_F(0x05845527) /* 0.344807771 */, 18 },
-  /* 5214 */  { MAD_F(0x0584b1a1) /* 0.344895965 */, 18 },
-  /* 5215 */  { MAD_F(0x05850e1e) /* 0.344984165 */, 18 },
-
-  /* 5216 */  { MAD_F(0x05856a9b) /* 0.345072371 */, 18 },
-  /* 5217 */  { MAD_F(0x0585c71a) /* 0.345160583 */, 18 },
-  /* 5218 */  { MAD_F(0x0586239b) /* 0.345248800 */, 18 },
-  /* 5219 */  { MAD_F(0x0586801d) /* 0.345337023 */, 18 },
-  /* 5220 */  { MAD_F(0x0586dca1) /* 0.345425251 */, 18 },
-  /* 5221 */  { MAD_F(0x05873926) /* 0.345513485 */, 18 },
-  /* 5222 */  { MAD_F(0x058795ac) /* 0.345601725 */, 18 },
-  /* 5223 */  { MAD_F(0x0587f235) /* 0.345689970 */, 18 },
-  /* 5224 */  { MAD_F(0x05884ebe) /* 0.345778221 */, 18 },
-  /* 5225 */  { MAD_F(0x0588ab49) /* 0.345866478 */, 18 },
-  /* 5226 */  { MAD_F(0x058907d6) /* 0.345954740 */, 18 },
-  /* 5227 */  { MAD_F(0x05896464) /* 0.346043008 */, 18 },
-  /* 5228 */  { MAD_F(0x0589c0f4) /* 0.346131281 */, 18 },
-  /* 5229 */  { MAD_F(0x058a1d85) /* 0.346219560 */, 18 },
-  /* 5230 */  { MAD_F(0x058a7a18) /* 0.346307845 */, 18 },
-  /* 5231 */  { MAD_F(0x058ad6ac) /* 0.346396135 */, 18 },
-
-  /* 5232 */  { MAD_F(0x058b3342) /* 0.346484431 */, 18 },
-  /* 5233 */  { MAD_F(0x058b8fd9) /* 0.346572733 */, 18 },
-  /* 5234 */  { MAD_F(0x058bec72) /* 0.346661040 */, 18 },
-  /* 5235 */  { MAD_F(0x058c490c) /* 0.346749353 */, 18 },
-  /* 5236 */  { MAD_F(0x058ca5a8) /* 0.346837671 */, 18 },
-  /* 5237 */  { MAD_F(0x058d0246) /* 0.346925996 */, 18 },
-  /* 5238 */  { MAD_F(0x058d5ee4) /* 0.347014325 */, 18 },
-  /* 5239 */  { MAD_F(0x058dbb85) /* 0.347102661 */, 18 },
-  /* 5240 */  { MAD_F(0x058e1827) /* 0.347191002 */, 18 },
-  /* 5241 */  { MAD_F(0x058e74ca) /* 0.347279348 */, 18 },
-  /* 5242 */  { MAD_F(0x058ed16f) /* 0.347367700 */, 18 },
-  /* 5243 */  { MAD_F(0x058f2e15) /* 0.347456058 */, 18 },
-  /* 5244 */  { MAD_F(0x058f8abd) /* 0.347544422 */, 18 },
-  /* 5245 */  { MAD_F(0x058fe766) /* 0.347632791 */, 18 },
-  /* 5246 */  { MAD_F(0x05904411) /* 0.347721165 */, 18 },
-  /* 5247 */  { MAD_F(0x0590a0be) /* 0.347809546 */, 18 },
-
-  /* 5248 */  { MAD_F(0x0590fd6c) /* 0.347897931 */, 18 },
-  /* 5249 */  { MAD_F(0x05915a1b) /* 0.347986323 */, 18 },
-  /* 5250 */  { MAD_F(0x0591b6cc) /* 0.348074720 */, 18 },
-  /* 5251 */  { MAD_F(0x0592137e) /* 0.348163123 */, 18 },
-  /* 5252 */  { MAD_F(0x05927032) /* 0.348251531 */, 18 },
-  /* 5253 */  { MAD_F(0x0592cce8) /* 0.348339945 */, 18 },
-  /* 5254 */  { MAD_F(0x0593299f) /* 0.348428365 */, 18 },
-  /* 5255 */  { MAD_F(0x05938657) /* 0.348516790 */, 18 },
-  /* 5256 */  { MAD_F(0x0593e311) /* 0.348605221 */, 18 },
-  /* 5257 */  { MAD_F(0x05943fcd) /* 0.348693657 */, 18 },
-  /* 5258 */  { MAD_F(0x05949c8a) /* 0.348782099 */, 18 },
-  /* 5259 */  { MAD_F(0x0594f948) /* 0.348870547 */, 18 },
-  /* 5260 */  { MAD_F(0x05955608) /* 0.348959000 */, 18 },
-  /* 5261 */  { MAD_F(0x0595b2ca) /* 0.349047459 */, 18 },
-  /* 5262 */  { MAD_F(0x05960f8c) /* 0.349135923 */, 18 },
-  /* 5263 */  { MAD_F(0x05966c51) /* 0.349224393 */, 18 },
-
-  /* 5264 */  { MAD_F(0x0596c917) /* 0.349312869 */, 18 },
-  /* 5265 */  { MAD_F(0x059725de) /* 0.349401350 */, 18 },
-  /* 5266 */  { MAD_F(0x059782a7) /* 0.349489837 */, 18 },
-  /* 5267 */  { MAD_F(0x0597df72) /* 0.349578329 */, 18 },
-  /* 5268 */  { MAD_F(0x05983c3e) /* 0.349666827 */, 18 },
-  /* 5269 */  { MAD_F(0x0598990c) /* 0.349755331 */, 18 },
-  /* 5270 */  { MAD_F(0x0598f5db) /* 0.349843840 */, 18 },
-  /* 5271 */  { MAD_F(0x059952ab) /* 0.349932355 */, 18 },
-  /* 5272 */  { MAD_F(0x0599af7d) /* 0.350020876 */, 18 },
-  /* 5273 */  { MAD_F(0x059a0c51) /* 0.350109402 */, 18 },
-  /* 5274 */  { MAD_F(0x059a6926) /* 0.350197933 */, 18 },
-  /* 5275 */  { MAD_F(0x059ac5fc) /* 0.350286470 */, 18 },
-  /* 5276 */  { MAD_F(0x059b22d4) /* 0.350375013 */, 18 },
-  /* 5277 */  { MAD_F(0x059b7fae) /* 0.350463562 */, 18 },
-  /* 5278 */  { MAD_F(0x059bdc89) /* 0.350552116 */, 18 },
-  /* 5279 */  { MAD_F(0x059c3965) /* 0.350640675 */, 18 },
-
-  /* 5280 */  { MAD_F(0x059c9643) /* 0.350729240 */, 18 },
-  /* 5281 */  { MAD_F(0x059cf323) /* 0.350817811 */, 18 },
-  /* 5282 */  { MAD_F(0x059d5004) /* 0.350906388 */, 18 },
-  /* 5283 */  { MAD_F(0x059dace6) /* 0.350994970 */, 18 },
-  /* 5284 */  { MAD_F(0x059e09cb) /* 0.351083557 */, 18 },
-  /* 5285 */  { MAD_F(0x059e66b0) /* 0.351172150 */, 18 },
-  /* 5286 */  { MAD_F(0x059ec397) /* 0.351260749 */, 18 },
-  /* 5287 */  { MAD_F(0x059f2080) /* 0.351349353 */, 18 },
-  /* 5288 */  { MAD_F(0x059f7d6a) /* 0.351437963 */, 18 },
-  /* 5289 */  { MAD_F(0x059fda55) /* 0.351526579 */, 18 },
-  /* 5290 */  { MAD_F(0x05a03742) /* 0.351615200 */, 18 },
-  /* 5291 */  { MAD_F(0x05a09431) /* 0.351703827 */, 18 },
-  /* 5292 */  { MAD_F(0x05a0f121) /* 0.351792459 */, 18 },
-  /* 5293 */  { MAD_F(0x05a14e12) /* 0.351881097 */, 18 },
-  /* 5294 */  { MAD_F(0x05a1ab05) /* 0.351969740 */, 18 },
-  /* 5295 */  { MAD_F(0x05a207fa) /* 0.352058389 */, 18 },
-
-  /* 5296 */  { MAD_F(0x05a264f0) /* 0.352147044 */, 18 },
-  /* 5297 */  { MAD_F(0x05a2c1e7) /* 0.352235704 */, 18 },
-  /* 5298 */  { MAD_F(0x05a31ee1) /* 0.352324369 */, 18 },
-  /* 5299 */  { MAD_F(0x05a37bdb) /* 0.352413041 */, 18 },
-  /* 5300 */  { MAD_F(0x05a3d8d7) /* 0.352501718 */, 18 },
-  /* 5301 */  { MAD_F(0x05a435d5) /* 0.352590400 */, 18 },
-  /* 5302 */  { MAD_F(0x05a492d4) /* 0.352679088 */, 18 },
-  /* 5303 */  { MAD_F(0x05a4efd4) /* 0.352767782 */, 18 },
-  /* 5304 */  { MAD_F(0x05a54cd6) /* 0.352856481 */, 18 },
-  /* 5305 */  { MAD_F(0x05a5a9da) /* 0.352945186 */, 18 },
-  /* 5306 */  { MAD_F(0x05a606df) /* 0.353033896 */, 18 },
-  /* 5307 */  { MAD_F(0x05a663e5) /* 0.353122612 */, 18 },
-  /* 5308 */  { MAD_F(0x05a6c0ed) /* 0.353211333 */, 18 },
-  /* 5309 */  { MAD_F(0x05a71df7) /* 0.353300061 */, 18 },
-  /* 5310 */  { MAD_F(0x05a77b02) /* 0.353388793 */, 18 },
-  /* 5311 */  { MAD_F(0x05a7d80e) /* 0.353477531 */, 18 },
-
-  /* 5312 */  { MAD_F(0x05a8351c) /* 0.353566275 */, 18 },
-  /* 5313 */  { MAD_F(0x05a8922c) /* 0.353655024 */, 18 },
-  /* 5314 */  { MAD_F(0x05a8ef3c) /* 0.353743779 */, 18 },
-  /* 5315 */  { MAD_F(0x05a94c4f) /* 0.353832540 */, 18 },
-  /* 5316 */  { MAD_F(0x05a9a963) /* 0.353921306 */, 18 },
-  /* 5317 */  { MAD_F(0x05aa0678) /* 0.354010077 */, 18 },
-  /* 5318 */  { MAD_F(0x05aa638f) /* 0.354098855 */, 18 },
-  /* 5319 */  { MAD_F(0x05aac0a8) /* 0.354187637 */, 18 },
-  /* 5320 */  { MAD_F(0x05ab1dc2) /* 0.354276426 */, 18 },
-  /* 5321 */  { MAD_F(0x05ab7add) /* 0.354365220 */, 18 },
-  /* 5322 */  { MAD_F(0x05abd7fa) /* 0.354454019 */, 18 },
-  /* 5323 */  { MAD_F(0x05ac3518) /* 0.354542824 */, 18 },
-  /* 5324 */  { MAD_F(0x05ac9238) /* 0.354631635 */, 18 },
-  /* 5325 */  { MAD_F(0x05acef5a) /* 0.354720451 */, 18 },
-  /* 5326 */  { MAD_F(0x05ad4c7d) /* 0.354809272 */, 18 },
-  /* 5327 */  { MAD_F(0x05ada9a1) /* 0.354898100 */, 18 },
-
-  /* 5328 */  { MAD_F(0x05ae06c7) /* 0.354986932 */, 18 },
-  /* 5329 */  { MAD_F(0x05ae63ee) /* 0.355075771 */, 18 },
-  /* 5330 */  { MAD_F(0x05aec117) /* 0.355164615 */, 18 },
-  /* 5331 */  { MAD_F(0x05af1e41) /* 0.355253464 */, 18 },
-  /* 5332 */  { MAD_F(0x05af7b6d) /* 0.355342319 */, 18 },
-  /* 5333 */  { MAD_F(0x05afd89b) /* 0.355431180 */, 18 },
-  /* 5334 */  { MAD_F(0x05b035c9) /* 0.355520046 */, 18 },
-  /* 5335 */  { MAD_F(0x05b092fa) /* 0.355608917 */, 18 },
-  /* 5336 */  { MAD_F(0x05b0f02b) /* 0.355697795 */, 18 },
-  /* 5337 */  { MAD_F(0x05b14d5f) /* 0.355786677 */, 18 },
-  /* 5338 */  { MAD_F(0x05b1aa94) /* 0.355875566 */, 18 },
-  /* 5339 */  { MAD_F(0x05b207ca) /* 0.355964460 */, 18 },
-  /* 5340 */  { MAD_F(0x05b26502) /* 0.356053359 */, 18 },
-  /* 5341 */  { MAD_F(0x05b2c23b) /* 0.356142264 */, 18 },
-  /* 5342 */  { MAD_F(0x05b31f76) /* 0.356231175 */, 18 },
-  /* 5343 */  { MAD_F(0x05b37cb2) /* 0.356320091 */, 18 },
-
-  /* 5344 */  { MAD_F(0x05b3d9f0) /* 0.356409012 */, 18 },
-  /* 5345 */  { MAD_F(0x05b4372f) /* 0.356497940 */, 18 },
-  /* 5346 */  { MAD_F(0x05b4946f) /* 0.356586872 */, 18 },
-  /* 5347 */  { MAD_F(0x05b4f1b2) /* 0.356675811 */, 18 },
-  /* 5348 */  { MAD_F(0x05b54ef5) /* 0.356764754 */, 18 },
-  /* 5349 */  { MAD_F(0x05b5ac3a) /* 0.356853704 */, 18 },
-  /* 5350 */  { MAD_F(0x05b60981) /* 0.356942659 */, 18 },
-  /* 5351 */  { MAD_F(0x05b666c9) /* 0.357031619 */, 18 },
-  /* 5352 */  { MAD_F(0x05b6c413) /* 0.357120585 */, 18 },
-  /* 5353 */  { MAD_F(0x05b7215e) /* 0.357209557 */, 18 },
-  /* 5354 */  { MAD_F(0x05b77eab) /* 0.357298534 */, 18 },
-  /* 5355 */  { MAD_F(0x05b7dbf9) /* 0.357387516 */, 18 },
-  /* 5356 */  { MAD_F(0x05b83948) /* 0.357476504 */, 18 },
-  /* 5357 */  { MAD_F(0x05b89699) /* 0.357565498 */, 18 },
-  /* 5358 */  { MAD_F(0x05b8f3ec) /* 0.357654497 */, 18 },
-  /* 5359 */  { MAD_F(0x05b95140) /* 0.357743502 */, 18 },
-
-  /* 5360 */  { MAD_F(0x05b9ae95) /* 0.357832512 */, 18 },
-  /* 5361 */  { MAD_F(0x05ba0bec) /* 0.357921528 */, 18 },
-  /* 5362 */  { MAD_F(0x05ba6945) /* 0.358010550 */, 18 },
-  /* 5363 */  { MAD_F(0x05bac69f) /* 0.358099576 */, 18 },
-  /* 5364 */  { MAD_F(0x05bb23fa) /* 0.358188609 */, 18 },
-  /* 5365 */  { MAD_F(0x05bb8157) /* 0.358277647 */, 18 },
-  /* 5366 */  { MAD_F(0x05bbdeb6) /* 0.358366690 */, 18 },
-  /* 5367 */  { MAD_F(0x05bc3c16) /* 0.358455739 */, 18 },
-  /* 5368 */  { MAD_F(0x05bc9977) /* 0.358544794 */, 18 },
-  /* 5369 */  { MAD_F(0x05bcf6da) /* 0.358633854 */, 18 },
-  /* 5370 */  { MAD_F(0x05bd543e) /* 0.358722920 */, 18 },
-  /* 5371 */  { MAD_F(0x05bdb1a4) /* 0.358811991 */, 18 },
-  /* 5372 */  { MAD_F(0x05be0f0b) /* 0.358901067 */, 18 },
-  /* 5373 */  { MAD_F(0x05be6c74) /* 0.358990150 */, 18 },
-  /* 5374 */  { MAD_F(0x05bec9df) /* 0.359079237 */, 18 },
-  /* 5375 */  { MAD_F(0x05bf274a) /* 0.359168331 */, 18 },
-
-  /* 5376 */  { MAD_F(0x05bf84b8) /* 0.359257429 */, 18 },
-  /* 5377 */  { MAD_F(0x05bfe226) /* 0.359346534 */, 18 },
-  /* 5378 */  { MAD_F(0x05c03f97) /* 0.359435644 */, 18 },
-  /* 5379 */  { MAD_F(0x05c09d08) /* 0.359524759 */, 18 },
-  /* 5380 */  { MAD_F(0x05c0fa7c) /* 0.359613880 */, 18 },
-  /* 5381 */  { MAD_F(0x05c157f0) /* 0.359703006 */, 18 },
-  /* 5382 */  { MAD_F(0x05c1b566) /* 0.359792138 */, 18 },
-  /* 5383 */  { MAD_F(0x05c212de) /* 0.359881276 */, 18 },
-  /* 5384 */  { MAD_F(0x05c27057) /* 0.359970419 */, 18 },
-  /* 5385 */  { MAD_F(0x05c2cdd2) /* 0.360059567 */, 18 },
-  /* 5386 */  { MAD_F(0x05c32b4e) /* 0.360148721 */, 18 },
-  /* 5387 */  { MAD_F(0x05c388cb) /* 0.360237881 */, 18 },
-  /* 5388 */  { MAD_F(0x05c3e64b) /* 0.360327046 */, 18 },
-  /* 5389 */  { MAD_F(0x05c443cb) /* 0.360416216 */, 18 },
-  /* 5390 */  { MAD_F(0x05c4a14d) /* 0.360505392 */, 18 },
-  /* 5391 */  { MAD_F(0x05c4fed1) /* 0.360594574 */, 18 },
-
-  /* 5392 */  { MAD_F(0x05c55c56) /* 0.360683761 */, 18 },
-  /* 5393 */  { MAD_F(0x05c5b9dc) /* 0.360772953 */, 18 },
-  /* 5394 */  { MAD_F(0x05c61764) /* 0.360862152 */, 18 },
-  /* 5395 */  { MAD_F(0x05c674ed) /* 0.360951355 */, 18 },
-  /* 5396 */  { MAD_F(0x05c6d278) /* 0.361040564 */, 18 },
-  /* 5397 */  { MAD_F(0x05c73005) /* 0.361129779 */, 18 },
-  /* 5398 */  { MAD_F(0x05c78d93) /* 0.361218999 */, 18 },
-  /* 5399 */  { MAD_F(0x05c7eb22) /* 0.361308225 */, 18 },
-  /* 5400 */  { MAD_F(0x05c848b3) /* 0.361397456 */, 18 },
-  /* 5401 */  { MAD_F(0x05c8a645) /* 0.361486693 */, 18 },
-  /* 5402 */  { MAD_F(0x05c903d9) /* 0.361575935 */, 18 },
-  /* 5403 */  { MAD_F(0x05c9616e) /* 0.361665183 */, 18 },
-  /* 5404 */  { MAD_F(0x05c9bf05) /* 0.361754436 */, 18 },
-  /* 5405 */  { MAD_F(0x05ca1c9d) /* 0.361843695 */, 18 },
-  /* 5406 */  { MAD_F(0x05ca7a37) /* 0.361932959 */, 18 },
-  /* 5407 */  { MAD_F(0x05cad7d2) /* 0.362022229 */, 18 },
-
-  /* 5408 */  { MAD_F(0x05cb356e) /* 0.362111504 */, 18 },
-  /* 5409 */  { MAD_F(0x05cb930d) /* 0.362200785 */, 18 },
-  /* 5410 */  { MAD_F(0x05cbf0ac) /* 0.362290071 */, 18 },
-  /* 5411 */  { MAD_F(0x05cc4e4d) /* 0.362379362 */, 18 },
-  /* 5412 */  { MAD_F(0x05ccabf0) /* 0.362468660 */, 18 },
-  /* 5413 */  { MAD_F(0x05cd0994) /* 0.362557962 */, 18 },
-  /* 5414 */  { MAD_F(0x05cd6739) /* 0.362647271 */, 18 },
-  /* 5415 */  { MAD_F(0x05cdc4e0) /* 0.362736584 */, 18 },
-  /* 5416 */  { MAD_F(0x05ce2289) /* 0.362825904 */, 18 },
-  /* 5417 */  { MAD_F(0x05ce8033) /* 0.362915228 */, 18 },
-  /* 5418 */  { MAD_F(0x05ceddde) /* 0.363004559 */, 18 },
-  /* 5419 */  { MAD_F(0x05cf3b8b) /* 0.363093894 */, 18 },
-  /* 5420 */  { MAD_F(0x05cf9939) /* 0.363183236 */, 18 },
-  /* 5421 */  { MAD_F(0x05cff6e9) /* 0.363272582 */, 18 },
-  /* 5422 */  { MAD_F(0x05d0549a) /* 0.363361935 */, 18 },
-  /* 5423 */  { MAD_F(0x05d0b24d) /* 0.363451292 */, 18 },
-
-  /* 5424 */  { MAD_F(0x05d11001) /* 0.363540655 */, 18 },
-  /* 5425 */  { MAD_F(0x05d16db7) /* 0.363630024 */, 18 },
-  /* 5426 */  { MAD_F(0x05d1cb6e) /* 0.363719398 */, 18 },
-  /* 5427 */  { MAD_F(0x05d22927) /* 0.363808778 */, 18 },
-  /* 5428 */  { MAD_F(0x05d286e1) /* 0.363898163 */, 18 },
-  /* 5429 */  { MAD_F(0x05d2e49d) /* 0.363987554 */, 18 },
-  /* 5430 */  { MAD_F(0x05d3425a) /* 0.364076950 */, 18 },
-  /* 5431 */  { MAD_F(0x05d3a018) /* 0.364166352 */, 18 },
-  /* 5432 */  { MAD_F(0x05d3fdd8) /* 0.364255759 */, 18 },
-  /* 5433 */  { MAD_F(0x05d45b9a) /* 0.364345171 */, 18 },
-  /* 5434 */  { MAD_F(0x05d4b95d) /* 0.364434589 */, 18 },
-  /* 5435 */  { MAD_F(0x05d51721) /* 0.364524013 */, 18 },
-  /* 5436 */  { MAD_F(0x05d574e7) /* 0.364613442 */, 18 },
-  /* 5437 */  { MAD_F(0x05d5d2af) /* 0.364702877 */, 18 },
-  /* 5438 */  { MAD_F(0x05d63078) /* 0.364792317 */, 18 },
-  /* 5439 */  { MAD_F(0x05d68e42) /* 0.364881762 */, 18 },
-
-  /* 5440 */  { MAD_F(0x05d6ec0e) /* 0.364971213 */, 18 },
-  /* 5441 */  { MAD_F(0x05d749db) /* 0.365060669 */, 18 },
-  /* 5442 */  { MAD_F(0x05d7a7aa) /* 0.365150131 */, 18 },
-  /* 5443 */  { MAD_F(0x05d8057a) /* 0.365239599 */, 18 },
-  /* 5444 */  { MAD_F(0x05d8634c) /* 0.365329072 */, 18 },
-  /* 5445 */  { MAD_F(0x05d8c11f) /* 0.365418550 */, 18 },
-  /* 5446 */  { MAD_F(0x05d91ef4) /* 0.365508034 */, 18 },
-  /* 5447 */  { MAD_F(0x05d97cca) /* 0.365597523 */, 18 },
-  /* 5448 */  { MAD_F(0x05d9daa1) /* 0.365687018 */, 18 },
-  /* 5449 */  { MAD_F(0x05da387a) /* 0.365776518 */, 18 },
-  /* 5450 */  { MAD_F(0x05da9655) /* 0.365866024 */, 18 },
-  /* 5451 */  { MAD_F(0x05daf431) /* 0.365955536 */, 18 },
-  /* 5452 */  { MAD_F(0x05db520e) /* 0.366045052 */, 18 },
-  /* 5453 */  { MAD_F(0x05dbafed) /* 0.366134574 */, 18 },
-  /* 5454 */  { MAD_F(0x05dc0dce) /* 0.366224102 */, 18 },
-  /* 5455 */  { MAD_F(0x05dc6baf) /* 0.366313635 */, 18 },
-
-  /* 5456 */  { MAD_F(0x05dcc993) /* 0.366403174 */, 18 },
-  /* 5457 */  { MAD_F(0x05dd2778) /* 0.366492718 */, 18 },
-  /* 5458 */  { MAD_F(0x05dd855e) /* 0.366582267 */, 18 },
-  /* 5459 */  { MAD_F(0x05dde346) /* 0.366671822 */, 18 },
-  /* 5460 */  { MAD_F(0x05de412f) /* 0.366761383 */, 18 },
-  /* 5461 */  { MAD_F(0x05de9f1a) /* 0.366850949 */, 18 },
-  /* 5462 */  { MAD_F(0x05defd06) /* 0.366940520 */, 18 },
-  /* 5463 */  { MAD_F(0x05df5af3) /* 0.367030097 */, 18 },
-  /* 5464 */  { MAD_F(0x05dfb8e2) /* 0.367119680 */, 18 },
-  /* 5465 */  { MAD_F(0x05e016d3) /* 0.367209267 */, 18 },
-  /* 5466 */  { MAD_F(0x05e074c5) /* 0.367298861 */, 18 },
-  /* 5467 */  { MAD_F(0x05e0d2b8) /* 0.367388459 */, 18 },
-  /* 5468 */  { MAD_F(0x05e130ad) /* 0.367478064 */, 18 },
-  /* 5469 */  { MAD_F(0x05e18ea4) /* 0.367567673 */, 18 },
-  /* 5470 */  { MAD_F(0x05e1ec9c) /* 0.367657288 */, 18 },
-  /* 5471 */  { MAD_F(0x05e24a95) /* 0.367746909 */, 18 },
-
-  /* 5472 */  { MAD_F(0x05e2a890) /* 0.367836535 */, 18 },
-  /* 5473 */  { MAD_F(0x05e3068c) /* 0.367926167 */, 18 },
-  /* 5474 */  { MAD_F(0x05e3648a) /* 0.368015804 */, 18 },
-  /* 5475 */  { MAD_F(0x05e3c289) /* 0.368105446 */, 18 },
-  /* 5476 */  { MAD_F(0x05e4208a) /* 0.368195094 */, 18 },
-  /* 5477 */  { MAD_F(0x05e47e8c) /* 0.368284747 */, 18 },
-  /* 5478 */  { MAD_F(0x05e4dc8f) /* 0.368374406 */, 18 },
-  /* 5479 */  { MAD_F(0x05e53a94) /* 0.368464070 */, 18 },
-  /* 5480 */  { MAD_F(0x05e5989b) /* 0.368553740 */, 18 },
-  /* 5481 */  { MAD_F(0x05e5f6a3) /* 0.368643415 */, 18 },
-  /* 5482 */  { MAD_F(0x05e654ac) /* 0.368733096 */, 18 },
-  /* 5483 */  { MAD_F(0x05e6b2b7) /* 0.368822782 */, 18 },
-  /* 5484 */  { MAD_F(0x05e710c4) /* 0.368912473 */, 18 },
-  /* 5485 */  { MAD_F(0x05e76ed2) /* 0.369002170 */, 18 },
-  /* 5486 */  { MAD_F(0x05e7cce1) /* 0.369091873 */, 18 },
-  /* 5487 */  { MAD_F(0x05e82af2) /* 0.369181581 */, 18 },
-
-  /* 5488 */  { MAD_F(0x05e88904) /* 0.369271294 */, 18 },
-  /* 5489 */  { MAD_F(0x05e8e718) /* 0.369361013 */, 18 },
-  /* 5490 */  { MAD_F(0x05e9452d) /* 0.369450737 */, 18 },
-  /* 5491 */  { MAD_F(0x05e9a343) /* 0.369540467 */, 18 },
-  /* 5492 */  { MAD_F(0x05ea015c) /* 0.369630202 */, 18 },
-  /* 5493 */  { MAD_F(0x05ea5f75) /* 0.369719942 */, 18 },
-  /* 5494 */  { MAD_F(0x05eabd90) /* 0.369809688 */, 18 },
-  /* 5495 */  { MAD_F(0x05eb1bad) /* 0.369899440 */, 18 },
-  /* 5496 */  { MAD_F(0x05eb79cb) /* 0.369989197 */, 18 },
-  /* 5497 */  { MAD_F(0x05ebd7ea) /* 0.370078959 */, 18 },
-  /* 5498 */  { MAD_F(0x05ec360b) /* 0.370168727 */, 18 },
-  /* 5499 */  { MAD_F(0x05ec942d) /* 0.370258500 */, 18 },
-  /* 5500 */  { MAD_F(0x05ecf251) /* 0.370348279 */, 18 },
-  /* 5501 */  { MAD_F(0x05ed5076) /* 0.370438063 */, 18 },
-  /* 5502 */  { MAD_F(0x05edae9d) /* 0.370527853 */, 18 },
-  /* 5503 */  { MAD_F(0x05ee0cc5) /* 0.370617648 */, 18 },
-
-  /* 5504 */  { MAD_F(0x05ee6aef) /* 0.370707448 */, 18 },
-  /* 5505 */  { MAD_F(0x05eec91a) /* 0.370797254 */, 18 },
-  /* 5506 */  { MAD_F(0x05ef2746) /* 0.370887065 */, 18 },
-  /* 5507 */  { MAD_F(0x05ef8574) /* 0.370976882 */, 18 },
-  /* 5508 */  { MAD_F(0x05efe3a4) /* 0.371066704 */, 18 },
-  /* 5509 */  { MAD_F(0x05f041d5) /* 0.371156532 */, 18 },
-  /* 5510 */  { MAD_F(0x05f0a007) /* 0.371246365 */, 18 },
-  /* 5511 */  { MAD_F(0x05f0fe3b) /* 0.371336203 */, 18 },
-  /* 5512 */  { MAD_F(0x05f15c70) /* 0.371426047 */, 18 },
-  /* 5513 */  { MAD_F(0x05f1baa7) /* 0.371515897 */, 18 },
-  /* 5514 */  { MAD_F(0x05f218df) /* 0.371605751 */, 18 },
-  /* 5515 */  { MAD_F(0x05f27719) /* 0.371695612 */, 18 },
-  /* 5516 */  { MAD_F(0x05f2d554) /* 0.371785477 */, 18 },
-  /* 5517 */  { MAD_F(0x05f33390) /* 0.371875348 */, 18 },
-  /* 5518 */  { MAD_F(0x05f391cf) /* 0.371965225 */, 18 },
-  /* 5519 */  { MAD_F(0x05f3f00e) /* 0.372055107 */, 18 },
-
-  /* 5520 */  { MAD_F(0x05f44e4f) /* 0.372144994 */, 18 },
-  /* 5521 */  { MAD_F(0x05f4ac91) /* 0.372234887 */, 18 },
-  /* 5522 */  { MAD_F(0x05f50ad5) /* 0.372324785 */, 18 },
-  /* 5523 */  { MAD_F(0x05f5691b) /* 0.372414689 */, 18 },
-  /* 5524 */  { MAD_F(0x05f5c761) /* 0.372504598 */, 18 },
-  /* 5525 */  { MAD_F(0x05f625aa) /* 0.372594513 */, 18 },
-  /* 5526 */  { MAD_F(0x05f683f3) /* 0.372684433 */, 18 },
-  /* 5527 */  { MAD_F(0x05f6e23f) /* 0.372774358 */, 18 },
-  /* 5528 */  { MAD_F(0x05f7408b) /* 0.372864289 */, 18 },
-  /* 5529 */  { MAD_F(0x05f79ed9) /* 0.372954225 */, 18 },
-  /* 5530 */  { MAD_F(0x05f7fd29) /* 0.373044167 */, 18 },
-  /* 5531 */  { MAD_F(0x05f85b7a) /* 0.373134114 */, 18 },
-  /* 5532 */  { MAD_F(0x05f8b9cc) /* 0.373224066 */, 18 },
-  /* 5533 */  { MAD_F(0x05f91820) /* 0.373314024 */, 18 },
-  /* 5534 */  { MAD_F(0x05f97675) /* 0.373403987 */, 18 },
-  /* 5535 */  { MAD_F(0x05f9d4cc) /* 0.373493956 */, 18 },
-
-  /* 5536 */  { MAD_F(0x05fa3324) /* 0.373583930 */, 18 },
-  /* 5537 */  { MAD_F(0x05fa917e) /* 0.373673910 */, 18 },
-  /* 5538 */  { MAD_F(0x05faefd9) /* 0.373763895 */, 18 },
-  /* 5539 */  { MAD_F(0x05fb4e36) /* 0.373853885 */, 18 },
-  /* 5540 */  { MAD_F(0x05fbac94) /* 0.373943881 */, 18 },
-  /* 5541 */  { MAD_F(0x05fc0af3) /* 0.374033882 */, 18 },
-  /* 5542 */  { MAD_F(0x05fc6954) /* 0.374123889 */, 18 },
-  /* 5543 */  { MAD_F(0x05fcc7b7) /* 0.374213901 */, 18 },
-  /* 5544 */  { MAD_F(0x05fd261b) /* 0.374303918 */, 18 },
-  /* 5545 */  { MAD_F(0x05fd8480) /* 0.374393941 */, 18 },
-  /* 5546 */  { MAD_F(0x05fde2e7) /* 0.374483970 */, 18 },
-  /* 5547 */  { MAD_F(0x05fe414f) /* 0.374574003 */, 18 },
-  /* 5548 */  { MAD_F(0x05fe9fb9) /* 0.374664042 */, 18 },
-  /* 5549 */  { MAD_F(0x05fefe24) /* 0.374754087 */, 18 },
-  /* 5550 */  { MAD_F(0x05ff5c91) /* 0.374844137 */, 18 },
-  /* 5551 */  { MAD_F(0x05ffbaff) /* 0.374934192 */, 18 },
-
-  /* 5552 */  { MAD_F(0x0600196e) /* 0.375024253 */, 18 },
-  /* 5553 */  { MAD_F(0x060077df) /* 0.375114319 */, 18 },
-  /* 5554 */  { MAD_F(0x0600d651) /* 0.375204391 */, 18 },
-  /* 5555 */  { MAD_F(0x060134c5) /* 0.375294468 */, 18 },
-  /* 5556 */  { MAD_F(0x0601933b) /* 0.375384550 */, 18 },
-  /* 5557 */  { MAD_F(0x0601f1b1) /* 0.375474638 */, 18 },
-  /* 5558 */  { MAD_F(0x0602502a) /* 0.375564731 */, 18 },
-  /* 5559 */  { MAD_F(0x0602aea3) /* 0.375654830 */, 18 },
-  /* 5560 */  { MAD_F(0x06030d1e) /* 0.375744934 */, 18 },
-  /* 5561 */  { MAD_F(0x06036b9b) /* 0.375835043 */, 18 },
-  /* 5562 */  { MAD_F(0x0603ca19) /* 0.375925158 */, 18 },
-  /* 5563 */  { MAD_F(0x06042898) /* 0.376015278 */, 18 },
-  /* 5564 */  { MAD_F(0x06048719) /* 0.376105404 */, 18 },
-  /* 5565 */  { MAD_F(0x0604e59c) /* 0.376195535 */, 18 },
-  /* 5566 */  { MAD_F(0x0605441f) /* 0.376285671 */, 18 },
-  /* 5567 */  { MAD_F(0x0605a2a5) /* 0.376375813 */, 18 },
-
-  /* 5568 */  { MAD_F(0x0606012b) /* 0.376465960 */, 18 },
-  /* 5569 */  { MAD_F(0x06065fb4) /* 0.376556113 */, 18 },
-  /* 5570 */  { MAD_F(0x0606be3d) /* 0.376646271 */, 18 },
-  /* 5571 */  { MAD_F(0x06071cc8) /* 0.376736434 */, 18 },
-  /* 5572 */  { MAD_F(0x06077b55) /* 0.376826603 */, 18 },
-  /* 5573 */  { MAD_F(0x0607d9e3) /* 0.376916777 */, 18 },
-  /* 5574 */  { MAD_F(0x06083872) /* 0.377006957 */, 18 },
-  /* 5575 */  { MAD_F(0x06089703) /* 0.377097141 */, 18 },
-  /* 5576 */  { MAD_F(0x0608f595) /* 0.377187332 */, 18 },
-  /* 5577 */  { MAD_F(0x06095429) /* 0.377277528 */, 18 },
-  /* 5578 */  { MAD_F(0x0609b2be) /* 0.377367729 */, 18 },
-  /* 5579 */  { MAD_F(0x060a1155) /* 0.377457935 */, 18 },
-  /* 5580 */  { MAD_F(0x060a6fed) /* 0.377548147 */, 18 },
-  /* 5581 */  { MAD_F(0x060ace86) /* 0.377638364 */, 18 },
-  /* 5582 */  { MAD_F(0x060b2d21) /* 0.377728587 */, 18 },
-  /* 5583 */  { MAD_F(0x060b8bbe) /* 0.377818815 */, 18 },
-
-  /* 5584 */  { MAD_F(0x060bea5c) /* 0.377909049 */, 18 },
-  /* 5585 */  { MAD_F(0x060c48fb) /* 0.377999288 */, 18 },
-  /* 5586 */  { MAD_F(0x060ca79c) /* 0.378089532 */, 18 },
-  /* 5587 */  { MAD_F(0x060d063e) /* 0.378179781 */, 18 },
-  /* 5588 */  { MAD_F(0x060d64e1) /* 0.378270036 */, 18 },
-  /* 5589 */  { MAD_F(0x060dc387) /* 0.378360297 */, 18 },
-  /* 5590 */  { MAD_F(0x060e222d) /* 0.378450563 */, 18 },
-  /* 5591 */  { MAD_F(0x060e80d5) /* 0.378540834 */, 18 },
-  /* 5592 */  { MAD_F(0x060edf7f) /* 0.378631110 */, 18 },
-  /* 5593 */  { MAD_F(0x060f3e29) /* 0.378721392 */, 18 },
-  /* 5594 */  { MAD_F(0x060f9cd6) /* 0.378811680 */, 18 },
-  /* 5595 */  { MAD_F(0x060ffb83) /* 0.378901972 */, 18 },
-  /* 5596 */  { MAD_F(0x06105a33) /* 0.378992270 */, 18 },
-  /* 5597 */  { MAD_F(0x0610b8e3) /* 0.379082574 */, 18 },
-  /* 5598 */  { MAD_F(0x06111795) /* 0.379172883 */, 18 },
-  /* 5599 */  { MAD_F(0x06117649) /* 0.379263197 */, 18 },
-
-  /* 5600 */  { MAD_F(0x0611d4fe) /* 0.379353516 */, 18 },
-  /* 5601 */  { MAD_F(0x061233b4) /* 0.379443841 */, 18 },
-  /* 5602 */  { MAD_F(0x0612926c) /* 0.379534172 */, 18 },
-  /* 5603 */  { MAD_F(0x0612f125) /* 0.379624507 */, 18 },
-  /* 5604 */  { MAD_F(0x06134fe0) /* 0.379714848 */, 18 },
-  /* 5605 */  { MAD_F(0x0613ae9c) /* 0.379805195 */, 18 },
-  /* 5606 */  { MAD_F(0x06140d5a) /* 0.379895547 */, 18 },
-  /* 5607 */  { MAD_F(0x06146c19) /* 0.379985904 */, 18 },
-  /* 5608 */  { MAD_F(0x0614cada) /* 0.380076266 */, 18 },
-  /* 5609 */  { MAD_F(0x0615299c) /* 0.380166634 */, 18 },
-  /* 5610 */  { MAD_F(0x0615885f) /* 0.380257008 */, 18 },
-  /* 5611 */  { MAD_F(0x0615e724) /* 0.380347386 */, 18 },
-  /* 5612 */  { MAD_F(0x061645ea) /* 0.380437770 */, 18 },
-  /* 5613 */  { MAD_F(0x0616a4b2) /* 0.380528160 */, 18 },
-  /* 5614 */  { MAD_F(0x0617037b) /* 0.380618555 */, 18 },
-  /* 5615 */  { MAD_F(0x06176246) /* 0.380708955 */, 18 },
-
-  /* 5616 */  { MAD_F(0x0617c112) /* 0.380799360 */, 18 },
-  /* 5617 */  { MAD_F(0x06181fdf) /* 0.380889771 */, 18 },
-  /* 5618 */  { MAD_F(0x06187eae) /* 0.380980187 */, 18 },
-  /* 5619 */  { MAD_F(0x0618dd7e) /* 0.381070609 */, 18 },
-  /* 5620 */  { MAD_F(0x06193c50) /* 0.381161036 */, 18 },
-  /* 5621 */  { MAD_F(0x06199b24) /* 0.381251468 */, 18 },
-  /* 5622 */  { MAD_F(0x0619f9f8) /* 0.381341906 */, 18 },
-  /* 5623 */  { MAD_F(0x061a58ce) /* 0.381432349 */, 18 },
-  /* 5624 */  { MAD_F(0x061ab7a6) /* 0.381522798 */, 18 },
-  /* 5625 */  { MAD_F(0x061b167f) /* 0.381613251 */, 18 },
-  /* 5626 */  { MAD_F(0x061b7559) /* 0.381703711 */, 18 },
-  /* 5627 */  { MAD_F(0x061bd435) /* 0.381794175 */, 18 },
-  /* 5628 */  { MAD_F(0x061c3313) /* 0.381884645 */, 18 },
-  /* 5629 */  { MAD_F(0x061c91f1) /* 0.381975120 */, 18 },
-  /* 5630 */  { MAD_F(0x061cf0d2) /* 0.382065601 */, 18 },
-  /* 5631 */  { MAD_F(0x061d4fb3) /* 0.382156087 */, 18 },
-
-  /* 5632 */  { MAD_F(0x061dae96) /* 0.382246578 */, 18 },
-  /* 5633 */  { MAD_F(0x061e0d7b) /* 0.382337075 */, 18 },
-  /* 5634 */  { MAD_F(0x061e6c61) /* 0.382427577 */, 18 },
-  /* 5635 */  { MAD_F(0x061ecb48) /* 0.382518084 */, 18 },
-  /* 5636 */  { MAD_F(0x061f2a31) /* 0.382608597 */, 18 },
-  /* 5637 */  { MAD_F(0x061f891b) /* 0.382699115 */, 18 },
-  /* 5638 */  { MAD_F(0x061fe807) /* 0.382789638 */, 18 },
-  /* 5639 */  { MAD_F(0x062046f4) /* 0.382880167 */, 18 },
-  /* 5640 */  { MAD_F(0x0620a5e3) /* 0.382970701 */, 18 },
-  /* 5641 */  { MAD_F(0x062104d3) /* 0.383061241 */, 18 },
-  /* 5642 */  { MAD_F(0x062163c4) /* 0.383151786 */, 18 },
-  /* 5643 */  { MAD_F(0x0621c2b7) /* 0.383242336 */, 18 },
-  /* 5644 */  { MAD_F(0x062221ab) /* 0.383332891 */, 18 },
-  /* 5645 */  { MAD_F(0x062280a1) /* 0.383423452 */, 18 },
-  /* 5646 */  { MAD_F(0x0622df98) /* 0.383514018 */, 18 },
-  /* 5647 */  { MAD_F(0x06233e91) /* 0.383604590 */, 18 },
-
-  /* 5648 */  { MAD_F(0x06239d8b) /* 0.383695167 */, 18 },
-  /* 5649 */  { MAD_F(0x0623fc86) /* 0.383785749 */, 18 },
-  /* 5650 */  { MAD_F(0x06245b83) /* 0.383876337 */, 18 },
-  /* 5651 */  { MAD_F(0x0624ba82) /* 0.383966930 */, 18 },
-  /* 5652 */  { MAD_F(0x06251981) /* 0.384057528 */, 18 },
-  /* 5653 */  { MAD_F(0x06257883) /* 0.384148132 */, 18 },
-  /* 5654 */  { MAD_F(0x0625d785) /* 0.384238741 */, 18 },
-  /* 5655 */  { MAD_F(0x06263689) /* 0.384329355 */, 18 },
-  /* 5656 */  { MAD_F(0x0626958f) /* 0.384419975 */, 18 },
-  /* 5657 */  { MAD_F(0x0626f496) /* 0.384510600 */, 18 },
-  /* 5658 */  { MAD_F(0x0627539e) /* 0.384601230 */, 18 },
-  /* 5659 */  { MAD_F(0x0627b2a8) /* 0.384691866 */, 18 },
-  /* 5660 */  { MAD_F(0x062811b3) /* 0.384782507 */, 18 },
-  /* 5661 */  { MAD_F(0x062870c0) /* 0.384873153 */, 18 },
-  /* 5662 */  { MAD_F(0x0628cfce) /* 0.384963805 */, 18 },
-  /* 5663 */  { MAD_F(0x06292ede) /* 0.385054462 */, 18 },
-
-  /* 5664 */  { MAD_F(0x06298def) /* 0.385145124 */, 18 },
-  /* 5665 */  { MAD_F(0x0629ed01) /* 0.385235792 */, 18 },
-  /* 5666 */  { MAD_F(0x062a4c15) /* 0.385326465 */, 18 },
-  /* 5667 */  { MAD_F(0x062aab2a) /* 0.385417143 */, 18 },
-  /* 5668 */  { MAD_F(0x062b0a41) /* 0.385507827 */, 18 },
-  /* 5669 */  { MAD_F(0x062b6959) /* 0.385598516 */, 18 },
-  /* 5670 */  { MAD_F(0x062bc873) /* 0.385689211 */, 18 },
-  /* 5671 */  { MAD_F(0x062c278e) /* 0.385779910 */, 18 },
-  /* 5672 */  { MAD_F(0x062c86aa) /* 0.385870615 */, 18 },
-  /* 5673 */  { MAD_F(0x062ce5c8) /* 0.385961326 */, 18 },
-  /* 5674 */  { MAD_F(0x062d44e8) /* 0.386052041 */, 18 },
-  /* 5675 */  { MAD_F(0x062da408) /* 0.386142762 */, 18 },
-  /* 5676 */  { MAD_F(0x062e032a) /* 0.386233489 */, 18 },
-  /* 5677 */  { MAD_F(0x062e624e) /* 0.386324221 */, 18 },
-  /* 5678 */  { MAD_F(0x062ec173) /* 0.386414958 */, 18 },
-  /* 5679 */  { MAD_F(0x062f209a) /* 0.386505700 */, 18 },
-
-  /* 5680 */  { MAD_F(0x062f7fc1) /* 0.386596448 */, 18 },
-  /* 5681 */  { MAD_F(0x062fdeeb) /* 0.386687201 */, 18 },
-  /* 5682 */  { MAD_F(0x06303e16) /* 0.386777959 */, 18 },
-  /* 5683 */  { MAD_F(0x06309d42) /* 0.386868723 */, 18 },
-  /* 5684 */  { MAD_F(0x0630fc6f) /* 0.386959492 */, 18 },
-  /* 5685 */  { MAD_F(0x06315b9e) /* 0.387050266 */, 18 },
-  /* 5686 */  { MAD_F(0x0631bacf) /* 0.387141045 */, 18 },
-  /* 5687 */  { MAD_F(0x06321a01) /* 0.387231830 */, 18 },
-  /* 5688 */  { MAD_F(0x06327934) /* 0.387322621 */, 18 },
-  /* 5689 */  { MAD_F(0x0632d869) /* 0.387413416 */, 18 },
-  /* 5690 */  { MAD_F(0x0633379f) /* 0.387504217 */, 18 },
-  /* 5691 */  { MAD_F(0x063396d7) /* 0.387595023 */, 18 },
-  /* 5692 */  { MAD_F(0x0633f610) /* 0.387685835 */, 18 },
-  /* 5693 */  { MAD_F(0x0634554a) /* 0.387776652 */, 18 },
-  /* 5694 */  { MAD_F(0x0634b486) /* 0.387867474 */, 18 },
-  /* 5695 */  { MAD_F(0x063513c3) /* 0.387958301 */, 18 },
-
-  /* 5696 */  { MAD_F(0x06357302) /* 0.388049134 */, 18 },
-  /* 5697 */  { MAD_F(0x0635d242) /* 0.388139972 */, 18 },
-  /* 5698 */  { MAD_F(0x06363184) /* 0.388230816 */, 18 },
-  /* 5699 */  { MAD_F(0x063690c7) /* 0.388321665 */, 18 },
-  /* 5700 */  { MAD_F(0x0636f00b) /* 0.388412519 */, 18 },
-  /* 5701 */  { MAD_F(0x06374f51) /* 0.388503378 */, 18 },
-  /* 5702 */  { MAD_F(0x0637ae99) /* 0.388594243 */, 18 },
-  /* 5703 */  { MAD_F(0x06380de1) /* 0.388685113 */, 18 },
-  /* 5704 */  { MAD_F(0x06386d2b) /* 0.388775988 */, 18 },
-  /* 5705 */  { MAD_F(0x0638cc77) /* 0.388866869 */, 18 },
-  /* 5706 */  { MAD_F(0x06392bc4) /* 0.388957755 */, 18 },
-  /* 5707 */  { MAD_F(0x06398b12) /* 0.389048646 */, 18 },
-  /* 5708 */  { MAD_F(0x0639ea62) /* 0.389139542 */, 18 },
-  /* 5709 */  { MAD_F(0x063a49b4) /* 0.389230444 */, 18 },
-  /* 5710 */  { MAD_F(0x063aa906) /* 0.389321352 */, 18 },
-  /* 5711 */  { MAD_F(0x063b085a) /* 0.389412264 */, 18 },
-
-  /* 5712 */  { MAD_F(0x063b67b0) /* 0.389503182 */, 18 },
-  /* 5713 */  { MAD_F(0x063bc707) /* 0.389594105 */, 18 },
-  /* 5714 */  { MAD_F(0x063c265f) /* 0.389685033 */, 18 },
-  /* 5715 */  { MAD_F(0x063c85b9) /* 0.389775967 */, 18 },
-  /* 5716 */  { MAD_F(0x063ce514) /* 0.389866906 */, 18 },
-  /* 5717 */  { MAD_F(0x063d4471) /* 0.389957850 */, 18 },
-  /* 5718 */  { MAD_F(0x063da3cf) /* 0.390048800 */, 18 },
-  /* 5719 */  { MAD_F(0x063e032f) /* 0.390139755 */, 18 },
-  /* 5720 */  { MAD_F(0x063e6290) /* 0.390230715 */, 18 },
-  /* 5721 */  { MAD_F(0x063ec1f2) /* 0.390321681 */, 18 },
-  /* 5722 */  { MAD_F(0x063f2156) /* 0.390412651 */, 18 },
-  /* 5723 */  { MAD_F(0x063f80bb) /* 0.390503628 */, 18 },
-  /* 5724 */  { MAD_F(0x063fe022) /* 0.390594609 */, 18 },
-  /* 5725 */  { MAD_F(0x06403f8a) /* 0.390685596 */, 18 },
-  /* 5726 */  { MAD_F(0x06409ef3) /* 0.390776588 */, 18 },
-  /* 5727 */  { MAD_F(0x0640fe5e) /* 0.390867585 */, 18 },
-
-  /* 5728 */  { MAD_F(0x06415dcb) /* 0.390958588 */, 18 },
-  /* 5729 */  { MAD_F(0x0641bd38) /* 0.391049596 */, 18 },
-  /* 5730 */  { MAD_F(0x06421ca7) /* 0.391140609 */, 18 },
-  /* 5731 */  { MAD_F(0x06427c18) /* 0.391231627 */, 18 },
-  /* 5732 */  { MAD_F(0x0642db8a) /* 0.391322651 */, 18 },
-  /* 5733 */  { MAD_F(0x06433afd) /* 0.391413680 */, 18 },
-  /* 5734 */  { MAD_F(0x06439a72) /* 0.391504714 */, 18 },
-  /* 5735 */  { MAD_F(0x0643f9e9) /* 0.391595754 */, 18 },
-  /* 5736 */  { MAD_F(0x06445960) /* 0.391686799 */, 18 },
-  /* 5737 */  { MAD_F(0x0644b8d9) /* 0.391777849 */, 18 },
-  /* 5738 */  { MAD_F(0x06451854) /* 0.391868905 */, 18 },
-  /* 5739 */  { MAD_F(0x064577d0) /* 0.391959966 */, 18 },
-  /* 5740 */  { MAD_F(0x0645d74d) /* 0.392051032 */, 18 },
-  /* 5741 */  { MAD_F(0x064636cc) /* 0.392142103 */, 18 },
-  /* 5742 */  { MAD_F(0x0646964c) /* 0.392233180 */, 18 },
-  /* 5743 */  { MAD_F(0x0646f5ce) /* 0.392324262 */, 18 },
-
-  /* 5744 */  { MAD_F(0x06475551) /* 0.392415349 */, 18 },
-  /* 5745 */  { MAD_F(0x0647b4d5) /* 0.392506442 */, 18 },
-  /* 5746 */  { MAD_F(0x0648145b) /* 0.392597540 */, 18 },
-  /* 5747 */  { MAD_F(0x064873e3) /* 0.392688643 */, 18 },
-  /* 5748 */  { MAD_F(0x0648d36b) /* 0.392779751 */, 18 },
-  /* 5749 */  { MAD_F(0x064932f6) /* 0.392870865 */, 18 },
-  /* 5750 */  { MAD_F(0x06499281) /* 0.392961984 */, 18 },
-  /* 5751 */  { MAD_F(0x0649f20e) /* 0.393053108 */, 18 },
-  /* 5752 */  { MAD_F(0x064a519c) /* 0.393144238 */, 18 },
-  /* 5753 */  { MAD_F(0x064ab12c) /* 0.393235372 */, 18 },
-  /* 5754 */  { MAD_F(0x064b10be) /* 0.393326513 */, 18 },
-  /* 5755 */  { MAD_F(0x064b7050) /* 0.393417658 */, 18 },
-  /* 5756 */  { MAD_F(0x064bcfe4) /* 0.393508809 */, 18 },
-  /* 5757 */  { MAD_F(0x064c2f7a) /* 0.393599965 */, 18 },
-  /* 5758 */  { MAD_F(0x064c8f11) /* 0.393691126 */, 18 },
-  /* 5759 */  { MAD_F(0x064ceea9) /* 0.393782292 */, 18 },
-
-  /* 5760 */  { MAD_F(0x064d4e43) /* 0.393873464 */, 18 },
-  /* 5761 */  { MAD_F(0x064dadde) /* 0.393964641 */, 18 },
-  /* 5762 */  { MAD_F(0x064e0d7a) /* 0.394055823 */, 18 },
-  /* 5763 */  { MAD_F(0x064e6d18) /* 0.394147011 */, 18 },
-  /* 5764 */  { MAD_F(0x064eccb8) /* 0.394238204 */, 18 },
-  /* 5765 */  { MAD_F(0x064f2c59) /* 0.394329402 */, 18 },
-  /* 5766 */  { MAD_F(0x064f8bfb) /* 0.394420605 */, 18 },
-  /* 5767 */  { MAD_F(0x064feb9e) /* 0.394511814 */, 18 },
-  /* 5768 */  { MAD_F(0x06504b44) /* 0.394603028 */, 18 },
-  /* 5769 */  { MAD_F(0x0650aaea) /* 0.394694247 */, 18 },
-  /* 5770 */  { MAD_F(0x06510a92) /* 0.394785472 */, 18 },
-  /* 5771 */  { MAD_F(0x06516a3b) /* 0.394876702 */, 18 },
-  /* 5772 */  { MAD_F(0x0651c9e6) /* 0.394967937 */, 18 },
-  /* 5773 */  { MAD_F(0x06522992) /* 0.395059177 */, 18 },
-  /* 5774 */  { MAD_F(0x06528940) /* 0.395150423 */, 18 },
-  /* 5775 */  { MAD_F(0x0652e8ef) /* 0.395241673 */, 18 },
-
-  /* 5776 */  { MAD_F(0x0653489f) /* 0.395332930 */, 18 },
-  /* 5777 */  { MAD_F(0x0653a851) /* 0.395424191 */, 18 },
-  /* 5778 */  { MAD_F(0x06540804) /* 0.395515458 */, 18 },
-  /* 5779 */  { MAD_F(0x065467b9) /* 0.395606730 */, 18 },
-  /* 5780 */  { MAD_F(0x0654c76f) /* 0.395698007 */, 18 },
-  /* 5781 */  { MAD_F(0x06552726) /* 0.395789289 */, 18 },
-  /* 5782 */  { MAD_F(0x065586df) /* 0.395880577 */, 18 },
-  /* 5783 */  { MAD_F(0x0655e699) /* 0.395971870 */, 18 },
-  /* 5784 */  { MAD_F(0x06564655) /* 0.396063168 */, 18 },
-  /* 5785 */  { MAD_F(0x0656a612) /* 0.396154472 */, 18 },
-  /* 5786 */  { MAD_F(0x065705d0) /* 0.396245780 */, 18 },
-  /* 5787 */  { MAD_F(0x06576590) /* 0.396337094 */, 18 },
-  /* 5788 */  { MAD_F(0x0657c552) /* 0.396428414 */, 18 },
-  /* 5789 */  { MAD_F(0x06582514) /* 0.396519738 */, 18 },
-  /* 5790 */  { MAD_F(0x065884d9) /* 0.396611068 */, 18 },
-  /* 5791 */  { MAD_F(0x0658e49e) /* 0.396702403 */, 18 },
-
-  /* 5792 */  { MAD_F(0x06594465) /* 0.396793743 */, 18 },
-  /* 5793 */  { MAD_F(0x0659a42e) /* 0.396885089 */, 18 },
-  /* 5794 */  { MAD_F(0x065a03f7) /* 0.396976440 */, 18 },
-  /* 5795 */  { MAD_F(0x065a63c3) /* 0.397067796 */, 18 },
-  /* 5796 */  { MAD_F(0x065ac38f) /* 0.397159157 */, 18 },
-  /* 5797 */  { MAD_F(0x065b235d) /* 0.397250524 */, 18 },
-  /* 5798 */  { MAD_F(0x065b832d) /* 0.397341896 */, 18 },
-  /* 5799 */  { MAD_F(0x065be2fe) /* 0.397433273 */, 18 },
-  /* 5800 */  { MAD_F(0x065c42d0) /* 0.397524655 */, 18 },
-  /* 5801 */  { MAD_F(0x065ca2a3) /* 0.397616043 */, 18 },
-  /* 5802 */  { MAD_F(0x065d0279) /* 0.397707436 */, 18 },
-  /* 5803 */  { MAD_F(0x065d624f) /* 0.397798834 */, 18 },
-  /* 5804 */  { MAD_F(0x065dc227) /* 0.397890237 */, 18 },
-  /* 5805 */  { MAD_F(0x065e2200) /* 0.397981646 */, 18 },
-  /* 5806 */  { MAD_F(0x065e81db) /* 0.398073059 */, 18 },
-  /* 5807 */  { MAD_F(0x065ee1b7) /* 0.398164479 */, 18 },
-
-  /* 5808 */  { MAD_F(0x065f4195) /* 0.398255903 */, 18 },
-  /* 5809 */  { MAD_F(0x065fa174) /* 0.398347333 */, 18 },
-  /* 5810 */  { MAD_F(0x06600154) /* 0.398438767 */, 18 },
-  /* 5811 */  { MAD_F(0x06606136) /* 0.398530207 */, 18 },
-  /* 5812 */  { MAD_F(0x0660c119) /* 0.398621653 */, 18 },
-  /* 5813 */  { MAD_F(0x066120fd) /* 0.398713103 */, 18 },
-  /* 5814 */  { MAD_F(0x066180e3) /* 0.398804559 */, 18 },
-  /* 5815 */  { MAD_F(0x0661e0cb) /* 0.398896020 */, 18 },
-  /* 5816 */  { MAD_F(0x066240b4) /* 0.398987487 */, 18 },
-  /* 5817 */  { MAD_F(0x0662a09e) /* 0.399078958 */, 18 },
-  /* 5818 */  { MAD_F(0x06630089) /* 0.399170435 */, 18 },
-  /* 5819 */  { MAD_F(0x06636077) /* 0.399261917 */, 18 },
-  /* 5820 */  { MAD_F(0x0663c065) /* 0.399353404 */, 18 },
-  /* 5821 */  { MAD_F(0x06642055) /* 0.399444897 */, 18 },
-  /* 5822 */  { MAD_F(0x06648046) /* 0.399536395 */, 18 },
-  /* 5823 */  { MAD_F(0x0664e039) /* 0.399627898 */, 18 },
-
-  /* 5824 */  { MAD_F(0x0665402d) /* 0.399719406 */, 18 },
-  /* 5825 */  { MAD_F(0x0665a022) /* 0.399810919 */, 18 },
-  /* 5826 */  { MAD_F(0x06660019) /* 0.399902438 */, 18 },
-  /* 5827 */  { MAD_F(0x06666011) /* 0.399993962 */, 18 },
-  /* 5828 */  { MAD_F(0x0666c00b) /* 0.400085491 */, 18 },
-  /* 5829 */  { MAD_F(0x06672006) /* 0.400177026 */, 18 },
-  /* 5830 */  { MAD_F(0x06678003) /* 0.400268565 */, 18 },
-  /* 5831 */  { MAD_F(0x0667e000) /* 0.400360110 */, 18 },
-  /* 5832 */  { MAD_F(0x06684000) /* 0.400451660 */, 18 },
-  /* 5833 */  { MAD_F(0x0668a000) /* 0.400543216 */, 18 },
-  /* 5834 */  { MAD_F(0x06690003) /* 0.400634776 */, 18 },
-  /* 5835 */  { MAD_F(0x06696006) /* 0.400726342 */, 18 },
-  /* 5836 */  { MAD_F(0x0669c00b) /* 0.400817913 */, 18 },
-  /* 5837 */  { MAD_F(0x066a2011) /* 0.400909489 */, 18 },
-  /* 5838 */  { MAD_F(0x066a8019) /* 0.401001071 */, 18 },
-  /* 5839 */  { MAD_F(0x066ae022) /* 0.401092657 */, 18 },
-
-  /* 5840 */  { MAD_F(0x066b402d) /* 0.401184249 */, 18 },
-  /* 5841 */  { MAD_F(0x066ba039) /* 0.401275847 */, 18 },
-  /* 5842 */  { MAD_F(0x066c0046) /* 0.401367449 */, 18 },
-  /* 5843 */  { MAD_F(0x066c6055) /* 0.401459057 */, 18 },
-  /* 5844 */  { MAD_F(0x066cc065) /* 0.401550670 */, 18 },
-  /* 5845 */  { MAD_F(0x066d2076) /* 0.401642288 */, 18 },
-  /* 5846 */  { MAD_F(0x066d8089) /* 0.401733911 */, 18 },
-  /* 5847 */  { MAD_F(0x066de09e) /* 0.401825540 */, 18 },
-  /* 5848 */  { MAD_F(0x066e40b3) /* 0.401917173 */, 18 },
-  /* 5849 */  { MAD_F(0x066ea0cb) /* 0.402008812 */, 18 },
-  /* 5850 */  { MAD_F(0x066f00e3) /* 0.402100457 */, 18 },
-  /* 5851 */  { MAD_F(0x066f60fd) /* 0.402192106 */, 18 },
-  /* 5852 */  { MAD_F(0x066fc118) /* 0.402283761 */, 18 },
-  /* 5853 */  { MAD_F(0x06702135) /* 0.402375420 */, 18 },
-  /* 5854 */  { MAD_F(0x06708153) /* 0.402467086 */, 18 },
-  /* 5855 */  { MAD_F(0x0670e173) /* 0.402558756 */, 18 },
-
-  /* 5856 */  { MAD_F(0x06714194) /* 0.402650431 */, 18 },
-  /* 5857 */  { MAD_F(0x0671a1b6) /* 0.402742112 */, 18 },
-  /* 5858 */  { MAD_F(0x067201da) /* 0.402833798 */, 18 },
-  /* 5859 */  { MAD_F(0x067261ff) /* 0.402925489 */, 18 },
-  /* 5860 */  { MAD_F(0x0672c226) /* 0.403017186 */, 18 },
-  /* 5861 */  { MAD_F(0x0673224e) /* 0.403108887 */, 18 },
-  /* 5862 */  { MAD_F(0x06738277) /* 0.403200594 */, 18 },
-  /* 5863 */  { MAD_F(0x0673e2a2) /* 0.403292306 */, 18 },
-  /* 5864 */  { MAD_F(0x067442ce) /* 0.403384024 */, 18 },
-  /* 5865 */  { MAD_F(0x0674a2fc) /* 0.403475746 */, 18 },
-  /* 5866 */  { MAD_F(0x0675032b) /* 0.403567474 */, 18 },
-  /* 5867 */  { MAD_F(0x0675635b) /* 0.403659207 */, 18 },
-  /* 5868 */  { MAD_F(0x0675c38d) /* 0.403750945 */, 18 },
-  /* 5869 */  { MAD_F(0x067623c0) /* 0.403842688 */, 18 },
-  /* 5870 */  { MAD_F(0x067683f4) /* 0.403934437 */, 18 },
-  /* 5871 */  { MAD_F(0x0676e42a) /* 0.404026190 */, 18 },
-
-  /* 5872 */  { MAD_F(0x06774462) /* 0.404117949 */, 18 },
-  /* 5873 */  { MAD_F(0x0677a49b) /* 0.404209714 */, 18 },
-  /* 5874 */  { MAD_F(0x067804d5) /* 0.404301483 */, 18 },
-  /* 5875 */  { MAD_F(0x06786510) /* 0.404393258 */, 18 },
-  /* 5876 */  { MAD_F(0x0678c54d) /* 0.404485037 */, 18 },
-  /* 5877 */  { MAD_F(0x0679258c) /* 0.404576822 */, 18 },
-  /* 5878 */  { MAD_F(0x067985cb) /* 0.404668613 */, 18 },
-  /* 5879 */  { MAD_F(0x0679e60c) /* 0.404760408 */, 18 },
-  /* 5880 */  { MAD_F(0x067a464f) /* 0.404852209 */, 18 },
-  /* 5881 */  { MAD_F(0x067aa693) /* 0.404944014 */, 18 },
-  /* 5882 */  { MAD_F(0x067b06d8) /* 0.405035825 */, 18 },
-  /* 5883 */  { MAD_F(0x067b671f) /* 0.405127642 */, 18 },
-  /* 5884 */  { MAD_F(0x067bc767) /* 0.405219463 */, 18 },
-  /* 5885 */  { MAD_F(0x067c27b1) /* 0.405311290 */, 18 },
-  /* 5886 */  { MAD_F(0x067c87fc) /* 0.405403122 */, 18 },
-  /* 5887 */  { MAD_F(0x067ce848) /* 0.405494959 */, 18 },
-
-  /* 5888 */  { MAD_F(0x067d4896) /* 0.405586801 */, 18 },
-  /* 5889 */  { MAD_F(0x067da8e5) /* 0.405678648 */, 18 },
-  /* 5890 */  { MAD_F(0x067e0935) /* 0.405770501 */, 18 },
-  /* 5891 */  { MAD_F(0x067e6987) /* 0.405862359 */, 18 },
-  /* 5892 */  { MAD_F(0x067ec9da) /* 0.405954222 */, 18 },
-  /* 5893 */  { MAD_F(0x067f2a2f) /* 0.406046090 */, 18 },
-  /* 5894 */  { MAD_F(0x067f8a85) /* 0.406137963 */, 18 },
-  /* 5895 */  { MAD_F(0x067feadd) /* 0.406229842 */, 18 },
-  /* 5896 */  { MAD_F(0x06804b36) /* 0.406321726 */, 18 },
-  /* 5897 */  { MAD_F(0x0680ab90) /* 0.406413615 */, 18 },
-  /* 5898 */  { MAD_F(0x06810beb) /* 0.406505509 */, 18 },
-  /* 5899 */  { MAD_F(0x06816c49) /* 0.406597408 */, 18 },
-  /* 5900 */  { MAD_F(0x0681cca7) /* 0.406689313 */, 18 },
-  /* 5901 */  { MAD_F(0x06822d07) /* 0.406781223 */, 18 },
-  /* 5902 */  { MAD_F(0x06828d68) /* 0.406873138 */, 18 },
-  /* 5903 */  { MAD_F(0x0682edcb) /* 0.406965058 */, 18 },
-
-  /* 5904 */  { MAD_F(0x06834e2f) /* 0.407056983 */, 18 },
-  /* 5905 */  { MAD_F(0x0683ae94) /* 0.407148914 */, 18 },
-  /* 5906 */  { MAD_F(0x06840efb) /* 0.407240850 */, 18 },
-  /* 5907 */  { MAD_F(0x06846f63) /* 0.407332791 */, 18 },
-  /* 5908 */  { MAD_F(0x0684cfcd) /* 0.407424737 */, 18 },
-  /* 5909 */  { MAD_F(0x06853038) /* 0.407516688 */, 18 },
-  /* 5910 */  { MAD_F(0x068590a4) /* 0.407608645 */, 18 },
-  /* 5911 */  { MAD_F(0x0685f112) /* 0.407700606 */, 18 },
-  /* 5912 */  { MAD_F(0x06865181) /* 0.407792573 */, 18 },
-  /* 5913 */  { MAD_F(0x0686b1f2) /* 0.407884545 */, 18 },
-  /* 5914 */  { MAD_F(0x06871264) /* 0.407976522 */, 18 },
-  /* 5915 */  { MAD_F(0x068772d7) /* 0.408068505 */, 18 },
-  /* 5916 */  { MAD_F(0x0687d34c) /* 0.408160492 */, 18 },
-  /* 5917 */  { MAD_F(0x068833c2) /* 0.408252485 */, 18 },
-  /* 5918 */  { MAD_F(0x06889439) /* 0.408344483 */, 18 },
-  /* 5919 */  { MAD_F(0x0688f4b2) /* 0.408436486 */, 18 },
-
-  /* 5920 */  { MAD_F(0x0689552c) /* 0.408528495 */, 18 },
-  /* 5921 */  { MAD_F(0x0689b5a8) /* 0.408620508 */, 18 },
-  /* 5922 */  { MAD_F(0x068a1625) /* 0.408712527 */, 18 },
-  /* 5923 */  { MAD_F(0x068a76a4) /* 0.408804551 */, 18 },
-  /* 5924 */  { MAD_F(0x068ad724) /* 0.408896580 */, 18 },
-  /* 5925 */  { MAD_F(0x068b37a5) /* 0.408988614 */, 18 },
-  /* 5926 */  { MAD_F(0x068b9827) /* 0.409080653 */, 18 },
-  /* 5927 */  { MAD_F(0x068bf8ac) /* 0.409172698 */, 18 },
-  /* 5928 */  { MAD_F(0x068c5931) /* 0.409264748 */, 18 },
-  /* 5929 */  { MAD_F(0x068cb9b8) /* 0.409356803 */, 18 },
-  /* 5930 */  { MAD_F(0x068d1a40) /* 0.409448863 */, 18 },
-  /* 5931 */  { MAD_F(0x068d7aca) /* 0.409540928 */, 18 },
-  /* 5932 */  { MAD_F(0x068ddb54) /* 0.409632999 */, 18 },
-  /* 5933 */  { MAD_F(0x068e3be1) /* 0.409725074 */, 18 },
-  /* 5934 */  { MAD_F(0x068e9c6f) /* 0.409817155 */, 18 },
-  /* 5935 */  { MAD_F(0x068efcfe) /* 0.409909241 */, 18 },
-
-  /* 5936 */  { MAD_F(0x068f5d8e) /* 0.410001332 */, 18 },
-  /* 5937 */  { MAD_F(0x068fbe20) /* 0.410093428 */, 18 },
-  /* 5938 */  { MAD_F(0x06901eb4) /* 0.410185530 */, 18 },
-  /* 5939 */  { MAD_F(0x06907f48) /* 0.410277637 */, 18 },
-  /* 5940 */  { MAD_F(0x0690dfde) /* 0.410369748 */, 18 },
-  /* 5941 */  { MAD_F(0x06914076) /* 0.410461865 */, 18 },
-  /* 5942 */  { MAD_F(0x0691a10f) /* 0.410553988 */, 18 },
-  /* 5943 */  { MAD_F(0x069201a9) /* 0.410646115 */, 18 },
-  /* 5944 */  { MAD_F(0x06926245) /* 0.410738247 */, 18 },
-  /* 5945 */  { MAD_F(0x0692c2e2) /* 0.410830385 */, 18 },
-  /* 5946 */  { MAD_F(0x06932380) /* 0.410922528 */, 18 },
-  /* 5947 */  { MAD_F(0x06938420) /* 0.411014676 */, 18 },
-  /* 5948 */  { MAD_F(0x0693e4c1) /* 0.411106829 */, 18 },
-  /* 5949 */  { MAD_F(0x06944563) /* 0.411198987 */, 18 },
-  /* 5950 */  { MAD_F(0x0694a607) /* 0.411291151 */, 18 },
-  /* 5951 */  { MAD_F(0x069506ad) /* 0.411383320 */, 18 },
-
-  /* 5952 */  { MAD_F(0x06956753) /* 0.411475493 */, 18 },
-  /* 5953 */  { MAD_F(0x0695c7fc) /* 0.411567672 */, 18 },
-  /* 5954 */  { MAD_F(0x069628a5) /* 0.411659857 */, 18 },
-  /* 5955 */  { MAD_F(0x06968950) /* 0.411752046 */, 18 },
-  /* 5956 */  { MAD_F(0x0696e9fc) /* 0.411844240 */, 18 },
-  /* 5957 */  { MAD_F(0x06974aaa) /* 0.411936440 */, 18 },
-  /* 5958 */  { MAD_F(0x0697ab59) /* 0.412028645 */, 18 },
-  /* 5959 */  { MAD_F(0x06980c09) /* 0.412120855 */, 18 },
-  /* 5960 */  { MAD_F(0x06986cbb) /* 0.412213070 */, 18 },
-  /* 5961 */  { MAD_F(0x0698cd6e) /* 0.412305290 */, 18 },
-  /* 5962 */  { MAD_F(0x06992e23) /* 0.412397516 */, 18 },
-  /* 5963 */  { MAD_F(0x06998ed9) /* 0.412489746 */, 18 },
-  /* 5964 */  { MAD_F(0x0699ef90) /* 0.412581982 */, 18 },
-  /* 5965 */  { MAD_F(0x069a5049) /* 0.412674223 */, 18 },
-  /* 5966 */  { MAD_F(0x069ab103) /* 0.412766469 */, 18 },
-  /* 5967 */  { MAD_F(0x069b11bf) /* 0.412858720 */, 18 },
-
-  /* 5968 */  { MAD_F(0x069b727b) /* 0.412950976 */, 18 },
-  /* 5969 */  { MAD_F(0x069bd33a) /* 0.413043238 */, 18 },
-  /* 5970 */  { MAD_F(0x069c33f9) /* 0.413135505 */, 18 },
-  /* 5971 */  { MAD_F(0x069c94ba) /* 0.413227776 */, 18 },
-  /* 5972 */  { MAD_F(0x069cf57d) /* 0.413320053 */, 18 },
-  /* 5973 */  { MAD_F(0x069d5641) /* 0.413412335 */, 18 },
-  /* 5974 */  { MAD_F(0x069db706) /* 0.413504623 */, 18 },
-  /* 5975 */  { MAD_F(0x069e17cc) /* 0.413596915 */, 18 },
-  /* 5976 */  { MAD_F(0x069e7894) /* 0.413689213 */, 18 },
-  /* 5977 */  { MAD_F(0x069ed95e) /* 0.413781515 */, 18 },
-  /* 5978 */  { MAD_F(0x069f3a28) /* 0.413873823 */, 18 },
-  /* 5979 */  { MAD_F(0x069f9af4) /* 0.413966136 */, 18 },
-  /* 5980 */  { MAD_F(0x069ffbc2) /* 0.414058454 */, 18 },
-  /* 5981 */  { MAD_F(0x06a05c91) /* 0.414150778 */, 18 },
-  /* 5982 */  { MAD_F(0x06a0bd61) /* 0.414243106 */, 18 },
-  /* 5983 */  { MAD_F(0x06a11e32) /* 0.414335440 */, 18 },
-
-  /* 5984 */  { MAD_F(0x06a17f05) /* 0.414427779 */, 18 },
-  /* 5985 */  { MAD_F(0x06a1dfda) /* 0.414520122 */, 18 },
-  /* 5986 */  { MAD_F(0x06a240b0) /* 0.414612471 */, 18 },
-  /* 5987 */  { MAD_F(0x06a2a187) /* 0.414704826 */, 18 },
-  /* 5988 */  { MAD_F(0x06a3025f) /* 0.414797185 */, 18 },
-  /* 5989 */  { MAD_F(0x06a36339) /* 0.414889549 */, 18 },
-  /* 5990 */  { MAD_F(0x06a3c414) /* 0.414981919 */, 18 },
-  /* 5991 */  { MAD_F(0x06a424f1) /* 0.415074294 */, 18 },
-  /* 5992 */  { MAD_F(0x06a485cf) /* 0.415166674 */, 18 },
-  /* 5993 */  { MAD_F(0x06a4e6ae) /* 0.415259059 */, 18 },
-  /* 5994 */  { MAD_F(0x06a5478f) /* 0.415351449 */, 18 },
-  /* 5995 */  { MAD_F(0x06a5a871) /* 0.415443844 */, 18 },
-  /* 5996 */  { MAD_F(0x06a60955) /* 0.415536244 */, 18 },
-  /* 5997 */  { MAD_F(0x06a66a3a) /* 0.415628650 */, 18 },
-  /* 5998 */  { MAD_F(0x06a6cb20) /* 0.415721061 */, 18 },
-  /* 5999 */  { MAD_F(0x06a72c08) /* 0.415813476 */, 18 },
-
-  /* 6000 */  { MAD_F(0x06a78cf1) /* 0.415905897 */, 18 },
-  /* 6001 */  { MAD_F(0x06a7eddb) /* 0.415998324 */, 18 },
-  /* 6002 */  { MAD_F(0x06a84ec7) /* 0.416090755 */, 18 },
-  /* 6003 */  { MAD_F(0x06a8afb4) /* 0.416183191 */, 18 },
-  /* 6004 */  { MAD_F(0x06a910a3) /* 0.416275633 */, 18 },
-  /* 6005 */  { MAD_F(0x06a97193) /* 0.416368079 */, 18 },
-  /* 6006 */  { MAD_F(0x06a9d284) /* 0.416460531 */, 18 },
-  /* 6007 */  { MAD_F(0x06aa3377) /* 0.416552988 */, 18 },
-  /* 6008 */  { MAD_F(0x06aa946b) /* 0.416645450 */, 18 },
-  /* 6009 */  { MAD_F(0x06aaf561) /* 0.416737917 */, 18 },
-  /* 6010 */  { MAD_F(0x06ab5657) /* 0.416830389 */, 18 },
-  /* 6011 */  { MAD_F(0x06abb750) /* 0.416922867 */, 18 },
-  /* 6012 */  { MAD_F(0x06ac1849) /* 0.417015349 */, 18 },
-  /* 6013 */  { MAD_F(0x06ac7944) /* 0.417107837 */, 18 },
-  /* 6014 */  { MAD_F(0x06acda41) /* 0.417200330 */, 18 },
-  /* 6015 */  { MAD_F(0x06ad3b3e) /* 0.417292828 */, 18 },
-
-  /* 6016 */  { MAD_F(0x06ad9c3d) /* 0.417385331 */, 18 },
-  /* 6017 */  { MAD_F(0x06adfd3e) /* 0.417477839 */, 18 },
-  /* 6018 */  { MAD_F(0x06ae5e40) /* 0.417570352 */, 18 },
-  /* 6019 */  { MAD_F(0x06aebf43) /* 0.417662871 */, 18 },
-  /* 6020 */  { MAD_F(0x06af2047) /* 0.417755394 */, 18 },
-  /* 6021 */  { MAD_F(0x06af814d) /* 0.417847923 */, 18 },
-  /* 6022 */  { MAD_F(0x06afe255) /* 0.417940457 */, 18 },
-  /* 6023 */  { MAD_F(0x06b0435e) /* 0.418032996 */, 18 },
-  /* 6024 */  { MAD_F(0x06b0a468) /* 0.418125540 */, 18 },
-  /* 6025 */  { MAD_F(0x06b10573) /* 0.418218089 */, 18 },
-  /* 6026 */  { MAD_F(0x06b16680) /* 0.418310643 */, 18 },
-  /* 6027 */  { MAD_F(0x06b1c78e) /* 0.418403203 */, 18 },
-  /* 6028 */  { MAD_F(0x06b2289e) /* 0.418495767 */, 18 },
-  /* 6029 */  { MAD_F(0x06b289af) /* 0.418588337 */, 18 },
-  /* 6030 */  { MAD_F(0x06b2eac1) /* 0.418680911 */, 18 },
-  /* 6031 */  { MAD_F(0x06b34bd5) /* 0.418773491 */, 18 },
-
-  /* 6032 */  { MAD_F(0x06b3acea) /* 0.418866076 */, 18 },
-  /* 6033 */  { MAD_F(0x06b40e00) /* 0.418958666 */, 18 },
-  /* 6034 */  { MAD_F(0x06b46f18) /* 0.419051262 */, 18 },
-  /* 6035 */  { MAD_F(0x06b4d031) /* 0.419143862 */, 18 },
-  /* 6036 */  { MAD_F(0x06b5314c) /* 0.419236467 */, 18 },
-  /* 6037 */  { MAD_F(0x06b59268) /* 0.419329078 */, 18 },
-  /* 6038 */  { MAD_F(0x06b5f385) /* 0.419421694 */, 18 },
-  /* 6039 */  { MAD_F(0x06b654a4) /* 0.419514314 */, 18 },
-  /* 6040 */  { MAD_F(0x06b6b5c4) /* 0.419606940 */, 18 },
-  /* 6041 */  { MAD_F(0x06b716e6) /* 0.419699571 */, 18 },
-  /* 6042 */  { MAD_F(0x06b77808) /* 0.419792208 */, 18 },
-  /* 6043 */  { MAD_F(0x06b7d92d) /* 0.419884849 */, 18 },
-  /* 6044 */  { MAD_F(0x06b83a52) /* 0.419977495 */, 18 },
-  /* 6045 */  { MAD_F(0x06b89b79) /* 0.420070147 */, 18 },
-  /* 6046 */  { MAD_F(0x06b8fca1) /* 0.420162803 */, 18 },
-  /* 6047 */  { MAD_F(0x06b95dcb) /* 0.420255465 */, 18 },
-
-  /* 6048 */  { MAD_F(0x06b9bef6) /* 0.420348132 */, 18 },
-  /* 6049 */  { MAD_F(0x06ba2023) /* 0.420440803 */, 18 },
-  /* 6050 */  { MAD_F(0x06ba8150) /* 0.420533481 */, 18 },
-  /* 6051 */  { MAD_F(0x06bae280) /* 0.420626163 */, 18 },
-  /* 6052 */  { MAD_F(0x06bb43b0) /* 0.420718850 */, 18 },
-  /* 6053 */  { MAD_F(0x06bba4e2) /* 0.420811542 */, 18 },
-  /* 6054 */  { MAD_F(0x06bc0615) /* 0.420904240 */, 18 },
-  /* 6055 */  { MAD_F(0x06bc674a) /* 0.420996942 */, 18 },
-  /* 6056 */  { MAD_F(0x06bcc880) /* 0.421089650 */, 18 },
-  /* 6057 */  { MAD_F(0x06bd29b7) /* 0.421182362 */, 18 },
-  /* 6058 */  { MAD_F(0x06bd8af0) /* 0.421275080 */, 18 },
-  /* 6059 */  { MAD_F(0x06bdec2a) /* 0.421367803 */, 18 },
-  /* 6060 */  { MAD_F(0x06be4d66) /* 0.421460531 */, 18 },
-  /* 6061 */  { MAD_F(0x06beaea3) /* 0.421553264 */, 18 },
-  /* 6062 */  { MAD_F(0x06bf0fe1) /* 0.421646003 */, 18 },
-  /* 6063 */  { MAD_F(0x06bf7120) /* 0.421738746 */, 18 },
-
-  /* 6064 */  { MAD_F(0x06bfd261) /* 0.421831494 */, 18 },
-  /* 6065 */  { MAD_F(0x06c033a4) /* 0.421924248 */, 18 },
-  /* 6066 */  { MAD_F(0x06c094e7) /* 0.422017007 */, 18 },
-  /* 6067 */  { MAD_F(0x06c0f62c) /* 0.422109770 */, 18 },
-  /* 6068 */  { MAD_F(0x06c15773) /* 0.422202539 */, 18 },
-  /* 6069 */  { MAD_F(0x06c1b8bb) /* 0.422295313 */, 18 },
-  /* 6070 */  { MAD_F(0x06c21a04) /* 0.422388092 */, 18 },
-  /* 6071 */  { MAD_F(0x06c27b4e) /* 0.422480876 */, 18 },
-  /* 6072 */  { MAD_F(0x06c2dc9a) /* 0.422573665 */, 18 },
-  /* 6073 */  { MAD_F(0x06c33de8) /* 0.422666460 */, 18 },
-  /* 6074 */  { MAD_F(0x06c39f36) /* 0.422759259 */, 18 },
-  /* 6075 */  { MAD_F(0x06c40086) /* 0.422852064 */, 18 },
-  /* 6076 */  { MAD_F(0x06c461d8) /* 0.422944873 */, 18 },
-  /* 6077 */  { MAD_F(0x06c4c32a) /* 0.423037688 */, 18 },
-  /* 6078 */  { MAD_F(0x06c5247f) /* 0.423130508 */, 18 },
-  /* 6079 */  { MAD_F(0x06c585d4) /* 0.423223333 */, 18 },
-
-  /* 6080 */  { MAD_F(0x06c5e72b) /* 0.423316162 */, 18 },
-  /* 6081 */  { MAD_F(0x06c64883) /* 0.423408997 */, 18 },
-  /* 6082 */  { MAD_F(0x06c6a9dd) /* 0.423501838 */, 18 },
-  /* 6083 */  { MAD_F(0x06c70b38) /* 0.423594683 */, 18 },
-  /* 6084 */  { MAD_F(0x06c76c94) /* 0.423687533 */, 18 },
-  /* 6085 */  { MAD_F(0x06c7cdf2) /* 0.423780389 */, 18 },
-  /* 6086 */  { MAD_F(0x06c82f51) /* 0.423873249 */, 18 },
-  /* 6087 */  { MAD_F(0x06c890b1) /* 0.423966115 */, 18 },
-  /* 6088 */  { MAD_F(0x06c8f213) /* 0.424058985 */, 18 },
-  /* 6089 */  { MAD_F(0x06c95376) /* 0.424151861 */, 18 },
-  /* 6090 */  { MAD_F(0x06c9b4da) /* 0.424244742 */, 18 },
-  /* 6091 */  { MAD_F(0x06ca1640) /* 0.424337628 */, 18 },
-  /* 6092 */  { MAD_F(0x06ca77a8) /* 0.424430519 */, 18 },
-  /* 6093 */  { MAD_F(0x06cad910) /* 0.424523415 */, 18 },
-  /* 6094 */  { MAD_F(0x06cb3a7a) /* 0.424616316 */, 18 },
-  /* 6095 */  { MAD_F(0x06cb9be5) /* 0.424709222 */, 18 },
-
-  /* 6096 */  { MAD_F(0x06cbfd52) /* 0.424802133 */, 18 },
-  /* 6097 */  { MAD_F(0x06cc5ec0) /* 0.424895050 */, 18 },
-  /* 6098 */  { MAD_F(0x06ccc030) /* 0.424987971 */, 18 },
-  /* 6099 */  { MAD_F(0x06cd21a0) /* 0.425080898 */, 18 },
-  /* 6100 */  { MAD_F(0x06cd8313) /* 0.425173829 */, 18 },
-  /* 6101 */  { MAD_F(0x06cde486) /* 0.425266766 */, 18 },
-  /* 6102 */  { MAD_F(0x06ce45fb) /* 0.425359708 */, 18 },
-  /* 6103 */  { MAD_F(0x06cea771) /* 0.425452655 */, 18 },
-  /* 6104 */  { MAD_F(0x06cf08e9) /* 0.425545607 */, 18 },
-  /* 6105 */  { MAD_F(0x06cf6a62) /* 0.425638564 */, 18 },
-  /* 6106 */  { MAD_F(0x06cfcbdc) /* 0.425731526 */, 18 },
-  /* 6107 */  { MAD_F(0x06d02d58) /* 0.425824493 */, 18 },
-  /* 6108 */  { MAD_F(0x06d08ed5) /* 0.425917465 */, 18 },
-  /* 6109 */  { MAD_F(0x06d0f053) /* 0.426010443 */, 18 },
-  /* 6110 */  { MAD_F(0x06d151d3) /* 0.426103425 */, 18 },
-  /* 6111 */  { MAD_F(0x06d1b354) /* 0.426196412 */, 18 },
-
-  /* 6112 */  { MAD_F(0x06d214d7) /* 0.426289405 */, 18 },
-  /* 6113 */  { MAD_F(0x06d2765a) /* 0.426382403 */, 18 },
-  /* 6114 */  { MAD_F(0x06d2d7e0) /* 0.426475405 */, 18 },
-  /* 6115 */  { MAD_F(0x06d33966) /* 0.426568413 */, 18 },
-  /* 6116 */  { MAD_F(0x06d39aee) /* 0.426661426 */, 18 },
-  /* 6117 */  { MAD_F(0x06d3fc77) /* 0.426754444 */, 18 },
-  /* 6118 */  { MAD_F(0x06d45e02) /* 0.426847467 */, 18 },
-  /* 6119 */  { MAD_F(0x06d4bf8e) /* 0.426940495 */, 18 },
-  /* 6120 */  { MAD_F(0x06d5211c) /* 0.427033528 */, 18 },
-  /* 6121 */  { MAD_F(0x06d582aa) /* 0.427126566 */, 18 },
-  /* 6122 */  { MAD_F(0x06d5e43a) /* 0.427219609 */, 18 },
-  /* 6123 */  { MAD_F(0x06d645cc) /* 0.427312657 */, 18 },
-  /* 6124 */  { MAD_F(0x06d6a75f) /* 0.427405711 */, 18 },
-  /* 6125 */  { MAD_F(0x06d708f3) /* 0.427498769 */, 18 },
-  /* 6126 */  { MAD_F(0x06d76a88) /* 0.427591833 */, 18 },
-  /* 6127 */  { MAD_F(0x06d7cc1f) /* 0.427684901 */, 18 },
-
-  /* 6128 */  { MAD_F(0x06d82db8) /* 0.427777975 */, 18 },
-  /* 6129 */  { MAD_F(0x06d88f51) /* 0.427871054 */, 18 },
-  /* 6130 */  { MAD_F(0x06d8f0ec) /* 0.427964137 */, 18 },
-  /* 6131 */  { MAD_F(0x06d95288) /* 0.428057226 */, 18 },
-  /* 6132 */  { MAD_F(0x06d9b426) /* 0.428150320 */, 18 },
-  /* 6133 */  { MAD_F(0x06da15c5) /* 0.428243419 */, 18 },
-  /* 6134 */  { MAD_F(0x06da7766) /* 0.428336523 */, 18 },
-  /* 6135 */  { MAD_F(0x06dad907) /* 0.428429632 */, 18 },
-  /* 6136 */  { MAD_F(0x06db3aaa) /* 0.428522746 */, 18 },
-  /* 6137 */  { MAD_F(0x06db9c4f) /* 0.428615865 */, 18 },
-  /* 6138 */  { MAD_F(0x06dbfdf5) /* 0.428708989 */, 18 },
-  /* 6139 */  { MAD_F(0x06dc5f9c) /* 0.428802119 */, 18 },
-  /* 6140 */  { MAD_F(0x06dcc145) /* 0.428895253 */, 18 },
-  /* 6141 */  { MAD_F(0x06dd22ee) /* 0.428988392 */, 18 },
-  /* 6142 */  { MAD_F(0x06dd849a) /* 0.429081537 */, 18 },
-  /* 6143 */  { MAD_F(0x06dde646) /* 0.429174686 */, 18 },
-
-  /* 6144 */  { MAD_F(0x06de47f4) /* 0.429267841 */, 18 },
-  /* 6145 */  { MAD_F(0x06dea9a4) /* 0.429361001 */, 18 },
-  /* 6146 */  { MAD_F(0x06df0b54) /* 0.429454165 */, 18 },
-  /* 6147 */  { MAD_F(0x06df6d06) /* 0.429547335 */, 18 },
-  /* 6148 */  { MAD_F(0x06dfceba) /* 0.429640510 */, 18 },
-  /* 6149 */  { MAD_F(0x06e0306f) /* 0.429733690 */, 18 },
-  /* 6150 */  { MAD_F(0x06e09225) /* 0.429826874 */, 18 },
-  /* 6151 */  { MAD_F(0x06e0f3dc) /* 0.429920064 */, 18 },
-  /* 6152 */  { MAD_F(0x06e15595) /* 0.430013259 */, 18 },
-  /* 6153 */  { MAD_F(0x06e1b74f) /* 0.430106459 */, 18 },
-  /* 6154 */  { MAD_F(0x06e2190b) /* 0.430199664 */, 18 },
-  /* 6155 */  { MAD_F(0x06e27ac8) /* 0.430292875 */, 18 },
-  /* 6156 */  { MAD_F(0x06e2dc86) /* 0.430386090 */, 18 },
-  /* 6157 */  { MAD_F(0x06e33e46) /* 0.430479310 */, 18 },
-  /* 6158 */  { MAD_F(0x06e3a007) /* 0.430572535 */, 18 },
-  /* 6159 */  { MAD_F(0x06e401c9) /* 0.430665765 */, 18 },
-
-  /* 6160 */  { MAD_F(0x06e4638d) /* 0.430759001 */, 18 },
-  /* 6161 */  { MAD_F(0x06e4c552) /* 0.430852241 */, 18 },
-  /* 6162 */  { MAD_F(0x06e52718) /* 0.430945487 */, 18 },
-  /* 6163 */  { MAD_F(0x06e588e0) /* 0.431038737 */, 18 },
-  /* 6164 */  { MAD_F(0x06e5eaa9) /* 0.431131993 */, 18 },
-  /* 6165 */  { MAD_F(0x06e64c73) /* 0.431225253 */, 18 },
-  /* 6166 */  { MAD_F(0x06e6ae3f) /* 0.431318519 */, 18 },
-  /* 6167 */  { MAD_F(0x06e7100c) /* 0.431411790 */, 18 },
-  /* 6168 */  { MAD_F(0x06e771db) /* 0.431505065 */, 18 },
-  /* 6169 */  { MAD_F(0x06e7d3ab) /* 0.431598346 */, 18 },
-  /* 6170 */  { MAD_F(0x06e8357c) /* 0.431691632 */, 18 },
-  /* 6171 */  { MAD_F(0x06e8974e) /* 0.431784923 */, 18 },
-  /* 6172 */  { MAD_F(0x06e8f922) /* 0.431878218 */, 18 },
-  /* 6173 */  { MAD_F(0x06e95af8) /* 0.431971519 */, 18 },
-  /* 6174 */  { MAD_F(0x06e9bcce) /* 0.432064825 */, 18 },
-  /* 6175 */  { MAD_F(0x06ea1ea6) /* 0.432158136 */, 18 },
-
-  /* 6176 */  { MAD_F(0x06ea807f) /* 0.432251452 */, 18 },
-  /* 6177 */  { MAD_F(0x06eae25a) /* 0.432344773 */, 18 },
-  /* 6178 */  { MAD_F(0x06eb4436) /* 0.432438099 */, 18 },
-  /* 6179 */  { MAD_F(0x06eba614) /* 0.432531431 */, 18 },
-  /* 6180 */  { MAD_F(0x06ec07f2) /* 0.432624767 */, 18 },
-  /* 6181 */  { MAD_F(0x06ec69d2) /* 0.432718108 */, 18 },
-  /* 6182 */  { MAD_F(0x06eccbb4) /* 0.432811454 */, 18 },
-  /* 6183 */  { MAD_F(0x06ed2d97) /* 0.432904805 */, 18 },
-  /* 6184 */  { MAD_F(0x06ed8f7b) /* 0.432998162 */, 18 },
-  /* 6185 */  { MAD_F(0x06edf160) /* 0.433091523 */, 18 },
-  /* 6186 */  { MAD_F(0x06ee5347) /* 0.433184889 */, 18 },
-  /* 6187 */  { MAD_F(0x06eeb52f) /* 0.433278261 */, 18 },
-  /* 6188 */  { MAD_F(0x06ef1719) /* 0.433371637 */, 18 },
-  /* 6189 */  { MAD_F(0x06ef7904) /* 0.433465019 */, 18 },
-  /* 6190 */  { MAD_F(0x06efdaf0) /* 0.433558405 */, 18 },
-  /* 6191 */  { MAD_F(0x06f03cde) /* 0.433651797 */, 18 },
-
-  /* 6192 */  { MAD_F(0x06f09ecc) /* 0.433745193 */, 18 },
-  /* 6193 */  { MAD_F(0x06f100bd) /* 0.433838595 */, 18 },
-  /* 6194 */  { MAD_F(0x06f162ae) /* 0.433932001 */, 18 },
-  /* 6195 */  { MAD_F(0x06f1c4a1) /* 0.434025413 */, 18 },
-  /* 6196 */  { MAD_F(0x06f22696) /* 0.434118830 */, 18 },
-  /* 6197 */  { MAD_F(0x06f2888b) /* 0.434212251 */, 18 },
-  /* 6198 */  { MAD_F(0x06f2ea82) /* 0.434305678 */, 18 },
-  /* 6199 */  { MAD_F(0x06f34c7b) /* 0.434399110 */, 18 },
-  /* 6200 */  { MAD_F(0x06f3ae75) /* 0.434492546 */, 18 },
-  /* 6201 */  { MAD_F(0x06f41070) /* 0.434585988 */, 18 },
-  /* 6202 */  { MAD_F(0x06f4726c) /* 0.434679435 */, 18 },
-  /* 6203 */  { MAD_F(0x06f4d46a) /* 0.434772887 */, 18 },
-  /* 6204 */  { MAD_F(0x06f53669) /* 0.434866344 */, 18 },
-  /* 6205 */  { MAD_F(0x06f59869) /* 0.434959806 */, 18 },
-  /* 6206 */  { MAD_F(0x06f5fa6b) /* 0.435053272 */, 18 },
-  /* 6207 */  { MAD_F(0x06f65c6e) /* 0.435146744 */, 18 },
-
-  /* 6208 */  { MAD_F(0x06f6be73) /* 0.435240221 */, 18 },
-  /* 6209 */  { MAD_F(0x06f72079) /* 0.435333703 */, 18 },
-  /* 6210 */  { MAD_F(0x06f78280) /* 0.435427190 */, 18 },
-  /* 6211 */  { MAD_F(0x06f7e489) /* 0.435520682 */, 18 },
-  /* 6212 */  { MAD_F(0x06f84693) /* 0.435614179 */, 18 },
-  /* 6213 */  { MAD_F(0x06f8a89e) /* 0.435707681 */, 18 },
-  /* 6214 */  { MAD_F(0x06f90aaa) /* 0.435801188 */, 18 },
-  /* 6215 */  { MAD_F(0x06f96cb8) /* 0.435894700 */, 18 },
-  /* 6216 */  { MAD_F(0x06f9cec8) /* 0.435988217 */, 18 },
-  /* 6217 */  { MAD_F(0x06fa30d8) /* 0.436081739 */, 18 },
-  /* 6218 */  { MAD_F(0x06fa92ea) /* 0.436175266 */, 18 },
-  /* 6219 */  { MAD_F(0x06faf4fe) /* 0.436268799 */, 18 },
-  /* 6220 */  { MAD_F(0x06fb5712) /* 0.436362336 */, 18 },
-  /* 6221 */  { MAD_F(0x06fbb928) /* 0.436455878 */, 18 },
-  /* 6222 */  { MAD_F(0x06fc1b40) /* 0.436549425 */, 18 },
-  /* 6223 */  { MAD_F(0x06fc7d58) /* 0.436642977 */, 18 },
-
-  /* 6224 */  { MAD_F(0x06fcdf72) /* 0.436736534 */, 18 },
-  /* 6225 */  { MAD_F(0x06fd418e) /* 0.436830096 */, 18 },
-  /* 6226 */  { MAD_F(0x06fda3ab) /* 0.436923664 */, 18 },
-  /* 6227 */  { MAD_F(0x06fe05c9) /* 0.437017236 */, 18 },
-  /* 6228 */  { MAD_F(0x06fe67e8) /* 0.437110813 */, 18 },
-  /* 6229 */  { MAD_F(0x06feca09) /* 0.437204395 */, 18 },
-  /* 6230 */  { MAD_F(0x06ff2c2b) /* 0.437297982 */, 18 },
-  /* 6231 */  { MAD_F(0x06ff8e4f) /* 0.437391575 */, 18 },
-  /* 6232 */  { MAD_F(0x06fff073) /* 0.437485172 */, 18 },
-  /* 6233 */  { MAD_F(0x0700529a) /* 0.437578774 */, 18 },
-  /* 6234 */  { MAD_F(0x0700b4c1) /* 0.437672381 */, 18 },
-  /* 6235 */  { MAD_F(0x070116ea) /* 0.437765994 */, 18 },
-  /* 6236 */  { MAD_F(0x07017914) /* 0.437859611 */, 18 },
-  /* 6237 */  { MAD_F(0x0701db40) /* 0.437953233 */, 18 },
-  /* 6238 */  { MAD_F(0x07023d6c) /* 0.438046860 */, 18 },
-  /* 6239 */  { MAD_F(0x07029f9b) /* 0.438140493 */, 18 },
-
-  /* 6240 */  { MAD_F(0x070301ca) /* 0.438234130 */, 18 },
-  /* 6241 */  { MAD_F(0x070363fb) /* 0.438327772 */, 18 },
-  /* 6242 */  { MAD_F(0x0703c62d) /* 0.438421419 */, 18 },
-  /* 6243 */  { MAD_F(0x07042861) /* 0.438515072 */, 18 },
-  /* 6244 */  { MAD_F(0x07048a96) /* 0.438608729 */, 18 },
-  /* 6245 */  { MAD_F(0x0704eccc) /* 0.438702391 */, 18 },
-  /* 6246 */  { MAD_F(0x07054f04) /* 0.438796059 */, 18 },
-  /* 6247 */  { MAD_F(0x0705b13d) /* 0.438889731 */, 18 },
-  /* 6248 */  { MAD_F(0x07061377) /* 0.438983408 */, 18 },
-  /* 6249 */  { MAD_F(0x070675b3) /* 0.439077090 */, 18 },
-  /* 6250 */  { MAD_F(0x0706d7f0) /* 0.439170778 */, 18 },
-  /* 6251 */  { MAD_F(0x07073a2e) /* 0.439264470 */, 18 },
-  /* 6252 */  { MAD_F(0x07079c6e) /* 0.439358167 */, 18 },
-  /* 6253 */  { MAD_F(0x0707feaf) /* 0.439451869 */, 18 },
-  /* 6254 */  { MAD_F(0x070860f1) /* 0.439545577 */, 18 },
-  /* 6255 */  { MAD_F(0x0708c335) /* 0.439639289 */, 18 },
-
-  /* 6256 */  { MAD_F(0x0709257a) /* 0.439733006 */, 18 },
-  /* 6257 */  { MAD_F(0x070987c0) /* 0.439826728 */, 18 },
-  /* 6258 */  { MAD_F(0x0709ea08) /* 0.439920456 */, 18 },
-  /* 6259 */  { MAD_F(0x070a4c51) /* 0.440014188 */, 18 },
-  /* 6260 */  { MAD_F(0x070aae9b) /* 0.440107925 */, 18 },
-  /* 6261 */  { MAD_F(0x070b10e7) /* 0.440201667 */, 18 },
-  /* 6262 */  { MAD_F(0x070b7334) /* 0.440295414 */, 18 },
-  /* 6263 */  { MAD_F(0x070bd583) /* 0.440389167 */, 18 },
-  /* 6264 */  { MAD_F(0x070c37d2) /* 0.440482924 */, 18 },
-  /* 6265 */  { MAD_F(0x070c9a23) /* 0.440576686 */, 18 },
-  /* 6266 */  { MAD_F(0x070cfc76) /* 0.440670453 */, 18 },
-  /* 6267 */  { MAD_F(0x070d5eca) /* 0.440764225 */, 18 },
-  /* 6268 */  { MAD_F(0x070dc11f) /* 0.440858002 */, 18 },
-  /* 6269 */  { MAD_F(0x070e2375) /* 0.440951784 */, 18 },
-  /* 6270 */  { MAD_F(0x070e85cd) /* 0.441045572 */, 18 },
-  /* 6271 */  { MAD_F(0x070ee826) /* 0.441139364 */, 18 },
-
-  /* 6272 */  { MAD_F(0x070f4a80) /* 0.441233161 */, 18 },
-  /* 6273 */  { MAD_F(0x070facdc) /* 0.441326963 */, 18 },
-  /* 6274 */  { MAD_F(0x07100f39) /* 0.441420770 */, 18 },
-  /* 6275 */  { MAD_F(0x07107198) /* 0.441514582 */, 18 },
-  /* 6276 */  { MAD_F(0x0710d3f8) /* 0.441608399 */, 18 },
-  /* 6277 */  { MAD_F(0x07113659) /* 0.441702221 */, 18 },
-  /* 6278 */  { MAD_F(0x071198bb) /* 0.441796048 */, 18 },
-  /* 6279 */  { MAD_F(0x0711fb1f) /* 0.441889880 */, 18 },
-  /* 6280 */  { MAD_F(0x07125d84) /* 0.441983717 */, 18 },
-  /* 6281 */  { MAD_F(0x0712bfeb) /* 0.442077559 */, 18 },
-  /* 6282 */  { MAD_F(0x07132253) /* 0.442171406 */, 18 },
-  /* 6283 */  { MAD_F(0x071384bc) /* 0.442265257 */, 18 },
-  /* 6284 */  { MAD_F(0x0713e726) /* 0.442359114 */, 18 },
-  /* 6285 */  { MAD_F(0x07144992) /* 0.442452976 */, 18 },
-  /* 6286 */  { MAD_F(0x0714abff) /* 0.442546843 */, 18 },
-  /* 6287 */  { MAD_F(0x07150e6e) /* 0.442640715 */, 18 },
-
-  /* 6288 */  { MAD_F(0x071570de) /* 0.442734592 */, 18 },
-  /* 6289 */  { MAD_F(0x0715d34f) /* 0.442828473 */, 18 },
-  /* 6290 */  { MAD_F(0x071635c1) /* 0.442922360 */, 18 },
-  /* 6291 */  { MAD_F(0x07169835) /* 0.443016252 */, 18 },
-  /* 6292 */  { MAD_F(0x0716faaa) /* 0.443110148 */, 18 },
-  /* 6293 */  { MAD_F(0x07175d21) /* 0.443204050 */, 18 },
-  /* 6294 */  { MAD_F(0x0717bf99) /* 0.443297957 */, 18 },
-  /* 6295 */  { MAD_F(0x07182212) /* 0.443391868 */, 18 },
-  /* 6296 */  { MAD_F(0x0718848d) /* 0.443485785 */, 18 },
-  /* 6297 */  { MAD_F(0x0718e709) /* 0.443579706 */, 18 },
-  /* 6298 */  { MAD_F(0x07194986) /* 0.443673633 */, 18 },
-  /* 6299 */  { MAD_F(0x0719ac04) /* 0.443767564 */, 18 },
-  /* 6300 */  { MAD_F(0x071a0e84) /* 0.443861501 */, 18 },
-  /* 6301 */  { MAD_F(0x071a7105) /* 0.443955442 */, 18 },
-  /* 6302 */  { MAD_F(0x071ad388) /* 0.444049389 */, 18 },
-  /* 6303 */  { MAD_F(0x071b360c) /* 0.444143340 */, 18 },
-
-  /* 6304 */  { MAD_F(0x071b9891) /* 0.444237296 */, 18 },
-  /* 6305 */  { MAD_F(0x071bfb18) /* 0.444331258 */, 18 },
-  /* 6306 */  { MAD_F(0x071c5d9f) /* 0.444425224 */, 18 },
-  /* 6307 */  { MAD_F(0x071cc029) /* 0.444519195 */, 18 },
-  /* 6308 */  { MAD_F(0x071d22b3) /* 0.444613171 */, 18 },
-  /* 6309 */  { MAD_F(0x071d853f) /* 0.444707153 */, 18 },
-  /* 6310 */  { MAD_F(0x071de7cc) /* 0.444801139 */, 18 },
-  /* 6311 */  { MAD_F(0x071e4a5b) /* 0.444895130 */, 18 },
-  /* 6312 */  { MAD_F(0x071eaceb) /* 0.444989126 */, 18 },
-  /* 6313 */  { MAD_F(0x071f0f7c) /* 0.445083127 */, 18 },
-  /* 6314 */  { MAD_F(0x071f720e) /* 0.445177133 */, 18 },
-  /* 6315 */  { MAD_F(0x071fd4a2) /* 0.445271144 */, 18 },
-  /* 6316 */  { MAD_F(0x07203737) /* 0.445365160 */, 18 },
-  /* 6317 */  { MAD_F(0x072099ce) /* 0.445459181 */, 18 },
-  /* 6318 */  { MAD_F(0x0720fc66) /* 0.445553206 */, 18 },
-  /* 6319 */  { MAD_F(0x07215eff) /* 0.445647237 */, 18 },
-
-  /* 6320 */  { MAD_F(0x0721c19a) /* 0.445741273 */, 18 },
-  /* 6321 */  { MAD_F(0x07222436) /* 0.445835314 */, 18 },
-  /* 6322 */  { MAD_F(0x072286d3) /* 0.445929359 */, 18 },
-  /* 6323 */  { MAD_F(0x0722e971) /* 0.446023410 */, 18 },
-  /* 6324 */  { MAD_F(0x07234c11) /* 0.446117466 */, 18 },
-  /* 6325 */  { MAD_F(0x0723aeb2) /* 0.446211526 */, 18 },
-  /* 6326 */  { MAD_F(0x07241155) /* 0.446305592 */, 18 },
-  /* 6327 */  { MAD_F(0x072473f9) /* 0.446399662 */, 18 },
-  /* 6328 */  { MAD_F(0x0724d69e) /* 0.446493738 */, 18 },
-  /* 6329 */  { MAD_F(0x07253944) /* 0.446587818 */, 18 },
-  /* 6330 */  { MAD_F(0x07259bec) /* 0.446681903 */, 18 },
-  /* 6331 */  { MAD_F(0x0725fe95) /* 0.446775994 */, 18 },
-  /* 6332 */  { MAD_F(0x07266140) /* 0.446870089 */, 18 },
-  /* 6333 */  { MAD_F(0x0726c3ec) /* 0.446964189 */, 18 },
-  /* 6334 */  { MAD_F(0x07272699) /* 0.447058294 */, 18 },
-  /* 6335 */  { MAD_F(0x07278947) /* 0.447152404 */, 18 },
-
-  /* 6336 */  { MAD_F(0x0727ebf7) /* 0.447246519 */, 18 },
-  /* 6337 */  { MAD_F(0x07284ea8) /* 0.447340639 */, 18 },
-  /* 6338 */  { MAD_F(0x0728b15b) /* 0.447434764 */, 18 },
-  /* 6339 */  { MAD_F(0x0729140f) /* 0.447528894 */, 18 },
-  /* 6340 */  { MAD_F(0x072976c4) /* 0.447623029 */, 18 },
-  /* 6341 */  { MAD_F(0x0729d97a) /* 0.447717169 */, 18 },
-  /* 6342 */  { MAD_F(0x072a3c32) /* 0.447811314 */, 18 },
-  /* 6343 */  { MAD_F(0x072a9eeb) /* 0.447905463 */, 18 },
-  /* 6344 */  { MAD_F(0x072b01a6) /* 0.447999618 */, 18 },
-  /* 6345 */  { MAD_F(0x072b6461) /* 0.448093778 */, 18 },
-  /* 6346 */  { MAD_F(0x072bc71e) /* 0.448187942 */, 18 },
-  /* 6347 */  { MAD_F(0x072c29dd) /* 0.448282112 */, 18 },
-  /* 6348 */  { MAD_F(0x072c8c9d) /* 0.448376286 */, 18 },
-  /* 6349 */  { MAD_F(0x072cef5e) /* 0.448470466 */, 18 },
-  /* 6350 */  { MAD_F(0x072d5220) /* 0.448564650 */, 18 },
-  /* 6351 */  { MAD_F(0x072db4e4) /* 0.448658839 */, 18 },
-
-  /* 6352 */  { MAD_F(0x072e17a9) /* 0.448753033 */, 18 },
-  /* 6353 */  { MAD_F(0x072e7a6f) /* 0.448847233 */, 18 },
-  /* 6354 */  { MAD_F(0x072edd37) /* 0.448941437 */, 18 },
-  /* 6355 */  { MAD_F(0x072f4000) /* 0.449035646 */, 18 },
-  /* 6356 */  { MAD_F(0x072fa2ca) /* 0.449129860 */, 18 },
-  /* 6357 */  { MAD_F(0x07300596) /* 0.449224079 */, 18 },
-  /* 6358 */  { MAD_F(0x07306863) /* 0.449318303 */, 18 },
-  /* 6359 */  { MAD_F(0x0730cb32) /* 0.449412531 */, 18 },
-  /* 6360 */  { MAD_F(0x07312e01) /* 0.449506765 */, 18 },
-  /* 6361 */  { MAD_F(0x073190d2) /* 0.449601004 */, 18 },
-  /* 6362 */  { MAD_F(0x0731f3a5) /* 0.449695247 */, 18 },
-  /* 6363 */  { MAD_F(0x07325678) /* 0.449789496 */, 18 },
-  /* 6364 */  { MAD_F(0x0732b94d) /* 0.449883749 */, 18 },
-  /* 6365 */  { MAD_F(0x07331c23) /* 0.449978008 */, 18 },
-  /* 6366 */  { MAD_F(0x07337efb) /* 0.450072271 */, 18 },
-  /* 6367 */  { MAD_F(0x0733e1d4) /* 0.450166540 */, 18 },
-
-  /* 6368 */  { MAD_F(0x073444ae) /* 0.450260813 */, 18 },
-  /* 6369 */  { MAD_F(0x0734a78a) /* 0.450355091 */, 18 },
-  /* 6370 */  { MAD_F(0x07350a67) /* 0.450449374 */, 18 },
-  /* 6371 */  { MAD_F(0x07356d45) /* 0.450543662 */, 18 },
-  /* 6372 */  { MAD_F(0x0735d025) /* 0.450637955 */, 18 },
-  /* 6373 */  { MAD_F(0x07363306) /* 0.450732253 */, 18 },
-  /* 6374 */  { MAD_F(0x073695e8) /* 0.450826556 */, 18 },
-  /* 6375 */  { MAD_F(0x0736f8cb) /* 0.450920864 */, 18 },
-  /* 6376 */  { MAD_F(0x07375bb0) /* 0.451015176 */, 18 },
-  /* 6377 */  { MAD_F(0x0737be96) /* 0.451109494 */, 18 },
-  /* 6378 */  { MAD_F(0x0738217e) /* 0.451203817 */, 18 },
-  /* 6379 */  { MAD_F(0x07388467) /* 0.451298144 */, 18 },
-  /* 6380 */  { MAD_F(0x0738e751) /* 0.451392477 */, 18 },
-  /* 6381 */  { MAD_F(0x07394a3d) /* 0.451486814 */, 18 },
-  /* 6382 */  { MAD_F(0x0739ad29) /* 0.451581156 */, 18 },
-  /* 6383 */  { MAD_F(0x073a1017) /* 0.451675503 */, 18 },
-
-  /* 6384 */  { MAD_F(0x073a7307) /* 0.451769856 */, 18 },
-  /* 6385 */  { MAD_F(0x073ad5f8) /* 0.451864213 */, 18 },
-  /* 6386 */  { MAD_F(0x073b38ea) /* 0.451958575 */, 18 },
-  /* 6387 */  { MAD_F(0x073b9bdd) /* 0.452052942 */, 18 },
-  /* 6388 */  { MAD_F(0x073bfed2) /* 0.452147313 */, 18 },
-  /* 6389 */  { MAD_F(0x073c61c8) /* 0.452241690 */, 18 },
-  /* 6390 */  { MAD_F(0x073cc4bf) /* 0.452336072 */, 18 },
-  /* 6391 */  { MAD_F(0x073d27b8) /* 0.452430458 */, 18 },
-  /* 6392 */  { MAD_F(0x073d8ab2) /* 0.452524850 */, 18 },
-  /* 6393 */  { MAD_F(0x073dedae) /* 0.452619246 */, 18 },
-  /* 6394 */  { MAD_F(0x073e50aa) /* 0.452713648 */, 18 },
-  /* 6395 */  { MAD_F(0x073eb3a8) /* 0.452808054 */, 18 },
-  /* 6396 */  { MAD_F(0x073f16a8) /* 0.452902465 */, 18 },
-  /* 6397 */  { MAD_F(0x073f79a8) /* 0.452996882 */, 18 },
-  /* 6398 */  { MAD_F(0x073fdcaa) /* 0.453091303 */, 18 },
-  /* 6399 */  { MAD_F(0x07403fad) /* 0.453185729 */, 18 },
-
-  /* 6400 */  { MAD_F(0x0740a2b2) /* 0.453280160 */, 18 },
-  /* 6401 */  { MAD_F(0x074105b8) /* 0.453374595 */, 18 },
-  /* 6402 */  { MAD_F(0x074168bf) /* 0.453469036 */, 18 },
-  /* 6403 */  { MAD_F(0x0741cbc8) /* 0.453563482 */, 18 },
-  /* 6404 */  { MAD_F(0x07422ed2) /* 0.453657932 */, 18 },
-  /* 6405 */  { MAD_F(0x074291dd) /* 0.453752388 */, 18 },
-  /* 6406 */  { MAD_F(0x0742f4e9) /* 0.453846848 */, 18 },
-  /* 6407 */  { MAD_F(0x074357f7) /* 0.453941314 */, 18 },
-  /* 6408 */  { MAD_F(0x0743bb06) /* 0.454035784 */, 18 },
-  /* 6409 */  { MAD_F(0x07441e17) /* 0.454130259 */, 18 },
-  /* 6410 */  { MAD_F(0x07448129) /* 0.454224739 */, 18 },
-  /* 6411 */  { MAD_F(0x0744e43c) /* 0.454319224 */, 18 },
-  /* 6412 */  { MAD_F(0x07454750) /* 0.454413714 */, 18 },
-  /* 6413 */  { MAD_F(0x0745aa66) /* 0.454508209 */, 18 },
-  /* 6414 */  { MAD_F(0x07460d7d) /* 0.454602708 */, 18 },
-  /* 6415 */  { MAD_F(0x07467095) /* 0.454697213 */, 18 },
-
-  /* 6416 */  { MAD_F(0x0746d3af) /* 0.454791723 */, 18 },
-  /* 6417 */  { MAD_F(0x074736ca) /* 0.454886237 */, 18 },
-  /* 6418 */  { MAD_F(0x074799e7) /* 0.454980756 */, 18 },
-  /* 6419 */  { MAD_F(0x0747fd04) /* 0.455075281 */, 18 },
-  /* 6420 */  { MAD_F(0x07486023) /* 0.455169810 */, 18 },
-  /* 6421 */  { MAD_F(0x0748c344) /* 0.455264344 */, 18 },
-  /* 6422 */  { MAD_F(0x07492665) /* 0.455358883 */, 18 },
-  /* 6423 */  { MAD_F(0x07498988) /* 0.455453427 */, 18 },
-  /* 6424 */  { MAD_F(0x0749ecac) /* 0.455547976 */, 18 },
-  /* 6425 */  { MAD_F(0x074a4fd2) /* 0.455642529 */, 18 },
-  /* 6426 */  { MAD_F(0x074ab2f9) /* 0.455737088 */, 18 },
-  /* 6427 */  { MAD_F(0x074b1621) /* 0.455831652 */, 18 },
-  /* 6428 */  { MAD_F(0x074b794b) /* 0.455926220 */, 18 },
-  /* 6429 */  { MAD_F(0x074bdc75) /* 0.456020793 */, 18 },
-  /* 6430 */  { MAD_F(0x074c3fa1) /* 0.456115372 */, 18 },
-  /* 6431 */  { MAD_F(0x074ca2cf) /* 0.456209955 */, 18 },
-
-  /* 6432 */  { MAD_F(0x074d05fe) /* 0.456304543 */, 18 },
-  /* 6433 */  { MAD_F(0x074d692e) /* 0.456399136 */, 18 },
-  /* 6434 */  { MAD_F(0x074dcc5f) /* 0.456493733 */, 18 },
-  /* 6435 */  { MAD_F(0x074e2f92) /* 0.456588336 */, 18 },
-  /* 6436 */  { MAD_F(0x074e92c6) /* 0.456682944 */, 18 },
-  /* 6437 */  { MAD_F(0x074ef5fb) /* 0.456777556 */, 18 },
-  /* 6438 */  { MAD_F(0x074f5932) /* 0.456872174 */, 18 },
-  /* 6439 */  { MAD_F(0x074fbc6a) /* 0.456966796 */, 18 },
-  /* 6440 */  { MAD_F(0x07501fa3) /* 0.457061423 */, 18 },
-  /* 6441 */  { MAD_F(0x075082de) /* 0.457156056 */, 18 },
-  /* 6442 */  { MAD_F(0x0750e61a) /* 0.457250693 */, 18 },
-  /* 6443 */  { MAD_F(0x07514957) /* 0.457345335 */, 18 },
-  /* 6444 */  { MAD_F(0x0751ac96) /* 0.457439981 */, 18 },
-  /* 6445 */  { MAD_F(0x07520fd6) /* 0.457534633 */, 18 },
-  /* 6446 */  { MAD_F(0x07527317) /* 0.457629290 */, 18 },
-  /* 6447 */  { MAD_F(0x0752d659) /* 0.457723951 */, 18 },
-
-  /* 6448 */  { MAD_F(0x0753399d) /* 0.457818618 */, 18 },
-  /* 6449 */  { MAD_F(0x07539ce2) /* 0.457913289 */, 18 },
-  /* 6450 */  { MAD_F(0x07540029) /* 0.458007965 */, 18 },
-  /* 6451 */  { MAD_F(0x07546371) /* 0.458102646 */, 18 },
-  /* 6452 */  { MAD_F(0x0754c6ba) /* 0.458197332 */, 18 },
-  /* 6453 */  { MAD_F(0x07552a04) /* 0.458292023 */, 18 },
-  /* 6454 */  { MAD_F(0x07558d50) /* 0.458386719 */, 18 },
-  /* 6455 */  { MAD_F(0x0755f09d) /* 0.458481420 */, 18 },
-  /* 6456 */  { MAD_F(0x075653eb) /* 0.458576125 */, 18 },
-  /* 6457 */  { MAD_F(0x0756b73b) /* 0.458670836 */, 18 },
-  /* 6458 */  { MAD_F(0x07571a8c) /* 0.458765551 */, 18 },
-  /* 6459 */  { MAD_F(0x07577dde) /* 0.458860271 */, 18 },
-  /* 6460 */  { MAD_F(0x0757e131) /* 0.458954996 */, 18 },
-  /* 6461 */  { MAD_F(0x07584486) /* 0.459049726 */, 18 },
-  /* 6462 */  { MAD_F(0x0758a7dd) /* 0.459144461 */, 18 },
-  /* 6463 */  { MAD_F(0x07590b34) /* 0.459239201 */, 18 },
-
-  /* 6464 */  { MAD_F(0x07596e8d) /* 0.459333946 */, 18 },
-  /* 6465 */  { MAD_F(0x0759d1e7) /* 0.459428695 */, 18 },
-  /* 6466 */  { MAD_F(0x075a3542) /* 0.459523450 */, 18 },
-  /* 6467 */  { MAD_F(0x075a989f) /* 0.459618209 */, 18 },
-  /* 6468 */  { MAD_F(0x075afbfd) /* 0.459712973 */, 18 },
-  /* 6469 */  { MAD_F(0x075b5f5d) /* 0.459807742 */, 18 },
-  /* 6470 */  { MAD_F(0x075bc2bd) /* 0.459902516 */, 18 },
-  /* 6471 */  { MAD_F(0x075c261f) /* 0.459997295 */, 18 },
-  /* 6472 */  { MAD_F(0x075c8983) /* 0.460092079 */, 18 },
-  /* 6473 */  { MAD_F(0x075cece7) /* 0.460186867 */, 18 },
-  /* 6474 */  { MAD_F(0x075d504d) /* 0.460281661 */, 18 },
-  /* 6475 */  { MAD_F(0x075db3b5) /* 0.460376459 */, 18 },
-  /* 6476 */  { MAD_F(0x075e171d) /* 0.460471262 */, 18 },
-  /* 6477 */  { MAD_F(0x075e7a87) /* 0.460566071 */, 18 },
-  /* 6478 */  { MAD_F(0x075eddf2) /* 0.460660884 */, 18 },
-  /* 6479 */  { MAD_F(0x075f415f) /* 0.460755701 */, 18 },
-
-  /* 6480 */  { MAD_F(0x075fa4cc) /* 0.460850524 */, 18 },
-  /* 6481 */  { MAD_F(0x0760083b) /* 0.460945352 */, 18 },
-  /* 6482 */  { MAD_F(0x07606bac) /* 0.461040184 */, 18 },
-  /* 6483 */  { MAD_F(0x0760cf1e) /* 0.461135022 */, 18 },
-  /* 6484 */  { MAD_F(0x07613291) /* 0.461229864 */, 18 },
-  /* 6485 */  { MAD_F(0x07619605) /* 0.461324711 */, 18 },
-  /* 6486 */  { MAD_F(0x0761f97b) /* 0.461419563 */, 18 },
-  /* 6487 */  { MAD_F(0x07625cf2) /* 0.461514420 */, 18 },
-  /* 6488 */  { MAD_F(0x0762c06a) /* 0.461609282 */, 18 },
-  /* 6489 */  { MAD_F(0x076323e3) /* 0.461704149 */, 18 },
-  /* 6490 */  { MAD_F(0x0763875e) /* 0.461799020 */, 18 },
-  /* 6491 */  { MAD_F(0x0763eadb) /* 0.461893897 */, 18 },
-  /* 6492 */  { MAD_F(0x07644e58) /* 0.461988778 */, 18 },
-  /* 6493 */  { MAD_F(0x0764b1d7) /* 0.462083664 */, 18 },
-  /* 6494 */  { MAD_F(0x07651557) /* 0.462178555 */, 18 },
-  /* 6495 */  { MAD_F(0x076578d8) /* 0.462273451 */, 18 },
-
-  /* 6496 */  { MAD_F(0x0765dc5b) /* 0.462368352 */, 18 },
-  /* 6497 */  { MAD_F(0x07663fdf) /* 0.462463257 */, 18 },
-  /* 6498 */  { MAD_F(0x0766a364) /* 0.462558168 */, 18 },
-  /* 6499 */  { MAD_F(0x076706eb) /* 0.462653083 */, 18 },
-  /* 6500 */  { MAD_F(0x07676a73) /* 0.462748003 */, 18 },
-  /* 6501 */  { MAD_F(0x0767cdfc) /* 0.462842928 */, 18 },
-  /* 6502 */  { MAD_F(0x07683187) /* 0.462937858 */, 18 },
-  /* 6503 */  { MAD_F(0x07689513) /* 0.463032793 */, 18 },
-  /* 6504 */  { MAD_F(0x0768f8a0) /* 0.463127733 */, 18 },
-  /* 6505 */  { MAD_F(0x07695c2e) /* 0.463222678 */, 18 },
-  /* 6506 */  { MAD_F(0x0769bfbe) /* 0.463317627 */, 18 },
-  /* 6507 */  { MAD_F(0x076a234f) /* 0.463412581 */, 18 },
-  /* 6508 */  { MAD_F(0x076a86e2) /* 0.463507540 */, 18 },
-  /* 6509 */  { MAD_F(0x076aea75) /* 0.463602504 */, 18 },
-  /* 6510 */  { MAD_F(0x076b4e0a) /* 0.463697473 */, 18 },
-  /* 6511 */  { MAD_F(0x076bb1a1) /* 0.463792447 */, 18 },
-
-  /* 6512 */  { MAD_F(0x076c1538) /* 0.463887426 */, 18 },
-  /* 6513 */  { MAD_F(0x076c78d1) /* 0.463982409 */, 18 },
-  /* 6514 */  { MAD_F(0x076cdc6c) /* 0.464077398 */, 18 },
-  /* 6515 */  { MAD_F(0x076d4007) /* 0.464172391 */, 18 },
-  /* 6516 */  { MAD_F(0x076da3a4) /* 0.464267389 */, 18 },
-  /* 6517 */  { MAD_F(0x076e0742) /* 0.464362392 */, 18 },
-  /* 6518 */  { MAD_F(0x076e6ae2) /* 0.464457399 */, 18 },
-  /* 6519 */  { MAD_F(0x076ece82) /* 0.464552412 */, 18 },
-  /* 6520 */  { MAD_F(0x076f3224) /* 0.464647430 */, 18 },
-  /* 6521 */  { MAD_F(0x076f95c8) /* 0.464742452 */, 18 },
-  /* 6522 */  { MAD_F(0x076ff96c) /* 0.464837479 */, 18 },
-  /* 6523 */  { MAD_F(0x07705d12) /* 0.464932511 */, 18 },
-  /* 6524 */  { MAD_F(0x0770c0ba) /* 0.465027548 */, 18 },
-  /* 6525 */  { MAD_F(0x07712462) /* 0.465122590 */, 18 },
-  /* 6526 */  { MAD_F(0x0771880c) /* 0.465217637 */, 18 },
-  /* 6527 */  { MAD_F(0x0771ebb7) /* 0.465312688 */, 18 },
-
-  /* 6528 */  { MAD_F(0x07724f64) /* 0.465407744 */, 18 },
-  /* 6529 */  { MAD_F(0x0772b312) /* 0.465502806 */, 18 },
-  /* 6530 */  { MAD_F(0x077316c1) /* 0.465597872 */, 18 },
-  /* 6531 */  { MAD_F(0x07737a71) /* 0.465692943 */, 18 },
-  /* 6532 */  { MAD_F(0x0773de23) /* 0.465788018 */, 18 },
-  /* 6533 */  { MAD_F(0x077441d6) /* 0.465883099 */, 18 },
-  /* 6534 */  { MAD_F(0x0774a58a) /* 0.465978184 */, 18 },
-  /* 6535 */  { MAD_F(0x07750940) /* 0.466073275 */, 18 },
-  /* 6536 */  { MAD_F(0x07756cf7) /* 0.466168370 */, 18 },
-  /* 6537 */  { MAD_F(0x0775d0af) /* 0.466263470 */, 18 },
-  /* 6538 */  { MAD_F(0x07763468) /* 0.466358575 */, 18 },
-  /* 6539 */  { MAD_F(0x07769823) /* 0.466453684 */, 18 },
-  /* 6540 */  { MAD_F(0x0776fbdf) /* 0.466548799 */, 18 },
-  /* 6541 */  { MAD_F(0x07775f9d) /* 0.466643918 */, 18 },
-  /* 6542 */  { MAD_F(0x0777c35c) /* 0.466739043 */, 18 },
-  /* 6543 */  { MAD_F(0x0778271c) /* 0.466834172 */, 18 },
-
-  /* 6544 */  { MAD_F(0x07788add) /* 0.466929306 */, 18 },
-  /* 6545 */  { MAD_F(0x0778ee9f) /* 0.467024445 */, 18 },
-  /* 6546 */  { MAD_F(0x07795263) /* 0.467119588 */, 18 },
-  /* 6547 */  { MAD_F(0x0779b629) /* 0.467214737 */, 18 },
-  /* 6548 */  { MAD_F(0x077a19ef) /* 0.467309890 */, 18 },
-  /* 6549 */  { MAD_F(0x077a7db7) /* 0.467405048 */, 18 },
-  /* 6550 */  { MAD_F(0x077ae180) /* 0.467500211 */, 18 },
-  /* 6551 */  { MAD_F(0x077b454b) /* 0.467595379 */, 18 },
-  /* 6552 */  { MAD_F(0x077ba916) /* 0.467690552 */, 18 },
-  /* 6553 */  { MAD_F(0x077c0ce3) /* 0.467785729 */, 18 },
-  /* 6554 */  { MAD_F(0x077c70b2) /* 0.467880912 */, 18 },
-  /* 6555 */  { MAD_F(0x077cd481) /* 0.467976099 */, 18 },
-  /* 6556 */  { MAD_F(0x077d3852) /* 0.468071291 */, 18 },
-  /* 6557 */  { MAD_F(0x077d9c24) /* 0.468166488 */, 18 },
-  /* 6558 */  { MAD_F(0x077dfff8) /* 0.468261690 */, 18 },
-  /* 6559 */  { MAD_F(0x077e63cd) /* 0.468356896 */, 18 },
-
-  /* 6560 */  { MAD_F(0x077ec7a3) /* 0.468452108 */, 18 },
-  /* 6561 */  { MAD_F(0x077f2b7a) /* 0.468547324 */, 18 },
-  /* 6562 */  { MAD_F(0x077f8f53) /* 0.468642545 */, 18 },
-  /* 6563 */  { MAD_F(0x077ff32d) /* 0.468737771 */, 18 },
-  /* 6564 */  { MAD_F(0x07805708) /* 0.468833002 */, 18 },
-  /* 6565 */  { MAD_F(0x0780bae5) /* 0.468928237 */, 18 },
-  /* 6566 */  { MAD_F(0x07811ec3) /* 0.469023478 */, 18 },
-  /* 6567 */  { MAD_F(0x078182a2) /* 0.469118723 */, 18 },
-  /* 6568 */  { MAD_F(0x0781e683) /* 0.469213973 */, 18 },
-  /* 6569 */  { MAD_F(0x07824a64) /* 0.469309228 */, 18 },
-  /* 6570 */  { MAD_F(0x0782ae47) /* 0.469404488 */, 18 },
-  /* 6571 */  { MAD_F(0x0783122c) /* 0.469499752 */, 18 },
-  /* 6572 */  { MAD_F(0x07837612) /* 0.469595022 */, 18 },
-  /* 6573 */  { MAD_F(0x0783d9f9) /* 0.469690296 */, 18 },
-  /* 6574 */  { MAD_F(0x07843de1) /* 0.469785575 */, 18 },
-  /* 6575 */  { MAD_F(0x0784a1ca) /* 0.469880859 */, 18 },
-
-  /* 6576 */  { MAD_F(0x078505b5) /* 0.469976148 */, 18 },
-  /* 6577 */  { MAD_F(0x078569a2) /* 0.470071442 */, 18 },
-  /* 6578 */  { MAD_F(0x0785cd8f) /* 0.470166740 */, 18 },
-  /* 6579 */  { MAD_F(0x0786317e) /* 0.470262043 */, 18 },
-  /* 6580 */  { MAD_F(0x0786956e) /* 0.470357351 */, 18 },
-  /* 6581 */  { MAD_F(0x0786f95f) /* 0.470452664 */, 18 },
-  /* 6582 */  { MAD_F(0x07875d52) /* 0.470547982 */, 18 },
-  /* 6583 */  { MAD_F(0x0787c146) /* 0.470643305 */, 18 },
-  /* 6584 */  { MAD_F(0x0788253b) /* 0.470738632 */, 18 },
-  /* 6585 */  { MAD_F(0x07888932) /* 0.470833964 */, 18 },
-  /* 6586 */  { MAD_F(0x0788ed2a) /* 0.470929301 */, 18 },
-  /* 6587 */  { MAD_F(0x07895123) /* 0.471024643 */, 18 },
-  /* 6588 */  { MAD_F(0x0789b51d) /* 0.471119990 */, 18 },
-  /* 6589 */  { MAD_F(0x078a1919) /* 0.471215341 */, 18 },
-  /* 6590 */  { MAD_F(0x078a7d16) /* 0.471310698 */, 18 },
-  /* 6591 */  { MAD_F(0x078ae114) /* 0.471406059 */, 18 },
-
-  /* 6592 */  { MAD_F(0x078b4514) /* 0.471501425 */, 18 },
-  /* 6593 */  { MAD_F(0x078ba915) /* 0.471596796 */, 18 },
-  /* 6594 */  { MAD_F(0x078c0d17) /* 0.471692171 */, 18 },
-  /* 6595 */  { MAD_F(0x078c711a) /* 0.471787552 */, 18 },
-  /* 6596 */  { MAD_F(0x078cd51f) /* 0.471882937 */, 18 },
-  /* 6597 */  { MAD_F(0x078d3925) /* 0.471978327 */, 18 },
-  /* 6598 */  { MAD_F(0x078d9d2d) /* 0.472073722 */, 18 },
-  /* 6599 */  { MAD_F(0x078e0135) /* 0.472169122 */, 18 },
-  /* 6600 */  { MAD_F(0x078e653f) /* 0.472264527 */, 18 },
-  /* 6601 */  { MAD_F(0x078ec94b) /* 0.472359936 */, 18 },
-  /* 6602 */  { MAD_F(0x078f2d57) /* 0.472455350 */, 18 },
-  /* 6603 */  { MAD_F(0x078f9165) /* 0.472550769 */, 18 },
-  /* 6604 */  { MAD_F(0x078ff574) /* 0.472646193 */, 18 },
-  /* 6605 */  { MAD_F(0x07905985) /* 0.472741622 */, 18 },
-  /* 6606 */  { MAD_F(0x0790bd96) /* 0.472837055 */, 18 },
-  /* 6607 */  { MAD_F(0x079121a9) /* 0.472932493 */, 18 },
-
-  /* 6608 */  { MAD_F(0x079185be) /* 0.473027937 */, 18 },
-  /* 6609 */  { MAD_F(0x0791e9d3) /* 0.473123384 */, 18 },
-  /* 6610 */  { MAD_F(0x07924dea) /* 0.473218837 */, 18 },
-  /* 6611 */  { MAD_F(0x0792b202) /* 0.473314295 */, 18 },
-  /* 6612 */  { MAD_F(0x0793161c) /* 0.473409757 */, 18 },
-  /* 6613 */  { MAD_F(0x07937a37) /* 0.473505224 */, 18 },
-  /* 6614 */  { MAD_F(0x0793de53) /* 0.473600696 */, 18 },
-  /* 6615 */  { MAD_F(0x07944270) /* 0.473696173 */, 18 },
-  /* 6616 */  { MAD_F(0x0794a68f) /* 0.473791655 */, 18 },
-  /* 6617 */  { MAD_F(0x07950aaf) /* 0.473887141 */, 18 },
-  /* 6618 */  { MAD_F(0x07956ed0) /* 0.473982632 */, 18 },
-  /* 6619 */  { MAD_F(0x0795d2f2) /* 0.474078128 */, 18 },
-  /* 6620 */  { MAD_F(0x07963716) /* 0.474173629 */, 18 },
-  /* 6621 */  { MAD_F(0x07969b3b) /* 0.474269135 */, 18 },
-  /* 6622 */  { MAD_F(0x0796ff62) /* 0.474364645 */, 18 },
-  /* 6623 */  { MAD_F(0x07976389) /* 0.474460161 */, 18 },
-
-  /* 6624 */  { MAD_F(0x0797c7b2) /* 0.474555681 */, 18 },
-  /* 6625 */  { MAD_F(0x07982bdd) /* 0.474651205 */, 18 },
-  /* 6626 */  { MAD_F(0x07989008) /* 0.474746735 */, 18 },
-  /* 6627 */  { MAD_F(0x0798f435) /* 0.474842270 */, 18 },
-  /* 6628 */  { MAD_F(0x07995863) /* 0.474937809 */, 18 },
-  /* 6629 */  { MAD_F(0x0799bc92) /* 0.475033353 */, 18 },
-  /* 6630 */  { MAD_F(0x079a20c3) /* 0.475128902 */, 18 },
-  /* 6631 */  { MAD_F(0x079a84f5) /* 0.475224456 */, 18 },
-  /* 6632 */  { MAD_F(0x079ae929) /* 0.475320014 */, 18 },
-  /* 6633 */  { MAD_F(0x079b4d5d) /* 0.475415578 */, 18 },
-  /* 6634 */  { MAD_F(0x079bb193) /* 0.475511146 */, 18 },
-  /* 6635 */  { MAD_F(0x079c15ca) /* 0.475606719 */, 18 },
-  /* 6636 */  { MAD_F(0x079c7a03) /* 0.475702296 */, 18 },
-  /* 6637 */  { MAD_F(0x079cde3c) /* 0.475797879 */, 18 },
-  /* 6638 */  { MAD_F(0x079d4277) /* 0.475893466 */, 18 },
-  /* 6639 */  { MAD_F(0x079da6b4) /* 0.475989058 */, 18 },
-
-  /* 6640 */  { MAD_F(0x079e0af1) /* 0.476084655 */, 18 },
-  /* 6641 */  { MAD_F(0x079e6f30) /* 0.476180257 */, 18 },
-  /* 6642 */  { MAD_F(0x079ed370) /* 0.476275863 */, 18 },
-  /* 6643 */  { MAD_F(0x079f37b2) /* 0.476371475 */, 18 },
-  /* 6644 */  { MAD_F(0x079f9bf5) /* 0.476467091 */, 18 },
-  /* 6645 */  { MAD_F(0x07a00039) /* 0.476562712 */, 18 },
-  /* 6646 */  { MAD_F(0x07a0647e) /* 0.476658338 */, 18 },
-  /* 6647 */  { MAD_F(0x07a0c8c5) /* 0.476753968 */, 18 },
-  /* 6648 */  { MAD_F(0x07a12d0c) /* 0.476849603 */, 18 },
-  /* 6649 */  { MAD_F(0x07a19156) /* 0.476945243 */, 18 },
-  /* 6650 */  { MAD_F(0x07a1f5a0) /* 0.477040888 */, 18 },
-  /* 6651 */  { MAD_F(0x07a259ec) /* 0.477136538 */, 18 },
-  /* 6652 */  { MAD_F(0x07a2be39) /* 0.477232193 */, 18 },
-  /* 6653 */  { MAD_F(0x07a32287) /* 0.477327852 */, 18 },
-  /* 6654 */  { MAD_F(0x07a386d7) /* 0.477423516 */, 18 },
-  /* 6655 */  { MAD_F(0x07a3eb28) /* 0.477519185 */, 18 },
-
-  /* 6656 */  { MAD_F(0x07a44f7a) /* 0.477614858 */, 18 },
-  /* 6657 */  { MAD_F(0x07a4b3ce) /* 0.477710537 */, 18 },
-  /* 6658 */  { MAD_F(0x07a51822) /* 0.477806220 */, 18 },
-  /* 6659 */  { MAD_F(0x07a57c78) /* 0.477901908 */, 18 },
-  /* 6660 */  { MAD_F(0x07a5e0d0) /* 0.477997601 */, 18 },
-  /* 6661 */  { MAD_F(0x07a64528) /* 0.478093299 */, 18 },
-  /* 6662 */  { MAD_F(0x07a6a982) /* 0.478189001 */, 18 },
-  /* 6663 */  { MAD_F(0x07a70ddd) /* 0.478284708 */, 18 },
-  /* 6664 */  { MAD_F(0x07a7723a) /* 0.478380420 */, 18 },
-  /* 6665 */  { MAD_F(0x07a7d698) /* 0.478476137 */, 18 },
-  /* 6666 */  { MAD_F(0x07a83af7) /* 0.478571858 */, 18 },
-  /* 6667 */  { MAD_F(0x07a89f57) /* 0.478667585 */, 18 },
-  /* 6668 */  { MAD_F(0x07a903b9) /* 0.478763316 */, 18 },
-  /* 6669 */  { MAD_F(0x07a9681c) /* 0.478859052 */, 18 },
-  /* 6670 */  { MAD_F(0x07a9cc80) /* 0.478954793 */, 18 },
-  /* 6671 */  { MAD_F(0x07aa30e5) /* 0.479050538 */, 18 },
-
-  /* 6672 */  { MAD_F(0x07aa954c) /* 0.479146288 */, 18 },
-  /* 6673 */  { MAD_F(0x07aaf9b4) /* 0.479242043 */, 18 },
-  /* 6674 */  { MAD_F(0x07ab5e1e) /* 0.479337803 */, 18 },
-  /* 6675 */  { MAD_F(0x07abc288) /* 0.479433568 */, 18 },
-  /* 6676 */  { MAD_F(0x07ac26f4) /* 0.479529337 */, 18 },
-  /* 6677 */  { MAD_F(0x07ac8b61) /* 0.479625111 */, 18 },
-  /* 6678 */  { MAD_F(0x07acefd0) /* 0.479720890 */, 18 },
-  /* 6679 */  { MAD_F(0x07ad543f) /* 0.479816674 */, 18 },
-  /* 6680 */  { MAD_F(0x07adb8b0) /* 0.479912463 */, 18 },
-  /* 6681 */  { MAD_F(0x07ae1d23) /* 0.480008256 */, 18 },
-  /* 6682 */  { MAD_F(0x07ae8196) /* 0.480104054 */, 18 },
-  /* 6683 */  { MAD_F(0x07aee60b) /* 0.480199857 */, 18 },
-  /* 6684 */  { MAD_F(0x07af4a81) /* 0.480295664 */, 18 },
-  /* 6685 */  { MAD_F(0x07afaef9) /* 0.480391477 */, 18 },
-  /* 6686 */  { MAD_F(0x07b01372) /* 0.480487294 */, 18 },
-  /* 6687 */  { MAD_F(0x07b077ec) /* 0.480583116 */, 18 },
-
-  /* 6688 */  { MAD_F(0x07b0dc67) /* 0.480678943 */, 18 },
-  /* 6689 */  { MAD_F(0x07b140e4) /* 0.480774774 */, 18 },
-  /* 6690 */  { MAD_F(0x07b1a561) /* 0.480870611 */, 18 },
-  /* 6691 */  { MAD_F(0x07b209e1) /* 0.480966452 */, 18 },
-  /* 6692 */  { MAD_F(0x07b26e61) /* 0.481062298 */, 18 },
-  /* 6693 */  { MAD_F(0x07b2d2e3) /* 0.481158148 */, 18 },
-  /* 6694 */  { MAD_F(0x07b33766) /* 0.481254004 */, 18 },
-  /* 6695 */  { MAD_F(0x07b39bea) /* 0.481349864 */, 18 },
-  /* 6696 */  { MAD_F(0x07b4006f) /* 0.481445729 */, 18 },
-  /* 6697 */  { MAD_F(0x07b464f6) /* 0.481541598 */, 18 },
-  /* 6698 */  { MAD_F(0x07b4c97e) /* 0.481637473 */, 18 },
-  /* 6699 */  { MAD_F(0x07b52e08) /* 0.481733352 */, 18 },
-  /* 6700 */  { MAD_F(0x07b59292) /* 0.481829236 */, 18 },
-  /* 6701 */  { MAD_F(0x07b5f71e) /* 0.481925125 */, 18 },
-  /* 6702 */  { MAD_F(0x07b65bac) /* 0.482021019 */, 18 },
-  /* 6703 */  { MAD_F(0x07b6c03a) /* 0.482116917 */, 18 },
-
-  /* 6704 */  { MAD_F(0x07b724ca) /* 0.482212820 */, 18 },
-  /* 6705 */  { MAD_F(0x07b7895b) /* 0.482308728 */, 18 },
-  /* 6706 */  { MAD_F(0x07b7eded) /* 0.482404640 */, 18 },
-  /* 6707 */  { MAD_F(0x07b85281) /* 0.482500558 */, 18 },
-  /* 6708 */  { MAD_F(0x07b8b716) /* 0.482596480 */, 18 },
-  /* 6709 */  { MAD_F(0x07b91bac) /* 0.482692407 */, 18 },
-  /* 6710 */  { MAD_F(0x07b98044) /* 0.482788339 */, 18 },
-  /* 6711 */  { MAD_F(0x07b9e4dc) /* 0.482884275 */, 18 },
-  /* 6712 */  { MAD_F(0x07ba4976) /* 0.482980216 */, 18 },
-  /* 6713 */  { MAD_F(0x07baae12) /* 0.483076162 */, 18 },
-  /* 6714 */  { MAD_F(0x07bb12ae) /* 0.483172113 */, 18 },
-  /* 6715 */  { MAD_F(0x07bb774c) /* 0.483268069 */, 18 },
-  /* 6716 */  { MAD_F(0x07bbdbeb) /* 0.483364029 */, 18 },
-  /* 6717 */  { MAD_F(0x07bc408c) /* 0.483459994 */, 18 },
-  /* 6718 */  { MAD_F(0x07bca52d) /* 0.483555964 */, 18 },
-  /* 6719 */  { MAD_F(0x07bd09d0) /* 0.483651939 */, 18 },
-
-  /* 6720 */  { MAD_F(0x07bd6e75) /* 0.483747918 */, 18 },
-  /* 6721 */  { MAD_F(0x07bdd31a) /* 0.483843902 */, 18 },
-  /* 6722 */  { MAD_F(0x07be37c1) /* 0.483939891 */, 18 },
-  /* 6723 */  { MAD_F(0x07be9c69) /* 0.484035885 */, 18 },
-  /* 6724 */  { MAD_F(0x07bf0113) /* 0.484131883 */, 18 },
-  /* 6725 */  { MAD_F(0x07bf65bd) /* 0.484227886 */, 18 },
-  /* 6726 */  { MAD_F(0x07bfca69) /* 0.484323894 */, 18 },
-  /* 6727 */  { MAD_F(0x07c02f16) /* 0.484419907 */, 18 },
-  /* 6728 */  { MAD_F(0x07c093c5) /* 0.484515924 */, 18 },
-  /* 6729 */  { MAD_F(0x07c0f875) /* 0.484611946 */, 18 },
-  /* 6730 */  { MAD_F(0x07c15d26) /* 0.484707973 */, 18 },
-  /* 6731 */  { MAD_F(0x07c1c1d8) /* 0.484804005 */, 18 },
-  /* 6732 */  { MAD_F(0x07c2268b) /* 0.484900041 */, 18 },
-  /* 6733 */  { MAD_F(0x07c28b40) /* 0.484996083 */, 18 },
-  /* 6734 */  { MAD_F(0x07c2eff6) /* 0.485092128 */, 18 },
-  /* 6735 */  { MAD_F(0x07c354ae) /* 0.485188179 */, 18 },
-
-  /* 6736 */  { MAD_F(0x07c3b967) /* 0.485284235 */, 18 },
-  /* 6737 */  { MAD_F(0x07c41e21) /* 0.485380295 */, 18 },
-  /* 6738 */  { MAD_F(0x07c482dc) /* 0.485476360 */, 18 },
-  /* 6739 */  { MAD_F(0x07c4e798) /* 0.485572430 */, 18 },
-  /* 6740 */  { MAD_F(0x07c54c56) /* 0.485668504 */, 18 },
-  /* 6741 */  { MAD_F(0x07c5b115) /* 0.485764583 */, 18 },
-  /* 6742 */  { MAD_F(0x07c615d6) /* 0.485860667 */, 18 },
-  /* 6743 */  { MAD_F(0x07c67a97) /* 0.485956756 */, 18 },
-  /* 6744 */  { MAD_F(0x07c6df5a) /* 0.486052849 */, 18 },
-  /* 6745 */  { MAD_F(0x07c7441e) /* 0.486148948 */, 18 },
-  /* 6746 */  { MAD_F(0x07c7a8e4) /* 0.486245051 */, 18 },
-  /* 6747 */  { MAD_F(0x07c80daa) /* 0.486341158 */, 18 },
-  /* 6748 */  { MAD_F(0x07c87272) /* 0.486437271 */, 18 },
-  /* 6749 */  { MAD_F(0x07c8d73c) /* 0.486533388 */, 18 },
-  /* 6750 */  { MAD_F(0x07c93c06) /* 0.486629510 */, 18 },
-  /* 6751 */  { MAD_F(0x07c9a0d2) /* 0.486725637 */, 18 },
-
-  /* 6752 */  { MAD_F(0x07ca059f) /* 0.486821768 */, 18 },
-  /* 6753 */  { MAD_F(0x07ca6a6d) /* 0.486917905 */, 18 },
-  /* 6754 */  { MAD_F(0x07cacf3d) /* 0.487014045 */, 18 },
-  /* 6755 */  { MAD_F(0x07cb340e) /* 0.487110191 */, 18 },
-  /* 6756 */  { MAD_F(0x07cb98e0) /* 0.487206342 */, 18 },
-  /* 6757 */  { MAD_F(0x07cbfdb4) /* 0.487302497 */, 18 },
-  /* 6758 */  { MAD_F(0x07cc6288) /* 0.487398657 */, 18 },
-  /* 6759 */  { MAD_F(0x07ccc75e) /* 0.487494821 */, 18 },
-  /* 6760 */  { MAD_F(0x07cd2c36) /* 0.487590991 */, 18 },
-  /* 6761 */  { MAD_F(0x07cd910e) /* 0.487687165 */, 18 },
-  /* 6762 */  { MAD_F(0x07cdf5e8) /* 0.487783344 */, 18 },
-  /* 6763 */  { MAD_F(0x07ce5ac3) /* 0.487879528 */, 18 },
-  /* 6764 */  { MAD_F(0x07cebfa0) /* 0.487975716 */, 18 },
-  /* 6765 */  { MAD_F(0x07cf247d) /* 0.488071909 */, 18 },
-  /* 6766 */  { MAD_F(0x07cf895c) /* 0.488168107 */, 18 },
-  /* 6767 */  { MAD_F(0x07cfee3c) /* 0.488264310 */, 18 },
-
-  /* 6768 */  { MAD_F(0x07d0531e) /* 0.488360517 */, 18 },
-  /* 6769 */  { MAD_F(0x07d0b801) /* 0.488456729 */, 18 },
-  /* 6770 */  { MAD_F(0x07d11ce5) /* 0.488552946 */, 18 },
-  /* 6771 */  { MAD_F(0x07d181ca) /* 0.488649167 */, 18 },
-  /* 6772 */  { MAD_F(0x07d1e6b0) /* 0.488745394 */, 18 },
-  /* 6773 */  { MAD_F(0x07d24b98) /* 0.488841625 */, 18 },
-  /* 6774 */  { MAD_F(0x07d2b081) /* 0.488937860 */, 18 },
-  /* 6775 */  { MAD_F(0x07d3156c) /* 0.489034101 */, 18 },
-  /* 6776 */  { MAD_F(0x07d37a57) /* 0.489130346 */, 18 },
-  /* 6777 */  { MAD_F(0x07d3df44) /* 0.489226596 */, 18 },
-  /* 6778 */  { MAD_F(0x07d44432) /* 0.489322851 */, 18 },
-  /* 6779 */  { MAD_F(0x07d4a922) /* 0.489419110 */, 18 },
-  /* 6780 */  { MAD_F(0x07d50e13) /* 0.489515375 */, 18 },
-  /* 6781 */  { MAD_F(0x07d57305) /* 0.489611643 */, 18 },
-  /* 6782 */  { MAD_F(0x07d5d7f8) /* 0.489707917 */, 18 },
-  /* 6783 */  { MAD_F(0x07d63cec) /* 0.489804195 */, 18 },
-
-  /* 6784 */  { MAD_F(0x07d6a1e2) /* 0.489900479 */, 18 },
-  /* 6785 */  { MAD_F(0x07d706d9) /* 0.489996766 */, 18 },
-  /* 6786 */  { MAD_F(0x07d76bd2) /* 0.490093059 */, 18 },
-  /* 6787 */  { MAD_F(0x07d7d0cb) /* 0.490189356 */, 18 },
-  /* 6788 */  { MAD_F(0x07d835c6) /* 0.490285658 */, 18 },
-  /* 6789 */  { MAD_F(0x07d89ac2) /* 0.490381965 */, 18 },
-  /* 6790 */  { MAD_F(0x07d8ffc0) /* 0.490478277 */, 18 },
-  /* 6791 */  { MAD_F(0x07d964be) /* 0.490574593 */, 18 },
-  /* 6792 */  { MAD_F(0x07d9c9be) /* 0.490670914 */, 18 },
-  /* 6793 */  { MAD_F(0x07da2ebf) /* 0.490767239 */, 18 },
-  /* 6794 */  { MAD_F(0x07da93c2) /* 0.490863570 */, 18 },
-  /* 6795 */  { MAD_F(0x07daf8c6) /* 0.490959905 */, 18 },
-  /* 6796 */  { MAD_F(0x07db5dcb) /* 0.491056245 */, 18 },
-  /* 6797 */  { MAD_F(0x07dbc2d1) /* 0.491152589 */, 18 },
-  /* 6798 */  { MAD_F(0x07dc27d9) /* 0.491248939 */, 18 },
-  /* 6799 */  { MAD_F(0x07dc8ce1) /* 0.491345293 */, 18 },
-
-  /* 6800 */  { MAD_F(0x07dcf1ec) /* 0.491441651 */, 18 },
-  /* 6801 */  { MAD_F(0x07dd56f7) /* 0.491538015 */, 18 },
-  /* 6802 */  { MAD_F(0x07ddbc04) /* 0.491634383 */, 18 },
-  /* 6803 */  { MAD_F(0x07de2111) /* 0.491730756 */, 18 },
-  /* 6804 */  { MAD_F(0x07de8621) /* 0.491827134 */, 18 },
-  /* 6805 */  { MAD_F(0x07deeb31) /* 0.491923516 */, 18 },
-  /* 6806 */  { MAD_F(0x07df5043) /* 0.492019903 */, 18 },
-  /* 6807 */  { MAD_F(0x07dfb556) /* 0.492116295 */, 18 },
-  /* 6808 */  { MAD_F(0x07e01a6a) /* 0.492212691 */, 18 },
-  /* 6809 */  { MAD_F(0x07e07f80) /* 0.492309093 */, 18 },
-  /* 6810 */  { MAD_F(0x07e0e496) /* 0.492405499 */, 18 },
-  /* 6811 */  { MAD_F(0x07e149ae) /* 0.492501909 */, 18 },
-  /* 6812 */  { MAD_F(0x07e1aec8) /* 0.492598325 */, 18 },
-  /* 6813 */  { MAD_F(0x07e213e2) /* 0.492694745 */, 18 },
-  /* 6814 */  { MAD_F(0x07e278fe) /* 0.492791170 */, 18 },
-  /* 6815 */  { MAD_F(0x07e2de1b) /* 0.492887599 */, 18 },
-
-  /* 6816 */  { MAD_F(0x07e3433a) /* 0.492984033 */, 18 },
-  /* 6817 */  { MAD_F(0x07e3a859) /* 0.493080472 */, 18 },
-  /* 6818 */  { MAD_F(0x07e40d7a) /* 0.493176916 */, 18 },
-  /* 6819 */  { MAD_F(0x07e4729c) /* 0.493273365 */, 18 },
-  /* 6820 */  { MAD_F(0x07e4d7c0) /* 0.493369818 */, 18 },
-  /* 6821 */  { MAD_F(0x07e53ce4) /* 0.493466275 */, 18 },
-  /* 6822 */  { MAD_F(0x07e5a20a) /* 0.493562738 */, 18 },
-  /* 6823 */  { MAD_F(0x07e60732) /* 0.493659205 */, 18 },
-  /* 6824 */  { MAD_F(0x07e66c5a) /* 0.493755677 */, 18 },
-  /* 6825 */  { MAD_F(0x07e6d184) /* 0.493852154 */, 18 },
-  /* 6826 */  { MAD_F(0x07e736af) /* 0.493948635 */, 18 },
-  /* 6827 */  { MAD_F(0x07e79bdb) /* 0.494045122 */, 18 },
-  /* 6828 */  { MAD_F(0x07e80109) /* 0.494141612 */, 18 },
-  /* 6829 */  { MAD_F(0x07e86638) /* 0.494238108 */, 18 },
-  /* 6830 */  { MAD_F(0x07e8cb68) /* 0.494334608 */, 18 },
-  /* 6831 */  { MAD_F(0x07e93099) /* 0.494431113 */, 18 },
-
-  /* 6832 */  { MAD_F(0x07e995cc) /* 0.494527623 */, 18 },
-  /* 6833 */  { MAD_F(0x07e9fb00) /* 0.494624137 */, 18 },
-  /* 6834 */  { MAD_F(0x07ea6035) /* 0.494720656 */, 18 },
-  /* 6835 */  { MAD_F(0x07eac56b) /* 0.494817180 */, 18 },
-  /* 6836 */  { MAD_F(0x07eb2aa3) /* 0.494913709 */, 18 },
-  /* 6837 */  { MAD_F(0x07eb8fdc) /* 0.495010242 */, 18 },
-  /* 6838 */  { MAD_F(0x07ebf516) /* 0.495106780 */, 18 },
-  /* 6839 */  { MAD_F(0x07ec5a51) /* 0.495203322 */, 18 },
-  /* 6840 */  { MAD_F(0x07ecbf8e) /* 0.495299870 */, 18 },
-  /* 6841 */  { MAD_F(0x07ed24cc) /* 0.495396422 */, 18 },
-  /* 6842 */  { MAD_F(0x07ed8a0b) /* 0.495492978 */, 18 },
-  /* 6843 */  { MAD_F(0x07edef4c) /* 0.495589540 */, 18 },
-  /* 6844 */  { MAD_F(0x07ee548e) /* 0.495686106 */, 18 },
-  /* 6845 */  { MAD_F(0x07eeb9d1) /* 0.495782677 */, 18 },
-  /* 6846 */  { MAD_F(0x07ef1f15) /* 0.495879252 */, 18 },
-  /* 6847 */  { MAD_F(0x07ef845b) /* 0.495975833 */, 18 },
-
-  /* 6848 */  { MAD_F(0x07efe9a1) /* 0.496072418 */, 18 },
-  /* 6849 */  { MAD_F(0x07f04ee9) /* 0.496169007 */, 18 },
-  /* 6850 */  { MAD_F(0x07f0b433) /* 0.496265602 */, 18 },
-  /* 6851 */  { MAD_F(0x07f1197d) /* 0.496362201 */, 18 },
-  /* 6852 */  { MAD_F(0x07f17ec9) /* 0.496458804 */, 18 },
-  /* 6853 */  { MAD_F(0x07f1e416) /* 0.496555413 */, 18 },
-  /* 6854 */  { MAD_F(0x07f24965) /* 0.496652026 */, 18 },
-  /* 6855 */  { MAD_F(0x07f2aeb5) /* 0.496748644 */, 18 },
-  /* 6856 */  { MAD_F(0x07f31405) /* 0.496845266 */, 18 },
-  /* 6857 */  { MAD_F(0x07f37958) /* 0.496941894 */, 18 },
-  /* 6858 */  { MAD_F(0x07f3deab) /* 0.497038526 */, 18 },
-  /* 6859 */  { MAD_F(0x07f44400) /* 0.497135162 */, 18 },
-  /* 6860 */  { MAD_F(0x07f4a956) /* 0.497231804 */, 18 },
-  /* 6861 */  { MAD_F(0x07f50ead) /* 0.497328450 */, 18 },
-  /* 6862 */  { MAD_F(0x07f57405) /* 0.497425100 */, 18 },
-  /* 6863 */  { MAD_F(0x07f5d95f) /* 0.497521756 */, 18 },
-
-  /* 6864 */  { MAD_F(0x07f63eba) /* 0.497618416 */, 18 },
-  /* 6865 */  { MAD_F(0x07f6a416) /* 0.497715081 */, 18 },
-  /* 6866 */  { MAD_F(0x07f70974) /* 0.497811750 */, 18 },
-  /* 6867 */  { MAD_F(0x07f76ed3) /* 0.497908425 */, 18 },
-  /* 6868 */  { MAD_F(0x07f7d433) /* 0.498005103 */, 18 },
-  /* 6869 */  { MAD_F(0x07f83994) /* 0.498101787 */, 18 },
-  /* 6870 */  { MAD_F(0x07f89ef7) /* 0.498198475 */, 18 },
-  /* 6871 */  { MAD_F(0x07f9045a) /* 0.498295168 */, 18 },
-  /* 6872 */  { MAD_F(0x07f969c0) /* 0.498391866 */, 18 },
-  /* 6873 */  { MAD_F(0x07f9cf26) /* 0.498488568 */, 18 },
-  /* 6874 */  { MAD_F(0x07fa348e) /* 0.498585275 */, 18 },
-  /* 6875 */  { MAD_F(0x07fa99f6) /* 0.498681987 */, 18 },
-  /* 6876 */  { MAD_F(0x07faff60) /* 0.498778704 */, 18 },
-  /* 6877 */  { MAD_F(0x07fb64cc) /* 0.498875425 */, 18 },
-  /* 6878 */  { MAD_F(0x07fbca38) /* 0.498972150 */, 18 },
-  /* 6879 */  { MAD_F(0x07fc2fa6) /* 0.499068881 */, 18 },
-
-  /* 6880 */  { MAD_F(0x07fc9516) /* 0.499165616 */, 18 },
-  /* 6881 */  { MAD_F(0x07fcfa86) /* 0.499262356 */, 18 },
-  /* 6882 */  { MAD_F(0x07fd5ff8) /* 0.499359101 */, 18 },
-  /* 6883 */  { MAD_F(0x07fdc56b) /* 0.499455850 */, 18 },
-  /* 6884 */  { MAD_F(0x07fe2adf) /* 0.499552604 */, 18 },
-  /* 6885 */  { MAD_F(0x07fe9054) /* 0.499649362 */, 18 },
-  /* 6886 */  { MAD_F(0x07fef5cb) /* 0.499746126 */, 18 },
-  /* 6887 */  { MAD_F(0x07ff5b43) /* 0.499842894 */, 18 },
-  /* 6888 */  { MAD_F(0x07ffc0bc) /* 0.499939666 */, 18 },
-  /* 6889 */  { MAD_F(0x0400131b) /* 0.250018222 */, 19 },
-  /* 6890 */  { MAD_F(0x040045d9) /* 0.250066613 */, 19 },
-  /* 6891 */  { MAD_F(0x04007897) /* 0.250115006 */, 19 },
-  /* 6892 */  { MAD_F(0x0400ab57) /* 0.250163402 */, 19 },
-  /* 6893 */  { MAD_F(0x0400de16) /* 0.250211800 */, 19 },
-  /* 6894 */  { MAD_F(0x040110d7) /* 0.250260200 */, 19 },
-  /* 6895 */  { MAD_F(0x04014398) /* 0.250308603 */, 19 },
-
-  /* 6896 */  { MAD_F(0x04017659) /* 0.250357008 */, 19 },
-  /* 6897 */  { MAD_F(0x0401a91c) /* 0.250405415 */, 19 },
-  /* 6898 */  { MAD_F(0x0401dbdf) /* 0.250453825 */, 19 },
-  /* 6899 */  { MAD_F(0x04020ea2) /* 0.250502237 */, 19 },
-  /* 6900 */  { MAD_F(0x04024166) /* 0.250550652 */, 19 },
-  /* 6901 */  { MAD_F(0x0402742b) /* 0.250599068 */, 19 },
-  /* 6902 */  { MAD_F(0x0402a6f0) /* 0.250647488 */, 19 },
-  /* 6903 */  { MAD_F(0x0402d9b6) /* 0.250695909 */, 19 },
-  /* 6904 */  { MAD_F(0x04030c7d) /* 0.250744333 */, 19 },
-  /* 6905 */  { MAD_F(0x04033f44) /* 0.250792759 */, 19 },
-  /* 6906 */  { MAD_F(0x0403720c) /* 0.250841187 */, 19 },
-  /* 6907 */  { MAD_F(0x0403a4d5) /* 0.250889618 */, 19 },
-  /* 6908 */  { MAD_F(0x0403d79e) /* 0.250938051 */, 19 },
-  /* 6909 */  { MAD_F(0x04040a68) /* 0.250986487 */, 19 },
-  /* 6910 */  { MAD_F(0x04043d32) /* 0.251034924 */, 19 },
-  /* 6911 */  { MAD_F(0x04046ffd) /* 0.251083365 */, 19 },
-
-  /* 6912 */  { MAD_F(0x0404a2c9) /* 0.251131807 */, 19 },
-  /* 6913 */  { MAD_F(0x0404d595) /* 0.251180252 */, 19 },
-  /* 6914 */  { MAD_F(0x04050862) /* 0.251228699 */, 19 },
-  /* 6915 */  { MAD_F(0x04053b30) /* 0.251277148 */, 19 },
-  /* 6916 */  { MAD_F(0x04056dfe) /* 0.251325600 */, 19 },
-  /* 6917 */  { MAD_F(0x0405a0cd) /* 0.251374054 */, 19 },
-  /* 6918 */  { MAD_F(0x0405d39c) /* 0.251422511 */, 19 },
-  /* 6919 */  { MAD_F(0x0406066c) /* 0.251470970 */, 19 },
-  /* 6920 */  { MAD_F(0x0406393d) /* 0.251519431 */, 19 },
-  /* 6921 */  { MAD_F(0x04066c0e) /* 0.251567894 */, 19 },
-  /* 6922 */  { MAD_F(0x04069ee0) /* 0.251616360 */, 19 },
-  /* 6923 */  { MAD_F(0x0406d1b3) /* 0.251664828 */, 19 },
-  /* 6924 */  { MAD_F(0x04070486) /* 0.251713299 */, 19 },
-  /* 6925 */  { MAD_F(0x0407375a) /* 0.251761772 */, 19 },
-  /* 6926 */  { MAD_F(0x04076a2e) /* 0.251810247 */, 19 },
-  /* 6927 */  { MAD_F(0x04079d03) /* 0.251858724 */, 19 },
-
-  /* 6928 */  { MAD_F(0x0407cfd9) /* 0.251907204 */, 19 },
-  /* 6929 */  { MAD_F(0x040802af) /* 0.251955686 */, 19 },
-  /* 6930 */  { MAD_F(0x04083586) /* 0.252004171 */, 19 },
-  /* 6931 */  { MAD_F(0x0408685e) /* 0.252052658 */, 19 },
-  /* 6932 */  { MAD_F(0x04089b36) /* 0.252101147 */, 19 },
-  /* 6933 */  { MAD_F(0x0408ce0f) /* 0.252149638 */, 19 },
-  /* 6934 */  { MAD_F(0x040900e8) /* 0.252198132 */, 19 },
-  /* 6935 */  { MAD_F(0x040933c2) /* 0.252246628 */, 19 },
-  /* 6936 */  { MAD_F(0x0409669d) /* 0.252295127 */, 19 },
-  /* 6937 */  { MAD_F(0x04099978) /* 0.252343627 */, 19 },
-  /* 6938 */  { MAD_F(0x0409cc54) /* 0.252392131 */, 19 },
-  /* 6939 */  { MAD_F(0x0409ff31) /* 0.252440636 */, 19 },
-  /* 6940 */  { MAD_F(0x040a320e) /* 0.252489144 */, 19 },
-  /* 6941 */  { MAD_F(0x040a64ec) /* 0.252537654 */, 19 },
-  /* 6942 */  { MAD_F(0x040a97cb) /* 0.252586166 */, 19 },
-  /* 6943 */  { MAD_F(0x040acaaa) /* 0.252634681 */, 19 },
-
-  /* 6944 */  { MAD_F(0x040afd89) /* 0.252683198 */, 19 },
-  /* 6945 */  { MAD_F(0x040b306a) /* 0.252731718 */, 19 },
-  /* 6946 */  { MAD_F(0x040b634b) /* 0.252780240 */, 19 },
-  /* 6947 */  { MAD_F(0x040b962c) /* 0.252828764 */, 19 },
-  /* 6948 */  { MAD_F(0x040bc90e) /* 0.252877290 */, 19 },
-  /* 6949 */  { MAD_F(0x040bfbf1) /* 0.252925819 */, 19 },
-  /* 6950 */  { MAD_F(0x040c2ed5) /* 0.252974350 */, 19 },
-  /* 6951 */  { MAD_F(0x040c61b9) /* 0.253022883 */, 19 },
-  /* 6952 */  { MAD_F(0x040c949e) /* 0.253071419 */, 19 },
-  /* 6953 */  { MAD_F(0x040cc783) /* 0.253119957 */, 19 },
-  /* 6954 */  { MAD_F(0x040cfa69) /* 0.253168498 */, 19 },
-  /* 6955 */  { MAD_F(0x040d2d4f) /* 0.253217040 */, 19 },
-  /* 6956 */  { MAD_F(0x040d6037) /* 0.253265585 */, 19 },
-  /* 6957 */  { MAD_F(0x040d931e) /* 0.253314133 */, 19 },
-  /* 6958 */  { MAD_F(0x040dc607) /* 0.253362682 */, 19 },
-  /* 6959 */  { MAD_F(0x040df8f0) /* 0.253411234 */, 19 },
-
-  /* 6960 */  { MAD_F(0x040e2bda) /* 0.253459789 */, 19 },
-  /* 6961 */  { MAD_F(0x040e5ec4) /* 0.253508345 */, 19 },
-  /* 6962 */  { MAD_F(0x040e91af) /* 0.253556904 */, 19 },
-  /* 6963 */  { MAD_F(0x040ec49b) /* 0.253605466 */, 19 },
-  /* 6964 */  { MAD_F(0x040ef787) /* 0.253654029 */, 19 },
-  /* 6965 */  { MAD_F(0x040f2a74) /* 0.253702595 */, 19 },
-  /* 6966 */  { MAD_F(0x040f5d61) /* 0.253751164 */, 19 },
-  /* 6967 */  { MAD_F(0x040f904f) /* 0.253799734 */, 19 },
-  /* 6968 */  { MAD_F(0x040fc33e) /* 0.253848307 */, 19 },
-  /* 6969 */  { MAD_F(0x040ff62d) /* 0.253896883 */, 19 },
-  /* 6970 */  { MAD_F(0x0410291d) /* 0.253945460 */, 19 },
-  /* 6971 */  { MAD_F(0x04105c0e) /* 0.253994040 */, 19 },
-  /* 6972 */  { MAD_F(0x04108eff) /* 0.254042622 */, 19 },
-  /* 6973 */  { MAD_F(0x0410c1f1) /* 0.254091207 */, 19 },
-  /* 6974 */  { MAD_F(0x0410f4e3) /* 0.254139794 */, 19 },
-  /* 6975 */  { MAD_F(0x041127d6) /* 0.254188383 */, 19 },
-
-  /* 6976 */  { MAD_F(0x04115aca) /* 0.254236974 */, 19 },
-  /* 6977 */  { MAD_F(0x04118dbe) /* 0.254285568 */, 19 },
-  /* 6978 */  { MAD_F(0x0411c0b3) /* 0.254334165 */, 19 },
-  /* 6979 */  { MAD_F(0x0411f3a9) /* 0.254382763 */, 19 },
-  /* 6980 */  { MAD_F(0x0412269f) /* 0.254431364 */, 19 },
-  /* 6981 */  { MAD_F(0x04125996) /* 0.254479967 */, 19 },
-  /* 6982 */  { MAD_F(0x04128c8d) /* 0.254528572 */, 19 },
-  /* 6983 */  { MAD_F(0x0412bf85) /* 0.254577180 */, 19 },
-  /* 6984 */  { MAD_F(0x0412f27e) /* 0.254625790 */, 19 },
-  /* 6985 */  { MAD_F(0x04132577) /* 0.254674403 */, 19 },
-  /* 6986 */  { MAD_F(0x04135871) /* 0.254723017 */, 19 },
-  /* 6987 */  { MAD_F(0x04138b6c) /* 0.254771635 */, 19 },
-  /* 6988 */  { MAD_F(0x0413be67) /* 0.254820254 */, 19 },
-  /* 6989 */  { MAD_F(0x0413f163) /* 0.254868876 */, 19 },
-  /* 6990 */  { MAD_F(0x0414245f) /* 0.254917500 */, 19 },
-  /* 6991 */  { MAD_F(0x0414575c) /* 0.254966126 */, 19 },
-
-  /* 6992 */  { MAD_F(0x04148a5a) /* 0.255014755 */, 19 },
-  /* 6993 */  { MAD_F(0x0414bd58) /* 0.255063386 */, 19 },
-  /* 6994 */  { MAD_F(0x0414f057) /* 0.255112019 */, 19 },
-  /* 6995 */  { MAD_F(0x04152356) /* 0.255160655 */, 19 },
-  /* 6996 */  { MAD_F(0x04155657) /* 0.255209292 */, 19 },
-  /* 6997 */  { MAD_F(0x04158957) /* 0.255257933 */, 19 },
-  /* 6998 */  { MAD_F(0x0415bc59) /* 0.255306575 */, 19 },
-  /* 6999 */  { MAD_F(0x0415ef5b) /* 0.255355220 */, 19 },
-  /* 7000 */  { MAD_F(0x0416225d) /* 0.255403867 */, 19 },
-  /* 7001 */  { MAD_F(0x04165561) /* 0.255452517 */, 19 },
-  /* 7002 */  { MAD_F(0x04168864) /* 0.255501169 */, 19 },
-  /* 7003 */  { MAD_F(0x0416bb69) /* 0.255549823 */, 19 },
-  /* 7004 */  { MAD_F(0x0416ee6e) /* 0.255598479 */, 19 },
-  /* 7005 */  { MAD_F(0x04172174) /* 0.255647138 */, 19 },
-  /* 7006 */  { MAD_F(0x0417547a) /* 0.255695799 */, 19 },
-  /* 7007 */  { MAD_F(0x04178781) /* 0.255744463 */, 19 },
-
-  /* 7008 */  { MAD_F(0x0417ba89) /* 0.255793128 */, 19 },
-  /* 7009 */  { MAD_F(0x0417ed91) /* 0.255841796 */, 19 },
-  /* 7010 */  { MAD_F(0x0418209a) /* 0.255890467 */, 19 },
-  /* 7011 */  { MAD_F(0x041853a3) /* 0.255939139 */, 19 },
-  /* 7012 */  { MAD_F(0x041886ad) /* 0.255987814 */, 19 },
-  /* 7013 */  { MAD_F(0x0418b9b8) /* 0.256036492 */, 19 },
-  /* 7014 */  { MAD_F(0x0418ecc3) /* 0.256085171 */, 19 },
-  /* 7015 */  { MAD_F(0x04191fcf) /* 0.256133853 */, 19 },
-  /* 7016 */  { MAD_F(0x041952dc) /* 0.256182537 */, 19 },
-  /* 7017 */  { MAD_F(0x041985e9) /* 0.256231224 */, 19 },
-  /* 7018 */  { MAD_F(0x0419b8f7) /* 0.256279913 */, 19 },
-  /* 7019 */  { MAD_F(0x0419ec05) /* 0.256328604 */, 19 },
-  /* 7020 */  { MAD_F(0x041a1f15) /* 0.256377297 */, 19 },
-  /* 7021 */  { MAD_F(0x041a5224) /* 0.256425993 */, 19 },
-  /* 7022 */  { MAD_F(0x041a8534) /* 0.256474691 */, 19 },
-  /* 7023 */  { MAD_F(0x041ab845) /* 0.256523392 */, 19 },
-
-  /* 7024 */  { MAD_F(0x041aeb57) /* 0.256572095 */, 19 },
-  /* 7025 */  { MAD_F(0x041b1e69) /* 0.256620800 */, 19 },
-  /* 7026 */  { MAD_F(0x041b517c) /* 0.256669507 */, 19 },
-  /* 7027 */  { MAD_F(0x041b848f) /* 0.256718217 */, 19 },
-  /* 7028 */  { MAD_F(0x041bb7a3) /* 0.256766929 */, 19 },
-  /* 7029 */  { MAD_F(0x041beab8) /* 0.256815643 */, 19 },
-  /* 7030 */  { MAD_F(0x041c1dcd) /* 0.256864359 */, 19 },
-  /* 7031 */  { MAD_F(0x041c50e3) /* 0.256913078 */, 19 },
-  /* 7032 */  { MAD_F(0x041c83fa) /* 0.256961800 */, 19 },
-  /* 7033 */  { MAD_F(0x041cb711) /* 0.257010523 */, 19 },
-  /* 7034 */  { MAD_F(0x041cea28) /* 0.257059249 */, 19 },
-  /* 7035 */  { MAD_F(0x041d1d41) /* 0.257107977 */, 19 },
-  /* 7036 */  { MAD_F(0x041d505a) /* 0.257156708 */, 19 },
-  /* 7037 */  { MAD_F(0x041d8373) /* 0.257205440 */, 19 },
-  /* 7038 */  { MAD_F(0x041db68e) /* 0.257254175 */, 19 },
-  /* 7039 */  { MAD_F(0x041de9a8) /* 0.257302913 */, 19 },
-
-  /* 7040 */  { MAD_F(0x041e1cc4) /* 0.257351652 */, 19 },
-  /* 7041 */  { MAD_F(0x041e4fe0) /* 0.257400394 */, 19 },
-  /* 7042 */  { MAD_F(0x041e82fd) /* 0.257449139 */, 19 },
-  /* 7043 */  { MAD_F(0x041eb61a) /* 0.257497885 */, 19 },
-  /* 7044 */  { MAD_F(0x041ee938) /* 0.257546634 */, 19 },
-  /* 7045 */  { MAD_F(0x041f1c57) /* 0.257595386 */, 19 },
-  /* 7046 */  { MAD_F(0x041f4f76) /* 0.257644139 */, 19 },
-  /* 7047 */  { MAD_F(0x041f8296) /* 0.257692895 */, 19 },
-  /* 7048 */  { MAD_F(0x041fb5b6) /* 0.257741653 */, 19 },
-  /* 7049 */  { MAD_F(0x041fe8d7) /* 0.257790414 */, 19 },
-  /* 7050 */  { MAD_F(0x04201bf9) /* 0.257839176 */, 19 },
-  /* 7051 */  { MAD_F(0x04204f1b) /* 0.257887941 */, 19 },
-  /* 7052 */  { MAD_F(0x0420823e) /* 0.257936709 */, 19 },
-  /* 7053 */  { MAD_F(0x0420b561) /* 0.257985478 */, 19 },
-  /* 7054 */  { MAD_F(0x0420e885) /* 0.258034250 */, 19 },
-  /* 7055 */  { MAD_F(0x04211baa) /* 0.258083025 */, 19 },
-
-  /* 7056 */  { MAD_F(0x04214ed0) /* 0.258131801 */, 19 },
-  /* 7057 */  { MAD_F(0x042181f6) /* 0.258180580 */, 19 },
-  /* 7058 */  { MAD_F(0x0421b51c) /* 0.258229361 */, 19 },
-  /* 7059 */  { MAD_F(0x0421e843) /* 0.258278145 */, 19 },
-  /* 7060 */  { MAD_F(0x04221b6b) /* 0.258326931 */, 19 },
-  /* 7061 */  { MAD_F(0x04224e94) /* 0.258375719 */, 19 },
-  /* 7062 */  { MAD_F(0x042281bd) /* 0.258424509 */, 19 },
-  /* 7063 */  { MAD_F(0x0422b4e6) /* 0.258473302 */, 19 },
-  /* 7064 */  { MAD_F(0x0422e811) /* 0.258522097 */, 19 },
-  /* 7065 */  { MAD_F(0x04231b3c) /* 0.258570894 */, 19 },
-  /* 7066 */  { MAD_F(0x04234e67) /* 0.258619694 */, 19 },
-  /* 7067 */  { MAD_F(0x04238193) /* 0.258668496 */, 19 },
-  /* 7068 */  { MAD_F(0x0423b4c0) /* 0.258717300 */, 19 },
-  /* 7069 */  { MAD_F(0x0423e7ee) /* 0.258766106 */, 19 },
-  /* 7070 */  { MAD_F(0x04241b1c) /* 0.258814915 */, 19 },
-  /* 7071 */  { MAD_F(0x04244e4a) /* 0.258863726 */, 19 },
-
-  /* 7072 */  { MAD_F(0x04248179) /* 0.258912540 */, 19 },
-  /* 7073 */  { MAD_F(0x0424b4a9) /* 0.258961356 */, 19 },
-  /* 7074 */  { MAD_F(0x0424e7da) /* 0.259010174 */, 19 },
-  /* 7075 */  { MAD_F(0x04251b0b) /* 0.259058994 */, 19 },
-  /* 7076 */  { MAD_F(0x04254e3d) /* 0.259107817 */, 19 },
-  /* 7077 */  { MAD_F(0x0425816f) /* 0.259156642 */, 19 },
-  /* 7078 */  { MAD_F(0x0425b4a2) /* 0.259205469 */, 19 },
-  /* 7079 */  { MAD_F(0x0425e7d6) /* 0.259254298 */, 19 },
-  /* 7080 */  { MAD_F(0x04261b0a) /* 0.259303130 */, 19 },
-  /* 7081 */  { MAD_F(0x04264e3f) /* 0.259351964 */, 19 },
-  /* 7082 */  { MAD_F(0x04268174) /* 0.259400801 */, 19 },
-  /* 7083 */  { MAD_F(0x0426b4aa) /* 0.259449639 */, 19 },
-  /* 7084 */  { MAD_F(0x0426e7e1) /* 0.259498480 */, 19 },
-  /* 7085 */  { MAD_F(0x04271b18) /* 0.259547324 */, 19 },
-  /* 7086 */  { MAD_F(0x04274e50) /* 0.259596169 */, 19 },
-  /* 7087 */  { MAD_F(0x04278188) /* 0.259645017 */, 19 },
-
-  /* 7088 */  { MAD_F(0x0427b4c2) /* 0.259693868 */, 19 },
-  /* 7089 */  { MAD_F(0x0427e7fb) /* 0.259742720 */, 19 },
-  /* 7090 */  { MAD_F(0x04281b36) /* 0.259791575 */, 19 },
-  /* 7091 */  { MAD_F(0x04284e71) /* 0.259840432 */, 19 },
-  /* 7092 */  { MAD_F(0x042881ac) /* 0.259889291 */, 19 },
-  /* 7093 */  { MAD_F(0x0428b4e8) /* 0.259938153 */, 19 },
-  /* 7094 */  { MAD_F(0x0428e825) /* 0.259987017 */, 19 },
-  /* 7095 */  { MAD_F(0x04291b63) /* 0.260035883 */, 19 },
-  /* 7096 */  { MAD_F(0x04294ea1) /* 0.260084752 */, 19 },
-  /* 7097 */  { MAD_F(0x042981df) /* 0.260133623 */, 19 },
-  /* 7098 */  { MAD_F(0x0429b51f) /* 0.260182496 */, 19 },
-  /* 7099 */  { MAD_F(0x0429e85f) /* 0.260231372 */, 19 },
-  /* 7100 */  { MAD_F(0x042a1b9f) /* 0.260280249 */, 19 },
-  /* 7101 */  { MAD_F(0x042a4ee0) /* 0.260329129 */, 19 },
-  /* 7102 */  { MAD_F(0x042a8222) /* 0.260378012 */, 19 },
-  /* 7103 */  { MAD_F(0x042ab564) /* 0.260426896 */, 19 },
-
-  /* 7104 */  { MAD_F(0x042ae8a7) /* 0.260475783 */, 19 },
-  /* 7105 */  { MAD_F(0x042b1beb) /* 0.260524673 */, 19 },
-  /* 7106 */  { MAD_F(0x042b4f2f) /* 0.260573564 */, 19 },
-  /* 7107 */  { MAD_F(0x042b8274) /* 0.260622458 */, 19 },
-  /* 7108 */  { MAD_F(0x042bb5ba) /* 0.260671354 */, 19 },
-  /* 7109 */  { MAD_F(0x042be900) /* 0.260720252 */, 19 },
-  /* 7110 */  { MAD_F(0x042c1c46) /* 0.260769153 */, 19 },
-  /* 7111 */  { MAD_F(0x042c4f8e) /* 0.260818056 */, 19 },
-  /* 7112 */  { MAD_F(0x042c82d6) /* 0.260866961 */, 19 },
-  /* 7113 */  { MAD_F(0x042cb61e) /* 0.260915869 */, 19 },
-  /* 7114 */  { MAD_F(0x042ce967) /* 0.260964779 */, 19 },
-  /* 7115 */  { MAD_F(0x042d1cb1) /* 0.261013691 */, 19 },
-  /* 7116 */  { MAD_F(0x042d4ffb) /* 0.261062606 */, 19 },
-  /* 7117 */  { MAD_F(0x042d8346) /* 0.261111522 */, 19 },
-  /* 7118 */  { MAD_F(0x042db692) /* 0.261160441 */, 19 },
-  /* 7119 */  { MAD_F(0x042de9de) /* 0.261209363 */, 19 },
-
-  /* 7120 */  { MAD_F(0x042e1d2b) /* 0.261258286 */, 19 },
-  /* 7121 */  { MAD_F(0x042e5078) /* 0.261307212 */, 19 },
-  /* 7122 */  { MAD_F(0x042e83c6) /* 0.261356140 */, 19 },
-  /* 7123 */  { MAD_F(0x042eb715) /* 0.261405071 */, 19 },
-  /* 7124 */  { MAD_F(0x042eea64) /* 0.261454004 */, 19 },
-  /* 7125 */  { MAD_F(0x042f1db4) /* 0.261502939 */, 19 },
-  /* 7126 */  { MAD_F(0x042f5105) /* 0.261551876 */, 19 },
-  /* 7127 */  { MAD_F(0x042f8456) /* 0.261600816 */, 19 },
-  /* 7128 */  { MAD_F(0x042fb7a8) /* 0.261649758 */, 19 },
-  /* 7129 */  { MAD_F(0x042feafa) /* 0.261698702 */, 19 },
-  /* 7130 */  { MAD_F(0x04301e4d) /* 0.261747649 */, 19 },
-  /* 7131 */  { MAD_F(0x043051a1) /* 0.261796597 */, 19 },
-  /* 7132 */  { MAD_F(0x043084f5) /* 0.261845548 */, 19 },
-  /* 7133 */  { MAD_F(0x0430b84a) /* 0.261894502 */, 19 },
-  /* 7134 */  { MAD_F(0x0430eb9f) /* 0.261943458 */, 19 },
-  /* 7135 */  { MAD_F(0x04311ef5) /* 0.261992416 */, 19 },
-
-  /* 7136 */  { MAD_F(0x0431524c) /* 0.262041376 */, 19 },
-  /* 7137 */  { MAD_F(0x043185a3) /* 0.262090338 */, 19 },
-  /* 7138 */  { MAD_F(0x0431b8fb) /* 0.262139303 */, 19 },
-  /* 7139 */  { MAD_F(0x0431ec54) /* 0.262188270 */, 19 },
-  /* 7140 */  { MAD_F(0x04321fad) /* 0.262237240 */, 19 },
-  /* 7141 */  { MAD_F(0x04325306) /* 0.262286211 */, 19 },
-  /* 7142 */  { MAD_F(0x04328661) /* 0.262335185 */, 19 },
-  /* 7143 */  { MAD_F(0x0432b9bc) /* 0.262384162 */, 19 },
-  /* 7144 */  { MAD_F(0x0432ed17) /* 0.262433140 */, 19 },
-  /* 7145 */  { MAD_F(0x04332074) /* 0.262482121 */, 19 },
-  /* 7146 */  { MAD_F(0x043353d0) /* 0.262531104 */, 19 },
-  /* 7147 */  { MAD_F(0x0433872e) /* 0.262580089 */, 19 },
-  /* 7148 */  { MAD_F(0x0433ba8c) /* 0.262629077 */, 19 },
-  /* 7149 */  { MAD_F(0x0433edea) /* 0.262678067 */, 19 },
-  /* 7150 */  { MAD_F(0x0434214a) /* 0.262727059 */, 19 },
-  /* 7151 */  { MAD_F(0x043454aa) /* 0.262776054 */, 19 },
-
-  /* 7152 */  { MAD_F(0x0434880a) /* 0.262825051 */, 19 },
-  /* 7153 */  { MAD_F(0x0434bb6b) /* 0.262874050 */, 19 },
-  /* 7154 */  { MAD_F(0x0434eecd) /* 0.262923051 */, 19 },
-  /* 7155 */  { MAD_F(0x0435222f) /* 0.262972055 */, 19 },
-  /* 7156 */  { MAD_F(0x04355592) /* 0.263021061 */, 19 },
-  /* 7157 */  { MAD_F(0x043588f6) /* 0.263070069 */, 19 },
-  /* 7158 */  { MAD_F(0x0435bc5a) /* 0.263119079 */, 19 },
-  /* 7159 */  { MAD_F(0x0435efbf) /* 0.263168092 */, 19 },
-  /* 7160 */  { MAD_F(0x04362324) /* 0.263217107 */, 19 },
-  /* 7161 */  { MAD_F(0x0436568a) /* 0.263266125 */, 19 },
-  /* 7162 */  { MAD_F(0x043689f1) /* 0.263315144 */, 19 },
-  /* 7163 */  { MAD_F(0x0436bd58) /* 0.263364166 */, 19 },
-  /* 7164 */  { MAD_F(0x0436f0c0) /* 0.263413191 */, 19 },
-  /* 7165 */  { MAD_F(0x04372428) /* 0.263462217 */, 19 },
-  /* 7166 */  { MAD_F(0x04375791) /* 0.263511246 */, 19 },
-  /* 7167 */  { MAD_F(0x04378afb) /* 0.263560277 */, 19 },
-
-  /* 7168 */  { MAD_F(0x0437be65) /* 0.263609310 */, 19 },
-  /* 7169 */  { MAD_F(0x0437f1d0) /* 0.263658346 */, 19 },
-  /* 7170 */  { MAD_F(0x0438253c) /* 0.263707384 */, 19 },
-  /* 7171 */  { MAD_F(0x043858a8) /* 0.263756424 */, 19 },
-  /* 7172 */  { MAD_F(0x04388c14) /* 0.263805466 */, 19 },
-  /* 7173 */  { MAD_F(0x0438bf82) /* 0.263854511 */, 19 },
-  /* 7174 */  { MAD_F(0x0438f2f0) /* 0.263903558 */, 19 },
-  /* 7175 */  { MAD_F(0x0439265e) /* 0.263952607 */, 19 },
-  /* 7176 */  { MAD_F(0x043959cd) /* 0.264001659 */, 19 },
-  /* 7177 */  { MAD_F(0x04398d3d) /* 0.264050713 */, 19 },
-  /* 7178 */  { MAD_F(0x0439c0ae) /* 0.264099769 */, 19 },
-  /* 7179 */  { MAD_F(0x0439f41f) /* 0.264148827 */, 19 },
-  /* 7180 */  { MAD_F(0x043a2790) /* 0.264197888 */, 19 },
-  /* 7181 */  { MAD_F(0x043a5b02) /* 0.264246951 */, 19 },
-  /* 7182 */  { MAD_F(0x043a8e75) /* 0.264296016 */, 19 },
-  /* 7183 */  { MAD_F(0x043ac1e9) /* 0.264345084 */, 19 },
-
-  /* 7184 */  { MAD_F(0x043af55d) /* 0.264394153 */, 19 },
-  /* 7185 */  { MAD_F(0x043b28d2) /* 0.264443225 */, 19 },
-  /* 7186 */  { MAD_F(0x043b5c47) /* 0.264492300 */, 19 },
-  /* 7187 */  { MAD_F(0x043b8fbd) /* 0.264541376 */, 19 },
-  /* 7188 */  { MAD_F(0x043bc333) /* 0.264590455 */, 19 },
-  /* 7189 */  { MAD_F(0x043bf6aa) /* 0.264639536 */, 19 },
-  /* 7190 */  { MAD_F(0x043c2a22) /* 0.264688620 */, 19 },
-  /* 7191 */  { MAD_F(0x043c5d9a) /* 0.264737706 */, 19 },
-  /* 7192 */  { MAD_F(0x043c9113) /* 0.264786794 */, 19 },
-  /* 7193 */  { MAD_F(0x043cc48d) /* 0.264835884 */, 19 },
-  /* 7194 */  { MAD_F(0x043cf807) /* 0.264884976 */, 19 },
-  /* 7195 */  { MAD_F(0x043d2b82) /* 0.264934071 */, 19 },
-  /* 7196 */  { MAD_F(0x043d5efd) /* 0.264983168 */, 19 },
-  /* 7197 */  { MAD_F(0x043d9279) /* 0.265032268 */, 19 },
-  /* 7198 */  { MAD_F(0x043dc5f6) /* 0.265081369 */, 19 },
-  /* 7199 */  { MAD_F(0x043df973) /* 0.265130473 */, 19 },
-
-  /* 7200 */  { MAD_F(0x043e2cf1) /* 0.265179580 */, 19 },
-  /* 7201 */  { MAD_F(0x043e6070) /* 0.265228688 */, 19 },
-  /* 7202 */  { MAD_F(0x043e93ef) /* 0.265277799 */, 19 },
-  /* 7203 */  { MAD_F(0x043ec76e) /* 0.265326912 */, 19 },
-  /* 7204 */  { MAD_F(0x043efaef) /* 0.265376027 */, 19 },
-  /* 7205 */  { MAD_F(0x043f2e6f) /* 0.265425145 */, 19 },
-  /* 7206 */  { MAD_F(0x043f61f1) /* 0.265474264 */, 19 },
-  /* 7207 */  { MAD_F(0x043f9573) /* 0.265523387 */, 19 },
-  /* 7208 */  { MAD_F(0x043fc8f6) /* 0.265572511 */, 19 },
-  /* 7209 */  { MAD_F(0x043ffc79) /* 0.265621638 */, 19 },
-  /* 7210 */  { MAD_F(0x04402ffd) /* 0.265670766 */, 19 },
-  /* 7211 */  { MAD_F(0x04406382) /* 0.265719898 */, 19 },
-  /* 7212 */  { MAD_F(0x04409707) /* 0.265769031 */, 19 },
-  /* 7213 */  { MAD_F(0x0440ca8d) /* 0.265818167 */, 19 },
-  /* 7214 */  { MAD_F(0x0440fe13) /* 0.265867305 */, 19 },
-  /* 7215 */  { MAD_F(0x0441319a) /* 0.265916445 */, 19 },
-
-  /* 7216 */  { MAD_F(0x04416522) /* 0.265965588 */, 19 },
-  /* 7217 */  { MAD_F(0x044198aa) /* 0.266014732 */, 19 },
-  /* 7218 */  { MAD_F(0x0441cc33) /* 0.266063880 */, 19 },
-  /* 7219 */  { MAD_F(0x0441ffbc) /* 0.266113029 */, 19 },
-  /* 7220 */  { MAD_F(0x04423346) /* 0.266162181 */, 19 },
-  /* 7221 */  { MAD_F(0x044266d1) /* 0.266211334 */, 19 },
-  /* 7222 */  { MAD_F(0x04429a5c) /* 0.266260491 */, 19 },
-  /* 7223 */  { MAD_F(0x0442cde8) /* 0.266309649 */, 19 },
-  /* 7224 */  { MAD_F(0x04430174) /* 0.266358810 */, 19 },
-  /* 7225 */  { MAD_F(0x04433501) /* 0.266407973 */, 19 },
-  /* 7226 */  { MAD_F(0x0443688f) /* 0.266457138 */, 19 },
-  /* 7227 */  { MAD_F(0x04439c1d) /* 0.266506305 */, 19 },
-  /* 7228 */  { MAD_F(0x0443cfac) /* 0.266555475 */, 19 },
-  /* 7229 */  { MAD_F(0x0444033c) /* 0.266604647 */, 19 },
-  /* 7230 */  { MAD_F(0x044436cc) /* 0.266653822 */, 19 },
-  /* 7231 */  { MAD_F(0x04446a5d) /* 0.266702998 */, 19 },
-
-  /* 7232 */  { MAD_F(0x04449dee) /* 0.266752177 */, 19 },
-  /* 7233 */  { MAD_F(0x0444d180) /* 0.266801358 */, 19 },
-  /* 7234 */  { MAD_F(0x04450513) /* 0.266850541 */, 19 },
-  /* 7235 */  { MAD_F(0x044538a6) /* 0.266899727 */, 19 },
-  /* 7236 */  { MAD_F(0x04456c39) /* 0.266948915 */, 19 },
-  /* 7237 */  { MAD_F(0x04459fce) /* 0.266998105 */, 19 },
-  /* 7238 */  { MAD_F(0x0445d363) /* 0.267047298 */, 19 },
-  /* 7239 */  { MAD_F(0x044606f8) /* 0.267096492 */, 19 },
-  /* 7240 */  { MAD_F(0x04463a8f) /* 0.267145689 */, 19 },
-  /* 7241 */  { MAD_F(0x04466e25) /* 0.267194888 */, 19 },
-  /* 7242 */  { MAD_F(0x0446a1bd) /* 0.267244090 */, 19 },
-  /* 7243 */  { MAD_F(0x0446d555) /* 0.267293294 */, 19 },
-  /* 7244 */  { MAD_F(0x044708ee) /* 0.267342500 */, 19 },
-  /* 7245 */  { MAD_F(0x04473c87) /* 0.267391708 */, 19 },
-  /* 7246 */  { MAD_F(0x04477021) /* 0.267440919 */, 19 },
-  /* 7247 */  { MAD_F(0x0447a3bb) /* 0.267490131 */, 19 },
-
-  /* 7248 */  { MAD_F(0x0447d756) /* 0.267539347 */, 19 },
-  /* 7249 */  { MAD_F(0x04480af2) /* 0.267588564 */, 19 },
-  /* 7250 */  { MAD_F(0x04483e8e) /* 0.267637783 */, 19 },
-  /* 7251 */  { MAD_F(0x0448722b) /* 0.267687005 */, 19 },
-  /* 7252 */  { MAD_F(0x0448a5c9) /* 0.267736229 */, 19 },
-  /* 7253 */  { MAD_F(0x0448d967) /* 0.267785456 */, 19 },
-  /* 7254 */  { MAD_F(0x04490d05) /* 0.267834685 */, 19 },
-  /* 7255 */  { MAD_F(0x044940a5) /* 0.267883915 */, 19 },
-  /* 7256 */  { MAD_F(0x04497445) /* 0.267933149 */, 19 },
-  /* 7257 */  { MAD_F(0x0449a7e5) /* 0.267982384 */, 19 },
-  /* 7258 */  { MAD_F(0x0449db86) /* 0.268031622 */, 19 },
-  /* 7259 */  { MAD_F(0x044a0f28) /* 0.268080862 */, 19 },
-  /* 7260 */  { MAD_F(0x044a42ca) /* 0.268130104 */, 19 },
-  /* 7261 */  { MAD_F(0x044a766d) /* 0.268179349 */, 19 },
-  /* 7262 */  { MAD_F(0x044aaa11) /* 0.268228595 */, 19 },
-  /* 7263 */  { MAD_F(0x044addb5) /* 0.268277844 */, 19 },
-
-  /* 7264 */  { MAD_F(0x044b115a) /* 0.268327096 */, 19 },
-  /* 7265 */  { MAD_F(0x044b44ff) /* 0.268376349 */, 19 },
-  /* 7266 */  { MAD_F(0x044b78a5) /* 0.268425605 */, 19 },
-  /* 7267 */  { MAD_F(0x044bac4c) /* 0.268474863 */, 19 },
-  /* 7268 */  { MAD_F(0x044bdff3) /* 0.268524123 */, 19 },
-  /* 7269 */  { MAD_F(0x044c139b) /* 0.268573386 */, 19 },
-  /* 7270 */  { MAD_F(0x044c4743) /* 0.268622651 */, 19 },
-  /* 7271 */  { MAD_F(0x044c7aec) /* 0.268671918 */, 19 },
-  /* 7272 */  { MAD_F(0x044cae96) /* 0.268721187 */, 19 },
-  /* 7273 */  { MAD_F(0x044ce240) /* 0.268770459 */, 19 },
-  /* 7274 */  { MAD_F(0x044d15eb) /* 0.268819733 */, 19 },
-  /* 7275 */  { MAD_F(0x044d4997) /* 0.268869009 */, 19 },
-  /* 7276 */  { MAD_F(0x044d7d43) /* 0.268918287 */, 19 },
-  /* 7277 */  { MAD_F(0x044db0ef) /* 0.268967568 */, 19 },
-  /* 7278 */  { MAD_F(0x044de49d) /* 0.269016851 */, 19 },
-  /* 7279 */  { MAD_F(0x044e184b) /* 0.269066136 */, 19 },
-
-  /* 7280 */  { MAD_F(0x044e4bf9) /* 0.269115423 */, 19 },
-  /* 7281 */  { MAD_F(0x044e7fa8) /* 0.269164713 */, 19 },
-  /* 7282 */  { MAD_F(0x044eb358) /* 0.269214005 */, 19 },
-  /* 7283 */  { MAD_F(0x044ee708) /* 0.269263299 */, 19 },
-  /* 7284 */  { MAD_F(0x044f1ab9) /* 0.269312595 */, 19 },
-  /* 7285 */  { MAD_F(0x044f4e6b) /* 0.269361894 */, 19 },
-  /* 7286 */  { MAD_F(0x044f821d) /* 0.269411195 */, 19 },
-  /* 7287 */  { MAD_F(0x044fb5cf) /* 0.269460498 */, 19 },
-  /* 7288 */  { MAD_F(0x044fe983) /* 0.269509804 */, 19 },
-  /* 7289 */  { MAD_F(0x04501d37) /* 0.269559111 */, 19 },
-  /* 7290 */  { MAD_F(0x045050eb) /* 0.269608421 */, 19 },
-  /* 7291 */  { MAD_F(0x045084a0) /* 0.269657734 */, 19 },
-  /* 7292 */  { MAD_F(0x0450b856) /* 0.269707048 */, 19 },
-  /* 7293 */  { MAD_F(0x0450ec0d) /* 0.269756365 */, 19 },
-  /* 7294 */  { MAD_F(0x04511fc4) /* 0.269805684 */, 19 },
-  /* 7295 */  { MAD_F(0x0451537b) /* 0.269855005 */, 19 },
-
-  /* 7296 */  { MAD_F(0x04518733) /* 0.269904329 */, 19 },
-  /* 7297 */  { MAD_F(0x0451baec) /* 0.269953654 */, 19 },
-  /* 7298 */  { MAD_F(0x0451eea5) /* 0.270002982 */, 19 },
-  /* 7299 */  { MAD_F(0x0452225f) /* 0.270052313 */, 19 },
-  /* 7300 */  { MAD_F(0x0452561a) /* 0.270101645 */, 19 },
-  /* 7301 */  { MAD_F(0x045289d5) /* 0.270150980 */, 19 },
-  /* 7302 */  { MAD_F(0x0452bd91) /* 0.270200317 */, 19 },
-  /* 7303 */  { MAD_F(0x0452f14d) /* 0.270249656 */, 19 },
-  /* 7304 */  { MAD_F(0x0453250a) /* 0.270298998 */, 19 },
-  /* 7305 */  { MAD_F(0x045358c8) /* 0.270348341 */, 19 },
-  /* 7306 */  { MAD_F(0x04538c86) /* 0.270397687 */, 19 },
-  /* 7307 */  { MAD_F(0x0453c045) /* 0.270447036 */, 19 },
-  /* 7308 */  { MAD_F(0x0453f405) /* 0.270496386 */, 19 },
-  /* 7309 */  { MAD_F(0x045427c5) /* 0.270545739 */, 19 },
-  /* 7310 */  { MAD_F(0x04545b85) /* 0.270595094 */, 19 },
-  /* 7311 */  { MAD_F(0x04548f46) /* 0.270644451 */, 19 },
-
-  /* 7312 */  { MAD_F(0x0454c308) /* 0.270693811 */, 19 },
-  /* 7313 */  { MAD_F(0x0454f6cb) /* 0.270743173 */, 19 },
-  /* 7314 */  { MAD_F(0x04552a8e) /* 0.270792537 */, 19 },
-  /* 7315 */  { MAD_F(0x04555e51) /* 0.270841903 */, 19 },
-  /* 7316 */  { MAD_F(0x04559216) /* 0.270891271 */, 19 },
-  /* 7317 */  { MAD_F(0x0455c5db) /* 0.270940642 */, 19 },
-  /* 7318 */  { MAD_F(0x0455f9a0) /* 0.270990015 */, 19 },
-  /* 7319 */  { MAD_F(0x04562d66) /* 0.271039390 */, 19 },
-  /* 7320 */  { MAD_F(0x0456612d) /* 0.271088768 */, 19 },
-  /* 7321 */  { MAD_F(0x045694f4) /* 0.271138148 */, 19 },
-  /* 7322 */  { MAD_F(0x0456c8bc) /* 0.271187530 */, 19 },
-  /* 7323 */  { MAD_F(0x0456fc84) /* 0.271236914 */, 19 },
-  /* 7324 */  { MAD_F(0x0457304e) /* 0.271286301 */, 19 },
-  /* 7325 */  { MAD_F(0x04576417) /* 0.271335689 */, 19 },
-  /* 7326 */  { MAD_F(0x045797e2) /* 0.271385080 */, 19 },
-  /* 7327 */  { MAD_F(0x0457cbac) /* 0.271434474 */, 19 },
-
-  /* 7328 */  { MAD_F(0x0457ff78) /* 0.271483869 */, 19 },
-  /* 7329 */  { MAD_F(0x04583344) /* 0.271533267 */, 19 },
-  /* 7330 */  { MAD_F(0x04586711) /* 0.271582667 */, 19 },
-  /* 7331 */  { MAD_F(0x04589ade) /* 0.271632069 */, 19 },
-  /* 7332 */  { MAD_F(0x0458ceac) /* 0.271681474 */, 19 },
-  /* 7333 */  { MAD_F(0x0459027b) /* 0.271730880 */, 19 },
-  /* 7334 */  { MAD_F(0x0459364a) /* 0.271780289 */, 19 },
-  /* 7335 */  { MAD_F(0x04596a19) /* 0.271829701 */, 19 },
-  /* 7336 */  { MAD_F(0x04599dea) /* 0.271879114 */, 19 },
-  /* 7337 */  { MAD_F(0x0459d1bb) /* 0.271928530 */, 19 },
-  /* 7338 */  { MAD_F(0x045a058c) /* 0.271977948 */, 19 },
-  /* 7339 */  { MAD_F(0x045a395e) /* 0.272027368 */, 19 },
-  /* 7340 */  { MAD_F(0x045a6d31) /* 0.272076790 */, 19 },
-  /* 7341 */  { MAD_F(0x045aa104) /* 0.272126215 */, 19 },
-  /* 7342 */  { MAD_F(0x045ad4d8) /* 0.272175642 */, 19 },
-  /* 7343 */  { MAD_F(0x045b08ad) /* 0.272225071 */, 19 },
-
-  /* 7344 */  { MAD_F(0x045b3c82) /* 0.272274503 */, 19 },
-  /* 7345 */  { MAD_F(0x045b7058) /* 0.272323936 */, 19 },
-  /* 7346 */  { MAD_F(0x045ba42e) /* 0.272373372 */, 19 },
-  /* 7347 */  { MAD_F(0x045bd805) /* 0.272422810 */, 19 },
-  /* 7348 */  { MAD_F(0x045c0bdd) /* 0.272472251 */, 19 },
-  /* 7349 */  { MAD_F(0x045c3fb5) /* 0.272521693 */, 19 },
-  /* 7350 */  { MAD_F(0x045c738e) /* 0.272571138 */, 19 },
-  /* 7351 */  { MAD_F(0x045ca767) /* 0.272620585 */, 19 },
-  /* 7352 */  { MAD_F(0x045cdb41) /* 0.272670035 */, 19 },
-  /* 7353 */  { MAD_F(0x045d0f1b) /* 0.272719486 */, 19 },
-  /* 7354 */  { MAD_F(0x045d42f7) /* 0.272768940 */, 19 },
-  /* 7355 */  { MAD_F(0x045d76d2) /* 0.272818396 */, 19 },
-  /* 7356 */  { MAD_F(0x045daaaf) /* 0.272867855 */, 19 },
-  /* 7357 */  { MAD_F(0x045dde8c) /* 0.272917315 */, 19 },
-  /* 7358 */  { MAD_F(0x045e1269) /* 0.272966778 */, 19 },
-  /* 7359 */  { MAD_F(0x045e4647) /* 0.273016243 */, 19 },
-
-  /* 7360 */  { MAD_F(0x045e7a26) /* 0.273065710 */, 19 },
-  /* 7361 */  { MAD_F(0x045eae06) /* 0.273115180 */, 19 },
-  /* 7362 */  { MAD_F(0x045ee1e6) /* 0.273164652 */, 19 },
-  /* 7363 */  { MAD_F(0x045f15c6) /* 0.273214126 */, 19 },
-  /* 7364 */  { MAD_F(0x045f49a7) /* 0.273263602 */, 19 },
-  /* 7365 */  { MAD_F(0x045f7d89) /* 0.273313081 */, 19 },
-  /* 7366 */  { MAD_F(0x045fb16c) /* 0.273362561 */, 19 },
-  /* 7367 */  { MAD_F(0x045fe54f) /* 0.273412044 */, 19 },
-  /* 7368 */  { MAD_F(0x04601932) /* 0.273461530 */, 19 },
-  /* 7369 */  { MAD_F(0x04604d16) /* 0.273511017 */, 19 },
-  /* 7370 */  { MAD_F(0x046080fb) /* 0.273560507 */, 19 },
-  /* 7371 */  { MAD_F(0x0460b4e1) /* 0.273609999 */, 19 },
-  /* 7372 */  { MAD_F(0x0460e8c7) /* 0.273659493 */, 19 },
-  /* 7373 */  { MAD_F(0x04611cad) /* 0.273708989 */, 19 },
-  /* 7374 */  { MAD_F(0x04615094) /* 0.273758488 */, 19 },
-  /* 7375 */  { MAD_F(0x0461847c) /* 0.273807989 */, 19 },
-
-  /* 7376 */  { MAD_F(0x0461b864) /* 0.273857492 */, 19 },
-  /* 7377 */  { MAD_F(0x0461ec4d) /* 0.273906997 */, 19 },
-  /* 7378 */  { MAD_F(0x04622037) /* 0.273956505 */, 19 },
-  /* 7379 */  { MAD_F(0x04625421) /* 0.274006015 */, 19 },
-  /* 7380 */  { MAD_F(0x0462880c) /* 0.274055527 */, 19 },
-  /* 7381 */  { MAD_F(0x0462bbf7) /* 0.274105041 */, 19 },
-  /* 7382 */  { MAD_F(0x0462efe3) /* 0.274154558 */, 19 },
-  /* 7383 */  { MAD_F(0x046323d0) /* 0.274204076 */, 19 },
-  /* 7384 */  { MAD_F(0x046357bd) /* 0.274253597 */, 19 },
-  /* 7385 */  { MAD_F(0x04638bab) /* 0.274303121 */, 19 },
-  /* 7386 */  { MAD_F(0x0463bf99) /* 0.274352646 */, 19 },
-  /* 7387 */  { MAD_F(0x0463f388) /* 0.274402174 */, 19 },
-  /* 7388 */  { MAD_F(0x04642778) /* 0.274451704 */, 19 },
-  /* 7389 */  { MAD_F(0x04645b68) /* 0.274501236 */, 19 },
-  /* 7390 */  { MAD_F(0x04648f59) /* 0.274550771 */, 19 },
-  /* 7391 */  { MAD_F(0x0464c34a) /* 0.274600307 */, 19 },
-
-  /* 7392 */  { MAD_F(0x0464f73c) /* 0.274649846 */, 19 },
-  /* 7393 */  { MAD_F(0x04652b2f) /* 0.274699387 */, 19 },
-  /* 7394 */  { MAD_F(0x04655f22) /* 0.274748931 */, 19 },
-  /* 7395 */  { MAD_F(0x04659316) /* 0.274798476 */, 19 },
-  /* 7396 */  { MAD_F(0x0465c70a) /* 0.274848024 */, 19 },
-  /* 7397 */  { MAD_F(0x0465faff) /* 0.274897574 */, 19 },
-  /* 7398 */  { MAD_F(0x04662ef5) /* 0.274947126 */, 19 },
-  /* 7399 */  { MAD_F(0x046662eb) /* 0.274996681 */, 19 },
-  /* 7400 */  { MAD_F(0x046696e2) /* 0.275046238 */, 19 },
-  /* 7401 */  { MAD_F(0x0466cad9) /* 0.275095797 */, 19 },
-  /* 7402 */  { MAD_F(0x0466fed1) /* 0.275145358 */, 19 },
-  /* 7403 */  { MAD_F(0x046732ca) /* 0.275194921 */, 19 },
-  /* 7404 */  { MAD_F(0x046766c3) /* 0.275244487 */, 19 },
-  /* 7405 */  { MAD_F(0x04679abd) /* 0.275294055 */, 19 },
-  /* 7406 */  { MAD_F(0x0467ceb7) /* 0.275343625 */, 19 },
-  /* 7407 */  { MAD_F(0x046802b2) /* 0.275393198 */, 19 },
-
-  /* 7408 */  { MAD_F(0x046836ae) /* 0.275442772 */, 19 },
-  /* 7409 */  { MAD_F(0x04686aaa) /* 0.275492349 */, 19 },
-  /* 7410 */  { MAD_F(0x04689ea7) /* 0.275541928 */, 19 },
-  /* 7411 */  { MAD_F(0x0468d2a4) /* 0.275591509 */, 19 },
-  /* 7412 */  { MAD_F(0x046906a2) /* 0.275641093 */, 19 },
-  /* 7413 */  { MAD_F(0x04693aa1) /* 0.275690679 */, 19 },
-  /* 7414 */  { MAD_F(0x04696ea0) /* 0.275740267 */, 19 },
-  /* 7415 */  { MAD_F(0x0469a2a0) /* 0.275789857 */, 19 },
-  /* 7416 */  { MAD_F(0x0469d6a0) /* 0.275839449 */, 19 },
-  /* 7417 */  { MAD_F(0x046a0aa1) /* 0.275889044 */, 19 },
-  /* 7418 */  { MAD_F(0x046a3ea3) /* 0.275938641 */, 19 },
-  /* 7419 */  { MAD_F(0x046a72a5) /* 0.275988240 */, 19 },
-  /* 7420 */  { MAD_F(0x046aa6a8) /* 0.276037842 */, 19 },
-  /* 7421 */  { MAD_F(0x046adaab) /* 0.276087445 */, 19 },
-  /* 7422 */  { MAD_F(0x046b0eaf) /* 0.276137051 */, 19 },
-  /* 7423 */  { MAD_F(0x046b42b3) /* 0.276186659 */, 19 },
-
-  /* 7424 */  { MAD_F(0x046b76b9) /* 0.276236269 */, 19 },
-  /* 7425 */  { MAD_F(0x046baabe) /* 0.276285882 */, 19 },
-  /* 7426 */  { MAD_F(0x046bdec5) /* 0.276335497 */, 19 },
-  /* 7427 */  { MAD_F(0x046c12cc) /* 0.276385113 */, 19 },
-  /* 7428 */  { MAD_F(0x046c46d3) /* 0.276434733 */, 19 },
-  /* 7429 */  { MAD_F(0x046c7adb) /* 0.276484354 */, 19 },
-  /* 7430 */  { MAD_F(0x046caee4) /* 0.276533978 */, 19 },
-  /* 7431 */  { MAD_F(0x046ce2ee) /* 0.276583604 */, 19 },
-  /* 7432 */  { MAD_F(0x046d16f7) /* 0.276633232 */, 19 },
-  /* 7433 */  { MAD_F(0x046d4b02) /* 0.276682862 */, 19 },
-  /* 7434 */  { MAD_F(0x046d7f0d) /* 0.276732495 */, 19 },
-  /* 7435 */  { MAD_F(0x046db319) /* 0.276782129 */, 19 },
-  /* 7436 */  { MAD_F(0x046de725) /* 0.276831766 */, 19 },
-  /* 7437 */  { MAD_F(0x046e1b32) /* 0.276881406 */, 19 },
-  /* 7438 */  { MAD_F(0x046e4f40) /* 0.276931047 */, 19 },
-  /* 7439 */  { MAD_F(0x046e834e) /* 0.276980691 */, 19 },
-
-  /* 7440 */  { MAD_F(0x046eb75c) /* 0.277030337 */, 19 },
-  /* 7441 */  { MAD_F(0x046eeb6c) /* 0.277079985 */, 19 },
-  /* 7442 */  { MAD_F(0x046f1f7c) /* 0.277129635 */, 19 },
-  /* 7443 */  { MAD_F(0x046f538c) /* 0.277179288 */, 19 },
-  /* 7444 */  { MAD_F(0x046f879d) /* 0.277228942 */, 19 },
-  /* 7445 */  { MAD_F(0x046fbbaf) /* 0.277278600 */, 19 },
-  /* 7446 */  { MAD_F(0x046fefc1) /* 0.277328259 */, 19 },
-  /* 7447 */  { MAD_F(0x047023d4) /* 0.277377920 */, 19 },
-  /* 7448 */  { MAD_F(0x047057e8) /* 0.277427584 */, 19 },
-  /* 7449 */  { MAD_F(0x04708bfc) /* 0.277477250 */, 19 },
-  /* 7450 */  { MAD_F(0x0470c011) /* 0.277526918 */, 19 },
-  /* 7451 */  { MAD_F(0x0470f426) /* 0.277576588 */, 19 },
-  /* 7452 */  { MAD_F(0x0471283c) /* 0.277626261 */, 19 },
-  /* 7453 */  { MAD_F(0x04715c52) /* 0.277675936 */, 19 },
-  /* 7454 */  { MAD_F(0x04719069) /* 0.277725613 */, 19 },
-  /* 7455 */  { MAD_F(0x0471c481) /* 0.277775292 */, 19 },
-
-  /* 7456 */  { MAD_F(0x0471f899) /* 0.277824973 */, 19 },
-  /* 7457 */  { MAD_F(0x04722cb2) /* 0.277874657 */, 19 },
-  /* 7458 */  { MAD_F(0x047260cc) /* 0.277924343 */, 19 },
-  /* 7459 */  { MAD_F(0x047294e6) /* 0.277974031 */, 19 },
-  /* 7460 */  { MAD_F(0x0472c900) /* 0.278023722 */, 19 },
-  /* 7461 */  { MAD_F(0x0472fd1b) /* 0.278073414 */, 19 },
-  /* 7462 */  { MAD_F(0x04733137) /* 0.278123109 */, 19 },
-  /* 7463 */  { MAD_F(0x04736554) /* 0.278172806 */, 19 },
-  /* 7464 */  { MAD_F(0x04739971) /* 0.278222505 */, 19 },
-  /* 7465 */  { MAD_F(0x0473cd8e) /* 0.278272207 */, 19 },
-  /* 7466 */  { MAD_F(0x047401ad) /* 0.278321910 */, 19 },
-  /* 7467 */  { MAD_F(0x047435cb) /* 0.278371616 */, 19 },
-  /* 7468 */  { MAD_F(0x047469eb) /* 0.278421324 */, 19 },
-  /* 7469 */  { MAD_F(0x04749e0b) /* 0.278471035 */, 19 },
-  /* 7470 */  { MAD_F(0x0474d22c) /* 0.278520747 */, 19 },
-  /* 7471 */  { MAD_F(0x0475064d) /* 0.278570462 */, 19 },
-
-  /* 7472 */  { MAD_F(0x04753a6f) /* 0.278620179 */, 19 },
-  /* 7473 */  { MAD_F(0x04756e91) /* 0.278669898 */, 19 },
-  /* 7474 */  { MAD_F(0x0475a2b4) /* 0.278719619 */, 19 },
-  /* 7475 */  { MAD_F(0x0475d6d7) /* 0.278769343 */, 19 },
-  /* 7476 */  { MAD_F(0x04760afc) /* 0.278819069 */, 19 },
-  /* 7477 */  { MAD_F(0x04763f20) /* 0.278868797 */, 19 },
-  /* 7478 */  { MAD_F(0x04767346) /* 0.278918527 */, 19 },
-  /* 7479 */  { MAD_F(0x0476a76c) /* 0.278968260 */, 19 },
-  /* 7480 */  { MAD_F(0x0476db92) /* 0.279017995 */, 19 },
-  /* 7481 */  { MAD_F(0x04770fba) /* 0.279067731 */, 19 },
-  /* 7482 */  { MAD_F(0x047743e1) /* 0.279117471 */, 19 },
-  /* 7483 */  { MAD_F(0x0477780a) /* 0.279167212 */, 19 },
-  /* 7484 */  { MAD_F(0x0477ac33) /* 0.279216956 */, 19 },
-  /* 7485 */  { MAD_F(0x0477e05c) /* 0.279266701 */, 19 },
-  /* 7486 */  { MAD_F(0x04781486) /* 0.279316449 */, 19 },
-  /* 7487 */  { MAD_F(0x047848b1) /* 0.279366200 */, 19 },
-
-  /* 7488 */  { MAD_F(0x04787cdc) /* 0.279415952 */, 19 },
-  /* 7489 */  { MAD_F(0x0478b108) /* 0.279465707 */, 19 },
-  /* 7490 */  { MAD_F(0x0478e535) /* 0.279515464 */, 19 },
-  /* 7491 */  { MAD_F(0x04791962) /* 0.279565223 */, 19 },
-  /* 7492 */  { MAD_F(0x04794d8f) /* 0.279614984 */, 19 },
-  /* 7493 */  { MAD_F(0x047981be) /* 0.279664748 */, 19 },
-  /* 7494 */  { MAD_F(0x0479b5ed) /* 0.279714513 */, 19 },
-  /* 7495 */  { MAD_F(0x0479ea1c) /* 0.279764281 */, 19 },
-  /* 7496 */  { MAD_F(0x047a1e4c) /* 0.279814051 */, 19 },
-  /* 7497 */  { MAD_F(0x047a527d) /* 0.279863824 */, 19 },
-  /* 7498 */  { MAD_F(0x047a86ae) /* 0.279913598 */, 19 },
-  /* 7499 */  { MAD_F(0x047abae0) /* 0.279963375 */, 19 },
-  /* 7500 */  { MAD_F(0x047aef12) /* 0.280013154 */, 19 },
-  /* 7501 */  { MAD_F(0x047b2346) /* 0.280062935 */, 19 },
-  /* 7502 */  { MAD_F(0x047b5779) /* 0.280112719 */, 19 },
-  /* 7503 */  { MAD_F(0x047b8bad) /* 0.280162504 */, 19 },
-
-  /* 7504 */  { MAD_F(0x047bbfe2) /* 0.280212292 */, 19 },
-  /* 7505 */  { MAD_F(0x047bf418) /* 0.280262082 */, 19 },
-  /* 7506 */  { MAD_F(0x047c284e) /* 0.280311875 */, 19 },
-  /* 7507 */  { MAD_F(0x047c5c84) /* 0.280361669 */, 19 },
-  /* 7508 */  { MAD_F(0x047c90bb) /* 0.280411466 */, 19 },
-  /* 7509 */  { MAD_F(0x047cc4f3) /* 0.280461265 */, 19 },
-  /* 7510 */  { MAD_F(0x047cf92c) /* 0.280511066 */, 19 },
-  /* 7511 */  { MAD_F(0x047d2d65) /* 0.280560869 */, 19 },
-  /* 7512 */  { MAD_F(0x047d619e) /* 0.280610675 */, 19 },
-  /* 7513 */  { MAD_F(0x047d95d8) /* 0.280660483 */, 19 },
-  /* 7514 */  { MAD_F(0x047dca13) /* 0.280710292 */, 19 },
-  /* 7515 */  { MAD_F(0x047dfe4e) /* 0.280760105 */, 19 },
-  /* 7516 */  { MAD_F(0x047e328a) /* 0.280809919 */, 19 },
-  /* 7517 */  { MAD_F(0x047e66c7) /* 0.280859736 */, 19 },
-  /* 7518 */  { MAD_F(0x047e9b04) /* 0.280909554 */, 19 },
-  /* 7519 */  { MAD_F(0x047ecf42) /* 0.280959375 */, 19 },
-
-  /* 7520 */  { MAD_F(0x047f0380) /* 0.281009199 */, 19 },
-  /* 7521 */  { MAD_F(0x047f37bf) /* 0.281059024 */, 19 },
-  /* 7522 */  { MAD_F(0x047f6bff) /* 0.281108852 */, 19 },
-  /* 7523 */  { MAD_F(0x047fa03f) /* 0.281158682 */, 19 },
-  /* 7524 */  { MAD_F(0x047fd47f) /* 0.281208514 */, 19 },
-  /* 7525 */  { MAD_F(0x048008c1) /* 0.281258348 */, 19 },
-  /* 7526 */  { MAD_F(0x04803d02) /* 0.281308184 */, 19 },
-  /* 7527 */  { MAD_F(0x04807145) /* 0.281358023 */, 19 },
-  /* 7528 */  { MAD_F(0x0480a588) /* 0.281407864 */, 19 },
-  /* 7529 */  { MAD_F(0x0480d9cc) /* 0.281457707 */, 19 },
-  /* 7530 */  { MAD_F(0x04810e10) /* 0.281507552 */, 19 },
-  /* 7531 */  { MAD_F(0x04814255) /* 0.281557400 */, 19 },
-  /* 7532 */  { MAD_F(0x0481769a) /* 0.281607250 */, 19 },
-  /* 7533 */  { MAD_F(0x0481aae0) /* 0.281657101 */, 19 },
-  /* 7534 */  { MAD_F(0x0481df27) /* 0.281706956 */, 19 },
-  /* 7535 */  { MAD_F(0x0482136e) /* 0.281756812 */, 19 },
-
-  /* 7536 */  { MAD_F(0x048247b6) /* 0.281806670 */, 19 },
-  /* 7537 */  { MAD_F(0x04827bfe) /* 0.281856531 */, 19 },
-  /* 7538 */  { MAD_F(0x0482b047) /* 0.281906394 */, 19 },
-  /* 7539 */  { MAD_F(0x0482e491) /* 0.281956259 */, 19 },
-  /* 7540 */  { MAD_F(0x048318db) /* 0.282006127 */, 19 },
-  /* 7541 */  { MAD_F(0x04834d26) /* 0.282055996 */, 19 },
-  /* 7542 */  { MAD_F(0x04838171) /* 0.282105868 */, 19 },
-  /* 7543 */  { MAD_F(0x0483b5bd) /* 0.282155742 */, 19 },
-  /* 7544 */  { MAD_F(0x0483ea0a) /* 0.282205618 */, 19 },
-  /* 7545 */  { MAD_F(0x04841e57) /* 0.282255496 */, 19 },
-  /* 7546 */  { MAD_F(0x048452a4) /* 0.282305377 */, 19 },
-  /* 7547 */  { MAD_F(0x048486f3) /* 0.282355260 */, 19 },
-  /* 7548 */  { MAD_F(0x0484bb42) /* 0.282405145 */, 19 },
-  /* 7549 */  { MAD_F(0x0484ef91) /* 0.282455032 */, 19 },
-  /* 7550 */  { MAD_F(0x048523e1) /* 0.282504921 */, 19 },
-  /* 7551 */  { MAD_F(0x04855832) /* 0.282554813 */, 19 },
-
-  /* 7552 */  { MAD_F(0x04858c83) /* 0.282604707 */, 19 },
-  /* 7553 */  { MAD_F(0x0485c0d5) /* 0.282654603 */, 19 },
-  /* 7554 */  { MAD_F(0x0485f527) /* 0.282704501 */, 19 },
-  /* 7555 */  { MAD_F(0x0486297a) /* 0.282754401 */, 19 },
-  /* 7556 */  { MAD_F(0x04865dce) /* 0.282804304 */, 19 },
-  /* 7557 */  { MAD_F(0x04869222) /* 0.282854209 */, 19 },
-  /* 7558 */  { MAD_F(0x0486c677) /* 0.282904116 */, 19 },
-  /* 7559 */  { MAD_F(0x0486facc) /* 0.282954025 */, 19 },
-  /* 7560 */  { MAD_F(0x04872f22) /* 0.283003936 */, 19 },
-  /* 7561 */  { MAD_F(0x04876379) /* 0.283053850 */, 19 },
-  /* 7562 */  { MAD_F(0x048797d0) /* 0.283103766 */, 19 },
-  /* 7563 */  { MAD_F(0x0487cc28) /* 0.283153684 */, 19 },
-  /* 7564 */  { MAD_F(0x04880080) /* 0.283203604 */, 19 },
-  /* 7565 */  { MAD_F(0x048834d9) /* 0.283253527 */, 19 },
-  /* 7566 */  { MAD_F(0x04886933) /* 0.283303451 */, 19 },
-  /* 7567 */  { MAD_F(0x04889d8d) /* 0.283353378 */, 19 },
-
-  /* 7568 */  { MAD_F(0x0488d1e8) /* 0.283403307 */, 19 },
-  /* 7569 */  { MAD_F(0x04890643) /* 0.283453238 */, 19 },
-  /* 7570 */  { MAD_F(0x04893a9f) /* 0.283503172 */, 19 },
-  /* 7571 */  { MAD_F(0x04896efb) /* 0.283553107 */, 19 },
-  /* 7572 */  { MAD_F(0x0489a358) /* 0.283603045 */, 19 },
-  /* 7573 */  { MAD_F(0x0489d7b6) /* 0.283652985 */, 19 },
-  /* 7574 */  { MAD_F(0x048a0c14) /* 0.283702927 */, 19 },
-  /* 7575 */  { MAD_F(0x048a4073) /* 0.283752872 */, 19 },
-  /* 7576 */  { MAD_F(0x048a74d3) /* 0.283802818 */, 19 },
-  /* 7577 */  { MAD_F(0x048aa933) /* 0.283852767 */, 19 },
-  /* 7578 */  { MAD_F(0x048add93) /* 0.283902718 */, 19 },
-  /* 7579 */  { MAD_F(0x048b11f5) /* 0.283952671 */, 19 },
-  /* 7580 */  { MAD_F(0x048b4656) /* 0.284002627 */, 19 },
-  /* 7581 */  { MAD_F(0x048b7ab9) /* 0.284052584 */, 19 },
-  /* 7582 */  { MAD_F(0x048baf1c) /* 0.284102544 */, 19 },
-  /* 7583 */  { MAD_F(0x048be37f) /* 0.284152506 */, 19 },
-
-  /* 7584 */  { MAD_F(0x048c17e3) /* 0.284202470 */, 19 },
-  /* 7585 */  { MAD_F(0x048c4c48) /* 0.284252436 */, 19 },
-  /* 7586 */  { MAD_F(0x048c80ad) /* 0.284302405 */, 19 },
-  /* 7587 */  { MAD_F(0x048cb513) /* 0.284352376 */, 19 },
-  /* 7588 */  { MAD_F(0x048ce97a) /* 0.284402349 */, 19 },
-  /* 7589 */  { MAD_F(0x048d1de1) /* 0.284452324 */, 19 },
-  /* 7590 */  { MAD_F(0x048d5249) /* 0.284502301 */, 19 },
-  /* 7591 */  { MAD_F(0x048d86b1) /* 0.284552281 */, 19 },
-  /* 7592 */  { MAD_F(0x048dbb1a) /* 0.284602263 */, 19 },
-  /* 7593 */  { MAD_F(0x048def83) /* 0.284652246 */, 19 },
-  /* 7594 */  { MAD_F(0x048e23ed) /* 0.284702233 */, 19 },
-  /* 7595 */  { MAD_F(0x048e5858) /* 0.284752221 */, 19 },
-  /* 7596 */  { MAD_F(0x048e8cc3) /* 0.284802211 */, 19 },
-  /* 7597 */  { MAD_F(0x048ec12f) /* 0.284852204 */, 19 },
-  /* 7598 */  { MAD_F(0x048ef59b) /* 0.284902199 */, 19 },
-  /* 7599 */  { MAD_F(0x048f2a08) /* 0.284952196 */, 19 },
-
-  /* 7600 */  { MAD_F(0x048f5e76) /* 0.285002195 */, 19 },
-  /* 7601 */  { MAD_F(0x048f92e4) /* 0.285052197 */, 19 },
-  /* 7602 */  { MAD_F(0x048fc753) /* 0.285102201 */, 19 },
-  /* 7603 */  { MAD_F(0x048ffbc2) /* 0.285152206 */, 19 },
-  /* 7604 */  { MAD_F(0x04903032) /* 0.285202214 */, 19 },
-  /* 7605 */  { MAD_F(0x049064a3) /* 0.285252225 */, 19 },
-  /* 7606 */  { MAD_F(0x04909914) /* 0.285302237 */, 19 },
-  /* 7607 */  { MAD_F(0x0490cd86) /* 0.285352252 */, 19 },
-  /* 7608 */  { MAD_F(0x049101f8) /* 0.285402269 */, 19 },
-  /* 7609 */  { MAD_F(0x0491366b) /* 0.285452288 */, 19 },
-  /* 7610 */  { MAD_F(0x04916ade) /* 0.285502309 */, 19 },
-  /* 7611 */  { MAD_F(0x04919f52) /* 0.285552332 */, 19 },
-  /* 7612 */  { MAD_F(0x0491d3c7) /* 0.285602358 */, 19 },
-  /* 7613 */  { MAD_F(0x0492083c) /* 0.285652386 */, 19 },
-  /* 7614 */  { MAD_F(0x04923cb2) /* 0.285702416 */, 19 },
-  /* 7615 */  { MAD_F(0x04927128) /* 0.285752448 */, 19 },
-
-  /* 7616 */  { MAD_F(0x0492a59f) /* 0.285802482 */, 19 },
-  /* 7617 */  { MAD_F(0x0492da17) /* 0.285852519 */, 19 },
-  /* 7618 */  { MAD_F(0x04930e8f) /* 0.285902557 */, 19 },
-  /* 7619 */  { MAD_F(0x04934308) /* 0.285952598 */, 19 },
-  /* 7620 */  { MAD_F(0x04937781) /* 0.286002641 */, 19 },
-  /* 7621 */  { MAD_F(0x0493abfb) /* 0.286052687 */, 19 },
-  /* 7622 */  { MAD_F(0x0493e076) /* 0.286102734 */, 19 },
-  /* 7623 */  { MAD_F(0x049414f1) /* 0.286152784 */, 19 },
-  /* 7624 */  { MAD_F(0x0494496c) /* 0.286202836 */, 19 },
-  /* 7625 */  { MAD_F(0x04947de9) /* 0.286252890 */, 19 },
-  /* 7626 */  { MAD_F(0x0494b266) /* 0.286302946 */, 19 },
-  /* 7627 */  { MAD_F(0x0494e6e3) /* 0.286353005 */, 19 },
-  /* 7628 */  { MAD_F(0x04951b61) /* 0.286403065 */, 19 },
-  /* 7629 */  { MAD_F(0x04954fe0) /* 0.286453128 */, 19 },
-  /* 7630 */  { MAD_F(0x0495845f) /* 0.286503193 */, 19 },
-  /* 7631 */  { MAD_F(0x0495b8df) /* 0.286553260 */, 19 },
-
-  /* 7632 */  { MAD_F(0x0495ed5f) /* 0.286603329 */, 19 },
-  /* 7633 */  { MAD_F(0x049621e0) /* 0.286653401 */, 19 },
-  /* 7634 */  { MAD_F(0x04965662) /* 0.286703475 */, 19 },
-  /* 7635 */  { MAD_F(0x04968ae4) /* 0.286753551 */, 19 },
-  /* 7636 */  { MAD_F(0x0496bf67) /* 0.286803629 */, 19 },
-  /* 7637 */  { MAD_F(0x0496f3ea) /* 0.286853709 */, 19 },
-  /* 7638 */  { MAD_F(0x0497286e) /* 0.286903792 */, 19 },
-  /* 7639 */  { MAD_F(0x04975cf2) /* 0.286953876 */, 19 },
-  /* 7640 */  { MAD_F(0x04979177) /* 0.287003963 */, 19 },
-  /* 7641 */  { MAD_F(0x0497c5fd) /* 0.287054052 */, 19 },
-  /* 7642 */  { MAD_F(0x0497fa83) /* 0.287104143 */, 19 },
-  /* 7643 */  { MAD_F(0x04982f0a) /* 0.287154237 */, 19 },
-  /* 7644 */  { MAD_F(0x04986392) /* 0.287204332 */, 19 },
-  /* 7645 */  { MAD_F(0x0498981a) /* 0.287254430 */, 19 },
-  /* 7646 */  { MAD_F(0x0498cca2) /* 0.287304530 */, 19 },
-  /* 7647 */  { MAD_F(0x0499012c) /* 0.287354632 */, 19 },
-
-  /* 7648 */  { MAD_F(0x049935b5) /* 0.287404737 */, 19 },
-  /* 7649 */  { MAD_F(0x04996a40) /* 0.287454843 */, 19 },
-  /* 7650 */  { MAD_F(0x04999ecb) /* 0.287504952 */, 19 },
-  /* 7651 */  { MAD_F(0x0499d356) /* 0.287555063 */, 19 },
-  /* 7652 */  { MAD_F(0x049a07e2) /* 0.287605176 */, 19 },
-  /* 7653 */  { MAD_F(0x049a3c6f) /* 0.287655291 */, 19 },
-  /* 7654 */  { MAD_F(0x049a70fc) /* 0.287705409 */, 19 },
-  /* 7655 */  { MAD_F(0x049aa58a) /* 0.287755528 */, 19 },
-  /* 7656 */  { MAD_F(0x049ada19) /* 0.287805650 */, 19 },
-  /* 7657 */  { MAD_F(0x049b0ea8) /* 0.287855774 */, 19 },
-  /* 7658 */  { MAD_F(0x049b4337) /* 0.287905900 */, 19 },
-  /* 7659 */  { MAD_F(0x049b77c8) /* 0.287956028 */, 19 },
-  /* 7660 */  { MAD_F(0x049bac58) /* 0.288006159 */, 19 },
-  /* 7661 */  { MAD_F(0x049be0ea) /* 0.288056292 */, 19 },
-  /* 7662 */  { MAD_F(0x049c157c) /* 0.288106427 */, 19 },
-  /* 7663 */  { MAD_F(0x049c4a0e) /* 0.288156564 */, 19 },
-
-  /* 7664 */  { MAD_F(0x049c7ea1) /* 0.288206703 */, 19 },
-  /* 7665 */  { MAD_F(0x049cb335) /* 0.288256844 */, 19 },
-  /* 7666 */  { MAD_F(0x049ce7ca) /* 0.288306988 */, 19 },
-  /* 7667 */  { MAD_F(0x049d1c5e) /* 0.288357134 */, 19 },
-  /* 7668 */  { MAD_F(0x049d50f4) /* 0.288407282 */, 19 },
-  /* 7669 */  { MAD_F(0x049d858a) /* 0.288457432 */, 19 },
-  /* 7670 */  { MAD_F(0x049dba21) /* 0.288507584 */, 19 },
-  /* 7671 */  { MAD_F(0x049deeb8) /* 0.288557739 */, 19 },
-  /* 7672 */  { MAD_F(0x049e2350) /* 0.288607895 */, 19 },
-  /* 7673 */  { MAD_F(0x049e57e8) /* 0.288658054 */, 19 },
-  /* 7674 */  { MAD_F(0x049e8c81) /* 0.288708215 */, 19 },
-  /* 7675 */  { MAD_F(0x049ec11b) /* 0.288758379 */, 19 },
-  /* 7676 */  { MAD_F(0x049ef5b5) /* 0.288808544 */, 19 },
-  /* 7677 */  { MAD_F(0x049f2a50) /* 0.288858712 */, 19 },
-  /* 7678 */  { MAD_F(0x049f5eeb) /* 0.288908881 */, 19 },
-  /* 7679 */  { MAD_F(0x049f9387) /* 0.288959053 */, 19 },
-
-  /* 7680 */  { MAD_F(0x049fc824) /* 0.289009227 */, 19 },
-  /* 7681 */  { MAD_F(0x049ffcc1) /* 0.289059404 */, 19 },
-  /* 7682 */  { MAD_F(0x04a0315e) /* 0.289109582 */, 19 },
-  /* 7683 */  { MAD_F(0x04a065fd) /* 0.289159763 */, 19 },
-  /* 7684 */  { MAD_F(0x04a09a9b) /* 0.289209946 */, 19 },
-  /* 7685 */  { MAD_F(0x04a0cf3b) /* 0.289260131 */, 19 },
-  /* 7686 */  { MAD_F(0x04a103db) /* 0.289310318 */, 19 },
-  /* 7687 */  { MAD_F(0x04a1387b) /* 0.289360507 */, 19 },
-  /* 7688 */  { MAD_F(0x04a16d1d) /* 0.289410699 */, 19 },
-  /* 7689 */  { MAD_F(0x04a1a1be) /* 0.289460893 */, 19 },
-  /* 7690 */  { MAD_F(0x04a1d661) /* 0.289511088 */, 19 },
-  /* 7691 */  { MAD_F(0x04a20b04) /* 0.289561287 */, 19 },
-  /* 7692 */  { MAD_F(0x04a23fa7) /* 0.289611487 */, 19 },
-  /* 7693 */  { MAD_F(0x04a2744b) /* 0.289661689 */, 19 },
-  /* 7694 */  { MAD_F(0x04a2a8f0) /* 0.289711894 */, 19 },
-  /* 7695 */  { MAD_F(0x04a2dd95) /* 0.289762101 */, 19 },
-
-  /* 7696 */  { MAD_F(0x04a3123b) /* 0.289812309 */, 19 },
-  /* 7697 */  { MAD_F(0x04a346e2) /* 0.289862521 */, 19 },
-  /* 7698 */  { MAD_F(0x04a37b89) /* 0.289912734 */, 19 },
-  /* 7699 */  { MAD_F(0x04a3b030) /* 0.289962949 */, 19 },
-  /* 7700 */  { MAD_F(0x04a3e4d8) /* 0.290013167 */, 19 },
-  /* 7701 */  { MAD_F(0x04a41981) /* 0.290063387 */, 19 },
-  /* 7702 */  { MAD_F(0x04a44e2b) /* 0.290113609 */, 19 },
-  /* 7703 */  { MAD_F(0x04a482d5) /* 0.290163833 */, 19 },
-  /* 7704 */  { MAD_F(0x04a4b77f) /* 0.290214059 */, 19 },
-  /* 7705 */  { MAD_F(0x04a4ec2a) /* 0.290264288 */, 19 },
-  /* 7706 */  { MAD_F(0x04a520d6) /* 0.290314519 */, 19 },
-  /* 7707 */  { MAD_F(0x04a55582) /* 0.290364751 */, 19 },
-  /* 7708 */  { MAD_F(0x04a58a2f) /* 0.290414986 */, 19 },
-  /* 7709 */  { MAD_F(0x04a5bedd) /* 0.290465224 */, 19 },
-  /* 7710 */  { MAD_F(0x04a5f38b) /* 0.290515463 */, 19 },
-  /* 7711 */  { MAD_F(0x04a62839) /* 0.290565705 */, 19 },
-
-  /* 7712 */  { MAD_F(0x04a65ce8) /* 0.290615948 */, 19 },
-  /* 7713 */  { MAD_F(0x04a69198) /* 0.290666194 */, 19 },
-  /* 7714 */  { MAD_F(0x04a6c648) /* 0.290716442 */, 19 },
-  /* 7715 */  { MAD_F(0x04a6faf9) /* 0.290766692 */, 19 },
-  /* 7716 */  { MAD_F(0x04a72fab) /* 0.290816945 */, 19 },
-  /* 7717 */  { MAD_F(0x04a7645d) /* 0.290867199 */, 19 },
-  /* 7718 */  { MAD_F(0x04a79910) /* 0.290917456 */, 19 },
-  /* 7719 */  { MAD_F(0x04a7cdc3) /* 0.290967715 */, 19 },
-  /* 7720 */  { MAD_F(0x04a80277) /* 0.291017976 */, 19 },
-  /* 7721 */  { MAD_F(0x04a8372b) /* 0.291068239 */, 19 },
-  /* 7722 */  { MAD_F(0x04a86be0) /* 0.291118505 */, 19 },
-  /* 7723 */  { MAD_F(0x04a8a096) /* 0.291168772 */, 19 },
-  /* 7724 */  { MAD_F(0x04a8d54c) /* 0.291219042 */, 19 },
-  /* 7725 */  { MAD_F(0x04a90a03) /* 0.291269314 */, 19 },
-  /* 7726 */  { MAD_F(0x04a93eba) /* 0.291319588 */, 19 },
-  /* 7727 */  { MAD_F(0x04a97372) /* 0.291369865 */, 19 },
-
-  /* 7728 */  { MAD_F(0x04a9a82b) /* 0.291420143 */, 19 },
-  /* 7729 */  { MAD_F(0x04a9dce4) /* 0.291470424 */, 19 },
-  /* 7730 */  { MAD_F(0x04aa119d) /* 0.291520706 */, 19 },
-  /* 7731 */  { MAD_F(0x04aa4658) /* 0.291570991 */, 19 },
-  /* 7732 */  { MAD_F(0x04aa7b13) /* 0.291621278 */, 19 },
-  /* 7733 */  { MAD_F(0x04aaafce) /* 0.291671568 */, 19 },
-  /* 7734 */  { MAD_F(0x04aae48a) /* 0.291721859 */, 19 },
-  /* 7735 */  { MAD_F(0x04ab1947) /* 0.291772153 */, 19 },
-  /* 7736 */  { MAD_F(0x04ab4e04) /* 0.291822449 */, 19 },
-  /* 7737 */  { MAD_F(0x04ab82c2) /* 0.291872747 */, 19 },
-  /* 7738 */  { MAD_F(0x04abb780) /* 0.291923047 */, 19 },
-  /* 7739 */  { MAD_F(0x04abec3f) /* 0.291973349 */, 19 },
-  /* 7740 */  { MAD_F(0x04ac20fe) /* 0.292023653 */, 19 },
-  /* 7741 */  { MAD_F(0x04ac55be) /* 0.292073960 */, 19 },
-  /* 7742 */  { MAD_F(0x04ac8a7f) /* 0.292124269 */, 19 },
-  /* 7743 */  { MAD_F(0x04acbf40) /* 0.292174580 */, 19 },
-
-  /* 7744 */  { MAD_F(0x04acf402) /* 0.292224893 */, 19 },
-  /* 7745 */  { MAD_F(0x04ad28c5) /* 0.292275208 */, 19 },
-  /* 7746 */  { MAD_F(0x04ad5d88) /* 0.292325526 */, 19 },
-  /* 7747 */  { MAD_F(0x04ad924b) /* 0.292375845 */, 19 },
-  /* 7748 */  { MAD_F(0x04adc70f) /* 0.292426167 */, 19 },
-  /* 7749 */  { MAD_F(0x04adfbd4) /* 0.292476491 */, 19 },
-  /* 7750 */  { MAD_F(0x04ae3099) /* 0.292526817 */, 19 },
-  /* 7751 */  { MAD_F(0x04ae655f) /* 0.292577145 */, 19 },
-  /* 7752 */  { MAD_F(0x04ae9a26) /* 0.292627476 */, 19 },
-  /* 7753 */  { MAD_F(0x04aeceed) /* 0.292677808 */, 19 },
-  /* 7754 */  { MAD_F(0x04af03b4) /* 0.292728143 */, 19 },
-  /* 7755 */  { MAD_F(0x04af387d) /* 0.292778480 */, 19 },
-  /* 7756 */  { MAD_F(0x04af6d45) /* 0.292828819 */, 19 },
-  /* 7757 */  { MAD_F(0x04afa20f) /* 0.292879160 */, 19 },
-  /* 7758 */  { MAD_F(0x04afd6d9) /* 0.292929504 */, 19 },
-  /* 7759 */  { MAD_F(0x04b00ba3) /* 0.292979849 */, 19 },
-
-  /* 7760 */  { MAD_F(0x04b0406e) /* 0.293030197 */, 19 },
-  /* 7761 */  { MAD_F(0x04b0753a) /* 0.293080547 */, 19 },
-  /* 7762 */  { MAD_F(0x04b0aa06) /* 0.293130899 */, 19 },
-  /* 7763 */  { MAD_F(0x04b0ded3) /* 0.293181253 */, 19 },
-  /* 7764 */  { MAD_F(0x04b113a1) /* 0.293231610 */, 19 },
-  /* 7765 */  { MAD_F(0x04b1486f) /* 0.293281968 */, 19 },
-  /* 7766 */  { MAD_F(0x04b17d3d) /* 0.293332329 */, 19 },
-  /* 7767 */  { MAD_F(0x04b1b20c) /* 0.293382692 */, 19 },
-  /* 7768 */  { MAD_F(0x04b1e6dc) /* 0.293433057 */, 19 },
-  /* 7769 */  { MAD_F(0x04b21bad) /* 0.293483424 */, 19 },
-  /* 7770 */  { MAD_F(0x04b2507d) /* 0.293533794 */, 19 },
-  /* 7771 */  { MAD_F(0x04b2854f) /* 0.293584165 */, 19 },
-  /* 7772 */  { MAD_F(0x04b2ba21) /* 0.293634539 */, 19 },
-  /* 7773 */  { MAD_F(0x04b2eef4) /* 0.293684915 */, 19 },
-  /* 7774 */  { MAD_F(0x04b323c7) /* 0.293735293 */, 19 },
-  /* 7775 */  { MAD_F(0x04b3589b) /* 0.293785673 */, 19 },
-
-  /* 7776 */  { MAD_F(0x04b38d6f) /* 0.293836055 */, 19 },
-  /* 7777 */  { MAD_F(0x04b3c244) /* 0.293886440 */, 19 },
-  /* 7778 */  { MAD_F(0x04b3f71a) /* 0.293936826 */, 19 },
-  /* 7779 */  { MAD_F(0x04b42bf0) /* 0.293987215 */, 19 },
-  /* 7780 */  { MAD_F(0x04b460c7) /* 0.294037606 */, 19 },
-  /* 7781 */  { MAD_F(0x04b4959e) /* 0.294087999 */, 19 },
-  /* 7782 */  { MAD_F(0x04b4ca76) /* 0.294138395 */, 19 },
-  /* 7783 */  { MAD_F(0x04b4ff4e) /* 0.294188792 */, 19 },
-  /* 7784 */  { MAD_F(0x04b53427) /* 0.294239192 */, 19 },
-  /* 7785 */  { MAD_F(0x04b56901) /* 0.294289593 */, 19 },
-  /* 7786 */  { MAD_F(0x04b59ddb) /* 0.294339997 */, 19 },
-  /* 7787 */  { MAD_F(0x04b5d2b6) /* 0.294390403 */, 19 },
-  /* 7788 */  { MAD_F(0x04b60791) /* 0.294440812 */, 19 },
-  /* 7789 */  { MAD_F(0x04b63c6d) /* 0.294491222 */, 19 },
-  /* 7790 */  { MAD_F(0x04b6714a) /* 0.294541635 */, 19 },
-  /* 7791 */  { MAD_F(0x04b6a627) /* 0.294592049 */, 19 },
-
-  /* 7792 */  { MAD_F(0x04b6db05) /* 0.294642466 */, 19 },
-  /* 7793 */  { MAD_F(0x04b70fe3) /* 0.294692885 */, 19 },
-  /* 7794 */  { MAD_F(0x04b744c2) /* 0.294743306 */, 19 },
-  /* 7795 */  { MAD_F(0x04b779a1) /* 0.294793730 */, 19 },
-  /* 7796 */  { MAD_F(0x04b7ae81) /* 0.294844155 */, 19 },
-  /* 7797 */  { MAD_F(0x04b7e362) /* 0.294894583 */, 19 },
-  /* 7798 */  { MAD_F(0x04b81843) /* 0.294945013 */, 19 },
-  /* 7799 */  { MAD_F(0x04b84d24) /* 0.294995445 */, 19 },
-  /* 7800 */  { MAD_F(0x04b88207) /* 0.295045879 */, 19 },
-  /* 7801 */  { MAD_F(0x04b8b6ea) /* 0.295096315 */, 19 },
-  /* 7802 */  { MAD_F(0x04b8ebcd) /* 0.295146753 */, 19 },
-  /* 7803 */  { MAD_F(0x04b920b1) /* 0.295197194 */, 19 },
-  /* 7804 */  { MAD_F(0x04b95596) /* 0.295247637 */, 19 },
-  /* 7805 */  { MAD_F(0x04b98a7b) /* 0.295298082 */, 19 },
-  /* 7806 */  { MAD_F(0x04b9bf61) /* 0.295348529 */, 19 },
-  /* 7807 */  { MAD_F(0x04b9f447) /* 0.295398978 */, 19 },
-
-  /* 7808 */  { MAD_F(0x04ba292e) /* 0.295449429 */, 19 },
-  /* 7809 */  { MAD_F(0x04ba5e16) /* 0.295499883 */, 19 },
-  /* 7810 */  { MAD_F(0x04ba92fe) /* 0.295550338 */, 19 },
-  /* 7811 */  { MAD_F(0x04bac7e6) /* 0.295600796 */, 19 },
-  /* 7812 */  { MAD_F(0x04bafcd0) /* 0.295651256 */, 19 },
-  /* 7813 */  { MAD_F(0x04bb31b9) /* 0.295701718 */, 19 },
-  /* 7814 */  { MAD_F(0x04bb66a4) /* 0.295752183 */, 19 },
-  /* 7815 */  { MAD_F(0x04bb9b8f) /* 0.295802649 */, 19 },
-  /* 7816 */  { MAD_F(0x04bbd07a) /* 0.295853118 */, 19 },
-  /* 7817 */  { MAD_F(0x04bc0566) /* 0.295903588 */, 19 },
-  /* 7818 */  { MAD_F(0x04bc3a53) /* 0.295954061 */, 19 },
-  /* 7819 */  { MAD_F(0x04bc6f40) /* 0.296004536 */, 19 },
-  /* 7820 */  { MAD_F(0x04bca42e) /* 0.296055013 */, 19 },
-  /* 7821 */  { MAD_F(0x04bcd91d) /* 0.296105493 */, 19 },
-  /* 7822 */  { MAD_F(0x04bd0e0c) /* 0.296155974 */, 19 },
-  /* 7823 */  { MAD_F(0x04bd42fb) /* 0.296206458 */, 19 },
-
-  /* 7824 */  { MAD_F(0x04bd77ec) /* 0.296256944 */, 19 },
-  /* 7825 */  { MAD_F(0x04bdacdc) /* 0.296307432 */, 19 },
-  /* 7826 */  { MAD_F(0x04bde1ce) /* 0.296357922 */, 19 },
-  /* 7827 */  { MAD_F(0x04be16c0) /* 0.296408414 */, 19 },
-  /* 7828 */  { MAD_F(0x04be4bb2) /* 0.296458908 */, 19 },
-  /* 7829 */  { MAD_F(0x04be80a5) /* 0.296509405 */, 19 },
-  /* 7830 */  { MAD_F(0x04beb599) /* 0.296559904 */, 19 },
-  /* 7831 */  { MAD_F(0x04beea8d) /* 0.296610404 */, 19 },
-  /* 7832 */  { MAD_F(0x04bf1f82) /* 0.296660907 */, 19 },
-  /* 7833 */  { MAD_F(0x04bf5477) /* 0.296711413 */, 19 },
-  /* 7834 */  { MAD_F(0x04bf896d) /* 0.296761920 */, 19 },
-  /* 7835 */  { MAD_F(0x04bfbe64) /* 0.296812429 */, 19 },
-  /* 7836 */  { MAD_F(0x04bff35b) /* 0.296862941 */, 19 },
-  /* 7837 */  { MAD_F(0x04c02852) /* 0.296913455 */, 19 },
-  /* 7838 */  { MAD_F(0x04c05d4b) /* 0.296963971 */, 19 },
-  /* 7839 */  { MAD_F(0x04c09243) /* 0.297014489 */, 19 },
-
-  /* 7840 */  { MAD_F(0x04c0c73d) /* 0.297065009 */, 19 },
-  /* 7841 */  { MAD_F(0x04c0fc37) /* 0.297115531 */, 19 },
-  /* 7842 */  { MAD_F(0x04c13131) /* 0.297166056 */, 19 },
-  /* 7843 */  { MAD_F(0x04c1662d) /* 0.297216582 */, 19 },
-  /* 7844 */  { MAD_F(0x04c19b28) /* 0.297267111 */, 19 },
-  /* 7845 */  { MAD_F(0x04c1d025) /* 0.297317642 */, 19 },
-  /* 7846 */  { MAD_F(0x04c20521) /* 0.297368175 */, 19 },
-  /* 7847 */  { MAD_F(0x04c23a1f) /* 0.297418710 */, 19 },
-  /* 7848 */  { MAD_F(0x04c26f1d) /* 0.297469248 */, 19 },
-  /* 7849 */  { MAD_F(0x04c2a41b) /* 0.297519787 */, 19 },
-  /* 7850 */  { MAD_F(0x04c2d91b) /* 0.297570329 */, 19 },
-  /* 7851 */  { MAD_F(0x04c30e1a) /* 0.297620873 */, 19 },
-  /* 7852 */  { MAD_F(0x04c3431b) /* 0.297671418 */, 19 },
-  /* 7853 */  { MAD_F(0x04c3781c) /* 0.297721967 */, 19 },
-  /* 7854 */  { MAD_F(0x04c3ad1d) /* 0.297772517 */, 19 },
-  /* 7855 */  { MAD_F(0x04c3e21f) /* 0.297823069 */, 19 },
-
-  /* 7856 */  { MAD_F(0x04c41722) /* 0.297873624 */, 19 },
-  /* 7857 */  { MAD_F(0x04c44c25) /* 0.297924180 */, 19 },
-  /* 7858 */  { MAD_F(0x04c48129) /* 0.297974739 */, 19 },
-  /* 7859 */  { MAD_F(0x04c4b62d) /* 0.298025300 */, 19 },
-  /* 7860 */  { MAD_F(0x04c4eb32) /* 0.298075863 */, 19 },
-  /* 7861 */  { MAD_F(0x04c52038) /* 0.298126429 */, 19 },
-  /* 7862 */  { MAD_F(0x04c5553e) /* 0.298176996 */, 19 },
-  /* 7863 */  { MAD_F(0x04c58a44) /* 0.298227565 */, 19 },
-  /* 7864 */  { MAD_F(0x04c5bf4c) /* 0.298278137 */, 19 },
-  /* 7865 */  { MAD_F(0x04c5f453) /* 0.298328711 */, 19 },
-  /* 7866 */  { MAD_F(0x04c6295c) /* 0.298379287 */, 19 },
-  /* 7867 */  { MAD_F(0x04c65e65) /* 0.298429865 */, 19 },
-  /* 7868 */  { MAD_F(0x04c6936e) /* 0.298480445 */, 19 },
-  /* 7869 */  { MAD_F(0x04c6c878) /* 0.298531028 */, 19 },
-  /* 7870 */  { MAD_F(0x04c6fd83) /* 0.298581612 */, 19 },
-  /* 7871 */  { MAD_F(0x04c7328e) /* 0.298632199 */, 19 },
-
-  /* 7872 */  { MAD_F(0x04c7679a) /* 0.298682788 */, 19 },
-  /* 7873 */  { MAD_F(0x04c79ca7) /* 0.298733379 */, 19 },
-  /* 7874 */  { MAD_F(0x04c7d1b4) /* 0.298783972 */, 19 },
-  /* 7875 */  { MAD_F(0x04c806c1) /* 0.298834567 */, 19 },
-  /* 7876 */  { MAD_F(0x04c83bcf) /* 0.298885165 */, 19 },
-  /* 7877 */  { MAD_F(0x04c870de) /* 0.298935764 */, 19 },
-  /* 7878 */  { MAD_F(0x04c8a5ed) /* 0.298986366 */, 19 },
-  /* 7879 */  { MAD_F(0x04c8dafd) /* 0.299036970 */, 19 },
-  /* 7880 */  { MAD_F(0x04c9100d) /* 0.299087576 */, 19 },
-  /* 7881 */  { MAD_F(0x04c9451e) /* 0.299138184 */, 19 },
-  /* 7882 */  { MAD_F(0x04c97a30) /* 0.299188794 */, 19 },
-  /* 7883 */  { MAD_F(0x04c9af42) /* 0.299239406 */, 19 },
-  /* 7884 */  { MAD_F(0x04c9e455) /* 0.299290021 */, 19 },
-  /* 7885 */  { MAD_F(0x04ca1968) /* 0.299340638 */, 19 },
-  /* 7886 */  { MAD_F(0x04ca4e7c) /* 0.299391256 */, 19 },
-  /* 7887 */  { MAD_F(0x04ca8391) /* 0.299441877 */, 19 },
-
-  /* 7888 */  { MAD_F(0x04cab8a6) /* 0.299492500 */, 19 },
-  /* 7889 */  { MAD_F(0x04caedbb) /* 0.299543126 */, 19 },
-  /* 7890 */  { MAD_F(0x04cb22d1) /* 0.299593753 */, 19 },
-  /* 7891 */  { MAD_F(0x04cb57e8) /* 0.299644382 */, 19 },
-  /* 7892 */  { MAD_F(0x04cb8d00) /* 0.299695014 */, 19 },
-  /* 7893 */  { MAD_F(0x04cbc217) /* 0.299745648 */, 19 },
-  /* 7894 */  { MAD_F(0x04cbf730) /* 0.299796284 */, 19 },
-  /* 7895 */  { MAD_F(0x04cc2c49) /* 0.299846922 */, 19 },
-  /* 7896 */  { MAD_F(0x04cc6163) /* 0.299897562 */, 19 },
-  /* 7897 */  { MAD_F(0x04cc967d) /* 0.299948204 */, 19 },
-  /* 7898 */  { MAD_F(0x04cccb98) /* 0.299998849 */, 19 },
-  /* 7899 */  { MAD_F(0x04cd00b3) /* 0.300049495 */, 19 },
-  /* 7900 */  { MAD_F(0x04cd35cf) /* 0.300100144 */, 19 },
-  /* 7901 */  { MAD_F(0x04cd6aeb) /* 0.300150795 */, 19 },
-  /* 7902 */  { MAD_F(0x04cda008) /* 0.300201448 */, 19 },
-  /* 7903 */  { MAD_F(0x04cdd526) /* 0.300252103 */, 19 },
-
-  /* 7904 */  { MAD_F(0x04ce0a44) /* 0.300302761 */, 19 },
-  /* 7905 */  { MAD_F(0x04ce3f63) /* 0.300353420 */, 19 },
-  /* 7906 */  { MAD_F(0x04ce7482) /* 0.300404082 */, 19 },
-  /* 7907 */  { MAD_F(0x04cea9a2) /* 0.300454745 */, 19 },
-  /* 7908 */  { MAD_F(0x04cedec3) /* 0.300505411 */, 19 },
-  /* 7909 */  { MAD_F(0x04cf13e4) /* 0.300556079 */, 19 },
-  /* 7910 */  { MAD_F(0x04cf4906) /* 0.300606749 */, 19 },
-  /* 7911 */  { MAD_F(0x04cf7e28) /* 0.300657421 */, 19 },
-  /* 7912 */  { MAD_F(0x04cfb34b) /* 0.300708096 */, 19 },
-  /* 7913 */  { MAD_F(0x04cfe86e) /* 0.300758772 */, 19 },
-  /* 7914 */  { MAD_F(0x04d01d92) /* 0.300809451 */, 19 },
-  /* 7915 */  { MAD_F(0x04d052b6) /* 0.300860132 */, 19 },
-  /* 7916 */  { MAD_F(0x04d087db) /* 0.300910815 */, 19 },
-  /* 7917 */  { MAD_F(0x04d0bd01) /* 0.300961500 */, 19 },
-  /* 7918 */  { MAD_F(0x04d0f227) /* 0.301012187 */, 19 },
-  /* 7919 */  { MAD_F(0x04d1274e) /* 0.301062876 */, 19 },
-
-  /* 7920 */  { MAD_F(0x04d15c76) /* 0.301113568 */, 19 },
-  /* 7921 */  { MAD_F(0x04d1919e) /* 0.301164261 */, 19 },
-  /* 7922 */  { MAD_F(0x04d1c6c6) /* 0.301214957 */, 19 },
-  /* 7923 */  { MAD_F(0x04d1fbef) /* 0.301265655 */, 19 },
-  /* 7924 */  { MAD_F(0x04d23119) /* 0.301316355 */, 19 },
-  /* 7925 */  { MAD_F(0x04d26643) /* 0.301367057 */, 19 },
-  /* 7926 */  { MAD_F(0x04d29b6e) /* 0.301417761 */, 19 },
-  /* 7927 */  { MAD_F(0x04d2d099) /* 0.301468468 */, 19 },
-  /* 7928 */  { MAD_F(0x04d305c5) /* 0.301519176 */, 19 },
-  /* 7929 */  { MAD_F(0x04d33af2) /* 0.301569887 */, 19 },
-  /* 7930 */  { MAD_F(0x04d3701f) /* 0.301620599 */, 19 },
-  /* 7931 */  { MAD_F(0x04d3a54d) /* 0.301671314 */, 19 },
-  /* 7932 */  { MAD_F(0x04d3da7b) /* 0.301722031 */, 19 },
-  /* 7933 */  { MAD_F(0x04d40faa) /* 0.301772751 */, 19 },
-  /* 7934 */  { MAD_F(0x04d444d9) /* 0.301823472 */, 19 },
-  /* 7935 */  { MAD_F(0x04d47a09) /* 0.301874195 */, 19 },
-
-  /* 7936 */  { MAD_F(0x04d4af3a) /* 0.301924921 */, 19 },
-  /* 7937 */  { MAD_F(0x04d4e46b) /* 0.301975649 */, 19 },
-  /* 7938 */  { MAD_F(0x04d5199c) /* 0.302026378 */, 19 },
-  /* 7939 */  { MAD_F(0x04d54ecf) /* 0.302077110 */, 19 },
-  /* 7940 */  { MAD_F(0x04d58401) /* 0.302127845 */, 19 },
-  /* 7941 */  { MAD_F(0x04d5b935) /* 0.302178581 */, 19 },
-  /* 7942 */  { MAD_F(0x04d5ee69) /* 0.302229319 */, 19 },
-  /* 7943 */  { MAD_F(0x04d6239d) /* 0.302280060 */, 19 },
-  /* 7944 */  { MAD_F(0x04d658d2) /* 0.302330802 */, 19 },
-  /* 7945 */  { MAD_F(0x04d68e08) /* 0.302381547 */, 19 },
-  /* 7946 */  { MAD_F(0x04d6c33e) /* 0.302432294 */, 19 },
-  /* 7947 */  { MAD_F(0x04d6f875) /* 0.302483043 */, 19 },
-  /* 7948 */  { MAD_F(0x04d72dad) /* 0.302533794 */, 19 },
-  /* 7949 */  { MAD_F(0x04d762e5) /* 0.302584547 */, 19 },
-  /* 7950 */  { MAD_F(0x04d7981d) /* 0.302635303 */, 19 },
-  /* 7951 */  { MAD_F(0x04d7cd56) /* 0.302686060 */, 19 },
-
-  /* 7952 */  { MAD_F(0x04d80290) /* 0.302736820 */, 19 },
-  /* 7953 */  { MAD_F(0x04d837ca) /* 0.302787581 */, 19 },
-  /* 7954 */  { MAD_F(0x04d86d05) /* 0.302838345 */, 19 },
-  /* 7955 */  { MAD_F(0x04d8a240) /* 0.302889111 */, 19 },
-  /* 7956 */  { MAD_F(0x04d8d77c) /* 0.302939879 */, 19 },
-  /* 7957 */  { MAD_F(0x04d90cb9) /* 0.302990650 */, 19 },
-  /* 7958 */  { MAD_F(0x04d941f6) /* 0.303041422 */, 19 },
-  /* 7959 */  { MAD_F(0x04d97734) /* 0.303092197 */, 19 },
-  /* 7960 */  { MAD_F(0x04d9ac72) /* 0.303142973 */, 19 },
-  /* 7961 */  { MAD_F(0x04d9e1b1) /* 0.303193752 */, 19 },
-  /* 7962 */  { MAD_F(0x04da16f0) /* 0.303244533 */, 19 },
-  /* 7963 */  { MAD_F(0x04da4c30) /* 0.303295316 */, 19 },
-  /* 7964 */  { MAD_F(0x04da8171) /* 0.303346101 */, 19 },
-  /* 7965 */  { MAD_F(0x04dab6b2) /* 0.303396889 */, 19 },
-  /* 7966 */  { MAD_F(0x04daebf4) /* 0.303447678 */, 19 },
-  /* 7967 */  { MAD_F(0x04db2136) /* 0.303498469 */, 19 },
-
-  /* 7968 */  { MAD_F(0x04db5679) /* 0.303549263 */, 19 },
-  /* 7969 */  { MAD_F(0x04db8bbc) /* 0.303600059 */, 19 },
-  /* 7970 */  { MAD_F(0x04dbc100) /* 0.303650857 */, 19 },
-  /* 7971 */  { MAD_F(0x04dbf644) /* 0.303701657 */, 19 },
-  /* 7972 */  { MAD_F(0x04dc2b8a) /* 0.303752459 */, 19 },
-  /* 7973 */  { MAD_F(0x04dc60cf) /* 0.303803263 */, 19 },
-  /* 7974 */  { MAD_F(0x04dc9616) /* 0.303854070 */, 19 },
-  /* 7975 */  { MAD_F(0x04dccb5c) /* 0.303904878 */, 19 },
-  /* 7976 */  { MAD_F(0x04dd00a4) /* 0.303955689 */, 19 },
-  /* 7977 */  { MAD_F(0x04dd35ec) /* 0.304006502 */, 19 },
-  /* 7978 */  { MAD_F(0x04dd6b34) /* 0.304057317 */, 19 },
-  /* 7979 */  { MAD_F(0x04dda07d) /* 0.304108134 */, 19 },
-  /* 7980 */  { MAD_F(0x04ddd5c7) /* 0.304158953 */, 19 },
-  /* 7981 */  { MAD_F(0x04de0b11) /* 0.304209774 */, 19 },
-  /* 7982 */  { MAD_F(0x04de405c) /* 0.304260597 */, 19 },
-  /* 7983 */  { MAD_F(0x04de75a7) /* 0.304311423 */, 19 },
-
-  /* 7984 */  { MAD_F(0x04deaaf3) /* 0.304362251 */, 19 },
-  /* 7985 */  { MAD_F(0x04dee040) /* 0.304413080 */, 19 },
-  /* 7986 */  { MAD_F(0x04df158d) /* 0.304463912 */, 19 },
-  /* 7987 */  { MAD_F(0x04df4adb) /* 0.304514746 */, 19 },
-  /* 7988 */  { MAD_F(0x04df8029) /* 0.304565582 */, 19 },
-  /* 7989 */  { MAD_F(0x04dfb578) /* 0.304616421 */, 19 },
-  /* 7990 */  { MAD_F(0x04dfeac7) /* 0.304667261 */, 19 },
-  /* 7991 */  { MAD_F(0x04e02017) /* 0.304718103 */, 19 },
-  /* 7992 */  { MAD_F(0x04e05567) /* 0.304768948 */, 19 },
-  /* 7993 */  { MAD_F(0x04e08ab8) /* 0.304819795 */, 19 },
-  /* 7994 */  { MAD_F(0x04e0c00a) /* 0.304870644 */, 19 },
-  /* 7995 */  { MAD_F(0x04e0f55c) /* 0.304921495 */, 19 },
-  /* 7996 */  { MAD_F(0x04e12aaf) /* 0.304972348 */, 19 },
-  /* 7997 */  { MAD_F(0x04e16002) /* 0.305023203 */, 19 },
-  /* 7998 */  { MAD_F(0x04e19556) /* 0.305074060 */, 19 },
-  /* 7999 */  { MAD_F(0x04e1caab) /* 0.305124920 */, 19 },
-
-  /* 8000 */  { MAD_F(0x04e20000) /* 0.305175781 */, 19 },
-  /* 8001 */  { MAD_F(0x04e23555) /* 0.305226645 */, 19 },
-  /* 8002 */  { MAD_F(0x04e26aac) /* 0.305277511 */, 19 },
-  /* 8003 */  { MAD_F(0x04e2a002) /* 0.305328379 */, 19 },
-  /* 8004 */  { MAD_F(0x04e2d55a) /* 0.305379249 */, 19 },
-  /* 8005 */  { MAD_F(0x04e30ab2) /* 0.305430121 */, 19 },
-  /* 8006 */  { MAD_F(0x04e3400a) /* 0.305480995 */, 19 },
-  /* 8007 */  { MAD_F(0x04e37563) /* 0.305531872 */, 19 },
-  /* 8008 */  { MAD_F(0x04e3aabd) /* 0.305582750 */, 19 },
-  /* 8009 */  { MAD_F(0x04e3e017) /* 0.305633631 */, 19 },
-  /* 8010 */  { MAD_F(0x04e41572) /* 0.305684513 */, 19 },
-  /* 8011 */  { MAD_F(0x04e44acd) /* 0.305735398 */, 19 },
-  /* 8012 */  { MAD_F(0x04e48029) /* 0.305786285 */, 19 },
-  /* 8013 */  { MAD_F(0x04e4b585) /* 0.305837174 */, 19 },
-  /* 8014 */  { MAD_F(0x04e4eae2) /* 0.305888066 */, 19 },
-  /* 8015 */  { MAD_F(0x04e52040) /* 0.305938959 */, 19 },
-
-  /* 8016 */  { MAD_F(0x04e5559e) /* 0.305989854 */, 19 },
-  /* 8017 */  { MAD_F(0x04e58afd) /* 0.306040752 */, 19 },
-  /* 8018 */  { MAD_F(0x04e5c05c) /* 0.306091652 */, 19 },
-  /* 8019 */  { MAD_F(0x04e5f5bc) /* 0.306142554 */, 19 },
-  /* 8020 */  { MAD_F(0x04e62b1c) /* 0.306193457 */, 19 },
-  /* 8021 */  { MAD_F(0x04e6607d) /* 0.306244364 */, 19 },
-  /* 8022 */  { MAD_F(0x04e695df) /* 0.306295272 */, 19 },
-  /* 8023 */  { MAD_F(0x04e6cb41) /* 0.306346182 */, 19 },
-  /* 8024 */  { MAD_F(0x04e700a3) /* 0.306397094 */, 19 },
-  /* 8025 */  { MAD_F(0x04e73607) /* 0.306448009 */, 19 },
-  /* 8026 */  { MAD_F(0x04e76b6b) /* 0.306498925 */, 19 },
-  /* 8027 */  { MAD_F(0x04e7a0cf) /* 0.306549844 */, 19 },
-  /* 8028 */  { MAD_F(0x04e7d634) /* 0.306600765 */, 19 },
-  /* 8029 */  { MAD_F(0x04e80b99) /* 0.306651688 */, 19 },
-  /* 8030 */  { MAD_F(0x04e84100) /* 0.306702613 */, 19 },
-  /* 8031 */  { MAD_F(0x04e87666) /* 0.306753540 */, 19 },
-
-  /* 8032 */  { MAD_F(0x04e8abcd) /* 0.306804470 */, 19 },
-  /* 8033 */  { MAD_F(0x04e8e135) /* 0.306855401 */, 19 },
-  /* 8034 */  { MAD_F(0x04e9169e) /* 0.306906334 */, 19 },
-  /* 8035 */  { MAD_F(0x04e94c07) /* 0.306957270 */, 19 },
-  /* 8036 */  { MAD_F(0x04e98170) /* 0.307008208 */, 19 },
-  /* 8037 */  { MAD_F(0x04e9b6da) /* 0.307059148 */, 19 },
-  /* 8038 */  { MAD_F(0x04e9ec45) /* 0.307110090 */, 19 },
-  /* 8039 */  { MAD_F(0x04ea21b0) /* 0.307161034 */, 19 },
-  /* 8040 */  { MAD_F(0x04ea571c) /* 0.307211980 */, 19 },
-  /* 8041 */  { MAD_F(0x04ea8c88) /* 0.307262928 */, 19 },
-  /* 8042 */  { MAD_F(0x04eac1f5) /* 0.307313879 */, 19 },
-  /* 8043 */  { MAD_F(0x04eaf762) /* 0.307364831 */, 19 },
-  /* 8044 */  { MAD_F(0x04eb2cd0) /* 0.307415786 */, 19 },
-  /* 8045 */  { MAD_F(0x04eb623f) /* 0.307466743 */, 19 },
-  /* 8046 */  { MAD_F(0x04eb97ae) /* 0.307517702 */, 19 },
-  /* 8047 */  { MAD_F(0x04ebcd1e) /* 0.307568663 */, 19 },
-
-  /* 8048 */  { MAD_F(0x04ec028e) /* 0.307619626 */, 19 },
-  /* 8049 */  { MAD_F(0x04ec37ff) /* 0.307670591 */, 19 },
-  /* 8050 */  { MAD_F(0x04ec6d71) /* 0.307721558 */, 19 },
-  /* 8051 */  { MAD_F(0x04eca2e3) /* 0.307772528 */, 19 },
-  /* 8052 */  { MAD_F(0x04ecd855) /* 0.307823499 */, 19 },
-  /* 8053 */  { MAD_F(0x04ed0dc8) /* 0.307874473 */, 19 },
-  /* 8054 */  { MAD_F(0x04ed433c) /* 0.307925449 */, 19 },
-  /* 8055 */  { MAD_F(0x04ed78b0) /* 0.307976426 */, 19 },
-  /* 8056 */  { MAD_F(0x04edae25) /* 0.308027406 */, 19 },
-  /* 8057 */  { MAD_F(0x04ede39a) /* 0.308078389 */, 19 },
-  /* 8058 */  { MAD_F(0x04ee1910) /* 0.308129373 */, 19 },
-  /* 8059 */  { MAD_F(0x04ee4e87) /* 0.308180359 */, 19 },
-  /* 8060 */  { MAD_F(0x04ee83fe) /* 0.308231347 */, 19 },
-  /* 8061 */  { MAD_F(0x04eeb976) /* 0.308282338 */, 19 },
-  /* 8062 */  { MAD_F(0x04eeeeee) /* 0.308333331 */, 19 },
-  /* 8063 */  { MAD_F(0x04ef2467) /* 0.308384325 */, 19 },
-
-  /* 8064 */  { MAD_F(0x04ef59e0) /* 0.308435322 */, 19 },
-  /* 8065 */  { MAD_F(0x04ef8f5a) /* 0.308486321 */, 19 },
-  /* 8066 */  { MAD_F(0x04efc4d5) /* 0.308537322 */, 19 },
-  /* 8067 */  { MAD_F(0x04effa50) /* 0.308588325 */, 19 },
-  /* 8068 */  { MAD_F(0x04f02fcb) /* 0.308639331 */, 19 },
-  /* 8069 */  { MAD_F(0x04f06547) /* 0.308690338 */, 19 },
-  /* 8070 */  { MAD_F(0x04f09ac4) /* 0.308741348 */, 19 },
-  /* 8071 */  { MAD_F(0x04f0d041) /* 0.308792359 */, 19 },
-  /* 8072 */  { MAD_F(0x04f105bf) /* 0.308843373 */, 19 },
-  /* 8073 */  { MAD_F(0x04f13b3e) /* 0.308894389 */, 19 },
-  /* 8074 */  { MAD_F(0x04f170bd) /* 0.308945407 */, 19 },
-  /* 8075 */  { MAD_F(0x04f1a63c) /* 0.308996427 */, 19 },
-  /* 8076 */  { MAD_F(0x04f1dbbd) /* 0.309047449 */, 19 },
-  /* 8077 */  { MAD_F(0x04f2113d) /* 0.309098473 */, 19 },
-  /* 8078 */  { MAD_F(0x04f246bf) /* 0.309149499 */, 19 },
-  /* 8079 */  { MAD_F(0x04f27c40) /* 0.309200528 */, 19 },
-
-  /* 8080 */  { MAD_F(0x04f2b1c3) /* 0.309251558 */, 19 },
-  /* 8081 */  { MAD_F(0x04f2e746) /* 0.309302591 */, 19 },
-  /* 8082 */  { MAD_F(0x04f31cc9) /* 0.309353626 */, 19 },
-  /* 8083 */  { MAD_F(0x04f3524d) /* 0.309404663 */, 19 },
-  /* 8084 */  { MAD_F(0x04f387d2) /* 0.309455702 */, 19 },
-  /* 8085 */  { MAD_F(0x04f3bd57) /* 0.309506743 */, 19 },
-  /* 8086 */  { MAD_F(0x04f3f2dd) /* 0.309557786 */, 19 },
-  /* 8087 */  { MAD_F(0x04f42864) /* 0.309608831 */, 19 },
-  /* 8088 */  { MAD_F(0x04f45dea) /* 0.309659879 */, 19 },
-  /* 8089 */  { MAD_F(0x04f49372) /* 0.309710928 */, 19 },
-  /* 8090 */  { MAD_F(0x04f4c8fa) /* 0.309761980 */, 19 },
-  /* 8091 */  { MAD_F(0x04f4fe83) /* 0.309813033 */, 19 },
-  /* 8092 */  { MAD_F(0x04f5340c) /* 0.309864089 */, 19 },
-  /* 8093 */  { MAD_F(0x04f56996) /* 0.309915147 */, 19 },
-  /* 8094 */  { MAD_F(0x04f59f20) /* 0.309966207 */, 19 },
-  /* 8095 */  { MAD_F(0x04f5d4ab) /* 0.310017269 */, 19 },
-
-  /* 8096 */  { MAD_F(0x04f60a36) /* 0.310068333 */, 19 },
-  /* 8097 */  { MAD_F(0x04f63fc2) /* 0.310119400 */, 19 },
-  /* 8098 */  { MAD_F(0x04f6754f) /* 0.310170468 */, 19 },
-  /* 8099 */  { MAD_F(0x04f6aadc) /* 0.310221539 */, 19 },
-  /* 8100 */  { MAD_F(0x04f6e06a) /* 0.310272611 */, 19 },
-  /* 8101 */  { MAD_F(0x04f715f8) /* 0.310323686 */, 19 },
-  /* 8102 */  { MAD_F(0x04f74b87) /* 0.310374763 */, 19 },
-  /* 8103 */  { MAD_F(0x04f78116) /* 0.310425842 */, 19 },
-  /* 8104 */  { MAD_F(0x04f7b6a6) /* 0.310476923 */, 19 },
-  /* 8105 */  { MAD_F(0x04f7ec37) /* 0.310528006 */, 19 },
-  /* 8106 */  { MAD_F(0x04f821c8) /* 0.310579091 */, 19 },
-  /* 8107 */  { MAD_F(0x04f85759) /* 0.310630179 */, 19 },
-  /* 8108 */  { MAD_F(0x04f88cec) /* 0.310681268 */, 19 },
-  /* 8109 */  { MAD_F(0x04f8c27e) /* 0.310732360 */, 19 },
-  /* 8110 */  { MAD_F(0x04f8f812) /* 0.310783453 */, 19 },
-  /* 8111 */  { MAD_F(0x04f92da6) /* 0.310834549 */, 19 },
-
-  /* 8112 */  { MAD_F(0x04f9633a) /* 0.310885647 */, 19 },
-  /* 8113 */  { MAD_F(0x04f998cf) /* 0.310936747 */, 19 },
-  /* 8114 */  { MAD_F(0x04f9ce65) /* 0.310987849 */, 19 },
-  /* 8115 */  { MAD_F(0x04fa03fb) /* 0.311038953 */, 19 },
-  /* 8116 */  { MAD_F(0x04fa3992) /* 0.311090059 */, 19 },
-  /* 8117 */  { MAD_F(0x04fa6f29) /* 0.311141168 */, 19 },
-  /* 8118 */  { MAD_F(0x04faa4c1) /* 0.311192278 */, 19 },
-  /* 8119 */  { MAD_F(0x04fada59) /* 0.311243390 */, 19 },
-  /* 8120 */  { MAD_F(0x04fb0ff2) /* 0.311294505 */, 19 },
-  /* 8121 */  { MAD_F(0x04fb458c) /* 0.311345622 */, 19 },
-  /* 8122 */  { MAD_F(0x04fb7b26) /* 0.311396741 */, 19 },
-  /* 8123 */  { MAD_F(0x04fbb0c1) /* 0.311447862 */, 19 },
-  /* 8124 */  { MAD_F(0x04fbe65c) /* 0.311498985 */, 19 },
-  /* 8125 */  { MAD_F(0x04fc1bf8) /* 0.311550110 */, 19 },
-  /* 8126 */  { MAD_F(0x04fc5194) /* 0.311601237 */, 19 },
-  /* 8127 */  { MAD_F(0x04fc8731) /* 0.311652366 */, 19 },
-
-  /* 8128 */  { MAD_F(0x04fcbcce) /* 0.311703498 */, 19 },
-  /* 8129 */  { MAD_F(0x04fcf26c) /* 0.311754631 */, 19 },
-  /* 8130 */  { MAD_F(0x04fd280b) /* 0.311805767 */, 19 },
-  /* 8131 */  { MAD_F(0x04fd5daa) /* 0.311856905 */, 19 },
-  /* 8132 */  { MAD_F(0x04fd934a) /* 0.311908044 */, 19 },
-  /* 8133 */  { MAD_F(0x04fdc8ea) /* 0.311959186 */, 19 },
-  /* 8134 */  { MAD_F(0x04fdfe8b) /* 0.312010330 */, 19 },
-  /* 8135 */  { MAD_F(0x04fe342c) /* 0.312061476 */, 19 },
-  /* 8136 */  { MAD_F(0x04fe69ce) /* 0.312112625 */, 19 },
-  /* 8137 */  { MAD_F(0x04fe9f71) /* 0.312163775 */, 19 },
-  /* 8138 */  { MAD_F(0x04fed514) /* 0.312214927 */, 19 },
-  /* 8139 */  { MAD_F(0x04ff0ab8) /* 0.312266082 */, 19 },
-  /* 8140 */  { MAD_F(0x04ff405c) /* 0.312317238 */, 19 },
-  /* 8141 */  { MAD_F(0x04ff7601) /* 0.312368397 */, 19 },
-  /* 8142 */  { MAD_F(0x04ffaba6) /* 0.312419558 */, 19 },
-  /* 8143 */  { MAD_F(0x04ffe14c) /* 0.312470720 */, 19 },
-
-  /* 8144 */  { MAD_F(0x050016f3) /* 0.312521885 */, 19 },
-  /* 8145 */  { MAD_F(0x05004c9a) /* 0.312573052 */, 19 },
-  /* 8146 */  { MAD_F(0x05008241) /* 0.312624222 */, 19 },
-  /* 8147 */  { MAD_F(0x0500b7e9) /* 0.312675393 */, 19 },
-  /* 8148 */  { MAD_F(0x0500ed92) /* 0.312726566 */, 19 },
-  /* 8149 */  { MAD_F(0x0501233b) /* 0.312777742 */, 19 },
-  /* 8150 */  { MAD_F(0x050158e5) /* 0.312828919 */, 19 },
-  /* 8151 */  { MAD_F(0x05018e90) /* 0.312880099 */, 19 },
-  /* 8152 */  { MAD_F(0x0501c43b) /* 0.312931280 */, 19 },
-  /* 8153 */  { MAD_F(0x0501f9e6) /* 0.312982464 */, 19 },
-  /* 8154 */  { MAD_F(0x05022f92) /* 0.313033650 */, 19 },
-  /* 8155 */  { MAD_F(0x0502653f) /* 0.313084838 */, 19 },
-  /* 8156 */  { MAD_F(0x05029aec) /* 0.313136028 */, 19 },
-  /* 8157 */  { MAD_F(0x0502d09a) /* 0.313187220 */, 19 },
-  /* 8158 */  { MAD_F(0x05030648) /* 0.313238414 */, 19 },
-  /* 8159 */  { MAD_F(0x05033bf7) /* 0.313289611 */, 19 },
-
-  /* 8160 */  { MAD_F(0x050371a7) /* 0.313340809 */, 19 },
-  /* 8161 */  { MAD_F(0x0503a757) /* 0.313392010 */, 19 },
-  /* 8162 */  { MAD_F(0x0503dd07) /* 0.313443212 */, 19 },
-  /* 8163 */  { MAD_F(0x050412b9) /* 0.313494417 */, 19 },
-  /* 8164 */  { MAD_F(0x0504486a) /* 0.313545624 */, 19 },
-  /* 8165 */  { MAD_F(0x05047e1d) /* 0.313596833 */, 19 },
-  /* 8166 */  { MAD_F(0x0504b3cf) /* 0.313648044 */, 19 },
-  /* 8167 */  { MAD_F(0x0504e983) /* 0.313699257 */, 19 },
-  /* 8168 */  { MAD_F(0x05051f37) /* 0.313750472 */, 19 },
-  /* 8169 */  { MAD_F(0x050554eb) /* 0.313801689 */, 19 },
-  /* 8170 */  { MAD_F(0x05058aa0) /* 0.313852909 */, 19 },
-  /* 8171 */  { MAD_F(0x0505c056) /* 0.313904130 */, 19 },
-  /* 8172 */  { MAD_F(0x0505f60c) /* 0.313955354 */, 19 },
-  /* 8173 */  { MAD_F(0x05062bc3) /* 0.314006579 */, 19 },
-  /* 8174 */  { MAD_F(0x0506617a) /* 0.314057807 */, 19 },
-  /* 8175 */  { MAD_F(0x05069732) /* 0.314109037 */, 19 },
-
-  /* 8176 */  { MAD_F(0x0506cceb) /* 0.314160269 */, 19 },
-  /* 8177 */  { MAD_F(0x050702a4) /* 0.314211502 */, 19 },
-  /* 8178 */  { MAD_F(0x0507385d) /* 0.314262739 */, 19 },
-  /* 8179 */  { MAD_F(0x05076e17) /* 0.314313977 */, 19 },
-  /* 8180 */  { MAD_F(0x0507a3d2) /* 0.314365217 */, 19 },
-  /* 8181 */  { MAD_F(0x0507d98d) /* 0.314416459 */, 19 },
-  /* 8182 */  { MAD_F(0x05080f49) /* 0.314467704 */, 19 },
-  /* 8183 */  { MAD_F(0x05084506) /* 0.314518950 */, 19 },
-  /* 8184 */  { MAD_F(0x05087ac2) /* 0.314570199 */, 19 },
-  /* 8185 */  { MAD_F(0x0508b080) /* 0.314621449 */, 19 },
-  /* 8186 */  { MAD_F(0x0508e63e) /* 0.314672702 */, 19 },
-  /* 8187 */  { MAD_F(0x05091bfd) /* 0.314723957 */, 19 },
-  /* 8188 */  { MAD_F(0x050951bc) /* 0.314775214 */, 19 },
-  /* 8189 */  { MAD_F(0x0509877c) /* 0.314826473 */, 19 },
-  /* 8190 */  { MAD_F(0x0509bd3c) /* 0.314877734 */, 19 },
-  /* 8191 */  { MAD_F(0x0509f2fd) /* 0.314928997 */, 19 },
-
-  /* 8192 */  { MAD_F(0x050a28be) /* 0.314980262 */, 19 },
-  /* 8193 */  { MAD_F(0x050a5e80) /* 0.315031530 */, 19 },
-  /* 8194 */  { MAD_F(0x050a9443) /* 0.315082799 */, 19 },
-  /* 8195 */  { MAD_F(0x050aca06) /* 0.315134071 */, 19 },
-  /* 8196 */  { MAD_F(0x050affc9) /* 0.315185344 */, 19 },
-  /* 8197 */  { MAD_F(0x050b358e) /* 0.315236620 */, 19 },
-  /* 8198 */  { MAD_F(0x050b6b52) /* 0.315287898 */, 19 },
-  /* 8199 */  { MAD_F(0x050ba118) /* 0.315339178 */, 19 },
-  /* 8200 */  { MAD_F(0x050bd6de) /* 0.315390460 */, 19 },
-  /* 8201 */  { MAD_F(0x050c0ca4) /* 0.315441744 */, 19 },
-  /* 8202 */  { MAD_F(0x050c426b) /* 0.315493030 */, 19 },
-  /* 8203 */  { MAD_F(0x050c7833) /* 0.315544318 */, 19 },
-  /* 8204 */  { MAD_F(0x050cadfb) /* 0.315595608 */, 19 },
-  /* 8205 */  { MAD_F(0x050ce3c4) /* 0.315646901 */, 19 },
-  /* 8206 */  { MAD_F(0x050d198d) /* 0.315698195 */, 19 }
--- a/sys/src/games/mp3dec/sf_table.dat
+++ /dev/null
@@ -1,106 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: sf_table.dat,v 1.7 2004/01/23 09:41:33 rob Exp $
- */
-
-/*
- * These are the scalefactor values for Layer I and Layer II.
- * The values are from Table B.1 of ISO/IEC 11172-3.
- *
- * There is some error introduced by the 32-bit fixed-point representation;
- * the amount of error is shown. For 16-bit PCM output, this shouldn't be
- * too much of a problem.
- *
- * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict
- * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of
- * 63 is invalid. However, for better compatibility with current practices, we
- * add a 64th entry.
- */
-
-  MAD_F(0x20000000),  /* 2.000000000000 => 2.000000000000, e  0.000000000000 */
-  MAD_F(0x1965fea5),  /* 1.587401051968 => 1.587401051074, e  0.000000000894 */
-  MAD_F(0x1428a2fa),  /* 1.259921049895 => 1.259921051562, e -0.000000001667 */
-  MAD_F(0x10000000),  /* 1.000000000000 => 1.000000000000, e  0.000000000000 */
-  MAD_F(0x0cb2ff53),  /* 0.793700525984 => 0.793700527400, e -0.000000001416 */
-  MAD_F(0x0a14517d),  /* 0.629960524947 => 0.629960525781, e -0.000000000833 */
-  MAD_F(0x08000000),  /* 0.500000000000 => 0.500000000000, e  0.000000000000 */
-  MAD_F(0x06597fa9),  /* 0.396850262992 => 0.396850261837, e  0.000000001155 */
-
-  MAD_F(0x050a28be),  /* 0.314980262474 => 0.314980261028, e  0.000000001446 */
-  MAD_F(0x04000000),  /* 0.250000000000 => 0.250000000000, e  0.000000000000 */
-  MAD_F(0x032cbfd5),  /* 0.198425131496 => 0.198425132781, e -0.000000001285 */
-  MAD_F(0x0285145f),  /* 0.157490131237 => 0.157490130514, e  0.000000000723 */
-  MAD_F(0x02000000),  /* 0.125000000000 => 0.125000000000, e  0.000000000000 */
-  MAD_F(0x01965fea),  /* 0.099212565748 => 0.099212564528, e  0.000000001220 */
-  MAD_F(0x01428a30),  /* 0.078745065618 => 0.078745067120, e -0.000000001501 */
-  MAD_F(0x01000000),  /* 0.062500000000 => 0.062500000000, e  0.000000000000 */
-
-  MAD_F(0x00cb2ff5),  /* 0.049606282874 => 0.049606282264, e  0.000000000610 */
-  MAD_F(0x00a14518),  /* 0.039372532809 => 0.039372533560, e -0.000000000751 */
-  MAD_F(0x00800000),  /* 0.031250000000 => 0.031250000000, e  0.000000000000 */
-  MAD_F(0x006597fb),  /* 0.024803141437 => 0.024803142995, e -0.000000001558 */
-  MAD_F(0x0050a28c),  /* 0.019686266405 => 0.019686266780, e -0.000000000375 */
-  MAD_F(0x00400000),  /* 0.015625000000 => 0.015625000000, e  0.000000000000 */
-  MAD_F(0x0032cbfd),  /* 0.012401570719 => 0.012401569635, e  0.000000001084 */
-  MAD_F(0x00285146),  /* 0.009843133202 => 0.009843133390, e -0.000000000188 */
-
-  MAD_F(0x00200000),  /* 0.007812500000 => 0.007812500000, e  0.000000000000 */
-  MAD_F(0x001965ff),  /* 0.006200785359 => 0.006200786680, e -0.000000001321 */
-  MAD_F(0x001428a3),  /* 0.004921566601 => 0.004921566695, e -0.000000000094 */
-  MAD_F(0x00100000),  /* 0.003906250000 => 0.003906250000, e  0.000000000000 */
-  MAD_F(0x000cb2ff),  /* 0.003100392680 => 0.003100391477, e  0.000000001202 */
-  MAD_F(0x000a1451),  /* 0.002460783301 => 0.002460781485, e  0.000000001816 */
-  MAD_F(0x00080000),  /* 0.001953125000 => 0.001953125000, e  0.000000000000 */
-  MAD_F(0x00065980),  /* 0.001550196340 => 0.001550197601, e -0.000000001262 */
-
-  MAD_F(0x00050a29),  /* 0.001230391650 => 0.001230392605, e -0.000000000955 */
-  MAD_F(0x00040000),  /* 0.000976562500 => 0.000976562500, e  0.000000000000 */
-  MAD_F(0x00032cc0),  /* 0.000775098170 => 0.000775098801, e -0.000000000631 */
-  MAD_F(0x00028514),  /* 0.000615195825 => 0.000615194440, e  0.000000001385 */
-  MAD_F(0x00020000),  /* 0.000488281250 => 0.000488281250, e  0.000000000000 */
-  MAD_F(0x00019660),  /* 0.000387549085 => 0.000387549400, e -0.000000000315 */
-  MAD_F(0x0001428a),  /* 0.000307597913 => 0.000307597220, e  0.000000000693 */
-  MAD_F(0x00010000),  /* 0.000244140625 => 0.000244140625, e  0.000000000000 */
-
-  MAD_F(0x0000cb30),  /* 0.000193774542 => 0.000193774700, e -0.000000000158 */
-  MAD_F(0x0000a145),  /* 0.000153798956 => 0.000153798610, e  0.000000000346 */
-  MAD_F(0x00008000),  /* 0.000122070313 => 0.000122070313, e  0.000000000000 */
-  MAD_F(0x00006598),  /* 0.000096887271 => 0.000096887350, e -0.000000000079 */
-  MAD_F(0x000050a3),  /* 0.000076899478 => 0.000076901168, e -0.000000001689 */
-  MAD_F(0x00004000),  /* 0.000061035156 => 0.000061035156, e  0.000000000000 */
-  MAD_F(0x000032cc),  /* 0.000048443636 => 0.000048443675, e -0.000000000039 */
-  MAD_F(0x00002851),  /* 0.000038449739 => 0.000038448721, e  0.000000001018 */
-
-  MAD_F(0x00002000),  /* 0.000030517578 => 0.000030517578, e  0.000000000000 */
-  MAD_F(0x00001966),  /* 0.000024221818 => 0.000024221838, e -0.000000000020 */
-  MAD_F(0x00001429),  /* 0.000019224870 => 0.000019226223, e -0.000000001354 */
-  MAD_F(0x00001000),  /* 0.000015258789 => 0.000015258789, e -0.000000000000 */
-  MAD_F(0x00000cb3),  /* 0.000012110909 => 0.000012110919, e -0.000000000010 */
-  MAD_F(0x00000a14),  /* 0.000009612435 => 0.000009611249, e  0.000000001186 */
-  MAD_F(0x00000800),  /* 0.000007629395 => 0.000007629395, e -0.000000000000 */
-  MAD_F(0x00000659),  /* 0.000006055454 => 0.000006053597, e  0.000000001858 */
-
-  MAD_F(0x0000050a),  /* 0.000004806217 => 0.000004805624, e  0.000000000593 */
-  MAD_F(0x00000400),  /* 0.000003814697 => 0.000003814697, e  0.000000000000 */
-  MAD_F(0x0000032d),  /* 0.000003027727 => 0.000003028661, e -0.000000000934 */
-  MAD_F(0x00000285),  /* 0.000002403109 => 0.000002402812, e  0.000000000296 */
-  MAD_F(0x00000200),  /* 0.000001907349 => 0.000001907349, e -0.000000000000 */
-  MAD_F(0x00000196),  /* 0.000001513864 => 0.000001512468, e  0.000000001396 */
-  MAD_F(0x00000143),  /* 0.000001201554 => 0.000001203269, e -0.000000001714 */
-  MAD_F(0x00000000)   /* this compatibility entry is not part of Table B.1 */
--- a/sys/src/games/mp3dec/stream.c
+++ /dev/null
@@ -1,159 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: stream.c,v 1.12 2004/02/05 09:02:39 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "bit.h"
-# include "stream.h"
-
-/*
- * NAME:	stream->init()
- * DESCRIPTION:	initialize stream struct
- */
-void mad_stream_init(struct mad_stream *stream)
-{
-  stream->buffer     = 0;
-  stream->bufend     = 0;
-  stream->skiplen    = 0;
-
-  stream->sync       = 0;
-  stream->freerate   = 0;
-
-  stream->this_frame = 0;
-  stream->next_frame = 0;
-  mad_bit_init(&stream->ptr, 0);
-
-  mad_bit_init(&stream->anc_ptr, 0);
-  stream->anc_bitlen = 0;
-
-  stream->main_data  = 0;
-  stream->md_len     = 0;
-
-  stream->options    = 0;
-  stream->error      = MAD_ERROR_NONE;
-}
-
-/*
- * NAME:	stream->finish()
- * DESCRIPTION:	deallocate any dynamic memory associated with stream
- */
-void mad_stream_finish(struct mad_stream *stream)
-{
-  if (stream->main_data) {
-    free(stream->main_data);
-    stream->main_data = 0;
-  }
-
-  mad_bit_finish(&stream->anc_ptr);
-  mad_bit_finish(&stream->ptr);
-}
-
-/*
- * NAME:	stream->buffer()
- * DESCRIPTION:	set stream buffer pointers
- */
-void mad_stream_buffer(struct mad_stream *stream,
-		       unsigned char const *buffer, unsigned long length)
-{
-  stream->buffer = buffer;
-  stream->bufend = buffer + length;
-
-  stream->this_frame = buffer;
-  stream->next_frame = buffer;
-
-  stream->sync = 1;
-
-  mad_bit_init(&stream->ptr, buffer);
-}
-
-/*
- * NAME:	stream->skip()
- * DESCRIPTION:	arrange to skip bytes before the next frame
- */
-void mad_stream_skip(struct mad_stream *stream, unsigned long length)
-{
-  stream->skiplen += length;
-}
-
-/*
- * NAME:	stream->sync()
- * DESCRIPTION:	locate the next stream sync word
- */
-int mad_stream_sync(struct mad_stream *stream)
-{
-  register unsigned char const *ptr, *end;
-
-  ptr = mad_bit_nextbyte(&stream->ptr);
-  end = stream->bufend;
-
-  while (ptr < end - 1 &&
-	 !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0))
-    ++ptr;
-
-  if (end - ptr < MAD_BUFFER_GUARD)
-    return -1;
-
-  mad_bit_init(&stream->ptr, ptr);
-
-  return 0;
-}
-
-/*
- * NAME:	stream->errorstr()
- * DESCRIPTION:	return a string description of the current error condition
- */
-char const *mad_stream_errorstr(struct mad_stream const *stream)
-{
-  switch (stream->error) {
-  case MAD_ERROR_NONE:		 return "no error";
-
-  case MAD_ERROR_BUFLEN:	 return "input buffer too small (or EOF)";
-  case MAD_ERROR_BUFPTR:	 return "invalid (null) buffer pointer";
-
-  case MAD_ERROR_NOMEM:		 return "not enough memory";
-
-  case MAD_ERROR_LOSTSYNC:	 return "lost synchronization";
-  case MAD_ERROR_BADLAYER:	 return "reserved header layer value";
-  case MAD_ERROR_BADBITRATE:	 return "forbidden bitrate value";
-  case MAD_ERROR_BADSAMPLERATE:	 return "reserved sample frequency value";
-  case MAD_ERROR_BADEMPHASIS:	 return "reserved emphasis value";
-
-  case MAD_ERROR_BADCRC:	 return "CRC check failed";
-  case MAD_ERROR_BADBITALLOC:	 return "forbidden bit allocation value";
-  case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index";
-  case MAD_ERROR_BADMODE:	 return "bad bitrate/mode combination";
-  case MAD_ERROR_BADFRAMELEN:	 return "bad frame length";
-  case MAD_ERROR_BADBIGVALUES:	 return "bad big_values count";
-  case MAD_ERROR_BADBLOCKTYPE:	 return "reserved block_type";
-  case MAD_ERROR_BADSCFSI:	 return "bad scalefactor selection info";
-  case MAD_ERROR_BADDATAPTR:	 return "bad main_data_begin pointer";
-  case MAD_ERROR_BADPART3LEN:	 return "bad audio data length";
-  case MAD_ERROR_BADHUFFTABLE:	 return "bad Huffman table select";
-  case MAD_ERROR_BADHUFFDATA:	 return "Huffman data overrun";
-  case MAD_ERROR_BADSTEREO:	 return "incompatible block_type for JS";
-  }
-
-  return 0;
-}
--- a/sys/src/games/mp3dec/stream.h
+++ /dev/null
@@ -1,108 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $
- */
-
-# ifndef LIBMAD_STREAM_H
-# define LIBMAD_STREAM_H
-
-# include "bit.h"
-
-# define MAD_BUFFER_GUARD	8
-# define MAD_BUFFER_MDLEN	(511 + 2048 + MAD_BUFFER_GUARD)
-
-enum mad_error {
-  MAD_ERROR_NONE	   = 0x0000,	/* no error */
-
-  MAD_ERROR_BUFLEN	   = 0x0001,	/* input buffer too small (or EOF) */
-  MAD_ERROR_BUFPTR	   = 0x0002,	/* invalid (null) buffer pointer */
-
-  MAD_ERROR_NOMEM	   = 0x0031,	/* not enough memory */
-
-  MAD_ERROR_LOSTSYNC	   = 0x0101,	/* lost synchronization */
-  MAD_ERROR_BADLAYER	   = 0x0102,	/* reserved header layer value */
-  MAD_ERROR_BADBITRATE	   = 0x0103,	/* forbidden bitrate value */
-  MAD_ERROR_BADSAMPLERATE  = 0x0104,	/* reserved sample frequency value */
-  MAD_ERROR_BADEMPHASIS	   = 0x0105,	/* reserved emphasis value */
-
-  MAD_ERROR_BADCRC	   = 0x0201,	/* CRC check failed */
-  MAD_ERROR_BADBITALLOC	   = 0x0211,	/* forbidden bit allocation value */
-  MAD_ERROR_BADSCALEFACTOR = 0x0221,	/* bad scalefactor index */
-  MAD_ERROR_BADMODE        = 0x0222,	/* bad bitrate/mode combination */
-  MAD_ERROR_BADFRAMELEN	   = 0x0231,	/* bad frame length */
-  MAD_ERROR_BADBIGVALUES   = 0x0232,	/* bad big_values count */
-  MAD_ERROR_BADBLOCKTYPE   = 0x0233,	/* reserved block_type */
-  MAD_ERROR_BADSCFSI	   = 0x0234,	/* bad scalefactor selection info */
-  MAD_ERROR_BADDATAPTR	   = 0x0235,	/* bad main_data_begin pointer */
-  MAD_ERROR_BADPART3LEN	   = 0x0236,	/* bad audio data length */
-  MAD_ERROR_BADHUFFTABLE   = 0x0237,	/* bad Huffman table select */
-  MAD_ERROR_BADHUFFDATA	   = 0x0238,	/* Huffman data overrun */
-  MAD_ERROR_BADSTEREO	   = 0x0239	/* incompatible block_type for JS */
-};
-
-# define MAD_RECOVERABLE(error)	((error) & 0xff00)
-
-struct mad_stream {
-  unsigned char const *buffer;		/* input bitstream buffer */
-  unsigned char const *bufend;		/* end of buffer */
-  unsigned long skiplen;		/* bytes to skip before next frame */
-
-  int sync;				/* stream sync found */
-  unsigned long freerate;		/* free bitrate (fixed) */
-
-  unsigned char const *this_frame;	/* start of current frame */
-  unsigned char const *next_frame;	/* start of next frame */
-  struct mad_bitptr ptr;		/* current processing bit pointer */
-
-  struct mad_bitptr anc_ptr;		/* ancillary bits pointer */
-  unsigned int anc_bitlen;		/* number of ancillary bits */
-
-  unsigned char (*main_data)[MAD_BUFFER_MDLEN];
-					/* Layer III main_data() */
-  unsigned int md_len;			/* bytes in main_data */
-
-  int options;				/* decoding options (see below) */
-  enum mad_error error;			/* error code (see above) */
-};
-
-enum {
-  MAD_OPTION_IGNORECRC      = 0x0001,	/* ignore CRC errors */
-  MAD_OPTION_HALFSAMPLERATE = 0x0002	/* generate PCM at 1/2 sample rate */
-# if 0  /* not yet implemented */
-  MAD_OPTION_LEFTCHANNEL    = 0x0010,	/* decode left channel only */
-  MAD_OPTION_RIGHTCHANNEL   = 0x0020,	/* decode right channel only */
-  MAD_OPTION_SINGLECHANNEL  = 0x0030	/* combine channels */
-# endif
-};
-
-void mad_stream_init(struct mad_stream *);
-void mad_stream_finish(struct mad_stream *);
-
-# define mad_stream_options(stream, opts)  \
-    ((void) ((stream)->options = (opts)))
-
-void mad_stream_buffer(struct mad_stream *,
-		       unsigned char const *, unsigned long);
-void mad_stream_skip(struct mad_stream *, unsigned long);
-
-int mad_stream_sync(struct mad_stream *);
-
-char const *mad_stream_errorstr(struct mad_stream const *);
-
-# endif
--- a/sys/src/games/mp3dec/synth.c
+++ /dev/null
@@ -1,857 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: synth.c,v 1.25 2004/01/23 09:41:33 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "fixed.h"
-# include "frame.h"
-# include "synth.h"
-
-/*
- * NAME:	synth->init()
- * DESCRIPTION:	initialize synth struct
- */
-void mad_synth_init(struct mad_synth *synth)
-{
-  mad_synth_mute(synth);
-
-  synth->phase = 0;
-
-  synth->pcm.samplerate = 0;
-  synth->pcm.channels   = 0;
-  synth->pcm.length     = 0;
-}
-
-/*
- * NAME:	synth->mute()
- * DESCRIPTION:	zero all polyphase filterbank values, resetting synthesis
- */
-void mad_synth_mute(struct mad_synth *synth)
-{
-  unsigned int ch, s, v;
-
-  for (ch = 0; ch < 2; ++ch) {
-    for (s = 0; s < 16; ++s) {
-      for (v = 0; v < 8; ++v) {
-	synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] =
-	synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0;
-      }
-    }
-  }
-}
-
-/*
- * An optional optimization called here the Subband Synthesis Optimization
- * (SSO) improves the performance of subband synthesis at the expense of
- * accuracy.
- *
- * The idea is to simplify 32x32->64-bit multiplication to 32x32->32 such
- * that extra scaling and rounding are not necessary. This often allows the
- * compiler to use faster 32-bit multiply-accumulate instructions instead of
- * explicit 64-bit multiply, shift, and add instructions.
- *
- * SSO works like this: a full 32x32->64-bit multiply of two mad_fixed_t
- * values requires the result to be right-shifted 28 bits to be properly
- * scaled to the same fixed-point format. Right shifts can be applied at any
- * time to either operand or to the result, so the optimization involves
- * careful placement of these shifts to minimize the loss of accuracy.
- *
- * First, a 14-bit shift is applied with rounding at compile-time to the D[]
- * table of coefficients for the subband synthesis window. This only loses 2
- * bits of accuracy because the lower 12 bits are always zero. A second
- * 12-bit shift occurs after the DCT calculation. This loses 12 bits of
- * accuracy. Finally, a third 2-bit shift occurs just before the sample is
- * saved in the PCM buffer. 14 + 12 + 2 == 28 bits.
- */
-
-/* FPM_DEFAULT without OPT_SSO will actually lose accuracy and performance */
-
-# if defined(FPM_DEFAULT) && !defined(OPT_SSO)
-#  define OPT_SSO
-# endif
-
-/* second SSO shift, with rounding */
-
-# if defined(OPT_SSO)
-#  define SHIFT(x)  (((x) + (1L << 11)) >> 12)
-# else
-#  define SHIFT(x)  (x)
-# endif
-
-/* possible DCT speed optimization */
-
-# if defined(OPT_SPEED) && defined(MAD_F_MLX)
-#  define OPT_DCTO
-#  define MUL(x, y)  \
-    ({ mad_fixed64hi_t hi;  \
-       mad_fixed64lo_t lo;  \
-       MAD_F_MLX(hi, lo, (x), (y));  \
-       hi << (32 - MAD_F_SCALEBITS - 3);  \
-    })
-# else
-#  undef OPT_DCTO
-#  define MUL(x, y)  mad_f_mul((x), (y))
-# endif
-
-/*
- * NAME:	dct32()
- * DESCRIPTION:	perform fast in[32]->out[32] DCT
- */
-static
-void dct32(mad_fixed_t const in[32], unsigned int slot,
-	   mad_fixed_t lo[16][8], mad_fixed_t hi[16][8])
-{
-  mad_fixed_t t0,   t1,   t2,   t3,   t4,   t5,   t6,   t7;
-  mad_fixed_t t8,   t9,   t10,  t11,  t12,  t13,  t14,  t15;
-  mad_fixed_t t16,  t17,  t18,  t19,  t20,  t21,  t22,  t23;
-  mad_fixed_t t24,  t25,  t26,  t27,  t28,  t29,  t30,  t31;
-  mad_fixed_t t32,  t33,  t34,  t35,  t36,  t37,  t38,  t39;
-  mad_fixed_t t40,  t41,  t42,  t43,  t44,  t45,  t46,  t47;
-  mad_fixed_t t48,  t49,  t50,  t51,  t52,  t53,  t54,  t55;
-  mad_fixed_t t56,  t57,  t58,  t59,  t60,  t61,  t62,  t63;
-  mad_fixed_t t64,  t65,  t66,  t67,  t68,  t69,  t70,  t71;
-  mad_fixed_t t72,  t73,  t74,  t75,  t76,  t77,  t78,  t79;
-  mad_fixed_t t80,  t81,  t82,  t83,  t84,  t85,  t86,  t87;
-  mad_fixed_t t88,  t89,  t90,  t91,  t92,  t93,  t94,  t95;
-  mad_fixed_t t96,  t97,  t98,  t99,  t100, t101, t102, t103;
-  mad_fixed_t t104, t105, t106, t107, t108, t109, t110, t111;
-  mad_fixed_t t112, t113, t114, t115, t116, t117, t118, t119;
-  mad_fixed_t t120, t121, t122, t123, t124, t125, t126, t127;
-  mad_fixed_t t128, t129, t130, t131, t132, t133, t134, t135;
-  mad_fixed_t t136, t137, t138, t139, t140, t141, t142, t143;
-  mad_fixed_t t144, t145, t146, t147, t148, t149, t150, t151;
-  mad_fixed_t t152, t153, t154, t155, t156, t157, t158, t159;
-  mad_fixed_t t160, t161, t162, t163, t164, t165, t166, t167;
-  mad_fixed_t t168, t169, t170, t171, t172, t173, t174, t175;
-  mad_fixed_t t176;
-
-  /* costab[i] = cos(PI / (2 * 32) * i) */
-
-# if defined(OPT_DCTO)
-#  define costab1	MAD_F(0x7fd8878e)
-#  define costab2	MAD_F(0x7f62368f)
-#  define costab3	MAD_F(0x7e9d55fc)
-#  define costab4	MAD_F(0x7d8a5f40)
-#  define costab5	MAD_F(0x7c29fbee)
-#  define costab6	MAD_F(0x7a7d055b)
-#  define costab7	MAD_F(0x78848414)
-#  define costab8	MAD_F(0x7641af3d)
-#  define costab9	MAD_F(0x73b5ebd1)
-#  define costab10	MAD_F(0x70e2cbc6)
-#  define costab11	MAD_F(0x6dca0d14)
-#  define costab12	MAD_F(0x6a6d98a4)
-#  define costab13	MAD_F(0x66cf8120)
-#  define costab14	MAD_F(0x62f201ac)
-#  define costab15	MAD_F(0x5ed77c8a)
-#  define costab16	MAD_F(0x5a82799a)
-#  define costab17	MAD_F(0x55f5a4d2)
-#  define costab18	MAD_F(0x5133cc94)
-#  define costab19	MAD_F(0x4c3fdff4)
-#  define costab20	MAD_F(0x471cece7)
-#  define costab21	MAD_F(0x41ce1e65)
-#  define costab22	MAD_F(0x3c56ba70)
-#  define costab23	MAD_F(0x36ba2014)
-#  define costab24	MAD_F(0x30fbc54d)
-#  define costab25	MAD_F(0x2b1f34eb)
-#  define costab26	MAD_F(0x25280c5e)
-#  define costab27	MAD_F(0x1f19f97b)
-#  define costab28	MAD_F(0x18f8b83c)
-#  define costab29	MAD_F(0x12c8106f)
-#  define costab30	MAD_F(0x0c8bd35e)
-#  define costab31	MAD_F(0x0647d97c)
-# else
-#  define costab1	MAD_F(0x0ffb10f2)  /* 0.998795456 */
-#  define costab2	MAD_F(0x0fec46d2)  /* 0.995184727 */
-#  define costab3	MAD_F(0x0fd3aac0)  /* 0.989176510 */
-#  define costab4	MAD_F(0x0fb14be8)  /* 0.980785280 */
-#  define costab5	MAD_F(0x0f853f7e)  /* 0.970031253 */
-#  define costab6	MAD_F(0x0f4fa0ab)  /* 0.956940336 */
-#  define costab7	MAD_F(0x0f109082)  /* 0.941544065 */
-#  define costab8	MAD_F(0x0ec835e8)  /* 0.923879533 */
-#  define costab9	MAD_F(0x0e76bd7a)  /* 0.903989293 */
-#  define costab10	MAD_F(0x0e1c5979)  /* 0.881921264 */
-#  define costab11	MAD_F(0x0db941a3)  /* 0.857728610 */
-#  define costab12	MAD_F(0x0d4db315)  /* 0.831469612 */
-#  define costab13	MAD_F(0x0cd9f024)  /* 0.803207531 */
-#  define costab14	MAD_F(0x0c5e4036)  /* 0.773010453 */
-#  define costab15	MAD_F(0x0bdaef91)  /* 0.740951125 */
-#  define costab16	MAD_F(0x0b504f33)  /* 0.707106781 */
-#  define costab17	MAD_F(0x0abeb49a)  /* 0.671558955 */
-#  define costab18	MAD_F(0x0a267993)  /* 0.634393284 */
-#  define costab19	MAD_F(0x0987fbfe)  /* 0.595699304 */
-#  define costab20	MAD_F(0x08e39d9d)  /* 0.555570233 */
-#  define costab21	MAD_F(0x0839c3cd)  /* 0.514102744 */
-#  define costab22	MAD_F(0x078ad74e)  /* 0.471396737 */
-#  define costab23	MAD_F(0x06d74402)  /* 0.427555093 */
-#  define costab24	MAD_F(0x061f78aa)  /* 0.382683432 */
-#  define costab25	MAD_F(0x0563e69d)  /* 0.336889853 */
-#  define costab26	MAD_F(0x04a5018c)  /* 0.290284677 */
-#  define costab27	MAD_F(0x03e33f2f)  /* 0.242980180 */
-#  define costab28	MAD_F(0x031f1708)  /* 0.195090322 */
-#  define costab29	MAD_F(0x0259020e)  /* 0.146730474 */
-#  define costab30	MAD_F(0x01917a6c)  /* 0.098017140 */
-#  define costab31	MAD_F(0x00c8fb30)  /* 0.049067674 */
-# endif
-
-  t0   = in[0]  + in[31];  t16  = MUL(in[0]  - in[31], costab1);
-  t1   = in[15] + in[16];  t17  = MUL(in[15] - in[16], costab31);
-
-  t41  = t16 + t17;
-  t59  = MUL(t16 - t17, costab2);
-  t33  = t0  + t1;
-  t50  = MUL(t0  - t1,  costab2);
-
-  t2   = in[7]  + in[24];  t18  = MUL(in[7]  - in[24], costab15);
-  t3   = in[8]  + in[23];  t19  = MUL(in[8]  - in[23], costab17);
-
-  t42  = t18 + t19;
-  t60  = MUL(t18 - t19, costab30);
-  t34  = t2  + t3;
-  t51  = MUL(t2  - t3,  costab30);
-
-  t4   = in[3]  + in[28];  t20  = MUL(in[3]  - in[28], costab7);
-  t5   = in[12] + in[19];  t21  = MUL(in[12] - in[19], costab25);
-
-  t43  = t20 + t21;
-  t61  = MUL(t20 - t21, costab14);
-  t35  = t4  + t5;
-  t52  = MUL(t4  - t5,  costab14);
-
-  t6   = in[4]  + in[27];  t22  = MUL(in[4]  - in[27], costab9);
-  t7   = in[11] + in[20];  t23  = MUL(in[11] - in[20], costab23);
-
-  t44  = t22 + t23;
-  t62  = MUL(t22 - t23, costab18);
-  t36  = t6  + t7;
-  t53  = MUL(t6  - t7,  costab18);
-
-  t8   = in[1]  + in[30];  t24  = MUL(in[1]  - in[30], costab3);
-  t9   = in[14] + in[17];  t25  = MUL(in[14] - in[17], costab29);
-
-  t45  = t24 + t25;
-  t63  = MUL(t24 - t25, costab6);
-  t37  = t8  + t9;
-  t54  = MUL(t8  - t9,  costab6);
-
-  t10  = in[6]  + in[25];  t26  = MUL(in[6]  - in[25], costab13);
-  t11  = in[9]  + in[22];  t27  = MUL(in[9]  - in[22], costab19);
-
-  t46  = t26 + t27;
-  t64  = MUL(t26 - t27, costab26);
-  t38  = t10 + t11;
-  t55  = MUL(t10 - t11, costab26);
-
-  t12  = in[2]  + in[29];  t28  = MUL(in[2]  - in[29], costab5);
-  t13  = in[13] + in[18];  t29  = MUL(in[13] - in[18], costab27);
-
-  t47  = t28 + t29;
-  t65  = MUL(t28 - t29, costab10);
-  t39  = t12 + t13;
-  t56  = MUL(t12 - t13, costab10);
-
-  t14  = in[5]  + in[26];  t30  = MUL(in[5]  - in[26], costab11);
-  t15  = in[10] + in[21];  t31  = MUL(in[10] - in[21], costab21);
-
-  t48  = t30 + t31;
-  t66  = MUL(t30 - t31, costab22);
-  t40  = t14 + t15;
-  t57  = MUL(t14 - t15, costab22);
-
-  t69  = t33 + t34;  t89  = MUL(t33 - t34, costab4);
-  t70  = t35 + t36;  t90  = MUL(t35 - t36, costab28);
-  t71  = t37 + t38;  t91  = MUL(t37 - t38, costab12);
-  t72  = t39 + t40;  t92  = MUL(t39 - t40, costab20);
-  t73  = t41 + t42;  t94  = MUL(t41 - t42, costab4);
-  t74  = t43 + t44;  t95  = MUL(t43 - t44, costab28);
-  t75  = t45 + t46;  t96  = MUL(t45 - t46, costab12);
-  t76  = t47 + t48;  t97  = MUL(t47 - t48, costab20);
-
-  t78  = t50 + t51;  t100 = MUL(t50 - t51, costab4);
-  t79  = t52 + t53;  t101 = MUL(t52 - t53, costab28);
-  t80  = t54 + t55;  t102 = MUL(t54 - t55, costab12);
-  t81  = t56 + t57;  t103 = MUL(t56 - t57, costab20);
-
-  t83  = t59 + t60;  t106 = MUL(t59 - t60, costab4);
-  t84  = t61 + t62;  t107 = MUL(t61 - t62, costab28);
-  t85  = t63 + t64;  t108 = MUL(t63 - t64, costab12);
-  t86  = t65 + t66;  t109 = MUL(t65 - t66, costab20);
-
-  t113 = t69  + t70;
-  t114 = t71  + t72;
-
-  /*  0 */ hi[15][slot] = SHIFT(t113 + t114);
-  /* 16 */ lo[ 0][slot] = SHIFT(MUL(t113 - t114, costab16));
-
-  t115 = t73  + t74;
-  t116 = t75  + t76;
-
-  t32  = t115 + t116;
-
-  /*  1 */ hi[14][slot] = SHIFT(t32);
-
-  t118 = t78  + t79;
-  t119 = t80  + t81;
-
-  t58  = t118 + t119;
-
-  /*  2 */ hi[13][slot] = SHIFT(t58);
-
-  t121 = t83  + t84;
-  t122 = t85  + t86;
-
-  t67  = t121 + t122;
-
-  t49  = (t67 * 2) - t32;
-
-  /*  3 */ hi[12][slot] = SHIFT(t49);
-
-  t125 = t89  + t90;
-  t126 = t91  + t92;
-
-  t93  = t125 + t126;
-
-  /*  4 */ hi[11][slot] = SHIFT(t93);
-
-  t128 = t94  + t95;
-  t129 = t96  + t97;
-
-  t98  = t128 + t129;
-
-  t68  = (t98 * 2) - t49;
-
-  /*  5 */ hi[10][slot] = SHIFT(t68);
-
-  t132 = t100 + t101;
-  t133 = t102 + t103;
-
-  t104 = t132 + t133;
-
-  t82  = (t104 * 2) - t58;
-
-  /*  6 */ hi[ 9][slot] = SHIFT(t82);
-
-  t136 = t106 + t107;
-  t137 = t108 + t109;
-
-  t110 = t136 + t137;
-
-  t87  = (t110 * 2) - t67;
-
-  t77  = (t87 * 2) - t68;
-
-  /*  7 */ hi[ 8][slot] = SHIFT(t77);
-
-  t141 = MUL(t69 - t70, costab8);
-  t142 = MUL(t71 - t72, costab24);
-  t143 = t141 + t142;
-
-  /*  8 */ hi[ 7][slot] = SHIFT(t143);
-  /* 24 */ lo[ 8][slot] =
-	     SHIFT((MUL(t141 - t142, costab16) * 2) - t143);
-
-  t144 = MUL(t73 - t74, costab8);
-  t145 = MUL(t75 - t76, costab24);
-  t146 = t144 + t145;
-
-  t88  = (t146 * 2) - t77;
-
-  /*  9 */ hi[ 6][slot] = SHIFT(t88);
-
-  t148 = MUL(t78 - t79, costab8);
-  t149 = MUL(t80 - t81, costab24);
-  t150 = t148 + t149;
-
-  t105 = (t150 * 2) - t82;
-
-  /* 10 */ hi[ 5][slot] = SHIFT(t105);
-
-  t152 = MUL(t83 - t84, costab8);
-  t153 = MUL(t85 - t86, costab24);
-  t154 = t152 + t153;
-
-  t111 = (t154 * 2) - t87;
-
-  t99  = (t111 * 2) - t88;
-
-  /* 11 */ hi[ 4][slot] = SHIFT(t99);
-
-  t157 = MUL(t89 - t90, costab8);
-  t158 = MUL(t91 - t92, costab24);
-  t159 = t157 + t158;
-
-  t127 = (t159 * 2) - t93;
-
-  /* 12 */ hi[ 3][slot] = SHIFT(t127);
-
-  t160 = (MUL(t125 - t126, costab16) * 2) - t127;
-
-  /* 20 */ lo[ 4][slot] = SHIFT(t160);
-  /* 28 */ lo[12][slot] =
-	     SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160);
-
-  t161 = MUL(t94 - t95, costab8);
-  t162 = MUL(t96 - t97, costab24);
-  t163 = t161 + t162;
-
-  t130 = (t163 * 2) - t98;
-
-  t112 = (t130 * 2) - t99;
-
-  /* 13 */ hi[ 2][slot] = SHIFT(t112);
-
-  t164 = (MUL(t128 - t129, costab16) * 2) - t130;
-
-  t166 = MUL(t100 - t101, costab8);
-  t167 = MUL(t102 - t103, costab24);
-  t168 = t166 + t167;
-
-  t134 = (t168 * 2) - t104;
-
-  t120 = (t134 * 2) - t105;
-
-  /* 14 */ hi[ 1][slot] = SHIFT(t120);
-
-  t135 = (MUL(t118 - t119, costab16) * 2) - t120;
-
-  /* 18 */ lo[ 2][slot] = SHIFT(t135);
-
-  t169 = (MUL(t132 - t133, costab16) * 2) - t134;
-
-  t151 = (t169 * 2) - t135;
-
-  /* 22 */ lo[ 6][slot] = SHIFT(t151);
-
-  t170 = (((MUL(t148 - t149, costab16) * 2) - t150) * 2) - t151;
-
-  /* 26 */ lo[10][slot] = SHIFT(t170);
-  /* 30 */ lo[14][slot] =
-	     SHIFT((((((MUL(t166 - t167, costab16) * 2) -
-		       t168) * 2) - t169) * 2) - t170);
-
-  t171 = MUL(t106 - t107, costab8);
-  t172 = MUL(t108 - t109, costab24);
-  t173 = t171 + t172;
-
-  t138 = (t173 * 2) - t110;
-
-  t123 = (t138 * 2) - t111;
-
-  t139 = (MUL(t121 - t122, costab16) * 2) - t123;
-
-  t117 = (t123 * 2) - t112;
-
-  /* 15 */ hi[ 0][slot] = SHIFT(t117);
-
-  t124 = (MUL(t115 - t116, costab16) * 2) - t117;
-
-  /* 17 */ lo[ 1][slot] = SHIFT(t124);
-
-  t131 = (t139 * 2) - t124;
-
-  /* 19 */ lo[ 3][slot] = SHIFT(t131);
-
-  t140 = (t164 * 2) - t131;
-
-  /* 21 */ lo[ 5][slot] = SHIFT(t140);
-
-  t174 = (MUL(t136 - t137, costab16) * 2) - t138;
-
-  t155 = (t174 * 2) - t139;
-
-  t147 = (t155 * 2) - t140;
-
-  /* 23 */ lo[ 7][slot] = SHIFT(t147);
-
-  t156 = (((MUL(t144 - t145, costab16) * 2) - t146) * 2) - t147;
-
-  /* 25 */ lo[ 9][slot] = SHIFT(t156);
-
-  t175 = (((MUL(t152 - t153, costab16) * 2) - t154) * 2) - t155;
-
-  t165 = (t175 * 2) - t156;
-
-  /* 27 */ lo[11][slot] = SHIFT(t165);
-
-  t176 = (((((MUL(t161 - t162, costab16) * 2) -
-	     t163) * 2) - t164) * 2) - t165;
-
-  /* 29 */ lo[13][slot] = SHIFT(t176);
-  /* 31 */ lo[15][slot] =
-	     SHIFT((((((((MUL(t171 - t172, costab16) * 2) -
-			 t173) * 2) - t174) * 2) - t175) * 2) - t176);
-
-  /*
-   * Totals:
-   *  80 multiplies
-   *  80 additions
-   * 119 subtractions
-   *  49 shifts (not counting SSO)
-   */
-}
-
-# undef MUL
-# undef SHIFT
-
-/* third SSO shift and/or D[] optimization preshift */
-
-# if defined(OPT_SSO)
-#  if MAD_F_FRACBITS != 28
-#   error "MAD_F_FRACBITS must be 28 to use OPT_SSO"
-#  endif
-#  define ML0(hi, lo, x, y)	((lo)  = (x) * (y))
-#  define MLA(hi, lo, x, y)	((lo) += (x) * (y))
-#  define MLN(hi, lo)		((lo)  = -(lo))
-#  define MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
-#  define SHIFT(x)		((x) >> 2)
-#  define PRESHIFT(x)		((MAD_F(x) + (1L << 13)) >> 14)
-# else
-#  define ML0(hi, lo, x, y)	MAD_F_ML0((hi), (lo), (x), (y))
-#  define MLA(hi, lo, x, y)	MAD_F_MLA((hi), (lo), (x), (y))
-#  define MLN(hi, lo)		MAD_F_MLN((hi), (lo))
-#  define MLZ(hi, lo)		MAD_F_MLZ((hi), (lo))
-#  define SHIFT(x)		(x)
-#  if defined(MAD_F_SCALEBITS)
-#   undef  MAD_F_SCALEBITS
-#   define MAD_F_SCALEBITS	(MAD_F_FRACBITS - 12)
-#   define PRESHIFT(x)		(MAD_F(x) >> 12)
-#  else
-#   define PRESHIFT(x)		MAD_F(x)
-#  endif
-# endif
-
-static
-mad_fixed_t const D[17][32] = {
-# include "D.dat"
-};
-
-# if defined(ASO_SYNTH)
-void synth_full(struct mad_synth *, struct mad_frame const *,
-		unsigned int, unsigned int);
-# else
-/*
- * NAME:	synth->full()
- * DESCRIPTION:	perform full frequency PCM synthesis
- */
-static
-void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
-		unsigned int nch, unsigned int ns)
-{
-  unsigned int phase, ch, s, sb, pe, po;
-  mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8];
-  mad_fixed_t const (*sbsample)[36][32];
-  register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
-  register mad_fixed_t const (*Dptr)[32], *ptr;
-  register mad_fixed64hi_t hi;
-  register mad_fixed64lo_t lo;
-
-  for (ch = 0; ch < nch; ++ch) {
-    sbsample = &frame->sbsample[ch];
-    filter   = &synth->filter[ch];
-    phase    = synth->phase;
-    pcm1     = synth->pcm.samples[ch];
-
-    for (s = 0; s < ns; ++s) {
-      dct32((*sbsample)[s], phase >> 1,
-	    (*filter)[0][phase & 1], (*filter)[1][phase & 1]);
-
-      pe = phase & ~1;
-      po = ((phase - 1) & 0xf) | 1;
-
-      /* calculate 32 samples */
-
-      fe = &(*filter)[0][ phase & 1][0];
-      fx = &(*filter)[0][~phase & 1][0];
-      fo = &(*filter)[1][~phase & 1][0];
-
-      Dptr = &D[0];
-
-      ptr = *Dptr + po;
-      ML0(hi, lo, (*fx)[0], ptr[ 0]);
-      MLA(hi, lo, (*fx)[1], ptr[14]);
-      MLA(hi, lo, (*fx)[2], ptr[12]);
-      MLA(hi, lo, (*fx)[3], ptr[10]);
-      MLA(hi, lo, (*fx)[4], ptr[ 8]);
-      MLA(hi, lo, (*fx)[5], ptr[ 6]);
-      MLA(hi, lo, (*fx)[6], ptr[ 4]);
-      MLA(hi, lo, (*fx)[7], ptr[ 2]);
-      MLN(hi, lo);
-
-      ptr = *Dptr + pe;
-      MLA(hi, lo, (*fe)[0], ptr[ 0]);
-      MLA(hi, lo, (*fe)[1], ptr[14]);
-      MLA(hi, lo, (*fe)[2], ptr[12]);
-      MLA(hi, lo, (*fe)[3], ptr[10]);
-      MLA(hi, lo, (*fe)[4], ptr[ 8]);
-      MLA(hi, lo, (*fe)[5], ptr[ 6]);
-      MLA(hi, lo, (*fe)[6], ptr[ 4]);
-      MLA(hi, lo, (*fe)[7], ptr[ 2]);
-
-      *pcm1++ = SHIFT(MLZ(hi, lo));
-
-      pcm2 = pcm1 + 30;
-
-      for (sb = 1; sb < 16; ++sb) {
-	++fe;
-	++Dptr;
-
-	/* D[32 - sb][i] == -D[sb][31 - i] */
-
-	ptr = *Dptr + po;
-	ML0(hi, lo, (*fo)[0], ptr[ 0]);
-	MLA(hi, lo, (*fo)[1], ptr[14]);
-	MLA(hi, lo, (*fo)[2], ptr[12]);
-	MLA(hi, lo, (*fo)[3], ptr[10]);
-	MLA(hi, lo, (*fo)[4], ptr[ 8]);
-	MLA(hi, lo, (*fo)[5], ptr[ 6]);
-	MLA(hi, lo, (*fo)[6], ptr[ 4]);
-	MLA(hi, lo, (*fo)[7], ptr[ 2]);
-	MLN(hi, lo);
-
-	ptr = *Dptr + pe;
-	MLA(hi, lo, (*fe)[7], ptr[ 2]);
-	MLA(hi, lo, (*fe)[6], ptr[ 4]);
-	MLA(hi, lo, (*fe)[5], ptr[ 6]);
-	MLA(hi, lo, (*fe)[4], ptr[ 8]);
-	MLA(hi, lo, (*fe)[3], ptr[10]);
-	MLA(hi, lo, (*fe)[2], ptr[12]);
-	MLA(hi, lo, (*fe)[1], ptr[14]);
-	MLA(hi, lo, (*fe)[0], ptr[ 0]);
-
-	*pcm1++ = SHIFT(MLZ(hi, lo));
-
-	ptr = *Dptr - pe;
-	ML0(hi, lo, (*fe)[0], ptr[31 - 16]);
-	MLA(hi, lo, (*fe)[1], ptr[31 - 14]);
-	MLA(hi, lo, (*fe)[2], ptr[31 - 12]);
-	MLA(hi, lo, (*fe)[3], ptr[31 - 10]);
-	MLA(hi, lo, (*fe)[4], ptr[31 -  8]);
-	MLA(hi, lo, (*fe)[5], ptr[31 -  6]);
-	MLA(hi, lo, (*fe)[6], ptr[31 -  4]);
-	MLA(hi, lo, (*fe)[7], ptr[31 -  2]);
-
-	ptr = *Dptr - po;
-	MLA(hi, lo, (*fo)[7], ptr[31 -  2]);
-	MLA(hi, lo, (*fo)[6], ptr[31 -  4]);
-	MLA(hi, lo, (*fo)[5], ptr[31 -  6]);
-	MLA(hi, lo, (*fo)[4], ptr[31 -  8]);
-	MLA(hi, lo, (*fo)[3], ptr[31 - 10]);
-	MLA(hi, lo, (*fo)[2], ptr[31 - 12]);
-	MLA(hi, lo, (*fo)[1], ptr[31 - 14]);
-	MLA(hi, lo, (*fo)[0], ptr[31 - 16]);
-
-	*pcm2-- = SHIFT(MLZ(hi, lo));
-
-	++fo;
-      }
-
-      ++Dptr;
-
-      ptr = *Dptr + po;
-      ML0(hi, lo, (*fo)[0], ptr[ 0]);
-      MLA(hi, lo, (*fo)[1], ptr[14]);
-      MLA(hi, lo, (*fo)[2], ptr[12]);
-      MLA(hi, lo, (*fo)[3], ptr[10]);
-      MLA(hi, lo, (*fo)[4], ptr[ 8]);
-      MLA(hi, lo, (*fo)[5], ptr[ 6]);
-      MLA(hi, lo, (*fo)[6], ptr[ 4]);
-      MLA(hi, lo, (*fo)[7], ptr[ 2]);
-
-      *pcm1 = SHIFT(-MLZ(hi, lo));
-      pcm1 += 16;
-
-      phase = (phase + 1) % 16;
-    }
-  }
-}
-# endif
-
-/*
- * NAME:	synth->half()
- * DESCRIPTION:	perform half frequency PCM synthesis
- */
-static
-void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
-		unsigned int nch, unsigned int ns)
-{
-  unsigned int phase, ch, s, sb, pe, po;
-  mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8];
-  mad_fixed_t const (*sbsample)[36][32];
-  register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
-  register mad_fixed_t const (*Dptr)[32], *ptr;
-  register mad_fixed64hi_t hi;
-  register mad_fixed64lo_t lo;
-
-  for (ch = 0; ch < nch; ++ch) {
-    sbsample = &frame->sbsample[ch];
-    filter   = &synth->filter[ch];
-    phase    = synth->phase;
-    pcm1     = synth->pcm.samples[ch];
-
-    for (s = 0; s < ns; ++s) {
-      dct32((*sbsample)[s], phase >> 1,
-	    (*filter)[0][phase & 1], (*filter)[1][phase & 1]);
-
-      pe = phase & ~1;
-      po = ((phase - 1) & 0xf) | 1;
-
-      /* calculate 16 samples */
-
-      fe = &(*filter)[0][ phase & 1][0];
-      fx = &(*filter)[0][~phase & 1][0];
-      fo = &(*filter)[1][~phase & 1][0];
-
-      Dptr = &D[0];
-
-      ptr = *Dptr + po;
-      ML0(hi, lo, (*fx)[0], ptr[ 0]);
-      MLA(hi, lo, (*fx)[1], ptr[14]);
-      MLA(hi, lo, (*fx)[2], ptr[12]);
-      MLA(hi, lo, (*fx)[3], ptr[10]);
-      MLA(hi, lo, (*fx)[4], ptr[ 8]);
-      MLA(hi, lo, (*fx)[5], ptr[ 6]);
-      MLA(hi, lo, (*fx)[6], ptr[ 4]);
-      MLA(hi, lo, (*fx)[7], ptr[ 2]);
-      MLN(hi, lo);
-
-      ptr = *Dptr + pe;
-      MLA(hi, lo, (*fe)[0], ptr[ 0]);
-      MLA(hi, lo, (*fe)[1], ptr[14]);
-      MLA(hi, lo, (*fe)[2], ptr[12]);
-      MLA(hi, lo, (*fe)[3], ptr[10]);
-      MLA(hi, lo, (*fe)[4], ptr[ 8]);
-      MLA(hi, lo, (*fe)[5], ptr[ 6]);
-      MLA(hi, lo, (*fe)[6], ptr[ 4]);
-      MLA(hi, lo, (*fe)[7], ptr[ 2]);
-
-      *pcm1++ = SHIFT(MLZ(hi, lo));
-
-      pcm2 = pcm1 + 14;
-
-      for (sb = 1; sb < 16; ++sb) {
-	++fe;
-	++Dptr;
-
-	/* D[32 - sb][i] == -D[sb][31 - i] */
-
-	if (!(sb & 1)) {
-	  ptr = *Dptr + po;
-	  ML0(hi, lo, (*fo)[0], ptr[ 0]);
-	  MLA(hi, lo, (*fo)[1], ptr[14]);
-	  MLA(hi, lo, (*fo)[2], ptr[12]);
-	  MLA(hi, lo, (*fo)[3], ptr[10]);
-	  MLA(hi, lo, (*fo)[4], ptr[ 8]);
-	  MLA(hi, lo, (*fo)[5], ptr[ 6]);
-	  MLA(hi, lo, (*fo)[6], ptr[ 4]);
-	  MLA(hi, lo, (*fo)[7], ptr[ 2]);
-	  MLN(hi, lo);
-
-	  ptr = *Dptr + pe;
-	  MLA(hi, lo, (*fe)[7], ptr[ 2]);
-	  MLA(hi, lo, (*fe)[6], ptr[ 4]);
-	  MLA(hi, lo, (*fe)[5], ptr[ 6]);
-	  MLA(hi, lo, (*fe)[4], ptr[ 8]);
-	  MLA(hi, lo, (*fe)[3], ptr[10]);
-	  MLA(hi, lo, (*fe)[2], ptr[12]);
-	  MLA(hi, lo, (*fe)[1], ptr[14]);
-	  MLA(hi, lo, (*fe)[0], ptr[ 0]);
-
-	  *pcm1++ = SHIFT(MLZ(hi, lo));
-
-	  ptr = *Dptr - po;
-	  ML0(hi, lo, (*fo)[7], ptr[31 -  2]);
-	  MLA(hi, lo, (*fo)[6], ptr[31 -  4]);
-	  MLA(hi, lo, (*fo)[5], ptr[31 -  6]);
-	  MLA(hi, lo, (*fo)[4], ptr[31 -  8]);
-	  MLA(hi, lo, (*fo)[3], ptr[31 - 10]);
-	  MLA(hi, lo, (*fo)[2], ptr[31 - 12]);
-	  MLA(hi, lo, (*fo)[1], ptr[31 - 14]);
-	  MLA(hi, lo, (*fo)[0], ptr[31 - 16]);
-
-	  ptr = *Dptr - pe;
-	  MLA(hi, lo, (*fe)[0], ptr[31 - 16]);
-	  MLA(hi, lo, (*fe)[1], ptr[31 - 14]);
-	  MLA(hi, lo, (*fe)[2], ptr[31 - 12]);
-	  MLA(hi, lo, (*fe)[3], ptr[31 - 10]);
-	  MLA(hi, lo, (*fe)[4], ptr[31 -  8]);
-	  MLA(hi, lo, (*fe)[5], ptr[31 -  6]);
-	  MLA(hi, lo, (*fe)[6], ptr[31 -  4]);
-	  MLA(hi, lo, (*fe)[7], ptr[31 -  2]);
-
-	  *pcm2-- = SHIFT(MLZ(hi, lo));
-	}
-
-	++fo;
-      }
-
-      ++Dptr;
-
-      ptr = *Dptr + po;
-      ML0(hi, lo, (*fo)[0], ptr[ 0]);
-      MLA(hi, lo, (*fo)[1], ptr[14]);
-      MLA(hi, lo, (*fo)[2], ptr[12]);
-      MLA(hi, lo, (*fo)[3], ptr[10]);
-      MLA(hi, lo, (*fo)[4], ptr[ 8]);
-      MLA(hi, lo, (*fo)[5], ptr[ 6]);
-      MLA(hi, lo, (*fo)[6], ptr[ 4]);
-      MLA(hi, lo, (*fo)[7], ptr[ 2]);
-
-      *pcm1 = SHIFT(-MLZ(hi, lo));
-      pcm1 += 8;
-
-      phase = (phase + 1) % 16;
-    }
-  }
-}
-
-/*
- * NAME:	synth->frame()
- * DESCRIPTION:	perform PCM synthesis of frame subband samples
- */
-void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
-{
-  unsigned int nch, ns;
-  void (*synth_frame)(struct mad_synth *, struct mad_frame const *,
-		      unsigned int, unsigned int);
-
-  nch = MAD_NCHANNELS(&frame->header);
-  ns  = MAD_NSBSAMPLES(&frame->header);
-
-  synth->pcm.samplerate = frame->header.samplerate;
-  synth->pcm.channels   = nch;
-  synth->pcm.length     = 32 * ns;
-
-  synth_frame = synth_full;
-
-  if (frame->options & MAD_OPTION_HALFSAMPLERATE) {
-    synth->pcm.samplerate /= 2;
-    synth->pcm.length     /= 2;
-
-    synth_frame = synth_half;
-  }
-
-  synth_frame(synth, frame, nch, ns);
-
-  synth->phase = (synth->phase + ns) % 16;
-}
--- a/sys/src/games/mp3dec/synth.h
+++ /dev/null
@@ -1,69 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $
- */
-
-# ifndef LIBMAD_SYNTH_H
-# define LIBMAD_SYNTH_H
-
-# include "fixed.h"
-# include "frame.h"
-
-struct mad_pcm {
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-  unsigned short channels;		/* number of channels */
-  unsigned short length;		/* number of samples per channel */
-  mad_fixed_t samples[2][1152];		/* PCM output samples [ch][sample] */
-};
-
-struct mad_synth {
-  mad_fixed_t filter[2][2][2][16][8];	/* polyphase filterbank outputs */
-  					/* [ch][eo][peo][s][v] */
-
-  unsigned int phase;			/* current processing phase */
-
-  struct mad_pcm pcm;			/* PCM output */
-};
-
-/* single channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_SINGLE = 0
-};
-
-/* dual channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_DUAL_1 = 0,
-  MAD_PCM_CHANNEL_DUAL_2 = 1
-};
-
-/* stereo PCM selector */
-enum {
-  MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
-  MAD_PCM_CHANNEL_STEREO_RIGHT = 1
-};
-
-void mad_synth_init(struct mad_synth *);
-
-# define mad_synth_finish(synth)  /* nothing */
-
-void mad_synth_mute(struct mad_synth *);
-
-void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
-
-# endif
--- a/sys/src/games/mp3dec/timer.h
+++ /dev/null
@@ -1,100 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $
- */
-
-# ifndef LIBMAD_TIMER_H
-# define LIBMAD_TIMER_H
-
-typedef struct {
-  signed long seconds;		/* whole seconds */
-  unsigned long fraction;	/* 1/MAD_TIMER_RESOLUTION seconds */
-} mad_timer_t;
-
-extern mad_timer_t const mad_timer_zero;
-
-# define MAD_TIMER_RESOLUTION	352800000UL
-
-enum mad_units {
-  MAD_UNITS_HOURS	 =    -2,
-  MAD_UNITS_MINUTES	 =    -1,
-  MAD_UNITS_SECONDS	 =     0,
-
-  /* metric units */
-
-  MAD_UNITS_DECISECONDS	 =    10,
-  MAD_UNITS_CENTISECONDS =   100,
-  MAD_UNITS_MILLISECONDS =  1000,
-
-  /* audio sample units */
-
-  MAD_UNITS_8000_HZ	 =  8000,
-  MAD_UNITS_11025_HZ	 = 11025,
-  MAD_UNITS_12000_HZ	 = 12000,
-
-  MAD_UNITS_16000_HZ	 = 16000,
-  MAD_UNITS_22050_HZ	 = 22050,
-  MAD_UNITS_24000_HZ	 = 24000,
-
-  MAD_UNITS_32000_HZ	 = 32000,
-  MAD_UNITS_44100_HZ	 = 44100,
-  MAD_UNITS_48000_HZ	 = 48000,
-
-  /* video frame/field units */
-
-  MAD_UNITS_24_FPS	 =    24,
-  MAD_UNITS_25_FPS	 =    25,
-  MAD_UNITS_30_FPS	 =    30,
-  MAD_UNITS_48_FPS	 =    48,
-  MAD_UNITS_50_FPS	 =    50,
-  MAD_UNITS_60_FPS	 =    60,
-
-  /* CD audio frames */
-
-  MAD_UNITS_75_FPS	 =    75,
-
-  /* video drop-frame units */
-
-  MAD_UNITS_23_976_FPS	 =   -24,
-  MAD_UNITS_24_975_FPS	 =   -25,
-  MAD_UNITS_29_97_FPS	 =   -30,
-  MAD_UNITS_47_952_FPS	 =   -48,
-  MAD_UNITS_49_95_FPS	 =   -50,
-  MAD_UNITS_59_94_FPS	 =   -60
-};
-
-# define mad_timer_reset(timer)	((void) (*(timer) = mad_timer_zero))
-
-int mad_timer_compare(mad_timer_t, mad_timer_t);
-
-# define mad_timer_sign(timer)	mad_timer_compare((timer), mad_timer_zero)
-
-void mad_timer_negate(mad_timer_t *);
-mad_timer_t mad_timer_abs(mad_timer_t);
-
-void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long);
-void mad_timer_add(mad_timer_t *, mad_timer_t);
-void mad_timer_multiply(mad_timer_t *, signed long);
-
-signed long mad_timer_count(mad_timer_t, enum mad_units);
-unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
-void mad_timer_string(mad_timer_t, char *, char const *,
-		      enum mad_units, enum mad_units, unsigned long);
-
-# endif
--- a/sys/src/games/mp3dec/version.c
+++ /dev/null
@@ -1,91 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $
- */
-
-# ifdef HAVE_CONFIG_H
-#  include "config.h"
-# endif
-
-# include "global.h"
-
-# include "version.h"
-
-char const mad_version[]   = "MPEG Audio Decoder " MAD_VERSION;
-char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR;
-char const mad_author[]    = MAD_AUTHOR " <" MAD_EMAIL ">";
-
-char const mad_build[] = ""
-# if defined(DEBUG)
-  "DEBUG "
-# elif defined(NDEBUG)
-  "NDEBUG "
-# endif
-
-# if defined(EXPERIMENTAL)
-  "EXPERIMENTAL "
-# endif
-
-# if defined(FPM_64BIT)
-  "FPM_64BIT "
-# elif defined(FPM_INTEL)
-  "FPM_INTEL "
-# elif defined(FPM_ARM)
-  "FPM_ARM "
-# elif defined(FPM_MIPS)
-  "FPM_MIPS "
-# elif defined(FPM_SPARC)
-  "FPM_SPARC "
-# elif defined(FPM_PPC)
-  "FPM_PPC "
-# elif defined(FPM_DEFAULT)
-  "FPM_DEFAULT "
-# endif
-
-# if defined(ASO_IMDCT)
-  "ASO_IMDCT "
-# endif
-# if defined(ASO_INTERLEAVE1)
-  "ASO_INTERLEAVE1 "
-# endif
-# if defined(ASO_INTERLEAVE2)
-  "ASO_INTERLEAVE2 "
-# endif
-# if defined(ASO_ZEROCHECK)
-  "ASO_ZEROCHECK "
-# endif
-
-# if defined(OPT_SPEED)
-  "OPT_SPEED "
-# elif defined(OPT_ACCURACY)
-  "OPT_ACCURACY "
-# endif
-
-# if defined(OPT_SSO)
-  "OPT_SSO "
-# endif
-
-# if defined(OPT_DCTO)  /* never defined here */
-  "OPT_DCTO "
-# endif
-
-# if defined(OPT_STRICT)
-  "OPT_STRICT "
-# endif
-;
--- a/sys/src/games/mp3dec/version.h
+++ /dev/null
@@ -1,47 +1,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $
- */
-
-# ifndef LIBMAD_VERSION_H
-# define LIBMAD_VERSION_H
-
-# define MAD_VERSION_MAJOR	0
-# define MAD_VERSION_MINOR	15
-# define MAD_VERSION_PATCH	1
-# define MAD_VERSION_EXTRA	" (beta)"
-
-# define MAD_VERSION_STRINGIZE(str)	#str
-# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)
-
-# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_MINOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_PATCH)  \
-				MAD_VERSION_EXTRA
-
-# define MAD_PUBLISHYEAR	"2000-2004"
-# define MAD_AUTHOR		"Underbit Technologies, Inc."
-# define MAD_EMAIL		"[email protected]"
-
-extern char const mad_version[];
-extern char const mad_copyright[];
-extern char const mad_author[];
-extern char const mad_build[];
-
-# endif
--- a/sys/src/games/mp3enc/README
+++ /dev/null
@@ -1,49 +1,0 @@
-This is LAME 3.88 from www.mp3dev.org,
-stripped down for Plan 9.
-
--rsc
-
-=============================================
-                      LAME 3.xx   
-               LAME Ain't an MP3 Encoder
-                 http://www.mp3dev.org
-	             March 2001
-
-Originally developed by Mike Cheng (www.uq.net.au/~zzmcheng).  Now 
-maintained by Mark Taylor (www.sulaco.org/mp3).
-
-This code is distributed under the GNU LESSER PUBLIC LICENSE
-(LGPL, see www.gnu.org) with the following modification:
-
-1. If you determine that distribution of LAME requires a patent license,
-   and you obtain a patent license, you may distribute LAME even though
-   redistribution of LAME may also require a patent license.  
-
-2. You agree not to enforce any patent claims for any aspect of
-   MPEG audio compression, or any other techniques contained in 
-   the LAME source code. 
-
-
-============================================================================
-
-see the file "INSTALL" for installation (compiling) instructions.  
-see the file "USAGE" for the most up-to-date guide to the command line options.
-see the file "LICENSE" for details on how to use LAME in non-GPL programs.
-see the file "HACKING" if you are interested in working on LAME
-see the file "API" for details of the LAME encoding library API
-
-There is HTML documentation and a man page in the doc directory.
-The HTML docs were contributed by Gabriel Bouvigne (www.mp3tech.org).
-See www.mp3tech.org for more audio compression information and links.
-
-============================================================================
-
-LAME uses the MPGLIB decoding engine, from the MPG123 package, written
-by: Michael Hipp (www.mpg123.de) MPGLIB is released under the GPL.
-
-Copyrights (c) 1999,2000,2001 by Mark Taylor
-Copyrights (c) 1998 by Michael Cheng
-Copyrights (c) 1995,1996,1997 by Michael Hipp: mpglib
-
-As well as additional copyrights as documented in the source code.  
-
--- a/sys/src/games/mp3enc/VbrTag.c
+++ /dev/null
@@ -1,575 +1,0 @@
-/*
- *	Xing VBR tagging for LAME.
- *
- *	Copyright (c) 1999 A.L. Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: VbrTag.c,v 1.20 2001/02/27 09:59:16 robert Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "machine.h"
-#if defined(__riscos__) && defined(FPA10)
-#include	"ymath.h"
-#else
-#include	<math.h>
-#endif
-#include "VbrTag.h"
-#include "version.h"
-#include "bitstream.h"
-#include "VbrTag.h"
-#include	<assert.h>
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-#ifdef _DEBUG
-/*  #define DEBUG_VBRTAG */
-#endif
-
-/*
-//    4 bytes for Header Tag
-//    4 bytes for Header Flags
-//  100 bytes for entry (NUMTOCENTRIES)
-//    4 bytes for FRAME SIZE
-//    4 bytes for STREAM_SIZE
-//    4 bytes for VBR SCALE. a VBR quality indicator: 0=best 100=worst
-//   20 bytes for LAME tag.  for example, "LAME3.12 (beta 6)"
-// ___________
-//  140 bytes
-*/
-#define VBRHEADERSIZE (NUMTOCENTRIES+4+4+4+4+4)
-
-/* the size of the Xing header (MPEG1 and MPEG2) in kbps */
-#define XING_BITRATE1 128
-#define XING_BITRATE2  64
-#define XING_BITRATE25 32
-
-
-
-const static char	VBRTag[]={"Xing"};
-const int SizeOfEmptyFrame[2][2]=
-{
-	{17,9},
-	{32,17},
-};
-
-
-/***********************************************************************
- *  Robert Hegemann 2001-01-17
- ***********************************************************************/
-
-void addVbr(VBR_seek_info_t * v, int bitrate)
-{
-    int i;
-
-    v->sum += bitrate;
-    v->seen ++;
-    
-    if (v->seen < v->want) {
-        return;
-    }
-
-    if (v->pos < v->size) {
-        v->bag[v->pos] = v->sum;
-        v->pos ++;
-        v->seen = 0;
-    }
-    if (v->pos == v->size) {
-        for (i = 1; i < v->size; i += 2) {
-            v->bag[i/2] = v->bag[i]; 
-        }
-        v->want *= 2;
-        v->pos  /= 2;
-    }
-}
-
-void Xing_seek_table(VBR_seek_info_t * v, unsigned char *t)
-{
-    int i, index;
-    int seek_point;
-    
-    if (v->pos <= 0)
-        return;
-        
-    for (i = 1; i < NUMTOCENTRIES; ++i) {
-        float j = i/(float)NUMTOCENTRIES, act, sum;
-        index = (int)(floor(j * v->pos));
-        if (index > v->pos-1)
-            index = v->pos-1;
-        act = v->bag[index];
-        sum = v->sum;
-        seek_point = (int)(256. * act / sum);
-        if (seek_point > 255)
-            seek_point = 255;
-        t[i] = seek_point;
-    }
-}
-
-#if 0
-void print_seeking(unsigned char *t)
-{
-    int i;
-    
-    printf("seeking table ");
-    for (i = 0; i < NUMTOCENTRIES; ++i) {
-        printf(" %d ", t[i]);
-    }
-    printf("\n");
-}
-#endif
-
-
-
-/****************************************************************************
- * AddVbrFrame: Add VBR entry, used to fill the VBR the TOC entries
- * Paramters:
- *	nStreamPos: how many bytes did we write to the bitstream so far
- *				(in Bytes NOT Bits)
- ****************************************************************************
-*/
-void AddVbrFrame(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    int kbps = bitrate_table[gfp->version][gfc->bitrate_index];
-    
-    if (gfc->VBR_seek_table.bag == NULL) {
-        gfc->VBR_seek_table.sum  = 0;
-        gfc->VBR_seek_table.seen = 0;
-        gfc->VBR_seek_table.want = 1;
-        gfc->VBR_seek_table.pos  = 0;
-        gfc->VBR_seek_table.bag  = malloc (400*sizeof(int));
-        if (gfc->VBR_seek_table.bag != NULL) {
-            gfc->VBR_seek_table.size = 400;
-        }
-        else {
-            gfc->VBR_seek_table.size = 0;
-            ERRORF (gfc,"Error: can't allocate VbrFrames buffer\n");
-            return;
-        }   
-    }
-    addVbr(&gfc->VBR_seek_table, kbps);
-    gfp->nVbrNumFrames++;
-}
-
-
-/*-------------------------------------------------------------*/
-static int ExtractI4(unsigned char *buf)
-{
-	int x;
-	/* big endian extract */
-	x = buf[0];
-	x <<= 8;
-	x |= buf[1];
-	x <<= 8;
-	x |= buf[2];
-	x <<= 8;
-	x |= buf[3];
-	return x;
-}
-
-void CreateI4(unsigned char *buf, int nValue)
-{
-        /* big endian create */
-	buf[0]=(nValue>>24)&0xff;
-	buf[1]=(nValue>>16)&0xff;
-	buf[2]=(nValue>> 8)&0xff;
-	buf[3]=(nValue    )&0xff;
-}
-
-
-/*-------------------------------------------------------------*/
-/* Same as GetVbrTag below, but only checks for the Xing tag.
-   requires buf to contain only 40 bytes */
-/*-------------------------------------------------------------*/
-int CheckVbrTag(unsigned char *buf)
-{
-	int			h_id, h_mode, h_sr_index;
-
-	/* get selected MPEG header data */
-	h_id       = (buf[1] >> 3) & 1;
-	h_sr_index = (buf[2] >> 2) & 3;
-	h_mode     = (buf[3] >> 6) & 3;
-
-	/*  determine offset of header */
-	if( h_id )
-	{
-                /* mpeg1 */
-		if( h_mode != 3 )	buf+=(32+4);
-		else				buf+=(17+4);
-	}
-	else
-	{
-                /* mpeg2 */
-		if( h_mode != 3 ) buf+=(17+4);
-		else              buf+=(9+4);
-	}
-
-	if( buf[0] != VBRTag[0] ) return 0;    /* fail */
-	if( buf[1] != VBRTag[1] ) return 0;    /* header not found*/
-	if( buf[2] != VBRTag[2] ) return 0;
-	if( buf[3] != VBRTag[3] ) return 0;
-	return 1;
-}
-
-int GetVbrTag(VBRTAGDATA *pTagData,  unsigned char *buf)
-{
-	int			i, head_flags;
-	int			h_bitrate,h_id, h_mode, h_sr_index;
-
-	/* get Vbr header data */
-	pTagData->flags = 0;
-
-	/* get selected MPEG header data */
-	h_id       = (buf[1] >> 3) & 1;
-	h_sr_index = (buf[2] >> 2) & 3;
-	h_mode     = (buf[3] >> 6) & 3;
-        h_bitrate  = ((buf[2]>>4)&0xf);
-	h_bitrate = bitrate_table[h_id][h_bitrate];
-
-
-	/*  determine offset of header */
-	if( h_id )
-	{
-                /* mpeg1 */
-		if( h_mode != 3 )	buf+=(32+4);
-		else				buf+=(17+4);
-	}
-	else
-	{
-                /* mpeg2 */
-		if( h_mode != 3 ) buf+=(17+4);
-		else              buf+=(9+4);
-	}
-
-	if( buf[0] != VBRTag[0] ) return 0;    /* fail */
-	if( buf[1] != VBRTag[1] ) return 0;    /* header not found*/
-	if( buf[2] != VBRTag[2] ) return 0;
-	if( buf[3] != VBRTag[3] ) return 0;
-
-	buf+=4;
-
-	pTagData->h_id = h_id;
-	pTagData->samprate = samplerate_table[h_id][h_sr_index];
-
-	if( h_id == 0 )
-		pTagData->samprate >>= 1;
-
-	head_flags = pTagData->flags = ExtractI4(buf); buf+=4;      /* get flags */
-
-	if( head_flags & FRAMES_FLAG )
-	{
-		pTagData->frames   = ExtractI4(buf); buf+=4;
-	}
-
-	if( head_flags & BYTES_FLAG )
-	{
-		pTagData->bytes = ExtractI4(buf); buf+=4;
-	}
-
-	if( head_flags & TOC_FLAG )
-	{
-		if( pTagData->toc != NULL )
-		{
-			for(i=0;i<NUMTOCENTRIES;i++)
-				pTagData->toc[i] = buf[i];
-		}
-		buf+=NUMTOCENTRIES;
-	}
-
-	pTagData->vbr_scale = -1;
-
-	if( head_flags & VBR_SCALE_FLAG )
-	{
-		pTagData->vbr_scale = ExtractI4(buf); buf+=4;
-	}
-
-	pTagData->headersize = 
-	  ((h_id+1)*72000*h_bitrate) / pTagData->samprate;
-
-
-#ifdef DEBUG_VBRTAG
-	DEBUGF("\n\n********************* VBR TAG INFO *****************\n");
-	DEBUGF("tag         :%s\n",VBRTag);
-	DEBUGF("head_flags  :%d\n",head_flags);
-	DEBUGF("bytes       :%d\n",pTagData->bytes);
-	DEBUGF("frames      :%d\n",pTagData->frames);
-	DEBUGF("VBR Scale   :%d\n",pTagData->vbr_scale);
-	DEBUGF("toc:\n");
-	if( pTagData->toc != NULL )
-	{
-		for(i=0;i<NUMTOCENTRIES;i++)
-		{
-			if( (i%10) == 0 ) DEBUGF("\n");
-			DEBUGF(" %3d", (int)(pTagData->toc[i]));
-		}
-	}
-	DEBUGF("\n***************** END OF VBR TAG INFO ***************\n");
-#endif
-	return 1;       /* success */
-}
-
-
-/****************************************************************************
- * InitVbrTag: Initializes the header, and write empty frame to stream
- * Paramters:
- *				fpStream: pointer to output file stream
- *				nMode	: Channel Mode: 0=STEREO 1=JS 2=DS 3=MONO
- ****************************************************************************
-*/
-int InitVbrTag(lame_global_flags *gfp)
-{
-	int nMode,SampIndex;
-	lame_internal_flags *gfc = gfp->internal_flags;
-#define MAXFRAMESIZE 576
-	//	u_char pbtStreamBuffer[MAXFRAMESIZE];
-	nMode = gfp->mode;
-	SampIndex = gfc->samplerate_index;
-
-
-	/* Clear Frame position array variables */
-	gfp->pVbrFrames=NULL;
-	gfp->nVbrNumFrames=0;
-	gfp->nVbrFrameBufferSize=0;
-
-
-	/* Clear stream buffer */
-	//	memset(pbtStreamBuffer,0x00,sizeof(pbtStreamBuffer));
-
-
-
-	/* Reserve the proper amount of bytes */
-	if (nMode==3)
-	{
-		gfp->nZeroStreamSize=SizeOfEmptyFrame[gfp->version][1]+4;
-	}
-	else
-	{
-		gfp->nZeroStreamSize=SizeOfEmptyFrame[gfp->version][0]+4;
-	}
-
-	/*
-	// Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).
-        // (at 48kHz they use 56kbs since 48kbs frame not big enough for
-        // table of contents)
-	// let's always embed Xing header inside a 64kbs layer III frame.
-	// this gives us enough room for a LAME version string too.
-	// size determined by sampling frequency (MPEG1)
-	// 32kHz:    216 bytes@48kbs    288bytes@ 64kbs
-	// 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)
-	// 48kHz:    144 bytes          192
-	//
-	// MPEG 2 values are the same since the framesize and samplerate
-        // are each reduced by a factor of 2.
-	*/
-	{
-	int i,bitrate,tot;
-	if (1==gfp->version) {
-	  bitrate = XING_BITRATE1;
-	} else {
-	  if (gfp->out_samplerate < 16000 )
-	    bitrate = XING_BITRATE25;
-	  else
-	    bitrate = XING_BITRATE2;
-	}
-	gfp->TotalFrameSize= 
-	  ((gfp->version+1)*72000*bitrate) / gfp->out_samplerate;
-	tot = (gfp->nZeroStreamSize+VBRHEADERSIZE);
-	tot += 20;  /* extra 20 bytes for LAME & version string */
-
-	assert(gfp->TotalFrameSize >= tot );
-	assert(gfp->TotalFrameSize <= MAXFRAMESIZE );
-
-	for (i=0; i<gfp->TotalFrameSize; ++i)
-	  add_dummy_byte(gfp,0);
-	}
-
-	/* Success */
-	return 0;
-}
-
-
-
-/****************************************************************************
- * PutVbrTag: Write final VBR tag to the file
- * Paramters:
- *				lpszFileName: filename of MP3 bit stream
- *				nVbrScale	: encoder quality indicator (0..100)
- ****************************************************************************
-*/
-int PutVbrTag(lame_global_flags *gfp,FILE *fpStream,int nVbrScale)
-{
-        lame_internal_flags * gfc = gfp->internal_flags;
-
-	long lFileSize;
-	int nStreamIndex;
-	char abyte,bbyte;
-	u_char		btToc[NUMTOCENTRIES];
-	u_char pbtStreamBuffer[MAXFRAMESIZE];
-	char str1[80];
-        unsigned char id3v2Header[10];
-        size_t id3v2TagSize;
-
-        if (gfc->VBR_seek_table.pos <= 0)
-		return -1;
-
-
-	/* Clear stream buffer */
-	memset(pbtStreamBuffer,0x00,sizeof(pbtStreamBuffer));
-
-	/* Seek to end of file*/
-	fseek(fpStream,0,SEEK_END);
-
-	/* Get file size */
-	lFileSize=ftell(fpStream);
-
-	/* Abort if file has zero length. Yes, it can happen :) */
-	if (lFileSize==0)
-		return -1;
-
-        /*
-         * The VBR tag may NOT be located at the beginning of the stream.
-         * If an ID3 version 2 tag was added, then it must be skipped to write
-         * the VBR tag data.
-         */
-
-        /* seek to the beginning of the stream */
-	fseek(fpStream,0,SEEK_SET);
-        /* read 10 bytes in case there's an ID3 version 2 header here */
-        fread(id3v2Header,1,sizeof id3v2Header,fpStream);
-        /* does the stream begin with the ID3 version 2 file identifier? */
-        if (!strncmp((char *)id3v2Header,"ID3",3)) {
-          /* the tag size (minus the 10-byte header) is encoded into four
-           * bytes where the most significant bit is clear in each byte */
-          id3v2TagSize=(((id3v2Header[6] & 0x7f)<<21)
-            | ((id3v2Header[7] & 0x7f)<<14)
-            | ((id3v2Header[8] & 0x7f)<<7)
-            | (id3v2Header[9] & 0x7f))
-            + sizeof id3v2Header;
-        } else {
-          /* no ID3 version 2 tag in this stream */
-          id3v2TagSize=0;
-        }
-
-	/* Seek to first real frame */
-	fseek(fpStream,id3v2TagSize+gfp->TotalFrameSize,SEEK_SET);
-
-	/* Read the header (first valid frame) */
-	fread(pbtStreamBuffer,4,1,fpStream);
-
-	/* the default VBR header. 48 kbps layer III, no padding, no crc */
-	/* but sampling freq, mode andy copyright/copy protection taken */
-	/* from first valid frame */
-	pbtStreamBuffer[0]=(u_char) 0xff;
-	abyte = (pbtStreamBuffer[1] & (char) 0xf1);
-	{ int bitrate;
-	if (1==gfp->version) {
-	  bitrate = XING_BITRATE1;
-	} else {
-	  if (gfp->out_samplerate < 16000 )
-	    bitrate = XING_BITRATE25;
-	  else
-	    bitrate = XING_BITRATE2;
-	}
-	  bbyte = 16*BitrateIndex(bitrate,gfp->version,gfp->out_samplerate);
-	}
-
-	/* Use as much of the info from the real frames in the
-	 * Xing header:  samplerate, channels, crc, etc...
-	 */ 
-	if (gfp->version==1) {
-	  /* MPEG1 */
-	  pbtStreamBuffer[1]=abyte | (char) 0x0a;     /* was 0x0b; */
-	  abyte = pbtStreamBuffer[2] & (char) 0x0d;   /* AF keep also private bit */
-	  pbtStreamBuffer[2]=(char) bbyte | abyte;     /* 64kbs MPEG1 frame */
-	}else{
-	  /* MPEG2 */
-	  pbtStreamBuffer[1]=abyte | (char) 0x02;     /* was 0x03; */
-	  abyte = pbtStreamBuffer[2] & (char) 0x0d;   /* AF keep also private bit */
-	  pbtStreamBuffer[2]=(char) bbyte | abyte;     /* 64kbs MPEG2 frame */
-	}
-
-
-	/*Seek to the beginning of the stream */
-	fseek(fpStream,id3v2TagSize,SEEK_SET);
-
-	/* Clear all TOC entries */
-	memset(btToc,0,sizeof(btToc));
-
-        Xing_seek_table (&gfc->VBR_seek_table, btToc);
-        /* print_seeking (btToc); */
-
-	/* Start writing the tag after the zero frame */
-	nStreamIndex=gfp->nZeroStreamSize;
-
-	/* Put Vbr tag */
-	pbtStreamBuffer[nStreamIndex++]=VBRTag[0];
-	pbtStreamBuffer[nStreamIndex++]=VBRTag[1];
-	pbtStreamBuffer[nStreamIndex++]=VBRTag[2];
-	pbtStreamBuffer[nStreamIndex++]=VBRTag[3];
-
-	/* Put header flags */
-	CreateI4(&pbtStreamBuffer[nStreamIndex],FRAMES_FLAG+BYTES_FLAG+TOC_FLAG+VBR_SCALE_FLAG);
-	nStreamIndex+=4;
-
-	/* Put Total Number of frames */
-	CreateI4(&pbtStreamBuffer[nStreamIndex],gfp->nVbrNumFrames);
-	nStreamIndex+=4;
-
-	/* Put Total file size */
-	CreateI4(&pbtStreamBuffer[nStreamIndex],(int)lFileSize);
-	nStreamIndex+=4;
-
-	/* Put TOC */
-	memcpy(&pbtStreamBuffer[nStreamIndex],btToc,sizeof(btToc));
-	nStreamIndex+=sizeof(btToc);
-
-	/* Put VBR SCALE */
-	CreateI4(&pbtStreamBuffer[nStreamIndex],nVbrScale);
-	nStreamIndex+=4;
-
-	/* Put LAME ID */
-        sprintf ( str1, "LAME%s", get_lame_short_version () );
-        strncpy ( (char*)pbtStreamBuffer + nStreamIndex, str1, 20 );
-        nStreamIndex += 20;
-
-
-#ifdef DEBUG_VBRTAG
-{
-	VBRTAGDATA TestHeader;
-	GetVbrTag(&TestHeader,pbtStreamBuffer);
-}
-#endif
-
-        /* Put it all to disk again */
-	if (fwrite(pbtStreamBuffer,(unsigned int)gfp->TotalFrameSize,1,fpStream)!=1)
-	{
-		return -1;
-	}
-	/* Save to delete the frame buffer */
-	free(gfp->pVbrFrames);
-	gfp->pVbrFrames=NULL;
-
-	return 0;       /* success */
-}
-
--- a/sys/src/games/mp3enc/VbrTag.h
+++ /dev/null
@@ -1,76 +1,0 @@
-/*
- *	Xing VBR tagging for LAME.
- *
- *	Copyright (c) 1999 A.L. Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_VRBTAG_H
-#define LAME_VRBTAG_H
-#include "lame.h"
-/* -----------------------------------------------------------
- * A Vbr header may be present in the ancillary
- * data field of the first frame of an mp3 bitstream
- * The Vbr header (optionally) contains
- *      frames      total number of audio frames in the bitstream
- *      bytes       total number of bytes in the bitstream
- *      toc         table of contents
-
- * toc (table of contents) gives seek points
- * for random access
- * the ith entry determines the seek point for
- * i-percent duration
- * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
- * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes
- */
-
-
-#define FRAMES_FLAG     0x0001
-#define BYTES_FLAG      0x0002
-#define TOC_FLAG        0x0004
-#define VBR_SCALE_FLAG  0x0008
-
-#define NUMTOCENTRIES 100
-
-#define FRAMES_AND_BYTES (FRAMES_FLAG | BYTES_FLAG)
-
-
- 
-/*structure to receive extracted header */
-/* toc may be NULL*/
-typedef struct
-{
-  int		h_id;			/* from MPEG header, 0=MPEG2, 1=MPEG1 */
-  int		samprate;		/* determined from MPEG header */
-  int		flags;			/* from Vbr header data */
-  int		frames;			/* total bit stream frames from Vbr header data */
-  int		bytes;			/* total bit stream bytes from Vbr header data*/
-  int		vbr_scale;		/* encoded vbr scale from Vbr header data*/
-  unsigned char	toc[NUMTOCENTRIES];	/* may be NULL if toc not desired*/
-  int           headersize;             /* size of VBR header, in bytes */
-}   VBRTAGDATA;
-
-int CheckVbrTag(unsigned char *buf);
-int GetVbrTag(VBRTAGDATA *pTagData,  unsigned char *buf);
-
-int SeekPoint(unsigned char TOC[NUMTOCENTRIES], int file_bytes, float percent);
-int InitVbrTag(lame_global_flags *gfp);
-int PutVbrTag(lame_global_flags *gfp,FILE *fid,int nVbrScale);
-void AddVbrFrame(lame_global_flags *gfp);
-
-
-#endif
--- a/sys/src/games/mp3enc/bitstream.c
+++ /dev/null
@@ -1,880 +1,0 @@
-/*
- *	MP3 bitstream Output interface for LAME
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
-#include "tables.h"
-#include "bitstream.h"
-#include "quantize.h"
-#include "quantize_pvt.h"
-#include "version.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-/* This is the scfsi_band table from 2.4.2.7 of the IS */
-const int scfsi_band[5] = { 0, 6, 11, 16, 21 };
-
-
-/* unsigned int is at least this large:  */
-/* we work with ints, so when doing bit manipulation, we limit
- * ourselves to MAX_LENGTH-2 just to be on the safe side */
-#define MAX_LENGTH      32  
-
-
-
-#ifdef DEBUG
-static int hoge, hogege;
-#endif
-
-void putheader_bits(lame_internal_flags *gfc,int w_ptr)
-{
-    Bit_stream_struc *bs;
-    bs = &gfc->bs;
-#ifdef DEBUG
-    hoge += gfc->sideinfo_len * 8;
-    hogege += gfc->sideinfo_len * 8;
-#endif
-    memcpy(&bs->buf[bs->buf_byte_idx], gfc->header[gfc->w_ptr].buf,
-	   gfc->sideinfo_len);
-    bs->buf_byte_idx += gfc->sideinfo_len;
-    bs->totbit += gfc->sideinfo_len * 8;
-    gfc->w_ptr = (gfc->w_ptr + 1) & (MAX_HEADER_BUF - 1);
-}
-
-/*write j bits into the bit stream */
-static void
-putbits2(lame_global_flags *gfp, int val, int j)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    Bit_stream_struc *bs;
-    bs = &gfc->bs;
-
-//	assert(j < MAX_LENGTH-2);
-
-    while (j > 0) {
-	int k;
-
-	if (bs->buf_bit_idx == 0) {
-	    bs->buf_bit_idx = 8;
-	    bs->buf_byte_idx++;
-//		assert(bs->buf_byte_idx < BUFFER_SIZE);
-//		assert(gfc->header[gfc->w_ptr].write_timing >= bs->totbit);
-	    if (gfc->header[gfc->w_ptr].write_timing == bs->totbit)
-	      putheader_bits(gfc, gfc->w_ptr);
-	    bs->buf[bs->buf_byte_idx] = 0;
-	}
-
-	k = Min(j, bs->buf_bit_idx);
-	j -= k;
-
-	bs->buf_bit_idx -= k;
-
-//	assert (j < MAX_LENGTH); /* 32 too large on 32 bit machines */
-//	assert (bs->buf_bit_idx < MAX_LENGTH); 
-
-        bs->buf[bs->buf_byte_idx] |= (val >> j) << bs->buf_bit_idx;
-	bs->totbit += k;
-    }
-}
-
-/*write j bits into the bit stream, ignoring frame headers */
-static void
-putbits_noheaders(lame_global_flags *gfp, int val, int j)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    Bit_stream_struc *bs;
-    bs = &gfc->bs;
-
-//	assert(j < MAX_LENGTH-2);
-
-    while (j > 0) {
-	int k;
-	if (bs->buf_bit_idx == 0) {
-	    bs->buf_bit_idx = 8;
-	    bs->buf_byte_idx++;
-//		assert(bs->buf_byte_idx < BUFFER_SIZE);
-	    bs->buf[bs->buf_byte_idx] = 0;
-	}
-
-	k = Min(j, bs->buf_bit_idx);
-	j -= k;
-        
-	bs->buf_bit_idx -= k;
-        
-//	assert (j < MAX_LENGTH); /* 32 too large on 32 bit machines */
-//	assert (bs->buf_bit_idx < MAX_LENGTH); 
-	
-        bs->buf[bs->buf_byte_idx] |= (val >> j) << bs->buf_bit_idx;
-	bs->totbit += k;
-    }
-}
-
-
-/*
-  Some combinations of bitrate, Fs, and stereo make it impossible to stuff
-  out a frame using just main_data, due to the limited number of bits to
-  indicate main_data_length. In these situations, we put stuffing bits into
-  the ancillary data...
-*/
-static void
-drain_into_ancillary(lame_global_flags *gfp,int remainingBits)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int i;
-    assert(remainingBits >= 0);
-
-    if (remainingBits >= 8) {
-      putbits2(gfp,0x4c,8);
-      remainingBits -= 8;
-    }
-    if (remainingBits >= 8) {
-      putbits2(gfp,0x41,8);
-      remainingBits -= 8;
-    }
-    if (remainingBits >= 8) {
-      putbits2(gfp,0x4d,8);
-      remainingBits -= 8;
-    }
-    if (remainingBits >= 8) {
-      putbits2(gfp,0x45,8);
-      remainingBits -= 8;
-    }
-      
-    if (remainingBits >= 32) {
-      const char *version = get_lame_short_version ();
-      if (remainingBits >= 32) 
-	for (i=0; i<(int)strlen(version) && remainingBits >=8 ; ++i) {
-	  remainingBits -= 8;
-	  putbits2(gfp,version[i],8);
-	}
-    }
-
-    for (; remainingBits >= 1; remainingBits -= 1 ) {
-        putbits2 ( gfp, gfc->ancillary_flag, 1 );
-        gfc->ancillary_flag ^= 1;
-    }
-
-    assert (remainingBits == 0);
-
-}
-
-/*write N bits into the header */
-inline static void
-writeheader(lame_internal_flags *gfc,int val, int j)
-{
-    int ptr = gfc->header[gfc->h_ptr].ptr;
-
-    while (j > 0) {
-	int k = Min(j, 8 - (ptr & 7));
-	j -= k;
-        assert (j < MAX_LENGTH); /* >> 32  too large for 32 bit machines */
-	gfc->header[gfc->h_ptr].buf[ptr >> 3]
-	    |= ((val >> j)) << (8 - (ptr & 7) - k);
-	ptr += k;
-    }
-    gfc->header[gfc->h_ptr].ptr = ptr;
-}
-
-
-/* (jo) this wrapper function for BF_addEntry() updates also the crc */
-static void
-CRC_writeheader(lame_internal_flags *gfc, int value, int length,int *crc)
-{
-   int bit = 1 << length;
-
-   assert(length < MAX_LENGTH-2);
-   
-   while((bit >>= 1)){
-      *crc <<= 1;
-      if (!(*crc & 0x10000) ^ !(value & bit))
-	*crc ^= CRC16_POLYNOMIAL;
-   }
-   *crc &= 0xffff;
-   writeheader(gfc,value, length);
-}
-
-void main_CRC_init (void) {}
-
-
-
-inline static void
-encodeSideInfo2(lame_global_flags *gfp,int bitsPerFrame)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_side_info_t *l3_side;
-    int gr, ch;
-    int crc;
-    
-    l3_side = &gfc->l3_side;
-    gfc->header[gfc->h_ptr].ptr = 0;
-    memset(gfc->header[gfc->h_ptr].buf, 0, gfc->sideinfo_len);
-    crc = 0xffff; /* (jo) init crc16 for error_protection */
-    if (gfp->out_samplerate < 16000) 
-      writeheader(gfc,0xffe,                12);
-    else
-      writeheader(gfc,0xfff,                12);
-    writeheader(gfc,(gfp->version),            1);
-    writeheader(gfc,4 - 3,                 2);
-    writeheader(gfc,(!gfp->error_protection),  1);
-    /* (jo) from now on call the CRC_writeheader() wrapper to update crc */
-    CRC_writeheader(gfc,(gfc->bitrate_index),      4,&crc);
-    CRC_writeheader(gfc,(gfc->samplerate_index),   2,&crc);
-    CRC_writeheader(gfc,(gfc->padding),            1,&crc);
-    CRC_writeheader(gfc,(gfp->extension),          1,&crc);
-    CRC_writeheader(gfc,(gfp->mode),               2,&crc);
-    CRC_writeheader(gfc,(gfc->mode_ext),           2,&crc);
-    CRC_writeheader(gfc,(gfp->copyright),          1,&crc);
-    CRC_writeheader(gfc,(gfp->original),           1,&crc);
-    CRC_writeheader(gfc,(gfp->emphasis),           2,&crc);
-    if (gfp->error_protection) {
-	writeheader(gfc,0, 16); /* dummy */
-    }
-
-    if (gfp->version == 1) {
-	/* MPEG1 */
-	assert(l3_side->main_data_begin >= 0);
-	CRC_writeheader(gfc,(l3_side->main_data_begin), 9,&crc);
-
-	if (gfc->channels_out == 2)
-	    CRC_writeheader(gfc,l3_side->private_bits, 3,&crc);
-	else
-	    CRC_writeheader(gfc,l3_side->private_bits, 5,&crc);
-
-	for (ch = 0; ch < gfc->channels_out; ch++) {
-	    int band;
-	    for (band = 0; band < 4; band++) {
-		CRC_writeheader(gfc,l3_side->scfsi[ch][band], 1,&crc);
-	    }
-	}
-
-	for (gr = 0; gr < 2; gr++) {
-	    for (ch = 0; ch < gfc->channels_out; ch++) {
-		gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
-		CRC_writeheader(gfc,gi->part2_3_length,       12,&crc);
-		CRC_writeheader(gfc,gi->big_values / 2,        9,&crc);
-		CRC_writeheader(gfc,gi->global_gain,           8,&crc);
-		CRC_writeheader(gfc,gi->scalefac_compress,     4,&crc);
-		CRC_writeheader(gfc,gi->window_switching_flag, 1,&crc);
-
-		if (gi->window_switching_flag) {
-		    CRC_writeheader(gfc,gi->block_type,       2,&crc);
-		    CRC_writeheader(gfc,gi->mixed_block_flag, 1,&crc);
-
-		    if (gi->table_select[0] == 14)
-			gi->table_select[0] = 16;
-		    CRC_writeheader(gfc,gi->table_select[0],  5,&crc);
-		    if (gi->table_select[1] == 14)
-			gi->table_select[1] = 16;
-		    CRC_writeheader(gfc,gi->table_select[1],  5,&crc);
-
-		    CRC_writeheader(gfc,gi->subblock_gain[0], 3,&crc);
-		    CRC_writeheader(gfc,gi->subblock_gain[1], 3,&crc);
-		    CRC_writeheader(gfc,gi->subblock_gain[2], 3,&crc);
-		} else {
-		    assert(gi->block_type == NORM_TYPE);
-		    if (gi->table_select[0] == 14)
-			gi->table_select[0] = 16;
-		    CRC_writeheader(gfc,gi->table_select[0], 5,&crc);
-		    if (gi->table_select[1] == 14)
-			gi->table_select[1] = 16;
-		    CRC_writeheader(gfc,gi->table_select[1], 5,&crc);
-		    if (gi->table_select[2] == 14)
-			gi->table_select[2] = 16;
-		    CRC_writeheader(gfc,gi->table_select[2], 5,&crc);
-
-		    assert(gi->region0_count < 16U);
-		    assert(gi->region1_count < 8U);
-		    CRC_writeheader(gfc,gi->region0_count, 4,&crc);
-		    CRC_writeheader(gfc,gi->region1_count, 3,&crc);
-		}
-		CRC_writeheader(gfc,gi->preflag,            1,&crc);
-		CRC_writeheader(gfc,gi->scalefac_scale,     1,&crc);
-		CRC_writeheader(gfc,gi->count1table_select, 1,&crc);
-	    }
-	}
-    } else {
-	/* MPEG2 */
-	assert(l3_side->main_data_begin >= 0);
-	CRC_writeheader(gfc,(l3_side->main_data_begin), 8,&crc);
-	CRC_writeheader(gfc,l3_side->private_bits, gfc->channels_out,&crc);
-
-	gr = 0;
-	for (ch = 0; ch < gfc->channels_out; ch++) {
-	    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
-	    CRC_writeheader(gfc,gi->part2_3_length,       12,&crc);
-	    CRC_writeheader(gfc,gi->big_values / 2,        9,&crc);
-	    CRC_writeheader(gfc,gi->global_gain,           8,&crc);
-	    CRC_writeheader(gfc,gi->scalefac_compress,     9,&crc);
-	    CRC_writeheader(gfc,gi->window_switching_flag, 1,&crc);
-
-	    if (gi->window_switching_flag) {
-		CRC_writeheader(gfc,gi->block_type,       2,&crc);
-		CRC_writeheader(gfc,gi->mixed_block_flag, 1,&crc);
-
-		if (gi->table_select[0] == 14)
-		    gi->table_select[0] = 16;
-		CRC_writeheader(gfc,gi->table_select[0],  5,&crc);
-		if (gi->table_select[1] == 14)
-		    gi->table_select[1] = 16;
-		CRC_writeheader(gfc,gi->table_select[1],  5,&crc);
-
-		CRC_writeheader(gfc,gi->subblock_gain[0], 3,&crc);
-		CRC_writeheader(gfc,gi->subblock_gain[1], 3,&crc);
-		CRC_writeheader(gfc,gi->subblock_gain[2], 3,&crc);
-	    } else {
-		if (gi->table_select[0] == 14)
-		    gi->table_select[0] = 16;
-		CRC_writeheader(gfc,gi->table_select[0], 5,&crc);
-		if (gi->table_select[1] == 14)
-		    gi->table_select[1] = 16;
-		CRC_writeheader(gfc,gi->table_select[1], 5,&crc);
-		if (gi->table_select[2] == 14)
-		    gi->table_select[2] = 16;
-		CRC_writeheader(gfc,gi->table_select[2], 5,&crc);
-
-		assert(gi->region0_count < 16U);
-		assert(gi->region1_count < 8U);
-		CRC_writeheader(gfc,gi->region0_count, 4,&crc);
-		CRC_writeheader(gfc,gi->region1_count, 3,&crc);
-	    }
-
-	    CRC_writeheader(gfc,gi->scalefac_scale,     1,&crc);
-	    CRC_writeheader(gfc,gi->count1table_select, 1,&crc);
-	}
-    }
-
-    if (gfp->error_protection) {
-	/* (jo) error_protection: add crc16 information to header */
-	gfc->header[gfc->h_ptr].buf[4] = crc >> 8;
-	gfc->header[gfc->h_ptr].buf[5] = crc & 255;
-    }
-
-    {
-	int old = gfc->h_ptr;
-	assert(gfc->header[old].ptr == gfc->sideinfo_len * 8);
-
-	gfc->h_ptr = (old + 1) & (MAX_HEADER_BUF - 1);
-	gfc->header[gfc->h_ptr].write_timing =
-	    gfc->header[old].write_timing + bitsPerFrame;
-
-	if (gfc->h_ptr == gfc->w_ptr) {
-	  /* yikes! we are out of header buffer space */
-	  ERRORF(gfc,"Error: MAX_HEADER_BUF too small in bitstream.c \n");
-	}
-
-    }
-}
-
-
-inline static int
-huffman_coder_count1(lame_global_flags *gfp,int *ix, gr_info *gi)
-{
-#ifdef DEBUG
-    lame_internal_flags *gfc = gfp->internal_flags;
-#endif
-    /* Write count1 area */
-    const struct huffcodetab *h = &ht[gi->count1table_select + 32];
-    int i,bits=0;
-#ifdef DEBUG
-    int gegebo = gfc->bs.totbit;
-#endif
-
-    ix += gi->big_values;
-    assert(gi->count1table_select < 2);
-
-
-    for (i = (gi->count1 - gi->big_values) / 4; i > 0; --i) {
-	int huffbits = 0;
-	int p = 0, v;
-
-	v = ix[0];
-	if (v) {
-	    p += 8;
-	    if (v < 0)
-		huffbits++;
-	    assert(-1 <= v && v <= 1);
-	}
-
-	v = ix[1];
-	if (v) {
-	    p += 4;
-	    huffbits *= 2;
-	    if (v < 0)
-		huffbits++;
-	    assert(-1 <= v && v <= 1);
-	}
-
-	v = ix[2];
-	if (v) {
-	    p += 2;
-	    huffbits *= 2;
-	    if (v < 0)
-		huffbits++;
-	    assert(-1 <= v && v <= 1);
-	}
-
-	v = ix[3];
-	if (v) {
-	    p++;
-	    huffbits *= 2;
-	    if (v < 0)
-		huffbits++;
-	    assert(-1 <= v && v <= 1);
-	}
-
-	ix += 4;
-	putbits2(gfp,huffbits + h->table[p], h->hlen[p]);
-	bits += h->hlen[p];
-    }
-#ifdef DEBUG
-    DEBUGF("%ld %d %d %d\n",gfc->bs.totbit -gegebo, gi->count1bits, gi->big_values, gi->count1);
-#endif
-    return bits;
-}
-
-/*
- * Implements the pseudocode of page 98 of the IS
- */
-static int
-HuffmanCode(lame_global_flags* const gfp, int table_select, int x1, int x2)
-{
-    struct huffcodetab* h = ht + table_select;
-    int  code    = 0;
-    int  cbits   = 0;
-    int  xbits   = 0;
-    int  sgn_x1  = 0;
-    int  sgn_x2  = 0;
-    int  linbits = h->xlen;
-    int  xlen    = h->xlen;
-    int  ext; 
-
-//	assert ( table_select > 0 );
-
-    if (x1 < 0) {
-	sgn_x1++;
-	x1 = -x1;
-    }
-
-    if (x2 < 0) {
-	sgn_x2++;
-	x2 = -x2;
-    }
-
-    ext     = sgn_x1;
-
-    if (table_select > 15) {
-	/* use ESC-words */
-	if (x1 > 14) {
-	    int linbits_x1 = x1 - 15;
-
-//	    assert ( linbits_x1 <= h->linmax );
-	    ext   |= linbits_x1 << 1;
-	    xbits  = linbits;
-	    x1     = 15;
-	}
-
-	if (x2 > 14) {
-	    int linbits_x2 = x2 - 15;
-
-//	    assert ( linbits_x2 <= h->linmax );
-	    ext  <<= linbits;
-	    ext   |= linbits_x2;
-	    xbits += linbits;
-	    x2     = 15;
-	}
-	xlen = 16;
-    }
-
-    if (x1 != 0) {
-	cbits--;
-    }
-
-    if (x2 != 0) {
-	ext <<= 1;
-	ext  |= sgn_x2;
-	cbits--;
-    }
-
-    xbits -= cbits;
-
-//	assert ( (x1|x2) < 16u );
-
-    x1 = x1 * xlen + x2;
-
-    code   = h->table [x1];
-    cbits += h->hlen  [x1];
-
-//	assert ( cbits <= MAX_LENGTH );
-//	assert ( xbits <= MAX_LENGTH );
-
-    putbits2 ( gfp, code, cbits );
-    putbits2 ( gfp, ext,  xbits );
-    
-    return cbits + xbits;
-}
-
-static int
-Huffmancodebits(lame_global_flags *gfp, int tableindex, int start, int end, int *ix)
-{
-    int i,bits;
-
-//	assert(tableindex < 32);
-    if (!tableindex) return 0;
-
-    bits=0;
-    for (i = start; i < end; i += 2) {
-      bits += HuffmanCode(gfp,tableindex, ix[i], ix[i + 1]);
-    }
-    return bits;
-}
-
-
-
-/*
-  Note the discussion of huffmancodebits() on pages 28
-  and 29 of the IS, as well as the definitions of the side
-  information on pages 26 and 27.
-  */
-static int
-ShortHuffmancodebits(lame_global_flags *gfp,int *ix, gr_info *gi)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int bits;
-    int region1Start;
-    
-    region1Start = 3*gfc->scalefac_band.s[3];
-    if (region1Start > gi->big_values) 	
-        region1Start = gi->big_values;
-
-    /* short blocks do not have a region2 */
-    bits  = Huffmancodebits(gfp,gi->table_select[0], 0, region1Start, ix);
-    bits += Huffmancodebits(gfp,gi->table_select[1], region1Start, gi->big_values, ix);
-    return bits;
-}
-
-static int
-LongHuffmancodebits(lame_global_flags *gfp,int *ix, gr_info *gi)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int i, bigvalues,bits=0;
-    int region1Start, region2Start;
-
-    bigvalues = gi->big_values;
-    assert(0 <= bigvalues && bigvalues <= 576);
-
-    i = gi->region0_count + 1;
-    assert(i < 23);
-    region1Start = gfc->scalefac_band.l[i];
-    i += gi->region1_count + 1;
-    assert(i < 23);
-    region2Start = gfc->scalefac_band.l[i];
-
-    if (region1Start > bigvalues)
-	region1Start = bigvalues;
-
-    if (region2Start > bigvalues)
-	region2Start = bigvalues;
-
-    bits +=Huffmancodebits(gfp,gi->table_select[0], 0, region1Start, ix);
-    bits +=Huffmancodebits(gfp,gi->table_select[1], region1Start, region2Start, ix);
-    bits +=Huffmancodebits(gfp,gi->table_select[2], region2Start, bigvalues, ix);
-    return bits;
-}
-
-inline static int
-writeMainData ( lame_global_flags * const gfp,
-        int              l3_enc   [2] [2] [576],
-        III_scalefac_t   scalefac [2] [2] )
-{
-    int gr, ch, sfb,data_bits,scale_bits,tot_bits=0;
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_side_info_t *l3_side;
-
-    l3_side = &gfc->l3_side;
-    if (gfp->version == 1) {
-	/* MPEG 1 */
-	for (gr = 0; gr < 2; gr++) {
-	    for (ch = 0; ch < gfc->channels_out; ch++) {
-		gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
-		int slen1 = slen1_tab[gi->scalefac_compress];
-		int slen2 = slen2_tab[gi->scalefac_compress];
-		data_bits=0;
-		scale_bits=0;
-
-#ifdef DEBUG
-		hogege = gfc->bs.totbit;
-#endif
-		if (gi->block_type == SHORT_TYPE) {
-		    for (sfb = 0; sfb < SBPSY_s; sfb++) {
-			int slen = sfb < 6 ? slen1 : slen2;
-
-			assert(scalefac[gr][ch].s[sfb][0]>=0);
-			assert(scalefac[gr][ch].s[sfb][1]>=0);
-			assert(scalefac[gr][ch].s[sfb][2]>=0);
-
-			putbits2(gfp,scalefac[gr][ch].s[sfb][0], slen);
-			putbits2(gfp,scalefac[gr][ch].s[sfb][1], slen);
-			putbits2(gfp,scalefac[gr][ch].s[sfb][2], slen);
-			scale_bits += 3*slen;
-		    }
-		    data_bits += ShortHuffmancodebits(gfp,l3_enc[gr][ch], gi);
-		} else {
-		    int i;
-		    for (i = 0; i < sizeof(scfsi_band) / sizeof(int) - 1;
-			 i++) {
-			if (gr != 0 && l3_side->scfsi[ch][i])
-			    continue;
-
-			for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1];
-			     sfb++) {
-
-			    assert(scalefac[gr][ch].l[sfb]>=0);
-			    putbits2(gfp,scalefac[gr][ch].l[sfb],
-				    sfb < 11 ? slen1 : slen2);
-			    scale_bits += sfb < 11 ? slen1 : slen2;
-			}
-		    }
-		    data_bits +=LongHuffmancodebits(gfp,l3_enc[gr][ch], gi);
-		}
-		data_bits +=huffman_coder_count1(gfp,l3_enc[gr][ch], gi);
-#ifdef DEBUG
-		DEBUGF("<%ld> ", gfc->bs.totbit-hogege);
-#endif
-		/* does bitcount in quantize.c agree with actual bit count?*/
-		assert(data_bits==gi->part2_3_length-gi->part2_length);
-		assert(scale_bits==gi->part2_length);
-		tot_bits += scale_bits + data_bits;
-
-	    } /* for ch */
-	} /* for gr */
-    } else {
-	/* MPEG 2 */
-	gr = 0;
-	for (ch = 0; ch < gfc->channels_out; ch++) {
-	    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
-	    int i, sfb_partition;
-	    assert(gi->sfb_partition_table);
-	    data_bits = 0;
-	    scale_bits=0;
-
-	    sfb = 0;
-	    sfb_partition = 0;
-	    if (gi->block_type == SHORT_TYPE) {
-		for (; sfb_partition < 4; sfb_partition++) {
-		    int sfbs = gi->sfb_partition_table[sfb_partition] / 3;
-		    int slen = gi->slen[sfb_partition];
-		    for (i = 0; i < sfbs; i++, sfb++) {
-			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][0], 0U), slen);
-			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][1], 0U), slen);
-			putbits2(gfp,Max(scalefac[gr][ch].s[sfb][2], 0U), slen);
-			scale_bits += 3*slen;
-		    }
-		}
-		data_bits += ShortHuffmancodebits(gfp,l3_enc[gr][ch], gi);
-	    } else {
-		for (; sfb_partition < 4; sfb_partition++) {
-		    int sfbs = gi->sfb_partition_table[sfb_partition];
-		    int slen = gi->slen[sfb_partition];
-		    for (i = 0; i < sfbs; i++, sfb++) {
-			putbits2(gfp,Max(scalefac[gr][ch].l[sfb], 0U), slen);
-			scale_bits += slen;
-		    }
-		}
-		data_bits +=LongHuffmancodebits(gfp,l3_enc[gr][ch], gi);
-	    }
-	    data_bits +=huffman_coder_count1(gfp,l3_enc[gr][ch], gi);
-
-	    /* does bitcount in quantize.c agree with actual bit count?*/
-	    assert(data_bits==gi->part2_3_length-gi->part2_length);
-	    assert(scale_bits==gi->part2_length);
-	    tot_bits += scale_bits + data_bits;
-	} /* for ch */
-    } /* for gf */
-    return tot_bits;
-} /* main_data */
-
-
-
-
-void
-flush_bitstream(lame_global_flags *gfp)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int flushbits,remaining_headers;
-  int bitsPerFrame, mean_bits;
-  int last_ptr,first_ptr;
-  first_ptr=gfc->w_ptr;           /* first header to add to bitstream */
-  last_ptr = gfc->h_ptr - 1;   /* last header to add to bitstream */
-  if (last_ptr==-1) last_ptr=MAX_HEADER_BUF-1;   
-
-  /* add this many bits to bitstream so we can flush all headers */
-  flushbits = gfc->header[last_ptr].write_timing - gfc->bs.totbit;
-
-  if (flushbits >= 0) {
-    /* if flushbits >= 0, some headers have not yet been written */
-    /* reduce flushbits by the size of the headers */
-    remaining_headers= 1+last_ptr - first_ptr;
-    if (last_ptr < first_ptr) 
-      remaining_headers= 1+last_ptr - first_ptr + MAX_HEADER_BUF;
-    flushbits -= remaining_headers*8*gfc->sideinfo_len;
-  }
-
-
-  /* finally, add some bits so that the last frame is complete
-   * these bits are not necessary to decode the last frame, but
-   * some decoders will ignore last frame if these bits are missing 
-   */
-  getframebits(gfp,&bitsPerFrame,&mean_bits);
-  flushbits += bitsPerFrame;
-  if (flushbits<0) {
-#if 0
-    /* if flushbits < 0, this would mean that the buffer looks like:
-     * (data...)  last_header  (data...)  (extra data that should not be here...)
-     */
-    DEBUGF("last header write_timing = %i \n",gfc->header[last_ptr].write_timing);
-    DEBUGF("first header write_timing = %i \n",gfc->header[first_ptr].write_timing);
-    DEBUGF("bs.totbit:                 %i \n",gfc->bs.totbit);
-    DEBUGF("first_ptr, last_ptr        %i %i \n",first_ptr,last_ptr);
-    DEBUGF("remaining_headers =        %i \n",remaining_headers);
-    DEBUGF("bitsperframe:              %i \n",bitsPerFrame);
-    DEBUGF("sidelen:                   %i \n",gfc->sideinfo_len);
-#endif
-    ERRORF(gfc,"strange error flushing buffer ... \n");
-  } else {
-    drain_into_ancillary(gfp,flushbits);
-  }
-
-  assert (gfc->header[last_ptr].write_timing + bitsPerFrame  == gfc->bs.totbit);
-}
-
-
-
-
-void  add_dummy_byte ( lame_global_flags* const gfp, unsigned char val )
-{
-  lame_internal_flags *gfc = gfp->internal_flags;
-  int i;
-
-  putbits_noheaders(gfp,val,8);   
-
-  for (i=0 ; i< MAX_HEADER_BUF ; ++i) 
-    gfc->header[i].write_timing += 8;
-}
-
-
-/*
-  format_bitstream()
-
-  This is called after a frame of audio has been quantized and coded.
-  It will write the encoded audio to the bitstream. Note that
-  from a layer3 encoder's perspective the bit stream is primarily
-  a series of main_data() blocks, with header and side information
-  inserted at the proper locations to maintain framing. (See Figure A.7
-  in the IS).
-  */
-int
-format_bitstream(lame_global_flags *gfp, int bitsPerFrame,
-      int              l3_enc[2][2][576],
-  	III_scalefac_t   scalefac[2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int bits;
-    III_side_info_t *l3_side;
-    l3_side = &gfc->l3_side;
-
-    drain_into_ancillary(gfp,l3_side->resvDrain_pre);
-
-    encodeSideInfo2(gfp,bitsPerFrame);
-    bits = 8*gfc->sideinfo_len;
-    bits+=writeMainData(gfp,l3_enc,scalefac);
-    drain_into_ancillary(gfp,l3_side->resvDrain_post);
-    bits += l3_side->resvDrain_post;
-
-    l3_side->main_data_begin += (bitsPerFrame-bits)/8;
-    if ((l3_side->main_data_begin * 8) != gfc->ResvSize ) {
-      ERRORF(gfc,"bit reservoir error: \n"
-             "l3_side->main_data_begin: %i \n"
-             "Resvoir size:             %i \n"
-             "resv drain (post)         %i \n"
-             "resv drain (pre)          %i \n"
-             "header and sideinfo:      %i \n"
-             "data bits:                %i \n"
-             "total bits:               %i (remainder: %i) \n"
-             "bitsperframe:             %i \n",
-
-             8*l3_side->main_data_begin,
-             gfc->ResvSize,
-             l3_side->resvDrain_post,
-             l3_side->resvDrain_pre,
-             8*gfc->sideinfo_len,
-             bits-l3_side->resvDrain_post-8*gfc->sideinfo_len,
-             bits, bits % 8,
-             bitsPerFrame
-      );
-
-      gfc->ResvSize = l3_side->main_data_begin*8;
-    };
-    assert(gfc->bs.totbit % 8 == 0);
-
-    if (gfc->bs.totbit > 1000000000  ) {
-      /* to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset bit counter*/
-      int i;
-      for (i=0 ; i< MAX_HEADER_BUF ; ++i) 
-	gfc->header[i].write_timing -= gfc->bs.totbit;      
-      gfc->bs.totbit=0;
-    }
-    return 0;
-}
-
-
-int copy_buffer(unsigned char *buffer,int size,Bit_stream_struc *bs)
-{
-  int minimum = bs->buf_byte_idx + 1;
-  if (minimum <= 0) return 0;
-  if (size!=0 && minimum>size) return -1; /* buffer is too small */
-  memcpy(buffer,bs->buf,minimum);
-  bs->buf_byte_idx = -1;
-  bs->buf_bit_idx = 0;
-  return minimum;
-}
-
-
-void init_bit_stream_w(lame_internal_flags *gfc)
-{
-   gfc->bs.buf = (unsigned char *)       malloc(BUFFER_SIZE);
-   gfc->bs.buf_size = BUFFER_SIZE;
-
-   gfc->h_ptr = gfc->w_ptr = 0;
-   gfc->header[gfc->h_ptr].write_timing = 0;
-   gfc->bs.buf_byte_idx = -1;
-   gfc->bs.buf_bit_idx = 0;
-   gfc->bs.totbit = 0;
-}
-
-/* end of bitstream.c */
--- a/sys/src/games/mp3enc/bitstream.h
+++ /dev/null
@@ -1,37 +1,0 @@
-/*
- *	MP3 bitstream Output interface for LAME
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_BITSTREAM_H
-#define LAME_BITSTREAM_H
-#include "util.h"
-
-int format_bitstream(lame_global_flags *gfp, int i,
-		     int              l3_enc[2][2][576],
-		     III_scalefac_t   scalefac[2][2] );
-
-void flush_bitstream(lame_global_flags *gfp);
-void add_dummy_byte ( lame_global_flags* const gfp, unsigned char val );
-
-int  copy_buffer(unsigned char *buffer,int buffer_size,Bit_stream_struc *bs);
-void init_bit_stream_w(lame_internal_flags *gfc);
-void main_CRC_init (void);   // remove sometimes
-
-#endif
--- a/sys/src/games/mp3enc/brhist.h
+++ /dev/null
@@ -1,53 +1,0 @@
-/*
- *	Bitrate histogram include file
- *
- *	Copyright (c) 2000 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_BRHIST_H
-#define LAME_BRHIST_H
-
-#if defined(_WIN32)  &&  !defined(__CYGWIN__)
-# include <windows.h>
-#endif
-#include "lame.h"
-
-int   brhist_init       ( const lame_global_flags  *gf, const int bitrate_kbps_min, const int bitrate_kbps_max );
-void  brhist_disp       ( const lame_global_flags  *gf );
-void  brhist_disp_total ( const lame_global_flags  *gf );
-void  brhist_jump_back  ( void );
-
-typedef struct {
-    FILE*   Console_fp;			/* filepointer to stream reporting information */
-    FILE*   Error_fp;                   /* filepointer to stream fatal error reporting information */
-    FILE*   Report_fp;                  /* filepointer to stream reports (normally a text file or /dev/null) */
-#if defined(_WIN32)  &&  !defined(__CYGWIN__) 
-    HANDLE  Console_Handle;
-#endif
-    int     disp_width;
-    int     disp_height;
-    char    str_up         [10];
-    char    str_clreoln    [10];
-    char    str_emph       [10];
-    char    str_norm       [10];
-    char    Console_buff [1024];
-} Console_IO_t;
-
-extern Console_IO_t  Console_IO;
-
-#endif /* LAME_BRHIST_H */
--- a/sys/src/games/mp3enc/encoder.c
+++ /dev/null
@@ -1,584 +1,0 @@
-/*
- *	LAME MP3 encoding engine
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: encoder.c,v 1.43 2001/03/12 04:38:35 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <assert.h>
-
-#include "lame.h"
-#include "util.h"
-#include "newmdct.h"
-#include "psymodel.h"
-#include "quantize.h"
-#include "quantize_pvt.h"
-#include "bitstream.h"
-#include "VbrTag.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-/*
- * auto-adjust of ATH, useful for low volume
- * Gabriel Bouvigne 3 feb 2001
- *
- * modifies some values in
- *   gfp->internal_flags->ATH
- *   (gfc->ATH)
- */
-void
-adjust_ATH( lame_global_flags* const  gfp,
-            FLOAT8              tot_ener[2][4] )
-{
-    lame_internal_flags* const  gfc = gfp->internal_flags;
-    int gr, channel;
-
-    if (gfc->ATH->use_adjust) {
-        FLOAT8 max_val = 0;
-
-	for ( gr = 0; gr < gfc->mode_gr; ++gr ) 
-	    for ( channel = 0; channel < gfc->channels_out; ++channel ) 
-	        max_val = Max( max_val, tot_ener[gr][channel] );
-	/* scale to 0..1, and then rescale to 0..32767 */
-	max_val *= 32767/1e13;
-
-        /*  adjust ATH depending on range of maximum value
-         */
-        if (vbr_mtrh == gfp->VBR) {
-            /*  this code reduces slowly the ATH (speed of 12 dB per second)
-             *  with some supporting stages to limit the reduction
-             *    640  ->  ~17 dB
-             *         :
-             *  32640  ->  ~0.01 dB
-             */
-            FLOAT8 
-            x = Max (640, 320*(int)(max_val/320));
-            x = x/32768;
-            gfc->ATH->adjust *= gfc->ATH->decay;
-            if (gfc->ATH->adjust < x)       /* but not more than f(x) dB */
-                gfc->ATH->adjust = x;
-        }
-        else {
-#ifdef OLD_ATH_AUTO_ADJUST
-            if      (0.5 < max_val / 32768) {       /* value above 50 % */
-                    gfc->ATH->adjust = 1.0;         /* do not reduce ATH */
-            }
-            else if (0.3 < max_val / 32768) {       /* value above 30 % */
-                    gfc->ATH->adjust *= 0.955;      /* reduce by ~0.2 dB */
-                    if (gfc->ATH->adjust < 0.3)     /* but ~5 dB in maximum */
-                        gfc->ATH->adjust = 0.3;            
-            }
-            else {                                  /* value below 30 % */
-                    gfc->ATH->adjust *= 0.93;       /* reduce by ~0.3 dB */
-                    if (gfc->ATH->adjust < 0.01)    /* but 20 dB in maximum */
-                        gfc->ATH->adjust = 0.01;
-            }
-#else				/* jd - 27 feb 2001 */
-				/* continuous curves based on approximation */
-				/* to GB's original values */
-	  FLOAT8 max_val_n = max_val / 32768;
-	  FLOAT8 adj_lim_new;
-				/* For an increase in approximate loudness, */
-				/* set ATH adjust to adjust_limit immediately*/
-				/* after a delay of one frame. */
-				/* For a loudness decrease, reduce ATH adjust*/
-				/* towards adjust_limit gradually. */
-	  if( max_val_n > 0.25) { /* sqrt((1 - 0.01) / 15.84) from curve below*/
-	    if( gfc->ATH->adjust >= 1.0) {
-	      gfc->ATH->adjust = 1.0;
-	    } else {		/* preceding frame has lower ATH adjust; */
-				/* ascend only to the preceding adjust_limit */
-				/* in case there is leading low volume */
-	      if( gfc->ATH->adjust < gfc->ATH->adjust_limit) {
-		gfc->ATH->adjust = gfc->ATH->adjust_limit;
-	      }
-	    }
-	    gfc->ATH->adjust_limit = 1.0;
-	  } else {		/* adjustment curve (parabolic) */
-	    adj_lim_new = 15.84 * (max_val_n * max_val_n) + 0.01;
-	    if( gfc->ATH->adjust >= adj_lim_new) { /* descend gradually */
-	      gfc->ATH->adjust *= adj_lim_new * 0.075 + 0.925;
-	      if( gfc->ATH->adjust < adj_lim_new) { /* stop descent */
-		gfc->ATH->adjust = adj_lim_new;
-	      }
-	    } else {		/* ascend */
-	      if( gfc->ATH->adjust_limit >= adj_lim_new) {
-		gfc->ATH->adjust = adj_lim_new;
-	      } else {		/* preceding frame has lower ATH adjust; */
-				/* ascend only to the preceding adjust_limit */
-		if( gfc->ATH->adjust < gfc->ATH->adjust_limit) {
-		  gfc->ATH->adjust = gfc->ATH->adjust_limit;
-		}
-	      }
-	    }
-	    gfc->ATH->adjust_limit = adj_lim_new;
-	  }
-#endif
-        }
-    }
-}
-
-/************************************************************************
-*
-* encodeframe()           Layer 3
-*
-* encode a single frame
-*
-************************************************************************
-lame_encode_frame()
-
-
-                       gr 0            gr 1
-inbuf:           |--------------|---------------|-------------|
-MDCT output:  |--------------|---------------|-------------|
-
-FFT's                    <---------1024---------->
-                                         <---------1024-------->
-
-
-
-    inbuf = buffer of PCM data size=MP3 framesize
-    encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY
-    so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]
-
-    psy-model FFT has a 1 granule delay, so we feed it data for the 
-    next granule.
-    FFT is centered over granule:  224+576+224
-    So FFT starts at:   576-224-MDCTDELAY
-
-    MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY
-    MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)
-
-    FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET
-
-*/
-
-typedef FLOAT8 chgrdata[2][2];
-
-int  lame_encode_mp3_frame (				// Output
-	lame_global_flags* const  gfp,			// Context
-	sample_t*                 inbuf_l,              // Input
-	sample_t*                 inbuf_r,              // Input
-	unsigned char*            mp3buf, 		// Output
-	int                    mp3buf_size )		// Output
-{
-#ifdef macintosh /* PLL 14/04/2000 */
-  static FLOAT8 xr[2][2][576];
-  static int l3_enc[2][2][576];
-#else
-  FLOAT8 xr[2][2][576];
-  int l3_enc[2][2][576];
-#endif
-  int mp3count;
-  III_psy_ratio masking_LR[2][2];    /*LR masking & energy */
-  III_psy_ratio masking_MS[2][2]; /*MS masking & energy */
-  III_psy_ratio (*masking)[2][2];  /*pointer to selected maskings*/
-  III_scalefac_t scalefac[2][2];
-  const sample_t *inbuf[2];
-  lame_internal_flags *gfc=gfp->internal_flags;
-
-  FLOAT8 tot_ener[2][4];   
-  FLOAT8 ms_ener_ratio[2]={.5,.5};
-  chgrdata pe,pe_MS;
-  chgrdata *pe_use;
-
-  int ch,gr,mean_bits;
-  int bitsPerFrame;
-
-  int check_ms_stereo;
-  FLOAT8 ms_ratio_next = 0.;
-  FLOAT8 ms_ratio_prev = 0.;
-
-
-  memset((char *) masking_LR, 0, sizeof(masking_LR));
-  memset((char *) masking_MS, 0, sizeof(masking_MS));
-  memset((char *) scalefac, 0, sizeof(scalefac));
-  inbuf[0]=inbuf_l;
-  inbuf[1]=inbuf_r;
-
-  check_ms_stereo =  (gfp->mode == JOINT_STEREO);
-  gfc->mode_ext = MPG_MD_LR_LR;
-
-  if (gfc->lame_encode_frame_init==0 )  {
-    gfc->lame_encode_frame_init=1;
-    
-    /* padding method as described in 
-     * "MPEG-Layer3 / Bitstream Syntax and Decoding"
-     * by Martin Sieler, Ralph Sperschneider
-     *
-     * note: there is no padding for the very first frame
-     *
-     * [email protected] 2000-06-22
-     */
-        
-    gfc->frac_SpF = ((gfp->version+1)*72000L*gfp->brate) % gfp->out_samplerate;
-    gfc->slot_lag  = gfc->frac_SpF;
-    
-    /* check FFT will not use a negative starting offset */
-#if 576 < FFTOFFSET
-# error FFTOFFSET greater than 576: FFT uses a negative offset
-#endif
-    /* check if we have enough data for FFT */
-    assert(gfc->mf_size>=(BLKSIZE+gfp->framesize-FFTOFFSET));
-    /* check if we have enough data for polyphase filterbank */
-    /* it needs 1152 samples + 286 samples ignored for one granule */
-    /*          1152+576+286 samples for two granules */
-    assert(gfc->mf_size>=(286+576*(1+gfc->mode_gr)));
-
-    /* prime the MDCT/polyphase filterbank with a short block */
-    { 
-      int i,j;
-      sample_t primebuff0[286+1152+576];
-      sample_t primebuff1[286+1152+576];
-      for (i=0, j=0; i<286+576*(1+gfc->mode_gr); ++i) {
-	if (i<576*gfc->mode_gr) {
-	  primebuff0[i]=0;
-	  if (gfc->channels_out==2) 
-	    primebuff1[i]=0;
-	}else{
-	  primebuff0[i]=inbuf[0][j];
-	  if (gfc->channels_out==2) 
-	    primebuff1[i]=inbuf[1][j];
-	  ++j;
-	}
-      }
-      /* polyphase filtering / mdct */
-      for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
-	for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-	  gfc->l3_side.gr[gr].ch[ch].tt.block_type=SHORT_TYPE;
-	}
-      }
-      mdct_sub48(gfc, primebuff0, primebuff1, xr);
-    }
-    
-    iteration_init(gfp);
-    
-    /*  prepare for ATH auto adjustment:
-     *  we want to decrease the ATH by 12 dB per second
-     */ {
-        FLOAT8 frame_duration = 576. * gfc->mode_gr / gfp->out_samplerate;
-        gfc->ATH->decay = pow(10., -12./10. * frame_duration);
-        gfc->ATH->adjust = 1.0;
-        gfc->ATH->adjust_limit = 0.01;
-    }
-  }
-
-
-  /********************** padding *****************************/
-  switch (gfp->padding_type) {
-  case 0:
-    gfc->padding=0;
-    break;
-  case 1:
-    gfc->padding=1;
-    break;
-  case 2:
-  default:
-    if (gfp->VBR!=vbr_off) {
-      gfc->padding=0;
-    } else {
-      if (gfp->disable_reservoir) {
-	gfc->padding = 0;
-	/* if the user specified --nores, dont very gfc->padding either */
-	/* tiny changes in frac_SpF rounding will cause file differences */
-      }else{
-        /* padding method as described in 
-         * "MPEG-Layer3 / Bitstream Syntax and Decoding"
-         * by Martin Sieler, Ralph Sperschneider
-         *
-         * note: there is no padding for the very first frame
-         *
-         * [email protected] 2000-06-22
-         */
-
-        gfc->slot_lag -= gfc->frac_SpF;
-        if (gfc->slot_lag < 0) {
-          gfc->slot_lag += gfp->out_samplerate;
-          gfc->padding = 1;
-        } else {
-          gfc->padding = 0;
-        }
-      } /* reservoir enabled */
-    }
-  }
-
-
-  if (gfc->psymodel) {
-    /* psychoacoustic model
-     * psy model has a 1 granule (576) delay that we must compensate for
-     * (mt 6/99).
-     */
-    int ret;
-    const sample_t *bufp[2];  /* address of beginning of left & right granule */
-    int blocktype[2];
-
-    ms_ratio_prev=gfc->ms_ratio[gfc->mode_gr-1];
-    for (gr=0; gr < gfc->mode_gr ; gr++) {
-
-      for ( ch = 0; ch < gfc->channels_out; ch++ )
-	bufp[ch] = &inbuf[ch][576 + gr*576-FFTOFFSET];
-
-      if (gfc->nsPsy.use) {
-	ret=L3psycho_anal_ns( gfp, bufp, gr, 
-			      &gfc->ms_ratio[gr],&ms_ratio_next,
-			      masking_LR, masking_MS,
-			      pe[gr],pe_MS[gr],tot_ener[gr],blocktype);
-      } else {
-	ret=L3psycho_anal( gfp, bufp, gr, 
-			   &gfc->ms_ratio[gr],&ms_ratio_next,
-			   masking_LR, masking_MS,
-			   pe[gr],pe_MS[gr],tot_ener[gr],blocktype);
-      }
-      if (ret!=0) return -4;
-
-      for ( ch = 0; ch < gfc->channels_out; ch++ )
-	gfc->l3_side.gr[gr].ch[ch].tt.block_type=blocktype[ch];
-
-      if (check_ms_stereo) {
-	  ms_ener_ratio[gr] = tot_ener[gr][2]+tot_ener[gr][3];
-	  if (ms_ener_ratio[gr]>0)
-	      ms_ener_ratio[gr] = tot_ener[gr][3]/ms_ener_ratio[gr];
-      }
-
-    }
-  }else{
-    for (gr=0; gr < gfc->mode_gr ; gr++)
-      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-	gfc->l3_side.gr[gr].ch[ch].tt.block_type=NORM_TYPE;
-	pe_MS[gr][ch]=pe[gr][ch]=700;
-      }
-  }
-
-
-
-  /* auto-adjust of ATH, useful for low volume */
-  adjust_ATH( gfp, tot_ener );
-
-
-
-  /* block type flags */
-  for( gr = 0; gr < gfc->mode_gr; gr++ ) {
-    for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-      gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
-      cod_info->mixed_block_flag = 0;     /* never used by this model */
-      if (cod_info->block_type == NORM_TYPE )
-	cod_info->window_switching_flag = 0;
-      else
-	cod_info->window_switching_flag = 1;
-    }
-  }
-
-
-  /* polyphase filtering / mdct */
-  mdct_sub48(gfc, inbuf[0], inbuf[1], xr);
-  /* re-order the short blocks, for more efficient encoding below */
-  for (gr = 0; gr < gfc->mode_gr; gr++) {
-    for (ch = 0; ch < gfc->channels_out; ch++) {
-      gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
-      if (cod_info->block_type==SHORT_TYPE) {
-	freorder(gfc->scalefac_band.s,xr[gr][ch]);
-      }
-    }
-  }
-  
-
-  /* use m/s gfc->channels_out? */
-  if (check_ms_stereo) {
-    int gr0 = 0, gr1 = gfc->mode_gr-1;
-    /* make sure block type is the same in each channel */
-    check_ms_stereo =
-      (gfc->l3_side.gr[gr0].ch[0].tt.block_type==gfc->l3_side.gr[gr0].ch[1].tt.block_type) &&
-      (gfc->l3_side.gr[gr1].ch[0].tt.block_type==gfc->l3_side.gr[gr1].ch[1].tt.block_type);
-  }
-  
-  /* Here will be selected MS or LR coding of the 2 stereo channels */
-
-  assert (  gfc->mode_ext == MPG_MD_LR_LR );
-  gfc->mode_ext = MPG_MD_LR_LR;
-  
-  if (gfp->force_ms) {
-    gfc->mode_ext = MPG_MD_MS_LR;
-  } else if (check_ms_stereo) {
-      /* ms_ratio = is scaled, for historical reasons, to look like
-	 a ratio of side_channel / total.  
-         0 = signal is 100% mono
-         .5 = L & R uncorrelated
-      */
-      
-      /* [0] and [1] are the results for the two granules in MPEG-1,
-       * in MPEG-2 it's only a faked averaging of the same value
-       * _prev is the value of the last granule of the previous frame
-       * _next is the value of the first granule of the next frame
-       */
-      FLOAT8  ms_ratio_ave1;
-      FLOAT8  ms_ratio_ave2;
-      FLOAT8  threshold1    = 0.35;
-      FLOAT8  threshold2    = 0.45;
-
-      /* take an average */
-      if (gfc->mode_gr==1) {
-	  /* MPEG2 - no second granule */
-	  ms_ratio_ave1 = 0.33 * ( gfc->ms_ratio[0] + ms_ratio_prev + ms_ratio_next );
-	  ms_ratio_ave2 = gfc->ms_ratio[0];
-      }else{
-	  ms_ratio_ave1 = 0.25 * ( gfc->ms_ratio[0] + gfc->ms_ratio[1] + ms_ratio_prev + ms_ratio_next );
-	  ms_ratio_ave2 = 0.50 * ( gfc->ms_ratio[0] + gfc->ms_ratio[1] );
-      }
-      
-      if (gfp->mode_automs) {
-	  if ( gfp->compression_ratio < 11.025 ) {
-	      /* 11.025 => 1, 6.3 => 0 */
-	      double thr = (gfp->compression_ratio - 6.3) / (11.025 - 6.3);
-	      if (thr<0) thr=0;
-	      threshold1   *= thr;
-	      threshold2   *= thr;
-	  }
-      }
-      
-      if ((ms_ratio_ave1 < threshold1  &&  ms_ratio_ave2 < threshold2) || gfc->nsPsy.use) {
-	  int  sum_pe_MS = pe_MS[0][0] + pe_MS[0][1] + pe_MS[1][0] + pe_MS[1][1];
-	  int  sum_pe_LR = pe   [0][0] + pe   [0][1] + pe   [1][0] + pe   [1][1];
-	  
-	  /* based on PE: M/S coding would not use much more bits than L/R coding */
-	  
-	  if (sum_pe_MS <= 1.07 * sum_pe_LR && !gfc->nsPsy.use) gfc->mode_ext = MPG_MD_MS_LR;
-	  if (sum_pe_MS <= 1.00 * sum_pe_LR &&  gfc->nsPsy.use) gfc->mode_ext = MPG_MD_MS_LR;
-      }
-  }
-
-
-  /* copy data for MP3 frame analyzer */
-  if (gfp->analysis && gfc->pinfo != NULL) {
-    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
-      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-	gfc->pinfo->ms_ratio[gr]=gfc->ms_ratio[gr];
-	gfc->pinfo->ms_ener_ratio[gr]=ms_ener_ratio[gr];
-	gfc->pinfo->blocktype[gr][ch]=
-	  gfc->l3_side.gr[gr].ch[ch].tt.block_type;
-	memcpy(gfc->pinfo->xr[gr][ch],xr[gr][ch],sizeof(xr[gr][ch]));
-	/* in psymodel, LR and MS data was stored in pinfo.  
-	   switch to MS data: */
-	if (gfc->mode_ext==MPG_MD_MS_LR) {
-	  gfc->pinfo->pe[gr][ch]=gfc->pinfo->pe[gr][ch+2];
-	  gfc->pinfo->ers[gr][ch]=gfc->pinfo->ers[gr][ch+2];
-	  memcpy(gfc->pinfo->energy[gr][ch],gfc->pinfo->energy[gr][ch+2],
-		 sizeof(gfc->pinfo->energy[gr][ch]));
-	}
-      }
-    }
-  }
-
-
-
-
-  /* bit and noise allocation */
-  if (MPG_MD_MS_LR == gfc->mode_ext) {
-    masking = &masking_MS;    /* use MS masking */
-    pe_use = &pe_MS;
-  } else {
-    masking = &masking_LR;    /* use LR masking */
-    pe_use = &pe;
-  }
-
-
-  if (gfc->nsPsy.use && (gfp->VBR == vbr_off || gfp->VBR == vbr_abr)) {
-    static FLOAT fircoef[19] = {
-      -0.0207887,-0.0378413,-0.0432472,-0.031183,
-      7.79609e-18,0.0467745,0.10091,0.151365,
-      0.187098,0.2,0.187098,0.151365,
-      0.10091,0.0467745,7.79609e-18,-0.031183,
-      -0.0432472,-0.0378413,-0.0207887,
-    };
-    int i;
-    FLOAT8 f;
-
-    for(i=0;i<18;i++) gfc->nsPsy.pefirbuf[i] = gfc->nsPsy.pefirbuf[i+1];
-
-    i=0;
-    gfc->nsPsy.pefirbuf[18] = 0;
-    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
-      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-	gfc->nsPsy.pefirbuf[18] += (*pe_use)[gr][ch];
-	i++;
-      }
-    }
-
-    gfc->nsPsy.pefirbuf[18] = gfc->nsPsy.pefirbuf[18] / i;
-    f = 0;
-    for(i=0;i<19;i++) f += gfc->nsPsy.pefirbuf[i] * fircoef[i];
-
-    for ( gr = 0; gr < gfc->mode_gr; gr++ ) {
-      for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-	(*pe_use)[gr][ch] *= 670 / f;
-      }
-    }
-  }
-
-  switch (gfp->VBR){ 
-  default:
-  case vbr_off:
-    iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
-    break;
-  case vbr_mt:
-    VBR_quantize( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
-    break;
-  case vbr_rh:
-  case vbr_mtrh:
-    VBR_iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
-    break;
-  case vbr_abr:
-    ABR_iteration_loop( gfp,*pe_use,ms_ener_ratio, xr, *masking, l3_enc, scalefac);
-    break;
-  }
-
-  /*  write the frame to the bitstream  */
-  getframebits(gfp, &bitsPerFrame, &mean_bits);
-
-  format_bitstream( gfp, bitsPerFrame, l3_enc, scalefac);
-
-  /* copy mp3 bit buffer into array */
-  mp3count = copy_buffer(mp3buf,mp3buf_size,&gfc->bs);
-
-  if (gfp->bWriteVbrTag) AddVbrFrame(gfp);
-
-
-  /* copy data for MP3 frame analyzer */
-  if (gfp->analysis && gfc->pinfo != NULL) {
-    int j;
-    for ( ch = 0; ch < gfc->channels_out; ch++ ) {
-      for ( j = 0; j < FFTOFFSET; j++ )
-	gfc->pinfo->pcmdata[ch][j] = gfc->pinfo->pcmdata[ch][j+gfp->framesize];
-      for ( j = FFTOFFSET; j < 1600; j++ ) {
-	gfc->pinfo->pcmdata[ch][j] = inbuf[ch][j-FFTOFFSET];
-      }
-    }
-    set_frame_pinfo (gfp, xr, *masking, l3_enc, scalefac);
-  }
-  
-  updateStats( gfc );
-
-  return mp3count;
-}
--- a/sys/src/games/mp3enc/encoder.h
+++ /dev/null
@@ -1,131 +1,0 @@
-/*
- *      encoder.h include file
- *
- *      Copyright (c) 2000 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef LAME_ENCODER_H
-#define LAME_ENCODER_H
-
-/***********************************************************************
-*
-*  encoder and decoder delays
-*
-***********************************************************************/
-
-/* 
- * layer III enc->dec delay:  1056 (1057?)   (observed)
- * layer  II enc->dec delay:   480  (481?)   (observed)
- *
- * polyphase 256-16             (dec or enc)        = 240
- * mdct      256+32  (9*32)     (dec or enc)        = 288
- * total:    512+16
- *
- * My guess is that delay of polyphase filterbank is actualy 240.5
- * (there are technical reasons for this, see postings in mp3encoder).
- * So total Encode+Decode delay = ENCDELAY + 528 + 1
- */
-
-/* 
- * ENCDELAY  The encoder delay.  
- *
- * Minimum allowed is MDCTDELAY (see below)
- *  
- * The first 96 samples will be attenuated, so using a value less than 96
- * will result in corrupt data for the first 96-ENCDELAY samples.
- *
- * suggested: 576
- * set to 1160 to sync with FhG.
- */
- 
-#define ENCDELAY      576
-
-/* 
- * delay of the MDCT used in mdct.c
- * original ISO routines had a delay of 528!  
- * Takehiro's routines: 
- */
-
-#define MDCTDELAY     48  
-#define FFTOFFSET     (224+MDCTDELAY)
-
-/*
- * Most decoders, including the one we use, have a delay of 528 samples.  
- */
- 
-#define DECDELAY      528
-
-
-/* number of subbands */
-#define SBLIMIT       32
-
-/* parition bands bands */
-#define CBANDS        64
-
-/* number of critical bands/scale factor bands where masking is computed*/
-#define SBPSY_l       21
-#define SBPSY_s       12
-
-/* total number of scalefactor bands encoded */
-#define SBMAX_l       22
-#define SBMAX_s       13
-
-
-
-/* FFT sizes */
-#define BLKSIZE       1024
-#define HBLKSIZE      (BLKSIZE/2 + 1)
-#define BLKSIZE_s     256
-#define HBLKSIZE_s    (BLKSIZE_s/2 + 1)
-
-
-/* #define switch_pe        1800 */
-#define NORM_TYPE     0
-#define START_TYPE    1
-#define SHORT_TYPE    2
-#define STOP_TYPE     3
-
-/* 
- * Mode Extention:
- * When we are in stereo mode, there are 4 possible methods to store these
- * two channels. The stereo modes -m? are using a subset of them.
- *
- *  -ms: MPG_MD_LR_LR
- *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR
- *  -mf: MPG_MD_MS_LR
- *  -mi: all
- */
- 
-#define MPG_MD_LR_LR  0
-#define MPG_MD_LR_I   1
-#define MPG_MD_MS_LR  2
-#define MPG_MD_MS_I   3
-
-
-#include "machine.h"
-#include "lame.h"
-
-int  lame_encode_mp3_frame (
-        lame_global_flags*  const gfp,
-        sample_t*           inbuf_l,
-        sample_t*           inbuf_r,
-        unsigned char*      mp3buf, 
-	int                 mp3buf_size );
-
-#endif /* LAME_ENCODER_H */
--- a/sys/src/games/mp3enc/fft.c
+++ /dev/null
@@ -1,289 +1,0 @@
-/*
-** FFT and FHT routines
-**  Copyright 1988, 1993; Ron Mayer
-**  
-**  fht(fz,n);
-**      Does a hartley transform of "n" points in the array "fz".
-**      
-** NOTE: This routine uses at least 2 patented algorithms, and may be
-**       under the restrictions of a bunch of different organizations.
-**       Although I wrote it completely myself; it is kind of a derivative
-**       of a routine I once authored and released under the GPL, so it
-**       may fall under the free software foundation's restrictions;
-**       it was worked on as a Stanford Univ project, so they claim
-**       some rights to it; it was further optimized at work here, so
-**       I think this company claims parts of it.  The patents are
-**       held by R. Bracewell (the FHT algorithm) and O. Buneman (the
-**       trig generator), both at Stanford Univ.
-**       If it were up to me, I'd say go do whatever you want with it;
-**       but it would be polite to give credit to the following people
-**       if you use this anywhere:
-**           Euler     - probable inventor of the fourier transform.
-**           Gauss     - probable inventor of the FFT.
-**           Hartley   - probable inventor of the hartley transform.
-**           Buneman   - for a really cool trig generator
-**           Mayer(me) - for authoring this particular version and
-**                       including all the optimizations in one package.
-**       Thanks,
-**       Ron Mayer; [email protected]
-** and added some optimization by
-**           Mather    - idea of using lookup table
-**           Takehiro  - some dirty hack for speed up
-*/
-
-/* $Id: fft.c,v 1.17 2001/01/13 12:54:41 takehiro Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <math.h>
-#include "util.h"
-#include "fft.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-#ifndef USE_FFT3DN
-#define TRI_SIZE (5-1) /* 1024 =  4**5 */
-
-static const FLOAT costab[TRI_SIZE*2] = {
-  9.238795325112867e-01, 3.826834323650898e-01,
-  9.951847266721969e-01, 9.801714032956060e-02,
-  9.996988186962042e-01, 2.454122852291229e-02,
-  9.999811752826011e-01, 6.135884649154475e-03
-};
-
-inline static void fht(FLOAT *fz, int n)
-{
-    const FLOAT *tri = costab;
-    int           k4;
-    FLOAT *fi, *fn, *gi;
-
-    fn = fz + n;
-    k4 = 4;
-    do {
-	FLOAT s1, c1;
-	int   i, k1, k2, k3, kx;
-	kx  = k4 >> 1;
-	k1  = k4;
-	k2  = k4 << 1;
-	k3  = k2 + k1;
-	k4  = k2 << 1;
-	fi  = fz;
-	gi  = fi + kx;
-	do {
-	    FLOAT f0,f1,f2,f3;
-	    f1      = fi[0]  - fi[k1];
-	    f0      = fi[0]  + fi[k1];
-	    f3      = fi[k2] - fi[k3];
-	    f2      = fi[k2] + fi[k3];
-	    fi[k2]  = f0     - f2;
-	    fi[0 ]  = f0     + f2;
-	    fi[k3]  = f1     - f3;
-	    fi[k1]  = f1     + f3;
-	    f1      = gi[0]  - gi[k1];
-	    f0      = gi[0]  + gi[k1];
-	    f3      = SQRT2  * gi[k3];
-	    f2      = SQRT2  * gi[k2];
-	    gi[k2]  = f0     - f2;
-	    gi[0 ]  = f0     + f2;
-	    gi[k3]  = f1     - f3;
-	    gi[k1]  = f1     + f3;
-	    gi     += k4;
-	    fi     += k4;
-	} while (fi<fn);
-	c1 = tri[0];
-	s1 = tri[1];
-	for (i = 1; i < kx; i++) {
-	    FLOAT c2,s2;
-	    c2 = 1 - (2*s1)*s1;
-	    s2 = (2*s1)*c1;
-	    fi = fz + i;
-	    gi = fz + k1 - i;
-	    do {
-		FLOAT a,b,g0,f0,f1,g1,f2,g2,f3,g3;
-		b       = s2*fi[k1] - c2*gi[k1];
-		a       = c2*fi[k1] + s2*gi[k1];
-		f1      = fi[0 ]    - a;
-		f0      = fi[0 ]    + a;
-		g1      = gi[0 ]    - b;
-		g0      = gi[0 ]    + b;
-		b       = s2*fi[k3] - c2*gi[k3];
-		a       = c2*fi[k3] + s2*gi[k3];
-		f3      = fi[k2]    - a;
-		f2      = fi[k2]    + a;
-		g3      = gi[k2]    - b;
-		g2      = gi[k2]    + b;
-		b       = s1*f2     - c1*g3;
-		a       = c1*f2     + s1*g3;
-		fi[k2]  = f0        - a;
-		fi[0 ]  = f0        + a;
-		gi[k3]  = g1        - b;
-		gi[k1]  = g1        + b;
-		b       = c1*g2     - s1*f3;
-		a       = s1*g2     + c1*f3;
-		gi[k2]  = g0        - a;
-		gi[0 ]  = g0        + a;
-		fi[k3]  = f1        - b;
-		fi[k1]  = f1        + b;
-		gi     += k4;
-		fi     += k4;
-	    } while (fi<fn);
-	    c2 = c1;
-	    c1 = c2 * tri[0] - s1 * tri[1];
-	    s1 = c2 * tri[1] + s1 * tri[0];
-        }
-	tri += 2;
-    } while (k4<n);
-}
-#else
-#define fht(a,b) fht_3DN(a,b/2)
-#endif /* USE_FFT3DN */
-
-static const unsigned char rv_tbl[] = {
-    0x00,    0x80,    0x40,    0xc0,    0x20,    0xa0,    0x60,    0xe0,
-    0x10,    0x90,    0x50,    0xd0,    0x30,    0xb0,    0x70,    0xf0,
-    0x08,    0x88,    0x48,    0xc8,    0x28,    0xa8,    0x68,    0xe8,
-    0x18,    0x98,    0x58,    0xd8,    0x38,    0xb8,    0x78,    0xf8,
-    0x04,    0x84,    0x44,    0xc4,    0x24,    0xa4,    0x64,    0xe4,
-    0x14,    0x94,    0x54,    0xd4,    0x34,    0xb4,    0x74,    0xf4,
-    0x0c,    0x8c,    0x4c,    0xcc,    0x2c,    0xac,    0x6c,    0xec,
-    0x1c,    0x9c,    0x5c,    0xdc,    0x3c,    0xbc,    0x7c,    0xfc,
-    0x02,    0x82,    0x42,    0xc2,    0x22,    0xa2,    0x62,    0xe2,
-    0x12,    0x92,    0x52,    0xd2,    0x32,    0xb2,    0x72,    0xf2,
-    0x0a,    0x8a,    0x4a,    0xca,    0x2a,    0xaa,    0x6a,    0xea,
-    0x1a,    0x9a,    0x5a,    0xda,    0x3a,    0xba,    0x7a,    0xfa,
-    0x06,    0x86,    0x46,    0xc6,    0x26,    0xa6,    0x66,    0xe6,
-    0x16,    0x96,    0x56,    0xd6,    0x36,    0xb6,    0x76,    0xf6,
-    0x0e,    0x8e,    0x4e,    0xce,    0x2e,    0xae,    0x6e,    0xee,
-    0x1e,    0x9e,    0x5e,    0xde,    0x3e,    0xbe,    0x7e,    0xfe
-};
-
-#define ch01(index)  (buffer[chn][index])
-
-#define ml00(f)	(window[i        ] * f(i))
-#define ml10(f)	(window[i + 0x200] * f(i + 0x200))
-#define ml20(f)	(window[i + 0x100] * f(i + 0x100))
-#define ml30(f)	(window[i + 0x300] * f(i + 0x300))
-
-#define ml01(f)	(window[i + 0x001] * f(i + 0x001))
-#define ml11(f)	(window[i + 0x201] * f(i + 0x201))
-#define ml21(f)	(window[i + 0x101] * f(i + 0x101))
-#define ml31(f)	(window[i + 0x301] * f(i + 0x301))
-
-#define ms00(f)	(window_s[i       ] * f(i + k))
-#define ms10(f)	(window_s[0x7f - i] * f(i + k + 0x80))
-#define ms20(f)	(window_s[i + 0x40] * f(i + k + 0x40))
-#define ms30(f)	(window_s[0x3f - i] * f(i + k + 0xc0))
-
-#define ms01(f)	(window_s[i + 0x01] * f(i + k + 0x01))
-#define ms11(f)	(window_s[0x7e - i] * f(i + k + 0x81))
-#define ms21(f)	(window_s[i + 0x41] * f(i + k + 0x41))
-#define ms31(f)	(window_s[0x3e - i] * f(i + k + 0xc1))
-
-
-void fft_short(lame_internal_flags *gfc, 
-                FLOAT x_real[3][BLKSIZE_s], int chn, const sample_t *buffer[2])
-{
-    const FLOAT*  window_s = (const FLOAT *)&gfc->window_s[0];
-    int           i;
-    int           j;
-    int           b;
-
-    for (b = 0; b < 3; b++) {
-	FLOAT *x = &x_real[b][BLKSIZE_s / 2];
-	short k = (576 / 3) * (b + 1);
-	j = BLKSIZE_s / 8 - 1;
-	do {
-	  FLOAT f0,f1,f2,f3, w;
-
-	  i = rv_tbl[j << 2];
-
-	  f0 = ms00(ch01); w = ms10(ch01); f1 = f0 - w; f0 = f0 + w;
-	  f2 = ms20(ch01); w = ms30(ch01); f3 = f2 - w; f2 = f2 + w;
-
-	  x -= 4;
-	  x[0] = f0 + f2;
-	  x[2] = f0 - f2;
-	  x[1] = f1 + f3;
-	  x[3] = f1 - f3;
-
-	  f0 = ms01(ch01); w = ms11(ch01); f1 = f0 - w; f0 = f0 + w;
-	  f2 = ms21(ch01); w = ms31(ch01); f3 = f2 - w; f2 = f2 + w;
-
-	  x[BLKSIZE_s / 2 + 0] = f0 + f2;
-	  x[BLKSIZE_s / 2 + 2] = f0 - f2;
-	  x[BLKSIZE_s / 2 + 1] = f1 + f3;
-	  x[BLKSIZE_s / 2 + 3] = f1 - f3;
-	} while (--j >= 0);
-
-	fht(x, BLKSIZE_s);
-    }
-}
-
-void fft_long(lame_internal_flags * const gfc,
-               FLOAT x[BLKSIZE], int chn, const sample_t *buffer[2] )
-{
-    const FLOAT*  window = (const FLOAT *)&gfc->window[0];
-    int           i;
-    int           jj = BLKSIZE / 8 - 1;
-    x += BLKSIZE / 2;
-
-    do {
-      FLOAT f0,f1,f2,f3, w;
-
-      i = rv_tbl[jj];
-      f0 = ml00(ch01); w = ml10(ch01); f1 = f0 - w; f0 = f0 + w;
-      f2 = ml20(ch01); w = ml30(ch01); f3 = f2 - w; f2 = f2 + w;
-
-      x -= 4;
-      x[0] = f0 + f2;
-      x[2] = f0 - f2;
-      x[1] = f1 + f3;
-      x[3] = f1 - f3;
-
-      f0 = ml01(ch01); w = ml11(ch01); f1 = f0 - w; f0 = f0 + w;
-      f2 = ml21(ch01); w = ml31(ch01); f3 = f2 - w; f2 = f2 + w;
-
-      x[BLKSIZE / 2 + 0] = f0 + f2;
-      x[BLKSIZE / 2 + 2] = f0 - f2;
-      x[BLKSIZE / 2 + 1] = f1 + f3;
-      x[BLKSIZE / 2 + 3] = f1 - f3;
-    } while (--jj >= 0);
-
-    fht(x, BLKSIZE);
-}
-
-
-void init_fft(lame_internal_flags * const gfc)
-{
-    FLOAT *window   = &gfc->window[0];
-    FLOAT *window_s = &gfc->window_s[0];
-    int i;
-
-#if 0
-    if (gfc->nsPsy.use) {
-      for (i = 0; i < BLKSIZE ; i++)
-	/* blackman window */
-	window[i] = 0.42-0.5*cos(2*PI*i/(BLKSIZE-1))+0.08*cos(4*PI*i/(BLKSIZE-1));
-    } else {
-      /*
-       * calculate HANN window coefficients 
-       */
-      for (i = 0; i < BLKSIZE ; i++)
-	window[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE));
-    }
-#endif
-
-    // The type of window used here will make no real difference, but
-    // in the interest of merging nspsytune stuff - switch to blackman window
-    for (i = 0; i < BLKSIZE ; i++)
-      /* blackman window */
-      window[i] = 0.42-0.5*cos(2*PI*(i+.5)/BLKSIZE)+
-	0.08*cos(4*PI*(i+.5)/BLKSIZE);
-
-    for (i = 0; i < BLKSIZE_s/2 ; i++)
-	window_s[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE_s));
-}
--- a/sys/src/games/mp3enc/fft.h
+++ /dev/null
@@ -1,37 +1,0 @@
-/*
- *	Fast Fourier Transform include file
- *
- *	Copyright (c) 2000 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_FFT_H
-#define LAME_FFT_H
-
-#include "encoder.h"
-
-void fft_long(lame_internal_flags* gfc, FLOAT x_real[BLKSIZE], 
-               int chn, const sample_t *data[2] );
-
-void fft_short(lame_internal_flags* gfc, FLOAT x_real[3][BLKSIZE_s], 
-               int chn, const sample_t *data[2] );
-
-void init_fft(lame_internal_flags* gfc );
-
-#endif
-
-/* End of fft.h */
--- a/sys/src/games/mp3enc/get_audio.c
+++ /dev/null
@@ -1,1618 +1,0 @@
-/*
- *	Get Audio routines source file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: get_audio.c,v 1.61 2001/03/19 21:26:05 markt Exp $ */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef HAVE_STRCHR
-#  define strchr index
-#  define strrchr rindex
-# endif
-char   *strchr(), *strrchr();
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-#  define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "lame.h"
-#include "main.h"
-#include "get_audio.h"
-#include "portableio.h"
-#include "timestatus.h"
-#include "lametime.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-/* global data for get_audio.c. */
-int     count_samples_carefully;
-int     pcmbitwidth;
-mp3data_struct mp3input_data; /* used by Ogg and MP3 */
-unsigned int num_samples_read;
-FILE   *musicin;
-
-
-#ifdef AMIGA_MPEGA
-int     lame_decode_initfile(const char *fullname,
-                             mp3data_struct * const mp3data);
-#else
-int     lame_decode_initfile(FILE * const fd, mp3data_struct * const mp3data);
-#endif
-
-/* read mp3 file until mpglib returns one frame of PCM data */
-int     lame_decode_fromfile(FILE * fd, short int pcm_l[], short int pcm_r[],
-                             mp3data_struct * mp3data);
-
-/* and for Vorbis: */
-int     lame_decode_ogg_initfile( lame_global_flags*  gfp,
-                                  FILE*               fd,
-                                  mp3data_struct*     mp3data );
-int     lame_decode_ogg_fromfile( lame_global_flags*  gfc,
-                                  FILE*               fd,
-                                  short int           pcm_l[],
-                                  short int           pcm_r[],
-                                  mp3data_struct*     mp3data );
-
-
-static int read_samples_pcm(FILE * musicin, short sample_buffer[2304],
-                            int frame_size, int samples_to_read);
-static int read_samples_mp3(lame_global_flags * gfp, FILE * musicin,
-                            short int mpg123pcm[2][1152], int num_chan);
-static int read_samples_ogg(lame_global_flags * gfp, FILE * musicin,
-                            short int mpg123pcm[2][1152], int num_chan);
-void    CloseSndFile(sound_file_format input, FILE * musicin);
-FILE   *OpenSndFile(lame_global_flags * gfp, char *);
-
-
-/* Replacement for forward fseek(,,SEEK_CUR), because fseek() fails on pipes */
-
-
-static int
-fskip(FILE * fp, long offset, int whence)
-{
-#ifndef PIPE_BUF
-    char    buffer[4096];
-#else
-    char    buffer[PIPE_BUF];
-#endif
-    int     read;
-
-    if (0 == fseek(fp, offset, whence))
-        return 0;
-
-    if (whence != SEEK_CUR || offset < 0) {
-        fprintf(stderr,
-                "fskip problem: Mostly the return status of functions is not evaluated so it is more secure to pollute <stderr>.\n");
-        return -1;
-    }
-
-    while (offset > 0) {
-        read = offset > sizeof(buffer) ? sizeof(buffer) : offset;
-        if ((read = fread(buffer, 1, read, fp)) <= 0)
-            return -1;
-        offset -= read;
-    }
-
-    return 0;
-}
-
-
-FILE   *
-init_outfile(char *outPath, int decode)
-{
-    FILE   *outf;
-
-    /* open the output file */
-    if (0 == strcmp(outPath, "-"))
-        lame_set_stream_binary_mode(outf = stdout);
-    else 
-        if ((outf = fopen(outPath, "wb+")) == NULL)
-            return NULL;
-    return outf;
-}
-
-void
-init_infile(lame_global_flags * gfp, char *inPath)
-{
-    /* open the input file */
-    count_samples_carefully = 0;
-    pcmbitwidth = 16;
-    musicin = OpenSndFile(gfp, inPath);
-}
-
-void
-close_infile(void)
-{
-    CloseSndFile(input_format, musicin);
-}
-
-
-void
-SwapBytesInWords(short *ptr, int short_words)
-{                       /* Some speedy code */
-    unsigned long val;
-    unsigned long *p = (unsigned long *) ptr;
-
-#ifndef lint
-# if defined(CHAR_BIT)
-#  if CHAR_BIT != 8
-#   error CHAR_BIT != 8
-#  endif
-# else
-#  error can not determine number of bits in a char
-# endif
-#endif /* lint */
-
-    assert(sizeof(short) == 2);
-
-
-#if defined(SIZEOF_UNSIGNED_LONG) && SIZEOF_UNSIGNED_LONG == 4
-    for (; short_words >= 2; short_words -= 2, p++) {
-        val = *p;
-        *p = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0x00FF00FF);
-    }
-    ptr = (short *) p;
-    for (; short_words >= 1; short_words -= 1, ptr++) {
-        val = *ptr;
-        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
-    }
-#elif defined(SIZEOF_UNSIGNED_LONG) && SIZEOF_UNSIGNED_LONG == 8
-    for (; short_words >= 4; short_words -= 4, p++) {
-        val = *p;
-        *p =
-            ((val << 8) & 0xFF00FF00FF00FF00) | ((val >> 8) &
-                                                 0x00FF00FF00FF00FF);
-    }
-    ptr = (short *) p;
-    for (; short_words >= 1; short_words -= 1, ptr++) {
-        val = *ptr;
-        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
-    }
-#else
-# ifdef SIZEOF_UNSIGNED_LONG
-//#  warning Using unoptimized SwapBytesInWords().
-# endif
-    for (; short_words >= 1; short_words -= 1, ptr++) {
-        val = *ptr;
-        *ptr = ((val << 8) & 0xFF00) | ((val >> 8) & 0x00FF);
-    }
-#endif
-
-    assert(short_words == 0);
-}
-
-
-/************************************************************************
-*
-* get_audio()
-*
-* PURPOSE:  reads a frame of audio data from a file to the buffer,
-*   aligns the data for future processing, and separates the
-*   left and right channels
-*
-************************************************************************/
-int
-get_audio(lame_global_flags * const gfp, short buffer[2][1152])
-{
-    int     num_channels = lame_get_num_channels( gfp );
-    short   insamp[2 * 1152];
-    int     samples_read;
-    int     framesize;
-    int     samples_to_read;
-    unsigned int remaining, tmp_num_samples;
-    int     j;
-    short  *p;
-
-    /* 
-     * NOTE: LAME can now handle arbritray size input data packets,
-     * so there is no reason to read the input data in chuncks of
-     * size "gfp->framesize".  EXCEPT:  the LAME graphical frame analyzer 
-     * will get out of sync if we read more than framesize worth of data.
-     */
-
-    samples_to_read = framesize = gfp->framesize;
-    assert(framesize <= 1152);
-
-    /* get num_samples */
-    tmp_num_samples = lame_get_num_samples( gfp );
-
-    /* if this flag has been set, then we are carefull to read
-     * exactly num_samples and no more.  This is useful for .wav and .aiff
-     * files which have id3 or other tags at the end.  Note that if you
-     * are using LIBSNDFILE, this is not necessary 
-     */
-    if (count_samples_carefully) {
-        remaining = tmp_num_samples - Min(tmp_num_samples, num_samples_read);
-        if (remaining < framesize)
-            samples_to_read = remaining;
-    }
-
-    switch (input_format) {
-    case sf_mp1:
-    case sf_mp2:
-    case sf_mp3:
-        samples_read = read_samples_mp3(gfp, musicin, buffer, num_channels);
-        break;
-    case sf_ogg:
-        samples_read = read_samples_ogg(gfp, musicin, buffer, num_channels);
-        break;
-    default:
-        samples_read =
-            read_samples_pcm(musicin, insamp, num_channels * framesize,
-                             num_channels * samples_to_read);
-        samples_read /= num_channels;
-
-        p = insamp;
-        switch (num_channels) {
-        case 1:
-            for (j = 0; j < framesize; j++) {
-                buffer[0][j] = *p++;
-                buffer[1][j] = 0;
-            }
-            break;
-        case 2:
-            for (j = 0; j < framesize; j++) {
-                buffer[0][j] = *p++;
-                buffer[1][j] = *p++;
-            }
-            break;
-        default:
-            assert(0);
-            break;
-        }
-    }
-
-    /* if num_samples = MAX_U_32_NUM, then it is considered infinitely long.
-       Don't count the samples */
-    if ( tmp_num_samples != MAX_U_32_NUM )
-        num_samples_read += samples_read;
-
-    return samples_read;
-}
-
-
-
-
-
-
-int
-read_samples_ogg(lame_global_flags * const gfp,
-                 FILE * const musicin,
-                 short int oggpcm[2][1152], const int stereo)
-{
-    int     out = 0;
-
-#ifdef HAVE_VORBIS
-    static const char type_name[] = "Ogg Vorbis file";
-
-    out =
-        lame_decode_ogg_fromfile( gfp,
-                                  musicin,
-                                  oggpcm[0],
-                                  oggpcm[1],
-                                  &mp3input_data );
-    /*
-     * out < 0:  error, probably EOF
-     * out = 0:  not possible with lame_decode_fromfile() ???
-     * out > 0:  number of output samples
-     */
-
-    if (out < 0) {
-        memset(oggpcm, 0, sizeof(**oggpcm) * 2 * 1152);
-        return 0;
-    }
-
-    if (lame_get_num_channels( gfp ) != mp3input_data.stereo)
-        fprintf(stderr,
-                "Error: number of channels has changed in %s - not supported\n",
-                type_name);
-    if ( lame_get_in_samplerate( gfp ) != mp3input_data.samplerate )
-        fprintf(stderr,
-                "Error: sample frequency has changed in %s - not supported\n",
-                type_name);
-
-#else
-    out = -1;           /* wanna read ogg without vorbis support? */
-#endif
-
-    return out;
-}
-
-
-int
-read_samples_mp3(lame_global_flags * const gfp,
-                 FILE * const musicin, short int mpg123pcm[2][1152], int stereo)
-{
-    int     out;
-#if defined(AMIGA_MPEGA)  ||  defined(HAVE_MPGLIB)
-    static const char type_name[] = "MP3 file";
-
-    out =
-        lame_decode_fromfile(musicin, mpg123pcm[0], mpg123pcm[1],
-                             &mp3input_data);
-    /*
-     * out < 0:  error, probably EOF
-     * out = 0:  not possible with lame_decode_fromfile() ???
-     * out > 0:  number of output samples
-     */
-
-    if (out < 0) {
-        memset(mpg123pcm, 0, sizeof(**mpg123pcm) * 2 * 1152);
-        return 0;
-    }
-
-    if ( lame_get_num_channels( gfp ) != mp3input_data.stereo )
-        fprintf(stderr,
-                "Error: number of channels has changed in %s - not supported\n",
-                type_name);
-    if ( lame_get_in_samplerate( gfp ) != mp3input_data.samplerate )
-        fprintf(stderr,
-                "Error: sample frequency has changed in %s - not supported\n",
-                type_name);
-
-#else
-    out = -1;
-#endif
-    return out;
-}
-
-
-static int
-WriteWaveHeader(FILE * const fp, const int pcmbytes,
-                const int freq, const int channels, const int bits)
-{
-    int     bytes = (bits + 7) / 8;
-
-    /* quick and dirty, but documented */
-    fwrite("RIFF", 1, 4, fp); // label
-    Write32BitsLowHigh(fp, pcmbytes + 44 - 8); // length in bytes without header
-    fwrite("WAVEfmt ", 2, 4, fp); // 2 labels
-    Write32BitsLowHigh(fp, 2 + 2 + 4 + 4 + 2 + 2); // length of PCM format declaration area
-    Write16BitsLowHigh(fp, 1); // is PCM?
-    Write16BitsLowHigh(fp, channels); // number of channels
-    Write32BitsLowHigh(fp, freq); // sample frequency in [Hz]
-    Write32BitsLowHigh(fp, freq * channels * bytes); // bytes per second
-    Write16BitsLowHigh(fp, channels * bytes); // bytes per sample time
-    Write16BitsLowHigh(fp, bits); // bits per sample
-    fwrite("data", 1, 4, fp); // label
-    Write32BitsLowHigh(fp, pcmbytes); // length in bytes of raw PCM data
-
-    return ferror(fp) ? -1 : 0;
-}
-
-/* the simple lame decoder */
-/* After calling lame_init(), lame_init_params() and
- * init_infile(), call this routine to read the input MP3 file
- * and output .wav data to the specified file pointer*/
-/* lame_decoder will ignore the first 528 samples, since these samples
- * represent the mpglib delay (and are all 0).  skip = number of additional
- * samples to skip, to (for example) compensate for the encoder delay */
-
-int
-lame_decoder(lame_global_flags * gfp, FILE * outf, int skip, char *inPath,
-             char *outPath)
-{
-    short int Buffer[2][1152];
-    int     iread;
-    double  wavsize;
-    int     i;
-    void    (*WriteFunction) (FILE * fp, char *p, int n);
-    int tmp_num_channels = lame_get_num_channels( gfp );
-
-
-
-    fprintf(stderr, "\rinput:  %s%s(%g kHz, %i channel%s, ",
-            strcmp(inPath, "-") ? inPath : "<stdin>",
-            strlen(inPath) > 26 ? "\n\t" : "  ",
-            lame_get_in_samplerate( gfp ) / 1.e3,
-            tmp_num_channels, tmp_num_channels != 1 ? "s" : "");
-
-    switch (input_format) {
-    case sf_mp3:
-        skip += 528 + 1; /* mp3 decoder has a 528 sample delay, plus user supplied "skip" */
-        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
-                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "III");
-        break;
-    case sf_mp2:
-        skip += 240 + 1;
-        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
-                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "II");
-        break;
-    case sf_mp1:
-        skip += 240 + 1;
-        fprintf(stderr, "MPEG-%u%s Layer %s", 2 - gfp->version,
-                lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "I");
-        break;
-    case sf_ogg:
-        fprintf(stderr, "Ogg Vorbis");
-        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
-        break;
-    case sf_raw:
-        fprintf(stderr, "raw PCM data");
-        mp3input_data.nsamp = lame_get_num_samples( gfp );
-        mp3input_data.framesize = 1152;
-        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
-        break;
-    case sf_wave:
-        fprintf(stderr, "Microsoft WAVE");
-        mp3input_data.nsamp = lame_get_num_samples( gfp );
-        mp3input_data.framesize = 1152;
-        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
-        break;
-    case sf_aiff:
-        fprintf(stderr, "SGI/Apple AIFF");
-        mp3input_data.nsamp = lame_get_num_samples( gfp );
-        mp3input_data.framesize = 1152;
-        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
-        break;
-    default:
-        fprintf(stderr, "unknown");
-        mp3input_data.nsamp = lame_get_num_samples( gfp );
-        mp3input_data.framesize = 1152;
-        skip = 0;       /* other formats have no delay *//* is += 0 not better ??? */
-        assert(0);
-        break;
-    }
-
-    fprintf(stderr, ")\noutput: %s%s(16 bit, Microsoft WAVE)\n",
-            strcmp(outPath, "-") ? outPath : "<stdout>",
-            strlen(outPath) > 45 ? "\n\t" : "  ");
-
-    if (skip > 0)
-        fprintf(stderr, "skipping initial %i samples (encoder+decoder delay)\n",
-                skip);
-
-    if ( 0 == lame_get_disable_waveheader( gfp ) )
-        WriteWaveHeader(outf, 0x7FFFFFFF, lame_get_in_samplerate( gfp ),
-                        tmp_num_channels,
-                        16);
-    /* unknown size, so write maximum 32 bit signed value */
-
-    wavsize = -skip;
-    WriteFunction = swapbytes ? WriteBytesSwapped : WriteBytes;
-    mp3input_data.totalframes = mp3input_data.nsamp / mp3input_data.framesize;
-
-    assert(tmp_num_channels >= 1 && tmp_num_channels <= 2);
-
-    do {
-        iread = get_audio(gfp, Buffer); /* read in 'iread' samples */
-        mp3input_data.framenum += iread / mp3input_data.framesize;
-        wavsize += iread;
-
-        if (!silent)
-            decoder_progress(gfp, &mp3input_data);
-
-        skip -= (i = skip < iread ? skip : iread); /* 'i' samples are to skip in this frame */
-
-        for (; i < iread; i++) {
-            if ( lame_get_disable_waveheader( gfp ) ) {
-                WriteFunction(outf, (char *) Buffer[0] + i, sizeof(short));
-                if (tmp_num_channels == 2)
-                    WriteFunction(outf, (char *) Buffer[1] + i, sizeof(short));
-            }
-            else {
-                Write16BitsLowHigh(outf, Buffer[0][i]);
-                if (tmp_num_channels == 2)
-                    Write16BitsLowHigh(outf, Buffer[1][i]);
-            }
-        }
-    } while (iread);
-
-    i = (16 / 8) * tmp_num_channels;
-    assert(i > 0);
-    if (wavsize <= 0) {
-        fprintf(stderr, "WAVE file contains 0 PCM samples\n");
-        wavsize = 0;
-    }
-    else if (wavsize > 0xFFFFFFD0 / i) {
-        fprintf(stderr,
-                "Very huge WAVE file, can't set filesize accordingly\n");
-        wavsize = 0xFFFFFFD0;
-    }
-    else {
-        wavsize *= i;
-    }
-
-    if ( 0 == lame_get_disable_waveheader( gfp ) )
-        if (!fseek(outf, 0l, SEEK_SET)) /* if outf is seekable, rewind and adjust length */
-            WriteWaveHeader(outf, wavsize, lame_get_in_samplerate( gfp ),
-                            tmp_num_channels, 16);
-    fclose(outf);
-
-    decoder_progress_finish(gfp);
-    return 0;
-}
-
-
-
-
-
-
-#if defined(LIBSNDFILE)
-
-#if 0                   /* currently disabled */
-# include "sndfile.h"   // prototype for sf_get_lib_version()
-void
-print_sndlib_version(FILE * fp)
-{
-    char    tmp[80];
-    sf_get_lib_version(tmp, sizeof(tmp));
-    fprintf(fp,
-            "Input handled by %s  (http://www.zip.com.au/~erikd/libsndfile/)\n",
-            tmp);
-}
-#endif
-
-/*
-** Copyright (C) 1999 Albert Faber
-**
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-
-
-
-
-void
-CloseSndFile(sound_file_format input, FILE * musicin)
-{
-    SNDFILE *gs_pSndFileIn = (SNDFILE *) musicin;
-    if (input == sf_mp1 || input == sf_mp2 || input == sf_mp3) {
-#ifndef AMIGA_MPEGA
-        if (fclose(musicin) != 0) {
-            fprintf(stderr, "Could not close audio input file\n");
-            exit(2);
-        }
-#endif
-    }
-    else {
-        if (gs_pSndFileIn) {
-            if (sf_close(gs_pSndFileIn) != 0) {
-                fprintf(stderr, "Could not close sound file \n");
-                exit(2);
-            }
-        }
-    }
-}
-
-
-
-FILE   *
-OpenSndFile(lame_global_flags * gfp, char *inPath)
-{
-    char   *lpszFileName = inPath;
-    FILE   *musicin;
-    SNDFILE *gs_pSndFileIn;
-    SF_INFO gs_wfInfo;
-
-    if (input_format == sf_mp1 ||
-        input_format == sf_mp2 || input_format == sf_mp3) {
-#ifdef AMIGA_MPEGA
-        if (-1 == lame_decode_initfile(lpszFileName, &mp3input_data)) {
-            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
-                    lpszFileName);
-            exit(1);
-        }
-#endif
-#ifdef HAVE_MPGLIB
-        if ((musicin = fopen(lpszFileName, "rb")) == NULL) {
-            fprintf(stderr, "Could not find \"%s\".\n", lpszFileName);
-            exit(1);
-        }
-        if (-1 == lame_decode_initfile(musicin, &mp3input_data)) {
-            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
-                    lpszFileName);
-            exit(1);
-        }
-#endif
-
-        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     mp3input_data.stereo );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
-        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
-    }
-    else if (input_format == sf_ogg) {
-#ifdef HAVE_VORBIS
-        if ((musicin = fopen(lpszFileName, "rb")) == NULL) {
-            fprintf(stderr, "Could not find \"%s\".\n", lpszFileName);
-            exit(1);
-        }
-        if ( -1 == lame_decode_ogg_initfile( gfp,
-                                             musicin,
-                                             &mp3input_data ) ) {
-            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
-                    lpszFileName);
-            exit(1);
-        }
-#else
-        fprintf(stderr, "mp3enc not compiled with libvorbis support.\n");
-        exit(1);
-#endif
-
-
-    }
-    else {
-
-        /* Try to open the sound file */
-        /* set some defaults incase input is raw PCM */
-        gs_wfInfo.seekable = (input_format != sf_raw); /* if user specified -r, set to not seekable */
-        gs_wfInfo.samplerate = lame_get_in_samplerate( gfp );
-        gs_wfInfo.pcmbitwidth = 16;
-        gs_wfInfo.channels = lame_get_num_channels( gfp );
-#ifndef WORDS_BIGENDIAN
-        /* little endian */
-        if (swapbytes)
-            gs_wfInfo.format = SF_FORMAT_RAW_BE;
-        else
-            gs_wfInfo.format = SF_FORMAT_RAW_LE;
-#else
-        if (swapbytes)
-            gs_wfInfo.format = SF_FORMAT_RAW_LE;
-        else
-            gs_wfInfo.format = SF_FORMAT_RAW_BE;
-#endif
-
-        gs_pSndFileIn = sf_open_read(lpszFileName, &gs_wfInfo);
-        musicin = (SNDFILE *) gs_pSndFileIn;
-
-        /* Check result */
-        if (gs_pSndFileIn == NULL) {
-            sf_perror(gs_pSndFileIn);
-            fprintf(stderr, "Could not open sound file \"%s\".\n",
-                    lpszFileName);
-            exit(1);
-        }
-
-        if ((gs_wfInfo.format == SF_FORMAT_RAW_LE) ||
-            (gs_wfInfo.format == SF_FORMAT_RAW_BE)) input_format = sf_raw;
-
-#ifdef _DEBUG_SND_FILE
-        DEBUGF("\n\nSF_INFO structure\n");
-        DEBUGF("samplerate        :%d\n", gs_wfInfo.samplerate);
-        DEBUGF("samples           :%d\n", gs_wfInfo.samples);
-        DEBUGF("channels          :%d\n", gs_wfInfo.channels);
-        DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
-        DEBUGF("format            :");
-
-        /* new formats from [email protected]  1/2000 */
-
-        switch (gs_wfInfo.format & SF_FORMAT_TYPEMASK) {
-        case SF_FORMAT_WAV:
-            DEBUGF("Microsoft WAV format (big endian). ");
-            break;
-        case SF_FORMAT_AIFF:
-            DEBUGF("Apple/SGI AIFF format (little endian). ");
-            break;
-        case SF_FORMAT_AU:
-            DEBUGF("Sun/NeXT AU format (big endian). ");
-            break;
-        case SF_FORMAT_AULE:
-            DEBUGF("DEC AU format (little endian). ");
-            break;
-        case SF_FORMAT_RAW:
-            DEBUGF("RAW PCM data. ");
-            break;
-        case SF_FORMAT_PAF:
-            DEBUGF("Ensoniq PARIS file format. ");
-            break;
-        case SF_FORMAT_SVX:
-            DEBUGF("Amiga IFF / SVX8 / SV16 format. ");
-            break;
-        case SF_FORMAT_NIST:
-            DEBUGF("Sphere NIST format. ");
-            break;
-        default:
-            assert(0);
-            break;
-        }
-
-        switch (gs_wfInfo.format & SF_FORMAT_SUBMASK) {
-        case SF_FORMAT_PCM:
-            DEBUGF("PCM data in 8, 16, 24 or 32 bits.");
-            break;
-        case SF_FORMAT_FLOAT:
-            DEBUGF("32 bit Intel x86 floats.");
-            break;
-        case SF_FORMAT_ULAW:
-            DEBUGF("U-Law encoded.");
-            break;
-        case SF_FORMAT_ALAW:
-            DEBUGF("A-Law encoded.");
-            break;
-        case SF_FORMAT_IMA_ADPCM:
-            DEBUGF("IMA ADPCM.");
-            break;
-        case SF_FORMAT_MS_ADPCM:
-            DEBUGF("Microsoft ADPCM.");
-            break;
-        case SF_FORMAT_PCM_BE:
-            DEBUGF("Big endian PCM data.");
-            break;
-        case SF_FORMAT_PCM_LE:
-            DEBUGF("Little endian PCM data.");
-            break;
-        case SF_FORMAT_PCM_S8:
-            DEBUGF("Signed 8 bit PCM.");
-            break;
-        case SF_FORMAT_PCM_U8:
-            DEBUGF("Unsigned 8 bit PCM.");
-            break;
-        case SF_FORMAT_SVX_FIB:
-            DEBUGF("SVX Fibonacci Delta encoding.");
-            break;
-        case SF_FORMAT_SVX_EXP:
-            DEBUGF("SVX Exponential Delta encoding.");
-            break;
-        default:
-            assert(0);
-            break;
-        }
-
-        DEBUGF("\n");
-        DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
-        DEBUGF("sections          :%d\n", gs_wfInfo.sections);
-        DEBUGF("seekable          :\n", gs_wfInfo.seekable);
-#endif
-
-        (void) lame_set_num_samples( gfp, gs_wfInfo.samples );
-        if( -1 == lame_set_num_channels( gfp, gs_wfInfo.channels ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     gs_wfInfo.channels );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, gs_wfInfo.samplerate );
-        pcmbitwidth = gs_wfInfo.pcmbitwidth;
-    }
-
-    if (lame_get_num_samples( gfp ) == MAX_U_32_NUM) {
-        /* try to figure out num_samples */
-        double  flen = lame_get_file_size( lpszFileName );
-
-        if (flen >= 0) {
-            /* try file size, assume 2 bytes per sample */
-            if (input_format == sf_mp1 ||
-                input_format == sf_mp2 || input_format == sf_mp3) {
-                double  totalseconds =
-                    (flen * 8.0 / (1000.0 * mp3input_data.bitrate));
-                unsigned long tmp_num_samples =
-                    totalseconds * lame_get_in_samplerate( gfp );
-
-                (void) lame_set_num_samples( gfp, tmp_num_samples );
-                mp3input_data.nsamp = tmp_num_samples;
-            }
-            else {
-                lame_set_num_samples( gfp,
-                    flen / (2 * lame_get_num_channels( gfp )) );
-            }
-        }
-    }
-
-
-    return musicin;
-}
-
-
-/************************************************************************
-*
-* read_samples()
-*
-* PURPOSE:  reads the PCM samples from a file to the buffer
-*
-*  SEMANTICS:
-* Reads #samples_read# number of shorts from #musicin# filepointer
-* into #sample_buffer[]#.  Returns the number of samples read.
-*
-************************************************************************/
-
-static int
-read_samples_pcm(FILE * const musicin, short sample_buffer[2304],
-                 int frame_size /* unused */ , int samples_to_read)
-{
-    int     i;
-    int     samples_read;
-
-    samples_read =
-        sf_read_short((SNDFILE *) musicin, sample_buffer, samples_to_read);
-
-    switch (pcmbitwidth) {
-    case 8:
-        for (i = 0; i < samples_read; i++)
-            sample_buffer[i] <<= 8;
-        break;
-    case 16:
-        break;
-    default:
-        fprintf(stderr, "Only 8 and 16 bit input files supported \n");
-        exit(1);
-    }
-
-    return samples_read;
-}
-
-
-#else /* defined(LIBSNDFILE) */
-
-/************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************
- *
- * OLD ISO/LAME routines follow.  Used if you dont have LIBSNDFILE
- * or for stdin/stdout support
- *
- ************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************
- ************************************************************************/
-
-
-
-/************************************************************************
-*
-* read_samples()
-*
-* PURPOSE:  reads the PCM samples from a file to the buffer
-*
-*  SEMANTICS:
-* Reads #samples_read# number of shorts from #musicin# filepointer
-* into #sample_buffer[]#.  Returns the number of samples read.
-*
-************************************************************************/
-
-int
-read_samples_pcm(FILE * musicin, short sample_buffer[2304], int frame_size,
-                 int samples_to_read)
-{
-    int     samples_read;
-    int     iswav = (input_format == sf_wave);
-
-    if (16 == pcmbitwidth) {
-        samples_read = fread(sample_buffer, 2, samples_to_read, musicin);
-    }
-    else if (8 == pcmbitwidth) {
-        char    temp[2304];
-        int     i;
-        samples_read = fread(temp, 1, samples_to_read, musicin);
-        for (i = 0; i < samples_read; ++i) {
-            /* note: 8bit .wav samples are unsigned */
-	    /* map [0,255]  -> [-32768,32767] */
-            sample_buffer[i] = ((short int)temp[i] - 128)*256 + 127;
-        }
-    }
-    else {
-        fprintf(stderr, "Only 8 and 16 bit input files supported \n");
-        exit(1);
-    }
-    if (ferror(musicin)) {
-        fprintf(stderr, "Error reading input file\n");
-        exit(1);
-    }
-
-
-
-    if (16 == pcmbitwidth) {
-        /* intel=littleEndian.  wav files are always little endian */
-#ifndef WORDS_BIGENDIAN
-        /* little endian */
-        if (!iswav)
-            SwapBytesInWords(sample_buffer, samples_read);
-#else
-        /* big endian */
-        if (iswav)
-            SwapBytesInWords(sample_buffer, samples_read);
-#endif
-
-        if (swapbytes)
-            SwapBytesInWords(sample_buffer, samples_read);
-    }
-
-    return samples_read;
-}
-
-
-
-/* AIFF Definitions */
-
-#define IFF_ID_FORM 0x464f524d /* "FORM" */
-#define IFF_ID_AIFF 0x41494646 /* "AIFF" */
-#define IFF_ID_COMM 0x434f4d4d /* "COMM" */
-#define IFF_ID_SSND 0x53534e44 /* "SSND" */
-#define IFF_ID_MPEG 0x4d504547 /* "MPEG" */
-
-
-#define WAV_ID_RIFF 0x52494646 /* "RIFF" */
-#define WAV_ID_WAVE 0x57415645 /* "WAVE" */
-#define WAV_ID_FMT  0x666d7420 /* "fmt " */
-#define WAV_ID_DATA 0x64617461 /* "data" */
-
-
-
-
-/*****************************************************************************
- *
- *	Read Microsoft Wave headers
- *
- *	By the time we get here the first 32-bits of the file have already been
- *	read, and we're pretty sure that we're looking at a WAV file.
- *
- *****************************************************************************/
-
-static int
-parse_wave_header(lame_global_flags * gfp, FILE * sf)
-{
-    int     format_tag = 0;
-    int     channels = 0;
-    int     block_align = 0;
-    int     bits_per_sample = 0;
-    int     samples_per_sec = 0;
-    int     avg_bytes_per_sec = 0;
-
-
-    int     is_wav = 0;
-    long    data_length = 0, file_length, subSize = 0;
-    int     loop_sanity = 0;
-
-    file_length = Read32BitsHighLow(sf);
-
-    if (Read32BitsHighLow(sf) != WAV_ID_WAVE)
-        return 0;
-
-    for (loop_sanity = 0; loop_sanity < 20; ++loop_sanity) {
-        int     type = Read32BitsHighLow(sf);
-
-        if (type == WAV_ID_FMT) {
-            subSize = Read32BitsLowHigh(sf);
-            if (subSize < 16) {
-                /*DEBUGF(
-                   "'fmt' chunk too short (only %ld bytes)!", subSize);  */
-                return 0;
-            }
-
-            format_tag = Read16BitsLowHigh(sf);
-            subSize -= 2;
-            channels = Read16BitsLowHigh(sf);
-            subSize -= 2;
-            samples_per_sec = Read32BitsLowHigh(sf);
-            subSize -= 4;
-            avg_bytes_per_sec = Read32BitsLowHigh(sf);
-            subSize -= 4;
-            block_align = Read16BitsLowHigh(sf);
-            subSize -= 2;
-            bits_per_sample = Read16BitsLowHigh(sf);
-            subSize -= 2;
-
-            /* DEBUGF("   skipping %d bytes\n", subSize); */
-
-            if (subSize > 0) {
-                if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
-                    return 0;
-            };
-
-        }
-        else if (type == WAV_ID_DATA) {
-            subSize = Read32BitsLowHigh(sf);
-            data_length = subSize;
-            is_wav = 1;
-            /* We've found the audio data. Read no further! */
-            break;
-
-        }
-        else {
-            subSize = Read32BitsLowHigh(sf);
-            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
-                return 0;
-        }
-    }
-
-    if (format_tag != 1) {
-	return 0; /* oh no! non-supported format  */
-    }
-
-
-    if (is_wav) {
-        /* make sure the header is sane */
-        if( -1 == lame_set_num_channels( gfp, channels ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     channels );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, samples_per_sec );
-        pcmbitwidth = bits_per_sample;
-        (void) lame_set_num_samples( gfp,
-            data_length / (channels * ((bits_per_sample+7) / 8)) );
-    }
-    return is_wav;
-}
-
-
-
-/************************************************************************
-* aiff_check2
-*
-* PURPOSE:	Checks AIFF header information to make sure it is valid.
-*	        returns 0 on success, 1 on errors
-************************************************************************/
-
-int
-aiff_check2(const char *file_name, IFF_AIFF * const pcm_aiff_data)
-{
-    if (pcm_aiff_data->sampleType != IFF_ID_SSND) {
-        fprintf(stderr, "Sound data is not PCM in '%s'\n", file_name);
-        return 1;
-    }
-    if (pcm_aiff_data->sampleSize != sizeof(short) * CHAR_BIT) {
-        fprintf(stderr, "Sound data is not %i bits in '%s'\n",
-                sizeof(short) * CHAR_BIT, file_name);
-        return 1;
-    }
-    if (pcm_aiff_data->numChannels != 1 && pcm_aiff_data->numChannels != 2) {
-        fprintf(stderr, "Sound data is not mono or stereo in '%s'\n",
-                file_name);
-        return 1;
-    }
-    if (pcm_aiff_data->blkAlgn.blockSize != 0) {
-        fprintf(stderr, "Block size is not 0 bytes in '%s'\n", file_name);
-        return 1;
-    }
-    if (pcm_aiff_data->blkAlgn.offset != 0) {
-        fprintf(stderr, "Block offset is not 0 bytes in '%s'\n", file_name);
-        return 1;
-    }
-
-    return 0;
-}
-
-/*****************************************************************************
- *
- *	Read Audio Interchange File Format (AIFF) headers.
- *
- *	By the time we get here the first 32 bits of the file have already been
- *	read, and we're pretty sure that we're looking at an AIFF file.
- *
- *****************************************************************************/
-
-static int
-parse_aiff_header(lame_global_flags * gfp, FILE * sf)
-{
-    int     is_aiff = 0;
-    long    chunkSize = 0, subSize = 0;
-    IFF_AIFF aiff_info;
-
-    memset(&aiff_info, 0, sizeof(aiff_info));
-    chunkSize = Read32BitsHighLow(sf);
-
-    if (Read32BitsHighLow(sf) != IFF_ID_AIFF)
-        return 0;
-
-    while (chunkSize > 0) {
-        int     type = Read32BitsHighLow(sf);
-        chunkSize -= 4;
-
-        /* DEBUGF(
-           "found chunk type %08x '%4.4s'\n", type, (char*)&type); */
-
-        /* don't use a switch here to make it easier to use 'break' for SSND */
-        if (type == IFF_ID_COMM) {
-            subSize = Read32BitsHighLow(sf);
-            chunkSize -= subSize;
-
-            aiff_info.numChannels = Read16BitsHighLow(sf);
-            subSize -= 2;
-            aiff_info.numSampleFrames = Read32BitsHighLow(sf);
-            subSize -= 4;
-            aiff_info.sampleSize = Read16BitsHighLow(sf);
-            subSize -= 2;
-            aiff_info.sampleRate = ReadIeeeExtendedHighLow(sf);
-            subSize -= 10;
-
-            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
-                return 0;
-
-        }
-        else if (type == IFF_ID_SSND) {
-            subSize = Read32BitsHighLow(sf);
-            chunkSize -= subSize;
-
-            aiff_info.blkAlgn.offset = Read32BitsHighLow(sf);
-            subSize -= 4;
-            aiff_info.blkAlgn.blockSize = Read32BitsHighLow(sf);
-            subSize -= 4;
-
-            if (fskip(sf, (long) aiff_info.blkAlgn.offset, SEEK_CUR) != 0)
-                return 0;
-
-            aiff_info.sampleType = IFF_ID_SSND;
-            is_aiff = 1;
-
-            /* We've found the audio data. Read no further! */
-            break;
-
-        }
-        else {
-            subSize = Read32BitsHighLow(sf);
-            chunkSize -= subSize;
-
-            if (fskip(sf, (long) subSize, SEEK_CUR) != 0)
-                return 0;
-        }
-    }
-
-    /* DEBUGF("Parsed AIFF %d\n", is_aiff); */
-    if (is_aiff) {
-        /* make sure the header is sane */
-        if (0 != aiff_check2("name" /*???????????? */ , &aiff_info))
-            return 0;
-        if( -1 == lame_set_num_channels( gfp, aiff_info.numChannels ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     aiff_info.numChannels );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, aiff_info.sampleRate );
-        pcmbitwidth = aiff_info.sampleSize;
-        (void) lame_set_num_samples( gfp, aiff_info.numSampleFrames );
-    }
-    return is_aiff;
-}
-
-
-
-/************************************************************************
-*
-* parse_file_header
-*
-* PURPOSE: Read the header from a bytestream.  Try to determine whether
-*		   it's a WAV file or AIFF without rewinding, since rewind
-*		   doesn't work on pipes and there's a good chance we're reading
-*		   from stdin (otherwise we'd probably be using libsndfile).
-*
-* When this function returns, the file offset will be positioned at the
-* beginning of the sound data.
-*
-************************************************************************/
-
-void
-parse_file_header(lame_global_flags * gfp, FILE * sf)
-{
-
-    int     type = Read32BitsHighLow(sf);
-    /*
-       DEBUGF(
-       "First word of input stream: %08x '%4.4s'\n", type, (char*) &type); 
-     */
-    count_samples_carefully = 0;
-    input_format = sf_raw;
-
-    if (type == WAV_ID_RIFF) {
-        /* It's probably a WAV file */
-        if (parse_wave_header(gfp, sf)) {
-            input_format = sf_wave;
-            count_samples_carefully = 1;
-        } else {
-	    fprintf( stderr, "Warning: corrupt or unsupported WAVE format\n"); 
-        }
-    }
-    else if (type == IFF_ID_FORM) {
-        /* It's probably an AIFF file */
-        if (parse_aiff_header(gfp, sf)) {
-            input_format = sf_aiff;
-            count_samples_carefully = 1;
-        }
-    }
-    if (input_format == sf_raw) {
-        /*
-           ** Assume it's raw PCM.  Since the audio data is assumed to begin
-           ** at byte zero, this will unfortunately require seeking.
-         */
-        if (fseek(sf, 0L, SEEK_SET) != 0) {
-            /* ignore errors */
-        }
-        input_format = sf_raw;
-    }
-}
-
-
-
-void
-CloseSndFile(sound_file_format input, FILE * musicin)
-{
-    if (fclose(musicin) != 0) {
-        fprintf(stderr, "Could not close audio input file\n");
-        exit(2);
-    }
-}
-
-
-
-
-
-FILE   *
-OpenSndFile(lame_global_flags * gfp, char *inPath)
-{
-    FILE   *musicin;
-
-    /* set the defaults from info incase we cannot determine them from file */
-    lame_set_num_samples( gfp, MAX_U_32_NUM );
-
-
-    if (!strcmp(inPath, "-")) {
-        lame_set_stream_binary_mode(musicin = stdin); /* Read from standard input. */
-    }
-    else {
-        if ((musicin = fopen(inPath, "rb")) == NULL) {
-            fprintf(stderr, "Could not find \"%s\".\n", inPath);
-            exit(1);
-        }
-    }
-
-    if (input_format == sf_mp1 ||
-        input_format == sf_mp2 || input_format == sf_mp3) {
-#ifdef AMIGA_MPEGA
-        if (-1 == lame_decode_initfile(inPath, &mp3input_data)) {
-            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
-                    inPath);
-            exit(1);
-        }
-#endif
-#ifdef HAVE_MPGLIB
-        if (-1 == lame_decode_initfile(musicin, &mp3input_data)) {
-            fprintf(stderr, "Error reading headers in mp3 input file %s.\n",
-                    inPath);
-            exit(1);
-        }
-#endif
-        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     mp3input_data.stereo );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
-        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
-    }
-    else if (input_format == sf_ogg) {
-#ifdef HAVE_VORBIS
-        if ( -1 == lame_decode_ogg_initfile( gfp,
-                                             musicin,
-                                             &mp3input_data ) ) {
-            fprintf(stderr, "Error reading headers in ogg input file %s.\n",
-                    inPath);
-            exit(1);
-        }
-        if( -1 == lame_set_num_channels( gfp, mp3input_data.stereo ) ) {
-            fprintf( stderr,
-                     "Unsupported number of channels: %ud\n",
-                     mp3input_data.stereo );
-            exit( 1 );
-        }
-        (void) lame_set_in_samplerate( gfp, mp3input_data.samplerate );
-        (void) lame_set_num_samples( gfp, mp3input_data.nsamp );
-#else
-        fprintf(stderr, "mp3enc not compiled with libvorbis support.\n");
-        exit(1);
-#endif
-    }
-    else {
-        if (input_format != sf_raw) {
-            parse_file_header(gfp, musicin);
-        }
-
-        if (0 && input_format == sf_raw) {
-		fprintf(stderr, "Assuming raw pcm input file");
-		if (swapbytes)
-			fprintf(stderr, " : Forcing byte-swapping\n");
-		else
-			fprintf(stderr, "\n");
-	}
-    }
-
-
-    if (lame_get_num_samples( gfp ) == MAX_U_32_NUM && musicin != stdin) {
-        double  flen = lame_get_file_size(inPath); /* try to figure out num_samples */
-
-        if (flen >= 0) {
-
-            /* try file size, assume 2 bytes per sample */
-            if (input_format == sf_mp1 ||
-                input_format == sf_mp2 || input_format == sf_mp3) {
-                if (mp3input_data.bitrate > 0) {
-                    double  totalseconds =
-                        (flen * 8.0 / (1000.0 * mp3input_data.bitrate));
-                    unsigned long tmp_num_samples =
-                        totalseconds * lame_get_in_samplerate( gfp );
-
-                    (void) lame_set_num_samples( gfp, tmp_num_samples );
-                    mp3input_data.nsamp = tmp_num_samples;
-                }
-            }
-            else {
-                (void) lame_set_num_samples( gfp,
-                    flen / (2 * lame_get_num_channels( gfp )) );
-            }
-        }
-    }
-    return musicin;
-}
-#endif /* defined(LIBSNDFILE) */
-
-
-
-
-
-#if defined(HAVE_MPGLIB)
-static int
-check_aid(const unsigned char *header)
-{
-    return 0 == strncmp(header, "AiD\1", 4);
-}
-
-/*
- * Please check this and don't kill me if there's a bug
- * This is a (nearly?) complete header analysis for a MPEG-1/2/2.5 Layer I, II or III
- * data stream
- */
-
-static int
-is_syncword_mp123(const void *const headerptr)
-{
-    const unsigned char *const p = headerptr;
-    static const char abl2[16] =
-        { 0, 7, 7, 7, 0, 7, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8 };
-
-    if ((p[0] & 0xFF) != 0xFF)
-        return 0;       // first 8 bits must be '1'
-    if ((p[1] & 0xE0) != 0xE0)
-        return 0;       // next 3 bits are also
-    if ((p[1] & 0x18) == 0x08)
-        return 0;       // no MPEG-1, -2 or -2.5
-    if ((p[1] & 0x06) == 0x00)
-        return 0;       // no Layer I, II and III
-    if ((p[2] & 0xF0) == 0xF0)
-        return 0;       // bad bitrate
-    if ((p[2] & 0x0C) == 0x0C)
-        return 0;       // no sample frequency with (32,44.1,48)/(1,2,4)    
-    if ((p[1] & 0x06) == 0x04) // illegal Layer II bitrate/Channel Mode comb
-        if (abl2[p[2] >> 4] & (1 << (p[3] >> 6)))
-            return 0;
-    return 1;
-}
-
-static int
-is_syncword_mp3(const void *const headerptr)
-{
-    const unsigned char *const p = headerptr;
-
-    if ((p[0] & 0xFF) != 0xFF)
-        return 0;       // first 8 bits must be '1'
-    if ((p[1] & 0xE0) != 0xE0)
-        return 0;       // next 3 bits are also
-    if ((p[1] & 0x18) == 0x08)
-        return 0;       // no MPEG-1, -2 or -2.5
-    if ((p[1] & 0x06) != 0x02)
-        return 0;       // no Layer III (can be merged with 'next 3 bits are also' test, but don't do this, this decreases readability)
-    if ((p[2] & 0xF0) == 0xF0)
-        return 0;       // bad bitrate
-    if ((p[2] & 0x0C) == 0x0C)
-        return 0;       // no sample frequency with (32,44.1,48)/(1,2,4)    
-    return 1;
-}
-
-
-int
-lame_decode_initfile(FILE * fd, mp3data_struct * mp3data)
-{
-    //  VBRTAGDATA pTagData;
-    // int xing_header,len2,num_frames;
-    unsigned char buf[100];
-    int     ret;
-    int     len, aid_header;
-    short int pcm_l[1152], pcm_r[1152];
-
-    memset(mp3data, 0, sizeof(mp3data_struct));
-    lame_decode_init();
-
-    len = 4;
-    if (fread(&buf, 1, len, fd) != len)
-        return -1;      /* failed */
-    aid_header = check_aid(buf);
-    if (aid_header) {
-        if (fread(&buf, 1, 2, fd) != 2)
-            return -1;  /* failed */
-        aid_header = (unsigned char) buf[0] + 256 * (unsigned char) buf[1];
-        fprintf(stderr, "Album ID found.  length=%i \n", aid_header);
-        /* skip rest of AID, except for 6 bytes we have already read */
-        fskip(fd, aid_header - 6, SEEK_CUR);
-
-        /* read 4 more bytes to set up buffer for MP3 header check */
-        len = fread(&buf, 1, 4, fd);
-    }
-
-
-    /* look for valid 4 byte MPEG header  */
-    if (len < 4)
-        return -1;
-    while (!is_syncword_mp123(buf)) {
-        int     i;
-        for (i = 0; i < len - 1; i++)
-            buf[i] = buf[i + 1];
-        if (fread(buf + len - 1, 1, 1, fd) != 1)
-            return -1;  /* failed */
-    }
-
-
-#if 0
-    /* buffer 48 bytes so we can check for Xing header */
-    len2 = fread(&buf[len], 1, 48 - len, fd);
-    if (len2 != 48 - len)
-        return -1;
-    len = 48;
-
-    /* check first 48 bytes for Xing header */
-    xing_header = GetVbrTag(&pTagData, (unsigned char *) buf);
-
-    if (xing_header && pTagData.headersize >= 48) {
-        num_frames = pTagData.frames;
-        fprintf(stderr,
-                "\rXing VBR header dectected.  MP3 file has %i frames\n",
-                num_frames);
-
-        // skip the rest of the Xing header.  LAME decoder ignores TOC data    
-        fskip(fd, pTagData.headersize - 48, SEEK_CUR);
-        // buffer a few more bytes for next header check:  
-        len = fread(buf, 1, 4, fd);
-
-    }
-    else {
-        /* we have read 48 bytes, but did not find a Xing header */
-        /* lets try and rewind the stream:  */
-        if (fseek(fd, -44, SEEK_CUR) != 0) {
-            /* backwards fseek failed.  input is probably a pipe */
-            /* keep 'len' unchanged */
-        }
-        else {
-            len -= 44;
-        }
-    }
-#endif
-
-    // now parse the current buffer looking for MP3 headers 
-    // we dont want to feed too much data to lame_decode1_headers -  
-    // we dont want it to actually decode the first frame
-    // (as of 11/00: mpglib modified so that for the first frame where 
-    // headers are parsed, no data will be decoded.  So the above is
-    // now a moot point.
-    ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
-    if (-1 == ret)
-        return -1;
-
-    /* repeat until we decode a valid mp3 header */
-    while (!mp3data->header_parsed) {
-        len = fread(buf, 1, sizeof(buf), fd);
-        if (len != sizeof(buf))
-            return -1;
-        ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
-        if (-1 == ret)
-            return -1;
-    }
-
-
-#if 1
-    if (mp3data->totalframes > 0) {
-        /* mpglib found a Xing VBR header and computed nsamp & totalframes */
-    }
-    else {
-        mp3data->nsamp = MAX_U_32_NUM;
-    }
-#else
-    mp3data->nsamp = MAX_U_32_NUM;
-    if (xing_header && num_frames) {
-        mp3data->nsamp = mp3data->framesize * num_frames;
-    }
-#endif
-
-
-    /*
-       fprintf(stderr,"ret = %i NEED_MORE=%i \n",ret,MP3_NEED_MORE);
-       fprintf(stderr,"stereo = %i \n",mp.fr.stereo);
-       fprintf(stderr,"samp = %i  \n",freqs[mp.fr.sampling_frequency]);
-       fprintf(stderr,"framesize = %i  \n",framesize);
-       fprintf(stderr,"bitrate = %i  \n",mp3data->bitrate);
-       fprintf(stderr,"num frames = %ui  \n",num_frames);
-       fprintf(stderr,"num samp = %ui  \n",mp3data->nsamp);
-       fprintf(stderr,"mode     = %i  \n",mp.fr.mode);
-     */
-
-    return 0;
-}
-
-/*
-For lame_decode_fromfile:  return code
-  -1     error
-   0     ok, but need more data before outputing any samples
-   n     number of samples output.  either 576 or 1152 depending on MP3 file.
-*/
-int
-lame_decode_fromfile(FILE * fd, short pcm_l[], short pcm_r[],
-                     mp3data_struct * mp3data)
-{
-    int     ret = 0, len;
-    unsigned char buf[100];
-    /* read until we get a valid output frame */
-    while (0 == ret) {
-        len = fread(buf, 1, 100, fd);
-        if (len != 100)
-            return -1;
-        ret = lame_decode1_headers(buf, len, pcm_l, pcm_r, mp3data);
-        if (ret == -1)
-            return -1;
-    }
-    return ret;
-}
-#endif /* defined(HAVE_MPGLIB) */
-
-/* end of get_audio.c */
--- a/sys/src/games/mp3enc/get_audio.h
+++ /dev/null
@@ -1,100 +1,0 @@
-/*
- *	Get Audio routines include file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef LAME_GET_AUDIO_H
-#define LAME_GET_AUDIO_H
-
-typedef enum sound_file_format_e {
-  sf_unknown, 
-  sf_raw, 
-  sf_wave, 
-  sf_aiff, 
-  sf_mp1,  /* MPEG Layer 1, aka mpg */
-  sf_mp2,  /* MPEG Layer 2 */
-  sf_mp3,  /* MPEG Layer 3 */
-  sf_ogg 
-} sound_file_format;
-
-
-
-FILE*  init_outfile ( char *outPath, int decode );
-void init_infile(lame_global_flags *, char *inPath);
-void close_infile(void);
-int get_audio(lame_global_flags *gfp,short buffer[2][1152]);
-
-
-
-/* the simple lame decoder */
-/* After calling lame_init(), lame_init_params() and
- * init_infile(), call this routine to read the input MP3 file 
- * and output .wav data to the specified file pointer
- * lame_decoder will ignore the first 528 samples, since these samples
- * represent the mpglib decoding delay (and are all 0).  
- *skip = number of additional
- * samples to skip, to (for example) compensate for the encoder delay,
- * only used when decoding mp3 
-*/
-int lame_decoder(lame_global_flags *gfp,FILE *outf,int skip, char *inPath, char *outPath);
-
-
-
-void SwapBytesInWords( short *loc, int words );
-
-
-
-#ifdef LIBSNDFILE
-
-#include "sndfile.h"
-
-
-#else
-/*****************************************************************
- * LAME/ISO built in audio file I/O routines 
- *******************************************************************/
-#include "portableio.h"
-
-
-typedef struct  blockAlign_struct {
-    unsigned long   offset;
-    unsigned long   blockSize;
-} blockAlign;
-
-typedef struct  IFF_AIFF_struct {
-    short           numChannels;
-    unsigned long   numSampleFrames;
-    short           sampleSize;
-    double          sampleRate;
-    unsigned long   sampleType;
-    blockAlign      blkAlgn;
-} IFF_AIFF;
-
-extern int            aiff_read_headers(FILE*, IFF_AIFF*);
-extern int            aiff_seek_to_sound_data(FILE*);
-extern int            aiff_write_headers(FILE*, IFF_AIFF*);
-extern int parse_wavheader(void);
-extern int parse_aiff(const char fn[]);
-extern void   aiff_check(const char*, IFF_AIFF*, int*);
-
-
-
-#endif	/* ifdef LIBSNDFILE */
-#endif	/* ifndef LAME_GET_AUDIO_H */
--- a/sys/src/games/mp3enc/id3tag.c
+++ /dev/null
@@ -1,539 +1,0 @@
-/*
- * id3tag.c -- Write ID3 version 1 and 2 tags.
- *
- * Copyright (C) 2000 Don Melton.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/*
- * HISTORY: This source file is part of LAME (see http://www.mp3dev.org/mp3/)
- * and was originally adapted by Conrad Sanderson <[email protected]>
- * from mp3info by Ricardo Cerqueira <[email protected]> to write only ID3 version 1
- * tags.  Don Melton <[email protected]> COMPLETELY rewrote it to support version
- * 2 tags and be more conformant to other standards while remaining flexible.
- *
- * NOTE: See http://id3.org/ for more information about ID3 tag formats.
- */
-
-/* $Id: id3tag.c,v 1.18 2001/01/15 15:16:09 aleidinger Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef STDC_HEADERS
-# include <stddef.h>
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef HAVE_STRCHR
-#  define strchr index
-#  define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-#  define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#include "lame.h"
-#include "id3tag.h"
-#include "util.h"
-#include "bitstream.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-static const char *const genre_names[] =
-{
-    /*
-     * NOTE: The spelling of these genre names is identical to those found in
-     * Winamp and mp3info.
-     */
-    "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
-    "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
-    "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
-    "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
-    "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental",
-    "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "Alt. Rock",
-    "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop",
-    "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
-    "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy",
-    "Cult", "Gangsta Rap", "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
-    "Native American", "Cabaret", "New Wave", "Psychedelic", "Rave",
-    "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz",
-    "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk",
-    "Folk/Rock", "National Folk", "Swing", "Fast-Fusion", "Bebob", "Latin",
-    "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock",
-    "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
-    "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech",
-    "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass",
-    "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
-    "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
-    "Punk Rock", "Drum Solo", "A Cappella", "Euro-House", "Dance Hall",
-    "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie",
-    "BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta Rap",
-    "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian",
-    "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
-    "Synthpop"
-};
-
-#define GENRE_NAME_COUNT \
-    ((int)(sizeof genre_names / sizeof (const char *const)))
-
-static const int genre_alpha_map [] = {
-    123, 34, 74, 73, 99, 20, 40, 26, 145, 90, 116, 41, 135, 85, 96, 138, 89, 0,
-    107, 132, 65, 88, 104, 102, 97, 136, 61, 141, 32, 1, 112, 128, 57, 140, 2,
-    139, 58, 3, 125, 50, 22, 4, 55, 127, 122, 120, 98, 52, 48, 54, 124, 25, 84,
-    80, 115, 81, 119, 5, 30, 36, 59, 126, 38, 49, 91, 6, 129, 79, 137, 7, 35,
-    100, 131, 19, 33, 46, 47, 8, 29, 146, 63, 86, 71, 45, 142, 9, 77, 82, 64,
-    133, 10, 66, 39, 11, 103, 12, 75, 134, 13, 53, 62, 109, 117, 23, 108, 92,
-    67, 93, 43, 121, 15, 68, 14, 16, 76, 87, 118, 17, 78, 143, 114, 110, 69, 21,
-    111, 95, 105, 42, 37, 24, 56, 44, 101, 83, 94, 106, 147, 113, 18, 51, 130,
-    144, 60, 70, 31, 72, 27, 28
-};
-
-#define GENRE_ALPHA_COUNT ((int)(sizeof genre_alpha_map / sizeof (int)))
-
-void
-id3tag_genre_list(void (*handler)(int, const char *, void *), void *cookie)
-{
-    if (handler) {
-        int i;
-        for (i = 0; i < GENRE_NAME_COUNT; ++i) {
-            if (i < GENRE_ALPHA_COUNT) {
-                int j = genre_alpha_map[i];
-                handler(j, genre_names[j], cookie);
-            }
-        }
-    }
-}
-
-#define GENRE_NUM_UNKNOWN 255
-
-void
-id3tag_init(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    memset(&gfc->tag_spec, 0, sizeof gfc->tag_spec);
-    gfc->tag_spec.genre = GENRE_NUM_UNKNOWN;
-}
-
-#define CHANGED_FLAG    (1U << 0)
-#define ADD_V2_FLAG     (1U << 1)
-#define V1_ONLY_FLAG    (1U << 2)
-#define V2_ONLY_FLAG    (1U << 3)
-#define SPACE_V1_FLAG   (1U << 4)
-#define PAD_V2_FLAG     (1U << 5)
-
-void
-id3tag_add_v2(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
-    gfc->tag_spec.flags |= ADD_V2_FLAG;
-}
-
-void
-id3tag_v1_only(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    gfc->tag_spec.flags &= ~(ADD_V2_FLAG | V2_ONLY_FLAG);
-    gfc->tag_spec.flags |= V1_ONLY_FLAG;
-}
-
-void
-id3tag_v2_only(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
-    gfc->tag_spec.flags |= V2_ONLY_FLAG;
-}
-
-void
-id3tag_space_v1(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    gfc->tag_spec.flags &= ~V2_ONLY_FLAG;
-    gfc->tag_spec.flags |= SPACE_V1_FLAG;
-}
-
-void
-id3tag_pad_v2(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    gfc->tag_spec.flags &= ~V1_ONLY_FLAG;
-    gfc->tag_spec.flags |= PAD_V2_FLAG;
-}
-
-void
-id3tag_set_title(lame_global_flags *gfp, const char *title)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (title && *title) {
-        gfc->tag_spec.title = title;
-        gfc->tag_spec.flags |= CHANGED_FLAG;
-    }
-}
-
-void
-id3tag_set_artist(lame_global_flags *gfp, const char *artist)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (artist && *artist) {
-        gfc->tag_spec.artist = artist;
-        gfc->tag_spec.flags |= CHANGED_FLAG;
-    }
-}
-
-void
-id3tag_set_album(lame_global_flags *gfp, const char *album)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (album && *album) {
-        gfc->tag_spec.album = album;
-        gfc->tag_spec.flags |= CHANGED_FLAG;
-    }
-}
-
-void
-id3tag_set_year(lame_global_flags *gfp, const char *year)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (year && *year) {
-        int num = atoi(year);
-        if (num < 0) {
-            num = 0;
-        }
-        /* limit a year to 4 digits so it fits in a version 1 tag */
-        if (num > 9999) {
-            num = 9999;
-        }
-        if (num) {
-            gfc->tag_spec.year = num;
-            gfc->tag_spec.flags |= CHANGED_FLAG;
-        }
-    }
-}
-
-void
-id3tag_set_comment(lame_global_flags *gfp, const char *comment)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (comment && *comment) {
-        gfc->tag_spec.comment = comment;
-        gfc->tag_spec.flags |= CHANGED_FLAG;
-    }
-}
-
-void
-id3tag_set_track(lame_global_flags *gfp, const char *track)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (track && *track) {
-        int num = atoi(track);
-        if (num < 0) {
-            num = 0;
-        }
-        /* limit a track to 255 so it fits in a version 1 tag even though CD
-         * audio doesn't allow more than 99 tracks */
-        if (num > 255) {
-            num = 255;
-        }
-        if (num) {
-            gfc->tag_spec.track = num;
-            gfc->tag_spec.flags |= CHANGED_FLAG;
-        }
-    }
-}
-
-/* would use real "strcasecmp" but it isn't portable */
-static int
-local_strcasecmp(const char *s1, const char *s2)
-{
-    unsigned char c1;
-    unsigned char c2;
-    do {
-        c1 = tolower(*s1);
-        c2 = tolower(*s2);
-        if (!c1) {
-            break;
-        }
-        ++s1;
-        ++s2;
-    } while (c1 == c2);
-    return c1 - c2;
-}
-
-int
-id3tag_set_genre(lame_global_flags *gfp, const char *genre)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if (genre && *genre) {
-        char *str;
-        int num = strtol(genre, &str, 10);
-        /* is the input a string or a valid number? */
-        if (*str) {
-            int i;
-            for (i = 0; i < GENRE_NAME_COUNT; ++i) {
-                if (!local_strcasecmp(genre, genre_names[i])) {
-                    num = i;
-                    break;
-                }
-            }
-            if (i == GENRE_NAME_COUNT) {
-                return -1;
-            }
-        } else if ((num < 0) || (num >= GENRE_NAME_COUNT)) {
-            return -1;
-        }
-        gfc->tag_spec.genre = num;
-        gfc->tag_spec.flags |= CHANGED_FLAG;
-    }
-    return 0;
-}
-
-static unsigned char *
-set_4_byte_value(unsigned char *bytes, unsigned long value)
-{
-    int index;
-    for (index = 3; index >= 0; --index) {
-        bytes[index] = value & 0xfful;
-        value >>= 8;
-    }
-    return bytes + 4;
-}
-
-#define FRAME_ID(a, b, c, d) \
-    ( ((unsigned long)(a) << 24) \
-    | ((unsigned long)(b) << 16) \
-    | ((unsigned long)(c) <<  8) \
-    | ((unsigned long)(d) <<  0) )
-#define TITLE_FRAME_ID FRAME_ID('T', 'I', 'T', '2')
-#define ARTIST_FRAME_ID FRAME_ID('T', 'P', 'E', '1')
-#define ALBUM_FRAME_ID FRAME_ID('T', 'A', 'L', 'B')
-#define YEAR_FRAME_ID FRAME_ID('T', 'Y', 'E', 'R')
-#define COMMENT_FRAME_ID FRAME_ID('C', 'O', 'M', 'M')
-#define TRACK_FRAME_ID FRAME_ID('T', 'R', 'C', 'K')
-#define GENRE_FRAME_ID FRAME_ID('T', 'C', 'O', 'N')
-
-static unsigned char *
-set_frame(unsigned char *frame, unsigned long id, const char *text,
-    size_t length)
-{
-    if (length) {
-        frame = set_4_byte_value(frame, id);
-        /* Set frame size = total size - header size.  Frame header and field
-         * bytes include 2-byte header flags, 1 encoding descriptor byte, and
-         * for comment frames: 3-byte language descriptor and 1 content
-         * descriptor byte */
-        frame = set_4_byte_value(frame, ((id == COMMENT_FRAME_ID) ? 5 : 1)
-                + length);
-        /* clear 2-byte header flags */
-        *frame++ = 0;
-        *frame++ = 0;
-        /* clear 1 encoding descriptor byte to indicate ISO-8859-1 format */
-        *frame++ = 0;
-        if (id == COMMENT_FRAME_ID) {
-            /* use id3lib-compatible bogus language descriptor */
-            *frame++ = 'X';
-            *frame++ = 'X';
-            *frame++ = 'X';
-            /* clear 1 byte to make content descriptor empty string */
-            *frame++ = 0;
-        }
-        while (length--) {
-            *frame++ = *text++;
-        }
-    }
-    return frame;
-}
-
-int
-id3tag_write_v2(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if ((gfc->tag_spec.flags & CHANGED_FLAG)
-            && !(gfc->tag_spec.flags & V1_ONLY_FLAG)) {
-        /* calculate length of four fields which may not fit in verion 1 tag */
-        size_t title_length = gfc->tag_spec.title
-            ? strlen(gfc->tag_spec.title) : 0;
-        size_t artist_length = gfc->tag_spec.artist
-            ? strlen(gfc->tag_spec.artist) : 0;
-        size_t album_length = gfc->tag_spec.album
-            ? strlen(gfc->tag_spec.album) : 0;
-        size_t comment_length = gfc->tag_spec.comment
-            ? strlen(gfc->tag_spec.comment) : 0;
-        /* write tag if explicitly requested or if fields overflow */
-        if ((gfc->tag_spec.flags & (ADD_V2_FLAG | V2_ONLY_FLAG))
-                || (title_length > 30)
-                || (artist_length > 30) || (album_length > 30)
-                || (comment_length > 30)
-                || (gfc->tag_spec.track && (comment_length > 28))) {
-            size_t tag_size;
-            char year[5];
-            size_t year_length;
-            char track[3];
-            size_t track_length;
-            char genre[6];
-            size_t genre_length;
-            unsigned char *tag;
-            unsigned char *p;
-            size_t adjusted_tag_size;
-            unsigned int index;
-            /* calulate size of tag starting with 10-byte tag header */
-            tag_size = 10;
-            if (title_length) {
-                /* add 10-byte frame header, 1 encoding descriptor byte ... */
-                tag_size += 11 + title_length;
-            }
-            if (artist_length) {
-                tag_size += 11 + artist_length;
-            }
-            if (album_length) {
-                tag_size += 11 + album_length;
-            }
-            if (gfc->tag_spec.year) {
-                year_length = sprintf(year, "%d", gfc->tag_spec.year);
-                tag_size += 11 + year_length;
-            } else {
-                year_length = 0;
-            }
-            if (comment_length) {
-                /* add 10-byte frame header, 1 encoding descriptor byte,
-                 * 3-byte language descriptor, 1 content descriptor byte ... */
-                tag_size += 15 + comment_length;
-            }
-            if (gfc->tag_spec.track) {
-                track_length = sprintf(track, "%d", gfc->tag_spec.track);
-                tag_size += 11 + track_length;
-            } else {
-                track_length = 0;
-            }
-            if (gfc->tag_spec.genre != GENRE_NUM_UNKNOWN) {
-                genre_length = sprintf(genre, "(%d)", gfc->tag_spec.genre);
-                tag_size += 11 + genre_length;
-            } else {
-                genre_length = 0;
-            }
-            if (gfc->tag_spec.flags & PAD_V2_FLAG) {
-                /* add 128 bytes of padding */
-                tag_size += 128;
-            }
-            tag = (unsigned char *)malloc(tag_size);
-            if (!tag) {
-                return -1;
-            }
-            p = tag;
-            /* set tag header starting with file identifier */
-            *p++ = 'I'; *p++ = 'D'; *p++ = '3';
-            /* set version number word */
-            *p++ = 3; *p++ = 0;
-            /* clear flags byte */
-            *p++ = 0;
-            /* calculate and set tag size = total size - header size */
-            adjusted_tag_size = tag_size - 10;
-            /* encode adjusted size into four bytes where most significant 
-             * bit is clear in each byte, for 28-bit total */
-            *p++ = (adjusted_tag_size >> 21) & 0x7fu;
-            *p++ = (adjusted_tag_size >> 14) & 0x7fu;
-            *p++ = (adjusted_tag_size >> 7) & 0x7fu;
-            *p++ = adjusted_tag_size & 0x7fu;
-
-            /*
-             * NOTE: The remainder of the tag (frames and padding, if any)
-             * are not "unsynchronized" to prevent false MPEG audio headers
-             * from appearing in the bitstream.  Why?  Well, most players
-             * and utilities know how to skip the ID3 version 2 tag by now
-             * even if they don't read its contents, and it's actually
-             * very unlikely that such a false "sync" pattern would occur
-             * in just the simple text frames added here.
-             */
-
-            /* set each frame in tag */
-            p = set_frame(p, TITLE_FRAME_ID, gfc->tag_spec.title, title_length);
-            p = set_frame(p, ARTIST_FRAME_ID, gfc->tag_spec.artist,
-                    artist_length);
-            p = set_frame(p, ALBUM_FRAME_ID, gfc->tag_spec.album, album_length);
-            p = set_frame(p, YEAR_FRAME_ID, year, year_length);
-            p = set_frame(p, COMMENT_FRAME_ID, gfc->tag_spec.comment,
-                    comment_length);
-            p = set_frame(p, TRACK_FRAME_ID, track, track_length);
-            p = set_frame(p, GENRE_FRAME_ID, genre, genre_length);
-            /* clear any padding bytes */
-            memset(p, 0, tag_size - (p - tag));
-            /* write tag directly into bitstream at current position */
-            for (index = 0; index < tag_size; ++index) {
-                add_dummy_byte(gfp, tag[index]);
-            }
-            free(tag);
-            return tag_size;
-        }
-    }
-    return 0;
-}
-
-static unsigned char *
-set_text_field(unsigned char *field, const char *text, size_t size, int pad)
-{
-    while (size--) {
-        if (text && *text) {
-            *field++ = *text++;
-        } else {
-            *field++ = pad;
-        }
-    }
-    return field;
-}
-
-int
-id3tag_write_v1(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    if ((gfc->tag_spec.flags & CHANGED_FLAG)
-            && !(gfc->tag_spec.flags & V2_ONLY_FLAG)) {
-        unsigned char tag[128];
-        unsigned char *p = tag;
-        int pad = (gfc->tag_spec.flags & SPACE_V1_FLAG) ? ' ' : 0;
-        char year[5];
-        unsigned int index;
-        /* set tag identifier */
-        *p++ = 'T'; *p++ = 'A'; *p++ = 'G';
-        /* set each field in tag */
-        p = set_text_field(p, gfc->tag_spec.title, 30, pad);
-        p = set_text_field(p, gfc->tag_spec.artist, 30, pad);
-        p = set_text_field(p, gfc->tag_spec.album, 30, pad);
-        sprintf(year, "%d", gfc->tag_spec.year);
-        p = set_text_field(p, gfc->tag_spec.year ? year : NULL, 4, pad);
-        /* limit comment field to 28 bytes if a track is specified */
-        p = set_text_field(p, gfc->tag_spec.comment, gfc->tag_spec.track
-                ? 28 : 30, pad);
-        if (gfc->tag_spec.track) {
-            /* clear the next byte to indicate a version 1.1 tag */
-            *p++ = 0;
-            *p++ = gfc->tag_spec.track;
-        }
-        *p++ = gfc->tag_spec.genre;
-        /* write tag directly into bitstream at current position */
-        for (index = 0; index < 128; ++index) {
-            add_dummy_byte(gfp, tag[index]);
-        }
-        return 128;
-    }
-    return 0;
-}
--- a/sys/src/games/mp3enc/id3tag.h
+++ /dev/null
@@ -1,30 +1,0 @@
-
-#ifndef LAME_ID3_H
-#define LAME_ID3_H
-
-#include "lame.h"
-
-struct id3tag_spec
-{
-    /* private data members */
-    int flags;
-    const char *title;
-    const char *artist;
-    const char *album;
-    int year;
-    const char *comment;
-    int track;
-    int genre;
-};
-
-
-/* write tag into stream at current position */
-extern int id3tag_write_v2(lame_global_flags *gfp);
-extern int id3tag_write_v1(lame_global_flags *gfp);
-/*
- * NOTE: A version 2 tag will NOT be added unless one of the text fields won't
- * fit in a version 1 tag (e.g. the title string is longer than 30 characters),
- * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used.
- */
-
-#endif
--- a/sys/src/games/mp3enc/l3side.h
+++ /dev/null
@@ -1,100 +1,0 @@
-/*
- *	Layer 3 side include file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_L3SIDE_H
-#define LAME_L3SIDE_H
-
-#include "encoder.h"
-#include "machine.h"
-
-/* Layer III side information. */
-
-typedef FLOAT8	D576[576];
-typedef int	I576[576];
-typedef FLOAT8	D192_3[192][3];
-typedef int	I192_3[192][3];
-
-
-typedef struct 
-{
-   int l[1+SBMAX_l];
-   int s[1+SBMAX_s];
-} scalefac_struct;
-
-
-typedef struct {
-	FLOAT8	l[SBMAX_l];
-	FLOAT8	s[SBMAX_s][3];
-} III_psy_xmin;
-
-typedef struct {
-    III_psy_xmin thm;
-    III_psy_xmin en;
-} III_psy_ratio;
-
-typedef struct {
-	int part2_3_length;
-	int big_values;
-	int count1;
- 	int global_gain;
-	int scalefac_compress;
-	int window_switching_flag;
-	int block_type;
-	int mixed_block_flag;
-	int table_select[3];
-	 int subblock_gain[3];
-	 int region0_count;
-	 int region1_count;
-	 int preflag;
-	 int scalefac_scale;
-	 int count1table_select;
-
-	 int part2_length;
-	 int sfb_lmax;
-	 int sfb_smin;
-	 int count1bits;
-	/* added for LSF */
-	 const int *sfb_partition_table;
-	 int slen[4];
-} gr_info;
-
-typedef struct {
-	int main_data_begin; 
-	int private_bits;
-	int resvDrain_pre;
-	int resvDrain_post;
-	int scfsi[2][4];
-	struct {
-		struct gr_info_ss {
-			gr_info tt;
-			} ch[2];
-		} gr[2];
-	} III_side_info_t;
-
-/* Layer III scale factors. */
-/* note: there are only SBPSY_l=(SBMAX_l-1) and SBPSY_s=(SBMAX_s-1) scalefactors.
- * Dont know why these would be dimensioned SBMAX_l and SBMAX-s */
-typedef struct {
-	int l[SBMAX_l];            /* [cb] */
-	int s[SBMAX_s][3];         /* [window][cb] */
-} III_scalefac_t;  /* [gr][ch] */
-
-#endif
--- a/sys/src/games/mp3enc/lame-analysis.h
+++ /dev/null
@@ -1,90 +1,0 @@
-/*
- *	GTK plotting routines source file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_GTKANAL_H
-#define LAME_GTKANAL_H
-
-#include "encoder.h"
-
-#define READ_AHEAD 10             /* number of frames to read ahead */
-#define MAXMPGLAG READ_AHEAD      /* if the mpg123 lag becomes bigger than this 				     we have to stop */
-#define NUMBACK 6                 /* number of frames we can back up */
-#define NUMPINFO (NUMBACK+READ_AHEAD+1)
-
-
-
-typedef struct {
-  int frameNum;           /* current frame number */
-  int frameNum123;
-  int num_samples;        /* number of pcm samples read for this frame */
-  double frametime;       /* starting time of frame, in seconds */
-  double pcmdata[2][1600];
-  double pcmdata2[2][1152+1152-DECDELAY];
-  double xr[2][2][576];
-  double mpg123xr[2][2][576];
-  double ms_ratio[2];
-  double ms_ener_ratio[2];
-
-  /* L,R, M and S values */
-  double energy[2][4][BLKSIZE];
-  double pe[2][4];
-  double thr[2][4][SBMAX_l];
-  double en[2][4][SBMAX_l];
-  double thr_s[2][4][3*SBMAX_s];
-  double en_s[2][4][3*SBMAX_s];
-  double ers[2][4];
-
-  double sfb[2][2][SBMAX_l];
-  double sfb_s[2][2][3*SBMAX_s];
-  double LAMEsfb[2][2][SBMAX_l];
-  double LAMEsfb_s[2][2][3*SBMAX_s];
-
-  int LAMEqss[2][2];
-  int qss[2][2];
-  int big_values[2][2];
-  int sub_gain[2][2][3];
-
-  double xfsf[2][2][SBMAX_l];
-  double xfsf_s[2][2][3*SBMAX_s];
-
-  int over[2][2];
-  double tot_noise[2][2];
-  double max_noise[2][2];
-  double over_noise[2][2];
-  int blocktype[2][2];
-  int scalefac_scale[2][2];
-  int preflag[2][2];
-  int mpg123blocktype[2][2];
-  int mixed[2][2];
-  int mainbits[2][2];
-  int sfbits[2][2];
-  int LAMEmainbits[2][2];
-  int LAMEsfbits[2][2];
-  int framesize,stereo,js,ms_stereo,i_stereo,emph,bitrate,sampfreq,maindata;
-  int crc,padding;
-  int scfsi[2],mean_bits,resvsize;
-  int totbits;
-} plotting_data;
- 
-
-extern plotting_data *pinfo;
-
-#endif
--- a/sys/src/games/mp3enc/lame.c
+++ /dev/null
@@ -1,1852 +1,0 @@
-/* -*- mode: C; mode: fold -*- */
-/*
- *	LAME MP3 encoding engine
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: lame.c,v 1.100 2001/03/25 23:14:45 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
-#include <assert.h>
-#include "lame-analysis.h"
-#include "lame.h"
-#include "util.h"
-#include "bitstream.h"
-#include "version.h"
-#include "tables.h"
-#include "quantize_pvt.h"
-#include "VbrTag.h"
-
-#if defined(__FreeBSD__) && !defined(__alpha__)
-#include <floatingpoint.h>
-#endif
-#ifdef __riscos__
-#include "asmstuff.h"
-#endif
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-static void
-lame_init_params_ppflt_lowpass(FLOAT8 amp_lowpass[32], FLOAT lowpass1,
-                               FLOAT lowpass2, int *lowpass_band,
-                               int *minband, int *maxband)
-{
-    int     band;
-    FLOAT8  freq;
-
-    for (band = 0; band <= 31; band++) {
-        freq = band / 31.0;
-        amp_lowpass[band] = 1;
-        /* this band and above will be zeroed: */
-        if (freq >= lowpass2) {
-            *lowpass_band = Min(*lowpass_band, band);
-            amp_lowpass[band] = 0;
-        }
-        if (lowpass1 < freq && freq < lowpass2) {
-            *minband = Min(*minband, band);
-            *maxband = Max(*maxband, band);
-            amp_lowpass[band] = cos((PI / 2) *
-                                    (lowpass1 - freq) / (lowpass2 - lowpass1));
-        }
-        /*
-         * DEBUGF("lowpass band=%i  amp=%f \n",
-         *      band, gfc->amp_lowpass[band]);
-         */
-    }
-}
-
-/* lame_init_params_ppflt */
-
-/*}}}*/
-/* static void   lame_init_params_ppflt         (lame_internal_flags *gfc)                                                                                        *//*{{{ */
-
-static void
-lame_init_params_ppflt(lame_global_flags * gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-  /**/
-    /* compute info needed for polyphase filter (filter type==0, default) */
-  /**/
-
-    int     band, maxband, minband;
-    FLOAT8  freq;
-
-    if (gfc->lowpass1 > 0) {
-        minband = 999;
-        maxband = -1;
-        lame_init_params_ppflt_lowpass(gfc->amp_lowpass,
-                                       gfc->lowpass1, gfc->lowpass2,
-                                       &gfc->lowpass_band, &minband, &maxband);
-        /* compute the *actual* transition band implemented by
-         * the polyphase filter */
-        if (minband == 999) {
-            gfc->lowpass1 = (gfc->lowpass_band - .75) / 31.0;
-        }
-        else {
-            gfc->lowpass1 = (minband - .75) / 31.0;
-        }
-        gfc->lowpass2 = gfc->lowpass_band / 31.0;
-
-        gfc->lowpass_start_band = minband;
-        gfc->lowpass_end_band = maxband;
-
-        /* as the lowpass may have changed above
-         * calculate the amplification here again
-         */
-        for (band = minband; band <= maxband; band++) {
-            freq = band / 31.0;
-            gfc->amp_lowpass[band] =
-                cos((PI / 2) * (gfc->lowpass1 - freq) /
-                    (gfc->lowpass2 - gfc->lowpass1));
-        }
-    }
-    else {
-        gfc->lowpass_start_band = 0;
-        gfc->lowpass_end_band = -1; /* do not to run into for-loops */
-    }
-
-    /* make sure highpass filter is within 90% of what the effective
-     * highpass frequency will be */
-    if (gfc->highpass2 > 0) {
-        if (gfc->highpass2 < .9 * (.75 / 31.0)) {
-            gfc->highpass1 = 0;
-            gfc->highpass2 = 0;
-            MSGF(gfc, "Warning: highpass filter disabled.  "
-                 "highpass frequency too small\n");
-        }
-    }
-
-    if (gfc->highpass2 > 0) {
-        minband = 999;
-        maxband = -1;
-        for (band = 0; band <= 31; band++) {
-            freq = band / 31.0;
-            gfc->amp_highpass[band] = 1;
-            /* this band and below will be zereod */
-            if (freq <= gfc->highpass1) {
-                gfc->highpass_band = Max(gfc->highpass_band, band);
-                gfc->amp_highpass[band] = 0;
-            }
-            if (gfc->highpass1 < freq && freq < gfc->highpass2) {
-                minband = Min(minband, band);
-                maxband = Max(maxband, band);
-                gfc->amp_highpass[band] =
-                    cos((PI / 2) *
-                        (gfc->highpass2 - freq) /
-                        (gfc->highpass2 - gfc->highpass1));
-            }
-            /*
-               DEBUGF("highpass band=%i  amp=%f \n",
-               band, gfc->amp_highpass[band]);
-             */
-        }
-        /* compute the *actual* transition band implemented by
-         * the polyphase filter */
-        gfc->highpass1 = gfc->highpass_band / 31.0;
-        if (maxband == -1) {
-            gfc->highpass2 = (gfc->highpass_band + .75) / 31.0;
-        }
-        else {
-            gfc->highpass2 = (maxband + .75) / 31.0;
-        }
-
-        gfc->highpass_start_band = minband;
-        gfc->highpass_end_band = maxband;
-
-        /* as the highpass may have changed above
-         * calculate the amplification here again
-         */
-        for (band = minband; band <= maxband; band++) {
-            freq = band / 31.0;
-            gfc->amp_highpass[band] =
-                cos((PI / 2) * (gfc->highpass2 - freq) /
-                    (gfc->highpass2 - gfc->highpass1));
-        }
-    }
-    else {
-        gfc->highpass_start_band = 0;
-        gfc->highpass_end_band = -1; /* do not to run into for-loops */
-    }
-    /*
-       DEBUGF("lowpass band with amp=0:  %i \n",gfc->lowpass_band);
-       DEBUGF("highpass band with amp=0:  %i \n",gfc->highpass_band);
-       DEBUGF("lowpass band start:  %i \n",gfc->lowpass_start_band);
-       DEBUGF("lowpass band end:    %i \n",gfc->lowpass_end_band);
-       DEBUGF("highpass band start:  %i \n",gfc->highpass_start_band);
-       DEBUGF("highpass band end:    %i \n",gfc->highpass_end_band);
-     */
-}
-
-/*}}}*/
-
-
-static void
-optimum_bandwidth(double *const lowerlimit,
-                  double *const upperlimit,
-                  const unsigned bitrate,
-                  const int samplefreq,
-                  const double channels, lame_global_flags * gfp)
-{
-/*
- *  Input:
- *      bitrate     total bitrate in bps
- *      samplefreq  output sampling frequency in Hz
- *      channels    1 for mono, 2+epsilon for MS stereo, 3 for LR stereo
- *                  epsilon is the percentage of LR frames for typical audio
- *                  (I use 'Fade to Gray' by Metallica)
- *
- *   Output:
- *      lowerlimit: best lowpass frequency limit for input filter in Hz
- *      upperlimit: best highpass frequency limit for input filter in Hz
- */
-    double  f_low;
-    double  f_high;
-    double  br;
-
-    assert(bitrate >= 8000 && bitrate <= 320000);
-    assert(samplefreq >= 8000 && samplefreq <= 48000);
-    assert(channels == 1 || (channels >= 2 && channels <= 3));
-
-    if (samplefreq >= 32000)
-        br =
-            bitrate - (channels ==
-                       1 ? (17 + 4) * 8 : (32 + 4) * 8) * samplefreq / 1152;
-    else
-        br =
-            bitrate - (channels ==
-                       1 ? (9 + 4) * 8 : (17 + 4) * 8) * samplefreq / 576;
-
-    if (channels >= 2.)
-        br /= 1.75 + 0.25 * (channels - 2.); // MS needs 1.75x mono, LR needs 2.00x mono (experimental data of a lot of albums)
-
-    br *= 0.5;          // the sine and cosine term must share the bitrate
-
-/*
- *  So, now we have the bitrate for every spectral line.
- *  Let's look at the current settings:
- *
- *    Bitrate   limit    bits/line
- *     8 kbps   0.34 kHz  4.76
- *    16 kbps   1.9 kHz   2.06
- *    24 kbps   2.8 kHz   2.21
- *    32 kbps   3.85 kHz  2.14
- *    40 kbps   5.1 kHz   2.06
- *    48 kbps   5.6 kHz   2.21
- *    56 kbps   7.0 kHz   2.10
- *    64 kbps   7.7 kHz   2.14
- *    80 kbps  10.1 kHz   2.08
- *    96 kbps  11.2 kHz   2.24
- *   112 kbps  14.0 kHz   2.12
- *   128 kbps  15.4 kHz   2.17
- *   160 kbps  18.2 kHz   2.05
- *   192 kbps  21.1 kHz   2.14
- *   224 kbps  22.0 kHz   2.41
- *   256 kbps  22.0 kHz   2.78
- *
- *   What can we see?
- *       Value for 8 kbps is nonsense (although 8 kbps and stereo is nonsense)
- *       Values are between 2.05 and 2.24 for 16...192 kbps
- *       Some bitrate lack the following bitrates have: 16, 40, 80, 160 kbps
- *       A lot of bits per spectral line have: 24, 48, 96 kbps
- *
- *   What I propose?
- *       A slightly with the bitrate increasing bits/line function. It is
- *       better to decrease NMR for low bitrates to get a little bit more
- *       bandwidth. So we have a better trade off between twickling and
- *       muffled sound.
- */
-
-    f_low = br / log10(br * 4.425e-3); // Tests with 8, 16, 32, 64, 112 and 160 kbps
-
-/*
- *  What we get now?
- *
- *    Bitrate       limit  bits/line	difference
- *     8 kbps (8)  1.89 kHz  0.86          +1.6 kHz
- *    16 kbps (8)  3.16 kHz  1.24          +1.2 kHz
- *    32 kbps(16)  5.08 kHz  1.54          +1.2 kHz
- *    56 kbps(22)  7.88 kHz  1.80          +0.9 kHz
- *    64 kbps(22)  8.83 kHz  1.86          +1.1 kHz
- *   112 kbps(32) 14.02 kHz  2.12           0.0 kHz
- *   112 kbps(44) 13.70 kHz  2.11          -0.3 kHz
- *   128 kbps     15.40 kHz  2.17           0.0 kHz
- *   160 kbps     16.80 kHz  2.22          -1.4 kHz
- *   192 kbps     19.66 kHz  2.30          -1.4 kHz
- *   256 kbps     22.05 kHz  2.78           0.0 kHz
- */
-
-#if 0
-/*
- *  Beginning at 128 kbps/jstereo, we can use the following additional
- *  strategy:
- *
- *      For every increase of f_low in a way that the ATH(f_low)
- *      increases by 4 dB we force an additional NMR of 1.25 dB.
- *      These are the setting of the VBR quality selecting scheme
- *      for V <= 4.
- */
-    {
-        double  br_sw = (128000 - (32 + 4) * 8 * 44100 / 1152) / 1.75 * 0.5;
-        double  f_low_sw = br_sw / log10(br_sw * 4.425e-3);
-
-        // printf ("br_sw=%f  f_low_sw=%f\n", br_sw, f_low_sw );
-        // printf ("br   =%f  f_low   =%f\n", br   , f_low    );
-        // fflush (stdout);
-
-        while (f_low > f_low_sw) {
-            double  dATH = ATHformula(f_low, gfp) - ATHformula(f_low_sw, gfp); // [dB]
-            double  dNMR = br / f_low - br_sw / f_low_sw; // bit
-
-            // printf ("br   =%f  f_low   =%f\n", br   , f_low    );
-            // printf ("dATH =%f  dNMR    =%f\n", dATH , dNMR     );
-            // fflush (stdout);
-
-
-            if (dATH / 4.0 < dNMR * 6.0206 / 1.25) // 1 bit = 6.0206... dB
-                break;
-            f_low -= 25.;
-        }
-    }
-#endif
-
-/*
- *  Now we try to choose a good high pass filtering frequency.
- *  This value is currently not used.
- *    For fu < 16 kHz:  sqrt(fu*fl) = 560 Hz
- *    For fu = 18 kHz:  no high pass filtering
- *  This gives:
- *
- *   2 kHz => 160 Hz
- *   3 kHz => 107 Hz
- *   4 kHz =>  80 Hz
- *   8 kHz =>  40 Hz
- *  16 kHz =>  20 Hz
- *  17 kHz =>  10 Hz
- *  18 kHz =>   0 Hz
- *
- *  These are ad hoc values and these can be optimized if a high pass is available.
- */
-    if (f_low <= 16000)
-        f_high = 16000. * 20. / f_low;
-    else if (f_low <= 18000)
-        f_high = 180. - 0.01 * f_low;
-    else
-        f_high = 0.;
-
-    /*
-     *  When we sometimes have a good highpass filter, we can add the highpass
-     *  frequency to the lowpass frequency
-     */
-
-    if (lowerlimit != NULL)
-        *lowerlimit = f_low /* + f_high */ ;
-    if (upperlimit != NULL)
-        *upperlimit = f_high;
-/*
- * Now the weak points:
- *
- *   - the formula f_low=br/log10(br*4.425e-3) is an ad hoc formula
- *     (but has a physical background and is easy to tune)
- *   - the switch to the ATH based bandwidth selecting is the ad hoc
- *     value of 128 kbps
- */
-}
-
-static int
-optimum_samplefreq(int lowpassfreq, int input_samplefreq)
-{
-/*
- * Rules:
- *
- *  - output sample frequency should NOT be decreased by more than 3% if lowpass allows this
- *  - if possible, sfb21 should NOT be used
- *
- *  Problem: Switches to 32 kHz at 112 kbps
- */
-    if (input_samplefreq <= 8000 * 1.03 || lowpassfreq <= 3622)
-        return 8000;
-    if (input_samplefreq <= 11025 * 1.03 || lowpassfreq <= 4991)
-        return 11025;
-    if (input_samplefreq <= 12000 * 1.03 || lowpassfreq <= 5620)
-        return 12000;
-    if (input_samplefreq <= 16000 * 1.03 || lowpassfreq <= 7244)
-        return 16000;
-    if (input_samplefreq <= 22050 * 1.03 || lowpassfreq <= 9982)
-        return 22050;
-    if (input_samplefreq <= 24000 * 1.03 || lowpassfreq <= 11240)
-        return 24000;
-    if (input_samplefreq <= 32000 * 1.03 || lowpassfreq <= 15264)
-        return 32000;
-    if (input_samplefreq <= 44100 * 1.03)
-        return 44100;
-    return 48000;
-}
-
-
-/* set internal feature flags.  USER should not access these since
- * some combinations will produce strange results */
-void
-lame_init_qval(lame_global_flags * gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    switch (gfp->quality) {
-    case 9:            /* no psymodel, no noise shaping */
-        gfc->filter_type = 0;
-        gfc->psymodel = 0;
-        gfc->quantization = 0;
-        gfc->noise_shaping = 0;
-        gfc->noise_shaping_amp = 0;
-        gfc->noise_shaping_stop = 0;
-        gfc->use_best_huffman = 0;
-        break;
-
-    case 8:
-        gfp->quality = 7;
-    case 7:            /* use psymodel (for short block and m/s switching), but no noise shapping */
-        gfc->filter_type = 0;
-        gfc->psymodel = 1;
-        gfc->quantization = 0;
-        gfc->noise_shaping = 0;
-        gfc->noise_shaping_amp = 0;
-        gfc->noise_shaping_stop = 0;
-        gfc->use_best_huffman = 0;
-        break;
-
-    case 6:
-        gfp->quality = 5;
-    case 5:            /* the default */
-        gfc->filter_type = 0;
-        gfc->psymodel = 1;
-        gfc->quantization = 0;
-        gfc->noise_shaping = 1;
-         /**/ gfc->noise_shaping_amp = 0;
-        gfc->noise_shaping_stop = 0;
-        gfc->use_best_huffman = 0;
-        break;
-
-    case 4:
-        gfp->quality = 3;
-    case 3:
-        gfc->filter_type = 0;
-        gfc->psymodel = 1;
-        gfc->quantization = 1;
-        gfc->noise_shaping = 1;
-        gfc->noise_shaping_amp = 0;
-        gfc->noise_shaping_stop = 0;
-        gfc->use_best_huffman = 1;
-        break;
-
-    case 2:
-        gfc->filter_type = 0;
-        gfc->psymodel = 1;
-        gfc->quantization = 1;
-        gfc->noise_shaping = 1;
-        gfc->noise_shaping_amp = 1;
-        gfc->noise_shaping_stop = 1;
-        gfc->use_best_huffman = 1;
-        break;
-
-    case 1:
-        gfc->filter_type = 0;
-        gfc->psymodel = 1;
-        gfc->quantization = 1;
-        gfc->noise_shaping = 1;
-        gfc->noise_shaping_amp = 2;
-        gfc->noise_shaping_stop = 1;
-        gfc->use_best_huffman = 1;
-        break;
-
-    case 0:            /* 0..1 quality */
-        gfc->filter_type = 0; /* 1 not yet coded */
-        gfc->psymodel = 1;
-        gfc->quantization = 1;
-        gfc->noise_shaping = 1; /* 2=usually lowers quality */
-        gfc->noise_shaping_amp = 2;
-        gfc->noise_shaping_stop = 1;
-        gfc->use_best_huffman = 1; /* 2 not yet coded */
-    }
-
-    /* modifications to the above rules: */
-
-    /* -Z option enables scalefactor_scale: */
-    if (gfp->experimentalZ) {
-        gfc->noise_shaping = 2;
-    }
-
-    if (gfp->exp_nspsytune & 1) {
-        if (gfp->quality <= 2)
-            gfc->noise_shaping = 2; /* use scalefac_scale */
-    }
-
-}
-
-
-
-
-
-
-
-/* int           lame_init_params               (lame_global_flags *gfp)                                                                                          *//*{{{ */
-
-/*
- *   initialize internal params based on data in gf
- *   (globalflags struct filled in by calling program)
- *
- *  OUTLINE:
- *
- * We first have some complex code to determine bitrate,
- * output samplerate and mode.  It is complicated by the fact
- * that we allow the user to set some or all of these parameters,
- * and need to determine best possible values for the rest of them:
- *
- *  1. set some CPU related flags
- *  2. check if we are mono->mono, stereo->mono or stereo->stereo
- *  3.  compute bitrate and output samplerate:
- *          user may have set compression ratio
- *          user may have set a bitrate
- *          user may have set a output samplerate
- *  4. set some options which depend on output samplerate
- *  5. compute the actual compression ratio
- *  6. set mode based on compression ratio
- *
- *  The remaining code is much simpler - it just sets options
- *  based on the mode & compression ratio:
- *
- *   set allow_diff_short based on mode
- *   select lowpass filter based on compression ratio & mode
- *   set the bitrate index, and min/max bitrates for VBR modes
- *   disable VBR tag if it is not appropriate
- *   initialize the bitstream
- *   initialize scalefac_band data
- *   set sideinfo_len (based on channels, CRC, out_samplerate)
- *   write an id3v2 tag into the bitstream
- *   write VBR tag into the bitstream
- *   set mpeg1/2 flag
- *   estimate the number of frames (based on a lot of data)
- *
- *   now we set more flags:
- *   nspsytune:
- *      see code
- *   VBR modes
- *      see code
- *   CBR/ABR
- *      see code
- *
- *  Finally, we set the algorithm flags based on the gfp->quality value
- *  lame_init_qval(gfp);
- *
- */
-int
-lame_init_params(lame_global_flags * const gfp)
-{
-
-    int     i;
-    int     j;
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    gfc->gfp = gfp;
-
-    gfc->Class_ID = 0;
-
-    /* report functions */
-    gfc->report.msgf   = gfp->report.msgf;
-    gfc->report.debugf = gfp->report.debugf;
-    gfc->report.errorf = gfp->report.errorf;
-
-    gfc->CPU_features.i387 = has_i387();
-    gfc->CPU_features.AMD_3DNow = has_3DNow();
-    gfc->CPU_features.MMX = has_MMX();
-    gfc->CPU_features.SIMD = has_SIMD();
-    gfc->CPU_features.SIMD2 = has_SIMD2();
-
-
-    if (NULL == gfc->ATH)
-        gfc->ATH = calloc(1, sizeof(ATH_t));
-
-    if (NULL == gfc->ATH)
-        return -2;  // maybe error codes should be enumerated in lame.h ??
-
-#ifdef KLEMM_44
-    /* Select the fastest functions for this CPU */
-    init_scalar_functions(gfc);
-#endif
-
-    gfc->channels_in = gfp->num_channels;
-    if (gfc->channels_in == 1)
-        gfp->mode = MONO;
-    gfc->channels_out = (gfp->mode == MONO) ? 1 : 2;
-    gfc->mode_ext = MPG_MD_LR_LR;
-    if (gfp->mode == MONO)
-        gfp->force_ms = 0; // don't allow forced mid/side stereo for mono output
-
-
-    if (gfp->VBR != vbr_off) {
-        gfp->free_format = 0; /* VBR can't be mixed with free format */
-    }
-
-    if (gfp->VBR == vbr_off && gfp->brate == 0) {
-        /* no bitrate or compression ratio specified, use a compression ratio of 11.025 */
-        if (gfp->compression_ratio == 0)
-            gfp->compression_ratio = 11.025;
-		/* rate to compress a CD down to exactly 128000 bps */
-    }
-
-
-    if (gfp->VBR == vbr_off && gfp->brate == 0) {
-        /* no bitrate or compression ratio specified, use 11.025 */
-        if (gfp->compression_ratio == 0)
-            gfp->compression_ratio = 11.025;
-		/* rate to compress a CD down to exactly 128000 bps */
-    }
-
-    /* find bitrate if user specify a compression ratio */
-    if (gfp->VBR == vbr_off && gfp->compression_ratio > 0) {
-
-        if (gfp->out_samplerate == 0)
-            gfp->out_samplerate = map2MP3Frequency(0.97 * gfp->in_samplerate);
-			/* round up with a margin of 3% */
-
-        /* choose a bitrate for the output samplerate which achieves
-         * specified compression ratio
-         */
-	gfp->brate = gfp->out_samplerate * 16 * gfc->channels_out / (1.e3 *
-		gfp->compression_ratio);
-
-        /* we need the version for the bitrate table look up */
-        gfc->samplerate_index = SmpFrqIndex(gfp->out_samplerate, &gfp->version);
-
-        if (!gfp->free_format) /* for non Free Format find the nearest allowed bitrate */
-            gfp->brate =
-                FindNearestBitrate(gfp->brate, gfp->version,
-                                   gfp->out_samplerate);
-    }
-
-	/*
-	 * at 160 kbps (MPEG-2/2.5)/ 320 kbps (MPEG-1), only Free format
-	 * or CBR are possible, no VBR
-	 */
-    if (gfp->VBR != vbr_off && gfp->brate >= 320)
-        gfp->VBR = vbr_off;
-
-    if (gfp->out_samplerate == 0) {
-	/* if output sample frequency is not given, find a useful value */
-        gfp->out_samplerate = map2MP3Frequency(0.97 * gfp->in_samplerate);
-
-
-        /* check if user specified bitrate requires downsampling, if compression    */
-        /* ratio is > 13, choose a new samplerate to get the ratio down to about 10 */
-
-        if (gfp->VBR == vbr_off && gfp->brate > 0) {
-            gfp->compression_ratio = gfp->out_samplerate * 16 *
-		gfc->channels_out / (1.e3 * gfp->brate);
-            if (gfp->compression_ratio > 13.)
-                gfp->out_samplerate = map2MP3Frequency((10. * 1.e3 *
-			gfp->brate) / (16 * gfc->channels_out));
-        }
-        if (gfp->VBR == vbr_abr) {
-            gfp->compression_ratio = gfp->out_samplerate * 16 *
-		gfc->channels_out / (1.e3 * gfp->VBR_mean_bitrate_kbps);
-            if (gfp->compression_ratio > 13.)
-                gfp->out_samplerate =
-                    map2MP3Frequency((10. * 1.e3 * gfp->VBR_mean_bitrate_kbps) /
-                                     (16 * gfc->channels_out));
-        }
-    }
-
-    if (gfp->ogg) {
-        gfp->framesize = 1024;
-        gfp->encoder_delay = ENCDELAY;
-        gfc->coding = coding_Ogg_Vorbis;
-    }
-    else {
-        gfc->mode_gr = gfp->out_samplerate <= 24000 ? 1 : 2; // Number of granules per frame
-        gfp->framesize = 576 * gfc->mode_gr;
-        gfp->encoder_delay = ENCDELAY;
-        gfc->coding = coding_MPEG_Layer_3;
-    }
-
-    gfc->frame_size = gfp->framesize;
-
-    gfc->resample_ratio = (double) gfp->in_samplerate / gfp->out_samplerate;
-
-    /*
-     *  sample freq       bitrate     compression ratio
-     *     [kHz]      [kbps/channel]   for 16 bit input
-     *     44.1            56               12.6
-     *     44.1            64               11.025
-     *     44.1            80                8.82
-     *     22.05           24               14.7
-     *     22.05           32               11.025
-     *     22.05           40                8.82
-     *     16              16               16.0
-     *     16              24               10.667
-     *
-     */
-    /*
-     *  For VBR, take a guess at the compression_ratio.
-     *  For example:
-     *
-     *    VBR_q    compression     like
-     *     -        4.4         320 kbps/44 kHz
-     *   0...1      5.5         256 kbps/44 kHz
-     *     2        7.3         192 kbps/44 kHz
-     *     4        8.8         160 kbps/44 kHz
-     *     6       11           128 kbps/44 kHz
-     *     9       14.7          96 kbps
-     *
-     *  for lower bitrates, downsample with --resample
-     */
-
-    switch (gfp->VBR) {
-    case vbr_mt:
-    case vbr_rh:
-    case vbr_mtrh:
-        {
-            FLOAT8  cmp[] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
-            gfp->compression_ratio = cmp[gfp->VBR_q];
-        }
-        break;
-    case vbr_abr:
-        gfp->compression_ratio = gfp->out_samplerate * 16 * gfc->channels_out /
-		(1.e3 * gfp->VBR_mean_bitrate_kbps);
-        break;
-    default:
-        gfp->compression_ratio =
-            gfp->out_samplerate * 16 * gfc->channels_out / (1.e3 * gfp->brate);
-        break;
-    }
-
-
-    /* mode = -1 (not set by user) or
-     * mode = MONO (because of only 1 input channel).
-     * If mode has been set, then select between STEREO or J-STEREO
-     * At higher quality (lower compression) use STEREO instead of J-STEREO.
-     * (unless the user explicitly specified a mode)
-     *
-     * The threshold to switch to STEREO is:
-     *    48 kHz:   171 kbps (used at 192+)
-     *    44.1 kHz: 160 kbps (used at 160+)
-     *    32 kHz:   119 kbps (used at 128+)
-     *
-     *   Note, that for 32 kHz/128 kbps J-STEREO FM recordings sound much
-     *   better than STEREO, so I'm not so very happy with that.
-     *   fs < 32 kHz I have not tested.
-     */
-    if (gfp->mode == NOT_SET) {
-        if (gfp->compression_ratio < 8)
-            gfp->mode = STEREO;
-        else
-            gfp->mode = JOINT_STEREO;
-    }
-
-    /* KLEMM's jstereo with ms threshold adjusted via compression ratio */
-    if (gfp->mode_automs) {
-        if (gfp->mode != MONO && gfp->compression_ratio < 6.6)
-            gfp->mode = STEREO;
-    }
-
-
-    if (gfp->allow_diff_short == -1) {
-        if (gfp->mode == STEREO)
-            gfp->allow_diff_short = 1;
-    }
-
-
-
-
-  /**/
-  /* if a filter has not been enabled, see if we should add one: */
-  /**/
-    if (gfp->lowpassfreq == 0) {
-        double  lowpass;
-        double  highpass;
-        double  channels;
-
-        switch (gfp->mode) {
-        case MONO:
-            channels = 1.;
-            break;
-        case JOINT_STEREO:
-            channels = 2. + 0.00;
-            break;
-        case DUAL_CHANNEL:
-        case STEREO:
-            channels = 3.;
-            break;
-        default:
-            channels = 1.;  // just to make data flow analysis happy :-)
-            assert(0);
-            break;
-        }
-
-        optimum_bandwidth(&lowpass,
-                          &highpass,
-                          gfp->out_samplerate * 16 * gfc->channels_out /
-                          gfp->compression_ratio, gfp->out_samplerate, channels,
-                          gfp);
-
-        if (lowpass < 0.5 * gfp->out_samplerate) {
-            //MSGF(gfc,"Lowpass @ %7.1f Hz\n", lowpass);
-            gfc->lowpass1 = gfc->lowpass2 =
-                lowpass / (0.5 * gfp->out_samplerate);
-        }
-        if (0 && gfp->out_samplerate !=
-            optimum_samplefreq(lowpass, gfp->in_samplerate)) {
-            MSGF(gfc,
-                 "I would suggest to use %u Hz instead of %u Hz sample frequency\n",
-                 optimum_samplefreq(lowpass, gfp->in_samplerate),
-                 gfp->out_samplerate);
-        }
-        fflush(stderr);
-    }
-
-    /* apply user driven high pass filter */
-    if (gfp->highpassfreq > 0) {
-        gfc->highpass1 = 2. * gfp->highpassfreq / gfp->out_samplerate;
-					/* will always be >=0 */
-        if (gfp->highpasswidth >= 0)
-            gfc->highpass2 = 2. * (gfp->highpassfreq + gfp->highpasswidth) /
-		gfp->out_samplerate;
-        else            	/* 0% above on default */
-            gfc->highpass2 =
-                (1 + 0.00) * 2. * gfp->highpassfreq / gfp->out_samplerate;
-    }
-
-    /* apply user driven low pass filter */
-    if (gfp->lowpassfreq > 0) {
-        gfc->lowpass2 = 2. * gfp->lowpassfreq / gfp->out_samplerate;
-			/* will always be >=0 */
-        if (gfp->lowpasswidth >= 0) {
-            gfc->lowpass1 = 2. * (gfp->lowpassfreq - gfp->lowpasswidth) /
-		gfp->out_samplerate;
-            if (gfc->lowpass1 < 0) /* has to be >= 0 */
-                gfc->lowpass1 = 0;
-        }
-        else {          /* 0% below on default */
-            gfc->lowpass1 =
-                (1 - 0.00) * 2. * gfp->lowpassfreq / gfp->out_samplerate;
-        }
-    }
-
-  /**/
-  /* compute info needed for polyphase filter (filter type==0, default) */
-  /**/
-    lame_init_params_ppflt(gfp);
-
-
-  /*
-   * compute info needed for FIR filter (filter_type==1)
-   */
-   /* not yet coded */
-
-
-
-  /*
-   * samplerate and bitrate index
-   */
-    gfc->samplerate_index = SmpFrqIndex(gfp->out_samplerate, &gfp->version);
-    if (gfc->samplerate_index < 0)
-        return -1;
-
-    if (gfp->VBR == vbr_off) {
-        if (gfp->free_format)
-            gfc->bitrate_index = 0;
-        else {
-            gfc->bitrate_index = BitrateIndex(gfp->brate, gfp->version,
-                                              gfp->out_samplerate);
-            if (gfc->bitrate_index < 0)
-                return -1;
-        }
-    }
-    else {              /* choose a min/max bitrate for VBR */
-        /* if the user didn't specify VBR_max_bitrate: */
-        gfc->VBR_min_bitrate = 1; /* default: allow   8 kbps (MPEG-2) or  32 kbps (MPEG-1) */
-        gfc->VBR_max_bitrate = 14; /* default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1) */
-
-        if (gfp->VBR_min_bitrate_kbps)
-            if (
-                (gfc->VBR_min_bitrate =
-                 BitrateIndex(gfp->VBR_min_bitrate_kbps, gfp->version,
-                              gfp->out_samplerate)) < 0) return -1;
-        if (gfp->VBR_max_bitrate_kbps)
-            if (
-                (gfc->VBR_max_bitrate =
-                 BitrateIndex(gfp->VBR_max_bitrate_kbps, gfp->version,
-                              gfp->out_samplerate)) < 0) return -1;
-
-        gfp->VBR_min_bitrate_kbps =
-            bitrate_table[gfp->version][gfc->VBR_min_bitrate];
-        gfp->VBR_max_bitrate_kbps =
-            bitrate_table[gfp->version][gfc->VBR_max_bitrate];
-
-        gfp->VBR_mean_bitrate_kbps =
-            Min(bitrate_table[gfp->version][gfc->VBR_max_bitrate],
-                gfp->VBR_mean_bitrate_kbps);
-        gfp->VBR_mean_bitrate_kbps =
-            Max(bitrate_table[gfp->version][gfc->VBR_min_bitrate],
-                gfp->VBR_mean_bitrate_kbps);
-
-
-    }
-
-    /* Do not write VBR tag if VBR flag is not specified */
-    if (gfp->VBR == vbr_off)
-        gfp->bWriteVbrTag = 0;
-    if (gfp->ogg)
-        gfp->bWriteVbrTag = 0;
-    if (gfp->analysis)
-        gfp->bWriteVbrTag = 0;
-
-    /* some file options not allowed if output is: not specified or stdout */
-    if (gfc->pinfo != NULL)
-        gfp->bWriteVbrTag = 0; /* disable Xing VBR tag */
-
-    init_bit_stream_w(gfc);
-
-    j = gfc->samplerate_index + (3 * gfp->version) + 6 * (gfp->out_samplerate <
-                                                          16000);
-    for (i = 0; i < SBMAX_l + 1; i++)
-        gfc->scalefac_band.l[i] = sfBandIndex[j].l[i];
-    for (i = 0; i < SBMAX_s + 1; i++)
-        gfc->scalefac_band.s[i] = sfBandIndex[j].s[i];
-
-    /* determine the mean bitrate for main data */
-    if (gfp->version == 1)		/* MPEG 1 */
-        gfc->sideinfo_len = (gfc->channels_out == 1) ? 4 + 17 : 4 + 32;
-    else				/* MPEG 2 */
-        gfc->sideinfo_len = (gfc->channels_out == 1) ? 4 + 9 : 4 + 17;
-
-    if (gfp->error_protection)
-        gfc->sideinfo_len += 2;
-
-
-    /*
-     *  Write id3v2 tag into the bitstream.
-     *  This tag must be before the Xing VBR header.
-     */
-    if (!gfp->ogg)
-        id3tag_write_v2(gfp);
-
-
-    /* Write initial VBR Header to bitstream */
-    if (gfp->bWriteVbrTag)
-        InitVbrTag(gfp);
-
-    if (gfp->version == 1) /* 0 indicates use lower sample freqs algorithm */
-        gfc->is_mpeg1 = 1; /* yes */
-    else
-        gfc->is_mpeg1 = 0; /* no */
-
-    /* estimate total frames.  */
-    gfp->totalframes =
-        2 + gfp->num_samples / (gfc->resample_ratio * gfp->framesize);
-    gfc->Class_ID = LAME_ID;
-
-    if (gfp->exp_nspsytune & 1) {
-        int     i;
-
-        gfc->nsPsy.use = 1;
-        gfc->nsPsy.safejoint = (gfp->exp_nspsytune & 2) != 0;
-        for (i = 0; i < 19; i++)
-            gfc->nsPsy.pefirbuf[i] = 700;
-
-        if (gfp->VBR == vbr_mtrh || gfp->VBR == vbr_mt) {
-            ERRORF(gfc, "\n**** nspsytune doesn't support --vbr-new **** \n\n");
-            gfp->VBR = vbr_rh;
-        }
-
-        if (gfp->ATHtype == -1)
-            gfp->ATHtype = 0;
-
-        gfc->nsPsy.bass = gfc->nsPsy.alto = gfc->nsPsy.treble = 0;
-
-        i = (gfp->exp_nspsytune >> 2) & 63;
-        if (i >= 32)
-            i -= 64;
-        gfc->nsPsy.bass = pow(10, i / 4.0 / 10.0);
-        i = (gfp->exp_nspsytune >> 8) & 63;
-        if (i >= 32)
-            i -= 64;
-        gfc->nsPsy.alto = pow(10, i / 4.0 / 10.0);
-        i = (gfp->exp_nspsytune >> 14) & 63;
-        if (i >= 32)
-            i -= 64;
-        gfc->nsPsy.treble = pow(10, i / 4.0 / 10.0);
-    }
-
-    switch (gfp->VBR) {
-    case vbr_mtrh:
-        /*  default quality for --vbr-mtrh is 1
-         */
-        if (gfp->quality < 0)
-            gfp->quality = 1;
-
-        /*  tonality
-         */
-        if (gfp->cwlimit <= 0)
-            gfp->cwlimit = 0.454 * gfp->out_samplerate;
-
-        /*  fall through */
-    case vbr_mt:
-        /*  use Gaby's ATH for vbr-mtrh by default
-         */
-        if (gfp->ATHtype == -1)
-            gfp->ATHtype = 2;
-
-        /*  fall through */
-    case vbr_rh:
-        /*  use Roel's tweaked Gaby-ATH for VBR by default
-         */
-        if (gfp->ATHtype == -1)
-            gfp->ATHtype = 2;
-
-        /*  automatic ATH adjustment on, VBR modes need it
-         */
-        gfc->ATH->use_adjust = 1;
-
-        /*  sfb21 extra only with MPEG-1 at higher sampling rates
-         */
-        gfc->sfb21_extra = (gfp->out_samplerate > 44000);
-
-        /*  VBR needs at least the output of GPSYCHO,
-         *  so we have to garantee that by setting a minimum
-         *  quality level, actually level 5 does it.
-         *  the -v and -V x settings switch the quality to level 2
-         *  you would have to add a -q 5 to reduce the quality
-         *  down to level 5
-         */
-        if (gfp->quality > 5)
-            gfp->quality = 5;
-
-        /*  default quality setting is 2
-         */
-        if (gfp->quality < 0)
-            gfp->quality = 2;
-
-        /*  allow left and right channels to have different block types
-         */
-        gfp->allow_diff_short = 1;
-        break;
-    default:
-        /*  automatic ATH adjustment off, not so important for CBR code
-         */
-        gfc->ATH->use_adjust = 0;
-
-        /*  use Frank's ATH for CBR/ABR by default
-         */
-        if (gfp->ATHtype == -1)
-            gfp->ATHtype = 2;
-
-        /*  no sfb21 extra with CBR code
-         */
-        gfc->sfb21_extra = 0;
-
-        /*  default quality setting for CBR/ABR is 5
-         */
-        if (gfp->quality < 0)
-            gfp->quality = 5;
-        break;
-    }
-
-    /* initialize internal qval settings */
-    lame_init_qval(gfp);
-
-#ifdef KLEMM_44
-    gfc->mfbuf[0] = (sample_t *) calloc(sizeof(sample_t), MFSIZE);
-    gfc->mfbuf[1] = (sample_t *) calloc(sizeof(sample_t), MFSIZE);
-    gfc->sampfreq_in = unround_samplefrequency(gfp->in_samplerate);
-    gfc->sampfreq_out = gfp->out_samplerate;
-    gfc->resample_in = resample_open(gfc->sampfreq_in, gfc->sampfreq_out,
-	-1 .0 /* Auto */ , 32);
-#endif
-    return 0;
-}
-
-/*}}}*/
-/* void          lame_print_config              (lame_global_flags *gfp)                                                                                          *//*{{{ */
-
-/*
- *  print_config
- *
- *  Prints some selected information about the coding parameters via
- *  the macro command MSGF(), which is currently mapped to lame_errorf
- *  (reports via a error function?), which is a printf-like function
- *  for <stderr>.
- */
-
-void
-lame_print_config(const lame_global_flags * gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    double  out_samplerate = gfp->out_samplerate;
-    double  in_samplerate = gfp->out_samplerate * gfc->resample_ratio;
-
-    MSGF(gfc, "mp3enc (from lame version %s (%s))\n", get_lame_version(), get_lame_url());
-
-    if (gfc->CPU_features.MMX
-        || gfc->CPU_features.AMD_3DNow
-        || gfc->CPU_features.SIMD || gfc->CPU_features.SIMD2) {
-        MSGF(gfc, "CPU features:");
-
-        if (gfc->CPU_features.i387)
-            MSGF(gfc, " i387");
-        if (gfc->CPU_features.MMX)
-#ifdef MMX_choose_table
-            MSGF(gfc, ", MMX (ASM used)");
-#else
-            MSGF(gfc, ", MMX");
-#endif
-        if (gfc->CPU_features.AMD_3DNow)
-            MSGF(gfc, ", 3DNow!");
-        if (gfc->CPU_features.SIMD)
-            MSGF(gfc, ", SIMD");
-        if (gfc->CPU_features.SIMD2)
-            MSGF(gfc, ", SIMD2");
-        MSGF(gfc, "\n");
-    }
-
-    if (gfp->num_channels == 2 && gfc->channels_out == 1 /* mono */ ) {
-        MSGF
-            (gfc,
-             "Autoconverting from stereo to mono. Setting encoding to mono mode.\n");
-    }
-
-    if (gfc->resample_ratio != 1.) {
-        MSGF(gfc, "Resampling:  input %g kHz  output %g kHz\n",
-             1.e-3 * in_samplerate, 1.e-3 * out_samplerate);
-    }
-
-    if (gfc->filter_type == 0) {
-        if (gfc->highpass2 > 0.)
-            MSGF
-                (gfc,
-                 "Using polyphase highpass filter, transition band: %5.0f Hz - %5.0f Hz\n",
-                 0.5 * gfc->highpass1 * out_samplerate,
-                 0.5 * gfc->highpass2 * out_samplerate);
-        if (gfc->lowpass1 > 0.) {
-            MSGF
-                (gfc,
-                 "Using polyphase lowpass  filter, transition band: %5.0f Hz - %5.0f Hz\n",
-                 0.5 * gfc->lowpass1 * out_samplerate,
-                 0.5 * gfc->lowpass2 * out_samplerate);
-        }
-        else {
-            MSGF(gfc, "polyphase lowpass filter disabled\n");
-        }
-    }
-    else {
-        MSGF(gfc, "polyphase filters disabled\n");
-    }
-
-    if (gfp->free_format) {
-        MSGF(gfc,
-             "Warning: many decoders cannot handle free format bitstreams\n");
-        if (gfp->brate > 320) {
-            MSGF
-                (gfc,
-                 "Warning: many decoders cannot handle free format bitrates >320 kbps (see documentation)\n");
-        }
-    }
-}
-
-
-/* int           lame_encode_frame              (lame_global_flags *gfp, sample_t inbuf_l[],sample_t inbuf_r[], char *mp3buf, int mp3buf_size)                    *//*{{{ */
-
-/* routine to feed exactly one frame (gfp->framesize) worth of data to the
-encoding engine.  All buffering, resampling, etc, handled by calling
-program.
-*/
-int
-lame_encode_frame(lame_global_flags * gfp,
-                  sample_t inbuf_l[], sample_t inbuf_r[],
-                  unsigned char *mp3buf, int mp3buf_size)
-{
-    int     ret;
-    if (gfp->ogg) {
-#ifdef HAVE_VORBIS
-        ret = lame_encode_ogg_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3buf_size);
-#else
-        return -5;      /* wanna encode ogg without vorbis */
-#endif
-    }
-    else {
-        ret = lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3buf_size);
-    }
-
-    /* check to see if we underestimated totalframes */
-    gfp->frameNum++;
-    if (gfp->totalframes < gfp->frameNum)
-        gfp->totalframes = gfp->frameNum;
-    return ret;
-}
-
-/*}}}*/
-/* int           lame_encode_buffer             (lame_global_flags* gfp, short int buffer_l[], short int buffer_r[], int nsamples, char* mp3buf, int mp3buf_size )*//*{{{ */
-
-
-
-/*
- * THE MAIN LAME ENCODING INTERFACE
- * mt 3/00
- *
- * input pcm data, output (maybe) mp3 frames.
- * This routine handles all buffering, resampling and filtering for you.
- * The required mp3buffer_size can be computed from num_samples,
- * samplerate and encoding rate, but here is a worst case estimate:
- *
- * mp3buffer_size in bytes = 1.25*num_samples + 7200
- *
- * return code = number of bytes output in mp3buffer.  can be 0
-*/
-int
-lame_encode_buffer_sample_t(lame_global_flags * gfp,
-                   sample_t buffer_l[],
-                   sample_t buffer_r[],
-                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int     mp3size = 0, ret, i, ch, mf_needed;
-    sample_t *mfbuf[2];
-    sample_t *in_buffer[2];
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    if (nsamples == 0)
-        return 0;
-
-    in_buffer[0]=buffer_l;
-    in_buffer[1]=buffer_r;
-
-
-    /* some sanity checks */
-#if ENCDELAY < MDCTDELAY
-# error ENCDELAY is less than MDCTDELAY, see encoder.h
-#endif
-#if FFTOFFSET > BLKSIZE
-# error FFTOFFSET is greater than BLKSIZE, see encoder.h
-#endif
-
-    mf_needed = BLKSIZE + gfp->framesize - FFTOFFSET; /* amount needed for FFT */
-    mf_needed = Max(mf_needed, 286 + 576 * (1 + gfc->mode_gr)); /* amount needed for MDCT/filterbank */
-    assert(MFSIZE >= mf_needed);
-
-    mfbuf[0] = gfc->mfbuf[0];
-    mfbuf[1] = gfc->mfbuf[1];
-
-    if (gfp->num_channels == 2 && gfc->channels_out == 1) {
-        /* downsample to mono */
-        for (i = 0; i < nsamples; ++i) {
-            in_buffer[0][i] =
-                0.5 * ((FLOAT8) in_buffer[0][i] + in_buffer[1][i]);
-            in_buffer[1][i] = 0.0;
-        }
-    }
-
-
-    while (nsamples > 0) {
-        int     n_in = 0;    /* number of input samples processed with fill_buffer */
-        int     n_out = 0;   /* number of samples output with fill_buffer */
-        /* n_in <> n_out if we are resampling */
-
-        /* copy in new samples into mfbuf, with resampling & scaling if necessary */
-        fill_buffer(gfp, mfbuf, in_buffer, nsamples, &n_in, &n_out);
-
-        /* update in_buffer counters */
-        nsamples -= n_in;
-        in_buffer[0] += n_in;
-        if (gfc->channels_out == 2)
-            in_buffer[1] += n_in;
-
-        /* update mfbuf[] counters */
-        gfc->mf_size += n_out;
-        assert(gfc->mf_size <= MFSIZE);
-        gfc->mf_samples_to_encode += n_out;
-
-
-        if (gfc->mf_size >= mf_needed) {
-            /* encode the frame.  */
-            ret =
-                lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf, mp3buf_size);
-
-            if (ret < 0)
-                goto retr;
-            mp3buf += ret;
-            mp3size += ret;
-
-            /* shift out old samples */
-            gfc->mf_size -= gfp->framesize;
-            gfc->mf_samples_to_encode -= gfp->framesize;
-            for (ch = 0; ch < gfc->channels_out; ch++)
-                for (i = 0; i < gfc->mf_size; i++)
-                    mfbuf[ch][i] = mfbuf[ch][i + gfp->framesize];
-        }
-    }
-    assert(nsamples == 0);
-    ret = mp3size;
-
-  retr:
-    return ret;
-}
-
-
-int
-lame_encode_buffer(lame_global_flags * gfp,
-                   const short int buffer_l[],
-                   const short int buffer_r[],
-                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int     ret, i;
-    sample_t *in_buffer[2];
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    if (nsamples == 0)
-        return 0;
-
-    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
-    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
-
-    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
-        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
-        return -2;
-    }
-
-    /* make a copy of input buffer, changing type to sample_t */
-    for (i = 0; i < nsamples; i++) {
-        in_buffer[0][i] = buffer_l[i];
-        in_buffer[1][i] = buffer_r[i];
-    }
-
-    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
-				      nsamples, mp3buf, mp3buf_size);
-
-    free(in_buffer[0]);
-    free(in_buffer[1]);
-    return ret;
-}
-
-
-int
-lame_encode_buffer_float(lame_global_flags * gfp,
-                   const float buffer_l[],
-                   const float buffer_r[],
-                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int     ret, i;
-    sample_t *in_buffer[2];
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    if (nsamples == 0)
-        return 0;
-
-    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
-    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
-
-    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
-        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
-        return -2;
-    }
-
-    /* make a copy of input buffer, changing type to sample_t */
-    for (i = 0; i < nsamples; i++) {
-        in_buffer[0][i] = buffer_l[i];
-        in_buffer[1][i] = buffer_r[i];
-    }
-
-    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
-				      nsamples, mp3buf, mp3buf_size);
-
-    free(in_buffer[0]);
-    free(in_buffer[1]);
-    return ret;
-}
-
-
-
-int
-lame_encode_buffer_long(lame_global_flags * gfp,
-                   const long buffer_l[],
-                   const long buffer_r[],
-                   int nsamples, unsigned char *mp3buf, const int mp3buf_size)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int     ret, i;
-    sample_t *in_buffer[2];
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    if (nsamples == 0)
-        return 0;
-
-    in_buffer[0] = calloc(sizeof(sample_t), nsamples);
-    in_buffer[1] = calloc(sizeof(sample_t), nsamples);
-
-    if (in_buffer[0] == NULL || in_buffer[1] == NULL) {
-        ERRORF(gfc, "Error: can't allocate in_buffer buffer\n");
-        return -2;
-    }
-
-    /* make a copy of input buffer, changing type to sample_t */
-    for (i = 0; i < nsamples; i++) {
-        in_buffer[0][i] = buffer_l[i];
-        in_buffer[1][i] = buffer_r[i];
-    }
-
-    ret = lame_encode_buffer_sample_t(gfp,in_buffer[0],in_buffer[1],
-				      nsamples, mp3buf, mp3buf_size);
-
-    free(in_buffer[0]);
-    free(in_buffer[1]);
-    return ret;
-}
-
-
-
-
-
-
-
-
-
-
-
-int
-lame_encode_buffer_interleaved(lame_global_flags * gfp,
-                               short int buffer[],
-                               int nsamples,
-                               unsigned char *mp3buf, int mp3buf_size)
-{
-    int     ret, i;
-    short int *buffer_l;
-    short int *buffer_r;
-
-    buffer_l = malloc(sizeof(short int) * nsamples);
-    buffer_r = malloc(sizeof(short int) * nsamples);
-    if (buffer_l == NULL || buffer_r == NULL) {
-        return -2;
-    }
-    for (i = 0; i < nsamples; i++) {
-        buffer_l[i] = buffer[2 * i];
-        buffer_r[i] = buffer[2 * i + 1];
-    }
-    ret =
-        lame_encode_buffer(gfp, buffer_l, buffer_r, nsamples, mp3buf,
-                           mp3buf_size);
-    free(buffer_l);
-    free(buffer_r);
-    return ret;
-
-}
-
-
-/*}}}*/
-/* int           lame_encode                    (lame_global_flags* gfp, short int in_buffer[2][1152], char* mp3buf, int size )                                   *//*{{{ */
-
-
-/* old LAME interface.  use lame_encode_buffer instead */
-
-int
-lame_encode(lame_global_flags * const gfp,
-            const short int in_buffer[2][1152],
-            unsigned char *const mp3buf, const int size)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    return lame_encode_buffer(gfp, in_buffer[0], in_buffer[1], gfp->framesize,
-                              mp3buf, size);
-}
-
-/*}}}*/
-/* int           lame_encode_flush              (lame_global_flags* gfp, char* mp3buffer, int mp3buffer_size )                                                    *//*{{{ */
-
-/**/
-/* flush internal mp3 buffers,                                   */
-/**/
-
-int
-lame_encode_flush(lame_global_flags * gfp,
-                  unsigned char *mp3buffer, int mp3buffer_size)
-{
-    short int buffer[2][1152];
-    int     imp3 = 0, mp3count, mp3buffer_size_remaining;
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    memset(buffer, 0, sizeof(buffer));
-    mp3count = 0;
-
-    while (gfc->mf_samples_to_encode > 0) {
-
-        mp3buffer_size_remaining = mp3buffer_size - mp3count;
-
-        /* if user specifed buffer size = 0, dont check size */
-        if (mp3buffer_size == 0)
-            mp3buffer_size_remaining = 0;
-
-        /* send in a frame of 0 padding until all internal sample buffers
-         * are flushed
-         */
-        imp3 = lame_encode_buffer(gfp, buffer[0], buffer[1], gfp->framesize,
-                                  mp3buffer, mp3buffer_size_remaining);
-        /* don't count the above padding: */
-        gfc->mf_samples_to_encode -= gfp->framesize;
-
-        if (imp3 < 0) {
-            /* some type of fatal error */
-            return imp3;
-        }
-        mp3buffer += imp3;
-        mp3count += imp3;
-    }
-
-    mp3buffer_size_remaining = mp3buffer_size - mp3count;
-    /* if user specifed buffer size = 0, dont check size */
-    if (mp3buffer_size == 0)
-        mp3buffer_size_remaining = 0;
-
-    if (gfp->ogg) {
-#ifdef HAVE_VORBIS
-        /* ogg related stuff */
-        imp3 = lame_encode_ogg_finish(gfp, mp3buffer, mp3buffer_size_remaining);
-#endif
-    }
-    else {
-        /* mp3 related stuff.  bit buffer might still contain some mp3 data */
-        flush_bitstream(gfp);
-        /* write a id3 tag to the bitstream */
-        id3tag_write_v1(gfp);
-        imp3 = copy_buffer(mp3buffer, mp3buffer_size_remaining, &gfc->bs);
-    }
-
-    if (imp3 < 0) {
-        return imp3;
-    }
-    mp3count += imp3;
-    return mp3count;
-}
-
-/*}}}*/
-/* void          lame_close                     (lame_global_flags *gfp)                                                                                          *//*{{{ */
-
-/*
- *
- *      lame_close ()
- *
- *  frees internal buffers
- *
- */
-
-int
-lame_close(lame_global_flags * gfp)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-
-    if (gfc->Class_ID != LAME_ID)
-        return -3;
-
-    gfc->Class_ID = 0;
-
-    // this routien will free all malloc'd data in gfc, and then free gfc:
-    freegfc(gfc);
-
-    gfp->internal_flags = NULL;
-
-    if (gfp->lame_allocated_gfp)
-        free(gfp);
-
-    return 0;
-}
-
-
-/*}}}*/
-/* int           lame_encode_finish             (lame_global_flags* gfp, char* mp3buffer, int mp3buffer_size )                                                    *//*{{{ */
-
-
-/**/
-/* flush internal mp3 buffers, and free internal buffers         */
-/**/
-
-int
-lame_encode_finish(lame_global_flags * gfp,
-                   unsigned char *mp3buffer, int mp3buffer_size)
-{
-    int     ret = lame_encode_flush(gfp, mp3buffer, mp3buffer_size);
-
-    lame_close(gfp);
-
-    return ret;
-}
-
-/*}}}*/
-/* void          lame_mp3_tags_fid              (lame_global_flags *gfp,FILE *fpStream)                                                                           *//*{{{ */
-
-/**/
-/* write VBR Xing header, and ID3 version 1 tag, if asked for    */
-/**/
-void
-lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream)
-{
-    if (gfp->bWriteVbrTag && (gfp->VBR != vbr_off)) {
-        /* Map VBR_q to Xing quality value: 0=worst, 100=best */
-        int     nQuality = ((9-gfp->VBR_q) * 100) / 9;
-
-        /* Write Xing header again */
-        if (fpStream && !fseek(fpStream, 0, SEEK_SET))
-            PutVbrTag(gfp, fpStream, nQuality);
-    }
-
-
-}
-/*}}}*/
-/* lame_global_flags *lame_init                 (void)                                                                                                            *//*{{{ */
-
-lame_global_flags *
-lame_init(void)
-{
-    lame_global_flags *gfp;
-    int     ret;
-
-    gfp = calloc(1, sizeof(lame_global_flags));
-    if (gfp == NULL)
-        return NULL;
-
-    ret = lame_init_old(gfp);
-    if (ret != 0) {
-        free(gfp);
-        return NULL;
-    }
-
-    gfp->lame_allocated_gfp = 1;
-    return gfp;
-}
-
-/*}}}*/
-/* int           lame_init_old                  (lame_global_flags *gfp)                                                                                          *//*{{{ */
-
-/* initialize mp3 encoder */
-int
-lame_init_old(lame_global_flags * gfp)
-{
-    lame_internal_flags *gfc;
-
-    disable_FPE();      // disable floating point exceptions
-
-    memset(gfp, 0, sizeof(lame_global_flags));
-
-    if (NULL ==
-        (gfc = gfp->internal_flags =
-         calloc(1, sizeof(lame_internal_flags)))) return -1;
-
-    /* Global flags.  set defaults here for non-zero values */
-    /* see lame.h for description */
-    /* set integer values to -1 to mean that LAME will compute the
-     * best value, UNLESS the calling program as set it
-     * (and the value is no longer -1)
-     */
-
-
-    gfp->mode = NOT_SET;
-    gfp->original = 1;
-    gfp->in_samplerate = 1000 * 44.1;
-    gfp->num_channels = 2;
-    gfp->num_samples = MAX_U_32_NUM;
-
-    gfp->bWriteVbrTag = 1;
-    gfp->quality = -1;
-    gfp->allow_diff_short = -1;
-
-    gfp->lowpassfreq = 0;
-    gfp->highpassfreq = 0;
-    gfp->lowpasswidth = -1;
-    gfp->highpasswidth = -1;
-
-    gfp->padding_type = 2;
-    gfp->VBR = vbr_off;
-    gfp->VBR_q = 4;
-    gfp->VBR_mean_bitrate_kbps = 128;
-    gfp->VBR_min_bitrate_kbps = 0;
-    gfp->VBR_max_bitrate_kbps = 0;
-    gfp->VBR_hard_min = 0;
-
-
-    gfc->resample_ratio = 1;
-    gfc->lowpass_band = 32;
-    gfc->highpass_band = -1;
-    gfc->VBR_min_bitrate = 1; /* not  0 ????? */
-    gfc->VBR_max_bitrate = 13; /* not 14 ????? */
-
-    gfc->OldValue[0] = 180;
-    gfc->OldValue[1] = 180;
-    gfc->CurrentStep = 4;
-    gfc->masking_lower = 1;
-
-    gfp->ATHtype = -1;  /* default = -1 = set in lame_init_params */
-    gfp->useTemporal = 1;
-
-    /* The reason for
-     *       int mf_samples_to_encode = ENCDELAY + 288;
-     * ENCDELAY = internal encoder delay.  And then we have to add 288
-     * because of the 50% MDCT overlap.  A 576 MDCT granule decodes to
-     * 1152 samples.  To synthesize the 576 samples centered under this granule
-     * we need the previous granule for the first 288 samples (no problem), and
-     * the next granule for the next 288 samples (not possible if this is last
-     * granule).  So we need to pad with 288 samples to make sure we can
-     * encode the 576 samples we are interested in.
-     */
-    gfc->mf_samples_to_encode = ENCDELAY + 288;
-    gfc->mf_size = ENCDELAY - MDCTDELAY; /* we pad input with this many 0's */
-
-#ifdef KLEMM_44
-    /* XXX: this wasn't protectes by KLEMM_44 initially! */
-    gfc->last_ampl = gfc->ampl = +1.0;
-#endif
-
-    return 0;
-}
-
-/*}}}*/
-
-/*
- *
- *  some simple statistics
- *
- *  Robert Hegemann 2000-10-11
- *
- */
-
-/*  histogram of used bitrate indexes:
- *  One has to weight them to calculate the average bitrate in kbps
- *
- *  bitrate indices:
- *  there are 14 possible bitrate indices, 0 has the special meaning
- *  "free format" which is not possible to mix with VBR and 15 is forbidden
- *  anyway.
- *
- *  stereo modes:
- *  0: LR   number of left-right encoded frames
- *  1: LR-I number of left-right and intensity encoded frames
- *  2: MS   number of mid-side encoded frames
- *  3: MS-I number of mid-side and intensity encoded frames
- *
- *  4: number of encoded frames
- *
- */
-
-void
-lame_bitrate_hist(const lame_global_flags * const gfp, int bitrate_count[14])
-{
-    const lame_internal_flags *gfc;
-    int     i;
-
-    if (NULL == bitrate_count)
-        return;
-    if (NULL == gfp)
-        return;
-    gfc = gfp->internal_flags;
-    if (NULL == gfc)
-        return;
-
-    for (i = 0; i < 14; i++)
-        bitrate_count[i] = gfc->bitrate_stereoMode_Hist[i + 1][4];
-}
-
-
-void
-lame_bitrate_kbps(const lame_global_flags * const gfp, int bitrate_kbps[14])
-{
-    const lame_internal_flags *gfc;
-    int     i;
-
-    if (NULL == bitrate_kbps)
-        return;
-    if (NULL == gfp)
-        return;
-    gfc = gfp->internal_flags;
-    if (NULL == gfc)
-        return;
-
-    for (i = 0; i < 14; i++)
-        bitrate_kbps[i] = bitrate_table[gfp->version][i + 1];
-}
-
-
-
-void
-lame_stereo_mode_hist(const lame_global_flags * const gfp, int stmode_count[4])
-{
-    const lame_internal_flags *gfc;
-    int     i;
-
-    if (NULL == stmode_count)
-        return;
-    if (NULL == gfp)
-        return;
-    gfc = gfp->internal_flags;
-    if (NULL == gfc)
-        return;
-
-    for (i = 0; i < 4; i++) {
-        int     j, sum = 0;
-        for (j = 0; j < 14; j++)
-            sum += gfc->bitrate_stereoMode_Hist[j + 1][i];
-        stmode_count[i] = sum;
-    }
-}
-
-
-
-void
-lame_bitrate_stereo_mode_hist(const lame_global_flags * const gfp,
-                              int bitrate_stmode_count[14][4])
-{
-    const lame_internal_flags *gfc;
-    int     i;
-    int     j;
-
-    if (NULL == bitrate_stmode_count)
-        return;
-    if (NULL == gfp)
-        return;
-    gfc = gfp->internal_flags;
-    if (NULL == gfc)
-        return;
-
-    for (j = 0; j < 14; j++)
-        for (i = 0; i < 4; i++)
-            bitrate_stmode_count[j][i] = gfc->bitrate_stereoMode_Hist[j + 1][i];
-}
-
-/* end of lame.c */
--- a/sys/src/games/mp3enc/lame.h
+++ /dev/null
@@ -1,953 +1,0 @@
-/*
- *	Interface to MP3 LAME encoding engine
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING.  If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* $Id: lame.h,v 1.67 2001/03/12 04:38:35 markt Exp $ */
-
-#ifndef LAME_LAME_H
-#define LAME_LAME_H
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#if defined(WIN32)
-#undef CDECL
-#define CDECL _cdecl
-#else
-#define CDECL
-#endif
-
-
-typedef enum vbr_mode_e {
-  vbr_off=0,
-  vbr_mt,
-  vbr_rh,
-  vbr_abr,
-  vbr_mtrh,
-  vbr_default=vbr_rh  /* change this to change the default VBR mode of LAME */ 
-} vbr_mode;
-
-
-/* MPEG modes */
-typedef enum MPEG_mode_e {
-  STEREO=0,
-  JOINT_STEREO,
-  DUAL_CHANNEL,   /* LAME doesn't supports this! */
-  MONO,
-  NOT_SET,
-  MAX_INDICATOR   /* Don't use this! It's used for sanity checks. */ 
-} MPEG_mode;
-
-
-/***********************************************************************
-*
-*  Control Parameters set by User.  These parameters are here for
-*  backwards compatibility with the old, non-shared lib API.  
-*  Please use the lame_set_variablename() functions below
-*
-*
-***********************************************************************/
-typedef struct  {
-  /* input description */
-  unsigned long num_samples;  /* number of samples. default=2^32-1           */
-  int num_channels;           /* input number of channels. default=2         */
-  int in_samplerate;          /* input_samp_rate in Hz. default=44.1 kHz     */
-  int out_samplerate;         /* output_samp_rate.
-                                   default: LAME picks best value 
-                                   at least not used for MP3 decoding:
-                                   Remember 44.1 kHz MP3s and AC97           */
-  float scale;                /* scale input by this amount before encoding
-                                 at least not used for MP3 decoding          */
-
-  /* general control params */
-  int analysis;               /* collect data for a MP3 frame analyzer?      */
-  int bWriteVbrTag;           /* add Xing VBR tag?                           */
-  int disable_waveheader;     /* disable writing of .wav header, when
-                                 *decoding*                                  */
-  int decode_only;            /* use lame/mpglib to convert mp3/ogg to wav   */
-  int ogg;                    /* encode to Vorbis .ogg file                  */
-
-  int quality;                /* quality setting 0=best,  9=worst  default=5 */
-  MPEG_mode mode;             /* see enum above
-                                 default = LAME picks best value             */
-  int mode_fixed;             /* ignored                                     */
-  int mode_automs;            /* use a m/s threshold based on compression
-                                 ratio                                       */
-  int force_ms;               /* force M/S mode.  requires mode=1            */
-  int free_format;            /* use free format? default=0                  */
-
-  /*
-   * set either brate>0  or compression_ratio>0, LAME will compute
-   * the value of the variable not set.
-   * Default is compression_ratio = 11.025
-   */
-  int brate;                  /* bitrate                                    */
-  float compression_ratio;    /* sizeof(wav file)/sizeof(mp3 file)          */
-
-
-  /* frame params */
-  int copyright;                  /* mark as copyright. default=0           */
-  int original;                   /* mark as original. default=1            */
-  int error_protection;           /* use 2 bytes per frame for a CRC
-                                     checksum. default=0                    */
-  int padding_type;               /* 0=no padding, 1=always pad,
-                                     2=adjust padding, default=2            */
-  int extension;                  /* the MP3 'private extension' bit.
-                                     Meaningless                            */
-  int strict_ISO;                 /* enforce ISO spec as much as possible   */
-
-  /* quantization/noise shaping */
-  int disable_reservoir;          /* use bit reservoir?                     */
-  int experimentalX;            
-  int experimentalY;
-  int experimentalZ;
-  int exp_nspsytune;
-
-  /* VBR control */
-  vbr_mode VBR;
-  int VBR_q;
-  int VBR_mean_bitrate_kbps;
-  int VBR_min_bitrate_kbps;
-  int VBR_max_bitrate_kbps;
-  int VBR_hard_min;             /* strictly enforce VBR_min_bitrate
-                                   normaly, it will be violated for analog
-                                   silence                                 */
-
-
-  /* resampling and filtering */
-  int lowpassfreq;                /* freq in Hz. 0=lame choses.
-                                     -1=no filter                          */
-  int highpassfreq;               /* freq in Hz. 0=lame choses.
-                                     -1=no filter                          */
-  int lowpasswidth;               /* freq width of filter, in Hz
-                                     (default=15%)                         */
-  int highpasswidth;              /* freq width of filter, in Hz
-                                     (default=15%)                         */
-
-
-
-  /*
-   * psycho acoustics and other arguments which you should not change 
-   * unless you know what you are doing
-   */
-  int ATHonly;                    /* only use ATH                         */
-  int ATHshort;                   /* only use ATH for short blocks        */
-  int noATH;                      /* disable ATH                          */
-  int ATHtype;                    /* select ATH formula                   */
-  float ATHlower;                 /* lower ATH by this many db            */
-  int cwlimit;                    /* predictability limit                 */
-  int allow_diff_short;           /* allow blocktypes to differ between
-                                     channels?                            */
-  int useTemporal;                /* use temporal masking effect          */
-  int no_short_blocks;            /* disable short blocks                 */
-  int emphasis;                   /* Input PCM is emphased PCM (for
-                                     instance from one of the rarely
-                                     emphased CDs), it is STRONGLY not
-                                     recommended to use this, because
-				     psycho does not take it into account,
-				     and last but not least many decoders
-                                     don't care about these bits          */
-
-  struct {
-    void (*msgf)  (const char *format, va_list ap);
-    void (*debugf)(const char *format, va_list ap);
-    void (*errorf)(const char *format, va_list ap);
-  } report;
-
-  /************************************************************************/
-  /* internal variables, do not set...                                    */
-  /* provided because they may be of use to calling application           */
-  /************************************************************************/
-
-  int version;                    /* 0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)     */
-  int encoder_delay;
-  int framesize;                  
-  int frameNum;                   /* number of frames encoded             */
-  int totalframes;
-  int lame_allocated_gfp;         /* is this struct owned by calling
-                                     program or lame?                     */
-
-
-
-  /****************************************************************************/
-  /* more internal variables, which will not exist after lame_encode_finish() */
-  /****************************************************************************/
-  void *internal_flags;
-
-  /* VBR tags.  This data is here because VBR header is writen after
-   * input file is closed and *internal_flags struct is free'd */
-  int nZeroStreamSize;
-  int TotalFrameSize;
-  int* pVbrFrames;
-  int nVbrNumFrames;
-  int nVbrFrameBufferSize;
-
-
-} lame_global_flags;
-
-// I give up. Klemm has worn me down on this one... 
-typedef lame_global_flags lame_t;
-
-
-
-
-
-/***********************************************************************
- *
- *  The LAME API
- *  These functions should be called, in this order, for each
- *  MP3 file to be encoded 
- *
- ***********************************************************************/
-
-
-/*
- * REQUIRED:
- * initialize the encoder.  sets default for all encoder paramters,
- * returns -1 if some malloc()'s failed
- * otherwise returns 0
- */
-lame_global_flags * CDECL lame_init(void);
-/* obsolete version */
-int CDECL lame_init_old(lame_global_flags *);
-
-
-/*
- * OPTIONAL:
- * set as needed to override defaults
- */
-
-/********************************************************************
- *  input stream description
- ***********************************************************************/
-// number of samples.  default = 2^32-1  
-int CDECL lame_set_num_samples(lame_global_flags *, unsigned long);
-unsigned long CDECL lame_get_num_samples(const lame_global_flags *);
-
-// input sample rate in Hz.  default = 44100hz
-int CDECL lame_set_in_samplerate(lame_global_flags *, int);
-int CDECL lame_get_in_samplerate(const lame_global_flags *);
-
-// number of channels in input stream. default=2 
-int CDECL lame_set_num_channels(lame_global_flags *, int);
-int CDECL lame_get_num_channels(const lame_global_flags *);
-
-// scale the input by this amount before encoding.  default=0 (disabled)
-// (not used by decoding routines)
-int CDECL lame_set_scale(lame_global_flags *, float);
-float CDECL lame_get_scale(const lame_global_flags *);
-
-// output sample rate in Hz.  default = 0, which means LAME picks best value 
-// based on the amount of compression.  MPEG only allows:
-// MPEG1    32, 44.1,   48khz
-// MPEG2    16, 22.05,  24
-// MPEG2.5   8, 11.025, 12
-// (not used by decoding routines)
-int CDECL lame_set_out_samplerate(lame_global_flags *, int);
-int CDECL lame_get_out_samplerate(const lame_global_flags *);
-
-
-/********************************************************************
- *  general control parameters
- ***********************************************************************/
-// 1=cause LAME to collect data for an MP3 frame analzyer. default=0
-int CDECL lame_set_analysis(lame_global_flags *, int);
-int CDECL lame_get_analysis(const lame_global_flags *);
-
-// 1 = write a Xing VBR header frame.
-// default = 1 for VBR/ABR modes, 0 for CBR mode
-// this variable must have been added by a Hungarian notation Windows programmer :-)
-int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int);
-int CDECL lame_get_bWriteVbrTag(const lame_global_flags *);
-
-// 1=disable writing a wave header with *decoding*.  default=0
-int CDECL lame_set_disable_waveheader(lame_global_flags *, int);
-int CDECL lame_get_disable_waveheader(const lame_global_flags *);
-
-// 1=decode only.  use lame/mpglib to convert mp3/ogg to wav.  default=0
-int CDECL lame_set_decode_only(lame_global_flags *, int);
-int CDECL lame_get_decode_only(const lame_global_flags *);
-
-// 1=encode a Vorbis .ogg file.  default=0
-int CDECL lame_set_ogg(lame_global_flags *, int);
-int CDECL lame_get_ogg(const lame_global_flags *);
-
-// internal algorithm selection.  True quality is determined by the bitrate
-// but this variable will effect quality by selecting expensive or cheap algorithms.
-// quality=0..9.  0=best (very slow).  9=worst.  
-// recommended:  2     near-best quality, not too slow
-//               5     good quality, fast
-//               7     ok quality, really fast
-int CDECL lame_set_quality(lame_global_flags *, int);
-int CDECL lame_get_quality(const lame_global_flags *);
-
-// mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono
-// default: lame picks based on compression ration and input channels
-int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
-MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
-
-// mode_automs.  Us a M/S mode with a switching threshold based on 
-// compression ratio
-// default = 0 (disabled)
-int CDECL lame_set_mode_automs(lame_global_flags *, int);
-int CDECL lame_get_mode_automs(const lame_global_flags *);
-
-// force_ms.  Force M/S for all frames.  For testing only.
-// default = 0 (disabled)
-int CDECL lame_set_force_ms(lame_global_flags *, int);
-int CDECL lame_get_force_ms(const lame_global_flags *);
-
-// use free_format?  default = 0 (disabled)
-int CDECL lame_set_free_format(lame_global_flags *, int);
-int CDECL lame_get_free_format(const lame_global_flags *);
-
-/*
- * OPTIONAL:
- * Set printf like error/debug/message reporting functions.
- * The second argument has to be a pointer to a function which looks like
- *   void my_debugf(const char *format, va_list ap)
- *   {
- *       (void) vfprintf(stdout, format, ap);
- *   }
- * If you use NULL as the value of the pointer in the set function, the
- * lame buildin function will be used (prints to stderr).
- * To quiet any output you have to replace the body of the example function
- * with just "return;" and use it in the set function.
- */
-int CDECL lame_set_errorf(lame_global_flags *,
-                          void (*func)(const char *, va_list));
-int CDECL lame_set_debugf(lame_global_flags *,
-                          void (*func)(const char *, va_list));
-int CDECL lame_set_msgf  (lame_global_flags *,
-                          void (*func)(const char *, va_list));
-
-
-
-/* set one of brate compression ratio.  default is compression ratio of 11.  */
-int CDECL lame_set_brate(lame_global_flags *, int);
-int CDECL lame_get_brate(const lame_global_flags *);
-int CDECL lame_set_compression_ratio(lame_global_flags *, float);
-float CDECL lame_get_compression_ratio(const lame_global_flags *);
-
-/********************************************************************
- *  frame params
- ***********************************************************************/
-// mark as copyright.  default=0
-int CDECL lame_set_copyright(lame_global_flags *, int);
-int CDECL lame_get_copyright(const lame_global_flags *);
-
-// mark as original.  default=1
-int CDECL lame_set_original(lame_global_flags *, int);
-int CDECL lame_get_original(const lame_global_flags *);
-
-// error_protection.  Use 2 bytes from each fraome for CRC checksum. default=0
-int CDECL lame_set_error_protection(lame_global_flags *, int);
-int CDECL lame_get_error_protection(const lame_global_flags *);
-
-// padding_type.  0=pad no frames  1=pad all frames 2=adjust padding(default)
-int CDECL lame_set_padding_type(lame_global_flags *, int);
-int CDECL lame_get_padding_type(const lame_global_flags *);
-
-// MP3 'private extension' bit  Meaningless
-int CDECL lame_set_extension(lame_global_flags *, int);
-int CDECL lame_get_extension(const lame_global_flags *);
-
-// enforce strict ISO complience.  default=0
-int CDECL lame_set_strict_ISO(lame_global_flags *, int);
-int CDECL lame_get_strict_ISO(const lame_global_flags *);
- 
-
-/********************************************************************
- * quantization/noise shaping 
- ***********************************************************************/
-
-// disable the bit reservoir. For testing only. default=0
-int CDECL lame_set_disable_reservoir(lame_global_flags *, int);
-int CDECL lame_get_disable_reservoir(const lame_global_flags *);
-
-// select a different "best quantization" function. default=0 
-int CDECL lame_set_experimentalX(lame_global_flags *, int);
-int CDECL lame_get_experimentalX(const lame_global_flags *);
-
-// another experimental option.  for testing only
-int CDECL lame_set_experimentalY(lame_global_flags *, int);
-int CDECL lame_get_experimentalY(const lame_global_flags *);
-
-// another experimental option.  for testing only
-int CDECL lame_set_experimentalZ(lame_global_flags *, int);
-int CDECL lame_get_experimentalZ(const lame_global_flags *);
-
-// Naoki's psycho acoustic model.  default=0
-int CDECL lame_set_exp_nspsytune(lame_global_flags *, int);
-int CDECL lame_get_exp_nspsytune(const lame_global_flags *);
-
-
-
-/********************************************************************
- * VBR control
- ***********************************************************************/
-// Types of VBR.  default = vbr_off = CBR
-int CDECL lame_set_VBR(lame_global_flags *, vbr_mode);
-vbr_mode CDECL lame_get_exp_VBR(const lame_global_flags *);
-
-// VBR quality level.  0=highest  9=lowest 
-int CDECL lame_set_VBR_q(lame_global_flags *, int);
-int CDECL lame_get_VBR_q(const lame_global_flags *);
-
-// Ignored except for VBR=vbr_abr (ABR mode)
-int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int);
-int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *);
-
-int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int);
-int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *);
-
-int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int);
-int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *);
-
-// 1=stricetly enforce VBR_min_bitrate.  Normally it will be violated for
-// analog silence
-int CDECL lame_set_VBR_hard_min(lame_global_flags *, int);
-int CDECL lame_get_VBR_hard_min(const lame_global_flags *);
-
-
-/********************************************************************
- * Filtering control
- ***********************************************************************/
-// freq in Hz to apply lowpass. Default = 0 = lame chooses.  -1 = disabled
-int CDECL lame_set_lowpassfreq(lame_global_flags *, int);
-int CDECL lame_get_lowpassfreq(const lame_global_flags *);
-// width of transition band, in Hz.  Default = one polyphase filter band
-int CDECL lame_set_lowpasswidth(lame_global_flags *, int);
-int CDECL lame_get_lowpasswidth(const lame_global_flags *);
-
-// freq in Hz to apply highpass. Default = 0 = lame chooses.  -1 = disabled
-int CDECL lame_set_highpassfreq(lame_global_flags *, int);
-int CDECL lame_get_highpassfreq(const lame_global_flags *);
-// width of transition band, in Hz.  Default = one polyphase filter band
-int CDECL lame_set_highpasswidth(lame_global_flags *, int);
-int CDECL lame_get_highpasswidth(const lame_global_flags *);
-
-
-/********************************************************************
- * psycho acoustics and other arguments which you should not change 
- * unless you know what you are doing
- ***********************************************************************/
-// only use ATH for masking
-int CDECL lame_set_ATHonly(lame_global_flags *, int);
-int CDECL lame_get_ATHonly(const lame_global_flags *);
-
-// only use ATH for short blocks
-int CDECL lame_set_ATHshort(lame_global_flags *, int);
-int CDECL lame_get_ATHshort(const lame_global_flags *);
-
-// disable ATH
-int CDECL lame_set_noATH(lame_global_flags *, int);
-int CDECL lame_get_noATH(const lame_global_flags *);
-
-// select ATH formula
-int CDECL lame_set_ATHtype(lame_global_flags *, int);
-int CDECL lame_get_ATHtype(const lame_global_flags *);
-
-// lower ATH by this many db
-int CDECL lame_set_ATHlower(lame_global_flags *, float);
-float CDECL lame_get_ATHlower(const lame_global_flags *);
-
-// predictability limit (ISO tonality formula)
-int CDECL lame_set_cwlimit(lame_global_flags *, int);
-int CDECL lame_get_cwlimit(const lame_global_flags *);
-
-// allow blocktypes to differ between channels?
-// default: 0 for jstereo, 1 for stereo
-int CDECL lame_set_allow_diff_short(lame_global_flags *, int);
-int CDECL lame_get_allow_diff_short(const lame_global_flags *);
-
-// use temporal masking effect (default = 1)
-int CDECL lame_set_useTemporal(lame_global_flags *, int);
-int CDECL lame_get_useTemporal(const lame_global_flags *);
-
-// disable short blocks
-int CDECL lame_set_no_short_blocks(lame_global_flags *, int);
-int CDECL lame_get_no_short_blocks(const lame_global_flags *);
-
-/* Input PCM is emphased PCM (for instance from one of the rarely
-   emphased CDs), it is STRONGLY not recommended to use this, because
-   psycho does not take it into account, and last but not least many decoders
-   ignore these bits */
-int CDECL lame_set_emphasis(lame_global_flags *, int);
-int CDECL lame_get_emphasis(const lame_global_flags *);
-
-
-
-/************************************************************************/
-/* internal variables, cannot be set...                                 */
-/* provided because they may be of use to calling application           */
-/************************************************************************/
-// version  0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)    
-int CDECL lame_get_version(const lame_global_flags *);
-
-// encoder delay
-int CDECL lame_get_encoder_delay(const lame_global_flags *);
-
-// size of MPEG frame
-int CDECL lame_get_framesize(const lame_global_flags *);
-
-// number of frames encoded so far
-int CDECL lame_get_frameNum(const lame_global_flags *);
-
-// lame's estimate of the total number of frames to be encoded
-// only valid if calling program set num_samples 
-int CDECL lame_get_totalframes(const lame_global_flags *);
-
-
-
-
-
-
-
-
-/*
- * REQUIRED:
- * sets more internal configuration based on data provided above.
- * returns -1 if something failed.
- */
-int CDECL lame_init_params(lame_global_flags *);
-
-
-/*
- * OPTIONAL:
- * get the version number, in a string. of the form:  
- * "3.63 (beta)" or just "3.63". 
- */
-const /*@observer@*/ char*  CDECL get_lame_version       ( void );
-const /*@observer@*/ char*  CDECL get_lame_short_version ( void );
-const /*@observer@*/ char*  CDECL get_psy_version        ( void );
-const /*@observer@*/ char*  CDECL get_mp3x_version       ( void );
-const /*@observer@*/ char*  CDECL get_lame_url           ( void );
-
-/*
- * OPTIONAL:
- * get the version numbers in numerical form.
- */
-typedef struct {
-    /* generic LAME version */
-    int major;
-    int minor;
-    int alpha;               /* 0 if not an alpha version                  */
-    int beta;                /* 0 if not a beta version                    */
-
-    /* version of the psy model */
-    int psy_major;
-    int psy_minor;
-    int psy_alpha;           /* 0 if not an alpha version                  */
-    int psy_beta;            /* 0 if not a beta version                    */
-
-    /* compile time features */
-    const char *features;    /* Don't make assumptions about the contents! */
-} lame_version_t;
-void CDECL get_lame_version_numerical ( lame_version_t *const );
-
-
-/*
- * OPTIONAL:
- * print internal lame configuration to message handler
- */
-void CDECL lame_print_config(const lame_global_flags*  gfp);
-
-
-
-
-/*
- * input pcm data, output (maybe) mp3 frames.
- * This routine handles all buffering, resampling and filtering for you.
- * 
- * return code     number of bytes output in mp3buf. Can be 0 
- *                 -1:  mp3buf was too small
- *                 -2:  malloc() problem
- *                 -3:  lame_init_params() not called
- *                 -4:  psycho acoustic problems 
- *                 -5:  ogg cleanup encoding error
- *                 -6:  ogg frame encoding error
- *
- * The required mp3buf_size can be computed from num_samples, 
- * samplerate and encoding rate, but here is a worst case estimate:
- *
- * mp3buf_size in bytes = 1.25*num_samples + 7200
- *
- * I think a tighter bound could be:  (mt, March 2000)
- * MPEG1:
- *    num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512
- * MPEG2:
- *    num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256
- *
- * but test first if you use that!
- *
- * set mp3buf_size = 0 and LAME will not check if mp3buf_size is
- * large enough.
- *
- * NOTE:
- * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels
- * will be averaged into the L channel before encoding only the L channel
- * This will overwrite the data in buffer_l[] and buffer_r[].
- * 
-*/
-int CDECL lame_encode_buffer (
-        lame_global_flags*  gfp,           /* global context handle         */
-        const short int     buffer_l [],   /* PCM data for left channel     */
-        const short int     buffer_r [],   /* PCM data for right channel    */
-        const int           nsamples,      /* number of samples per channel */
-        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
-        const int           mp3buf_size ); /* number of valid octets in this
-                                              stream                        */
-
-/*
- * as above, but input has L & R channel data interleaved.
- * NOTE: 
- * num_samples = number of samples in the L (or R)
- * channel, not the total number of samples in pcm[]  
- */
-int CDECL lame_encode_buffer_interleaved(
-        lame_global_flags*  gfp,           /* global context handlei        */
-        short int           pcm[],         /* PCM data for left and right
-                                              channel, interleaved          */
-        int                 num_samples,   /* number of samples per channel,
-                                              _not_ number of samples in
-                                              pcm[]                         */
-        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
-        int                 mp3buf_size ); /* number of valid octets in this
-                                              stream                        */
-
-
-/* as lame_encode_buffer, but for 'float's */
-int CDECL lame_encode_buffer_float(
-        lame_global_flags*  gfp,           /* global context handle         */
-        const float     buffer_l [],       /* PCM data for left channel     */
-        const float     buffer_r [],       /* PCM data for right channel    */
-        const int           nsamples,      /* number of samples per channel */
-        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
-        const int           mp3buf_size ); /* number of valid octets in this
-                                              stream                        */
-
-/* as lame_encode_buffer, but for long's' */
-int CDECL lame_encode_buffer_long(
-        lame_global_flags*  gfp,           /* global context handle         */
-        const long     buffer_l [],       /* PCM data for left channel     */
-        const long     buffer_r [],       /* PCM data for right channel    */
-        const int           nsamples,      /* number of samples per channel */
-        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
-        const int           mp3buf_size ); /* number of valid octets in this
-                                              stream                        */
-
-
-
-
-
-
-/*
- * REQUIRED:
- * lame_encode_finish will flush the buffers and may return a 
- * final few mp3 frames.  'mp3buf' should be at least 7200 bytes long
- * to hold all possible emitted data.
- *
- * will also write id3v1 tags (if any) into the bitstream       
- *
- * return code = number of bytes output to mp3buf. Can be 0
- */
-int CDECL lame_encode_flush(
-        lame_global_flags *  gfp,    /* global context handle                 */
-        unsigned char*       mp3buf, /* pointer to encoded MP3 stream         */
-        int                  size);  /* number of valid octets in this stream */
-
-
-#ifdef KLEMM_44
- 
-int CDECL lame_encode_pcm (
-        lame_t* const   lame,      /* lame context handle                     */
-        octetstream_t*  os,        /* octet stream object                     */
-        const void*     pcm,       /* pointer to PCM data                     */
-        size_t          len,       /* samples per channel in this data stream */
-        uint32_t        flags );   /* PCM data description field              */
-
-int CDECL lame_encode_pcm_flush (
-        lame_t*        const  lame,  /* lame context handle                   */
-        octetstream_t* const  os );  /* octet stream object                   */
- 
-#endif /* KLEMM_44 */
-
-
-/*
- * OPTIONAL:    some simple statistics
- * a bitrate histogram to visualize the distribution of used frame sizes
- * a stereo mode histogram to visualize the distribution of used stereo
- *   modes, useful in joint-stereo mode only
- *   0: LR    left-right encoded
- *   1: LR-I  left-right and intensity encoded (currently not supported)
- *   2: MS    mid-side encoded
- *   3: MS-I  mid-side and intensity encoded (currently not supported)
- *
- * attention: don't call them after lame_encode_finish
- * suggested: lame_encode_flush -> lame_*_hist -> lame_close
- */
-
-/*@-fixedformalarray@*/ 
-void CDECL lame_bitrate_hist( 
-        const lame_global_flags *const gfp, 
-              int                      bitrate_count[14] );
-void CDECL lame_bitrate_kbps( 
-        const lame_global_flags *const gfp, 
-              int                      bitrate_kbps [14] );
-void CDECL lame_stereo_mode_hist( 
-        const lame_global_flags *const gfp, 
-              int                      stereo_mode_count[4] );
-
-void CDECL lame_bitrate_stereo_mode_hist ( 
-        const lame_global_flags*  gfp, 
-        int  bitrate_stmode_count [14] [4] );
-/*@=fixedformalarray@*/
-
-
-/*
- * OPTIONAL:
- * lame_mp3_tags_fid will append a Xing VBR tag to the mp3 file with file
- * pointer fid.  These calls perform forward and backwards seeks, so make
- * sure fid is a real file.  Make sure lame_encode_flush has been called,
- * and all mp3 data has been written to the file before calling this
- * function.
- * NOTE:
- * if VBR  tags are turned off by the user, or turned off by LAME because
- * the output is not a regular file, this call does nothing
-*/
-void CDECL lame_mp3_tags_fid(lame_global_flags *,FILE* fid);
-
-
-/*
- * REQUIRED:
- * final call to free all remaining buffers
- */
-int  CDECL lame_close (lame_global_flags *);
-
-/*
- * OBSOLETE:
- * lame_encode_finish combines lame_encode_flush() and lame_close() in
- * one call.  However, once this call is made, the statistics routines
- * will no longer work because the data will have been cleared
- */
-int CDECL lame_encode_finish(
-        lame_global_flags*  gfp,
-        unsigned char*      mp3buf,
-        int                 size );
-
-
-
-
-
-
-
-/*********************************************************************
- *
- * decoding 
- *
- * a simple interface to mpglib, part of mpg123, is also included if
- * libmp3lame is compiled with HAVE_MPGLIB
- *
- *********************************************************************/
-typedef struct {
-  int header_parsed;   /* 1 if header was parsed and following data was
-                          computed                                       */
-  int stereo;          /* number of channels                             */
-  int samplerate;      /* sample rate                                    */
-  int bitrate;         /* bitrate                                        */
-  int mode;            /* mp3 frame type                                 */
-  int mode_ext;        /* mp3 frame type                                 */
-  int framesize;       /* number of samples per mp3 frame                */
-
-  /* this data is only computed if mpglib detects a Xing VBR header */
-  unsigned long nsamp; /* number of samples in mp3 file.                 */
-  int totalframes;     /* total number of frames in mp3 file             */
-
-  /* this data is not currently computed by the mpglib routines */
-  int framenum;        /* frames decoded counter                         */
-} mp3data_struct;
-
-
-/* required call to initialize decoder */
-int CDECL lame_decode_init(void);
-
-/*********************************************************************
- * input 1 mp3 frame, output (maybe) pcm data.  
- * lame_decode() return code:
- *   -1: error
- *    0: need more data
- *  n>0: size of pcm output
- *********************************************************************/
-int CDECL lame_decode(
-        unsigned char *  mp3buf,
-        int              len,
-        short            pcm_l[],
-        short            pcm_r[] );
-
-/* same as lame_decode, and also returns mp3 header data */
-int CDECL lame_decode_headers(
-        unsigned char*   mp3buf,
-        int              len,
-        short            pcm_l[],
-        short            pcm_r[],
-        mp3data_struct*  mp3data );
-
-/* same as lame_decode, but returns at most one frame */
-int CDECL lame_decode1(
-        unsigned char*  mp3buf,
-        int             len,
-        short           pcm_l[],
-        short           pcm_r[] );
-
-/* same as lame_decode1, but returns at most one frame and mp3 header data */
-int CDECL lame_decode1_headers(
-        unsigned char*   mp3buf,
-        int              len,
-        short            pcm_l[],
-        short            pcm_r[],
-        mp3data_struct*  mp3data );
-
-#if 0
-/* Also useful for decoding is the ability to parse Xing VBR headers: */
-#define NUMTOCENTRIES 100
-typedef struct
-{
-  int		h_id;			/* from MPEG header, 0=MPEG2, 1=MPEG1 */
-  int		samprate;		/* determined from MPEG header        */
-  int		flags;			/* from Vbr header data               */
-  int		frames;			/* total bit stream frames from Vbr
-                                           header data                        */
-  int		bytes;			/* total bit stream bytes from Vbr
-                                           header data                        */
-  int		vbr_scale;		/* encoded vbr scale from Vbr header
-                                           data                               */
-  unsigned char	toc[NUMTOCENTRIES];	/* may be NULL if toc not desired     */
-  int           headersize;             /* size of VBR header, in bytes       */
-}   VBRTAGDATA;
-
-int CDECL GetVbrTag(
-        VBRTAGDATA*     pTagData,
-        unsigned char*  buf);
-#endif
-
-
-
-
-
-
-
-/*********************************************************************
- *
- * id3tag stuff
- *
- *********************************************************************/
-
-/*
- * id3tag.h -- Interface to write ID3 version 1 and 2 tags.
- *
- * Copyright (C) 2000 Don Melton.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/* utility to obtain alphabetically sorted list of genre names with numbers */
-extern void id3tag_genre_list(
-        void (*handler)(int, const char *, void *),
-        void*  cookie);
-
-extern void id3tag_init   (lame_global_flags *gfp);
-
-/* force addition of version 2 tag */
-extern void id3tag_add_v2   (lame_global_flags *gfp);
-
-/* add only a version 1 tag */
-extern void id3tag_v1_only  (lame_global_flags *gfp);
-
-/* add only a version 2 tag */
-extern void id3tag_v2_only  (lame_global_flags *gfp);
-
-/* pad version 1 tag with spaces instead of nulls */
-extern void id3tag_space_v1 (lame_global_flags *gfp);
-
-/* pad version 2 tag with extra 128 bytes */
-extern void id3tag_pad_v2   (lame_global_flags *gfp);
-
-extern void id3tag_set_title(
-        lame_global_flags*  gfp,
-        const char*         title );
-extern void id3tag_set_artist(
-        lame_global_flags*  gfp,
-        const char*         artist );
-extern void id3tag_set_album(
-        lame_global_flags*  gfp,
-        const char*         album );
-extern void id3tag_set_year(
-        lame_global_flags*  gfp,
-        const char*         year );
-extern void id3tag_set_comment(
-        lame_global_flags*  gfp,
-        const char*         comment );
-extern void id3tag_set_track(
-        lame_global_flags*  gfp,
-        const char*         track );
-
-/* return non-zero result if genre name or number is invalid */
-extern int id3tag_set_genre(
-        lame_global_flags*  gfp,
-        const char*         genre );
-
-/***********************************************************************
-*
-*  list of valid bitrates [kbps] & sample frequencies [Hz].
-*  first index: 0: MPEG-2   values  (sample frequencies 16...24 kHz) 
-*               1: MPEG-1   values  (sample frequencies 32...48 kHz)
-*               2: MPEG-2.5 values  (sample frequencies  8...12 kHz)
-***********************************************************************/
-extern const int      bitrate_table    [3] [16];
-extern const int      samplerate_table [3] [ 4];
-
-
-
-/* maximum size of mp3buffer needed if you encode at most 1152 samples for
-   each call to lame_encode_buffer.  see lame_encode_buffer() below  
-   (LAME_MAXMP3BUFFER is now obsolete)  */
-#define LAME_MAXMP3BUFFER   16384
-
-
-#if defined(__cplusplus)
-}
-#endif
-#endif /* LAME_LAME_H */
--- a/sys/src/games/mp3enc/lameerror.h
+++ /dev/null
@@ -1,26 +1,0 @@
-/*
- *  A collection of LAME Error Codes
- *
- *  Please use the constants defined here instead of some arbitrary
- *  values. Currently the values starting at -10 to avoid intersection
- *  with the -1, -2, -3 and -4 used in the current code.
- *
- *  May be this should be a part of the include/lame.h.
- */
-
-typedef enum {
-    LAME_OKAY             =   0,
-    LAME_NOERROR          =   0,
-    LAME_GENERICERROR     =  -1,
-    LAME_NOMEM            = -10,
-    LAME_BADBITRATE       = -11,
-    LAME_BADSAMPFREQ      = -12,
-    LAME_INTERNALERROR    = -13,
-    
-    FRONTEND_READERROR    = -80,
-    FRONTEND_WRITEERROR   = -81,
-    FRONTEND_FILETOOLARGE = -82,
-    
-} lame_errorcodes_t;
-
-/* end of lameerror.h */
--- a/sys/src/games/mp3enc/lametime.c
+++ /dev/null
@@ -1,89 +1,0 @@
-/*
- *	Lame time routines source file
- *
- *	Copyright (c) 2000 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: lametime.c,v 1.10 2001/02/26 18:57:20 markt Exp $ */
-
-/*
- * name:        GetCPUTime ( void )
- *
- * description: returns CPU time used by the process
- * input:       none
- * output:      time in seconds
- * known bugs:  may not work in SMP and RPC
- * conforming:  ANSI C
- *
- * There is some old difficult to read code at the end of this file.
- * Can someone integrate this into this function (if useful)?
- */
-
-#define _BSD_EXTENSION
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-
-#include "lametime.h"
-
-double GetCPUTime ( void )
-{
-    return clock () / (double) CLOCKS_PER_SEC;
-}
-
-/*
- * name:        GetRealTime ( void )
- *
- * description: returns real (human) time elapsed relative to a fixed time (mostly 1970-01-01 00:00:00)
- * input:       none
- * output:      time in seconds
- * known bugs:  bad precision with time()
- */
-
-double GetRealTime ( void )			/* conforming:  SVr4, BSD 4.3 */
-{
-    struct timeval  t;
-
-    if ( 0 != gettimeofday (&t, NULL) )
-        assert (0);
-    return t.tv_sec + 1.e-6 * t.tv_usec;
-} 
-
-int  lame_set_stream_binary_mode ( FILE* const fp )
-{
-    return 0;
-}
-
-off_t  lame_get_file_size ( const char* const filename )
-{
-    struct stat       sb;
-
-    if ( 0 == stat ( filename, &sb ) )
-        return sb.st_size;
-    return (off_t) -1;
-}
--- a/sys/src/games/mp3enc/lametime.h
+++ /dev/null
@@ -1,35 +1,0 @@
-/*
- *	Lame time routines include file
- *
- *	Copyright (c) 2000 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_LAMETIME_H
-#define LAME_LAMETIME_H
-
-#include <sys/types.h>
-#include "lame.h"
-
-extern double  GetCPUTime  ( void );
-extern double  GetRealTime ( void );
-
-extern int     lame_set_stream_binary_mode ( FILE* const fp );
-extern off_t   lame_get_file_size          ( const char* const filename );
-
-#endif /* LAME_LAMETIME_H */
-                              
--- a/sys/src/games/mp3enc/machine.h
+++ /dev/null
@@ -1,147 +1,0 @@
-/*
- *	Machine dependent defines/includes for LAME.
- *
- *	Copyright (c) 1999 A.L. Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_MACHINE_H
-#define LAME_MACHINE_H
-
-#include <stdio.h>
-#include <memory.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef HAVE_STRCHR
-#  define strchr index
-#  define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-#  define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#if  defined(__riscos__)  &&  defined(FPA10)
-# include "ymath.h"
-#else
-# include <math.h>
-#endif
-
-#include <ctype.h>
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if defined(macintosh)
-# include <types.h>
-# include <stat.h>
-#else
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif
-
-/* 
- * 3 different types of pow() functions:
- *   - table lookup
- *   - pow()
- *   - exp()   on some machines this is claimed to be faster than pow()
- */
-
-#define POW20(x)  pow20[x]
-//#define POW20(x)  pow(2.0,((double)(x)-210)*.25)
-//#define POW20(x)  exp( ((double)(x)-210)*(.25*LOG2) )
-
-#define IPOW20(x)  ipow20[x]
-//#define IPOW20(x)  exp( -((double)(x)-210)*.1875*LOG2 )
-//#define IPOW20(x)  pow(2.0,-((double)(x)-210)*.1875)
-
-
-/* in case this is used without configure */
-#ifndef inline
-# define inline
-#endif
-/* compatibility */
-#define INLINE inline
-
-#if defined(_MSC_VER)
-# undef inline
-# define inline _inline
-#elif defined(__SASC) || defined(__GNUC__)
-/* if __GNUC__ we always want to inline, not only if the user requests it */
-# undef inline
-# define inline __inline
-#endif
-
-#if    defined(_MSC_VER)
-# pragma warning( disable : 4244 )
-//# pragma warning( disable : 4305 )
-#endif
-
-/*
- * FLOAT    for variables which require at least 32 bits
- * FLOAT8   for variables which require at least 64 bits
- *
- * On some machines, 64 bit will be faster than 32 bit.  Also, some math
- * routines require 64 bit float, so setting FLOAT=float will result in a
- * lot of conversions.
- */
-
-#if ( defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__) )
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-#else
-# ifndef FLOAT
-typedef float   FLOAT;
-# endif
-#endif
-
-#ifndef FLOAT8  /* NOTE: RH: 7/00:  if FLOAT8=float, it breaks resampling and VBR code */
-typedef double  FLOAT8;
-#endif
-
-/* Various integer types */
-
-#if   defined _WIN32 && !defined __CYGWIN__
-typedef unsigned char	u_char;
-#elif defined __DECALPHA__
-// do nothing
-#elif defined OS_AMIGAOS
-// do nothing
-#elif defined __DJGPP__
-typedef unsigned char	u_char;
-#elif !defined __GNUC__  ||  defined __STRICT_ANSI__
-typedef unsigned char	u_char;
-#else
-// do nothing
-#endif
-
-/* sample_t must be floating point, at least 32 bits */
-typedef FLOAT     sample_t;
-typedef sample_t  stereo_t [2];
-
-#endif
-
-/* end of machine.h */
--- a/sys/src/games/mp3enc/main.c
+++ /dev/null
@@ -1,293 +1,0 @@
-/* mp3enc - encode audio files in MP3 format */
-
-/*
- *	Command line frontend program
- *
- *	Copyright (c) 1999 Mark Taylor
- *                    2000 Takehiro TOMIANGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: main.c,v 1.46 2001/03/11 11:24:25 aleidinger Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <memory.h>
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/*
- main.c is example code for how to use libmp3lame.a.  To use this library,
- you only need the library and lame.h.  All other .h files are private
- to the library.
-*/
-#include "lame.h"
-
-#include "brhist.h"
-#include "parse.h"
-#include "main.h"
-#include "get_audio.h"
-#include "timestatus.h"
-
-/*
-*
-* main
-*
-* PURPOSE:  MPEG-1,2 Layer III encoder with GPSYCHO
-* psychoacoustic model.
-*
-*/
-
-int
-parse_args_from_string(lame_global_flags *const gfp, const char *p)
-{
-	/* Quick & very Dirty */
-	int c = 0, ret;
-	char *f, *q, *r[128];
-
-	if (p == NULL || *p == '\0')
-		return 0;
-
-	f = q = malloc(strlen(p) + 1);
-	strcpy (q, p);
-
-	r[c++] = "lhama";
-	for (;;) {
-		r[c++] = q;
-		while (*q != ' ' && *q != '\0')
-			q++;
-		if (*q == '\0')
-			break;
-		*q++ = '\0';
-	}
-	r[c] = NULL;
-
-	ret = parse_args(gfp, c, r);
-	free(f);
-	return ret;
-}
-
-int
-main(int argc, char **argv)
-{
-	int i, iread, imp3, ret;
-	short Buffer[2][1152];
-	unsigned char mp3buffer[LAME_MAXMP3BUFFER];
-	FILE *outf;
-	lame_global_flags *gf;
-	static char inPath[]  = "-";
-	static char outPath[] = "-";
-	static const char *mode_names[2][4] = {
-		{ "stereo", "j-stereo", "dual-ch", "single-ch" },
-		{ "stereo", "force-ms", "dual-ch", "single-ch" }
-	};
-
-	/* initialize libmp3lame */
-	input_format = sf_unknown;
-	if (NULL == (gf = lame_init()) ) {
-		fprintf(stderr, "mp3enc: fatal error during initialization\n");
-		return 1;
-	}
-	/*
-	 * parse the command line arguments, setting various flags in the
-	 * struct 'gf'.  If you want to parse your own arguments,
-	 * or call libmp3lame from a program which uses a GUI to set arguments,
-	 * skip this call and set the values of interest in the gf struct.
-	 * (see the file API & lame.h for documentation about these parameters)
-	 */
-	parse_args_from_string(gf, getenv("LAMEOPT"));
-	ret = parse_args(gf, argc, argv);
-	if (ret < 0)
-		return ret == -2? 0: 1;
-	if (update_interval < 0.)
-		update_interval = 2.;
-
-	/*
-	 * open the wav/aiff/raw pcm or mp3 input file.  This call will
-	 * open the file, try to parse the headers and
-	 * set gf.samplerate, gf.num_channels, gf.num_samples.
-	 * if you want to do your own file input, skip this call and set
-	 * samplerate, num_channels and num_samples yourself.
-	 */
-	init_infile(gf, inPath);
-	if ((outf = init_outfile(outPath, lame_get_decode_only(gf))) == NULL) {
-		fprintf(stderr, "Can't init outfile '%s'\n", outPath);
-		return -42;
-	}
-
-	/*
-	 * Now that all the options are set, lame needs to analyze them and
-	 * set some more internal options and check for problems
-	 */
-	i = lame_init_params(gf);
-	if (i < 0) {
-		if (i == -1)
-			display_bitrates(stderr);
-		fprintf(stderr, "fatal error during initialization\n");
-		return 1;
-	}
-
-	if (silent || gf->VBR == vbr_off)
-		brhist = 0;			/* turn off VBR histogram */
-
-#ifdef BRHIST
-	if (brhist) {
-		if (brhist_init(gf, gf->VBR_min_bitrate_kbps,
-		    gf->VBR_max_bitrate_kbps))
-			/* fail to initialize */
-			brhist = 0;
-	} else
-		brhist_init(gf, 128, 128);	/* Dirty hack */
-#endif
-
-
-#ifdef HAVE_VORBIS
-	if (lame_get_ogg( gf ) ) {
-		lame_encode_ogg_init(gf);
-		gf->VBR = vbr_off;	/* ignore lame's various VBR modes */
-	}
-#endif
-	if (0 == lame_get_decode_only( gf ) && silent < 10 ) {
-		if (0)
-			fprintf(stderr, "Encoding as %g kHz ",
-				1.e-3 * lame_get_out_samplerate( gf ) );
-
-		if (lame_get_ogg(gf)) {
-			if (0)
-				fprintf(stderr, "VBR Ogg Vorbis\n" );
-		} else {
-			const char *appendix = "";
-
-			switch (gf->VBR ) {
-			case vbr_mt:
-			case vbr_rh:
-			case vbr_mtrh:
-				appendix = "ca. ";
-				if (0)
-					fprintf(stderr, "VBR(q=%i)", gf->VBR_q );
-				break;
-			case vbr_abr:
-				if (0)
-					fprintf(stderr, "average %d kbps",
-						gf->VBR_mean_bitrate_kbps);
-				break;
-			default:
-				if (0)
-					fprintf(stderr, "%3d Kb/s", gf->brate);
-				break;
-			}
-			if (0)
-				fprintf(stderr, " %s MPEG-%u%s Layer III (%s%gx) qval=%i\n",
-					mode_names[gf->force_ms][gf->mode],
-					2 - gf->version,
-					lame_get_out_samplerate(gf) < 16000?
-					".5": "", appendix,
-					0.1 * (int)(10.*gf->compression_ratio + 0.5),
-					lame_get_quality(gf));
-		}
-		fflush(stderr);
-	}
-
-	if (lame_get_decode_only(gf))
-		/* decode an mp3 file to a .wav */
-		if (mp3_delay_set)
-			lame_decoder(gf, outf, mp3_delay, inPath, outPath);
-		else
-			lame_decoder(gf, outf, gf->encoder_delay, inPath, outPath);
-	else {
-		/* encode until we hit eof */
-		do {
-			/* read in 'iread' samples */
-			iread = get_audio(gf, Buffer);
-
-			/* status display  */
-			if (!silent)
-				if (update_interval > 0)
-					timestatus_klemm(gf);
-				else {
-					if (0 == gf->frameNum % 50) {
-#ifdef BRHIST
-						brhist_jump_back();
-#endif
-						timestatus(lame_get_out_samplerate(gf),
-							gf->frameNum,
-							gf->totalframes,
-							gf->framesize );
-#ifdef BRHIST
-						if (brhist)
-							brhist_disp(gf);
-#endif
-					}
-				}
-
-			/* encode */
-			imp3 = lame_encode_buffer(gf, Buffer[0], Buffer[1], iread,
-				mp3buffer, sizeof(mp3buffer));
-
-			/* was our output buffer big enough? */
-			if (imp3 < 0) {
-				if (imp3 == -1)
-					fprintf(stderr, "mp3 buffer is not big enough... \n");
-				else
-					fprintf(stderr, "mp3 internal error:  error code=%i\n", imp3);
-				return 1;
-			}
-
-			if (fwrite(mp3buffer, 1, imp3, outf) != imp3) {
-				fprintf(stderr, "Error writing mp3 output \n");
-				return 1;
-			}
-		} while (iread);
-		/* may return one more mp3 frame */
-		imp3 = lame_encode_flush(gf, mp3buffer, sizeof(mp3buffer));
-		if (imp3 < 0) {
-			if (imp3 == -1)
-				fprintf(stderr, "mp3 buffer is not big enough... \n");
-			else
-				fprintf(stderr, "mp3 internal error:  error code=%i\n", imp3);
-			return 1;
-
-		}
-		if (!silent) {
-#ifdef BRHIST
-			brhist_jump_back();
-#endif
-			timestatus(lame_get_out_samplerate(gf),
-				gf->frameNum,
-				gf->totalframes,
-				gf->framesize);
-#ifdef BRHIST
-			if (brhist)
-				brhist_disp(gf);
-			brhist_disp_total(gf);
-#endif
-			timestatus_finish();
-		}
-
-		fwrite(mp3buffer, 1, imp3, outf);
-		lame_mp3_tags_fid(gf, outf);	/* add VBR tags to mp3 file */
-		lame_close(gf);
-		fclose(outf);
-	}
-	close_infile();
-	exit(0);
-}
--- a/sys/src/games/mp3enc/main.h
+++ /dev/null
@@ -1,45 +1,0 @@
-/*
- *	Command line frontend program
- *
- *	Copyright (c) 1999 Mark Taylor
- *                    2000 Takehiro TOMIANGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#include "get_audio.h"        
-
-#define         MAX_NAME_SIZE           1000
-
-
-/* GLOBAL VARIABLES used by parse.c and main.c.  
-   instantiated in parce.c.  ugly, ugly */
-extern sound_file_format input_format;   
-extern int swapbytes;              /* force byte swapping   default=0*/
-extern int silent;
-extern int brhist;
-extern int mp3_delay;              /* for decoder only */
-extern int mp3_delay_set;          /* for decoder only */
-extern float update_interval;      /* to use Frank's time status display */
-
-
-
-#define         Min(A, B)       ((A) < (B) ? (A) : (B))
-#define         Max(A, B)       ((A) > (B) ? (A) : (B))
-
-#define         MAX_U_32_NUM            0xFFFFFFFF
-
--- a/sys/src/games/mp3enc/memory.h
+++ /dev/null
@@ -1,2 +1,0 @@
-#include <string.h>
-#include <stdlib.h>
--- a/sys/src/games/mp3enc/mkfile
+++ /dev/null
@@ -1,65 +1,0 @@
-</$objtype/mkfile
-
-TARG=mp3enc
-OFILES=\
-	VbrTag.$O\
-	bitstream.$O\
-	encoder.$O\
-	fft.$O\
-	get_audio.$O\
-	id3tag.$O\
-	lame.$O\
-	lametime.$O\
-	main.$O\
-	mpglib_interface.$O\
-	newmdct.$O\
-	parse.$O\
-	pcm.$O\
-	portableio.$O\
-	psymodel.$O\
-	quantize.$O\
-	quantize_pvt.$O\
-	reservoir.$O\
-	set_get.$O\
-	tables.$O\
-	takehiro.$O\
-	timestatus.$O\
-	tools.$O\
-	util.$O\
-	vbrquantize.$O\
-	version.$O\
-	vorbis_interface.$O\
-
-BIN=/$objtype/bin/games
-# need a way to ignore this on non-386en
-# LIB=/$objtype/lib/lib387.a
-</sys/src/cmd/mkone
-
-CC=pcc
-CFLAGS=\
-	-I.\
-	-D_POSIX_SOURCE\
-	-DSTDC_HEADERS\
-	-DUSE_LAYER_1\
-	-DUSE_LAYER_2\
-	-D'CHAR_BIT=8'\
-	-D'SIZEOF_DOUBLE=8'\
-	-D'SIZEOF_FLOAT=4'\
-	-D'SIZEOF_INT=4'\
-	-D'SIZEOF_LONG=4'\
-	-D'SIZEOF_LONG_DOUBLE=8'\
-	-D'SIZEOF_LONG_LONG=8'\
-	-D'SIZEOF_SHORT=2'\
-	-D'SIZEOF_UNSIGNED_INT=4'\
-	-D'SIZEOF_UNSIGNED_LONG=4'\
-	-D'SIZEOF_UNSIGNED_LONG_LONG=8'\
-	-D'SIZEOF_UNSIGNED_SHORT=2'\
-	-+ -c
-LDFLAGS= # -p
-
-testcase.new.mp3: testcase.wav $O.out
-	$O.out --nores -h testcase.wav testcase.new.mp3
-
-test:V: testcase.new.mp3
-	cmp -l testcase.new.mp3 testcase.mp3 | wc -l
-	rm testcase.new.mp3
--- a/sys/src/games/mp3enc/mpglib_interface.c
+++ /dev/null
@@ -1,185 +1,0 @@
-/* $Id: mpglib_interface.c,v 1.18 2001/01/06 01:00:33 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_MPGLIB
-
-#include <limits.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "interface.h"
-#include "lame.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-MPSTR           mp;
-plotting_data*  mpg123_pinfo = NULL;
-
-
-int lame_decode_init( void )
-{
-    InitMP3 ( &mp );
-    return 0;
-}
-
-/*
- * For lame_decode:  return code
- * -1     error
- *  0     ok, but need more data before outputing any samples
- *  n     number of samples output.  either 576 or 1152 depending on MP3 file.
- */
- 
-int lame_decode1_headers(
-        unsigned char*   buffer,
-        int              len,
-        short            pcm_l [],
-        short            pcm_r [],
-        mp3data_struct*  mp3data )
-{
-    static const int smpls [2] [4] = {
-    /* Layer   I    II   III */
-        { 0, 384, 1152, 1152 }, /* MPEG-1     */
-        { 0, 384, 1152,  576 }  /* MPEG-2(.5) */
-    };
-    static char        out  [8192];
-    signed short int*  p = (signed short int*) out;
-    int                processed_bytes;
-    int                processed_samples;  // processed samples per channel
-    int                ret;
-    int                i;
-
-    mp3data->header_parsed = 0;
-  
-    ret = decodeMP3 ( &mp, buffer, len, (char*)p, sizeof(out), &processed_bytes );
-
-    if ( mp.header_parsed ) {
-        mp3data->header_parsed = 1;
-        mp3data->stereo        = mp.fr.stereo;
-        mp3data->samplerate    = freqs [mp.fr.sampling_frequency];
-        mp3data->mode          = mp.fr.mode;
-        mp3data->mode_ext      = mp.fr.mode_ext;
-        mp3data->framesize     = smpls [mp.fr.lsf] [mp.fr.lay];
-	
-        if (mp.fsizeold > 0)      /* works for free format and fixed, no overrun, temporal results are < 400.e6 */
-            mp3data->bitrate   = 8 * (4 + mp.fsizeold) * mp3data->samplerate /
-	                         ( 1.e3 * mp3data->framesize ) + 0.5;
-        else
-            mp3data->bitrate   = tabsel_123 [mp.fr.lsf] [mp.fr.lay-1] [mp.fr.bitrate_index];
-
-        if (mp.num_frames>0) {
-	  /* Xing VBR header found and num_frames was set */
-	  mp3data->totalframes = mp.num_frames;
-          mp3data->nsamp=mp3data->framesize * mp.num_frames;  
-	}
-    }
-
-    switch ( ret ) {
-    case MP3_OK:
-        switch ( mp.fr.stereo ) {
-	case 1:
-            processed_samples = processed_bytes >> 1;
-            for ( i = 0; i < processed_samples; i++ ) 
-	        pcm_l [i] = *p++;
-	    break;
-	case 2:
-            processed_samples = processed_bytes >> 2;
-            for ( i = 0; i < processed_samples; i++ ) {
-	        pcm_l [i] = *p++;
-		pcm_r [i] = *p++;
-	    }
-	    break;
-	default:
-            processed_samples = -1;
-	    assert (0);
-	    break;
-        }    
-	break;
-	
-    case MP3_NEED_MORE:
-        processed_samples = 0;
-	break;
-	
-    default:
-        assert (0);
-    case MP3_ERR: 
-        processed_samples = -1;
-	break;
-	
-    }
-  
-    //  printf ( "ok, more, err:  %i %i %i\n", MP3_OK, MP3_NEED_MORE, MP3_ERR );
-    //  printf ( "ret = %i out=%i\n", ret, totsize );
-    return processed_samples;
-}
-
-
-/*
- * For lame_decode:  return code
- *  -1     error
- *   0     ok, but need more data before outputing any samples
- *   n     number of samples output.  Will be at most one frame of
- *         MPEG data.  
- */
- 
-int lame_decode1( 
-        unsigned char*  buffer,
-	int    len,
-	short  pcm_l [],
-	short  pcm_r [] )
-{
-  mp3data_struct mp3data;
-  
-  return lame_decode1_headers ( buffer, len, pcm_l, pcm_r, &mp3data );
-}
-
-
-/*
- * For lame_decode:  return code
- *  -1     error
- *   0     ok, but need more data before outputing any samples
- *   n     number of samples output.  a multiple of 576 or 1152 depending on MP3 file.
- */
- 
-int lame_decode_headers( 
-        unsigned char*   buffer,
-	int              len,
-	short            pcm_l [],
-	short            pcm_r [],
-        mp3data_struct*  mp3data )
-{
-    int  ret;
-    int  totsize = 0;   // number of decoded samples per channel
-
-    while (1) {
-        switch ( ret = lame_decode1_headers ( buffer, len, pcm_l+totsize, pcm_r+totsize, mp3data ) ) {
-        case -1: return ret;
-        case  0: return totsize;
-        default: totsize += ret;
-                 len      = 0;  /* future calls to decodeMP3 are just to flush buffers */
-                 break;
-        }
-    }
-}
-
-
-int lame_decode(
-        unsigned char*  buffer,
-	int    len,
-	short  pcm_l [],
-	short  pcm_r [] )
-{
-    mp3data_struct  mp3data;
-    
-    return lame_decode_headers ( buffer, len, pcm_l, pcm_r, &mp3data );
-}
-
-
-#endif
-
-/* end of mpglib_interface.c */
--- a/sys/src/games/mp3enc/newmdct.c
+++ /dev/null
@@ -1,792 +1,0 @@
-/*
- *	MP3 window subband -> subband filtering -> mdct routine
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- *         Special Thanks to Patrick De Smet for your advices.
- */
-
-/* $Id: newmdct.c,v 1.25 2001/01/17 09:54:20 robert Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "util.h"
-#include "l3side.h"
-#include "newmdct.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-#define SCALE (32768.0/ 2.384e-06)
-
-#ifndef USE_GOGO_SUBBAND
-static const FLOAT8 enwindow[] = 
-{
-      -4.77e-07*0.740951125354959/2.384e-06,  1.03951e-04*0.740951125354959/2.384e-06,  9.53674e-04*0.740951125354959/2.384e-06, 2.841473e-03*0.740951125354959/2.384e-06,
-  3.5758972e-02*0.740951125354959/2.384e-06, 3.401756e-03*0.740951125354959/2.384e-06,  9.83715e-04*0.740951125354959/2.384e-06,   9.9182e-05*0.740951125354959/2.384e-06, /* 15*/
-     1.2398e-05*0.740951125354959/2.384e-06,  1.91212e-04*0.740951125354959/2.384e-06, 2.283096e-03*0.740951125354959/2.384e-06,1.6994476e-02*0.740951125354959/2.384e-06,
- -1.8756866e-02*0.740951125354959/2.384e-06,-2.630711e-03*0.740951125354959/2.384e-06, -2.47478e-04*0.740951125354959/2.384e-06,  -1.4782e-05*0.740951125354959/2.384e-06,
-      9.063471690191471e-01,
-      1.960342806591213e-01,
-
-
-      -4.77e-07*0.773010453362737/2.384e-06,  1.05858e-04*0.773010453362737/2.384e-06,  9.30786e-04*0.773010453362737/2.384e-06, 2.521515e-03*0.773010453362737/2.384e-06,
-  3.5694122e-02*0.773010453362737/2.384e-06, 3.643036e-03*0.773010453362737/2.384e-06,  9.91821e-04*0.773010453362737/2.384e-06,   9.6321e-05*0.773010453362737/2.384e-06, /* 14*/
-     1.1444e-05*0.773010453362737/2.384e-06,  1.65462e-04*0.773010453362737/2.384e-06, 2.110004e-03*0.773010453362737/2.384e-06,1.6112804e-02*0.773010453362737/2.384e-06,
- -1.9634247e-02*0.773010453362737/2.384e-06,-2.803326e-03*0.773010453362737/2.384e-06, -2.77042e-04*0.773010453362737/2.384e-06,  -1.6689e-05*0.773010453362737/2.384e-06,
-      8.206787908286602e-01,
-      3.901806440322567e-01,
-
-
-      -4.77e-07*0.803207531480645/2.384e-06,  1.07288e-04*0.803207531480645/2.384e-06,  9.02653e-04*0.803207531480645/2.384e-06, 2.174854e-03*0.803207531480645/2.384e-06,
-  3.5586357e-02*0.803207531480645/2.384e-06, 3.858566e-03*0.803207531480645/2.384e-06,  9.95159e-04*0.803207531480645/2.384e-06,   9.3460e-05*0.803207531480645/2.384e-06, /* 13*/
-     1.0014e-05*0.803207531480645/2.384e-06,  1.40190e-04*0.803207531480645/2.384e-06, 1.937389e-03*0.803207531480645/2.384e-06,1.5233517e-02*0.803207531480645/2.384e-06,
- -2.0506859e-02*0.803207531480645/2.384e-06,-2.974033e-03*0.803207531480645/2.384e-06, -3.07560e-04*0.803207531480645/2.384e-06,  -1.8120e-05*0.803207531480645/2.384e-06,
-      7.416505462720353e-01,
-      5.805693545089249e-01,
-
-
-      -4.77e-07*0.831469612302545/2.384e-06,  1.08242e-04*0.831469612302545/2.384e-06,  8.68797e-04*0.831469612302545/2.384e-06, 1.800537e-03*0.831469612302545/2.384e-06,
-  3.5435200e-02*0.831469612302545/2.384e-06, 4.049301e-03*0.831469612302545/2.384e-06,  9.94205e-04*0.831469612302545/2.384e-06,   9.0599e-05*0.831469612302545/2.384e-06, /* 12*/
-      9.060e-06*0.831469612302545/2.384e-06,  1.16348e-04*0.831469612302545/2.384e-06, 1.766682e-03*0.831469612302545/2.384e-06,1.4358521e-02*0.831469612302545/2.384e-06,
- -2.1372318e-02*0.831469612302545/2.384e-06, -3.14188e-03*0.831469612302545/2.384e-06, -3.39031e-04*0.831469612302545/2.384e-06,  -1.9550e-05*0.831469612302545/2.384e-06,
-      6.681786379192989e-01,
-      7.653668647301797e-01,
-
-
-      -4.77e-07*0.857728610000272/2.384e-06,  1.08719e-04*0.857728610000272/2.384e-06,  8.29220e-04*0.857728610000272/2.384e-06, 1.399517e-03*0.857728610000272/2.384e-06,
-  3.5242081e-02*0.857728610000272/2.384e-06, 4.215240e-03*0.857728610000272/2.384e-06,  9.89437e-04*0.857728610000272/2.384e-06,   8.7261e-05*0.857728610000272/2.384e-06, /* 11*/
-      8.106e-06*0.857728610000272/2.384e-06,   9.3937e-05*0.857728610000272/2.384e-06, 1.597881e-03*0.857728610000272/2.384e-06,1.3489246e-02*0.857728610000272/2.384e-06,
- -2.2228718e-02*0.857728610000272/2.384e-06,-3.306866e-03*0.857728610000272/2.384e-06, -3.71456e-04*0.857728610000272/2.384e-06,  -2.1458e-05*0.857728610000272/2.384e-06,
-      5.993769336819237e-01,
-      9.427934736519954e-01,
-
-
-      -4.77e-07*0.881921264348355/2.384e-06,  1.08719e-04*0.881921264348355/2.384e-06,   7.8392e-04*0.881921264348355/2.384e-06,  9.71317e-04*0.881921264348355/2.384e-06,
-  3.5007000e-02*0.881921264348355/2.384e-06, 4.357815e-03*0.881921264348355/2.384e-06,  9.80854e-04*0.881921264348355/2.384e-06,   8.3923e-05*0.881921264348355/2.384e-06, /* 10*/
-      7.629e-06*0.881921264348355/2.384e-06,   7.2956e-05*0.881921264348355/2.384e-06, 1.432419e-03*0.881921264348355/2.384e-06,1.2627602e-02*0.881921264348355/2.384e-06,
- -2.3074150e-02*0.881921264348355/2.384e-06,-3.467083e-03*0.881921264348355/2.384e-06, -4.04358e-04*0.881921264348355/2.384e-06,  -2.3365e-05*0.881921264348355/2.384e-06,
-      5.345111359507916e-01,
-      1.111140466039205e+00,
-
-
-      -9.54e-07*0.903989293123443/2.384e-06,  1.08242e-04*0.903989293123443/2.384e-06,  7.31945e-04*0.903989293123443/2.384e-06,  5.15938e-04*0.903989293123443/2.384e-06,
-  3.4730434e-02*0.903989293123443/2.384e-06, 4.477024e-03*0.903989293123443/2.384e-06,  9.68933e-04*0.903989293123443/2.384e-06,   8.0585e-05*0.903989293123443/2.384e-06, /* 9*/
-      6.676e-06*0.903989293123443/2.384e-06,   5.2929e-05*0.903989293123443/2.384e-06, 1.269817e-03*0.903989293123443/2.384e-06,1.1775017e-02*0.903989293123443/2.384e-06,
- -2.3907185e-02*0.903989293123443/2.384e-06,-3.622532e-03*0.903989293123443/2.384e-06, -4.38213e-04*0.903989293123443/2.384e-06,  -2.5272e-05*0.903989293123443/2.384e-06,
-      4.729647758913199e-01,
-      1.268786568327291e+00,
-
-
-      -9.54e-07*0.92387953251128675613/2.384e-06,  1.06812e-04*0.92387953251128675613/2.384e-06,  6.74248e-04*0.92387953251128675613/2.384e-06,   3.3379e-05*0.92387953251128675613/2.384e-06,
-  3.4412861e-02*0.92387953251128675613/2.384e-06, 4.573822e-03*0.92387953251128675613/2.384e-06,  9.54151e-04*0.92387953251128675613/2.384e-06,   7.6771e-05*0.92387953251128675613/2.384e-06,
-      6.199e-06*0.92387953251128675613/2.384e-06,   3.4332e-05*0.92387953251128675613/2.384e-06, 1.111031e-03*0.92387953251128675613/2.384e-06,1.0933399e-02*0.92387953251128675613/2.384e-06,
- -2.4725437e-02*0.92387953251128675613/2.384e-06,-3.771782e-03*0.92387953251128675613/2.384e-06, -4.72546e-04*0.92387953251128675613/2.384e-06,  -2.7657e-05*0.92387953251128675613/2.384e-06,
-      4.1421356237309504879e-01,  /* tan(PI/8) */
-      1.414213562373095e+00,
-
-
-      -9.54e-07*0.941544065183021/2.384e-06,  1.05381e-04*0.941544065183021/2.384e-06,  6.10352e-04*0.941544065183021/2.384e-06, -4.75883e-04*0.941544065183021/2.384e-06,
-  3.4055710e-02*0.941544065183021/2.384e-06, 4.649162e-03*0.941544065183021/2.384e-06,  9.35555e-04*0.941544065183021/2.384e-06,   7.3433e-05*0.941544065183021/2.384e-06, /* 7*/
-      5.245e-06*0.941544065183021/2.384e-06,   1.7166e-05*0.941544065183021/2.384e-06,  9.56535e-04*0.941544065183021/2.384e-06,1.0103703e-02*0.941544065183021/2.384e-06,
- -2.5527000e-02*0.941544065183021/2.384e-06,-3.914356e-03*0.941544065183021/2.384e-06, -5.07355e-04*0.941544065183021/2.384e-06,  -3.0041e-05*0.941544065183021/2.384e-06,
-      3.578057213145241e-01,
-      1.546020906725474e+00,
-
-
-      -9.54e-07*0.956940335732209/2.384e-06,  1.02520e-04*0.956940335732209/2.384e-06,  5.39303e-04*0.956940335732209/2.384e-06,-1.011848e-03*0.956940335732209/2.384e-06,
-  3.3659935e-02*0.956940335732209/2.384e-06, 4.703045e-03*0.956940335732209/2.384e-06,  9.15051e-04*0.956940335732209/2.384e-06,   7.0095e-05*0.956940335732209/2.384e-06, /* 6*/
-      4.768e-06*0.956940335732209/2.384e-06,     9.54e-07*0.956940335732209/2.384e-06,  8.06808e-04*0.956940335732209/2.384e-06, 9.287834e-03*0.956940335732209/2.384e-06,
- -2.6310921e-02*0.956940335732209/2.384e-06,-4.048824e-03*0.956940335732209/2.384e-06, -5.42164e-04*0.956940335732209/2.384e-06,  -3.2425e-05*0.956940335732209/2.384e-06,
-      3.033466836073424e-01,
-      1.662939224605090e+00,
-
-
-     -1.431e-06*0.970031253194544/2.384e-06,   9.9182e-05*0.970031253194544/2.384e-06,  4.62532e-04*0.970031253194544/2.384e-06,-1.573563e-03*0.970031253194544/2.384e-06,
-  3.3225536e-02*0.970031253194544/2.384e-06, 4.737377e-03*0.970031253194544/2.384e-06,  8.91685e-04*0.970031253194544/2.384e-06,   6.6280e-05*0.970031253194544/2.384e-06,  /* 5*/
-      4.292e-06*0.970031253194544/2.384e-06,  -1.3828e-05*0.970031253194544/2.384e-06,  6.61850e-04*0.970031253194544/2.384e-06, 8.487225e-03*0.970031253194544/2.384e-06,
- -2.7073860e-02*0.970031253194544/2.384e-06,-4.174709e-03*0.970031253194544/2.384e-06, -5.76973e-04*0.970031253194544/2.384e-06,  -3.4809e-05*0.970031253194544/2.384e-06,
-      2.504869601913055e-01,
-      1.763842528696710e+00,
-
-
-     -1.431e-06*0.98078528040323/2.384e-06,   9.5367e-05*0.98078528040323/2.384e-06,  3.78609e-04*0.98078528040323/2.384e-06,-2.161503e-03*0.98078528040323/2.384e-06,
-  3.2754898e-02*0.98078528040323/2.384e-06, 4.752159e-03*0.98078528040323/2.384e-06,  8.66413e-04*0.98078528040323/2.384e-06,   6.2943e-05*0.98078528040323/2.384e-06, /* 4*/
-      3.815e-06*0.98078528040323/2.384e-06,   -2.718e-05*0.98078528040323/2.384e-06,  5.22137e-04*0.98078528040323/2.384e-06, 7.703304e-03*0.98078528040323/2.384e-06,
- -2.7815342e-02*0.98078528040323/2.384e-06,-4.290581e-03*0.98078528040323/2.384e-06, -6.11782e-04*0.98078528040323/2.384e-06,  -3.7670e-05*0.98078528040323/2.384e-06,
-      1.989123673796580e-01,
-      1.847759065022573e+00,
-
-
-     -1.907e-06*0.989176509964781/2.384e-06,   9.0122e-05*0.989176509964781/2.384e-06,  2.88486e-04*0.989176509964781/2.384e-06,-2.774239e-03*0.989176509964781/2.384e-06,
-  3.2248020e-02*0.989176509964781/2.384e-06, 4.748821e-03*0.989176509964781/2.384e-06,  8.38757e-04*0.989176509964781/2.384e-06,   5.9605e-05*0.989176509964781/2.384e-06, /* 3*/
-      3.338e-06*0.989176509964781/2.384e-06,  -3.9577e-05*0.989176509964781/2.384e-06,  3.88145e-04*0.989176509964781/2.384e-06, 6.937027e-03*0.989176509964781/2.384e-06,
- -2.8532982e-02*0.989176509964781/2.384e-06,-4.395962e-03*0.989176509964781/2.384e-06, -6.46591e-04*0.989176509964781/2.384e-06,  -4.0531e-05*0.989176509964781/2.384e-06,
-      1.483359875383474e-01,
-      1.913880671464418e+00,
-
-
-     -1.907e-06*0.995184726672197/2.384e-06,   8.4400e-05*0.995184726672197/2.384e-06,  1.91689e-04*0.995184726672197/2.384e-06,-3.411293e-03*0.995184726672197/2.384e-06,
-  3.1706810e-02*0.995184726672197/2.384e-06, 4.728317e-03*0.995184726672197/2.384e-06,  8.09669e-04*0.995184726672197/2.384e-06,    5.579e-05*0.995184726672197/2.384e-06,
-      3.338e-06*0.995184726672197/2.384e-06,  -5.0545e-05*0.995184726672197/2.384e-06,  2.59876e-04*0.995184726672197/2.384e-06, 6.189346e-03*0.995184726672197/2.384e-06,
- -2.9224873e-02*0.995184726672197/2.384e-06,-4.489899e-03*0.995184726672197/2.384e-06, -6.80923e-04*0.995184726672197/2.384e-06,  -4.3392e-05*0.995184726672197/2.384e-06,
-      9.849140335716425e-02,
-      1.961570560806461e+00,
-
-
-     -2.384e-06*0.998795456205172/2.384e-06,   7.7724e-05*0.998795456205172/2.384e-06,   8.8215e-05*0.998795456205172/2.384e-06,-4.072189e-03*0.998795456205172/2.384e-06,
-      3.1132698e-02*0.998795456205172/2.384e-06, 4.691124e-03*0.998795456205172/2.384e-06,  7.79152e-04*0.998795456205172/2.384e-06,   5.2929e-05*0.998795456205172/2.384e-06,
-      2.861e-06*0.998795456205172/2.384e-06,  -6.0558e-05*0.998795456205172/2.384e-06,  1.37329e-04*0.998795456205172/2.384e-06, 5.462170e-03*0.998795456205172/2.384e-06,
-      -2.9890060e-02*0.998795456205172/2.384e-06,-4.570484e-03*0.998795456205172/2.384e-06, -7.14302e-04*0.998795456205172/2.384e-06,  -4.6253e-05*0.998795456205172/2.384e-06,
-      4.912684976946725e-02,
-      1.990369453344394e+00,
-
-
-      3.5780907e-02 * SQRT2*0.5/2.384e-06,1.7876148e-02 * SQRT2*0.5/2.384e-06, 3.134727e-03 * SQRT2*0.5/2.384e-06, 2.457142e-03 * SQRT2*0.5/2.384e-06,
-      9.71317e-04 * SQRT2*0.5/2.384e-06,  2.18868e-04 * SQRT2*0.5/2.384e-06,  1.01566e-04 * SQRT2*0.5/2.384e-06,   1.3828e-05 * SQRT2*0.5/2.384e-06,
-
-      3.0526638e-02/2.384e-06, 4.638195e-03/2.384e-06,  7.47204e-04/2.384e-06,   4.9591e-05/2.384e-06,
-      4.756451e-03/2.384e-06,   2.1458e-05/2.384e-06,  -6.9618e-05/2.384e-06,/*    2.384e-06/2.384e-06*/
-};
-#endif
-
-
-#define NS 12
-#define NL 36
-
-static const FLOAT8 win[4][NL] = {
-  {
-    2.382191739347913e-13,
-    6.423305872147834e-13,
-    9.400849094049688e-13,
-    1.122435026096556e-12,
-    1.183840321267481e-12,
-    1.122435026096556e-12,
-    9.400849094049690e-13,
-    6.423305872147839e-13,
-    2.382191739347918e-13,
-
-    5.456116108943412e-12,
-    4.878985199565852e-12,
-    4.240448995017367e-12,
-    3.559909094758252e-12,
-    2.858043359288075e-12,
-    2.156177623817898e-12,
-    1.475637723558783e-12,
-    8.371015190102974e-13,
-    2.599706096327376e-13,
-
-    -5.456116108943412e-12,
-    -4.878985199565852e-12,
-    -4.240448995017367e-12,
-    -3.559909094758252e-12,
-    -2.858043359288076e-12,
-    -2.156177623817898e-12,
-    -1.475637723558783e-12,
-    -8.371015190102975e-13,
-    -2.599706096327376e-13,
-
-    -2.382191739347923e-13,
-    -6.423305872147843e-13,
-    -9.400849094049696e-13,
-    -1.122435026096556e-12,
-    -1.183840321267481e-12,
-    -1.122435026096556e-12,
-    -9.400849094049694e-13,
-    -6.423305872147840e-13,
-    -2.382191739347918e-13,
-  },
-  {
-    2.382191739347913e-13,
-    6.423305872147834e-13,
-    9.400849094049688e-13,
-    1.122435026096556e-12,
-    1.183840321267481e-12,
-    1.122435026096556e-12,
-    9.400849094049688e-13,
-    6.423305872147841e-13,
-    2.382191739347918e-13,
-
-    5.456116108943413e-12,
-    4.878985199565852e-12,
-    4.240448995017367e-12,
-    3.559909094758253e-12,
-    2.858043359288075e-12,
-    2.156177623817898e-12,
-    1.475637723558782e-12,
-    8.371015190102975e-13,
-    2.599706096327376e-13,
-
-    -5.461314069809755e-12,
-    -4.921085770524055e-12,
-    -4.343405037091838e-12,
-    -3.732668368707687e-12,
-    -3.093523840190885e-12,
-    -2.430835727329465e-12,
-    -1.734679010007751e-12,
-    -9.748253656609281e-13,
-    -2.797435120168326e-13,
-
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    -2.283748241799531e-13,
-    -4.037858874020686e-13,
-    -2.146547464825323e-13,
-  },
-  {
-    1.316524975873958e-01, /* win[SHORT_TYPE] */
-    4.142135623730950e-01,
-    7.673269879789602e-01,
-
-    1.091308501069271e+00, /* tantab_l */
-    1.303225372841206e+00,
-    1.569685577117490e+00,
-    1.920982126971166e+00,
-    2.414213562373094e+00,
-    3.171594802363212e+00,
-    4.510708503662055e+00,
-    7.595754112725146e+00,
-    2.290376554843115e+01,
-
-    0.98480775301220802032, /* cx */
-    0.64278760968653936292,
-    0.34202014332566882393,
-    0.93969262078590842791,
-    -0.17364817766693030343,
-    -0.76604444311897790243,
-    0.86602540378443870761,
-    0.500000000000000e+00,
-
-    -5.144957554275265e-01, /* ca */
-    -4.717319685649723e-01,
-    -3.133774542039019e-01,
-    -1.819131996109812e-01,
-    -9.457419252642064e-02,
-    -4.096558288530405e-02,
-    -1.419856857247115e-02,
-    -3.699974673760037e-03,
-
-     8.574929257125442e-01, /* cs */
-     8.817419973177052e-01,
-     9.496286491027329e-01,
-     9.833145924917901e-01,
-     9.955178160675857e-01,
-     9.991605581781475e-01,
-     9.998991952444470e-01,
-     9.999931550702802e-01,
-  },
-  {
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    0.000000000000000e+00,
-    2.283748241799531e-13,
-    4.037858874020686e-13,
-    2.146547464825323e-13,
-
-    5.461314069809755e-12,
-    4.921085770524055e-12,
-    4.343405037091838e-12,
-    3.732668368707687e-12,
-    3.093523840190885e-12,
-    2.430835727329466e-12,
-    1.734679010007751e-12,
-    9.748253656609281e-13,
-    2.797435120168326e-13,
-
-    -5.456116108943413e-12,
-    -4.878985199565852e-12,
-    -4.240448995017367e-12,
-    -3.559909094758253e-12,
-    -2.858043359288075e-12,
-    -2.156177623817898e-12,
-    -1.475637723558782e-12,
-    -8.371015190102975e-13,
-    -2.599706096327376e-13,
-
-    -2.382191739347913e-13,
-    -6.423305872147834e-13,
-    -9.400849094049688e-13,
-    -1.122435026096556e-12,
-    -1.183840321267481e-12,
-    -1.122435026096556e-12,
-    -9.400849094049688e-13,
-    -6.423305872147841e-13,
-    -2.382191739347918e-13,
-  }
-};
-
-#define tantab_l (win[SHORT_TYPE]+3)
-#define cx (win[SHORT_TYPE]+12)
-#define ca (win[SHORT_TYPE]+20)
-#define cs (win[SHORT_TYPE]+28)
-
-/************************************************************************
-*
-* window_subband()
-*
-* PURPOSE:  Overlapping window on PCM samples
-*
-* SEMANTICS:
-* 32 16-bit pcm samples are scaled to fractional 2's complement and
-* concatenated to the end of the window buffer #x#. The updated window
-* buffer #x# is then windowed by the analysis window #c# to produce the
-* windowed sample #z#
-*
-************************************************************************/
-
-/*
- *      new IDCT routine written by Takehiro TOMINAGA
- */
-static const int order[] = {
-  0, 1,16,17, 8, 9,24,25, 4, 5,20,21,12,13,28,29,
-  2, 3,18,19,10,11,26,27, 6, 7,22,23,14,15,30,31
-};
-
-
-/* returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32 */
-INLINE static void
-window_subband(const sample_t *x1, FLOAT8 a[SBLIMIT])
-{
-    int i;
-    FLOAT8 const *wp = enwindow+10;
-
-    const sample_t *x2 = &x1[238-14-286];
-
-    for (i = -15; i < 0; i++) {
-	FLOAT8 w, s, t;
-
-	w = wp[-10]; s = x2[-224] * w; t  = x1[ 224] * w;
-	w = wp[-9]; s += x2[-160] * w; t += x1[ 160] * w;
-	w = wp[-8]; s += x2[- 96] * w; t += x1[  96] * w;
-	w = wp[-7]; s += x2[- 32] * w; t += x1[  32] * w;
-	w = wp[-6]; s += x2[  32] * w; t += x1[- 32] * w;
-	w = wp[-5]; s += x2[  96] * w; t += x1[- 96] * w;
-	w = wp[-4]; s += x2[ 160] * w; t += x1[-160] * w;
-	w = wp[-3]; s += x2[ 224] * w; t += x1[-224] * w;
-
-	w = wp[-2]; s += x1[-256] * w; t -= x2[ 256] * w;
-	w = wp[-1]; s += x1[-192] * w; t -= x2[ 192] * w;
-	w = wp[ 0]; s += x1[-128] * w; t -= x2[ 128] * w;
-	w = wp[ 1]; s += x1[- 64] * w; t -= x2[  64] * w;
-	w = wp[ 2]; s += x1[   0] * w; t -= x2[   0] * w;
-	w = wp[ 3]; s += x1[  64] * w; t -= x2[- 64] * w;
-	w = wp[ 4]; s += x1[ 128] * w; t -= x2[-128] * w;
-	w = wp[ 5]; s += x1[ 192] * w; t -= x2[-192] * w;
-
-	/*
-	 * this multiplyer could be removed, but it needs more 256 FLOAT data.
-	 * thinking about the data cache performance, I think we should not
-	 * use such a huge table. tt 2000/Oct/25
-	 */
-	s *= wp[6];
-	w = t - s;
-	a[30+i*2] = t + s;
-	a[31+i*2] = wp[7] * w;
-	wp += 18;
-	x1--;
-	x2++;
-    }
-    {
-	FLOAT8 s,t,u,v;
-	t  =  x1[- 16] * wp[-10];              s  = x1[ -32] * wp[-2];
-	t += (x1[- 48] - x1[ 16]) * wp[-9];    s += x1[ -96] * wp[-1];
-	t += (x1[- 80] + x1[ 48]) * wp[-8];    s += x1[-160] * wp[ 0];
-	t += (x1[-112] - x1[ 80]) * wp[-7];    s += x1[-224] * wp[ 1];
-	t += (x1[-144] + x1[112]) * wp[-6];    s -= x1[  32] * wp[ 2];
-	t += (x1[-176] - x1[144]) * wp[-5];    s -= x1[  96] * wp[ 3];
-	t += (x1[-208] + x1[176]) * wp[-4];    s -= x1[ 160] * wp[ 4];
-	t += (x1[-240] - x1[208]) * wp[-3];    s -= x1[ 224];
-
-	u = s - t;
-	v = s + t;
-
-	t = a[14];
-	s = a[15] - t;
-
-	a[31] = v + t;   // A0
-	a[30] = u + s;   // A1
-	a[15] = u - s;   // A2
-	a[14] = v - t;   // A3
-    }
-{
-    FLOAT8 xr;
-    xr = a[28] - a[ 0]; a[ 0] += a[28]; a[28] = xr * wp[-2*18+7];
-    xr = a[29] - a[ 1]; a[ 1] += a[29]; a[29] = xr * wp[-2*18+7];
-
-    xr = a[26] - a[ 2]; a[ 2] += a[26]; a[26] = xr * wp[-4*18+7];
-    xr = a[27] - a[ 3]; a[ 3] += a[27]; a[27] = xr * wp[-4*18+7];
-
-    xr = a[24] - a[ 4]; a[ 4] += a[24]; a[24] = xr * wp[-6*18+7];
-    xr = a[25] - a[ 5]; a[ 5] += a[25]; a[25] = xr * wp[-6*18+7];
-
-    xr = a[22] - a[ 6]; a[ 6] += a[22]; a[22] = xr * SQRT2;
-    xr = a[23] - a[ 7]; a[ 7] += a[23]; a[23] = xr * SQRT2 - a[ 7];
-    a[ 7] -= a[ 6];
-    a[22] -= a[ 7];
-    a[23] -= a[22];
-
-    xr = a[ 6]; a[ 6] = a[31] - xr; a[31] = a[31] + xr;
-    xr = a[ 7]; a[ 7] = a[30] - xr; a[30] = a[30] + xr;
-    xr = a[22]; a[22] = a[15] - xr; a[15] = a[15] + xr;
-    xr = a[23]; a[23] = a[14] - xr; a[14] = a[14] + xr;
-
-    xr = a[20] - a[ 8]; a[ 8] += a[20]; a[20] = xr * wp[-10*18+7];
-    xr = a[21] - a[ 9]; a[ 9] += a[21]; a[21] = xr * wp[-10*18+7];
-
-    xr = a[18] - a[10]; a[10] += a[18]; a[18] = xr * wp[-12*18+7];
-    xr = a[19] - a[11]; a[11] += a[19]; a[19] = xr * wp[-12*18+7];
-
-    xr = a[16] - a[12]; a[12] += a[16]; a[16] = xr * wp[-14*18+7];
-    xr = a[17] - a[13]; a[13] += a[17]; a[17] = xr * wp[-14*18+7];
-
-    xr = -a[20] + a[24]; a[20] += a[24]; a[24] = xr * wp[-12*18+7];
-    xr = -a[21] + a[25]; a[21] += a[25]; a[25] = xr * wp[-12*18+7];
-
-    xr = a[ 4] - a[ 8]; a[ 4] += a[ 8]; a[ 8] = xr * wp[-12*18+7];
-    xr = a[ 5] - a[ 9]; a[ 5] += a[ 9]; a[ 9] = xr * wp[-12*18+7];
-
-    xr = a[ 0] - a[12]; a[ 0] += a[12]; a[12] = xr * wp[-4*18+7];
-    xr = a[ 1] - a[13]; a[ 1] += a[13]; a[13] = xr * wp[-4*18+7];
-    xr = a[16] - a[28]; a[16] += a[28]; a[28] = xr * wp[-4*18+7];
-    xr = -a[17] + a[29]; a[17] += a[29]; a[29] = xr * wp[-4*18+7];
-
-    xr = SQRT2 * (a[ 2] - a[10]); a[ 2] += a[10]; a[10] = xr;
-    xr = SQRT2 * (a[ 3] - a[11]); a[ 3] += a[11]; a[11] = xr;
-    xr = SQRT2 * (-a[18] + a[26]); a[18] += a[26]; a[26] = xr - a[18];
-    xr = SQRT2 * (-a[19] + a[27]); a[19] += a[27]; a[27] = xr - a[19];
-
-    xr = a[ 2]; a[19] -= a[ 3]; a[ 3] -= xr; a[ 2] = a[31] - xr; a[31] += xr;
-    xr = a[ 3]; a[11] -= a[19]; a[18] -= xr; a[ 3] = a[30] - xr; a[30] += xr;
-    xr = a[18]; a[27] -= a[11]; a[19] -= xr; a[18] = a[15] - xr; a[15] += xr;
-
-    xr = a[19]; a[10] -= xr; a[19] = a[14] - xr; a[14] += xr;
-    xr = a[10]; a[11] -= xr; a[10] = a[23] - xr; a[23] += xr;
-    xr = a[11]; a[26] -= xr; a[11] = a[22] - xr; a[22] += xr;
-    xr = a[26]; a[27] -= xr; a[26] = a[ 7] - xr; a[ 7] += xr;
-
-    xr = a[27]; a[27] = a[ 6] - xr; a[ 6] += xr;
-
-    xr = SQRT2 * (a[ 0] - a[ 4]); a[ 0] += a[ 4]; a[ 4] = xr;
-    xr = SQRT2 * (a[ 1] - a[ 5]); a[ 1] += a[ 5]; a[ 5] = xr;
-    xr = SQRT2 * (a[16] - a[20]); a[16] += a[20]; a[20] = xr;
-    xr = SQRT2 * (a[17] - a[21]); a[17] += a[21]; a[21] = xr;
-
-    xr = -SQRT2 * (a[ 8] - a[12]); a[ 8] += a[12]; a[12] = xr - a[ 8];
-    xr = -SQRT2 * (a[ 9] - a[13]); a[ 9] += a[13]; a[13] = xr - a[ 9];
-    xr = -SQRT2 * (a[25] - a[29]); a[25] += a[29]; a[29] = xr - a[25];
-    xr = -SQRT2 * (a[24] + a[28]); a[24] -= a[28]; a[28] = xr - a[24];
-
-    xr = a[24] - a[16]; a[24] = xr;
-    xr = a[20] - xr;    a[20] = xr;
-    xr = a[28] - xr;    a[28] = xr;
-
-    xr = a[25] - a[17]; a[25] = xr;
-    xr = a[21] - xr;    a[21] = xr;
-    xr = a[29] - xr;    a[29] = xr;
-
-    xr = a[17] - a[ 1]; a[17] = xr;
-    xr = a[ 9] - xr;    a[ 9] = xr;
-    xr = a[25] - xr;    a[25] = xr;
-    xr = a[ 5] - xr;    a[ 5] = xr;
-    xr = a[21] - xr;    a[21] = xr;
-    xr = a[13] - xr;    a[13] = xr;
-    xr = a[29] - xr;    a[29] = xr;
-
-    xr = a[ 1] - a[ 0]; a[ 1] = xr;
-    xr = a[16] - xr;    a[16] = xr;
-    xr = a[17] - xr;    a[17] = xr;
-    xr = a[ 8] - xr;    a[ 8] = xr;
-    xr = a[ 9] - xr;    a[ 9] = xr;
-    xr = a[24] - xr;    a[24] = xr;
-    xr = a[25] - xr;    a[25] = xr;
-    xr = a[ 4] - xr;    a[ 4] = xr;
-    xr = a[ 5] - xr;    a[ 5] = xr;
-    xr = a[20] - xr;    a[20] = xr;
-    xr = a[21] - xr;    a[21] = xr;
-    xr = a[12] - xr;    a[12] = xr;
-    xr = a[13] - xr;    a[13] = xr;
-    xr = a[28] - xr;    a[28] = xr;
-    xr = a[29] - xr;    a[29] = xr;
-
-    xr = a[ 0]; a[ 0] += a[31]; a[31] -= xr;
-    xr = a[ 1]; a[ 1] += a[30]; a[30] -= xr;
-    xr = a[16]; a[16] += a[15]; a[15] -= xr;
-    xr = a[17]; a[17] += a[14]; a[14] -= xr;
-    xr = a[ 8]; a[ 8] += a[23]; a[23] -= xr;
-    xr = a[ 9]; a[ 9] += a[22]; a[22] -= xr;
-    xr = a[24]; a[24] += a[ 7]; a[ 7] -= xr;
-    xr = a[25]; a[25] += a[ 6]; a[ 6] -= xr;
-    xr = a[ 4]; a[ 4] += a[27]; a[27] -= xr;
-    xr = a[ 5]; a[ 5] += a[26]; a[26] -= xr;
-    xr = a[20]; a[20] += a[11]; a[11] -= xr;
-    xr = a[21]; a[21] += a[10]; a[10] -= xr;
-    xr = a[12]; a[12] += a[19]; a[19] -= xr;
-    xr = a[13]; a[13] += a[18]; a[18] -= xr;
-    xr = a[28]; a[28] += a[ 3]; a[ 3] -= xr;
-    xr = a[29]; a[29] += a[ 2]; a[ 2] -= xr;
-}
-
-}
-
-
-/*-------------------------------------------------------------------*/
-/*                                                                   */
-/*   Function: Calculation of the MDCT                               */
-/*   In the case of long blocks (type 0,1,3) there are               */
-/*   36 coefficents in the time domain and 18 in the frequency       */
-/*   domain.                                                         */
-/*   In the case of short blocks (type 2) there are 3                */
-/*   transformations with short length. This leads to 12 coefficents */
-/*   in the time and 6 in the frequency domain. In this case the     */
-/*   results are stored side by side in the vector out[].            */
-/*                                                                   */
-/*   New layer3                                                      */
-/*                                                                   */
-/*-------------------------------------------------------------------*/
-
-inline static void mdct_short(FLOAT8 *inout)
-{
-    int l;
-    for ( l = 0; l < 3; l++ ) {
-	FLOAT8 tc0,tc1,tc2,ts0,ts1,ts2;
-
-	ts0 = inout[2*3] * win[SHORT_TYPE][0] - inout[5*3];
-	tc0 = inout[0*3] * win[SHORT_TYPE][2] - inout[3*3];
-	tc1 = ts0 + tc0;
-	tc2 = ts0 - tc0;
-
-	ts0 = inout[5*3] * win[SHORT_TYPE][0] + inout[2*3];
-	tc0 = inout[3*3] * win[SHORT_TYPE][2] + inout[0*3];
-	ts1 = ts0 + tc0;
-	ts2 = -ts0 + tc0;
-
-	tc0 = (inout[1*3] * win[SHORT_TYPE][1] - inout[4*3]) * 2.069978111953089e-11; /* tritab_s[1] */
-	ts0 = (inout[4*3] * win[SHORT_TYPE][1] + inout[1*3]) * 2.069978111953089e-11; /* tritab_s[1] */
-
-	inout[3*0] = tc1 * 1.907525191737280e-11 /* tritab_s[2] */ + tc0;
-	inout[3*5] = -ts1 * 1.907525191737280e-11 /* tritab_s[0] */ + ts0;
-
-	tc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11 /* tritab_s[2] */;
-	ts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;
-	inout[3*1] = tc2-ts1;
-	inout[3*2] = tc2+ts1;
-
-	tc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;
-	ts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11 /* tritab_s[0] */;
-	inout[3*3] = tc1+ts2;
-	inout[3*4] = tc1-ts2;
-
-	inout++;
-    }
-}
-
-inline static void mdct_long(FLOAT8 *out, FLOAT8 *in)
-{
-    FLOAT8 ct,st;
-  {
-    FLOAT8 tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;
-    // 1,2, 5,6, 9,10, 13,14, 17
-    tc1 = in[17]-in[ 9];
-    tc3 = in[15]-in[11];
-    tc4 = in[14]-in[12];
-    ts5 = in[ 0]+in[ 8];
-    ts6 = in[ 1]+in[ 7];
-    ts7 = in[ 2]+in[ 6];
-    ts8 = in[ 3]+in[ 5];
-
-    out[17] = (ts5+ts7-ts8)-(ts6-in[4]);
-    st = (ts5+ts7-ts8)*cx[7]+(ts6-in[4]);
-    ct = (tc1-tc3-tc4)*cx[6];
-    out[5] = ct+st;
-    out[6] = ct-st;
-
-    tc2 = (in[16]-in[10])*cx[6];
-    ts6 = ts6*cx[7] + in[4];
-    ct =  tc1*cx[0] + tc2 + tc3*cx[1] + tc4*cx[2];
-    st = -ts5*cx[4] + ts6 - ts7*cx[5] + ts8*cx[3];
-    out[1] = ct+st;
-    out[2] = ct-st;
-
-    ct =  tc1*cx[1] - tc2 - tc3*cx[2] + tc4*cx[0];
-    st = -ts5*cx[5] + ts6 - ts7*cx[3] + ts8*cx[4];
-    out[ 9] = ct+st;
-    out[10] = ct-st;
-
-    ct = tc1*cx[2] - tc2 + tc3*cx[0] - tc4*cx[1];
-    st = ts5*cx[3] - ts6 + ts7*cx[4] - ts8*cx[5];
-    out[13] = ct+st;
-    out[14] = ct-st;
-  }
-  {
-    FLOAT8 ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;
-
-    ts1 = in[ 8]-in[ 0];
-    ts3 = in[ 6]-in[ 2];
-    ts4 = in[ 5]-in[ 3];
-    tc5 = in[17]+in[ 9];
-    tc6 = in[16]+in[10];
-    tc7 = in[15]+in[11];
-    tc8 = in[14]+in[12];
-
-    out[0]  = (tc5+tc7+tc8)+(tc6+in[13]);
-    ct = (tc5+tc7+tc8)*cx[7]-(tc6+in[13]);
-    st = (ts1-ts3+ts4)*cx[6];
-    out[11] = ct+st;
-    out[12] = ct-st;
-
-    ts2 = (in[7]-in[1])*cx[6];
-    tc6 = in[13] - tc6*cx[7];
-    ct = tc5*cx[3] - tc6 + tc7*cx[4] + tc8*cx[5];
-    st = ts1*cx[2] + ts2 + ts3*cx[0] + ts4*cx[1];
-    out[3] = ct+st;
-    out[4] = ct-st;
-
-    ct = -tc5*cx[5] + tc6 - tc7*cx[3] - tc8*cx[4];
-    st =  ts1*cx[1] + ts2 - ts3*cx[2] - ts4*cx[0];
-    out[7] = ct+st;
-    out[8] = ct-st;
-
-    ct = -tc5*cx[4] + tc6 - tc7*cx[5] - tc8*cx[3];
-    st =  ts1*cx[0] - ts2 + ts3*cx[1] - ts4*cx[2];
-    out[15] = ct+st;
-    out[16] = ct-st;
-  }
-}
-
-
-void mdct_sub48( lame_internal_flags *gfc, const sample_t *w0, const sample_t *w1, 
-                 FLOAT8 mdct_freq[2][2][576] )
-{
-    int gr, k, ch;
-    const sample_t *wk;
-
-    wk = w0 + 286;
-    /* thinking cache performance, ch->gr loop is better than gr->ch loop */
-    for (ch = 0; ch < gfc->channels_out; ch++) {
-	for (gr = 0; gr < gfc->mode_gr; gr++) {
-	    int	band;
-	    FLOAT8 *mdct_enc = &mdct_freq[gr][ch][0];
-	    gr_info *gi = &(gfc->l3_side.gr[gr].ch[ch].tt);
-	    FLOAT8 *samp = gfc->sb_sample[ch][1 - gr][0];
-
-	    for (k = 0; k < 18 / 2; k++) {
-		window_subband(wk, samp);
-		window_subband(wk + 32, samp + 32);
-		samp += 64;
-		wk += 64;
-		/*
-		 * Compensate for inversion in the analysis filter
-		 */
-		for (band = 1; band < 32; band+=2) {
-		    samp[band-32] *= -1;
-		}
-	    }
-
-
-	    /* apply filters on the polyphase filterbank outputs */
-	    /* bands <= gfc->highpass_band will be zeroed out below */
-	    /* bands >= gfc->lowpass_band  will be zeroed out below */
-	    if (gfc->filter_type==0) {
-              for (band=gfc->highpass_start_band;  band <= gfc->highpass_end_band; band++) { 
-		  for (k=0; k<18; k++) 
-		    gfc->sb_sample[ch][1-gr][k][order[band]]*=gfc->amp_highpass[band];
-	      }
-              for (band=gfc->lowpass_start_band;  band <= gfc->lowpass_end_band; band++) { 
-		  for (k=0; k<18; k++) 
-		    gfc->sb_sample[ch][1-gr][k][order[band]]*=gfc->amp_lowpass[band];
-	      }
-	    }
-	    
-
-
-	    /*
-	     * Perform imdct of 18 previous subband samples
-	     * + 18 current subband samples
-	     */
-	    for (band = 0; band < 32; band++, mdct_enc += 18) {
-		int type = gi->block_type;
-		FLOAT8 *band0, *band1;
-		band0 = gfc->sb_sample[ch][  gr][0] + order[band];
-		band1 = gfc->sb_sample[ch][1-gr][0] + order[band];
-		if (gi->mixed_block_flag && band < 2)
-		    type = 0;
-		if (band >= gfc->lowpass_band || band <= gfc->highpass_band) {
-		    memset((char *)mdct_enc,0,18*sizeof(FLOAT8));
-		} else {
-		  if (type == SHORT_TYPE) {
-		    for (k = -NS/4; k < 0; k++) {
-			FLOAT8 w = win[SHORT_TYPE][k+3];
-			mdct_enc[k*3+ 9] = band0[( 9+k)*32] * w - band0[( 8-k)*32];
-			mdct_enc[k*3+18] = band0[(14-k)*32] * w + band0[(15+k)*32];
-			mdct_enc[k*3+10] = band0[(15+k)*32] * w - band0[(14-k)*32];
-			mdct_enc[k*3+19] = band1[( 2-k)*32] * w + band1[( 3+k)*32];
-			mdct_enc[k*3+11] = band1[( 3+k)*32] * w - band1[( 2-k)*32];
-			mdct_enc[k*3+20] = band1[( 8-k)*32] * w + band1[( 9+k)*32];
-		    }
-		    mdct_short(mdct_enc);
-		  } else {
-		    FLOAT8 work[18];
-		    for (k = -NL/4; k < 0; k++) {
-			FLOAT8 a, b;
-			a = win[type][k+27] * band1[(k+9)*32]
-			  + win[type][k+36] * band1[(8-k)*32];
-			b = win[type][k+ 9] * band0[(k+9)*32]
-			  - win[type][k+18] * band0[(8-k)*32];
-			work[k+ 9] = a - b*tantab_l[k+9];
-			work[k+18] = a*tantab_l[k+9] + b;
-		    }
-
-		    mdct_long(mdct_enc, work);
-		  }
-		}
-		/*
-		 * Perform aliasing reduction butterfly
-		 */
-		if (type != SHORT_TYPE) {
-		  if (band == 0)
-		    continue;
-		  for (k = 7; k >= 0; --k) {
-		    FLOAT8 bu,bd;
-		    bu = mdct_enc[k] * ca[k] + mdct_enc[-1-k] * cs[k];
-		    bd = mdct_enc[k] * cs[k] - mdct_enc[-1-k] * ca[k];
-		    
-		    mdct_enc[-1-k] = bu;
-		    mdct_enc[k]    = bd;
-		  }
-		}
-	      }
-	}
-	wk = w1 + 286;
-	if (gfc->mode_gr == 1) {
-	    memcpy(gfc->sb_sample[ch][0], gfc->sb_sample[ch][1], 576 * sizeof(FLOAT8));
-	}
-    }
-}
--- a/sys/src/games/mp3enc/newmdct.h
+++ /dev/null
@@ -1,28 +1,0 @@
-/*
- *	New Modified DCT include file
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_NEWMDCT_H
-#define LAME_NEWMDCT_H
-
-void mdct_sub48(lame_internal_flags *gfc,const sample_t *w0, const sample_t *w1,
-		FLOAT8 mdct_freq[2][2][576]);
-
-#endif /* LAME_NEWMDCT_H */
--- a/sys/src/games/mp3enc/parse.c
+++ /dev/null
@@ -1,1236 +1,0 @@
-/*
- *	Command line parsing related functions
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: parse.c,v 1.68 2001/03/11 11:24:25 aleidinger Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "lame.h"
-#include "brhist.h"
-#include "parse.h"
-#include "main.h"
-#include "get_audio.h"
-
-/* GLOBAL VARIABLES.  set by parse_args() */
-/* we need to clean this up */
-sound_file_format input_format;
-int	swapbytes;		/* force byte swapping   default=0*/
-int	silent;
-int	brhist;
-float	update_interval;	/* to use Frank's time status display */
-int	mp3_delay;		/* to adjust the number of samples truncated
-                               during decode */
-int	mp3_delay_set;		/* user specified the value of the mp3 encoder
-                               delay to assume for decoding */
-
-/*
-* license - Writes version and license to the file specified by fp
-*/
-static int
-lame_version_print(FILE*const fp)
-{
-	const char *v = get_lame_version();
-	const char *u = get_lame_url();
-	const int lenv = strlen(v);
-	const int lenu = strlen (u);
-	const int lw = 80;	/* line width of terminal in characters */
-	const int sw = 16;	/* static width of text */
-
-	if (lw >= lenv + lenu + sw || lw < lenu + 2)
-		/* text fits in 80 chars/line, or line even too small for url */
-		fprintf(fp, "mp3enc (from lame version %s (%s))\n\n", v, u);
-	else
-		/* text too long, wrap url into next line, right aligned */
-		fprintf(fp, "mp3enc (from lame version %s)\n%*s(%s)\n\n",
-			v, lw - 2 - lenu, "", u);
-	return 0;
-}
-
-/* print version & license */
-int
-print_license(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
-{
-	lame_version_print(fp);
-	fprintf(fp, "Can I use LAME in my commercial program?\n\n"
-		"Yes, you can, under the restrictions of the LGPL.  In particular, you\n"
-		"can include a compiled version of the LAME library (for example,\n"
-		"lame.dll) with a commercial program.  Some notable requirements of\n"
-		"the LGPL:\n"
-		"\n"
-		"1. In your program, you cannot include any source code from LAME, with\n"
-		"   the exception of files whose only purpose is to describe the library\n"
-		"   interface (such as lame.h).\n"
-		"\n"
-		"2. Any modifications of LAME must be released under the LGPL.\n"
-		"   The LAME project (www.mp3dev.org) would appreciate being\n"
-		"   notified of any modifications.\n"
-		"\n"
-		"3. You must give prominent notice that your program is:\n"
-		"      A. using LAME (including version number)\n"
-		"      B. LAME is under the LGPL\n"
-		"      C. Provide a copy of the LGPL.  (the file COPYING contains the LGPL)\n"
-		"      D. Provide a copy of LAME source, or a pointer where the LAME\n"
-		"         source can be obtained (such as www.mp3dev.org)\n"
-		"   An example of prominent notice would be an \"About the LAME encoding engine\"\n"
-		"   button in some pull down menu within the executable of your program.\n"
-		"\n"
-		"4. If you determine that distribution of LAME requires a patent license,\n"
-		"   you must obtain such license.\n"
-		"\n"
-		"\n"
-		"*** IMPORTANT NOTE ***\n"
-		"\n"
-		"The decoding functions provided in LAME use the mpglib decoding engine which\n"
-		"is under the GPL.  They may not be used by any program not released under the\n"
-		"GPL unless you obtain such permission from the MPG123 project (www.mpg123.de).\n"
-		"\n");
-	return 0;
-}
-
-/*
-* usage - Writes command line syntax to the file specified by fp
-*/
-/* print general syntax */
-int
-usage(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
-{
-	lame_version_print(fp);
-	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
-		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
-		"\n"
-		"Try  \"%s --help\"     for more information\n"
-		"  or \"%s --longhelp\"\n"
-		"  or \"%s -?\"         for a complete options list\n\n",
-		ProgramName, ProgramName, ProgramName, ProgramName);
-	return 0;
-}
-
-/*
-* short_help - Writes command line syntax to the file specified by fp
-*           but only the most important ones, to fit on a vt100 terminal
-*/
-/* print short syntax help */
-int
-short_help(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
-{
-	lame_version_print(fp);
-	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
-		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
-		"\n"
-		"RECOMMENDED:\n"
-		"    mp3enc -h input.wav output.mp3\n"
-		"\n"
-		"OPTIONS:\n"
-		"    -b bitrate      set the bitrate, default 128 kbps\n"
-		"    -f              fast mode (lower quality)\n"
-		"    -h              higher quality, but a little slower.  Recommended.\n"
-		"    -k              keep ALL frequencies (disables all filters)\n"
-		"                    Can cause ringing and twinkling\n"
-		"    -m mode         (s)tereo, (j)oint, (m)ono or (a)uto\n"
-		"                    default is (j) or (s) depending on bitrate\n"
-		"    -V n            quality setting for VBR.  default n=%i\n"
-		"\n"
-		"    --preset type   type must be phone, voice, fm, tape, hifi, cd or studio\n"
-		"                    \"--preset help\" gives some more infos on these\n"
-		"\n"
-		"    --longhelp      full list of options\n"
-		"\n",
-		ProgramName, gfp->VBR_q);
-	return 0;
-}
-
-/*
-* wait_for - Writes command line syntax to the file specified by fp
-*/
-static void
-wait_for (FILE*const fp, int lessmode)
-{
-	if (lessmode ) {
-		fflush(fp);
-		getchar ();
-	} else
-		fprintf(fp, "\n");
-	fprintf(fp, "\n");
-}
-
-/* print long syntax help */
-int
-long_help(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName, int lessmode)
-{
-	lame_version_print(fp);
-	fprintf(fp, "usage: %s [options] <infile> [outfile]\n\n"
-		"    <infile> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
-		"\n"
-		"RECOMMENDED:\n"
-		"    mp3enc -h input.wav output.mp3\n"
-		"\n"
-		"OPTIONS:\n"
-		"  Input options:\n"
-		"    -r              input is raw pcm\n"
-		"    -x              force byte-swapping of input\n"
-		"    -s sfreq        sampling frequency of input file (kHz) - default 44.1 kHz\n"
-		"    --mp1input      input file is a MPEG Layer I   file\n"
-		"    --mp2input      input file is a MPEG Layer II  file\n"
-		"    --mp3input      input file is a MPEG Layer III file\n"
-		"    --ogginput      input file is a Ogg Vorbis file",
-		ProgramName);
-	wait_for (fp, lessmode);
-	fprintf(fp, "  Operational options:\n"
-		"    -m <mode>       (s)tereo, (j)oint, (f)orce, (m)ono or (a)auto  \n"
-		"                    default is (s) or (j) depending on bitrate\n"
-		"                    force = force ms_stereo on all frames.\n"
-		"                    auto = jstereo, with varialbe mid/side threshold\n"
-		"    -a              downmix from stereo to mono file for mono encoding\n"
-		"    -d              allow channels to have different blocktypes\n"
-		"    --disptime <arg>print progress report every arg seconds\n"
-		"    --ogg           encode to Ogg Vorbis instead of MP3\n"
-		"    --freeformat    produce a free format bitstream\n"
-		"    --decode        input=mp3 file, output=wav\n"
-		"    -t              disable writing wav header when using --decode\n"
-		"    --comp  <arg>   choose bitrate to achive a compression ratio of <arg>\n"
-		"    --scale <arg>   scale input (multiply PCM data) by <arg>\n"
-		"    --athonly       only use the ATH for masking\n"
-		"    --noath         disable the ATH for masking\n"
-		"    --athlower x    lower the ATH x dB\n"
-		"    --notemp        disable temporal masking effect\n"
-		"    --short         use short blocks\n"
-		"    --noshort       do not use short blocks\n"
-		"    --voice         experimental voice mode\n"
-		"    --preset type   type must be phone, voice, fm, tape, hifi, cd or studio\n"
-		"                    \"--preset help\" gives some more infos on these");
-	wait_for (fp, lessmode);
-	fprintf(fp, "  Verbosity:\n"
-		"    -S              don't print progress report, VBR histograms\n"
-		"    --silent        don't print anything on screen\n"
-		"    --quiet         don't print anything on screen\n"
-		"    --verbose       print a lot of useful information, default\n"
-		"\n"
-		"  Noise shaping & psycho acoustic algorithms:\n"
-		"    -q <arg>        <arg> = 0...9.  Default  -q 5 \n"
-		"                    -q 0:  Highest quality, very slow \n"
-		"                    -q 9:  Poor quality, but fast \n"
-		"    -h              Same as -q 2.   Recommended.\n"
-		"    -f              Same as -q 7.   Fast, ok quality\n");
-	wait_for (fp, lessmode);
-	fprintf(fp, "  CBR (constant bitrate, the default) options:\n"
-		"    -b <bitrate>    set the bitrate in kbps, default 128 kbps\n"
-		"\n"
-		"  ABR options:\n"
-		"    --abr <bitrate> specify average bitrate desired (instead of quality)\n"
-		"\n"
-		"  VBR options:\n"
-		"    -v              use variable bitrate (VBR) (--vbr-old)\n"
-		"    --vbr-old       use old variable bitrate (VBR) routine\n"
-		"    --vbr-new       use new variable bitrate (VBR) routine\n"
-		"    --vbr-mtrh      a merger of old and new (VBR) routine\n"
-		"    -V n            quality setting for VBR.  default n=%i\n"
-		"                    0=high quality,bigger files. 9=smaller files\n"
-		"    -b <bitrate>    specify minimum allowed bitrate, default  32 kbps\n"
-		"    -B <bitrate>    specify maximum allowed bitrate, default 320 kbps\n"
-		"    -F              strictly enforce the -b option, for use with players that\n"
-		"                    do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)\n"
-		"    -t              disable writing Xing VBR informational tag\n"
-		"    --nohist        disable VBR histogram display", gfp->VBR_q);
-
-	wait_for (fp, lessmode);
-	fprintf(fp, "  MP3 header/stream options:\n"
-		"    -e <emp>        de-emphasis n/5/c  (obsolete)\n"
-		"    -c              mark as copyright\n"
-		"    -o              mark as non-original\n"
-		"    -p              error protection.  adds 16 bit checksum to every frame\n"
-		"                    (the checksum is computed correctly)\n"
-		"    --nores         disable the bit reservoir\n"
-		"    --strictly-enforce-ISO   comply as much as possible to ISO MPEG spec\n"
-		"\n"
-		"  Filter options:\n"
-		"    -k              keep ALL frequencies (disables all filters),\n"
-		"                    Can cause ringing and twinkling\n"
-		"  --lowpass <freq>        frequency(kHz), lowpass filter cutoff above freq\n"
-		"  --lowpass-width <freq>  frequency(kHz) - default 15%% of lowpass freq\n"
-		"  --highpass <freq>       frequency(kHz), highpass filter cutoff below freq\n"
-		"  --highpass-width <freq> frequency(kHz) - default 15%% of highpass freq\n"
-		"  --resample <sfreq>  sampling frequency of output file(kHz)- default=automatic\n"
-		"  --cwlimit <freq>    compute tonality up to freq (in kHz) default 8.8717");
-
-	wait_for (fp, lessmode);
-	fprintf(fp,
-		"  ID3 tag options:\n"
-		"    --tt <title>    audio/song title (max 30 chars for version 1 tag)\n"
-		"    --ta <artist>   audio/song artist (max 30 chars for version 1 tag)\n"
-		"    --tl <album>    audio/song album (max 30 chars for version 1 tag)\n"
-		"    --ty <year>     audio/song year of issue (1 to 9999)\n"
-		"    --tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)\n"
-		"    --tn <track>    audio/song track number (1 to 255, creates v1.1 tag)\n"
-		"    --tg <genre>    audio/song genre (name or number in list)\n"
-		"    --add-id3v2     force addition of version 2 tag\n"
-		"    --id3v1-only    add only a version 1 tag\n"
-		"    --id3v2-only    add only a version 2 tag\n"
-		"    --space-id3v1   pad version 1 tag with spaces instead of nulls\n"
-		"    --pad-id3v2     pad version 2 tag with extra 128 bytes\n"
-		"    --genre-list    print alphabetically sorted ID3 genre list and exit\n"
-		"\n"
-		"    Note: A version 2 tag will NOT be added unless one of the input fields\n"
-		"    won't fit in a version 1 tag (e.g. the title string is longer than 30\n"
-		"    characters), or the '--add-id3v2' or '--id3v2-only' options are used,\n"
-		"    or output is redirected to stdout."
-#if defined(HAVE_VORBIS)
-		"\n\n"
-		"    Note: All '--t*' options (except those for track and genre) work for Ogg\n"
-		"    Vorbis output, but other ID3-specific options are ignored."
-#endif
-		);
-	wait_for (fp, lessmode);
-	display_bitrates(fp);
-	return 0;
-}
-
-static void
-display_bitrate(FILE*const fp, const char*const version, const int div, const int index)
-{
-	int	i;
-
-	fprintf(fp, "\nMPEG-%-3s layer III sample frequencies (kHz):  %2d  %2d  %g\n"
-		"bitrates (kbps):",
-		version, 32 / div, 48 / div, 44.1 / div);
-	for (i = 1; i <= 14; i++)
-		fprintf(fp, " %2i", bitrate_table [index] [i]);
-	fprintf(fp, "\n");
-}
-
-int
-display_bitrates(FILE*const fp)
-{
-	display_bitrate(fp, "1"  , 1, 1);
-	display_bitrate(fp, "2"  , 2, 0);
-	display_bitrate(fp, "2.5", 4, 0);
-	fprintf(fp, "\n");
-	fflush(fp);
-	return 0;
-}
-
-typedef struct {
-	const char*name;	/* name of preset */
-	long	resample;	/* resample frequency in Hz, or -1 for no resampling */
-	short	highpass_freq;	/* highpass frequency in Hz, or -1 for no highpass filtering */
-	short	lowpass_freq;	/* lowpass frequency in Hz, or -1 for no lowpass filtering */
-	short	lowpass_width;	/* lowpass width in Hz */
-	signed char no_short_blocks;	/* use of short blocks, 1: no, 0: yes */
-	signed char quality;	/* quality, the same as -f or -h */
-	MPEG_mode mode;		/* channel mode (mono, stereo, joint) */
-	short	cbr;		/* CBR data rate in kbps (8...320) */
-	signed char xvbr_mode;	/* VBR mode (0...9) */
-	short	vbr_min;	/* minimum VBR rate in kbps(8...256) */
-	short	vbr_max;	/* maximum VBR rate in kbps (16...320) */
-} preset_t;
-
-const preset_t Presets [] = {
-/* name       fs     fu    fo    dfo shrt qual  mode       cbr vbr_mode/min/max */
-{ "phone" ,  8000, 125,  3400,    0,  1,  5, MONO        ,  16,  6,   8,  24 },	/* phone standard 300-3400 */
-{ "phon+" , 11025, 100,  4000,    0,  1,  5, MONO        ,  24,  4,  16,  32 },	/* phone theoretical limits */
-{ "lw"    , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* LW */
-{ "mw-eu" , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* MW in europe */
-{ "mw-us" , 16000,  -1,  7500,    0,  0,  5, MONO        ,  40,  3,  24, 112 },	/* MW in U.S.A. */
-{ "sw"    , 11025,  -1,  4000,    0,  0,  5, MONO        ,  24,  3,  16,  56 },	/* SW */
-{ "fm"    , 32000,  -1, 15000,    0,  0,  3, JOINT_STEREO, 112,  3,  80, 256 },
-{ "voice" , 24000,  -1, 12000,    0,  1,  5, MONO        ,  56,  4,  40, 112 },
-{ "radio" ,    -1,  -1, 15000,    0,  0,  3, JOINT_STEREO, 128,  3,  96, 256 },
-{ "tape"  ,    -1,  -1, 18000,  900,  0,  3, JOINT_STEREO, 128,  3,  96, 256 },
-{ "hifi"  ,    -1,  -1, 18000,  900,  0, -1, JOINT_STEREO, 160,  2, 112, 320 },
-{ "cd"    ,    -1,  -1,    -1,   -1,  0, -1, STEREO      , 192,  1, 128, 320 },
-{ "studio",    -1,  -1,    -1,   -1,  0, -1, STEREO      , 256,  0, 160, 320 },
-};
-
-/*
-* Writes presetting info to #stdout#
-*/
-
-/* print possible combination */
-static int
-presets_info(const lame_global_flags*gfp, FILE*const fp, const char*ProgramName)
-{
-	int	i;
-
-	fprintf(fp, "\n");
-	lame_version_print(fp);
-
-	fprintf(fp, "Presets are some shortcuts for common settings.\n");
-	fprintf(fp, "They can be combined with -v if you want VBR MP3s.\n");
-
-	fprintf(fp, "\n                ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  strlen(Presets[i].name) <= 4? "%5s ": " %-5s",
-			Presets[i].name);
-	fprintf(fp, "\n=================");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "======");
-	fprintf(fp, "\n--resample      ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		if (Presets[i].resample < 0)
-			fprintf(fp,  "      ");
-		else
-			fprintf(fp,  "%6.3g",  Presets[i].resample * 1.e-3);
-	fprintf(fp, "\n--highpass      ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		if (Presets[i].highpass_freq < 0)
-			fprintf(fp,  "      ");
-		else
-			fprintf(fp,  "%6.3g",  Presets[i].highpass_freq * 1.e-3);
-	fprintf(fp, "\n--lowpass       ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		if (Presets[i].lowpass_freq < 0)
-			fprintf(fp,  "      ");
-		else
-			fprintf(fp,  "%6.3g",  Presets[i].lowpass_freq * 1.e-3);
-	fprintf(fp, "\n--lowpass-width ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		if (Presets[i].lowpass_width < 0)
-			fprintf(fp,  "      ");
-		else
-			fprintf(fp,  "%6.3g",  Presets[i].lowpass_width * 1.e-3);
-	fprintf(fp, "\n--noshort       ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		switch (Presets[i].no_short_blocks ) {
-		case 1:
-			fprintf(fp,  "   yes");
-			break;
-		case 0:
-			fprintf(fp,  "    no");
-			break;
-		case -1:
-			fprintf(fp,  "      ");
-			break;
-		default:
-			assert (0);
-			break;
-		}
-	fprintf(fp, "\n                ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		switch (Presets[i].mode ) {
-		case MONO:
-			fprintf(fp, "   -mm");
-			break;
-		case JOINT_STEREO:
-			fprintf(fp, "   -mj");
-			break;
-		case STEREO:
-			fprintf(fp, "   -ms");
-			break;
-		case -1:
-			fprintf(fp, "      ");
-			break;
-		default:
-			assert (0);
-			break;
-		}
-	fprintf(fp, "\n                ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		switch (Presets[i].quality ) {
-		case -1:
-			fprintf(fp, "      ");
-			break;
-		case 2:
-			fprintf(fp, "    -h");
-			break;
-		case 3:
-			fprintf(fp, "   -q3");
-			break;
-		case 5:
-			fprintf(fp, "      ");
-			break;
-		case 7:
-			fprintf(fp, "    -f");
-			break;
-		default:
-			assert (0);
-			break;
-		}
-	fprintf(fp, "\n-b              ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "%6u", Presets[i].cbr);
-	fprintf(fp, "\n-- PLUS WITH -v ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "------");
-	fprintf(fp, "-\n-V              ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "%6u", Presets[i].xvbr_mode);
-	fprintf(fp, "\n-b              ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "%6u", Presets[i].vbr_min);
-	fprintf(fp, "\n-B              ");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "%6u", Presets[i].vbr_max);
-	fprintf(fp, "\n----------------");
-	for (i = 0; i < sizeof(Presets) / sizeof(*Presets); i++)
-		fprintf(fp,  "------");
-
-	fprintf(fp, "-\nEXAMPLES:\n");
-	fprintf(fp, " a) --preset fm\n");
-	fprintf(fp, "    equal to: -mj -b112 --resample 32 --lowpass 15 --lowpass-width 0\n");
-	fprintf(fp, " b) -v --preset studio\n");
-	fprintf(fp, "    equals to: -h -ms -V0 -b160 -B320\n");
-
-	return 0;
-}
-
-
-static int
-presets_setup(lame_global_flags*gfp, const char*preset_name, const char*ProgramName)
-{
-	int	i;
-
-	for (i = 0; i < sizeof Presets / sizeof *Presets; i++)
-		if (0 == strncmp(preset_name, Presets[i].name, strlen(preset_name))) {
-			if (Presets[i].resample >= 0)
-				(void) lame_set_out_samplerate(gfp,
-					Presets[i].resample);
-			if (Presets[i].highpass_freq >= 0)
-				gfp ->highpassfreq = Presets[i].highpass_freq,
-					gfp ->highpasswidth = 0;
-			gfp ->lowpassfreq          = Presets[i].lowpass_freq;
-			gfp ->lowpasswidth         = Presets[i].lowpass_width;
-			gfp ->no_short_blocks      = Presets[i].no_short_blocks;
-			(void) lame_set_quality(gfp, Presets[i].quality);
-			(void) lame_set_mode(gfp, Presets[i].mode);
-			gfp ->brate                = Presets[i].cbr;
-			gfp ->VBR_q                = Presets[i].xvbr_mode;
-			gfp ->VBR_min_bitrate_kbps = Presets[i].vbr_min;
-			gfp ->VBR_max_bitrate_kbps = Presets[i].vbr_max;
-			return 0;
-		}
-	presets_info(gfp, stderr, ProgramName);
-	return -1;
-}
-
-static void
-genre_list_handler(int num, const char *name, void *cookie)
-{
-	printf("%3d %s\n", num, name);
-}
-
-/*
-* parse_args - Sets encoding parameters to the specifications of the
-* command line.  Default settings are used for parameters
-* not specified in the command line.
-*
-* If the input file is in WAVE or AIFF format, the sampling frequency is read
-* from the AIFF header.
-*
-* The input and output filenames are read into #inpath# and #outpath#.
-*/
-
-/* would use real "strcasecmp" but it isn't portable */
-static int
-local_strcasecmp(const char*s1, const char*s2)
-{
-	unsigned char	c1, c2;
-
-	do {
-		c1 = tolower(*s1);
-		c2 = tolower(*s2);
-		if (!c1)
-			break;
-		++s1;
-		++s2;
-	} while (c1 == c2);
-	return c1 - c2;
-}
-
-/*
- * LAME is a simple frontend which just uses the file extension
- * to determine the file type.  Trying to analyze the file
- * contents is well beyond the scope of LAME and should not be added.
- */
-static int
-filename_to_type(const char*FileName)
-{
-	int	len = strlen(FileName);
-
-	if (len < 4)
-		return sf_unknown;
-
-	FileName += len - 4;
-	if (0 == local_strcasecmp(FileName, ".mpg" ))
-		return sf_mp1;
-	if (0 == local_strcasecmp(FileName, ".mp1" ))
-		return sf_mp1;
-	if (0 == local_strcasecmp(FileName, ".mp2" ))
-		return sf_mp2;
-	if (0 == local_strcasecmp(FileName, ".mp3" ))
-		return sf_mp3;
-	if (0 == local_strcasecmp(FileName, ".ogg" ))
-		return sf_ogg;
-	if (0 == local_strcasecmp(FileName, ".wav" ))
-		return sf_wave;
-	if (0 == local_strcasecmp(FileName, ".aif" ))
-		return sf_aiff;
-	if (0 == local_strcasecmp(FileName, ".raw" ))
-		return sf_raw;
-	return sf_unknown;
-}
-
-static int
-resample_rate(double freq)
-{
-	if (freq >= 1.e3)
-		freq *= 1.e-3;
-
-	switch ((int)freq) {
-	case 8:
-		return  8000;
-	case 11:
-		return 11025;
-	case 12:
-		return 12000;
-	case 16:
-		return 16000;
-	case 22:
-		return 22050;
-	case 24:
-		return 24000;
-	case 32:
-		return 32000;
-	case 44:
-		return 44100;
-	case 48:
-		return 48000;
-	default:
-		fprintf(stderr, "Illegal resample frequency: %.3f kHz\n", freq);
-		return 0;
-	}
-}
-
-/* Ugly, NOT final version */
-
-#define T_IF(str)	if (0 == local_strcasecmp (token,str) ) {
-#define T_ELIF(str)	} else if (0 == local_strcasecmp (token,str) ) {
-#define T_ELIF2(str1,str2) } else if (0 == local_strcasecmp(token,str1) || \
-			0 == local_strcasecmp(token,str2)) {
-#define T_ELSE		} else {
-#define T_END		}
-
-int
-parse_args(lame_global_flags*gfp, int argc, char **argv)
-{
-	int err, i, autoconvert  = 0;
-	double val;
-	const char *ProgramName = argv[0];
-
-	/* turn on display options. user settings may turn them off below */
-	silent   = 0;
-	brhist   = 1;
-	mp3_delay = 0;
-	mp3_delay_set = 0;
-	id3tag_init(gfp);
-
-	/* process args */
-	for (i = 0, err = 0; ++i < argc && !err; ) {
-		char	c;
-		char *token, *arg, *nextArg;
-		int	argUsed;
-
-		token = argv[i];
-		if (*token++ == '-' ) {
-			argUsed = 0;
-			nextArg = i + 1 < argc? argv[i+1]: "";
-
-			if (*token == '-') {		/* GNU style */
-				token++;
-
-				T_IF ("resample")
-				argUsed = 1;
-				(void) lame_set_out_samplerate(gfp,
-					resample_rate(atof (nextArg) ));
-
-				T_ELIF ("vbr-old")
-				gfp->VBR = vbr_rh;
-
-				T_ELIF ("vbr-new")
-				gfp->VBR = vbr_mt;
-
-				T_ELIF ("vbr-mtrh")
-				gfp->VBR = vbr_mtrh;
-
-				T_ELIF ("r3mix")
-				gfp->VBR = vbr_rh;
-				gfp->VBR_q = 1;
-				(void) lame_set_quality(gfp, 2);
-				gfp->lowpassfreq = 19500;
-				(void) lame_set_mode(gfp, JOINT_STEREO);
-				gfp->ATHtype = 3;
-				gfp->VBR_min_bitrate_kbps = 64;
-
-				T_ELIF ("abr")
-				argUsed = 1;
-				gfp->VBR = vbr_abr;
-				gfp->VBR_mean_bitrate_kbps = atoi(nextArg);
-				/*
-				 * values larger than 8000 are bps (like
-				 * Fraunhofer), so it's strange to get 320000
-				 * bps MP3 when specifying 8000 bps MP3.
-				 */
-				if (gfp ->VBR_mean_bitrate_kbps >= 8000)
-					gfp->VBR_mean_bitrate_kbps = (gfp->VBR_mean_bitrate_kbps + 500 )/1000;
-				gfp->VBR_mean_bitrate_kbps = Min(gfp->VBR_mean_bitrate_kbps, 320);
-				gfp->VBR_mean_bitrate_kbps = Max(gfp->VBR_mean_bitrate_kbps,   8);
-
-				T_ELIF ("mp1input")
-				input_format = sf_mp1;
-
-				T_ELIF ("mp2input")
-				input_format = sf_mp2;
-
-				T_ELIF ("mp3input")
-				input_format = sf_mp3;
-
-				T_ELIF ("ogginput")
-#if defined(HAVE_VORBIS)
-				input_format = sf_ogg;
-#else
-				fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
-				return -1;
-#endif
-				T_ELIF ("ogg")
-#if defined(HAVE_VORBIS)
-				(void) lame_set_ogg(gfp, 1);
-#else
-				fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
-				return -1;
-#endif
-				T_ELIF ("phone")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("voice")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("radio")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("tape")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("cd")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("studio")
-				if (presets_setup(gfp, token, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("noshort")
-				gfp->no_short_blocks = 1;
-
-				T_ELIF ("short")
-				gfp->no_short_blocks = 0;
-
-				T_ELIF ("decode")
-				(void) lame_set_decode_only(gfp, 1);
-
-				T_ELIF ("decode-mp3delay")
-				mp3_delay = atoi(nextArg);
-				mp3_delay_set = 1;
-				argUsed = 1;
-
-				T_ELIF ("noath")
-				gfp->noATH = 1;
-
-				T_ELIF ("nores")
-				gfp->disable_reservoir = 1;
-				gfp->padding_type = 0;
-
-				T_ELIF ("strictly-enforce-ISO")
-				gfp->strict_ISO = 1;
-
-				T_ELIF ("athonly")
-				gfp->ATHonly = 1;
-
-				T_ELIF ("athlower")
-				argUsed = 1;
-				gfp->ATHlower = atof(nextArg);
-
-				T_ELIF ("athtype")
-				argUsed = 1;
-				gfp->ATHtype = atoi(nextArg);
-
-				T_ELIF ("scale")
-				argUsed = 1;
-				(void) lame_set_scale(gfp, atof(nextArg));
-
-				T_ELIF ("freeformat")
-				gfp->free_format = 1;
-
-				T_ELIF ("athshort")
-				gfp->ATHshort = 1;
-
-				T_ELIF ("nohist")
-				brhist = 0;
-
-				/* options for ID3 tag */
-				T_ELIF ("tt")
-				argUsed = 1;
-				id3tag_set_title(gfp, nextArg);
-
-				T_ELIF ("ta")
-				argUsed = 1;
-				id3tag_set_artist(gfp, nextArg);
-
-				T_ELIF ("tl")
-				argUsed = 1;
-				id3tag_set_album(gfp, nextArg);
-
-				T_ELIF ("ty")
-				argUsed = 1;
-				id3tag_set_year(gfp, nextArg);
-
-				T_ELIF ("tc")
-				argUsed = 1;
-				id3tag_set_comment(gfp, nextArg);
-
-				T_ELIF ("tn")
-				argUsed = 1;
-				id3tag_set_track(gfp, nextArg);
-
-				T_ELIF ("tg")
-				argUsed = 1;
-				if (id3tag_set_genre(gfp, nextArg)) {
-					fprintf(stderr, "Unknown genre: %s.  Specify genre name or number\n", nextArg);
-					return -1;
-				}
-
-				T_ELIF ("add-id3v2")
-				id3tag_add_v2(gfp);
-
-				T_ELIF ("id3v1-only")
-				id3tag_v1_only(gfp);
-
-				T_ELIF ("id3v2-only")
-				id3tag_v2_only(gfp);
-
-				T_ELIF ("space-id3v1")
-				id3tag_space_v1(gfp);
-
-				T_ELIF ("pad-id3v2")
-				id3tag_pad_v2(gfp);
-
-				T_ELIF ("genre-list")
-				id3tag_genre_list(genre_list_handler, NULL);
-				return - 2;
-
-				T_ELIF ("lowpass")
-				val     = atof(nextArg);
-				argUsed = 1;
-				/* useful are 0.001 kHz...50 kHz, 50 Hz...50000 Hz */
-				gfp ->lowpassfreq = val * (val < 50. ? 1.e3 : 1.e0 ) + 0.5;
-				if (val < 0.001 || val > 50000. ) {
-					fprintf(stderr, "Must specify lowpass with --lowpass freq, freq >= 0.001 kHz\n");
-					return -1;
-				}
-
-				T_ELIF ("lowpass-width")
-				argUsed = 1;
-				gfp->lowpasswidth =  1000.0 * atof(nextArg ) + 0.5;
-				if (gfp->lowpasswidth  < 0) {
-					fprintf(stderr, "Must specify lowpass width with --lowpass-width freq, freq >= 0 kHz\n");
-					return -1;
-				}
-
-				T_ELIF ("highpass")
-				val = atof(nextArg);
-				argUsed = 1;
-				/* useful are 0.001 kHz...16 kHz, 16 Hz...50000 Hz */
-				gfp->highpassfreq =  val * (val < 16. ? 1.e3 : 1.e0 ) + 0.5;
-				if (val < 0.001 || val > 50000. ) {
-					fprintf(stderr, "Must specify highpass with --highpass freq, freq >= 0.001 kHz\n");
-					return -1;
-				}
-
-				T_ELIF ("highpass-width")
-				argUsed = 1;
-				gfp->highpasswidth =  1000.0 * atof(nextArg ) + 0.5;
-				if (gfp->highpasswidth  < 0) {
-					fprintf(stderr, "Must specify highpass width with --highpass-width freq, freq >= 0 kHz\n");
-					return -1;
-				}
-
-				T_ELIF ("cwlimit")
-				val = atof (nextArg);
-				argUsed = 1;
-				/* useful are 0.001 kHz...50 kHz, 50 Hz...50000 Hz */
-				gfp ->cwlimit = val *(val <= 50. ? 1.e3 : 1.e0);
-				if (gfp->cwlimit <= 0 ) {
-					fprintf(stderr, "Must specify cwlimit with --cwlimit freq, freq >= 0.001 kHz\n");
-					return -1;
-				}
-
-				T_ELIF ("comp")
-				argUsed = 1;
-				gfp->compression_ratio =  atof(nextArg);
-				if (gfp->compression_ratio < 1.0 ) {
-					fprintf(stderr, "Must specify compression ratio >= 1.0\n");
-					return -1;
-				}
-
-				T_ELIF ("notemp")
-				gfp->useTemporal =  0;
-
-				T_ELIF ("nspsytune")
-				gfp->exp_nspsytune |= 1;
-				gfp->experimentalZ = 1;
-				gfp->experimentalX = 1;
-
-				T_ELIF ("nssafejoint")
-				gfp->exp_nspsytune |= 2;
-
-				T_ELIF ("ns-bass")
-				argUsed = 1;
-				 {
-					double	d;
-					int	k;
-					d = atof(nextArg);
-					k = (int)(d * 4);
-					if (k < -32)
-						k = -32;
-					if (k >  31)
-						k =  31;
-					if (k < 0)
-						k += 64;
-					gfp->exp_nspsytune |= (k << 2);
-				}
-
-				T_ELIF ("ns-alto")
-				argUsed = 1;
-				 {
-					double	d;
-					int	k;
-					d = atof(nextArg);
-					k = (int)(d * 4);
-					if (k < -32)
-						k = -32;
-					if (k >  31)
-						k =  31;
-					if (k < 0)
-						k += 64;
-					gfp->exp_nspsytune |= (k << 8);
-				}
-
-				T_ELIF ("ns-treble")
-				argUsed = 1;
-				 {
-					double	d;
-					int	k;
-					d = atof(nextArg);
-					k = (int)(d * 4);
-					if (k < -32)
-						k = -32;
-					if (k >  31)
-						k =  31;
-					if (k < 0)
-						k += 64;
-					gfp->exp_nspsytune |= (k << 14);
-				}
-
-				/* some more GNU-ish options could be added
-		 * brief         => few messages on screen (name, status report)
-		 * o/output file => specifies output filename
-		 * O             => stdout
-		 * i/input file  => specifies input filename
-		 * I             => stdin
-		 */
-				T_ELIF2 ("quiet", "silent")
-				silent = 10;    /* on a scale from 1 to 10 be very silent */
-
-				T_ELIF ("verbose")
-				silent = 0;    /* print a lot on screen, the default */
-
-				T_ELIF2 ("version", "license")
-				print_license(gfp, stdout, ProgramName);
-				return - 2;
-
-				T_ELIF2 ("help", "usage")
-				short_help(gfp, stdout, ProgramName);
-				return - 2;
-
-				T_ELIF ("longhelp")
-				long_help(gfp, stdout, ProgramName, 0 /* lessmode=NO */);
-				return - 2;
-
-				T_ELIF ("?")
-				long_help(gfp, stdout, ProgramName, 1 /* lessmode=YES */);
-				return - 2;
-
-				T_ELIF ("preset")
-				argUsed = 1;
-				if (presets_setup(gfp, nextArg, ProgramName ) < 0)
-					return -1;
-
-				T_ELIF ("disptime")
-				argUsed = 1;
-				update_interval = atof (nextArg);
-
-				T_ELSE
-					fprintf(stderr, "%s: unrec option --%s\n", ProgramName, token);
-
-				T_END
-					i += argUsed;
-			} else {
-				while ((c = *token++) != '\0' ) {
-					arg = *token ? token : nextArg;
-					switch (c) {
-					case 'm':
-						argUsed = 1;
-
-						switch (*arg ) {
-						case 's':
-							(void) lame_set_mode(gfp, STEREO);
-							break;
-						case 'd':
-							(void) lame_set_mode(gfp, DUAL_CHANNEL);
-							fprintf(stderr,
-								"%s: dual channel is not supported yet, the result (perhaps stereo)\n"
-								"  may not be what you expect\n",
-								ProgramName);
-							break;
-						case 'f':
-							gfp->force_ms = 1;
-							/* FALLTHROUGH */
-						case 'j':
-							(void) lame_set_mode(gfp, JOINT_STEREO);
-							break;
-						case 'm':
-							(void) lame_set_mode(gfp, MONO);
-							break;
-						case 'a':
-							(void) lame_set_mode_automs(gfp, 1);
-							/* lame picks mode & uses variable MS threshold */
-							break;
-						default :
-							fprintf(stderr, "%s: -m mode must be s/d/j/f/m not %s\n", ProgramName, arg);
-							err = 1;
-							break;
-						}
-						break;
-
-					case 'V':
-						argUsed = 1;
-						/* to change VBR default look in lame.h */
-						if (gfp->VBR == vbr_off)
-							gfp->VBR = vbr_default;
-						gfp->VBR_q = atoi(arg);
-						if (gfp->VBR_q < 0)
-							gfp->VBR_q = 0;
-						if (gfp->VBR_q > 9)
-							gfp->VBR_q = 9;
-						break;
-					case 'v':
-						/* to change VBR default look in lame.h */
-						if (gfp->VBR == vbr_off)
-							gfp->VBR = vbr_default;
-						break;
-
-					case 'q':
-						argUsed = 1;
-						 {
-							int tmp_quality = atoi(arg);
-
-							/* XXX should we move this into lame_set_quality()? */
-							if (tmp_quality < 0)
-								tmp_quality = 0;
-							if (tmp_quality > 9)
-								tmp_quality = 9;
-
-							(void) lame_set_quality(gfp, tmp_quality);
-						}
-						break;
-					case 'f':
-						(void) lame_set_quality(gfp, 7);
-						break;
-					case 'h':
-						(void) lame_set_quality(gfp, 2);
-						break;
-
-					case 's':
-						argUsed = 1;
-						val = atof(arg);
-						(void) lame_set_in_samplerate(gfp,
-							val *(val <= 192 ? 1.e3 : 1.e0 ) + 0.5);
-						break;
-					case 'b':
-						argUsed = 1;
-						gfp->brate = atoi(arg);
-						gfp->VBR_min_bitrate_kbps = gfp->brate;
-						break;
-					case 'B':
-						argUsed = 1;
-						gfp->VBR_max_bitrate_kbps = atoi(arg);
-						break;
-					case 'F':
-						gfp->VBR_hard_min = 1;
-						break;
-					case 't':  /* dont write VBR tag */
-						(void) lame_set_bWriteVbrTag(gfp, 0);
-						(void) lame_set_disable_waveheader(gfp, 1);
-						break;
-					case 'r':  /* force raw pcm input file */
-#if defined(LIBSNDFILE)
-						fprintf(stderr, "WARNING: libsndfile may ignore -r and perform fseek's on the input.\n"
-							"Compile without libsndfile if this is a problem.\n");
-#endif
-						input_format = sf_raw;
-						break;
-					case 'x':  /* force byte swapping */
-						swapbytes = 1;
-						break;
-					case 'p': /* (jo) error_protection: add crc16 information to stream */
-						gfp->error_protection = 1;
-						break;
-					case 'a': /* autoconvert input file from stereo to mono - for mono mp3 encoding */
-						autoconvert = 1;
-						(void) lame_set_mode(gfp, MONO);
-						break;
-					case 'k':
-						gfp->lowpassfreq = -1;
-						gfp->highpassfreq = -1;
-						break;
-					case 'd':
-						gfp->allow_diff_short = 1;
-						break;
-					case 'S':
-						silent = 1;
-						break;
-					case 'X':
-						argUsed = 1;
-						gfp->experimentalX = atoi(arg);
-						break;
-					case 'Y':
-						gfp->experimentalY = 1;
-						break;
-					case 'Z':
-						gfp->experimentalZ = 1;
-						break;
-#if defined(HAVE_GTK)
-					case 'g': /* turn on gtk analysis */
-						(void) lame_set_analysis(gfp, 1);
-						break;
-#endif
-					case 'e':
-						argUsed = 1;
-
-						switch (*arg) {
-						case 'n':
-							gfp ->emphasis = 0;
-							break;
-						case '5':
-							gfp ->emphasis = 1;
-							break;
-						case 'c':
-							gfp ->emphasis = 3;
-							break;
-						default :
-							fprintf(stderr, "%s: -e emp must be n/5/c not %s\n", ProgramName, arg);
-							err = 1;
-							break;
-						}
-						break;
-					case 'c':
-						gfp->copyright = 1;
-						break;
-					case 'o':
-						gfp->original  = 0;
-						break;
-
-					case '?':
-						long_help(gfp, stderr, ProgramName, 0 /* LESSMODE=NO */);
-						return -1;
-
-					default:
-						fprintf(stderr, "%s: unrec option %c\n", ProgramName, c);
-						err = 1;
-						break;
-					}
-					if (argUsed) {
-						if (arg == token)
-							token = ""; /* no more from token */
-						else
-							++i; /* skip arg we used */
-						arg = "";
-						argUsed = 0;
-					}
-				}
-			}
-		} else {
-			fprintf(stderr, "%s: excess arg %s\n", ProgramName, argv[i]);
-			err = 1;
-		}
-	}
-
-	if (err) {
-		usage(gfp, stderr, ProgramName);
-		return -1;
-	}
-
-//	if (inPath[0] == '-')
-	silent = 1;		/* turn off status - it's broken for stdin */
-
-	/* some file options not allowed with stdout */
-//	if (outPath[0] == '-')
-	(void) lame_set_bWriteVbrTag(gfp, 0); /* turn off VBR tag */
-
-#if !(defined HAVE_MPGLIB || defined AMIGA_MPEGA)
-	if (input_format == sf_mp1 ||
-		input_format == sf_mp2 ||
-		input_format == sf_mp3) {
-		fprintf(stderr, "Error: libmp3lame not compiled with mpg123 *decoding* support \n");
-		return -1;
-	}
-#endif
-
-#if !(defined HAVE_VORBIS)
-	if (input_format == sf_ogg) {
-		fprintf(stderr, "Error: mp3enc not compiled with Vorbis support\n");
-		return -1;
-	}
-#endif
-	/* default guess for number of channels */
-	if (autoconvert)
-		(void) lame_set_num_channels(gfp, 2);
-	else if (MONO == lame_get_mode(gfp ))
-		(void) lame_set_num_channels(gfp, 1);
-	else
-		(void) lame_set_num_channels(gfp, 2);
-
-	if (gfp->free_format) {
-		if (gfp ->brate < 8  ||  gfp ->brate > 640) {
-			fprintf(stderr, "For free format, specify a bitrate between 8 and 640 kbps\n");
-			return -1;
-		}
-	}
-	return 0;
-}
--- a/sys/src/games/mp3enc/parse.h
+++ /dev/null
@@ -1,8 +1,0 @@
-int  print_license(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
-int  usage(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
-int  short_help(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName);
-int  long_help(const lame_global_flags* gfp, FILE* const fp, const char* ProgramName, int lessmode);
-int  display_bitrates(FILE* const fp);
-
-int  parse_args(lame_global_flags* gfp, int argc, char** argv);
-void print_config(lame_global_flags* gfp);
--- a/sys/src/games/mp3enc/pcm.c
+++ /dev/null
@@ -1,1609 +1,0 @@
-/* -*- mode: C; mode: fold -*- */
-
-/* $Id: pcm.c,v 1.7 2001/02/17 14:30:56 aleidinger Exp $ */
-
-/*
- *  There are a lot of not tested return codes.
- *  This is currently intention to make the code more readable
- *  in the design phase.
- *  Keine Ber�cksichtigung des Ein- und Ausschwingens des Downsamplefilters am
- *  Anfang und am Ende wie bei meinem Resample-Programm
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "bitstream.h"
-#include "id3tag.h"
-
-#define FN(x)	do { static unsigned int cnt = 0; if (cnt < 100000) fprintf (stderr,"[%3u]>>>%s<<<\n",++cnt,(x)), fflush(stderr); } while (0)
-
-#ifdef KLEMM_44
-
-/*{{{ #includes                       */
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <math.h>
-#include <memory.h>
-#include <unistd.h>
-#include "pcm.h"
-
-/*}}}*/
-/*{{{ bitstream object                */
-
-/*
- *  About handling of octetstreams:
- *
- *  CHAR_BIT = 8: data points to a normal memory block which can be written to
- *                disk via fwrite
- *  CHAR_BIT > 8: On every char only the bits from 0...7 are used. Depending on the
- *                host I/O it can be possible that you must first pack the data
- *                stream before writing to disk/network/...
- *  CHAR_BIT < 8: Not allowed by C
- */
-
-octetstream_t*  octetstream_open ( OUT size_t  size )
-{
-    octetstream_t*  ret = (octetstream_t*) calloc ( 1, sizeof(octetstream_t) );
-    FN("octetstream_open");
-    ret -> data = (uint8_t*) calloc ( 1, size );
-    ret -> size = size;
-    return ret;
-}
-
-int  octetstream_resize ( INOUT octetstream_t* const  os, OUT size_t  size )
-{
-    FN("octetstream_resize");
-    if ( size > os->size ) {
-        os -> data = (uint8_t*) realloc ( os -> data, size );
-        memset ( os -> data + os -> size, 0, size - os -> size );
-        os -> size = size;
-    } else if ( size < os->size ) {
-	os -> data = (uint8_t*) realloc ( os -> data, os->size = size );
-    }
-    return 0;
-}
-
-int  octetstream_close ( INOUT octetstream_t* const  os )
-{
-    FN("octetstream_close");
-    if ( os == NULL )
-        return -1;
-    if ( os -> data != NULL ) {
-        free (os -> data);
-        os -> data = NULL;
-        free (os);
-        return 0;
-    } else {
-        free (os);
-        return -1;
-    }
-}
-
-/*}}}*/
-/*{{{ encode one frame                */
-
-static inline int  lame_encode_frame (
-        INOUT lame_t*     lame,
-        OUTTR sample_t**  inbuf,
-        IN    uint8_t*    mp3buf,
-        OUT   size_t      mp3buf_size )
-{
-    int  ret;
-#if 1
-    int           i;
-    static int    j  = 0;
-    static FILE*  fp = NULL;
-    if ( fp == NULL )
-        fp = fopen ("pcm_data.txt", "w");
-    for ( i = 0; i < lame->frame_size; i++ )
-        fprintf ( fp, "%7d %11.4f %11.4f\n", j++, inbuf[0][i], inbuf[1][i] );
-    fprintf ( fp, "\n" );
-    fflush ( fp );
-#endif
-    
-    FN("lame_encode_frame");
-
-    switch ( lame -> coding ) {
-#ifdef HAVE_MPEG_LAYER1
-    case coding_MPEG_Layer_1:
-        ret = lame_encode_mp1_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#endif
-#ifdef HAVE_MPEG_LAYER2
-    case coding_MPEG_Layer_2:
-        ret = lame_encode_mp2_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#endif
-    case coding_MPEG_Layer_3:
-        ret = lame_encode_mp3_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#ifdef HAVE_MPEG_PLUS
-    case coding_MPEG_plus:
-        ret = lame_encode_mpp_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#endif
-#ifdef HAVE_AAC
-    case coding_MPEG_AAC:
-        ret = lame_encode_aac_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#endif
-#ifdef HAVE_VORBIS
-    case coding_Ogg_Vorbis:
-        ret = lame_encode_ogg_frame ( lame->global_flags, inbuf[0], inbuf[1], mp3buf, mp3buf_size );
-        break;
-#endif
-    default:
-        ret = -5;
-        break;
-    }
-    
-    if ( ret >= 0 ) {
-        lame->frame_count++;
-        if ( lame->analyzer_callback != NULL )
-            lame->analyzer_callback ( lame, lame->frame_size );
-    }
-    return ret;
-}
-
-/*}}}*/
-/*{{{ demultiplexing tools            */
-
-/*
- * Now there are following the so called peek functions. They got a pointer and returning
- * the data to this pointer as a sample. The size of the memory object can be from
- * 8 up to 80 bits. One sample must be fully determined by it's bits, not by the history
- * or by other channels or things like that. Also the input must have a integral byte size.
- *
- * That means:
- *
- *   - 4 or 6 bit PCM can't be decoded
- *   - APCM can't be decoded
- *   - ulaw/alaw *can* be decoded
- *
- * Note: In the future there will be a SMART define supported which only
- *       support native endian shorts.
- */
-
-static const int16_t  ulaw [256] = {
-    -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956,
-    -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764,
-    -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412,
-    -11900, -11388, -10876, -10364,  -9852,  -9340,  -8828,  -8316,
-     -7932,  -7676,  -7420,  -7164,  -6908,  -6652,  -6396,  -6140,
-     -5884,  -5628,  -5372,  -5116,  -4860,  -4604,  -4348,  -4092,
-     -3900,  -3772,  -3644,  -3516,  -3388,  -3260,  -3132,  -3004,
-     -2876,  -2748,  -2620,  -2492,  -2364,  -2236,  -2108,  -1980,
-     -1884,  -1820,  -1756,  -1692,  -1628,  -1564,  -1500,  -1436,
-     -1372,  -1308,  -1244,  -1180,  -1116,  -1052,   -988,   -924,
-      -876,   -844,   -812,   -780,   -748,   -716,   -684,   -652,
-      -620,   -588,   -556,   -524,   -492,   -460,   -428,   -396,
-      -372,   -356,   -340,   -324,   -308,   -292,   -276,   -260,
-      -244,   -228,   -212,   -196,   -180,   -164,   -148,   -132,
-      -120,   -112,   -104,    -96,    -88,    -80,    -72,    -64,
-       -56,    -48,    -40,    -32,    -24,    -16,     -8,      0,
-     32124,  31100,  30076,  29052,  28028,  27004,  25980,  24956,
-     23932,  22908,  21884,  20860,  19836,  18812,  17788,  16764,
-     15996,  15484,  14972,  14460,  13948,  13436,  12924,  12412,
-     11900,  11388,  10876,  10364,   9852,   9340,   8828,   8316,
-      7932,   7676,   7420,   7164,   6908,   6652,   6396,   6140,
-      5884,   5628,   5372,   5116,   4860,   4604,   4348,   4092,
-      3900,   3772,   3644,   3516,   3388,   3260,   3132,   3004,
-      2876,   2748,   2620,   2492,   2364,   2236,   2108,   1980,
-      1884,   1820,   1756,   1692,   1628,   1564,   1500,   1436,
-      1372,   1308,   1244,   1180,   1116,   1052,    988,    924,
-       876,    844,    812,    780,    748,    716,    684,    652,
-       620,    588,    556,    524,    492,    460,    428,    396,
-       372,    356,    340,    324,    308,    292,    276,    260,
-       244,    228,    212,    196,    180,    164,    148,    132,
-       120,    112,    104,     96,     88,     80,     72,     64,
-        56,     48,     40,     32,     24,     16,      8,      0,
-};
-
-static const int16_t  alaw [256] = {
-     -5504,  -5248,  -6016,  -5760,  -4480,  -4224,  -4992,  -4736,
-     -7552,  -7296,  -8064,  -7808,  -6528,  -6272,  -7040,  -6784,
-     -2752,  -2624,  -3008,  -2880,  -2240,  -2112,  -2496,  -2368,
-     -3776,  -3648,  -4032,  -3904,  -3264,  -3136,  -3520,  -3392,
-    -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944,
-    -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136,
-    -11008, -10496, -12032, -11520,  -8960,  -8448,  -9984,  -9472,
-    -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568,
-      -344,   -328,   -376,   -360,   -280,   -264,   -312,   -296,
-      -472,   -456,   -504,   -488,   -408,   -392,   -440,   -424,
-       -88,    -72,   -120,   -104,    -24,     -8,    -56,    -40,
-      -216,   -200,   -248,   -232,   -152,   -136,   -184,   -168,
-     -1376,  -1312,  -1504,  -1440,  -1120,  -1056,  -1248,  -1184,
-     -1888,  -1824,  -2016,  -1952,  -1632,  -1568,  -1760,  -1696,
-      -688,   -656,   -752,   -720,   -560,   -528,   -624,   -592,
-      -944,   -912,  -1008,   -976,   -816,   -784,   -880,   -848,
-      5504,   5248,   6016,   5760,   4480,   4224,   4992,   4736,
-      7552,   7296,   8064,   7808,   6528,   6272,   7040,   6784,
-      2752,   2624,   3008,   2880,   2240,   2112,   2496,   2368,
-      3776,   3648,   4032,   3904,   3264,   3136,   3520,   3392,
-     22016,  20992,  24064,  23040,  17920,  16896,  19968,  18944,
-     30208,  29184,  32256,  31232,  26112,  25088,  28160,  27136,
-     11008,  10496,  12032,  11520,   8960,   8448,   9984,   9472,
-     15104,  14592,  16128,  15616,  13056,  12544,  14080,  13568,
-       344,    328,    376,    360,    280,    264,    312,    296,
-       472,    456,    504,    488,    408,    392,    440,    424,
-        88,     72,    120,    104,     24,      8,     56,     40,
-       216,    200,    248,    232,    152,    136,    184,    168,
-      1376,   1312,   1504,   1440,   1120,   1056,   1248,   1184,
-      1888,   1824,   2016,   1952,   1632,   1568,   1760,   1696,
-       688,    656,    752,    720,    560,    528,    624,    592,
-       944,    912,   1008,    976,    816,    784,    880,    848,
-};
-
-/*
- *  These macros get 1...4 bytes and calculating a value between -32768 and +32768.
- *  The first argument of the macros is the MSB, the last the LSB.
- *  These are used to decode integer PCM (if there is no faster code available).
- */
-
-#define BYTES1(x1)          ((((int8_t)(x1)) << 8))
-#define BYTES2(x1,x2)       ((((int8_t)(x1)) << 8) + (uint8_t)(x2))
-#define BYTES3(x1,x2,x3)    ((((int8_t)(x1)) << 8) + (uint8_t)(x2) + 1/256.*(uint8_t)(x3))
-#define BYTES4(x1,x2,x3,x4) ((((int8_t)(x1)) << 8) + (uint8_t)(x2) + 1/256.*(uint8_t)(x3) + 1/65536.*(uint8_t)(x4))
-
-/*
- * The next two functions can read a 32 and 64 bit floating pointer number
- * of an opposite byte order machine. This is done by byte swaping and using
- * the normal way to read such a variable.
- * Also note: peek function got their data from a variable called src, which is a pointer
- * to const unsigned char.
- */
-
-static inline sample_t  read_opposite_float32 ( OUT uint8_t* const src )
-{
-    uint8_t  tmp [4];
-    tmp[0] = src[3];
-    tmp[1] = src[2];
-    tmp[2] = src[1];
-    tmp[3] = src[0];
-    return *(const float32_t*)tmp;
-}
-
-static inline sample_t  read_opposite_float64 ( OUT uint8_t* const src )
-{
-    uint8_t  tmp [8];
-    tmp[0] = src[7];
-    tmp[1] = src[6];
-    tmp[2] = src[5];
-    tmp[3] = src[4];
-    tmp[4] = src[3];
-    tmp[5] = src[2];
-    tmp[6] = src[1];
-    tmp[7] = src[0];
-    return *(const float64_t*)tmp;
-}
-
-/*
- *  The next two functions can read a 80 bit extended precision
- *  IEEE-854 floating point number. This code also can read the numbers
- *  on a machine not supporting 80 bit floats.
- */
-
-static sample_t  read_float80_le ( OUT uint8_t* const src )
-{
-    int         sign     = src [9] & 128  ?  -1  :  +1;
-    long        exponent =(src [9] & 127) * 256 +
-                           src [8] - 16384 - 62;
-    long double mantisse = src [7] * 72057594037927936.L +
-                           src [6] * 281474976710656.L +
-                           src [5] * 1099511627776.L +
-                           src [4] * 4294967296.L +
-                           src [3] * 16777216.L +
-                           src [2] * 65536.L +
-                           src [1] * 256.L +
-                           src [0];
-    return sign * ldexp (mantisse, exponent);
-}
-
-static sample_t  read_float80_be ( OUT uint8_t* const src )
-{
-    int         sign     = src [0] & 128  ?  -1  :  +1;
-    long        exponent =(src [0] & 127) * 256 +
-                           src [1] - 16384 - 62;
-    long double mantisse = src [2] * 72057594037927936.L +
-                           src [3] * 281474976710656.L +
-                           src [4] * 1099511627776.L +
-                           src [5] * 4294967296.L +
-                           src [6] * 16777216.L +
-                           src [7] * 65536.L +
-                           src [8] * 256.L +
-                           src [9];
-    return sign * ldexp (mantisse, exponent);
-}
-
-static inline sample_t  read_opposite_float80 ( OUT uint8_t* const src )
-{
-    uint8_t  tmp [10];
-    tmp[0] = src[9];
-    tmp[1] = src[8];
-    tmp[2] = src[7];
-    tmp[3] = src[6];
-    tmp[4] = src[5];
-    tmp[5] = src[4];
-    tmp[6] = src[3];
-    tmp[7] = src[2];
-    tmp[8] = src[1];
-    tmp[9] = src[0];
-    return *(const float80_t*)tmp;
-}
-
-
-/*
- *  Now we are building all resorting functions. The macro wants the name of the function
- *  and a peek function or macro. The created function wants the following input:
- *
- *     destination: Where to store the result as sample_t vector? The distance between
- *                  the elements is sizeof(sample_t)
- *     source:      Where to get the bytes which should converted to destination
- *     step size:   The distance between the input samples. This is at least the size
- *                  of one input element, but can be more due to
- *                    - alignment
- *                    - interleaved multi-channel input
- *     length:      The number of elements to process. Number must be positive.
- */
-
-typedef void (*demux_t) ( IN sample_t* dst, OUT uint8_t* src, OUT ssize_t step, OUT size_t len );
-
-#define FUNCTION(name,expr)       \
-static void  name (               \
-        IN  sample_t*  dst,       \
-	OUT uint8_t*   src,       \
-	OUT ssize_t    step,      \
-	OUT size_t     len )      \
-{                                 \
-    size_t  i = len;              \
-    do {                          \
-        *dst++ = (expr);          \
-        src   += (step);          \
-    } while (--i);                \
-}
-
-/* Some of these function can be implemented byte order independent ... */
-
-FUNCTION ( copy_silence, 0 )
-FUNCTION ( copy_u8     , BYTES1 (src[0]-128) )
-FUNCTION ( copy_s8     , BYTES1 (src[0]    ) )
-FUNCTION ( copy_alaw   , alaw[*src] )
-FUNCTION ( copy_ulaw   , ulaw[*src] )
-FUNCTION ( copy_s24_le , BYTES3 (src[2], src[1], src[0] ) )
-FUNCTION ( copy_s24_be , BYTES3 (src[0], src[1], src[2] ) )
-FUNCTION ( copy_u24_le , BYTES3 (src[2]-128, src[1], src[0] ) )
-FUNCTION ( copy_u24_be , BYTES3 (src[0]-128, src[1], src[2] ) )
-FUNCTION ( copy_f80_le , read_float80_le (src) )
-FUNCTION ( copy_f80_be , read_float80_be (src) )
-
-/* ... and some are not or there are faster but byte order dependent possiblities */
-
-
-#ifndef WORDS_BIGENDIAN
-
-/* little endian */
-FUNCTION ( copy_s16_le , *(const int16_t*)src )
-FUNCTION ( copy_s16_be , BYTES2 (src[0], src[1] ) )
-FUNCTION ( copy_u16_le , *(const uint16_t*)src - 32768 )
-FUNCTION ( copy_u16_be , BYTES2 (src[0]-128, src[1] ) )
-FUNCTION ( copy_s32_le , 1/65536. * *(const int32_t*)src )
-FUNCTION ( copy_s32_be , BYTES4 (src[0], src[1], src[2], src[3] ) )
-FUNCTION ( copy_u32_le , 1/65536. * *(const uint32_t*)src - 32768. )
-FUNCTION ( copy_u32_be , BYTES4 (src[0]-128, src[1], src[2], src[3] ) )
-FUNCTION ( copy_f32_le , *(const float32_t*)src )
-FUNCTION ( copy_f32_be , read_opposite_float32 (src) )
-FUNCTION ( copy_f64_le , *(const float64_t*)src )
-FUNCTION ( copy_f64_be , read_opposite_float64 (src) )
-
-#else
-
-/* big endian */
-FUNCTION ( copy_s16_le , BYTES2 (src[1], src[0] ) )
-FUNCTION ( copy_s16_be , *(const int16_t*)src )
-FUNCTION ( copy_u16_le , BYTES2 (src[1]-128, src[0] ) )
-FUNCTION ( copy_u16_be , *(const uint16_t*)src - 32768 )
-FUNCTION ( copy_s32_le , BYTES4 (src[3], src[2], src[1], src[0] ) )
-FUNCTION ( copy_s32_be , 1/65536. * *(const int32_t*)src )
-FUNCTION ( copy_u32_le , BYTES4 (src[3]-128, src[2], src[1], src[0] ) )
-FUNCTION ( copy_u32_be , 1/65536. * *(const uint32_t*)src - 32768. )
-FUNCTION ( copy_f32_le , read_opposite_float32 (src) )
-FUNCTION ( copy_f32_be , *(const float32_t*)src )
-FUNCTION ( copy_f64_le , read_opposite_float64 (src) )
-FUNCTION ( copy_f64_be , *(const float64_t*)src )
-
-#endif
-
-/*
- *  The global collection of channel demultiplexer.
- *  For every data type we have the size of one memory object and two
- *  demultiplexer, one for big endians, one for little endians.
- *  The demultiplexers
- *    - 1st argument is the destination of the data converted to sample_t (and normalized to +/-32768)
- *    - 2nd argument is a pointer to the source data, in any format
- *    - 3rd argument is 1st argument of the table (multiplied by the channel count in the case of 
- *      interleaved data)
- *    - 4th argument is the count of samples per channel to convert
- */
-
-typedef struct {
-    const ssize_t  size;
-    const demux_t  demultiplexer_be;
-    const demux_t  demultiplexer_le;
-} demux_info_t;
-
-const demux_info_t  demux_info [] = {
-    { -1, NULL        , NULL         }, /* 00: */
-    {  0, copy_silence, copy_silence }, /* 01: */
-    {  1, copy_u8     , copy_u8      }, /* 02: */
-    {  1, copy_s8     , copy_s8      }, /* 03: */
-    {  2, copy_u16_be , copy_u16_le  }, /* 04: */
-    {  2, copy_s16_be , copy_s16_le  }, /* 05: */
-    {  3, copy_u24_be , copy_u24_le  }, /* 06: */
-    {  3, copy_s24_be , copy_s24_le  }, /* 07: */
-    {  4, copy_u32_be , copy_u32_le  }, /* 08: */
-    {  4, copy_s32_be , copy_s32_le  }, /* 09: */
-    { -1, NULL        , NULL         }, /* 0A: */
-    { -1, NULL        , NULL         }, /* 0B: */
-    { -1, NULL        , NULL         }, /* 0C: */
-    { -1, NULL        , NULL         }, /* 0D: */
-    { -1, NULL        , NULL         }, /* 0E: */
-    { -1, NULL        , NULL         }, /* 0F: */
-    { -1, NULL        , NULL         }, /* 10: */
-    { -1, NULL        , NULL         }, /* 11: */
-    { -1, NULL        , NULL         }, /* 12: */
-    { -1, NULL        , NULL         }, /* 13: */
-    {  4, copy_f32_be , copy_f32_le  }, /* 14: */
-    { -1, NULL        , NULL         }, /* 15: */
-    { -1, NULL        , NULL         }, /* 16: */
-    { -1, NULL        , NULL         }, /* 17: */
-    {  8, copy_f64_be , copy_f64_le  }, /* 18: */
-    { -1, NULL        , NULL         }, /* 19: */
-    { 10, copy_f80_be , copy_f80_le  }, /* 1A: */
-    { -1, NULL        , NULL         }, /* 1B: */
-    { 12, copy_f80_be , copy_f80_le  }, /* 1C: */
-    { -1, NULL        , NULL         }, /* 1D: */
-    { -1, NULL        , NULL         }, /* 1E: */
-    { -1, NULL        , NULL         }, /* 1F: */
-    { 16, copy_f80_be , copy_f80_le  }, /* 20: */
-
-    { sizeof(short)      , NULL        , NULL         }, /* 21: */
-    { sizeof(int)        , NULL        , NULL         }, /* 22: */
-    { sizeof(long)       , NULL        , NULL         }, /* 23: */
-    { sizeof(float)      , copy_f32_be , copy_f32_le  }, /* 24: */
-    { sizeof(double)     , copy_f64_be , copy_f64_le  }, /* 25: */
-    { sizeof(long double), NULL        , NULL         }, /* 26: */
-
-    { -1, NULL        , NULL         }, /* 27: */
-    { -1, NULL        , NULL         }, /* 28: */
-    { -1, NULL        , NULL         }, /* 29: */
-    { -1, NULL        , NULL         }, /* 2A: */
-    { -1, NULL        , NULL         }, /* 2B: */
-    { -1, NULL        , NULL         }, /* 2C: */
-    { -1, NULL        , NULL         }, /* 2D: */
-    { -1, NULL        , NULL         }, /* 2E: */
-    { -1, NULL        , NULL         }, /* 2F: */
-    { -1, NULL        , NULL         }, /* 30: */
-    {  1, copy_alaw   , copy_alaw    }, /* 31: */
-    {  1, copy_ulaw   , copy_ulaw    }, /* 32: */
-    { -1, NULL        , NULL         }, /* 33: */
-    { -1, NULL        , NULL         }, /* 34: */
-    { -1, NULL        , NULL         }, /* 35: */
-    { -1, NULL        , NULL         }, /* 36: */
-    { -1, NULL        , NULL         }, /* 37: */
-    { -1, NULL        , NULL         }, /* 38: */
-    { -1, NULL        , NULL         }, /* 39: */
-    { -1, NULL        , NULL         }, /* 3A: */
-    { -1, NULL        , NULL         }, /* 3B: */
-    { -1, NULL        , NULL         }, /* 3C: */
-    { -1, NULL        , NULL         }, /* 3D: */
-    { -1, NULL        , NULL         }, /* 3E: */
-    { -1, NULL        , NULL         }, /* 3F: */
-};
-
-/*
- *  Selects the right demultiplexer from the attribute field
- *  (currently endian and type information is used, rest is done in
- *  lame_encode_pcm)
- */
-
-static inline int  select_demux ( OUT uint32_t mode, IN demux_t* retf, IN ssize_t* size )
-{
-    int                  big    = mode >> 24;
-    const demux_info_t*  tabptr = demux_info + ((mode >> 16) & 0x3F);
-
-    FN("select_demux");
-
-#ifdef WORDS_BIGENDIAN
-    /* big endian */
-    big  = (big >> 1) ^ big ^ 1;        // 0=big, 1=little, 2=little, 3=big
-#else
-    /* little endian */                 // 0=little, 1=big, 2=little, 3=big
-#endif
-
-    *size = tabptr -> size;
-    *retf = big & 1  ?  tabptr -> demultiplexer_be
-                     :  tabptr -> demultiplexer_le;
-    return *retf != NULL  ?  0  :  -1;
-}
-
-/*}}}*/
-/*{{{ amplify/resample stuff          */
-
-/*
- *  routine to feed EXACTLY one frame (lame->frame_size) worth of data to the
- *  encoding engine. All buffering, resampling, etc, handled by calling program.
- */
-
-static inline int  internal_lame_encoding_pcm (
-        INOUT lame_t*           const lame,
-        INOUT octetstream_t*    const os,
-        OUT   sample_t* const * const data,
-        OUT   size_t                  len )
-{
-    size_t           i;
-    double           ampl;
-    double           dampl;
-    int              ampl_on;
-    size_t           ch;
-    size_t           mf_needed;
-    int              ret;
-    size_t           n_in;
-    size_t           n_out;
-    size_t           remaining = len;
-    sample_t*        mfbuf [MAX_CHANNELS];
-    const sample_t*  pdata [MAX_CHANNELS];
-
-    FN("internal_lame_encoding_pcm");
-
-    /// this should be moved to lame_init_params();
-    // some sanity checks
-#if ENCDELAY < MDCTDELAY
-# error ENCDELAY is less than MDCTDELAY, see <encoder.h>
-#endif
-#if FFTOFFSET > BLKSIZE
-# error FFTOFFSET is greater than BLKSIZE, see <encoder.h>
-#endif
-
-    mf_needed = BLKSIZE + lame->frame_size - FFTOFFSET;           // amount needed for FFT
-    mf_needed = MAX ( mf_needed, 286 + 576 * (1+lame->mode_gr) ); // amount needed for MDCT/filterbank
-    assert ( mf_needed <= MFSIZE );
-    ///
-
-    os -> length = 0;
-    pdata [0]    = data [0];
-    pdata [1]    = data [1];
-    mfbuf [0]    = lame->mfbuf [0];
-    mfbuf [1]    = lame->mfbuf [1];
-
-    ampl    = lame->last_ampl;
-    dampl   = 0.;
-    if ( lame->ampl != ampl ) {
-        if (remaining <= 1) {           // constant amplification
-            ampl_on = 1;
-        } else {                        // fading
-            ampl_on = 2;
-            dampl   = (lame->ampl - ampl) / remaining * lame->sampfreq_out / lame->sampfreq_in;
-        }
-        lame->last_ampl = lame->ampl;
-    } else if ( lame->ampl != 1. ) {    // constant amplification
-        ampl_on = 1;
-    } else {                            // no manipulation (fastest)
-        ampl_on = 0;
-    }
-
-    while ( (int) remaining > 0 ) {
-
-        FN("internal_lame_encoding_pcm 3");
-
-        /* copy in new samples into mfbuf, with resampling if necessary */
-        if ( lame->resample_in != NULL )  {
-	
-            FN("internal_lame_encoding_pcm 10");
-	
-            for ( ch = 0; ch < lame->channels_out; ch++ ) {
-                n_in  = remaining;
-                n_out = lame->frame_size;
-		
-                FN("internal_lame_encoding_pcm 12");
-
-                // resample filter virtually should have no delay !
-                ret   = resample_buffer (
-                            lame->resample_in,
-                            mfbuf [ch] + lame->mf_size, &n_out,
-                            pdata [ch]                , &n_in,
-                            ch );
-                if ( ret < 0 )
-                    return ret;
-                pdata [ch] += n_in;
-            }
-	    
-            FN("internal_lame_encoding_pcm 13");
-	    
-        }
-        else {
-	
-            FN("internal_lame_encoding_pcm 14");
-	
-            n_in = n_out = MIN ( lame->frame_size, remaining );
-
-            FN("internal_lame_encoding_pcm 15");
-
-            for ( ch = 0; ch < lame->channels_out; ch++ ) {
-                memcpy (  mfbuf [ch] + lame->mf_size,
-                          pdata [ch],
-                          n_out * sizeof (**mfbuf) );
-                pdata [ch] += n_in;
-            }
-	    
-            FN("internal_lame_encoding_pcm 16");
-	    
-        }
-
-        FN("internal_lame_encoding_pcm 4");
-
-        switch ( ampl_on ) {
-        case 0:
-            break;
-        case 1:
-            for ( ch = 0; ch < lame->channels_out; ch++ )
-                for ( i = 0; i < n_out; i++ )
-                    mfbuf [ch] [lame->mf_size + i] *= ampl;
-            break;
-        case 2:
-            for ( i = 0; i < n_out; i++, ampl += dampl )
-                for ( ch = 0; ch < lame->channels_out; ch++ )
-                    mfbuf [ch] [lame->mf_size + i] *= ampl;
-            break;
-        default:
-            assert (0);
-            break;
-        }
-
-        FN("internal_lame_encoding_pcm 4");
-
-        fprintf ( stderr, "n_in=%d, n_out=%d, remaining=%d, remaining=%d\n", n_in, n_out, remaining, remaining-n_in );
-
-        remaining                  -= n_in;
-        lame->mf_size              += n_out;
-        lame->mf_samples_to_encode += n_out;
-
-        // encode ONE frame if enough data available
-        if ( lame->mf_size >= mf_needed ) {
-            // Enlarge octetstream buffer if (possibly) needed by (25% + 16K)
-            if ( os->size < 16384 + os->length )
-                octetstream_resize ( os, os->size + os->size/4 + 16384 );
-            // Encode one frame
-            ret = lame_encode_frame ( lame, mfbuf,
-                                      os->data + os->length, os->size - os->length );
-
-            if (ret < 0)
-                return ret;
-            os->length += ret;
-
-            FN("internal_lame_encoding_pcm 5");
-
-            // shift out old samples
-            lame->mf_size              -= lame->frame_size;
-            lame->mf_samples_to_encode -= lame->frame_size;
-            for ( ch = 0; ch < lame->channels_out; ch++ )
-                memmove ( mfbuf [ch] + 0, mfbuf [ch] + lame->frame_size, lame->mf_size * sizeof (**mfbuf) );
-		
-            FN("internal_lame_encoding_pcm 6");
-
-        }
-    }
-    assert (remaining == 0);
-    return 0;
-}
-
-/*}}}*/
-/*{{{ demultiplexing stuff            */
-
-static inline void  average ( sample_t* dst, const sample_t* src1, const sample_t* src2, size_t len )
-{
-    FN("average");
-
-    while (len--)
-        *dst++ = (*src1++ + *src2++) * 0.5;
-}
-
-int  lame_encode_pcm (
-        lame_t* const   lame,
-        octetstream_t*  os,
-        const void*     pcm,
-        size_t          len,
-        uint32_t        flags )
-{
-    sample_t*           data [2];
-    demux_t             retf;
-    ssize_t             size;
-    const uint8_t*      p;
-    const uint8_t* const*  q;
-    int                 ret;
-    size_t              channels_in = flags & 0xFFFF;
-
-    FN("lame_encode_pcm");
-
-    if (len == 0)
-        return 0;
-
-    if (select_demux ( flags, &retf, &size ) < 0)
-        return -1;
-
-    data[0] = (sample_t*) calloc (sizeof(sample_t), len);
-    data[1] = (sample_t*) calloc (sizeof(sample_t), len);
-
-    switch (flags >> 28) {
-    case LAME_INTERLEAVED >> 28:
-        p = (const uint8_t*) pcm;
-        switch ( lame->channels_out ) {
-        case 1:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], p+0*size, 1*size, len );
-                break;
-            case 2:
-                retf ( data[0], p+0*size, 2*size, len );
-                retf ( data[1], p+1*size, 2*size, len );
-                average ( data[0], data[0], data[1], len );
-                memset ( data[1], 0, sizeof(sample_t)*len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        case 2:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], p+0*size, 1*size, len );
-                memcpy ( data[1], data[0], sizeof(sample_t)*len );
-                break;
-            case 2:
-                retf ( data[0], p+0*size, 2*size, len );
-                retf ( data[1], p+1*size, 2*size, len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        default:
-            return -1;
-        }
-        break;
-
-    case LAME_CHAINED >> 28:
-        p = (const uint8_t*) pcm;
-        switch ( lame->channels_out ) {
-        case 1:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], p+0*size*len, size, len );
-                break;
-            case 2:
-                retf ( data[0], p+0*size*len, size, len );
-                retf ( data[1], p+1*size*len, size, len );
-                average ( data[0], data[0], data[1], len );
-                memset ( data[1], 0, sizeof(sample_t)*len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        case 2:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], p+0*size*len, size, len );
-                memcpy ( data[1], data[0], sizeof(sample_t)*len );
-                break;
-            case 2:
-                retf ( data[0], p+0*size*len, size, len );
-                retf ( data[1], p+1*size*len, size, len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        default:
-            return -1;
-        }
-        break;
-
-    case LAME_INDIRECT >> 28:
-        q = (const uint8_t* const*) pcm;
-        switch ( lame->channels_out ) {
-        case 1:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], q[0], size, len );
-                break;
-            case 2:
-                retf ( data[0], q[0], size, len );
-                retf ( data[1], q[1], size, len );
-                average ( data[0], data[0], data[1], len );
-                memset ( data[1], 0, sizeof(sample_t)*len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        case 2:
-            switch ( channels_in ) {
-            case 1:
-                retf ( data[0], q[0], size, len );
-                memcpy ( data[1], data[0], sizeof(sample_t)*len );
-                break;
-            case 2:
-                retf ( data[0], q[0], size, len );
-                retf ( data[1], q[1], size, len );
-                break;
-            default:
-                return -1;
-                break;
-            }
-            break;
-        default:
-            return -1;
-        }
-        break;
-
-    default:
-        return -1;
-    }
-
-    ret = internal_lame_encoding_pcm ( lame, os, (sample_t const* const*) data, len );
-
-    free ( data[0] );
-    free ( data[1] );
-    return ret;
-}
-
-/*}}}*/
-/*{{{ lame_encode_pcm_flush           */
-
-int  lame_encode_pcm_flush (
-        lame_t*        const  lame,
-        octetstream_t* const  os )
-{
-    int  ret;
-    int  ret_cb;
-
-    FN("lame_encode_pcm_flush");
-
-    ret = lame_encode_pcm ( lame, os, NULL, 
-                            lame->mf_samples_to_encode + lame->frame_size, 
-			    LAME_INTERLEAVED | LAME_SILENCE | 1 );
-
-
-    // ugly, not encapsulated
-    flush_bitstream (lame -> global_flags);       // mp3 related stuff. bit buffer might still contain some mp3 data
-    id3tag_write_v1 (lame -> global_flags);       // write a ID3 tag to the bitstream
-    ret_cb = copy_buffer (os->data, os->size - os->length, &lame->bs);
-    if (ret_cb < 0) 
-        return ret_cb;
-    os->length += ret_cb;
-
-
-    return ret;
-}
-
-/*
- *  Data flow
- *  ~~~~~~~~~
- *  lame_encode_buffer (public)
- *  lame_encode_buffer_interleaved (public)
- *      - do some little preparations and calls lame_encode_pcm
- *  lame_encode_pcm (public)
- *      - demultiplexing
- *      - type converting
- *      - endian handling
- *      - alignment handling
- *      - channel number converting (currently averaging or duplicating)
- *  internal_lame_encoding_pcm
- *      - resampling
- *      - level attenuator/amplifier, fader
- *      - divide input into frames
- *      - merge encoded data to one stream
- *      - does a lot of things which should be done in the setup
- *  lame_encode_frame
- *      - calls the right next stage encoder
- *      - counts the number of encoded frames
- *      - analyzer call back
- *  lame_encode_???_frame
- *      - out of the scope of this file
- */
-
-/*}}}*/
-/*{{{ Legacy stuff                    */
-
-static lame_t*  pointer2lame ( void* const handle )
-{
-    lame_t*             lame = (lame_t*)handle;
-    lame_global_flags*  gfp  = (lame_global_flags*)handle;
-
-    FN("pointer2lame");
-
-    if ( lame == NULL )
-        return NULL;
-    if ( lame->Class_ID == LAME_ID )
-        return lame;
-
-    if ( gfp->num_channels == 1  ||  gfp->num_channels == 2 ) {
-        lame = (lame_t*) (gfp->internal_flags);
-
-        if ( lame == NULL )
-            return NULL;
-        if ( lame->Class_ID == LAME_ID )
-            return lame;
-    }
-    return NULL;
-}
-
-
-int  lame_encode_buffer (
-        void* const    gfp,
-        const int16_t  buffer_l [],
-        const int16_t  buffer_r [],
-        const size_t   nsamples,
-        void* const    mp3buf,
-        const size_t   mp3buf_size )
-{
-    const int16_t*  pcm [2];
-    octetstream_t*  os;
-    int             ret;
-    lame_t*         lame;
-
-    FN("lame_encode_buffer");
-
-    lame    = pointer2lame (gfp);
-    os      = octetstream_open (mp3buf_size);
-    pcm [0] = buffer_l;
-    pcm [1] = buffer_r;
-
-    ret     = lame_encode_pcm ( lame, os, pcm, nsamples,
-                                LAME_INDIRECT | LAME_NATIVE_ENDIAN | LAME_INT16 |
-                                lame->channels_in );
-
-    memcpy ( mp3buf, os->data, os->length );
-    if (ret == 0) ret = os->length;
-    octetstream_close (os);
-    return ret;
-}
-
-
-int  lame_encode_buffer_interleaved (
-        void* const    gfp,
-        const int16_t  buffer [],
-        size_t         nsamples,
-        void* const    mp3buf,
-        const size_t   mp3buf_size )
-{
-    octetstream_t*  os;
-    int             ret;
-    lame_t*         lame;
-
-    FN("lame_encode_buffer_interleaved");
-
-    lame    = pointer2lame (gfp);
-    os      = octetstream_open (mp3buf_size);
-
-    ret     = lame_encode_pcm ( lame, os, buffer, nsamples,
-                                LAME_INTERLEAVED | LAME_NATIVE_ENDIAN | LAME_INT16 |
-                                lame->channels_in );
-
-    memcpy ( mp3buf, os->data, os->length );
-    if (ret == 0) ret = os->length;
-    octetstream_close (os);
-    return ret;
-}
-
-
-int  lame_encode_flush (
-        void* const    gfp,
-        void* const    mp3buf,
-        const size_t   mp3buf_size )
-{
-    octetstream_t*  os;
-    int             ret;
-    lame_t*         lame;
-
-    FN("lame_encode_flush");
-
-    lame    = pointer2lame (gfp);
-    os      = octetstream_open (mp3buf_size);
-
-    ret     = lame_encode_pcm_flush ( lame, os );
-
-    memcpy ( mp3buf, os->data, os->length );
-    if (ret == 0) ret = os->length;
-    octetstream_close (os);
-    return ret;
-}
-
-/*}}}*/
-/*{{{ sin/cos/sinc/rounding functions */
-
-static inline long  round_nearest ( long double x )
-{
-    if ( x >= 0. )
-        return (long)(x+0.5);
-    else
-        return (long)(x-0.5);
-}
-
-
-static inline long  round_down ( long double x )
-{
-    if ( x >= 0. )
-        return +(long)(+x);
-    else
-        return -(long)(-x);
-}
-
-
-static inline long double  sinpi ( long double x )
-{
-    x -= round_down (x) & ~1;
-
-    switch ( (int)(4.*x) ) {
-    default: assert (0);
-    case  0: return +SIN ( M_PIl * (0.0+x) );
-    case  1: return +COS ( M_PIl * (0.5-x) );
-    case  2: return +COS ( M_PIl * (x-0.5) );
-    case  3: return +SIN ( M_PIl * (1.0-x) );
-    case  4: return -SIN ( M_PIl * (x-1.0) );
-    case  5: return -COS ( M_PIl * (1.5-x) );
-    case  6: return -COS ( M_PIl * (x-1.5) );
-    case  7: return -SIN ( M_PIl * (2.0-x) );
-    }
-}
-
-
-static inline long double  cospi ( long double x )
-{
-    x -= round_down (x) & ~1;
-
-    switch ( (int)(4.*x) ) {
-    default: assert (0);
-    case  0: return +COS ( M_PIl * (x-0.0) );
-    case  1: return +SIN ( M_PIl * (0.5-x) );
-    case  2: return -SIN ( M_PIl * (x-0.5) );
-    case  3: return -COS ( M_PIl * (1.0-x) );
-    case  4: return -COS ( M_PIl * (x-1.0) );
-    case  5: return -SIN ( M_PIl * (1.5-x) );
-    case  6: return +SIN ( M_PIl * (x-1.5) );
-    case  7: return +COS ( M_PIl * (2.0-x) );
-    }
-}
-
-
-static inline long double  sinc ( long double x )
-{
-    if ( x == 0. )
-        return 1.;
-
-    if ( x <  0. )
-        x = -x;
-
-    return sinpi ( x ) / ( M_PIl * x );
-}
-
-/*}}}*/
-/*{{{ some window functions           */
-
-static inline  double  hanning ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x = cospi (0.5 * x);
-    return x * x;
-}
-
-static inline  double  hamming ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x = cospi (x);
-    return 0.54 + 0.46 * x;
-}
-
-static inline  double  blackman ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x = cospi (x);
-    return (0.16 * x + 0.50) * x + 0.34;        // using addition theorem of arc functions
-}
-
-static inline  double  blackman1 ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x += 1.;
-    return 0.42 - 0.50*cospi(x) + 0.08*cospi(2*x);
-}
-
-static inline  double  blackman2 ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x += 1.;
-    return 0.375 - 0.50*cospi(x) + 0.125*cospi(2*x);
-}
-
-static inline  double  blackmanharris_nuttall ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x += 1.;
-    return (10 - 15*cospi (x) + 6*cospi (2*x) - cospi (3*x) ) * (1./32);
-}
-
-static inline  double  blackmanharris_min4 ( double x )
-{
-    if ( fabs (x) >= 1 )
-        return 0.;
-
-    x += 1.;
-    return 0.355768 - 0.487396*cospi (x) + 0.144232*cospi (2*x) - 0.012604*cospi (3*x);
-}
-
-/*
- * Blackman-Harris windows, which have the general equation:
- *
- *          w(n) = a0 - a1 cos(2pn/N) + a2 cos(4pn/N) - a3 cos(6pn/N).
- *
- * When Nuttall set the ak coefficients to the "minimum 4-term" values of a0 = 0.355768, a1 =
- * 0.487396, a2 = 0.144232, and a3 = 0.012604, he obtained the window and the frequency
- * response shown in Figure 8. The minimum-4-term window loses some frequency
- * resolution because it has a wide main lobe, but the first side lobe drops to -93 db.
- *
- * If you require fast side-lobe rolloff in an application, consider Nuttall's Equation (30). It
- * applies the following coefficients to the general equation above: a0 = 10/32, a1 = 15/32, a2 =
- * 6/32, and a3 = 1/32. Figure 8 also includes the window and frequency response for Nuttall's
- * Equation (30). This window has a first side-lobe level of -61 dB and a significant side-lobe
- * rolloff of -42 dB/octave.
- *
- * The first investigators of windowing functions determined that window functions should
- * have zero values at their boundaries and so should their successive derivatives. If a
- * window's kth derivative is zero at the boundaries, the peaks of the window's side lobes will
- * decay at a rate of 6(k+2) dB/octave. T&MW.
- */
-
-/*}}}*/
-/*{{{ scalar stuff                    */
-
-
-/**********************************************************
- *                                                        *
- *           Functions taken from scalar.nas              *
- *                                                        *
- **********************************************************/
-
-/*
- * The scalarxx versions with xx=04,08,12,16,20,24 are fixed size for xx element scalars
- * The scalar1n version is suitable for every non negative length
- * The scalar4n version is only suitable for positive lengths which are a multiple of 4
- *
- * The following are equivalent:
- *    scalar12 (p, q);
- *    scalar4n (p, q, 3);
- *    scalar1n (p, q, 12);
- */
-
-float_t  scalar04_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
-}
-
-float_t  scalar08_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3]
-          + p[4]*q[4] + p[5]*q[5] + p[6]*q[6] + p[7]*q[7];
-}
-
-float_t  scalar12_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[0]*q[0] + p[1]*q[1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
-          + p[4]*q[4] + p[5]*q[5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
-          + p[8]*q[8] + p[9]*q[9] + p[10]*q[10] + p[11]*q[11];
-}
-
-float_t  scalar16_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
-          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
-          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
-          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15];
-}
-
-float_t  scalar20_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
-          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
-          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
-          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
-          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19];
-}
-
-float_t  scalar24_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
-          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
-          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
-          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
-          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19]
-          + p[20]*q[20] + p[21]*q[21] + p[22]*q[22] + p[23]*q[23];
-}
-
-float_t  scalar32_float32 ( const sample_t* p, const sample_t* q )
-{
-    return  p[ 0]*q[ 0] + p[ 1]*q[ 1] + p[ 2]*q[ 2] + p[ 3]*q[ 3]
-          + p[ 4]*q[ 4] + p[ 5]*q[ 5] + p[ 6]*q[ 6] + p[ 7]*q[ 7]
-          + p[ 8]*q[ 8] + p[ 9]*q[ 9] + p[10]*q[10] + p[11]*q[11]
-          + p[12]*q[12] + p[13]*q[13] + p[14]*q[14] + p[15]*q[15]
-          + p[16]*q[16] + p[17]*q[17] + p[18]*q[18] + p[19]*q[19]
-          + p[20]*q[20] + p[21]*q[21] + p[22]*q[22] + p[23]*q[23]
-          + p[24]*q[24] + p[25]*q[25] + p[26]*q[26] + p[27]*q[27]
-          + p[28]*q[28] + p[29]*q[29] + p[30]*q[30] + p[31]*q[31];
-}
-
-float_t  scalar4n_float32 ( const sample_t* p, const sample_t* q, size_t len )
-{
-    double sum = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
-
-    while (--len) {
-        p   += 4;
-        q   += 4;
-        sum += p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
-    }
-    return sum;
-}
-
-float_t  scalar1n_float32 ( const sample_t* p, const sample_t* q, size_t len )
-{
-    float_t sum;
-
-    switch (len & 3) {
-    case 0:
-        sum  = 0.;
-        break;
-    case 1:
-        sum  = p[0]*q[0];
-        p   += 1;
-        q   += 1;
-        break;
-    case 2:
-        sum  = p[0]*q[0] + p[1]*q[1];
-        p   += 2;
-        q   += 2;
-        break;
-    default:
-        sum  = p[0]*q[0] + p[1]*q[1] + p[2]*q[2];
-        p   += 3;
-        q   += 3;
-        break;
-    }
-    
-    for ( len >>= 2; len--; ) {
-        sum += p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
-        p   += 4;
-        q   += 4;
-    }
-    return sum;
-}
-
-
-scalar_t   scalar04 = scalar04_float32;
-scalar_t   scalar08 = scalar08_float32;
-scalar_t   scalar12 = scalar12_float32;
-scalar_t   scalar16 = scalar16_float32;
-scalar_t   scalar20 = scalar20_float32;
-scalar_t   scalar24 = scalar24_float32;
-scalar_t   scalar32 = scalar32_float32;
-scalarn_t  scalar4n = scalar4n_float32;
-scalarn_t  scalar1n = scalar1n_float32;
-
-
-void  init_scalar_functions ( OUT lame_t* const lame )
-{
-    if ( lame -> CPU_features.i387 ) {
-        scalar04 = scalar04_float32_i387;
-        scalar08 = scalar08_float32_i387;
-        scalar12 = scalar12_float32_i387;
-        scalar16 = scalar16_float32_i387;
-        scalar20 = scalar20_float32_i387;
-        scalar24 = scalar24_float32_i387;
-        scalar32 = scalar32_float32_i387;
-        scalar4n = scalar4n_float32_i387;
-        scalar1n = scalar1n_float32_i387;
-    }
-
-    if ( lame -> CPU_features.AMD_3DNow ) {
-        scalar04 = scalar04_float32_3DNow;
-        scalar08 = scalar08_float32_3DNow;
-        scalar12 = scalar12_float32_3DNow;
-        scalar16 = scalar16_float32_3DNow;
-        scalar20 = scalar20_float32_3DNow;
-        scalar24 = scalar24_float32_3DNow;
-        scalar32 = scalar32_float32_3DNow;
-        scalar4n = scalar4n_float32_3DNow;
-        scalar1n = scalar1n_float32_3DNow;
-    }
-
-    if ( lame -> CPU_features.SIMD ) {
-        scalar04 = scalar04_float32_SIMD;
-        scalar08 = scalar08_float32_SIMD;
-        scalar12 = scalar12_float32_SIMD;
-        scalar16 = scalar16_float32_SIMD;
-        scalar20 = scalar20_float32_SIMD;
-        scalar24 = scalar24_float32_SIMD;
-        scalar32 = scalar32_float32_SIMD;
-        scalar4n = scalar4n_float32_SIMD;
-        scalar1n = scalar1n_float32_SIMD;
-    }
-}
-
-/*}}}*/
-/*{{{ factorize                       */
-
-/*
- *  Tries to find the best integral ratio for two sampling frequencies
- *  It searches the best ratio a:b with b <= MAX_TABLES
- */
-
-static double  factorize ( 
-        OUT long double  f1, 
-	OUT long double  f2, 
-	IN  int* const   x1, 
-	IN  int* const   x2 )
-{
-    unsigned     i;
-    long         ltmp;
-    long double  ftmp;
-    double       minerror = 1.;
-    double       abserror = 1.;
-
-    assert ( f1 > 0. );
-    assert ( f2 > 0. );
-    assert ( x1 != NULL );
-    assert ( x2 != NULL );
-
-    for ( i = 1; i <= MAX_TABLES; i++ ) {
-        ftmp  = f2 * i / f1;
-        ltmp  = (long) ( ftmp + 0.5 );
-        if ( fabs ( (ltmp-ftmp)/ftmp ) < minerror ) {
-            *x1      = i;
-            *x2      = (int)ltmp;
-            abserror = (ltmp-ftmp) / ftmp;
-            minerror = 0.9999847412109375 * fabs (abserror);
-        }
-    }
-    return abserror;
-}
-
-/*
- *  Some programmers and some file format only supporting integral sampling frequencies
- *  This patch tries to find the right sampling frequency for some know rounding victims.
- *  Better is to support directly 64 or 80 bit FPU precision.
- */
-
-long double  unround_samplefrequency ( OUT long double freq )
-{
-    if ( freq != (unsigned short)freq )
-        return freq;
-
-    switch ( (unsigned short)freq ) {
-    case 48662: case 48663: return 1411200/ 29.L;  // SB 128 "48 kHz"         48662.06896551724137931034
-    case 44055: case 44056: return 2863636/ 65.L;  // NTSC PCM/LD PCM         44055.93846153846153846153
-    case 32072: case 32073: return 1411200/ 44.L;  // SB 128 "32 kHz"         32072.72727272727272727272
-    case 31468: case 31469: return 2863636/ 91.L;  // NTSC Hi8 Digital Audio  31468.52747252747252747252
-    case 23918: case 23919: return 1411200/ 59.L;  // SB 128 "24 kHz"         23918.64406779661016949152
-    case 22254: case 22255: return  244800/ 11.L;  // MAC HQ                  22254.54545454545454545454
-    case 16036: case 16037: return 1411200/ 88.L;  // SB 128 "16 kHz"         16036.36363636363636363636
-    case 11959: case 11960: return 1411200/118.L;  // SB 128 "12 kHz"         11959.32203389830508474576
-    case 11127: case 11128: return  122400/ 11.L;  // MAC LQ                  11127.27272727272727272727
-    case  8018: case  8019: return 1411200/176.L;  // SB 128  "8 kHz"          8018.18181818181818181818
-    case  8012: case  8013: return  312500/ 39.L;  // NeXT/Telco               8012.82051282051282051282
-    case  5512: case  5513: return   44100/  8.L;  // 1/8 CD                   5512.50000000000000000000
-    }
-
-    return freq;
-}
-
-/*}}}*/
-/*{{{ resampling stuff                */
-
-static inline void  Calc_Coeffs (
-        IN  sample_t*  Coeff,
-        OUT int        iNew,
-        OUT int        iOld,
-        OUT long       i,
-        OUT long       k,
-        OUT double     bandwidth )   // 0.0 ... 1.0: used bandwidth from 0...fs_out/2
-{
-    long double  w   = 1.L / (WINDOW_SIZE + 0.5);
-    long double  sum = 0.;
-    long double  tmp1;
-    long double  tmp2;
-    long         j;
-
-    for ( j = 0; j <= 2*WINDOW_SIZE; j++ ) {
-        tmp1 = ((k+j)*iNew - i*iOld) / (long double)iNew * bandwidth;
-        tmp2 = ((k+j)*iNew - i*iOld) / (long double)iNew;
-        sum += Coeff [j] = sinc (tmp1) * WINDOW (tmp2 * w);
-    }
-
-    for ( j = 0; j <= 2*WINDOW_SIZE; j++ )
-        Coeff [j] /= sum;
-}
-
-
-resample_t*  resample_open (
-        OUT long double  sampfreq_in,    // [Hz]
-        OUT long double  sampfreq_out,   // [Hz]
-        OUT double       lowpass_freq,   // [Hz] or <0 for auto mode
-        OUT int          quality )       // Proposal: 0: default, 1: sample select, 2: linear interpolation
-                                         //           4: 4-point interpolation, 32: 32-point interpolation
-{
-    resample_t* const  ret = calloc ( sizeof(resample_t), 1 );
-    long               i;
-    sample_t*          p;
-    double             err;
-
-    FN("resample_open");
-
-    if ( sampfreq_in == sampfreq_out )
-        return NULL;
-
-    err = factorize ( sampfreq_out, sampfreq_in, &(ret->scale_out), &(ret->scale_in) );
-    fprintf ( stderr, "(%.6g => %.6g Hz, Ratio %d:%d",
-              (double)sampfreq_in, (double)sampfreq_out, ret->scale_in, ret->scale_out );
-    if ( fabs (err) > 5.e-10 )                                            // 16 msec/year
-        fprintf ( stderr, ", Error %+.3f ppm", 1.e6*err );
-    fprintf ( stderr, ")\n" );
-    fflush  ( stderr );
-
-    if ( ret->scale_out == ret->scale_in )
-        return NULL;
-
-    ret->Class_ID        = RESAMPLE_ID;
-    ret->samplefreq_in   = sampfreq_in;
-    ret->samplefreq_out  = sampfreq_out;
-    ret->taps            = TAPS;
-    ret->lowpass_freq    = lowpass_freq < 0.  ?  0.50 * MIN (sampfreq_in, sampfreq_out)  :  lowpass_freq;
-    ret->in_old [0]      = calloc ( sizeof(sample_t*)     , 2*TAPS );
-    ret->in_old [1]      = calloc ( sizeof(sample_t*)     , 2*TAPS );
-    ret->src_step        = calloc ( sizeof(unsigned char*), (unsigned)ret->scale_out );
-    ret->fir             = calloc ( sizeof(sample_t*)     , (unsigned)ret->scale_out );
-    ret->firfree         = calloc ( sizeof(sample_t)      , TAPS * ret->scale_out + 64/sizeof(sample_t) );
-    p                    = (sample_t*) ( ((ptrdiff_t)(ret->firfree) | 63) + 1 ); /* 64 byte alignment */
-
-    for ( i = 0; i < ret->scale_out; i++, p += TAPS ) {
-        ret->src_step [i] = round_nearest ( (i+1.L) * ret->scale_in / ret->scale_out )
-                          - round_nearest ( (i+0.L) * ret->scale_in / ret->scale_out );
-                          
-        Calc_Coeffs ( ret->fir [i] = p,
-                      ret->scale_out, ret->scale_in,
-                      i, round_nearest ( (double)i * ret->scale_in / ret->scale_out - WINDOW_SIZE ),
-                      2.*ret->lowpass_freq / sampfreq_out );
-    }
-
-    return ret;
-}
-
-
-/* Should be done with more sanity checks */
-
-int  resample_close ( INOUT resample_t* const r )
-{
-    FN("resample_close");
-
-    if ( r == NULL )
-        return -1;
-    free ( r->in_old [0] );
-    free ( r->in_old [1] );
-    free ( r->fir [0]    );
-    free ( r->fir        );
-    free ( r->src_step   );
-    return 0;
-}
-
-
-// in the future some of the copies should be avoided by usage of mfbuf
-// also by the fill_buffer_resample() routine
-
-/*
- *  Current working scheme:
- *
- *  | old | new                data in in_buf, consist of old *and new data
- *  |0 1 2|3 4 5 6 ...
- *
- *   <--1-->
- *     <--2-->
- *       <--3-->
- *
- *        | new                data in in, only new data
- *        |0 1 2 3 4 5 6
- *         <--4-->
- *           <--5-->
- *             <--6-->
- */
-
-int  resample_buffer (                          // return code, 0 for success
-        INOUT resample_t *const   r,            // internal structure
-        IN    sample_t   *const   out,          // where to write the output data
-        INOUT size_t     *const   out_req_len,  // requested output data len/really written output data len
-        OUT   sample_t   *const   in,           // where are the input data?
-        INOUT size_t     *const   in_avail_len, // available input data len/consumed input data len
-        OUT   size_t              channel )     // number of the channel (needed for internal buffering)
-{
-    sample_t*  p           = out;
-    sample_t*  in_old      = r->in_old [channel];
-    size_t     len         = *in_avail_len;
-    size_t     desired_len = *out_req_len;
-    size_t     i;
-    size_t     k;
-    int        l;
-
-    FN("resample_buffer");
-
-    // copy TAPS samples to the second half of in_old
-    memcpy ( in_old + TAPS, in, MIN (len*sizeof(*in), TAPS*sizeof(*in)) );
-
-    // calculating k and l
-    l = r->fir_stepper [channel];
-    k = r->inp_stepper [channel];
-
-    // doing converting for all samples which can be done in 'in_old'
-    for ( i = 0; i < desired_len  &&  k < TAPS; i++ ) {
-        *p++ = scalar32 ( in_old + k, r->fir [l] );
-        k   += r->src_step [l];
-        if ( ++l >= r->scale_out ) l = 0;
-    }
-
-    // doing converting for all samples which can be done in 'in'
-    k -= TAPS;
-    for ( ; i < desired_len  &&  k < len - TAPS; i++ ) {
-        *p++ = scalar32 ( in + k, r->fir [l] );
-        k   += r->src_step [l];
-        if ( ++l >= r->scale_out ) l = 0;
-    }
-
-    // writing back processed in and out
-    *in_avail_len  = k - r->inp_stepper [channel];
-    *out_req_len   = p - out;
-
-    r->fir_stepper [channel] = l;
-    r->inp_stepper [channel] = k - r->inp_stepper [channel] - len;
-
-    // make of copy of the overlap
-    if ( len >= TAPS )
-        memcpy  ( in_old, in + len - TAPS, TAPS*sizeof(sample_t) );
-    else
-        memmove ( in_old, in_old + len   , TAPS*sizeof(sample_t) );
-
-    return 0;
-}
-
-/*}}}*/
-
-#endif /* KLEMM_44 */
-
-/* end of pcm.c */
--- a/sys/src/games/mp3enc/pcm.h
+++ /dev/null
@@ -1,277 +1,0 @@
-/*{{{ #defines                        */
-
-#include <limits.h>
-#include "lame.h"
-#include "util.h"
-
-#define ENCDELAY      576
-#define MDCTDELAY     48
-#define BLKSIZE       1024
-#define HBLKSIZE      (BLKSIZE/2 + 1)
-#define BLKSIZE_s     256
-#define HBLKSIZE_s    (BLKSIZE_s/2 + 1)
-#define MAX_TABLES    1002
-#define TAPS          32
-#define WINDOW_SIZE   15.5
-#define WINDOW        hanning
-#define inline        __inline
-
-#define MIN(a,b)      ((a) < (b) ? (a) : (b))
-#define MAX(a,b)      ((a) > (b) ? (a) : (b))
-
-#ifndef M_PIl
-# define M_PIl          3.1415926535897932384626433832795029L
-#endif
-
-#define SIN             sin
-#define COS             cos
-
-/*}}}*/
-/*{{{ object ID's                     */
-
-#define RESAMPLE_ID     0x52455341LU
-#define PSYCHO_ID       0x50535943LU
-#define BITSTREAM_ID    0x42495453LU
-
-/*}}}*/
-/*{{{ typedef's                       */
-
-typedef float         float32_t;                   // IEEE-754 32 bit floating point
-typedef double        float64_t;                   // IEEE-754 64 bit floating point
-typedef long double   float80_t;                   // IEEE-854 80 bit floating point, if available
-typedef long double   float_t;                     // temporarly results of float operations
-typedef long double   double_t;                    // temporarly results of double operations
-typedef long double   longdouble_t;                // temporarly results of long double operations
-
-typedef float_t (*scalar_t)  ( const sample_t* p, const sample_t* q );
-typedef float_t (*scalarn_t) ( const sample_t* p, const sample_t* q, size_t len );
-
-/*}}}*/
-/*{{{ data direction attributes       */
-
-/*
- * These are data stream direction attributes like used in Ada83/Ada95 and in RPC
- * The data direction is seen from the caller to the calling function.
- * Examples:
- *
- *    size_t  fread  ( void INOUT* buffer, size_t items, size_t itemsize, FILE INOUT* fp );
- *    size_t  fwrite ( void OUT  * buffer, size_t items, size_t itemsize, FILE INOUT* fp );
- *    size_t  memset ( void IN   * buffer, unsigned char value, size_t size );
- *
- * Return values are implizit IN (note that here C uses the opposite attribute).
- * Arguments not transmitted via references are implizit OUT.
- */
-
-#define OUT            /* [out]   */ const
-#define INOUT          /* [inout] */
-#define IN             /* [in]    */
-#define OUTTR          /* [out]: data is modified like [inout], but you don't get any useful back */
-
-/*}}}*/
-/*{{{ Test some error conditions      */
-
-#ifndef __LOC__
-# define _STR2(x)      #x
-# define _STR1(x)      _STR2(x)
-# define __LOC__       __FILE__ "(" _STR1(__LINE__) ") : warning: "
-#endif
-
-/* The current code doesn't work on machines with non 8 bit char's in any way, so abort */
-
-#if CHAR_BIT != 8
-# pragma message ( __LOC__ "Machines with CHAR_BIT != 8 not yet supported" )
-# pragma error
-#endif
-
-/*}}}*/
-
-/*
- *  Now some information how PCM data can be specified. PCM data
- *  is specified by 3 attributes: pointer, length information
- *  and attributes.
- *    - Audio is always stored in 2D arrays, which are collapsing to 1D
- *      in the case of monaural input
- *    - 2D arrays can be stored as 2D arrays or as pointers to 1D arrays.
- *    - 2D data can be stored as samples*channels or as channels*samples
- *    - This gives 4 kinds of storing PCM data:
- *      + pcm [samples][channels]       (LAME_INTERLEAVED)
- *      + pcm [channels][samples]       (LAME_CHAINED)
- *      + (*pcm) [samples]              (LAME_INDIRECT)
- *      + (*pcm) [channels]
- *    - The last I have never seen and it have a huge overhead (67% ... 200%),
- *      so the first three are implemented.
- *    - The monaural 1D cases can also be handled by the first two attributes
- */
-
-#define  LAME_INTERLEAVED       0x10000000
-#define  LAME_CHAINED           0x20000000
-#define  LAME_INDIRECT          0x30000000
-
-/*
- *  Now we need some information about the byte order of the data.
- *  There are 4 cases possible (if you are not fully support such strange
- *  Machines like the PDPs):
- *    - You know the absolute byte order of the data (LAME_LITTLE_ENDIAN, LAME_BIG_ENDIAN)
- *    - You know the byte order from the view of the current machine
- *      (LAME_NATIVE_ENDIAN, LAME_OPPOSITE_ENDIAN)
- *    - The use of LAME_OPPOSITE_ENDIAN is NOT recommended because it is
- *      is a breakable attribute, use LAME_LITTLE_ENDIAN or LAME_BIG_ENDIAN
- *      instead
- */
-
-#define  LAME_NATIVE_ENDIAN     0x00000000
-#define  LAME_OPPOSITE_ENDIAN   0x01000000
-#define  LAME_LITTLE_ENDIAN     0x02000000
-#define  LAME_BIG_ENDIAN        0x03000000
-
-/*
- *  The next attribute is the data type of the input data.
- *  There are currently 2 kinds of input data:
- *    - C based:
- *          LAME_{SHORT,INT,LONG}
- *          LAME_{FLOAT,DOUBLE,LONGDOUBLE}
- *    - Binary representation based:
- *          LAME_{UINT,INT}{8,16,24,32}
- *          LAME_{A,U}LAW
- *          LAME_FLOAT{32,64,80_ALIGN{2,4,8}}
- *
- *  Don't use the C based for external data.
- */
-
-#define  LAME_SILENCE           0x00010000
-#define  LAME_UINT8             0x00020000
-#define  LAME_INT8              0x00030000
-#define  LAME_UINT16            0x00040000
-#define  LAME_INT16             0x00050000
-#define  LAME_UINT24            0x00060000
-#define  LAME_INT24             0x00070000
-#define  LAME_UINT32            0x00080000
-#define  LAME_INT32             0x00090000
-#define  LAME_FLOAT32           0x00140000
-#define  LAME_FLOAT64           0x00180000
-#define  LAME_FLOAT80_ALIGN2    0x001A0000
-#define  LAME_FLOAT80_ALIGN4    0x001C0000
-#define  LAME_FLOAT80_ALIGN8    0x00200000
-#define  LAME_SHORT             0x00210000
-#define  LAME_INT               0x00220000
-#define  LAME_LONG              0x00230000
-#define  LAME_FLOAT             0x00240000
-#define  LAME_DOUBLE            0x00250000
-#define  LAME_LONGDOUBLE        0x00260000
-#define  LAME_ALAW              0x00310000
-#define  LAME_ULAW              0x00320000
-
-/*
- *  The last attribute is the number of input channels. Currently
- *  1...65535 channels are possible, but only 1 and 2 are supported.
- *  So matrixing or MPEG-2 MultiChannelSupport are not a big problem.
- *
- *  Note: Some people use the word 'stereo' for 2 channel stereophonic sound.
- *        But stereophonic sound is a collection of ALL methods to restore the
- *        stereophonic sound field starting from 2 channels up to audio
- *        holography.
- */
-
-#define LAME_MONO               0x00000001
-#define LAME_STEREO             0x00000002
-#define LAME_STEREO_2_CHANNELS  0x00000002
-#define LAME_STEREO_3_CHANNELS  0x00000003
-#define LAME_STEREO_4_CHANNELS  0x00000004
-#define LAME_STEREO_5_CHANNELS  0x00000005
-#define LAME_STEREO_6_CHANNELS  0x00000006
-#define LAME_STEREO_7_CHANNELS  0x00000007
-#define LAME_STEREO_65535_CHANNELS\
-                                0x0000FFFF
-
-
-extern scalar_t   scalar4;
-extern scalar_t   scalar8;
-extern scalar_t   scalar12;
-extern scalar_t   scalar16;
-extern scalar_t   scalar20;
-extern scalar_t   scalar24;
-extern scalar_t   scalar32;
-extern scalarn_t  scalar4n;
-extern scalarn_t  scalar1n;
-
-float_t  scalar04_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar08_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar12_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar16_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar20_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar24_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar32_float32_i387  ( const float32_t* p, const float32_t* q );
-float_t  scalar4n_float32_i387  ( const float32_t* p, const float32_t* q, const size_t len );
-float_t  scalar1n_float32_i387  ( const float32_t* p, const float32_t* q, const size_t len );
-
-float_t  scalar04_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar08_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar12_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar16_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar20_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar24_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar32_float32_3DNow ( const float32_t* p, const float32_t* q );
-float_t  scalar4n_float32_3DNow ( const float32_t* p, const float32_t* q, const size_t len );
-float_t  scalar1n_float32_3DNow ( const float32_t* p, const float32_t* q, const size_t len );
-
-float_t  scalar04_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar08_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar12_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar16_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar20_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar24_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar32_float32_SIMD  ( const float32_t* p, const float32_t* q );
-float_t  scalar4n_float32_SIMD  ( const float32_t* p, const float32_t* q, const size_t len );
-float_t  scalar1n_float32_SIMD  ( const float32_t* p, const float32_t* q, const size_t len );
-
-float_t  scalar04_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar08_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar12_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar16_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar20_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar24_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar32_float32       ( const float32_t* p, const float32_t* q );
-float_t  scalar4n_float32       ( const float32_t* p, const float32_t* q, const size_t len );
-float_t  scalar1n_float32       ( const float32_t* p, const float32_t* q, const size_t len );
-
-
-/*{{{ some prototypes                 */
-
-resample_t*  resample_open (
-        OUT long double  sampfreq_in,    // [Hz]
-        OUT long double  sampfreq_out,   // [Hz]
-        OUT double       lowpass_freq,   // [Hz] or <0 for auto mode
-        OUT int          quality );      // Proposal: 0 default, 1 sample select, 2 linear interpol, 4 4-point interpolation, 32 32-point interpolation
-        
-int  resample_buffer (                          // return code, 0 for success
-        INOUT resample_t *const   r,            // internal structure
-        IN    sample_t   *const   out,          // where to write the output data
-        INOUT size_t     *const   out_req_len,  // requested output data len/really written output data len
-        OUT   sample_t   *const   in,           // where are the input data?
-        INOUT size_t     *const   in_avail_len, // available input data len/consumed input data len
-        OUT   size_t              channel );    // number of the channel (needed for buffering)
-
-int  resample_close ( INOUT resample_t* const r );
-
-void         init_scalar_functions   ( OUT lame_t* const lame );
-long double  unround_samplefrequency ( OUT long double freq );
-
-#if 0
-int  lame_encode_mp3_frame (             // return code, 0 for success
-        INOUT lame_global_flags*,        // internal context structure
-        OUTTR sample_t * inbuf_l,        // data for left  channel
-        OUTTR sample_t * inbuf_r,        // data for right channel
-        IN    uint8_t  * mp3buf,         // where to write the coded data
-        OUT   size_t     mp3buf_size );  // maximum size of coded data
-#endif
-
-int  lame_encode_ogg_frame (             // return code, 0 for success
-        INOUT lame_global_flags*,        // internal context structure
-        OUT   sample_t * inbuf_l,        // data for left  channel
-        OUT   sample_t * inbuf_r,        // data for right channel
-        IN    uint8_t  * mp3buf,         // where to write the coded data
-        OUT   size_t     mp3buf_size );  // maximum size of coded data
-
-/*}}}*/
-
-/* end of pcm.h */
--- a/sys/src/games/mp3enc/portableio.c
+++ /dev/null
@@ -1,477 +1,0 @@
-/* Copyright (C) 1988-1991 Apple Computer, Inc.
- * All Rights Reserved.
- *
- * Warranty Information
- * Even though Apple has reviewed this software, Apple makes no warranty
- * or representation, either express or implied, with respect to this
- * software, its quality, accuracy, merchantability, or fitness for a
- * particular purpose.  As a result, this software is provided "as is,"
- * and you, its user, are assuming the entire risk as to its quality
- * and accuracy.
- *
- * This code may be used and freely distributed as long as it includes
- * this copyright notice and the warranty information.
- *
- *
- * Motorola processors (Macintosh, Sun, Sparc, MIPS, etc)
- * pack bytes from high to low (they are big-endian).
- * Use the HighLow routines to match the native format
- * of these machines.
- *
- * Intel-like machines (PCs, Sequent)
- * pack bytes from low to high (the are little-endian).
- * Use the LowHigh routines to match the native format
- * of these machines.
- *
- * These routines have been tested on the following machines:
- *	Apple Macintosh, MPW 3.1 C compiler
- *	Apple Macintosh, THINK C compiler
- *	Silicon Graphics IRIS, MIPS compiler
- *	Cray X/MP and Y/MP
- *	Digital Equipment VAX
- *
- *
- * Implemented by Malcolm Slaney and Ken Turkowski.
- *
- * Malcolm Slaney contributions during 1988-1990 include big- and little-
- * endian file I/O, conversion to and from Motorola's extended 80-bit
- * floating-point format, and conversions to and from IEEE single-
- * precision floating-point format.
- *
- * In 1991, Ken Turkowski implemented the conversions to and from
- * IEEE double-precision format, added more precision to the extended
- * conversions, and accommodated conversions involving +/- infinity,
- * NaN's, and denormalized numbers.
- *
- * $Id: portableio.c,v 1.11 2001/01/07 23:47:38 markt Exp $
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include	<stdio.h>
-#if defined(__riscos__) && defined(FPA10)
-#include	"ymath.h"
-#else
-#include	<math.h>
-#endif
-#include	"portableio.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-/****************************************************************
- * Big/little-endian independent I/O routines.
- ****************************************************************/
-
-/*
- * It is a hoax to call this code portable-IO:
- * 
- *   - It doesn't work on machines with CHAR_BIT != 8
- *   - it also don't test this error condition
- *   - otherwise it tries to handle CHAR_BIT != 8 by things like 
- *     masking 'putc(i&0xff,fp)'
- *   - It doesn't handle EOF in any way
- *   - it only works with ints with 32 or more bits
- *   - It is a collection of initial buggy code with patching the known errors
- *     instead of CORRECTING them! 
- *     For that see comments on the old Read16BitsHighLow()
- */
-
-#ifdef KLEMM_36
-
-signed int    ReadByte ( FILE* fp )
-{
-    int  result = getc (fp);
-    return result == EOF  ?  0  :  (signed char) (result & 0xFF);
-}
-
-unsigned int  ReadByteUnsigned ( FILE* fp )
-{
-    int  result = getc (fp);
-    return result == EOF  ?  0  :  (unsigned char) (result & 0xFF);
-}
-
-#else
-
-int
-ReadByte(FILE *fp)
-{
-	int	result;
-
-	result = getc(fp) & 0xff;
-	if (result & 0x80)
-		result = result - 0x100;
-	return result;
-}
-
-#endif
-
-#ifdef KLEMM_36
-
-int  Read16BitsLowHigh ( FILE* fp )
-{
-    int  low  = ReadByteUnsigned (fp);
-    int  high = ReadByte         (fp);
-    
-    return (high << 8) | low;
-}
-
-#else
-int
-Read16BitsLowHigh(FILE *fp)
-{
-	int	first, second, result;
-
-	first = 0xff & getc(fp);
-	second = 0xff & getc(fp);
-
-	result = (second << 8) + first;
-#ifndef	THINK_C42
-	if (result & 0x8000)
-		result = result - 0x10000;
-#endif	/* THINK_C */
-	return(result);
-}
-#endif
-
-
-#ifdef KLEMM_36
-
-int  Read16BitsHighLow ( FILE* fp )
-{
-    int  high = ReadByte         (fp);
-    int  low  = ReadByteUnsigned (fp);
-    
-    return (high << 8) | low;
-}
-
-#else
-int
-Read16BitsHighLow(FILE *fp)
-{
-	int	first, second, result;
-     
-        /* Reads the High bits, the value is -128...127 
-	 * (which gave after upscaling the -32768...+32512
-	 * Why this value is not converted to signed char?
-	 */
-        first = 0xff & getc(fp);
-        /* Reads the Lows bits, the value is 0...255 
-	 * This is correct. This value gives an additional offset
-	 * for the High bits
-	 */
-	second = 0xff & getc(fp);
-
-        /* This is right */
-	result = (first << 8) + second;
-    
-        /* Now we are starting to correct the nasty bug of the first instruction
-	 * The value of the high bits is wrong. Always. So we must correct this
-	 * value. This seems to be not necessary for THINK_C42. This is either
-	 * a 16 bit compiler with 16 bit ints (where this bug is hidden and 0x10000
-	 * is not in the scope of an int) or it is not a C compiler, but only a
-	 * C like compiler. In the first case the '#ifndef THINK_C42' is wrong
-	 * because it's not a property of the THINK_C42 compiler, but of all compilers
-	 * with sizeof(int)*CHAR_BIT < 18.
-	 * Another nasty thing is that the rest of the code doesn't work for 16 bit ints,
-	 * so this patch don't solve the 16 bit problem.
-         */
-#ifndef	THINK_C42
-	if (result & 0x8000)
-		result = result - 0x10000;
-#endif	/* THINK_C */
-	return(result);
-}
-#endif
-
-void
-Write8Bits(FILE *fp, int i)
-{
-	putc(i&0xff,fp);
-}
-
-
-void
-Write16BitsLowHigh(FILE *fp, int i)
-{
-	putc(i&0xff,fp);
-	putc((i>>8)&0xff,fp);
-}
-
-
-void
-Write16BitsHighLow(FILE *fp, int i)
-{
-	putc((i>>8)&0xff,fp);
-	putc(i&0xff,fp);
-}
-
-#ifdef KLEMM_36
-
-int  Read24BitsHighLow ( FILE* fp )
-{
-    int  high = ReadByte         (fp);
-    int  med  = ReadByteUnsigned (fp);
-    int  low  = ReadByteUnsigned (fp);
-    
-    return (high << 16) | (med << 8) | low;
-}
-
-#else
-int
-Read24BitsHighLow(FILE *fp)
-{
-	int	first, second, third;
-	int	result;
-
-	first = 0xff & getc(fp);
-	second = 0xff & getc(fp);
-	third = 0xff & getc(fp);
-
-	result = (first << 16) + (second << 8) + third;
-	if (result & 0x800000)
-		result = result - 0x1000000;
-	return(result);
-}
-#endif
-
-#define	Read32BitsLowHigh(f)	Read32Bits(f)
-
-#ifdef KLEMM_36
-
-int  Read32Bits ( FILE* fp )
-{
-    int  low  = ReadByteUnsigned (fp);
-    int  medl = ReadByteUnsigned (fp);
-    int  medh = ReadByteUnsigned (fp);
-    int  high = ReadByte         (fp);
-
-    return (high << 24) | (medh << 16) | (medl << 8) | low;
-}
-
-#else
-
-int
-Read32Bits(FILE *fp)
-{
-	int	first, second, result;
-
-	first = 0xffff & Read16BitsLowHigh(fp);
-	second = 0xffff & Read16BitsLowHigh(fp);
-
-	result = (second << 16) + first;
-#ifdef	CRAY
-	if (result & 0x80000000)
-		result = result - 0x100000000;
-#endif	/* CRAY */
-	return(result);
-}
-#endif
-
-
-#ifdef KLEMM_36
-
-int  Read32BitsHighLow ( FILE* fp )
-{
-    int  high = ReadByte         (fp);
-    int  medh = ReadByteUnsigned (fp);
-    int  medl = ReadByteUnsigned (fp);
-    int  low  = ReadByteUnsigned (fp);
-    
-    return (high << 24) | (medh << 16) | (medl << 8) | low;
-}
-
-#else
-
-int
-Read32BitsHighLow(FILE *fp)
-{
-	int	first, second, result;
-
-	first = 0xffff & Read16BitsHighLow(fp);
-	second = 0xffff & Read16BitsHighLow(fp);
-
-	result = (first << 16) + second;
-#ifdef	CRAY
-	if (result & 0x80000000)
-		result = result - 0x100000000;
-#endif
-	return(result);
-}
-
-#endif
-
-void
-Write32Bits(FILE *fp, int i)
-{
-	Write16BitsLowHigh(fp,(int)(i&0xffffL));
-	Write16BitsLowHigh(fp,(int)((i>>16)&0xffffL));
-}
-
-
-void
-Write32BitsLowHigh(FILE *fp, int i)
-{
-	Write16BitsLowHigh(fp,(int)(i&0xffffL));
-	Write16BitsLowHigh(fp,(int)((i>>16)&0xffffL));
-}
-
-
-void
-Write32BitsHighLow(FILE *fp, int i)
-{
-	Write16BitsHighLow(fp,(int)((i>>16)&0xffffL));
-	Write16BitsHighLow(fp,(int)(i&0xffffL));
-}
-
-#ifdef KLEMM_36
-void ReadBytes (FILE     *fp, char *p, int n) 
-{
-    memset ( p, 0, n );
-    fread  ( p, 1, n, fp );
-}
-#else
-void ReadBytes(FILE	*fp, char *p, int n)
-{
-	/* What about fread? */
-	 
-	while (!feof(fp) & (n-- > 0))
-		*p++ = getc(fp);
-}
-#endif
-
-void ReadBytesSwapped(FILE *fp, char *p, int n)
-{
-	register char	*q = p;
-
-	/* What about fread? */
-	  
-	while (!feof(fp) & (n-- > 0))
-		*q++ = getc(fp);
-
-        /* If not all bytes could be read, the resorting is different
-	 * from the normal resorting. Is this intention or another bug?
-	 */
-	for (q--; p < q; p++, q--){
-		n = *p;
-		*p = *q;
-		*q = n;
-	}
-}
-
-#ifdef KLEMM_36
-void WriteBytes(FILE *fp, char *p, int n)
-{
-    /* return n == */
-    fwrite ( p, 1, n, fp );
-}
-#else
-void WriteBytes(FILE *fp, char *p, int n)
-{
-        /* No error condition checking */
-        while (n-- > 0)
-		putc(*p++, fp);
-}
-#endif
-#ifdef KLEMM_36
-void WriteBytesSwapped(FILE *fp, char *p, int n)
-{
-    p += n;
-    while ( n-- > 0 )
-	putc ( *--p, fp );
-}
-#else
-void WriteBytesSwapped(FILE *fp, char *p, int n)
-{
-	p += n-1;
-	while (n-- > 0)
-		putc(*p--, fp);
-}
-#endif
-
-
-
-/****************************************************************
- * The following two routines make up for deficiencies in many
- * compilers to convert properly between unsigned integers and
- * floating-point.  Some compilers which have this bug are the
- * THINK_C compiler for the Macintosh and the C compiler for the
- * Silicon Graphics MIPS-based Iris.
- ****************************************************************/
-
-#ifdef applec	/* The Apple C compiler works */
-# define FloatToUnsigned(f)	((unsigned long)(f))
-# define UnsignedToFloat(u)	((double)(u))
-#else /* applec */
-# define FloatToUnsigned(f)	((unsigned long)(((long)((f) - 2147483648.0)) + 2147483647L + 1))
-# define UnsignedToFloat(u)	(((double)((long)((u) - 2147483647L - 1))) + 2147483648.0)
-#endif /* applec */
-/****************************************************************
- * Extended precision IEEE floating-point conversion routines
- ****************************************************************/
-
-double
-ConvertFromIeeeExtended(char* bytes)
-{
-	double	f;
-	long	expon;
-	unsigned long hiMant, loMant;
-
-#ifdef	TEST
-printf("ConvertFromIEEEExtended(%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx,%lx\r",
-	(long)bytes[0], (long)bytes[1], (long)bytes[2], (long)bytes[3],
-	(long)bytes[4], (long)bytes[5], (long)bytes[6],
-	(long)bytes[7], (long)bytes[8], (long)bytes[9]);
-#endif
-
-	expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF);
-	hiMant	=	((unsigned long)(bytes[2] & 0xFF) << 24)
-			|	((unsigned long)(bytes[3] & 0xFF) << 16)
-			|	((unsigned long)(bytes[4] & 0xFF) << 8)
-			|	((unsigned long)(bytes[5] & 0xFF));
-	loMant	=	((unsigned long)(bytes[6] & 0xFF) << 24)
-			|	((unsigned long)(bytes[7] & 0xFF) << 16)
-			|	((unsigned long)(bytes[8] & 0xFF) << 8)
-			|	((unsigned long)(bytes[9] & 0xFF));
-
-        /* This case should also be called if the number is below the smallest
-	 * positive double variable */
-	if (expon == 0 && hiMant == 0 && loMant == 0) {
-		f = 0;
-	}
-	else {
-	        /* This case should also be called if the number is too large to fit into 
-		 * a double variable */
-	    
-		if (expon == 0x7FFF) {	/* Infinity or NaN */
-			f = HUGE_VAL;
-		}
-		else {
-			expon -= 16383;
-			f  = ldexp(UnsignedToFloat(hiMant), (int) (expon -= 31));
-			f += ldexp(UnsignedToFloat(loMant), (int) (expon -= 32));
-		}
-	}
-
-	if (bytes[0] & 0x80)
-		return -f;
-	else
-		return f;
-}
-
-
-
-
-
-double
-ReadIeeeExtendedHighLow(FILE *fp)
-{
-	char	bytes [10];
-
-	ReadBytes ( fp, bytes, 10 );
-	return ConvertFromIeeeExtended ( bytes );
-}
-
--- a/sys/src/games/mp3enc/portableio.h
+++ /dev/null
@@ -1,118 +1,0 @@
-#ifndef LAME_PORTABLEIO_H
-#define LAME_PORTABLEIO_H
-/* Copyright (C) 1988-1991 Apple Computer, Inc.
- * All Rights Reserved.
- *
- * Warranty Information
- * Even though Apple has reviewed this software, Apple makes no warranty
- * or representation, either express or implied, with respect to this
- * software, its quality, accuracy, merchantability, or fitness for a 
- * particular purpose.  As a result, this software is provided "as is,"
- * and you, its user, are assuming the entire risk as to its quality
- * and accuracy.
- *
- * This code may be used and freely distributed as long as it includes
- * this copyright notice and the warranty information.
- *
- * Machine-independent I/O routines for 8-, 16-, 24-, and 32-bit integers.
- *
- * Motorola processors (Macintosh, Sun, Sparc, MIPS, etc)
- * pack bytes from high to low (they are big-endian).
- * Use the HighLow routines to match the native format
- * of these machines.
- *
- * Intel-like machines (PCs, Sequent)
- * pack bytes from low to high (the are little-endian).
- * Use the LowHigh routines to match the native format
- * of these machines.
- *
- * These routines have been tested on the following machines:
- *	Apple Macintosh, MPW 3.1 C compiler
- *	Apple Macintosh, THINK C compiler
- *	Silicon Graphics IRIS, MIPS compiler
- *	Cray X/MP and Y/MP
- *	Digital Equipment VAX
- *
- *
- * Implemented by Malcolm Slaney and Ken Turkowski.
- *
- * Malcolm Slaney contributions during 1988-1990 include big- and little-
- * endian file I/O, conversion to and from Motorola's extended 80-bit
- * floating-point format, and conversions to and from IEEE single-
- * precision floating-point format.
- *
- * In 1991, Ken Turkowski implemented the conversions to and from
- * IEEE double-precision format, added more precision to the extended
- * conversions, and accommodated conversions involving +/- infinity,
- * NaN's, and denormalized numbers.
- *
- * $Id: portableio.h,v 1.2 2000/11/18 04:24:06 markt Exp $
- *
- * $Log: portableio.h,v $
- * Revision 1.2  2000/11/18 04:24:06  markt
- * Removed ieeefloat.*
- *
- * Revision 1.1  2000/09/28 16:36:53  takehiro
- * moved frontend staffs into frontend/
- * Need to debug vorbis/mpglib/analyzer/bitrate histgram.
- * still long way to go...
- *
- * HAVEGTK is changed ANALYSIS(library side) and HAVEGTK(frontend side)
- *
- * BRHIST is deleted from library. all the bitrate histogram works are
- * now in frontend(but not works properly, yet).
- *
- * timestatus things are also moved to frontend.
- *
- * parse.c is now out of library.
- *
- * Revision 1.2  2000/09/17 04:19:09  cisc
- * conformed all this-is-included-defines to match 'project_file_name' style
- *
- * Revision 1.1.1.1  1999/11/24 08:43:37  markt
- * initial checkin of LAME
- * Starting with LAME 3.57beta with some modifications
- *
- * Revision 2.6  91/04/30  17:06:02  malcolm
- */
-
-#include	<stdio.h>
-
-#ifndef	__cplusplus
-# define	CLINK	
-#else
-# define	CLINK "C"
-#endif
-
-extern CLINK int ReadByte(FILE *fp);
-extern CLINK int Read16BitsLowHigh(FILE *fp);
-extern CLINK int Read16BitsHighLow(FILE *fp);
-extern CLINK void Write8Bits(FILE *fp, int i);
-extern CLINK void Write16BitsLowHigh(FILE *fp, int i);
-extern CLINK void Write16BitsHighLow(FILE *fp, int i);
-extern CLINK int Read24BitsHighLow(FILE *fp);
-extern CLINK int Read32Bits(FILE *fp);
-extern CLINK int Read32BitsHighLow(FILE *fp);
-extern CLINK void Write32Bits(FILE *fp, int i);
-extern CLINK void Write32BitsLowHigh(FILE *fp, int i);
-extern CLINK void Write32BitsHighLow(FILE *fp, int i);
-extern CLINK void ReadBytes(FILE *fp, char *p, int n);
-extern CLINK void ReadBytesSwapped(FILE *fp, char *p, int n);
-extern CLINK void WriteBytes(FILE *fp, char *p, int n);
-extern CLINK void WriteBytesSwapped(FILE *fp, char *p, int n);
-extern CLINK double ReadIeeeFloatHighLow(FILE *fp);
-extern CLINK double ReadIeeeFloatLowHigh(FILE *fp);
-extern CLINK double ReadIeeeDoubleHighLow(FILE *fp);
-extern CLINK double ReadIeeeDoubleLowHigh(FILE *fp);
-extern CLINK double ReadIeeeExtendedHighLow(FILE *fp);
-extern CLINK double ReadIeeeExtendedLowHigh(FILE *fp);
-extern CLINK void WriteIeeeFloatLowHigh(FILE *fp, double num);
-extern CLINK void WriteIeeeFloatHighLow(FILE *fp, double num);
-extern CLINK void WriteIeeeDoubleLowHigh(FILE *fp, double num);
-extern CLINK void WriteIeeeDoubleHighLow(FILE *fp, double num);
-extern CLINK void WriteIeeeExtendedLowHigh(FILE *fp, double num);
-extern CLINK void WriteIeeeExtendedHighLow(FILE *fp, double num);
-
-#define	Read32BitsLowHigh(f)	Read32Bits(f)
-#define WriteString(f,s)	fwrite(s,strlen(s),sizeof(char),f)
-#endif
--- a/sys/src/games/mp3enc/psymodel.c
+++ /dev/null
@@ -1,2273 +1,0 @@
-/*
- *	psymodel.c
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: psymodel.c,v 1.75 2001/03/25 21:37:00 shibatch Exp $ */
-
-
-/*
-PSYCHO ACOUSTICS
-
-
-This routine computes the psycho acoustics, delayed by
-one granule.  
-
-Input: buffer of PCM data (1024 samples).  
-
-This window should be centered over the 576 sample granule window.
-The routine will compute the psycho acoustics for
-this granule, but return the psycho acoustics computed
-for the *previous* granule.  This is because the block
-type of the previous granule can only be determined
-after we have computed the psycho acoustics for the following
-granule.  
-
-Output:  maskings and energies for each scalefactor band.
-block type, PE, and some correlation measures.  
-The PE is used by CBR modes to determine if extra bits
-from the bit reservoir should be used.  The correlation
-measures are used to determine mid/side or regular stereo.
-
-
-Notation:
-
-barks:  a non-linear frequency scale.  Mapping from frequency to
-        barks is given by freq2bark()
-
-scalefactor bands: The spectrum (frequencies) are broken into 
-                   SBMAX "scalefactor bands".  Thes bands
-                   are determined by the MPEG ISO spec.  In
-                   the noise shaping/quantization code, we allocate
-                   bits among the partition bands to achieve the
-                   best possible quality
-
-partition bands:   The spectrum is also broken into about
-                   64 "partition bands".  Each partition 
-                   band is about .34 barks wide.  There are about 2-5
-                   partition bands for each scalefactor band.
-
-LAME computes all psycho acoustic information for each partition
-band.  Then at the end of the computations, this information
-is mapped to scalefactor bands.  The energy in each scalefactor
-band is taken as the sum of the energy in all partition bands
-which overlap the scalefactor band.  The maskings can be computed
-in the same way (and thus represent the average masking in that band)
-or by taking the minmum value multiplied by the number of
-partition bands used (which represents a minimum masking in that band).
-
-
-The general outline is as follows:
-
-
-1. compute the energy in each partition band
-2. compute the tonality in each partition band
-3. compute the strength of each partion band "masker"
-4. compute the masking (via the spreading function applied to each masker)
-5. Modifications for mid/side masking.  
-
-Each partition band is considiered a "masker".  The strength
-of the i'th masker in band j is given by:
-
-    s3(bark(i)-bark(j))*strength(i)
-
-The strength of the masker is a function of the energy and tonality.
-The more tonal, the less masking.  LAME uses a simple linear formula
-(controlled by NMT and TMN) which says the strength is given by the
-energy divided by a linear function of the tonality.
-
-
-s3() is the "spreading function".  It is given by a formula
-determined via listening tests.  
-
-The total masking in the j'th partition band is the sum over
-all maskings i.  It is thus given by the convolution of
-the strength with s3(), the "spreading function."
-
-masking(j) = sum_over_i  s3(i-j)*strength(i)  = s3 o strength
-
-where "o" = convolution operator.  s3 is given by a formula determined
-via listening tests.  It is normalized so that s3 o 1 = 1.
-
-Note: instead of a simple convolution, LAME also has the
-option of using "additive masking"
-
-The most critical part is step 2, computing the tonality of each
-partition band.  LAME has two tonality estimators.  The first
-is based on the ISO spec, and measures how predictiable the
-signal is over time.  The more predictable, the more tonal.
-The second measure is based on looking at the spectrum of
-a single granule.  The more peaky the spectrum, the more
-tonal.  By most indications, the latter approach is better.
-
-Finally, in step 5, the maskings for the mid and side
-channel are possibly increased.  Under certain circumstances,
-noise in the mid & side channels is assumed to also
-be masked by strong maskers in the L or R channels.
-
-
-Other data computed by the psy-model:
-
-ms_ratio        side-channel / mid-channel masking ratio (for previous granule)
-ms_ratio_next   side-channel / mid-channel masking ratio for this granule
-
-percep_entropy[2]     L and R values (prev granule) of PE - A measure of how 
-                      much pre-echo is in the previous granule
-percep_entropy_MS[2]  mid and side channel values (prev granule) of percep_entropy
-energy[4]             L,R,M,S energy in each channel, prev granule
-blocktype_d[2]        block type to use for previous granule
-
-
-*/
-
-
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "util.h"
-#include "encoder.h"
-#include "psymodel.h"
-#include "l3side.h"
-#include <assert.h>
-#include "tables.h"
-#include "fft.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-#define NSFIRLEN 21
-#define rpelev 2
-#define rpelev2 16
-
-/* size of each partition band, in barks: */
-#define DELBARK .34
-
-
-#if 1
-    /* AAC values, results in more masking over MP3 values */
-# define TMN 18
-# define NMT 6
-#else
-    /* MP3 values */
-# define TMN 29
-# define NMT 6
-#endif
-
-#define NBPSY_l  (SBMAX_l)
-#define NBPSY_s  (SBMAX_s)
-
-
-#ifdef M_LN10
-#define		LN_TO_LOG10		(M_LN10/10)
-#else
-#define         LN_TO_LOG10             0.2302585093
-#endif
-
-
-
-
-
-/*
-   L3psycho_anal.  Compute psycho acoustics.
-
-   Data returned to the calling program must be delayed by one 
-   granule. 
-
-   This is done in two places.  
-   If we do not need to know the blocktype, the copying
-   can be done here at the top of the program: we copy the data for
-   the last granule (computed during the last call) before it is
-   overwritten with the new data.  It looks like this:
-  
-   0. static psymodel_data 
-   1. calling_program_data = psymodel_data
-   2. compute psymodel_data
-    
-   For data which needs to know the blocktype, the copying must be
-   done at the end of this loop, and the old values must be saved:
-   
-   0. static psymodel_data_old 
-   1. compute psymodel_data
-   2. compute possible block type of this granule
-   3. compute final block type of previous granule based on #2.
-   4. calling_program_data = psymodel_data_old
-   5. psymodel_data_old = psymodel_data
-*/
-int L3psycho_anal( lame_global_flags * gfp,
-                    const sample_t *buffer[2], int gr_out, 
-                    FLOAT8 *ms_ratio,
-                    FLOAT8 *ms_ratio_next,
-		    III_psy_ratio masking_ratio[2][2],
-		    III_psy_ratio masking_MS_ratio[2][2],
-		    FLOAT8 percep_entropy[2],FLOAT8 percep_MS_entropy[2], 
-                    FLOAT8 energy[4],
-                    int blocktype_d[2])
-{
-/* to get a good cache performance, one has to think about
- * the sequence, in which the variables are used.  
- * (Note: these static variables have been moved to the gfc-> struct,
- * and their order in memory is layed out in util.h)
- */
-  lame_internal_flags *gfc=gfp->internal_flags;
-
-
-  /* fft and energy calculation   */
-  FLOAT (*wsamp_l)[BLKSIZE];
-  FLOAT (*wsamp_s)[3][BLKSIZE_s];
-
-  /* convolution   */
-  FLOAT8 eb[CBANDS];
-  FLOAT8 cb[CBANDS];
-  FLOAT8 thr[CBANDS];
-  
-  /* ratios    */
-  FLOAT8 ms_ratio_l=0,ms_ratio_s=0;
-
-  /* block type  */
-  int blocktype[2],uselongblock[2];
-  
-  /* usual variables like loop indices, etc..    */
-  int numchn, chn;
-  int   b, i, j, k;
-  int	sb,sblock;
-
-
-  if(gfc->psymodel_init==0) {
-      psymodel_init(gfp);
-      init_fft(gfc);
-      gfc->psymodel_init=1;
-  }
-  
-
-
-  
-  
-  numchn = gfc->channels_out;
-  /* chn=2 and 3 = Mid and Side channels */
-  if (gfp->mode == JOINT_STEREO) numchn=4;
-
-  for (chn=0; chn<numchn; chn++) {
-      for (i=0; i<numchn; ++i) {
-	  energy[chn]=gfc->tot_ener[chn];
-      }
-  }
-  
-  for (chn=0; chn<numchn; chn++) {
-
-      /* there is a one granule delay.  Copy maskings computed last call
-       * into masking_ratio to return to calling program.
-       */
-      if (chn < 2) {    
-	  /* LR maskings  */
-	  percep_entropy            [chn]       = gfc -> pe  [chn]; 
-	  masking_ratio    [gr_out] [chn]  .en  = gfc -> en  [chn];
-	  masking_ratio    [gr_out] [chn]  .thm = gfc -> thm [chn];
-      } else {
-	  /* MS maskings  */
-	  percep_MS_entropy         [chn-2]     = gfc -> pe  [chn]; 
-	  masking_MS_ratio [gr_out] [chn-2].en  = gfc -> en  [chn];
-	  masking_MS_ratio [gr_out] [chn-2].thm = gfc -> thm [chn];
-      }
-      
-      
-
-    /**********************************************************************
-     *  compute FFTs
-     **********************************************************************/
-    wsamp_s = gfc->wsamp_S+(chn & 1);
-    wsamp_l = gfc->wsamp_L+(chn & 1);
-    if (chn<2) {    
-      fft_long ( gfc, *wsamp_l, chn, buffer);
-      fft_short( gfc, *wsamp_s, chn, buffer);
-    } 
-    /* FFT data for mid and side channel is derived from L & R */
-    if (chn == 2)
-      {
-        for (j = BLKSIZE-1; j >=0 ; --j)
-        {
-          FLOAT l = gfc->wsamp_L[0][j];
-          FLOAT r = gfc->wsamp_L[1][j];
-          gfc->wsamp_L[0][j] = (l+r)*(FLOAT)(SQRT2*0.5);
-          gfc->wsamp_L[1][j] = (l-r)*(FLOAT)(SQRT2*0.5);
-        }
-        for (b = 2; b >= 0; --b)
-        {
-          for (j = BLKSIZE_s-1; j >= 0 ; --j)
-          {
-            FLOAT l = gfc->wsamp_S[0][b][j];
-            FLOAT r = gfc->wsamp_S[1][b][j];
-            gfc->wsamp_S[0][b][j] = (l+r)*(FLOAT)(SQRT2*0.5);
-            gfc->wsamp_S[1][b][j] = (l-r)*(FLOAT)(SQRT2*0.5);
-          }
-        }
-      }
-
-
-    /**********************************************************************
-     *  compute energies
-     **********************************************************************/
-    
-    
-    
-    gfc->energy[0]  = (*wsamp_l)[0];
-    gfc->energy[0] *= gfc->energy[0];
-    
-    gfc->tot_ener[chn] = gfc->energy[0]; /* sum total energy at nearly no extra cost */
-    
-    for (j=BLKSIZE/2-1; j >= 0; --j)
-    {
-      FLOAT re = (*wsamp_l)[BLKSIZE/2-j];
-      FLOAT im = (*wsamp_l)[BLKSIZE/2+j];
-      gfc->energy[BLKSIZE/2-j] = (re * re + im * im) * (FLOAT)0.5;
-
-      if (BLKSIZE/2-j > 10)
-	gfc->tot_ener[chn] += gfc->energy[BLKSIZE/2-j];
-    }
-    for (b = 2; b >= 0; --b)
-    {
-      gfc->energy_s[b][0]  = (*wsamp_s)[b][0];
-      gfc->energy_s[b][0] *=  gfc->energy_s [b][0];
-      for (j=BLKSIZE_s/2-1; j >= 0; --j)
-      {
-        FLOAT re = (*wsamp_s)[b][BLKSIZE_s/2-j];
-        FLOAT im = (*wsamp_s)[b][BLKSIZE_s/2+j];
-        gfc->energy_s[b][BLKSIZE_s/2-j] = (re * re + im * im) * (FLOAT)0.5;
-      }
-    }
-
-
-  if (gfp->analysis) {
-    for (j=0; j<HBLKSIZE ; j++) {
-      gfc->pinfo->energy[gr_out][chn][j]=gfc->energy_save[chn][j];
-      gfc->energy_save[chn][j]=gfc->energy[j];
-    }
-  }
-    
-    /**********************************************************************
-     *    compute unpredicatability of first six spectral lines            * 
-     **********************************************************************/
-    for ( j = 0; j < gfc->cw_lower_index; j++ )
-      {	 /* calculate unpredictability measure cw */
-	FLOAT an, a1, a2;
-	FLOAT bn, b1, b2;
-	FLOAT rn, r1, r2;
-	FLOAT numre, numim, den;
-
-	a2 = gfc-> ax_sav[chn][1][j];
-	b2 = gfc-> bx_sav[chn][1][j];
-	r2 = gfc-> rx_sav[chn][1][j];
-	a1 = gfc-> ax_sav[chn][1][j] = gfc-> ax_sav[chn][0][j];
-	b1 = gfc-> bx_sav[chn][1][j] = gfc-> bx_sav[chn][0][j];
-	r1 = gfc-> rx_sav[chn][1][j] = gfc-> rx_sav[chn][0][j];
-	an = gfc-> ax_sav[chn][0][j] = (*wsamp_l)[j];
-	bn = gfc-> bx_sav[chn][0][j] = j==0 ? (*wsamp_l)[0] : (*wsamp_l)[BLKSIZE-j];  
-	rn = gfc-> rx_sav[chn][0][j] = sqrt(gfc->energy[j]);
-
-	{ /* square (x1,y1) */
-	  if( r1 != 0 ) {
-	    numre = (a1*b1);
-	    numim = (a1*a1-b1*b1)*(FLOAT)0.5;
-	    den = r1*r1;
-	  } else {
-	    numre = 1;
-	    numim = 0;
-	    den = 1;
-	  }
-	}
-	
-	{ /* multiply by (x2,-y2) */
-	  if( r2 != 0 ) {
-	    FLOAT tmp2 = (numim+numre)*(a2+b2)*(FLOAT)0.5;
-	    FLOAT tmp1 = -a2*numre+tmp2;
-	    numre =       -b2*numim+tmp2;
-	    numim = tmp1;
-	    den *= r2;
-	  } else {
-	    /* do nothing */
-	  }
-	}
-	
-	{ /* r-prime factor */
-	  FLOAT tmp = (2*r1-r2)/den;
-	  numre *= tmp;
-	  numim *= tmp;
-	}
-	den=rn+fabs(2*r1-r2);
-	if( den != 0 ) {
-	  numre = (an+bn)*(FLOAT)0.5-numre;
-	  numim = (an-bn)*(FLOAT)0.5-numim;
-	  den = sqrt(numre*numre+numim*numim)/den;
-	}
-	gfc->cw[j] = den;
-      }
-
-
-
-    /**********************************************************************
-     *     compute unpredicatibility of next 200 spectral lines            *
-     **********************************************************************/ 
-    for ( j = gfc->cw_lower_index; j < gfc->cw_upper_index; j += 4 )
-      {/* calculate unpredictability measure cw */
-	FLOAT rn, r1, r2;
-	FLOAT numre, numim, den;
-	
-	k = (j+2) / 4; 
-	
-	{ /* square (x1,y1) */
-	  r1 = gfc->energy_s[0][k];
-	  if( r1 != 0 ) {
-	    FLOAT a1 = (*wsamp_s)[0][k]; 
-	    FLOAT b1 = (*wsamp_s)[0][BLKSIZE_s-k]; /* k is never 0 */
-	    numre = (a1*b1);
-	    numim = (a1*a1-b1*b1)*(FLOAT)0.5;
-	    den = r1;
-	    r1 = sqrt(r1);
-	  } else {
-	    numre = 1;
-	    numim = 0;
-	    den = 1;
-	  }
-	}
-	
-	
-	{ /* multiply by (x2,-y2) */
-	  r2 = gfc->energy_s[2][k];
-	  if( r2 != 0 ) {
-	    FLOAT a2 = (*wsamp_s)[2][k]; 
-	    FLOAT b2 = (*wsamp_s)[2][BLKSIZE_s-k];
-	    
-	    
-	    FLOAT tmp2 = (numim+numre)*(a2+b2)*(FLOAT)0.5;
-	    FLOAT tmp1 = -a2*numre+tmp2;
-	    numre =       -b2*numim+tmp2;
-	    numim = tmp1;
-	    
-	    r2 = sqrt(r2);
-	    den *= r2;
-	  } else {
-	    /* do nothing */
-	  }
-	}
-	
-	{ /* r-prime factor */
-	  FLOAT tmp = (2*r1-r2)/den;
-	  numre *= tmp;
-	  numim *= tmp;
-	}
-	
-	rn = sqrt(gfc->energy_s[1][k]);
-	den=rn+fabs(2*r1-r2);
-	if( den != 0 ) {
-	  FLOAT an = (*wsamp_s)[1][k]; 
-	  FLOAT bn = (*wsamp_s)[1][BLKSIZE_s-k];
-	  numre = (an+bn)*(FLOAT)0.5-numre;
-	  numim = (an-bn)*(FLOAT)0.5-numim;
-	  den = sqrt(numre*numre+numim*numim)/den;
-	}
-	
-	gfc->cw[j+1] = gfc->cw[j+2] = gfc->cw[j+3] = gfc->cw[j] = den;
-      }
-    
-#if 0
-    for ( j = 14; j < HBLKSIZE-4; j += 4 )
-      {/* calculate energy from short ffts */
-	FLOAT8 tot,ave;
-	k = (j+2) / 4; 
-	for (tot=0, sblock=0; sblock < 3; sblock++)
-	  tot+=gfc->energy_s[sblock][k];
-	ave = gfc->energy[j+1]+ gfc->energy[j+2]+ gfc->energy[j+3]+ gfc->energy[j];
-	ave /= 4.;
-	gfc->energy[j+1] = gfc->energy[j+2] = gfc->energy[j+3] =  gfc->energy[j]=tot;
-      }
-#endif
-    
-    /**********************************************************************
-     *    Calculate the energy and the unpredictability in the threshold   *
-     *    calculation partitions                                           *
-     **********************************************************************/
-
-    b = 0;
-    for (j = 0; j < gfc->cw_upper_index && gfc->numlines_l[b] && b<gfc->npart_l_orig; )
-      {
-	FLOAT8 ebb, cbb;
-
-	ebb = gfc->energy[j];
-	cbb = gfc->energy[j] * gfc->cw[j];
-	j++;
-
-	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
-	  {
-	    ebb += gfc->energy[j];
-	    cbb += gfc->energy[j] * gfc->cw[j];
-	    j++;
-	  }
-	eb[b] = ebb;
-	cb[b] = cbb;
-	b++;
-      }
-
-    for (; b < gfc->npart_l_orig; b++ )
-      {
-	FLOAT8 ebb = gfc->energy[j++];
-	assert(gfc->numlines_l[b]);
-	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
-	  {
-	    ebb += gfc->energy[j++];
-	  }
-	eb[b] = ebb;
-	cb[b] = ebb * 0.4;
-      }
-
-    /**********************************************************************
-     *      convolve the partitioned energy and unpredictability           *
-     *      with the spreading function, s3_l[b][k]                        *
-     ******************************************************************** */
-    gfc->pe[chn] = 0;		/*  calculate percetual entropy */
-    for ( b = 0;b < gfc->npart_l; b++ )
-      {
-	FLOAT8 tbb,ecb,ctb;
-
-	ecb = 0;
-	ctb = 0;
-
-	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
-	  {
-	    ecb += gfc->s3_l[b][k] * eb[k];	/* sprdngf for Layer III */
-	    ctb += gfc->s3_l[b][k] * cb[k];
-	  }
-
-	/* calculate the tonality of each threshold calculation partition 
-	 * calculate the SNR in each threshold calculation partition 
-	 * tonality = -0.299 - .43*log(ctb/ecb);
-	 * tonality = 0:           use NMT   (lots of masking)
-	 * tonality = 1:           use TMN   (little masking)
-	 */
-
-/* ISO values */
-#define CONV1 (-.299)
-#define CONV2 (-.43)
-
-	tbb = ecb;
-	if (tbb != 0)
-	  {
-	    tbb = ctb / tbb;
-	    if (tbb <= exp((1-CONV1)/CONV2)) 
-	      { /* tonality near 1 */
-		tbb = exp(-LN_TO_LOG10 * TMN);
-	      }
-	    else if (tbb >= exp((0-CONV1)/CONV2)) 
-	      {/* tonality near 0 */
-		tbb = exp(-LN_TO_LOG10 * NMT);
-	      }
-	    else
-	      {
-		/* convert to tonality index */
-		/* tonality small:   tbb=1 */
-		/* tonality large:   tbb=-.299 */
-		tbb = CONV1 + CONV2*log(tbb);
-		tbb = exp(-LN_TO_LOG10 * ( TMN*tbb + (1-tbb)*NMT) );
-	      }
-	  }
-
-	/* at this point, tbb represents the amount the spreading function
-	 * will be reduced.  The smaller the value, the less masking.
-	 * minval[] = 1 (0db)     says just use tbb.
-	 * minval[]= .01 (-20db)  says reduce spreading function by 
-	 *                        at least 20db.  
-	 */
-
-	tbb = Min(gfc->minval[b], tbb);
-	ecb *= tbb;
-
-	/* long block pre-echo control.   */
-	/* rpelev=2.0, rpelev2=16.0 */
-	/* note: all surges in PE are because of this pre-echo formula
-	 * for thr[b].  If it this is not used, PE is always around 600
-	 */
-	/* dont use long block pre-echo control if previous granule was 
-	 * a short block.  This is to avoid the situation:   
-	 * frame0:  quiet (very low masking)  
-	 * frame1:  surge  (triggers short blocks)
-	 * frame2:  regular frame.  looks like pre-echo when compared to 
-	 *          frame0, but all pre-echo was in frame1.
-	 */
-	/* chn=0,1   L and R channels
-	   chn=2,3   S and M channels.  
-	*/
-        
-        if (vbr_mtrh == gfp->VBR) {
-            thr[b] = Min (rpelev*gfc->nb_1[chn][b], rpelev2*gfc->nb_2[chn][b]);
-            thr[b] = Max (thr[b], gfc->ATH->adjust * gfc->ATH->cb[b]);
-            thr[b] = Min (thr[b], ecb);
-	}
-        else if (gfc->blocktype_old[chn>1 ? chn-2 : chn] == SHORT_TYPE )
-	  thr[b] = ecb; /* Min(ecb, rpelev*gfc->nb_1[chn][b]); */
-	else
-	  thr[b] = Min(ecb, Min(rpelev*gfc->nb_1[chn][b],rpelev2*gfc->nb_2[chn][b]) );
-
-	gfc->nb_2[chn][b] = gfc->nb_1[chn][b];
-	gfc->nb_1[chn][b] = ecb;
-
-	{
-	  FLOAT8 thrpe;
-	  thrpe = Max(thr[b],gfc->ATH->cb[b]);
-	  /*
-	    printf("%i thr=%e   ATH=%e  \n",b,thr[b],gfc->ATH->cb[b]);
-	  */
-	  if (thrpe < eb[b])
-	    gfc->pe[chn] -= gfc->numlines_l[b] * log(thrpe / eb[b]);
-	}
-      }
-
-    /*************************************************************** 
-     * determine the block type (window type) based on L & R channels
-     * 
-     ***************************************************************/
-    {  /* compute PE for all 4 channels */
-      FLOAT mn,mx,ma=0,mb=0,mc=0;
-      
-      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
-	{
-	  ma += gfc->energy_s[0][j];
-	  mb += gfc->energy_s[1][j];
-	  mc += gfc->energy_s[2][j];
-	}
-      mn = Min(ma,mb);
-      mn = Min(mn,mc);
-      mx = Max(ma,mb);
-      mx = Max(mx,mc);
-      
-      /* bit allocation is based on pe.  */
-      if (mx>mn) {
-	FLOAT8 tmp = 400*log(mx/(1e-12+mn));
-	if (tmp>gfc->pe[chn]) gfc->pe[chn]=tmp;
-      }
-
-      /* block type is based just on L or R channel */      
-      if (chn<2) {
-	uselongblock[chn] = 1;
-	
-	/* tuned for t1.wav.  doesnt effect most other samples */
-	if (gfc->pe[chn] > 3000) 
-	  uselongblock[chn]=0;
-	
-	if ( mx > 30*mn ) 
-	  {/* big surge of energy - always use short blocks */
-	    uselongblock[chn] = 0;
-	  } 
-	else if ((mx > 10*mn) && (gfc->pe[chn] > 1000))
-	  {/* medium surge, medium pe - use short blocks */
-	    uselongblock[chn] = 0;
-	  }
-	
-	/* disable short blocks */
-	if (gfp->no_short_blocks)
-	  uselongblock[chn]=1;
-      }
-    }
-
-    if (gfp->analysis) {
-      FLOAT mn,mx,ma=0,mb=0,mc=0;
-
-      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
-      {
-        ma += gfc->energy_s[0][j];
-        mb += gfc->energy_s[1][j];
-        mc += gfc->energy_s[2][j];
-      }
-      mn = Min(ma,mb);
-      mn = Min(mn,mc);
-      mx = Max(ma,mb);
-      mx = Max(mx,mc);
-
-      gfc->pinfo->ers[gr_out][chn]=gfc->ers_save[chn];
-      gfc->ers_save[chn]=(mx/(1e-12+mn));
-      gfc->pinfo->pe[gr_out][chn]=gfc->pe_save[chn];
-      gfc->pe_save[chn]=gfc->pe[chn];
-    }
-
-
-    /*************************************************************** 
-     * compute masking thresholds for both short and long blocks
-     ***************************************************************/
-    /* longblock threshold calculation (part 2) */
-    for ( sb = 0; sb < NBPSY_l; sb++ )
-      {
-	FLOAT8 enn = gfc->w1_l[sb] * eb[gfc->bu_l[sb]] + gfc->w2_l[sb] * eb[gfc->bo_l[sb]];
-	FLOAT8 thmm = gfc->w1_l[sb] *thr[gfc->bu_l[sb]] + gfc->w2_l[sb] * thr[gfc->bo_l[sb]];
-
-        for ( b = gfc->bu_l[sb]+1; b < gfc->bo_l[sb]; b++ )
-          {
-            enn  += eb[b];
-            thmm += thr[b];
-          }
-
-	gfc->en [chn].l[sb] = enn;
-	gfc->thm[chn].l[sb] = thmm;
-      }
-    
-
-    /* threshold calculation for short blocks */
-    for ( sblock = 0; sblock < 3; sblock++ )
-      {
-	j = 0;
-	for ( b = 0; b < gfc->npart_s_orig; b++ )
-	  {
-	    FLOAT ecb = gfc->energy_s[sblock][j++];
-	    for (i = 1 ; i<gfc->numlines_s[b]; ++i)
-	      {
-		ecb += gfc->energy_s[sblock][j++];
-	      }
-	    eb[b] = ecb;
-	  }
-
-	for ( b = 0; b < gfc->npart_s; b++ )
-	  {
-	    FLOAT8 ecb = 0;
-	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
-		ecb += gfc->s3_s[b][k] * eb[k];
-	    }
-            ecb *= gfc->SNR_s[b];
-	    thr[b] = Max (1e-6, ecb);
-	  }
-
-	for ( sb = 0; sb < NBPSY_s; sb++ ){
-            FLOAT8 enn  = gfc->w1_s[sb] * eb[gfc->bu_s[sb]] + gfc->w2_s[sb] * eb[gfc->bo_s[sb]];
-	    FLOAT8 thmm = gfc->w1_s[sb] *thr[gfc->bu_s[sb]] + gfc->w2_s[sb] * thr[gfc->bo_s[sb]];
-	    
-            for ( b = gfc->bu_s[sb]+1; b < gfc->bo_s[sb]; b++ ) {
-		enn  += eb[b];
-		thmm += thr[b];
-	    }
-
-	    gfc->en [chn].s[sb][sblock] = enn;
-	    gfc->thm[chn].s[sb][sblock] = thmm;
-	  }
-      }
-  } /* end loop over chn */
-
-
-  /* compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper */
-  if (gfp->mode == JOINT_STEREO) {
-    FLOAT8 rside,rmid,mld;
-    int chmid=2,chside=3; 
-    
-    for ( sb = 0; sb < NBPSY_l; sb++ ) {
-      /* use this fix if L & R masking differs by 2db or less */
-      /* if db = 10*log10(x2/x1) < 2 */
-      /* if (x2 < 1.58*x1) { */
-      if (gfc->thm[0].l[sb] <= 1.58*gfc->thm[1].l[sb]
-	  && gfc->thm[1].l[sb] <= 1.58*gfc->thm[0].l[sb]) {
-
-	mld = gfc->mld_l[sb]*gfc->en[chside].l[sb];
-	rmid = Max(gfc->thm[chmid].l[sb], Min(gfc->thm[chside].l[sb],mld));
-
-	mld = gfc->mld_l[sb]*gfc->en[chmid].l[sb];
-	rside = Max(gfc->thm[chside].l[sb],Min(gfc->thm[chmid].l[sb],mld));
-
-	gfc->thm[chmid].l[sb]=rmid;
-	gfc->thm[chside].l[sb]=rside;
-      }
-    }
-    for ( sb = 0; sb < NBPSY_s; sb++ ) {
-      for ( sblock = 0; sblock < 3; sblock++ ) {
-	if (gfc->thm[0].s[sb][sblock] <= 1.58*gfc->thm[1].s[sb][sblock]
-	    && gfc->thm[1].s[sb][sblock] <= 1.58*gfc->thm[0].s[sb][sblock]) {
-
-	  mld = gfc->mld_s[sb]*gfc->en[chside].s[sb][sblock];
-	  rmid = Max(gfc->thm[chmid].s[sb][sblock],Min(gfc->thm[chside].s[sb][sblock],mld));
-
-	  mld = gfc->mld_s[sb]*gfc->en[chmid].s[sb][sblock];
-	  rside = Max(gfc->thm[chside].s[sb][sblock],Min(gfc->thm[chmid].s[sb][sblock],mld));
-
-	  gfc->thm[chmid].s[sb][sblock]=rmid;
-	  gfc->thm[chside].s[sb][sblock]=rside;
-	}
-      }
-    }
-  }
-
-  if (gfp->mode == JOINT_STEREO)  {
-    /* determin ms_ratio from masking thresholds*/
-    /* use ms_stereo (ms_ratio < .35) if average thresh. diff < 5 db */
-    FLOAT8 db,x1,x2,sidetot=0,tot=0;
-    for (sb= NBPSY_l/4 ; sb< NBPSY_l; sb ++ ) {
-      x1 = Min(gfc->thm[0].l[sb],gfc->thm[1].l[sb]);
-      x2 = Max(gfc->thm[0].l[sb],gfc->thm[1].l[sb]);
-      /* thresholds difference in db */
-      if (x2 >= 1000*x1)  db=3;
-      else db = log10(x2/x1);  
-      /*  DEBUGF(gfc,"db = %f %e %e  \n",db,gfc->thm[0].l[sb],gfc->thm[1].l[sb]);*/
-      sidetot += db;
-      tot++;
-    }
-    ms_ratio_l= (sidetot/tot)*0.7; /* was .35*(sidetot/tot)/5.0*10 */
-    ms_ratio_l = Min(ms_ratio_l,0.5);
-    
-    sidetot=0; tot=0;
-    for ( sblock = 0; sblock < 3; sblock++ )
-      for ( sb = NBPSY_s/4; sb < NBPSY_s; sb++ ) {
-	x1 = Min(gfc->thm[0].s[sb][sblock],gfc->thm[1].s[sb][sblock]);
-	x2 = Max(gfc->thm[0].s[sb][sblock],gfc->thm[1].s[sb][sblock]);
-	/* thresholds difference in db */
-	if (x2 >= 1000*x1)  db=3;
-	else db = log10(x2/x1);  
-	sidetot += db;
-	tot++;
-      }
-    ms_ratio_s = (sidetot/tot)*0.7; /* was .35*(sidetot/tot)/5.0*10 */
-    ms_ratio_s = Min(ms_ratio_s,.5);
-  }
-
-  /*************************************************************** 
-   * determine final block type
-   ***************************************************************/
-
-  for (chn=0; chn<gfc->channels_out; chn++) {
-    blocktype[chn] = NORM_TYPE;
-  }
-
-
-  if (gfc->channels_out==2) {
-    if (!gfp->allow_diff_short || gfp->mode==JOINT_STEREO) {
-      /* force both channels to use the same block type */
-      /* this is necessary if the frame is to be encoded in ms_stereo.  */
-      /* But even without ms_stereo, FhG  does this */
-      int bothlong= (uselongblock[0] && uselongblock[1]);
-      if (!bothlong) {
-	uselongblock[0]=0;
-	uselongblock[1]=0;
-      }
-    }
-  }
-
-  
-  
-  /* update the blocktype of the previous granule, since it depends on what
-   * happend in this granule */
-  for (chn=0; chn<gfc->channels_out; chn++) {
-    if ( uselongblock[chn])
-      {				/* no attack : use long blocks */
-	assert( gfc->blocktype_old[chn] != START_TYPE );
-	switch( gfc->blocktype_old[chn] ) 
-	  {
-	  case NORM_TYPE:
-	  case STOP_TYPE:
-	    blocktype[chn] = NORM_TYPE;
-	    break;
-	  case SHORT_TYPE:
-	    blocktype[chn] = STOP_TYPE; 
-	    break;
-	  }
-      } else   {
-	/* attack : use short blocks */
-	blocktype[chn] = SHORT_TYPE;
-	if ( gfc->blocktype_old[chn] == NORM_TYPE ) {
-	  gfc->blocktype_old[chn] = START_TYPE;
-	}
-	if ( gfc->blocktype_old[chn] == STOP_TYPE ) {
-	  gfc->blocktype_old[chn] = SHORT_TYPE ;
-	}
-      }
-    
-    blocktype_d[chn] = gfc->blocktype_old[chn];  /* value returned to calling program */
-    gfc->blocktype_old[chn] = blocktype[chn];    /* save for next call to l3psy_anal */
-  }
-  
-  if (blocktype_d[0]==2) 
-    *ms_ratio = gfc->ms_ratio_s_old;
-  else
-    *ms_ratio = gfc->ms_ratio_l_old;
-
-  gfc->ms_ratio_s_old = ms_ratio_s;
-  gfc->ms_ratio_l_old = ms_ratio_l;
-
-  /* we dont know the block type of this frame yet - assume long */
-  *ms_ratio_next = ms_ratio_l;
-
-  return 0;
-}
-
-/* addition of simultaneous masking   Naoki Shibata 2000/7 */
-inline static FLOAT8 mask_add(FLOAT8 m1,FLOAT8 m2,int k,int b, lame_internal_flags * const gfc)
-{
-  static const FLOAT8 table1[] = {
-    3.3246 *3.3246 ,3.23837*3.23837,3.15437*3.15437,3.00412*3.00412,2.86103*2.86103,2.65407*2.65407,2.46209*2.46209,2.284  *2.284  ,
-    2.11879*2.11879,1.96552*1.96552,1.82335*1.82335,1.69146*1.69146,1.56911*1.56911,1.46658*1.46658,1.37074*1.37074,1.31036*1.31036,
-    1.25264*1.25264,1.20648*1.20648,1.16203*1.16203,1.12765*1.12765,1.09428*1.09428,1.0659 *1.0659 ,1.03826*1.03826,1.01895*1.01895,
-    1
-  };
-
-  static const FLOAT8 table2[] = {
-    1.33352*1.33352,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537 *1.3537 ,1.30382*1.30382,1.22321*1.22321,
-    1.14758*1.14758
-  };
-
-  static const FLOAT8 table3[] = {
-    2.35364*2.35364,2.29259*2.29259,2.23313*2.23313,2.12675*2.12675,2.02545*2.02545,1.87894*1.87894,1.74303*1.74303,1.61695*1.61695,
-    1.49999*1.49999,1.39148*1.39148,1.29083*1.29083,1.19746*1.19746,1.11084*1.11084,1.03826*1.03826
-  };
-
-
-  int i;
-  FLOAT8 m;
-
-  if (m1 == 0) return m2;
-
-  if (b < 0) b = -b;
-
-  i = 10*log10(m2 / m1)/10*16;
-  m = 10*log10((m1+m2)/gfc->ATH->cb[k]);
-
-  if (i < 0) i = -i;
-
-  if (b <= 3) {  /* approximately, 1 bark = 3 partitions */
-    if (i > 8) return m1+m2;
-    return (m1+m2)*table2[i];
-  }
-
-  if (m<15) {
-    if (m > 0) {
-      FLOAT8 f=1.0,r;
-      if (i > 24) return m1+m2;
-      if (i > 13) f = 1; else f = table3[i];
-      r = (m-0)/15;
-      return (m1+m2)*(table1[i]*r+f*(1-r));
-    }
-    if (i > 13) return m1+m2;
-    return (m1+m2)*table3[i];
-  }
-
-  if (i > 24) return m1+m2;
-  return (m1+m2)*table1[i];
-}
-
-int L3psycho_anal_ns( lame_global_flags * gfp,
-                    const sample_t *buffer[2], int gr_out, 
-                    FLOAT8 *ms_ratio,
-                    FLOAT8 *ms_ratio_next,
-		    III_psy_ratio masking_ratio[2][2],
-		    III_psy_ratio masking_MS_ratio[2][2],
-		    FLOAT8 percep_entropy[2],FLOAT8 percep_MS_entropy[2], 
-		    FLOAT8 energy[4], 
-                    int blocktype_d[2])
-{
-/* to get a good cache performance, one has to think about
- * the sequence, in which the variables are used.  
- * (Note: these static variables have been moved to the gfc-> struct,
- * and their order in memory is layed out in util.h)
- */
-  lame_internal_flags *gfc=gfp->internal_flags;
-
-  /* fft and energy calculation   */
-  FLOAT (*wsamp_l)[BLKSIZE];
-  FLOAT (*wsamp_s)[3][BLKSIZE_s];
-
-  /* convolution   */
-  FLOAT8 eb[CBANDS],eb2[CBANDS];
-  FLOAT8 thr[CBANDS];
-  
-  FLOAT8 max[CBANDS],avg[CBANDS],tonality2[CBANDS];
-
-  /* ratios    */
-  FLOAT8 ms_ratio_l=0,ms_ratio_s=0;
-
-  /* block type  */
-  int blocktype[2],uselongblock[2];
-  
-  /* usual variables like loop indices, etc..    */
-  int numchn, chn;
-  int   b, i, j, k;
-  int	sb,sblock;
-
-  /* variables used for --nspsytune */
-  int ns_attacks[4];
-  FLOAT ns_hpfsmpl[4][576+576/3+NSFIRLEN];
-  FLOAT pe_l[4],pe_s[4];
-  FLOAT pcfact;
-
-
-  if(gfc->psymodel_init==0) {
-    psymodel_init(gfp);
-    init_fft(gfc);
-    gfc->psymodel_init=1;
-  }
-
-
-  numchn = gfc->channels_out;
-  /* chn=2 and 3 = Mid and Side channels */
-  if (gfp->mode == JOINT_STEREO) numchn=4;
-
-  if (gfp->VBR==vbr_off) pcfact = gfc->ResvMax == 0 ? 0 : ((FLOAT)gfc->ResvSize)/gfc->ResvMax*0.5;
-  else if (gfp->VBR == vbr_rh  ||  gfp->VBR == vbr_mtrh  ||  gfp->VBR == vbr_mt) {
-    static const FLOAT8 pcQns[10]={1.0,1.0,1.0,0.8,0.6,0.5,0.4,0.3,0.2,0.1};
-    pcfact = pcQns[gfp->VBR_q];
-  } else pcfact = 1;
-
-  /**********************************************************************
-   *  Apply HPF of fs/4 to the input signal.
-   *  This is used for attack detection / handling.
-   **********************************************************************/
-
-  {
-    static const FLOAT fircoef[] = {
-      -8.65163e-18,-0.00851586,-6.74764e-18, 0.0209036,
-      -3.36639e-17,-0.0438162 ,-1.54175e-17, 0.0931738,
-      -5.52212e-17,-0.313819  , 0.5        ,-0.313819,
-      -5.52212e-17, 0.0931738 ,-1.54175e-17,-0.0438162,
-      -3.36639e-17, 0.0209036 ,-6.74764e-18,-0.00851586,
-      -8.65163e-18,
-    };
-
-    for(chn=0;chn<gfc->channels_out;chn++)
-      {
-	FLOAT firbuf[576+576/3+NSFIRLEN];
-
-	/* apply high pass filter of fs/4 */
-	
-	for(i=-NSFIRLEN;i<576+576/3;i++)
-	  firbuf[i+NSFIRLEN] = buffer[chn][576-350+(i)];
-
-	for(i=0;i<576+576/3-NSFIRLEN;i++)
-          {
-	    FLOAT sum = 0;
-	    for(j=0;j<NSFIRLEN;j++)
-	      sum += fircoef[j] * firbuf[i+j];
-	    ns_hpfsmpl[chn][i] = sum;
-	  }
-	for(;i<576+576/3;i++)
-	  ns_hpfsmpl[chn][i] = 0;
-      }
-
-    if (gfp->mode == JOINT_STEREO) {
-      for(i=0;i<576+576/3;i++)
-	{
-	  ns_hpfsmpl[2][i] = ns_hpfsmpl[0][i]+ns_hpfsmpl[1][i];
-	  ns_hpfsmpl[3][i] = ns_hpfsmpl[0][i]-ns_hpfsmpl[1][i];
-	}
-    }
-  }
-  
-
-
-  /* there is a one granule delay.  Copy maskings computed last call
-   * into masking_ratio to return to calling program.
-   */
-  for (chn=0; chn<numchn; chn++) {
-      for (i=0; i<numchn; ++i) {
-	  energy[chn]=gfc->tot_ener[chn];
-      }
-  }
-
-
-  for (chn=0; chn<numchn; chn++) {
-    /* there is a one granule delay.  Copy maskings computed last call
-     * into masking_ratio to return to calling program.
-     */
-    pe_l[chn] = gfc->nsPsy.pe_l[chn];
-    pe_s[chn] = gfc->nsPsy.pe_s[chn];
-
-    if (chn < 2) {    
-      /* LR maskings  */
-      //percep_entropy            [chn]       = gfc -> pe  [chn]; 
-      masking_ratio    [gr_out] [chn]  .en  = gfc -> en  [chn];
-      masking_ratio    [gr_out] [chn]  .thm = gfc -> thm [chn];
-    } else {
-      /* MS maskings  */
-      //percep_MS_entropy         [chn-2]     = gfc -> pe  [chn]; 
-      masking_MS_ratio [gr_out] [chn-2].en  = gfc -> en  [chn];
-      masking_MS_ratio [gr_out] [chn-2].thm = gfc -> thm [chn];
-    }
-  }
-
-  for (chn=0; chn<numchn; chn++) {
-
-    /**********************************************************************
-     *  compute FFTs
-     **********************************************************************/
-
-    wsamp_s = gfc->wsamp_S+(chn & 1);
-    wsamp_l = gfc->wsamp_L+(chn & 1);
-
-    if (chn<2) {    
-      fft_long ( gfc, *wsamp_l, chn, buffer);
-      fft_short( gfc, *wsamp_s, chn, buffer);
-    } 
-
-    /* FFT data for mid and side channel is derived from L & R */
-
-    if (chn == 2)
-      {
-        for (j = BLKSIZE-1; j >=0 ; --j)
-	  {
-	    FLOAT l = gfc->wsamp_L[0][j];
-	    FLOAT r = gfc->wsamp_L[1][j];
-	    gfc->wsamp_L[0][j] = (l+r)*(FLOAT)(SQRT2*0.5);
-	    gfc->wsamp_L[1][j] = (l-r)*(FLOAT)(SQRT2*0.5);
-	  }
-        for (b = 2; b >= 0; --b)
-	  {
-	    for (j = BLKSIZE_s-1; j >= 0 ; --j)
-	      {
-		FLOAT l = gfc->wsamp_S[0][b][j];
-		FLOAT r = gfc->wsamp_S[1][b][j];
-		gfc->wsamp_S[0][b][j] = (l+r)*(FLOAT)(SQRT2*0.5);
-		gfc->wsamp_S[1][b][j] = (l-r)*(FLOAT)(SQRT2*0.5);
-	      }
-	  }
-      }
-
-
-    /**********************************************************************
-     *  compute energies for each spectral line
-     **********************************************************************/
-    
-    /* long block */
-
-    gfc->energy[0]  = (*wsamp_l)[0];
-    gfc->energy[0] *= gfc->energy[0];
-    
-    gfc->tot_ener[chn] = gfc->energy[0]; /* sum total energy at nearly no extra cost */
-    
-    for (j=BLKSIZE/2-1; j >= 0; --j)
-    {
-      FLOAT re = (*wsamp_l)[BLKSIZE/2-j];
-      FLOAT im = (*wsamp_l)[BLKSIZE/2+j];
-      gfc->energy[BLKSIZE/2-j] = (re * re + im * im) * (FLOAT)0.5;
-
-      if (BLKSIZE/2-j > 10)
-	gfc->tot_ener[chn] += gfc->energy[BLKSIZE/2-j];
-    }
-
-
-    /* short block */
-
-    for (b = 2; b >= 0; --b)
-    {
-      gfc->energy_s[b][0]  = (*wsamp_s)[b][0];
-      gfc->energy_s[b][0] *=  gfc->energy_s [b][0];
-      for (j=BLKSIZE_s/2-1; j >= 0; --j)
-      {
-        FLOAT re = (*wsamp_s)[b][BLKSIZE_s/2-j];
-        FLOAT im = (*wsamp_s)[b][BLKSIZE_s/2+j];
-        gfc->energy_s[b][BLKSIZE_s/2-j] = (re * re + im * im) * (FLOAT)0.5;
-      }
-    }
-
-
-    /* output data for analysis */
-
-    if (gfp->analysis) {
-      for (j=0; j<HBLKSIZE ; j++) {
-	gfc->pinfo->energy[gr_out][chn][j]=gfc->energy_save[chn][j];
-	gfc->energy_save[chn][j]=gfc->energy[j];
-      }
-    }
-    
-
-    /**********************************************************************
-     *    Calculate the energy and the tonality of each partition.
-     **********************************************************************/
-
-    for (b=0, j=0; b<gfc->npart_l_orig; b++)
-      {
-	FLOAT8 ebb,m,a;
-  
-	ebb = gfc->energy[j];
-	m = a = gfc->energy[j];
-	j++;
-  
-	for (i = gfc->numlines_l[b] - 1; i > 0; i--)
-	  {
-	    FLOAT8 el = gfc->energy[j];
-	    ebb += gfc->energy[j];
-	    a += el;
-	    m = m < el ? el : m;
-	    j++;
-	  }
-	eb[b] = ebb;
-	max[b] = m;
-	avg[b] = a / gfc->numlines_l[b];
-      }
-  
-    j = 0;
-    for (b=0; b < gfc->npart_l_orig; b++ )
-      {
-	int c1,c2;
-	FLOAT8 m,a;
-	tonality2[b] = 0;
-	c1 = c2 = 0;
-	m = a = 0;
-	for(k=b-1;k<=b+1;k++)
-	  {
-	    if (k >= 0 && k < gfc->npart_l_orig) {
-	      c1++;
-	      c2 += gfc->numlines_l[k];
-	      a += avg[k];
-	      m = m < max[k] ? max[k] : m;
-	    }
-	  }
- 
-	a /= c1;
-	tonality2[b] = a == 0 ? 0 : (m / a - 1)/(c2-1);
-      }
-
-    for (b=0; b < gfc->npart_l_orig; b++ )
-      {
-#if 0
-	static FLOAT8 tab[20] =
-	{  0,  1,  2,  2,  2,  2,  2,  6,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3,9.3};
-
-	static int init = 1;
-	if (init) {
-	  int j;
-	  for(j=0;j<20;j++) {
-	    tab[j] = pow(10.0,-tab[j]/10.0);
-	  }
-	  init = 0;
-	}
-#else
-	static FLOAT8 tab[20] = {
-	  1,0.79433,0.63096,0.63096,0.63096,0.63096,0.63096,0.25119,0.11749,0.11749,
-	  0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749,0.11749
-	};
-#endif
-
-	int t = 20*tonality2[b];
-	if (t > 19) t = 19;
-	eb2[b] = eb[b] * tab[t];
-      }
-
-
-    /**********************************************************************
-     *      convolve the partitioned energy and unpredictability
-     *      with the spreading function, s3_l[b][k]
-     ******************************************************************** */
-
-    for ( b = 0;b < gfc->npart_l; b++ )
-      {
-	FLOAT8 ecb;
-
-	/****   convolve the partitioned energy with the spreading function   ****/
-
-	ecb = 0;
-
-#if 1
-	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
-	  {
-	    ecb = mask_add(ecb,gfc->s3_l[b][k] * eb2[k],k,k-b,gfc);
-	  }
-
-	ecb *= 0.158489319246111; // pow(10,-0.8)
-#endif
-
-#if 0
-	for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ )
-	  {
-	    ecb += gfc->s3_l[k][b] * eb2[k];
-	  }
-
-	ecb *= 0.223872113856834; // pow(10,-0.65);
-#endif
-
-	/****   long block pre-echo control   ****/
-
-	/* dont use long block pre-echo control if previous granule was 
-	 * a short block.  This is to avoid the situation:   
-	 * frame0:  quiet (very low masking)  
-	 * frame1:  surge  (triggers short blocks)
-	 * frame2:  regular frame.  looks like pre-echo when compared to 
-	 *          frame0, but all pre-echo was in frame1.
-	 */
-
-	/* chn=0,1   L and R channels
-	   chn=2,3   S and M channels.  
-	*/
-
-#define NS_INTERP(x,y,r) (pow((x),(r))*pow((y),1-(r)))
-
-	if (gfc->blocktype_old[chn>1 ? chn-2 : chn] == SHORT_TYPE )
-	  thr[b] = ecb; /* Min(ecb, rpelev*gfc->nb_1[chn][b]); */
-	else
-	  thr[b] = NS_INTERP(Min(ecb, Min(rpelev*gfc->nb_1[chn][b],rpelev2*gfc->nb_2[chn][b])),ecb,pcfact);
-
-	gfc->nb_2[chn][b] = gfc->nb_1[chn][b];
-	gfc->nb_1[chn][b] = ecb;
-      }
-
-
-    /*************************************************************** 
-     * determine the block type (window type)
-     ***************************************************************/
-
-    {
-      static int count=0;
-      FLOAT en_subshort[12];
-      FLOAT attack_intensity[12];
-      int ns_uselongblock = 1;
-
-      /* calculate energies of each sub-shortblocks */
-
-      k = 0;
-      for(i=0;i<12;i++)
-	{
-	  en_subshort[i] = 0;
-	  for(j=0;j<576/9;j++)
-	    {
-	      en_subshort[i] += ns_hpfsmpl[chn][k] * ns_hpfsmpl[chn][k];
-	      k++;
-	    }
-
-	  if (en_subshort[i] < 100) en_subshort[i] = 100;
-	}
-
-      /* compare energies between sub-shortblocks */
-
-#define NSATTACKTHRE 150
-#define NSATTACKTHRE_S 300
-
-      for(i=0;i<2;i++) {
-	attack_intensity[i] = en_subshort[i] / gfc->nsPsy.last_en_subshort[chn][7+i];
-      }
-
-      for(;i<12;i++) {
-	attack_intensity[i] = en_subshort[i] / en_subshort[i-2];
-      }
-
-      ns_attacks[0] = ns_attacks[1] = ns_attacks[2] = ns_attacks[3] = 0;
-
-      for(i=0;i<12;i++)
-	{
-	  if (!ns_attacks[i/3] && attack_intensity[i] > (chn == 3 ? NSATTACKTHRE_S : NSATTACKTHRE)) ns_attacks[i/3] = (i % 3)+1;
-	}
-
-      if (ns_attacks[0] && gfc->nsPsy.last_attacks[chn][2]) ns_attacks[0] = 0;
-      if (ns_attacks[1] && ns_attacks[0]) ns_attacks[1] = 0;
-      if (ns_attacks[2] && ns_attacks[1]) ns_attacks[2] = 0;
-      if (ns_attacks[3] && ns_attacks[2]) ns_attacks[3] = 0;
-
-      if (gfc->nsPsy.last_attacks[chn][2] == 3 ||
-	  ns_attacks[0] || ns_attacks[1] || ns_attacks[2] || ns_attacks[3]) ns_uselongblock = 0;
-
-      if (chn < 4) count++;
-
-      for(i=0;i<9;i++)
-	{
-	  gfc->nsPsy.last_en_subshort[chn][i] = en_subshort[i];
-	  gfc->nsPsy.last_attack_intensity[chn][i] = attack_intensity[i];
-	}
-
-      if (gfp->no_short_blocks) {
-	uselongblock[chn] = 1;
-      } else {
-	if (chn < 2) {
-	  uselongblock[chn] = ns_uselongblock;
-	} else {
-	  if (ns_uselongblock == 0) uselongblock[0] = uselongblock[1] = 0;
-	}
-      }
-    }
-
-    if (gfp->analysis) {
-      FLOAT mn,mx,ma=0,mb=0,mc=0;
-
-      for ( j = HBLKSIZE_s/2; j < HBLKSIZE_s; j ++)
-      {
-        ma += gfc->energy_s[0][j];
-        mb += gfc->energy_s[1][j];
-        mc += gfc->energy_s[2][j];
-      }
-      mn = Min(ma,mb);
-      mn = Min(mn,mc);
-      mx = Max(ma,mb);
-      mx = Max(mx,mc);
-
-      gfc->pinfo->ers[gr_out][chn]=gfc->ers_save[chn];
-      gfc->ers_save[chn]=(mx/(1e-12+mn));
-    }
-
-
-    /*************************************************************** 
-     * compute masking thresholds for long blocks
-     ***************************************************************/
-
-    for ( sb = 0; sb < NBPSY_l; sb++ )
-      {
-	FLOAT8 enn = gfc->w1_l[sb] * eb[gfc->bu_l[sb]] + gfc->w2_l[sb] * eb[gfc->bo_l[sb]];
-	FLOAT8 thmm = gfc->w1_l[sb] *thr[gfc->bu_l[sb]] + gfc->w2_l[sb] * thr[gfc->bo_l[sb]];
-
-        for ( b = gfc->bu_l[sb]+1; b < gfc->bo_l[sb]; b++ )
-          {
-            enn  += eb[b];
-            thmm += thr[b];
-          }
-
-	gfc->en [chn].l[sb] = enn;
-	gfc->thm[chn].l[sb] = thmm;
-      }
-    
-
-    /*************************************************************** 
-     * compute masking thresholds for short blocks
-     ***************************************************************/
-
-    for ( sblock = 0; sblock < 3; sblock++ )
-      {
-	j = 0;
-	for ( b = 0; b < gfc->npart_s_orig; b++ )
-	  {
-	    FLOAT ecb = gfc->energy_s[sblock][j++];
-	    for (i = 1 ; i<gfc->numlines_s[b]; ++i)
-	      {
-		ecb += gfc->energy_s[sblock][j++];
-	      }
-	    eb[b] = ecb;
-	  }
-
-	for ( b = 0; b < gfc->npart_s; b++ )
-	  {
-	    FLOAT8 ecb = 0;
-	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ )
-	      {
-		ecb += gfc->s3_s[b][k] * eb[k];
-	      }
-	    thr[b] = Max (1e-6, ecb);
-	  }
-
-	for ( sb = 0; sb < NBPSY_s; sb++ )
-	  {
-            FLOAT8 enn  = gfc->w1_s[sb] * eb[gfc->bu_s[sb]] + gfc->w2_s[sb] * eb[gfc->bo_s[sb]];
-	    FLOAT8 thmm = gfc->w1_s[sb] *thr[gfc->bu_s[sb]] + gfc->w2_s[sb] * thr[gfc->bo_s[sb]];
-	    
-            for ( b = gfc->bu_s[sb]+1; b < gfc->bo_s[sb]; b++ )
-	      {
-		enn  += eb[b];
-		thmm += thr[b];
-	      }
-
-	    /****   short block pre-echo control   ****/
-
-#define NS_PREECHO_ATT0 0.8
-#define NS_PREECHO_ATT1 0.6
-#define NS_PREECHO_ATT2 0.3
-
-	    thmm *= NS_PREECHO_ATT0;
-
-	    if (ns_attacks[sblock] >= 2) {
-	      if (sblock != 0) {
-		double p = NS_INTERP(gfc->thm[chn].s[sb][sblock-1],thmm,NS_PREECHO_ATT1*pcfact);
-		thmm = Min(thmm,p);
-	      } else {
-		double p = NS_INTERP(gfc->nsPsy.last_thm[chn][sb][2],thmm,NS_PREECHO_ATT1*pcfact);
-		thmm = Min(thmm,p);
-	      }
-	    } else if (ns_attacks[sblock+1] == 1) {
-	      if (sblock != 0) {
-		double p = NS_INTERP(gfc->thm[chn].s[sb][sblock-1],thmm,NS_PREECHO_ATT1*pcfact);
-		thmm = Min(thmm,p);
-	      } else {
-		double p = NS_INTERP(gfc->nsPsy.last_thm[chn][sb][2],thmm,NS_PREECHO_ATT1*pcfact);
-		thmm = Min(thmm,p);
-	      }
-	    }
-
-	    if (ns_attacks[sblock] == 1) {
-	      double p = sblock == 0 ? gfc->nsPsy.last_thm[chn][sb][2] : gfc->thm[chn].s[sb][sblock-1];
-	      p = NS_INTERP(p,thmm,NS_PREECHO_ATT2*pcfact);
-	      thmm = Min(thmm,p);
-	    } else if ((sblock != 0 && ns_attacks[sblock-1] == 3) ||
-		       (sblock == 0 && gfc->nsPsy.last_attacks[chn][2] == 3)) {
-	      double p = sblock <= 1 ? gfc->nsPsy.last_thm[chn][sb][sblock+1] : gfc->thm[chn].s[sb][0];
-	      p = NS_INTERP(p,thmm,NS_PREECHO_ATT2*pcfact);
-	      thmm = Min(thmm,p);
-	    }
-
-	    gfc->en [chn].s[sb][sblock] = enn;
-	    gfc->thm[chn].s[sb][sblock] = thmm;
-	  }
-      }
-
-
-    /*************************************************************** 
-     * save some values for analysis of the next granule
-     ***************************************************************/
-
-    for ( sblock = 0; sblock < 3; sblock++ )
-      {
-	for ( sb = 0; sb < NBPSY_s; sb++ )
-	  {
-	    gfc->nsPsy.last_thm[chn][sb][sblock] = gfc->thm[chn].s[sb][sblock];
-	  }
-      }
-
-    for(i=0;i<3;i++)
-      gfc->nsPsy.last_attacks[chn][i] = ns_attacks[i];
-
-  } /* end loop over chn */
-
-
-
-  /*************************************************************** 
-   * compute M/S thresholds
-   ***************************************************************/
-
-  /* from Johnston & Ferreira 1992 ICASSP paper */
-
-  if ( numchn==4 /* mid/side and r/l */) {
-    FLOAT8 rside,rmid,mld;
-    int chmid=2,chside=3; 
-    
-    for ( sb = 0; sb < NBPSY_l; sb++ ) {
-      /* use this fix if L & R masking differs by 2db or less */
-      /* if db = 10*log10(x2/x1) < 2 */
-      /* if (x2 < 1.58*x1) { */
-      if (gfc->thm[0].l[sb] <= 1.58*gfc->thm[1].l[sb]
-	  && gfc->thm[1].l[sb] <= 1.58*gfc->thm[0].l[sb]) {
-
-	mld = gfc->mld_l[sb]*gfc->en[chside].l[sb];
-	rmid = Max(gfc->thm[chmid].l[sb], Min(gfc->thm[chside].l[sb],mld));
-
-	mld = gfc->mld_l[sb]*gfc->en[chmid].l[sb];
-	rside = Max(gfc->thm[chside].l[sb],Min(gfc->thm[chmid].l[sb],mld));
-
-	gfc->thm[chmid].l[sb]=rmid;
-	gfc->thm[chside].l[sb]=rside;
-      }
-    }
-    for ( sb = 0; sb < NBPSY_s; sb++ ) {
-      for ( sblock = 0; sblock < 3; sblock++ ) {
-	if (gfc->thm[0].s[sb][sblock] <= 1.58*gfc->thm[1].s[sb][sblock]
-	    && gfc->thm[1].s[sb][sblock] <= 1.58*gfc->thm[0].s[sb][sblock]) {
-
-	  mld = gfc->mld_s[sb]*gfc->en[chside].s[sb][sblock];
-	  rmid = Max(gfc->thm[chmid].s[sb][sblock],Min(gfc->thm[chside].s[sb][sblock],mld));
-
-	  mld = gfc->mld_s[sb]*gfc->en[chmid].s[sb][sblock];
-	  rside = Max(gfc->thm[chside].s[sb][sblock],Min(gfc->thm[chmid].s[sb][sblock],mld));
-
-	  gfc->thm[chmid].s[sb][sblock]=rmid;
-	  gfc->thm[chside].s[sb][sblock]=rside;
-	}
-      }
-    }
-  }
-
-
-  /* Naoki Shibata 2000 */
-
-#define NS_MSFIX 3.5
-  
-  if (numchn == 4) {
-    FLOAT msfix = NS_MSFIX;
-    if (gfc->nsPsy.safejoint) msfix = 1;
-
-    for ( sb = 0; sb < NBPSY_l; sb++ )
-      {
-	FLOAT8 thmL,thmR,thmM,thmS,ath;
-	ath  = (gfc->ATH->cb[(gfc->bu_l[sb] + gfc->bo_l[sb])/2])*pow(10,-gfp->ATHlower/10.0);
-	thmL = Max(gfc->thm[0].l[sb],ath);
-	thmR = Max(gfc->thm[1].l[sb],ath);
-	thmM = Max(gfc->thm[2].l[sb],ath);
-	thmS = Max(gfc->thm[3].l[sb],ath);
-
-	if (thmL*msfix < (thmM+thmS)/2) {
-	  FLOAT8 f = thmL*msfix / ((thmM+thmS)/2);
-	  thmM *= f;
-	  thmS *= f;
-	}
-	if (thmR*msfix < (thmM+thmS)/2) {
-	  FLOAT8 f = thmR*msfix / ((thmM+thmS)/2);
-	  thmM *= f;
-	  thmS *= f;
-	}
-
-	gfc->thm[2].l[sb] = Min(thmM,gfc->thm[2].l[sb]);
-	gfc->thm[3].l[sb] = Min(thmS,gfc->thm[3].l[sb]);
-      }
-
-    for ( sb = 0; sb < NBPSY_s; sb++ ) {
-      for ( sblock = 0; sblock < 3; sblock++ ) {
-	FLOAT8 thmL,thmR,thmM,thmS,ath;
-	ath  = (gfc->ATH->cb[(gfc->bu_s[sb] + gfc->bo_s[sb])/2])*pow(10,-gfp->ATHlower/10.0);
-	thmL = Max(gfc->thm[0].s[sb][sblock],ath);
-	thmR = Max(gfc->thm[1].s[sb][sblock],ath);
-	thmM = Max(gfc->thm[2].s[sb][sblock],ath);
-	thmS = Max(gfc->thm[3].s[sb][sblock],ath);
-
-	if (thmL*msfix < (thmM+thmS)/2) {
-	  FLOAT8 f = thmL*msfix / ((thmM+thmS)/2);
-	  thmM *= f;
-	  thmS *= f;
-	}
-	if (thmR*msfix < (thmM+thmS)/2) {
-	  FLOAT8 f = thmR*msfix / ((thmM+thmS)/2);
-	  thmM *= f;
-	  thmS *= f;
-	}
-
-	gfc->thm[2].s[sb][sblock] = Min(gfc->thm[2].s[sb][sblock],thmM);
-	gfc->thm[3].s[sb][sblock] = Min(gfc->thm[3].s[sb][sblock],thmS);
-      }
-    }
-  }
-
-  ms_ratio_l = 0;
-  ms_ratio_s = 0;
-
-
-  /*************************************************************** 
-   * compute estimation of the amount of bit used in the granule
-   ***************************************************************/
-
-  for(chn=0;chn<numchn;chn++)
-    {
-      {
-	static FLOAT8 regcoef[] = {
-	  1124.23,10.0583,10.7484,7.29006,16.2714,6.2345,4.09743,3.05468,3.33196,2.54688,
-	  3.68168,5.83109,2.93817,-8.03277,-10.8458,8.48777,9.13182,2.05212,8.6674,50.3937,73.267,97.5664,0
-	};
-
-	FLOAT8 msum = regcoef[0]/4;
-	int sb;
-
-	for ( sb = 0; sb < NBPSY_l; sb++ )
-	  {
-	    FLOAT8 t;
-	      
-	    if (gfc->thm[chn].l[sb]*gfc->masking_lower != 0 &&
-		gfc->en[chn].l[sb]/(gfc->thm[chn].l[sb]*gfc->masking_lower) > 1)
-	      t = log(gfc->en[chn].l[sb]/(gfc->thm[chn].l[sb]*gfc->masking_lower));
-	    else
-	      t = 0;
-	    msum += regcoef[sb+1] * t;
-	  }
-
-	gfc->nsPsy.pe_l[chn] = msum;
-      }
-
-      {
-	static FLOAT8 regcoef[] = {
-	  1236.28,0,0,0,0.434542,25.0738,0,0,0,19.5442,19.7486,60,100,0
-	};
-
-	FLOAT8 msum = regcoef[0]/4;
-	int sb,sblock;
-
-	for(sblock=0;sblock<3;sblock++)
-	  {
-	    for ( sb = 0; sb < NBPSY_s; sb++ )
-	      {
-		FLOAT8 t;
-	      
-		if (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower != 0 &&
-		    gfc->en[chn].s[sb][sblock] / (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower) > 1)
-		  t = log(gfc->en[chn].s[sb][sblock] / (gfc->thm[chn].s[sb][sblock] * gfc->masking_lower));
-		else
-		  t = 0;
-		msum += regcoef[sb+1] * t;
-	      }
-	  }
-
-	gfc->nsPsy.pe_s[chn] = msum;
-      }
-
-      //gfc->pe[chn] -= 150;
-    }
-
-  /*************************************************************** 
-   * determine final block type
-   ***************************************************************/
-
-  for (chn=0; chn<gfc->channels_out; chn++) {
-    blocktype[chn] = NORM_TYPE;
-  }
-
-  if (gfc->channels_out==2) {
-    if (!gfp->allow_diff_short || gfp->mode==JOINT_STEREO) {
-      /* force both channels to use the same block type */
-      /* this is necessary if the frame is to be encoded in ms_stereo.  */
-      /* But even without ms_stereo, FhG  does this */
-      int bothlong= (uselongblock[0] && uselongblock[1]);
-      if (!bothlong) {
-	uselongblock[0]=0;
-	uselongblock[1]=0;
-      }
-    }
-  }
-
-  /* update the blocktype of the previous granule, since it depends on what
-   * happend in this granule */
-  for (chn=0; chn<gfc->channels_out; chn++) {
-    if ( uselongblock[chn])
-      {				/* no attack : use long blocks */
-	assert( gfc->blocktype_old[chn] != START_TYPE );
-	switch( gfc->blocktype_old[chn] ) 
-	  {
-	  case NORM_TYPE:
-	  case STOP_TYPE:
-	    blocktype[chn] = NORM_TYPE;
-	    break;
-	  case SHORT_TYPE:
-	    blocktype[chn] = STOP_TYPE; 
-	    break;
-	  }
-      } else   {
-	/* attack : use short blocks */
-	blocktype[chn] = SHORT_TYPE;
-	if ( gfc->blocktype_old[chn] == NORM_TYPE ) {
-	  gfc->blocktype_old[chn] = START_TYPE;
-	}
-	if ( gfc->blocktype_old[chn] == STOP_TYPE ) {
-	  gfc->blocktype_old[chn] = SHORT_TYPE ;
-	}
-      }
-    
-    blocktype_d[chn] = gfc->blocktype_old[chn];  /* value returned to calling program */
-    gfc->blocktype_old[chn] = blocktype[chn];    /* save for next call to l3psy_anal */
-  }
-  
-  /*********************************************************************
-   * compute the value of PE to return (one granule delay)
-   *********************************************************************/
-  for(chn=0;chn<numchn;chn++)
-    {
-      if (chn < 2) {
-	if (blocktype_d[chn] == SHORT_TYPE) {
-	  percep_entropy[chn] = pe_s[chn];
-	} else {
-	  percep_entropy[chn] = pe_l[chn];
-	}
-	if (gfp->analysis) gfc->pinfo->pe[gr_out][chn] = percep_entropy[chn];
-      } else {
-	if (blocktype_d[0] == SHORT_TYPE) {
-	  percep_MS_entropy[chn-2] = pe_s[chn];
-	} else {
-	  percep_MS_entropy[chn-2] = pe_l[chn];
-	}
-	if (gfp->analysis) gfc->pinfo->pe[gr_out][chn] = percep_MS_entropy[chn-2];
-      }
-    }
-
-
-  return 0;
-}
-
-
-
-
-
-/* 
- *   The spreading function.  Values returned in units of energy
- */
-FLOAT8 s3_func(FLOAT8 bark) {
-    
-    FLOAT8 tempx,x,tempy,temp;
-    tempx = bark;
-    if (tempx>=0) tempx *= 3;
-    else tempx *=1.5; 
-    
-    if(tempx>=0.5 && tempx<=2.5)
-	{
-	    temp = tempx - 0.5;
-	    x = 8.0 * (temp*temp - 2.0 * temp);
-	}
-    else x = 0.0;
-    tempx += 0.474;
-    tempy = 15.811389 + 7.5*tempx - 17.5*sqrt(1.0+tempx*tempx);
-    
-    if (tempy <= -60.0) return  0.0;
-
-    tempx = exp( (x + tempy)*LN_TO_LOG10 ); 
-
-    /* Normalization.  The spreading function should be normalized so that:
-         +inf
-           /
-           |  s3 [ bark ]  d(bark)   =  1
-           /
-         -inf
-    */
-    tempx /= .6609193;
-    return tempx;
-    
-}
-
-
-
-
-
-
-
-
-int L3para_read(lame_global_flags * gfp, FLOAT8 sfreq, int *numlines_l,int *numlines_s, 
-FLOAT8 *minval,
-FLOAT8 s3_l[CBANDS][CBANDS], FLOAT8 s3_s[CBANDS][CBANDS],
-FLOAT8 *SNR, 
-int *bu_l, int *bo_l, FLOAT8 *w1_l, FLOAT8 *w2_l, 
-int *bu_s, int *bo_s, FLOAT8 *w1_s, FLOAT8 *w2_s,
-int *npart_l_orig,int *npart_l,int *npart_s_orig,int *npart_s)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-
-
-  FLOAT8 freq_tp;
-  FLOAT8 bval_l[CBANDS], bval_s[CBANDS];
-  FLOAT8 bval_l_width[CBANDS], bval_s_width[CBANDS];
-  int   cbmax=0, cbmax_tp;
-  int  sbmax ;
-  int  i,j;
-  int freq_scale=1;
-  int partition[HBLKSIZE]; 
-  int loop, k2;
-
-
-
-  /* compute numlines, the number of spectral lines in each partition band */
-  /* each partition band should be about DELBARK wide. */
-  j=0;
-  for(i=0;i<CBANDS;i++)
-    {
-      FLOAT8 ji, bark1,bark2;
-      int k,j2;
-
-      j2 = j;
-      j2 = Min(j2,BLKSIZE/2);
-      
-      do {
-	/* find smallest j2 >= j so that  (bark - bark_l[i-1]) < DELBARK */
-	ji = j;
-	bark1 = freq2bark(sfreq*ji/BLKSIZE);
-	
-	++j2;
-	ji = j2;
-	bark2  = freq2bark(sfreq*ji/BLKSIZE);
-      } while ((bark2 - bark1) < DELBARK  && j2<=BLKSIZE/2);
-
-      for (k=j; k<j2; ++k)
-	partition[k]=i;
-      numlines_l[i]=(j2-j);
-      j = j2;
-      if (j > BLKSIZE/2) break;
-    }
-  *npart_l_orig = i+1;
-  assert(*npart_l_orig <= CBANDS);
-
-  /* compute which partition bands are in which scalefactor bands */
-  { int i1,i2,sfb,start,end;
-    FLOAT8 freq1,freq2;
-    for ( sfb = 0; sfb < SBMAX_l; sfb++ ) {
-      start = gfc->scalefac_band.l[ sfb ];
-      end   = gfc->scalefac_band.l[ sfb+1 ];
-      freq1 = sfreq*(start-.5)/(2*576);
-      freq2 = sfreq*(end-1+.5)/(2*576);
-		     
-      i1 = floor(.5 + BLKSIZE*freq1/sfreq);
-      if (i1<0) i1=0;
-      i2 = floor(.5 + BLKSIZE*freq2/sfreq);
-      if (i2>BLKSIZE/2) i2=BLKSIZE/2;
-
-      //      DEBUGF(gfc,"longblock:  old: (%i,%i)  new: (%i,%i) %i %i \n",bu_l[sfb],bo_l[sfb],partition[i1],partition[i2],i1,i2);
-
-      w1_l[sfb]=.5;
-      w2_l[sfb]=.5;
-      bu_l[sfb]=partition[i1];
-      bo_l[sfb]=partition[i2];
-
-    }
-  }
-
-
-  /* compute bark value and ATH of each critical band */
-  j = 0;
-  for ( i = 0; i < *npart_l_orig; i++ ) {
-      int     k;
-      FLOAT8  bark1,bark2;
-      /* FLOAT8 mval,freq; */
-
-      // Calculating the medium bark scaled frequency of the spectral lines
-      // from j ... j + numlines[i]-1  (=spectral lines in parition band i)
-
-      k         = numlines_l[i] - 1;
-      bark1 = freq2bark(sfreq*(j+0)/BLKSIZE);
-      bark2 = freq2bark(sfreq*(j+k)/BLKSIZE);
-      bval_l[i] = .5*(bark1+bark2);
-
-      bark1 = freq2bark(sfreq*(j+0-.5)/BLKSIZE);
-      bark2 = freq2bark(sfreq*(j+k+.5)/BLKSIZE);
-      bval_l_width[i] = bark2-bark1;
-
-      gfc->ATH->cb [i] = 1.e37; // preinit for minimum search
-      for (k=0; k < numlines_l[i]; k++, j++) {
-	FLOAT8  freq = sfreq*j/(1000.0*BLKSIZE);
-	FLOAT8  level;
-	assert( freq <= 24 );              // or only '<'
-	//	freq = Min(.1,freq);       // ATH below 100 Hz constant, not further climbing
-	level  = ATHformula (freq*1000, gfp) - 20;   // scale to FFT units; returned value is in dB
-	level  = pow ( 10., 0.1*level );   // convert from dB -> energy
-	level *= numlines_l [i];
-	if ( level < gfc->ATH->cb [i] )
-	    gfc->ATH->cb [i] = level;
-      }
-
-
-    }
-
-  /* MINVAL.  For low freq, the strength of the masking is limited by minval
-   * this is an ISO MPEG1 thing, dont know if it is really needed */
-  for(i=0;i<*npart_l_orig;i++){
-    double x = (-20+bval_l[i]*20.0/10.0);
-    if (bval_l[i]>10) x = 0;
-    minval[i]=pow(10.0,x/10);
-  }
-
-
-
-
-
-
-
-  /************************************************************************/
-  /* SHORT BLOCKS */
-  /************************************************************************/
-
-  /* compute numlines */
-  j=0;
-  for(i=0;i<CBANDS;i++)
-    {
-      FLOAT8 ji, bark1,bark2;
-      int k,j2;
-
-      j2 = j;
-      j2 = Min(j2,BLKSIZE_s/2);
-      
-      do {
-	/* find smallest j2 >= j so that  (bark - bark_s[i-1]) < DELBARK */
-	ji = j;
-	bark1  = freq2bark(sfreq*ji/BLKSIZE_s);
-	
-	++j2;
-	ji = j2;
-	bark2  = freq2bark(sfreq*ji/BLKSIZE_s);
-
-      } while ((bark2 - bark1) < DELBARK  && j2<=BLKSIZE_s/2);
-
-      for (k=j; k<j2; ++k)
-	partition[k]=i;
-      numlines_s[i]=(j2-j);
-      j = j2;
-      if (j > BLKSIZE_s/2) break;
-    }
-  *npart_s_orig = i+1;
-  assert(*npart_s_orig <= CBANDS);
-
-  /* compute which partition bands are in which scalefactor bands */
-  { int i1,i2,sfb,start,end;
-    FLOAT8 freq1,freq2;
-    for ( sfb = 0; sfb < SBMAX_s; sfb++ ) {
-      start = gfc->scalefac_band.s[ sfb ];
-      end   = gfc->scalefac_band.s[ sfb+1 ];
-      freq1 = sfreq*(start-.5)/(2*192);
-      freq2 = sfreq*(end-1+.5)/(2*192);
-		     
-      i1 = floor(.5 + BLKSIZE_s*freq1/sfreq);
-      if (i1<0) i1=0;
-      i2 = floor(.5 + BLKSIZE_s*freq2/sfreq);
-      if (i2>BLKSIZE_s/2) i2=BLKSIZE_s/2;
-
-      //DEBUGF(gfc,"shortblock: old: (%i,%i)  new: (%i,%i) %i %i \n",bu_s[sfb],bo_s[sfb], partition[i1],partition[i2],i1,i2);
-
-      w1_s[sfb]=.5;
-      w2_s[sfb]=.5;
-      bu_s[sfb]=partition[i1];
-      bo_s[sfb]=partition[i2];
-
-    }
-  }
-
-
-
-
-
-  /* compute bark values of each critical band */
-  j = 0;
-  for(i=0;i<*npart_s_orig;i++)
-    {
-      int     k;
-      FLOAT8  bark1,bark2,snr;
-      k    = numlines_s[i] - 1;
-
-      bark1 = freq2bark (sfreq*(j+0)/BLKSIZE_s);
-      bark2 = freq2bark (sfreq*(j+k)/BLKSIZE_s); 
-      bval_s[i] = .5*(bark1+bark2);
-
-      bark1 = freq2bark (sfreq*(j+0-.5)/BLKSIZE_s);
-      bark2 = freq2bark (sfreq*(j+k+.5)/BLKSIZE_s); 
-      bval_s_width[i] = bark2-bark1;
-      j        += k+1;
-      
-      /* SNR formula */
-      if (bval_s[i]<13)
-          snr=-8.25;
-      else 
-	  snr  = -4.5 * (bval_s[i]-13)/(24.0-13.0)  + 
-	      -8.25*(bval_s[i]-24)/(13.0-24.0);
-
-      SNR[i]=pow(10.0,snr/10.0);
-    }
-
-
-
-
-
-
-  /************************************************************************
-   * Now compute the spreading function, s[j][i], the value of the spread-*
-   * ing function, centered at band j, for band i, store for later use    *
-   ************************************************************************/
-  /* i.e.: sum over j to spread into signal barkval=i  
-     NOTE: i and j are used opposite as in the ISO docs */
-  for(i=0;i<*npart_l_orig;i++)    {
-      for(j=0;j<*npart_l_orig;j++) 	{
-  	  s3_l[i][j]=s3_func(bval_l[i]-bval_l[j])*bval_l_width[j];
-      }
-  }
-  for(i=0;i<*npart_s_orig;i++)     {
-      for(j=0;j<*npart_s_orig;j++) 	{
-  	  s3_s[i][j]=s3_func(bval_s[i]-bval_s[j])*bval_s_width[j];
-      }
-  }
-  
-
-
-
-  /* compute: */
-  /* npart_l_orig   = number of partition bands before convolution */
-  /* npart_l  = number of partition bands after convolution */
-  
-  *npart_l=bo_l[NBPSY_l-1]+1;
-  *npart_s=bo_s[NBPSY_s-1]+1;
-  
-  assert(*npart_l <= *npart_l_orig);
-  assert(*npart_s <= *npart_s_orig);
-
-
-    /* setup stereo demasking thresholds */
-    /* formula reverse enginerred from plot in paper */
-    for ( i = 0; i < NBPSY_s; i++ ) {
-      FLOAT8 arg,mld;
-      arg = freq2bark(sfreq*gfc->scalefac_band.s[i]/(2*192));
-      arg = (Min(arg, 15.5)/15.5);
-
-      mld = 1.25*(1-cos(PI*arg))-2.5;
-      gfc->mld_s[i] = pow(10.0,mld);
-    }
-    for ( i = 0; i < NBPSY_l; i++ ) {
-      FLOAT8 arg,mld;
-      arg = freq2bark(sfreq*gfc->scalefac_band.l[i]/(2*576));
-      arg = (Min(arg, 15.5)/15.5);
-
-      mld = 1.25*(1-cos(PI*arg))-2.5;
-      gfc->mld_l[i] = pow(10.0,mld);
-    }
-
-#define temporalmask_sustain_sec 0.01
-
-    /* setup temporal masking */
-    gfc->decay = exp(-1.0*LOG10/(temporalmask_sustain_sec*sfreq/192.0));
-
-    return 0;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-int psymodel_init(lame_global_flags *gfp)
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int i,j,b,sb,k,samplerate;
-    FLOAT cwlimit;
-
-    samplerate = gfp->out_samplerate;
-    gfc->ms_ener_ratio_old=.25;
-    gfc->blocktype_old[0]=STOP_TYPE;
-    gfc->blocktype_old[1]=STOP_TYPE;
-    gfc->blocktype_old[0]=SHORT_TYPE;
-    gfc->blocktype_old[1]=SHORT_TYPE;
-
-    for (i=0; i<4; ++i) {
-      for (j=0; j<CBANDS; ++j) {
-	gfc->nb_1[i][j]=1e20;
-	gfc->nb_2[i][j]=1e20;
-      }
-      for ( sb = 0; sb < NBPSY_l; sb++ ) {
-	gfc->en[i].l[sb] = 1e20;
-	gfc->thm[i].l[sb] = 1e20;
-      }
-      for (j=0; j<3; ++j) {
-	for ( sb = 0; sb < NBPSY_s; sb++ ) {
-	  gfc->en[i].s[sb][j] = 1e20;
-	  gfc->thm[i].s[sb][j] = 1e20;
-	}
-      }
-    }
-    for (i=0; i<4; ++i) {
-      for (j=0; j<3; ++j) {
-	for ( sb = 0; sb < NBPSY_s; sb++ ) {
-	  gfc->nsPsy.last_thm[i][sb][j] = 1e20;
-	}
-      }
-    }
-    for(i=0;i<4;i++) {
-      for(j=0;j<9;j++)
-	gfc->nsPsy.last_en_subshort[i][j] = 100;
-      for(j=0;j<3;j++)
-	gfc->nsPsy.last_attacks[i][j] = 0;
-      gfc->nsPsy.pe_l[i] = gfc->nsPsy.pe_s[i] = 0;
-    }
-
-
-
-    
-    /*  gfp->cwlimit = sfreq*j/1024.0;  */
-    gfc->cw_lower_index=6;
-    if (gfp->cwlimit>0) 
-      cwlimit=gfp->cwlimit;
-    else
-      cwlimit=(FLOAT)8871.7;
-    gfc->cw_upper_index = cwlimit*1024.0/gfp->out_samplerate;
-    gfc->cw_upper_index=Min(HBLKSIZE-4,gfc->cw_upper_index);      /* j+3 < HBLKSIZE-1 */
-    gfc->cw_upper_index=Max(6,gfc->cw_upper_index);
-
-    for ( j = 0; j < HBLKSIZE; j++ )
-      gfc->cw[j] = 0.4f;
-    
-    
-
-    i=L3para_read( gfp,(FLOAT8) samplerate,gfc->numlines_l,gfc->numlines_s,
-          gfc->minval,gfc->s3_l,gfc->s3_s,gfc->SNR_s,gfc->bu_l,
-          gfc->bo_l,gfc->w1_l,gfc->w2_l, gfc->bu_s,gfc->bo_s,
-          gfc->w1_s,gfc->w2_s,&gfc->npart_l_orig,&gfc->npart_l,
-          &gfc->npart_s_orig,&gfc->npart_s );
-    if (i!=0) return -1;
-    
-
-
-    /* npart_l_orig   = number of partition bands before convolution */
-    /* npart_l  = number of partition bands after convolution */
-    
-    for (i=0; i<gfc->npart_l; i++) {
-      for (j = 0; j < gfc->npart_l_orig; j++) {
-	if (gfc->s3_l[i][j] != 0.0)
-	  break;
-      }
-      gfc->s3ind[i][0] = j;
-      
-      for (j = gfc->npart_l_orig - 1; j > 0; j--) {
-	if (gfc->s3_l[i][j] != 0.0)
-	  break;
-      }
-      gfc->s3ind[i][1] = j;
-    }
-
-
-    for (i=0; i<gfc->npart_s; i++) {
-      for (j = 0; j < gfc->npart_s_orig; j++) {
-	if (gfc->s3_s[i][j] != 0.0)
-	  break;
-      }
-      gfc->s3ind_s[i][0] = j;
-      
-      for (j = gfc->npart_s_orig - 1; j > 0; j--) {
-	if (gfc->s3_s[i][j] != 0.0)
-	  break;
-      }
-      gfc->s3ind_s[i][1] = j;
-    }
-    
-    
-    /*  
-      #include "debugscalefac.c"
-    */
-    
-
-
-    if (gfc->nsPsy.use) {
-	/* long block spreading function normalization */
-	for ( b = 0;b < gfc->npart_l; b++ ) {
-	    for ( k = gfc->s3ind[b][0]; k <= gfc->s3ind[b][1]; k++ ) {
-		// spreading function has been properly normalized by
-		// multiplying by DELBARK/.6609193 = .515.  
-		// It looks like Naoki was
-                // way ahead of me and added this factor here!
-		// it is no longer needed.
-		//gfc->s3_l[b][k] *= 0.5;
-	    }
-	}
-	/* short block spreading function normalization */
-	// no longer needs to be normalized, but nspsytune wants 
-	// SNR_s applied here istead of later to save CPU cycles
-	for ( b = 0;b < gfc->npart_s; b++ ) {
-	    FLOAT8 norm=0;
-	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
-		norm += gfc->s3_s[b][k];
-	    }
-	    for ( k = gfc->s3ind_s[b][0]; k <= gfc->s3ind_s[b][1]; k++ ) {
-		gfc->s3_s[b][k] *= gfc->SNR_s[b] /* / norm */;
-	    }
-	}
-    }
-
-
-
-    if (gfc->nsPsy.use) {
-#if 1
-	/* spread only from npart_l bands.  Normally, we use the spreading
-	 * function to convolve from npart_l_orig down to npart_l bands 
-	 */
-	for(b=0;b<gfc->npart_l;b++)
-	    if (gfc->s3ind[b][1] > gfc->npart_l-1) gfc->s3ind[b][1] = gfc->npart_l-1;
-#endif
-    }
-
-    return 0;
-}
-
-
-
-
-
-
--- a/sys/src/games/mp3enc/psymodel.h
+++ /dev/null
@@ -1,49 +1,0 @@
-/*
- *	psymodel.h
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_PSYMODEL_H
-#define LAME_PSYMODEL_H
-
-#include "l3side.h"
-
-int L3psycho_anal( lame_global_flags *gfc,
-                    const sample_t *buffer[2], int gr, 
-		    FLOAT8 *ms_ratio, 
-		    FLOAT8 *ms_ratio_next, 
-		    III_psy_ratio ratio[2][2],
-		    III_psy_ratio MS_ratio[2][2],
-		   FLOAT8 pe[2], FLOAT8 pe_MS[2], FLOAT8 ener[2],
-                    int blocktype_d[2]); 
-
-int L3psycho_anal_ns( lame_global_flags *gfc,
-		      const sample_t *buffer[2], int gr, 
-		      FLOAT8 *ms_ratio, 
-		      FLOAT8 *ms_ratio_next, 
-		      III_psy_ratio ratio[2][2],
-		      III_psy_ratio MS_ratio[2][2],
-		      FLOAT8 pe[2], FLOAT8 pe_MS[2], FLOAT8 ener[2],
-		      int blocktype_d[2]); 
-
-
-int psymodel_init(lame_global_flags *gfp);
-
-
-#endif /* LAME_PSYMODEL_H */
--- a/sys/src/games/mp3enc/quantize.c
+++ /dev/null
@@ -1,1838 +1,0 @@
-/*
- * MP3 quantization
- *
- * Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: quantize.c,v 1.57 2001/02/27 06:14:57 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <math.h>
-#include <assert.h>
-#include "util.h"
-#include "l3side.h"
-#include "quantize.h"
-#include "reservoir.h"
-#include "quantize_pvt.h"
-#include "lame-analysis.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-/************************************************************************
- *
- *      init_outer_loop()
- *  mt 6/99                                    
- *
- *  initializes cod_info, scalefac and xrpow
- *
- *  returns 0 if all energies in xr are zero, else 1                    
- *
- ************************************************************************/
-
-static int 
-init_outer_loop(
-    gr_info *const cod_info, 
-    III_scalefac_t *const scalefac, 
-    const int is_mpeg1,
-    const FLOAT8 xr[576], 
-    FLOAT8 xrpow[576] )
-{
-    FLOAT8 tmp, sum = 0;
-    int i;
-
-    /*  initialize fresh cod_info
-     */
-    cod_info->part2_3_length      = 0;
-    cod_info->big_values          = 0;
-    cod_info->count1              = 0;
-    cod_info->global_gain         = 210;
-    cod_info->scalefac_compress   = 0;
-    /* window_switching_flag was set in psymodel.c? */
-    /* block_type            was set in psymodel.c? */
-    /* mixed_block_flag      would be set in ^      */
-    cod_info->table_select [0]    = 0;
-    cod_info->table_select [1]    = 0;
-    cod_info->table_select [2]    = 0;
-    cod_info->subblock_gain[0]    = 0;
-    cod_info->subblock_gain[1]    = 0;
-    cod_info->subblock_gain[2]    = 0;
-    cod_info->region0_count       = 0;
-    cod_info->region1_count       = 0;
-    cod_info->preflag             = 0;
-    cod_info->scalefac_scale      = 0;
-    cod_info->count1table_select  = 0;
-    cod_info->part2_length        = 0;
-    if (cod_info->block_type == SHORT_TYPE) {
-        cod_info->sfb_lmax        = 0;
-        cod_info->sfb_smin        = 0;
-	if (cod_info->mixed_block_flag) {
-            /*
-             *  MPEG-1:      sfbs 0-7 long block, 3-12 short blocks 
-             *  MPEG-2(.5):  sfbs 0-5 long block, 3-12 short blocks
-             */ 
-            cod_info->sfb_lmax    = is_mpeg1 ? 8 : 6;
-	    cod_info->sfb_smin    = 3;
-	}
-    } else {
-        cod_info->sfb_lmax        = SBPSY_l;
-        cod_info->sfb_smin        = SBPSY_s;
-    }   
-    cod_info->count1bits          = 0;  
-    cod_info->sfb_partition_table = nr_of_sfb_block[0][0];
-    cod_info->slen[0]             = 0;
-    cod_info->slen[1]             = 0;
-    cod_info->slen[2]             = 0;
-    cod_info->slen[3]             = 0;
-
-    /*  fresh scalefactors are all zero
-     */
-    memset(scalefac, 0, sizeof(III_scalefac_t));
-  
-    /*  check if there is some energy we have to quantize
-     *  and calculate xrpow matching our fresh scalefactors
-     */
-    for (i = 0; i < 576; ++i) {
-        tmp = fabs (xr[i]);
-	sum += tmp;
-        xrpow[i] = sqrt (tmp * sqrt(tmp));
-    }
-   /*  return 1 if we have something to quantize, else 0
-    */
-   return sum > (FLOAT8)1E-20;
-}
-
-
-
-/************************************************************************
- *
- *      bin_search_StepSize()
- *
- *  author/date??
- *
- *  binary step size search
- *  used by outer_loop to get a quantizer step size to start with
- *
- ************************************************************************/
-
-typedef enum {
-    BINSEARCH_NONE,
-    BINSEARCH_UP, 
-    BINSEARCH_DOWN
-} binsearchDirection_t;
-
-int 
-bin_search_StepSize(
-          lame_internal_flags * const gfc,
-          gr_info * const cod_info,
-    const int             desired_rate, 
-    const int             start, 
-    const FLOAT8          xrpow [576],
-          int             l3enc [576] ) 
-{
-    int nBits;
-    int CurrentStep;
-    int flag_GoneOver = 0;
-    int StepSize      = start;
-
-    binsearchDirection_t Direction = BINSEARCH_NONE;
-    assert(gfc->CurrentStep);
-    CurrentStep = gfc->CurrentStep;
-
-    do {
-        cod_info->global_gain = StepSize;
-        nBits = count_bits(gfc,l3enc,xrpow,cod_info);  
-
-        if (CurrentStep == 1) break; /* nothing to adjust anymore */
-    
-        if (flag_GoneOver) CurrentStep /= 2;
- 
-        if (nBits > desired_rate) {  
-            /* increase Quantize_StepSize */
-            if (Direction == BINSEARCH_DOWN && !flag_GoneOver) {
-                flag_GoneOver = 1;
-                CurrentStep  /= 2; /* late adjust */
-            }
-            Direction = BINSEARCH_UP;
-            StepSize += CurrentStep;
-            if (StepSize > 255) break;
-        }
-        else if (nBits < desired_rate) {
-            /* decrease Quantize_StepSize */
-            if (Direction == BINSEARCH_UP && !flag_GoneOver) {
-                flag_GoneOver = 1;
-                CurrentStep  /= 2; /* late adjust */
-            }
-            Direction = BINSEARCH_DOWN;
-            StepSize -= CurrentStep;
-            if (StepSize < 0) break;
-        }
-        else break; /* nBits == desired_rate;; most unlikely to happen.*/
-    } while (1); /* For-ever, break is adjusted. */
-
-    CurrentStep = start - StepSize;
-    
-    gfc->CurrentStep = CurrentStep/4 != 0 ? 4 : 2;
-
-    return nBits;
-}
-
-
-
-
-/*************************************************************************** 
- *
- *         inner_loop ()                                                     
- *
- *  author/date??
- *
- *  The code selects the best global gain for a particular set of scalefacs 
- *
- ***************************************************************************/ 
-
-int 
-inner_loop(
-          lame_internal_flags * const gfc,
-          gr_info * const cod_info,
-    const int             max_bits,
-    const FLOAT8          xrpow [576],
-          int             l3enc [576] )
-{
-    int bits;
-    
-    assert(max_bits >= 0);
-
-    /*  scalefactors may have changed, so count bits
-     */
-    bits=count_bits(gfc,l3enc,xrpow,cod_info);
-
-    /*  increase quantizer stepsize until needed bits are below maximum
-     */
-    while (bits > max_bits) {
-        cod_info->global_gain++;
-        bits = count_bits (gfc, l3enc, xrpow, cod_info);
-    } 
-
-    return bits;
-}
-
-
-
-/*************************************************************************
- *
- *      loop_break()                                               
- *
- *  author/date??
- *
- *  Function: Returns zero if there is a scalefac which has not been
- *            amplified. Otherwise it returns one. 
- *
- *************************************************************************/
-
-inline 
-static int
-loop_break( 
-    const gr_info        * const cod_info,
-    const III_scalefac_t * const scalefac ) 
-{
-    unsigned int i, sfb;
-
-    for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++)
-        if (scalefac->l[sfb] == 0)
-            return 0;
-
-    for (sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++)
-        for (i = 0; i < 3; i++) 
-            if (scalefac->s[sfb][i] == 0 && cod_info->subblock_gain[i] == 0)
-                return 0;
-
-    return 1;
-}
-
-
-
-
-/*************************************************************************
- *
- *      quant_compare()                                               
- *
- *  author/date??
- *
- *  several different codes to decide which quantization is better
- *
- *************************************************************************/
-
-inline 
-static int 
-quant_compare(
-    const int                       experimentalX,
-    const calc_noise_result * const best,
-    const calc_noise_result * const calc )
-{
-    /*
-       noise is given in decibels (dB) relative to masking thesholds.
-
-       over_noise:  ??? (the previous comment is fully wrong)
-       tot_noise:   ??? (the previous comment is fully wrong)
-       max_noise:   max quantization noise 
-
-     */
-    int better;
-
-    switch (experimentalX) {
-        default:
-        case 0: 
-	    better = calc->over_count  < best->over_count
-               ||  ( calc->over_count == best->over_count  &&
-                     calc->over_noise  < best->over_noise )
-               ||  ( calc->over_count == best->over_count  &&
-                     calc->over_noise == best->over_noise  &&
-                     calc->tot_noise   < best->tot_noise  ); 
-	    break;
-        case 1: 
-	    better = calc->max_noise < best->max_noise; 
-	    break;
-        case 2: 
-	    better = calc->tot_noise < best->tot_noise; 
-	    break;
-        case 3: 
-	    better = calc->tot_noise < best->tot_noise  &&
-                     calc->max_noise < best->max_noise+2; 
-	    break;
-        case 4: 
-	    better = ( calc->max_noise <= 0  &&
-                       best->max_noise >  2 )
-                 ||  ( calc->max_noise <= 0  &&
-                       best->max_noise <  0  &&
-                       best->max_noise >  calc->max_noise-2  &&
-                       calc->tot_noise <  best->tot_noise )
-                 ||  ( calc->max_noise <= 0  &&
-                       best->max_noise >  0  &&
-                       best->max_noise >  calc->max_noise-2  &&
-                       calc->tot_noise <  best->tot_noise+best->over_noise )
-                 ||  ( calc->max_noise >  0  &&
-                       best->max_noise > -0.5  &&
-                       best->max_noise >  calc->max_noise-1  &&
-                       calc->tot_noise+calc->over_noise < best->tot_noise+best->over_noise )
-                 ||  ( calc->max_noise >  0  &&
-                       best->max_noise > -1  &&
-                       best->max_noise >  calc->max_noise-1.5  &&
-                       calc->tot_noise+calc->over_noise+calc->over_noise < best->tot_noise+best->over_noise+best->over_noise );
-            break;
-        case 5: 
-	    better =   calc->over_noise  < best->over_noise
-                 ||  ( calc->over_noise == best->over_noise  &&
-                       calc->tot_noise   < best->tot_noise ); 
-	    break;
-        case 6: 
-	    better =   calc->over_noise  < best->over_noise
-                 ||  ( calc->over_noise == best->over_noise  &&
-                     ( calc->max_noise   < best->max_noise  
-		     ||  ( calc->max_noise  == best->max_noise  &&
-                           calc->tot_noise  <= best->tot_noise )
-		      )); 
-	    break;
-        case 7: 
-	    better =   calc->over_count < best->over_count
-                   ||  calc->over_noise < best->over_noise; 
-	    break;
-        case 8: 
-	    better =   calc->klemm_noise < best->klemm_noise;
-            break;
-    }   
-
-    return better;
-}
-
-
-
-/*************************************************************************
- *
- *          amp_scalefac_bands() 
- *
- *  author/date??
- *        
- *  Amplify the scalefactor bands that violate the masking threshold.
- *  See ISO 11172-3 Section C.1.5.4.3.5
- * 
- *  distort[] = noise/masking
- *  distort[] > 1   ==> noise is not masked
- *  distort[] < 1   ==> noise is masked
- *  max_dist = maximum value of distort[]
- *  
- *  Three algorithms:
- *  noise_shaping_amp
- *        0             Amplify all bands with distort[]>1.
- *
- *        1             Amplify all bands with distort[] >= max_dist^(.5);
- *                     ( 50% in the db scale)
- *
- *        2             Amplify first band with distort[] >= max_dist;
- *                       
- *
- *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands 
- *  with distort[] >= .95*max_dist.  This is to make sure we always
- *  amplify at least one band.  
- * 
- *
- *************************************************************************/
-static void 
-amp_scalefac_bands(
-    lame_global_flags *gfp,
-    const gr_info  *const cod_info, 
-    III_scalefac_t *const scalefac,
-    III_psy_xmin *distort,
-    FLOAT8 xrpow[576] )
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int start, end, l,i,j,sfb;
-  FLOAT8 ifqstep34, trigger;
-
-  if (cod_info->scalefac_scale == 0) {
-    ifqstep34 = 1.29683955465100964055; /* 2**(.75*.5)*/
-  } else {
-    ifqstep34 = 1.68179283050742922612;  /* 2**(.75*1) */
-  }
-
-  /* compute maximum value of distort[]  */
-  trigger = 0;
-  for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) {
-    if (trigger < distort->l[sfb])
-        trigger = distort->l[sfb];
-  }
-  for (sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++) {
-    for (i = 0; i < 3; i++ ) {
-      if (trigger < distort->s[sfb][i])
-          trigger = distort->s[sfb][i];
-    }
-  }
-
-  switch (gfc->noise_shaping_amp) {
-
-  case 2:
-    /* amplify exactly 1 band */
-    //trigger = distort_thresh;
-    break;
-
-  case 1:
-    /* amplify bands within 50% of max (on db scale) */
-    if (trigger>1.0)
-        trigger = pow(trigger, .5);
-    else
-      trigger *= .95;
-    break;
-
-  case 0:
-  default:
-    /* ISO algorithm.  amplify all bands with distort>1 */
-    if (trigger>1.0)
-        trigger=1.0;
-    else
-        trigger *= .95;
-    break;
-  }
-
-  for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++ ) {
-    start = gfc->scalefac_band.l[sfb];
-    end   = gfc->scalefac_band.l[sfb+1];
-    if (distort->l[sfb]>=trigger  ) {
-      scalefac->l[sfb]++;
-      for ( l = start; l < end; l++ )
-	xrpow[l] *= ifqstep34;
-      if (gfc->noise_shaping_amp==2) goto done;
-    }
-  }
-  
-  for ( j=0,sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++ ) {
-    start = gfc->scalefac_band.s[sfb];
-    end   = gfc->scalefac_band.s[sfb+1];
-    for ( i = 0; i < 3; i++ ) {
-      int j2 = j;
-      if ( distort->s[sfb][i]>=trigger) {
-	scalefac->s[sfb][i]++;
-	for (l = start; l < end; l++) 
-	  xrpow[j2++] *= ifqstep34;
-        if (gfc->noise_shaping_amp==2) goto done;
-      }
-      j += end-start;
-    }
-  }
- done:
- return;
-}
-
-/*************************************************************************
- *
- *      inc_scalefac_scale()
- *
- *  Takehiro Tominaga 2000-xx-xx
- *
- *  turns on scalefac scale and adjusts scalefactors
- *
- *************************************************************************/
- 
-static void
-inc_scalefac_scale (
-    const lame_internal_flags        * const gfc, 
-          gr_info        * const cod_info, 
-          III_scalefac_t * const scalefac,
-          FLOAT8                 xrpow[576] )
-{
-    int start, end, l,i,j;
-    int sfb;
-    const FLOAT8 ifqstep34 = 1.29683955465100964055;
-
-    for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) {
-        int s = scalefac->l[sfb] + (cod_info->preflag ? pretab[sfb] : 0);
-        if (s & 1) {
-            s++;
-            start = gfc->scalefac_band.l[sfb];
-            end   = gfc->scalefac_band.l[sfb+1];
-            for (l = start; l < end; l++) 
-                xrpow[l] *= ifqstep34;
-        }
-        scalefac->l[sfb]  = s >> 1;
-        cod_info->preflag = 0;
-    }
-
-    for (j = 0, sfb = cod_info->sfb_smin; sfb < SBPSY_s; sfb++) {
-    start = gfc->scalefac_band.s[sfb];
-    end   = gfc->scalefac_band.s[sfb+1];
-    for (i = 0; i < 3; i++) {
-        int j2 = j;
-        if (scalefac->s[sfb][i] & 1) {
-        scalefac->s[sfb][i]++;
-        for (l = start; l < end; l++) 
-            xrpow[j2++] *= ifqstep34;
-        }
-        scalefac->s[sfb][i] >>= 1;
-        j += end-start;
-    }
-    }
-    cod_info->scalefac_scale = 1;
-}
-
-
-
-/*************************************************************************
- *
- *      inc_subblock_gain()
- *
- *  Takehiro Tominaga 2000-xx-xx
- *
- *  increases the subblock gain and adjusts scalefactors
- *
- *************************************************************************/
- 
-static int 
-inc_subblock_gain (
-    const lame_internal_flags        * const gfc,
-          gr_info        * const cod_info,
-          III_scalefac_t * const scalefac,
-          FLOAT8                 xrpow[576] )
-{
-    int window;
-
-    for (window = 0; window < 3; window++) {
-        int s1, s2, l;
-        int sfb;
-        s1 = s2 = 0;
-
-        for (sfb = cod_info->sfb_smin; sfb < 6; sfb++) {
-            if (s1 < scalefac->s[sfb][window])
-            s1 = scalefac->s[sfb][window];
-        }
-        for (; sfb < SBPSY_s; sfb++) {
-            if (s2 < scalefac->s[sfb][window])
-            s2 = scalefac->s[sfb][window];
-        }
-
-        if (s1 < 16 && s2 < 8)
-            continue;
-
-        if (cod_info->subblock_gain[window] >= 7)
-            return 1;
-
-        /* even though there is no scalefactor for sfb12
-         * subblock gain affects upper frequencies too, that's why
-         * we have to go up to SBMAX_s
-         */
-        cod_info->subblock_gain[window]++;
-        for (sfb = cod_info->sfb_smin; sfb < SBMAX_s; sfb++) {
-            int i, width;
-            int s = scalefac->s[sfb][window];
-            FLOAT8 amp;
-
-            if (s < 0)
-                continue;
-            s = s - (4 >> cod_info->scalefac_scale);
-            if (s >= 0) {
-                scalefac->s[sfb][window] = s;
-                continue;
-            }
-
-            scalefac->s[sfb][window] = 0;
-            width = gfc->scalefac_band.s[sfb] - gfc->scalefac_band.s[sfb+1];
-            i = gfc->scalefac_band.s[sfb] * 3 + width * window;
-            amp = IPOW20(210 + (s << (cod_info->scalefac_scale + 1)));
-            for (l = 0; l < width; l++) {
-                xrpow[l] *= amp;
-            }
-        }
-    }
-    return 0;
-}
-
-
-
-/********************************************************************
- *
- *      balance_noise()
- *
- *  Takehiro Tominaga /date??
- *  Robert Hegemann 2000-09-06: made a function of it
- *
- *  amplifies scalefactor bands, 
- *   - if all are already amplified returns 0
- *   - if some bands are amplified too much:
- *      * try to increase scalefac_scale
- *      * if already scalefac_scale was set
- *          try on short blocks to increase subblock gain
- *
- ********************************************************************/
-inline
-static int 
-balance_noise (
-    lame_global_flags  *const gfp,
-    gr_info        * const cod_info,
-    III_scalefac_t * const scalefac, 
-    III_psy_xmin           *distort,
-    FLOAT8                 xrpow[576] )
-{
-    lame_internal_flags *const gfc = (lame_internal_flags *)gfp->internal_flags;
-    int status;
-    
-    amp_scalefac_bands ( gfp, cod_info, scalefac, distort, xrpow);
-    
-    /* check to make sure we have not amplified too much 
-     * loop_break returns 0 if there is an unamplified scalefac
-     * scale_bitcount returns 0 if no scalefactors are too large
-     */
-    
-    status = loop_break (cod_info, scalefac);
-    
-    if (status) 
-        return 0; /* all bands amplified */
-    
-    /* not all scalefactors have been amplified.  so these 
-     * scalefacs are possibly valid.  encode them: 
-     */
-    if (gfc->is_mpeg1)
-        status = scale_bitcount (scalefac, cod_info);
-    else 
-        status = scale_bitcount_lsf (gfc, scalefac, cod_info);
-    
-    if (!status) 
-        return 1; /* amplified some bands not exceeding limits */
-    
-    /*  some scalefactors are too large.
-     *  lets try setting scalefac_scale=1 
-     */
-    if (gfc->noise_shaping > 1) {
-	if (!cod_info->scalefac_scale) {
-	    inc_scalefac_scale (gfc, cod_info, scalefac, xrpow);
-	    status = 0;
-	} else {
-	    if (cod_info->block_type == SHORT_TYPE ) {
-		status = inc_subblock_gain (gfc, cod_info, scalefac, xrpow)
-		    || loop_break (cod_info, scalefac);
-	    }
-	}
-    }
-
-    if (!status) {
-        if (gfc->is_mpeg1 == 1) 
-            status = scale_bitcount (scalefac, cod_info);
-        else 
-            status = scale_bitcount_lsf (gfc, scalefac, cod_info);
-    }    
-    return !status;
-}
-
-
-
-/************************************************************************
- *
- *  outer_loop ()                                                       
- *
- *  Function: The outer iteration loop controls the masking conditions  
- *  of all scalefactorbands. It computes the best scalefac and          
- *  global gain. This module calls the inner iteration loop             
- * 
- *  mt 5/99 completely rewritten to allow for bit reservoir control,   
- *  mid/side channels with L/R or mid/side masking thresholds, 
- *  and chooses best quantization instead of last quantization when 
- *  no distortion free quantization can be found.  
- *  
- *  added VBR support mt 5/99
- *
- *  some code shuffle rh 9/00
- ************************************************************************/
-
-static int 
-outer_loop (
-   lame_global_flags *gfp,
-          gr_info        * const cod_info,
-    const FLOAT8                 xr[576],   /* magnitudes of spectral values */
-    const III_psy_xmin   * const l3_xmin,   /* allowed distortion of the scalefactor */
-          III_scalefac_t * const scalefac,  /* scalefactors */
-          FLOAT8                 xrpow[576], /* coloured magnitudes of spectral values */
-          int                    l3enc[576], /* vector of quantized values ix(0..575) */
-    const int                    ch, 
-    const int                    targ_bits )  /* maximum allowed bits */
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_scalefac_t save_scalefac;
-    gr_info save_cod_info;
-    FLOAT8 save_xrpow[576];
-    III_psy_xmin   distort;
-    calc_noise_result noise_info;
-    calc_noise_result best_noise_info;
-    int l3_enc_w[576]; 
-    int iteration = 0;
-    int bits_found = 0;
-    int huff_bits;
-    int real_bits;
-    int better;
-    int over=0;
-
-    int notdone = 1;
-    int copy = 0;
-    int age = 0;
-
-    noise_info.over_count = 100;
-    noise_info.tot_count  = 100;
-    noise_info.max_noise  = 0;
-    noise_info.tot_noise  = 0;
-    noise_info.over_noise = 0;
-    
-    best_noise_info.over_count = 100;
-
-    bits_found = bin_search_StepSize (gfc, cod_info, targ_bits, 
-                                      gfc->OldValue[ch], xrpow, l3_enc_w);
-    gfc->OldValue[ch] = cod_info->global_gain;
-
-    /* BEGIN MAIN LOOP */
-    do {
-        iteration ++;
-
-        /* inner_loop starts with the initial quantization step computed above
-         * and slowly increases until the bits < huff_bits.
-         * Thus it is important not to start with too large of an inital
-         * quantization step.  Too small is ok, but inner_loop will take longer 
-         */
-        huff_bits = targ_bits - cod_info->part2_length;
-        if (huff_bits < 0) {
-            assert(iteration != 1);
-            /*  scale factors too large, not enough bits. 
-             *  use previous quantizaton */
-            break;
-        }
-        /*  if this is the first iteration, 
-         *  see if we can reuse the quantization computed in 
-         *  bin_search_StepSize above */
-
-        if (iteration == 1) {
-            if (bits_found > huff_bits) {
-                cod_info->global_gain++;
-                real_bits = inner_loop (gfc, cod_info, huff_bits, xrpow, 
-                                        l3_enc_w);
-            } else {
-                real_bits = bits_found;
-            }
-        } else {
-            real_bits = inner_loop (gfc, cod_info, huff_bits, xrpow,
-                                    l3_enc_w);
-        }
-
-        cod_info->part2_3_length = real_bits;
-
-        /* compute the distortion in this quantization */
-        if (gfc->noise_shaping) 
-            /* coefficients and thresholds both l/r (or both mid/side) */
-            over = calc_noise (gfc, xr, l3_enc_w, cod_info, l3_xmin, 
-                               scalefac, &distort, &noise_info);
-        else {
-            /* fast mode, no noise shaping, we are ready */
-            best_noise_info = noise_info;
-            over = 0;
-            copy = 0;
-            memcpy(l3enc, l3_enc_w, sizeof(int)*576);
-            break;
-        }
-
-
-        /* check if this quantization is better
-         * than our saved quantization */
-        if (iteration == 1) /* the first iteration is always better */
-            better = 1;
-        else
-            better = quant_compare (gfp->experimentalX, 
-                                    &best_noise_info, &noise_info);
-        
-        /* save data so we can restore this quantization later */    
-        if (better) {
-            copy = 0;
-            best_noise_info = noise_info;
-            memcpy(l3enc, l3_enc_w, sizeof(int)*576);
-            age = 0;
-        }
-        else
-            age ++;
-
-
-        /******************************************************************/
-        /* stopping criterion */
-        /******************************************************************/
-        /* if no bands with distortion and -X0, we are done */
-        if (0==gfc->noise_shaping_stop && 
-            0==gfp->experimentalX &&
-	    (over == 0 || best_noise_info.over_count == 0) )
-            break;
-        /* Otherwise, allow up to 3 unsuccesful tries in serial, then stop 
-         * if our best quantization so far had no distorted bands. This
-         * gives us more possibilities for different quant_compare modes.
-         * Much more than 3 makes not a big difference, it is only slower.
-         */
-        if (age > 3 && best_noise_info.over_count == 0) 
-            break;
-        
-
-
-
-    
-        /* Check if the last scalefactor band is distorted.
-         * in VBR mode we can't get rid of the distortion, so quit now
-         * and VBR mode will try again with more bits.  
-         * (makes a 10% speed increase, the files I tested were
-         * binary identical, 2000/05/20 [email protected])
-         * distort[] > 1 means noise > allowed noise
-         */
-        if (gfc->sfb21_extra) {
-            if (cod_info->block_type == SHORT_TYPE) {
-                if (distort.s[SBMAX_s-1][0] > 1 ||
-                    distort.s[SBMAX_s-1][1] > 1 ||
-                    distort.s[SBMAX_s-1][2] > 1) break;
-            } else {
-                if (distort.l[SBMAX_l-1] > 1) break;
-            }
-        }
-
-        /* save data so we can restore this quantization later */    
-        if (better) {
-            copy = 1;
-            save_scalefac = *scalefac;
-            save_cod_info = *cod_info;
-            if (gfp->VBR == vbr_rh || gfp->VBR == vbr_mtrh) {
-                /* store for later reuse */
-                memcpy(save_xrpow, xrpow, sizeof(FLOAT8)*576);
-            }
-        }
-            
-        notdone = balance_noise (gfp, cod_info, scalefac, &distort, xrpow);
-        
-        if (notdone == 0) 
-            break;
-    }
-    while (1); /* main iteration loop, breaks adjusted */
-    
-    /*  finish up
-     */
-    if (copy) {
-        *cod_info = save_cod_info;
-        *scalefac = save_scalefac;
-        if (gfp->VBR == vbr_rh || gfp->VBR == vbr_mtrh)
-            /* restore for reuse on next try */
-            memcpy(xrpow, save_xrpow, sizeof(FLOAT8)*576);
-    }
-    cod_info->part2_3_length += cod_info->part2_length;
-    
-    assert (cod_info->global_gain < 256);
-    
-    return best_noise_info.over_count;
-}
-
-
-
-
-/************************************************************************
- *
- *      iteration_finish()                                                    
- *
- *  Robert Hegemann 2000-09-06
- *
- *  update reservoir status after FINAL quantization/bitrate 
- *
- *  rh 2000-09-06: it will not work with CBR due to the bitstream formatter
- *            you will get "Error: MAX_HEADER_BUF too small in bitstream.c"
- *
- ************************************************************************/
-
-static void 
-iteration_finish (
-    lame_internal_flags *gfc,
-    FLOAT8          xr      [2][2][576],
-    int             l3_enc  [2][2][576],
-    III_psy_ratio   ratio   [2][2],  
-    III_scalefac_t  scalefac[2][2],
-    const int       mean_bits )
-{
-    III_side_info_t *l3_side = &gfc->l3_side;
-    int gr, ch, i;
-    
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            gr_info *cod_info = &l3_side->gr[gr].ch[ch].tt;
-
-            /*  try some better scalefac storage
-             */
-            best_scalefac_store (gfc, gr, ch, l3_enc, l3_side, scalefac);
-            
-            /*  best huffman_divide may save some bits too
-             */
-            if (gfc->use_best_huffman == 1) 
-                best_huffman_divide (gfc, gr, ch, cod_info, l3_enc[gr][ch]);
-            
-            /*  update reservoir status after FINAL quantization/bitrate
-             */
-            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
-      
-            /*  set the sign of l3_enc from the sign of xr
-             */
-            for (i = 0; i < 576; i++) {
-                if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1; 
-            }
-        } /* for ch */
-    }    /* for gr */
-    
-    ResvFrameEnd (gfc, l3_side, mean_bits);
-}
-
-
-
-/*********************************************************************
- *
- *      VBR_encode_granule()
- *
- *  2000-09-04 Robert Hegemann
- *
- *********************************************************************/
- 
-static void
-VBR_encode_granule (
-          lame_global_flags *gfp,
-          gr_info        * const cod_info,
-          FLOAT8                 xr[576],     /* magnitudes of spectral values */
-    const III_psy_xmin   * const l3_xmin,     /* allowed distortion of the scalefactor */
-          III_scalefac_t * const scalefac,    /* scalefactors */
-          FLOAT8                 xrpow[576],  /* coloured magnitudes of spectral values */
-          int                    l3_enc[576], /* vector of quantized values ix(0..575) */
-    const int                    ch, 
-          int                    min_bits, 
-          int                    max_bits )
-{
-    //lame_internal_flags *gfc=gfp->internal_flags;
-    gr_info         bst_cod_info;
-    III_scalefac_t  bst_scalefac;
-    FLOAT8          bst_xrpow [576]; 
-    int             bst_l3_enc[576];
-    int Max_bits  = max_bits;
-    int real_bits = max_bits+1;
-    int this_bits = min_bits+(max_bits-min_bits)/2;
-    int dbits, over;
-      
-    assert(Max_bits <= MAX_BITS);
-  
-    bst_cod_info = *cod_info;
-    memset(&bst_scalefac, 0, sizeof(III_scalefac_t));
-    memcpy(&bst_xrpow, xrpow, sizeof(FLOAT8)*576);
-      
-    /*  search within round about 40 bits of optimal
-     */
-    do {
-        assert(this_bits >= min_bits);
-        assert(this_bits <= max_bits);
-
-        over = outer_loop ( gfp, cod_info, xr, l3_xmin, scalefac,
-                            xrpow, l3_enc, ch, this_bits );
-
-        /*  is quantization as good as we are looking for ?
-         *  in this case: is no scalefactor band distorted?
-         */
-        if (over <= 0) {
-            /*  now we know it can be done with "real_bits"
-             *  and maybe we can skip some iterations
-             */
-            real_bits = cod_info->part2_3_length;
-
-            /*  store best quantization so far
-             */
-            bst_cod_info = *cod_info;
-            bst_scalefac = *scalefac;
-            memcpy(bst_xrpow, xrpow, sizeof(FLOAT8)*576);
-            memcpy(bst_l3_enc, l3_enc, sizeof(int)*576);
-
-            /*  try with fewer bits
-             */
-            max_bits  = real_bits-32;
-            dbits     = max_bits-min_bits;
-            this_bits = min_bits+dbits/2;
-        } 
-        else {
-            /*  try with more bits
-             */
-            min_bits  = this_bits+32;
-            dbits     = max_bits-min_bits;
-            this_bits = min_bits+dbits/2;
-
-            if (dbits>8) {
-                /*  start again with best quantization so far
-                 */
-                *cod_info = bst_cod_info;
-                *scalefac = bst_scalefac;
-                memcpy(xrpow, bst_xrpow, sizeof(FLOAT8)*576);
-            }
-        }
-    } while (dbits>8);
-
-    if (real_bits <= Max_bits) {
-        /*  restore best quantization found
-         */
-        *cod_info = bst_cod_info;
-        *scalefac = bst_scalefac;
-        memcpy(l3_enc, bst_l3_enc, sizeof(int)*576);
-    }
-    assert(cod_info->part2_3_length <= Max_bits);
-}
-
-
-
-/************************************************************************
- *
- *      get_framebits()   
- *
- *  Robert Hegemann 2000-09-05
- *
- *  calculates
- *  * how many bits are available for analog silent granules
- *  * how many bits to use for the lowest allowed bitrate
- *  * how many bits each bitrate would provide
- *
- ************************************************************************/
-
-static void 
-get_framebits (
-    lame_global_flags *gfp,
-    int     * const analog_mean_bits,
-    int     * const min_mean_bits,
-    int             frameBits[15] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int bitsPerFrame, mean_bits, i;
-    III_side_info_t *l3_side = &gfc->l3_side;
-    
-    /*  always use at least this many bits per granule per channel 
-     *  unless we detect analog silence, see below 
-     */
-    gfc->bitrate_index = gfc->VBR_min_bitrate;
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    *min_mean_bits = mean_bits / gfc->channels_out;
-
-    /*  bits for analog silence 
-     */
-    gfc->bitrate_index = 1;
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    *analog_mean_bits = mean_bits / gfc->channels_out;
-
-    for (i = 1; i <= gfc->VBR_max_bitrate; i++) {
-        gfc->bitrate_index = i;
-        getframebits (gfp, &bitsPerFrame, &mean_bits);
-        frameBits[i] = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
-    }
-}
-
-
-
-/************************************************************************
- *
- *      calc_min_bits()   
- *
- *  Robert Hegemann 2000-09-04
- *
- *  determine minimal bit skeleton
- *
- ************************************************************************/
-inline
-static int 
-calc_min_bits (
-    lame_global_flags *gfp,
-    const gr_info * const cod_info,
-    const int             pe,
-    const FLOAT8          ms_ener_ratio, 
-    const int             bands,    
-    const int             mch_bits,
-    const int             analog_mean_bits,
-    const int             min_mean_bits,
-    const int             analog_silence,
-    const int             ch )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int min_bits, min_pe_bits;
-    
-    if (gfc->nsPsy.use) return 1;
-
-    /*  base amount of minimum bits
-     */
-    min_bits = Max (125, min_mean_bits);
-
-    if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1)  
-        min_bits = Max (min_bits, mch_bits/5);
-
-    /*  bit skeleton based on PE
-     */
-    if (cod_info->block_type == SHORT_TYPE) 
-        /*  if LAME switches to short blocks then pe is
-         *  >= 1000 on medium surge
-         *  >= 3000 on big surge
-         */
-        min_pe_bits = (pe-350) * bands/39;
-    else 
-        min_pe_bits = (pe-350) * bands/22;
-    
-    if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1) {
-        /*  side channel will use a lower bit skeleton based on PE
-         */ 
-        FLOAT8 fac  = .33 * (.5 - ms_ener_ratio) / .5;
-        min_pe_bits = (int)(min_pe_bits * ((1-fac)/(1+fac)));
-    }
-    min_pe_bits = Min (min_pe_bits, (1820 * gfp->out_samplerate / 44100));
-
-    /*  determine final minimum bits
-     */
-    if (analog_silence && !gfp->VBR_hard_min) 
-        min_bits = analog_mean_bits;
-    else 
-        min_bits = Max (min_bits, min_pe_bits);
-    
-    return min_bits;
-}
-
-
-
-/************************************************************************
- *
- *      calc_max_bits()   
- *
- *  Robert Hegemann 2000-09-05
- *
- *  determine maximal bit skeleton
- *
- ************************************************************************/
-inline
-static int 
-calc_max_bits (
-    const lame_internal_flags * const gfc,
-    const int             frameBits[15],
-    const int             min_bits )
-{
-    int max_bits;
-    
-    max_bits  = frameBits[gfc->VBR_max_bitrate];
-    max_bits /= gfc->channels_out * gfc->mode_gr;
-    max_bits  = Min (1200 + max_bits, MAX_BITS - 195 * (gfc->channels_out - 1));
-    max_bits  = Max (max_bits, min_bits);
-    
-    return max_bits;
-}
-
-
-
-/*********************************************************************
- *
- *      VBR_prepare()
- *
- *  2000-09-04 Robert Hegemann
- *
- *  * converts LR to MS coding when necessary 
- *  * calculates allowed/adjusted quantization noise amounts
- *  * detects analog silent frames
- *
- *  some remarks:
- *  - lower masking depending on Quality setting
- *  - quality control together with adjusted ATH MDCT scaling
- *    on lower quality setting allocate more noise from
- *    ATH masking, and on higher quality setting allocate
- *    less noise from ATH masking.
- *  - experiments show that going more than 2dB over GPSYCHO's
- *    limits ends up in very annoying artefacts
- *
- *********************************************************************/
-
-/* RH: this one needs to be overhauled sometime */
- 
-static int 
-VBR_prepare (
-          lame_global_flags *gfp,
-          FLOAT8          pe            [2][2],
-          FLOAT8          ms_ener_ratio [2], 
-          FLOAT8          xr            [2][2][576],
-          III_psy_ratio   ratio         [2][2], 
-          III_psy_xmin    l3_xmin       [2][2],
-          int             frameBits     [16],
-          int            *analog_mean_bits,
-          int            *min_mean_bits,
-          int             min_bits      [2][2],
-          int             max_bits      [2][2],
-          int             bands         [2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    static const FLOAT8 dbQ[10]={-2.,-1.0,-.66,-.33,0.,0.33,.66,1.0,1.33,1.66};
-    static const FLOAT8 dbQns[10]={- 4,- 3,-2,-1,0,0.7,1.4,2.1,2.8,3.5};
-    /*static const FLOAT8 atQns[10]={-16,-12,-8,-4,0,  1,  2,  3,  4,  5};*/
-    
-    static const FLOAT8 dbQmtrh[10]=
-        { -4., -3., -2., -1., 0., 0.5, 1., 1.5, 2., 2.5 };
-    
-    FLOAT8   masking_lower_db, adjust = 0.0;
-    int      gr, ch;
-    int      used_bits = 0, bits;
-    int      analog_silence = 1;
-  
-    assert( gfp->VBR_q <= 9 );
-    assert( gfp->VBR_q >= 0 );
-  
-    get_framebits (gfp, analog_mean_bits, min_mean_bits, frameBits);
-    
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        if (gfc->mode_ext == MPG_MD_MS_LR) 
-            ms_convert (xr[gr], xr[gr]); 
-    
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
-      
-            if (cod_info->block_type == SHORT_TYPE) 
-                adjust = 5/(1+exp(3.5-pe[gr][ch]/300.))-0.14;
-            else 
-                adjust = 2/(1+exp(3.5-pe[gr][ch]/300.))-0.05;
-      
-	    if (vbr_mtrh == gfp->VBR) {
-	        masking_lower_db   = dbQmtrh[gfp->VBR_q] - adjust; 
-            } 
-            else if (gfc->nsPsy.use && gfp->ATHtype == 0) {
-	        masking_lower_db   = dbQns[gfp->VBR_q] - adjust; 
-	    } 
-            else {
-	        masking_lower_db   = dbQ[gfp->VBR_q] - adjust; 
-	    }
-            gfc->masking_lower = pow (10.0, masking_lower_db * 0.1);
-      
-            bands[gr][ch] = calc_xmin (gfp, xr[gr][ch], ratio[gr]+ch, 
-                                       cod_info, l3_xmin[gr]+ch);
-            if (bands[gr][ch]) 
-                analog_silence = 0;
-                
-            
-            min_bits[gr][ch] = calc_min_bits (gfp, cod_info, (int)pe[gr][ch],
-                                      ms_ener_ratio[gr], bands[gr][ch],
-                                      0, *analog_mean_bits, 
-                                      *min_mean_bits, analog_silence, ch);
-      
-            max_bits[gr][ch] = calc_max_bits (gfc, frameBits, min_bits[gr][ch]); 
-            used_bits += min_bits[gr][ch];           
-    
-        } /* for ch */
-    }  /* for gr */
-    
-    *min_mean_bits = Max(125, *min_mean_bits);
-    bits = 0.8*frameBits[gfc->VBR_max_bitrate];
-    if (used_bits >= bits) 
-        for (gr = 0; gr < gfc->mode_gr; gr++) {
-            for (ch = 0; ch < gfc->channels_out; ch++) {
-                min_bits[gr][ch] *= bits;
-                min_bits[gr][ch] /= used_bits;
-                if (min_bits[gr][ch] < *min_mean_bits)
-                    min_bits[gr][ch] = *min_mean_bits;
-                max_bits[gr][ch] *= bits;
-                max_bits[gr][ch] /= used_bits;
-                if (max_bits[gr][ch] < *min_mean_bits)
-                    max_bits[gr][ch] = *min_mean_bits;
-            }
-        }
-    
-  
-    return analog_silence;
-}
- 
- 
-
-/************************************************************************
- *
- *      VBR_iteration_loop()   
- *
- *  tries to find out how many bits are needed for each granule and channel
- *  to get an acceptable quantization. An appropriate bitrate will then be
- *  choosed for quantization.  rh 8/99                          
- *
- *  Robert Hegemann 2000-09-06 rewrite
- *
- ************************************************************************/
-
-void 
-VBR_iteration_loop (
-    lame_global_flags *gfp,
-    FLOAT8             pe           [2][2],
-    FLOAT8             ms_ener_ratio[2], 
-    FLOAT8             xr           [2][2][576],
-    III_psy_ratio      ratio        [2][2], 
-    int                l3_enc       [2][2][576],
-    III_scalefac_t     scalefac     [2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_psy_xmin l3_xmin[2][2];
-  
-    FLOAT8    xrpow[576];
-    int       bands[2][2];
-    int       frameBits[15];
-    int       bitsPerFrame;
-    int       save_bits[2][2];
-    int       used_bits, used_bits2;
-    int       bits;
-    int       min_bits[2][2], max_bits[2][2];
-    int       analog_mean_bits, min_mean_bits;
-    int       mean_bits;
-    int       ch, num_chan, gr, analog_silence;
-    int       reduce_s_ch, sfb21_extra;
-    gr_info             *cod_info;
-    III_side_info_t     *l3_side  = &gfc->l3_side;
-
-    if (gfc->mode_ext == MPG_MD_MS_LR && gfp->quality >= 5) {
-        /*  my experiences are, that side channel reduction  
-         *  does more harm than good when VBR encoding
-         *  ([email protected] 2000-02-18)
-         *  2000-09-06: code is enabled at quality level 5
-         */
-        reduce_s_ch = 1;
-        num_chan    = 1;
-    } else {
-        reduce_s_ch = 0;
-        num_chan    = gfc->channels_out;
-    }
-  
-    analog_silence = VBR_prepare (gfp, pe, ms_ener_ratio, xr, ratio, 
-                                  l3_xmin, frameBits, &analog_mean_bits,
-                                  &min_mean_bits, min_bits, max_bits, bands);
-  
-    /*---------------------------------*/
-    do {  
-    
-    /*  quantize granules with lowest possible number of bits
-     */
-    
-    used_bits = 0;
-    used_bits2 = 0;
-   
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch = 0; ch < num_chan; ch++) {
-            int ret; 
-            cod_info = &l3_side->gr[gr].ch[ch].tt;
-      
-            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
-             */
-            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
-				  xr[gr][ch], xrpow);
-            if (ret == 0) {
-                /*  xr contains no energy 
-                 *  l3_enc, our encoding data, will be quantized to zero
-                 */
-                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
-                save_bits[gr][ch] = 0;
-                continue; /* with next channel */
-            }
-#if 0
-            if (gfc->mode_ext == MPG_MD_MS_LR && ch == 1)  
-                min_bits[gr][ch] = Max (min_bits[gr][ch], save_bits[gr][0]/5);
-#endif
-      
-            if (gfp->VBR == vbr_mtrh) {
-                ret = VBR_noise_shaping2 (gfp, xr[gr][ch], xrpow, 
-                                        &ratio[gr][ch], l3_enc[gr][ch], 0, 
-                                        min_bits[gr][ch], max_bits[gr][ch], 
-                                        &scalefac[gr][ch],
-                                        &l3_xmin[gr][ch], gr, ch );
-                if (ret < 0)
-                    cod_info->part2_3_length = 100000;
-            } 
-            else
-                VBR_encode_granule (gfp, cod_info, xr[gr][ch], &l3_xmin[gr][ch],
-                                    &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
-                                    ch, min_bits[gr][ch], max_bits[gr][ch] );
-
-            used_bits += cod_info->part2_3_length;
-            save_bits[gr][ch] = Min(MAX_BITS, cod_info->part2_3_length);
-            used_bits2 += Min(MAX_BITS, cod_info->part2_3_length);
-        } /* for ch */
-    }    /* for gr */
-
-    /*  special on quality=5, we didn't quantize side channel above
-     */
-    if (reduce_s_ch) {
-        /*  number of bits needed was found for MID channel above.  Use formula
-         *  (fixed bitrate code) to set the side channel bits */
-        for (gr = 0; gr < gfc->mode_gr; gr++) {
-            FLOAT8 fac = .33*(.5-ms_ener_ratio[gr])/.5;
-            save_bits[gr][1] = (int)(((1-fac)/(1+fac)) * save_bits[gr][0]);
-            save_bits[gr][1] = Max (analog_mean_bits, save_bits[gr][1]);
-            used_bits += save_bits[gr][1];
-        }
-    }
-
-    /*  find lowest bitrate able to hold used bits
-     */
-    if (analog_silence && !gfp->VBR_hard_min) 
-        /*  we detected analog silence and the user did not specify 
-         *  any hard framesize limit, so start with smallest possible frame
-         */
-        gfc->bitrate_index = 1;
-    else
-        gfc->bitrate_index = gfc->VBR_min_bitrate;
-     
-    for( ; gfc->bitrate_index < gfc->VBR_max_bitrate; gfc->bitrate_index++) {
-        if (used_bits <= frameBits[gfc->bitrate_index]) break; 
-    }
-
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
-    
-    if (used_bits > bits){
-        //printf("# %d used %d have %d\n",gfp->frameNum,used_bits,bits);
-        if(gfp->VBR == vbr_mtrh) {        
-            for (gr = 0; gr < gfc->mode_gr; gr++) {
-                for (ch = 0; ch < gfc->channels_out; ch++) {
-                    max_bits[gr][ch] = save_bits[gr][ch];
-                    max_bits[gr][ch] *= frameBits[gfc->bitrate_index];
-                    max_bits[gr][ch] /= used_bits2;
-                    max_bits[gr][ch] = Max(min_bits[gr][ch],max_bits[gr][ch]);
-                }
-            }
-        }
-        else {
-            for (gr = 0; gr < gfc->mode_gr; gr++) {
-                for (ch = 0; ch < gfc->channels_out; ch++) {
-                    int sfb;
-                    cod_info = &l3_side->gr[gr].ch[ch].tt;
-                    if (cod_info->block_type == SHORT_TYPE) {
-                        for (sfb = 0; sfb < SBMAX_s; sfb++) {
-                            l3_xmin[gr][ch].s[sfb][0] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
-                            l3_xmin[gr][ch].s[sfb][1] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
-                            l3_xmin[gr][ch].s[sfb][2] *= 1.+.029*sfb*sfb/SBMAX_s/SBMAX_s;
-                        }
-                    }
-                    else {
-                        for (sfb = 0; sfb < SBMAX_l; sfb++) 
-                            l3_xmin[gr][ch].l[sfb] *= 1.+.029*sfb*sfb/SBMAX_l/SBMAX_l;
-                    }
-//                  min_bits[gr][ch] = Max(min_mean_bits, 0.9*min_bits[gr][ch]);
-                    max_bits[gr][ch] = Max(min_mean_bits, 0.9*max_bits[gr][ch]);
-                }
-            }
-        }
-    }
-
-    } while (used_bits > bits);
-    /*--------------------------------------*/
-    
-    /*  ignore sfb21 by the following (maybe) noise shaping  
-     */
-    sfb21_extra = gfc->sfb21_extra;
-    gfc->sfb21_extra = 0;     
-        
-    /*  quantize granules which violate bit constraints again
-     *  and side channel when in quality=5 reduce_side is used
-     */  
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            int ret;
-            cod_info = &l3_side->gr[gr].ch[ch].tt;
-      
-            if (used_bits <= bits && ! (reduce_s_ch && ch == 1))
-                /*  we have enough bits
-                 *  and have already encoded the side channel 
-                 */
-                continue; /* with next ch */
-            
-            if (used_bits > bits) {
-                /*  repartion available bits in same proportion
-                 */
-                save_bits[gr][ch] *= frameBits[gfc->bitrate_index];
-                save_bits[gr][ch] /= used_bits;
-            }
-            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
-             */
-            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
-				  xr[gr][ch], xrpow);
-            if (ret == 0) 
-            {
-                /*  xr contains no energy 
-                 *  l3_enc, our encoding data, will be quantized to zero
-                 */
-                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
-            }
-            else {
-                /*  xr contains energy we will have to encode 
-                 *  masking abilities were previously calculated
-                 *  find some good quantization in outer_loop 
-                 */
-                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin[gr][ch],
-                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch], ch,
-                            save_bits[gr][ch]);
-            }
-        } /* ch */
-    }  /* gr */
-    
-    gfc->sfb21_extra = sfb21_extra;
-
-    iteration_finish (gfc, xr, l3_enc, ratio, scalefac, mean_bits);
-}
-
-
-
-
-
-
-/********************************************************************
- *
- *  calc_target_bits()
- *
- *  calculates target bits for ABR encoding
- *
- *  mt 2000/05/31
- *
- ********************************************************************/
-
-static void 
-calc_target_bits (
-    lame_global_flags * gfp,
-    FLOAT8               pe            [2][2],
-    FLOAT8               ms_ener_ratio [2],
-    int                  targ_bits     [2][2],
-    int                 *analog_silence_bits,
-    int                 *max_frame_bits )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_side_info_t *l3_side = &gfc->l3_side;
-    FLOAT8 res_factor;
-    int gr, ch, totbits, mean_bits, bitsPerFrame;
-    
-    gfc->bitrate_index = gfc->VBR_max_bitrate;
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    *max_frame_bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
-
-    gfc->bitrate_index = 1;
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    *analog_silence_bits = mean_bits / gfc->channels_out;
-
-    mean_bits  = gfp->VBR_mean_bitrate_kbps * gfp->framesize * 1000;
-    mean_bits /= gfp->out_samplerate;
-    mean_bits -= gfc->sideinfo_len*8;
-    mean_bits /= gfc->mode_gr;
-
-    res_factor = .90 + .10 * (11.0 - gfp->compression_ratio) / (11.0 - 5.5);
-    if (res_factor <  .90)
-        res_factor =  .90; 
-    if (res_factor > 1.00) 
-        res_factor = 1.00;
-
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            targ_bits[gr][ch] = res_factor * (mean_bits / gfc->channels_out);
-            
-            if (pe[gr][ch] > 700) {
-                int add_bits = (pe[gr][ch] - 700) / 1.4;
-  
-                gr_info *cod_info = &l3_side->gr[gr].ch[ch].tt;
-                targ_bits[gr][ch] = res_factor * (mean_bits / gfc->channels_out);
- 
-                /* short blocks use a little extra, no matter what the pe */
-                if (cod_info->block_type == SHORT_TYPE) {
-                    if (add_bits < mean_bits/4) 
-                        add_bits = mean_bits/4; 
-                }
-                /* at most increase bits by 1.5*average */
-                if (add_bits > mean_bits*3/4)
-                    add_bits = mean_bits*3/4;
-                else
-                if (add_bits < 0) 
-                    add_bits = 0;
-
-                targ_bits[gr][ch] += add_bits;
-            }
-        }/* for ch */
-    }   /* for gr */
-    
-    if (gfc->mode_ext == MPG_MD_MS_LR) 
-        for (gr = 0; gr < gfc->mode_gr; gr++) {
-            reduce_side (targ_bits[gr], ms_ener_ratio[gr], mean_bits,
-			 MAX_BITS);
-        }
-
-    /*  sum target bits
-     */
-    totbits=0;
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            if (targ_bits[gr][ch] > MAX_BITS) 
-                targ_bits[gr][ch] = MAX_BITS;
-            totbits += targ_bits[gr][ch];
-        }
-    }
-
-    /*  repartion target bits if needed
-     */
-    if (totbits > *max_frame_bits) {
-        for(gr = 0; gr < gfc->mode_gr; gr++) {
-            for(ch = 0; ch < gfc->channels_out; ch++) {
-                targ_bits[gr][ch] *= *max_frame_bits; 
-                targ_bits[gr][ch] /= totbits; 
-            }
-        }
-    }
-}
-
-
-
-
-
-
-/********************************************************************
- *
- *  ABR_iteration_loop()
- *
- *  encode a frame with a disired average bitrate
- *
- *  mt 2000/05/31
- *
- ********************************************************************/
-
-void 
-ABR_iteration_loop(
-    lame_global_flags *gfp,
-    FLOAT8             pe           [2][2],
-    FLOAT8             ms_ener_ratio[2], 
-    FLOAT8             xr           [2][2][576],
-    III_psy_ratio      ratio        [2][2], 
-    int                l3_enc       [2][2][576],
-    III_scalefac_t     scalefac     [2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_psy_xmin l3_xmin;
-    FLOAT8    xrpow[576];
-    int       targ_bits[2][2];
-    int       bitsPerFrame, mean_bits, totbits, max_frame_bits;
-    int       ch, gr, ath_over, ret;
-    int       analog_silence_bits;
-    gr_info             *cod_info = NULL;
-    III_side_info_t     *l3_side  = &gfc->l3_side;
-
-    calc_target_bits (gfp, pe, ms_ener_ratio, targ_bits, 
-                      &analog_silence_bits, &max_frame_bits);
-    
-    /*  encode granules
-     */
-    totbits=0;
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-
-        if (gfc->mode_ext == MPG_MD_MS_LR) 
-            ms_convert (xr[gr], xr[gr]);
-
-        for (ch = 0; ch < gfc->channels_out; ch++) {
-            cod_info = &l3_side->gr[gr].ch[ch].tt;
-
-            /*  cod_info, scalefac and xrpow get initialized in init_outer_loop
-             */
-            ret = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
-				  xr[gr][ch], xrpow);
-            if (ret == 0) {
-                /*  xr contains no energy 
-                 *  l3_enc, our encoding data, will be quantized to zero
-                 */
-                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
-            } 
-            else {
-                /*  xr contains energy we will have to encode 
-                 *  calculate the masking abilities
-                 *  find some good quantization in outer_loop 
-                 */
-                ath_over = calc_xmin (gfp, xr[gr][ch], &ratio[gr][ch],
-                                      cod_info, &l3_xmin);
-                if (0 == ath_over) /* analog silence */
-                    targ_bits[gr][ch] = analog_silence_bits;
-
-                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin,
-                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
-                            ch, targ_bits[gr][ch]);
-            }
-
-            totbits += cod_info->part2_3_length;
-        } /* ch */
-    }  /* gr */
-  
-    /*  find a bitrate which can handle totbits 
-     */
-    for (gfc->bitrate_index =  gfc->VBR_min_bitrate ;
-         gfc->bitrate_index <= gfc->VBR_max_bitrate;
-         gfc->bitrate_index++    ) {
-        getframebits (gfp, &bitsPerFrame, &mean_bits);
-        max_frame_bits = ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame);
-        if (totbits <= max_frame_bits) break; 
-    }
-    assert (gfc->bitrate_index <= gfc->VBR_max_bitrate);
-
-    iteration_finish (gfc, xr, l3_enc, ratio, scalefac, mean_bits);
-}
-
-
-
-
-
-
-/************************************************************************
- *
- *      iteration_loop()                                                    
- *
- *  author/date??
- *
- *  encodes one frame of MP3 data with constant bitrate
- *
- ************************************************************************/
-
-void 
-iteration_loop(
-    lame_global_flags *gfp, 
-    FLOAT8             pe           [2][2],
-    FLOAT8             ms_ener_ratio[2],  
-    FLOAT8             xr           [2][2][576],
-    III_psy_ratio      ratio        [2][2],  
-    int                l3_enc       [2][2][576],
-    III_scalefac_t     scalefac     [2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_psy_xmin l3_xmin[2];
-    FLOAT8 xrpow[576];
-    int    targ_bits[2];
-    int    bitsPerFrame;
-    int    mean_bits, max_bits, bit_rate;
-    int    gr, ch, i;
-    III_side_info_t     *l3_side = &gfc->l3_side;
-    gr_info             *cod_info;
-
-    bit_rate = bitrate_table [gfp->version] [gfc->bitrate_index];
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    ResvFrameBegin (gfp, l3_side, mean_bits, bitsPerFrame );
-
-    /* quantize! */
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-
-        /*  calculate needed bits
-         */
-        max_bits = on_pe (gfp, pe, l3_side, targ_bits, mean_bits, gr);
-        
-        if (gfc->mode_ext == MPG_MD_MS_LR) {
-            ms_convert (xr[gr], xr[gr]);
-            reduce_side (targ_bits, ms_ener_ratio[gr], mean_bits, max_bits);
-        }
-        
-        for (ch=0 ; ch < gfc->channels_out ; ch ++) {
-            cod_info = &l3_side->gr[gr].ch[ch].tt; 
-
-            /*  init_outer_loop sets up cod_info, scalefac and xrpow 
-             */
-            i = init_outer_loop(cod_info, &scalefac[gr][ch], gfc->is_mpeg1,
-				xr[gr][ch], xrpow);
-            if (i == 0) {
-                /*  xr contains no energy, l3_enc will be quantized to zero
-                 */
-                memset(l3_enc[gr][ch], 0, sizeof(int)*576);
-            }
-            else {
-                /*  xr contains energy we will have to encode 
-                 *  calculate the masking abilities
-                 *  find some good quantization in outer_loop 
-                 */
-                calc_xmin (gfp, xr[gr][ch], &ratio[gr][ch], cod_info, 
-                           &l3_xmin[ch]);
-                outer_loop (gfp, cod_info, xr[gr][ch], &l3_xmin[ch], 
-                            &scalefac[gr][ch], xrpow, l3_enc[gr][ch],
-                            ch, targ_bits[ch]);
-            }
-            assert (cod_info->part2_3_length <= MAX_BITS);
-
-            /*  try some better scalefac storage
-             */
-            best_scalefac_store (gfc, gr, ch, l3_enc, l3_side, scalefac);
-            
-            /*  best huffman_divide may save some bits too
-             */
-            if (gfc->use_best_huffman == 1) 
-                best_huffman_divide (gfc, gr, ch, cod_info, l3_enc[gr][ch]);
-            
-            /*  update reservoir status after FINAL quantization/bitrate
-             */
-#undef  NORES_TEST
-#ifndef NORES_TEST
-            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
-#endif      
-            /*  set the sign of l3_enc from the sign of xr
-             */
-            for (i = 0; i < 576; i++) {
-                if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1; 
-            }
-        } /* for ch */
-    }    /* for gr */
-    
-#ifdef NORES_TEST
-    /* replace ResvAdjust above with this code if you do not want
-       the second granule to use bits saved by the first granule.
-       Requires using the --nores.  This is useful for testing only */
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-        for (ch =  0; ch < gfc->channels_out; ch++) {
-            cod_info = &l3_side->gr[gr].ch[ch].tt;
-            ResvAdjust (gfc, cod_info, l3_side, mean_bits);
-        }
-    }
-#endif
-
-    ResvFrameEnd (gfc, l3_side, mean_bits);
-}
-
-
-
--- a/sys/src/games/mp3enc/quantize.h
+++ /dev/null
@@ -1,76 +1,0 @@
-/*
- * MP3 quantization
- *
- * Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_QUANTIZE_H
-#define LAME_QUANTIZE_H
-
-#include "util.h"
-/*#include "l3side.h"
-*/
-void iteration_loop( lame_global_flags *gfp,
-                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
-		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
-		     int l3_enc[2][2][576], 
-		     III_scalefac_t scalefac[2][2]);
-
-void VBR_iteration_loop( lame_global_flags *gfp,
-                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
-		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
-		     int l3_enc[2][2][576], 
-		     III_scalefac_t scalefac[2][2]);
-
-void ABR_iteration_loop( lame_global_flags *gfp,
-                     FLOAT8 pe[2][2], FLOAT8 ms_ratio[2], 
-		     FLOAT8 xr_org[2][2][576], III_psy_ratio ratio[2][2],
-		     int l3_enc[2][2][576], 
-		     III_scalefac_t scalefac[2][2]);
-
-/*
- *  vbrquantize.c
- */
-
-void VBR_quantize( 
-                    lame_global_flags      *gfp,
-		    FLOAT8         pe[2][2], 
-                    FLOAT8         ms_ener_ratio[2],
-		    FLOAT8         xr[2][2][576], 
-                    III_psy_ratio  ratio[2][2],
-		    int            l3_enc[2][2][576],
-		    III_scalefac_t scalefac[2][2]);
-
-
-    /*  used by VBR_iteration_loop() */ 
-
-int VBR_noise_shaping2(
-                    lame_global_flags        *gfp,
-                    FLOAT8           xr       [576], 
-                    FLOAT8           xr34orig [576], 
-                    III_psy_ratio  * ratio,
-                    int              l3_enc   [576], 
-                    int              digital_silence, 
-                    int              minbits, 
-                    int              maxbits,
-                    III_scalefac_t * scalefac, 
-                    III_psy_xmin   * l3_xmin,
-                    int              gr,
-                    int              ch );
-
-#endif /* LAME_QUANTIZE_H */
--- a/sys/src/games/mp3enc/quantize_pvt.c
+++ /dev/null
@@ -1,1171 +1,0 @@
-/*
- *	quantize_pvt source file
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: quantize_pvt.c,v 1.55 2001/03/05 20:29:24 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include "util.h"
-#include "lame-analysis.h"
-#include "tables.h"
-#include "reservoir.h"
-#include "quantize_pvt.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-#define NSATHSCALE 100 // Assuming dynamic range=96dB, this value should be 92
-
-const char  slen1_tab [16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };
-const char  slen2_tab [16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };
-
-
-/*
-  The following table is used to implement the scalefactor
-  partitioning for MPEG2 as described in section
-  2.4.3.2 of the IS. The indexing corresponds to the
-  way the tables are presented in the IS:
-
-  [table_number][row_in_table][column of nr_of_sfb]
-*/
-const int  nr_of_sfb_block [6] [3] [4] =
-{
-  {
-    {6, 5, 5, 5},
-    {9, 9, 9, 9},
-    {6, 9, 9, 9}
-  },
-  {
-    {6, 5, 7, 3},
-    {9, 9, 12, 6},
-    {6, 9, 12, 6}
-  },
-  {
-    {11, 10, 0, 0},
-    {18, 18, 0, 0},
-    {15,18,0,0}
-  },
-  {
-    {7, 7, 7, 0},
-    {12, 12, 12, 0},
-    {6, 15, 12, 0}
-  },
-  {
-    {6, 6, 6, 3},
-    {12, 9, 9, 6},
-    {6, 12, 9, 6}
-  },
-  {
-    {8, 8, 5, 0},
-    {15,12,9,0},
-    {6,18,9,0}
-  }
-};
-
-
-/* Table B.6: layer3 preemphasis */
-const char  pretab [SBMAX_l] =
-{
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0
-};
-
-/*
-  Here are MPEG1 Table B.8 and MPEG2 Table B.1
-  -- Layer III scalefactor bands. 
-  Index into this using a method such as:
-    idx  = fr_ps->header->sampling_frequency
-           + (fr_ps->header->version * 3)
-*/
-
-
-const scalefac_struct sfBandIndex[9] =
-{
-  { /* Table B.2.b: 22.05 kHz */
-    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
-    {0,4,8,12,18,24,32,42,56,74,100,132,174,192}
-  },
-  { /* Table B.2.c: 24 kHz */                 /* docs: 332. mpg123(broken): 330 */
-    {0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278, 332, 394,464,540,576},
-    {0,4,8,12,18,26,36,48,62,80,104,136,180,192}
-  },
-  { /* Table B.2.a: 16 kHz */
-    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
-    {0,4,8,12,18,26,36,48,62,80,104,134,174,192}
-  },
-  { /* Table B.8.b: 44.1 kHz */
-    {0,4,8,12,16,20,24,30,36,44,52,62,74,90,110,134,162,196,238,288,342,418,576},
-    {0,4,8,12,16,22,30,40,52,66,84,106,136,192}
-  },
-  { /* Table B.8.c: 48 kHz */
-    {0,4,8,12,16,20,24,30,36,42,50,60,72,88,106,128,156,190,230,276,330,384,576},
-    {0,4,8,12,16,22,28,38,50,64,80,100,126,192}
-  },
-  { /* Table B.8.a: 32 kHz */
-    {0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576},
-    {0,4,8,12,16,22,30,42,58,78,104,138,180,192}
-  },
-  { /* MPEG-2.5 11.025 kHz */
-    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
-    {0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3}
-  },
-  { /* MPEG-2.5 12 kHz */
-    {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
-    {0/3,12/3,24/3,36/3,54/3,78/3,108/3,144/3,186/3,240/3,312/3,402/3,522/3,576/3}
-  },
-  { /* MPEG-2.5 8 kHz */
-    {0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576},
-    {0/3,24/3,48/3,72/3,108/3,156/3,216/3,288/3,372/3,480/3,486/3,492/3,498/3,576/3}
-  }
-};
-
-
-
-FLOAT8 pow20[Q_MAX];
-FLOAT8 ipow20[Q_MAX];
-FLOAT8 pow43[PRECALC_SIZE];
-/* initialized in first call to iteration_init */
-FLOAT8 adj43asm[PRECALC_SIZE];
-FLOAT8 adj43[PRECALC_SIZE];
-
-/************************************************************************/
-/*  initialization for iteration_loop */
-/************************************************************************/
-void
-iteration_init( lame_global_flags *gfp)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  III_side_info_t * const l3_side = &gfc->l3_side;
-  int i;
-
-  if ( gfc->iteration_init_init==0 ) {
-    gfc->iteration_init_init=1;
-
-    l3_side->main_data_begin = 0;
-    compute_ath(gfp,gfc->ATH->l,gfc->ATH->s);
-
-    pow43[0] = 0.0;
-    for(i=1;i<PRECALC_SIZE;i++)
-        pow43[i] = pow((FLOAT8)i, 4.0/3.0);
-
-    adj43asm[0] = 0.0;
-    for (i = 1; i < PRECALC_SIZE; i++)
-      adj43asm[i] = i - 0.5 - pow(0.5 * (pow43[i - 1] + pow43[i]),0.75);
-    for (i = 0; i < PRECALC_SIZE-1; i++)
-	adj43[i] = (i + 1) - pow(0.5 * (pow43[i] + pow43[i + 1]), 0.75);
-    adj43[i] = 0.5;
-    for (i = 0; i < Q_MAX; i++) {
-	ipow20[i] = pow(2.0, (double)(i - 210) * -0.1875);
-	pow20[i] = pow(2.0, (double)(i - 210) * 0.25);
-    }
-    huffman_init(gfc);
-  }
-}
-
-
-
-
-
-/* 
-compute the ATH for each scalefactor band 
-cd range:  0..96db
-
-Input:  3.3kHz signal  32767 amplitude  (3.3kHz is where ATH is smallest = -5db)
-longblocks:  sfb=12   en0/bw=-11db    max_en0 = 1.3db
-shortblocks: sfb=5           -9db              0db
-
-Input:  1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated)
-longblocks:  amp=1      sfb=12   en0/bw=-103 db      max_en0 = -92db
-            amp=32767   sfb=12           -12 db                 -1.4db 
-
-Input:  1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated)
-shortblocks: amp=1      sfb=5   en0/bw= -99                    -86 
-            amp=32767   sfb=5           -9  db                  4db 
-
-
-MAX energy of largest wave at 3.3kHz = 1db
-AVE energy of largest wave at 3.3kHz = -11db
-Let's take AVE:  -11db = maximum signal in sfb=12.  
-Dynamic range of CD: 96db.  Therefor energy of smallest audible wave 
-in sfb=12  = -11  - 96 = -107db = ATH at 3.3kHz.  
-
-ATH formula for this wave: -5db.  To adjust to LAME scaling, we need
-ATH = ATH_formula  - 103  (db)
-ATH = ATH * 2.5e-10      (ener)
-
-*/
-
-FLOAT8 ATHmdct( lame_global_flags *gfp, FLOAT8 f )
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    FLOAT8 ath;
-  
-    ath = ATHformula( f , gfp );
-	  
-    if (gfc->nsPsy.use) {
-        ath -= NSATHSCALE;
-    } else {
-        ath -= 114;
-    }
-    
-    /*  modify the MDCT scaling for the ATH  */
-    ath -= gfp->ATHlower;
-
-    /* convert to energy */
-    ath = pow( 10.0, ath/10.0 );
-    return ath;
-}
- 
-
-void compute_ath( lame_global_flags *gfp, FLOAT8 ATH_l[], FLOAT8 ATH_s[] )
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int sfb, i, start, end;
-    FLOAT8 ATH_f;
-    FLOAT8 samp_freq = gfp->out_samplerate;
-
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        start = gfc->scalefac_band.l[ sfb ];
-        end   = gfc->scalefac_band.l[ sfb+1 ];
-        ATH_l[sfb]=1e99;
-        for (i = start ; i < end; i++) {
-            FLOAT8 freq = i*samp_freq/(2*576);
-            ATH_f = ATHmdct( gfp, freq );  /* freq in kHz */
-            ATH_l[sfb] = Min( ATH_l[sfb], ATH_f );
-        }
-
-    }
-
-    for (sfb = 0; sfb < SBMAX_s; sfb++){
-        start = gfc->scalefac_band.s[ sfb ];
-        end   = gfc->scalefac_band.s[ sfb+1 ];
-        ATH_s[sfb] = 1e99;
-        for (i = start ; i < end; i++) {
-            FLOAT8 freq = i*samp_freq/(2*192);
-            ATH_f = ATHmdct( gfp, freq );    /* freq in kHz */
-            ATH_s[sfb] = Min( ATH_s[sfb], ATH_f );
-        }
-    }
-
-    /*  no-ATH mode:
-     *  reduce ATH to -200 dB
-     */
-    
-    if (gfp->noATH) {
-        for (sfb = 0; sfb < SBMAX_l; sfb++) {
-            ATH_l[sfb] = 1E-37;
-        }
-        for (sfb = 0; sfb < SBMAX_s; sfb++) {
-            ATH_s[sfb] = 1E-37;
-        }
-    }
-}
-
-
-
-
-
-/* convert from L/R <-> Mid/Side, src == dst allowed */
-void ms_convert(FLOAT8 dst[2][576], FLOAT8 src[2][576])
-{
-    FLOAT8 l;
-    FLOAT8 r;
-    int i;
-    for (i = 0; i < 576; ++i) {
-        l = src[0][i];
-        r = src[1][i];
-        dst[0][i] = (l+r) * (FLOAT8)(SQRT2*0.5);
-        dst[1][i] = (l-r) * (FLOAT8)(SQRT2*0.5);
-    }
-}
-
-
-
-/************************************************************************
- * allocate bits among 2 channels based on PE
- * mt 6/99
- ************************************************************************/
-int on_pe(lame_global_flags *gfp,FLOAT8 pe[2][2],III_side_info_t *l3_side,
-int targ_bits[2],int mean_bits, int gr)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  gr_info *cod_info;
-  int extra_bits,tbits,bits;
-  int add_bits[2]; 
-  int ch;
-  int max_bits;  /* maximum allowed bits for this granule */
-
-  /* allocate targ_bits for granule */
-  ResvMaxBits (gfp, mean_bits, &tbits, &extra_bits);
-  max_bits=tbits+extra_bits;
-
-  bits=0;
-
-  for (ch=0 ; ch < gfc->channels_out ; ch ++) {
-    /******************************************************************
-     * allocate bits for each channel 
-     ******************************************************************/
-    cod_info = &l3_side->gr[gr].ch[ch].tt;
-    
-    targ_bits[ch]=Min(MAX_BITS, tbits/gfc->channels_out);
-    
-    if (gfc->nsPsy.use) {
-      add_bits[ch] = targ_bits[ch]*pe[gr][ch]/700.0-targ_bits[ch];
-    } else {
-      add_bits[ch]=(pe[gr][ch]-750)/1.4;
-      /* short blocks us a little extra, no matter what the pe */
-      if (cod_info->block_type==SHORT_TYPE) {
-	if (add_bits[ch]<mean_bits/4) add_bits[ch]=mean_bits/4;
-      }
-
-      /* at most increase bits by 1.5*average */
-      if (add_bits[ch] > .75*mean_bits) add_bits[ch]=mean_bits*.75;
-      if (add_bits[ch] < 0) add_bits[ch]=0;
-
-      if ((targ_bits[ch]+add_bits[ch]) > MAX_BITS) 
-	add_bits[ch]=Max(0, MAX_BITS-targ_bits[ch]);
-    }
-
-    bits += add_bits[ch];
-  }
-  if (bits > extra_bits)
-    for (ch=0 ; ch < gfc->channels_out ; ch ++) {
-      add_bits[ch] = (extra_bits*add_bits[ch])/bits;
-    }
-
-  for (ch=0 ; ch < gfc->channels_out ; ch ++) {
-    targ_bits[ch] = targ_bits[ch] + add_bits[ch];
-    extra_bits -= add_bits[ch];
-  }
-  return max_bits;
-}
-
-
-
-
-void reduce_side(int targ_bits[2],FLOAT8 ms_ener_ratio,int mean_bits,int max_bits)
-{
-  int move_bits;
-  FLOAT fac;
-
-
-  /*  ms_ener_ratio = 0:  allocate 66/33  mid/side  fac=.33  
-   *  ms_ener_ratio =.5:  allocate 50/50 mid/side   fac= 0 */
-  /* 75/25 split is fac=.5 */
-  /* float fac = .50*(.5-ms_ener_ratio[gr])/.5;*/
-  fac = .33*(.5-ms_ener_ratio)/.5;
-  if (fac<0) fac=0;
-  if (fac>.5) fac=.5;
-  
-    /* number of bits to move from side channel to mid channel */
-    /*    move_bits = fac*targ_bits[1];  */
-    move_bits = fac*.5*(targ_bits[0]+targ_bits[1]);  
-
-    if (move_bits > MAX_BITS - targ_bits[0]) {
-        move_bits = MAX_BITS - targ_bits[0];
-    }
-    if (move_bits<0) move_bits=0;
-    
-    if (targ_bits[1] >= 125) {
-      /* dont reduce side channel below 125 bits */
-      if (targ_bits[1]-move_bits > 125) {
-
-	/* if mid channel already has 2x more than average, dont bother */
-	/* mean_bits = bits per granule (for both channels) */
-	if (targ_bits[0] < mean_bits)
-	  targ_bits[0] += move_bits;
-	targ_bits[1] -= move_bits;
-      } else {
-	targ_bits[0] += targ_bits[1] - 125;
-	targ_bits[1] = 125;
-      }
-    }
-    
-    move_bits=targ_bits[0]+targ_bits[1];
-    if (move_bits > max_bits) {
-      targ_bits[0]=(max_bits*targ_bits[0])/move_bits;
-      targ_bits[1]=(max_bits*targ_bits[1])/move_bits;
-    }
-}
-
-#if 0
-FLOAT8 dreinorm (FLOAT8 a, FLOAT8 b, FLOAT8 c)
-{
-    return pow(pow(a,3.)+pow(b,3.)+pow(c,3.),1./3.);
-}
-#endif
-
-/*************************************************************************/
-/*            calc_xmin                                                  */
-/*************************************************************************/
-
-/*
-  Calculate the allowed distortion for each scalefactor band,
-  as determined by the psychoacoustic model.
-  xmin(sb) = ratio(sb) * en(sb) / bw(sb)
-
-  returns number of sfb's with energy > ATH
-*/
-int calc_xmin( 
-        lame_global_flags *gfp,
-        const FLOAT8                xr [576],
-        const III_psy_ratio * const ratio,
-	const gr_info       * const cod_info, 
-              III_psy_xmin  * const l3_xmin ) 
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int sfb,j,start, end, bw,l, b, ath_over=0;
-  FLOAT8 en0, xmin, ener;
-
-  if (cod_info->block_type==SHORT_TYPE) {
-
-  for ( j=0, sfb = 0; sfb < SBMAX_s; sfb++ ) {
-    start = gfc->scalefac_band.s[ sfb ];
-    end   = gfc->scalefac_band.s[ sfb + 1 ];
-    bw = end - start;
-    for ( b = 0; b < 3; b++ ) {
-      for (en0 = 0.0, l = start; l < end; l++) {
-        ener = xr[j++];
-        ener = ener * ener;
-        en0 += ener;
-      }
-      en0 /= bw;
-      
-      if (gfp->ATHonly || gfp->ATHshort) {
-        xmin = gfc->ATH->adjust * gfc->ATH->s[sfb];
-      } else {
-        xmin = ratio->en.s[sfb][b];
-        if (xmin > 0.0)
-          xmin = en0 * ratio->thm.s[sfb][b] * gfc->masking_lower / xmin;
-        xmin = Max(gfc->ATH->adjust * gfc->ATH->s[sfb], xmin);
-      }
-      l3_xmin->s[sfb][b] = xmin * bw;
-
-      if (gfc->nsPsy.use) {
-	if (sfb <= 5) {
-	  l3_xmin->s[sfb][b] *= gfc->nsPsy.bass;
-	} else if (sfb <= 10) {
-	  l3_xmin->s[sfb][b] *= gfc->nsPsy.alto;
-	} else {
-	  l3_xmin->s[sfb][b] *= gfc->nsPsy.treble;
-	}
-      }
-
-      if (en0 > gfc->ATH->adjust * gfc->ATH->s[sfb]) ath_over++;
-      if (gfc->nsPsy.use && (gfp->VBR == vbr_off || gfp->VBR == vbr_abr) && gfp->quality <= 1)
-        l3_xmin->s[sfb][b] *= 0.001;
-    }
-  }
-
-  if (gfp->useTemporal) {
-    for (sfb = 0; sfb < SBMAX_s; sfb++ ) {
-      for ( b = 1; b < 3; b++ ) {
-        xmin = l3_xmin->s[sfb][b] * (1.0 - gfc->decay)
-	  +  l3_xmin->s[sfb][b-1] * gfc->decay;
-	if (l3_xmin->s[sfb][b] < xmin)
-	    l3_xmin->s[sfb][b] = xmin;
-      }
-    }
-  }
-
-  }else{
-    if (gfc->nsPsy.use) {
-      for ( sfb = 0; sfb < SBMAX_l; sfb++ ){
-	start = gfc->scalefac_band.l[ sfb ];
-	end   = gfc->scalefac_band.l[ sfb+1 ];
-    
-	for (en0 = 0.0, l = start; l < end; l++ ) {
-	  ener = xr[l] * xr[l];
-	  en0 += ener;
-	}
-    
-	if (gfp->ATHonly) {
-	  xmin=gfc->ATH->adjust * gfc->ATH->l[sfb];
-	} else {
-	  xmin = ratio->en.l[sfb];
-	  if (xmin > 0.0)
-	    xmin = en0 * ratio->thm.l[sfb] * gfc->masking_lower / xmin;
-          xmin=Max(gfc->ATH->adjust * gfc->ATH->l[sfb], xmin);
-	}
-	l3_xmin->l[sfb]=xmin;
-
-	if (sfb <= 6) {
-	  l3_xmin->l[sfb] *= gfc->nsPsy.bass;
-	} else if (sfb <= 13) {
-	  l3_xmin->l[sfb] *= gfc->nsPsy.alto;
-	} else {
-	  l3_xmin->l[sfb] *= gfc->nsPsy.treble;
-	}
-
-	if (en0 > gfc->ATH->adjust * gfc->ATH->l[sfb]) ath_over++;
-	if ((gfp->VBR == vbr_off || gfp->VBR == vbr_abr) && gfp->quality <= 1)
-          l3_xmin->l[sfb] *= 0.001;
-      }
-    } else {
-      for ( sfb = 0; sfb < SBMAX_l; sfb++ ){
-	start = gfc->scalefac_band.l[ sfb ];
-	end   = gfc->scalefac_band.l[ sfb+1 ];
-	bw = end - start;
-    
-	for (en0 = 0.0, l = start; l < end; l++ ) {
-	  ener = xr[l] * xr[l];
-	  en0 += ener;
-	}
-	en0 /= bw;
-    
-	if (gfp->ATHonly) {
-	  xmin=gfc->ATH->adjust * gfc->ATH->l[sfb];
-	} else {
-	  xmin = ratio->en.l[sfb];
-	  if (xmin > 0.0)
-	    xmin = en0 * ratio->thm.l[sfb] * gfc->masking_lower / xmin;
-          xmin=Max(gfc->ATH->adjust * gfc->ATH->l[sfb], xmin);
-	}
-	l3_xmin->l[sfb]=xmin*bw;
-	
-        if (en0 > gfc->ATH->adjust * gfc->ATH->l[sfb]) ath_over++;
-      }
-    }
-  }
-  return ath_over;
-}
-
-/*************************************************************************/
-/*            calc_noise                                                 */
-/*************************************************************************/
-
-// -oo dB  =>  -1.00
-// - 6 dB  =>  -0.97
-// - 3 dB  =>  -0.80
-// - 2 dB  =>  -0.64
-// - 1 dB  =>  -0.38
-//   0 dB  =>   0.00
-// + 1 dB  =>  +0.49
-// + 2 dB  =>  +1.06
-// + 3 dB  =>  +1.68
-// + 6 dB  =>  +3.69
-// +10 dB  =>  +6.45
-
-double penalties ( double noise )
-{
-    return log ( 0.368 + 0.632 * noise * noise * noise );
-}
-
-/*  mt 5/99:  Function: Improved calc_noise for a single channel   */
-
-int  calc_noise( 
-        const lame_internal_flags           * const gfc,
-        const FLOAT8                    xr [576],
-        const int                       ix [576],
-        const gr_info           * const cod_info,
-        const III_psy_xmin      * const l3_xmin, 
-        const III_scalefac_t    * const scalefac,
-              III_psy_xmin      * xfsf,
-              calc_noise_result * const res )
-{
-  int sfb,start, end, j,l, i, over=0;
-  FLOAT8 sum;
-  
-  int count=0;
-  FLOAT8 noise,noise_db;
-  FLOAT8 over_noise = 1;     /*    0 dB relative to masking */
-  FLOAT8 over_noise_db = 0;
-  FLOAT8 tot_noise  = 1;     /*    0 dB relative to masking */
-  FLOAT8 tot_noise_db  = 0;     /*    0 dB relative to masking */
-  FLOAT8 max_noise  = 1E-20; /* -200 dB relative to masking */
-  double klemm_noise = 1E-37;
-
-  if (cod_info->block_type == SHORT_TYPE) {
-    int max_index = gfc->sfb21_extra ? SBMAX_s : SBPSY_s;
-
-    for ( j=0, sfb = 0; sfb < max_index; sfb++ ) {
-         start = gfc->scalefac_band.s[ sfb ];
-         end   = gfc->scalefac_band.s[ sfb+1 ];
-         for ( i = 0; i < 3; i++ ) {
-	    FLOAT8 step;
-	    int s;
-
-	    s = (scalefac->s[sfb][i] << (cod_info->scalefac_scale + 1))
-		+ cod_info->subblock_gain[i] * 8;
-	    s = cod_info->global_gain - s;
-
-	    assert(s<Q_MAX);
-	    assert(s>=0);
-	    step = POW20(s);
-	    sum = 0.0;
-	    l = start;
-	    do {
-	      FLOAT8 temp;
-	      temp = pow43[ix[j]];
-	      temp *= step;
-	      temp -= fabs(xr[j]);
-	      ++j;
-	      sum += temp * temp;
-	      l++;
-	    } while (l < end);
-            noise = xfsf->s[sfb][i]  = sum / l3_xmin->s[sfb][i];
-
-	    max_noise    = Max(max_noise,noise);
-	    klemm_noise += penalties (noise);
-
-	    noise_db=10*log10(Max(noise,1E-20));
-            /* multiplying here is adding in dB, but will overflow */
-	    //tot_noise *= Max(noise, 1E-20); 
-	    tot_noise_db += noise_db;
-
-            if (noise > 1) {
-		over++;
-	        /* multiplying here is adding in dB, but can overflow */
-		//over_noise *= noise;
-		over_noise_db += noise_db;
-	    }
-	    count++;	    
-        }
-    }
-  }else{ /* cod_info->block_type == SHORT_TYPE */
-    int max_index = gfc->sfb21_extra ? SBMAX_l : SBPSY_l;
-    
-    for ( sfb = 0; sfb < max_index; sfb++ ) {
-	FLOAT8 step;
-	int s = scalefac->l[sfb];
-
-	if (cod_info->preflag)
-	    s += pretab[sfb];
-
-	s = cod_info->global_gain - (s << (cod_info->scalefac_scale + 1));
-	assert(s<Q_MAX);
-	assert(s>=0);
-	step = POW20(s);
-
-	start = gfc->scalefac_band.l[ sfb ];
-        end   = gfc->scalefac_band.l[ sfb+1 ];
-
-	for ( sum = 0.0, l = start; l < end; l++ ) {
-	  FLOAT8 temp;
-	  temp = fabs(xr[l]) - pow43[ix[l]] * step;
-	  sum += temp * temp;
-	}
-	noise = xfsf->l[sfb] = sum / l3_xmin->l[sfb];
-	max_noise=Max(max_noise,noise);
-	klemm_noise += penalties (noise);
-
-	noise_db=10*log10(Max(noise,1E-20));
-	/* multiplying here is adding in dB, but can overflow */
-	//tot_noise *= Max(noise, 1E-20);
-	tot_noise_db += noise_db;
-
-	if (noise > 1) {
-	  over++;
-	  /* multiplying here is adding in dB -but can overflow */
-	  //over_noise *= noise;
-	  over_noise_db += noise_db;
-	}
-
-	count++;
-    }
-  } /* cod_info->block_type == SHORT_TYPE */
-
-  /* normalization at this point by "count" is not necessary, since
-   * the values are only used to compare with previous values */
-  res->tot_count  = count;
-  res->over_count = over;
-
-  /* convert to db. DO NOT CHANGE THESE */
-  /* tot_noise = is really the average over each sfb of: 
-     [noise(db) - allowed_noise(db)]
-
-     and over_noise is the same average, only over only the
-     bands with noise > allowed_noise.  
-
-  */
-
-  //res->tot_noise   = 10.*log10(Max(1e-20,tot_noise )); 
-  //res->over_noise  = 10.*log10(Max(1e+00,over_noise)); 
-  res->tot_noise   = tot_noise_db;
-  res->over_noise  = over_noise_db;
-  res->max_noise   = 10.*log10(Max(1e-20,max_noise ));
-  res->klemm_noise = 10.*log10(Max(1e-20,klemm_noise));
-
-  return over;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************
- *
- *  set_pinfo()
- *
- *  updates plotting data    
- *
- *  Mark Taylor 2000-??-??                
- *
- *  Robert Hegemann: moved noise/distortion calc into it                          
- *
- ************************************************************************/
-
-static
-void set_pinfo (
-        lame_global_flags *gfp,
-        const gr_info        * const cod_info,
-        const III_psy_ratio  * const ratio, 
-        const III_scalefac_t * const scalefac,
-        const FLOAT8                 xr[576],
-        const int                    l3_enc[576],        
-        const int                    gr,
-        const int                    ch )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int sfb;
-    int j,i,l,start,end,bw;
-    FLOAT8 en0,en1;
-    FLOAT ifqstep = ( cod_info->scalefac_scale == 0 ) ? .5 : 1.0;
-
-
-    III_psy_xmin l3_xmin;
-    calc_noise_result noise;
-    III_psy_xmin xfsf;
-
-    calc_xmin (gfp,xr, ratio, cod_info, &l3_xmin);
-
-    calc_noise (gfc, xr, l3_enc, cod_info, &l3_xmin, scalefac, &xfsf, &noise);
-
-    if (cod_info->block_type == SHORT_TYPE) {
-        for (j=0, sfb = 0; sfb < SBMAX_s; sfb++ )  {
-            start = gfc->scalefac_band.s[ sfb ];
-            end   = gfc->scalefac_band.s[ sfb + 1 ];
-            bw = end - start;
-            for ( i = 0; i < 3; i++ ) {
-                for ( en0 = 0.0, l = start; l < end; l++ ) {
-                    en0 += xr[j] * xr[j];
-                    ++j;
-                }
-                en0=Max(en0/bw,1e-20);
-
-
-#if 0
-{
-    double tot1,tot2;
-    if (sfb<SBMAX_s-1) {
-        if (sfb==0) {
-            tot1=0;
-            tot2=0;
-        }
-        tot1 += en0;
-        tot2 += ratio->en.s[sfb][i];
-
-        DEBUGF("%i %i sfb=%i mdct=%f fft=%f  fft-mdct=%f db \n",
-                gr,ch,sfb,
-                10*log10(Max(1e-25,ratio->en.s[sfb][i])),
-                10*log10(Max(1e-25,en0)),
-                10*log10((Max(1e-25,en0)/Max(1e-25,ratio->en.s[sfb][i]))));
-
-        if (sfb==SBMAX_s-2) {
-            DEBUGF("%i %i toti %f %f ratio=%f db \n",gr,ch,
-                    10*log10(Max(1e-25,tot2)),
-                    10*log(Max(1e-25,tot1)),
-                    10*log10(Max(1e-25,tot1)/(Max(1e-25,tot2))));
-
-        }
-    }
-    /*
-        masking: multiplied by en0/fft_energy
-        average seems to be about -135db.
-     */
-}
-#endif
-
-
-                /* convert to MDCT units */
-                en1=1e15;  /* scaling so it shows up on FFT plot */
-                gfc->pinfo->xfsf_s[gr][ch][3*sfb+i] 
-                    = en1*xfsf.s[sfb][i]*l3_xmin.s[sfb][i]/bw;
-                gfc->pinfo->en_s[gr][ch][3*sfb+i] = en1*en0;
-
-                if (ratio->en.s[sfb][i]>0)
-                    en0 = en0/ratio->en.s[sfb][i];
-                else
-                    en0=0;
-                if (gfp->ATHonly || gfp->ATHshort)
-                    en0=0;
-
-                gfc->pinfo->thr_s[gr][ch][3*sfb+i] = 
-                        en1*Max(en0*ratio->thm.s[sfb][i],gfc->ATH->s[sfb]);
-
- 
-                /* there is no scalefactor bands >= SBPSY_s */
-                if (sfb < SBPSY_s) {
-                    gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i]=
-                                            -ifqstep*scalefac->s[sfb][i];
-                } else {
-                    gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i]=0;
-                }
-                gfc->pinfo->LAMEsfb_s[gr][ch][3*sfb+i] -=
-                                             2*cod_info->subblock_gain[i];
-            }
-        }
-    } else {
-        for ( sfb = 0; sfb < SBMAX_l; sfb++ )   {
-            start = gfc->scalefac_band.l[ sfb ];
-            end   = gfc->scalefac_band.l[ sfb+1 ];
-            bw = end - start;
-            for ( en0 = 0.0, l = start; l < end; l++ ) 
-                en0 += xr[l] * xr[l];
-            if (!gfc->nsPsy.use) en0/=bw;
-      /*
-    DEBUGF("diff  = %f \n",10*log10(Max(ratio[gr][ch].en.l[sfb],1e-20))
-                            -(10*log10(en0)+150));
-       */
-
-#if 0
- {
-    double tot1,tot2;
-    if (sfb==0) {
-        tot1=0;
-        tot2=0;
-    }
-    tot1 += en0;
-    tot2 += ratio->en.l[sfb];
-
-
-    DEBUGF("%i %i sfb=%i mdct=%f fft=%f  fft-mdct=%f db \n",
-            gr,ch,sfb,
-            10*log10(Max(1e-25,ratio->en.l[sfb])),
-            10*log10(Max(1e-25,en0)),
-            10*log10((Max(1e-25,en0)/Max(1e-25,ratio->en.l[sfb]))));
-
-    if (sfb==SBMAX_l-1) {
-        DEBUGF("%i %i toti %f %f ratio=%f db \n",
-            gr,ch,
-            10*log10(Max(1e-25,tot2)),
-            10*log(Max(1e-25,tot1)),
-            10*log10(Max(1e-25,tot1)/(Max(1e-25,tot2))));
-    }
-    /*
-        masking: multiplied by en0/fft_energy
-        average seems to be about -147db.
-     */
-}
-#endif
-
-
-            /* convert to MDCT units */
-            en1=1e15;  /* scaling so it shows up on FFT plot */
-            gfc->pinfo->xfsf[gr][ch][sfb] =  en1*xfsf.l[sfb]*l3_xmin.l[sfb]/bw;
-            gfc->pinfo->en[gr][ch][sfb] = en1*en0;
-            if (ratio->en.l[sfb]>0)
-                en0 = en0/ratio->en.l[sfb];
-            else
-                en0=0;
-            if (gfp->ATHonly)
-                en0=0;
-            gfc->pinfo->thr[gr][ch][sfb] =
-                             en1*Max(en0*ratio->thm.l[sfb],gfc->ATH->l[sfb]);
-
-            /* there is no scalefactor bands >= SBPSY_l */
-            if (sfb<SBPSY_l) {
-                if (scalefac->l[sfb]<0)  /* scfsi! */
-                    gfc->pinfo->LAMEsfb[gr][ch][sfb] =
-                                            gfc->pinfo->LAMEsfb[0][ch][sfb];
-                else
-                    gfc->pinfo->LAMEsfb[gr][ch][sfb] = -ifqstep*scalefac->l[sfb];
-            }else{
-                gfc->pinfo->LAMEsfb[gr][ch][sfb] = 0;
-            }
-
-            if (cod_info->preflag && sfb>=11) 
-                gfc->pinfo->LAMEsfb[gr][ch][sfb] -= ifqstep*pretab[sfb];
-        } /* for sfb */
-    } /* block type long */
-    gfc->pinfo->LAMEqss     [gr][ch] = cod_info->global_gain;
-    gfc->pinfo->LAMEmainbits[gr][ch] = cod_info->part2_3_length;
-    gfc->pinfo->LAMEsfbits  [gr][ch] = cod_info->part2_length;
-
-    gfc->pinfo->over      [gr][ch] = noise.over_count;
-    gfc->pinfo->max_noise [gr][ch] = noise.max_noise;
-    gfc->pinfo->over_noise[gr][ch] = noise.over_noise;
-    gfc->pinfo->tot_noise [gr][ch] = noise.tot_noise;
-}
-
-
-/************************************************************************
- *
- *  set_frame_pinfo()
- *
- *  updates plotting data for a whole frame  
- *
- *  Robert Hegemann 2000-10-21                          
- *
- ************************************************************************/
-
-void set_frame_pinfo( 
-        lame_global_flags *gfp,
-        FLOAT8          xr       [2][2][576],
-        III_psy_ratio   ratio    [2][2],  
-        int             l3_enc   [2][2][576],
-        III_scalefac_t  scalefac [2][2] )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    unsigned int          gr, ch, sfb;
-    int                   act_l3enc[576];
-    III_scalefac_t        act_scalefac [2];
-    int scsfi[2] = {0,0};
-    
-    
-    gfc->masking_lower = 1.0;
-    
-    /* reconstruct the scalefactors in case SCSFI was used 
-     */
-    for (ch = 0; ch < gfc->channels_out; ch ++) {
-        for (sfb = 0; sfb < SBMAX_l; sfb ++) {
-            if (scalefac[1][ch].l[sfb] == -1) {/* scfsi */
-                act_scalefac[ch].l[sfb] = scalefac[0][ch].l[sfb];
-                scsfi[ch] = 1;
-            } else {
-                act_scalefac[ch].l[sfb] = scalefac[1][ch].l[sfb];
-            }
-        }
-    }
-    
-    /* for every granule and channel patch l3_enc and set info
-     */
-    for (gr = 0; gr < gfc->mode_gr; gr ++) {
-        for (ch = 0; ch < gfc->channels_out; ch ++) {
-            int i;
-            gr_info *cod_info = &gfc->l3_side.gr[gr].ch[ch].tt;
-            
-            /* revert back the sign of l3enc */
-            for ( i = 0; i < 576; i++) {
-                if (xr[gr][ch][i] < 0) 
-                    act_l3enc[i] = -l3_enc[gr][ch][i];
-                else
-                    act_l3enc[i] = +l3_enc[gr][ch][i];
-            }
-            if (gr == 1 && scsfi[ch]) 
-                set_pinfo (gfp, cod_info, &ratio[gr][ch], &act_scalefac[ch],
-                        xr[gr][ch], act_l3enc, gr, ch);                    
-            else
-                set_pinfo (gfp, cod_info, &ratio[gr][ch], &scalefac[gr][ch],
-                        xr[gr][ch], act_l3enc, gr, ch);                    
-        } /* for ch */
-    }    /* for gr */
-}
-        
-
-
-
-/*********************************************************************
- * nonlinear quantization of xr 
- * More accurate formula than the ISO formula.  Takes into account
- * the fact that we are quantizing xr -> ix, but we want ix^4/3 to be 
- * as close as possible to x^4/3.  (taking the nearest int would mean
- * ix is as close as possible to xr, which is different.)
- * From Segher Boessenkool <[email protected]>  11/1999
- * ASM optimization from 
- *    Mathew Hendry <[email protected]> 11/1999
- *    Acy Stapp <[email protected]> 11/1999
- *    Takehiro Tominaga <[email protected]> 11/1999
- * 9/00: ASM code removed in favor of IEEE754 hack.  If you need
- * the ASM code, check CVS circa Aug 2000.  
- *********************************************************************/
-
-
-#ifdef TAKEHIRO_IEEE754_HACK
-
-typedef union {
-    float f;
-    int i;
-} fi_union;
-
-#define MAGIC_FLOAT (65536*(128))
-#define MAGIC_INT 0x4b000000
-
-void quantize_xrpow(const FLOAT8 xp[576], int pi[576], FLOAT8 istep)
-{
-    /* quantize on xr^(3/4) instead of xr */
-    int j;
-    fi_union *fi;
-
-    fi = (fi_union *)pi;
-    for (j = 576 / 4 - 1; j >= 0; --j) {
-	double x0 = istep * xp[0];
-	double x1 = istep * xp[1];
-	double x2 = istep * xp[2];
-	double x3 = istep * xp[3];
-
-	x0 += MAGIC_FLOAT; fi[0].f = x0;
-	x1 += MAGIC_FLOAT; fi[1].f = x1;
-	x2 += MAGIC_FLOAT; fi[2].f = x2;
-	x3 += MAGIC_FLOAT; fi[3].f = x3;
-
-	fi[0].f = x0 + (adj43asm - MAGIC_INT)[fi[0].i];
-	fi[1].f = x1 + (adj43asm - MAGIC_INT)[fi[1].i];
-	fi[2].f = x2 + (adj43asm - MAGIC_INT)[fi[2].i];
-	fi[3].f = x3 + (adj43asm - MAGIC_INT)[fi[3].i];
-
-	fi[0].i -= MAGIC_INT;
-	fi[1].i -= MAGIC_INT;
-	fi[2].i -= MAGIC_INT;
-	fi[3].i -= MAGIC_INT;
-	fi += 4;
-	xp += 4;
-    }
-}
-
-#  define ROUNDFAC -0.0946
-void quantize_xrpow_ISO(const FLOAT8 xp[576], int pi[576], FLOAT8 istep)
-{
-    /* quantize on xr^(3/4) instead of xr */
-    int j;
-    fi_union *fi;
-
-    fi = (fi_union *)pi;
-    for (j=576/4 - 1;j>=0;j--) {
-	fi[0].f = istep * xp[0] + (ROUNDFAC + MAGIC_FLOAT);
-	fi[1].f = istep * xp[1] + (ROUNDFAC + MAGIC_FLOAT);
-	fi[2].f = istep * xp[2] + (ROUNDFAC + MAGIC_FLOAT);
-	fi[3].f = istep * xp[3] + (ROUNDFAC + MAGIC_FLOAT);
-
-	fi[0].i -= MAGIC_INT;
-	fi[1].i -= MAGIC_INT;
-	fi[2].i -= MAGIC_INT;
-	fi[3].i -= MAGIC_INT;
-	fi+=4;
-	xp+=4;
-    }
-}
-
-#else
-
-/*********************************************************************
- * XRPOW_FTOI is a macro to convert floats to ints.  
- * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
- *                                         ROUNDFAC= -0.0946
- *
- * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]   
- *                                   ROUNDFAC=0.4054
- *
- * Note: using floor() or (int) is extermely slow. On machines where
- * the TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile
- * to write some ASM for XRPOW_FTOI().  
- *********************************************************************/
-#define XRPOW_FTOI(src,dest) ((dest) = (int)(src))
-#define QUANTFAC(rx)  adj43[rx]
-#define ROUNDFAC 0.4054
-
-
-void quantize_xrpow(const FLOAT8 xr[576], int ix[576], FLOAT8 istep) {
-    /* quantize on xr^(3/4) instead of xr */
-    /* from [email protected].  Reported to be 2x faster than 
-       the above code (when not using ASM) on PowerPC */
-    int j;
-
-    for ( j = 576/8; j > 0; --j) {
-	FLOAT8	x1, x2, x3, x4, x5, x6, x7, x8;
-	int	rx1, rx2, rx3, rx4, rx5, rx6, rx7, rx8;
-	x1 = *xr++ * istep;
-	x2 = *xr++ * istep;
-	XRPOW_FTOI(x1, rx1);
-	x3 = *xr++ * istep;
-	XRPOW_FTOI(x2, rx2);
-	x4 = *xr++ * istep;
-	XRPOW_FTOI(x3, rx3);
-	x5 = *xr++ * istep;
-	XRPOW_FTOI(x4, rx4);
-	x6 = *xr++ * istep;
-	XRPOW_FTOI(x5, rx5);
-	x7 = *xr++ * istep;
-	XRPOW_FTOI(x6, rx6);
-	x8 = *xr++ * istep;
-	XRPOW_FTOI(x7, rx7);
-	x1 += QUANTFAC(rx1);
-	XRPOW_FTOI(x8, rx8);
-	x2 += QUANTFAC(rx2);
-	XRPOW_FTOI(x1,*ix++);
-	x3 += QUANTFAC(rx3);
-	XRPOW_FTOI(x2,*ix++);
-	x4 += QUANTFAC(rx4);
-	XRPOW_FTOI(x3,*ix++);
-	x5 += QUANTFAC(rx5);
-	XRPOW_FTOI(x4,*ix++);
-	x6 += QUANTFAC(rx6);
-	XRPOW_FTOI(x5,*ix++);
-	x7 += QUANTFAC(rx7);
-	XRPOW_FTOI(x6,*ix++);
-	x8 += QUANTFAC(rx8);
-	XRPOW_FTOI(x7,*ix++);
-	XRPOW_FTOI(x8,*ix++);
-    }
-}
-
-
-
-
-
-
-void quantize_xrpow_ISO( const FLOAT8 xr[576], int ix[576], FLOAT8 istep )
-{
-    /* quantize on xr^(3/4) instead of xr */
-    const FLOAT8 compareval0 = (1.0 - 0.4054)/istep;
-    int j;
-    /* depending on architecture, it may be worth calculating a few more
-       compareval's.
-
-       eg.  compareval1 = (2.0 - 0.4054/istep);
-       .. and then after the first compare do this ...
-       if compareval1>*xr then ix = 1;
-
-       On a pentium166, it's only worth doing the one compare (as done here),
-       as the second compare becomes more expensive than just calculating
-       the value. Architectures with slow FP operations may want to add some
-       more comparevals. try it and send your diffs statistically speaking
-
-       73% of all xr*istep values give ix=0
-       16% will give 1
-       4%  will give 2
-    */
-    for (j=576;j>0;j--) {
-	if (compareval0 > *xr) {
-	    *(ix++) = 0;
-	    xr++;
-	} else {
-	    /*    *(ix++) = (int)( istep*(*(xr++))  + 0.4054); */
-	    XRPOW_FTOI(  istep*(*(xr++))  + ROUNDFAC , *(ix++) );
-	}
-    }
-}
-
-#endif
--- a/sys/src/games/mp3enc/quantize_pvt.h
+++ /dev/null
@@ -1,126 +1,0 @@
-/*
- *	quantize_pvt include file
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_QUANTIZE_PVT_H
-#define LAME_QUANTIZE_PVT_H
-
-#include "l3side.h"
-#define IXMAX_VAL 8206  /* ix always <= 8191+15.    see count_bits() */
-
-/* buggy Winamp decoder cannot handle values > 8191 */
-/* #define IXMAX_VAL 8191 */
-
-#define PRECALC_SIZE (IXMAX_VAL+2)
-
-
-extern const int nr_of_sfb_block[6][3][4];
-extern const char pretab[SBMAX_l];
-extern const char slen1_tab[16];
-extern const char slen2_tab[16];
-
-extern const scalefac_struct sfBandIndex[9];
-
-extern FLOAT8 pow43[PRECALC_SIZE];
-extern FLOAT8 adj43[PRECALC_SIZE];
-extern FLOAT8 adj43asm[PRECALC_SIZE];
-
-#define Q_MAX 330
-
-extern FLOAT8 pow20[Q_MAX];
-extern FLOAT8 ipow20[Q_MAX];
-
-typedef struct calc_noise_result_t {
-    int     over_count;      /* number of quantization noise > masking */
-    int     tot_count;       /* all */
-    FLOAT8  over_noise;      /* sum of quantization noise > masking */
-    FLOAT8  tot_noise;       /* sum of all quantization noise */
-    FLOAT8  max_noise;       /* max quantization noise */
-    float   klemm_noise;
-    FLOAT8  dist_l[SBMAX_l];
-    FLOAT8  dist_s[3][SBMAX_s];
-} calc_noise_result;
-
-void    compute_ath (lame_global_flags * gfp, FLOAT8 ATH_l[SBPSY_l],
-                     FLOAT8 ATH_s[SBPSY_l]);
-
-void    ms_convert (FLOAT8 xr[2][576], FLOAT8 xr_org[2][576]);
-
-int     on_pe (lame_global_flags *gfp, FLOAT8 pe[2][2], III_side_info_t * l3_side,
-               int targ_bits[2], int mean_bits, int gr);
-
-void    reduce_side (int targ_bits[2], FLOAT8 ms_ener_ratio, int mean_bits,
-                     int max_bits);
-
-
-int     bin_search_StepSize (lame_internal_flags * gfc, gr_info * cod_info,
-                             int desired_rate, int start,
-                             const FLOAT8 xrpow[576], int l3enc[576]);
-
-int     inner_loop (lame_internal_flags * gfc, gr_info * cod_info, int max_bits,
-                    const FLOAT8 xrpow[576], int l3enc[576]);
-
-void    iteration_init (lame_global_flags *gfp);
-
-
-int     calc_xmin (lame_global_flags *gfp, const FLOAT8 xr[576],
-                   const III_psy_ratio * ratio, const gr_info * cod_info,
-                   III_psy_xmin * l3_xmin);
-
-int     calc_noise (const lame_internal_flags * gfc, const FLOAT8 xr[576],
-                    const int ix[576], const gr_info * cod_info,
-                    const III_psy_xmin * l3_xmin,
-                    const III_scalefac_t * scalefac,
-                    III_psy_xmin * distort, calc_noise_result * res);
-
-void    set_frame_pinfo (lame_global_flags *gfp, FLOAT8 xr[2][2][576],
-                         III_psy_ratio ratio[2][2], int l3_enc[2][2][576],
-                         III_scalefac_t scalefac[2][2]);
-
-
-void    quantize_xrpow (const FLOAT8 xr[576], int ix[576], FLOAT8 istep);
-
-void    quantize_xrpow_ISO (const FLOAT8 xr[576], int ix[576], FLOAT8 istep);
-
-
-
-/* takehiro.c */
-
-int     count_bits (lame_internal_flags * gfc, int *ix, const FLOAT8 xr[576],
-                    gr_info * cod_info);
-
-
-void    best_huffman_divide (const lame_internal_flags * gfc, int gr, int ch,
-                             gr_info * cod_info, int *ix);
-
-void    best_scalefac_store (const lame_internal_flags * gfc, int gr, int ch,
-                             int l3_enc[2][2][576], III_side_info_t * l3_side,
-                             III_scalefac_t scalefac[2][2]);
-
-int     scale_bitcount (III_scalefac_t * scalefac, gr_info * cod_info);
-
-int     scale_bitcount_lsf (const lame_internal_flags *gfp, const III_scalefac_t * scalefac,
-                            gr_info * cod_info);
-
-void    huffman_init (lame_internal_flags * gfc);
-
-#define LARGE_BITS 100000
-
-#endif /* LAME_QUANTIZE_PVT_H */
--- a/sys/src/games/mp3enc/reservoir.c
+++ /dev/null
@@ -1,266 +1,0 @@
-/*
- *	bit reservoir source file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: reservoir.c,v 1.14 2001/01/05 15:20:33 aleidinger Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include "util.h"
-#include "reservoir.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-/*
-  ResvFrameBegin:
-  Called (repeatedly) at the beginning of a frame. Updates the maximum
-  size of the reservoir, and checks to make sure main_data_begin
-  was set properly by the formatter
-*/
-
-/*
- *  Background information:
- *
- *  This is the original text from the ISO standard. Because of 
- *  sooo many bugs and irritations correcting comments are added 
- *  in brackets []. A '^W' means you should remove the last word.
- *
- *  1) The following rule can be used to calculate the maximum 
- *     number of bits used for one granule [^W frame]: 
- *     At the highest possible bitrate of Layer III (320 kbps 
- *     per stereo signal [^W^W^W], 48 kHz) the frames must be of
- *     [^W^W^W are designed to have] constant length, i.e. 
- *     one buffer [^W^W the frame] length is:
- *
- *         320 kbps * 1152/48 kHz = 7680 bit = 960 byte
- *
- *     This value is used as the maximum buffer per channel [^W^W] at 
- *     lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps 
- *     stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit
- *     [per granule and channel] at 48 kHz sampling frequency. 
- *     This means that there is a maximum deviation (short time buffer 
- *     [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps. 
- *     The actual deviation is equal to the number of bytes [with the 
- *     meaning of octets] denoted by the main_data_end offset pointer. 
- *     The actual maximum deviation is (2^9-1)*8 bit = 4088 bits 
- *     [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].
- *     ... The xchange of buffer bits between the left and right channel
- *     is allowed without restrictions [exception: dual channel].
- *     Because of the [constructed] constraint on the buffer size
- *     main_data_end is always set to 0 in the case of bit_rate_index==14, 
- *     i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case 
- *     all data are allocated between adjacent header [^W sync] words 
- *     [, i.e. there is no buffering at all].
- */
-
-int
-ResvFrameBegin(lame_global_flags *gfp,III_side_info_t *l3_side, int mean_bits, int frameLength )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    int fullFrameBits;
-    int resvLimit;
-    int maxmp3buf;
-
-/*
- *  Meaning of the variables:
- *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))
- *          Number of bits can be stored in previous frame(s) due to 
- *          counter size constaints
- *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))
- *          Number of bits allowed to encode one frame (you can take 8*511 bit 
- *          from the bit reservoir and at most 8*1440 bit from the current 
- *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible 
- *          value for MPEG-1 and -2)
- *      fullFrameBits:
- *
- *      mean_bits:
- *
- *      frameLength:
- *
- *      gfc->ResvMax:
- *
- *      gfc->ResvSize:
- *
- *      l3_side->resvDrain_pre:
- *
- */
-
-    /* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */
-    resvLimit = (gfp->version==1) ? 8*511 : 8*255 ;
-
-
-    /* maximum allowed frame size */
-    maxmp3buf = (gfp->strict_ISO) ? 8*960 : 8*2047;
-
-    if ( frameLength > maxmp3buf ||  gfp->disable_reservoir ) {
-	gfc->ResvMax = 0;
-    } else {
-	gfc->ResvMax = maxmp3buf - frameLength;
-	if ( gfc->ResvMax > resvLimit )
-	  gfc->ResvMax = resvLimit;
-    }
-
-    fullFrameBits = mean_bits * gfc->mode_gr + Min ( gfc->ResvSize, gfc->ResvMax );
-    
-    if ( gfp->strict_ISO  &&  fullFrameBits > maxmp3buf )
-        fullFrameBits = maxmp3buf;
-
-    assert ( 0 == gfc->ResvMax % 8 );
-    assert ( gfc->ResvMax >= 0 );
-
-    l3_side->resvDrain_pre = 0;
-
-    if ( gfc->pinfo != NULL ) {
-        gfc->pinfo->mean_bits = mean_bits / 2;  /* expected bits per channel per granule [is this also right for mono/stereo, MPEG-1/2 ?] */
-        gfc->pinfo->resvsize  = gfc->ResvSize;
-    }
-
-    return fullFrameBits;
-}
-
-
-/*
-  ResvMaxBits
-  returns targ_bits:  target number of bits to use for 1 granule
-         extra_bits:  amount extra available from reservoir
-  Mark Taylor 4/99
-*/
-void ResvMaxBits(lame_global_flags *gfp, int mean_bits, int *targ_bits, int *extra_bits)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int add_bits;
-  int full_fac;
-  
-  *targ_bits = mean_bits ;
-
-  /* extra bits if the reservoir is almost full */
-  full_fac=9;
-  if (gfc->ResvSize > ((gfc->ResvMax * full_fac) / 10)) {
-    add_bits= gfc->ResvSize-((gfc->ResvMax * full_fac) / 10);
-    *targ_bits += add_bits;
-  }else {
-    add_bits =0 ;
-    /* build up reservoir.  this builds the reservoir a little slower
-     * than FhG.  It could simple be mean_bits/15, but this was rigged
-     * to always produce 100 (the old value) at 128kbs */
-    /*    *targ_bits -= (int) (mean_bits/15.2);*/
-    if (!gfp->disable_reservoir) 
-      *targ_bits -= .1*mean_bits;
-  }
-
-
-  /* amount from the reservoir we are allowed to use. ISO says 6/10 */
-  *extra_bits =
-    (gfc->ResvSize  < (gfc->ResvMax*6)/10  ? gfc->ResvSize : (gfc->ResvMax*6)/10);
-  *extra_bits -= add_bits;
-
-  if (*extra_bits < 0) *extra_bits=0;
-
-
-}
-
-/*
-  ResvAdjust:
-  Called after a granule's bit allocation. Readjusts the size of
-  the reservoir to reflect the granule's usage.
-*/
-void
-ResvAdjust(lame_internal_flags *gfc,gr_info *gi, III_side_info_t *l3_side, int mean_bits )
-{
-  gfc->ResvSize += (mean_bits / gfc->channels_out) - gi->part2_3_length;
-#if 0
-  printf("part2_3_length:  %i  avg=%i  incres: %i  resvsize=%i\n",gi->part2_3_length,
-	 mean_bits/gfc->channels_out,
-mean_bits/gfc->channels_out-gi->part2_3_length,gfc->ResvSize);
-#endif
-}
-
-
-/*
-  ResvFrameEnd:
-  Called after all granules in a frame have been allocated. Makes sure
-  that the reservoir size is within limits, possibly by adding stuffing
-  bits.
-*/
-void
-ResvFrameEnd(lame_internal_flags *gfc, III_side_info_t *l3_side, int mean_bits)
-{
-    int stuffingBits;
-    int over_bits;
-
-
-    /* just in case mean_bits is odd, this is necessary... */
-    if ( gfc->channels_out == 2  &&  (mean_bits & 1) )
-	gfc->ResvSize += 1;
-
-    stuffingBits=0;
-    l3_side->resvDrain_post = 0;
-    l3_side->resvDrain_pre = 0;
-
-    /* we must be byte aligned */
-    if ( (over_bits = gfc->ResvSize % 8) != 0 )
-	stuffingBits += over_bits;
-
-
-    over_bits = (gfc->ResvSize - stuffingBits) - gfc->ResvMax;
-    if (over_bits > 0) {
-      assert ( 0 == over_bits % 8 );
-      assert ( over_bits >= 0 );
-      stuffingBits += over_bits;
-    }
-
-
-#define NEW_DRAINXX
-#ifdef NEW_DRAIN
-    /* drain as many bits as possible into previous frame ancillary data
-     * In particular, in VBR mode ResvMax may have changed, and we have
-     * to make sure main_data_begin does not create a reservoir bigger
-     * than ResvMax  mt 4/00*/
-  {
-    int mdb_bytes = Min(l3_side->main_data_begin*8,stuffingBits)/8;
-    l3_side->resvDrain_pre += 8*mdb_bytes;
-    stuffingBits -= 8*mdb_bytes;
-    gfc->ResvSize -= 8*mdb_bytes;
-    l3_side->main_data_begin -= mdb_bytes;
-
-
-    /* drain just enough to be byte aligned.  The remaining bits will
-     * be added to the reservoir, and we will deal with them next frame.
-     * If the next frame is at a lower bitrate, it may have a larger ResvMax,
-     * and we will not have to waste these bits!  mt 4/00 */
-    assert ( stuffingBits >= 0 );
-    l3_side->resvDrain_post += (stuffingBits % 8);
-    gfc->ResvSize -= stuffingBits % 8;
-  }
-#else
-    /* drain the rest into this frames ancillary data*/
-    l3_side->resvDrain_post += stuffingBits;
-    gfc->ResvSize -= stuffingBits;
-#endif
-
-    return;
-}
-
-
--- a/sys/src/games/mp3enc/reservoir.h
+++ /dev/null
@@ -1,30 +1,0 @@
-/*
- *	bit reservoir include file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_RESERVOIR_H
-#define LAME_RESERVOIR_H
-
-int ResvFrameBegin(lame_global_flags *gfp,III_side_info_t *l3_side, int mean_bits, int frameLength );
-void ResvMaxBits(lame_global_flags *gfp, int mean_bits, int *targ_bits, int *max_bits);
-void ResvAdjust(lame_internal_flags *gfc,gr_info *gi, III_side_info_t *l3_side, int mean_bits );
-void ResvFrameEnd(lame_internal_flags *gfc,III_side_info_t *l3_side, int mean_bits );
-
-#endif /* LAME_RESERVOIR_H */
--- a/sys/src/games/mp3enc/set_get.c
+++ /dev/null
@@ -1,730 +1,0 @@
-/* -*- mode: C; mode: fold -*- */
-/*
- * set/get functions for lame_global_flags
- *
- * Copyright (c) 2001 Alexander Leidinger
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: set_get.c,v 1.2 2001/03/12 04:38:35 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include "lame.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-
-/*
- * input stream description
- */
-
-/* number of samples */
-/* it's unlikely for this function to return an error */
-int
-lame_set_num_samples( lame_global_flags*  gfp,
-                      unsigned long       num_samples)
-{
-    /* default = 2^32-1 */
-
-    gfp->num_samples = num_samples;
-
-    return 0;
-}
-
-unsigned long
-lame_get_num_samples( const lame_global_flags* gfp )
-{
-    return gfp->num_samples;
-}
-
-
-/* input samplerate */
-int
-lame_set_in_samplerate( lame_global_flags*  gfp,
-                        int                 in_samplerate )
-{
-    /* input sample rate in Hz,  default = 44100 Hz */
-    gfp->in_samplerate = in_samplerate;
-
-    return 0;
-}
-
-int
-lame_get_in_samplerate( const lame_global_flags*  gfp )
-{
-    return gfp->in_samplerate;
-}
-
-
-/* number of channels in input stream */
-int
-lame_set_num_channels( lame_global_flags*  gfp,
-                       int                 num_channels )
-{
-    /* default = 2 */
-
-    if ( 2 < num_channels || 0 == num_channels )
-        return -1;    /* we didn't support more than 2 channels */
-
-    gfp->num_channels = num_channels;
-
-    return 0;
-}
-
-int
-lame_get_num_channels( const lame_global_flags*  gfp )
-{
-    return gfp->num_channels;
-}
-
-
-/* scale the input by this amount before encoding (not used for decoding) */
-int
-lame_set_scale( lame_global_flags*  gfp,
-                float               scale )
-{
-    /* default = 0 */
-    gfp->scale = scale;
-
-    return 0;
-}
-
-float
-lame_get_scale( const lame_global_flags*  gfp )
-{
-    return gfp->scale;
-}
-
-
-/* output sample rate in Hz */
-int
-lame_set_out_samplerate( lame_global_flags*  gfp,
-                         int                 out_samplerate )
-{
-    /*
-     * default = 0: LAME picks best value based on the amount
-     *              of compression
-     * MPEG only allows:
-     *  MPEG1    32, 44.1,   48khz
-     *  MPEG2    16, 22.05,  24
-     *  MPEG2.5   8, 11.025, 12
-     *
-     * (not used by decoding routines)
-     */
-    gfp->out_samplerate = out_samplerate;
-
-    return 0;
-}
-
-int
-lame_get_out_samplerate( const lame_global_flags*  gfp )
-{
-    return gfp->out_samplerate;
-}
-
-
-
-
-/*
- * general control parameters
- */
-
-/*collect data for an MP3 frame analzyer */
-int
-lame_set_analysis( lame_global_flags*  gfp,
-                   int                 analysis )
-{
-    /* default = 0 */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > analysis || 1 < analysis )
-        return -1;
-
-    gfp->analysis = analysis;
-
-    return 0;
-}
-
-int
-lame_get_analysis( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->analysis && 1 >= gfp->analysis );
-
-    return gfp->analysis;
-}
-
-
-/* write a Xing VBR header frame */
-int
-lame_set_bWriteVbrTag( lame_global_flags*  gfp,
-                       int bWriteVbrTag )
-{
-    /* default = 1 (on) for VBR/ABR modes, 0 (off) for CBR mode */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > bWriteVbrTag || 1 < bWriteVbrTag )
-        return -1;
-
-    gfp->bWriteVbrTag = bWriteVbrTag;
-
-    return 0;
-}
-
-int
-lame_get_bWriteVbrTag( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->bWriteVbrTag && 1 >= gfp->bWriteVbrTag );
-
-    return gfp->bWriteVbrTag;
-}
-
-
-/* disable writing a wave header with *decoding* */
-int
-lame_set_disable_waveheader( lame_global_flags*  gfp,
-                             int                 disable_waveheader )
-{
-    /* default = 0 (disabled) */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > disable_waveheader || 1 < disable_waveheader )
-        return -1;
-
-    gfp->disable_waveheader = disable_waveheader;
-
-    return 0;
-}
-
-int
-lame_get_disable_waveheader( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->disable_waveheader && 1 >= gfp->disable_waveheader );
-
-    return gfp->disable_waveheader;
-}
-
-
-/* decode only, use lame/mpglib to convert mp3/ogg to wav */
-int
-lame_set_decode_only( lame_global_flags*  gfp,
-                      int                 decode_only )
-{
-    /* default = 0 (disabled) */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > decode_only || 1 < decode_only )
-        return -1;
-
-    gfp->decode_only = decode_only;
-
-    return 0;
-}
-
-int
-lame_get_decode_only( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->decode_only && 1 >= gfp->decode_only );
-
-    return gfp->decode_only;
-}
-
-
-/* encode a Vorbis .ogg file */
-int
-lame_set_ogg( lame_global_flags*  gfp,
-              int                 ogg )
-{
-    /* default = 0 (disabled) */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > ogg || 1 < ogg )
-        return -1;
-
-    gfp->ogg = ogg;
-
-    return 0;
-}
-
-int
-lame_get_ogg( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->ogg && 1 >= gfp->ogg );
-
-    return gfp->ogg;
-}
-
-
-/*
- * Internal algorithm selection.
- * True quality is determined by the bitrate but this variable will effect
- * quality by selecting expensive or cheap algorithms.
- * quality=0..9.  0=best (very slow).  9=worst.  
- * recommended:  2     near-best quality, not too slow
- *               5     good quality, fast
- *               7     ok quality, really fast
- */
-int
-lame_set_quality( lame_global_flags*  gfp,
-                  int                 quality )
-{
-    gfp->quality = quality;
-
-    return 0;
-}
-
-int
-lame_get_quality( const lame_global_flags*  gfp )
-{
-    return gfp->quality;
-}
-
-
-/* mode = STEREO, JOINT_STEREO, DUAL_CHANNEL (not supported), MONO */
-int
-lame_set_mode( lame_global_flags*  gfp,
-               MPEG_mode           mode )
-{
-    /* default: lame chooses based on compression ratio and input channels */
-
-    if( 0 > mode || MAX_INDICATOR <= mode )
-        return -1;  /* Unknown MPEG mode! */
-
-    gfp->mode = mode;
-
-    return 0;
-}
-
-MPEG_mode
-lame_get_mode( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->mode && MAX_INDICATOR > gfp->mode );
-
-    return gfp->mode;
-}
-
-
-/* Us a M/S mode with a switching threshold based on compression ratio */
-int
-lame_set_mode_automs( lame_global_flags*  gfp,
-                      int                 mode_automs )
-{
-    /* default = 0 (disabled) */
-
-    /* enforce disable/enable meaning, if we need more than two values
-       we need to switch to an enum to have an apropriate representation
-       of the possible meanings of the value */
-    if ( 0 > mode_automs || 1 < mode_automs )
-        return -1;
-
-    gfp->mode_automs = mode_automs;
-
-    return 0;
-}
-
-int
-lame_get_mode_automs( const lame_global_flags*  gfp )
-{
-    assert( 0 <= gfp->mode_automs && 1 >= gfp->mode_automs );
-
-    return gfp->mode_automs;
-}
-
-
-// force_ms.  Force M/S for all frames.  For testing only.
-// default = 0 (disabled)
-int
-lame_set_force_ms( lame_global_flags*  gfp,
-                   int                 force_ms );
-int
-lame_get_force_ms( const lame_global_flags*  gfp );
-
-
-// use free_format?  default = 0 (disabled)
-int
-lame_set_free_format( lame_global_flags*  gfp,
-                      int                 free_format );
-int
-lame_get_free_format( const lame_global_flags*  gfp );
-
-
-/* message handlers */
-int
-lame_set_errorf( lame_global_flags*  gfp,
-                 void                (*func)( const char*, va_list ) )
-{
-    gfp->report.errorf = func;
-
-    return 0;
-}
-
-int
-lame_set_debugf( lame_global_flags*  gfp,
-                 void                (*func)( const char*, va_list ) )
-{
-    gfp->report.debugf = func;
-
-    return 0;
-}
-
-int
-lame_set_msgf( lame_global_flags*  gfp,
-               void                (*func)( const char *, va_list ) )
-{
-    gfp->report.msgf = func;
-
-    return 0;
-}
-
-
-/* set one of brate compression ratio.  default is compression ratio of 11.  */
-int
-lame_set_brate( lame_global_flags*  gfp,
-                int                 brate );
-int
-lame_get_brate( const lame_global_flags*  gfp );
-int
-lame_set_compression_ratio( lame_global_flags*  gfp,
-                            float               compression_ratio );
-float
-lame_get_compression_ratio( const lame_global_flags*  gfp );
-
-
-
-
-/*
- * frame parameters
- */
-
-// mark as copyright.  default=0
-int
-lame_set_copyright( lame_global_flags*  gfp,
-                    int                 copyright );
-int
-lame_get_copyright( const lame_global_flags*  gfp );
-
-
-// mark as original.  default=1
-int
-lame_set_original( lame_global_flags*  gfp,
-                   int                 original );
-int
-lame_get_original( const lame_global_flags*  gfp );
-
-
-// error_protection.  Use 2 bytes from each fraome for CRC checksum. default=0
-int
-lame_set_error_protection( lame_global_flags*  gfp,
-                           int                 error_protection );
-int
-lame_get_error_protection( const lame_global_flags*  gfp );
-
-
-// padding_type.  0=pad no frames  1=pad all frames 2=adjust padding(default)
-int
-lame_set_padding_type( lame_global_flags*  gfp,
-                       int                 padding_type );
-int
-lame_get_padding_type( const lame_global_flags*  gfp );
-
-
-// MP3 'private extension' bit  Meaningless
-int
-lame_set_extension( lame_global_flags*  gfp,
-                    int                 extension );
-int
-lame_get_extension( const lame_global_flags*  gfp );
-
-
-// enforce strict ISO compliance.  default=0
-int
-lame_set_strict_ISO( lame_global_flags*  gfp,
-                     int                 strict_ISO );
-int
-lame_get_strict_ISO( const lame_global_flags*  gfp );
- 
-
-
-
-/********************************************************************
- * quantization/noise shaping 
- ***********************************************************************/
-
-// disable the bit reservoir. For testing only. default=0
-int
-lame_set_disable_reservoir( lame_global_flags*  gfp,
-                            int                 disable_reservoir );
-int
-lame_get_disable_reservoir( const lame_global_flags*  gfp );
-
-
-// select a different "best quantization" function. default=0 
-int
-lame_set_experimentalX( lame_global_flags*  gfp,
-                        int                 experimentalX );
-int
-lame_get_experimentalX( const lame_global_flags*  gfp );
-
-
-// another experimental option.  for testing only
-int
-lame_set_experimentalY( lame_global_flags*  gfp,
-                        int                 experimentalY );
-int
-lame_get_experimentalY( const lame_global_flags*  gfp );
-
-
-// another experimental option.  for testing only
-int
-lame_set_experimentalZ( lame_global_flags*  gfp,
-                        int                 experimentalZ );
-int
-lame_get_experimentalZ( const lame_global_flags*  gfp );
-
-
-// Naoki's psycho acoustic model.  default=0
-int
-lame_set_exp_nspsytune( lame_global_flags*  gfp,
-                        int                 exp_nspsytune );
-int
-lame_get_exp_nspsytune( const lame_global_flags*  gfp );
-
-
-
-
-/********************************************************************
- * VBR control
- ***********************************************************************/
-
-// Types of VBR.  default = vbr_off = CBR
-int
-lame_set_VBR( lame_global_flags*  gfp,
-              vbr_mode            VBR );
-vbr_mode
-lame_get_exp_VBR( const lame_global_flags*  gfp );
-
-
-// VBR quality level.  0=highest  9=lowest 
-int
-lame_set_VBR_q( lame_global_flags*  gfp,
-                int                 VBR_q );
-int
-lame_get_VBR_q( const lame_global_flags*  gfp );
-
-
-// Ignored except for VBR=vbr_abr (ABR mode)
-int
-lame_set_VBR_mean_bitrate_kbps( lame_global_flags*  gfp,
-                                int                 VBR_mean_bitrate_kbps );
-int
-lame_get_VBR_mean_bitrate_kbps( const lame_global_flags*  gfp );
-
-int
-lame_set_VBR_min_bitrate_kbps( lame_global_flags*  gfp,
-                               int                 VBR_min_bitrate_kbps );
-int
-lame_get_VBR_min_bitrate_kbps( const lame_global_flags*  gfp );
-
-int
-lame_set_VBR_max_bitrate_kbps( lame_global_flags*  gfp,
-                               int                 VBR_max_bitrate_kbps );
-int
-lame_get_VBR_max_bitrate_kbps( const lame_global_flags*  gfp );
-
-
-// 1=stricetly enforce VBR_min_bitrate.  Normally it will be violated for
-// analog silence
-int
-lame_set_VBR_hard_min( lame_global_flags*  gfp,
-                       int                 VBR_hard_min );
-int
-lame_get_VBR_hard_min( const lame_global_flags*  gfp );
-
-
-/********************************************************************
- * Filtering control
- ***********************************************************************/
-
-// freq in Hz to apply lowpass. Default = 0 = lame chooses.  -1 = disabled
-int
-lame_set_lowpassfreq( lame_global_flags*  gfp,
-                      int                 lowpassfreq );
-int
-lame_get_lowpassfreq( const lame_global_flags*  gfp );
-
-
-// width of transition band, in Hz.  Default = one polyphase filter band
-int
-lame_set_lowpasswidth( lame_global_flags*  gfp,
-                       int                 lowpasswidth );
-int
-lame_get_lowpasswidth( const lame_global_flags*  gfp );
-
-
-// freq in Hz to apply highpass. Default = 0 = lame chooses.  -1 = disabled
-int
-lame_set_highpassfreq( lame_global_flags*  gfp,
-                       int                 highpassfreq );
-int
-lame_get_highpassfreq( const lame_global_flags*  gfp );
-
-
-// width of transition band, in Hz.  Default = one polyphase filter band
-int
-lame_set_highpasswidth( lame_global_flags*  gfp,
-                        int                 highpasswidth );
-int
-lame_get_highpasswidth( const lame_global_flags*  gfp );
-
-
-
-
-/*
- * psycho acoustics and other arguments which you should not change 
- * unless you know what you are doing
- */
-
-// only use ATH for masking
-int
-lame_set_ATHonly( lame_global_flags*  gfp,
-                  int                 ATHonly );
-int
-lame_get_ATHonly( const lame_global_flags*  gfp );
-
-
-// only use ATH for short blocks
-int
-lame_set_ATHshort( lame_global_flags*  gfp,
-                   int                 ATHshort );
-int
-lame_get_ATHshort( const lame_global_flags*  gfp );
-
-
-// disable ATH
-int
-lame_set_noATH( lame_global_flags*  gfp,
-                int                 noATH );
-int
-lame_get_noATH( const lame_global_flags*  gfp );
-
-
-// select ATH formula
-int
-lame_set_ATHtype( lame_global_flags*  gfp,
-                  int                 ATHtype );
-int
-lame_get_ATHtype( const lame_global_flags*  gfp );
-
-
-// lower ATH by this many db
-int
-lame_set_ATHlower( lame_global_flags*  gfp,
-                   float               ATHlower );
-float
-lame_get_ATHlower( const lame_global_flags*  gfp );
-
-
-// predictability limit (ISO tonality formula)
-int
-lame_set_cwlimit( lame_global_flags*  gfp,
-                  int                 cwlimit );
-int
-lame_get_cwlimit( const lame_global_flags*  gfp );
-
-
-// allow blocktypes to differ between channels?
-// default: 0 for jstereo, 1 for stereo
-int
-lame_set_allow_diff_short( lame_global_flags*  gfp,
-                           int                 allow_diff_short );
-int
-lame_get_allow_diff_short( const lame_global_flags*  gfp );
-
-
-// use temporal masking effect (default = 1)
-int
-lame_set_useTemporal( lame_global_flags*  gfp,
-                      int                 useTemporal );
-int
-lame_get_useTemporal( const lame_global_flags*  gfp );
-
-
-// disable short blocks
-int
-lame_set_no_short_blocks( lame_global_flags*  gfp,
-                          int                 no_short_blocks );
-int
-lame_get_no_short_blocks( const lame_global_flags*  gfp );
-
-
-/* Input PCM is emphased PCM (for instance from one of the rarely
-   emphased CDs), it is STRONGLY not recommended to use this, because
-   psycho does not take it into account, and last but not least many decoders
-   ignore these bits */
-int
-lame_set_emphasis( lame_global_flags*  gfp,
-                   int                 emphasis );
-int
-lame_get_emphasis( const lame_global_flags*  gfp );
-
-
-
-
-/***************************************************************/
-/* internal variables, cannot be set...                        */
-/* provided because they may be of use to calling application  */
-/***************************************************************/
-
-// version  0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)    
-int
-lame_get_version( const lame_global_flags* gfp );
-
-
-// encoder delay
-int
-lame_get_encoder_delay( const lame_global_flags*  gfp );
-
-
-// size of MPEG frame
-int
-lame_get_framesize( const lame_global_flags*  gfp );
-
-
-// number of frames encoded so far
-int
-lame_get_frameNum( const lame_global_flags*  gfp );
-
-
-// lame's estimate of the total number of frames to be encoded
-// only valid if calling program set num_samples 
-int
-lame_get_totalframes( const lame_global_flags*  gfp );
--- a/sys/src/games/mp3enc/tables.c
+++ /dev/null
@@ -1,509 +1,0 @@
-/*
- *	MPEG layer 3 tables source file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: tables.c,v 1.17 2001/03/12 20:40:36 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "util.h"
-#include "tables.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-static const short      t1HB[]   = {
-  1, 1, 
-  1, 0};
-
-static const short      t2HB[]   = {
-  1, 2, 1,
-  3, 1, 1,
-  3, 2, 0};
-
-static const short      t3HB[]   = {
-  3, 2, 1,
-  1, 1, 1,
-  3, 2, 0};
-
-static const short      t5HB[]   = {
-  1, 2, 6, 5,
-  3, 1, 4, 4,
-  7, 5, 7, 1,
-  6, 1, 1, 0};
-
-static const short      t6HB[]   = {
-  7, 3, 5, 1,
-  6, 2, 3, 2,
-  5, 4, 4, 1,
-  3, 3, 2, 0};
-
-static const short      t7HB[]   = {
-   1, 2,10,19,16,10,
-   3, 3, 7,10, 5, 3,
-  11, 4,13,17, 8, 4,
-  12,11,18,15,11, 2,
-   7, 6, 9,14, 3, 1,
-   6, 4, 5, 3, 2, 0};
-
-static const short      t8HB[]   = {
-  3, 4, 6, 18,12, 5,
-  5, 1, 2, 16, 9, 3,
-  7, 3, 5, 14, 7, 3,
- 19,17,15, 13,10, 4,
- 13, 5, 8, 11, 5, 1,
- 12, 4, 4,  1, 1, 0};
-
-static const short      t9HB[]   = {
-  7, 5, 9, 14, 15, 7,
-  6, 4, 5,  5,  6, 7,
-  7, 6, 8,  8,  8, 5,
- 15, 6, 9, 10,  5, 1,
- 11, 7, 9,  6,  4, 1,
- 14, 4, 6,  2,  6, 0};
-
-static const short      t10HB[]   = {
-  1, 2, 10, 23, 35, 30, 12, 17,
-  3, 3,  8, 12, 18, 21, 12,  7,
- 11, 9, 15, 21, 32, 40, 19,  6,
- 14,13, 22, 34, 46, 23, 18,  7,
- 20,19, 33, 47, 27, 22,  9,  3,
- 31,22, 41, 26, 21, 20,  5,  3,
- 14,13, 10, 11, 16,  6,  5,  1,
-  9, 8,  7,  8,  4,  4,  2,  0};
-
-static const short      t11HB[]   = {
-  3, 4, 10, 24, 34, 33, 21, 15,
-  5, 3,  4, 10, 32, 17, 11, 10,
- 11, 7, 13, 18, 30, 31, 20,  5,
- 25,11, 19, 59, 27, 18, 12,  5,
- 35,33, 31, 58, 30, 16,  7,  5,
- 28,26, 32, 19, 17, 15,  8, 14,
- 14,12,  9, 13, 14,  9,  4,  1,
- 11, 4,  6,  6,  6,  3,  2,  0};
-
-static const short      t12HB[]   = {
-  9,  6, 16, 33, 41, 39, 38,26,
-  7,  5,  6,  9, 23, 16, 26,11,
- 17,  7, 11, 14, 21, 30, 10, 7,
- 17, 10, 15, 12, 18, 28, 14, 5,
- 32, 13, 22, 19, 18, 16,  9, 5,
- 40, 17, 31, 29, 17, 13,  4, 2,
- 27, 12, 11, 15, 10,  7,  4, 1,
- 27, 12,  8, 12,  6,  3,  1, 0};
-
-static const short      t13HB[]   = {
-  1,  5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,
-  3,  4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,
- 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,
- 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,
- 35, 16, 60, 57, 97, 75,114, 91, 54, 73, 55, 41, 48, 53, 23, 24,
- 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,
- 47, 45, 78, 74,115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,
- 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,
- 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,
- 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,
- 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,
- 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14,  9,  7,
- 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17,  9,  5,
- 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10,  7,  6,  3,
- 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10,  6,  1,  4,  2,
- 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16,  8,  1,  1,  0,  1};
-
-static const short      t15HB[]   = {
-   7, 12, 18, 53, 47, 76,124,108, 89,123,108,119,107, 81,122, 63,
-  13,  5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,
-  19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,
-  29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,
-  52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,
-  77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,
- 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,
- 109, 53, 49, 94, 88, 75, 66,122, 91, 73, 56, 42, 64, 44, 21, 25,
-  90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,
-  71, 34, 67, 60, 58, 49, 88, 76, 67,106, 71, 54, 38, 39, 23, 15,
- 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62,  9,
-  86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11, 
- 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14,  7,
-  91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14,  8,  9,  3,
- 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10,  2,  1,
-  71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10,  6,  8,  6,  2,  0};
-
-static const short      t16HB[]   = {
-   1,   5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,
-   3,   4, 12, 20, 35, 62,  53, 47,  83,  75,  68, 119, 201, 107, 207,  9,
-  15,  13, 23, 38, 67, 58, 103, 90, 161,  72, 127, 117, 110, 209, 206, 16,
-  45,  21, 39, 69, 64,114,  99, 87, 158, 140, 252, 212, 199, 387, 365, 26,
-  75,  36, 68, 65,115,101, 179,164, 155, 264, 246, 226, 395, 382, 362,  9,
-  66,  30, 59, 56,102,185, 173,265, 142, 253, 232, 400, 388, 378, 445, 16,
- 111,  54, 52,100,184,178, 160,133, 257, 244, 228, 217, 385, 366, 715, 10,
-  98,  48, 91, 88,165,157, 148,261, 248, 407, 397, 372, 380, 889, 884,  8,
-  85,  84, 81,159,156,143, 260,249, 427, 401, 392, 383, 727, 713, 708,  7,
- 154,  76, 73,141,131,256, 245,426, 406, 394, 384, 735, 359, 710, 352, 11,
- 139, 129, 67,125,247,233, 229,219, 393, 743, 737, 720, 885, 882, 439,  4,
- 243, 120,118,115,227,223, 396,746, 742, 736, 721, 712, 706, 223, 436,  6,
- 202, 224,222,218,216,389, 386,381, 364, 888, 443, 707, 440, 437,1728,  4,
- 747, 211,210,208,370,379, 734,723, 714,1735, 883, 877, 876,3459, 865,  2,
- 377, 369,102,187,726,722, 358,711, 709, 866,1734, 871,3458, 870, 434,  0,
-  12,  10,  7, 11, 10, 17,  11,  9,  13,  12,  10,   7,   5,   3,   1,  3};
-
-static const short      t24HB[]   = {
-   15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,
-   14, 12, 21, 38,  71, 130, 122, 216, 209, 198, 327, 345, 319, 297,  279, 42,
-   47, 22, 41, 74,  68, 128, 120, 221, 207, 194, 182, 340, 315, 295,  541, 18,
-   81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293,  271, 16,
-  147, 72, 69,135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285,  540, 14,
-  263, 66,129,126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281,  262, 12,
-  249,123,121,117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272,  520, 10,
-  435,115,111,109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531,  381, 17,
-  427,212,208,205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514,  377, 16,
-  335,199,197,191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379,  371, 11,
-  668,184,183,179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373,  366, 10,
-  652,346,171,168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368,  362,  6,
-  648,322,316,312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364,  359,  4,
-  620,300,296,294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361,  357,  2,
- 1033,280,278,274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358,  356,  0,
-   43, 20, 19, 17,  15,  13,  11,   9,   7,   6,   4,   7,   5,   3,    1,  3};
-
-static const short      t32HB[]   = {
-  1 << 0,  5 << 1,  4 << 1,  5 << 2,  6 << 1,  5 << 2,  4 << 2,  4 << 3,
-  7 << 1,  3 << 2,  6 << 2,  0 << 3,  7 << 2,  2 << 3,  3 << 3,  1 << 4};
-
-static const short      t33HB[]   = {
- 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2,  9 << 2,  8 << 3,
-  7 << 1,  6 << 2,  5 << 2,  4 << 3,  3 << 2,  2 << 3,  1 << 3,  0 << 4};
-
-
-const  char t1l[] = {
- 1,  4, 
- 3,  5};
-
-const  char t2l[] = {
- 1,  4,  7, 
- 4,  5,  7, 
- 6,  7,  8};
-
-const  char t3l[] = {
- 2,  3,  7, 
- 4,  4,  7, 
- 6,  7,  8};
-
-const  char t5l[] = {
- 1,  4,  7,  8, 
- 4,  5,  8,  9, 
- 7,  8,  9, 10, 
- 8,  8,  9, 10};
-
-const  char t6l[] = {
- 3,  4,  6,  8, 
- 4,  4,  6,  7, 
- 5,  6,  7,  8, 
- 7,  7,  8,  9};
-
-const  char t7l[] = {
- 1,  4,  7,  9,  9, 10, 
- 4,  6,  8,  9,  9, 10, 
- 7,  7,  9, 10, 10, 11, 
- 8,  9, 10, 11, 11, 11, 
- 8,  9, 10, 11, 11, 12, 
- 9, 10, 11, 12, 12, 12};
-
-const  char t8l[] = {
- 2,  4,  7,  9,  9, 10, 
- 4,  4,  6, 10, 10, 10, 
- 7,  6,  8, 10, 10, 11, 
- 9, 10, 10, 11, 11, 12, 
- 9,  9, 10, 11, 12, 12, 
-10, 10, 11, 11, 13, 13};
-
-const  char t9l[] = {
- 3,  4,  6,  7,  9, 10, 
- 4,  5,  6,  7,  8, 10, 
- 5,  6,  7,  8,  9, 10, 
- 7,  7,  8,  9,  9, 10, 
- 8,  8,  9,  9, 10, 11, 
- 9,  9, 10, 10, 11, 11};
-
-const  char t10l[] = {
- 1,  4,  7,  9, 10, 10, 10, 11, 
- 4,  6,  8,  9, 10, 11, 10, 10, 
- 7,  8,  9, 10, 11, 12, 11, 11, 
- 8,  9, 10, 11, 12, 12, 11, 12, 
- 9, 10, 11, 12, 12, 12, 12, 12, 
-10, 11, 12, 12, 13, 13, 12, 13, 
- 9, 10, 11, 12, 12, 12, 13, 13, 
-10, 10, 11, 12, 12, 13, 13, 13};
-
-const  char t11l[] = {
- 2,  4,  6,  8,  9, 10,  9, 10, 
- 4,  5,  6,  8, 10, 10,  9, 10, 
- 6,  7,  8,  9, 10, 11, 10, 10, 
- 8,  8,  9, 11, 10, 12, 10, 11, 
- 9, 10, 10, 11, 11, 12, 11, 12, 
- 9, 10, 11, 12, 12, 13, 12, 13, 
- 9,  9,  9, 10, 11, 12, 12, 12, 
- 9,  9, 10, 11, 12, 12, 12, 12};
-
-const  char t12l[] = {
- 4,  4,  6,  8,  9, 10, 10, 10, 
- 4,  5,  6,  7,  9,  9, 10, 10, 
- 6,  6,  7,  8,  9, 10,  9, 10, 
- 7,  7,  8,  8,  9, 10, 10, 10, 
- 8,  8,  9,  9, 10, 10, 10, 11, 
- 9,  9, 10, 10, 10, 11, 10, 11, 
- 9,  9,  9, 10, 10, 11, 11, 12, 
-10, 10, 10, 11, 11, 11, 11, 12};
-
-const  char t13l[] = {
- 1,  5,  7,  8,  9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14, 
- 4,  6,  8,  9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14, 
- 7,  8,  9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15, 
- 8,  9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, 
- 9,  9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16, 
-10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16, 
-10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 
-11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18, 
-10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17, 
-11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17, 
-11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19, 
-12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18, 
-12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18, 
-13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18, 
-14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18, 
-13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18};
-
-const  char t15l[] = {
- 3,  5,  6,  8,  8,  9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14, 
- 5,  5,  7,  8,  9,  9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 
- 6,  7,  7,  8,  9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 
- 7,  8,  8,  9,  9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 
- 8,  8,  9,  9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 
- 9,  9,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14, 
-10,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 
-10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14, 
-10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 
-10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 
-11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14, 
-11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 
-12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 
-12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15, 
-13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15};
-
-const  char t16_5l[] = {
- 1,  5,  7,  9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11, 
- 4,  6,  8,  9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11, 
- 7,  8,  9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12, 
- 9,  9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13, 
-10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12, 
-10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13, 
-11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13, 
-11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13, 
-11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13, 
-12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14, 
-12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13, 
-13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14, 
-13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14, 
-15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14, 
-14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14, 
-11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12};
-
-const  char t16l[] = {
- 1,  5,  7,  9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10, 
- 4,  6,  8,  9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10, 
- 7,  8,  9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11, 
- 9,  9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12, 
-10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11, 
-10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12, 
-11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12, 
-11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12, 
-11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12, 
-12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13, 
-12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12, 
-13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13, 
-13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13, 
-15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13, 
-14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13, 
-10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10};
-
-const  char t24l[] = {
- 4,  5,  7,  8,  9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10, 
- 5,  6,  7,  8,  9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10, 
- 7,  7,  8,  9,  9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13,  9, 
- 8,  8,  9,  9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12,  9, 
- 9,  9,  9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13,  9, 
-10,  9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12,  9, 
-10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13,  9, 
-11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10, 
-11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10, 
-11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10, 
-12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, 
-12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, 
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10, 
-12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10, 
-13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10, 
- 9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10,  6};
-
-const  char t32l[]  = {
-  1+0,  4+1,  4+1,  5+2,  4+1,  6+2,  5+2,  6+3,
-  4+1,  5+2,  5+2,  6+3,  5+2,  6+3,  6+3,  6+4};
-
-const  char t33l[]  = {
-  4+0,  4+1,  4+1,  4+2,  4+1,  4+2,  4+2,  4+3,
-  4+1,  4+2,  4+2,  4+3,  4+2,  4+3,  4+3,  4+4};
-
-
-const struct huffcodetab ht[HTN] =
-{
-  /* xlen, linmax, table, hlen */
-  { 0,   0,NULL,NULL},
-  { 2,   0,t1HB, t1l},
-  { 3,   0,t2HB, t2l},
-  { 3,   0,t3HB, t3l},
-  { 0,   0,NULL,NULL},/* Apparently not used */
-  { 4,   0,t5HB, t5l},
-  { 4,   0,t6HB, t6l},
-  { 6,   0,t7HB, t7l},
-  { 6,   0,t8HB, t8l},
-  { 6,   0,t9HB, t9l},
-  { 8,   0,t10HB, t10l},
-  { 8,   0,t11HB, t11l},
-  { 8,   0,t12HB, t12l},
-  {16,   0,t13HB, t13l},
-  { 0,   0,NULL,  t16_5l},/* Apparently not used */
-  {16,   0,t15HB, t15l},
-
-  { 1,   1,t16HB, t16l},
-  { 2,   3,t16HB, t16l},
-  { 3,   7,t16HB, t16l},
-  { 4,  15,t16HB, t16l},
-  { 6,  63,t16HB, t16l},
-  { 8, 255,t16HB, t16l},
-  {10,1023,t16HB, t16l},
-  {13,8191,t16HB, t16l},
-
-  { 4,  15,t24HB, t24l},
-  { 5,  31,t24HB, t24l},
-  { 6,  63,t24HB, t24l},
-  { 7, 127,t24HB, t24l},
-  { 8, 255,t24HB, t24l},
-  { 9, 511,t24HB, t24l},
-  {11,2047,t24HB, t24l},
-  {13,8191,t24HB, t24l},
-
-  { 0,   0,t32HB, t32l},
-  { 0,   0,t33HB, t33l},
-};
-
-
-
-
-
-/*  for (i = 0; i < 16*16; i++) {
- *      largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];
- *  }
- */
-const unsigned int largetbl[16*16] = {
-0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,
-0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,
-0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,
-0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,
-0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,
-0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,
-0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,
-0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,
-0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,
-0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,
-0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,
-0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,
-0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,
-0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,
-0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,
-0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,
-0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,
-0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,
-0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,
-0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,
-0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,
-0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,
-0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,
-0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,
-0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,
-0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,
-0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,
-0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,
-0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,
-0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,
-0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,
-0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006
-};
-
-/*  for (i = 0; i < 3*3; i++) {
- *      table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];
- *  }
- */
-const unsigned int table23[3*3] = {
-0x010002, 0x040003, 0x070007,
-0x040004, 0x050004, 0x070007, 
-0x060006, 0x070007, 0x080008
-};
-
-/*   for (i = 0; i < 4*4; i++) {
- *       table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];
- *   }
- */
-const unsigned int table56[4*4] = {
-0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,
-0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009
-};
-
-
-
-/* 
- * 0: MPEG-2 LSF
- * 1: MPEG-1
- * 2: MPEG-2.5 LSF FhG extention                  (1995-07-11 shn)
- */
-
-typedef enum {
-    MPEG_2  = 0,
-    MPEG_1  = 1,
-    MPEG_25 = 2
-} MPEG_t;
- 
-const int  bitrate_table    [3] [16] = {
-    { 0,  8, 16, 24, 32, 40, 48, 56,  64,  80,  96, 112, 128, 144, 160, -1 },
-    { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1 },
-    { 0,  8, 16, 24, 32, 40, 48, 56,  64,  80,  96, 112, 128, 144, 160, -1 },
-};
-
-const int  samplerate_table [3]  [4] = { 
-    { 22050, 24000, 16000, -1 },
-    { 44100, 48000, 32000, -1 },
-    { 11025, 12000,  8000, -1 },
-};
-
-const char* version_string  [3] = { "2", "1", "2.5" };
-
-const unsigned  header_word [3] = { 0xFFF00000, 0xFFF80000, 0xFFE00000 };
-
-/* end of tables.h */
--- a/sys/src/games/mp3enc/tables.h
+++ /dev/null
@@ -1,90 +1,0 @@
-/*
- *	MPEG layer 3 tables include file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_TABLES_H
-#define LAME_TABLES_H
-
-#include "machine.h"
-
-typedef struct {
-    unsigned char  no;
-    unsigned char  width;
-    unsigned char  minval_2;
-    float          quiet_thr;
-    float          norm;
-    float          bark;
-} type1_t;
-
-typedef struct {
-    unsigned char  no;
-    unsigned char  width;
-    float          quiet_thr;
-    float          norm;
-    float          SNR;
-    float          bark;
-} type2_t;
-
-typedef struct {
-    unsigned int  no     :  5;
-    unsigned int  cbw    :  3;
-    unsigned int  bu     :  6;
-    unsigned int  bo     :  6;
-    unsigned int  w1_576 : 10;
-    unsigned int  w2_576 : 10;
-} type34_t;
-
-typedef struct {
-    size_t                 len1;
-    const type1_t*  const  tab1;
-    size_t                 len2;
-    const type2_t*  const  tab2;
-    size_t                 len3;
-    const type34_t* const  tab3;
-    size_t                 len4;
-    const type34_t* const  tab4;
-} type5_t;
-
-extern const type5_t  table5 [6];
-
-
-
-#define HTN	34
- 
-struct huffcodetab {
-    const int    xlen; 	        /* max. x-index+			*/ 
-    const int    linmax;	/* max number to be stored in linbits	*/
-    const short*   table;	        /* pointer to array[xlen][ylen]		*/
-    const char*  hlen;	        /* pointer to array[xlen][ylen]		*/
-};
-
-extern const struct huffcodetab ht [HTN];
-    /* global memory block			*/
-    /* array of all huffcodtable headers	*/
-    /* 0..31 Huffman code table 0..31		*/
-    /* 32,33 count1-tables			*/
-
-extern const char t32l [];
-extern const char t33l [];
-
-extern const unsigned int   largetbl    [16*16];
-extern const unsigned int   table23       [3*3];
-extern const unsigned int   table56       [4*4];
-#endif /* LAME_TABLES_H */
--- a/sys/src/games/mp3enc/takehiro.c
+++ /dev/null
@@ -1,1010 +1,0 @@
-/*
- *	MP3 huffman table selecting and bit counting
- *
- *	Copyright (c) 1999 Takehiro TOMINAGA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: takehiro.c,v 1.18 2001/02/27 09:59:18 robert Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include "util.h"
-#include "l3side.h"
-#include "tables.h"
-#include "quantize_pvt.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-static const struct
-{
-    const int region0_count;
-    const int region1_count;
-} subdv_table[ 23 ] =
-{
-{0, 0}, /* 0 bands */
-{0, 0}, /* 1 bands */
-{0, 0}, /* 2 bands */
-{0, 0}, /* 3 bands */
-{0, 0}, /* 4 bands */
-{0, 1}, /* 5 bands */
-{1, 1}, /* 6 bands */
-{1, 1}, /* 7 bands */
-{1, 2}, /* 8 bands */
-{2, 2}, /* 9 bands */
-{2, 3}, /* 10 bands */
-{2, 3}, /* 11 bands */
-{3, 4}, /* 12 bands */
-{3, 4}, /* 13 bands */
-{3, 4}, /* 14 bands */
-{4, 5}, /* 15 bands */
-{4, 5}, /* 16 bands */
-{4, 6}, /* 17 bands */
-{5, 6}, /* 18 bands */
-{5, 6}, /* 19 bands */
-{5, 7}, /* 20 bands */
-{6, 7}, /* 21 bands */
-{6, 7}, /* 22 bands */
-};
-
-
-
-
-/*************************************************************************/
-/*	      ix_max							 */
-/*************************************************************************/
-
-int 
-ix_max(const int *ix, const int *end)
-{
-    int max1 = 0, max2 = 0;
-
-    do {
-	int x1 = *ix++;
-	int x2 = *ix++;
-	if (max1 < x1) 
-	    max1 = x1;
-
-	if (max2 < x2) 
-	    max2 = x2;
-    } while (ix < end);
-    if (max1 < max2) 
-	max1 = max2;
-    return max1;
-}
-
-int
-count_bit_ESC( 
-    const int *       ix, 
-    const int * const end, 
-          int         t1,
-    const int         t2,
-          int * const s )
-{
-    /* ESC-table is used */
-    int linbits = ht[t1].xlen * 65536 + ht[t2].xlen;
-    int sum = 0, sum2;
-
-    do {
-	int x = *ix++;
-	int y = *ix++;
-
-	if (x != 0) {
-	    if (x > 14) {
-		x = 15;
-		sum += linbits;
-	    }
-	    x *= 16;
-	}
-
-	if (y != 0) {
-	    if (y > 14) {
-		y = 15;
-		sum += linbits;
-	    }
-	    x += y;
-	}
-
-	sum += largetbl[x];
-    } while (ix < end);
-
-    sum2 = sum & 0xffff;
-    sum >>= 16;
-
-    if (sum > sum2) {
-	sum = sum2;
-	t1 = t2;
-    }
-
-    *s += sum;
-    return t1;
-}
-
-
-inline static int
-count_bit_noESC(const int * ix, const int * const end, int * const s)
-{
-    /* No ESC-words */
-    int	sum1 = 0;
-    const char *hlen1 = ht[1].hlen;
-
-    do {
-	int x = ix[0] * 2 + ix[1];
-	ix += 2;
-	sum1 += hlen1[x];
-    } while (ix < end);
-
-    *s += sum1;
-    return 1;
-}
-
-
-
-inline static int
-count_bit_noESC_from2(
-    const int *       ix, 
-    const int * const end,
-          int         t1,
-          int * const s )
-{
-    /* No ESC-words */
-    unsigned int sum = 0, sum2;
-    const int xlen = ht[t1].xlen;
-    const unsigned int *hlen;
-    if (t1 == 2)
-	hlen = table23;
-    else
-	hlen = table56;
-
-    do {
-	int x = ix[0] * xlen + ix[1];
-	ix += 2;
-	sum += hlen[x];
-    } while (ix < end);
-
-    sum2 = sum & 0xffff;
-    sum >>= 16;
-
-    if (sum > sum2) {
-	sum = sum2;
-	t1++;
-    }
-
-    *s += sum;
-    return t1;
-}
-
-
-inline static int
-count_bit_noESC_from3(
-    const int *       ix, 
-    const int * const end,
-          int         t1,
-          int * const s )
-{
-    /* No ESC-words */
-    int	sum1 = 0;
-    int	sum2 = 0;
-    int	sum3 = 0;
-    const int xlen = ht[t1].xlen;
-    const char *hlen1 = ht[t1].hlen;
-    const char *hlen2 = ht[t1+1].hlen;
-    const char *hlen3 = ht[t1+2].hlen;
-    int t;
-
-    do {
-	int x = ix[0] * xlen + ix[1];
-	ix += 2;
-	sum1 += hlen1[x];
-	sum2 += hlen2[x];
-	sum3 += hlen3[x];
-    } while (ix < end);
-
-    t = t1;
-    if (sum1 > sum2) {
-	sum1 = sum2;
-	t++;
-    }
-    if (sum1 > sum3) {
-	sum1 = sum3;
-	t = t1+2;
-    }
-    *s += sum1;
-
-    return t;
-}
-
-
-/*************************************************************************/
-/*	      choose table						 */
-/*************************************************************************/
-
-/*
-  Choose the Huffman table that will encode ix[begin..end] with
-  the fewest bits.
-
-  Note: This code contains knowledge about the sizes and characteristics
-  of the Huffman tables as defined in the IS (Table B.7), and will not work
-  with any arbitrary tables.
-*/
-
-static int
-choose_table_nonMMX(
-    const int *       ix, 
-    const int * const end,
-          int * const s )
-{
-    int max;
-    int choice, choice2;
-    static const int huf_tbl_noESC[] = {
-	1, 2, 5, 7, 7,10,10,13,13,13,13,13,13,13,13 /* char not enough ? */
-    };
-
-    max = ix_max(ix, end);
-
-    switch (max) {
-    case 0:
-	return max;
-
-    case 1:
-	return count_bit_noESC(ix, end, s);
-
-    case 2:
-    case 3:
-	return count_bit_noESC_from2(ix, end, huf_tbl_noESC[max - 1], s);
-
-    case 4: case 5: case 6:
-    case 7: case 8: case 9:
-    case 10: case 11: case 12:
-    case 13: case 14: case 15:
-	return count_bit_noESC_from3(ix, end, huf_tbl_noESC[max - 1], s);
-
-    default:
-	/* try tables with linbits */
-	if (max > IXMAX_VAL) {
-	    *s = LARGE_BITS;
-	    return -1;
-	}
-	max -= 15;
-	for (choice2 = 24; choice2 < 32; choice2++) {
-	    if (ht[choice2].linmax >= max) {
-		break;
-	    }
-	}
-
-	for (choice = choice2 - 8; choice < 24; choice++) {
-	    if (ht[choice].linmax >= max) {
-		break;
-	    }
-	}
-	return count_bit_ESC(ix, end, choice, choice2, s);
-    }
-}
-
-
-
-/*************************************************************************/
-/*	      count_bit							 */
-/*************************************************************************/
-
-/*
- Function: Count the number of bits necessary to code the subregion. 
-*/
-
-
-int count_bits_long(lame_internal_flags * const gfc, const int ix[576], gr_info * const gi)
-{
-    int i, a1, a2;
-    int bits = 0;
-
-    i=576;
-    /* Determine count1 region */
-    for (; i > 1; i -= 2) 
-	if (ix[i - 1] | ix[i - 2])
-	    break;
-    gi->count1 = i;
-
-    /* Determines the number of bits to encode the quadruples. */
-    a1 = a2 = 0;
-    for (; i > 3; i -= 4) {
-	int p;
-	/* hack to check if all values <= 1 */
-	if ((unsigned int)(ix[i-1] | ix[i-2] | ix[i-3] | ix[i-4]) > 1)
-	    break;
-
-	p = ((ix[i-4] * 2 + ix[i-3]) * 2 + ix[i-2]) * 2 + ix[i-1];
-	a1 += t32l[p];
-	a2 += t33l[p];
-    }
-
-    bits = a1;
-    gi->count1table_select = 0;
-    if (a1 > a2) {
-	bits = a2;
-	gi->count1table_select = 1;
-    }
-
-    gi->count1bits = bits;
-    gi->big_values = i;
-    if (i == 0)
-	return bits;
-
-    if (gi->block_type == SHORT_TYPE) {
-      a1=3*gfc->scalefac_band.s[3];
-      if (a1 > gi->big_values) a1 = gi->big_values;
-      a2 = gi->big_values;
-
-    }else if (gi->block_type == NORM_TYPE) {
-	assert(i <= 576); /* bv_scf has 576 entries (0..575) */
-        a1 = gi->region0_count = gfc->bv_scf[i-2];
-	a2 = gi->region1_count = gfc->bv_scf[i-1];
-
-//	assert(a1+a2+2 < SBPSY_l);
-        a2 = gfc->scalefac_band.l[a1 + a2 + 2];
-	a1 = gfc->scalefac_band.l[a1 + 1];
-	if (a2 < i)
-	  gi->table_select[2] = gfc->choose_table(ix + a2, ix + i, &bits);
-
-    } else {
-	gi->region0_count = 7;
-	/*gi->region1_count = SBPSY_l - 7 - 1;*/
-	gi->region1_count = SBMAX_l -1 - 7 - 1;
-	a1 = gfc->scalefac_band.l[7 + 1];
-	a2 = i;
-	if (a1 > a2) {
-	    a1 = a2;
-	}
-    }
-
-
-    /* have to allow for the case when bigvalues < region0 < region1 */
-    /* (and region0, region1 are ignored) */
-    a1 = Min(a1,i);
-    a2 = Min(a2,i);
-    
-//	assert( a1 >= 0 );
-//	assert( a2 >= 0 );
-
-    /* Count the number of bits necessary to code the bigvalues region. */
-    if (0 < a1)
-      gi->table_select[0] = gfc->choose_table(ix, ix + a1, &bits);
-    if (a1 < a2)
-      gi->table_select[1] = gfc->choose_table(ix + a1, ix + a2, &bits);
-    return bits;
-}
-
-
-
-
-
-int count_bits(
-          lame_internal_flags * const gfc, 
-          int     * const ix,
-    const FLOAT8  * const xr,
-          gr_info * const cod_info)  
-{
-  int bits=0,i;
-  /* since quantize_xrpow uses table lookup, we need to check this first: */
-  FLOAT8 w = (IXMAX_VAL) / IPOW20(cod_info->global_gain);
-  for ( i = 0; i < 576; i++ )  {
-    if (xr[i] > w)
-      return LARGE_BITS;
-  }
-
-  if (gfc->quantization) 
-    quantize_xrpow(xr, ix, IPOW20(cod_info->global_gain));
-  else
-    quantize_xrpow_ISO(xr, ix, IPOW20(cod_info->global_gain));
-
-  bits=count_bits_long(gfc, ix, cod_info);
-
-  return bits;
-}
-
-/***********************************************************************
-  re-calculate the best scalefac_compress using scfsi
-  the saved bits are kept in the bit reservoir.
- **********************************************************************/
-
-
-inline static void
-recalc_divide_init(
-    const lame_internal_flags * const gfc,
-          gr_info         cod_info,
-          int     * const ix,
-          int             r01_bits[],
-          int             r01_div [],
-          int             r0_tbl  [],
-          int             r1_tbl  [] )
-{
-    int r0, r1, bigv, r0t, r1t, bits;
-
-    bigv = cod_info.big_values;
-
-    for (r0 = 0; r0 <= 7 + 15; r0++) {
-	r01_bits[r0] = LARGE_BITS;
-    }
-
-    for (r0 = 0; r0 < 16; r0++) {
-	int a1 = gfc->scalefac_band.l[r0 + 1], r0bits;
-	if (a1 >= bigv)
-	    break;
-	r0bits = cod_info.part2_length;
-	r0t = gfc->choose_table(ix, ix + a1, &r0bits);
-
-	for (r1 = 0; r1 < 8; r1++) {
-	    int a2 = gfc->scalefac_band.l[r0 + r1 + 2];
-	    if (a2 >= bigv)
-		break;
-
-	    bits = r0bits;
-	    r1t = gfc->choose_table(ix + a1, ix + a2, &bits);
-	    if (r01_bits[r0 + r1] > bits) {
-		r01_bits[r0 + r1] = bits;
-		r01_div[r0 + r1] = r0;
-		r0_tbl[r0 + r1] = r0t;
-		r1_tbl[r0 + r1] = r1t;
-	    }
-	}
-    }
-}
-
-inline static void
-recalc_divide_sub(
-    const lame_internal_flags * const gfc,
-    const gr_info         cod_info2,
-          gr_info * const gi,
-    const int     * const ix,
-    const int             r01_bits[],
-    const int             r01_div [],
-    const int             r0_tbl  [],
-    const int             r1_tbl  [] )
-{
-    int bits, r2, a2, bigv, r2t;
-
-    bigv = cod_info2.big_values;
-
-    for (r2 = 2; r2 < SBMAX_l + 1; r2++) {
-	a2 = gfc->scalefac_band.l[r2];
-	if (a2 >= bigv) 
-	    break;
-
-	bits = r01_bits[r2 - 2] + cod_info2.count1bits;
-	if (gi->part2_3_length <= bits)
-	    break;
-
-	r2t = gfc->choose_table(ix + a2, ix + bigv, &bits);
-	if (gi->part2_3_length <= bits)
-	    continue;
-
-	memcpy(gi, &cod_info2, sizeof(gr_info));
-	gi->part2_3_length = bits;
-	gi->region0_count = r01_div[r2 - 2];
-	gi->region1_count = r2 - 2 - r01_div[r2 - 2];
-	gi->table_select[0] = r0_tbl[r2 - 2];
-	gi->table_select[1] = r1_tbl[r2 - 2];
-	gi->table_select[2] = r2t;
-    }
-}
-
-
-
-
-void best_huffman_divide(
-    const lame_internal_flags * const gfc,
-    const int             gr, 
-    const int             ch,
-          gr_info * const gi,
-          int     * const ix )
-{
-    int i, a1, a2;
-    gr_info cod_info2;
-
-    int r01_bits[7 + 15 + 1];
-    int r01_div[7 + 15 + 1];
-    int r0_tbl[7 + 15 + 1];
-    int r1_tbl[7 + 15 + 1];
-
-
-    /* SHORT BLOCK stuff fails for MPEG2 */ 
-    if (gi->block_type == SHORT_TYPE && gfc->mode_gr==1) 
-          return;
-
-
-    memcpy(&cod_info2, gi, sizeof(gr_info));
-    if (gi->block_type == NORM_TYPE) {
-	recalc_divide_init(gfc, cod_info2, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
-	recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
-    }
-
-    i = cod_info2.big_values;
-    if (i == 0 || (unsigned int)(ix[i-2] | ix[i-1]) > 1)
-	return;
-
-    i = gi->count1 + 2;
-    if (i > 576)
-	return;
-
-    /* Determines the number of bits to encode the quadruples. */
-    memcpy(&cod_info2, gi, sizeof(gr_info));
-    cod_info2.count1 = i;
-    a1 = a2 = 0;
-
-    assert(i <= 576);
-    
-    for (; i > cod_info2.big_values; i -= 4) {
-	int p = ((ix[i-4] * 2 + ix[i-3]) * 2 + ix[i-2]) * 2 + ix[i-1];
-	a1 += t32l[p];
-	a2 += t33l[p];
-    }
-    cod_info2.big_values = i;
-
-    cod_info2.count1table_select = 0;
-    if (a1 > a2) {
-	a1 = a2;
-	cod_info2.count1table_select = 1;
-    }
-
-    cod_info2.count1bits = a1;
-    cod_info2.part2_3_length = a1 + cod_info2.part2_length;
-
-    if (cod_info2.block_type == NORM_TYPE)
-	recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
-    else {
-	/* Count the number of bits necessary to code the bigvalues region. */
-	a1 = gfc->scalefac_band.l[7 + 1];
-	if (a1 > i) {
-	    a1 = i;
-	}
-	if (a1 > 0)
-	  cod_info2.table_select[0] =
-	    gfc->choose_table(ix, ix + a1, (int *)&cod_info2.part2_3_length);
-	if (i > a1)
-	  cod_info2.table_select[1] =
-	    gfc->choose_table(ix + a1, ix + i, (int *)&cod_info2.part2_3_length);
-	if (gi->part2_3_length > cod_info2.part2_3_length)
-	    memcpy(gi, &cod_info2, sizeof(gr_info));
-    }
-}
-
-static const int slen1_n[16] = { 1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8,16,16 };
-static const int slen2_n[16] = { 1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 };
-
-void
-scfsi_calc(int ch,
-	   III_side_info_t *l3_side,
-	   III_scalefac_t scalefac[2][2])
-{
-    int i, s1, s2, c1, c2;
-    int sfb;
-    gr_info *gi = &l3_side->gr[1].ch[ch].tt;
-
-    static const int scfsi_band[5] = { 0, 6, 11, 16, 21 };
-#if 0
-    static const int slen1_n[16] = { 0, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8,16,16 };
-    static const int slen2_n[16] = { 0, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 };
-#endif
-
-    for (i = 0; i < 4; i++) 
-	l3_side->scfsi[ch][i] = 0;
-
-    for (i = 0; i < (sizeof(scfsi_band) / sizeof(int)) - 1; i++) {
-	for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1]; sfb++) {
-	    if (scalefac[0][ch].l[sfb] != scalefac[1][ch].l[sfb])
-		break;
-	}
-	if (sfb == scfsi_band[i + 1]) {
-	    for (sfb = scfsi_band[i]; sfb < scfsi_band[i + 1]; sfb++) {
-		scalefac[1][ch].l[sfb] = -1;
-	    }
-	    l3_side->scfsi[ch][i] = 1;
-	}
-    }
-
-    s1 = c1 = 0;
-    for (sfb = 0; sfb < 11; sfb++) {
-	if (scalefac[1][ch].l[sfb] < 0)
-	    continue;
-	c1++;
-	if (s1 < scalefac[1][ch].l[sfb])
-	    s1 = scalefac[1][ch].l[sfb];
-    }
-
-    s2 = c2 = 0;
-    for (; sfb < SBPSY_l; sfb++) {
-	if (scalefac[1][ch].l[sfb] < 0)
-	    continue;
-	c2++;
-	if (s2 < scalefac[1][ch].l[sfb])
-	    s2 = scalefac[1][ch].l[sfb];
-    }
-
-    for (i = 0; i < 16; i++) {
-	if (s1 < slen1_n[i] && s2 < slen2_n[i]) {
-	    int c = slen1_tab[i] * c1 + slen2_tab[i] * c2;
-	    if (gi->part2_length > c) {
-		gi->part2_length = c;
-		gi->scalefac_compress = i;
-	    }
-	}
-    }
-}
-
-/*
-Find the optimal way to store the scalefactors.
-Only call this routine after final scalefactors have been
-chosen and the channel/granule will not be re-encoded.
- */
-void best_scalefac_store(
-    const lame_internal_flags *gfc,
-    const int             gr,
-    const int             ch,
-          int             l3_enc[2][2][576],
-          III_side_info_t * const l3_side,
-          III_scalefac_t          scalefac[2][2] )
-{
-
-    /* use scalefac_scale if we can */
-    gr_info *gi = &l3_side->gr[gr].ch[ch].tt;
-    int sfb,i,j,j2,l,start,end;
-
-    /* remove scalefacs from bands with ix=0.  This idea comes
-     * from the AAC ISO docs.  added mt 3/00 */
-    /* check if l3_enc=0 */
-    for ( sfb = 0; sfb < gi->sfb_lmax; sfb++ ) {
-      if (scalefac[gr][ch].l[sfb]>0) { 
-	start = gfc->scalefac_band.l[ sfb ];
-	end   = gfc->scalefac_band.l[ sfb+1 ];
-	for ( l = start; l < end; l++ ) if (l3_enc[gr][ch][l]!=0) break;
-	if (l==end) scalefac[gr][ch].l[sfb]=0;
-      }
-    }
-    for ( j=0, sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++ ) {
-	start = gfc->scalefac_band.s[ sfb ];
-	end   = gfc->scalefac_band.s[ sfb+1 ];
-	for ( i = 0; i < 3; i++ ) {
-	  if (scalefac[gr][ch].s[sfb][i]>0) {
-	    j2 = j;
-	    for ( l = start; l < end; l++ ) 
-	      if (l3_enc[gr][ch][j2++ /*3*l+i*/]!=0) break;
-	    if (l==end) scalefac[gr][ch].s[sfb][i]=0;
-	  }
-	  j += end-start;
-	}
-    }
-
-
-    gi->part2_3_length -= gi->part2_length;
-    if (!gi->scalefac_scale && !gi->preflag) {
-	int b, s = 0;
-	for (sfb = 0; sfb < gi->sfb_lmax; sfb++) {
-	    s |= scalefac[gr][ch].l[sfb];
-	}
-
-	for (sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++) {
-	    for (b = 0; b < 3; b++) {
-		s |= scalefac[gr][ch].s[sfb][b];
-	    }
-	}
-
-	if (!(s & 1) && s != 0) {
-	    for (sfb = 0; sfb < gi->sfb_lmax; sfb++) {
-		scalefac[gr][ch].l[sfb] /= 2;
-	    }
-	    for (sfb = gi->sfb_smin; sfb < SBPSY_s; sfb++) {
-		for (b = 0; b < 3; b++) {
-		    scalefac[gr][ch].s[sfb][b] /= 2;
-		}
-	    }
-
-	    gi->scalefac_scale = 1;
-	    gi->part2_length = 99999999;
-	    if (gfc->mode_gr == 2) {
-	        scale_bitcount(&scalefac[gr][ch], gi);
-	    } else {
-		scale_bitcount_lsf(gfc,&scalefac[gr][ch], gi);
-	    }
-	}
-    }
-
-
-    for ( i = 0; i < 4; i++ )
-      l3_side->scfsi[ch][i] = 0;
-
-    if (gfc->mode_gr==2 && gr == 1
-	&& l3_side->gr[0].ch[ch].tt.block_type != SHORT_TYPE
-	&& l3_side->gr[1].ch[ch].tt.block_type != SHORT_TYPE) {
-      	scfsi_calc(ch, l3_side, scalefac);
-    }
-    gi->part2_3_length += gi->part2_length;
-}
-
-
-/* number of bits used to encode scalefacs */
-
-/* 18*slen1_tab[i] + 18*slen2_tab[i] */
-static const int scale_short[16] = {
-    0, 18, 36, 54, 54, 36, 54, 72, 54, 72, 90, 72, 90, 108, 108, 126 };
-
-/* 17*slen1_tab[i] + 18*slen2_tab[i] */
-static const int scale_mixed[16] = {
-    0, 18, 36, 54, 51, 35, 53, 71, 52, 70, 88, 69, 87, 105, 104, 122 };
-
-/* 11*slen1_tab[i] + 10*slen2_tab[i] */
-static const int scale_long[16] = {
-    0, 10, 20, 30, 33, 21, 31, 41, 32, 42, 52, 43, 53, 63, 64, 74 };
-
-
-/*************************************************************************/
-/*            scale_bitcount                                             */
-/*************************************************************************/
-
-/* Also calculates the number of bits necessary to code the scalefactors. */
-
-int scale_bitcount( 
-    III_scalefac_t * const scalefac, gr_info * const cod_info)
-{
-    int i, k, sfb, max_slen1 = 0, max_slen2 = 0, ep = 2;
-
-    /* maximum values */
-    const int *tab;
-
-
-    if ( cod_info->block_type == SHORT_TYPE ) {
-	tab = scale_short;
-	if (cod_info->mixed_block_flag) {
-	    tab = scale_mixed;
-	    for ( sfb = 0 ; sfb < cod_info->sfb_lmax; sfb++ )
-		if (max_slen1 < scalefac->l[sfb])
-		    max_slen1 = scalefac->l[sfb];
-	}
-
-	for ( i = 0; i < 3; i++ ) {
-	    for ( sfb = cod_info->sfb_smin; sfb < 6; sfb++ )
-		if (max_slen1 < scalefac->s[sfb][i])
-		    max_slen1 = scalefac->s[sfb][i];
-	    for (sfb = 6; sfb < SBPSY_s; sfb++ )
-		if (max_slen2 < scalefac->s[sfb][i])
-		    max_slen2 = scalefac->s[sfb][i];
-	}
-    }
-    else
-    { /* block_type == 1,2,or 3 */
-        tab = scale_long;
-        for ( sfb = 0; sfb < 11; sfb++ )
-            if ( scalefac->l[sfb] > max_slen1 )
-                max_slen1 = scalefac->l[sfb];
-
-	if (!cod_info->preflag) {
-	    for ( sfb = 11; sfb < SBPSY_l; sfb++ )
-		if (scalefac->l[sfb] < pretab[sfb])
-		    break;
-
-	    if (sfb == SBPSY_l) {
-		cod_info->preflag = 1;
-		for ( sfb = 11; sfb < SBPSY_l; sfb++ )
-		    scalefac->l[sfb] -= pretab[sfb];
-	    }
-	}
-
-        for ( sfb = 11; sfb < SBPSY_l; sfb++ )
-            if ( scalefac->l[sfb] > max_slen2 )
-                max_slen2 = scalefac->l[sfb];
-    }
-
-
-    /* from Takehiro TOMINAGA <[email protected]> 10/99
-     * loop over *all* posible values of scalefac_compress to find the
-     * one which uses the smallest number of bits.  ISO would stop
-     * at first valid index */
-    cod_info->part2_length = LARGE_BITS;
-    for ( k = 0; k < 16; k++ )
-    {
-        if ( (max_slen1 < slen1_n[k]) && (max_slen2 < slen2_n[k]) &&
-             (cod_info->part2_length > tab[k])) {
-	  cod_info->part2_length=tab[k];
-	  cod_info->scalefac_compress=k;
-	  ep=0;  /* we found a suitable scalefac_compress */
-	}
-    }
-    return ep;
-}
-
-
-
-/*
-  table of largest scalefactor values for MPEG2
-*/
-static const int max_range_sfac_tab[6][4] =
-{
- { 15, 15, 7,  7},
- { 15, 15, 7,  0},
- { 7,  3,  0,  0},
- { 15, 31, 31, 0},
- { 7,  7,  7,  0},
- { 3,  3,  0,  0}
-};
-
-
-
-
-/*************************************************************************/
-/*            scale_bitcount_lsf                                         */
-/*************************************************************************/
-
-/* Also counts the number of bits to encode the scalefacs but for MPEG 2 */ 
-/* Lower sampling frequencies  (24, 22.05 and 16 kHz.)                   */
- 
-/*  This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,     */
-/* "Audio Decoding Layer III"                                            */
-
-int scale_bitcount_lsf(const lame_internal_flags *gfc,
-    const III_scalefac_t * const scalefac, gr_info * const cod_info)
-{
-    int table_number, row_in_table, partition, nr_sfb, window, over;
-    int i, sfb, max_sfac[ 4 ];
-    const int *partition_table;
-
-    /*
-      Set partition table. Note that should try to use table one,
-      but do not yet...
-    */
-    if ( cod_info->preflag )
-	table_number = 2;
-    else
-	table_number = 0;
-
-    for ( i = 0; i < 4; i++ )
-	max_sfac[i] = 0;
-
-    if ( cod_info->block_type == SHORT_TYPE )
-    {
-	    row_in_table = 1;
-	    partition_table = &nr_of_sfb_block[table_number][row_in_table][0];
-	    for ( sfb = 0, partition = 0; partition < 4; partition++ )
-	    {
-		nr_sfb = partition_table[ partition ] / 3;
-		for ( i = 0; i < nr_sfb; i++, sfb++ )
-		    for ( window = 0; window < 3; window++ )
-			if ( scalefac->s[sfb][window] > max_sfac[partition] )
-			    max_sfac[partition] = scalefac->s[sfb][window];
-	    }
-    }
-    else
-    {
-	row_in_table = 0;
-	partition_table = &nr_of_sfb_block[table_number][row_in_table][0];
-	for ( sfb = 0, partition = 0; partition < 4; partition++ )
-	{
-	    nr_sfb = partition_table[ partition ];
-	    for ( i = 0; i < nr_sfb; i++, sfb++ )
-		if ( scalefac->l[sfb] > max_sfac[partition] )
-		    max_sfac[partition] = scalefac->l[sfb];
-	}
-    }
-
-    for ( over = 0, partition = 0; partition < 4; partition++ )
-    {
-	if ( max_sfac[partition] > max_range_sfac_tab[table_number][partition] )
-	    over++;
-    }
-    if ( !over )
-    {
-	/*
-	  Since no bands have been over-amplified, we can set scalefac_compress
-	  and slen[] for the formatter
-	*/
-	static const int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };
-
-	int slen1, slen2, slen3, slen4;
-
-        cod_info->sfb_partition_table = nr_of_sfb_block[table_number][row_in_table];
-	for ( partition = 0; partition < 4; partition++ )
-	    cod_info->slen[partition] = log2tab[max_sfac[partition]];
-
-	/* set scalefac_compress */
-	slen1 = cod_info->slen[ 0 ];
-	slen2 = cod_info->slen[ 1 ];
-	slen3 = cod_info->slen[ 2 ];
-	slen4 = cod_info->slen[ 3 ];
-
-	switch ( table_number )
-	{
-	  case 0:
-	    cod_info->scalefac_compress = (((slen1 * 5) + slen2) << 4)
-		+ (slen3 << 2)
-		+ slen4;
-	    break;
-
-	  case 1:
-	    cod_info->scalefac_compress = 400
-		+ (((slen1 * 5) + slen2) << 2)
-		+ slen3;
-	    break;
-
-	  case 2:
-	    cod_info->scalefac_compress = 500 + (slen1 * 3) + slen2;
-	    break;
-
-	  default:
-	    ERRORF(gfc,"intensity stereo not implemented yet\n" );
-	    break;
-	}
-    }
-#ifdef DEBUG
-    if ( over ) 
-        ERRORF(gfc, "---WARNING !! Amplification of some bands over limits\n" );
-#endif
-    if (!over) {
-      assert( cod_info->sfb_partition_table );     
-      cod_info->part2_length=0;
-      for ( partition = 0; partition < 4; partition++ )
-	cod_info->part2_length += cod_info->slen[partition] * cod_info->sfb_partition_table[partition];
-    }
-    return over;
-}
-
-
-
-void huffman_init(lame_internal_flags * const gfc)
-{
-    int i;
-
-    gfc->choose_table = choose_table_nonMMX;
-    
-#ifdef MMX_choose_table
-    if (gfc->CPU_features.MMX) {
-        extern int choose_table_MMX(const int *ix, const int *end, int *s);
-        gfc->choose_table = choose_table_MMX;
-    }
-#endif
-
-    for (i = 2; i <= 576; i += 2) {
-	int scfb_anz = 0, index;
-	while (gfc->scalefac_band.l[++scfb_anz] < i)
-	    ;
-
-	index = subdv_table[scfb_anz].region0_count;
-	while (gfc->scalefac_band.l[index + 1] > i)
-	    index--;
-
-	if (index < 0) {
-	  /* this is an indication that everything is going to
-	     be encoded as region0:  bigvalues < region0 < region1
-	     so lets set region0, region1 to some value larger
-	     than bigvalues */
-	  index = subdv_table[scfb_anz].region0_count;
-	}
-
-	gfc->bv_scf[i-2] = index;
-
-	index = subdv_table[scfb_anz].region1_count;
-	while (gfc->scalefac_band.l[index + gfc->bv_scf[i-2] + 2] > i)
-	    index--;
-
-	if (index < 0) {
-	  index = subdv_table[scfb_anz].region1_count;
-	}
-
-	gfc->bv_scf[i-1] = index;
-    }
-}
binary files a/sys/src/games/mp3enc/testcase.mp3 /dev/null differ
binary files a/sys/src/games/mp3enc/testcase.wav /dev/null differ
--- a/sys/src/games/mp3enc/timestatus.c
+++ /dev/null
@@ -1,224 +1,0 @@
-/*
- *	time status related function source file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: timestatus.c,v 1.32 2001/03/11 11:24:25 aleidinger Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
- 
-
-/* Hope it works now, otherwise complain or flame ;-)
- */
- 
-
-#if 1
-# define SPEED_CHAR	"x"	/* character x */
-# define SPEED_MULT	1.
-#else
-# define SPEED_CHAR	"%%"
-# define SPEED_MULT	100.
-#endif
-
-#include <assert.h>
-#include <time.h>
-
-#include "lame.h"
-#include "main.h"
-#include "lametime.h"
-#include "timestatus.h"
-
-#if defined(BRHIST)
-# include "brhist.h"
-#endif
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-typedef struct {
-    double  start_time;			  // start time of converting [s]
-    double  elapsed_time;		  // current time - start time [s]
-    double  estimated_time;		  // estimated total duration time [s]
-    double  speed_index;		  // speed relative to realtime coding [100%]
-} timestatus_t;
-
-/* 
- *  Calculates from the input (see below) the following values:
- *    - total estimated time
- *    - a speed index
- */
-
-static void  ts_calc_times (
-    timestatus_t* const  tstime,           // tstime->elapsed_time: elapsed time
-    const int            sample_freq,      // sample frequency [Hz/kHz] 
-    const int            frameNum,         // Number of the current Frame
-    const int            totalframes,      // total umber of Frames
-    const int            framesize )       // Size of a frame [bps/kbps]
-{
-    assert ( sample_freq >= 8000  &&  sample_freq <= 48000 );
-    
-    if ( frameNum > 0  &&  tstime->elapsed_time > 0 ) {
-        tstime->estimated_time = tstime->elapsed_time * totalframes / frameNum;
-        tstime->speed_index    = framesize * frameNum / (sample_freq * tstime->elapsed_time);
-    } else {
-        tstime->estimated_time = 0.;
-        tstime->speed_index    = 0.;
-    }
-}
-
-/* Decomposes a given number of seconds into a easy to read hh:mm:ss format
- * padded with an additional character
- */
-
-static void  ts_time_decompose ( const unsigned long time_in_sec, const char padded_char )
-{
-    const unsigned long hour = time_in_sec / 3600;
-    const unsigned int  min  = time_in_sec / 60 % 60;
-    const unsigned int  sec  = time_in_sec % 60;
-
-    if ( hour == 0 )
-        fprintf ( stderr,    "   %2u:%02u%c",       min, sec, padded_char );
-    else if ( hour < 100 )
-        fprintf ( stderr, "%2lu:%02u:%02u%c", hour, min, sec, padded_char );
-    else
-        fprintf ( stderr,         "%6lu h%c", hour,           padded_char );
-}
-
-void timestatus ( const int samp_rate, 
-                  const int frameNum,
-                  const int totalframes,
-                  const int framesize )
-{
-    static timestatus_t  real_time;
-    static timestatus_t  proc_time;
-    int                  percent;
-    static int           init = 0; /* What happens here? A work around instead of a bug fix ??? */
-
-    if ( frameNum == 0 ) {
-        real_time.start_time = GetRealTime ();
-        proc_time.start_time = GetCPUTime  ();
-    }
-    
-    real_time.elapsed_time = GetRealTime () - real_time.start_time;
-    proc_time.elapsed_time = GetCPUTime  () - proc_time.start_time;
-
-    if ( frameNum == 0 && init == 0 ) {
-        fprintf ( stderr,
-	    "\r"
-	    "    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA \n"
-            "     0/       ( 0%%)|    0:00/     :  |    0:00/     :  |         " SPEED_CHAR "|     :  \r"
-	    /* , Console_IO.str_clreoln, Console_IO.str_clreoln */ );
-	init = 1;
-        return;
-    }  
-    /* reset init counter for next time we are called with frameNum==0 */
-    if (frameNum > 0) 
-        init = 0;
-
-    ts_calc_times ( &real_time, samp_rate, frameNum, totalframes, framesize );
-    ts_calc_times ( &proc_time, samp_rate, frameNum, totalframes, framesize );
-
-    if ( frameNum < totalframes  ) {
-        percent = (int) (100. * frameNum / totalframes + 0.5 );
-    } else {
-        percent = 100;
-    }
-
-    fprintf ( stderr, "\r%6i/%-6i", frameNum, totalframes );
-    fprintf ( stderr, percent < 100 ? " (%2d%%)|" : "(%3.3d%%)|", percent );
-    ts_time_decompose ( (unsigned long)proc_time.elapsed_time  , '/' );
-    ts_time_decompose ( (unsigned long)proc_time.estimated_time, '|' );
-    ts_time_decompose ( (unsigned long)real_time.elapsed_time  , '/' );
-    ts_time_decompose ( (unsigned long)real_time.estimated_time, '|' );
-    fprintf ( stderr, proc_time.speed_index <= 1.  ?  
-              "%9.4f" SPEED_CHAR "|"  :  "%#9.5g" SPEED_CHAR "|",
-	      SPEED_MULT * proc_time.speed_index );
-    ts_time_decompose ( (unsigned long)(real_time.estimated_time - real_time.elapsed_time), ' ' );
-    fflush  ( stderr );
-}
-
-void timestatus_finish ( void )
-{
-    fprintf ( stderr, "\n" );
-    fflush  ( stderr );
-}
-
-void timestatus_klemm ( const lame_global_flags* const gfp )
-{
-    static double  last_time = 0.;
-
-    if ( !silent )
-        if ( gfp->frameNum == 0  ||  
-  	     gfp->frameNum == 9  ||
-  	     GetRealTime () - last_time >= update_interval  ||
-	     GetRealTime () - last_time <  0 ) {
-#ifdef BRHIST
-            brhist_jump_back();
-#endif
-            timestatus ( lame_get_out_samplerate( gfp ),
-                         gfp->frameNum,
-                         gfp->totalframes,
-                         gfp->framesize );
-#ifdef BRHIST
-            if ( brhist ) {
-	        brhist_disp ( gfp );
-	    }
-#endif
-            last_time = GetRealTime ();  /* from now! disp_time seconds */
-        }
-}
-
-/* these functions are used in get_audio.c */
-
-void decoder_progress ( const lame_global_flags* const gfp, const mp3data_struct* const mp3data )
-{
-    static int  last;
-    fprintf ( stderr, "\rFrame#%6i/%-6i %3i kbps",
-              mp3data->framenum, mp3data->totalframes, mp3data->bitrate );
-              
-    // Programmed with a single frame hold delay
-    // Attention: static data
-    
-    // MP2 Playback is still buggy.
-    // "'00' subbands 4-31 in intensity_stereo, bound==4"
-    // is this really intensity_stereo or is it MS stereo?
-    
-    if ( mp3data->mode == JOINT_STEREO ) {
-        int         curr = mp3data->mode_ext;
-        fprintf ( stderr, "  %s  %c" , 
-                  curr&2  ?  last&2 ? " MS " : "LMSR"  :  last&2 ? "LMSR" : "L  R",
-                  curr&1  ?  last&1 ? 'I'    : 'i'     :  last&1 ? 'i'    : ' ' );
-        last = curr;
-    } else {
-        fprintf ( stderr, "         " );
-	last = 0;
-    }
-//    fprintf ( stderr, "%s", Console_IO.str_clreoln );
-      fprintf ( stderr, "        \b\b\b\b\b\b\b\b" );
-      fflush  ( stderr );
-}
-
-void decoder_progress_finish ( const lame_global_flags* const gfp )
-{
-    fprintf ( stderr, "\n" );
-}
-
--- a/sys/src/games/mp3enc/timestatus.h
+++ /dev/null
@@ -1,35 +1,0 @@
-/*
- *	time status related function include file
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_TIMESTATUS_H
-#define LAME_TIMESTATUS_H
-void timestatus_klemm(const lame_global_flags *gfp);
-
-void timestatus ( int samp_rate, 
-                  int frameNum, 
-                  int totalframes, 
-                  int           framesize);
-void timestatus_finish(void);
-
-void decoder_progress(const lame_global_flags *gfp,const mp3data_struct *);
-void decoder_progress_finish(const lame_global_flags *gfp);
-
-#endif /* LAME_TIMESTATUS_H */
--- a/sys/src/games/mp3enc/tools.c
+++ /dev/null
@@ -1,9 +1,0 @@
-/*
- *   Simple LAME context free functions:
- *
- *     - should not contain gfc or gfp
- *     - should not call other functions not defined 
- *       in this module (or libc functions)
- *
- *   Otherwise util.c is the right place.
- */
--- a/sys/src/games/mp3enc/util.c
+++ /dev/null
@@ -1,866 +1,0 @@
-/*
- *	lame utility library source file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: util.c,v 1.67 2001/03/20 00:42:56 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define PRECOMPUTE
-
-#include "util.h"
-#include <ctype.h>
-#include <assert.h>
-#include <stdarg.h>
-
-#if defined(__FreeBSD__) && !defined(__alpha__)
-# include <machine/floatingpoint.h>
-#endif
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-/***********************************************************************
-*
-*  Global Function Definitions
-*
-***********************************************************************/
-/*empty and close mallocs in gfc */
-
-void  freegfc ( lame_internal_flags* const gfc )   /* bit stream structure */
-{
-    int  i;
-
-#ifdef KLEMM_44
-    if (gfc->resample_in != NULL) {
-        resample_close(gfc->resample_in);
-        gfc->resample_in = NULL;
-    }
-    free(gfc->mfbuf[0]);
-    free(gfc->mfbuf[1]);
-#endif
-
-    for ( i = 0 ; i <= 2*BPC; i++ )
-        if ( gfc->blackfilt[i] != NULL ) {
-            free ( gfc->blackfilt[i] );
-	    gfc->blackfilt[i] = NULL;
-	}
-    if ( gfc->inbuf_old[0] ) { 
-        free ( gfc->inbuf_old[0] );
-	gfc->inbuf_old[0] = NULL;
-    }
-    if ( gfc->inbuf_old[1] ) { 
-        free ( gfc->inbuf_old[1] );
-	gfc->inbuf_old[1] = NULL;
-    }
-
-    if ( gfc->bs.buf != NULL ) {
-        free ( gfc->bs.buf );
-        gfc->bs.buf = NULL;
-    }
-
-    if ( gfc->VBR_seek_table.bag ) {
-        free ( gfc->VBR_seek_table.bag );
-    }
-    if ( gfc->ATH ) {
-        free ( gfc->ATH );
-    }
-    free ( gfc );
-}
-
-FLOAT8 ATHformula_old(FLOAT8 f)
-{
-  FLOAT8 ath;
-  f /= 1000;  // convert to khz
-  f  = Max(0.01, f);
-  f  = Min(18.0, f);
-
-  /* from Painter & Spanias, 1997 */
-  /* minimum: (i=77) 3.3kHz = -5db */
-  ath =    3.640 * pow(f,-0.8)
-         - 6.500 * exp(-0.6*pow(f-3.3,2.0))
-         + 0.001 * pow(f,4.0);
-  return ath;
-}
-
-FLOAT8 ATHformula_GB(FLOAT8 f)
-{
-  FLOAT8 ath;
-  f /= 1000;  // convert to khz
-  f  = Max(0.01, f);
-  f  = Min(18.0, f);
-
-  /* from Painter & Spanias, 1997 */
-  /* modified by Gabriel Bouvigne to better fit to the reality */
-  ath =    3.640 * pow(f,-0.8)
-         - 6.800 * exp(-0.6*pow(f-3.4,2.0))
-         + 6.000 * exp(-0.15*pow(f-8.7,2.0))
-         + 0.6* 0.001 * pow(f,4.0);
-  return ath;
-}
-
-FLOAT8 ATHformula_GBtweak(FLOAT8 f)
-{
-  FLOAT8 ath;
-  f /= 1000;  // convert to khz
-  f  = Max(0.01, f);
-  f  = Min(18.0, f);
-
-  /* from Painter & Spanias, 1997 */
-  /* modified by Gabriel Bouvigne to better fit to the reality */
-  ath =    3.640 * pow(f,-0.8)
-         - 6.800 * exp(-0.6*pow(f-3.4,2.0))
-         + 6.000 * exp(-0.15*pow(f-8.7,2.0))
-         + 0.57* 0.001 * pow(f,4.0) //0.57 to maximize HF importance
-         + 6; //std --athlower -6 for
-  return ath;
-}
-
-
-/* 
- *  Klemm 1994 and 1997. Experimental data. Sorry, data looks a little bit
- *  dodderly. Data below 30 Hz is extrapolated from other material, above 18
- *  kHz the ATH is limited due to the original purpose (too much noise at
- *  ATH is not good even if it's theoretically inaudible).
- */
-
-FLOAT8  ATHformula_Frank( FLOAT8 freq )
-{
-    /*
-     * one value per 100 cent = 1
-     * semitone = 1/4
-     * third = 1/12
-     * octave = 1/40 decade
-     * rest is linear interpolated, values are currently in decibel rel. 20 �Pa
-     */
-    static FLOAT tab [] = {
-        /*    10.0 */  96.69, 96.69, 96.26, 95.12,
-        /*    12.6 */  93.53, 91.13, 88.82, 86.76,
-        /*    15.8 */  84.69, 82.43, 79.97, 77.48,
-        /*    20.0 */  74.92, 72.39, 70.00, 67.62,
-        /*    25.1 */  65.29, 63.02, 60.84, 59.00,
-        /*    31.6 */  57.17, 55.34, 53.51, 51.67,
-        /*    39.8 */  50.04, 48.12, 46.38, 44.66,
-        /*    50.1 */  43.10, 41.73, 40.50, 39.22,
-        /*    63.1 */  37.23, 35.77, 34.51, 32.81,
-        /*    79.4 */  31.32, 30.36, 29.02, 27.60,
-        /*   100.0 */  26.58, 25.91, 24.41, 23.01,
-        /*   125.9 */  22.12, 21.25, 20.18, 19.00,
-        /*   158.5 */  17.70, 16.82, 15.94, 15.12,
-        /*   199.5 */  14.30, 13.41, 12.60, 11.98,
-        /*   251.2 */  11.36, 10.57,  9.98,  9.43,
-        /*   316.2 */   8.87,  8.46,  7.44,  7.12,
-        /*   398.1 */   6.93,  6.68,  6.37,  6.06,
-        /*   501.2 */   5.80,  5.55,  5.29,  5.02,
-        /*   631.0 */   4.75,  4.48,  4.22,  3.98,
-        /*   794.3 */   3.75,  3.51,  3.27,  3.22,
-        /*  1000.0 */   3.12,  3.01,  2.91,  2.68,
-        /*  1258.9 */   2.46,  2.15,  1.82,  1.46,
-        /*  1584.9 */   1.07,  0.61,  0.13, -0.35,
-        /*  1995.3 */  -0.96, -1.56, -1.79, -2.35,
-        /*  2511.9 */  -2.95, -3.50, -4.01, -4.21,
-        /*  3162.3 */  -4.46, -4.99, -5.32, -5.35,
-        /*  3981.1 */  -5.13, -4.76, -4.31, -3.13,
-        /*  5011.9 */  -1.79,  0.08,  2.03,  4.03,
-        /*  6309.6 */   5.80,  7.36,  8.81, 10.22,
-        /*  7943.3 */  11.54, 12.51, 13.48, 14.21,
-        /* 10000.0 */  14.79, 13.99, 12.85, 11.93,
-        /* 12589.3 */  12.87, 15.19, 19.14, 23.69,
-        /* 15848.9 */  33.52, 48.65, 59.42, 61.77,
-        /* 19952.6 */  63.85, 66.04, 68.33, 70.09,
-        /* 25118.9 */  70.66, 71.27, 71.91, 72.60,
-    };
-    FLOAT8    freq_log;
-    unsigned  index;
-    
-    if ( freq <    10. ) freq =    10.;
-    if ( freq > 29853. ) freq = 29853.;
-    
-    freq_log = 40. * log10 (0.1 * freq);   /* 4 steps per third, starting at 10 Hz */
-    index    = (unsigned) freq_log;
-    assert ( index < sizeof(tab)/sizeof(*tab) );
-    return tab [index] * (1 + index - freq_log) + tab [index+1] * (freq_log - index);
-}
-
-FLOAT8 ATHformula(FLOAT8 f,lame_global_flags *gfp)
-{
-  switch(gfp->ATHtype)
-    {
-    case 0:
-      return ATHformula_old(f);
-    case 1:
-      return ATHformula_Frank(f);
-    case 2:
-      return ATHformula_GB(f);
-    case 3:
-      return ATHformula_GBtweak(f);
-    }
-
-  return ATHformula_Frank(f);
-}
-
-/* see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */
-FLOAT8 freq2bark(FLOAT8 freq)
-{
-  /* input: freq in hz  output: barks */
-    if (freq<0) freq=0;
-    freq = freq * 0.001;
-    return 13.0*atan(.76*freq) + 3.5*atan(freq*freq/(7.5*7.5));
-}
-
-/* see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */
-FLOAT8 freq2cbw(FLOAT8 freq)
-{
-  /* input: freq in hz  output: critical band width */
-    freq = freq * 0.001;
-    return 25+75*pow(1+1.4*(freq*freq),0.69);
-}
-
-
-
-
-
-
-/***********************************************************************
- * compute bitsperframe and mean_bits for a layer III frame 
- **********************************************************************/
-void getframebits(lame_global_flags *gfp, int *bitsPerFrame, int *mean_bits) 
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int  whole_SpF;  /* integral number of Slots per Frame without padding */
-  int  bit_rate;
-  
-  /* get bitrate in kbps [?] */
-  if (gfc->bitrate_index) 
-    bit_rate = bitrate_table[gfp->version][gfc->bitrate_index];
-  else
-    bit_rate = gfp->brate;
-  assert ( bit_rate <= 550 );
-  
-  // bytes_per_frame = bitrate * 1000 / ( gfp->out_samplerate / (gfp->version == 1  ?  1152  :  576 )) / 8;
-  // bytes_per_frame = bitrate * 1000 / gfp->out_samplerate * (gfp->version == 1  ?  1152  :  576 ) / 8;
-  // bytes_per_frame = bitrate * ( gfp->version == 1  ?  1152/8*1000  :  576/8*1000 ) / gfp->out_samplerate;
-  
-  whole_SpF = (gfp->version+1)*72000*bit_rate / gfp->out_samplerate;
-  
-  // There must be somewhere code toggling gfc->padding on and off
-  
-  /* main encoding routine toggles padding on and off */
-  /* one Layer3 Slot consists of 8 bits */
-  *bitsPerFrame = 8 * (whole_SpF + gfc->padding);
-  
-  // sideinfo_len
-  *mean_bits = (*bitsPerFrame - 8*gfc->sideinfo_len) / gfc->mode_gr;
-}
-
-
-
-
-#define ABS(A) (((A)>0) ? (A) : -(A))
-
-int FindNearestBitrate(
-int bRate,        /* legal rates from 32 to 448 */
-int version,      /* MPEG-1 or MPEG-2 LSF */
-int samplerate)   /* convert bitrate in kbps to index */
-{
-    int  bitrate = 0;
-    int  i;
-  
-    for ( i = 1; i <= 14; i++ )
-        if ( ABS (bitrate_table[version][i] - bRate) < ABS (bitrate - bRate) )
-            bitrate = bitrate_table [version] [i];
-	    
-    return bitrate;
-}
-
-
-/* map frequency to a valid MP3 sample frequency
- *
- * [email protected] 2000-07-01
- */
-int map2MP3Frequency(int freq)
-{
-    if (freq <=  8000) return  8000;
-    if (freq <= 11025) return 11025;
-    if (freq <= 12000) return 12000;
-    if (freq <= 16000) return 16000;
-    if (freq <= 22050) return 22050;
-    if (freq <= 24000) return 24000;
-    if (freq <= 32000) return 32000;
-    if (freq <= 44100) return 44100;
-    
-    return 48000;
-}
-
-int BitrateIndex(
-int bRate,        /* legal rates from 32 to 448 kbps */
-int version,      /* MPEG-1 or MPEG-2/2.5 LSF */
-int samplerate)   /* convert bitrate in kbps to index */
-{
-    int  i;
-
-    for ( i = 0; i <= 14; i++)
-        if ( bitrate_table [version] [i] == bRate )
-            return i;
-	    
-    return -1;
-}
-
-/* convert samp freq in Hz to index */
-
-int SmpFrqIndex ( int sample_freq, int* const version )
-{
-    switch ( sample_freq ) {
-    case 44100: *version = 1; return  0;
-    case 48000: *version = 1; return  1;
-    case 32000: *version = 1; return  2;
-    case 22050: *version = 0; return  0;
-    case 24000: *version = 0; return  1;
-    case 16000: *version = 0; return  2;
-    case 11025: *version = 0; return  0;
-    case 12000: *version = 0; return  1;
-    case  8000: *version = 0; return  2;
-    default:    *version = 0; return -1;
-    }
-}
-
-
-/*****************************************************************************
-*
-*  End of bit_stream.c package
-*
-*****************************************************************************/
-
-/* reorder the three short blocks By Takehiro TOMINAGA */
-/*
-  Within each scalefactor band, data is given for successive
-  time windows, beginning with window 0 and ending with window 2.
-  Within each window, the quantized values are then arranged in
-  order of increasing frequency...
-*/
-void freorder(int scalefac_band[],FLOAT8 ix_orig[576]) {
-  int i,sfb, window, j=0;
-  FLOAT8 ix[576];
-  for (sfb = 0; sfb < SBMAX_s; sfb++) {
-    int start = scalefac_band[sfb];
-    int end   = scalefac_band[sfb + 1];
-    for (window = 0; window < 3; window++) {
-      for (i = start; i < end; ++i) {
-	ix[j++] = ix_orig[3*i+window];
-      }
-    }
-  }
-  memcpy(ix_orig,ix,576*sizeof(FLOAT8));
-}
-
-
-
-
-
-
-
-#ifndef KLEMM_44
-
-
-/* resampling via FIR filter, blackman window */
-inline static FLOAT8 blackman(FLOAT8 x,FLOAT8 fcn,int l)
-{
-  /* This algorithm from:
-SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C
-S.D. Stearns and R.A. David, Prentice-Hall, 1992
-  */
-  FLOAT8 bkwn,x2;
-  FLOAT8 wcn = (PI * fcn);
-  
-  x /= l;
-  if (x<0) x=0;
-  if (x>1) x=1;
-  x2 = x - .5;
-
-  bkwn = 0.42 - 0.5*cos(2*x*PI)  + 0.08*cos(4*x*PI);
-  if (fabs(x2)<1e-9) return wcn/PI;
-  else 
-    return  (  bkwn*sin(l*wcn*x2)  / (PI*l*x2)  );
-
-
-}
-
-/* gcd - greatest common divisor */
-/* Joint work of Euclid and M. Hendry */
-
-int gcd ( int i, int j )
-{
-//    assert ( i > 0  &&  j > 0 );
-    return j ? gcd(j, i % j) : i;
-}
-
-
-
-/* copy in new samples from in_buffer into mfbuf, with resampling & scaling 
-   if necessary.  n_in = number of samples from the input buffer that
-   were used.  n_out = number of samples copied into mfbuf  */
-
-void fill_buffer(lame_global_flags *gfp,
-		 sample_t *mfbuf[2],
-		 sample_t *in_buffer[2],
-		 int nsamples, int *n_in, int *n_out)
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int ch,i;
-
-    /* copy in new samples into mfbuf, with resampling if necessary */
-    if (gfc->resample_ratio != 1.0) {
-	for (ch = 0; ch < gfc->channels_out; ch++) {
-	    *n_out =
-		fill_buffer_resample(gfp, &mfbuf[ch][gfc->mf_size],
-				     gfp->framesize, in_buffer[ch],
-				     nsamples, n_in, ch);
-	}
-    }
-    else {
-	*n_out = Min(gfp->framesize, nsamples);
-	*n_in = *n_out;
-	for (i = 0; i < *n_out; ++i) {
-	    mfbuf[0][gfc->mf_size + i] = in_buffer[0][i];
-	    if (gfc->channels_out == 2)
-		mfbuf[1][gfc->mf_size + i] = in_buffer[1][i];
-	}
-    }
-
-    /* user selected scaling of the samples */
-    if (gfp->scale != 0) {
-	for (i=0 ; i<*n_out; ++i) {
-	    mfbuf[0][gfc->mf_size+i] *= gfp->scale;
-	    if (gfc->channels_out == 2)
-		mfbuf[1][gfc->mf_size + i] *= gfp->scale;
-	}
-    }
-
-}
-    
-
-
-
-int fill_buffer_resample(
-       lame_global_flags *gfp,
-       sample_t *outbuf,
-       int desired_len,
-       sample_t *inbuf,
-       int len,
-       int *num_used,
-       int ch) 
-{
-
-  
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int BLACKSIZE;
-  FLOAT8 offset,xvalue;
-  int i,j=0,k;
-  int filter_l;
-  FLOAT8 fcn,intratio;
-  FLOAT *inbuf_old;
-  int bpc;   /* number of convolution functions to pre-compute */
-  bpc = gfp->out_samplerate/gcd(gfp->out_samplerate,gfp->in_samplerate);
-  if (bpc>BPC) bpc = BPC;
-
-  intratio=( fabs(gfc->resample_ratio - floor(.5+gfc->resample_ratio)) < .0001 );
-  fcn = 1.00/gfc->resample_ratio;
-  if (fcn>1.00) fcn=1.00;
-  filter_l = gfp->quality < 7 ? 31 : 7;
-  filter_l = 31;
-  if (0==filter_l % 2 ) --filter_l;/* must be odd */
-  filter_l += intratio;            /* unless resample_ratio=int, it must be even */
-
-
-  BLACKSIZE = filter_l+1;  /* size of data needed for FIR */
-  
-  if ( gfc->fill_buffer_resample_init == 0 ) {
-    gfc->inbuf_old[0]=calloc(BLACKSIZE,sizeof(gfc->inbuf_old[0][0]));
-    gfc->inbuf_old[1]=calloc(BLACKSIZE,sizeof(gfc->inbuf_old[0][0]));
-    for (i=0; i<=2*bpc; ++i)
-      gfc->blackfilt[i]=calloc(BLACKSIZE,sizeof(gfc->blackfilt[0][0]));
-
-    gfc->itime[0]=0;
-    gfc->itime[1]=0;
-
-    /* precompute blackman filter coefficients */
-    for ( j = 0; j <= 2*bpc; j++ ) {
-        FLOAT8 sum = 0.; 
-        offset = (j-bpc) / (2.*bpc);
-        for ( i = 0; i <= filter_l; i++ ) 
-            sum += 
-	    gfc->blackfilt[j][i]  = blackman(i-offset,fcn,filter_l);
-	for ( i = 0; i <= filter_l; i++ ) 
-	  gfc->blackfilt[j][i] /= sum;
-    }
-    gfc->fill_buffer_resample_init = 1;
-  }
-  
-  inbuf_old=gfc->inbuf_old[ch];
-
-  /* time of j'th element in inbuf = itime + j/ifreq; */
-  /* time of k'th element in outbuf   =  j/ofreq */
-  for (k=0;k<desired_len;k++) {
-    FLOAT time0;
-    int joff;
-
-    time0 = k*gfc->resample_ratio;       /* time of k'th output sample */
-    j = floor( time0 -gfc->itime[ch]  );
-
-    /* check if we need more input data */
-    if ((filter_l + j - filter_l/2) >= len) break;
-
-    /* blackman filter.  by default, window centered at j+.5(filter_l%2) */
-    /* but we want a window centered at time0.   */
-    offset = ( time0 -gfc->itime[ch] - (j + .5*(filter_l%2)));
-    assert(fabs(offset)<=.500001);
-
-    /* find the closest precomputed window for this offset: */
-    joff = floor((offset*2*bpc) + bpc +.5);
-
-    xvalue = 0.;
-    for (i=0 ; i<=filter_l ; ++i) {
-      int j2 = i+j-filter_l/2;
-      int y;
-      assert(j2<len);
-      assert(j2+BLACKSIZE >= 0);
-      y = (j2<0) ? inbuf_old[BLACKSIZE+j2] : inbuf[j2];
-#define PRECOMPUTE
-#ifdef PRECOMPUTE
-      xvalue += y*gfc->blackfilt[joff][i];
-#else
-      xvalue += y*blackman(i-offset,fcn,filter_l);  /* very slow! */
-#endif
-    }
-    outbuf[k]=xvalue;
-  }
-
-  
-  /* k = number of samples added to outbuf */
-  /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2]  */
-
-  /* how many samples of input data were used:  */
-  *num_used = Min(len,filter_l+j-filter_l/2);
-
-  /* adjust our input time counter.  Incriment by the number of samples used,
-   * then normalize so that next output sample is at time 0, next
-   * input buffer is at time itime[ch] */
-  gfc->itime[ch] += *num_used - k*gfc->resample_ratio;
-
-  /* save the last BLACKSIZE samples into the inbuf_old buffer */
-  if (*num_used >= BLACKSIZE) {
-      for (i=0;i<BLACKSIZE;i++)
-	  inbuf_old[i]=inbuf[*num_used + i -BLACKSIZE];
-  }else{
-      /* shift in *num_used samples into inbuf_old  */
-       int n_shift = BLACKSIZE-*num_used;  /* number of samples to shift */
-
-       /* shift n_shift samples by *num_used, to make room for the
-	* num_used new samples */
-       for (i=0; i<n_shift; ++i ) 
-	   inbuf_old[i] = inbuf_old[i+ *num_used];
-
-       /* shift in the *num_used samples */
-       for (j=0; i<BLACKSIZE; ++i, ++j ) 
-	   inbuf_old[i] = inbuf[j];
-
-       assert(j==*num_used);
-  }
-  return k;  /* return the number samples created at the new samplerate */
-}
-
-
-#endif /* ndef KLEMM_44 */
-
-
-
-/***********************************************************************
-*
-*  Message Output
-*
-***********************************************************************/
-void  lame_debugf (const lame_internal_flags *gfc, const char* format, ... )
-{
-    va_list  args;
-
-    va_start ( args, format );
-
-    if ( gfc->report.debugf != NULL ) {
-        gfc->report.debugf( format, args );
-    } else {
-        (void) vfprintf ( stderr, format, args );
-        fflush ( stderr );      /* an debug function should flush immediately */
-    }
-
-    va_end   ( args );
-}
-
-
-void  lame_msgf (const lame_internal_flags *gfc, const char* format, ... )
-{
-    va_list  args;
-
-    va_start ( args, format );
-   
-    if ( gfc->report.msgf != NULL ) {
-        gfc->report.msgf( format, args );
-    } else {
-        (void) vfprintf ( stderr, format, args );
-        fflush ( stderr );     /* we print to stderr, so me may want to flush */
-    }
-
-    va_end   ( args );
-}
-
-
-void  lame_errorf (const lame_internal_flags *gfc, const char* format, ... )
-{
-    va_list  args;
-
-    va_start ( args, format );
-    
-    if ( gfc->report.errorf != NULL ) {
-        gfc->report.errorf( format, args );
-    } else {
-        (void) vfprintf ( stderr, format, args );
-        fflush   ( stderr );    /* an error function should flush immediately */
-    }
-
-    va_end   ( args );
-}
-
-
-
-/***********************************************************************
- *
- *      routines to detect CPU specific features like 3DNow, MMX, SIMD
- *
- *  donated by Frank Klemm
- *  added Robert Hegemann 2000-10-10
- *
- ***********************************************************************/
-
-int  has_i387 ( void )
-{
-#ifdef HAVE_NASM 
-    return 1;
-#else
-    return 0;   /* don't know, assume not */
-#endif
-}    
-
-int  has_MMX ( void )
-{
-#ifdef HAVE_NASM 
-    extern int has_MMX_nasm ( void );
-    return has_MMX_nasm ();
-#else
-    return 0;   /* don't know, assume not */
-#endif
-}    
-
-int  has_3DNow ( void )
-{
-#ifdef HAVE_NASM 
-    extern int has_3DNow_nasm ( void );
-    return has_3DNow_nasm ();
-#else
-    return 0;   /* don't know, assume not */
-#endif
-}    
-
-int  has_SIMD ( void )
-{
-#ifdef HAVE_NASM 
-    extern int has_SIMD_nasm ( void );
-    return has_SIMD_nasm ();
-#else
-    return 0;   /* don't know, assume not */
-#endif
-}    
-
-int  has_SIMD2 ( void )
-{
-#ifdef HAVE_NASM 
-    extern int has_SIMD2_nasm ( void );
-    return has_SIMD2_nasm ();
-#else
-    return 0;   /* don't know, assume not */
-#endif
-}    
-
-/***********************************************************************
- *
- *  some simple statistics
- *
- *  bitrate index 0: free bitrate -> not allowed in VBR mode
- *  : bitrates, kbps depending on MPEG version
- *  bitrate index 15: forbidden
- *
- *  mode_ext:
- *  0:  LR
- *  1:  LR-i
- *  2:  MS
- *  3:  MS-i
- *
- ***********************************************************************/
- 
-void updateStats( lame_internal_flags * const gfc )
-{
-    assert ( gfc->bitrate_index < 16u );
-    assert ( gfc->mode_ext      <  4u );
-    
-    /* count bitrate indices */
-    gfc->bitrate_stereoMode_Hist [gfc->bitrate_index] [4] ++;
-    
-    /* count 'em for every mode extension in case of 2 channel encoding */
-    if (gfc->channels_out == 2)
-        gfc->bitrate_stereoMode_Hist [gfc->bitrate_index] [gfc->mode_ext]++;
-}
-
-
-
-/*  caution: a[] will be resorted!!
- */
-int select_kth_int(int a[], int N, int k)
-{
-    int i, j, l, r, v, w;
-    
-    l = 0;
-    r = N-1;
-    while (r > l) {
-        v = a[r];
-        i = l-1;
-        j = r;
-        for (;;) {
-            while (a[++i] < v) /*empty*/;
-            while (a[--j] > v) /*empty*/;
-            if (i >= j) 
-                break;
-            /* swap i and j */
-            w = a[i];
-            a[i] = a[j];
-            a[j] = w;
-        }
-        /* swap i and r */
-        w = a[i];
-        a[i] = a[r];
-        a[r] = w;
-        if (i >= k) 
-            r = i-1;
-        if (i <= k) 
-            l = i+1;
-    }
-    return a[k];
-}
-
-
-
-void disable_FPE(void) {
-/* extremly system dependent stuff, move to a lib to make the code readable */
-/*==========================================================================*/
-
-    /*
-     *  Disable floating point exceptions
-     */
-#if defined(__FreeBSD__) && !defined(__alpha__)
-    {
-        /* seet floating point mask to the Linux default */
-        fp_except_t mask;
-        mask = fpgetmask();
-        /* if bit is set, we get SIGFPE on that error! */
-        fpsetmask(mask & ~(FP_X_INV | FP_X_DZ));
-        /*  DEBUGF("FreeBSD mask is 0x%x\n",mask); */
-    }
-#endif
-
-#if defined(__riscos__) && !defined(ABORTFP)
-    /* Disable FPE's under RISC OS */
-    /* if bit is set, we disable trapping that error! */
-    /*   _FPE_IVO : invalid operation */
-    /*   _FPE_DVZ : divide by zero */
-    /*   _FPE_OFL : overflow */
-    /*   _FPE_UFL : underflow */
-    /*   _FPE_INX : inexact */
-    DisableFPETraps(_FPE_IVO | _FPE_DVZ | _FPE_OFL);
-#endif
-
-    /*
-     *  Debugging stuff
-     *  The default is to ignore FPE's, unless compiled with -DABORTFP
-     *  so add code below to ENABLE FPE's.
-     */
-
-#if defined(ABORTFP)
-#if defined(_MSC_VER)
-    {
-#include <float.h>
-        unsigned int mask;
-        mask = _controlfp(0, 0);
-        mask &= ~(_EM_OVERFLOW | _EM_UNDERFLOW | _EM_ZERODIVIDE | _EM_INVALID);
-        mask = _controlfp(mask, _MCW_EM);
-    }
-#elif defined(__CYGWIN__)
-#  define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
-#  define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
-
-#  define _EM_INEXACT     0x00000020 /* inexact (precision) */
-#  define _EM_UNDERFLOW   0x00000010 /* underflow */
-#  define _EM_OVERFLOW    0x00000008 /* overflow */
-#  define _EM_ZERODIVIDE  0x00000004 /* zero divide */
-#  define _EM_INVALID     0x00000001 /* invalid */
-    {
-        unsigned int mask;
-        _FPU_GETCW(mask);
-        /* Set the FPU control word to abort on most FPEs */
-        mask &= ~(_EM_OVERFLOW | _EM_ZERODIVIDE | _EM_INVALID);
-        _FPU_SETCW(mask);
-    }
-# elif defined(__linux__)
-    {
-
-#  include <fpu_control.h>
-#  ifndef _FPU_GETCW
-#  define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
-#  endif
-#  ifndef _FPU_SETCW
-#  define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
-#  endif
-
-        /* 
-         * Set the Linux mask to abort on most FPE's
-         * if bit is set, we _mask_ SIGFPE on that error!
-         *  mask &= ~( _FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM );
-         */
-
-        unsigned int mask;
-        _FPU_GETCW(mask);
-        mask &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
-        _FPU_SETCW(mask);
-    }
-#endif
-#endif /* ABORTFP */
-}
-
-
-/* end of util.c */
--- a/sys/src/games/mp3enc/util.h
+++ /dev/null
@@ -1,543 +1,0 @@
-/*
- *	lame utility library include file
- *
- *	Copyright (c) 1999 Albert L Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_UTIL_H
-#define LAME_UTIL_H
-
-#ifdef HUGE_VAL		/* math.h already seen? */
-#ifndef fabs
-#define fabs(x) ((double)((x) < 0? -(x): (x)))
-#endif
-#endif
-
-/***********************************************************************
-*
-*  Global Include Files
-*
-***********************************************************************/
-#include "machine.h"
-#include "encoder.h"
-#include "lame.h"
-#include "lame-analysis.h"
-#include "id3tag.h"
-
-/***********************************************************************
-*
-*  Global Definitions
-*
-***********************************************************************/
-
-#ifndef FALSE
-#define         FALSE                   0
-#endif
-
-#ifndef TRUE
-#define         TRUE                    (!FALSE)
-#endif
-
-#ifdef UINT_MAX
-# define         MAX_U_32_NUM            UINT_MAX
-#else
-# define         MAX_U_32_NUM            0xFFFFFFFF
-#endif
-
-#ifndef PI
-# ifdef M_PI
-#  define       PI                      M_PI
-# else
-#  define       PI                      3.14159265358979323846
-# endif
-#endif
-
-
-#ifdef M_LN2
-# define        LOG2                    M_LN2
-#else
-# define        LOG2                    0.69314718055994530942
-#endif
-
-#ifdef M_LN10
-# define        LOG10                   M_LN10
-#else
-# define        LOG10                   2.30258509299404568402
-#endif
-
-
-#ifdef M_SQRT2
-# define        SQRT2                   M_SQRT2
-#else
-# define        SQRT2                   1.41421356237309504880
-#endif
-
-
-#define         HAN_SIZE                512
-#define         CRC16_POLYNOMIAL        0x8005
-#define MAX_BITS 4095
-
-/* "bit_stream.h" Definitions */
-#define         BUFFER_SIZE     LAME_MAXMP3BUFFER 
-
-#define         Min(A, B)       ((A) < (B) ? (A) : (B))
-#define         Max(A, B)       ((A) > (B) ? (A) : (B))
-
-
-
-
-
-/***********************************************************************
-*
-*  Global Type Definitions
-*
-***********************************************************************/
-
-
-
-/* "bit_stream.h" Type Definitions */
-
-typedef struct  bit_stream_struc {
-    unsigned char *buf;         /* bit stream buffer */
-    int         buf_size;       /* size of buffer (in number of bytes) */
-    int         totbit;         /* bit counter of bit stream */
-    int         buf_byte_idx;   /* pointer to top byte in buffer */
-    int         buf_bit_idx;    /* pointer to top bit of top byte in buffer */
-    
-    /* format of file in rd mode (BINARY/ASCII) */
-} Bit_stream_struc;
-
-#include "l3side.h"
-
-
-/* variables used for --nspsytune */
-typedef struct {
-  int   use; /* indicates the use of exp_nspsytune */
-  int   safejoint; /* safe joint stereo mode */
-  FLOAT last_en_subshort[4][9];
-  FLOAT last_attack_intensity[4][9];
-  FLOAT	last_thm[4][SBMAX_s][3];
-  int   last_attacks[4][3];
-  FLOAT pe_l[4],pe_s[4];
-  FLOAT pefirbuf[19];
-  FLOAT bass,alto,treble;
-} nsPsy_t;
-
-
-typedef struct 
-{
-    int sum;    // what we have seen so far
-    int seen;   // how many frames we have seen in this chunk
-    int want;   // how many frames we want to collect into one chunk
-    int pos;    // actual position in our bag
-    int size;   // size of our bag
-    int *bag;   // pointer to our bag
-} VBR_seek_info_t;
-
-
-/**
- *  ATH related stuff, if something new ATH related has to be added,
- *  please plugg it here into the ATH_t struct
- */
-typedef struct
-{
-    int     use_adjust;     // do we want to use the auto adjustment yes/no
-    FLOAT8  adjust;         // lowering based on peak volume, 1 = no lowering
-    FLOAT8  adjust_limit;   // limit for dynamic ATH adjust
-    FLOAT8  decay;          // determined to lower x dB each second
-    FLOAT8  l[SBMAX_l];     // ATH for sfbs in long blocks
-    FLOAT8  s[SBMAX_s];     // ATH for sfbs in short blocks
-    FLOAT8  cb[CBANDS];     // ATH for convolution bands
-} ATH_t;
-
-
-
-/* Guest structure, only temporarly here */
-
-typedef enum {
-    coding_MPEG_Layer_1 = 1,
-    coding_MPEG_Layer_2 = 2,
-    coding_MPEG_Layer_3 = 3,
-    coding_MPEG_AAC     = 4,
-    coding_Ogg_Vorbis   = 5,
-    coding_MPEG_plus    = 6
-} coding_t;
-
-#define MAX_CHANNELS  2
-
-typedef struct {
-    unsigned long  Class_ID;        /* Class ID to recognize a resample_t
-                                       object */
-    long double    sample_freq_in;  /* Input sample frequency in Hz */
-    long double    sample_freq_out; /* requested Output sample frequency in Hz */
-    float          lowpass_freq;    /* lowpass frequency, this is the -6 dB
-                                       point */
-    int            scale_in;        /* the resampling is actually done by
-                                       scale_out: */
-    int            scale_out;       /* frequency is
-                                         samplefreq_in * scale_out / scal */
-    int            taps;            /* number of taps for every FIR resample
-                                       filter */
-
-    sample_t**     fir;             /* the FIR resample filters:
-                                         fir [scale_out] [taps */
-    void*          firfree;         /* start address of the alloced memory for
-                                       fir, */
-    unsigned char* src_step;
-    sample_t*      in_old       [MAX_CHANNELS];
-    //    uint64_t       sample_count [MAX_CHANNELS];
-    unsigned       fir_stepper  [MAX_CHANNELS];
-    int            inp_stepper  [MAX_CHANNELS];
-
-} resample_t;
-
-
-typedef struct  {
-
-  /********************************************************************
-   * internal variables NOT set by calling program, and should not be *
-   * modified by the calling program                                  *
-   ********************************************************************/
-  
-  /*  
-   * Some remarks to the Class_ID field:
-   * The Class ID is an Identifier for a pointer to this struct.
-   * It is very unlikely that a pointer to lame_global_flags has the same 32 bits 
-   * in it's structure (large and other special properties, for instance prime).
-   *
-   * To test that the structure is right and initialized, use:
-   *     if ( gfc -> Class_ID == LAME_ID ) ...
-   * Other remark:
-   *     If you set a flag to 0 for uninit data and 1 for init data, the right test
-   *     should be "if (flag == 1)" and NOT "if (flag)". Unintended modification
-   *     of this element will be otherwise misinterpreted as an init.
-   */
-  
-  #define  LAME_ID   0xFFF88E3B
-  unsigned long Class_ID;
-
-  struct {
-    void (*msgf)  (const char *format, va_list ap);
-    void (*debugf)(const char *format, va_list ap);
-    void (*errorf)(const char *format, va_list ap);
-  } report;
-  
-  int lame_encode_frame_init;     
-  int iteration_init_init;
-  int fill_buffer_resample_init;
-  int psymodel_init;
-
-  int padding;                    /* padding for the current frame? */
-  int mode_gr;                    /* granules per frame */
-  int          channels_in;	/* number of channels in the input data stream (PCM or decoded PCM) */
-  int          channels_out;  /* number of channels in the output data stream (not used for decoding) */
-  resample_t*  resample_in;   /* context for coding (PCM=>MP3) resampling */
-  resample_t*  resample_out;	/* context for decoding (MP3=>PCM) resampling */
-  long double  samplefreq_in;
-  long double  samplefreq_out;
-#ifndef  MFSIZE
-# define MFSIZE  ( 3*1152 + ENCDELAY - MDCTDELAY )
-#endif
-#ifdef  KLEMM_44
-  sample_t*    mfbuf [MAX_CHANNELS];
-#else
-  sample_t     mfbuf [2] [MFSIZE];
-#endif
-  size_t       frame_size;    /* size of one frame in samples per channel */
-  lame_global_flags* gfp;     /* needed as long as the frame encoding functions must access gfp (all needed information can be added to gfc) */
-  coding_t     coding;        /* MPEG Layer 1/2/3, Ogg Vorbis, MPEG AAC, ... */
-  unsigned long frame_count;  /* Number of frames coded, 2^32 > 3 years */
-  int          mf_samples_to_encode;
-  int          mf_size;
-  float        ampl;	  /* amplification at the end of the current chunk (1. = 0 dB) */
-  float        last_ampl;	  /* amplification at the end of the last chunk    (1. = 0 dB) */
-  int VBR_min_bitrate;            /* min bitrate index */
-  int VBR_max_bitrate;            /* max bitrate index */
-  float resample_ratio;           /* input_samp_rate/output_samp_rate */
-  int bitrate_index;
-  int samplerate_index;
-  int mode_ext;
-
-
-  /* lowpass and highpass filter control */
-  float lowpass1,lowpass2;        /* normalized frequency bounds of passband */
-  float highpass1,highpass2;      /* normalized frequency bounds of passband */
-                                  
-  /* polyphase filter (filter_type=0)  */
-  int lowpass_band;          /* zero bands >= lowpass_band in the polyphase filterbank */
-  int highpass_band;         /* zero bands <= highpass_band */
-  int lowpass_start_band;    /* amplify bands between start */
-  int lowpass_end_band;      /* and end for lowpass */
-  int highpass_start_band;   /* amplify bands between start */
-  int highpass_end_band;     /* and end for highpass */
-
-
-  int filter_type;          /* 0=polyphase filter, 1= FIR filter 2=MDCT filter(bad)*/
-  int quantization;         /* 0 = ISO formual,  1=best amplitude */
-  int noise_shaping;        /* 0 = none 
-                               1 = ISO AAC model
-                               2 = allow scalefac_select=1  
-                             */
-
-  int noise_shaping_amp;    /*  0 = ISO model: amplify all distorted bands
-                                1 = amplify only most distorted band
-                                2 = amplify bands using? 
-                                3 = amplify bands using?
-			     */
-
-  int psymodel;             /* 1 = gpsycho. 0 = none */
-  int noise_shaping_stop;   /* 0 = stop at over=0, all scalefacs amplified or
-                                   a scalefac has reached max value
-                               1 = stop when all scalefacs amplified or        
-                                   a scalefac has reached max value
-                               2 = stop when all scalefacs amplified 
-			    */
-
-  int use_best_huffman;     /* 0 = no.  1=outside loop  2=inside loop(slow) */
-
-
-
-
-  /* variables used by lame.c */
-  Bit_stream_struc   bs;
-  III_side_info_t l3_side;
-  FLOAT8 ms_ratio[2];
-  /* used for padding */
-  int frac_SpF;
-  int slot_lag;
-
-
-  /* optional ID3 tags, used in id3tag.c  */
-  struct id3tag_spec tag_spec;
-
-
-  /* variables used by quantize.c */
-  int OldValue[2];
-  int CurrentStep;
-  FLOAT8 decay;
-  FLOAT8 masking_lower;
-
-  char bv_scf[576];
-  
-  int sfb21_extra; /* will be set in lame_init_params */
-  
-  int is_mpeg1; /* 1 for MPEG-1, 0 for MPEG-2(.5) */
-
-#ifndef KLEMM_44
-  /* variables used by util.c */
-  /* BPC = maximum number of filter convolution windows to precompute */
-#define BPC 320
-  sample_t *inbuf_old [2];
-  sample_t *blackfilt [2*BPC+1];
-  FLOAT8 itime[2];
-#endif
-  int sideinfo_len;
-
-  /* variables for newmdct.c */
-  FLOAT8 sb_sample[2][2][18][SBLIMIT];
-  FLOAT8 amp_lowpass[32];
-  FLOAT8 amp_highpass[32];
-
-  /* variables for bitstream.c */
-  /* mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58
-   * max number of frames in reservoir:  8 
-   * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1
-   * with VBR, if you are encoding all silence, it is possible to
-   * have 8kbs/24khz frames with 1byte of data each, which means we need
-   * to buffer up to 255 headers! */
-  /* also, max_header_buf has to be a power of two */
-#define MAX_HEADER_BUF 256
-#define MAX_HEADER_LEN 40 /* max size of header is 38 */
-  struct {
-    int write_timing;
-    int ptr;
-    char buf[MAX_HEADER_LEN];
-  } header[MAX_HEADER_BUF];
-
-  int h_ptr;
-  int w_ptr;
-  int ancillary_flag;
-  
-
-  /* variables for reservoir.c */
-  int ResvSize; /* in bits */
-  int ResvMax;  /* in bits */
-
-  
-  scalefac_struct scalefac_band;
-
-
-  /* DATA FROM PSYMODEL.C */
-/* The static variables "r", "phi_sav", "new", "old" and "oldest" have    */
-/* to be remembered for the unpredictability measure.  For "r" and        */
-/* "phi_sav", the first index from the left is the channel select and     */
-/* the second index is the "age" of the data.                             */
-  FLOAT8	minval[CBANDS];
-  FLOAT8	nb_1[4][CBANDS], nb_2[4][CBANDS];
-  FLOAT8 s3_s[CBANDS][CBANDS];
-  FLOAT8 s3_l[CBANDS][CBANDS];
-
-  III_psy_xmin thm[4];
-  III_psy_xmin en[4];
-  
-  /* unpredictability calculation
-   */
-  int cw_upper_index;
-  int cw_lower_index;
-  FLOAT ax_sav[4][2][HBLKSIZE];
-  FLOAT bx_sav[4][2][HBLKSIZE];
-  FLOAT rx_sav[4][2][HBLKSIZE];
-  FLOAT cw[HBLKSIZE];
-
-  /* fft and energy calculation    */
-  FLOAT wsamp_L[2][BLKSIZE];
-  FLOAT energy[HBLKSIZE];
-  FLOAT wsamp_S[2][3][BLKSIZE_s];
-  FLOAT energy_s[3][HBLKSIZE_s];
-  FLOAT tot_ener[4];
-
-  
-  /* fft.c    */
-  FLOAT window[BLKSIZE], window_s[BLKSIZE_s/2];
-  
-  
-  /* Scale Factor Bands    */
-  FLOAT8	w1_l[SBMAX_l], w2_l[SBMAX_l];
-  FLOAT8	w1_s[SBMAX_s], w2_s[SBMAX_s];
-  FLOAT8 mld_l[SBMAX_l],mld_s[SBMAX_s];
-  int	bu_l[SBMAX_l],bo_l[SBMAX_l] ;
-  int	bu_s[SBMAX_s],bo_s[SBMAX_s] ;
-  int	npart_l,npart_s;
-  int	npart_l_orig,npart_s_orig;
-  
-  int	s3ind[CBANDS][2];
-  int	s3ind_s[CBANDS][2];
-  FLOAT8 SNR_s[CBANDS];
-
-  int	numlines_s[CBANDS];
-  int	numlines_l[CBANDS];
-  
-  /* frame analyzer    */
-  FLOAT energy_save[4][HBLKSIZE];
-  FLOAT8 pe_save[4];
-  FLOAT8 ers_save[4];
-  
-  /* simple statistics */
-  int   bitrate_stereoMode_Hist [16] [4+1];
-
-  /* ratios  */
-  FLOAT8 pe[4];
-  FLOAT8 ms_ratio_s_old,ms_ratio_l_old;
-  FLOAT8 ms_ener_ratio_old;
-
-  /* block type */
-  int	blocktype_old[2];
-
-  /* used by the frame analyzer */
-  plotting_data *pinfo;
-
-  /* CPU features */
-  struct {
-    unsigned int  i387      : 1; /* FPU is a normal Intel CPU */
-    unsigned int  MMX       : 1; /* Pentium MMX, Pentium II...IV, K6, K6-2,
-                                    K6-III, Athlon */
-    unsigned int  AMD_3DNow : 1; /* K6-2, K6-III, Athlon      */
-    unsigned int  SIMD      : 1; /* Pentium III, Pentium 4    */
-    unsigned int  SIMD2     : 1; /* Pentium 4, K8             */
-  } CPU_features;
-   
-  /* functions to replace with CPU feature optimized versions in takehiro.c */
-  int (*choose_table)(const int *ix, const int *end, int *s);
-  
-
-  nsPsy_t nsPsy;  /* variables used for --nspsytune */
-  
-  unsigned crcvalue;
-  
-  VBR_seek_info_t VBR_seek_table; // used for Xing VBR header
-  
-  ATH_t *ATH;   // all ATH related stuff
-  
-  
-} lame_internal_flags;
-
-
-
- 
-
-/***********************************************************************
-*
-*  Global Function Prototype Declarations
-*
-***********************************************************************/
-void                  freegfc(lame_internal_flags *gfc);
-extern int            BitrateIndex(int, int,int);
-extern int            FindNearestBitrate(int,int,int);
-extern int            map2MP3Frequency(int freq);
-extern int            SmpFrqIndex(int, int*);
-extern FLOAT8         ATHformula(FLOAT8 f,lame_global_flags *gfp);
-extern FLOAT8         freq2bark(FLOAT8 freq);
-extern FLOAT8         freq2cbw(FLOAT8 freq);
-extern void freorder(int scalefac_band[],FLOAT8 ix_orig[576]);
-void disable_FPE(void);
-
-extern void 
-getframebits(lame_global_flags *gfp, int *bitsPerFrame, int *mean_bits);
-
-void fill_buffer(lame_global_flags *gfp,
-		 sample_t *mfbuf[2],
-		 sample_t *in_buffer[2],
-		 int nsamples, int *n_in, int *n_out);
-
-int  fill_buffer_resample (
-        lame_global_flags *gfp,
-        sample_t*  outbuf,
-        int        desired_len,
-        sample_t*  inbuf,
-        int        len,
-        int*       num_used,
-        int        channels );
-
-
-extern int  has_i387  ( void );
-extern int  has_MMX   ( void );
-extern int  has_3DNow ( void );
-extern int  has_SIMD  ( void );
-extern int  has_SIMD2 ( void );
-
-extern void updateStats (lame_internal_flags *gfc);
-
-
-
-/***********************************************************************
-*
-*  Macros about Message Printing and Exit
-*
-***********************************************************************/
-extern void lame_errorf(const lame_internal_flags *gfc, const char *, ...);
-extern void lame_debugf(const lame_internal_flags *gfc, const char *, ...);
-extern void lame_msgf  (const lame_internal_flags *gfc, const char *, ...);
-#define DEBUGF  lame_debugf
-#define ERRORF	lame_errorf
-#define MSGF	lame_msgf
-
-
-int select_kth_int(int b[], int N, int k);
-
-
-#endif /* LAME_UTIL_H */
--- a/sys/src/games/mp3enc/vbrquantize.c
+++ /dev/null
@@ -1,1689 +1,0 @@
-/*
- *	MP3 quantization
- *
- *	Copyright (c) 1999 Mark Taylor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* $Id: vbrquantize.c,v 1.41 2001/03/12 07:26:08 markt Exp $ */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include "util.h"
-#include "l3side.h"
-#include "quantize.h"
-#include "reservoir.h"
-#include "quantize_pvt.h"
-#include "lame-analysis.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-#undef MAXQUANTERROR
-
-
-typedef union {
-    float f;
-    int   i;
-} fi_union;
-
-#define MAGIC_FLOAT (65536*(128))
-#define MAGIC_INT    0x4b000000
-
-#ifdef TAKEHIRO_IEEE754_HACK
-
-#ifdef MAXQUANTERROR 
-#define DUFFBLOCK() do { \
-        xp = xr34[0] * sfpow34_p1; \
-        xe = xr34[0] * sfpow34_eq; \
-        xm = xr34[0] * sfpow34_m1; \
-        if (xm > IXMAX_VAL)  \
-            return -1; \
-        xp += MAGIC_FLOAT; \
-        xe += MAGIC_FLOAT; \
-        xm += MAGIC_FLOAT; \
-        fi[0].f = xp; \
-        fi[1].f = xe; \
-        fi[2].f = xm; \
-        fi[0].f = xp + (adj43asm - MAGIC_INT)[fi[0].i]; \
-        fi[1].f = xe + (adj43asm - MAGIC_INT)[fi[1].i]; \
-        fi[2].f = xm + (adj43asm - MAGIC_INT)[fi[2].i]; \
-        fi[0].i -= MAGIC_INT; \
-        fi[1].i -= MAGIC_INT; \
-        fi[2].i -= MAGIC_INT; \
-        x0 = fabs(xr[0]); \
-        xp = x0 - pow43[fi[0].i] * sfpow_p1; \
-        xe = x0 - pow43[fi[1].i] * sfpow_eq; \
-        xm = x0 - pow43[fi[2].i] * sfpow_m1; \
-        xp *= xp; \
-        xe *= xe; \
-        xm *= xm; \
-        xfsf_eq = Max(xfsf_eq, xe); \
-        xfsf_p1 = Max(xfsf_p1, xp); \
-        xfsf_m1 = Max(xfsf_m1, xm); \
-        ++xr; \
-        ++xr34; \
-    } while(0)  
-#else
-#define DUFFBLOCK() do { \
-        xp = xr34[0] * sfpow34_p1; \
-        xe = xr34[0] * sfpow34_eq; \
-        xm = xr34[0] * sfpow34_m1; \
-        if (xm > IXMAX_VAL)  \
-            return -1; \
-        xp += MAGIC_FLOAT; \
-        xe += MAGIC_FLOAT; \
-        xm += MAGIC_FLOAT; \
-        fi[0].f = xp; \
-        fi[1].f = xe; \
-        fi[2].f = xm; \
-        fi[0].f = xp + (adj43asm - MAGIC_INT)[fi[0].i]; \
-        fi[1].f = xe + (adj43asm - MAGIC_INT)[fi[1].i]; \
-        fi[2].f = xm + (adj43asm - MAGIC_INT)[fi[2].i]; \
-        fi[0].i -= MAGIC_INT; \
-        fi[1].i -= MAGIC_INT; \
-        fi[2].i -= MAGIC_INT; \
-        x0 = fabs(xr[0]); \
-        xp = x0 - pow43[fi[0].i] * sfpow_p1; \
-        xe = x0 - pow43[fi[1].i] * sfpow_eq; \
-        xm = x0 - pow43[fi[2].i] * sfpow_m1; \
-        xfsf_p1 += xp * xp; \
-        xfsf_eq += xe * xe; \
-        xfsf_m1 += xm * xm; \
-        ++xr; \
-        ++xr34; \
-    } while(0)  
-#endif
-
-#else
-
-/*********************************************************************
- * XRPOW_FTOI is a macro to convert floats to ints.  
- * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
- *                                         ROUNDFAC= -0.0946
- *
- * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]   
- *                                   ROUNDFAC=0.4054
- *********************************************************************/
-#  define QUANTFAC(rx)  adj43[rx]
-#  define ROUNDFAC 0.4054
-#  define XRPOW_FTOI(src,dest) ((dest) = (int)(src))
-
-
-#endif
-
-
-static FLOAT8
-calc_sfb_noise(const FLOAT8 *xr, const FLOAT8 *xr34, const int bw, const int sf)
-{
-  int j;
-  fi_union fi; 
-  FLOAT8 temp;
-  FLOAT8 xfsf=0;
-  FLOAT8 sfpow,sfpow34;
-
-  sfpow = POW20(sf+210); /*pow(2.0,sf/4.0); */
-  sfpow34  = IPOW20(sf+210); /*pow(sfpow,-3.0/4.0);*/
-
-  for ( j=0; j < bw ; ++j) {
-#if 0
-    int ix;
-    if (xr34[j]*sfpow34 > IXMAX_VAL) return -1;
-    ix=floor( xr34[j]*sfpow34);
-    temp = fabs(xr[j])- pow43[ix]*sfpow;
-    temp *= temp;
-
-    if (ix < IXMAX_VAL) {
-      temp2 = fabs(xr[j])- pow43[ix+1]*sfpow;
-      temp2 *=temp2;
-      if (temp2<temp) {
-	temp=temp2;
-	++ix;
-      }
-    }
-#else
-    if (xr34[j]*sfpow34 > IXMAX_VAL) return -1;
-
-#ifdef TAKEHIRO_IEEE754_HACK
-    temp   = sfpow34*xr34[j];
-    temp  += MAGIC_FLOAT; 
-    fi.f  = temp;
-    fi.f  = temp + (adj43asm - MAGIC_INT)[fi.i];
-    fi.i -= MAGIC_INT;
-#else
-    temp = xr34[j]*sfpow34;
-    XRPOW_FTOI(temp, fi.i);
-    XRPOW_FTOI(temp + QUANTFAC(fi.i), fi.i);
-#endif
-
-    temp = fabs(xr[j])- pow43[fi.i]*sfpow;
-    temp *= temp;
-    
-#endif
-    
-#ifdef MAXQUANTERROR
-    xfsf = Max(xfsf,temp);
-#else
-    xfsf += temp;
-#endif
-  }
-#ifdef MAXQUANTERROR
-  return xfsf;
-#else
-  return xfsf;//bw;
-#endif
-}
-
-
-
-
-static FLOAT8
-calc_sfb_noise_ave(const FLOAT8 *xr, const FLOAT8 *xr34, const int bw, const int sf)
-{
-    double xp;
-    double xe;
-    double xm;
-#ifdef TAKEHIRO_IEEE754_HACK
-    double x0;
-#endif
-    int xx[3], j;
-    fi_union *fi = (fi_union *)xx; 
-    FLOAT8 sfpow34_eq, sfpow34_p1, sfpow34_m1;
-    FLOAT8 sfpow_eq, sfpow_p1, sfpow_m1;
-    FLOAT8 xfsf_eq = 0, xfsf_p1 = 0, xfsf_m1 = 0;
-
-    sfpow_eq = POW20(sf + 210); /*pow(2.0,sf/4.0); */
-    sfpow_m1 = sfpow_eq * .8408964153;  /* pow(2,(sf-1)/4.0) */
-    sfpow_p1 = sfpow_eq * 1.189207115;  
-    
-    sfpow34_eq = IPOW20(sf + 210); /*pow(sfpow,-3.0/4.0);*/
-    sfpow34_m1 = sfpow34_eq * 1.13878863476;       /* .84089 ^ -3/4 */
-    sfpow34_p1 = sfpow34_eq * 0.878126080187;
-
-#ifdef TAKEHIRO_IEEE754_HACK
-    /*
-     *  loop unrolled into "Duff's Device".   Robert Hegemann
-     */    
-    j = (bw+3) / 4;
-    switch (bw % 4) {
-        default:
-        case 0: do{ DUFFBLOCK();
-        case 3:     DUFFBLOCK();
-        case 2:     DUFFBLOCK();
-        case 1:     DUFFBLOCK(); } while (--j);
-    }
-#else
-    for (j = 0; j < bw; ++j) {
-
-        if (xr34[j]*sfpow34_m1 > IXMAX_VAL) return -1;
-
-        xe = xr34[j]*sfpow34_eq;
-        XRPOW_FTOI(xe, fi[0].i);
-        XRPOW_FTOI(xe + QUANTFAC(fi[0].i), fi[0].i);
-        xe = fabs(xr[j])- pow43[fi[0].i]*sfpow_eq;
-        xe *= xe;
-
-        xp = xr34[j]*sfpow34_p1;
-        XRPOW_FTOI(xp, fi[0].i);
-        XRPOW_FTOI(xp + QUANTFAC(fi[0].i), fi[0].i);
-        xp = fabs(xr[j])- pow43[fi[0].i]*sfpow_p1;
-        xp *= xp;
-
-        xm = xr34[j]*sfpow34_m1;
-        XRPOW_FTOI(xm, fi[0].i);
-        XRPOW_FTOI(xm + QUANTFAC(fi[0].i), fi[0].i);
-        xm = fabs(xr[j])- pow43[fi[0].i]*sfpow_m1;
-        xm *= xm;
-
-#ifdef MAXQUANTERROR
-        xfsf_eq = Max(xfsf,xm);
-        xfsf_p1 = Max(xfsf_p1,xp);
-        xfsf_m1 = Max(xfsf_m1,xm);
-#else
-        xfsf_eq += xe;
-        xfsf_p1 += xp;
-        xfsf_m1 += xm;
-#endif
-    }
-#endif
-
-    if (xfsf_eq < xfsf_p1) 
-        xfsf_eq = xfsf_p1;
-    if (xfsf_eq < xfsf_m1) 
-        xfsf_eq = xfsf_m1;
-#ifdef MAXQUANTERROR
-    return xfsf_eq;
-#else
-    return xfsf_eq;//bw;
-#endif
-}
-
-
-
-static int
-find_scalefac(const FLOAT8 *xr, const FLOAT8 *xr34, const int sfb,
-		     const FLOAT8 l3_xmin, const int bw)
-{
-  FLOAT8 xfsf;
-  int i,sf,sf_ok,delsf;
-
-  /* search will range from sf:  -209 -> 45  */
-  sf = -82;
-  delsf = 128;
-
-  sf_ok=10000;
-  for (i=0; i<7; i++) {
-    delsf /= 2;
-    xfsf = calc_sfb_noise(xr,xr34,bw,sf);
-
-    if (xfsf < 0) {
-      /* scalefactors too small */
-      sf += delsf;
-    }else{
-      if (sf_ok==10000) sf_ok=sf;  
-      if (xfsf > l3_xmin)  {
-	/* distortion.  try a smaller scalefactor */
-	sf -= delsf;
-      }else{
-	sf_ok = sf;
-	sf += delsf;
-      }
-    }
-  } 
-  assert(sf_ok!=10000);
-#if 0
-  assert(delsf==1);  /* when for loop goes up to 7 */
-#endif
-
-  return sf;
-}
-
-static int
-find_scalefac_ave(const FLOAT8 *xr, const FLOAT8 *xr34, const int sfb,
-		     const FLOAT8 l3_xmin, const int bw)
-{
-  FLOAT8 xfsf;
-  int i,sf,sf_ok,delsf;
-
-  /* search will range from sf:  -209 -> 45  */
-  sf = -82;
-  delsf = 128;
-
-  sf_ok=10000;
-  for (i=0; i<7; i++) {
-    delsf /= 2;
-    xfsf = calc_sfb_noise_ave(xr,xr34,bw,sf);
-
-    if (xfsf < 0) {
-      /* scalefactors too small */
-      sf += delsf;
-    }else{
-      if (sf_ok==10000) sf_ok=sf;  
-      if (xfsf > l3_xmin)  {
-	/* distortion.  try a smaller scalefactor */
-	sf -= delsf;
-      }else{
-	sf_ok = sf;
-	sf += delsf;
-      }
-    }
-  } 
-  assert(sf_ok!=10000);
-#if 0
-  assert(delsf==1);  /* when for loop goes up to 7 */
-#endif
-
-  return sf;
-}
-
-
-
-/*  ???
-        How do the following tables look like for MPEG-2-LSF
-                                                            ??? */
-
-
-
-static const int max_range_short[SBPSY_s] =
-{15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7 };
-
-static const int max_range_long[SBPSY_l] =
-{15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
-
-static const int max_range_short_lsf[SBPSY_s] =
-{15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7 };
-
-/*static const int max_range_short_lsf_pretab[SBPSY_s] =
-{}*/
-
-static const int max_range_long_lsf[SBPSY_l] =
-{15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
-
-static const int max_range_long_lsf_pretab[SBPSY_l] =
-{ 7,7,7,7,7,7, 3,3,3,3,3, 0,0,0,0, 0,0,0, 0,0,0 };
-    
-
-static int 
-compute_scalefacs_short_lsf (
-    int sf[SBPSY_s][3],gr_info *cod_info, int scalefac[SBPSY_s][3],int sbg[3])
-{
-    int maxrange, maxrange1, maxrange2, maxover;
-    int sfb, i;
-    int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-
-    maxover   = 0;
-    maxrange1 = max_range_short_lsf[0];
-    maxrange2 = max_range_short_lsf[6];
-
-
-    for (i=0; i<3; ++i) {
-        int maxsf1 = 0, maxsf2 = 0, minsf = 1000;
-        /* see if we should use subblock gain */
-        for (sfb = 0; sfb < SBPSY_s; sfb++) {
-            if (sfb < 6) {
-                if (maxsf1 < -sf[sfb][i]) 
-                    maxsf1 = -sf[sfb][i];
-            } else {
-                if (maxsf2 < -sf[sfb][i]) 
-                    maxsf2 = -sf[sfb][i];
-            }
-            if (minsf > -sf[sfb][i]) 
-                minsf = -sf[sfb][i];
-        }
-
-        /* boost subblock gain as little as possible so we can
-         * reach maxsf1 with scalefactors 
-         * 8*sbg >= maxsf1   
-         */
-        maxsf1 = Max (maxsf1-maxrange1*ifqstep, maxsf2-maxrange2*ifqstep);
-        sbg[i] = 0;
-        if (minsf > 0) 
-            sbg[i] = floor (.125*minsf + .001);
-        if (maxsf1 > 0) 
-            sbg[i] = Max (sbg[i], (maxsf1/8 + (maxsf1 % 8 != 0)));
-        
-        if (sbg[i] > 7) 
-            sbg[i] = 7;
-
-
-        for (sfb = 0; sfb < SBPSY_s; sfb++) {
-            sf[sfb][i] += 8*sbg[i];
-
-            if (sf[sfb][i] < 0) {
-                maxrange = sfb < 6 ? maxrange1 : maxrange2;
-                
-                scalefac[sfb][i]
-                     = -sf[sfb][i]/ifqstep + (-sf[sfb][i]%ifqstep != 0);
-                
-                if (scalefac[sfb][i] > maxrange)
-                    scalefac[sfb][i] = maxrange;
-
-                if (maxover < -(sf[sfb][i] + scalefac[sfb][i]*ifqstep)) 
-                    maxover = -(sf[sfb][i] + scalefac[sfb][i]*ifqstep);
-            }
-        }
-    }
-
-    return maxover;
-}
-
-static int
-compute_scalefacs_long_lsf (
-              int             sf       [SBPSY_l], 
-        const gr_info * const cod_info, 
-              int             scalefac [SBPSY_l] )
-{
-    const int * max_range = max_range_long_lsf;
-    int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-    int sfb;
-    int maxover;
-  
-
-    if (cod_info->preflag) {
-        max_range = max_range_long_lsf_pretab;
-        for (sfb = 11; sfb < SBPSY_l; sfb++) 
-            sf[sfb] += pretab[sfb] * ifqstep;
-    }
-
-    maxover = 0;
-    for (sfb = 0; sfb < SBPSY_l; sfb++) {
-
-        if (sf[sfb] < 0) {
-            /* ifqstep*scalefac >= -sf[sfb], so round UP */
-            scalefac[sfb] = -sf[sfb]/ifqstep  + (-sf[sfb] % ifqstep != 0);
-            if (scalefac[sfb] > max_range[sfb]) 
-                scalefac[sfb] = max_range[sfb];
-      
-            /* sf[sfb] should now be positive: */
-            if (-(sf[sfb] + scalefac[sfb]*ifqstep) > maxover) {
-                maxover = -(sf[sfb] + scalefac[sfb]*ifqstep);
-            }
-        }
-    }
-
-    return maxover;
-}
-
-
-/*
-    sfb=0..5  scalefac < 16 
-    sfb>5     scalefac < 8
-
-    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-    ol_sf =  (cod_info->global_gain-210.0);
-    ol_sf -= 8*cod_info->subblock_gain[i];
-    ol_sf -= ifqstep*scalefac[gr][ch].s[sfb][i];
-
-*/
-static int 
-compute_scalefacs_short(int sf[SBPSY_s][3],gr_info *cod_info,
-int scalefac[SBPSY_s][3],int sbg[3])
-{
-  int maxrange,maxrange1,maxrange2,maxover;
-  int sfb,i;
-  int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-
-  maxover=0;
-  maxrange1 = 15;
-  maxrange2 = 7;
-
-
-  for (i=0; i<3; ++i) {
-    int maxsf1=0,maxsf2=0,minsf=1000;
-    /* see if we should use subblock gain */
-    for ( sfb = 0; sfb < SBPSY_s; sfb++ ) {
-      if (sfb < 6) {
-	if (-sf[sfb][i]>maxsf1) maxsf1 = -sf[sfb][i];
-      } else {
-	if (-sf[sfb][i]>maxsf2) maxsf2 = -sf[sfb][i];
-      }
-      if (-sf[sfb][i]<minsf) minsf = -sf[sfb][i];
-    }
-
-    /* boost subblock gain as little as possible so we can
-     * reach maxsf1 with scalefactors 
-     * 8*sbg >= maxsf1   
-     */
-    maxsf1 = Max(maxsf1-maxrange1*ifqstep,maxsf2-maxrange2*ifqstep);
-    sbg[i]=0;
-    if (minsf >0 ) sbg[i] = floor(.125*minsf + .001);
-    if (maxsf1 > 0)  sbg[i] = Max(sbg[i],(maxsf1/8 + (maxsf1 % 8 != 0)));
-    if (sbg[i] > 7) sbg[i]=7;
-
-
-    for ( sfb = 0; sfb < SBPSY_s; sfb++ ) {
-      sf[sfb][i] += 8*sbg[i];
-
-      if (sf[sfb][i] < 0) {
-	maxrange = sfb < 6 ? maxrange1 : maxrange2;
-        scalefac[sfb][i]= -sf[sfb][i]/ifqstep + (-sf[sfb][i]%ifqstep != 0);
-	if (scalefac[sfb][i]>maxrange) scalefac[sfb][i]=maxrange;
-	
-	if (-(sf[sfb][i] + scalefac[sfb][i]*ifqstep) >maxover)  {
-	  maxover=-(sf[sfb][i] + scalefac[sfb][i]*ifqstep);
-	}
-      }
-    }
-  }
-
-  return maxover;
-}
-
-
-
-/*
-	  ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-	  ol_sf =  (cod_info->global_gain-210.0);
-	  ol_sf -= ifqstep*scalefac[gr][ch].l[sfb];
-	  if (cod_info->preflag && sfb>=11) 
-	  ol_sf -= ifqstep*pretab[sfb];
-*/
-static int
-compute_scalefacs_long(int sf[SBPSY_l],gr_info *cod_info,int scalefac[SBPSY_l])
-{
-  int sfb;
-  int maxover;
-  int ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-  
-
-  if (cod_info->preflag)
-    for ( sfb = 11; sfb < SBPSY_l; sfb++ ) 
-      sf[sfb] += pretab[sfb]*ifqstep;
-
-
-  maxover=0;
-  for ( sfb = 0; sfb < SBPSY_l; sfb++ ) {
-
-    if (sf[sfb]<0) {
-      /* ifqstep*scalefac >= -sf[sfb], so round UP */
-      scalefac[sfb]= -sf[sfb]/ifqstep + (-sf[sfb] % ifqstep != 0);
-      if (scalefac[sfb] > max_range_long[sfb]) scalefac[sfb]=max_range_long[sfb];
-      
-      /* sf[sfb] should now be positive: */
-      if (  -(sf[sfb] + scalefac[sfb]*ifqstep)  > maxover) {
-	maxover = -(sf[sfb] + scalefac[sfb]*ifqstep);
-      }
-    }
-  }
-
-  return maxover;
-}
-  
-  
-
-
-
-
-
-
-/************************************************************************
- *
- * quantize and encode with the given scalefacs and global gain
- *
- * compute scalefactors, l3_enc, and return number of bits needed to encode
- *
- *
- ************************************************************************/
-
-static int
-VBR_quantize_granule( 
-          lame_global_flags *gfp,
-          FLOAT8                 xr34[576], 
-          int                    l3_enc[576],
-    const III_psy_ratio  * const ratio,  
-          III_scalefac_t * const scalefac, 
-    const int gr, 
-    const int ch)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  int status;
-  gr_info *cod_info;  
-  III_side_info_t * l3_side;
-  l3_side = &gfc->l3_side;
-  cod_info = &l3_side->gr[gr].ch[ch].tt;
-
-
-  /* encode scalefacs */
-  if ( gfc->is_mpeg1 ) 
-    status=scale_bitcount(scalefac, cod_info);
-  else
-    status=scale_bitcount_lsf(gfc,scalefac, cod_info);
-
-  if (status!=0) {
-    return -1;
-  }
-  
-  /* quantize xr34 */
-  cod_info->part2_3_length = count_bits(gfc,l3_enc,xr34,cod_info);
-  if (cod_info->part2_3_length >= LARGE_BITS) return -2;
-  cod_info->part2_3_length += cod_info->part2_length;
-
-
-  if (gfc->use_best_huffman==1) {
-    best_huffman_divide(gfc, gr, ch, cod_info, l3_enc);
-  }
-  return 0;
-}
-
-
-  
-/***********************************************************************
- *
- *      calc_short_block_vbr_sf()
- *      calc_long_block_vbr_sf()
- *
- *  Mark Taylor 2000-??-??
- *  Robert Hegemann 2000-10-25 made functions of it
- *
- ***********************************************************************/
-static const int MAX_SF_DELTA = 4;    
-
-static int 
-short_block_vbr_sf (
-    const lame_internal_flags        * const gfc,
-    const III_psy_xmin   * const l3_xmin,
-    const FLOAT8                 xr34_orig[576],
-    const FLOAT8                 xr34     [576],
-          III_scalefac_t * const vbrsf )
-{
-     int j, sfb, b;
-    int vbrmax = -10000; /* initialize for maximum search */
-  
-    for (j = 0, sfb = 0; sfb < SBMAX_s; sfb++) {
-        for (b = 0; b < 3; b++) {
-	    const  int start = gfc->scalefac_band.s[ sfb ];
-	    const  int end   = gfc->scalefac_band.s[ sfb+1 ];
-	    const  int width = end - start;
-	    
-            vbrsf->s[sfb][b] = find_scalefac_ave (&xr34[j], &xr34_orig[j],
-                                              sfb, l3_xmin->s[sfb][b], width);
-            j += width;
-        }
-    }
-    
-    for (sfb = 0; sfb < SBMAX_s; sfb++) {
-        for (b = 0; b < 3; b++) {
-	    if (sfb > 0) 
-	        if (vbrsf->s[sfb][b] > vbrsf->s[sfb-1][b]+MAX_SF_DELTA)
-                    vbrsf->s[sfb][b] = vbrsf->s[sfb-1][b]+MAX_SF_DELTA;
-	    if (sfb < SBMAX_s-1) 
-	        if (vbrsf->s[sfb][b] > vbrsf->s[sfb+1][b]+MAX_SF_DELTA)
-                    vbrsf->s[sfb][b] = vbrsf->s[sfb+1][b]+MAX_SF_DELTA;
-            if (vbrmax < vbrsf->s[sfb][b])
-                vbrmax = vbrsf->s[sfb][b];
-        }
-    }
-
-    return vbrmax;
-}
-
-
-
-static int 
-long_block_vbr_sf (
-    const lame_internal_flags        * const gfc,
-    const III_psy_xmin   * const l3_xmin,
-    const FLOAT8                 xr34_orig[576],
-    const FLOAT8                 xr34     [576],
-          III_scalefac_t * const vbrsf )
-{
-     int sfb;
-    int vbrmax = -10000; /* initialize for maximum search */
-    
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        const  int start = gfc->scalefac_band.l[ sfb ];
-        const  int end   = gfc->scalefac_band.l[ sfb+1 ];
-        const  int width = end - start;
-        
-        vbrsf->l[sfb] = find_scalefac_ave (&xr34[start], &xr34_orig[start],
-                                               sfb, l3_xmin->l[sfb], width);
-    }
-    
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        if (sfb > 0) 
-	    if (vbrsf->l[sfb] > vbrsf->l[sfb-1]+MAX_SF_DELTA)
-                vbrsf->l[sfb] = vbrsf->l[sfb-1]+MAX_SF_DELTA;
-        if (sfb < SBMAX_l-1) 
-	    if (vbrsf->l[sfb] > vbrsf->l[sfb+1]+MAX_SF_DELTA)
-                vbrsf->l[sfb] = vbrsf->l[sfb+1]+MAX_SF_DELTA;
-        if (vbrmax < vbrsf->l[sfb]) 
-            vbrmax = vbrsf->l[sfb];
-    }
-        
-    return vbrmax;
-}
-
-
-    /* a variation for vbr-mtrh */
-static int 
-short_block_sf (
-    const lame_internal_flags        * const gfc,
-    const III_psy_xmin   * const l3_xmin,
-    const FLOAT8                 xr34_orig[576],
-    const FLOAT8                 xr34     [576],
-          III_scalefac_t * const vbrsf )
-{
-     int j, sfb, b;
-    int vbrmean, vbrmin, vbrmax;
-    int sf_cache[SBMAX_s];
-  
-    for (j = 0, sfb = 0; sfb < SBMAX_s; sfb++) {
-        for (b = 0; b < 3; b++) {
-	    const  int start = gfc->scalefac_band.s[ sfb ];
-	    const  int end   = gfc->scalefac_band.s[ sfb+1 ];
-	    const  int width = end - start;
-	    
-            if (0 == gfc->noise_shaping_amp) {
-                /*  the faster and sloppier mode to use at lower quality
-                 */
-                vbrsf->s[sfb][b] = find_scalefac (&xr34[j], &xr34_orig[j], sfb,
-                                              l3_xmin->s[sfb][b], width);
-	    }
-            else {
-                /*  the slower and better mode to use at higher quality
-                 */
-                vbrsf->s[sfb][b] = find_scalefac_ave (&xr34[j], &xr34_orig[j],
-                                              sfb, l3_xmin->s[sfb][b], width);
-            }
-            j += width;
-        }
-    }
-    
-    vbrmax = -10000;
-    
-    for (b = 0; b < 3; b++) { 
-
-        /*  make working copy, select_kth_int will reorder!
-         */
-        for (sfb = 0; sfb < SBMAX_s; sfb++) 
-            sf_cache[sfb] = vbrsf->s[sfb][b];
-        
-        /*  find median value, take it as mean 
-         */
-        vbrmean = select_kth_int (sf_cache, SBMAX_s, (SBMAX_s+1)/2);
-        
-        /*  get min value
-         */
-        vbrmin = 10000;
-        for (sfb = 0; sfb < SBMAX_s; sfb++) { 
-            if (vbrmin > vbrsf->s[sfb][b])
-                vbrmin = vbrsf->s[sfb][b];
-        }
-        
-        /*  patch sfb12
-         */
-        vbrsf->s[SBPSY_s][b] = Min (vbrsf->s[SBPSY_s][b], vbrmean);
-        vbrsf->s[SBPSY_s][b] = Max (vbrsf->s[SBPSY_s][b], vbrmin-(vbrmean-vbrmin));
-        
-        /*  cut peaks
-         */
-        for (sfb = 0; sfb < SBMAX_s; sfb++) {
-            if (vbrsf->s[sfb][b] > vbrmean+(vbrmean-vbrmin))
-                vbrsf->s[sfb][b] = vbrmean+(vbrmean-vbrmin);
-        }
-        
-        /*  get max value
-         */
-        for (sfb = 0; sfb < SBMAX_s; sfb++) { 
-            if (vbrmax < vbrsf->s[sfb][b])
-                vbrmax = vbrsf->s[sfb][b];
-        }
-    }
-    
-    return vbrmax;
-}
-
-
-    /* a variation for vbr-mtrh */
-static int 
-long_block_sf (
-    const lame_internal_flags        * const gfc,
-    const III_psy_xmin   * const l3_xmin,
-    const FLOAT8                 xr34_orig[576],
-    const FLOAT8                 xr34     [576],
-          III_scalefac_t * const vbrsf )
-{
-     int sfb;
-    int vbrmean, vbrmin, vbrmax;
-    int sf_cache[SBMAX_l];
-    
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        const  int start = gfc->scalefac_band.l[ sfb ];
-        const  int end   = gfc->scalefac_band.l[ sfb+1 ];
-        const  int width = end - start;
-        
-        if (0 == gfc->noise_shaping_amp) {
-            /*  the faster and sloppier mode to use at lower quality
-             */
-            vbrsf->l[sfb] = find_scalefac (&xr34[start], &xr34_orig[start], 
-                                           sfb, l3_xmin->l[sfb], width);
-        }
-        else {
-            /*  the slower and better mode to use at higher quality
-             */
-            vbrsf->l[sfb] = find_scalefac_ave (&xr34[start], &xr34_orig[start],
-                                               sfb, l3_xmin->l[sfb], width);
-        }
-    }
-    
-    /*  make working copy, select_kth_int will reorder!
-     */
-    for (sfb = 0; sfb < SBMAX_l; sfb++)
-        sf_cache[sfb] = vbrsf->l[sfb];
-    
-    /*  find median value, take it as mean 
-     */
-    vbrmean = select_kth_int (sf_cache, SBMAX_l, (SBMAX_l+1)/2);
-
-    /*  get min value
-     */
-    vbrmin = +10000;
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        if (vbrmin > vbrsf->l[sfb])
-            vbrmin = vbrsf->l[sfb];
-    }
-    
-    /*  patch sfb21
-     */
-    vbrsf->l[SBPSY_l] = Min (vbrsf->l[SBPSY_l], vbrmean);
-    vbrsf->l[SBPSY_l] = Max (vbrsf->l[SBPSY_l], vbrmin-(vbrmean-vbrmin));
-    
-    /*  cut peaks
-     */
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        if (vbrsf->l[sfb] > vbrmean+(vbrmean-vbrmin))
-            vbrsf->l[sfb] = vbrmean+(vbrmean-vbrmin);
-    }
-    
-    /*  get max value
-     */
-    vbrmax = -10000;
-    for (sfb = 0; sfb < SBMAX_l; sfb++) {
-        if (vbrmax < vbrsf->l[sfb]) 
-            vbrmax = vbrsf->l[sfb];
-    }
-        
-    return vbrmax;
-}
-
-
-
-/******************************************************************
- *
- *  short block scalefacs
- *
- ******************************************************************/
-
-static void 
-short_block_scalefacs (
-       lame_global_flags *gfp,
-          gr_info        * const cod_info,
-          III_scalefac_t * const scalefac,
-          III_scalefac_t * const vbrsf,
-          int            * const VBRmax )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    const int * max_range;
-     int sfb, b;
-    int maxover, maxover0, maxover1, mover;
-    int v0, v1;
-    int minsfb;
-    int vbrmax = *VBRmax;
-    
-    max_range = gfc->is_mpeg1 ? max_range_short : max_range_short_lsf;
-    
-    maxover0 = 0;
-    maxover1 = 0;
-    for (sfb = 0; sfb < SBPSY_s; sfb++) {
-        for (b = 0; b < 3; b++) {
-            v0 = (vbrmax - vbrsf->s[sfb][b]) - (4*14 + 2*max_range[sfb]);
-            v1 = (vbrmax - vbrsf->s[sfb][b]) - (4*14 + 4*max_range[sfb]);
-            if (maxover0 < v0)
-                maxover0 = v0;
-            if (maxover1 < v1)
-                maxover1 = v1;
-        }
-    }
-
-    if (gfc->noise_shaping == 2)
-        /* allow scalefac_scale=1 */
-        mover = Min (maxover0, maxover1);
-    else
-        mover = maxover0; 
-
-    vbrmax   -= mover;
-    maxover0 -= mover;
-    maxover1 -= mover;
-
-    if (maxover0 == 0) 
-        cod_info->scalefac_scale = 0;
-    else if (maxover1 == 0)
-        cod_info->scalefac_scale = 1;
-
-    /* sf =  (cod_info->global_gain-210.0) */
-    cod_info->global_gain = vbrmax + 210;
-    assert(cod_info->global_gain < 256);
-    
-    if (vbr_mtrh == gfp->VBR && cod_info->global_gain > 1) {
-        /*  just to be safe, reduce global_gain by one
-         */
-        cod_info->global_gain -= 1; 
-    }
-    
-    if (cod_info->global_gain > 255)
-        cod_info->global_gain = 255;
-
-    for (sfb = 0; sfb < SBPSY_s; sfb++) {
-        for (b = 0; b < 3; b++) {
-            vbrsf->s[sfb][b] -= vbrmax;
-        }
-    }
-    if ( gfc->is_mpeg1 ) 
-        maxover = compute_scalefacs_short (vbrsf->s, cod_info, scalefac->s,
-                                           cod_info->subblock_gain);
-    else
-        maxover = compute_scalefacs_short_lsf (vbrsf->s, cod_info, scalefac->s,
-                                               cod_info->subblock_gain);
-
-    assert (maxover <= 0);
-
-    /* adjust global_gain so at least 1 subblock gain = 0 */
-    minsfb = 999; /* prepare for minimum search */
-    for (b = 0; b < 3; b++) 
-        if (minsfb > cod_info->subblock_gain[b])
-            minsfb = cod_info->subblock_gain[b];
-    
-    if (minsfb > cod_info->global_gain/8)
-        minsfb = cod_info->global_gain/8;
-    
-    vbrmax                -= 8*minsfb; 
-    cod_info->global_gain -= 8*minsfb;
-    
-    for (b = 0; b < 3; b++)
-        cod_info->subblock_gain[b] -= minsfb;
-        
-    *VBRmax = vbrmax;
-}
-
-
-
-/******************************************************************
- *
- *  long block scalefacs
- *
- ******************************************************************/
-
-static void 
-long_block_scalefacs (
-    lame_global_flags *gfp,
-          gr_info        * const cod_info,
-          III_scalefac_t * const scalefac,
-          III_scalefac_t * const vbrsf,
-          int            * const VBRmax )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    const int * max_range;
-    const int * max_rangep;
-     int sfb;
-    int maxover, maxover0, maxover1, maxover0p, maxover1p, mover;
-    int v0, v1, v0p, v1p;
-    int vbrmax = *VBRmax;
-
-    max_range  = gfc->is_mpeg1 ? max_range_long : max_range_long_lsf;
-    max_rangep = gfc->is_mpeg1 ? max_range_long : max_range_long_lsf_pretab;
-    
-    maxover0  = 0;
-    maxover1  = 0;
-    maxover0p = 0; /* pretab */
-    maxover1p = 0; /* pretab */
-       
-    for ( sfb = 0; sfb < SBPSY_l; sfb++ ) {
-        v0  = (vbrmax - vbrsf->l[sfb]) - 2*max_range[sfb];
-        v1  = (vbrmax - vbrsf->l[sfb]) - 4*max_range[sfb];
-        v0p = (vbrmax - vbrsf->l[sfb]) - 2*(max_rangep[sfb]+pretab[sfb]);
-        v1p = (vbrmax - vbrsf->l[sfb]) - 4*(max_rangep[sfb]+pretab[sfb]);
-        if (maxover0 < v0)
-            maxover0 = v0;
-        if (maxover1 < v1)
-            maxover1 = v1;
-        if (maxover0p < v0p)
-            maxover0p = v0p;
-        if (maxover1p < v1p)
-            maxover1p = v1p;
-    }
-
-    mover = Min (maxover0, maxover0p);
-    if (gfc->noise_shaping == 2) {
-        /* allow scalefac_scale=1 */
-        mover = Min (mover, maxover1);
-        mover = Min (mover, maxover1p);
-    }
-
-    vbrmax    -= mover;
-    maxover0  -= mover;
-    maxover0p -= mover;
-    maxover1  -= mover;
-    maxover1p -= mover;
-
-    if (maxover0 <= 0) {
-        cod_info->scalefac_scale = 0;
-        cod_info->preflag = 0;
-        vbrmax -= maxover0;
-    } else if (maxover0p <= 0) {
-        cod_info->scalefac_scale = 0;
-        cod_info->preflag = 1;
-        vbrmax -= maxover0p;
-    } else if (maxover1 == 0) {
-        cod_info->scalefac_scale = 1;
-        cod_info->preflag = 0;
-    } else if (maxover1p == 0) {
-        cod_info->scalefac_scale = 1;
-        cod_info->preflag = 1;
-    } else {
-        assert(0); /* this should not happen */
-    }
-
-    /* sf =  (cod_info->global_gain-210.0) */
-    cod_info->global_gain = vbrmax + 210;
-    assert (cod_info->global_gain < 256);
-
-    if (vbr_mtrh == gfp->VBR && cod_info->global_gain > 1) {
-        /*  just to be safe, reduce global gain by one
-         */
-        cod_info->global_gain -= 1; 
-    }
-    
-    if (cod_info->global_gain > 255) 
-        cod_info->global_gain = 255;
-    
-    for (sfb = 0; sfb < SBPSY_l; sfb++)   
-        vbrsf->l[sfb] -= vbrmax;
-    
-    if ( gfc->is_mpeg1 == 1 ) 
-        maxover = compute_scalefacs_long (vbrsf->l, cod_info, scalefac->l);
-    else
-        maxover = compute_scalefacs_long_lsf (vbrsf->l, cod_info, scalefac->l);
-    
-    assert (maxover <= 0);
-    
-    *VBRmax = vbrmax;
-}
-
-
-
-/***********************************************************************
- *
- *      calc_fac()
- *
- *  Mark Taylor 2000-??-??
- *  Robert Hegemann 2000-10-20 made functions of it
- *
- ***********************************************************************/
-
-static FLOAT8 calc_fac ( const int ifac )
-{
-    if (ifac+210 < Q_MAX) 
-        return 1/IPOW20 (ifac+210);
-    else
-        return pow (2.0, 0.75*ifac/4.0);
-}
-
-
-
-/***********************************************************************
- *
- *  quantize xr34 based on scalefactors
- *
- *  calc_short_block_xr34      
- *  calc_long_block_xr34
- *
- *  Mark Taylor 2000-??-??
- *  Robert Hegemann 2000-10-20 made functions of them
- *
- ***********************************************************************/
-
-static void
-short_block_xr34 ( 
-    const lame_internal_flags        * const gfc,
-    const gr_info        * const cod_info,
-    const III_scalefac_t * const scalefac, 
-    const FLOAT8                 xr34_orig[576],
-          FLOAT8                 xr34     [576] )
-{
-     int sfb, l, j, b;
-    int    ifac, ifqstep, start, end;
-    FLOAT8 fac;
-
-    /* even though there is no scalefactor for sfb12
-     * subblock gain affects upper frequencies too, that's why
-     * we have to go up to SBMAX_s
-     */
-    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-    for ( j = 0, sfb = 0; sfb < SBMAX_s; sfb++ ) {
-        start = gfc->scalefac_band.s[ sfb ];
-        end   = gfc->scalefac_band.s[ sfb+1 ];
-        for (b = 0; b < 3; b++) {
-            ifac = 8*cod_info->subblock_gain[b]+ifqstep*scalefac->s[sfb][b];
-            fac = calc_fac( ifac );
-            /*
-             *  loop unrolled into "Duff's Device".  Robert Hegemann
-             */
-            l = (end-start+7) / 8;
-            switch ((end-start) % 8) {
-                default:
-                case 0: do{ xr34[j] = xr34_orig[j]*fac; j++;
-                case 7:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 6:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 5:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 4:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 3:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 2:     xr34[j] = xr34_orig[j]*fac; j++;
-                case 1:     xr34[j] = xr34_orig[j]*fac; j++; } while (--l);
-            }
-        }
-    }
-}
-
-
-
-static void 
-long_block_xr34 ( 
-    const lame_internal_flags        * const gfc,
-    const gr_info        * const cod_info,
-    const III_scalefac_t * const scalefac, 
-    const FLOAT8                 xr34_orig[576],
-          FLOAT8                 xr34     [576] )
-{ 
-     int sfb, l, j;
-    int    ifac, ifqstep, start, end;
-    FLOAT8 fac;
-        
-    ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4;
-    for ( sfb = 0; sfb < SBMAX_l; sfb++ ) {
-        
-        ifac = ifqstep*scalefac->l[sfb];
-        if (cod_info->preflag)
-            ifac += ifqstep*pretab[sfb];
-
-        fac = calc_fac( ifac );
-
-        start = gfc->scalefac_band.l[ sfb ];
-        end   = gfc->scalefac_band.l[ sfb+1 ];
-        /*
-         *  loop unrolled into "Duff's Device".  Robert Hegemann
-         */
-        j = start;
-        l = (end-start+7) / 8;
-        switch ((end-start) % 8) {
-            default:
-            case 0: do{ xr34[j] = xr34_orig[j]*fac; j++;
-            case 7:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 6:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 5:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 4:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 3:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 2:     xr34[j] = xr34_orig[j]*fac; j++;
-            case 1:     xr34[j] = xr34_orig[j]*fac; j++; } while (--l);
-        }
-    }
-}
-
-
-
-
-
-
-
-
-
-/************************************************************************
- *
- * VBR_noise_shaping()
- *
- * compute scalefactors, l3_enc, and return number of bits needed to encode
- *
- * return code:    0   scalefactors were found with all noise < masking
- *
- *               n>0   scalefactors required too many bits.  global gain
- *                     was decreased by n
- *                     If n is large, we should probably recompute scalefacs
- *                     with a lower quality.
- *
- *               n<0   scalefactors used less than minbits.
- *                     global gain was increased by n.  
- *                     If n is large, might want to recompute scalefacs
- *                     with a higher quality setting?
- *
- ************************************************************************/
-static int
-VBR_noise_shaping (
-    lame_global_flags *gfp,
-    FLOAT8             xr       [576], 
-    FLOAT8             xr34orig [576],
-    III_psy_ratio     *ratio,
-    int                l3_enc   [576], 
-    int                digital_silence, 
-    int                minbits,
-    int                maxbits,
-    III_scalefac_t    *scalefac,
-    III_psy_xmin      *l3_xmin,
-    int                gr,
-    int                ch )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_scalefac_t save_sf;
-    III_scalefac_t vbrsf;
-    gr_info *cod_info;  
-    FLOAT8 xr34[576];
-    int shortblock;
-    int vbrmax;
-    int global_gain_adjust = 0;
-
-    cod_info   = &gfc->l3_side.gr[gr].ch[ch].tt;
-    shortblock = (cod_info->block_type == SHORT_TYPE);
-  
-    if (shortblock)
-        vbrmax = short_block_vbr_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
-    else
-        vbrmax = long_block_vbr_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
-
-    /* save a copy of vbrsf, incase we have to recomptue scalefacs */
-    memcpy (&save_sf, &vbrsf, sizeof(III_scalefac_t));
-
-    do { 
-        memset (scalefac, 0, sizeof(III_scalefac_t));
-        
-        if (shortblock) {
-            short_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
-            short_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
-        } else {
-            long_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
-            long_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
-        } 
-        VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
-
-        
-        /* decrease noise until we use at least minbits
-         */
-        if (cod_info->part2_3_length < minbits) {
-            if (digital_silence) break;  
-            //if (cod_info->part2_3_length == cod_info->part2_length) break;
-            if (vbrmax+210 == 0) break;
-            
-            /* decrease global gain, recompute scale factors */
-            --vbrmax;
-            --global_gain_adjust;
-            memcpy (&vbrsf, &save_sf, sizeof(III_scalefac_t));
-        }
-
-    } while (cod_info->part2_3_length < minbits);
-
-    /* inject noise until we meet our bit limit
-     */
-    while (cod_info->part2_3_length > Min (maxbits, MAX_BITS)) {
-        /* increase global gain, keep existing scale factors */
-        ++cod_info->global_gain;
-        if (cod_info->global_gain > 255) 
-            ERRORF (gfc,"%ld impossible to encode ??? frame! bits=%d\n",
-                    //  gfp->frameNum, cod_info->part2_3_length);
-                             -1,       cod_info->part2_3_length);
-        VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
-
-        ++global_gain_adjust;
-    }
-
-    return global_gain_adjust;
-}
-
-
-
-/************************************************************************
- *
- *  VBR_noise_shaping2()
- *
- *  may result in a need of too many bits, then do it CBR like
- *
- *  Robert Hegemann 2000-10-25
- *
- ***********************************************************************/
- 
-int
-VBR_noise_shaping2 (
-    lame_global_flags        *gfp,
-    FLOAT8                 xr       [576], 
-    FLOAT8                 xr34orig [576],
-    III_psy_ratio  * const ratio,
-    int                    l3_enc   [576], 
-    int                    digital_silence, 
-    int                    minbits,
-    int                    maxbits,
-    III_scalefac_t * const scalefac,
-    III_psy_xmin   * const l3_xmin,
-    int                    gr,
-    int                    ch )
-{
-    lame_internal_flags *gfc=gfp->internal_flags;
-    III_scalefac_t vbrsf;
-    gr_info *cod_info;  
-    FLOAT8 xr34[576];
-    int shortblock, ret, bits, huffbits;
-    int vbrmax, best_huffman = gfc->use_best_huffman;
-
-    cod_info   = &gfc->l3_side.gr[gr].ch[ch].tt;
-    shortblock = (cod_info->block_type == SHORT_TYPE);
-      
-    if (shortblock) {
-        vbrmax = short_block_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
-        short_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
-        short_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
-    } else {
-        vbrmax = long_block_sf (gfc, l3_xmin, xr34orig, xr, &vbrsf);  
-        long_block_scalefacs (gfp, cod_info, scalefac, &vbrsf, &vbrmax);
-        long_block_xr34      (gfc, cod_info, scalefac, xr34orig, xr34);
-    } 
-    
-    gfc->use_best_huffman = 0; /* we will do it later */
- 
-    ret = VBR_quantize_granule (gfp, xr34, l3_enc, ratio, scalefac, gr, ch);
-    
-    gfc->use_best_huffman = best_huffman;
-
-    if (ret == -1) /* Houston, we have a problem */
-        return -1;
-
-    if (cod_info->part2_3_length < minbits) {
-        huffbits = minbits - cod_info->part2_length;
-        bits = bin_search_StepSize (gfc, cod_info, huffbits, 
-                                    gfc->OldValue[ch], xr34, l3_enc);
-        gfc->OldValue[ch] = cod_info->global_gain;
-        cod_info->part2_3_length  = bits + cod_info->part2_length;
-    }
-    if (cod_info->part2_3_length > maxbits) {
-        huffbits = maxbits - cod_info->part2_length;
-        bits = bin_search_StepSize (gfc, cod_info, huffbits, 
-                                    gfc->OldValue[ch], xr34, l3_enc);
-        gfc->OldValue[ch] = cod_info->global_gain;
-        cod_info->part2_3_length = bits;
-        if (bits > huffbits) {
-            bits = inner_loop (gfc, cod_info, huffbits, xr34, l3_enc);
-            cod_info->part2_3_length  = bits;
-        }
-        if (bits >= LARGE_BITS) /* Houston, we have a problem */
-            return -2;
-        cod_info->part2_3_length += cod_info->part2_length;
-    }
-
-    if (cod_info->part2_length >= LARGE_BITS) /* Houston, we have a problem */
-        return -2;
-        
-    assert (cod_info->global_gain < 256);
-    
-    return 0;
-}
-
-
-
-
-void
-VBR_quantize(lame_global_flags *gfp,
-                FLOAT8 pe[2][2], FLOAT8 ms_ener_ratio[2],
-                FLOAT8 xr[2][2][576], III_psy_ratio ratio[2][2],
-                int l3_enc[2][2][576],
-                III_scalefac_t scalefac[2][2])
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  III_psy_xmin l3_xmin[2][2];
-  int minbits,maxbits,max_frame_bits,totbits,gr,ch,i,bits_ok;
-  int bitsPerFrame,mean_bits;
-  int analog_silence;
-  FLOAT8 qadjust;
-  III_side_info_t * l3_side;
-  gr_info *cod_info;  
-  int digital_silence[2][2];
-  FLOAT8 masking_lower_db=0;
-  FLOAT8 xr34[2][2][576];
-  // static const FLOAT8 dbQ[10]={-6.0,-5.0,-4.0,-3.0, -2.0, -1.0, -.25, .5, 1.25, 2.0};
-  /* from quantize.c VBR algorithm */
-  /*static const FLOAT8 dbQ[10]=
-   {-5.5,-4.25,-3.0,-2.50, -1.75, -.75, -.5, -.25, .25, .75};*/
-  /* a third dbQ table ?!? */
-  static const FLOAT8 dbQ[10]=
-  {-6.06,-4.4,-2.9,-1.57, -0.4, 0.61, 1.45, 2.13, 2.65, 3.0};
-  
-  qadjust=0;   /* start with -1 db quality improvement over quantize.c VBR */
-
-  l3_side = &gfc->l3_side;
-  //gfc->ATHlower += (4-gfp->VBR_q)*4.0; 
-  //if (gfc->ATHlower < 0) gfc->ATHlower=0;
-
-
-  /* now find out: if the frame can be considered analog silent
-   *               if each granule can be considered digital silent
-   * and calculate l3_xmin and the fresh xr34 array
-   */
-
-  assert( gfp->VBR_q <= 9 );
-  assert( gfp->VBR_q >= 0 );
-  analog_silence=1;
-  for (gr = 0; gr < gfc->mode_gr; gr++) {
-    /* copy data to be quantized into xr */
-    if (gfc->mode_ext==MPG_MD_MS_LR) {
-      ms_convert(xr[gr],xr[gr]);
-    }
-    for (ch = 0; ch < gfc->channels_out; ch++) {
-      /* if in the following sections the quality would not be adjusted
-       * then we would only have to call calc_xmin once here and
-       * could drop subsequently calls (rh 2000/07/17)
-       */
-      int over_ath;
-      cod_info = &l3_side->gr[gr].ch[ch].tt;
-      cod_info->part2_3_length=LARGE_BITS;
-      
-      if (cod_info->block_type == SHORT_TYPE) {
-          cod_info->sfb_lmax = 0; /* No sb*/
-          cod_info->sfb_smin = 0;
-      } else {
-          /* MPEG 1 doesnt use last scalefactor band */
-          cod_info->sfb_lmax = SBPSY_l;
-          cod_info->sfb_smin = SBPSY_s;    /* No sb */
-	  if (cod_info->mixed_block_flag) {
-	    cod_info->sfb_lmax        = 8;
-	    cod_info->sfb_smin        = 3;
-	  }
-      }
-      
-      /* quality setting */
-      masking_lower_db = dbQ[gfp->VBR_q];
-      if (pe[gr][ch]>750) {
-        masking_lower_db -= Min(10,4*(pe[gr][ch]-750.)/750.);
-      }
-      gfc->masking_lower = pow(10.0,masking_lower_db/10);
-      
-      /* masking thresholds */
-      over_ath = calc_xmin(gfp,xr[gr][ch],&ratio[gr][ch],cod_info,&l3_xmin[gr][ch]);
-      
-      /* if there are bands with more energy than the ATH 
-       * then we say the frame is not analog silent */
-      if (over_ath) {
-        analog_silence = 0;
-      }
-      
-      /* if there is no line with more energy than 1e-20
-       * then this granule is considered to be digital silent
-       * plus calculation of xr34 */
-      digital_silence[gr][ch] = 1;
-      for(i=0;i<576;i++) {
-        FLOAT8 temp=fabs(xr[gr][ch][i]);
-        xr34[gr][ch][i]=sqrt(sqrt(temp)*temp);
-        digital_silence[gr][ch] &= temp < 1E-20;
-      }
-    } /* ch */
-  }  /* gr */
-
-  
-  /* compute minimum allowed bits from minimum allowed bitrate */
-  if (analog_silence) {
-    gfc->bitrate_index=1;
-  } else {
-    gfc->bitrate_index=gfc->VBR_min_bitrate;
-  }
-  getframebits(gfp, &bitsPerFrame, &mean_bits);
-  minbits = (mean_bits/gfc->channels_out);
-
-  /* compute maximum allowed bits from max allowed bitrate */
-  gfc->bitrate_index=gfc->VBR_max_bitrate;
-  getframebits(gfp, &bitsPerFrame, &mean_bits);
-  max_frame_bits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
-  maxbits=2.5*(mean_bits/gfc->channels_out);
-
-  {
-  /* compute a target  mean_bits based on compression ratio 
-   * which was set based on VBR_q  
-   */
-  int bit_rate = gfp->out_samplerate*16*gfc->channels_out/(1000.0*gfp->compression_ratio);
-  bitsPerFrame = (bit_rate*gfp->framesize*1000)/gfp->out_samplerate;
-  mean_bits = (bitsPerFrame - 8*gfc->sideinfo_len) / gfc->mode_gr;
-  }
-
-
-  minbits = Max(minbits,125);
-  minbits=Max(minbits,.40*(mean_bits/gfc->channels_out));
-  maxbits=Min(maxbits,2.5*(mean_bits/gfc->channels_out));
-
-
-
-
-
-
-
-  /* 
-   * loop over all ch,gr, encoding anything with bits > .5*(max_frame_bits/4)
-   *
-   * If a particular granule uses way too many bits, it will be re-encoded
-   * on the next iteration of the loop (with a lower quality setting).  
-   * But granules which dont use
-   * use too many bits will not be re-encoded.
-   *
-   * minbits:  minimum allowed bits for 1 granule 1 channel
-   * maxbits:  maximum allowwed bits for 1 granule 1 channel
-   * max_frame_bits:  maximum allowed bits for entire frame
-   * (max_frame_bits/4)   estimate of average bits per granule per channel
-   * 
-   */
-
-  do {
-  
-    totbits=0;
-    for (gr = 0; gr < gfc->mode_gr; gr++) {
-      int minbits_lr[2];
-      minbits_lr[0]=minbits;
-      minbits_lr[1]=minbits;
-
-#if 0
-      if (gfc->mode_ext==MPG_MD_MS_LR) {
-        FLOAT8 fac;
-        fac = .33*(.5-ms_ener_ratio[gr])/.5;
-        if (fac<0) fac=0;
-        if (fac>.5) fac=.5;
-        minbits_lr[0] = (1+fac)*minbits;
-        minbits_lr[1] = Max(125,(1-fac)*minbits);
-      }
-#endif
-
-
-      for (ch = 0; ch < gfc->channels_out; ch++) { 
-        int adjusted,shortblock;
-        cod_info = &l3_side->gr[gr].ch[ch].tt;
-        
-        /* ENCODE this data first pass, and on future passes unless it uses
-         * a very small percentage of the max_frame_bits  */
-        if (cod_info->part2_3_length > (max_frame_bits/(2*gfc->channels_out*gfc->mode_gr))) {
-  
-          shortblock = (cod_info->block_type == SHORT_TYPE);
-  
-          /* Adjust allowed masking based on quality setting */
-          if (qadjust!=0 /*|| shortblock*/) {
-            masking_lower_db = dbQ[gfp->VBR_q] + qadjust;
-
-            /*
-            if (shortblock) masking_lower_db -= 4;
-            */
-     
-            if (pe[gr][ch]>750)
-              masking_lower_db -= Min(10,4*(pe[gr][ch]-750.)/750.);
-            gfc->masking_lower = pow(10.0,masking_lower_db/10);
-            calc_xmin( gfp, xr[gr][ch], ratio[gr]+ch, cod_info, l3_xmin[gr]+ch);
-          }
-          
-          /* digital silent granules do not need the full round trip,
-           * but this can be optimized later on
-           */
-          adjusted = VBR_noise_shaping (gfp,xr[gr][ch],xr34[gr][ch],
-                                        ratio[gr]+ch,l3_enc[gr][ch],
-                                        digital_silence[gr][ch],
-                                        minbits_lr[ch],
-                                        maxbits,scalefac[gr]+ch,
-                                        l3_xmin[gr]+ch,gr,ch);
-          if (adjusted>10) {
-            /* global_gain was changed by a large amount to get bits < maxbits */
-            /* quality is set to high.  we could set bits = LARGE_BITS
-             * to force re-encoding.  But most likely the other channels/granules
-             * will also use too many bits, and the entire frame will
-             * be > max_frame_bits, forcing re-encoding below.
-             */
-            // cod_info->part2_3_bits = LARGE_BITS;
-          }
-        }
-        totbits += cod_info->part2_3_length;
-      }
-    }
-    bits_ok=1;
-    if (totbits>max_frame_bits) {
-      /* lower quality */
-      qadjust += Max(.125,Min(1,(totbits-max_frame_bits)/300.0));
-      /* adjusting minbits and maxbits is necessary too
-       * cos lowering quality is not enough in rare cases
-       * when each granule still needs almost maxbits, it wont fit */ 
-      minbits = Max(125,minbits*0.975);
-      maxbits = Max(minbits,maxbits*0.975);
-      //      DEBUGF("%i totbits>max_frame_bits   totbits=%i  maxbits=%i \n",gfp->frameNum,totbits,max_frame_bits);
-      //      DEBUGF("next masking_lower_db = %f \n",masking_lower_db + qadjust);
-      bits_ok=0;
-    }
-    
-  } while (!bits_ok);
-  
-
-
-  /* find optimal scalefac storage.  Cant be done above because
-   * might enable scfsi which breaks the interation loops */
-  totbits=0;
-  for (gr = 0; gr < gfc->mode_gr; gr++) {
-    for (ch = 0; ch < gfc->channels_out; ch++) {
-      best_scalefac_store(gfc, gr, ch, l3_enc, l3_side, scalefac);
-      totbits += l3_side->gr[gr].ch[ch].tt.part2_3_length;
-    }
-  }
-
-
-  
-
-  if (analog_silence && !gfp->VBR_hard_min) {
-    gfc->bitrate_index = 1;
-  } else {
-    gfc->bitrate_index = gfc->VBR_min_bitrate;
-  }
-  for( ; gfc->bitrate_index < gfc->VBR_max_bitrate; gfc->bitrate_index++ ) {
-
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    maxbits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
-    if (totbits <= maxbits) break;
-  }
-  if (gfc->bitrate_index == gfc->VBR_max_bitrate) {
-    getframebits (gfp, &bitsPerFrame, &mean_bits);
-    maxbits = ResvFrameBegin(gfp, l3_side, mean_bits, bitsPerFrame);
-  }
-
-  //  DEBUGF("%i total_bits=%i max_frame_bits=%i index=%i  \n",gfp->frameNum,totbits,max_frame_bits,gfc->bitrate_index);
-
-  for (gr = 0; gr < gfc->mode_gr; gr++) {
-    for (ch = 0; ch < gfc->channels_out; ch++) {
-      cod_info = &l3_side->gr[gr].ch[ch].tt;
-
-
-      ResvAdjust (gfc, cod_info, l3_side, mean_bits);
-      
-      /*******************************************************************
-       * set the sign of l3_enc from the sign of xr
-       *******************************************************************/
-      for ( i = 0; i < 576; i++) {
-        if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1;
-      }
-    }
-  }
-  ResvFrameEnd (gfc, l3_side, mean_bits);
-
-
-
-}
-
-
-
--- a/sys/src/games/mp3enc/version.c
+++ /dev/null
@@ -1,219 +1,0 @@
-/*
- *      Version numbering for LAME.
- *
- *      Copyright (c) 1999 A.L. Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*!
-  \file   version.c
-  \brief  Version numbering for LAME.
-
-  Contains functions which describe the version of LAME.
-
-  \author A.L. Faber
-  \version \$Id: version.c,v 1.17 2001/02/20 18:17:59 aleidinger Exp $
-  \ingroup libmp3lame
-
-  \todo The mp3x version should be located in the mp3x source,
-        not in the libmp3lame source.
-*/
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
-#include <stdio.h>
-#include <lame.h>
-#include "version.h"    /* macros of version numbers */
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-//! Stringify \a x.
-#define STR(x)   #x
-//! Stringify \a x, perform macro expansion.
-#define XSTR(x)  STR(x)
-
-#if defined(MMX_choose_table)
-# define V1  "MMX "
-#else
-# define V1  ""
-#endif
-
-#if defined(KLEMM)
-# define V2  "KLM "
-#else
-# define V2  ""
-#endif
-
-#if defined(RH)
-# define V3  "RH "
-#else
-# define V3  ""
-#endif
-
-//! Compile time features.
-#define V   V1 V2 V3
-
-//! Get the LAME version string.
-/*!
-  \param void
-  \return a pointer to a string which describes the version of LAME.
-*/
-const char*  get_lame_version ( void )		/* primary to write screen reports */
-{
-    /* Here we can also add informations about compile time configurations */
-
-#if   LAME_ALPHA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
-        "(alpha " XSTR(LAME_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
-#elif LAME_BETA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
-        "(beta " XSTR(LAME_BETA_VERSION) ", " __DATE__ ")";
-#else
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V;
-#endif
-
-    return str;
-}
-
-
-//! Get the short LAME version string.
-/*!
-  It's mainly for inclusion into the MP3 stream.
-
-  \param void   
-  \return a pointer to the short version of the LAME version string.
-*/
-const char*  get_lame_short_version ( void )
-{
-    /* adding date and time to version string makes it harder for output
-       validation */
-
-#if   LAME_ALPHA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (alpha)";
-#elif LAME_BETA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (beta)";
-#else
-    static /*@observer@*/ const char *const str =
-        XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION)
-#endif
-
-    return str;
-}
-
-
-//! Get the version string for GPSYCHO.
-/*!
-  \param void
-  \return a pointer to a string which describes the version of GPSYCHO.
-*/
-const char*  get_psy_version ( void )
-{
-#if   PSY_ALPHA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
-        " (alpha " XSTR(PSY_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
-#elif PSY_BETA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
-        " (beta " XSTR(PSY_BETA_VERSION) ", " __DATE__ ")";
-#else
-    static /*@observer@*/ const char *const str =
-        XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION);
-#endif
-
-    return str;
-}
-
-
-//! Get the mp3x version string.
-/*!
-  \param void
-  \return a pointer to a string which describes the version of mp3x.
-*/
-const char*  get_mp3x_version ( void )
-{
-#if   MP3X_ALPHA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION)
-        " (alpha " XSTR(MP3X_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
-#elif MP3X_BETA_VERSION > 0
-    static /*@observer@*/ const char *const str =
-        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION)
-        " (beta " XSTR(MP3X_BETA_VERSION) ", " __DATE__ ")";
-#else
-    static /*@observer@*/ const char *const str =
-        XSTR(MP3X_MAJOR_VERSION) "." XSTR(MP3X_MINOR_VERSION);
-#endif
-
-    return str;
-}
-
-
-//! Get the URL for the LAME website.
-/*!
-  \param void
-  \return a pointer to a string which is a URL for the LAME website.
-*/
-const char*  get_lame_url ( void )
-{
-    static /*@observer@*/ const char *const str = LAME_URL;
-
-    return str;
-}    
-
-
-//! Get the numerical representation of the version.
-/*!
-  Writes the numerical representation of the version of LAME and
-  GPSYCHO into lvp.
-
-  \param lvp    
-*/
-void get_lame_version_numerical ( lame_version_t *const lvp )
-{
-    static /*@observer@*/ const char *const features = V;
-
-    /* generic version */
-    lvp->major = LAME_MAJOR_VERSION;
-    lvp->minor = LAME_MINOR_VERSION;
-    lvp->alpha = LAME_ALPHA_VERSION;
-    lvp->beta  = LAME_BETA_VERSION;
-
-    /* psy version */
-    lvp->psy_major = PSY_MAJOR_VERSION;
-    lvp->psy_minor = PSY_MINOR_VERSION;
-    lvp->psy_alpha = PSY_ALPHA_VERSION;
-    lvp->psy_beta  = PSY_BETA_VERSION;
-
-    /* compile time features */
-    /*@-mustfree@*/
-    lvp->features = features;
-    /*@=mustfree@*/
-}
-
-/* end of version.c */
--- a/sys/src/games/mp3enc/version.h
+++ /dev/null
@@ -1,60 +1,0 @@
-/*
- *      Version numbering for LAME.
- *
- *      Copyright (c) 1999 A.L. Faber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef LAME_VERSION_H
-#define LAME_VERSION_H
-
-# include <stdio.h>
-
-/* 
- * To make a string from a token, use the # operator:
- *
- * #define __STR(x)  #x
- * #define STR(x)    __STR(x)
- */
-
-# define LAME_URL              "http://www.mp3dev.org/"
-
-# define LAME_MAJOR_VERSION      3      /* Major version number */
-# define LAME_MINOR_VERSION     88      /* Minor version number */
-# define LAME_ALPHA_VERSION      0      /* Patch level of alpha version, otherwise zero */
-# define LAME_BETA_VERSION       1      /* Patch level of beta  version, otherwise zero */
-
-# define PSY_MAJOR_VERSION       0      /* Major version number */
-# define PSY_MINOR_VERSION      85      /* Minor version number */
-# define PSY_ALPHA_VERSION       0      /* Set number if this is an alpha version, otherwise zero */
-# define PSY_BETA_VERSION        0      /* Set number if this is a beta version, otherwise zero */
-
-# define MP3X_MAJOR_VERSION      0      /* Major version number */
-# define MP3X_MINOR_VERSION     82      /* Minor version number */
-# define MP3X_ALPHA_VERSION      0      /* Set number if this is an alpha version, otherwise zero */
-# define MP3X_BETA_VERSION       0      /* Set number if this is a beta version, otherwise zero */
-
-const char*  get_lame_version       ( void );
-const char*  get_lame_short_version ( void );
-const char*  get_psy_version        ( void );
-const char*  get_mp3x_version       ( void );
-const char*  get_lame_url           ( void );
-void         get_lame_version_numerical ( lame_version_t *const lvp );
-
-#endif  /* LAME_VERSION_H */
-
-/* End of version.h */
--- a/sys/src/games/mp3enc/vorbis_interface.c
+++ /dev/null
@@ -1,571 +1,0 @@
-/* $Id: vorbis_interface.c,v 1.16 2001/03/18 14:31:29 aleidinger Exp $ */
-
-
-/* Compile lame with
-
-#! /bin/bash
-
-OGGVORBIS_ROOT=/home/cvs/vorbis
-
-export CPPFLAGS="-I${OGGVORBIS_ROOT}/ogg/include -I${OGGVORBIS_ROOT}/vorbis/lib"
-export CONFIG_DEFS="-DUSE_FFT3DN"
-
-make clean
-../configure
-make
-
-You can also do this with the "--with-vorbis" options in configure.
-
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/* LAME interface to libvorbis */
-
-#ifdef HAVE_VORBIS
-#include <stdlib.h>
-#include <limits.h>
-#include <time.h>
-#include "vorbis/codec.h"
-#include "modes/modes.h"
-#include "lame.h"
-#include "util.h"
-
-#ifdef WITH_DMALLOC
-#include <dmalloc.h>
-#endif
-
-short int  convbuffer [4096];  /* take 8 KByte out of the data segment, not the stack */
-int        convsize;
-
-ogg_sync_state    oy;  // sync and verify incoming physical bitstream
-ogg_stream_state  os;  // take physical pages, weld into a logical stream of packets
-ogg_page          og;  // one Ogg bitstream page. Vorbis packets are inside
-ogg_packet        op;  // one raw packet of data for decode
-vorbis_info       vi;  // struct that stores all the static vorbis bitstream settings
-vorbis_comment    vc;  // struct that stores all the bitstream user comments
-vorbis_dsp_state  vd;  // central working state for the packet->PCM decoder
-vorbis_block      vb;  // local working space for packet->PCM decode
-
-
-
-int lame_decode_ogg_initfile( lame_global_flags*  gfp,
-                              FILE*               fd,
-                              mp3data_struct*     mp3data )
-{
-
-  lame_internal_flags *gfc = gfp->internal_flags;
-  char *buffer;
-  int  bytes;
-  int i;
-
-
-  /********** Decode setup ************/
-
-  ogg_sync_init(&oy); /* Now we can read pages */
-  
-
-  /* grab some data at the head of the stream.  We want the first page
-     (which is guaranteed to be small and only contain the Vorbis
-     stream initial header) We need the first page to get the stream
-     serialno. */
-  
-  /* submit a 4k block to libvorbis' Ogg layer */
-  buffer=ogg_sync_buffer(&oy,4096);
-  bytes=fread(buffer,1,4096,fd);
-  ogg_sync_wrote(&oy,bytes);
-  
-  /* Get the first page. */
-  if(ogg_sync_pageout(&oy,&og)!=1){
-    /* error case.  Must not be Vorbis data */
-    ERRORF( gfc, "Error initializing Ogg bitstream data.\n" );
-    return -1;
-  }
-  
-  /* Get the serial number and set up the rest of decode. */
-  /* serialno first; use it to set up a logical stream */
-  ogg_stream_init(&os,ogg_page_serialno(&og));
-  
-  /* extract the initial header from the first page and verify that the
-     Ogg bitstream is in fact Vorbis data */
-  
-  /* I handle the initial header first instead of just having the code
-     read all three Vorbis headers at once because reading the initial
-     header is an easy way to identify a Vorbis bitstream and it's
-     useful to see that functionality seperated out. */
-  
-  vorbis_info_init(&vi);
-  vorbis_comment_init(&vc);
-  if(ogg_stream_pagein(&os,&og)<0){ 
-    /* error; stream version mismatch perhaps */
-    ERRORF( gfc, "Error reading first page of Ogg bitstream data.\n" );
-    return -1;
-  }
-  
-  if(ogg_stream_packetout(&os,&op)!=1){ 
-    /* no page? must not be vorbis */
-    ERRORF( gfc, "Error reading initial header packet.\n" );
-    return -1;
-  }
-  
-  if(vorbis_synthesis_headerin(&vi,&vc,&op)<0){ 
-    /* error case; not a vorbis header */
-    ERRORF( gfc, "This Ogg bitstream does not contain Vorbis "
-	    "audio data.\n");
-    return -1;
-  }
-  
-  /* At this point, we're sure we're Vorbis.  We've set up the logical
-     (Ogg) bitstream decoder.  Get the comment and codebook headers and
-     set up the Vorbis decoder */
-  
-  /* The next two packets in order are the comment and codebook headers.
-     They're likely large and may span multiple pages.  Thus we reead
-     and submit data until we get our two pacakets, watching that no
-     pages are missing.  If a page is missing, error out; losing a
-     header page is the only place where missing data is fatal. */
-  
-  i=0;
-  while(i<2){
-    while(i<2){
-      int result=ogg_sync_pageout(&oy,&og);
-      if(result==0)break; /* Need more data */
-      /* Don't complain about missing or corrupt data yet.  We'll
-	 catch it at the packet output phase */
-      if(result==1){
-	ogg_stream_pagein(&os,&og); /* we can ignore any errors here
-				       as they'll also become apparent
-				       at packetout */
-	while(i<2){
-	  result=ogg_stream_packetout(&os,&op);
-	  if(result==0)break;
-	  if(result==-1){
-	    /* Uh oh; data at some point was corrupted or missing!
-	       We can't tolerate that in a header.  Die. */
-	    ERRORF( gfc, "Corrupt secondary header.  Exiting.\n" );
-	    return -1;
-	  }
-	  vorbis_synthesis_headerin(&vi,&vc,&op);
-	  i++;
-	}
-      }
-    }
-    /* no harm in not checking before adding more */
-    buffer=ogg_sync_buffer(&oy,4096);
-    bytes=fread(buffer,1,4096,fd);
-    if(bytes==0 && i<2){
-      ERRORF( gfc, "End of file before finding all Vorbis headers!\n" );
-      return -1;
-    }
-    ogg_sync_wrote(&oy,bytes);
-  }
-  
-  /* Throw the comments plus a few lines about the bitstream we're
-     decoding */
-  {
-    /*
-    char **ptr=vc.user_comments;
-    while(*ptr){
-      MSGF( gfc, "%s\n", *ptr );
-      ++ptr;
-    }
-    MSGF( gfc, "\nBitstream is %d channel, %ldHz\n", vi.channels, vi.rate );
-    MSGF( gfc, "Encoded by: %s\n\n", vc.vendor );
-    */
-  }
-  
-  
-  /* OK, got and parsed all three headers. Initialize the Vorbis
-     packet->PCM decoder. */
-  vorbis_synthesis_init(&vd,&vi); /* central decode state */
-  vorbis_block_init(&vd,&vb);     /* local state for most of the decode
-				     so multiple block decodes can
-				     proceed in parallel.  We could init
-				     multiple vorbis_block structures
-				     for vd here */
-  
-  mp3data->stereo = vi.channels;
-  mp3data->samplerate = vi.rate;
-  mp3data->bitrate = 0; //ov_bitrate_instant(&vf);
-  mp3data->nsamp=MAX_U_32_NUM;
-  
-  return 0;
-}
-
-
-
-/*
-  For lame_decode_fromfile:  return code
-  -1     error, or eof
-  0     ok, but need more data before outputing any samples
-  n     number of samples output.  
-*/
-int lame_decode_ogg_fromfile( lame_global_flags*  gfp,
-                              FILE*               fd,
-                              short int           pcm_l[],
-                              short int           pcm_r[],
-                              mp3data_struct*     mp3data )
-{
-  lame_internal_flags *gfc = gfp->internal_flags;
-  int samples,result,i,j,eof=0,eos=0,bout=0;
-  double **pcm;
-
-  while(1){
-
-    /* 
-    **pcm is a multichannel double vector.  In stereo, for
-    example, pcm[0] is left, and pcm[1] is right.  samples is
-    the size of each channel.  Convert the float values
-    (-1.<=range<=1.) to whatever PCM format and write it out */
-    /* unpack the buffer, if it has at least 1024 samples */
-    convsize=1024;
-    samples=vorbis_synthesis_pcmout(&vd,&pcm);
-    if (samples >= convsize || eos || eof) {
-      /* read 1024 samples, or if eos, read what ever is in buffer */
-      int clipflag=0;
-      bout=(samples<convsize?samples:convsize);
-      
-      /* convert doubles to 16 bit signed ints (host order) and
-	 interleave */
-      for(i=0;i<vi.channels;i++){
-	double  *mono=pcm[i];
-	for(j=0;j<bout;j++){
-	  int val=mono[j]*32767.;
-	  /* might as well guard against clipping */
-	  if(val>32767){
-	    val=32767;
-	    clipflag=1;
-	  }
-	  if(val<-32768){
-	    val=-32768;
-	    clipflag=1;
-	  }
-	  if (i==0) pcm_l[j]=val;
-	  if (i==1) pcm_r[j]=val;
-	}
-      }
-      
-      /*
-      if(clipflag)
-	MSGF( gfc, "Clipping in frame %ld\n", vd.sequence );
-      */
-      
-      /* tell libvorbis how many samples we actually consumed */
-      vorbis_synthesis_read(&vd,bout); 
-      
-      break;
-    }    
-
-    result=ogg_sync_pageout(&oy,&og);
-      
-    if(result==0) {
-      /* need more data */
-    }else if (result==-1){ /* missing or corrupt data at this page position */
-      ERRORF( gfc, "Corrupt or missing data in bitstream; "
-	      "continuing...\n");
-    }else{
-      /* decode this page */
-      ogg_stream_pagein(&os,&og); /* can safely ignore errors at
-				       this point */
-      do {
-	result=ogg_stream_packetout(&os,&op);
-	if(result==0) {
-	  /* need more data */
-	} else if(result==-1){ /* missing or corrupt data at this page position */
-	  /* no reason to complain; already complained above */
-	}else{
-	  /* we have a packet.  Decode it */
-	  vorbis_synthesis(&vb,&op);
-	  vorbis_synthesis_blockin(&vd,&vb);
-	}
-      } while (result!=0);
-    }
-
-    /* is this the last page? */    
-    if(ogg_page_eos(&og))eos=1;
-    
-    if(!eos){
-      char *buffer;
-      int bytes;
-      buffer=ogg_sync_buffer(&oy,4096);
-      bytes=fread(buffer,1,4096,fd);
-      ogg_sync_wrote(&oy,bytes);
-      if(bytes==0)eof=1;
-    }
-  }
-
-  mp3data->stereo = vi.channels;
-  mp3data->samplerate = vi.rate;
-  mp3data->bitrate = 0; //ov_bitrate_instant(&vf);
-  /*  mp3data->nsamp=MAX_U_32_NUM;*/
-
-  
-  if (bout==0) {
-    /* clean up this logical bitstream; before exit we see if we're
-       followed by another [chained] */
-    ogg_stream_clear(&os);
-    
-    /* ogg_page and ogg_packet structs always point to storage in
-       libvorbis.  They're never freed or manipulated directly */
-    
-    vorbis_block_clear(&vb);
-    vorbis_dsp_clear(&vd);
-    vorbis_info_clear(&vi);  /* must be called last */
-    
-    /* OK, clean up the framer */
-    ogg_sync_clear(&oy);
-    return -1;
-  }
-  return bout;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-ogg_stream_state  os2;  // take physical pages, weld into a logical stream of packets
-ogg_page          og2;  // one Ogg bitstream page. Vorbis packets are inside
-ogg_packet        op2;  // one raw packet of data for decode
-
-vorbis_info       vi2;  // struct that stores all the static vorbis bitstream settings
-vorbis_comment    vc2;  // struct that stores all the bitstream user comments
-vorbis_dsp_state  vd2;  // central working state for the packet->PCM decoder
-vorbis_block      vb2;  // local working space for packet->PCM decode
-
-
-
-
-#define MAX_COMMENT_LENGTH 255
-
-int lame_encode_ogg_init(lame_global_flags *gfp)
-{
-  lame_internal_flags *gfc=gfp->internal_flags;
-  char comment[MAX_COMMENT_LENGTH+1];
-
-  
-  /********** Encode setup ************/
-  
-  /* choose an encoding mode */
-  /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */
-  if (gfp->compression_ratio < 5.01) {
-    memcpy(&vi2,&info_E,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_E \n" );
-  } else if (gfp->compression_ratio < 6) {
-    memcpy(&vi2,&info_D,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_D \n" );
-  } else if (gfp->compression_ratio < 8) {
-    memcpy(&vi2,&info_C,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_C \n" );
-  } else if (gfp->compression_ratio < 10) {
-    memcpy(&vi2,&info_B,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_B \n" );
-  } else if (gfp->compression_ratio < 12) {
-    memcpy(&vi2,&info_A,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_A \n" );
-  } else {
-    memcpy(&vi2,&info_A,sizeof(vi2));
-    MSGF( gfc, "Encoding with Vorbis mode info_A \n" );
-  }
-
-  vi2.channels = gfc->channels_out;
-  vi2.rate = gfp->out_samplerate;
-
-  
-  /* add a comment */
-  vorbis_comment_init(&vc2);
-  vorbis_comment_add(&vc2,"Track encoded using L.A.M.E. libvorbis interface.");
-
-  /* Add ID3-style comments to the output using (for the time being) the
-     "private data members" in the "id3tag_spec" data structure. This was
-     from a patch by Ralph Giles <[email protected]> */
-     
-#ifdef THIS_CODE_IS_NOT_BROKEN_ANYMORE     
-  if(gfp->tag_spec.title) {
-    strcpy(comment,"TITLE=");
-    strncat(comment,gfp->tag_spec.title,MAX_COMMENT_LENGTH-strlen(comment));
-    vorbis_comment_add(&vc2,comment);
-  }
-  if(gfp->tag_spec.artist) {
-    strcpy(comment,"ARTIST=");
-    strncat(comment,gfp->tag_spec.artist,MAX_COMMENT_LENGTH-strlen(comment));
-    vorbis_comment_add(&vc2,comment);
-  }
-  if(gfp->tag_spec.album) {
-    strcpy(comment,"ALBUM=");
-    strncat(comment,gfp->tag_spec.album,MAX_COMMENT_LENGTH-strlen(comment));
-    vorbis_comment_add(&vc2,comment);
-  }
-  /* pretend that the ID3 fields are equivalent to the Vorbis fields */
-  if(gfp->tag_spec.year) {
-    sprintf(comment, "DATE=%d", gfp->tag_spec.year);
-    vorbis_comment_add(&vc2,comment);
-  }
-  if(gfp->tag_spec.comment) {
-    strcpy(comment,"DESCRIPTION=");
-    strncat(comment,gfp->tag_spec.comment,MAX_COMMENT_LENGTH-strlen(comment));
-    vorbis_comment_add(&vc2,comment);
-  }
-  /* TODO -- support for track and genre */
-#endif  
-
-  /* set up the analysis state and auxiliary encoding storage */
-  vorbis_analysis_init(&vd2,&vi2);
-  vorbis_block_init(&vd2,&vb2);
-  
-  /* set up our packet->stream encoder */
-  /* pick a random serial number; that way we can more likely build
-     chained streams just by concatenation */
-  srand(time(NULL));
-  ogg_stream_init(&os2,rand());
-  
-  /* Vorbis streams begin with three headers; the initial header (with
-     most of the codec setup parameters) which is mandated by the Ogg
-     bitstream spec.  The second header holds any comment fields.  The
-     third header holds the bitstream codebook.  We merely need to
-     make the headers, then pass them to libvorbis one at a time;
-     libvorbis handles the additional Ogg bitstream constraints */
-  
-  {
-    ogg_packet header;
-    ogg_packet header_comm;
-    ogg_packet header_code;
-    
-    vorbis_analysis_headerout(&vd2,&vc2,&header,&header_comm,&header_code);
-    ogg_stream_packetin(&os2,&header); /* automatically placed in its own
-					 page */
-    ogg_stream_packetin(&os2,&header_comm);
-    ogg_stream_packetin(&os2,&header_code);
-    
-    /* no need to write out here.  We'll get to that in the main loop */
-  }
-  
-  return 0;
-}
-
-
-
-int lame_encode_ogg_finish(lame_global_flags *gfp,
-			  char *mp3buf, int mp3buf_size)
-{
-  int eos=0,bytes=0;
-
-  vorbis_analysis_wrote(&vd2,0);
-
-  while(vorbis_analysis_blockout(&vd2,&vb2)==1){
-    
-    /* analysis */
-    vorbis_analysis(&vb2,&op2);
-
-      /* weld the packet into the bitstream */
-      ogg_stream_packetin(&os2,&op2);
-
-      /* write out pages (if any) */
-      while(!eos){
-	int result=ogg_stream_pageout(&os2,&og2);
-	if(result==0)break;
-
-
-	/* check if mp3buffer is big enough for the output */
-	bytes += og2.header_len + og2.body_len;
-	if (bytes > mp3buf_size && mp3buf_size>0)
-	  return -5;
-	
-	memcpy(mp3buf,og2.header,og2.header_len);
-	memcpy(mp3buf+og2.header_len,og2.body,og2.body_len);
-
-	/* this could be set above, but for illustrative purposes, I do
-	   it here (to show that vorbis does know where the stream ends) */
-	if(ogg_page_eos(&og2))eos=1;
-
-      }
-    }
-
-
-  /* clean up and exit.  vorbis_info_clear() must be called last */
-  ogg_stream_clear(&os2);
-  vorbis_block_clear(&vb2);
-  vorbis_dsp_clear(&vd2);
-
-  
-  /* ogg_page and ogg_packet structs always point to storage in
-     libvorbis.  They're never freed or manipulated directly */
-  return bytes;
-
-}
-
-
-
-int  lame_encode_ogg_frame (
-	lame_global_flags*  gfp,
-	const sample_t*     inbuf_l, 
-	const sample_t*     inbuf_r,
-	unsigned char*      mp3buf, 
-	size_t              mp3buf_size )
-{
-    lame_internal_flags *gfc = gfp->internal_flags;
-    int  i;
-    int  eos   = 0;
-    int  bytes = 0;
-  
-    /* expose the buffer to submit data */
-    double **buffer = vorbis_analysis_buffer(&vd2,gfp->framesize);
-  
-    /* change level of input by -90 dB (no de-interleaving!) */
-    for ( i = 0; i < gfp->framesize; i++ )
-        buffer [0] [i] = (1/32768.) * inbuf_l [i];
-    if ( gfc->channels_out == 2 )
-        for ( i = 0; i < gfp->framesize; i++ )
-            buffer [1] [i] = (1/32768.) * inbuf_r [i];
-  
-  /* tell the library how much we actually submitted */
-  vorbis_analysis_wrote(&vd2,i);
-
-  /* vorbis does some data preanalysis, then divvies up blocks for
-     more involved (potentially parallel) processing.  Get a single
-     block for encoding now */
-  while(vorbis_analysis_blockout(&vd2,&vb2)==1){
-    int result;
-    /* analysis */
-    vorbis_analysis(&vb2,&op2);
-    
-    /* weld the packet into the bitstream */
-    ogg_stream_packetin(&os2,&op2);
-    
-    /* write out pages (if any) */
-    do {
-      result=ogg_stream_pageout(&os2,&og2);
-      if (result==0) break;
-	
-      /* check if mp3buffer is big enough for the output */
-      bytes += og2.header_len + og2.body_len;
-      /*
-      DEBUGF("\n\n*********\ndecoded bytes=%i  %i \n",bytes,mp3buf_size);
-      */
-      if (bytes > mp3buf_size && mp3buf_size>0)
-	return -6;
-      
-      memcpy(mp3buf,og2.header,og2.header_len);
-      memcpy(mp3buf+og2.header_len,og2.body,og2.body_len);
-      mp3buf += og2.header_len + og2.body_len;
-      
-      if(ogg_page_eos(&og2))eos=1;
-    } while (1);
-  }
-  (gfp -> frameNum)++;
-  return bytes;
-}
-
-#endif
-
-/* end of vorbis_interface.c */
-