[xiph-commits] r12031 - in branches/vorbis-aotuv: . debian doc doc/vorbisfile doc/xml lib lib/modes macosx macosx/English.lproj macosx/Vorbis.xcodeproj win32 win32/VS2003 win32/VS2003/libvorbis win32/VS2003/libvorbisfile win32/VS2003/vorbisdec win32/VS2003/vorbisenc

j at svn.xiph.org j at svn.xiph.org
Sun Nov 5 07:40:58 PST 2006


Author: j
Date: 2006-11-05 07:39:26 -0800 (Sun, 05 Nov 2006)
New Revision: 12031

Added:
   branches/vorbis-aotuv/doc/Vorbis_I_spec.html
   branches/vorbis-aotuv/doc/Vorbis_I_spec.pdf
   branches/vorbis-aotuv/doc/draft-kerr-avt-vorbis-rtp-05.txt
   branches/vorbis-aotuv/doc/draft-kerr-avt-vorbis-rtp-05.xml
   branches/vorbis-aotuv/doc/fish_xiph_org.png
   branches/vorbis-aotuv/macosx/Info.plist
   branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/
   branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/project.pbxproj
   branches/vorbis-aotuv/win32/VS2003/
   branches/vorbis-aotuv/win32/VS2003/libvorbis/
   branches/vorbis-aotuv/win32/VS2003/libvorbis/libvorbis.vcproj
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.def
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.vcproj
   branches/vorbis-aotuv/win32/VS2003/vorbisdec/
   branches/vorbis-aotuv/win32/VS2003/vorbisdec/vorbisdec.vcproj
   branches/vorbis-aotuv/win32/VS2003/vorbisenc/
   branches/vorbis-aotuv/win32/VS2003/vorbisenc/vorbisenc.vcproj
Removed:
   branches/vorbis-aotuv/aoTuV_README-1st.txt
   branches/vorbis-aotuv/aoTuV_technical.txt
   branches/vorbis-aotuv/debian/Makefile.am
   branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/project.pbxproj
   branches/vorbis-aotuv/macosx/vorbis.pbproj/
   branches/vorbis-aotuv/win32/Makefile.am
   branches/vorbis-aotuv/win32/VS2003/libvorbis/
   branches/vorbis-aotuv/win32/VS2003/libvorbis/libvorbis.vcproj
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.def
   branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.vcproj
   branches/vorbis-aotuv/win32/VS2003/vorbisdec/
   branches/vorbis-aotuv/win32/VS2003/vorbisdec/vorbisdec.vcproj
   branches/vorbis-aotuv/win32/VS2003/vorbisenc/
   branches/vorbis-aotuv/win32/VS2003/vorbisenc/vorbisenc.vcproj
Modified:
   branches/vorbis-aotuv/CHANGES
   branches/vorbis-aotuv/COPYING
   branches/vorbis-aotuv/Makefile.am
   branches/vorbis-aotuv/README
   branches/vorbis-aotuv/acinclude.m4
   branches/vorbis-aotuv/configure.in
   branches/vorbis-aotuv/doc/floor1_inverse_dB_table.html
   branches/vorbis-aotuv/doc/framing.html
   branches/vorbis-aotuv/doc/helper.html
   branches/vorbis-aotuv/doc/index.html
   branches/vorbis-aotuv/doc/oggstream.html
   branches/vorbis-aotuv/doc/programming.html
   branches/vorbis-aotuv/doc/stereo.html
   branches/vorbis-aotuv/doc/stream.png
   branches/vorbis-aotuv/doc/v-comment.html
   branches/vorbis-aotuv/doc/vorbis-fidelity.html
   branches/vorbis-aotuv/doc/vorbis.html
   branches/vorbis-aotuv/doc/vorbisfile/ov_raw_tell.html
   branches/vorbis-aotuv/doc/xml/04-codec.xml
   branches/vorbis-aotuv/doc/xml/05-comment.xml
   branches/vorbis-aotuv/doc/xml/06-floor0.xml
   branches/vorbis-aotuv/doc/xml/07-floor1.xml
   branches/vorbis-aotuv/doc/xml/08-residue.xml
   branches/vorbis-aotuv/lib/block.c
   branches/vorbis-aotuv/lib/codec_internal.h
   branches/vorbis-aotuv/lib/info.c
   branches/vorbis-aotuv/lib/mapping0.c
   branches/vorbis-aotuv/lib/masking.h
   branches/vorbis-aotuv/lib/modes/psych_11.h
   branches/vorbis-aotuv/lib/modes/psych_16.h
   branches/vorbis-aotuv/lib/modes/psych_44.h
   branches/vorbis-aotuv/lib/modes/psych_8.h
   branches/vorbis-aotuv/lib/modes/residue_16.h
   branches/vorbis-aotuv/lib/modes/residue_44.h
   branches/vorbis-aotuv/lib/modes/residue_44u.h
   branches/vorbis-aotuv/lib/modes/residue_8.h
   branches/vorbis-aotuv/lib/modes/setup_11.h
   branches/vorbis-aotuv/lib/modes/setup_16.h
   branches/vorbis-aotuv/lib/modes/setup_22.h
   branches/vorbis-aotuv/lib/modes/setup_32.h
   branches/vorbis-aotuv/lib/modes/setup_44.h
   branches/vorbis-aotuv/lib/modes/setup_44u.h
   branches/vorbis-aotuv/lib/modes/setup_8.h
   branches/vorbis-aotuv/lib/modes/setup_X.h
   branches/vorbis-aotuv/lib/psy.c
   branches/vorbis-aotuv/lib/psy.h
   branches/vorbis-aotuv/lib/vorbisenc.c
   branches/vorbis-aotuv/macosx/
   branches/vorbis-aotuv/macosx/English.lproj/InfoPlist.strings
Log:
merge changes from /tags/vorbis/libvorbis-1.1.2/

Modified: branches/vorbis-aotuv/CHANGES
===================================================================
--- branches/vorbis-aotuv/CHANGES	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/CHANGES	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,3 +1,10 @@
+libvorbis 1.1.2 (2005-11-27) -- "Xiph.Org libVorbis I 20050304"
+
+ * fix a serious encoder bug with gcc 4 optimized builds
+ * documentation and spec fixes
+ * updated VS2003 and XCode builds
+ * new draft RTP encapsulation spec
+
 libvorbis 1.1.1 (2005-06-27) -- "Xiph.Org libVorbis I 20050304"
 
  * bug fix to the bitrate management encoder interface

Modified: branches/vorbis-aotuv/COPYING
===================================================================
--- branches/vorbis-aotuv/COPYING	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/COPYING	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,5 +1,4 @@
-aoTuV - Copyright (c) 2003-2005 Aoyumi
-libvorbis - Copyright (c) 2002-2005 Xiph.org Foundation
+Copyright (c) 2002-2004 Xiph.org Foundation
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: branches/vorbis-aotuv/Makefile.am
===================================================================
--- branches/vorbis-aotuv/Makefile.am	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/Makefile.am	2006-11-05 15:39:26 UTC (rev 12031)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign dist-zip
 
-SUBDIRS = lib include doc examples win32 debian vq
+SUBDIRS = lib include doc examples vq
 
 m4datadir = $(datadir)/aclocal
 m4data_DATA = vorbis.m4
@@ -10,20 +10,29 @@
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = vorbis.pc vorbisenc.pc vorbisfile.pc
 
-EXTRA_DIST = todo.txt macos macosx autogen.sh \
+# we include the whole debian/ dir in EXTRA_DIST because there's a problem
+# with autotools and HFS+ MacOSX file systems that caused debian/Makefile.am
+# to pick up on the lowercase changelog file and add ChangeLog to DIST_COMMON
+# because of it, breaking make dist.  This works just as well.
+EXTRA_DIST = \
+	todo.txt autogen.sh \
 	libvorbis.spec libvorbis.spec.in \
-	vorbis.m4 vorbis.pc.in vorbisenc.pc.in vorbisfile.pc.in \
-       vorbis-uninstalled.pc.in \
-       vorbisenc-uninstalled.pc.in \
-       vorbisfile-uninstalled.pc.in
+	vorbis.m4 \
+	vorbis.pc.in vorbisenc.pc.in vorbisfile.pc.in \
+	vorbis-uninstalled.pc.in \
+	vorbisenc-uninstalled.pc.in \
+	vorbisfile-uninstalled.pc.in \
+	debian macos macosx win32
 
+
 DISTCHECK_CONFIGURE_FLAGS = --enable-docs
 
 dist-hook:
-	rm -rf `find $(distdir)/macos -name CVS`
+	rm -rf `find $(distdir)/debian -name .svn`
+	rm -rf `find $(distdir)/debian -name "Makefile*"`
 	rm -rf `find $(distdir)/macos -name .svn`
-	rm -rf `find $(distdir)/macosx -name CVS`
 	rm -rf `find $(distdir)/macosx -name .svn`
+	rm -rf `find $(distdir)/win32 -name .svn`
 
 debug:
 	$(MAKE) all CFLAGS="@DEBUG@"

Modified: branches/vorbis-aotuv/README
===================================================================
--- branches/vorbis-aotuv/README	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/README	2006-11-05 15:39:26 UTC (rev 12031)
@@ -70,10 +70,12 @@
 CONTACT:
 
 The Ogg homepage is located at 'http://www.xiph.org/ogg/'.
-Vorbis's homepage is located at 'http://www.xiph.org/ogg/vorbis/'.
+Vorbis's homepage is located at 'http://www.xiph.org/vorbis/'.
 Up to date technical documents, contact information, source code and
 pre-built utilities may be found there.
 
+The user website for Ogg Vorbis software and audio is http://vorbis.com/
+
 BUILDING FROM TRUNK:
 
 Development source is under subversion revision control at 

Modified: branches/vorbis-aotuv/acinclude.m4
===================================================================
--- branches/vorbis-aotuv/acinclude.m4	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/acinclude.m4	2006-11-05 15:39:26 UTC (rev 12031)
@@ -104,3 +104,58 @@
   AC_SUBST(OGG_LIBS)
   rm -f conf.oggtest
 ])
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN([PKG_CHECK_MODULES], [
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        AC_MSG_CHECKING(for $2)
+
+        if $PKG_CONFIG --exists "$2" ; then
+            AC_MSG_RESULT(yes)
+            succeeded=yes
+
+            AC_MSG_CHECKING($1_CFLAGS)
+            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            AC_MSG_RESULT($$1_CFLAGS)
+
+            AC_MSG_CHECKING($1_LIBS)
+            $1_LIBS=`$PKG_CONFIG --libs "$2"`
+            AC_MSG_RESULT($$1_LIBS)
+        else
+            $1_CFLAGS=""
+            $1_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but 
+            ## do set a variable so people can do so.
+            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+            ifelse([$4], ,echo $$1_PKG_ERRORS,)
+        fi
+
+        AC_SUBST($1_CFLAGS)
+        AC_SUBST($1_LIBS)
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     ifelse([$3], , :, [$3])
+  else
+     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+  fi
+])

Deleted: branches/vorbis-aotuv/aoTuV_README-1st.txt
===================================================================
--- branches/vorbis-aotuv/aoTuV_README-1st.txt	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/aoTuV_README-1st.txt	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,24 +0,0 @@
-aoTuV beta4.51 release note
-
-"aoTuV" tunes up Xiph.Org's libvorbis uniquely. 
-A license is taken as "BSD-style license" as well as original libvorbis. 
-
-
-# NOTICE #
-
-  Manuke's patch is used for improvement in the speed of sort processing. 
-  When "#define OPT_SORT" of "lib/psy.h" is deleted, the conventional 
-  processing method is used.
-
-
-Thanks! Manuke.
-
-
-
-aoTuV based on <Xiph.Org libvorbis>
-
-Copyright (c) 2002-2005 Xiph.Org Foundation
-Copyright (c) 2003-2005 Aoyumi
-
-
-AUTHOR : aoyumi <aoyumi at inter7.jp>
\ No newline at end of file

Deleted: branches/vorbis-aotuv/aoTuV_technical.txt
===================================================================
--- branches/vorbis-aotuv/aoTuV_technical.txt	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/aoTuV_technical.txt	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,149 +0,0 @@
-aoTuV beta4.51 technical information
-
-
-The differences from the aoTuV beta 4.5...
-
-
-  1.  The changed part of "scale.h" of Xiph.Org SVN was reflected in aoTuV. This will solve the problem of the compile by gcc4. 
-
-  2.  A part of portion added by beta4.5 had caused memory access violation. Depending on environment, a problem arises in qualiy-1/-2. This problem was corrected. 
-
-
-2005/11/17
-Aoyumi
-
-----------------------------------------------------------------------------
-
-aoTuV beta4.5 technical information
-
-
-The differences from the aoTuV beta 4...
-
-
-
-  1.  M4 code of beta3 was deleted. M5 is added as what is replaced with it. The advantage of this method is that the result stabilized more is obtained. Instead, the change width of the bit rate becomes large rather than before. [32/44.1/48kHz only] 
-
-@2.  New M4 was added. There is this for the same purpose as M1. However, it is tuned up only in the low bit rate region according to work and individual parameters. [32/44.1/48kHz only] 
-
-@3.  M2 code was extended. This decreases a specific noise problem.  [32/44.1/48kHz only] 
-
-...and I mainly tune up tone/noise masking and noise normalization parameters. 
-
-The above change is applied below quality3. 
-
-
-2005/11/05
-Aoyumi
-
-----------------------------------------------------------------------------
-
-aoTuV beta4a technical information
-
-
-The differences from the aoTuV beta 4...
-
-
-
-  1.  Adoption of new hypot (point stereo). This works in general better than
-  dipole/round hypot. And when residue is likely to decrease greatly at the
-  time of a reverse phase, added code is made to increase the ratio of lossless.
-
-  2.  Change of ATH curve. This is not a big change. 
-
-  3.  Residue used for threshold calculation of channel coupling is changed.
-  This one seems to be good selection. 
-
-  4.  HF reduction code of beta3 was deleted. Now, this is not required. 
-
-  5.  The energy deficit of M4 code of beta3 -- correction of a bug Now.
-
-  6.  The code for pulling downward floor of the frequency range which can
-  be easy to be heard was added (New M2). This works by the low bit rate and
-  has a comparatively good trade-off. 
-
-  7.  Change of threshold calculation of noise normalization. Moreover, it
-  takes phase information into consideration. 
-
-
-...and I mainly tune up tone/noise masking parameters. 
-
-
-
-2005/06/18
-Aoyumi
-
-----------------------------------------------------------------------------
-
-The differences from the aoTuV beta 3...
-
-
-
-  1.  Adoption of new hypot (point stereo). This works in general better than
-  dipole/round hypot. And when residue is likely to decrease greatly at the
-  time of a reverse phase, added code is made to increase the ratio of lossless.
-
-  2.  Change of ATH curve. This is not a big change. 
-
-  3.  Residue used for threshold calculation of channel coupling is changed.
-  This one seems to be good selection. 
-
-  4.  HF reduction code of beta3 was deleted. Now, this is not required. 
-
-  5.  The energy deficit of M4 code of beta3 -- correction of a bug Now.
-
-  6.  The code for pulling downward floor of the frequency range which can
-  be easy to be heard was added (New M2). This works by the low bit rate and
-  has a comparatively good trade-off. 
-
-  7.  Change of threshold calculation of noise normalization. Moreover, it
-  takes phase information into consideration. 
-
-
-...and I mainly tune up tone/noise masking and noise compander parameters. 
-
-
-
-2005/06/18
-Aoyumi
-
-----------------------------------------------------------------------------
-
-aoTuV beta3 technical information
-
-
-The differences from the aoTuV beta 2 and Vorbis 1.1...
-
-
-
-  1. Dynamic impulse block noise control(q0-10). [32/44.1/48kHz only] 
-  Conspicuous pre-echo is reduced.
-
-  2. New ATH curve. 
-
-  3. In order to cancel that a small sound becomes unstable, the noise level
-  of low frequency is lowered under specific conditions. (Only below q3) 
-  There is a greatest effect on a piano etc. [32/44.1/48kHz only]
-
-  4. The rate of lossless stereo is increased in specific conditions. This
-  improves many of conspicuous problems which a point stereo causes. (e.g 
-  drumus's hiss/voice, guitar and brass's distortion) [32/44.1/48kHz only]
-
-  5. The action of the noise normalization of point stereo is corrected. It
-  was set to one of the causes of distortion in a long tone (e.g 
-  strings/oboe/high tone voice). 
-
-  6. The HF reduction code was not working normally. This is corrected and
-  it retuned up according to the present condition. [32/44.1/48kHz only]
-
-  7. The q-2 mode was added in all sampling frequencies. And nominal bitrate
-  of q-1 are changed into a more nearly average value. Although nominal 
-  bitrate is more large at a low sampling frequency, average bitrate hardly
-  differs from the former version. 
-
-
-...and I mainly tune up tone/noise masking parameters. 
-
-
-
-2004/11/21
-Aoyumi

Modified: branches/vorbis-aotuv/configure.in
===================================================================
--- branches/vorbis-aotuv/configure.in	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/configure.in	2006-11-05 15:39:26 UTC (rev 12031)
@@ -11,19 +11,19 @@
 
 AM_CONFIG_HEADER([config.h])
 
-AM_INIT_AUTOMAKE(libvorbis,1.1.1)
+AM_INIT_AUTOMAKE(libvorbis,1.1.2)
 AM_MAINTAINER_MODE
 
 dnl Library versioning
 
 V_LIB_CURRENT=3
-V_LIB_REVISION=0
+V_LIB_REVISION=1
 V_LIB_AGE=3
 VF_LIB_CURRENT=4
-VF_LIB_REVISION=0
+VF_LIB_REVISION=1
 VF_LIB_AGE=1
 VE_LIB_CURRENT=2
-VE_LIB_REVISION=1
+VE_LIB_REVISION=2
 VE_LIB_AGE=0
 AC_SUBST(V_LIB_CURRENT)
 AC_SUBST(V_LIB_REVISION)
@@ -76,7 +76,6 @@
 dnl Set some target options
 
 cflags_save="$CFLAGS"
-ldflags_save="$LDFLAGS"
 if test -z "$GCC"; then
 	case $host in 
 	*-*-irix*)
@@ -99,6 +98,9 @@
         esac
 else
 
+	AC_MSG_CHECKING([GCC version])
+	GCC_VERSION=`$CC -dumpversion`
+	AC_MSG_RESULT([$GCC_VERSION])
 	case $host in 
 	*86-*-linux*)
 		DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
@@ -168,7 +170,6 @@
         esac
 fi
 CFLAGS="$CFLAGS $cflags_save"
-LDFLAGS="$LDFLAGS $ldflags_save"
 
 dnl --------------------------------------------------
 dnl Check for headers
@@ -234,8 +235,6 @@
 doc/Makefile doc/vorbisfile/Makefile doc/vorbisenc/Makefile
 include/Makefile include/vorbis/Makefile
 examples/Makefile
-win32/Makefile
-debian/Makefile
 vq/Makefile
 libvorbis.spec
 vorbis.pc

Deleted: branches/vorbis-aotuv/debian/Makefile.am
===================================================================
--- branches/vorbis-aotuv/debian/Makefile.am	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/debian/Makefile.am	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,5 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-EXTRA_DIST = changelog control copyright libvorbis-dev.docs \
-	libvorbis-dev.examples libvorbis-dev.install libvorbis0a.install \
-	libvorbisenc2.install libvorbisfile3.install rules

Copied: branches/vorbis-aotuv/doc/Vorbis_I_spec.html (from rev 12030, tags/vorbis/libvorbis-1.1.2/doc/Vorbis_I_spec.html)

Copied: branches/vorbis-aotuv/doc/Vorbis_I_spec.pdf (from rev 12030, tags/vorbis/libvorbis-1.1.2/doc/Vorbis_I_spec.pdf)

Copied: branches/vorbis-aotuv/doc/draft-kerr-avt-vorbis-rtp-05.txt (from rev 12030, tags/vorbis/libvorbis-1.1.2/doc/draft-kerr-avt-vorbis-rtp-05.txt)

Copied: branches/vorbis-aotuv/doc/draft-kerr-avt-vorbis-rtp-05.xml (from rev 12030, tags/vorbis/libvorbis-1.1.2/doc/draft-kerr-avt-vorbis-rtp-05.xml)

Copied: branches/vorbis-aotuv/doc/fish_xiph_org.png (from rev 12030, tags/vorbis/libvorbis-1.1.2/doc/fish_xiph_org.png)

Modified: branches/vorbis-aotuv/doc/floor1_inverse_dB_table.html
===================================================================
--- branches/vorbis-aotuv/doc/floor1_inverse_dB_table.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/floor1_inverse_dB_table.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,112 +1,154 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-<h1><font color=#000070>
-Ogg Vorbis I format specification: floor1_inverse_dB_table
-</font></h1>
-
-<em>Last update to this document: July 18, 2002</em><p>
-
-The vector <tt>[floor1_inverse_dB_table]</tt> is a 256 element static
-lookup table consiting of the following values (read left to right
-then top to bottom):
-
-<pre>
-  1.0649863e-07, 1.1341951e-07, 1.2079015e-07, 1.2863978e-07, 
-  1.3699951e-07, 1.4590251e-07, 1.5538408e-07, 1.6548181e-07, 
-  1.7623575e-07, 1.8768855e-07, 1.9988561e-07, 2.1287530e-07, 
-  2.2670913e-07, 2.4144197e-07, 2.5713223e-07, 2.7384213e-07, 
-  2.9163793e-07, 3.1059021e-07, 3.3077411e-07, 3.5226968e-07, 
-  3.7516214e-07, 3.9954229e-07, 4.2550680e-07, 4.5315863e-07, 
-  4.8260743e-07, 5.1396998e-07, 5.4737065e-07, 5.8294187e-07, 
-  6.2082472e-07, 6.6116941e-07, 7.0413592e-07, 7.4989464e-07, 
-  7.9862701e-07, 8.5052630e-07, 9.0579828e-07, 9.6466216e-07, 
-  1.0273513e-06, 1.0941144e-06, 1.1652161e-06, 1.2409384e-06, 
-  1.3215816e-06, 1.4074654e-06, 1.4989305e-06, 1.5963394e-06, 
-  1.7000785e-06, 1.8105592e-06, 1.9282195e-06, 2.0535261e-06, 
-  2.1869758e-06, 2.3290978e-06, 2.4804557e-06, 2.6416497e-06, 
-  2.8133190e-06, 2.9961443e-06, 3.1908506e-06, 3.3982101e-06, 
-  3.6190449e-06, 3.8542308e-06, 4.1047004e-06, 4.3714470e-06, 
-  4.6555282e-06, 4.9580707e-06, 5.2802740e-06, 5.6234160e-06, 
-  5.9888572e-06, 6.3780469e-06, 6.7925283e-06, 7.2339451e-06, 
-  7.7040476e-06, 8.2047000e-06, 8.7378876e-06, 9.3057248e-06, 
-  9.9104632e-06, 1.0554501e-05, 1.1240392e-05, 1.1970856e-05, 
-  1.2748789e-05, 1.3577278e-05, 1.4459606e-05, 1.5399272e-05, 
-  1.6400004e-05, 1.7465768e-05, 1.8600792e-05, 1.9809576e-05, 
-  2.1096914e-05, 2.2467911e-05, 2.3928002e-05, 2.5482978e-05, 
-  2.7139006e-05, 2.8902651e-05, 3.0780908e-05, 3.2781225e-05, 
-  3.4911534e-05, 3.7180282e-05, 3.9596466e-05, 4.2169667e-05, 
-  4.4910090e-05, 4.7828601e-05, 5.0936773e-05, 5.4246931e-05, 
-  5.7772202e-05, 6.1526565e-05, 6.5524908e-05, 6.9783085e-05, 
-  7.4317983e-05, 7.9147585e-05, 8.4291040e-05, 8.9768747e-05, 
-  9.5602426e-05, 0.00010181521, 0.00010843174, 0.00011547824, 
-  0.00012298267, 0.00013097477, 0.00013948625, 0.00014855085, 
-  0.00015820453, 0.00016848555, 0.00017943469, 0.00019109536, 
-  0.00020351382, 0.00021673929, 0.00023082423, 0.00024582449, 
-  0.00026179955, 0.00027881276, 0.00029693158, 0.00031622787, 
-  0.00033677814, 0.00035866388, 0.00038197188, 0.00040679456, 
-  0.00043323036, 0.00046138411, 0.00049136745, 0.00052329927, 
-  0.00055730621, 0.00059352311, 0.00063209358, 0.00067317058, 
-  0.00071691700, 0.00076350630, 0.00081312324, 0.00086596457, 
-  0.00092223983, 0.00098217216, 0.0010459992,  0.0011139742, 
-  0.0011863665,  0.0012634633,  0.0013455702,  0.0014330129, 
-  0.0015261382,  0.0016253153,  0.0017309374,  0.0018434235, 
-  0.0019632195,  0.0020908006,  0.0022266726,  0.0023713743, 
-  0.0025254795,  0.0026895994,  0.0028643847,  0.0030505286, 
-  0.0032487691,  0.0034598925,  0.0036847358,  0.0039241906, 
-  0.0041792066,  0.0044507950,  0.0047400328,  0.0050480668, 
-  0.0053761186,  0.0057254891,  0.0060975636,  0.0064938176, 
-  0.0069158225,  0.0073652516,  0.0078438871,  0.0083536271, 
-  0.0088964928,  0.009474637,   0.010090352,   0.010746080, 
-  0.011444421,   0.012188144,   0.012980198,   0.013823725, 
-  0.014722068,   0.015678791,   0.016697687,   0.017782797, 
-  0.018938423,   0.020169149,   0.021479854,   0.022875735, 
-  0.024362330,   0.025945531,   0.027631618,   0.029427276, 
-  0.031339626,   0.033376252,   0.035545228,   0.037855157, 
-  0.040315199,   0.042935108,   0.045725273,   0.048696758, 
-  0.051861348,   0.055231591,   0.058820850,   0.062643361, 
-  0.066714279,   0.071049749,   0.075666962,   0.080584227, 
-  0.085821044,   0.091398179,   0.097337747,   0.10366330, 
-  0.11039993,    0.11757434,    0.12521498,    0.13335215, 
-  0.14201813,    0.15124727,    0.16107617,    0.17154380, 
-  0.18269168,    0.19456402,    0.20720788,    0.22067342, 
-  0.23501402,    0.25028656,    0.26655159,    0.28387361, 
-  0.30232132,    0.32196786,    0.34289114,    0.36517414, 
-  0.38890521,    0.41417847,    0.44109412,    0.46975890, 
-  0.50028648,    0.53279791,    0.56742212,    0.60429640, 
-  0.64356699,    0.68538959,    0.72993007,    0.77736504, 
-  0.82788260,    0.88168307,    0.9389798,     1.
-<pre>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis I format specification: floor1_inverse_dB_table</h1>
+
+<p>The vector <tt>[floor1_inverse_dB_table]</tt> is a 256 element static
+lookup table consiting of the following values (read left to right
+then top to bottom):</p>
+
+<pre>
+  1.0649863e-07, 1.1341951e-07, 1.2079015e-07, 1.2863978e-07, 
+  1.3699951e-07, 1.4590251e-07, 1.5538408e-07, 1.6548181e-07, 
+  1.7623575e-07, 1.8768855e-07, 1.9988561e-07, 2.1287530e-07, 
+  2.2670913e-07, 2.4144197e-07, 2.5713223e-07, 2.7384213e-07, 
+  2.9163793e-07, 3.1059021e-07, 3.3077411e-07, 3.5226968e-07, 
+  3.7516214e-07, 3.9954229e-07, 4.2550680e-07, 4.5315863e-07, 
+  4.8260743e-07, 5.1396998e-07, 5.4737065e-07, 5.8294187e-07, 
+  6.2082472e-07, 6.6116941e-07, 7.0413592e-07, 7.4989464e-07, 
+  7.9862701e-07, 8.5052630e-07, 9.0579828e-07, 9.6466216e-07, 
+  1.0273513e-06, 1.0941144e-06, 1.1652161e-06, 1.2409384e-06, 
+  1.3215816e-06, 1.4074654e-06, 1.4989305e-06, 1.5963394e-06, 
+  1.7000785e-06, 1.8105592e-06, 1.9282195e-06, 2.0535261e-06, 
+  2.1869758e-06, 2.3290978e-06, 2.4804557e-06, 2.6416497e-06, 
+  2.8133190e-06, 2.9961443e-06, 3.1908506e-06, 3.3982101e-06, 
+  3.6190449e-06, 3.8542308e-06, 4.1047004e-06, 4.3714470e-06, 
+  4.6555282e-06, 4.9580707e-06, 5.2802740e-06, 5.6234160e-06, 
+  5.9888572e-06, 6.3780469e-06, 6.7925283e-06, 7.2339451e-06, 
+  7.7040476e-06, 8.2047000e-06, 8.7378876e-06, 9.3057248e-06, 
+  9.9104632e-06, 1.0554501e-05, 1.1240392e-05, 1.1970856e-05, 
+  1.2748789e-05, 1.3577278e-05, 1.4459606e-05, 1.5399272e-05, 
+  1.6400004e-05, 1.7465768e-05, 1.8600792e-05, 1.9809576e-05, 
+  2.1096914e-05, 2.2467911e-05, 2.3928002e-05, 2.5482978e-05, 
+  2.7139006e-05, 2.8902651e-05, 3.0780908e-05, 3.2781225e-05, 
+  3.4911534e-05, 3.7180282e-05, 3.9596466e-05, 4.2169667e-05, 
+  4.4910090e-05, 4.7828601e-05, 5.0936773e-05, 5.4246931e-05, 
+  5.7772202e-05, 6.1526565e-05, 6.5524908e-05, 6.9783085e-05, 
+  7.4317983e-05, 7.9147585e-05, 8.4291040e-05, 8.9768747e-05, 
+  9.5602426e-05, 0.00010181521, 0.00010843174, 0.00011547824, 
+  0.00012298267, 0.00013097477, 0.00013948625, 0.00014855085, 
+  0.00015820453, 0.00016848555, 0.00017943469, 0.00019109536, 
+  0.00020351382, 0.00021673929, 0.00023082423, 0.00024582449, 
+  0.00026179955, 0.00027881276, 0.00029693158, 0.00031622787, 
+  0.00033677814, 0.00035866388, 0.00038197188, 0.00040679456, 
+  0.00043323036, 0.00046138411, 0.00049136745, 0.00052329927, 
+  0.00055730621, 0.00059352311, 0.00063209358, 0.00067317058, 
+  0.00071691700, 0.00076350630, 0.00081312324, 0.00086596457, 
+  0.00092223983, 0.00098217216, 0.0010459992,  0.0011139742, 
+  0.0011863665,  0.0012634633,  0.0013455702,  0.0014330129, 
+  0.0015261382,  0.0016253153,  0.0017309374,  0.0018434235, 
+  0.0019632195,  0.0020908006,  0.0022266726,  0.0023713743, 
+  0.0025254795,  0.0026895994,  0.0028643847,  0.0030505286, 
+  0.0032487691,  0.0034598925,  0.0036847358,  0.0039241906, 
+  0.0041792066,  0.0044507950,  0.0047400328,  0.0050480668, 
+  0.0053761186,  0.0057254891,  0.0060975636,  0.0064938176, 
+  0.0069158225,  0.0073652516,  0.0078438871,  0.0083536271, 
+  0.0088964928,  0.009474637,   0.010090352,   0.010746080, 
+  0.011444421,   0.012188144,   0.012980198,   0.013823725, 
+  0.014722068,   0.015678791,   0.016697687,   0.017782797, 
+  0.018938423,   0.020169149,   0.021479854,   0.022875735, 
+  0.024362330,   0.025945531,   0.027631618,   0.029427276, 
+  0.031339626,   0.033376252,   0.035545228,   0.037855157, 
+  0.040315199,   0.042935108,   0.045725273,   0.048696758, 
+  0.051861348,   0.055231591,   0.058820850,   0.062643361, 
+  0.066714279,   0.071049749,   0.075666962,   0.080584227, 
+  0.085821044,   0.091398179,   0.097337747,   0.10366330, 
+  0.11039993,    0.11757434,    0.12521498,    0.13335215, 
+  0.14201813,    0.15124727,    0.16107617,    0.17154380, 
+  0.18269168,    0.19456402,    0.20720788,    0.22067342, 
+  0.23501402,    0.25028656,    0.26655159,    0.28387361, 
+  0.30232132,    0.32196786,    0.34289114,    0.36517414, 
+  0.38890521,    0.41417847,    0.44109412,    0.46975890, 
+  0.50028648,    0.53279791,    0.56742212,    0.60429640, 
+  0.64356699,    0.68538959,    0.72993007,    0.77736504, 
+  0.82788260,    0.88168307,    0.9389798,     1.
+</pre>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/framing.html
===================================================================
--- branches/vorbis-aotuv/doc/framing.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/framing.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,395 +1,433 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><a href="http://www.xiph.org/ogg/index.html"><img src="white-ogg.png" border=0><img 
-src="vorbisword2.png" border=0></a></nobr><p>
-
-<h1><font color=#000070>
-Ogg logical bitstream framing
-</font></h1>
-
-<em>Last update to this document: July 14, 2002</em><br> 
-
-<h2>Ogg bitstreams</h2>
-
-The Ogg transport bitstream is designed to provide framing, error
-protection and seeking structure for higher-level codec streams that
-consist of raw, unencapsulated data packets, such as the Vorbis audio
-codec or Tarkin video codec.
-
-<h2>Application example: Vorbis</h2>
-Vorbis encodes short-time blocks of PCM data into raw packets of
-bit-packed data.  These raw packets may be used directly by transport
-mechanisms that provide their own framing and packet-separation
-mechanisms (such as UDP datagrams).  For stream based storage (such as
-files) and transport (such as TCP streams or pipes), Vorbis uses the
-Ogg bitstream format to provide framing/sync, sync recapture
-after error, landmarks during seeking, and enough information to
-properly separate data back into packets at the original packet
-boundaries without relying on decoding to find packet boundaries.<p>
-
-<h2>Design constraints for Ogg bitstreams</h2>
-
-<ol><li>True streaming; we must not need to seek to build a 100%
-   complete bitstream.
-
-<li> Use no more than approximately 1-2% of bitstream bandwidth for
-   packet boundary marking, high-level framing, sync and seeking.
-
-<li> Specification of absolute position within the original sample
-   stream.
-
-<li> Simple mechanism to ease limited editing, such as a simplified
-   concatenation mechanism.
-
-<li> Detection of corruption, recapture after error and direct, random
-   access to data at arbitrary positions in the bitstream.
-</ol>
-
-<h2>Logical and Physical Bitstreams</h2>
-
-A <em>logical</em> Ogg bitstream is a contiguous stream of
-sequential pages belonging only to the logical bitstream.  A
-<em>physical</em> Ogg bitstream is constructed from one or more
-than one logical Ogg bitstream (the simplest physical bitstream
-is simply a single logical bitstream).  We describe below the exact
-formatting of an Ogg logical bitstream.  Combining logical
-bitstreams into more complex physical bitstreams is described in the
-<a href="oggstream.html">Ogg bitstream overview</a>.  The exact
-mapping of raw Vorbis packets into a valid Ogg Vorbis physical
-bitstream is described in <a href="vorbis-stream.html">Vorbis
-bitstream mapping</a>.
-
-<h2>Bitstream structure</h2>
-
-An Ogg stream is structured by dividing incoming packets into
-segments of up to 255 bytes and then wrapping a group of contiguous
-packet segments into a variable length page preceded by a page
-header.  Both the header size and page size are variable; the page
-header contains sizing information and checksum data to determine
-header/page size and data integrity.<p>
-
-The bitstream is captured (or recaptured) by looking for the beginning
-of a page, specifically the capture pattern.  Once the capture pattern
-is found, the decoder verifies page sync and integrity by computing
-and comparing the checksum. At that point, the decoder can extract the
-packets themselves.<p>
-
-<h3>Packet segmentation</h3>
-
-Packets are logically divided into multiple segments before encoding
-into a page. Note that the segmentation and fragmentation process is a
-logical one; it's used to compute page header values and the original
-page data need not be disturbed, even when a packet spans page
-boundaries.<p>
-
-The raw packet is logically divided into [n] 255 byte segments and a
-last fractional segment of < 255 bytes.  A packet size may well
-consist only of the trailing fractional segment, and a fractional
-segment may be zero length.  These values, called "lacing values" are
-then saved and placed into the header segment table.<p>
-
-An example should make the basic concept clear:<p>
-
-<pre>
-<tt>
-raw packet:
-  ___________________________________________
- |______________packet data__________________| 753 bytes
-
-lacing values for page header segment table: 255,255,243
-</tt>
-</pre>
-
-We simply add the lacing values for the total size; the last lacing
-value for a packet is always the value that is less than 255. Note
-that this encoding both avoids imposing a maximum packet size as well
-as imposing minimum overhead on small packets (as opposed to, eg,
-simply using two bytes at the head of every packet and having a max
-packet size of 32k.  Small packets (<255, the typical case) are
-penalized with twice the segmentation overhead). Using the lacing
-values as suggested, small packets see the minimum possible
-byte-aligned overheade (1 byte) and large packets, over 512 bytes or
-so, see a fairly constant ~.5% overhead on encoding space.<p>
-
-Note that a lacing value of 255 implies that a second lacing value
-follows in the packet, and a value of < 255 marks the end of the
-packet after that many additional bytes.  A packet of 255 bytes (or a
-multiple of 255 bytes) is terminated by a lacing value of 0:<p>
-
-<pre><tt>
-raw packet:
-  _______________________________
- |________packet data____________|          255 bytes
-
-lacing values: 255, 0
-</tt></pre>
-
-Note also that a 'nil' (zero length) packet is not an error; it
-consists of nothing more than a lacing value of zero in the header.<p>
-
-<h3>Packets spanning pages</h3>
-
-Packets are not restricted to beginning and ending within a page,
-although individual segments are, by definition, required to do so.
-Packets are not restricted to a maximum size, although excessively
-large packets in the data stream are discouraged; the Ogg
-bitstream specification strongly recommends nominal page size of
-approximately 4-8kB (large packets are foreseen as being useful for
-initialization data at the beginning of a logical bitstream).<p>
-
-After segmenting a packet, the encoder may decide not to place all the
-resulting segments into the current page; to do so, the encoder places
-the lacing values of the segments it wishes to belong to the current
-page into the current segment table, then finishes the page.  The next
-page is begun with the first value in the segment table belonging to
-the next packet segment, thus continuing the packet (data in the
-packet body must also correspond properly to the lacing values in the
-spanned pages. The segment data in the first packet corresponding to
-the lacing values of the first page belong in that page; packet
-segments listed in the segment table of the following page must begin
-the page body of the subsequent page).<p>
-
-The last mechanic to spanning a page boundary is to set the header
-flag in the new page to indicate that the first lacing value in the
-segment table continues rather than begins a packet; a header flag of
-0x01 is set to indicate a continued packet.  Although mandatory, it
-is not actually algorithmically necessary; one could inspect the
-preceding segment table to determine if the packet is new or
-continued.  Adding the information to the packet_header flag allows a
-simpler design (with no overhead) that needs only inspect the current
-page header after frame capture.  This also allows faster error
-recovery in the event that the packet originates in a corrupt
-preceding page, implying that the previous page's segment table
-cannot be trusted.<p>
-
-Note that a packet can span an arbitrary number of pages; the above
-spanning process is repeated for each spanned page boundary.  Also a
-'zero termination' on a packet size that is an even multiple of 255
-must appear even if the lacing value appears in the next page as a
-zero-length continuation of the current packet.  The header flag
-should be set to 0x01 to indicate that the packet spanned, even though
-the span is a nil case as far as data is concerned.<p>
-
-The encoding looks odd, but is properly optimized for speed and the
-expected case of the majority of packets being between 50 and 200
-bytes (note that it is designed such that packets of wildly different
-sizes can be handled within the model; placing packet size
-restrictions on the encoder would have only slightly simplified design
-in page generation and increased overall encoder complexity).<p>
-
-The main point behind tracking individual packets (and packet
-segments) is to allow more flexible encoding tricks that requiring
-explicit knowledge of packet size. An example is simple bandwidth
-limiting, implemented by simply truncating packets in the nominal case
-if the packet is arranged so that the least sensitive portion of the
-data comes last.<p>
-
-<h3>Page header</h3>
-
-The headering mechanism is designed to avoid copying and re-assembly
-of the packet data (ie, making the packet segmentation process a
-logical one); the header can be generated directly from incoming
-packet data.  The encoder buffers packet data until it finishes a
-complete page at which point it writes the header followed by the
-buffered packet segments.<p>
-
-<h4>capture_pattern</h4>
-
- A header begins with a capture pattern that simplifies identifying
- pages; once the decoder has found the capture pattern it can do a more
- intensive job of verifying that it has in fact found a page boundary
- (as opposed to an inadvertent coincidence in the byte stream).<p>
-
-<pre><tt>
- byte value
-
-  0  0x4f 'O'
-  1  0x67 'g'
-  2  0x67 'g'
-  3  0x53 'S'  
-</tt></pre>
-
-<h4>stream_structure_version</h4>
-
- The capture pattern is followed by the stream structure revision:
-
-<pre><tt>
- byte value
-
-  4  0x00
-</tt></pre>
- 
-<h4>header_type_flag</h4>
-  
- The header type flag identifies this page's context in the bitstream:
-
-<pre><tt>
- byte value
-
-  5  bitflags: 0x01: unset = fresh packet
-	               set = continued packet
-	       0x02: unset = not first page of logical bitstream
-                       set = first page of logical bitstream (bos)
-	       0x04: unset = not last page of logical bitstream
-                       set = last page of logical bitstream (eos)
-</tt></pre>
-
-<h4>absolute granule position</h4>
-
- (This is packed in the same way the rest of Ogg data is packed; LSb
- of LSB first.  Note that the 'position' data specifies a 'sample'
- number (eg, in a CD quality sample is four octets, 16 bits for left
- and 16 bits for right; in video it would likely be the frame number.
- It is up to the specific codec in use to define the semantic meaning
- of the granule position value).  The position specified is the total
- samples encoded after including all packets finished on this page
- (packets begun on this page but continuing on to the next page do not
- count).  The rationale here is that the position specified in the
- frame header of the last page tells how long the data coded by the
- bitstream is.  A truncated stream will still return the proper number
- of samples that can be decoded fully.
-<p>
- A special value of '-1' (in two's complement) indicates that no packets
- finish on this page.
-
-<pre><tt>
- byte value
-
-  6  0xXX LSB
-  7  0xXX
-  8  0xXX
-  9  0xXX
- 10  0xXX
- 11  0xXX
- 12  0xXX
- 13  0xXX MSB
-</tt></pre>
-
-<h4>stream serial number</h4>
- 
- Ogg allows for separate logical bitstreams to be mixed at page
- granularity in a physical bitstream.  The most common case would be
- sequential arrangement, but it is possible to interleave pages for
- two separate bitstreams to be decoded concurrently.  The serial
- number is the means by which pages physical pages are associated with
- a particular logical stream.  Each logical stream must have a unique
- serial number within a physical stream:
-
-<pre><tt>
- byte value
-
- 14  0xXX LSB
- 15  0xXX
- 16  0xXX
- 17  0xXX MSB
-</tt></pre>
-
-<h4>page sequence no</h4>
-
- Page counter; lets us know if a page is lost (useful where packets
- span page boundaries).
-
-<pre><tt>
- byte value
-
- 18  0xXX LSB
- 19  0xXX
- 20  0xXX
- 21  0xXX MSB
-</tt></pre>
-
-<h4>page checksum</h4>
-     
- 32 bit CRC value (direct algorithm, initial val and final XOR = 0,
- generator polynomial=0x04c11db7).  The value is computed over the
- entire header (with the CRC field in the header set to zero) and then
- continued over the page.  The CRC field is then filled with the
- computed value.<p>
-
- (A thorough discussion of CRC algorithms can be found in <a
- href="ftp://ftp.rocksoft.com/papers/crc_v3.txt">"A
- Painless Guide to CRC Error Detection Algorithms"</a> by Ross
- Williams <a
- href="mailto:ross at guest.adelaide.edu.au">ross at guest.adelaide.edu.au</a>.)
-
-<pre><tt>
- byte value
-
- 22  0xXX LSB
- 23  0xXX
- 24  0xXX
- 25  0xXX MSB
-</tt></pre>
-
-<h4>page_segments</h4>
-
- The number of segment entries to appear in the segment table. The
- maximum number of 255 segments (255 bytes each) sets the maximum
- possible physical page size at 65307 bytes or just under 64kB (thus
- we know that a header corrupted so as destroy sizing/alignment
- information will not cause a runaway bitstream.  We'll read in the
- page according to the corrupted size information that's guaranteed to
- be a reasonable size regardless, notice the checksum mismatch, drop
- sync and then look for recapture).<p>
-
-<pre><tt>
- byte value
-
- 26 0x00-0xff (0-255)
-</tt></pre>
-
-<h4>segment_table (containing packet lacing values)</h4>
-
- The lacing values for each packet segment physically appearing in
- this page are listed in contiguous order.
-
-<pre><tt>
- byte value
-
- 27 0x00-0xff (0-255)
- [...]
- n  0x00-0xff (0-255, n=page_segments+26)
-</tt></pre>
-
-Total page size is calculated directly from the known header size and
-lacing values in the segment table. Packet data segments follow
-immediately after the header.<p>
-
-Page headers typically impose a flat .25-.5% space overhead assuming
-nominal ~8k page sizes.  The segmentation table needed for exact
-packet recovery in the streaming layer adds approximately .5-1%
-nominal assuming expected encoder behavior in the 44.1kHz, 128kbps
-stereo encodings.<p>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg logical bitstream framing</h1>
+
+<h2>Ogg bitstreams</h2>
+
+<p>The Ogg transport bitstream is designed to provide framing, error
+protection and seeking structure for higher-level codec streams that
+consist of raw, unencapsulated data packets, such as the Vorbis audio
+codec or Tarkin video codec.</p>
+
+<h2>Application example: Vorbis</h2>
+
+<p>Vorbis encodes short-time blocks of PCM data into raw packets of
+bit-packed data. These raw packets may be used directly by transport
+mechanisms that provide their own framing and packet-separation
+mechanisms (such as UDP datagrams). For stream based storage (such as
+files) and transport (such as TCP streams or pipes), Vorbis uses the
+Ogg bitstream format to provide framing/sync, sync recapture
+after error, landmarks during seeking, and enough information to
+properly separate data back into packets at the original packet
+boundaries without relying on decoding to find packet boundaries.</p>
+
+<h2>Design constraints for Ogg bitstreams</h2>
+
+<ol>
+<li>True streaming; we must not need to seek to build a 100%
+  complete bitstream.</li>
+<li>Use no more than approximately 1-2% of bitstream bandwidth for
+  packet boundary marking, high-level framing, sync and seeking.</li>
+<li>Specification of absolute position within the original sample
+  stream.</li>
+<li>Simple mechanism to ease limited editing, such as a simplified
+  concatenation mechanism.</li>
+<li>Detection of corruption, recapture after error and direct, random
+  access to data at arbitrary positions in the bitstream.</li>
+</ol>
+
+<h2>Logical and Physical Bitstreams</h2>
+
+<p>A <em>logical</em> Ogg bitstream is a contiguous stream of
+sequential pages belonging only to the logical bitstream. A
+<em>physical</em> Ogg bitstream is constructed from one or more
+than one logical Ogg bitstream (the simplest physical bitstream
+is simply a single logical bitstream). We describe below the exact
+formatting of an Ogg logical bitstream. Combining logical
+bitstreams into more complex physical bitstreams is described in the
+<a href="oggstream.html">Ogg bitstream overview</a>. The exact
+mapping of raw Vorbis packets into a valid Ogg Vorbis physical
+bitstream is described in <a href="vorbis-stream.html">Vorbis
+bitstream mapping</a>.</p>
+
+<h2>Bitstream structure</h2>
+
+<p>An Ogg stream is structured by dividing incoming packets into
+segments of up to 255 bytes and then wrapping a group of contiguous
+packet segments into a variable length page preceded by a page
+header. Both the header size and page size are variable; the page
+header contains sizing information and checksum data to determine
+header/page size and data integrity.</p>
+
+<p>The bitstream is captured (or recaptured) by looking for the beginning
+of a page, specifically the capture pattern. Once the capture pattern
+is found, the decoder verifies page sync and integrity by computing
+and comparing the checksum. At that point, the decoder can extract the
+packets themselves.</p>
+
+<h3>Packet segmentation</h3>
+
+<p>Packets are logically divided into multiple segments before encoding
+into a page. Note that the segmentation and fragmentation process is a
+logical one; it's used to compute page header values and the original
+page data need not be disturbed, even when a packet spans page
+boundaries.</p>
+
+<p>The raw packet is logically divided into [n] 255 byte segments and a
+last fractional segment of &lt; 255 bytes. A packet size may well
+consist only of the trailing fractional segment, and a fractional
+segment may be zero length. These values, called "lacing values" are
+then saved and placed into the header segment table.</p>
+
+<p>An example should make the basic concept clear:</p>
+
+<pre>
+<tt>
+raw packet:
+  ___________________________________________
+ |______________packet data__________________| 753 bytes
+
+lacing values for page header segment table: 255,255,243
+</tt>
+</pre>
+
+<p>We simply add the lacing values for the total size; the last lacing
+value for a packet is always the value that is less than 255. Note
+that this encoding both avoids imposing a maximum packet size as well
+as imposing minimum overhead on small packets (as opposed to, eg,
+simply using two bytes at the head of every packet and having a max
+packet size of 32k. Small packets (&lt;255, the typical case) are
+penalized with twice the segmentation overhead). Using the lacing
+values as suggested, small packets see the minimum possible
+byte-aligned overheade (1 byte) and large packets, over 512 bytes or
+so, see a fairly constant ~.5% overhead on encoding space.</p>
+
+<p>Note that a lacing value of 255 implies that a second lacing value
+follows in the packet, and a value of &lt; 255 marks the end of the
+packet after that many additional bytes. A packet of 255 bytes (or a
+multiple of 255 bytes) is terminated by a lacing value of 0:</p>
+
+<pre><tt>
+raw packet:
+  _______________________________
+ |________packet data____________|          255 bytes
+
+lacing values: 255, 0
+</tt></pre>
+
+<p>Note also that a 'nil' (zero length) packet is not an error; it
+consists of nothing more than a lacing value of zero in the header.</p>
+
+<h3>Packets spanning pages</h3>
+
+<p>Packets are not restricted to beginning and ending within a page,
+although individual segments are, by definition, required to do so.
+Packets are not restricted to a maximum size, although excessively
+large packets in the data stream are discouraged; the Ogg
+bitstream specification strongly recommends nominal page size of
+approximately 4-8kB (large packets are foreseen as being useful for
+initialization data at the beginning of a logical bitstream).</p>
+
+<p>After segmenting a packet, the encoder may decide not to place all the
+resulting segments into the current page; to do so, the encoder places
+the lacing values of the segments it wishes to belong to the current
+page into the current segment table, then finishes the page. The next
+page is begun with the first value in the segment table belonging to
+the next packet segment, thus continuing the packet (data in the
+packet body must also correspond properly to the lacing values in the
+spanned pages. The segment data in the first packet corresponding to
+the lacing values of the first page belong in that page; packet
+segments listed in the segment table of the following page must begin
+the page body of the subsequent page).</p>
+
+<p>The last mechanic to spanning a page boundary is to set the header
+flag in the new page to indicate that the first lacing value in the
+segment table continues rather than begins a packet; a header flag of
+0x01 is set to indicate a continued packet. Although mandatory, it
+is not actually algorithmically necessary; one could inspect the
+preceding segment table to determine if the packet is new or
+continued. Adding the information to the packet_header flag allows a
+simpler design (with no overhead) that needs only inspect the current
+page header after frame capture. This also allows faster error
+recovery in the event that the packet originates in a corrupt
+preceding page, implying that the previous page's segment table
+cannot be trusted.</p>
+
+<p>Note that a packet can span an arbitrary number of pages; the above
+spanning process is repeated for each spanned page boundary. Also a
+'zero termination' on a packet size that is an even multiple of 255
+must appear even if the lacing value appears in the next page as a
+zero-length continuation of the current packet. The header flag
+should be set to 0x01 to indicate that the packet spanned, even though
+the span is a nil case as far as data is concerned.</p>
+
+<p>The encoding looks odd, but is properly optimized for speed and the
+expected case of the majority of packets being between 50 and 200
+bytes (note that it is designed such that packets of wildly different
+sizes can be handled within the model; placing packet size
+restrictions on the encoder would have only slightly simplified design
+in page generation and increased overall encoder complexity).</p>
+
+<p>The main point behind tracking individual packets (and packet
+segments) is to allow more flexible encoding tricks that requiring
+explicit knowledge of packet size. An example is simple bandwidth
+limiting, implemented by simply truncating packets in the nominal case
+if the packet is arranged so that the least sensitive portion of the
+data comes last.</p>
+
+<h3>Page header</h3>
+
+<p>The headering mechanism is designed to avoid copying and re-assembly
+of the packet data (ie, making the packet segmentation process a
+logical one); the header can be generated directly from incoming
+packet data. The encoder buffers packet data until it finishes a
+complete page at which point it writes the header followed by the
+buffered packet segments.</p>
+
+<h4>capture_pattern</h4>
+
+<p>A header begins with a capture pattern that simplifies identifying
+pages; once the decoder has found the capture pattern it can do a more
+intensive job of verifying that it has in fact found a page boundary
+(as opposed to an inadvertent coincidence in the byte stream).</p>
+
+<pre><tt>
+ byte value
+
+  0  0x4f 'O'
+  1  0x67 'g'
+  2  0x67 'g'
+  3  0x53 'S'  
+</tt></pre>
+
+<h4>stream_structure_version</h4>
+
+<p>The capture pattern is followed by the stream structure revision:</p>
+
+<pre><tt>
+ byte value
+
+  4  0x00
+</tt></pre>
+ 
+<h4>header_type_flag</h4>
+  
+<p>The header type flag identifies this page's context in the bitstream:</p>
+
+<pre><tt>
+ byte value
+
+  5  bitflags: 0x01: unset = fresh packet
+	               set = continued packet
+	       0x02: unset = not first page of logical bitstream
+                       set = first page of logical bitstream (bos)
+	       0x04: unset = not last page of logical bitstream
+                       set = last page of logical bitstream (eos)
+</tt></pre>
+
+<h4>absolute granule position</h4>
+
+<p>(This is packed in the same way the rest of Ogg data is packed; LSb
+of LSB first. Note that the 'position' data specifies a 'sample'
+number (eg, in a CD quality sample is four octets, 16 bits for left
+and 16 bits for right; in video it would likely be the frame number.
+It is up to the specific codec in use to define the semantic meaning
+of the granule position value). The position specified is the total
+samples encoded after including all packets finished on this page
+(packets begun on this page but continuing on to the next page do not
+count). The rationale here is that the position specified in the
+frame header of the last page tells how long the data coded by the
+bitstream is. A truncated stream will still return the proper number
+of samples that can be decoded fully.</p>
+
+<p>A special value of '-1' (in two's complement) indicates that no packets
+finish on this page.</p>
+
+<pre><tt>
+ byte value
+
+  6  0xXX LSB
+  7  0xXX
+  8  0xXX
+  9  0xXX
+ 10  0xXX
+ 11  0xXX
+ 12  0xXX
+ 13  0xXX MSB
+</tt></pre>
+
+<h4>stream serial number</h4>
+ 
+<p>Ogg allows for separate logical bitstreams to be mixed at page
+granularity in a physical bitstream. The most common case would be
+sequential arrangement, but it is possible to interleave pages for
+two separate bitstreams to be decoded concurrently. The serial
+number is the means by which pages physical pages are associated with
+a particular logical stream. Each logical stream must have a unique
+serial number within a physical stream:</p>
+
+<pre><tt>
+ byte value
+
+ 14  0xXX LSB
+ 15  0xXX
+ 16  0xXX
+ 17  0xXX MSB
+</tt></pre>
+
+<h4>page sequence no</h4>
+
+<p>Page counter; lets us know if a page is lost (useful where packets
+span page boundaries).</p>
+
+<pre><tt>
+ byte value
+
+ 18  0xXX LSB
+ 19  0xXX
+ 20  0xXX
+ 21  0xXX MSB
+</tt></pre>
+
+<h4>page checksum</h4>
+     
+<p>32 bit CRC value (direct algorithm, initial val and final XOR = 0,
+generator polynomial=0x04c11db7). The value is computed over the
+entire header (with the CRC field in the header set to zero) and then
+continued over the page. The CRC field is then filled with the
+computed value.</p>
+
+<p>(A thorough discussion of CRC algorithms can be found in <a
+href="ftp://ftp.rocksoft.com/papers/crc_v3.txt">"A
+Painless Guide to CRC Error Detection Algorithms"</a> by Ross
+Williams <a
+href="mailto:ross at guest.adelaide.edu.au">ross at guest.adelaide.edu.au</a>.)</p>
+
+<pre><tt>
+ byte value
+
+ 22  0xXX LSB
+ 23  0xXX
+ 24  0xXX
+ 25  0xXX MSB
+</tt></pre>
+
+<h4>page_segments</h4>
+
+<p>The number of segment entries to appear in the segment table. The
+maximum number of 255 segments (255 bytes each) sets the maximum
+possible physical page size at 65307 bytes or just under 64kB (thus
+we know that a header corrupted so as destroy sizing/alignment
+information will not cause a runaway bitstream. We'll read in the
+page according to the corrupted size information that's guaranteed to
+be a reasonable size regardless, notice the checksum mismatch, drop
+sync and then look for recapture).</p>
+
+<pre><tt>
+ byte value
+
+ 26 0x00-0xff (0-255)
+</tt></pre>
+
+<h4>segment_table (containing packet lacing values)</h4>
+
+<p>The lacing values for each packet segment physically appearing in
+this page are listed in contiguous order.</p>
+
+<pre><tt>
+ byte value
+
+ 27 0x00-0xff (0-255)
+ [...]
+ n  0x00-0xff (0-255, n=page_segments+26)
+</tt></pre>
+
+<p>Total page size is calculated directly from the known header size and
+lacing values in the segment table. Packet data segments follow
+immediately after the header.</p>
+
+<p>Page headers typically impose a flat .25-.5% space overhead assuming
+nominal ~8k page sizes. The segmentation table needed for exact
+packet recovery in the streaming layer adds approximately .5-1%
+nominal assuming expected encoder behavior in the 44.1kHz, 128kbps
+stereo encodings.</p>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/helper.html
===================================================================
--- branches/vorbis-aotuv/doc/helper.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/helper.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,196 +1,239 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-<h1><font color=#000070>
-Ogg Vorbis I format specification: helper equations
-</font></h1>
-
-<em>Last update to this document: October 15, 2002</em><p>
-
-<h1>Overview</h1>
-
-The equations below are used in multiple places by the Vorbis codec
-specification.  Rather than cluttering up the main specification
-documents, they are defined here and linked in the main documents
-where appropriate.<p>
-
-<a name=log><h2>ilog</h2></a>
-
-
-The "ilog(x)" function returns the position number (1 through n) of the highest set bit in the two's complement integer value
-<tt>[x]</tt>.  Values of <tt>[x]</tt> less than zero are defined to return zero.
-
-<pre>
-  1) [return_value] = 0;
-  2) if ( [x] is greater than zero ){
-      
-       3) increment [return_value];
-       4) logical shift [x] one bit to the right, padding the MSb with zero
-       5) repeat at step 2)
-
-     }
-
-   6) done
-</pre>
-
-Examples:
-
-<ul><li> ilog(0) = 0;
-    <li> ilog(1) = 1;
-    <li> ilog(2) = 2;
-    <li> ilog(3) = 2;
-    <li> ilog(4) = 3;
-    <li> ilog(7) = 3;
-    <li> ilog(negative number) = 0;
-</uL>
-
-<a name=float32_unpack><h2>float32_unpack</h2></a>
-
-"float32_unpack(x)" is intended to translate the packed binary
-representation of a Vorbis codebook float value into the
-representation used by the decoder for floating point numbers.  For
-purposes of this example, we will unpack a Vorbis float32 into a
-host-native floating point number.<p>
-
-<pre>
-  1) [mantissa] = [x] bitwise AND 0x1fffff (unsigned result)
-  2) [sign] = [x] bitwise AND 0x80000000 (unsigned result)
-  3) [exponent] = ( [x] bitwise AND 0x7fe00000) shifted right 21 bits (unsigned result)
-  4) if ( [sign] is nonzero ) then negate [mantissa]
-  5) return [mantissa] * ( 2 ^ ( [exponent] - 788 ) )
-</pre>
-
-<a name=lookup1_values><h2>lookup1_values</h2></a>
-
-"lookup1_values(codebook_entries,codebook_dimensions)" is used to
-compute the correct length of the value index for a codebook VQ lookup
-table of lookup type 1.  The values on this list are permuted to
-construct the VQ vector lookup table of size
-<tt>[codebook_entries]</tt>.<p>
-
-The return value for this function is defined to be 'the greatest
-integer value for which <tt>[return_value] to the power of
-[codebook_dimensions] is less than or equal to
-[codebook_entries]</tt>'.
-
-<a name=low_neighbor><h2>low_neighbor</h2></a>
-
-"low_neighbor(v,x)" finds the position <i>n</i> in vector [v] of
-the greatest value scalar element for which <i>n</i> is less than
-<tt>[x]</tt> and <tt>vector [v] element <i>n</i> is less
-than vector [v] element [x]</tt>.
-
-<a name=high_neighbor><h2>high_neighbor</h2></a>
-
-"high_neighbor(v,x)" finds the position <i>n</i> in vector [v] of
-the lowest value scalar element for which <i>n</i> is less than
-<tt>[x]</tt> and <tt>vector [v] element <i>n</i> is greater
-than vector [v] element [x]</tt>.
-
-<a name=render_point><h2>render_point</h2></a>
-
-"render_point(x0,y0,x1,y1,X)" is used to find the Y value at point X
-along the line specified by x0, x1, y0 and y1.  This function uses an
-integer algorithm to solve for the point directly without calculating
-intervening values along the line.<p>
-
-<pre>
-  1)  [dy] = [y1] - [y0]
-  2) [adx] = [x1] - [x0]
-  3) [ady] = absolute value of [dy]
-  4) [err] = [ady] * ([X] - [x0])
-  5) [off] = [err] / [adx] using integer division
-  6) if ( [dy] is less than zero ) {
-
-       7) [Y] = [y0] - [off]
-
-     } else {
-
-       8) [Y] = [y0] + [off]
-  
-     }
-
-  9) done
-</pre>
-
-<a name=render_line><h2>render_line</h2></a>
-
-Floor decode type one uses the integer line drawing algorithm of
-"render_line(x0, y0, x1, y1, v)" to construct an integer floor
-curve for contiguous piecewise line segments. Note that it has not
-been relevant elsewhere, but here we must define integer division as
-rounding division of both positive and negative numbers toward zero.
-
-<pre>
-  1)   [dy] = [y1] - [y0]
-  2)  [adx] = [x1] - [x0]
-  3)  [ady] = absolute value of [dy]
-  4) [base] = [dy] / [adx] using integer division
-  5)    [x] = [x0]
-  6)    [y] = [y0]
-  7)  [err] = 0
-
-  8) if ( [dy] is less than 0 ) {
-
-        9) [sy] = [base] - 1
-
-     } else {
-
-       10) [sy] = [base] + 1
-
-     }
-
- 11) [ady] = [ady] - (absolute value of [base]) * [adx]
- 12) vector [v] element [x] = [y]
-
- 13) iterate [x] over the range [x0]+1 ... [x1]-1 {
-
-       14) [err] = [err] + [ady];
-       15) if ( [err] >= [adx] ) {
-
-             15) [err] = [err] - [adx]
-             16)   [y] = [y] + [sy]
-
-           } else {
-
-             17) [y] = [y] + [base]
-   
-           }
-
-       18) vector [v] element [x] = [y]
-
-     }
-</pre>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis I format specification: helper equations</h1>
+
+<h1>Overview</h1>
+
+<p>The equations below are used in multiple places by the Vorbis codec
+specification. Rather than cluttering up the main specification
+documents, they are defined here and linked in the main documents
+where appropriate.</p>
+
+<h2><a name="log">ilog</a></h2>
+
+<p>The "ilog(x)" function returns the position number (1 through n) of the
+highest set bit in the two's complement integer value
+<tt>[x]</tt>. Values of <tt>[x]</tt> less than zero are defined to return zero.</p>
+
+<pre>
+  1) [return_value] = 0;
+  2) if ( [x] is greater than zero ){
+      
+       3) increment [return_value];
+       4) logical shift [x] one bit to the right, padding the MSb with zero
+       5) repeat at step 2)
+
+     }
+
+   6) done
+</pre>
+
+<p>Examples:</p>
+
+<ul>
+<li>ilog(0) = 0;</li>
+<li>ilog(1) = 1;</li>
+<li>ilog(2) = 2;</li>
+<li>ilog(3) = 2;</li>
+<li>ilog(4) = 3;</li>
+<li>ilog(7) = 3;</li>
+<li>ilog(negative number) = 0;</li>
+</ul>
+
+<h2><a name="float32_unpack">float32_unpack</a></h2>
+
+<p>"float32_unpack(x)" is intended to translate the packed binary
+representation of a Vorbis codebook float value into the
+representation used by the decoder for floating point numbers. For
+purposes of this example, we will unpack a Vorbis float32 into a
+host-native floating point number.</p>
+
+<pre>
+  1) [mantissa] = [x] bitwise AND 0x1fffff (unsigned result)
+  2) [sign] = [x] bitwise AND 0x80000000 (unsigned result)
+  3) [exponent] = ( [x] bitwise AND 0x7fe00000) shifted right 21 bits (unsigned result)
+  4) if ( [sign] is nonzero ) then negate [mantissa]
+  5) return [mantissa] * ( 2 ^ ( [exponent] - 788 ) )
+</pre>
+
+<h2><a name="lookup1_values">lookup1_values</a></h2>
+
+<p>"lookup1_values(codebook_entries,codebook_dimensions)" is used to
+compute the correct length of the value index for a codebook VQ lookup
+table of lookup type 1. The values on this list are permuted to
+construct the VQ vector lookup table of size
+<tt>[codebook_entries]</tt>.</p>
+
+<p>The return value for this function is defined to be 'the greatest
+integer value for which <tt>[return_value] to the power of
+[codebook_dimensions] is less than or equal to
+[codebook_entries]</tt>'.</p>
+
+<h2><a name="low_neighbor">low_neighbor</a></h2>
+
+<p>"low_neighbor(v,x)" finds the position <i>n</i> in vector [v] of
+the greatest value scalar element for which <i>n</i> is less than
+<tt>[x]</tt> and <tt>vector [v] element <i>n</i> is less
+than vector [v] element [x]</tt>.</p>
+
+<h2><a name="high_neighbor">high_neighbor</a></h2>
+
+<p>"high_neighbor(v,x)" finds the position <i>n</i> in vector [v] of
+the lowest value scalar element for which <i>n</i> is less than
+<tt>[x]</tt> and <tt>vector [v] element <i>n</i> is greater
+than vector [v] element [x]</tt>.</p>
+
+<h2><a name="render_point">render_point</a></h2>
+
+<p>"render_point(x0,y0,x1,y1,X)" is used to find the Y value at point X
+along the line specified by x0, x1, y0 and y1. This function uses an
+integer algorithm to solve for the point directly without calculating
+intervening values along the line.</p>
+
+<pre>
+  1)  [dy] = [y1] - [y0]
+  2) [adx] = [x1] - [x0]
+  3) [ady] = absolute value of [dy]
+  4) [err] = [ady] * ([X] - [x0])
+  5) [off] = [err] / [adx] using integer division
+  6) if ( [dy] is less than zero ) {
+
+       7) [Y] = [y0] - [off]
+
+     } else {
+
+       8) [Y] = [y0] + [off]
+  
+     }
+
+  9) done
+</pre>
+
+<h2><a name="render_line">render_line</a></h2>
+
+<p>Floor decode type one uses the integer line drawing algorithm of
+"render_line(x0, y0, x1, y1, v)" to construct an integer floor
+curve for contiguous piecewise line segments. Note that it has not
+been relevant elsewhere, but here we must define integer division as
+rounding division of both positive and negative numbers toward zero.</p>
+
+<pre>
+  1)   [dy] = [y1] - [y0]
+  2)  [adx] = [x1] - [x0]
+  3)  [ady] = absolute value of [dy]
+  4) [base] = [dy] / [adx] using integer division
+  5)    [x] = [x0]
+  6)    [y] = [y0]
+  7)  [err] = 0
+
+  8) if ( [dy] is less than 0 ) {
+
+        9) [sy] = [base] - 1
+
+     } else {
+
+       10) [sy] = [base] + 1
+
+     }
+
+ 11) [ady] = [ady] - (absolute value of [base]) * [adx]
+ 12) vector [v] element [x] = [y]
+
+ 13) iterate [x] over the range [x0]+1 ... [x1]-1 {
+
+       14) [err] = [err] + [ady];
+       15) if ( [err] >= [adx] ) {
+
+             15) [err] = [err] - [adx]
+             16)   [y] = [y] + [sy]
+
+           } else {
+
+             17) [y] = [y] + [base]
+   
+           }
+
+       18) vector [v] element [x] = [y]
+
+     }
+</pre>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/index.html
===================================================================
--- branches/vorbis-aotuv/doc/index.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/index.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,76 +1,114 @@
-<title>  xiph.org: Ogg Vorbis documentation </title>
-
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-<h1><font color=#000070>
-Ogg Vorbis Documentation
-</font></h1>
-
-<em>Last documentation revision: October 15, 2002</em><p> 
-
-<h2>Vorbis technical discussion documents</h2>
-<ul>
-<li><a href="vorbis-fidelity.html">Fidelity measurement terminology</a>
-<li><a href="stereo.html">Vorbis channel coupling and stereo-specific application</a>
-</ul>
-
-<h2>Ogg Vorbis I specification</h2>
-
-<ul>
-<li>Vorbis I specification 
-      [<a href="Vorbis_I_spec.html">html</a>]
-      [<a href="Vorbis_I_spec.pdf">pdf</a>]
-<li><a href="v-comment.html">Vorbis comment header specification</a>
-<li><a href="draft-kerr-avt-vorbis-rtp-03.txt">Embedding Vorbis encoded 
-audio in an RTP payload format</a>
-</ul>
-
-
-<h2>Ogg Vorbis programming documents</h2>
-<ul>
-<li>Programming with libvorbis
-<li><a href="vorbisfile/index.html">Programming with vorbisfile</a>
-<li><a href="vorbisenc/index.html">Programming with vorbisenc</a><P>
-
-
-</ul>
-
-<h2>Ogg bitstream documentation</h2>
-<ul>
-<li><a href="oggstream.html">Ogg bitstream overview</a>
-<li><a href="framing.html">Ogg logical bitstream and framing spec</a>
-</ul>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis Documentation</h1>
+
+<h2>Vorbis technical discussion documents</h2>
+<ul>
+<li><a href="vorbis-fidelity.html">Fidelity measurement terminology</a></li>
+<li><a href="stereo.html">Vorbis channel coupling and stereo-specific application</a></li>
+</ul>
+
+<h2>Ogg Vorbis I specification</h2>
+
+<ul>
+<li>Vorbis I specification [<a href="Vorbis_I_spec.html">html</a>]
+  [<a href="Vorbis_I_spec.pdf">pdf</a>]</li>
+<li><a href="v-comment.html">Vorbis comment header specification</a></li>
+<li><a href="draft-kerr-avt-vorbis-rtp-03.txt">Embedding Vorbis encoded 
+audio in an RTP payload format</a></li>
+</ul>
+
+<h2>Ogg Vorbis programming documents</h2>
+
+<ul>
+<li>Programming with libvorbis</li>
+<li><a href="vorbisfile/index.html">Programming with vorbisfile</a></li>
+<li><a href="vorbisenc/index.html">Programming with vorbisenc</a></li>
+</ul>
+
+<h2>Ogg bitstream documentation</h2>
+
+<ul>
+<li><a href="oggstream.html">Ogg bitstream overview</a></li>
+<li><a href="framing.html">Ogg logical bitstream and framing spec</a></li>
+</ul>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/oggstream.html
===================================================================
--- branches/vorbis-aotuv/doc/oggstream.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/oggstream.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,196 +1,234 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><a href="http://www.xiph.org/ogg/index.html"><img src="white-ogg.png" border=0><img 
-src="vorbisword2.png" border=0></a></nobr><p>
-
-
-<h1><font color=#000070>
-Ogg logical and physical bitstream overview
-</font></h1>
-
-<em>Last update to this document: July 14, 2002</em><br> 
-
-<h2>Ogg bitstreams</h2>
-
-Ogg codecs use octet vectors of raw, compressed data
-(<em>packets</em>). These compressed packets do not have any
-high-level structure or boundary information; strung together, they
-appear to be streams of random bytes with no landmarks.<p>
-
-Raw packets may be used directly by transport mechanisms that provide
-their own framing and packet-separation mechanisms (such as UDP
-datagrams).  For stream based storage (such as files) and transport
-(such as TCP streams or pipes), Vorbis and other future Ogg codecs use
-the Ogg bitstream format to provide framing/sync, sync recapture
-after error, landmarks during seeking, and enough information to
-properly separate data back into packets at the original packet
-boundaries without relying on decoding to find packet boundaries.<p>
-
-<h2>Logical and physical bitstreams</h2>
-
-Raw packets are grouped and encoded into contiguous pages of
-structured bitstream data called <em>logical bitstreams</em>.  A
-logical bitstream consists of pages, in order, belonging to a single
-codec instance.  Each page is a self contained entity (although it is
-possible that a packet may be split and encoded across one or more
-pages); that is, the page decode mechanism is designed to recognize,
-verify and handle single pages at a time from the overall bitstream.<p>
-
-Multiple logical bitstreams can be combined (with restrictions) into a
-single <em>physical bitstream</em>.  A physical bitstream consists of
-multiple logical bitstreams multiplexed at the page level and may
-include a 'meta-header' at the beginning of the multiplexed logical
-stream that serves as identification magic. Whole pages are taken in
-order from multiple logical bitstreams and combined into a single
-physical stream of pages. The decoder reconstructs the original
-logical bitstreams from the physical bitstream by taking the pages in
-order from the physical bitstream and redirecting them into the
-appropriate logical decoding entity. The simplest physical bitstream
-is a single, unmultiplexed logical bitstream with no meta-header; this
-is referred to as a 'degenerate stream'.  <p>
-
-<a href=framing.html>Ogg Logical Bitstream Framing</a> discusses
-the page format of an Ogg bitstream, the packet coding process
-and logical bitstreams in detail.  The remainder of this document
-specifies requirements for constructing finished, physical Ogg
-bitstreams.<p>
-
-<h2>Mapping Restrictions</h2>
-
-Logical bitstreams may not be mapped/multiplexed into physical
-bitstreams without restriction.  Here we discuss design restrictions
-on Ogg physical bitstreams in general, mostly to introduce
-design rationale. Each 'media' format defines its own (generally more
-restrictive) mapping.  An '<a href="vorbis-ogg.html">Ogg Vorbis
-Audio Bitstream</a>', for example, has a <a
-href="vorbis-ogg.html">specific physical bitstream structure</a>.
-An 'Ogg A/V' bitstream (not currently specified) will also mandate a
-specific, restricted physical bitstream format.<p>
-
-<h3>additional end-to-end structure</h3>
-
-The <a href="framing.html">framing specification</a> defines
-'beginning of stream' and 'end of stream' page markers via a header
-flag (it is possible for a stream to consist of a single page).  A
-stream always consists of an integer number of pages, an easy
-requirement given the variable size nature of pages.<p>
-
-In addition to the header flag marking the first and last pages of a
-logical bitstream, the first page of an Ogg bitstream obeys
-additional restrictions.  Each individual media mapping specifies its
-own implementation details regarding these restrictions.<p>
-
-The first page of a logical Ogg bitstream consists of a single,
-small 'initial header' packet that includes sufficient information to
-identify the exact CODEC type and media requirements of the logical
-bitstream.  The intent of this restriction is to simplify identifying
-the bitstream type and content; for a given media type (or across all
-Ogg media types) we can know that we only need a small, fixed
-amount of data to uniquely identify the bitstream type.<p>
-
-As an example, Ogg Vorbis places the name and revision of the Vorbis
-CODEC, the audio rate and the audio quality into this initial header,
-thus simplifying vastly the certain identification of an Ogg Vorbis
-audio bitstream.<p>
-
-<h3>sequential multiplexing (chaining)</h3>
-
-The simplest form of logical bitstream multiplexing is concatenation
-(<em>chaining</em>).  Complete logical bitstreams are strung
-one-after-another in order.  The bitstreams do not overlap; the final
-page of a given logical bitstream is immediately followed by the
-initial page of the next.  Chaining is the only logical->physical
-mapping allowed by Ogg Vorbis.<p>
-
-Each chained logical bitstream must have a unique serial number within
-the scope of the physical bitstream.<p>
-
-<h3>concurrent multiplexing (grouping)</h3>
-
-Logical bitstreams may also be multiplexed 'in parallel'
-(<em>grouped</em>).  An example of grouping would be to allow
-streaming of separate audio and video streams, using different codecs
-and different logical bitstreams, in the same physical bitstream.
-Whole pages from multiple logical bitstreams are mixed together.<p>
-
-The initial pages of each logical bitstream must appear first; the
-media mapping specifies the order of the initial pages.  For example,
-Ogg A/V will eventually specify an Ogg video bitstream with
-audio.  The mapping may specify that the physical bitstream must begin
-with the initial page of a logical video bitstream, followed by the
-initial page of an audio stream.  Unlike initial pages, terminal pages
-for the logical bitstreams need not all occur contiguously (although a
-specific media mapping may require this; it is not mandated by the
-generic Ogg stream spec).  Terminal pages may be 'nil' pages,
-that is, pages containing no content but simply a page header with
-position information and the 'last page of bitstream' flag set in the
-page header.<p>
-
-Each grouped bitstream must have a unique serial number within the
-scope of the physical bitstream.<p>
-
-<h3>sequential and concurrent multiplexing</h3>
-
-Groups of concurrently multiplexed bitstreams may be chained
-consecutively.  Such a physical bitstream obeys all the rules of both
-grouped and chained multiplexed streams; the groups, when unchained ,
-must stand on their own as a valid concurrently multiplexed
-bitstream.<p>
-
-<h3>multiplexing example</h3>
-
-Below, we present an example of a grouped and chained bitstream:<p>
-
-<img src=stream.png><p>
-
-In this example, we see pages from five total logical bitstreams
-multiplexed into a physical bitstream.  Note the following
-characteristics:
-
-<ol><li>Grouped bitstreams begin together; all of the initial pages
-must appear before any data pages.  When concurrently multiplexed
-groups are chained, the new group does not begin until all the
-bitstreams in the previous group have terminated.<p>
-
-<li>The pages of concurrently multiplexed bitstreams need not conform
-to a regular order; the only requirement is that page <tt>n</tt> of a
-logical bitstream follow page <tt>n-1</tt> in the physical bitstream.
-There are no restrictions on intervening pages belonging to other
-logical bitstreams.  (Tying page appearance to bitrate demands is one
-logical strategy, ie, the page appears at the chronological point
-where decode requires more information).
-
-</ol>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg logical and physical bitstream overview</h1>
+
+<h2>Ogg bitstreams</h2>
+
+<p>Ogg codecs use octet vectors of raw, compressed data
+(<em>packets</em>). These compressed packets do not have any
+high-level structure or boundary information; strung together, they
+appear to be streams of random bytes with no landmarks.</p>
+
+<p>Raw packets may be used directly by transport mechanisms that provide
+their own framing and packet-separation mechanisms (such as UDP
+datagrams). For stream based storage (such as files) and transport
+(such as TCP streams or pipes), Vorbis and other future Ogg codecs use
+the Ogg bitstream format to provide framing/sync, sync recapture
+after error, landmarks during seeking, and enough information to
+properly separate data back into packets at the original packet
+boundaries without relying on decoding to find packet boundaries.</p>
+
+<h2>Logical and physical bitstreams</h2>
+
+<p>Raw packets are grouped and encoded into contiguous pages of
+structured bitstream data called <em>logical bitstreams</em>. A
+logical bitstream consists of pages, in order, belonging to a single
+codec instance. Each page is a self contained entity (although it is
+possible that a packet may be split and encoded across one or more
+pages); that is, the page decode mechanism is designed to recognize,
+verify and handle single pages at a time from the overall bitstream.</p>
+
+<p>Multiple logical bitstreams can be combined (with restrictions) into a
+single <em>physical bitstream</em>. A physical bitstream consists of
+multiple logical bitstreams multiplexed at the page level and may
+include a 'meta-header' at the beginning of the multiplexed logical
+stream that serves as identification magic. Whole pages are taken in
+order from multiple logical bitstreams and combined into a single
+physical stream of pages. The decoder reconstructs the original
+logical bitstreams from the physical bitstream by taking the pages in
+order from the physical bitstream and redirecting them into the
+appropriate logical decoding entity. The simplest physical bitstream
+is a single, unmultiplexed logical bitstream with no meta-header; this
+is referred to as a 'degenerate stream'.</p>
+
+<p><a href="framing.html">Ogg Logical Bitstream Framing</a> discusses
+the page format of an Ogg bitstream, the packet coding process
+and logical bitstreams in detail. The remainder of this document
+specifies requirements for constructing finished, physical Ogg
+bitstreams.</p>
+
+<h2>Mapping Restrictions</h2>
+
+<p>Logical bitstreams may not be mapped/multiplexed into physical
+bitstreams without restriction. Here we discuss design restrictions
+on Ogg physical bitstreams in general, mostly to introduce
+design rationale. Each 'media' format defines its own (generally more
+restrictive) mapping. An 'Ogg Vorbis Audio Bitstream', for example, has a
+specific physical bitstream structure.
+An 'Ogg A/V' bitstream (not currently specified) will also mandate a
+specific, restricted physical bitstream format.</p>
+
+<h3>additional end-to-end structure</h3>
+
+<p>The <a href="framing.html">framing specification</a> defines
+'beginning of stream' and 'end of stream' page markers via a header
+flag (it is possible for a stream to consist of a single page). A
+stream always consists of an integer number of pages, an easy
+requirement given the variable size nature of pages.</p>
+
+<p>In addition to the header flag marking the first and last pages of a
+logical bitstream, the first page of an Ogg bitstream obeys
+additional restrictions. Each individual media mapping specifies its
+own implementation details regarding these restrictions.</p>
+
+<p>The first page of a logical Ogg bitstream consists of a single,
+small 'initial header' packet that includes sufficient information to
+identify the exact CODEC type and media requirements of the logical
+bitstream. The intent of this restriction is to simplify identifying
+the bitstream type and content; for a given media type (or across all
+Ogg media types) we can know that we only need a small, fixed
+amount of data to uniquely identify the bitstream type.</p>
+
+<p>As an example, Ogg Vorbis places the name and revision of the Vorbis
+CODEC, the audio rate and the audio quality into this initial header,
+thus simplifying vastly the certain identification of an Ogg Vorbis
+audio bitstream.</p>
+
+<h3>sequential multiplexing (chaining)</h3>
+
+<p>The simplest form of logical bitstream multiplexing is concatenation
+(<em>chaining</em>). Complete logical bitstreams are strung
+one-after-another in order. The bitstreams do not overlap; the final
+page of a given logical bitstream is immediately followed by the
+initial page of the next. Chaining is the only logical->physical
+mapping allowed by Ogg Vorbis.</p>
+
+<p>Each chained logical bitstream must have a unique serial number within
+the scope of the physical bitstream.</p>
+
+<h3>concurrent multiplexing (grouping)</h3>
+
+<p>Logical bitstreams may also be multiplexed 'in parallel'
+(<em>grouped</em>). An example of grouping would be to allow
+streaming of separate audio and video streams, using different codecs
+and different logical bitstreams, in the same physical bitstream.
+Whole pages from multiple logical bitstreams are mixed together.</p>
+
+<p>The initial pages of each logical bitstream must appear first; the
+media mapping specifies the order of the initial pages. For example,
+Ogg A/V will eventually specify an Ogg video bitstream with
+audio. The mapping may specify that the physical bitstream must begin
+with the initial page of a logical video bitstream, followed by the
+initial page of an audio stream. Unlike initial pages, terminal pages
+for the logical bitstreams need not all occur contiguously (although a
+specific media mapping may require this; it is not mandated by the
+generic Ogg stream spec). Terminal pages may be 'nil' pages,
+that is, pages containing no content but simply a page header with
+position information and the 'last page of bitstream' flag set in the
+page header.</p>
+
+<p>Each grouped bitstream must have a unique serial number within the
+scope of the physical bitstream.</p>
+
+<h3>sequential and concurrent multiplexing</h3>
+
+<p>Groups of concurrently multiplexed bitstreams may be chained
+consecutively. Such a physical bitstream obeys all the rules of both
+grouped and chained multiplexed streams; the groups, when unchained ,
+must stand on their own as a valid concurrently multiplexed
+bitstream.</p>
+
+<h3>multiplexing example</h3>
+
+<p>Below, we present an example of a grouped and chained bitstream:</p>
+
+<p><img src="stream.png" alt="stream"/></p>
+
+<p>In this example, we see pages from five total logical bitstreams
+multiplexed into a physical bitstream. Note the following
+characteristics:</p>
+
+<ol>
+<li>Grouped bitstreams begin together; all of the initial pages
+must appear before any data pages. When concurrently multiplexed
+groups are chained, the new group does not begin until all the
+bitstreams in the previous group have terminated.</li>
+
+<li>The pages of concurrently multiplexed bitstreams need not conform
+to a regular order; the only requirement is that page <tt>n</tt> of a
+logical bitstream follow page <tt>n-1</tt> in the physical bitstream.
+There are no restrictions on intervening pages belonging to other
+logical bitstreams. (Tying page appearance to bitrate demands is one
+logical strategy, ie, the page appears at the chronological point
+where decode requires more information).</li>
+</ol>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/programming.html
===================================================================
--- branches/vorbis-aotuv/doc/programming.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/programming.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,502 +1,554 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-
-<h1><font color=#000070>
-Programming with Xiph.org <tt>libvorbis</tt>
-</font></h1>
-
-<em>Last update to this document: July 22, 1999</em><br> 
-
-<h2>Description</h2> 
-
-Libvorbis is the Xiph.org Foundation's portable Ogg Vorbis CODEC
-implemented as a programmatic library.  Libvorbis provides primitives
-to handle framing and manipulation of Ogg bitstreams (used by the
-Vorbis for streaming), a full analysis (encoding) interface as well as
-packet decoding and synthesis for playback. <p>
-
-The libvorbis library does not provide any system interface; a
-full-featured demonstration player included with the library
-distribtion provides example code for a variety of system interfaces
-as well as a working example of using libvorbis in production code.
-
-<h2>Encoding Overview</h2>
-
-
-
-<h2>Decoding Overview</h2>
-
-Decoding a bitstream with libvorbis follows roughly the following
-steps:
-
-<ol>
-<li>Frame the incoming bitstream into pages
-<li>Sort the pages by logical bitstream and buffer then into logical streams
-<li>Decompose the logical streams into raw packets
-<li>Reconstruct segments of the original data from each packet
-<li>Glue the reconstructed segments back into a decoded stream
-</ol>
-
-<h3>Framing</h3>
-
-An Ogg bitstream is logically arranged into pages, but to decode
-the pages, we have to find them first.  The raw bitstream is first fed
-into an <tt>ogg_sync_state</tt> buffer using <tt>ogg_sync_buffer()</tt>
-and <tt>ogg_sync_wrote()</tt>.  After each block we submit to the sync
-buffer, we should check to see if we can frame and extract a complete
-page or pages using <tt>ogg_sync_pageout()</tt>.  Extra pages are
-buffered; allowing them to build up in the <tt>ogg_sync_state</tt>
-buffer will eventually exhaust memory.<p>
-
-The Ogg pages returned from <tt>ogg_sync_pageout</tt> need not be
-decoded further to be used as landmarks in seeking; seeking can be
-either a rough process of simply jumping to approximately intuited
-portions of the bitstream, or it can be a precise bisection process
-that captures pages and inspects data position.  When seeking,
-however, sequential multiplexing (chaining) must be accounted for;
-beginning play in a new logical bitstream requires initializing a
-synthesis engine with the headers from that bitstream.  Vorbis
-bitstreams do not make use of concurent multiplexing (grouping).<p>
-
-<h3>Sorting</h3>
-
-The pages produced by <tt>ogg_sync_pageout</tt> are then sorted by
-serial number to seperate logical bitstreams.  Initialize logical
-bitstream buffers (<tt>og_stream_state</tt>) using
-<tt>ogg_stream_init()</tt>. Pages are submitted to the matching
-logical bitstream buffer using <tt>ogg_stream_pagein</tt>; the serial
-number of the page and the stream buffer must match, or the page will
-be rejected.  A page submitted out of sequence will simply be noted,
-and in the course of outputting packets, the hole will be flagged
-(<tt>ogg_sync_pageout</tt> and <tt>ogg_stream_packetout</tt> will
-return a negative value at positions where they had to recapture the
-stream).
-
-<h3>Extracting packets</h3>
-
-After submitting page[s] to a logical stream, read available packets
-using <tt>ogg_stream_packetout</tt>.
-
-<h3>Decoding packets</h3>
-
-<h3>Reassembling data segments</h3>
-
-
-<h2>Ogg Bitstream Manipulation Structures</h3>
-
-Two of the Ogg bitstream data structures are intended to be
-transparent to the developer; the fields should be used directly.<p>
-
-<h3>ogg_packet</h3>
-
-<pre>
-typedef struct {
-  unsigned char *packet;
-  long  bytes;
-  long  b_o_s;
-  long  e_o_s;
-
-  size64 granulepos;
-
-} ogg_packet;
-</pre>
-
-<dl>
-<dt>packet: <dd>a pointer to the byte data of the raw packet
-<dt>bytes: <dd>the size of the packet' raw data
-<dt>b_o_s: <dd>beginning of stream; nonzero if this is the first packet of 
-              the logical bitstream
-<dt>e_o_s: <dd>end of stream; nonzero if this is the last packet of the 
-              logical bitstream
-<dt>granulepos: <dd>the absolute position of this packet in the original 
-             uncompressed data stream.
-</dl>
-
-<h4>encoding notes</h4> The encoder is responsible for setting all of
-the fields of the packet to appropriate values before submission to
-<tt>ogg_stream_packetin()</tt>; however, it is noted that the value in
-<tt>b_o_s</tt> is ignored; the first page produced from a given
-<tt>ogg_stream_state</tt> structure will be stamped as the initial
-page.  <tt>e_o_s</tt>, however, must be set; this is the means by
-which the stream encoding primitives handle end of stream and cleanup.
-
-<h4>decoding notes</h4><tt>ogg_stream_packetout()</tt> sets the fields
-to appropriate values.  Note that granulepos will be >= 0 only in the
-case that the given packet actually represents that position (ie, only
-the last packet completed on any page will have a meaningful
-<tt>granulepos</tt>).  Intervening frames will see <tt>granulepos</tt> set
-to -1.
-
-<h3>ogg_page</h3>
-
-<pre>
-typedef struct {
-  unsigned char *header;
-  long header_len;
-  unsigned char *body;
-  long body_len;
-} ogg_page;
-</pre>
-
-<dl>
-<dt>header: <dd>pointer to the page header data
-<dt>header_len: <dd>length of the page header in bytes
-<dt>body: <dd>pointer to the page body
-<dt>body_len: <dd>length of the page body
-</dl>
-
-Note that although the <tt>header</tt> and <tt>body</tt> pointers do
-not necessarily point into a single contiguous page vector, the page
-body must immediately follow the header in the bitstream.<p>
-
-<h2>Ogg Bitstream Manipulation Functions</h3>
-
-<h3>
-int    ogg_page_bos(ogg_page *og);
-</h3>
-
-Returns the 'beginning of stream' flag for the given Ogg page.  The
-beginning of stream flag is set on the initial page of a logical
-bitstream.<P>
-
-Zero indicates the flag is cleared (this is not the initial page of a
-logical bitstream).  Nonzero indicates the flag is set (this is the
-initial page of a logical bitstream).<p>
-
-<h3>
-int    ogg_page_continued(ogg_page *og);
-</h3>
-
-Returns the 'packet continued' flag for the given Ogg page. The packet
-continued flag indicates whether or not the body data of this page
-begins with packet continued from a preceeding page.<p>
-Zero (unset) indicates that the body data begins with a new packet.
-Nonzero (set) indicates that the first packet data on the page is a
-continuation from the preceeding page.
-
-<h3>
-int    ogg_page_eos(ogg_page *og);
-</h3>
-
-Returns the 'end of stream' flag for a give Ogg page.  The end of page
-flag is set on the last (terminal) page of a logical bitstream.<p>
-
-Zero (unset) indicates that this is not the last page of a logical
-bitstream.  Nonzero (set) indicates that this is the last page of a
-logical bitstream and that no addiitonal pages belonging to this
-bitstream may follow.<p>
-
-<h3>
-size64 ogg_page_granulepos(ogg_page *og);
-</h3>
-
-Returns the position of this page as an absolute position within the
-original uncompressed data.  The position, as returned, is 'frames
-encoded to date up to and including the last whole packet on this
-page'.  Partial packets begun on this page but continued to the
-following page are not included.  If no packet ends on this page, the
-frame position value will be equal to the frame position value of the
-preceeding page.  If none of the original uncompressed data is yet
-represented in the logical bitstream (for example, the first page of a
-bitstream consists only of a header packet; this packet encodes only
-metadata), the value shall be zero.<p>
-
-The units of the framenumber are determined by media mapping.  A
-vorbis audio bitstream, for example, defines one frame to be the
-channel values from a single sampling period (eg, a 16 bit stereo
-bitstream consists of two samples of two bytes for a total of four
-bytes, thus a frame would be four bytes).  A video stream defines one
-frame to be a single frame of video.<p>
-
-<h3>
-int    ogg_page_pageno(ogg_page *og);
-</h3>
-
-Returns the sequential page number of the given Ogg page.  The first
-page in a logical bitstream is numbered zero; following pages are
-numbered in increasing monotonic order.<p>
-
-<h3>
-int    ogg_page_serialno(ogg_page *og);
-</h3>
-
-Returns the serial number of the given Ogg page.  The serial number is
-used as a handle to distinguish various logical bitstreams in a
-physical Ogg bitstresm. Every logical bitstream within a
-physical bitstream must use a unique (within the scope of the physical
-bitstream) serial number, which is stamped on all bitstream pages.<p>
-
-<h3>
-int    ogg_page_version(ogg_page *og);
-</h3>
-
-Returns the revision of the Ogg bitstream structure of the given page.
-Currently, the only permitted number is zero.  Later revisions of the
-bitstream spec will increment this version should any changes be
-incompatable.</p>
-
-<h3>
-int    ogg_stream_clear(ogg_stream_state *os);
-</h3>
-
-Clears and deallocates the internal storage of the given Ogg stream.
-After clearing, the stream structure is not initialized for use;
-<tt>ogg_stream_init</tt> must be called to reinitialize for use.
-Use <tt>ogg_stream_reset</tt> to reset the stream state
-to a fresh, intiialized state.<p>
-
-<tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer
-<tt>os</tt>, allowing use of this call on stream structures in static
-or automatic storage.  <tt>ogg_stream_destroy</tt>is a complimentary
-function that frees the pointer as well.<p>
-
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-int    ogg_stream_destroy(ogg_stream_state *os);
-</h3>
-
-Clears and deallocates the internal storage of the given Ogg stream,
-then frees the storage associated with the pointer <tt>os</tt>.<p>
-
-<tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer
-<tt>os</tt>, allowing use of that call on stream structures in static
-or automatic storage.<p>
-
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-int    ogg_stream_init(ogg_stream_state *os,int serialno);
-</h3>
-
-Initialize the storage associated with <tt>os</tt> for use as an Ogg
-stream.  This call is used to initialize a stream for both encode and
-decode.  The given serial number is the serial number that will be
-stamped on pages of the produced bitstream (during encode), or used as
-a check that pages match (during decode).<p>
-
-Returns zero on success, nonzero on failure.<p>
-
-<h3>
-int    ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
-</h3>
-
-Used during encoding to add the given raw packet to the given Ogg
-bitstream.  The contents of <tt>op</tt> are copied;
-<tt>ogg_stream_packetin</tt> does not retain any pointers into
-<tt>op</tt>'s storage. The encoding proccess buffers incoming packets
-until enough packets have been assembled to form an entire page;
-<tt>ogg_stream_pageout</tt> is used to read complete pages.<p>
-
-Returns zero on success, nonzero on failure.<p>
-
-<h3>
-int    ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
-</h3>
-
-Used during decoding to read raw packets from the given logical
-bitstream.  <tt>ogg_stream_packetout</tt> will only return complete
-packets for which checksumming indicates no corruption.  The size and
-contents of the packet exactly match those given in the encoding
-process.  <p>
-
-Returns zero if the next packet is not ready to be read (not buffered
-or incomplete), positive if it returned a complete packet in
-<tt>op</tt> and negative if there is a gap, extra bytes or corruption
-at this position in the bitstream (essentially that the bitstream had
-to be recaptured).  A negative value is not necessarily an error.  It
-would be a common occurence when seeking, for example, which requires
-recapture of the bitstream at the position decoding continued.<p>
-
-Iff the return value is positive, <tt>ogg_stream_packetout</tt> placed
-a packet in <tt>op</tt>.  The data in <t>op</tt> points to static
-storage that is valid until the next call to
-<tt>ogg_stream_pagein</tt>, <tt>ogg_stream_clear</tt>,
-<tt>ogg_stream_reset</tt>, or <tt>ogg_stream_destroy</tt>.  The
-pointers are not invalidated by more calls to
-<tt>ogg_stream_packetout</tt>.<p>
-
-<h3>
-int    ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
-</h3>
-
-Used during decoding to buffer the given complete, pre-verified page
-for decoding into raw Ogg packets. The given page must be framed,
-normally produced by <tt>ogg_sync_pageout</tt>, and from the logical
-bitstream associated with <tt>os</tt> (the serial numbers must match).
-The contents of the given page are copied; <tt>ogg_stream_pagein</tt>
-retains no pointers into <tt>og</tt> storage.<p>
-
-Returns zero on success and non-zero on failure.<p>
-
-<h3>
-int    ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
-</h3>
-
-Used during encode to read complete pages from the stream buffer.  The
-returned page is ready for sending out to the real world.<p>
-
-Returns zero if there is no complete page ready for reading.  Returns
-nonzero when it has placed data for a complete page into
-<tt>og</tt>. Note that the storage returned in og points into internal
-storage; the pointers in <tt>og</tt> are valid until the next call to
-<tt>ogg_stream_pageout</tt>, <tt>ogg_stream_packetin</tt>,
-<tt>ogg_stream_reset</tt>, <tt>ogg_stream_clear</tt> or
-<tt>ogg_stream_destroy</tt>.
-
-<h3>
-int    ogg_stream_reset(ogg_stream_state *os);
-</h3>
-
-Resets the given stream's state to that of a blank, unused stream;
-this may be used during encode or decode. <p>
-
-Note that if used during encode, it does not alter the stream's serial
-number.  In addition, the next page produced during encoding will be
-marked as the 'initial' page of the logical bitstream.<p>
-
-When used during decode, this simply clears the data buffer of any
-pending pages.  Beginning and end of stream cues are read from the
-bitstream and are unaffected by reset.<p>
-
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-char  *ogg_sync_buffer(ogg_sync_state *oy, long size);
-</h3>
-
-This call is used to buffer a raw bitstream for framing and
-verification. <tt>ogg_sync_buffer</tt> handles stream capture and
-recapture, checksumming, and division into Ogg pages (as required by
-<tt>ogg_stream_pagein</tt>).<p>
-
-<tt>ogg_sync_buffer</tt> exposes a buffer area into which the decoder
-copies the next (up to) <tt>size</tt> bytes.  We expose the buffer
-(rather than taking a buffer) in order to avoid an extra copy many
-uses; this way, for example, <tt>read()</tt> can transfer data
-directly into the stream buffer without first needing to place it in
-temporary storage.<p>
-
-Returns a pointer into <tt>oy</tt>'s internal bitstream sync buffer;
-the remaining space in the sync buffer is at least <tt>size</tt>
-bytes.  The decoder need not write all of <tt>size</tt> bytes;
-<tt>ogg_sync_wrote</tt> is used to inform the engine how many bytes
-were actually written. Use of <tt>ogg_sync_wrote</tt> after writing
-into the exposed buffer is mandantory.<p>
-
-<h3>
-int    ogg_sync_clear(ogg_sync_state *oy);
-</h3>
-
-<tt>ogg_sync_clear</tt>
-
-Clears and deallocates the internal storage of the given Ogg sync
-buffer.  After clearing, the sync structure is not initialized for
-use; <tt>ogg_sync_init</tt> must be called to reinitialize for use.
-Use <tt>ogg_sync_reset</tt> to reset the sync state and buffer to a
-fresh, intiialized state.<p>
-
-<tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer
-<tt>oy</tt>, allowing use of this call on sync structures in static
-or automatic storage.  <tt>ogg_sync_destroy</tt>is a complimentary
-function that frees the pointer as well.<p>
-
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-int    ogg_sync_destroy(ogg_sync_state *oy);
-</h3>
-
-Clears and deallocates the internal storage of the given Ogg sync
-buffer, then frees the storage associated with the pointer
-<tt>oy</tt>.<p>
-
-<tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer
-<tt>oy</tt>, allowing use of that call on stream structures in static
-or automatic storage.<p>
-
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-int    ogg_sync_init(ogg_sync_state *oy);
-</h3>
-
-Initializes the sync buffer <tt>oy</tt> for use.<p>
-Returns zero on success and non-zero on failure. This function always
-succeeds.<p>
-
-<h3>
-int    ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
-</h3>
-
-Reads complete, framed, verified Ogg pages from the sync buffer,
-placing the page data in <tt>og</tt>.<p>
-
-Returns zero when there's no complete pages buffered for
-retrieval. Returns negative when a loss of sync or recapture occurred
-(this is not necessarily an error; recapture would be required after
-seeking, for example).  Returns positive when a page is returned in
-<tt>og</tt>. Note that the data in <tt>og</tt> points into the sync
-buffer storage; the pointers are valid until the next call to
-<tt>ogg_sync_buffer</tt>, <tt>ogg_sync_clear</tt>,
-<tt>ogg_sync_destroy</tt> or <tt>ogg_sync_reset</tt>.
-
-
-<h3>
-int    ogg_sync_reset(ogg_sync_state *oy);
-</h3>
-
-<tt>ogg_sync_reset</tt> resets the sync state in <tt>oy</tt> to a
-clean, empty state.  This is useful, for example, when seeking to a
-new location in a bitstream.<p>
-
-Returns zero on success, nonzero on failure.<p>
-
-<h3>
-int    ogg_sync_wrote(ogg_sync_state *oy, long bytes);
-</h3>
-
-Used to inform the sync state as to how many bytes were actually
-written into the exposed sync buffer.  It must be equal to or less
-than the size of the buffer requested.<p>
-
-Returns zero on success and non-zero on failure; failure occurs only
-when the number of bytes written were larger than the buffer.<p>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org"></a> effort to
-protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Programming with Xiph.org <tt>libvorbis</tt></h1>
+
+<h2>Description</h2> 
+
+<p>Libvorbis is the Xiph.org Foundation's portable Ogg Vorbis CODEC
+implemented as a programmatic library. Libvorbis provides primitives
+to handle framing and manipulation of Ogg bitstreams (used by the
+Vorbis for streaming), a full analysis (encoding) interface as well as
+packet decoding and synthesis for playback.</p>
+
+<p>The libvorbis library does not provide any system interface; a
+full-featured demonstration player included with the library
+distribtion provides example code for a variety of system interfaces
+as well as a working example of using libvorbis in production code.</p>
+
+<h2>Encoding Overview</h2>
+
+<h2>Decoding Overview</h2>
+
+<p>Decoding a bitstream with libvorbis follows roughly the following
+steps:</p>
+
+<ol>
+<li>Frame the incoming bitstream into pages</li>
+<li>Sort the pages by logical bitstream and buffer then into logical streams</li>
+<li>Decompose the logical streams into raw packets</li>
+<li>Reconstruct segments of the original data from each packet</li>
+<li>Glue the reconstructed segments back into a decoded stream</li>
+</ol>
+
+<h3>Framing</h3>
+
+<p>An Ogg bitstream is logically arranged into pages, but to decode
+the pages, we have to find them first. The raw bitstream is first fed
+into an <tt>ogg_sync_state</tt> buffer using <tt>ogg_sync_buffer()</tt>
+and <tt>ogg_sync_wrote()</tt>. After each block we submit to the sync
+buffer, we should check to see if we can frame and extract a complete
+page or pages using <tt>ogg_sync_pageout()</tt>. Extra pages are
+buffered; allowing them to build up in the <tt>ogg_sync_state</tt>
+buffer will eventually exhaust memory.</p>
+
+<p>The Ogg pages returned from <tt>ogg_sync_pageout</tt> need not be
+decoded further to be used as landmarks in seeking; seeking can be
+either a rough process of simply jumping to approximately intuited
+portions of the bitstream, or it can be a precise bisection process
+that captures pages and inspects data position. When seeking,
+however, sequential multiplexing (chaining) must be accounted for;
+beginning play in a new logical bitstream requires initializing a
+synthesis engine with the headers from that bitstream. Vorbis
+bitstreams do not make use of concurent multiplexing (grouping).</p>
+
+<h3>Sorting</h3>
+
+<p>The pages produced by <tt>ogg_sync_pageout</tt> are then sorted by
+serial number to seperate logical bitstreams. Initialize logical
+bitstream buffers (<tt>og_stream_state</tt>) using
+<tt>ogg_stream_init()</tt>. Pages are submitted to the matching
+logical bitstream buffer using <tt>ogg_stream_pagein</tt>; the serial
+number of the page and the stream buffer must match, or the page will
+be rejected. A page submitted out of sequence will simply be noted,
+and in the course of outputting packets, the hole will be flagged
+(<tt>ogg_sync_pageout</tt> and <tt>ogg_stream_packetout</tt> will
+return a negative value at positions where they had to recapture the
+stream).</p>
+
+<h3>Extracting packets</h3>
+
+<p>After submitting page[s] to a logical stream, read available packets
+using <tt>ogg_stream_packetout</tt>.</p>
+
+<h3>Decoding packets</h3>
+
+<h3>Reassembling data segments</h3>
+
+<h2>Ogg Bitstream Manipulation Structures</h2>
+
+<p>Two of the Ogg bitstream data structures are intended to be
+transparent to the developer; the fields should be used directly.</p>
+
+<h3>ogg_packet</h3>
+
+<pre>
+typedef struct {
+  unsigned char *packet;
+  long  bytes;
+  long  b_o_s;
+  long  e_o_s;
+
+  size64 granulepos;
+
+} ogg_packet;
+</pre>
+
+<dl>
+<dt>packet:</dt>
+<dd>a pointer to the byte data of the raw packet</dd>
+<dt>bytes:</dt>
+<dd>the size of the packet' raw data</dd>
+<dt>b_o_s:</dt>
+<dd>beginning of stream; nonzero if this is the first packet of 
+  the logical bitstream</dd>
+<dt>e_o_s:</dt>
+<dd>end of stream; nonzero if this is the last packet of the 
+  logical bitstream</dd>
+<dt>granulepos:</dt>
+<dd>the absolute position of this packet in the original 
+  uncompressed data stream.</dd>
+</dl>
+
+<h4>encoding notes</h4>
+
+<p>The encoder is responsible for setting all of
+the fields of the packet to appropriate values before submission to
+<tt>ogg_stream_packetin()</tt>; however, it is noted that the value in
+<tt>b_o_s</tt> is ignored; the first page produced from a given
+<tt>ogg_stream_state</tt> structure will be stamped as the initial
+page. <tt>e_o_s</tt>, however, must be set; this is the means by
+which the stream encoding primitives handle end of stream and cleanup.</p>
+
+<h4>decoding notes</h4>
+
+<p><tt>ogg_stream_packetout()</tt> sets the fields
+to appropriate values. Note that granulepos will be >= 0 only in the
+case that the given packet actually represents that position (ie, only
+the last packet completed on any page will have a meaningful
+<tt>granulepos</tt>). Intervening frames will see <tt>granulepos</tt> set
+to -1.</p>
+
+<h3>ogg_page</h3>
+
+<pre>
+typedef struct {
+  unsigned char *header;
+  long header_len;
+  unsigned char *body;
+  long body_len;
+} ogg_page;
+</pre>
+
+<dl>
+<dt>header:</dt>
+<dd>pointer to the page header data</dd>
+<dt>header_len:</dt>
+<dd>length of the page header in bytes</dd>
+<dt>body:</dt>
+<dd>pointer to the page body</dd>
+<dt>body_len:</dt>
+<dd>length of the page body</dd>
+</dl>
+
+<p>Note that although the <tt>header</tt> and <tt>body</tt> pointers do
+not necessarily point into a single contiguous page vector, the page
+body must immediately follow the header in the bitstream.</p>
+
+<h2>Ogg Bitstream Manipulation Functions</h2>
+
+<h3>
+int    ogg_page_bos(ogg_page *og);
+</h3>
+
+<p>Returns the 'beginning of stream' flag for the given Ogg page. The
+beginning of stream flag is set on the initial page of a logical
+bitstream.</p>
+
+<p>Zero indicates the flag is cleared (this is not the initial page of a
+logical bitstream). Nonzero indicates the flag is set (this is the
+initial page of a logical bitstream).</p>
+
+<h3>
+int    ogg_page_continued(ogg_page *og);
+</h3>
+
+<p>Returns the 'packet continued' flag for the given Ogg page. The packet
+continued flag indicates whether or not the body data of this page
+begins with packet continued from a preceeding page.</p>
+
+<p>Zero (unset) indicates that the body data begins with a new packet.
+Nonzero (set) indicates that the first packet data on the page is a
+continuation from the preceeding page.</p>
+
+<h3>
+int    ogg_page_eos(ogg_page *og);
+</h3>
+
+<p>Returns the 'end of stream' flag for a give Ogg page. The end of page
+flag is set on the last (terminal) page of a logical bitstream.</p>
+
+<p>Zero (unset) indicates that this is not the last page of a logical
+bitstream. Nonzero (set) indicates that this is the last page of a
+logical bitstream and that no addiitonal pages belonging to this
+bitstream may follow.</p>
+
+<h3>
+size64 ogg_page_granulepos(ogg_page *og);
+</h3>
+
+<p>Returns the position of this page as an absolute position within the
+original uncompressed data. The position, as returned, is 'frames
+encoded to date up to and including the last whole packet on this
+page'. Partial packets begun on this page but continued to the
+following page are not included. If no packet ends on this page, the
+frame position value will be equal to the frame position value of the
+preceeding page. If none of the original uncompressed data is yet
+represented in the logical bitstream (for example, the first page of a
+bitstream consists only of a header packet; this packet encodes only
+metadata), the value shall be zero.</p>
+
+<p>The units of the framenumber are determined by media mapping. A
+vorbis audio bitstream, for example, defines one frame to be the
+channel values from a single sampling period (eg, a 16 bit stereo
+bitstream consists of two samples of two bytes for a total of four
+bytes, thus a frame would be four bytes). A video stream defines one
+frame to be a single frame of video.</p>
+
+<h3>
+int    ogg_page_pageno(ogg_page *og);
+</h3>
+
+<p>Returns the sequential page number of the given Ogg page. The first
+page in a logical bitstream is numbered zero; following pages are
+numbered in increasing monotonic order.</p>
+
+<h3>
+int    ogg_page_serialno(ogg_page *og);
+</h3>
+
+<p>Returns the serial number of the given Ogg page. The serial number is
+used as a handle to distinguish various logical bitstreams in a
+physical Ogg bitstresm. Every logical bitstream within a
+physical bitstream must use a unique (within the scope of the physical
+bitstream) serial number, which is stamped on all bitstream pages.</p>
+
+<h3>
+int    ogg_page_version(ogg_page *og);
+</h3>
+
+<p>Returns the revision of the Ogg bitstream structure of the given page.
+Currently, the only permitted number is zero. Later revisions of the
+bitstream spec will increment this version should any changes be
+incompatable.</p>
+
+<h3>
+int    ogg_stream_clear(ogg_stream_state *os);
+</h3>
+
+<p>Clears and deallocates the internal storage of the given Ogg stream.
+After clearing, the stream structure is not initialized for use;
+<tt>ogg_stream_init</tt> must be called to reinitialize for use.
+Use <tt>ogg_stream_reset</tt> to reset the stream state
+to a fresh, intiialized state.</p>
+
+<p><tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer
+<tt>os</tt>, allowing use of this call on stream structures in static
+or automatic storage. <tt>ogg_stream_destroy</tt>is a complimentary
+function that frees the pointer as well.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+int    ogg_stream_destroy(ogg_stream_state *os);
+</h3>
+
+<p>Clears and deallocates the internal storage of the given Ogg stream,
+then frees the storage associated with the pointer <tt>os</tt>.</p>
+
+<p><tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer
+<tt>os</tt>, allowing use of that call on stream structures in static
+or automatic storage.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+int    ogg_stream_init(ogg_stream_state *os,int serialno);
+</h3>
+
+<p>Initialize the storage associated with <tt>os</tt> for use as an Ogg
+stream. This call is used to initialize a stream for both encode and
+decode. The given serial number is the serial number that will be
+stamped on pages of the produced bitstream (during encode), or used as
+a check that pages match (during decode).</p>
+
+<p>Returns zero on success, nonzero on failure.</p>
+
+<h3>
+int    ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
+</h3>
+
+<p>Used during encoding to add the given raw packet to the given Ogg
+bitstream. The contents of <tt>op</tt> are copied;
+<tt>ogg_stream_packetin</tt> does not retain any pointers into
+<tt>op</tt>'s storage. The encoding proccess buffers incoming packets
+until enough packets have been assembled to form an entire page;
+<tt>ogg_stream_pageout</tt> is used to read complete pages.</p>
+
+<p>Returns zero on success, nonzero on failure.</p>
+
+<h3>
+int    ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
+</h3>
+
+<p>Used during decoding to read raw packets from the given logical
+bitstream. <tt>ogg_stream_packetout</tt> will only return complete
+packets for which checksumming indicates no corruption. The size and
+contents of the packet exactly match those given in the encoding
+process. </p>
+
+<p>Returns zero if the next packet is not ready to be read (not buffered
+or incomplete), positive if it returned a complete packet in
+<tt>op</tt> and negative if there is a gap, extra bytes or corruption
+at this position in the bitstream (essentially that the bitstream had
+to be recaptured). A negative value is not necessarily an error. It
+would be a common occurence when seeking, for example, which requires
+recapture of the bitstream at the position decoding continued.</p>
+
+<p>If the return value is positive, <tt>ogg_stream_packetout</tt> placed
+a packet in <tt>op</tt>. The data in <tt>op</tt> points to static
+storage that is valid until the next call to
+<tt>ogg_stream_pagein</tt>, <tt>ogg_stream_clear</tt>,
+<tt>ogg_stream_reset</tt>, or <tt>ogg_stream_destroy</tt>. The
+pointers are not invalidated by more calls to
+<tt>ogg_stream_packetout</tt>.</p>
+
+<h3>
+int    ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
+</h3>
+
+<p>Used during decoding to buffer the given complete, pre-verified page
+for decoding into raw Ogg packets. The given page must be framed,
+normally produced by <tt>ogg_sync_pageout</tt>, and from the logical
+bitstream associated with <tt>os</tt> (the serial numbers must match).
+The contents of the given page are copied; <tt>ogg_stream_pagein</tt>
+retains no pointers into <tt>og</tt> storage.</p>
+
+<p>Returns zero on success and non-zero on failure.</p>
+
+<h3>
+int    ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
+</h3>
+
+<p>Used during encode to read complete pages from the stream buffer. The
+returned page is ready for sending out to the real world.</p>
+
+<p>Returns zero if there is no complete page ready for reading. Returns
+nonzero when it has placed data for a complete page into
+<tt>og</tt>. Note that the storage returned in og points into internal
+storage; the pointers in <tt>og</tt> are valid until the next call to
+<tt>ogg_stream_pageout</tt>, <tt>ogg_stream_packetin</tt>,
+<tt>ogg_stream_reset</tt>, <tt>ogg_stream_clear</tt> or
+<tt>ogg_stream_destroy</tt>.</p>
+
+<h3>
+int    ogg_stream_reset(ogg_stream_state *os);
+</h3>
+
+<p>Resets the given stream's state to that of a blank, unused stream;
+this may be used during encode or decode.</p>
+
+<p>Note that if used during encode, it does not alter the stream's serial
+number. In addition, the next page produced during encoding will be
+marked as the 'initial' page of the logical bitstream.</p>
+
+<p>When used during decode, this simply clears the data buffer of any
+pending pages. Beginning and end of stream cues are read from the
+bitstream and are unaffected by reset.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+char  *ogg_sync_buffer(ogg_sync_state *oy, long size);
+</h3>
+
+<p>This call is used to buffer a raw bitstream for framing and
+verification. <tt>ogg_sync_buffer</tt> handles stream capture and
+recapture, checksumming, and division into Ogg pages (as required by
+<tt>ogg_stream_pagein</tt>).</p>
+
+<p><tt>ogg_sync_buffer</tt> exposes a buffer area into which the decoder
+copies the next (up to) <tt>size</tt> bytes. We expose the buffer
+(rather than taking a buffer) in order to avoid an extra copy many
+uses; this way, for example, <tt>read()</tt> can transfer data
+directly into the stream buffer without first needing to place it in
+temporary storage.</p>
+
+<p>Returns a pointer into <tt>oy</tt>'s internal bitstream sync buffer;
+the remaining space in the sync buffer is at least <tt>size</tt>
+bytes. The decoder need not write all of <tt>size</tt> bytes;
+<tt>ogg_sync_wrote</tt> is used to inform the engine how many bytes
+were actually written. Use of <tt>ogg_sync_wrote</tt> after writing
+into the exposed buffer is mandantory.</p>
+
+<h3>
+int    ogg_sync_clear(ogg_sync_state *oy);
+</h3>
+
+<p><tt>ogg_sync_clear</tt>
+clears and deallocates the internal storage of the given Ogg sync
+buffer. After clearing, the sync structure is not initialized for
+use; <tt>ogg_sync_init</tt> must be called to reinitialize for use.
+Use <tt>ogg_sync_reset</tt> to reset the sync state and buffer to a
+fresh, intiialized state.</p>
+
+<p><tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer
+<tt>oy</tt>, allowing use of this call on sync structures in static
+or automatic storage. <tt>ogg_sync_destroy</tt>is a complimentary
+function that frees the pointer as well.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+int    ogg_sync_destroy(ogg_sync_state *oy);
+</h3>
+
+<p>Clears and deallocates the internal storage of the given Ogg sync
+buffer, then frees the storage associated with the pointer
+<tt>oy</tt>.</p>
+
+<p><tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer
+<tt>oy</tt>, allowing use of that call on stream structures in static
+or automatic storage.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+int    ogg_sync_init(ogg_sync_state *oy);
+</h3>
+
+<p>Initializes the sync buffer <tt>oy</tt> for use.</p>
+
+<p>Returns zero on success and non-zero on failure. This function always
+succeeds.</p>
+
+<h3>
+int    ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
+</h3>
+
+<p>Reads complete, framed, verified Ogg pages from the sync buffer,
+placing the page data in <tt>og</tt>.</p>
+
+<p>Returns zero when there's no complete pages buffered for
+retrieval. Returns negative when a loss of sync or recapture occurred
+(this is not necessarily an error; recapture would be required after
+seeking, for example). Returns positive when a page is returned in
+<tt>og</tt>. Note that the data in <tt>og</tt> points into the sync
+buffer storage; the pointers are valid until the next call to
+<tt>ogg_sync_buffer</tt>, <tt>ogg_sync_clear</tt>,
+<tt>ogg_sync_destroy</tt> or <tt>ogg_sync_reset</tt>.</p>
+
+<h3>
+int    ogg_sync_reset(ogg_sync_state *oy);
+</h3>
+
+<p><tt>ogg_sync_reset</tt> resets the sync state in <tt>oy</tt> to a
+clean, empty state. This is useful, for example, when seeking to a
+new location in a bitstream.</p>
+
+<p>Returns zero on success, nonzero on failure.</p>
+
+<h3>
+int    ogg_sync_wrote(ogg_sync_state *oy, long bytes);
+</h3>
+
+<p>Used to inform the sync state as to how many bytes were actually
+written into the exposed sync buffer. It must be equal to or less
+than the size of the buffer requested.</p>
+
+<p>Returns zero on success and non-zero on failure; failure occurs only
+when the number of bytes written were larger than the buffer.</p>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/stereo.html
===================================================================
--- branches/vorbis-aotuv/doc/stereo.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/stereo.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,371 +1,418 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-
-<h1><font color=#000070>
-Ogg Vorbis stereo-specific channel coupling discussion
-</font></h1>
-
-<em>Last update to this document: July 16, 2002</em><br> 
-
-<h2>Abstract</h2> The Vorbis audio CODEC provides a channel coupling
-mechanisms designed to reduce effective bitrate by both eliminating
-interchannel redundancy and eliminating stereo image information
-labeled inaudible or undesirable according to spatial psychoacoustic
-models.  This document describes both the mechanical coupling
-mechanisms available within the Vorbis specification, as well as the
-specific stereo coupling models used by the reference
-<tt>libvorbis</tt> codec provided by xiph.org.
-
-<h2>Mechanisms</h2>
-
-In encoder release beta 4 and earlier, Vorbis supported multiple
-channel encoding, but the channels were encoded entirely separately
-with no cross-analysis or redundancy elimination between channels.
-This multichannel strategy is very similar to the mp3's <em>dual
-stereo</em> mode and Vorbis uses the same name for its analogous
-uncoupled multichannel modes.<p>
-
-However, the Vorbis spec provides for, and Vorbis release 1.0 rc1 and
-later implement a coupled channel strategy.  Vorbis has two specific
-mechanisms that may be used alone or in conjunction to implement
-channel coupling.  The first is <em>channel interleaving</em> via
-residue backend type 2, and the second is <em>square polar
-mapping</em>.  These two general mechanisms are particularly well
-suited to coupling due to the structure of Vorbis encoding, as we'll
-explore below, and using both we can implement both totally
-<em>lossless stereo image coupling</em> [bit-for-bit decode-identical
-to uncoupled modes], as well as various lossy models that seek to
-eliminate inaudible or unimportant aspects of the stereo image in
-order to enhance bitrate. The exact coupling implementation is
-generalized to allow the encoder a great deal of flexibility in
-implementation of a stereo or surround model without requiring any
-significant complexity increase over the combinatorially simpler
-mid/side joint stereo of mp3 and other current audio codecs.<p>
-
-A particular Vorbis bitstream may apply channel coupling directly to
-more than a pair of channels; polar mapping is hierarchical such that
-polar coupling may be extrapolated to an arbitrary number of channels
-and is not restricted to only stereo, quadraphonics, ambisonics or 5.1
-surround.  However, the scope of this document restricts itself to the
-stereo coupling case.<p>
-
-<h3>Square Polar Mapping</h3>
-
-<h4>maximal correlation</h4>
- 
-Recall that the basic structure of a a Vorbis I stream first generates
-from input audio a spectral 'floor' function that serves as an
-MDCT-domain whitening filter.  This floor is meant to represent the
-rough envelope of the frequency spectrum, using whatever metric the
-encoder cares to define.  This floor is subtracted from the log
-frequency spectrum, effectively normalizing the spectrum by frequency.
-Each input channel is associated with a unique floor function.<p>
-
-The basic idea behind any stereo coupling is that the left and right
-channels usually correlate.  This correlation is even stronger if one
-first accounts for energy differences in any given frequency band
-across left and right; think for example of individual instruments
-mixed into different portions of the stereo image, or a stereo
-recording with a dominant feature not perfectly in the center.  The
-floor functions, each specific to a channel, provide the perfect means
-of normalizing left and right energies across the spectrum to maximize
-correlation before coupling. This feature of the Vorbis format is not
-a convenient accident.<p>
-
-Because we strive to maximally correlate the left and right channels
-and generally succeed in doing so, left and right residue is typically
-nearly identical.  We could use channel interleaving (discussed below)
-alone to efficiently remove the redundancy between the left and right
-channels as a side effect of entropy encoding, but a polar
-representation gives benefits when left/right correlation is
-strong. <p>
-
-<h4>point and diffuse imaging</h4>
-
-The first advantage of a polar representation is that it effectively
-separates the spatial audio information into a 'point image'
-(magnitude) at a given frequency and located somewhere in the sound
-field, and a 'diffuse image' (angle) that fills a large amount of
-space simultaneously.  Even if we preserve only the magnitude (point)
-data, a detailed and carefully chosen floor function in each channel
-provides us with a free, fine-grained, frequency relative intensity
-stereo*.  Angle information represents diffuse sound fields, such as
-reverberation that fills the entire space simultaneously.<p>
-
-*<em>Because the Vorbis model supports a number of different possible
-stereo models and these models may be mixed, we do not use the term
-'intensity stereo' talking about Vorbis; instead we use the terms
-'point stereo', 'phase stereo' and subcategories of each.</em><p>
-
-The majority of a stereo image is representable by polar magnitude
-alone, as strong sounds tend to be produced at near-point sources;
-even non-diffuse, fast, sharp echoes track very accurately using
-magnitude representation almost alone (for those experimenting with
-Vorbis tuning, this strategy works much better with the precise,
-piecewise control of floor 1; the continuous approximation of floor 0
-results in unstable imaging).  Reverberation and diffuse sounds tend
-to contain less energy and be psychoacoustically dominated by the
-point sources embedded in them.  Thus, we again tend to concentrate
-more represented energy into a predictably smaller number of numbers.
-Separating representation of point and diffuse imaging also allows us
-to model and manipulate point and diffuse qualities separately.<p>
-
-<h4>controlling bit leakage and symbol crosstalk</h4> Because polar
-representation concentrates represented energy into fewer large
-values, we reduce bit 'leakage' during cascading (multistage VQ
-encoding) as a secondary benefit.  A single large, monolithic VQ
-codebook is more efficient than a cascaded book due to entropy
-'crosstalk' among symbols between different stages of a multistage cascade.
-Polar representation is a way of further concentrating entropy into
-predictable locations so that codebook design can take steps to
-improve multistage codebook efficiency.  It also allows us to cascade
-various elements of the stereo image independently.<p>
-
-<h4>eliminating trigonometry and rounding</h4>
-
-Rounding and computational complexity are potential problems with a
-polar representation. As our encoding process involves quantization,
-mixing a polar representation and quantization makes it potentially
-impossible, depending on implementation, to construct a coupled stereo
-mechanism that results in bit-identical decompressed output compared
-to an uncoupled encoding should the encoder desire it.<p>
-
-Vorbis uses a mapping that preserves the most useful qualities of
-polar representation, relies only on addition/subtraction (during
-decode; high quality encoding still requires some trig), and makes it
-trivial before or after quantization to represent an angle/magnitude
-through a one-to-one mapping from possible left/right value
-permutations.  We do this by basing our polar representation on the
-unit square rather than the unit-circle.<p>
-
-Given a magnitude and angle, we recover left and right using the
-following function (note that A/B may be left/right or right/left
-depending on the coupling definition used by the encoder):<p>
-
-<pre>
-      if(magnitude>0)
-        if(angle>0){
-          A=magnitude;
-          B=magnitude-angle;
-        }else{
-          B=magnitude;
-          A=magnitude+angle;
-        }
-      else
-        if(angle>0){
-          A=magnitude;
-          B=magnitude+angle;
-        }else{
-          B=magnitude;
-          A=magnitude-angle;
-        }
-    }
-</pre>
-
-The function is antisymmetric for positive and negative magnitudes in
-order to eliminate a redundant value when quantizing.  For example, if
-we're quantizing to integer values, we can visualize a magnitude of 5
-and an angle of -2 as follows:<p>
-
-<img src="squarepolar.png">
-
-<p>
-This representation loses or replicates no values; if the range of A
-and B are integral -5 through 5, the number of possible Cartesian
-permutations is 121.  Represented in square polar notation, the
-possible values are:
-
-<pre>
- 0, 0
-
--1,-2  -1,-1  -1, 0  -1, 1
-
- 1,-2   1,-1   1, 0   1, 1
-
--2,-4  -2,-3  -2,-2  -2,-1  -2, 0  -2, 1  -2, 2  -2, 3  
-
- 2,-4   2,-3   ... following the pattern ...
-
- ...    5, 1   5, 2   5, 3   5, 4   5, 5   5, 6   5, 7   5, 8   5, 9
-
-</pre>
-
-...for a grand total of 121 possible values, the same number as in
-Cartesian representation (note that, for example, <tt>5,-10</tt> is
-the same as <tt>-5,10</tt>, so there's no reason to represent
-both. 2,10 cannot happen, and there's no reason to account for it.)
-It's also obvious that this mapping is exactly reversible.<p>
-
-<h3>Channel interleaving</h3>
-
-We can remap and A/B vector using polar mapping into a magnitude/angle
-vector, and it's clear that, in general, this concentrates energy in
-the magnitude vector and reduces the amount of information to encode
-in the angle vector.  Encoding these vectors independently with
-residue backend #0 or residue backend #1 will result in bitrate
-savings.  However, there are still implicit correlations between the
-magnitude and angle vectors.  The most obvious is that the amplitude
-of the angle is bounded by its corresponding magnitude value.<p>
-
-Entropy coding the results, then, further benefits from the entropy
-model being able to compress magnitude and angle simultaneously.  For
-this reason, Vorbis implements residue backend #2 which pre-interleaves
-a number of input vectors (in the stereo case, two, A and B) into a
-single output vector (with the elements in the order of
-A_0, B_0, A_1, B_1, A_2 ... A_n-1, B_n-1) before entropy encoding.  Thus
-each vector to be coded by the vector quantization backend consists of
-matching magnitude and angle values.<p>
-
-The astute reader, at this point, will notice that in the theoretical
-case in which we can use monolithic codebooks of arbitrarily large
-size, we can directly interleave and encode left and right without
-polar mapping; in fact, the polar mapping does not appear to lend any
-benefit whatsoever to the efficiency of the entropy coding.  In fact,
-it is perfectly possible and reasonable to build a Vorbis encoder that
-dispenses with polar mapping entirely and merely interleaves the
-channel.  Libvorbis based encoders may configure such an encoding and
-it will work as intended.<p>
-
-However, when we leave the ideal/theoretical domain, we notice that
-polar mapping does give additional practical benefits, as discussed in
-the above section on polar mapping and summarized again here:<p>
-<ul>
-<li>Polar mapping aids in controlling entropy 'leakage' between stages
-of a cascaded codebook.  <li>Polar mapping separates the stereo image
-into point and diffuse components which may be analyzed and handled
-differently.
-</ul>
-
-<h2>Stereo Models</h2>
-
-<h3>Dual Stereo</h3>
-
-Dual stereo refers to stereo encoding where the channels are entirely
-separate; they are analyzed and encoded as entirely distinct entities.
-This terminology is familiar from mp3.<p>
-
-<h3>Lossless Stereo</h3>
-
-Using polar mapping and/or channel interleaving, it's possible to
-couple Vorbis channels losslessly, that is, construct a stereo
-coupling encoding that both saves space but also decodes
-bit-identically to dual stereo.  OggEnc 1.0 and later uses this
-mode in all high-bitrate encoding.<p>
-
-Overall, this stereo mode is overkill; however, it offers a safe
-alternative to users concerned about the slightest possible
-degradation to the stereo image or archival quality audio.<p>
-
-<h3>Phase Stereo</h3>
-
-Phase stereo is the least aggressive means of gracefully dropping
-resolution from the stereo image; it affects only diffuse imaging.<p>
-
-It's often quoted that the human ear is deaf to signal phase above
-about 4kHz; this is nearly true and a passable rule of thumb, but it
-can be demonstrated that even an average user can tell the difference
-between high frequency in-phase and out-of-phase noise.  Obviously
-then, the statement is not entirely true.  However, it's also the case
-that one must resort to nearly such an extreme demonstration before
-finding the counterexample.<p>
-
-'Phase stereo' is simply a more aggressive quantization of the polar
-angle vector; above 4kHz it's generally quite safe to quantize noise
-and noisy elements to only a handful of allowed phases, or to thin the
-phase with respect to the magnitude.  The phases of high amplitude
-pure tones may or may not be preserved more carefully (they are
-relatively rare and L/R tend to be in phase, so there is generally
-little reason not to spend a few more bits on them) <p>
-
-<h4>example: eight phase stereo</h4>
-
-Vorbis may implement phase stereo coupling by preserving the entirety
-of the magnitude vector (essential to fine amplitude and energy
-resolution overall) and quantizing the angle vector to one of only
-four possible values. Given that the magnitude vector may be positive
-or negative, this results in left and right phase having eight
-possible permutation, thus 'eight phase stereo':<p>
-
-<img src="eightphase.png"><p>
-
-Left and right may be in phase (positive or negative), the most common
-case by far, or out of phase by 90 or 180 degrees.<p>
-
-<h4>example: four phase stereo</h4>
-
-Similarly, four phase stereo takes the quantization one step further;
-it allows only in-phase and 180 degree out-out-phase signals:<p>
-
-<img src="fourphase.png"><p>
-
-<h3>example: point stereo</h3>
-
-Point stereo eliminates the possibility of out-of-phase signal
-entirely.  Any diffuse quality to a sound source tends to collapse
-inward to a point somewhere within the stereo image.  A practical
-example would be balanced reverberations within a large, live space;
-normally the sound is diffuse and soft, giving a sonic impression of
-volume.  In point-stereo, the reverberations would still exist, but
-sound fairly firmly centered within the image (assuming the
-reverberation was centered overall; if the reverberation is stronger
-to the left, then the point of localization in point stereo would be
-to the left).  This effect is most noticeable at low and mid
-frequencies and using headphones (which grant perfect stereo
-separation). Point stereo is is a graceful but generally easy to
-detect degradation to the sound quality and is thus used in frequency
-ranges where it is least noticeable.<p>
-
-<h3>Mixed Stereo</h3>
-
-Mixed stereo is the simultaneous use of more than one of the above
-stereo encoding models, generally using more aggressive modes in
-higher frequencies, lower amplitudes or 'nearly' in-phase sound.<p>
-
-It is also the case that near-DC frequencies should be encoded using
-lossless coupling to avoid frame blocking artifacts.<p>
-
-<h3>Vorbis Stereo Modes</h3>
-
-Vorbis, as of 1.0, uses lossless stereo and a number of mixed modes
-constructed out of lossless and point stereo.  Phase stereo was used
-in the rc2 encoder, but is not currently used for simplicity's sake.  It
-will likely be re-added to the stereo model in the future.
-
-<p>
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-</body>
-
-
-
-
-
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a, h4, h4 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis stereo-specific channel coupling discussion</h1>
+
+<h2>Abstract</h2>
+
+<p>The Vorbis audio CODEC provides a channel coupling
+mechanisms designed to reduce effective bitrate by both eliminating
+interchannel redundancy and eliminating stereo image information
+labeled inaudible or undesirable according to spatial psychoacoustic
+models. This document describes both the mechanical coupling
+mechanisms available within the Vorbis specification, as well as the
+specific stereo coupling models used by the reference
+<tt>libvorbis</tt> codec provided by xiph.org.</p>
+
+<h2>Mechanisms</h2>
+
+<p>In encoder release beta 4 and earlier, Vorbis supported multiple
+channel encoding, but the channels were encoded entirely separately
+with no cross-analysis or redundancy elimination between channels.
+This multichannel strategy is very similar to the mp3's <em>dual
+stereo</em> mode and Vorbis uses the same name for its analogous
+uncoupled multichannel modes.</p>
+
+<p>However, the Vorbis spec provides for, and Vorbis release 1.0 rc1 and
+later implement a coupled channel strategy. Vorbis has two specific
+mechanisms that may be used alone or in conjunction to implement
+channel coupling. The first is <em>channel interleaving</em> via
+residue backend type 2, and the second is <em>square polar
+mapping</em>. These two general mechanisms are particularly well
+suited to coupling due to the structure of Vorbis encoding, as we'll
+explore below, and using both we can implement both totally
+<em>lossless stereo image coupling</em> [bit-for-bit decode-identical
+to uncoupled modes], as well as various lossy models that seek to
+eliminate inaudible or unimportant aspects of the stereo image in
+order to enhance bitrate. The exact coupling implementation is
+generalized to allow the encoder a great deal of flexibility in
+implementation of a stereo or surround model without requiring any
+significant complexity increase over the combinatorially simpler
+mid/side joint stereo of mp3 and other current audio codecs.</p>
+
+<p>A particular Vorbis bitstream may apply channel coupling directly to
+more than a pair of channels; polar mapping is hierarchical such that
+polar coupling may be extrapolated to an arbitrary number of channels
+and is not restricted to only stereo, quadraphonics, ambisonics or 5.1
+surround. However, the scope of this document restricts itself to the
+stereo coupling case.</p>
+
+<h3>Square Polar Mapping</h3>
+
+<h4>maximal correlation</h4>
+ 
+<p>Recall that the basic structure of a a Vorbis I stream first generates
+from input audio a spectral 'floor' function that serves as an
+MDCT-domain whitening filter. This floor is meant to represent the
+rough envelope of the frequency spectrum, using whatever metric the
+encoder cares to define. This floor is subtracted from the log
+frequency spectrum, effectively normalizing the spectrum by frequency.
+Each input channel is associated with a unique floor function.</p>
+
+<p>The basic idea behind any stereo coupling is that the left and right
+channels usually correlate. This correlation is even stronger if one
+first accounts for energy differences in any given frequency band
+across left and right; think for example of individual instruments
+mixed into different portions of the stereo image, or a stereo
+recording with a dominant feature not perfectly in the center. The
+floor functions, each specific to a channel, provide the perfect means
+of normalizing left and right energies across the spectrum to maximize
+correlation before coupling. This feature of the Vorbis format is not
+a convenient accident.</p>
+
+<p>Because we strive to maximally correlate the left and right channels
+and generally succeed in doing so, left and right residue is typically
+nearly identical. We could use channel interleaving (discussed below)
+alone to efficiently remove the redundancy between the left and right
+channels as a side effect of entropy encoding, but a polar
+representation gives benefits when left/right correlation is
+strong.</p>
+
+<h4>point and diffuse imaging</h4>
+
+<p>The first advantage of a polar representation is that it effectively
+separates the spatial audio information into a 'point image'
+(magnitude) at a given frequency and located somewhere in the sound
+field, and a 'diffuse image' (angle) that fills a large amount of
+space simultaneously. Even if we preserve only the magnitude (point)
+data, a detailed and carefully chosen floor function in each channel
+provides us with a free, fine-grained, frequency relative intensity
+stereo*. Angle information represents diffuse sound fields, such as
+reverberation that fills the entire space simultaneously.</p>
+
+<p>*<em>Because the Vorbis model supports a number of different possible
+stereo models and these models may be mixed, we do not use the term
+'intensity stereo' talking about Vorbis; instead we use the terms
+'point stereo', 'phase stereo' and subcategories of each.</em></p>
+
+<p>The majority of a stereo image is representable by polar magnitude
+alone, as strong sounds tend to be produced at near-point sources;
+even non-diffuse, fast, sharp echoes track very accurately using
+magnitude representation almost alone (for those experimenting with
+Vorbis tuning, this strategy works much better with the precise,
+piecewise control of floor 1; the continuous approximation of floor 0
+results in unstable imaging). Reverberation and diffuse sounds tend
+to contain less energy and be psychoacoustically dominated by the
+point sources embedded in them. Thus, we again tend to concentrate
+more represented energy into a predictably smaller number of numbers.
+Separating representation of point and diffuse imaging also allows us
+to model and manipulate point and diffuse qualities separately.</p>
+
+<h4>controlling bit leakage and symbol crosstalk</h4>
+
+<p>Because polar
+representation concentrates represented energy into fewer large
+values, we reduce bit 'leakage' during cascading (multistage VQ
+encoding) as a secondary benefit. A single large, monolithic VQ
+codebook is more efficient than a cascaded book due to entropy
+'crosstalk' among symbols between different stages of a multistage cascade.
+Polar representation is a way of further concentrating entropy into
+predictable locations so that codebook design can take steps to
+improve multistage codebook efficiency. It also allows us to cascade
+various elements of the stereo image independently.</p>
+
+<h4>eliminating trigonometry and rounding</h4>
+
+<p>Rounding and computational complexity are potential problems with a
+polar representation. As our encoding process involves quantization,
+mixing a polar representation and quantization makes it potentially
+impossible, depending on implementation, to construct a coupled stereo
+mechanism that results in bit-identical decompressed output compared
+to an uncoupled encoding should the encoder desire it.</p>
+
+<p>Vorbis uses a mapping that preserves the most useful qualities of
+polar representation, relies only on addition/subtraction (during
+decode; high quality encoding still requires some trig), and makes it
+trivial before or after quantization to represent an angle/magnitude
+through a one-to-one mapping from possible left/right value
+permutations. We do this by basing our polar representation on the
+unit square rather than the unit-circle.</p>
+
+<p>Given a magnitude and angle, we recover left and right using the
+following function (note that A/B may be left/right or right/left
+depending on the coupling definition used by the encoder):</p>
+
+<pre>
+      if(magnitude>0)
+        if(angle>0){
+          A=magnitude;
+          B=magnitude-angle;
+        }else{
+          B=magnitude;
+          A=magnitude+angle;
+        }
+      else
+        if(angle>0){
+          A=magnitude;
+          B=magnitude+angle;
+        }else{
+          B=magnitude;
+          A=magnitude-angle;
+        }
+    }
+</pre>
+
+<p>The function is antisymmetric for positive and negative magnitudes in
+order to eliminate a redundant value when quantizing. For example, if
+we're quantizing to integer values, we can visualize a magnitude of 5
+and an angle of -2 as follows:</p>
+
+<p><img src="squarepolar.png" alt="square polar"/></p>
+
+<p>This representation loses or replicates no values; if the range of A
+and B are integral -5 through 5, the number of possible Cartesian
+permutations is 121. Represented in square polar notation, the
+possible values are:</p>
+
+<pre>
+ 0, 0
+
+-1,-2  -1,-1  -1, 0  -1, 1
+
+ 1,-2   1,-1   1, 0   1, 1
+
+-2,-4  -2,-3  -2,-2  -2,-1  -2, 0  -2, 1  -2, 2  -2, 3  
+
+ 2,-4   2,-3   ... following the pattern ...
+
+ ...   5, 1   5, 2   5, 3   5, 4   5, 5   5, 6   5, 7   5, 8   5, 9
+
+</pre>
+
+<p>...for a grand total of 121 possible values, the same number as in
+Cartesian representation (note that, for example, <tt>5,-10</tt> is
+the same as <tt>-5,10</tt>, so there's no reason to represent
+both. 2,10 cannot happen, and there's no reason to account for it.)
+It's also obvious that this mapping is exactly reversible.</p>
+
+<h3>Channel interleaving</h3>
+
+<p>We can remap and A/B vector using polar mapping into a magnitude/angle
+vector, and it's clear that, in general, this concentrates energy in
+the magnitude vector and reduces the amount of information to encode
+in the angle vector. Encoding these vectors independently with
+residue backend #0 or residue backend #1 will result in bitrate
+savings. However, there are still implicit correlations between the
+magnitude and angle vectors. The most obvious is that the amplitude
+of the angle is bounded by its corresponding magnitude value.</p>
+
+<p>Entropy coding the results, then, further benefits from the entropy
+model being able to compress magnitude and angle simultaneously. For
+this reason, Vorbis implements residue backend #2 which pre-interleaves
+a number of input vectors (in the stereo case, two, A and B) into a
+single output vector (with the elements in the order of
+A_0, B_0, A_1, B_1, A_2 ... A_n-1, B_n-1) before entropy encoding. Thus
+each vector to be coded by the vector quantization backend consists of
+matching magnitude and angle values.</p>
+
+<p>The astute reader, at this point, will notice that in the theoretical
+case in which we can use monolithic codebooks of arbitrarily large
+size, we can directly interleave and encode left and right without
+polar mapping; in fact, the polar mapping does not appear to lend any
+benefit whatsoever to the efficiency of the entropy coding. In fact,
+it is perfectly possible and reasonable to build a Vorbis encoder that
+dispenses with polar mapping entirely and merely interleaves the
+channel. Libvorbis based encoders may configure such an encoding and
+it will work as intended.</p>
+
+<p>However, when we leave the ideal/theoretical domain, we notice that
+polar mapping does give additional practical benefits, as discussed in
+the above section on polar mapping and summarized again here:</p>
+
+<ul>
+<li>Polar mapping aids in controlling entropy 'leakage' between stages
+of a cascaded codebook.</li>
+<li>Polar mapping separates the stereo image
+into point and diffuse components which may be analyzed and handled
+differently.</li>
+</ul>
+
+<h2>Stereo Models</h2>
+
+<h3>Dual Stereo</h3>
+
+<p>Dual stereo refers to stereo encoding where the channels are entirely
+separate; they are analyzed and encoded as entirely distinct entities.
+This terminology is familiar from mp3.</p>
+
+<h3>Lossless Stereo</h3>
+
+<p>Using polar mapping and/or channel interleaving, it's possible to
+couple Vorbis channels losslessly, that is, construct a stereo
+coupling encoding that both saves space but also decodes
+bit-identically to dual stereo. OggEnc 1.0 and later uses this
+mode in all high-bitrate encoding.</p>
+
+<p>Overall, this stereo mode is overkill; however, it offers a safe
+alternative to users concerned about the slightest possible
+degradation to the stereo image or archival quality audio.</p>
+
+<h3>Phase Stereo</h3>
+
+<p>Phase stereo is the least aggressive means of gracefully dropping
+resolution from the stereo image; it affects only diffuse imaging.</p>
+
+<p>It's often quoted that the human ear is deaf to signal phase above
+about 4kHz; this is nearly true and a passable rule of thumb, but it
+can be demonstrated that even an average user can tell the difference
+between high frequency in-phase and out-of-phase noise. Obviously
+then, the statement is not entirely true. However, it's also the case
+that one must resort to nearly such an extreme demonstration before
+finding the counterexample.</p>
+
+<p>'Phase stereo' is simply a more aggressive quantization of the polar
+angle vector; above 4kHz it's generally quite safe to quantize noise
+and noisy elements to only a handful of allowed phases, or to thin the
+phase with respect to the magnitude. The phases of high amplitude
+pure tones may or may not be preserved more carefully (they are
+relatively rare and L/R tend to be in phase, so there is generally
+little reason not to spend a few more bits on them)</p>
+
+<h4>example: eight phase stereo</h4>
+
+<p>Vorbis may implement phase stereo coupling by preserving the entirety
+of the magnitude vector (essential to fine amplitude and energy
+resolution overall) and quantizing the angle vector to one of only
+four possible values. Given that the magnitude vector may be positive
+or negative, this results in left and right phase having eight
+possible permutation, thus 'eight phase stereo':</p>
+
+<p><img src="eightphase.png" alt="eight phase"/></p>
+
+<p>Left and right may be in phase (positive or negative), the most common
+case by far, or out of phase by 90 or 180 degrees.</p>
+
+<h4>example: four phase stereo</h4>
+
+<p>Similarly, four phase stereo takes the quantization one step further;
+it allows only in-phase and 180 degree out-out-phase signals:</p>
+
+<p><img src="fourphase.png" alt="four phase"/></p>
+
+<h3>example: point stereo</h3>
+
+<p>Point stereo eliminates the possibility of out-of-phase signal
+entirely. Any diffuse quality to a sound source tends to collapse
+inward to a point somewhere within the stereo image. A practical
+example would be balanced reverberations within a large, live space;
+normally the sound is diffuse and soft, giving a sonic impression of
+volume. In point-stereo, the reverberations would still exist, but
+sound fairly firmly centered within the image (assuming the
+reverberation was centered overall; if the reverberation is stronger
+to the left, then the point of localization in point stereo would be
+to the left). This effect is most noticeable at low and mid
+frequencies and using headphones (which grant perfect stereo
+separation). Point stereo is is a graceful but generally easy to
+detect degradation to the sound quality and is thus used in frequency
+ranges where it is least noticeable.</p>
+
+<h3>Mixed Stereo</h3>
+
+<p>Mixed stereo is the simultaneous use of more than one of the above
+stereo encoding models, generally using more aggressive modes in
+higher frequencies, lower amplitudes or 'nearly' in-phase sound.</p>
+
+<p>It is also the case that near-DC frequencies should be encoded using
+lossless coupling to avoid frame blocking artifacts.</p>
+
+<h3>Vorbis Stereo Modes</h3>
+
+<p>Vorbis, as of 1.0, uses lossless stereo and a number of mixed modes
+constructed out of lossless and point stereo. Phase stereo was used
+in the rc2 encoder, but is not currently used for simplicity's sake. It
+will likely be re-added to the stereo model in the future.</p>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>
+
+
+
+
+
+

Modified: branches/vorbis-aotuv/doc/stream.png
===================================================================
--- branches/vorbis-aotuv/doc/stream.png	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/stream.png	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,16 +1,15 @@
 ‰PNG
 
-   
IHDR  P   %   ºL',   gAMA  ±üa  >PLTEÿÿÿ‘9QS    ÿ``cùÿª@@U  ãUUB¦ª!SUXÝãÇJJMÂÇŽ55r**97ŠŽ,or79
+   
IHDR  P   %   ºL',  >PLTEÿÿÿ‘9QS    ÿ``cùÿª@@U  ãUUB¦ª!SUXÝãÇJJMÂÇŽ55r**97ŠŽ,or79
 
-xÿcPªB(U!jãX]ÇMBŽ75r,9
MOBD999   ===àààeeeÐÐÐUUUxxxÀÀÀ111———ƒƒƒGGG666ccc‘‘‘iiiðððQQQpppœœœ´´´€€€ªªª555jjj\\\yyyPPPaaaùÿe¦ªCSU!ÝãYÂÇNŠŽ8or-79euÿCNª!'UYhãN[ÇN[Æ8AŽ7A-4r8BN©!&T7

9BN¨duÿYhâ@Q¢,3q!&S at O¤7AŒ3B‚TTTbbb=?```···888©©©úBÜ   8tEXtSoftware XV Version 3.10a  Rev: 12/29/94 (PNG patch 1.2)Ý.I  IDATxÚí›sÚF€i$tB  †Ö$2Žœ¤Žã´ŽÓÔ<lcÀ'ÐÄMú~¤íÿÿ½“@H°0mí)s˱Œ@s½ïnwˆD„"Dˆ!B„"DÈFÉ'÷„Üžx6ÿô³M×oS îÛÏæ;0¨(_ ÆÈóÖªvÑÛÿJ%ÿJ×»;ÜÔvÕµùýüŽ.klÚê2Û×ù¾,ø|®Ú£ßPw”½c3›×v7(;°A	 n¨üC¨È¶½Q@½ª
- î(gÏ3ú£Ç›ÔdT¨Ûª¶ëxF¯=±7¨G u'@ÙŸ?Ýy¸A at U#¨» ÊÞñC=gƒ\Þ¶ %Mº.ËQ)ÎôäÊ5•29!1EezråÙÌœŒÌ²òféÉ• Ê—ýÇc“ÛÛOCU.Pqi	P“Tc2ýÍf½Ñbzrå՝PÓëuº—LO®Vêè$‚ åw:‘ˆ‚Ät(Èš…é0PþŠÅ<˜L f›<8x66ùa5ÜQ¸@I°(x@µã™?=­Cƒé0P—Ý1&ý«t;ýþš@A*!G“É”œ :	z"™ŒÆe9饑X:!Õi0´t:¦’žU´ò¥Ò–U¤ºåb©”/XVI hòñþÄâÏf:j aödÖÍhÌÎ*-ÓÆtÙl°¹I%Ø,Åi	U‹Ù›Y«Èæ¡@‹Ôi³~vvÞ<¥úÚ§ggõV³y6ªßë®_÷úT_Ûþ`йìõ«åì9¸Ë“AÏf)B(
-RV—!pyŒ\Ž"Ä€¢ åZÐåYP®T(B(
-R¥lAQ å7YÝñ#/¾œJͨÔÆ
-9™Pñ¬®CœÎ$ƒYR3@*å2è˜XP±`+èòšÐ¾¸ 1 (Hí&œú@
¡3‚oÞ¾ëŒF¨+
-Ò»›ôWªîœ~|†¥»Zf.ύ¤$‚@®&Ì幑”J¨²«-æòÜHÊS å7	ÓÈÕً͹<jLÚÓpï]Š
Ý
B¼vyÔØEjï²fx%TÛÕMæòÜHª`Õ»é|K±u`øžêî‡!tWŠæyûÇ”J=	e€1”ªeT É£íþ*~zŒ E ³ç d ™ÍÆB , ‹Ùªª
í zï@ÝÀ®TÝ~ùÇ2 $ˆG9@) Æx@™PÈ ‚MÖ^~u0E€Ré¦Ï*N]¨u
-«Õ€V}¨á¨!\¾‡áhu œW;S‡ŽÅb(º&²€b1]Q¹E@±Š®˜Š *ÜdíL¢ž‡¢1TÎðbR(Ceu/¢Å¢1T¥ìŬ| XÕ€æÅ" Þ\1 Fo)P£úøjïOÏòÆZ’Y–GS>)N_§YÞX+„ey4åSTúÈòÆÚ´X–GS>³@_PÁ£Í¯ÇFvì;šñ³¼{zeÚXÊÏò¢ìé•àÁæ–ŸååÙÓ+¡,o¬M–åÑ”¯Ñ¢¯Ó,oйu®¯;ÃÑÕßÿÐÿñÃO?¯ÔÑñ~5²úIy<+sOÊÕáž”*6_I4ÁXPÀÀ¦Q«DœŠ•¨’…%A6ŽÖ
(PIXГÙ&ŸOœÞƒûwRÞºhrOÊ/ßõ0 ½)PµGpäD"k •’ôoÐÅÐxƒÚ2ËÅùú“:
-TÚ@"*QËÊqYÂ*qïžï©U*£@%ñº3
->Ç:
-TNÕÔp“Îñ8.wvkK€Jg2J†TÒ=‹Zlû’{Åê¼Ñ>åõº{ÓŸÿ|p ê—_íùß”s’%Lq€"
-¦8 at Y&¦æ«•ðJ!¸‰sjÙl"ºh+šWÁw(jÁžCr9lŽ“z7äfv(ÿghµ]gÙìHÆ †ÂJ–S2(šñmñj6h4Ū×íu‘Ï» œ“Cû”/U=…V¢¶ÍÐÖ *¡c°jöJ°»Á½ùn؆Zl)P
-{ð€’$>P¦;´ÿ¨z½ºýt=——Òã\——1T®ËÛ*þ)P¢¨ˆeS²„Å9$m`.OsÏ9VJNê^7¶W&Ü#–ùuàÞ=ÿÝ0+v@-Ý¡ÎÏÛ-®Ë{}s¹¨zýøem %AyxÎå–‰n I|sI£ÞŠå?ˆ£ay =ÊàóDP—W,a@Ået÷SIkäèžø-Œ¿¶¡[TZc^•pÈjIÕj6øAy¯‹åýÁ̱Á‹'Ùa „Üæ6yl⏞·þOº€7ztB„"Dˆ!B„¹cù¿{ÀMËY–&   tIMEÐ''²   tEXtComment Made with GIMP~e•    IEND®B`‚
\ No newline at end of file
+xÿcPªB(U!jãX]ÇMBŽ75r,9
MOBD999   ===àààeeeÐÐÐUUUxxxÀÀÀ111———ƒƒƒGGG666ccc‘‘‘iiiðððQQQpppœœœ´´´€€€ªªª555jjj\\\yyyPPPaaaùÿe¦ªCSU!ÝãYÂÇNŠŽ8or-79euÿCNª!'UYhãN[ÇN[Æ8AŽ7A-4r8BN©!&T7

9BN¨duÿYhâ@Q¢,3q!&S at O¤7AŒ3B‚TTTbbb=?```···888©©©úBÜ   bKGD ˆH   	pHYs     šœ   tIMEÔ/á‚Ï#  IDATxÚ훋vÚF†i$´B  †Ö$2Žœ¤Žã´ŽS× lcÀ'ÐÄMz¿¤íû¿@w%’YVà„ÓSkÇb8\´–f>íü³@,ƍ7nܸqãƍ7nÜî”}vÛÌ
îç_Dätÿ˜u¸­ÁÜàFí|] âlƒÛ È6XiØEO’AÖy€Á17ëNpï?`ïz~a¹	‹}“mÐeÛ‚×ç†=ø“µ^ Ì-“·±	 LߣZPŇP±M3
+@Õ9PkÊÚq£ûèq€òN–µ6 Û–ÝÆóîulq Ö”ùåƒIt­‡w¨ú~ŒµV Ì­©¦Ø±î~ÉÛ4)@	Þ¡‹b\Hï=r+yA(!ÉÄ{ÜPêÞ™FQ/ï=Š"P»'±57Ÿö’¥Û •B€*é, Z^úm»Ùjï=rêyÔôûÝÞñÞ£å€:8ŽQ€št*ø PÓH(J$âƒ@MO©\.‚N|„ÚÛ{6‰í~=¸—·J€ t`ÕnM2rÒ„ñA .zL—]èuƒ‚
¨”O§3b
+û4¨©t:žÅô(%²ÙR°Ï‚¦d³	¡ì¨²Q¬T6Œ2ö¨–+•bÉ0*Ñêñ®Úç{7öÒ ‘À‘0æPo¡@© ’lÜdR$KI¼ùª‚AâM¢¿Q&y(ám
+Ô‰Ý<==³O°?…ÎÉéi³mÛ§3 ýîðêU€ý¼‡Ý‹~¸<PÖŽE/y"¨ù<Fˆ …AÊ«"¤|%V(`„P¤‚†@ñ—<ªµFˆ …AªU
(G¨úÖTR|õõ<PrAÓ@ÆÁ” ( È-T2¯ªÄD!/BæP¥Zµ
+%œÝ jløKž
ósŒ
+ƒtÞ±ád
+ÔºcøîÍÛîxŒºÄ ½½îÃ`i šÖñþ‡g4 TÇ‹¤ä9JJ Á”æxDJž£¤$@Uo’ç()ô(3‰jí$æJŽš‚§9zÁÝ–(y8)œ
Õ!î,y8Øeïª#3ÜÍTÇñ6)yŽ’jA˯¡ú×Ýï1Vã.ŒÞaß{?‚Þò@á>o÷Т %€RA
…@i Ý Ê U…j4:Ø|1½\ŸR€B ˆn5 D ‘dc!P€AâMÊ ՁÎ
 úÝ|@]Ãk­TÓ|ùWP$ã $, t(£	T±ñò›½9åJƳûê@%qÉ`UÂEa9 ZÐnÎ5š5‚‹w0/”u´5«ó4 ˆ†Â×D~PDCá­°(¢¡ðS‹(P©#ð¢öžÂª ¹âs °†Ê«®¢¥…5T­êjV6PDCµÀ>_ÔëKÔø
j¼$PŽvþ6é]ÞÄ"éòpË'$ñý¬Ë›x	‘.·|’Œï}]ÞÄëéòp˧—ð}4?z1¿D÷Ù¡åß+7íòäæn¡›™i—'7wó/lnL»¼"¹¹[ Ë›ø–Mº<ÜòµÚø~Öå
»—ãîÕUw4¾ÄþÇŸ?¿ÿå×¥€:8Ü­Ç–_)OæEæJ¹\@Ì•òRÍ å+-Ró•E´|I Ñ.€JD‚‚LKz¨@UPä“Ô±~€…›c?÷ŠÞƒû·_)ÇQZçJyûÜf®”_¼íÓ€ög at 5Á‹­ TFPS¬Xä$MaÔ†^-ϏŸV©@e5*PHF%àbRhƒ8ïž?R
+T¥J*M;'QÑ(ÈŠÛ:œèrk»T6—“r Ò“U&¥Å¹qßµ8ög)ŠÔY«sÂêUïz0ÿúðÚÔo¿›óß)g%
+XL1€BVS «©ùaú%!zä
+õ
+Χ⋦¢ùg%ú¥SŠ§v€¨P 
…3Ôôûfm+ìv(§!-pÁˆbFô¢´87î»Çw|l ìVS ú½~òzÏ”u¼oþÒrÔ’ f¨ƒ(šB›æ(+ •Ri°*ôÙœ§)Ÿ
›ÐH„%‘¿ P‚@T·” °ÒS[/PÍf}óéj%/£&™%/§ÉÌ’·Q-},P9$É 2¢@Ó9(«Ñ’®8ëË%¦U>6
VÍyzþ³aVâ¶@¥„ÔG:CuÚÌ’÷êú"¨fóðecQNÕ>Q¼6çE¹¡S'€4}rÉR«i‹(:‡ô=@9¢=}ˆZòÊPI‘:ûɈz€î¿œy<ùlØ„z"¨¬Bþ*•J{Qbh(ç]L B4TÛn±Ey¿GåƒáeƒOþ1ƒ@q[Ë/Š"xÊü‡žëû‰'¾R£xÒܸqãƍ7nܸqûí_4¾ÀÛÉœ”    IEND®B`‚
\ No newline at end of file

Modified: branches/vorbis-aotuv/doc/v-comment.html
===================================================================
--- branches/vorbis-aotuv/doc/v-comment.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/v-comment.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,231 +1,285 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-
-<h1><font color=#000070>
-Ogg Vorbis I format specification: comment field and header specification
-</font></h1>
-
-<em>Last update to this document: July 16, 2002</em><p>
-
-<h1>Overview</h1>
-
-<p>The Vorbis text comment header is the second (of three) header
-packets that begin a Vorbis bitstream. It is meant for short, text
-comments, not arbitrary metadata; arbitrary metadata belongs in a
-separate logical bitstream (usually an XML stream type) that provides
-greater structure and machine parseability.
-
-<p>The comment field is meant to be used much like someone jotting a
-quick note on the bottom of a CDR. It should be a little information to
-remember the disc by and explain it to others; a short, to-the-point
-text note that need not only be a couple words, but isn't going to be
-more than a short paragraph.  The essentials, in other words, whatever
-they turn out to be, eg:
-
-<blockquote>
-"Honest Bob and the Factory-to-Dealer-Incentives, _I'm Still Around_,
-opening for Moxy Fruvous, 1997"
-</blockquote>
-
-<h1>Comment encoding</h1>
-
-
-<h2>Structure</h2>
-
-The comment header logically is a list of eight-bit-clean vectors; the
-number of vectors is bounded to 2^32-1 and the length of each vector
-is limited to 2^32-1 bytes. The vector length is encoded; the vector
-contents themselves are not null terminated. In addition to the vector
-list, there is a single vector for vendor name (also 8 bit clean,
-length encoded in 32 bits). Libvorbis currently sets the vendor string
-to "Xiph.Org libVorbis I 20020717".<p>
-
-The comment header is decoded as follows:<p>
-
-<pre>
-  1) [vendor_length] = read an unsigned integer of 32 bits
-  2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
-  3) [user_comment_list_length] = read an unsigned integer of 32 bits
-  4) iterate [user_comment_list_length] times {
-
-       5) [length] = read an unsigned integer of 32 bits
-       6) this iteration's user comment = read a UTF-8 vector as [length] octets
-
-     }
-
-  7) [framing_bit] = read a single bit as boolean
-  8) if ( [framing_bit]  unset or end of packet ) then ERROR
-  9) done.
-</pre>
-
-
-<h2>Content vector format</h2>
-
-The comment vectors are structured similarly to a UNIX environment variable.
-That is, comment fields consist of a field name and a field value and
-look like:
-
-<pre>
-comment[0]="ARTIST=me"; 
-comment[1]="TITLE=the sound of Vorbis"; 
-</pre>
-
-<ul>
-<li>A case-insensitive field name that may consist of ASCII 0x20 through
-0x7D, 0x3D ('=') excluded. ASCII 0x41 through 0x5A inclusive (A-Z) is
-to be considered equivalent to ASCII 0x61 through 0x7A inclusive
-(a-z).
-
-<li>The field name is immediately followed by ASCII 0x3D ('='); this
-equals sign is used to terminate the field name.
-
-<li>0x3D is followed by 8 bit clean UTF-8 encoded field contents
-to the end of the field.
-</ul>
-
-<h3>Field names</h3>
-
-Below is a proposed, minimal list of standard field names with a
-description of intended use.  No single or group of field names is
-mandatory; a comment header may contain one, all or none of the names
-in this list.<p>
-
-<dl>
-<dt>TITLE<dd>Track/Work name
-
-<dt>VERSION<dd>The version field may be used to differentiate multiple
-versions of the same track title in a single collection. (e.g. remix info)
-
-<dt>ALBUM<dd>The collection name to which this track belongs
-
-<dt>TRACKNUMBER<dd>The track number of this piece if part of a specific larger collection or album
-
-<dt>ARTIST<dd>The artist generally considered responsible for the work. In popular music this is usually the performing band or singer. For classical music it would be the composer. For an audio book it would be the author of the original text.
-
-<dt>PERFORMER<dd>The artist(s) who performed the work. In classical music this would be the conductor, orchestra, soloists. In an audio book it would be the actor who did the reading. In popular music this is typically the same as the ARTIST and is omitted.
-
-<dt>COPYRIGHT<dd>Copyright attribution, e.g., '2001 Nobody's Band' or '1999 Jack Moffitt'
-
-<dt>LICENSE<dd>License information, eg, 'All Rights Reserved', 'Any
-Use Permitted', a URL to a license such as a Creative Commons license
-("www.creativecommons.org/blahblah/license.html") or the EFF Open
-Audio License ('distributed under the terms of the Open Audio
-License. see http://www.eff.org/IP/Open_licenses/eff_oal.html for
-details'), etc.
-
-<dt>ORGANIZATION<dd>Name of the organization producing the track (i.e.
-the 'record label')
-
-<dt>DESCRIPTION<dd>A short text description of the contents
-
-<dt>GENRE<dd>A short text indication of music genre
-
-<dt>DATE<dd>Date the track was recorded
-
-<dt>LOCATION<dd>Location where track was recorded
-
-<dt>CONTACT<dd>Contact information for the creators or distributors of the track. This could be a URL, an email address, the physical address of the producing label.
-
-<dt>ISRC<dd>ISRC number for the track; see <a href="http://www.ifpi.org/site-content/online/isrc_intro.html">the ISRC intro page</a> for more information on ISRC numbers.
-
-</dl>
-
-<h3>Implications</h3>
-<ul>
-<li>
-Field names should not be 'internationalized'; this is a
-concession to simplicity not an attempt to exclude the majority of
-the world that doesn't speak English. Field *contents*, however,
-are represented in UTF-8 to allow easy representation of any language.
-<li>
-We have the length of the entirety of the field and restrictions on
-the field name so that the field name is bounded in a known way. Thus
-we also have the length of the field contents.
-<li>
-Individual 'vendors' may use non-standard field names within
-reason. The proper use of comment fields should be clear through
-context at this point.  Abuse will be discouraged.
-<li>
-There is no vendor-specific prefix to 'nonstandard' field names.
-Vendors should make some effort to avoid arbitrarily polluting the
-common namespace. We will generally collect the more useful tags
-here to help with standardization.
-<li>
-Field names are not required to be unique (occur once) within a
-comment header.  As an example, assume a track was recorded by three
-well know artists; the following is permissible, and encouraged:
-<pre>
-              ARTIST=Dizzy Gillespie 
-              ARTIST=Sonny Rollins 
-              ARTIST=Sonny Stitt 
-</pre>
-
-</ul>
-
-<h2>Encoding</h2> 
-
-The comment header comprises the entirety of the second bitstream
-header packet.  Unlike the first bitstream header packet, it is not
-generally the only packet on the second page and may not be restricted
-to within the second bitstream page.  The length of the comment header
-packet is [practically] unbounded.  The comment header packet is not
-optional; it must be present in the bitstream even if it is
-effectively empty.<p>
-
-The comment header is encoded as follows (as per Ogg's standard
-bitstream mapping which renders least-significant-bit of the word to be
-coded into the least significant available bit of the current
-bitstream octet first):
-
-<ol>
-<li>
-Vendor string length (32 bit unsigned quantity specifying number of octets)
-
-<li>
-Vendor string ([vendor string length] octets coded from beginning of string to end of string, not null terminated)
-
-<li>Number of comment fields (32 bit unsigned quantity specifying number of fields)
-
-<li>Comment field 0 length (if [Number of comment fields]>0; 32 bit unsigned quantity specifying number of octets)
-
-<li>
-Comment field 0 ([Comment field 0 length] octets coded from beginning of string to end of string, not null terminated)
- 
-<li>Comment field 1 length (if [Number of comment fields]>1...)...
-</ol>
-
-This is actually somewhat easier to describe in code; implementation of the above can be found in vorbis/lib/info.c:_vorbis_pack_comment(),_vorbis_unpack_comment()
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis I format specification: comment field and header specification</h1>
+
+<h1>Overview</h1>
+
+<p>The Vorbis text comment header is the second (of three) header
+packets that begin a Vorbis bitstream. It is meant for short, text
+comments, not arbitrary metadata; arbitrary metadata belongs in a
+separate logical bitstream (usually an XML stream type) that provides
+greater structure and machine parseability.</p>
+
+<p>The comment field is meant to be used much like someone jotting a
+quick note on the bottom of a CDR. It should be a little information to
+remember the disc by and explain it to others; a short, to-the-point
+text note that need not only be a couple words, but isn't going to be
+more than a short paragraph. The essentials, in other words, whatever
+they turn out to be, eg:</p>
+
+<blockquote><p>
+"Honest Bob and the Factory-to-Dealer-Incentives, _I'm Still Around_,
+opening for Moxy Fr&uuml;vous, 1997"
+</p></blockquote>
+
+<h1>Comment encoding</h1>
+
+<h2>Structure</h2>
+
+<p>The comment header logically is a list of eight-bit-clean vectors; the
+number of vectors is bounded to 2^32-1 and the length of each vector
+is limited to 2^32-1 bytes. The vector length is encoded; the vector
+contents themselves are not null terminated. In addition to the vector
+list, there is a single vector for vendor name (also 8 bit clean,
+length encoded in 32 bits). For example, the 1.0 release of libvorbis 
+set the vendor string to "Xiph.Org libVorbis I 20020717".</p>
+
+<p>The comment header is decoded as follows:</p>
+
+<pre>
+  1) [vendor_length] = read an unsigned integer of 32 bits
+  2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
+  3) [user_comment_list_length] = read an unsigned integer of 32 bits
+  4) iterate [user_comment_list_length] times {
+
+       5) [length] = read an unsigned integer of 32 bits
+       6) this iteration's user comment = read a UTF-8 vector as [length] octets
+
+     }
+
+  7) [framing_bit] = read a single bit as boolean
+  8) if ( [framing_bit] unset or end of packet ) then ERROR
+  9) done.
+</pre>
+
+<h2>Content vector format</h2>
+
+<p>The comment vectors are structured similarly to a UNIX environment variable.
+That is, comment fields consist of a field name and a corresponding value and
+look like:</p>
+
+<pre>
+comment[0]="ARTIST=me"; 
+comment[1]="TITLE=the sound of Vorbis"; 
+</pre>
+
+<ul>
+<li>A case-insensitive field name that may consist of ASCII 0x20 through
+0x7D, 0x3D ('=') excluded. ASCII 0x41 through 0x5A inclusive (A-Z) is
+to be considered equivalent to ASCII 0x61 through 0x7A inclusive
+(a-z).</li>
+<li>The field name is immediately followed by ASCII 0x3D ('='); 
+this equals sign is used to terminate the field name.</li>
+<li>0x3D is followed by the 8 bit clean UTF-8 encoded value of the 
+field contents to the end of the field.</li>
+</ul>
+
+<h3>Field names</h3>
+
+<p>Below is a proposed, minimal list of standard field names with a
+description of intended use. No single or group of field names is
+mandatory; a comment header may contain one, all or none of the names
+in this list.</p>
+
+<dl>
+
+<dt>TITLE</dt>
+<dd>Track/Work name</dd>
+
+<dt>VERSION</dt>
+<dd>The version field may be used to differentiate multiple
+versions of the same track title in a single collection.
+(e.g. remix info)</dd>
+
+<dt>ALBUM</dt>
+<dd>The collection name to which this track belongs</dd>
+
+<dt>TRACKNUMBER</dt>
+<dd>The track number of this piece if part of a specific larger collection or album</dd>
+
+<dt>ARTIST</dt>
+<dd>The artist generally considered responsible for the work. In popular music
+this is usually the performing band or singer. For classical music it would be
+the composer. For an audio book it would be the author of the original text.</dd>
+
+<dt>PERFORMER</dt>
+<dd>The artist(s) who performed the work. In classical music this would be the
+conductor, orchestra, soloists. In an audio book it would be the actor who did
+the reading. In popular music this is typically the same as the ARTIST and
+is omitted.</dd>
+
+<dt>COPYRIGHT</dt>
+<dd>Copyright attribution, e.g., '2001 Nobody's Band' or '1999 Jack Moffitt'</dd>
+
+<dt>LICENSE</dt>
+<dd>License information, eg, 'All Rights Reserved', 'Any
+Use Permitted', a URL to a license such as a Creative Commons license
+("www.creativecommons.org/blahblah/license.html") or the EFF Open
+Audio License ('distributed under the terms of the Open Audio
+License. see http://www.eff.org/IP/Open_licenses/eff_oal.html for
+details'), etc.</dd>
+
+<dt>ORGANIZATION</dt>
+<dd>Name of the organization producing the track (i.e.
+the 'record label')</dd>
+
+<dt>DESCRIPTION</dt>
+<dd>A short text description of the contents</dd>
+
+<dt>GENRE</dt>
+<dd>A short text indication of music genre</dd>
+
+<dt>DATE</dt>
+<dd>Date the track was recorded</dd>
+
+<dt>LOCATION</dt>
+<dd>Location where track was recorded</dd>
+
+<dt>CONTACT</dt>
+<dd>Contact information for the creators or distributors of the track.
+This could be a URL, an email address, the physical address of
+the producing label.</dd>
+
+<dt>ISRC</dt>
+<dd>ISRC number for the track; see <a href="http://www.ifpi.org/site-content/online/isrc_intro.html">the
+ISRC intro page</a> for more information on ISRC numbers.</dd>
+
+</dl>
+
+<h3>Implications</h3>
+
+<ul>
+<li>Field names should not be 'internationalized'; this is a
+concession to simplicity not an attempt to exclude the majority of
+the world that doesn't speak English. Field <emph>contents</emph>, 
+however, use the UTF-8 character encoding to allow easy representation 
+of any language.</li>
+<li>We have the length of the entirety of the field and restrictions on
+the field name so that the field name is bounded in a known way. Thus
+we also have the length of the field contents.</li>
+<li>Individual 'vendors' may use non-standard field names within
+reason. The proper use of comment fields should be clear through
+context at this point. Abuse will be discouraged.</li>
+<li>There is no vendor-specific prefix to 'nonstandard' field names.
+Vendors should make some effort to avoid arbitrarily polluting the
+common namespace. We will generally collect the more useful tags
+here to help with standardization.</li>
+<li>Field names are not required to be unique (occur once) within a
+comment header. As an example, assume a track was recorded by three
+well know artists; the following is permissible, and encouraged:
+<pre>
+              ARTIST=Dizzy Gillespie 
+              ARTIST=Sonny Rollins 
+              ARTIST=Sonny Stitt 
+</pre></li>
+</ul>
+
+<h2>Encoding</h2> 
+
+<p>The comment header comprises the entirety of the second bitstream
+header packet. Unlike the first bitstream header packet, it is not
+generally the only packet on the second page and may not be restricted
+to within the second bitstream page. The length of the comment header
+packet is (practically) unbounded. The comment header packet is not
+optional; it must be present in the bitstream even if it is
+effectively empty.</p>
+
+<p>The comment header is encoded as follows (as per Ogg's standard
+bitstream mapping which renders least-significant-bit of the word to be
+coded into the least significant available bit of the current
+bitstream octet first):</p>
+
+<ol>
+<li>Vendor string length (32 bit unsigned quantity specifying number of octets)</li>
+<li>Vendor string ([vendor string length] octets coded from beginning of string
+to end of string, not null terminated)</li>
+<li>Number of comment fields (32 bit unsigned quantity specifying number of fields)</li>
+<li>Comment field 0 length (if [Number of comment fields]>0; 32 bit unsigned
+quantity specifying number of octets)</li>
+<li>Comment field 0 ([Comment field 0 length] octets coded from beginning of
+string to end of string, not null terminated)</li>
+<li>Comment field 1 length (if [Number of comment fields]>1...)...</li>
+</ol>
+
+<p>This is actually somewhat easier to describe in code; implementation of the above
+can be found in vorbis/lib/info.c:_vorbis_pack_comment(),_vorbis_unpack_comment()</p>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/vorbis-fidelity.html
===================================================================
--- branches/vorbis-aotuv/doc/vorbis-fidelity.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/vorbis-fidelity.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,142 +1,180 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-
-<h1><font color=#000070>
-Ogg Vorbis: Fidelity measurement and terminology discussion
-</font></h1>
-
-<em>Last update to this document: July 16, 2002</em><p> 
-
-Terminology discussed in this document is based on common terminology
-associated with contemporary codecs such as MPEG I audio layer 3
-(mp3).  However, some differences in terminology are useful in the
-context of Vorbis as Vorbis functions somewhat differently than most
-current formats.  For clarity, then, we describe a common terminology
-for discussion of Vorbis's and other formats' audio quality.<p>
-
-<h2>Subjective and Objective</h2>
-
-<em>Objective</em> fidelity is a measure, based on a computable,
-mechanical metric, of how carefully an output matches an input.  For
-example, a stereo amplifier may claim to introduce less that .01%
-total harmonic distortion when amplifying an input signal; this claim
-is easy to verify given proper equipment, and any number of testers are
-likely to arrive at the same, exact results.  One need not listen to
-the equipment to make this measurement.<p>
-
-However, given two amplifiers with identical, verifiable objective
-specifications, listeners may strongly prefer the sound quality of one
-over the other.  This is actually the case in the decades old debate
-[some would say jihad] among audiophiles involving vacuum tube versus
-solid state amplifiers.  There are people who can tell the difference,
-and strongly prefer one over the other despite seemingly identical,
-measurable quality.  This preference is <em>subjective</em> and
-difficult to measure but nonetheless real.
-
-Individual elements of subjective differences often can be qualified,
-but overall subjective quality generally is not measurable.  Different
-observers are likely to disagree on the exact results of a subjective
-test as each observer's perspective differs.  When measuring
-subjective qualities, the best one can hope for is average, empirical
-results that show statistical significance across a group.<p>
-
-Perceptual codecs are most concerned with subjective, not objective,
-quality.  This is why evaluating a perceptual codec via distortion
-measures and sonograms alone is useless; these objective measures may
-provide insight into the quality or functioning of a codec, but cannot
-answer the much squishier subjective question, "Does it sound
-good?". The tube amplifier example is perhaps not the best as very few
-people can hear, or care to hear, the minute differences between tubes
-and transistors, whereas the subjective differences in perceptual
-codecs tend to be quite large even when objective differences are
-not.<p>
-
-<h2>Fidelity, Artifacts and Differences</h2> Audio <em>artifacts</em>
-and loss of fidelity or more simply put, audio <em>differences</em>
-are not the same thing.<p>
-
-A loss of fidelity implies differences between the perceived input and
-output signal; it does not necessarily imply that the differences in
-output are displeasing or that the output sounds poor (although this
-is often the case).  Tube amplifiers are <em>not</em> higher fidelity
-than modern solid state and digital systems.  They simply produce a
-form of distortion and coloring that is either unnoticeable or actually
-pleasing to many ears.<p>
-
-As compared to an original signal using hard metrics, all perceptual
-codecs [ASPEC, ATRAC, MP3, WMA, AAC, TwinVQ, AC3 and Vorbis included]
-lose objective fidelity in order to reduce bitrate.  This is fact. The
-idea is to lose fidelity in ways that cannot be perceived.  However,
-most current streaming applications demand bitrates lower than what
-can be achieved by sacrificing only objective fidelity; this is also
-fact, despite whatever various company press releases might claim.
-Subjective fidelity eventually must suffer in one way or another.<p>
-
-The goal is to choose the best possible tradeoff such that the
-fidelity loss is graceful and not obviously noticeable.  Most listeners
-of FM radio do not realize how much lower fidelity that medium is as
-compared to compact discs or DAT.  However, when compared directly to
-source material, the difference is obvious.  A cassette tape is lower
-fidelity still, and yet the degradation, relatively speaking, is
-graceful and generally easy not to notice.  Compare this graceful loss
-of quality to an average 44.1kHz stereo mp3 encoded at 80 or 96kbps.
-The mp3 might actually be higher objective fidelity but subjectively
-sounds much worse.<p>
-
-Thus, when a CODEC <em>must</em> sacrifice subjective quality in order
-to satisfy a user's requirements, the result should be a
-<em>difference</em> that is generally either difficult to notice
-without comparison, or easy to ignore.  An <em>artifact</em>, on the
-other hand, is an element introduced into the output that is
-immediately noticeable, obviously foreign, and undesired.  The famous
-'underwater' or 'twinkling' effect synonymous with low bitrate (or
-poorly encoded) mp3 is an example of an <em>artifact</em>.  This
-working definition differs slightly from common usage, but the coined
-distinction between differences and artifacts is useful for our
-discussion.<p>
-
-The goal, when it is absolutely necessary to sacrifice subjective
-fidelity, is obviously to strive for differences and not artifacts.
-The vast majority of codecs today fail at this task miserably,
-predictably, and regularly in one way or another.  Avoiding such
-failures when it is necessary to sacrifice subjective quality is a
-fundamental design objective of Vorbis and that objective is reflected
-in Vorbis's design and tuning.<p>
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-</body>
-
-
-
-
-
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis: Fidelity measurement and terminology discussion</h1>
+
+<p>Terminology discussed in this document is based on common terminology
+associated with contemporary codecs such as MPEG I audio layer 3
+(mp3). However, some differences in terminology are useful in the
+context of Vorbis as Vorbis functions somewhat differently than most
+current formats. For clarity, then, we describe a common terminology
+for discussion of Vorbis's and other formats' audio quality.</p>
+
+<h2>Subjective and Objective</h2>
+
+<p><em>Objective</em> fidelity is a measure, based on a computable,
+mechanical metric, of how carefully an output matches an input. For
+example, a stereo amplifier may claim to introduce less that .01%
+total harmonic distortion when amplifying an input signal; this claim
+is easy to verify given proper equipment, and any number of testers are
+likely to arrive at the same, exact results. One need not listen to
+the equipment to make this measurement.</p>
+
+<p>However, given two amplifiers with identical, verifiable objective
+specifications, listeners may strongly prefer the sound quality of one
+over the other. This is actually the case in the decades old debate
+[some would say jihad] among audiophiles involving vacuum tube versus
+solid state amplifiers. There are people who can tell the difference,
+and strongly prefer one over the other despite seemingly identical,
+measurable quality. This preference is <em>subjective</em> and
+difficult to measure but nonetheless real.</p>
+
+<p>Individual elements of subjective differences often can be qualified,
+but overall subjective quality generally is not measurable. Different
+observers are likely to disagree on the exact results of a subjective
+test as each observer's perspective differs. When measuring
+subjective qualities, the best one can hope for is average, empirical
+results that show statistical significance across a group.</p>
+
+<p>Perceptual codecs are most concerned with subjective, not objective,
+quality. This is why evaluating a perceptual codec via distortion
+measures and sonograms alone is useless; these objective measures may
+provide insight into the quality or functioning of a codec, but cannot
+answer the much squishier subjective question, "Does it sound
+good?". The tube amplifier example is perhaps not the best as very few
+people can hear, or care to hear, the minute differences between tubes
+and transistors, whereas the subjective differences in perceptual
+codecs tend to be quite large even when objective differences are
+not.</p>
+
+<h2>Fidelity, Artifacts and Differences</h2>
+
+<p>Audio <em>artifacts</em> and loss of fidelity or more simply
+put, audio <em>differences</em> are not the same thing.</p>
+
+<p>A loss of fidelity implies differences between the perceived input and
+output signal; it does not necessarily imply that the differences in
+output are displeasing or that the output sounds poor (although this
+is often the case). Tube amplifiers are <em>not</em> higher fidelity
+than modern solid state and digital systems. They simply produce a
+form of distortion and coloring that is either unnoticeable or actually
+pleasing to many ears.</p>
+
+<p>As compared to an original signal using hard metrics, all perceptual
+codecs [ASPEC, ATRAC, MP3, WMA, AAC, TwinVQ, AC3 and Vorbis included]
+lose objective fidelity in order to reduce bitrate. This is fact. The
+idea is to lose fidelity in ways that cannot be perceived. However,
+most current streaming applications demand bitrates lower than what
+can be achieved by sacrificing only objective fidelity; this is also
+fact, despite whatever various company press releases might claim.
+Subjective fidelity eventually must suffer in one way or another.</p>
+
+<p>The goal is to choose the best possible tradeoff such that the
+fidelity loss is graceful and not obviously noticeable. Most listeners
+of FM radio do not realize how much lower fidelity that medium is as
+compared to compact discs or DAT. However, when compared directly to
+source material, the difference is obvious. A cassette tape is lower
+fidelity still, and yet the degradation, relatively speaking, is
+graceful and generally easy not to notice. Compare this graceful loss
+of quality to an average 44.1kHz stereo mp3 encoded at 80 or 96kbps.
+The mp3 might actually be higher objective fidelity but subjectively
+sounds much worse.</p>
+
+<p>Thus, when a CODEC <em>must</em> sacrifice subjective quality in order
+to satisfy a user's requirements, the result should be a
+<em>difference</em> that is generally either difficult to notice
+without comparison, or easy to ignore. An <em>artifact</em>, on the
+other hand, is an element introduced into the output that is
+immediately noticeable, obviously foreign, and undesired. The famous
+'underwater' or 'twinkling' effect synonymous with low bitrate (or
+poorly encoded) mp3 is an example of an <em>artifact</em>. This
+working definition differs slightly from common usage, but the coined
+distinction between differences and artifacts is useful for our
+discussion.</p>
+
+<p>The goal, when it is absolutely necessary to sacrifice subjective
+fidelity, is obviously to strive for differences and not artifacts.
+The vast majority of codecs today fail at this task miserably,
+predictably, and regularly in one way or another. Avoiding such
+failures when it is necessary to sacrifice subjective quality is a
+fundamental design objective of Vorbis and that objective is reflected
+in Vorbis's design and tuning.</p>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/vorbis.html
===================================================================
--- branches/vorbis-aotuv/doc/vorbis.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/vorbis.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,197 +1,234 @@
-<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
-<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
-<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
-
-
-<h1><font color=#000070>
-Ogg Vorbis encoding format documentation
-</font></h1>
-
-<em>Last update to this document: July 2, 2002</em><br> 
-<em>Last update to Vorbis documentation: July 2, 2002</em><p> 
-
-<table><tr><td>
-<img src=wait.png>
-</td><td valign=center>
-As of writing, not all the below document
-links are live.  They will be populated as we complete the
-documents.
-</td></tr></table>
-
-<p>
-<h2>Documents</h2>
-<ul>
-<li><a href="packet.html">Vorbis packet structure</a>
-<li><a href="envelope.html">Temporal envelope shaping and blocksize</a>
-<li><a href="mdct.html">Time domain segmentation and MDCT transform</a>
-<li><a href="resolution.html">The resolution floor</a>
-<li><a href="residuals.html">MDCT-domain fine structure</a><p>
-
-<li><a href="probmodel.html">The Vorbis probability model</a>
-
-<li><a href="bitpack.html">The Vorbis bitpacker</a><p>
-
-<li><a href="oggstream.html">Ogg bitstream overview</a>
-<li><a href="framing.html">Ogg logical bitstream and framing spec</a>
-<li><a href="vorbis-stream.html">Vorbis packet->Ogg bitstream 
-       mapping</a><p>
-
-<li><a href="programming.html">Programming with libvorbis</a><p>
-</ul>
-
-<h2>Description</h2>
-Ogg Vorbis is a general purpose compressed audio format
-for high quality (44.1-48.0kHz, 16+ bit, polyphonic) audio and music
-at moderate fixed and variable bitrates (40-80 kb/s/channel).  This
-places Vorbis in the same class as audio representations including
-MPEG-1 audio layer 3, MPEG-4 audio (AAC and TwinVQ), and PAC.<p>
-
-Vorbis is the first of a planned family of Ogg multimedia coding
-formats being developed as part of the Xiph.org Foundation's Ogg multimedia
-project.  See <a href="http://www.xiph.org/">http://www.xiph.org/</a>
-for more information.
-
-<h2>Vorbis technical documents</h2>
-
-A Vorbis encoder takes in overlapping (but contiguous) short-time
-segments of audio data. The encoder analyzes the content of the audio
-to determine an optimal compact representation; this phase of encoding
-is known as <em>analysis</em>.  For each short-time block of sound,
-the encoder then packs an efficient representation of the signal, as
-determined by analysis, into a raw packet much smaller than the size
-required by the original signal; this phase is <em>coding</em>.
-Lastly, in a streaming environment, the raw packets are then
-structured into a continuous stream of octets; this last phase is
-<em>streaming</em>. Note that the stream of octets is referred to both
-as a 'byte-' and 'bit-'stream; the latter usage is acceptible as the
-stream of octets is a physical representation of a true logical
-bit-by-bit stream.<p>
-
-A Vorbis decoder performs a mirror image process of extracting the
-original sequence of raw packets from an Ogg stream (<em>stream
-decomposition</em>), reconstructing the signal representation from the
-raw data in the packet (<em>decoding</em>) and them reconstituting an
-audio signal from the decoded representation (<em>synthesis</em>).<p>
-
-The <a href="programming.html">Programming with libvorbis</a>
-documents discuss use of the reference Vorbis codec library
-(libvorbis) produced by the Xiph.org Foundation.<p>
-
-The data representations and algorithms necessary at each step to
-encode and decode Ogg Vorbis bitstreams are described by the below
-documents in sufficient detail to construct a complete Vorbis codec.
-Note that at the time of writing, Vorbis is still in a 'Request For
-Comments' stage of development; despite being in advanced stages of
-development, input from the multimedia community is welcome.<p>
-
-<h3>Vorbis analysis and synthesis</h3>
-
-Analysis begins by seperating an input audio stream into individual,
-overlapping short-time segments of audio data.  These segments are
-then transformed into an alternate representation, seeking to
-represent the original signal in a more efficient form that codes into
-a smaller number of bytes.  The analysis and transformation stage is
-the most complex element of producing a Vorbis bitstream.<p>
-
-The corresponding synthesis step in the decoder is simpler; there is
-no analysis to perform, merely a mechanical, deterministic
-reconstruction of the original audio data from the transform-domain
-representation.<p>
-
-<ul>
-<li><a href="packet.html">Vorbis packet structure</a>: Describes the basic analysis components necessary to produce Vorbis packets and the structure of the packet itself.
-<li><a href="envelope.html">Temporal envelope shaping and blocksize</a>: Use of temporal envelope shaping and variable blocksize to minimize time-domain energy leakage during wide dynamic range and spectral energy swings.  Also discusses time-related principles of psychoacoustics.
-<li><a href="mdct.html">Time domain segmentation and MDCT transform</a>: Division of time domain data into individual overlapped, windowed short-time vectors and transformation using the MDCT
-<li><a href="resolution.html">The resolution floor</a>: Use of frequency doamin psychoacoustics, and the MDCT-domain noise, masking and resolution floors
-<li><a href="residuals.html">MDCT-domain fine structure</a>: Production, quantization and massaging of MDCT-spectrum fine structure
-</ul>
-
-<h3>Vorbis coding and decoding</h3>
-
-Coding and decoding converts the transform-domain representation of
-the original audio produced by analysis to and from a bitwise packed
-raw data packet.  Coding and decoding consist of two logically
-orthogonal concepts, <em>back-end coding</em> and <em>bitpacking</em>.<p>
-
-<em>Back-end coding</em> uses a probability model to represent the raw numbers
-of the audio representation in as few physical bits as possible;
-familiar examples of back-end coding include Huffman coding and Vector
-Quantization.<p>
-
-<em>Bitpacking</em> arranges the variable sized words of the back-end
-coding into a vector of octets without wasting space.  The octets
-produced by coding a single short-time audio segment is one raw Vorbis
-packet.<p>
-
-<ul>
-
-<li><a href="probmodel.html">The Vorbis probability model</a>
-
-<li><a href="bitpack.html">The Vorbis bitpacker</a>: Arrangement of 
-variable bit-length words into an octet-aligned packet.
-
-</ul>
-
-<h3>Vorbis streaming and stream decomposition</h3>
-
-Vorbis packets contain the raw, bitwise-compressed representation of a
-snippet of audio.  These packets contain no structure and cannot be
-strung together directly into a stream; for streamed transmission and
-storage, Vorbis packets are encoded into an Ogg bitstream.<p>
-
-<ul>
-
-<li><a href="oggstream.html">Ogg bitstream overview</a>: High-level
-description of Ogg logical bitstreams, how logical bitstreams
-(of mixed media types) can be combined into physical bitstreams, and
-restrictions on logical-to-physical mapping.  Note that this document is
-not specific only to Ogg Vorbis.
-
-<li><a href="framing.html">Ogg logical bitstream and framing
-spec</a>: Low level, complete specification of Ogg logical
-bitstream pages.  Note that this document is not specific only to Ogg
-Vorbis.
-
-<li><a href="vorbis-stream.html">Vorbis bitstream mapping</a>:
-Specifically describes mapping Vorbis data into an
-Ogg physical bitstream.  
-
-</ul>
-
-
-<hr>
-<a href="http://www.xiph.org/">
-<img src="white-xifish.png" align=left border=0>
-</a>
-<font size=-2 color=#505050>
-
-Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
-to protect essential tenets of Internet multimedia from corporate
-hostage-taking; Open Source is the net's greatest tool to keep
-everyone honest. See <a href="http://www.xiph.org/about.html">About
-the Xiph.org Foundation</a> for details.
-<p>
-
-Ogg Vorbis is the first Ogg audio CODEC.  Anyone may freely use and
-distribute the Ogg and Vorbis specification, whether in a private,
-public or corporate capacity.  However, the Xiph.org Foundation and
-the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
-specification and certify specification compliance.<p>
-
-Xiph.org's Vorbis software CODEC implementation is distributed under a
-BSD-like license.  This does not restrict third parties from
-distributing independent implementations of Vorbis software under
-other licenses.<p>
-
-Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
-of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>.  These
-pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights
-reserved.<p>
-
-</body>
-
-
-
-
-
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
+<title>Ogg Vorbis Documentation</title>
+
+<style type="text/css">
+body {
+  margin: 0 18px 0 18px;
+  padding-bottom: 30px;
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  color: #333333;
+  font-size: .8em;
+}
+
+a {
+  color: #3366cc;
+}
+
+img {
+  border: 0;
+}
+
+#xiphlogo {
+  margin: 30px 0 16px 0;
+}
+
+#content p {
+  line-height: 1.4;
+}
+
+h1, h1 a, h2, h2 a, h3, h3 a {
+  font-weight: bold;
+  color: #ff9900;
+  margin: 1.3em 0 8px 0;
+}
+
+h1 {
+  font-size: 1.3em;
+}
+
+h2 {
+  font-size: 1.2em;
+}
+
+h3 {
+  font-size: 1.1em;
+}
+
+li {
+  line-height: 1.4;
+}
+
+#copyright {
+  margin-top: 30px;
+  line-height: 1.5em;
+  text-align: center;
+  font-size: .8em;
+  color: #888888;
+  clear: both;
+}
+</style>
+
+</head>
+
+<body>
+
+<div id="xiphlogo">
+  <a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
+</div>
+
+<h1>Ogg Vorbis encoding format documentation</h1>
+
+<p><img src="wait.png" alt="wait"/>As of writing, not all the below document
+links are live. They will be populated as we complete the documents.</p>
+
+<h2>Documents</h2>
+
+<ul>
+<li><a href="packet.html">Vorbis packet structure</a></li>
+<li><a href="envelope.html">Temporal envelope shaping and blocksize</a></li>
+<li><a href="mdct.html">Time domain segmentation and MDCT transform</a></li>
+<li><a href="resolution.html">The resolution floor</a></li>
+<li><a href="residuals.html">MDCT-domain fine structure</a></li>
+</ul>
+
+<ul>
+<li><a href="probmodel.html">The Vorbis probability model</a></li>
+<li><a href="bitpack.html">The Vorbis bitpacker</a></li>
+</ul>
+
+<ul>
+<li><a href="oggstream.html">Ogg bitstream overview</a></li>
+<li><a href="framing.html">Ogg logical bitstream and framing spec</a></li>
+<li><a href="vorbis-stream.html">Vorbis packet->Ogg bitstream mapping</a></li>
+</ul>
+
+<ul>
+<li><a href="programming.html">Programming with libvorbis</a></li>
+</ul>
+
+<h2>Description</h2>
+
+<p>Ogg Vorbis is a general purpose compressed audio format
+for high quality (44.1-48.0kHz, 16+ bit, polyphonic) audio and music
+at moderate fixed and variable bitrates (40-80 kb/s/channel). This
+places Vorbis in the same class as audio representations including
+MPEG-1 audio layer 3, MPEG-4 audio (AAC and TwinVQ), and PAC.</p>
+
+<p>Vorbis is the first of a planned family of Ogg multimedia coding
+formats being developed as part of the Xiph.org Foundation's Ogg multimedia
+project. See <a href="http://www.xiph.org/">http://www.xiph.org/</a>
+for more information.</p>
+
+<h2>Vorbis technical documents</h2>
+
+<p>A Vorbis encoder takes in overlapping (but contiguous) short-time
+segments of audio data. The encoder analyzes the content of the audio
+to determine an optimal compact representation; this phase of encoding
+is known as <em>analysis</em>. For each short-time block of sound,
+the encoder then packs an efficient representation of the signal, as
+determined by analysis, into a raw packet much smaller than the size
+required by the original signal; this phase is <em>coding</em>.
+Lastly, in a streaming environment, the raw packets are then
+structured into a continuous stream of octets; this last phase is
+<em>streaming</em>. Note that the stream of octets is referred to both
+as a 'byte-' and 'bit-'stream; the latter usage is acceptible as the
+stream of octets is a physical representation of a true logical
+bit-by-bit stream.</p>
+
+<p>A Vorbis decoder performs a mirror image process of extracting the
+original sequence of raw packets from an Ogg stream (<em>stream
+decomposition</em>), reconstructing the signal representation from the
+raw data in the packet (<em>decoding</em>) and them reconstituting an
+audio signal from the decoded representation (<em>synthesis</em>).</p>
+
+<p>The <a href="programming.html">Programming with libvorbis</a>
+documents discuss use of the reference Vorbis codec library
+(libvorbis) produced by the Xiph.org Foundation.</p>
+
+<p>The data representations and algorithms necessary at each step to
+encode and decode Ogg Vorbis bitstreams are described by the below
+documents in sufficient detail to construct a complete Vorbis codec.
+Note that at the time of writing, Vorbis is still in a 'Request For
+Comments' stage of development; despite being in advanced stages of
+development, input from the multimedia community is welcome.</p>
+
+<h3>Vorbis analysis and synthesis</h3>
+
+<p>Analysis begins by seperating an input audio stream into individual,
+overlapping short-time segments of audio data. These segments are
+then transformed into an alternate representation, seeking to
+represent the original signal in a more efficient form that codes into
+a smaller number of bytes. The analysis and transformation stage is
+the most complex element of producing a Vorbis bitstream.</p>
+
+<p>The corresponding synthesis step in the decoder is simpler; there is
+no analysis to perform, merely a mechanical, deterministic
+reconstruction of the original audio data from the transform-domain
+representation.</p>
+
+<ul>
+<li><a href="packet.html">Vorbis packet structure</a>:
+Describes the basic analysis components necessary to produce Vorbis
+packets and the structure of the packet itself.</li>
+<li><a href="envelope.html">Temporal envelope shaping and blocksize</a>:
+Use of temporal envelope shaping and variable blocksize to minimize
+time-domain energy leakage during wide dynamic range and spectral energy
+swings. Also discusses time-related principles of psychoacoustics.</li>
+<li><a href="mdct.html">Time domain segmentation and MDCT transform</a>:
+Division of time domain data into individual overlapped, windowed
+short-time vectors and transformation using the MDCT</li>
+<li><a href="resolution.html">The resolution floor</a>: Use of frequency
+doamin psychoacoustics, and the MDCT-domain noise, masking and resolution
+floors</li>
+<li><a href="residuals.html">MDCT-domain fine structure</a>: Production,
+quantization and massaging of MDCT-spectrum fine structure</li>
+</ul>
+
+<h3>Vorbis coding and decoding</h3>
+
+<p>Coding and decoding converts the transform-domain representation of
+the original audio produced by analysis to and from a bitwise packed
+raw data packet. Coding and decoding consist of two logically
+orthogonal concepts, <em>back-end coding</em> and <em>bitpacking</em>.</p>
+
+<p><em>Back-end coding</em> uses a probability model to represent the raw numbers
+of the audio representation in as few physical bits as possible;
+familiar examples of back-end coding include Huffman coding and Vector
+Quantization.</p>
+
+<p><em>Bitpacking</em> arranges the variable sized words of the back-end
+coding into a vector of octets without wasting space. The octets
+produced by coding a single short-time audio segment is one raw Vorbis
+packet.</p>
+
+<ul>
+<li><a href="probmodel.html">The Vorbis probability model</a></li>
+<li><a href="bitpack.html">The Vorbis bitpacker</a>: Arrangement of 
+variable bit-length words into an octet-aligned packet.</li>
+</ul>
+
+<h3>Vorbis streaming and stream decomposition</h3>
+
+<p>Vorbis packets contain the raw, bitwise-compressed representation of a
+snippet of audio. These packets contain no structure and cannot be
+strung together directly into a stream; for streamed transmission and
+storage, Vorbis packets are encoded into an Ogg bitstream.</p>
+
+<ul>
+<li><a href="oggstream.html">Ogg bitstream overview</a>: High-level
+description of Ogg logical bitstreams, how logical bitstreams
+(of mixed media types) can be combined into physical bitstreams, and
+restrictions on logical-to-physical mapping. Note that this document is
+not specific only to Ogg Vorbis.</li>
+<li><a href="framing.html">Ogg logical bitstream and framing
+spec</a>: Low level, complete specification of Ogg logical
+bitstream pages. Note that this document is not specific only to Ogg
+Vorbis.</li>
+<li><a href="vorbis-stream.html">Vorbis bitstream mapping</a>:
+Specifically describes mapping Vorbis data into an
+Ogg physical bitstream.</li>
+</ul>
+
+<div id="copyright">
+  The Xiph Fish Logo is a
+  trademark (&trade;) of Xiph.Org.<br/>
+
+  These pages &copy; 1994 - 2005 Xiph.Org. All rights reserved.
+</div>
+
+</body>
+</html>

Modified: branches/vorbis-aotuv/doc/vorbisfile/ov_raw_tell.html
===================================================================
--- branches/vorbis-aotuv/doc/vorbisfile/ov_raw_tell.html	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/vorbisfile/ov_raw_tell.html	2006-11-05 15:39:26 UTC (rev 12031)
@@ -17,8 +17,10 @@
 
 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
 
-<p>Returns the current offset in raw compressed bytes.
+<p>Returns the current offset in raw compressed bytes.</p>
 
+<p>Note that if you later use ov_raw_seek() to return to this point, you won't generally get back to exactly the same place, due to internal buffering. Also note that a read operation may not cause a change to the current raw offset - only a read that requires reading more data from the underlying data source will do that.</p>
+
 <br><br>
 <table border=0 color=black cellspacing=0 cellpadding=7>
 <tr bgcolor=#cccccc>

Modified: branches/vorbis-aotuv/doc/xml/04-codec.xml
===================================================================
--- branches/vorbis-aotuv/doc/xml/04-codec.xml	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/xml/04-codec.xml	2006-11-05 15:39:26 UTC (rev 12031)
@@ -90,12 +90,14 @@
 field especially may be considerably off in purely VBR streams.  The
 fields are meaningful only when greater than zero.</para>
 
+<para>
 <itemizedlist>
   <listitem><simpara>All three fields set to the same value implies a fixed rate, or tightly bounded, nearly fixed-rate bitstream</simpara></listitem>
   <listitem><simpara>Only nominal set implies a VBR or ABR stream that averages the nominal bitrate</simpara></listitem>
   <listitem><simpara>Maximum and or minimum set implies a VBR bitstream that obeys the bitrate limits</simpara></listitem>
   <listitem><simpara>None set indicates the encoder does not care to speculate.</simpara></listitem>
 </itemizedlist>
+</para>
 
 </section>
 

Modified: branches/vorbis-aotuv/doc/xml/05-comment.xml
===================================================================
--- branches/vorbis-aotuv/doc/xml/05-comment.xml	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/xml/05-comment.xml	2006-11-05 15:39:26 UTC (rev 12031)
@@ -47,8 +47,8 @@
 is limited to 2^32-1 bytes. The vector length is encoded; the vector
 contents themselves are not null terminated. In addition to the vector
 list, there is a single vector for vendor name (also 8 bit clean,
-length encoded in 32 bits). The 1.0 release of libvorbis sets the 
-vendor string to "Xiph.Org libVorbis I 20020717".</para>
+length encoded in 32 bits). For example, the 1.0 release of libvorbis 
+set the vendor string to "Xiph.Org libVorbis I 20020717".</para>
 
 <para>The comment header is decoded as follows:
 
@@ -202,9 +202,9 @@
 
 <para>Field names should not be 'internationalized'; this is a
 concession to simplicity not an attempt to exclude the majority of
-the world that doesn't speak English. Field <emphasis>contents</emphasis>
-however, use the UTF-8 character encoding to allow easy representation of any
-language.</para>
+the world that doesn't speak English. Field <emphasis>contents</emphasis>,
+however, use the UTF-8 character encoding to allow easy representation 
+of any language.</para>
 
 <para>We have the length of the entirety of the field and restrictions on
 the field name so that the field name is bounded in a known way. Thus

Modified: branches/vorbis-aotuv/doc/xml/06-floor0.xml
===================================================================
--- branches/vorbis-aotuv/doc/xml/06-floor0.xml	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/xml/06-floor0.xml	2006-11-05 15:39:26 UTC (rev 12031)
@@ -79,11 +79,10 @@
   1) [amplitude] = read an unsigned integer of [floor0_amplitude_bits] bits
   2) if ( [amplitude] is greater than zero ) {
        3) [coefficients] is an empty, zero length vector
-
        4) [booknumber] = read an unsigned integer of <link linkend="vorbis-spec-ilog">ilog</link>( [floor0_number_of_books] ) bits
        5) if ( [booknumber] is greater than the highest number decode codebook ) then packet is undecodable
        6) [last] = zero;
-       7) vector [temp_vector] = read vector from bitstream using codebook number [booknumber] in VQ context.
+       7) vector [temp_vector] = read vector from bitstream using codebook number [floor0_book_list] element [booknumber] in VQ context.
        8) add the scalar value [last] to each scalar in vector [temp_vector]
        9) [last] = the value of the last scalar in vector [temp_vector]
       10) concatenate [temp_vector] onto the end of the [coefficients] vector

Modified: branches/vorbis-aotuv/doc/xml/07-floor1.xml
===================================================================
--- branches/vorbis-aotuv/doc/xml/07-floor1.xml	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/xml/07-floor1.xml	2006-11-05 15:39:26 UTC (rev 12031)
@@ -35,6 +35,7 @@
 prediction in a process roughly equivalent to the following simplified
 description:</para>
 
+<para>
 <itemizedlist>
  <listitem><simpara> the first line segment (base case) is a logical line spanning
 from x_0,y_0 to x_1,y_1 where in the base case x_0=0 and x_1=[n], the
@@ -56,6 +57,7 @@
 is completed at the end of the x value list.</simpara></listitem>
 
 </itemizedlist>
+</para>
 
 <para>
 Consider the following example, with values chosen for ease of
@@ -182,7 +184,7 @@
 
        19) [current_class_number] = vector [floor1_partition_class_list] element [i]
        20) iterate [j] over the range 0 ... ([floor1_class_dimensions] element [current_class_number])-1 {
-             21) vector [floor1_X_list] element ([j] + [floor1_values]) = 
+             21) vector [floor1_X_list] element ([floor1_values]) = 
                  read [rangebits] bits as unsigned integer
              22) increment [floor1_values] by one
            }
@@ -326,7 +328,7 @@
          
           } else [highroom] is not less than [lowroom] {
 		      
-            15) [root] = [lowroom] * 2
+            15) [room] = [lowroom] * 2
         
           }
 
@@ -409,7 +411,7 @@
   3) [ly] = vector [floor1_final_Y]' element [0] * [floor1_multiplier]
   4) iterate [i] over the range 1 ... [floor1_values]-1 {
 
-       5) if ( [floor1_step2_flag]' is set ) {
+       5) if ( [floor1_step2_flag]' element [i] is set ) {
 
              6) [hy] = [floor1_final_Y]' element [i] * [floor1_multiplier]
  	     7) [hx] = [floor1_X_list]' element [i]

Modified: branches/vorbis-aotuv/doc/xml/08-residue.xml
===================================================================
--- branches/vorbis-aotuv/doc/xml/08-residue.xml	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/doc/xml/08-residue.xml	2006-11-05 15:39:26 UTC (rev 12031)
@@ -50,6 +50,7 @@
 coding structure, ignoring for the moment exactly how a partition is
 encoded and simply trusting that it is, is as follows:</para>
 
+<para>
 <itemizedlist>
 <listitem><para>Each vector is partitioned into multiple equal sized chunks
 according to configuration specified.  If we have a vector size of
@@ -81,6 +82,7 @@
 is coded only in the first pass.</para></listitem>
 
 </itemizedlist>
+</para>
 
 <mediaobject>
 <imageobject>
@@ -298,50 +300,53 @@
 
        3) [partition_count] = 0
 
-       4) if ([pass] is zero) {
+       4) while [partition_count] is less than [partitions_to_read]
+
+            5) if ([pass] is zero) {
      
-            5) iterate [j] over the range 0 .. [ch]-1 {
+                 6) iterate [j] over the range 0 .. [ch]-1 {
 
-                 6) if vector [j] is not marked 'do not decode' {
+                      7) if vector [j] is not marked 'do not decode' {
 
-                      7) [temp] = read from packet using codebook [residue_classbook] in scalar context
-                      8) iterate [i] descending over the range [classwords_per_codeword]-1 ... 0 {
+                           8) [temp] = read from packet using codebook [residue_classbook] in scalar context
+                           9) iterate [i] descending over the range [classwords_per_codeword]-1 ... 0 {
 
-                           9) array [classifications] element [j],([i]+[partition_count]) =
-                              [temp] integer modulo [residue_classifications]
-                          10) [temp] = [temp] / [residue_classifications] using integer division
+                               10) array [classifications] element [j],([i]+[partition_count]) =
+                                   [temp] integer modulo [residue_classifications]
+                               11) [temp] = [temp] / [residue_classifications] using integer division
 
+                              }
+      
                          }
-      
+            
                     }
-            
+          
                }
-        
-          }
 
-      11) iterate [i] over the range 0 .. ([classwords_per_codeword] - 1) while [partition_count] 
-          is also less than [partitions_to_read] {
+           12) iterate [i] over the range 0 .. ([classwords_per_codeword] - 1) while [partition_count] 
+               is also less than [partitions_to_read] {
 
-            12) iterate [j] over the range 0 .. [ch]-1 {
+                 13) iterate [j] over the range 0 .. [ch]-1 {
    
-                 13) if vector [j] is not marked 'do not decode' {
+                      14) if vector [j] is not marked 'do not decode' {
    
-                      14) [vqclass] = array [classifications] element [j],[partition_count]
-                      15) [vqbook] = array [residue_books] element [vqclass],[pass]
-                      16) if ([vqbook] is not 'unused') {
+                           15) [vqclass] = array [classifications] element [j],[partition_count]
+                           16) [vqbook] = array [residue_books] element [vqclass],[pass]
+                           17) if ([vqbook] is not 'unused') {
    
-                           17) decode partition into output vector number [j], starting at scalar 
-                           offset [residue_begin]+[partition_count]*[residue_partition_size] using 
-                           codebook number [vqbook] in VQ context
+                                18) decode partition into output vector number [j], starting at scalar 
+                                    offset [residue_begin]+[partition_count]*[residue_partition_size] using 
+                                    codebook number [vqbook] in VQ context
+                          }
                      }
-                }
    
-            18) increment [partition_count] by one
+                 19) increment [partition_count] by one
 
+               }
           }
      }
  
- 19) done
+ 20) done
 
 </programlisting>
 
@@ -359,11 +364,13 @@
 'Residue Format: residue 0' section.  The following pseudocode
 presents the same algorithm. Assume:</para>
 
+<para>
 <itemizedlist>
 <listitem><simpara> <varname>[n]</varname> is the value in <varname>[residue_partition_size]</varname></simpara></listitem>
 <listitem><simpara><varname>[v]</varname> is the residue vector</simpara></listitem>
 <listitem><simpara><varname>[offset]</varname> is the beginning read offset in [v]</simpara></listitem>
 </itemizedlist>
+</para>
 
 <programlisting>
  1) [step] = [n] / [codebook_dimensions]
@@ -393,12 +400,14 @@
 'Residue Format: residue 1' section.  The following pseudocode
 presents the same algorithm. Assume:</para>
 
+<para>
 <itemizedlist>
 <listitem><simpara> <varname>[n]</varname> is the value in
 <varname>[residue_partition_size]</varname></simpara></listitem>
 <listitem><simpara><varname>[v]</varname> is the residue vector</simpara></listitem>
 <listitem><simpara><varname>[offset]</varname> is the beginning read offset in [v]</simpara></listitem>
 </itemizedlist>
+</para>
 
 <programlisting>
  1) [i] = 0

Modified: branches/vorbis-aotuv/lib/block.c
===================================================================
--- branches/vorbis-aotuv/lib/block.c	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/block.c	2006-11-05 15:39:26 UTC (rev 12031)
@@ -106,7 +106,7 @@
       oggpack_writeinit(vbi->packetblob[i]);
     }    
   }
-  
+
   return(0);
 }
 
@@ -287,11 +287,6 @@
   b=v->backend_state;
   b->psy_g_look=_vp_global_look(vi);
 
-  /* added by aoyumi */
-  b->nblock = _ogg_calloc((128*vi->channels), sizeof(*b->nblock));
-  b->tblock = _ogg_calloc((128*vi->channels), sizeof(*b->tblock));
-  b->lownoise_compand_level = _ogg_calloc(vi->channels, sizeof(*b->lownoise_compand_level));
-  
   /* Initialize the envelope state storage */
   b->ve=_ogg_calloc(1,sizeof(*b->ve));
   _ve_envelope_init(b->ve,vi);
@@ -353,11 +348,6 @@
 
       drft_clear(&b->fft_look[0]);
       drft_clear(&b->fft_look[1]);
-      
-      /* added by aoyumi */
-      if(b->nblock) _ogg_free(b->nblock);
-      if(b->tblock) _ogg_free(b->tblock);
-      if(b->lownoise_compand_level) _ogg_free(b->lownoise_compand_level);
 
     }
     

Modified: branches/vorbis-aotuv/lib/codec_internal.h
===================================================================
--- branches/vorbis-aotuv/lib/codec_internal.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/codec_internal.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -82,15 +82,6 @@
   bitrate_manager_state bms;
 
   ogg_int64_t sample_count;
-
-  /* encode only
-    added by aoyumi */
-  float *lownoise_compand_level;
-  float *nblock; /* lW logmdct buffer */  
-  float *tblock; /* temporal masking buffer (impulse block) */
-  int lW_blocktype; /* last window block type */
-  int lW_modenumber; /* last window mode number (0=short, 1=long) */
-  int lW_no; /* the number of continuous window blocks (last window) */
 } private_state;
 
 /* codec_setup_info contains all the setup information specific to the

Modified: branches/vorbis-aotuv/lib/info.c
===================================================================
--- branches/vorbis-aotuv/lib/info.c	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/info.c	2006-11-05 15:39:26 UTC (rev 12031)
@@ -416,7 +416,7 @@
 }
 
 static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){
-  char temp[]="AO; aoTuV b5 [20061024] (based on Xiph.Org's libVorbis)";
+  char temp[]="Xiph.Org libVorbis I 20050304";
   int bytes = strlen(temp);
 
   /* preamble */  

Modified: branches/vorbis-aotuv/lib/mapping0.c
===================================================================
--- branches/vorbis-aotuv/lib/mapping0.c	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/mapping0.c	2006-11-05 15:39:26 UTC (rev 12031)
@@ -246,14 +246,11 @@
   codec_setup_info      *ci=vi->codec_setup;
   private_state         *b=vb->vd->backend_state;
   vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal;
-  vorbis_info_floor1    *vif=ci->floor_param[vb->W];
   int                    n=vb->pcmend;
   int i,j,k;
 
   int    *nonzero    = alloca(sizeof(*nonzero)*vi->channels);
   float  **gmdct     = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct));
-  float  **gmdct_org = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct_org));
-  float  **res_org   = _vorbis_block_alloc(vb,vi->channels*sizeof(*res_org));
   int    **ilogmaskch= _vorbis_block_alloc(vb,vi->channels*sizeof(*ilogmaskch));
   int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts));
   
@@ -276,8 +273,6 @@
     float *logfft  =pcm;
 
     gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct));
-    gmdct_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct_org));
-    res_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**res_org));
 
     scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original
                                      todB estimation used on IEEE 754
@@ -316,7 +311,6 @@
     /* transform the PCM data */
     /* only MDCT right now.... */
     mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]);
-    memcpy(gmdct_org[i], gmdct[i], n/2*sizeof(**gmdct_org));
     
     /* FFT yields more accurate tonal estimation (not phase sensitive) */
     drft_forward(&b->fft_look[vb->W],pcm);
@@ -386,11 +380,6 @@
       
       float *logmdct =logfft+n/2;
       float *logmask =logfft;
-      
-      float *lastmdct = b->nblock+i*128;
-      float *tempmdct = b->tblock+i*128;
-      
-      float *lowcomp = b->lownoise_compand_level+i;
 
       vb->mode=modenumber;
 
@@ -430,15 +419,7 @@
          us a tonality estimate (the larger the value in the
          'noise_depth' vector, the more tonal that area is) */
 
-      *lowcomp=
-      	lb_loudnoise_fix(psy_look,
-      			*lowcomp,
-      			logmdct,
-      			b->lW_modenumber,
-      			blocktype, modenumber);
-      
       _vp_noisemask(psy_look,
-      		*lowcomp,
 		    logmdct,
 		    noise); /* noise does not have by-frequency offset
                                bias applied yet */
@@ -486,13 +467,7 @@
 			   1,
 			   logmask,
 			   mdct,
-			   logmdct,
-			   lastmdct, tempmdct,
-			   *lowcomp,
-			   vif->n,
-			   blocktype, modenumber,
-			   vb->nW,
-			   b->lW_blocktype, b->lW_modenumber, b->lW_no);
+			   logmdct);
 	
 #if 0
 	if(vi->channels==2){
@@ -535,13 +510,7 @@
 			   2,
 			   logmask,
 			   mdct,
-			   logmdct,
-			   lastmdct, tempmdct,
-			   *lowcomp,
-			   vif->n,
-			   blocktype, modenumber,
-			   vb->nW,
-			   b->lW_blocktype, b->lW_modenumber, b->lW_no);
+			   logmdct);
 
 #if 0
 	if(vi->channels==2){
@@ -564,13 +533,7 @@
 			   0,
 			   logmask,
 			   mdct,
-			   logmdct,
-			   lastmdct, tempmdct,
-			   *lowcomp,
-			   vif->n,
-			   blocktype, modenumber,
-			   vb->nW,
-			   b->lW_blocktype, b->lW_modenumber, b->lW_no);
+			   logmdct);
 
 #if 0
 	if(vi->channels==2)
@@ -637,6 +600,11 @@
 					psy_look,
 					info,
 					mag_memo);    
+
+      hf_reduction(&ci->psy_g_param,
+		   psy_look,
+		   info,
+		   mag_memo);
     }
 
     memset(sortindex,0,sizeof(*sortindex)*vi->channels);
@@ -668,9 +636,7 @@
       for(i=0;i<vi->channels;i++){
 	int submap=info->chmuxlist[i];
 	float *mdct    =gmdct[i];
-	float *mdct_org=gmdct_org[i];
 	float *res     =vb->pcm[i];
-	float *resorgch=res_org[i];
 	int   *ilogmask=ilogmaskch[i]=
 	  _vorbis_block_alloc(vb,n/2*sizeof(**gmdct));
       
@@ -693,14 +659,6 @@
 			 res,
 			 ci->psy_g_param.sliding_lowpass[vb->W][k]);
 
-	/* stereo threshold */
-	_vp_remove_floor(psy_look,
-			 mdct_org,
-			 ilogmask,
-			 resorgch,
-			 ci->psy_g_param.sliding_lowpass[vb->W][k]);
-		 
-
 	_vp_noise_normalize(psy_look,res,res+n/2,sortindex[i]);
 
 	
@@ -733,8 +691,7 @@
 		   mag_sort,
 		   ilogmaskch,
 		   nonzero,
-		   ci->psy_g_param.sliding_lowpass[vb->W][k],
-		   gmdct, res_org);
+		   ci->psy_g_param.sliding_lowpass[vb->W][k]);
       }
       
       /* classify and encode by submap */
@@ -760,11 +717,6 @@
 		  couple_bundle,NULL,zerobundle,ch_in_bundle,classifications);
       }
       
-      /* set last-window type & number */
-      if((blocktype == b->lW_blocktype) && (modenumber == b->lW_modenumber)) b->lW_no++;
-      else b->lW_no = 1;
-      b->lW_blocktype = blocktype;
-      b->lW_modenumber = modenumber;
       /* ok, done encoding.  Next protopacket. */
     }
     

Modified: branches/vorbis-aotuv/lib/masking.h
===================================================================
--- branches/vorbis-aotuv/lib/masking.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/masking.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -23,29 +23,16 @@
 
 #define MAX_ATH 88
 static float ATH[]={
-/* original 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
-/*Aoyumi's ATH (v5) */
-  /*15*/  -31, -33, -35, -37, -39, -41, -43, -45,
-  /*31*/  -47, -49, -51, -53, -55, -57, -59, -61,
-  /*63*/  -63, -65, -67, -69, -71, -73, -75, -77, 
-  /*125*/ -79, -81, -83, -84, -85, -86, -87, -88,
-  /*250*/ -89, -90, -91, -92, -93, -94, -95, -96,
-  /*500*/ -96, -97, -97, -97, -98, -98, -98, -99, 
-  /*1k*/  -98, -97, -97, -98, -99,-100,-101,-101,
-  /*2k*/ -102,-103,-104,-105,-106,-106,-107,-107,
-  /*4k*/ -105,-104,-102,-101,-100, -99, -98, -97,
-  /*8k*/  -96, -95, -95, -96, -97, -97, -93, -88,
+  /*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
 };
 

Modified: branches/vorbis-aotuv/lib/modes/psych_11.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/psych_11.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/psych_11.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,32 +15,26 @@
 
  ********************************************************************/
 
-static double _psy_lowpass_11[4]={4,4.5,5.5,30.,};
+static double _psy_lowpass_11[3]={4.5,5.5,30.,};
 
-static att3 _psy_tone_masteratt_11[4]={
-  {{ 30,  25,  12},  0,   0},  /* -2 */
-  {{ 30,  25,  12},  0,   0},  /* -1 */
-  {{ 30,  25,  12},  0,   0},  /*  0 */
-  {{ 20,   0, -14},  0,   0},  /* 10 */
+static att3 _psy_tone_masteratt_11[3]={
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 30,  25,  12},  0,   0},  /* 0 */
+  {{ 20,   0, -14},  0,   0}, /* 0 */
 };
 
-static vp_adjblock _vp_tonemask_adj_11[4]={
+static vp_adjblock _vp_tonemask_adj_11[3]={
   /* adjust for mode zero */
   /* 63     125     250     500     1     2     4     8    16 */
-  {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 5, 5,99,99,99}}, /* -2 */
-  {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */
-  {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /*  0 */
-  {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /* 10 */
+  {{-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[4]={
+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},
-    {-12,-12,-12,-12,-10,-10, -3,  0,  2,  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,  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}}},
 
@@ -53,5 +47,5 @@
     {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
 };
 
-static double _noise_thresh_11[4]={ .3,.3,.5,.5 };
+static double _noise_thresh_11[3]={ .3,.5,.5 };
 

Modified: branches/vorbis-aotuv/lib/modes/psych_16.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/psych_16.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/psych_16.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -16,7 +16,7 @@
  ********************************************************************/
 
 /* stereo mode by base quality level */
-static adj_stereo _psy_stereo_modes_16[5]={
+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},
@@ -24,10 +24,6 @@
    { 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,  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},
@@ -40,34 +36,28 @@
    { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
 };
 
-static double _psy_lowpass_16[5]={6.,6.5,8,30.,99.};
+static double _psy_lowpass_16[4]={6.5,8,30.,99.};
 
-static att3 _psy_tone_masteratt_16[5]={
-  {{ 30,  25,  12},  0,   0},  /* -2 */
-  {{ 30,  25,  12},  0,   0},  /* -1 */
-  {{ 25,  22,  12},  0,   0},  /* 0.5 */
-  {{ 20,  12,   0},  0,   0},  /*  5 */
-  {{ 15,   0, -14},  0,   0},  /* 10 */
+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[5]={
+static vp_adjblock _vp_tonemask_adj_16[4]={
   /* adjust for mode zero */
   /* 63     125     250     500       1     2     4     8    16 */
-  {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -2 */
-  {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -1 */
-  {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-4, 0, 0, 0, 0, 0, 0, 0}}, /* 0.5 */
-  {{-20,-20,-20,-20,-20,-16,-10,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /*  5 */
-  {{-30,-30,-30,-30,-30,-26,-20,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /* 10 */
+  {{-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[5]={
+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},
-    {-12,-12,-12,-12,-12, -7, -4, -2,  3,  3,  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, 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}}},
 
@@ -84,13 +74,9 @@
     {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
 };
 
-static noise3 _psy_noisebias_16_impulse[5]={
+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},
-    {-12,-12,-12,-12,-12, -7, -4, -2,  3,  3,  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, 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}}},
 
@@ -107,13 +93,9 @@
     {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
 };
 
-static noise3 _psy_noisebias_16[5]={
+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,  3,  3,  3,  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,  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}}},
 
@@ -130,17 +112,17 @@
     {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
 };
 
-static double _noise_thresh_16[5]={ .3,.3,.5,.5,.5 };
+static double _noise_thresh_16[4]={ .3,.5,.5,.5 };
 
-static int _noise_start_16[4]={ 256,256,256,9999 };
-static int _noise_part_16[5]={ 8,8,8,8,8 };
+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[5]={
-  -100,-100,-100,-100,-105,
+static int _psy_ath_floater_16[4]={
+  -100,-100,-100,-105,
 };
 
-static int _psy_ath_abs_16[5]={
-  -130,-130,-130,-130,-140,
+static int _psy_ath_abs_16[4]={
+  -130,-130,-130,-140,
 };
 
 

Modified: branches/vorbis-aotuv/lib/modes/psych_44.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/psych_44.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/psych_44.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -18,24 +18,9 @@
 
 /* preecho trigger settings *****************************************/
 
-static vorbis_info_psy_global _psy_global_44[6]={
-/*
-  { lines per eighth octave,
-   { pre-echo thresh.}, 
-   { post-echo thresh.}, stretch penalty, pre-echo minimum energy,
-   ampmax att 1/sec,
-   {coupling point(kHz)},{{coupling point limit0},{coupling point limit1}},
-     {coupling pre-point amp},{coupling post-point amp},{{sliding lowpass0},{sliding lowpass1}}
-  },
-*/
-/* q-2 */
+static vorbis_info_psy_global _psy_global_44[5]={
+
   {8,   /* lines per eighth octave */
-   {24.f,14.f,14.f,14.f,14.f,14.f,14.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 */
    {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,
@@ -54,16 +39,14 @@
    {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}, 
-   {10.f,8.f,8.f,6.f,6.f,6.f,7.f},
+   {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,
-   {-15.f,-14.f,-10.f,-10.f,-10.f,-11.f,-12.f}, 0,-85.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.}}
   },
@@ -73,55 +56,35 @@
 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 */
-     0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
-     6, 6, 7, 7, 7, 7, 8,  8,     /* 15dB */
-     9,10,11,12,13,14,15, 16,     /* 23dB */
-    17,17,18,19,20,21,22, 23,     /* 31dB */
-    23,24,25,26,27,28,29, 30,     /* 39dB */
+    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 */
      0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
-     6, 6, 7, 7, 7, 7, 7,  7,     /* 15dB */
+     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 */
     0, 1, 2, 3, 4, 5, 5,  5,     /* 7dB */
-    6, 6, 6, 6, 6, 6, 6,  6,     /* 15dB */
-    6, 6, 6, 6, 6, 7, 7,  7,     /* 23dB */
-    8, 8, 8, 9, 9, 9,10, 11,     /* 31dB */
+    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 */
      0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
-     8, 9,10,11,12,12,13, 13,     /* 15dB */
-    13,14,14,15,15,16,16, 16,     /* 23dB */
-    17,17,18,19,20,21,22, 23,     /* 31dB */
-    23,24,25,26,27,28,29, 30,     /* 39dB */
+     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 */
   {{
@@ -133,190 +96,172 @@
   }},
   /* 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 */
     0, 1, 2, 3, 4, 5, 6,  7,     /* 7dB */
-    7, 7, 7, 6, 6, 6, 6,  6,     /* 15dB */
-    6, 6, 6, 6, 6, 7, 7,  7,     /* 23dB */
-    8, 8, 8, 9, 9, 9,10, 11,     /* 31dB */
+    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[13]={
+static vp_adjblock _vp_tonemask_adj_longblock[12]={
+
    /* 63     125     250     500       1       2       4       8      16 */
 
-// {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1,  0,  0,  1,  1,  1}}, /* -2(addition) */
-   {{-14,-14,-14,-14,-14,-14,-14,-14,-13,-11,-11,-11,-10, -4, -2, -2,  1}},
+   {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10,  0,  0,  0,  0,  0,  0}}, /* -1 */
 
-// {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1,  0,  0,  0,  0}}, /* -1 */
-   {{-15,-15,-15,-15,-15,-15,-15,-15,-14,-13,-13,-13,-13, -6, -4, -5,  0}}, 
-   
 /* {{-15,-15,-15,-15,-10, -8, -4, -2,  0,  0,  0, 10,  0,  0,  0,  0,  0}},    0 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 0 */
+   {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1,  0}}, /* 0 */
 
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  5,  0,  0,  0,  0,  0}},    1 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 1 */
+   {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1,  0}}, /* 1 */
 
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    2 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 2 */
-   
+   {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1,  0}}, /* 2 */
+
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    3 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 3 */
-   
-/* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    4 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 4 */
-   
+   {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1,  0}}, /* 3 */
+
+/* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}}, *//* 4 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7  -3, -1, -1 , 0}}, /* 4 */
+
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    5 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}},/* 5 */
-   
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7  -3, -1, -1 , 0}}, /* 5 */
+
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    6 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 6 */
-   
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2,  0}}, /* 6 */
+
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    7 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 7 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 7 */
 
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    8 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 8 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 8 */
 
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    9 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 9 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 9 */
 
 /* {{-15,-15,-15,-15,-15,-12,-10, -8,  0,  0,  0,  0,  0,  0,  0,  0,  0}},    10 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 10 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 10 */
 };
-static vp_adjblock _vp_tonemask_adj_otherblock[13]={
+
+static vp_adjblock _vp_tonemask_adj_otherblock[12]={
    /* 63     125     250     500       1       2       4       8      16 */
 
-// {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1,  0,  0,  1,  1,  1}}, /* -2(addition) */
-   {{-14,-14,-14,-14,-14,-14,-14,-14,-13,-11,-11,-11, -7, -3, -2, -2,  1}},
+   {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9,  1,  1,  1,  1,  1,  1}}, /* -1 */
 
-// {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1,  0,  0,  0,  0}}, /* -1 */
-   {{-15,-15,-15,-15,-15,-15,-15,-15,-14,-13,-13,-13,-12, -5, -3, -4,  0}},
-   
 /* {{-20,-20,-20,-20,-14,-12,-10, -8, -4,  0,  0, 10,  0,  0,  0,  0,  0}},    0 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 0 */
+   {{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10,  0,  0,  0,  0,  0,  0}}, /* 0 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  5,  0,  0,  0,  0,  0}},    1 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 1 */
+   {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1,  0,  0,  0}}, /* 1 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    2 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 2 */
+   {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1,  0,  0,  0}}, /* 2 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    3 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -7, -5, -6,  0}}, /* 3 */
+   {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2,  0,  0,  0}}, /* 3 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    4 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 4 */
-   
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7  -3, -1, -1 , 0}}, /* 4 */
+
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    5 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 5 */
-   
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7  -3, -1, -1 , 0}}, /* 5 */
+
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    6 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 6 */
-   
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2,  0}}, /* 6 */
+
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    7 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 7 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 7 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    8 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 8 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 8 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    9 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 9 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 9 */
 
 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10,  0,  0,  0,  0,  0,  0,  0,  0}},    10 */
-   {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-14, -9, -7, -8,  0}}, /* 10 */
+   {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2,  0}}, /* 10 */
 };
 
 /* noise bias (transition block) */
-static noise3 _psy_noisebias_trans[13]={
+static noise3 _psy_noisebias_trans[12]={
   /*  63     125     250     500      1k       2k      4k      8k     16k*/
-  /* -2(addition mode) */
-  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-26,-26,-26,-24,-22,-16,-12, -6, -2,  2,  2,  2,  6,  7,  8,  8, 13},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
   /* -1 */
-/*{{{-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,  3,  6,  6, 15},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/
   {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-30,-30,-30,-30,-26,-22,-18,-10, -4,  0,  0,  0,  1,  2,  5,  5, 13},
+    {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2,  2,  2,  3,  6,  6, 15},
     {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
-  /* 0 */
-/*{{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+  /* 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, -8, -4,  0,  0,  0,  0,  2,  4,  10},
     {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4,  -2}}},*/
-  {{{-15,-15,-15,-15,-15,-12, -6, -4,  0,  2,  4,  4,  5,  5,  5,  8, 10},
-    {-30,-30,-30,-30,-26,-22,-20,-12, -6,  0,  0,  0,  0,  1,  2,  3,  6},
-    {-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},
+  {{{-15,-15,-15,-15,-15,-12, -6, -4,  0,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4,  0,  0,  0,  0,  2,  3,   6},
+    {-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}}},*/
-  {{{-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, -1,  1,  4},
-    {-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},
+  {{{-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,  1,   4},
+    {-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}}}, */
-  {{{-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, -3, -3, -3, -3, -1,  1,  3},
+  {{{-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, -3, -3, -3, -2, -1,  0,  3},
     {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}},
-  /* 3 */
-/*{{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  2,  2,  4,  4,  4,  5,  8},
+  /* 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}}},*/
   {{{-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, -2,  0,  3},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2,  0,  2},
     {-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},
+  /* 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}}},*/
   {{{-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, -2,  0,  1},
+    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1,  1},
     {-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},
+  /* 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}}}, */
   {{{-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, -3, -1,  0},
     {-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},
+  /* 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}}},*/
   {{{-24,-24,-24,-24,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4,  7},
-    {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -6, -6, -6, -6, -4, -2,  0},
-    {-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, -8, -6, -6, -6, -6, -5, -2,  0},
+    {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},
+  /* 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}}},*/
   {{{-24,-24,-24,-24,-20,-18,-14, -8, -1,  1,  1,  1,  2,  3,  3,  4,  7},
-    {-34,-34,-34,-34,-30,-30,-24,-20,-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},
+    {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2},
+    {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
+  /* 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}}},*/
-  {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2,  0,  0,  0,  1,  2,  3,  7},
-    {-34,-34,-34,-34,-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},
+  {{{-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,-20,-16,-16,-16,-16,-14,-12,-10, -7},
+    {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}},
+  /* 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}}},*/
   {{{-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}}},
+    {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10},
+    {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}},
   /* 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},
@@ -324,68 +269,62 @@
 };
 
 /*  noise bias (long block) */
-static noise3 _psy_noisebias_long[13]={
-  /*  63     125     250     500      1k       2k      4k      8k     16k*/
-  /* -2(addition mode) */
-  {{{-10,-10,-10,-10,-10, -4,  0,  0,  2,  6,  6,  6,  6, 10, 10, 12, 20},
-    {-20,-20,-20,-20,-20,-20,-10, -2,  2,  2,  2,  2,  3,  5,  8,  8, 13},
-    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
+static noise3 _psy_noisebias_long[12]={
+  /*63     125     250     500      1k       2k      4k      8k     16k*/
   /* -1 */
-/*{{{-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}}},*/
-  {{{-10,-10,-10,-10,-10, -4,  0,  0,  0,  6,  6,  6,  6, 10, 10, 12, 20},
-    {-20,-20,-20,-20,-20,-20,-12, -4,  0,  0,  0,  0,  0,  1,  4,  4, 13},
+  {{{-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}}},
+
   /* 0 */
-/*{{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8,  10},
-    {-20,-20,-20,-20,-20,-20,-20,-14, -6,  0,  0,  0,  0,  0,  2,  4,  10},
-    {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/
-  {{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8, 10},
-    {-20,-20,-20,-20,-20,-20,-20,-12, -6,  0,  0,  0,  0,  1,  2,  3,  6},
+  /*  {{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8,  10},
+      {-20,-20,-20,-20,-20,-20,-20,-14, -6,  0,  0,  0,  0,  0,  2,  4,  10},
+      {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/
+  {{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8,  10},
+    {-20,-20,-20,-20,-20,-20,-20,-14, -6,  0,  0,  0,  0,  0,  2,  3,  6},
     {-20,-20,-20,-20,-20,-20,-20,-14, -8, -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,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/
-  {{{-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, -1,  1,  4},
+  /*  {{{-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,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/
+  {{{-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,  1,  4},
     {-20,-20,-20,-20,-20,-20,-20,-14,-10, -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}}},*/
-  {{{-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, -3, -3, -3, -3, -1,  1,  3},
+  /*  {{{-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}}},*/
+  {{{-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, -3, -3, -3, -2, -1,  0,  3},
     {-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}}},*/
+  /*  {{{-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}}},*/
   {{{-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, -2,  0,  3},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2,  0,  2},
     {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}},
   /* 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}}},*/
+  /*  {{{-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}}},*/
   {{{-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, -2,  0,  1},
+    {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1,  1},
     {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}},
   /* 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}}},*/
+  /*  {{{-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}}},*/
   {{{-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, -3, -1,  0},
     {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}},
   /* 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}}},*/
+  /*  {{{-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}}},*/
   {{{-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,  0},
-    {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},
+    {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2,  0},
+    {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}},
   /* 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},
@@ -405,32 +344,23 @@
 };
 
 /* noise bias (impulse block) */
-static noise3 _psy_noisebias_impulse[13]={
+static noise3 _psy_noisebias_impulse[12]={
   /*  63     125     250     500      1k      2k      4k      8k     16k*/
-  /* -2(addition mode) */
-  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-26,-26,-26,-24,-22,-16,-12, -6, -2,  2,  2,  2,  6,  7,  8,  8, 13},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
   /* -1 */
-/*{{{-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,  3,  6,  6, 15},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/
   {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-30,-30,-30,-30,-26,-22,-18,-10, -4,  0,  0,  0,  1,  2,  5,  5, 13},
+    {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2,  2,  2,  3,  6,  6, 15},
     {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
+
   /* 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}}},*/
+  /*  {{{-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}}},*/
   {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  4,  8,  8,  8, 10, 12, 14, 20},
-    {-30,-30,-30,-30,-26,-22,-20,-12, -6,  0,  0,  0,  0,  1,  2,  3,  6},
+    {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2,  0,  0,  0,  0,  2,  3,  6},
     {-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}}},*/
   {{{-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, -2, -2, -2, -2, -2,  0,  2},
+    {-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},
@@ -445,33 +375,36 @@
     {-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}}},*/
   {{{-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,-12, -8, -8, -8, -6, -6, -6, -4, -2},
+    {-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}}},*/
+  /* 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,-14,-14,-14,-14,-10, -9, -8, -6, -4},
-    {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},
+      {-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}}},*/
+  {{{-20,-20,-20,-20,-20,-18,-14,-10, -4,  0,  0,  0,  0,  4,  4,  6, 11},
+    {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12},
+    {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}},
   /* 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}}},*/
+  /*  {{{-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}}},*/
   {{{-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,-16,-16,-16,-16,-14,-12,-10,-10,-10},
-    {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},
+    {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22},
+    {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}},
   /* 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}}},*/
   {{{-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}}},
+    {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24},
+    {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}},
   /* 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}}},*/
   {{{-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},
+    {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26},
     {-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},
@@ -480,33 +413,28 @@
 };
 
 /* noise bias (padding block) */
-static noise3 _psy_noisebias_padding[13]={
+static noise3 _psy_noisebias_padding[12]={
   /*  63     125     250     500      1k       2k      4k      8k     16k*/
-  /* -2(addition mode) */
-  {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-26,-26,-26,-24,-22,-16,-12, -6, -2,  2,  2,  2,  6,  7,  8,  8, 15},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
+  
   /* -1 */
-/*{{{-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,  3,  6,  6, 15},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/
   {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-30,-30,-30,-30,-26,-22,-18,-10, -4,  0,  0,  1,  2,  3,  6,  6, 15},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -4, -4, -4, -4, -4, -2,  0,  2}}},
+    {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2,  2,  2,  3,  6,  6, 15},
+    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
+
   /* 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}}},*/
   {{{-10,-10,-10,-10,-10, -4,  0,  0,  4,  8,  8,  8,  8, 10, 12, 14, 20},
-    {-30,-30,-30,-30,-26,-22,-20,-12, -6,  0,  0,  0,  2,  4,  4,  6, 10},
+    {-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}}},*/
   {{{-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, -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}}},
   /* 3 */
   {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  6,  8,  8, 14},
@@ -525,11 +453,8 @@
     {-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}}},*/
   {{{-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,-10, -8, -6, -6, -6, -5, -3,  1},
+    {-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},
@@ -553,17 +478,14 @@
   {10,10,100},
 };
 
-static int _psy_tone_suppress[13]={
-/*  -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, */
-  -20,-20,-20,-20,-20,-20,-24,-30,-40,-40,-42,-45,-45,
+static int _psy_tone_suppress[12]={
+  -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45,
 };
-static int _psy_tone_0dB[13]={
-/*  90,90,95,95,95,95,105,105,105,105,105,105, */
-   90,90,90,94,95,95,95,105,105,105,105,105,105,
+static int _psy_tone_0dB[12]={
+  90,90,95,95,95,95,105,105,105,105,105,105,
 };
-static int _psy_noise_suppress[13]={
-/*  -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, */
-  -20,-20,-20,-24,-24,-24,-24,-30,-40,-40,-42,-45,-45,
+static int _psy_noise_suppress[12]={
+  -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
 };
 
 static vorbis_info_psy _psy_info_template={
@@ -584,13 +506,11 @@
 
 /* ath ****************/
 
-static int _psy_ath_floater[13]={
-/*  -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, */
-  -100,-100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
+static int _psy_ath_floater[12]={
+  -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
 };
-static int _psy_ath_abs[13]={
-/*  -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, */
-  -130,-130,-130,-130,-130,-135,-140,-140,-140,-140,-140,-140,-150,
+static int _psy_ath_abs[12]={
+  -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150,
 };
 
 /* stereo setup.  These don't map directly to quality level, there's
@@ -602,22 +522,14 @@
 /* various stereo possibilities */
 
 /* stereo mode by base quality level */
-static adj_stereo _psy_stereo_modes_44[13]={
-  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14        -2(addition mode)  */
-  {{  4,  4,  4,  4,  4,  4,  4,  4,  3,  2,  1,  0,  0,  0,  0},
-   {  8,  8,  8,  8,  8,  8,  7,  6,  6,  6,  6,  6,  5,  4,  3},
-   {  1,  2,  2,  2,  2,  3,  3,  4,  4,  4,  5,  6,  7,  8,  8},
-   { 10,10.5, 11,11.5, 12,12.5, 13, 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},
+static adj_stereo _psy_stereo_modes_44[12]={
+  /*  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,  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}},*/
-  {{  4,  4,  4,  4,  4,  4,  4,  3,  2,  2,  1,  0,  0,  0,  0},
-   {  8,  8,  8,  8,  8,  7,  7,  6,  6,  6,  6,  6,  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        0  */
+
+/*    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},
@@ -626,76 +538,76 @@
    {  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},
    { 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},
+
+
+  /*  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}},*/
-  {{  3,  3,  3,  3,  3,  3,  3,  3,  2,  1,  0,  0,  0,  0,  0},
-   {  8,  8,  8,  8,  6,  6,  5,  4,  4,  4,  4,  4,  4,  3,  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         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}}, */
   {{  3,  3,  3,  3,  3,  3,  3,  2,  1,  1,  0,  0,  0,  0,  0},
    {  8,  8,  6,  6,  5,  5,  4,  4,  4,  4,  4,  4,  3,  2,  1},
    {  3,  4,  4,  5,  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  */
+  /*  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  */
+  /*  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         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}},*/
   {{  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,  7,  8,  8,  8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12},
    { 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         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,  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, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
    { 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         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,  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, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
    { 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         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,  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, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
    { 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   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   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},
@@ -703,17 +615,14 @@
 };
 
 /* tone master attenuation by base quality mode and bitrate tweak */
-static att3 _psy_tone_masteratt_44[13]={
-  {{ 38,  24,  12},  0,    0}, /* -2 */
-//  {{ 35,  21,   9},  0,    0}, /* -1 */
-  {{ 36,  22,  10},  0,    0}, /* -1 */
-//  {{ 30,  20,   8}, -2, 1.25}, /* 0 */
-  {{ 30,  21,   8},  0,    0}, /* 0 */
-//  {{ 25,  14,   4},  0,    0}, /* 1 */
-  {{ 25,  15,   4},  0,    0}, /* 1 */
-  {{ 20,  10,  -2},  0,    0}, /* 2 */
-//  {{ 20,   9,  -4},  0,    0}, /* 3 */
-  {{ 21,  10,  -3},  0,    0}, /* 3 */
+static att3 _psy_tone_masteratt_44[12]={
+  {{ 35,  21,   9},  0,    0}, /* -1 */
+  {{ 30,  20,   8}, -2, 1.25}, /* 0 */
+  /*  {{ 25,  14,   4},  0,    0}, *//* 1 */
+  {{ 25,  12,   2},  0,    0}, /* 1 */
+  /*  {{ 20,  10,  -2},  0,    0}, *//* 2 */
+  {{ 20,   9,  -3},  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 */
@@ -724,50 +633,34 @@
 };
 
 /* lowpass by mode **************/
-static double _psy_lowpass_44[13]={
+static double _psy_lowpass_44[12]={
   /*  15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */
-//  13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999.
-  13.2,14.8,15.1,15.8,16.5,17.2,18.3,20.1,48.,999.,999.,999.,999.
+  13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999.
 };
 
 /* noise normalization **********/
 
-static int _noise_start_short_44[12]={
+static int _noise_start_short_44[11]={
   /*  16,16,16,16,32,32,9999,9999,9999,9999 */
-//  32,16,16,16,32,9999,9999,9999,9999,9999,9999
-  16,32,16,16,32,64,9999,9999,9999,9999,9999,9999
+  32,16,16,16,32,9999,9999,9999,9999,9999,9999
 };
-static int _noise_start_long_44[12]={
+static int _noise_start_long_44[11]={
   /*  128,128,128,256,512,512,9999,9999,9999,9999 */
-//  256,128,128,256,512,9999,9999,9999,9999,9999,9999
-  128,256,128,128,256,512,9999,9999,9999,9999,9999,9999
+  256,128,128,256,512,9999,9999,9999,9999,9999,9999
 };
 
-static int _noise_part_short_44[12]={
-/*  8,8,8,8,8,8,8,8,8,8,8 */
-    8,8,8,8,8,8,8,8,8,8,8,8
+static int _noise_part_short_44[11]={
+    8,8,8,8,8,8,8,8,8,8,8
 };
-static int _noise_part_long_44[12]={
-/*  32,32,32,32,32,32,32,32,32,32,32 */
-    32,32,32,32,32,32,32,32,32,32,32,32
+static int _noise_part_long_44[11]={
+    32,32,32,32,32,32,32,32,32,32,32
 };
 
-static double _noise_thresh_44[12]={
+static double _noise_thresh_44[11]={
   /*  .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */
-//   .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999.,
-   .1462,.1886,.1887,.1975,.355,.8,9999.,9999.,9999.,9999.,9999.,9999.,
+   .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999.,
 };
 
 static double _noise_thresh_5only[2]={
  .5,.5,
 };
-
-/* 32kHz only */
-static int _noise_start_short_32[12]={
-//  40,40,20,20,40,80,9999,9999,9999,9999,9999,9999
-  24,48,24,24,40,80,9999,9999,9999,9999,9999,9999
-};
-static int _noise_start_long_32[12]={
-//  320,320,160,160,320,640,9999,9999,9999,9999,9999,9999
-  160,320,160,160,320,640,9999,9999,9999,9999,9999,9999
-};

Modified: branches/vorbis-aotuv/lib/modes/psych_8.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/psych_8.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/psych_8.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,29 +15,23 @@
 
  ********************************************************************/
 
-static att3 _psy_tone_masteratt_8[4]={
-  {{ 32,  25,  12},  0,   0},  /* -2 */
-  {{ 32,  25,  12},  0,   0},  /* -1 */
-  {{ 30,  25,  12},  0,   0},  /*  0 */
-  {{ 20,   0, -14},  0,   0},  /* 10 */
+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[4]={
+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, 0, 5, 5,99,99,99}}, /* -2 */
-  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */
-  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /*  0 */
-  {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 10 */
+  {{-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[4]={
+static noise3 _psy_noisebias_8[3]={
   /*  63     125     250     500      1k       2k      4k      8k     16k*/
-  {{{-10,-10,-10,-10, -5, -5, -5,  2,  4,  8,  8,  8, 10, 10, 99, 99, 99},
-    {-10,-10,-10,-10, -5, -4, -2,  2,  3,  4,  4,  4,  7,  8, 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, -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}}},
@@ -52,7 +46,7 @@
 };
 
 /* stereo mode by base quality level */
-static adj_stereo _psy_stereo_modes_8[4]={
+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},
@@ -62,33 +56,21 @@
    {  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[3]={
+static noiseguard _psy_noiseguards_8[2]={
   {10,10,-1},
   {10,10,-1},
-  {10,10,-1},
 };
 
-static compandblock _psy_compand_8[3]={
+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, 16,     /* 23dB */
-    17,18,19,20,21,22,23, 24,     /* 31dB */
-    25,26,27,28,29,30,31, 32,     /* 39dB */
-  }},
-  {{
-     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 */
@@ -102,19 +84,19 @@
   }},
 };
 
-static double _psy_lowpass_8[4]={2.6,3.,4.,4.};
-static int _noise_start_8[3]={
-  64,64,64,
+static double _psy_lowpass_8[3]={3.,4.,4.};
+static int _noise_start_8[2]={
+  64,64,
 };
-static int _noise_part_8[3]={
-  8,8,8,
+static int _noise_part_8[2]={
+  8,8,
 };
 
-static int _psy_ath_floater_8[4]={
-  -100,-100,-100,-105,
+static int _psy_ath_floater_8[3]={
+  -100,-100,-105,
 };
 
-static int _psy_ath_abs_8[4]={
-  -130,-130,-130,-140,
+static int _psy_ath_abs_8[3]={
+  -130,-130,-140,
 };
 

Modified: branches/vorbis-aotuv/lib/modes/residue_16.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/residue_16.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/residue_16.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -84,8 +84,7 @@
    &_resbook_16s_2,&_resbook_16s_2}
 };
 
-static vorbis_mapping_template _mapres_template_16_stereo[4]={
-  { _map_nominal, _res_16s_0 }, /* -1 */
+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 */
@@ -157,8 +156,7 @@
 };
 
 
-static vorbis_mapping_template _mapres_template_16_uncoupled[4]={
-  { _map_nominal_u, _res_16u_0 }, /* -1 */
+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 */

Modified: branches/vorbis-aotuv/lib/modes/residue_44.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/residue_44.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/residue_44.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -278,7 +278,6 @@
 };
 
 static vorbis_mapping_template _mapres_template_44_stereo[]={
-  { _map_nominal, _res_44s_n1 }, /* -2 */
   { _map_nominal, _res_44s_n1 }, /* -1 */
   { _map_nominal, _res_44s_0 }, /* 0 */
   { _map_nominal, _res_44s_1 }, /* 1 */

Modified: branches/vorbis-aotuv/lib/modes/residue_44u.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/residue_44u.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/residue_44u.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -304,7 +304,6 @@
 };
 
 static vorbis_mapping_template _mapres_template_44_uncoupled[]={
-  { _map_nominal_u, _res_44u_n1 }, /* -2 */
   { _map_nominal_u, _res_44u_n1 }, /* -1 */
   { _map_nominal_u, _res_44u_0 }, /* 0 */
   { _map_nominal_u, _res_44u_1 }, /* 1 */

Modified: branches/vorbis-aotuv/lib/modes/residue_8.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/residue_8.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/residue_8.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -48,8 +48,7 @@
    &_resbook_8s_1,&_resbook_8s_1},
 };
 
-static vorbis_mapping_template _mapres_template_8_stereo[3]={
-  { _map_nominal, _res_8s_0 }, /* -1 */
+static vorbis_mapping_template _mapres_template_8_stereo[2]={
   { _map_nominal, _res_8s_0 }, /* 0 */
   { _map_nominal, _res_8s_1 }, /* 1 */
 };
@@ -92,8 +91,7 @@
    &_resbook_8u_1,&_resbook_8u_1},
 };
 
-static vorbis_mapping_template _mapres_template_8_uncoupled[3]={
-  { _map_nominal_u, _res_8u_0 }, /* -1 */
+static vorbis_mapping_template _mapres_template_8_uncoupled[2]={
   { _map_nominal_u, _res_8u_0 }, /* 0 */
   { _map_nominal_u, _res_8u_1 }, /* 1 */
 };

Modified: branches/vorbis-aotuv/lib/modes/setup_11.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_11.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_11.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -17,31 +17,28 @@
 
 #include "psych_11.h"
 
-static int blocksize_11[3]={
-  512,512,512
+static int blocksize_11[2]={
+  512,512
 };
 
-static int _floor_mapping_11[3]={
-  6,6,6
+static int _floor_mapping_11[2]={
+  6,6,
 };
 
-static double rate_mapping_11[4]={
-//  8000.,13000.,44000.,
-  8000.,10000.,13000.,44000.,
+static double rate_mapping_11[3]={
+  8000.,13000.,44000.,
 };
 
-static double rate_mapping_11_uncoupled[4]={
-//  12000.,20000.,50000.,
-  14000.,16000.,20000.,50000.,
+static double rate_mapping_11_uncoupled[3]={
+  12000.,20000.,50000.,
 };
 
-static double quality_mapping_11[4]={
-  -.2,-.1,.0,1.
+static double quality_mapping_11[3]={
+  -.1,.0,1.
 };
 
 ve_setup_data_template ve_setup_11_stereo={
-//  2,
-  3,
+  2,
   rate_mapping_11,
   quality_mapping_11,
   2,
@@ -92,8 +89,7 @@
 };
 
 ve_setup_data_template ve_setup_11_uncoupled={
-//  2,
-  3,
+  2,
   rate_mapping_11_uncoupled,
   quality_mapping_11,
   -1,

Modified: branches/vorbis-aotuv/lib/modes/setup_16.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_16.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_16.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -18,40 +18,36 @@
 #include "psych_16.h"
 #include "residue_16.h"
 
-static int blocksize_16_short[4]={
-  1024,1024,512,512
+static int blocksize_16_short[3]={
+  1024,512,512
 };
-static int blocksize_16_long[4]={
-  1024,1024,1024,1024
+static int blocksize_16_long[3]={
+  1024,1024,1024
 };
 
-static int _floor_mapping_16_short[4]={
-  9,9,3,3
+static int _floor_mapping_16_short[3]={
+  9,3,3
 };
-static int _floor_mapping_16[4]={
-  9,9,9,9
+static int _floor_mapping_16[3]={
+  9,9,9
 };
 
-static double rate_mapping_16[5]={
-//  12000.,20000.,44000.,86000.
-  10000.,12000.,20000.,44000.,86000.
+static double rate_mapping_16[4]={
+  12000.,20000.,44000.,86000.
 };
 
-static double rate_mapping_16_uncoupled[5]={
-//  16000.,28000.,64000.,100000.
-  16000.,18000.,28000.,64000.,100000.
+static double rate_mapping_16_uncoupled[4]={
+  16000.,28000.,64000.,100000.
 };
 
-static double _global_mapping_16[5]={ 2., 2., 3., 4., 5. };
+static double _global_mapping_16[4]={ 1., 2., 3., 4. };
 
-static double quality_mapping_16[5]={ -.2,-.1,.05,.5,1. };
+static double quality_mapping_16[4]={ -.1,.05,.5,1. };
 
-//static double _psy_compand_16_mapping[5]={ 0., 0., .8, 1., 1.};
-static double _psy_compand_16_mapping[5]={ 0., 1., 1.8, 2., 2.};
+static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.};
 
 ve_setup_data_template ve_setup_16_stereo={
-//  3,
-  4,
+  3,
   rate_mapping_16,
   quality_mapping_16,
   2,
@@ -102,8 +98,7 @@
 };
 
 ve_setup_data_template ve_setup_16_uncoupled={
-//  3,
-  4,
+  3,
   rate_mapping_16_uncoupled,
   quality_mapping_16,
   -1,

Modified: branches/vorbis-aotuv/lib/modes/setup_22.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_22.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_22.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,21 +15,18 @@
 
  ********************************************************************/
 
-static double rate_mapping_22[5]={
-//  15000.,20000.,44000.,86000.
-  14000.,16000.,20000.,44000.,86000.
+static double rate_mapping_22[4]={
+  15000.,20000.,44000.,86000.
 };
 
-static double rate_mapping_22_uncoupled[5]={
-//  16000.,28000.,50000.,90000.
-  22000.,24000.,28000.,50000.,90000.
+static double rate_mapping_22_uncoupled[4]={
+  16000.,28000.,50000.,90000.
 };
 
-static double _psy_lowpass_22[5]={8.5,9.5,11.,30.,99.};
+static double _psy_lowpass_22[4]={9.5,11.,30.,99.};
 
 ve_setup_data_template ve_setup_22_stereo={
-//  3,
-  4,
+  3,
   rate_mapping_22,
   quality_mapping_16,
   2,
@@ -80,8 +77,7 @@
 };
 
 ve_setup_data_template ve_setup_22_uncoupled={
-//  3,
-  4,
+  3,
   rate_mapping_22_uncoupled,
   quality_mapping_16,
   -1,

Modified: branches/vorbis-aotuv/lib/modes/setup_32.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_32.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_32.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,26 +15,22 @@
 
  ********************************************************************/
 
-static double rate_mapping_32[13]={
-//  18000.,28000.,35000.,45000.,56000.,60000.,
-  14000.,21000.,28000.,35000.,45000.,56000.,60000.,
+static double rate_mapping_32[12]={
+  18000.,28000.,35000.,45000.,56000.,60000.,
   75000.,90000.,100000.,115000.,150000.,190000.,
 };
 
-static double rate_mapping_32_un[13]={
-//  30000.,42000.,52000.,64000.,72000.,78000.,
-  24000.,32000.,42000.,52000.,64000.,72000.,78000.,
+static double rate_mapping_32_un[12]={
+  30000.,42000.,52000.,64000.,72000.,78000.,
   86000.,92000.,110000.,120000.,140000.,190000.,
 };
 
-static double _psy_lowpass_32[13]={
-//  12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
-  12.,12.6,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
+static double _psy_lowpass_32[12]={
+  12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
 };
 
 ve_setup_data_template ve_setup_32_stereo={
-//  11,
-  12,
+  11,
   rate_mapping_32,
   quality_mapping_44,
   2,
@@ -63,7 +59,7 @@
   _psy_compand_short_mapping,
   _psy_compand_long_mapping,
 
-  {_noise_start_short_32,_noise_start_long_32},
+  {_noise_start_short_44,_noise_start_long_44},
   {_noise_part_short_44,_noise_part_long_44},
   _noise_thresh_44,
 
@@ -85,8 +81,7 @@
 };
 
 ve_setup_data_template ve_setup_32_uncoupled={
-//  11,
-  12,
+  11,
   rate_mapping_32_un,
   quality_mapping_44,
   -1,
@@ -115,7 +110,7 @@
   _psy_compand_short_mapping,
   _psy_compand_long_mapping,
 
-  {_noise_start_short_32,_noise_start_long_32},
+  {_noise_start_short_44,_noise_start_long_44},
   {_noise_part_short_44,_noise_part_long_44},
   _noise_thresh_44,
 

Modified: branches/vorbis-aotuv/lib/modes/setup_44.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_44.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_44.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -19,47 +19,43 @@
 #include "modes/residue_44.h"
 #include "modes/psych_44.h"
 
-static double rate_mapping_44_stereo[13]={
-//  22500.,32000.,40000.,48000.,56000.,64000.,
-  16000.,24000.,32000.,40000.,48000.,56000.,64000.,
+static double rate_mapping_44_stereo[12]={
+  22500.,32000.,40000.,48000.,56000.,64000.,
   80000.,96000.,112000.,128000.,160000.,250001.
 };
 
-static double quality_mapping_44[13]={
-  -.2,-.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
+static double quality_mapping_44[12]={
+  -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
 };
 
-static int blocksize_short_44[12]={
-  512,512,256,256,256,256,256,256,256,256,256,256
+static int blocksize_short_44[11]={
+  512,256,256,256,256,256,256,256,256,256,256
 };
-static int blocksize_long_44[12]={
-  4096,4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
+static int blocksize_long_44[11]={
+  4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
 };
 
-static double _psy_compand_short_mapping[13]={
-  1., 1., 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
+static double _psy_compand_short_mapping[12]={
+  0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
 };
-static double _psy_compand_long_mapping[13]={
-  4., 4., 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
+static double _psy_compand_long_mapping[12]={
+  3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
 };
 
-static double _global_mapping_44[13]={
+static double _global_mapping_44[12]={
   /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */
-// 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4.
-  0., 1., 2., 2., 2.5, 3., 3., 3.5, 3.7, 4., 4., 5., 5. // low
-//  0., 1., 2., 2., 2.5, 3., 3.2, 4.0, 4.0, 4.0, 4.5, 5., 5. // high
+ 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4.
 };
 
-static int _floor_short_mapping_44[12]={
-  1,1,0,0,2,2,4,5,5,5,5,5
+static int _floor_short_mapping_44[11]={
+  1,0,0,2,2,4,5,5,5,5,5
 };
-static int _floor_long_mapping_44[12]={
-  8,8,7,7,7,7,7,7,7,7,7,7
+static int _floor_long_mapping_44[11]={
+  8,7,7,7,7,7,7,7,7,7,7
 };
 
 ve_setup_data_template ve_setup_44_stereo={
-//  11,
-  12,
+  11,
   rate_mapping_44_stereo,
   quality_mapping_44,
   2,

Modified: branches/vorbis-aotuv/lib/modes/setup_44u.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_44u.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_44u.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -17,15 +17,13 @@
 
 #include "modes/residue_44u.h"
 
-static double rate_mapping_44_un[13]={
-//  32000.,48000.,60000.,70000.,80000.,86000.,
-  26000.,32000.,48000.,60000.,70000.,80000.,86000.,
+static double rate_mapping_44_un[12]={
+  32000.,48000.,60000.,70000.,80000.,86000.,
   96000.,110000.,120000.,140000.,160000.,240001.
 };
 
 ve_setup_data_template ve_setup_44_uncoupled={
-//  11,
-  12,
+  11,
   rate_mapping_44_un,
   quality_mapping_44,
   -1,

Modified: branches/vorbis-aotuv/lib/modes/setup_8.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_8.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_8.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -18,37 +18,32 @@
 #include "psych_8.h"
 #include "residue_8.h"
 
-static int blocksize_8[3]={
-  512,512,512
+static int blocksize_8[2]={
+  512,512
 };
 
-static int _floor_mapping_8[3]={
-  6,6,6
+static int _floor_mapping_8[2]={
+  6,6,
 };
 
-static double rate_mapping_8[4]={
-//  6000.,9000.,32000.,
-  5000.,6000.,9000.,32000.,
+static double rate_mapping_8[3]={
+  6000.,9000.,32000.,
 };
 
-static double rate_mapping_8_uncoupled[4]={
-//  8000.,14000.,42000.,
-  8000.,10000.,14000.,42000.,
+static double rate_mapping_8_uncoupled[3]={
+  8000.,14000.,42000.,
 };
 
-static double quality_mapping_8[4]={
-  -.2,-.1,.0,1.
+static double quality_mapping_8[3]={
+  -.1,.0,1.
 };
 
-//static double _psy_compand_8_mapping[3]={ 0., 1., 1.};
-static double _psy_compand_8_mapping[4]={ 0., 1., 2., 2.};
+static double _psy_compand_8_mapping[3]={ 0., 1., 1.};
 
-//static double _global_mapping_8[3]={ 1., 2., 3. };
-static double _global_mapping_8[4]={ 2., 2., 3., 4. };
+static double _global_mapping_8[3]={ 1., 2., 3. };
 
 ve_setup_data_template ve_setup_8_stereo={
-//  2,
-  3,
+  2,
   rate_mapping_8,
   quality_mapping_8,
   2,
@@ -99,8 +94,7 @@
 };
 
 ve_setup_data_template ve_setup_8_uncoupled={
-//  2,
-  3,
+  2,
   rate_mapping_8_uncoupled,
   quality_mapping_8,
   -1,

Modified: branches/vorbis-aotuv/lib/modes/setup_X.h
===================================================================
--- branches/vorbis-aotuv/lib/modes/setup_X.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/modes/setup_X.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,14 +15,13 @@
 
  ********************************************************************/
 
-static double rate_mapping_X[13]={
-  -1.,-1.,-1.,-1.,-1.,-1.,-1.
+static double rate_mapping_X[12]={
+  -1.,-1.,-1.,-1.,-1.,-1.,
   -1.,-1.,-1.,-1.,-1.,-1.
 };
 
 ve_setup_data_template ve_setup_X_stereo={
-//  11,
-  12,
+  11,
   rate_mapping_X,
   quality_mapping_44,
   2,
@@ -73,8 +72,7 @@
 };
 
 ve_setup_data_template ve_setup_X_uncoupled={
-//  11,
-  12,
+  11,
   rate_mapping_X,
   quality_mapping_44,
   -1,
@@ -125,8 +123,7 @@
 };
 
 ve_setup_data_template ve_setup_XX_stereo={
-//  2,
-  3,
+  2,
   rate_mapping_X,
   quality_mapping_8,
   2,
@@ -177,8 +174,7 @@
 };
 
 ve_setup_data_template ve_setup_XX_uncoupled={
-//  2,
-  3,
+  2,
   rate_mapping_X,
   quality_mapping_8,
   -1,

Modified: branches/vorbis-aotuv/lib/psy.c
===================================================================
--- branches/vorbis-aotuv/lib/psy.c	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/psy.c	2006-11-05 15:39:26 UTC (rev 12031)
@@ -30,35 +30,9 @@
 #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};
+static double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10};
 
-/*
-  rephase   = reverse phase limit (postpoint)
-                                                0    1    2    3    4    5    6    7    8  */
-static double stereo_threshholds[]=           {0.0, 0.5, 1.0, 1.5, 2.5, 4.5, 8.5,16.5, 9e10};
-static double stereo_threshholds_rephase[]=   {0.0, 0.5, 0.5, 1.0, 1.5, 1.5, 2.5, 2.5, 9e10};
-
-static double stereo_threshholds_low[]=       {0.0, 0.5, 0.5, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0};
-static double stereo_threshholds_high[]=      {0.0, 0.5, 0.5, 0.5, 1.0, 3.0, 5.5, 8.5, 0.0};
-
-
-static int m3n32[] = {21,13,10,4};
-static int m3n44[] = {15,9,7,3};
-static int m3n48[] = {14,8,6,3};
-
-static int temp_bfn[128] = {
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
- 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
- 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,11,11,11,11,
-12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,
-16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,
-20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,
-24,24,24,24,25,25,25,24,23,22,21,20,19,18,17,16,
-15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
-};
-
-static float nnmid_th=0.2;
-
-
 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;
@@ -310,56 +284,12 @@
   p->n=n;
   p->rate=rate;
 
-  /* AoTuV HF weighting etc. */
-  p->n25p=n/4;
-  p->n33p=n/3;
-  p->n75p=n*3/4;
-  if(rate < 26000){
-  	/* below 26kHz */
-  	p->m_val = 0;
-  	for(i=0; i<4; i++) p->m3n[i] = 0;
-  	p->tonecomp_endp=0; // dummy
-  	p->tonecomp_thres=.25;
-  	p->st_freqlimit=n;
-  	p->min_nn_lp=0;
-  }else if(rate < 38000){
-  	/* 32kHz */
-  	p->m_val = .93;
-  	for(i=0; i<4; i++) p->m3n[i] = m3n32[i];
-  	if(n==128)      { p->tonecomp_endp= 124; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit=n; p->min_nn_lp=   0;}
-  	else if(n==256) { p->tonecomp_endp= 248; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit=n; p->min_nn_lp=   0;}
-  	else if(n==1024){ p->tonecomp_endp= 992; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit=n; p->min_nn_lp= 832;}
-  	else if(n==2048){ p->tonecomp_endp=1984; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit=n; p->min_nn_lp=1664;}
-  }else if(rate > 46000){
-  	/* 48kHz */
-  	p->m_val = 1.205;
-  	for(i=0; i<4; i++) p->m3n[i] = m3n48[i];
-  	if(n==128)      { p->tonecomp_endp=  83; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit=  89; p->min_nn_lp=   0;}
-  	else if(n==256) { p->tonecomp_endp= 166; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit= 178; p->min_nn_lp=   0;}
-  	else if(n==1024){ p->tonecomp_endp= 664; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit= 712; p->min_nn_lp= 576;}
-  	else if(n==2048){ p->tonecomp_endp=1328; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit=1424; p->min_nn_lp=1152;}
-  }else{
-  	/* 44.1kHz */
-  	p->m_val = 1.;
-  	for(i=0; i<4; i++) p->m3n[i] = m3n44[i];
-  	if(n==128)      { p->tonecomp_endp=  90; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit=  96; p->min_nn_lp=   0;}
-  	else if(n==256) { p->tonecomp_endp= 180; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit= 192; p->min_nn_lp=   0;}
-  	else if(n==1024){ p->tonecomp_endp= 720; p->tonecomp_thres=.5;
-  	                 p->st_freqlimit= 768; p->min_nn_lp= 608;}
-  	else if(n==2048){ p->tonecomp_endp=1440; p->tonecomp_thres=.7;
-  	                 p->st_freqlimit=1536; p->min_nn_lp=1216;}
-  }
-
+  /* AoTuV HF weighting */
+  p->m_val = 1.;
+  if(rate < 26000) p->m_val = 0;
+  else if(rate < 38000) p->m_val = .94;   /* 32kHz */
+  else if(rate > 46000) p->m_val = 1.275; /* 48kHz */
+  
   /* set up the lookups for a given blocksize and sample rate */
 
   for(i=0,j=0;i<MAX_ATH-1;i++){
@@ -760,70 +690,70 @@
 }
 
 static float FLOOR1_fromdB_INV_LOOKUP[256]={
-  0.F, 8.81683e+06F, 8.27882e+06F, 7.77365e+06F, // 1-4
-  7.29930e+06F, 6.85389e+06F, 6.43567e+06F, 6.04296e+06F, // 5-8
-  5.67422e+06F, 5.32798e+06F, 5.00286e+06F, 4.69759e+06F, // 9-12
-  4.41094e+06F, 4.14178e+06F, 3.88905e+06F, 3.65174e+06F, // 13-16
-  3.42891e+06F, 3.21968e+06F, 3.02321e+06F, 2.83873e+06F, // 17-20
-  2.66551e+06F, 2.50286e+06F, 2.35014e+06F, 2.20673e+06F, // 21-24
-  2.07208e+06F, 1.94564e+06F, 1.82692e+06F, 1.71544e+06F, // 25-28
-  1.61076e+06F, 1.51247e+06F, 1.42018e+06F, 1.33352e+06F, // 29-32
-  1.25215e+06F, 1.17574e+06F, 1.10400e+06F, 1.03663e+06F, // 33-36
-  973377.F, 913981.F, 858210.F, 805842.F, // 37-40
-  756669.F, 710497.F, 667142.F, 626433.F, // 41-44
-  588208.F, 552316.F, 518613.F, 486967.F, // 45-48
-  457252.F, 429351.F, 403152.F, 378551.F, // 49-52
-  355452.F, 333762.F, 313396.F, 294273.F, // 53-56
-  276316.F, 259455.F, 243623.F, 228757.F, // 57-60
-  214798.F, 201691.F, 189384.F, 177828.F, // 61-64
-  166977.F, 156788.F, 147221.F, 138237.F, // 65-68
-  129802.F, 121881.F, 114444.F, 107461.F, // 69-72
-  100903.F, 94746.3F, 88964.9F, 83536.2F, // 73-76
-  78438.8F, 73652.5F, 69158.2F, 64938.1F, // 77-80
-  60975.6F, 57254.9F, 53761.2F, 50480.6F, // 81-84
-  47400.3F, 44507.9F, 41792.0F, 39241.9F, // 85-88
-  36847.3F, 34598.9F, 32487.7F, 30505.3F, // 89-92
-  28643.8F, 26896.0F, 25254.8F, 23713.7F, // 93-96
-  22266.7F, 20908.0F, 19632.2F, 18434.2F, // 97-100
-  17309.4F, 16253.1F, 15261.4F, 14330.1F, // 101-104
-  13455.7F, 12634.6F, 11863.7F, 11139.7F, // 105-108
-  10460.0F, 9821.72F, 9222.39F, 8659.64F, // 109-112
-  8131.23F, 7635.06F, 7169.17F, 6731.70F, // 113-116
-  6320.93F, 5935.23F, 5573.06F, 5232.99F, // 117-120
-  4913.67F, 4613.84F, 4332.30F, 4067.94F, // 121-124
-  3819.72F, 3586.64F, 3367.78F, 3162.28F, // 125-128
-  2969.31F, 2788.13F, 2617.99F, 2458.24F, // 129-132
-  2308.24F, 2167.39F, 2035.14F, 1910.95F, // 133-136
-  1794.35F, 1684.85F, 1582.04F, 1485.51F, // 137-140
-  1394.86F, 1309.75F, 1229.83F, 1154.78F, // 141-144
-  1084.32F, 1018.15F, 956.024F, 897.687F, // 145-148
-  842.910F, 791.475F, 743.179F, 697.830F, // 149-152
-  655.249F, 615.265F, 577.722F, 542.469F, // 153-156
-  509.367F, 478.286F, 449.101F, 421.696F, // 157-160
-  395.964F, 371.803F, 349.115F, 327.812F, // 161-164
-  307.809F, 289.026F, 271.390F, 254.830F, // 165-168
-  239.280F, 224.679F, 210.969F, 198.096F, // 169-172
-  186.008F, 174.658F, 164.000F, 153.993F, // 173-176
-  144.596F, 135.773F, 127.488F, 119.708F, // 177-180
-  112.404F, 105.545F, 99.1046F, 93.0572F, // 181-184
-  87.3788F, 82.0469F, 77.0404F, 72.3394F, // 185-188
-  67.9252F, 63.7804F, 59.8885F, 56.2341F, // 189-192
-  52.8027F, 49.5807F, 46.5553F, 43.7144F, // 193-196
-  41.0470F, 38.5423F, 36.1904F, 33.9821F, // 197-200
-  31.9085F, 29.9614F, 28.1332F, 26.4165F, // 201-204
-  24.8045F, 23.2910F, 21.8697F, 20.5352F, // 205-208
-  19.2822F, 18.1056F, 17.0008F, 15.9634F, // 209-212
-  14.9893F, 14.0746F, 13.2158F, 12.4094F, // 213-216
-  11.6522F, 10.9411F, 10.2735F, 9.64662F, // 217-220
-  9.05798F, 8.50526F, 7.98626F, 7.49894F, // 221-224
-  7.04135F, 6.61169F, 6.20824F, 5.82941F, // 225-228
-  5.47370F, 5.13970F, 4.82607F, 4.53158F, // 229-232
-  4.25507F, 3.99542F, 3.75162F, 3.52269F, // 233-236
-  3.30774F, 3.10590F, 2.91638F, 2.73842F, // 237-240
-  2.57132F, 2.41442F, 2.26709F, 2.12875F, // 241-244
-  1.99885F, 1.87688F, 1.76236F, 1.65482F, // 245-248
-  1.55384F, 1.45902F, 1.36999F, 1.28640F, // 249-252
-  1.20790F, 1.13419F, 1.06499F, 1.F // 253-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,
@@ -846,7 +776,6 @@
 }
 
 void _vp_noisemask(vorbis_look_psy *p,
-		   float noise_compand_level,
 		   float *logmdct, 
 		   float *logmask){
 
@@ -885,19 +814,7 @@
   }
 #endif
 
-  /* aoTuV M5 extension */
-  i=0;
-  if((p->vi->noisecompand_high[NOISE_COMPAND_LEVELS-1] > 1) && (noise_compand_level > 0)){
-  	int thter = p->n33p;
-  	for(;i<thter;i++){
-    	int dB=logmask[i]+.5;
-    	if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
-    	if(dB<0)dB=0;
-    	logmask[i]= work[i]+p->vi->noisecompand[dB]-
-    	  ((p->vi->noisecompand[dB]-p->vi->noisecompand_high[dB])*noise_compand_level);
-  	}
-  }
-  for(;i<n;i++){
+  for(i=0;i<n;i++){
     int dB=logmask[i]+.5;
     if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
     if(dB<0)dB=0;
@@ -937,173 +854,19 @@
 			int offset_select,
 			float *logmask,
 			float *mdct,
-			float *logmdct,
-			float *lastmdct, float *tempmdct,
-			float low_compand,
-			int end_block,
-			int blocktype, int modenumber,
-			int nW_modenumber,
-			int lW_blocktype, int lW_modenumber, int lW_no){
-
-  int i,j,n=p->n;
-  int m2_sw=0,  padth; /* aoTuV for M2 */
-  int it_sw, *m3n, m3_count; /* aoTuV for M3 */
-  int m4_end, lp_pos, m4_start; /* aoTuV for M4 */
-  float de, coeffi, cx; /* aoTuV for M1 */
-  float toneth; /* aoTuV for M2 */
-  float noise_rate, noise_rate_low, noise_center, rate_mod; /* aoTuV for M3 */
-  float m4_thres; /* aoTuV for M4 */
+			float *logmdct){
+  int i,n=p->n;
+  float de, coeffi, cx;/* AoTuV */
   float toneatt=p->vi->tone_masteratt[offset_select];
 
   cx = p->m_val;
-  m3n = p->m3n;
-  m4_start=p->vi->normal_start;
-  m4_end = p->tonecomp_endp;
-  m4_thres = p->tonecomp_thres;
-  lp_pos=9999;
   
-  end_block+=p->vi->normal_partition;
-  if(end_block>n)end_block=n;
-  
-  /* Collapse of low(mid) frequency is prevented. (for 32/44/48kHz q-2) */
-  if(low_compand<0 || toneatt<25.)low_compand=0;
-  else low_compand*=(toneatt-25.);
-  
-  /** @ M2 PRE **/
-  if(p->vi->normal_thresh<.48){
-  	if((cx > 0.5) && !modenumber && blocktype && (n==128)){
-    	if(p->vi->normal_thresh>.35) padth = 10+(int)(p->vi->flacint*100);
-    	else padth = 10;
-    	m2_sw=1;
-    }
-  }
-
-  /** @ M3 PRE **/
-  m3_count = 3;
-  if(toneatt < 3) m3_count = 2; // q6~
-  if((n == 128) && !modenumber && !blocktype){
-  	if(!lW_blocktype && !lW_modenumber){ /* last window "short" - type "impulse" */
-  		if(lW_no < 8){
-  			/* impulse - @impulse case1 */
-  			noise_rate = 0.7-(float)(lW_no-1)/17;
-  			noise_center = (float)(lW_no*m3_count);
-  		}else{
-  			/* impulse - @impulse case2 */
-  			noise_rate = 0.3;
-  			noise_center = 25;
-  			if((lW_no*m3_count) < 24) noise_center = lW_no*m3_count;
-  		}
-  		if(offset_select == 1){
-  			for(i=0; i<128; i++) tempmdct[i] -= 5;
-  		}
-  	}else{ /* non_impulse - @Short(impulse) case */
-  		noise_rate = 0.7;
-  		noise_center = 0;
-  		if(offset_select == 1){
-  			for(i=0; i<128; i++) tempmdct[i] = lastmdct[i] - 5;
-  		}
-  	}
-  	noise_rate_low = 0;
-  	it_sw = 1;
-  }else{
-  	it_sw = 0;
-  }
-  
-  /** @ M3&M4 PRE **/
-  if(cx < 0.5){
-  	it_sw = 0; /* for M3 */
-  	m4_end=end_block; /* for M4 */
-  }else if(p->vi->normal_thresh>1.){
-  	m4_start = 9999;
-  }else{
-  	if(m4_end>end_block)lp_pos=m4_end;
-  	else lp_pos=end_block;
-  }
-
   for(i=0;i<n;i++){
     float val= noise[i]+p->noiseoffset[offset_select][i];
-    float tval= tone[i]+toneatt;
-    if(i<=m4_start)tval-=low_compand;
     if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp;
-    
-    /* AoTuV */
-    /** @ M2 MAIN **
-    floor is pulled below suitably. (padding block only) (#2)
-    by Aoyumi @ 2006/06/14
-    */
-    if(m2_sw){
-    	// the conspicuous low level pre-echo of the padding block origin is reduced. 
-    	if((logmdct[i]-lastmdct[i]) > 20){
-    		if(i > m3n[3]) val -= (logmdct[i]-lastmdct[i]-20)/padth;
-    		else val -= (logmdct[i]-lastmdct[i]-20)/(padth+padth);
-    	}
-    }
-    
-    /* AoTuV */
-    /** @ M3 MAIN **
-    Dynamic impulse block noise control. (#4)
-    48/44.1/32kHz only.
-    by Aoyumi @ 2006/02/02
-    */
-    if(it_sw){
-    	for(j=1; j<=temp_bfn[i]; j++){
-    		float tempbuf = logmdct[i]-(75/temp_bfn[i]*j)-5;
-			if( (tempmdct[i+j] < tempbuf) && (tempmdct[i+j] < (logmdct[i+j]-5)) )
-			 tempmdct[i+j] = logmdct[i+j] - 5;
-		}
-    	if(val > tval){
-    		if( (val>lastmdct[i]) && (logmdct[i]>(tempmdct[i]+noise_center)) ){
-    			float valmask=0;
-    			tempmdct[i] = logmdct[i];
-    			
-    			if(logmdct[i]>lastmdct[i]){
-    				rate_mod = noise_rate;
-    			}else{
-    				rate_mod = noise_rate_low;
-				}
-				if(i > m3n[1]){
-						if((val-tval)>30) valmask=((val-tval-30)/10+30)*rate_mod;
-						else valmask=(val-tval)*rate_mod;
-				}else if(i > m3n[2]){
-						if((val-tval)>20) valmask=((val-tval-20)/10+20)*rate_mod;
-						else valmask=(val-tval)*rate_mod;
-				}else if(i > m3n[3]){
-						if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.5;
-						else valmask=(val-tval)*rate_mod*0.5;
-				}else{
-					if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.3;
-					else valmask=(val-tval)*rate_mod*0.3;
-				}
-				if((val-valmask)>lastmdct[i])val-=valmask;
-				else val=lastmdct[i];
-			}
-   		}
-   	}
-   	
-   	/* This affects calculation of a floor curve. */
-   	if(i>=lp_pos)logmdct[i]=-160;
-   	
-     /* AoTuV */
-	/** @ M4 MAIN **
-	The purpose of this portion is working Noise Normalization more correctly. 
-	(There is this in order to prevent extreme boost of floor)
-	  m4_start = start point
-	  m4_end   = end point
-	  m4_thres = threshold
-	by Aoyumi @ 2006/03/20
-	*/
-    //logmask[i]=max(val,tval);
-    if(val>tval){
-		logmask[i]=val;
-	}else if((i>m4_start) && (i<m4_end) && (logmdct[i]>-140)){
-		if(logmdct[i]>val){
-			if(logmdct[i]<tval)tval-=(tval-val)*m4_thres;
-		}else{
-			if(val<tval)tval-=(tval-val)*m4_thres;
-		}
-		logmask[i]=tval;
-	}else logmask[i]=tval;
+    logmask[i]=max(val,tone[i]+toneatt);
 
+
     /* AoTuV */
     /** @ M1 **
 	The following codes improve a noise problem.  
@@ -1141,24 +904,6 @@
       
     }
   }
-
-  /** @ M3 SET lastmdct **/
-  if(offset_select == 1){
-	if(n == 1024){
-		if(!nW_modenumber){
-			for(i=0; i<128; i++){
-				lastmdct[i] = logmdct[i*8];
-				for(j=1; j<8; j++){
-					if(lastmdct[i] > logmdct[i*8+j]){
-						lastmdct[i] = logmdct[i*8+j];
-					}
-				}
-			}
-		}
-	}else if(n == 128){
-		for(i=0; i<128; i++) lastmdct[i] = logmdct[i];
-	}
-  }
 }
 
 float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){
@@ -1210,7 +955,7 @@
   
   int test=(floorA>floorB)-1;
   int offset=31-abs(floorA-floorB);
-  float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; // floormag = 0.990065 ~ 0.707107
+  float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f;
 
   floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))];
 
@@ -1244,22 +989,6 @@
   if(-a>b)return -sqrt(a*a+b*b);
   return sqrt(b*b+a*a);
 }
-/* modified hypot by aoyumi 
-    better method should be found. */
-static float min_indemnity_dipole_hypot(float a, float b){
-  float thnor=0.92;
-  float threv=0.84;
-  float a2 = a*a;
-  float b2 = b*b;
-  if(a>0.){
-    if(b>0.)return sqrt(a2+b2*thnor);
-    if(a>-b)return sqrt(a2-b2+b2*threv); 
-    return -sqrt(b2-a2+a2*threv);
-  }
-  if(b<0.)return -sqrt(a2+b2*thnor);
-  if(-a>b)return -sqrt(a2-b2+b2*threv);
-  return sqrt(b2-a2+a2*threv);
-}
 
 /* revert to round hypot for now */
 float **_vp_quantize_couple_memo(vorbis_block *vb,
@@ -1272,27 +1001,16 @@
   float **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret));
   int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2];
   
-  if(1){ // set new hypot
-  	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<n;j++)
-    	 ret[i][j]=min_indemnity_dipole_hypot(mdctM[j],mdctA[j]);
-  	}
-  }else{
-    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]);
-  	}
+  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);
 }
 
@@ -1303,131 +1021,13 @@
   return (f1<f2)-(f1>f2);
 }
 
-/*** optimization of sort (for 8 or 32 element) ***/
-#ifdef OPT_SORT
-#define C(o,a,b)\
-  (fabs(data[o+a])>=fabs(data[o+b]))
-#define O(o,a,b,c,d)\
-  {n[o]=o+a;n[o+1]=o+b;n[o+2]=o+c;n[o+3]=o+d;}
-#define SORT4(o)\
-  if(C(o,2,3))if(C(o,0,1))if(C(o,0,2))if(C(o,1,2))O(o,0,1,2,3)\
-        else if(C(o,1,3))O(o,0,2,1,3)\
-          else O(o,0,2,3,1)\
-      else if(C(o,0,3))if(C(o,1,3))O(o,2,0,1,3)\
-          else O(o,2,0,3,1)\
-        else O(o,2,3,0,1)\
-    else if(C(o,1,2))if(C(o,0,2))O(o,1,0,2,3)\
-        else if(C(o,0,3))O(o,1,2,0,3)\
-          else O(o,1,2,3,0)\
-      else if(C(o,1,3))if(C(o,0,3))O(o,2,1,0,3)\
-          else O(o,2,1,3,0)\
-        else O(o,2,3,1,0)\
-  else if(C(o,0,1))if(C(o,0,3))if(C(o,1,3))O(o,0,1,3,2)\
-        else if(C(o,1,2))O(o,0,3,1,2)\
-          else O(o,0,3,2,1)\
-      else if(C(o,0,2))if(C(o,1,2))O(o,3,0,1,2)\
-          else O(o,3,0,2,1)\
-        else O(o,3,2,0,1)\
-    else if(C(o,1,3))if(C(o,0,3))O(o,1,0,3,2)\
-        else if(C(o,0,2))O(o,1,3,0,2)\
-          else O(o,1,3,2,0)\
-      else if(C(o,1,2))if(C(o,0,2))O(o,3,1,0,2)\
-          else O(o,3,1,2,0)\
-        else O(o,3,2,1,0)
-
-static void sortindex_fix8(int *index,
-                           float *data,
-                           int offset){
-  int i,j,k,n[8];
-  index+=offset;
-  data+=offset;
-  SORT4(0)
-  SORT4(4)
-  j=0;k=4;
-  for(i=0;i<8;i++)
-    index[i]=n[(k>=8)||(j<4)&&C(0,n[j],n[k])?j++:k++]+offset;
-}
-
-static void sortindex_fix32(int *index,
-                            float *data,
-                            int offset){
-  int i,j,k,n[32];
-  for(i=0;i<32;i+=8)
-    sortindex_fix8(index,data,offset+i);
-  index+=offset;
-  for(i=j=0,k=8;i<16;i++)
-    n[i]=index[(k>=16)||(j<8)&&C(0,index[j],index[k])?j++:k++];
-  for(i=j=16,k=24;i<32;i++)
-    n[i]=index[(k>=32)||(j<24)&&C(0,index[j],index[k])?j++:k++];
-  for(i=j=0,k=16;i<32;i++)
-    index[i]=n[(k>=32)||(j<16)&&C(0,n[j],n[k])?j++:k++];
-}
-
-static void sortindex_shellsort(int *index,
-                                float *data,
-                                int offset,
-                                int count){
-  int gap,pos,left,right,i,j;
-  index+=offset;
-  for(i=0;i<count;i++)index[i]=i+offset;
-  gap=1;
-  while (gap<=count)gap=gap*3+1;
-  gap/=3;
-  if(gap>=4)gap/=3;
-  while(gap>0){
-    for(pos=gap;pos<count;pos++){
-      for(left=pos-gap;left>=0;left-=gap){
-        i=index[left];j=index[left+gap];
-        if(!C(0,i,j)){
-          index[left]=j;
-          index[left+gap]=i;
-        }else break;
-      }
-    }
-    gap/=3;
-  }
-}
-
-static void sortindex(int *index,
-                      float *data,
-                      int offset,
-                      int count){
-  if(count==8)sortindex_fix8(index,data,offset);
-  else if(count==32)sortindex_fix32(index,data,offset);
-  else sortindex_shellsort(index,data,offset,count);
-}
-
-#undef C
-#undef O
-#undef SORT4
-
-#endif
-/*** OPT_SORT End ***/
-
-
 int **_vp_quantize_couple_sort(vorbis_block *vb,
 			       vorbis_look_psy *p,
 			       vorbis_info_mapping0 *vi,
 			       float **mags){
 
-#ifdef OPT_SORT
+
   if(p->vi->normal_point_p){
-    int i,j,n=p->n;
-    int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret));
-    int partition=p->vi->normal_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){
-      sortindex(ret[i],mags[i],j,partition);
-      }
-    }
-    return(ret);
-  }
-  return(NULL);
-#else
-  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;
@@ -1445,22 +1045,10 @@
     return(ret);
   }
   return(NULL);
-#endif
 }
 
 void _vp_noise_normalize_sort(vorbis_look_psy *p,
 			      float *magnitudes,int *sortedindex){
-#ifdef OPT_SORT
-  int j,n=p->n;
-  vorbis_info_psy *vi=p->vi;
-  int partition=vi->normal_partition;
-  int start=vi->normal_start;
-
-  for(j=start;j<n;j+=partition){
-    if(j+partition>n)partition=n-j;
-    sortindex(sortedindex-start,magnitudes,j,partition);
-  }
-#else
   int i,j,n=p->n;
   vorbis_info_psy *vi=p->vi;
   int partition=vi->normal_partition;
@@ -1475,12 +1063,11 @@
       sortedindex[i+j-start]=work[i]-magnitudes;
     }
   }
-#endif
 }
 
 void _vp_noise_normalize(vorbis_look_psy *p,
 			 float *in,float *out,int *sortedindex){
-  int i,j=0,n=p->n,min_energy;
+  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;
@@ -1494,64 +1081,27 @@
     for(;j+partition<=n;j+=partition){
       float acc=0.;
       int k;
-      int energy_loss=0;
-      int nn_num=0;
-      int freqband_mid=j+16;
-      int freqband_flag=0;
       
-      for(i=j;i<j+partition;i++){
-        if(rint(in[i])==0.f){
-        	acc+=in[i]*in[i];
-        	energy_loss++;
-        }
-      }
-      /* When an energy loss is large, NN processing is carried out in the middle of partition. */
-      /*if(energy_loss==32 && fabs(in[freqband_mid])>nnmid_th){
-      	if(in[freqband_mid]*in[freqband_mid]<.25f){
-      		i=0;
-      		if(acc>=vi->normal_thresh){
-      			out[freqband_mid]=unitnorm(in[freqband_mid]);
-      			acc-=1.;
-      			freqband_flag=1;
-      			nn_num++;
-      		}
-      	}
-      }*/
+      for(i=j;i<j+partition;i++)
+	acc+=in[i]*in[i];
       
-      /* NN main */
       for(i=0;i<partition;i++){
-      	k=sortedindex[i+j-start];
-      	if(in[k]*in[k]>=.25f){ // or rint(in[k])!=0.f
-      		out[k]=rint(in[k]);
-      		//acc-=in[k]*in[k];
-      	}else{
-      		if(acc<vi->normal_thresh)break;
-      		if(freqband_flag && freqband_mid==k)continue;
-      		out[k]=unitnorm(in[k]);
-      		acc-=1.;
-      		nn_num++;
-      	}
+	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.;
+	}
       }
       
-      /* The minimum energy complement */
-      /*min_energy=32-energy_loss+nn_num;
-      if(min_energy<2 || (j<=p->min_nn_lp && min_energy==2)){
-      	k=sortedindex[i+j-start];
-      	if(freqband_flag && freqband_mid==k){
-      		i++;
-      		k=sortedindex[i+j-start];
-	    }
-	    if(!(fabs(in[k])<0.3)){
-	    	out[k]=unitnorm(in[k]);
-	    	i++;
-	    }
-	  }*/
-	  
-	  // The last process
       for(;i<partition;i++){
-      	k=sortedindex[i+j-start];
-      	if(freqband_flag && freqband_mid==k)continue;
-      	else out[k]=0.;
+	k=sortedindex[i+j-start];
+	out[k]=0.;
       }
     }
   }
@@ -1570,8 +1120,7 @@
 		int   **mag_sort,
 		int   **ifloor,
 		int   *nonzero,
-		int  sliding_lowpass,
-		float **mdct, float **res_org){
+		int  sliding_lowpass){
 
   int i,j,k,n=p->n;
 
@@ -1595,196 +1144,39 @@
 
       float *rM=res[vi->coupling_mag[i]];
       float *rA=res[vi->coupling_ang[i]];
-      float *rMo=res_org[vi->coupling_mag[i]];
-      float *rAo=res_org[vi->coupling_ang[i]];
       float *qM=rM+n;
       float *qA=rA+n;
-      float *mdctM=mdct[vi->coupling_mag[i]];
-      float *mdctA=mdct[vi->coupling_ang[i]];
       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]];
-      float sth_low=stereo_threshholds_low[g->coupling_prepointamp[blobno]];
-      float sth_high=stereo_threshholds_high[g->coupling_postpointamp[blobno]];
-      float postpoint_backup;
-      float st_thresh;
       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;
-      int freqlimit=p->st_freqlimit;
-      unsigned char Mc_treshp[2048];
-      unsigned char Ac_treshp[2048];
-      int lof_st;
-      int hif_st;
-      int hif_stcopy;
-      int old_lof_st=0;
-      int old_hif_st=0;
-      int Afreq_num=0;
-      int Mfreq_num=0;
-      int stcont_start=0; // M6 start point
-      
+
       nonzero[vi->coupling_mag[i]]=1; 
       nonzero[vi->coupling_ang[i]]=1; 
-       
-      postpoint_backup=postpoint;
-      
-      /** @ M6 PRE **/
-      // lossless only?
-      if(!stereo_threshholds[g->coupling_postpointamp[blobno]])stcont_start=n;
-      else{
-      	// exception handling
-      	if((postpoint-sth_high)<prepoint)sth_high=postpoint-prepoint;
-      	// start point setup
-      	for(j=0;j<n;j++){
-      		stcont_start=j;
-      		if(p->noiseoffset[1][j]>=-2)break;
-      	}
-      	// start point correction & threshold setup 
-      	st_thresh=.1;
-      	if(p->m_val<.5){
-      		// low frequency limit
-      		if(stcont_start<limit)stcont_start=limit;
-      	}else if(p->vi->normal_thresh>1.)st_thresh=.5;
-      	for(j=0;j<=freqlimit;j++){ // or j<n
-      		if(fabs(rM[j])<st_thresh)Mc_treshp[j]=1;
-      		else Mc_treshp[j]=0;
-      		if(fabs(rA[j])<st_thresh)Ac_treshp[j]=1;
-      		else Ac_treshp[j]=0;
-      	}
-      }
-      
-      for(j=0;j<n;j+=partition){
+
+       /* The threshold of a stereo is changed with the size of n */
+       if(n > 1000)
+         postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; 
+ 
+      for(j=0;j<p->n;j+=partition){
 	float acc=0.f;
-	float rpacc;
-	int energy_loss=0;
-	int nn_num=0;
 
 	for(k=0;k<partition;k++){
 	  int l=k+j;
-	  float a=mdctM[l];
-	  float b=mdctA[l];
-	  float dummypoint;
-	  float hypot_reserve;
-	  float slow=0.f;
-	  float shigh=0.f;
-	  float slowM=0.f;
-	  float slowA=0.f;
-	  float shighM=0.f;
-	  float shighA=0.f;
-	  float rMs=fabs(rMo[l]);
-      float rAs=fabs(rAo[l]);
 
-	  postpoint=postpoint_backup;
-	  
-	  /* AoTuV */
-	  /** @ M6 MAIN **
-	    The threshold of a stereo is changed dynamically. 
-	    by Aoyumi @ 2006/06/04
-	  */
-	  if(l>=stcont_start){
-	  	int m;
-	  	int lof_num;
-	  	int hif_num;
-	  	
-	  	// (It may be better to calculate this in advance) 
-	  	lof_st=l-(l/2)*.167;
-	  	hif_st=l+l*.167;
-	  
-	  	hif_stcopy=hif_st;
-	  	
-	  	// limit setting
-	  	if(hif_st>freqlimit)hif_st=freqlimit;
-	  	
-	  	if(old_lof_st || old_hif_st){
-	  		if(hif_st>l){
-	  			// hif_st, lof_st ...absolute value
-	  			// lof_num, hif_num ...relative value
-	  			
-	  			// low freq.(lower)
-	  			lof_num=lof_st-old_lof_st;
-	  			if(lof_num==0){
-	  				Afreq_num+=Ac_treshp[l-1];
-	  				Mfreq_num+=Mc_treshp[l-1];
-	  			}else if(lof_num==1){
-	  				Afreq_num+=Ac_treshp[l-1];
-	  				Mfreq_num+=Mc_treshp[l-1];
-	  				Afreq_num-=Ac_treshp[old_lof_st];
-	  				Mfreq_num-=Mc_treshp[old_lof_st];
-	  			}//else puts("err. low");
-	  			
-	  			// high freq.(higher)
-	  			hif_num=hif_st-old_hif_st;
-	  			if(hif_num==0){
-	  				Afreq_num-=Ac_treshp[l];
-	  				Mfreq_num-=Mc_treshp[l];
-	  			}else if(hif_num==1){
-	  				Afreq_num-=Ac_treshp[l];
-	  				Mfreq_num-=Mc_treshp[l];
-	  				Afreq_num+=Ac_treshp[hif_st];
-	  				Mfreq_num+=Mc_treshp[hif_st];
-	  			}else if(hif_num==2){
-	  				Afreq_num-=Ac_treshp[l];
-	  				Mfreq_num-=Mc_treshp[l];
-	  				Afreq_num+=Ac_treshp[hif_st];
-	  				Mfreq_num+=Mc_treshp[hif_st];
-	  				Afreq_num+=Ac_treshp[hif_st-1];
-	  				Mfreq_num+=Mc_treshp[hif_st-1];
-	  			}//else puts("err. high");
-	  		}
-	  	}else{
-	  		for(m=lof_st; m<=hif_st; m++){
-	  			if(m==l)continue;
-	  			if(Ac_treshp[m]) Afreq_num++;
-	  			if(Mc_treshp[m]) Mfreq_num++;
-			}
-	  	}
-	  	if(l>=limit){
-	  		shigh=sth_high/(hif_stcopy-lof_st);
-	  		shighA=shigh*Afreq_num;
-	  		shighM=shigh*Mfreq_num;
-	  		if((shighA+rAs)>(shighM+rMs))shigh=shighA;
-	  		else shigh=shighM;
-		}else{
-			slow=sth_low/(hif_stcopy-lof_st);
-			slowA=slow*Afreq_num;
-			slowM=slow*Mfreq_num;
-			if(p->noiseoffset[1][l]<-1){
-				slowA*=(p->noiseoffset[1][l]+2);
-				slowM*=(p->noiseoffset[1][l]+2);
-			}
-		}
-		old_lof_st=lof_st;
-	  	old_hif_st=hif_st;
-	  }
-
-	  if(l>=limit){
-	    postpoint-=shigh;
-	    /* The following prevents an extreme reduction of residue. (2ch stereo only) */
-	  	if( ((a>0.) && (b<0.)) || ((b>0.) && (a<0.)) ){
-	  		hypot_reserve = fabs(fabs(a)-fabs(b));
-	  		if(hypot_reserve < 0.001){ // 0~0.000999-
-	  			dummypoint = stereo_threshholds_rephase[g->coupling_postpointamp[blobno]];
-	  			dummypoint = dummypoint+((postpoint-dummypoint)*(hypot_reserve*1000));
-	  			if(postpoint > dummypoint) postpoint = dummypoint;
-	  		}
-      	}
-	  }
-	  
 	  if(l<sliding_lowpass){
-	    if((l>=limit && rMs<postpoint && rAs<postpoint) ||
-	       (rMs<(prepoint-slowM) && rAs<(prepoint-slowA))){
+	    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];
-	      if(rint(qM[l])==0.f){
-	      	energy_loss++;
-	      	if(l>=limit)acc+=qM[l]*qM[l];
-	      }
+	      if(rint(qM[l])==0.f)acc+=qM[l]*qM[l];
 	    }else{
 	      couple_lossless(rM[l],rA[l],qM+l,qA+l);
 	    }
@@ -1793,106 +1185,40 @@
 	    qA[l]=0.;
 	  }
 	}
-
+	
 	if(p->vi->normal_point_p){
-	  int freqband_mid=j+16;
-	  int freqband_flag=0;
-	  int min_energy;
-	  
-	  rpacc=acc;
-	  /* When the energy loss of a partition is large, NN is performed in the middle of partition.
-	      for 48/44.1/32kHz */
-	  if(energy_loss==32 && fabs(qM[freqband_mid])>nnmid_th && acc>=p->vi->normal_thresh
-	   && freqband_mid<sliding_lowpass && freqband_mid>=pointlimit && rint(qM[freqband_mid])==0.f){
-	  	if( ((mdctM[freqband_mid]>0.) && (mdctA[freqband_mid]<0.)) ||
-	  	 ((mdctA[freqband_mid]>0.) && (mdctM[freqband_mid]<0.)) ){
-	  	 acc-=1.f;
-	  	 rpacc-=1.32;
-	  	}else{
-	  	 acc-=1.f;
-	  	 rpacc-=1.f;
-	  	}
-	  	qM[freqband_mid]=unitnorm(qM[freqband_mid]);
-	  	freqband_flag=1;
-	  	nn_num++;
-	  }
-	  /* NN main (point stereo) */
 	  for(k=0;k<partition && acc>=p->vi->normal_thresh;k++){
-	    int l;
-	    l=mag_sort[i][j+k];
-	    if(freqband_mid==l && freqband_flag)continue;
+	    int l=mag_sort[i][j+k];
 	    if(l<sliding_lowpass && l>=pointlimit && rint(qM[l])==0.f){
-	      if( ((mdctM[l]>0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.)) ){
-	        if(rpacc<p->vi->normal_thresh)continue;
-	        acc-=1.f;
-	        rpacc-=1.32;
-	      }else{
-	        acc-=1.f;
-	        rpacc-=1.f;
-	      }
 	      qM[l]=unitnorm(qM[l]);
-	      nn_num++;
+	      acc-=1.f;
 	    }
-	  }
-	  /* The minimum energy complement.
-	      for 48/44.1/32kHz */
-	  min_energy=32-energy_loss+nn_num;
-	  if(min_energy<2 || (j<=p->min_nn_lp && min_energy==2)){
-	  	int l;
-	  	float ab;
-	    for(;k<partition;k++){
-	    	l=mag_sort[i][j+k];
-	    	ab=fabs(qM[l]);
-	    	if(ab<0.04)break;
-	    	if( ((mdctM[l]>0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.))
-	    	 && ab<0.11)break; // 0.11
-	    	if(rint(qM[l])==0.f && l>=pointlimit){
-	    		qM[l]=unitnorm(qM[l]);
-	    		break;
-	    	}
-	    }
-	  }
+	  } 
 	}
       }
     }
   }
 }
 
-/*  aoTuV M5
-	noise_compand_level of low frequency is determined from the level of high frequency. 
-	by Aoyumi @ 2005/09/14
-	
-	return value
-	[normal compander] 0 <> 1.0 [high compander] 
-	-1 @ disable
+/* AoTuV */
+/** @ M2 **
+   The boost problem by the combination of noise normalization and point stereo is eased. 
+   However, this is a temporary patch. 
+   by Aoyumi @ 2004/04/18
 */
-float lb_loudnoise_fix(vorbis_look_psy *p,
-		float noise_compand_level,
-		float *logmdct,
-		int lW_modenumber,
-		int blocktype, int modenumber){
 
-	int i, n=p->n, nq1=p->n25p, nq3=p->n75p;
-	double hi_th=0;
-	
-	if(p->m_val < 0.5)return(-1); /* 48/44.1/32kHz only */
-	if(p->vi->normal_thresh>.45)return(-1); /* under q3 */
-
-	/* select trans. block(short>>long case). */
-	if(!modenumber)return(-1);
-	if(blocktype || lW_modenumber)return(noise_compand_level);
-
-	/* calculation of a threshold. */
-	for(i=nq1; i<nq3; i++){
-		if(logmdct[i]>-130)hi_th += logmdct[i];
-		else hi_th += -130;
-	}
-	hi_th /= n;
-	
-	/* calculation of a high_compand_level */
-	if(hi_th > -40.) noise_compand_level=-1;
-	else if(hi_th < -50.) noise_compand_level=1.;
-	else noise_compand_level=1.-((hi_th+50)/10);
-
-	return(noise_compand_level);
+void hf_reduction(vorbis_info_psy_global *g,
+                      vorbis_look_psy *p, 
+                      vorbis_info_mapping0 *vi,
+                      float **mdct){
+ 
+  int i,j,n=p->n, de=0.3*p->m_val;
+  int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2];
+  int start=p->vi->normal_start;
+  
+  for(i=0; i<vi->coupling_steps; i++){
+    /* for(j=start; j<limit; j++){} // ???*/
+    for(j=limit; j<n; j++) 
+      mdct[i][j] *= (1.0 - de*((float)(j-limit) / (float)(n-limit)));
+  }
 }

Modified: branches/vorbis-aotuv/lib/psy.h
===================================================================
--- branches/vorbis-aotuv/lib/psy.h	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/psy.h	2006-11-05 15:39:26 UTC (rev 12031)
@@ -15,8 +15,6 @@
 
  ********************************************************************/
 
-#define OPT_SORT
-
 #ifndef _V_PSY_H_
 #define _V_PSY_H_
 #include "smallft.h"
@@ -56,9 +54,6 @@
   int   noisewindowfixed;
   float noiseoff[P_NOISECURVES][P_BANDS];
   float noisecompand[NOISE_COMPAND_LEVELS];
-  float noisecompand_high[NOISE_COMPAND_LEVELS];
-  
-  float flacint;
 
   float max_curve_dB;
 
@@ -115,7 +110,6 @@
   int   total_octave_lines;  
   long  rate; /* cache it */
 
-  int m3n[4]; /* number for M3 */
   float m_val; /* Masking compensation value */
 
 } vorbis_look_psy;
@@ -135,7 +129,6 @@
 			     int sliding_lowpass);
 
 extern void _vp_noisemask(vorbis_look_psy *p,
-			  float noise_compand_level,
 			  float *logmdct, 
 			  float *logmask);
 
@@ -151,11 +144,7 @@
 			       int offset_select,
 			       float *logmask,
 			       float *mdct,
-			       float *logmdct,
-			       float *lastmdct, float *tempmdct,
-			       int blocktype, int modenumber,
-			       int nW_modenumber,
-			       int lW_blocktype, int lW_modenumber, int lW_no);
+			       float *logmdct);
 
 extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);
 
@@ -174,10 +163,7 @@
 		       int   **mag_sort,
 		       int   **ifloor,
 		       int   *nonzero,
-		       int   sliding_lowpass,
-		       int blocktype, int modenumber,
-		       int lW_blocktype, int lW_modenumber,
-		       float **mdct, float **res_org);
+		       int   sliding_lowpass);
 
 extern void _vp_noise_normalize(vorbis_look_psy *p,
 				float *in,float *out,int *sortedindex);
@@ -190,11 +176,10 @@
 				      vorbis_info_mapping0 *vi,
 				      float **mags);
 
-extern float lb_loudnoise_fix(vorbis_look_psy *p,
-		float noise_compand_level,
-		float *logmdct,
-		int lW_modenumber,
-		int blocktype, int modenumber);
+extern void hf_reduction(vorbis_info_psy_global *g,
+			 vorbis_look_psy *p,
+			 vorbis_info_mapping0 *vi,
+			 float **mdct);
 
 
 #endif

Modified: branches/vorbis-aotuv/lib/vorbisenc.c
===================================================================
--- branches/vorbis-aotuv/lib/vorbisenc.c	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/lib/vorbisenc.c	2006-11-05 15:39:26 UTC (rev 12031)
@@ -370,16 +370,11 @@
 
 static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block,
 				       compandblock *in, double *x){
-  int i,is=s, ishcm, hcm_stop=5; // high compander limit
-  double ds=s-is, dshcm;
-  
+  int i,is=s;
+  double ds=s-is;
   codec_setup_info *ci=vi->codec_setup;
   vorbis_info_psy *p=ci->psy_param[block];
-  
-   /* the place was borrowed...  */
-   p->flacint=ds;
 
-  /* interpolate the compander mapping */
   ds=x[is]*(1.-ds)+x[is+1]*ds;
   is=(int)ds;
   ds-=is;
@@ -388,32 +383,9 @@
     ds=1.;
   }
 
-  /* high compander setup */
-  ishcm = is;
-  dshcm = ds+.3;
-  if(dshcm > 1.0){
-  	 ishcm++;
-  	 dshcm=dshcm-1;
-  }
-  if(x[hcm_stop] < ((float)ishcm+dshcm)){
-  	ishcm = x[hcm_stop];
-  	dshcm = x[hcm_stop]-ishcm;
-  }
-  if(dshcm==0 && ishcm>0){ // the same
-    ishcm--;
-    dshcm=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;
-  /* interpolate the high compander settings */
-  if(s < (float)hcm_stop){
-  	for(i=0;i<NOISE_COMPAND_LEVELS;i++)
-  	  p->noisecompand_high[i]=in[ishcm].data[i]*(1.-dshcm)+in[ishcm+1].data[i]*dshcm;
-  }else{ // disable high compander
-  	for(i=0;i<NOISE_COMPAND_LEVELS;i++)p->noisecompand_high[i]=0;
-  }
   return;
 }
 


Property changes on: branches/vorbis-aotuv/macosx
___________________________________________________________________
Name: svn:ignore
   + build


Modified: branches/vorbis-aotuv/macosx/English.lproj/InfoPlist.strings
===================================================================
--- branches/vorbis-aotuv/macosx/English.lproj/InfoPlist.strings	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/macosx/English.lproj/InfoPlist.strings	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,6 +1,3 @@
 þÿ / *   L o c a l i z e d   v e r s i o n s   o f   I n f o . p l i s t   k e y s   * / 
  
- C F B u n d l e N a m e   =   " v o r b i s " ; 
- C F B u n d l e S h o r t V e r s i o n S t r i n g   =   " v o r b i s   v e r s i o n   0 . 0 . 1 d 1 " ; 
- C F B u n d l e G e t I n f o S t r i n g   =   " v o r b i s   v e r s i o n   0 . 0 . 1 d 1 ,   C o p y r i g h t   2 0 0 0 ,   M y G r e a t S o f t w a r e . " ; 
- N S H u m a n R e a d a b l e C o p y r i g h t   =   " C o p y r i g h t   2 0 0 0 ,   M y G r e a t S o f t w a r e . " ; 
+ C F B u n d l e N a m e   =   " V o r b i s " ; 

Copied: branches/vorbis-aotuv/macosx/Info.plist (from rev 12030, tags/vorbis/libvorbis-1.1.2/macosx/Info.plist)

Copied: branches/vorbis-aotuv/macosx/Vorbis.xcodeproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/macosx/Vorbis.xcodeproj)


Property changes on: branches/vorbis-aotuv/macosx/Vorbis.xcodeproj
___________________________________________________________________
Name: svn:ignore
   + *.mode*
*.pbxuser


Deleted: branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/project.pbxproj
===================================================================
--- tags/vorbis/libvorbis-1.1.2/macosx/Vorbis.xcodeproj/project.pbxproj	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/project.pbxproj	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,663 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		730F23A3091827B100AB638C /* codec.h in Headers */ = {isa = PBXBuildFile; fileRef = F58520B90191D12B01A802FE /* codec.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		730F23A4091827B100AB638C /* vorbisenc.h in Headers */ = {isa = PBXBuildFile; fileRef = F58520BA0191D12B01A802FE /* vorbisenc.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		730F23A5091827B100AB638C /* vorbisfile.h in Headers */ = {isa = PBXBuildFile; fileRef = F58520BB0191D12B01A802FE /* vorbisfile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		730F23A6091827B100AB638C /* backends.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F60B03389C830112CE8F /* backends.h */; };
-		730F23A7091827B100AB638C /* bitrate.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F60E03389C830112CE8F /* bitrate.h */; };
-		730F23A8091827B100AB638C /* res_books_stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F61603389C830112CE8F /* res_books_stereo.h */; };
-		730F23A9091827B100AB638C /* floor_books.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F61903389C830112CE8F /* floor_books.h */; };
-		730F23AA091827B100AB638C /* res_books_uncoupled.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62203389C830112CE8F /* res_books_uncoupled.h */; };
-		730F23AB091827B100AB638C /* codebook.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62403389C830112CE8F /* codebook.h */; };
-		730F23AC091827B100AB638C /* codec_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62503389C830112CE8F /* codec_internal.h */; };
-		730F23AD091827B100AB638C /* envelope.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62703389C830112CE8F /* envelope.h */; };
-		730F23AE091827B100AB638C /* highlevel.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62A03389C830112CE8F /* highlevel.h */; };
-		730F23AF091827B100AB638C /* lookup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62D03389C830112CE8F /* lookup.h */; };
-		730F23B0091827B100AB638C /* lookup_data.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F62E03389C830112CE8F /* lookup_data.h */; };
-		730F23B1091827B100AB638C /* lpc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63103389C830112CE8F /* lpc.h */; };
-		730F23B2091827B100AB638C /* lsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63303389C830112CE8F /* lsp.h */; };
-		730F23B3091827B100AB638C /* masking.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63703389C830112CE8F /* masking.h */; };
-		730F23B4091827B100AB638C /* mdct.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63903389C830112CE8F /* mdct.h */; };
-		730F23B5091827B100AB638C /* misc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63B03389C830112CE8F /* misc.h */; };
-		730F23B6091827B100AB638C /* floor_all.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F63E03389C830112CE8F /* floor_all.h */; };
-		730F23B7091827B100AB638C /* psych_11.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64103389C830112CE8F /* psych_11.h */; };
-		730F23B8091827B100AB638C /* psych_16.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64203389C830112CE8F /* psych_16.h */; };
-		730F23B9091827B100AB638C /* psych_44.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64303389C830112CE8F /* psych_44.h */; };
-		730F23BA091827B100AB638C /* psych_8.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64403389C830112CE8F /* psych_8.h */; };
-		730F23BB091827B100AB638C /* residue_16.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64503389C830112CE8F /* residue_16.h */; };
-		730F23BC091827B100AB638C /* residue_44.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64603389C830112CE8F /* residue_44.h */; };
-		730F23BD091827B100AB638C /* residue_44u.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64703389C830112CE8F /* residue_44u.h */; };
-		730F23BE091827B100AB638C /* residue_8.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64803389C830112CE8F /* residue_8.h */; };
-		730F23BF091827B100AB638C /* setup_11.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64903389C830112CE8F /* setup_11.h */; };
-		730F23C0091827B100AB638C /* setup_16.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64A03389C830112CE8F /* setup_16.h */; };
-		730F23C1091827B100AB638C /* setup_22.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64B03389C830112CE8F /* setup_22.h */; };
-		730F23C2091827B100AB638C /* setup_32.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64C03389C830112CE8F /* setup_32.h */; };
-		730F23C3091827B100AB638C /* setup_44.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64D03389C830112CE8F /* setup_44.h */; };
-		730F23C4091827B100AB638C /* setup_44u.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64E03389C830112CE8F /* setup_44u.h */; };
-		730F23C5091827B100AB638C /* setup_8.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F64F03389C830112CE8F /* setup_8.h */; };
-		730F23C6091827B100AB638C /* setup_X.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65003389C830112CE8F /* setup_X.h */; };
-		730F23C7091827B100AB638C /* os.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65103389C830112CE8F /* os.h */; };
-		730F23C8091827B100AB638C /* psy.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65303389C830112CE8F /* psy.h */; };
-		730F23C9091827B100AB638C /* registry.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65603389C830112CE8F /* registry.h */; };
-		730F23CA091827B100AB638C /* scales.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65803389C830112CE8F /* scales.h */; };
-		730F23CB091827B100AB638C /* smallft.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F65B03389C830112CE8F /* smallft.h */; };
-		730F23CC091827B100AB638C /* window.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D8F66103389C830112CE8F /* window.h */; };
-		730F23CE091827B100AB638C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
-		730F23D3091827B100AB638C /* analysis.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F60A03389C830112CE8F /* analysis.c */; };
-		730F23D4091827B100AB638C /* bitrate.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F60D03389C830112CE8F /* bitrate.c */; };
-		730F23D5091827B100AB638C /* block.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F60F03389C830112CE8F /* block.c */; };
-		730F23D6091827B100AB638C /* codebook.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62303389C830112CE8F /* codebook.c */; };
-		730F23D7091827B100AB638C /* envelope.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62603389C830112CE8F /* envelope.c */; };
-		730F23D8091827B100AB638C /* floor0.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62803389C830112CE8F /* floor0.c */; };
-		730F23D9091827B100AB638C /* floor1.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62903389C830112CE8F /* floor1.c */; };
-		730F23DA091827B100AB638C /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62B03389C830112CE8F /* info.c */; };
-		730F23DB091827B100AB638C /* lookup.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F62C03389C830112CE8F /* lookup.c */; };
-		730F23DC091827B100AB638C /* lpc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F63003389C830112CE8F /* lpc.c */; };
-		730F23DD091827B100AB638C /* lsp.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F63203389C830112CE8F /* lsp.c */; };
-		730F23DE091827B100AB638C /* mapping0.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F63603389C830112CE8F /* mapping0.c */; };
-		730F23DF091827B100AB638C /* mdct.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F63803389C830112CE8F /* mdct.c */; };
-		730F23E0091827B100AB638C /* psy.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65203389C830112CE8F /* psy.c */; };
-		730F23E1091827B100AB638C /* registry.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65503389C830112CE8F /* registry.c */; };
-		730F23E2091827B100AB638C /* res0.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65703389C830112CE8F /* res0.c */; };
-		730F23E3091827B100AB638C /* sharedbook.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65903389C830112CE8F /* sharedbook.c */; };
-		730F23E4091827B100AB638C /* smallft.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65A03389C830112CE8F /* smallft.c */; };
-		730F23E5091827B100AB638C /* synthesis.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65C03389C830112CE8F /* synthesis.c */; };
-		730F23E6091827B100AB638C /* vorbisenc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65E03389C830112CE8F /* vorbisenc.c */; };
-		730F23E7091827B100AB638C /* vorbisfile.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F65F03389C830112CE8F /* vorbisfile.c */; };
-		730F23E8091827B100AB638C /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = F5D8F66003389C830112CE8F /* window.c */; };
-		730F23FB0918281100AB638C /* Ogg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 730F23FA0918281100AB638C /* Ogg.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXBuildStyle section */
-		014CEA440018CDF011CA2923 /* Development */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OPTIMIZATION_CFLAGS = "-O0";
-				ZERO_LINK = YES;
-			};
-			name = Development;
-		};
-		014CEA450018CDF011CA2923 /* Deployment */ = {
-			isa = PBXBuildStyle;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				ZERO_LINK = NO;
-			};
-			name = Deployment;
-		};
-/* End PBXBuildStyle section */
-
-/* Begin PBXFileReference section */
-		089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		730F23F0091827B100AB638C /* Info.plist */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = Info.plist; sourceTree = "<group>"; };
-		730F23F1091827B100AB638C /* Vorbis.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Vorbis.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		730F23FA0918281100AB638C /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
-		F58520B90191D12B01A802FE /* codec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = codec.h; sourceTree = "<group>"; };
-		F58520BA0191D12B01A802FE /* vorbisenc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vorbisenc.h; sourceTree = "<group>"; };
-		F58520BB0191D12B01A802FE /* vorbisfile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vorbisfile.h; sourceTree = "<group>"; };
-		F5D8F60A03389C830112CE8F /* analysis.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = analysis.c; sourceTree = "<group>"; };
-		F5D8F60B03389C830112CE8F /* backends.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backends.h; sourceTree = "<group>"; };
-		F5D8F60C03389C830112CE8F /* barkmel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = barkmel.c; sourceTree = "<group>"; };
-		F5D8F60D03389C830112CE8F /* bitrate.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = bitrate.c; sourceTree = "<group>"; };
-		F5D8F60E03389C830112CE8F /* bitrate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bitrate.h; sourceTree = "<group>"; };
-		F5D8F60F03389C830112CE8F /* block.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = block.c; sourceTree = "<group>"; };
-		F5D8F61603389C830112CE8F /* res_books_stereo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = res_books_stereo.h; sourceTree = "<group>"; };
-		F5D8F61903389C830112CE8F /* floor_books.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = floor_books.h; sourceTree = "<group>"; };
-		F5D8F62203389C830112CE8F /* res_books_uncoupled.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = res_books_uncoupled.h; sourceTree = "<group>"; };
-		F5D8F62303389C830112CE8F /* codebook.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = codebook.c; sourceTree = "<group>"; };
-		F5D8F62403389C830112CE8F /* codebook.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = codebook.h; sourceTree = "<group>"; };
-		F5D8F62503389C830112CE8F /* codec_internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = codec_internal.h; sourceTree = "<group>"; };
-		F5D8F62603389C830112CE8F /* envelope.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = envelope.c; sourceTree = "<group>"; };
-		F5D8F62703389C830112CE8F /* envelope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = envelope.h; sourceTree = "<group>"; };
-		F5D8F62803389C830112CE8F /* floor0.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = floor0.c; sourceTree = "<group>"; };
-		F5D8F62903389C830112CE8F /* floor1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = floor1.c; sourceTree = "<group>"; };
-		F5D8F62A03389C830112CE8F /* highlevel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = highlevel.h; sourceTree = "<group>"; };
-		F5D8F62B03389C830112CE8F /* info.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = info.c; sourceTree = "<group>"; };
-		F5D8F62C03389C830112CE8F /* lookup.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lookup.c; sourceTree = "<group>"; };
-		F5D8F62D03389C830112CE8F /* lookup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lookup.h; sourceTree = "<group>"; };
-		F5D8F62E03389C830112CE8F /* lookup_data.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lookup_data.h; sourceTree = "<group>"; };
-		F5D8F63003389C830112CE8F /* lpc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lpc.c; sourceTree = "<group>"; };
-		F5D8F63103389C830112CE8F /* lpc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lpc.h; sourceTree = "<group>"; };
-		F5D8F63203389C830112CE8F /* lsp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lsp.c; sourceTree = "<group>"; };
-		F5D8F63303389C830112CE8F /* lsp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lsp.h; sourceTree = "<group>"; };
-		F5D8F63603389C830112CE8F /* mapping0.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mapping0.c; sourceTree = "<group>"; };
-		F5D8F63703389C830112CE8F /* masking.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = masking.h; sourceTree = "<group>"; };
-		F5D8F63803389C830112CE8F /* mdct.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mdct.c; sourceTree = "<group>"; };
-		F5D8F63903389C830112CE8F /* mdct.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mdct.h; sourceTree = "<group>"; };
-		F5D8F63A03389C830112CE8F /* misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = "<group>"; };
-		F5D8F63B03389C830112CE8F /* misc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = "<group>"; };
-		F5D8F63E03389C830112CE8F /* floor_all.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = floor_all.h; sourceTree = "<group>"; };
-		F5D8F64103389C830112CE8F /* psych_11.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psych_11.h; sourceTree = "<group>"; };
-		F5D8F64203389C830112CE8F /* psych_16.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psych_16.h; sourceTree = "<group>"; };
-		F5D8F64303389C830112CE8F /* psych_44.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psych_44.h; sourceTree = "<group>"; };
-		F5D8F64403389C830112CE8F /* psych_8.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psych_8.h; sourceTree = "<group>"; };
-		F5D8F64503389C830112CE8F /* residue_16.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = residue_16.h; sourceTree = "<group>"; };
-		F5D8F64603389C830112CE8F /* residue_44.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = residue_44.h; sourceTree = "<group>"; };
-		F5D8F64703389C830112CE8F /* residue_44u.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = residue_44u.h; sourceTree = "<group>"; };
-		F5D8F64803389C830112CE8F /* residue_8.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = residue_8.h; sourceTree = "<group>"; };
-		F5D8F64903389C830112CE8F /* setup_11.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_11.h; sourceTree = "<group>"; };
-		F5D8F64A03389C830112CE8F /* setup_16.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_16.h; sourceTree = "<group>"; };
-		F5D8F64B03389C830112CE8F /* setup_22.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_22.h; sourceTree = "<group>"; };
-		F5D8F64C03389C830112CE8F /* setup_32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_32.h; sourceTree = "<group>"; };
-		F5D8F64D03389C830112CE8F /* setup_44.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_44.h; sourceTree = "<group>"; };
-		F5D8F64E03389C830112CE8F /* setup_44u.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_44u.h; sourceTree = "<group>"; };
-		F5D8F64F03389C830112CE8F /* setup_8.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_8.h; sourceTree = "<group>"; };
-		F5D8F65003389C830112CE8F /* setup_X.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = setup_X.h; sourceTree = "<group>"; };
-		F5D8F65103389C830112CE8F /* os.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = os.h; sourceTree = "<group>"; };
-		F5D8F65203389C830112CE8F /* psy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = psy.c; sourceTree = "<group>"; };
-		F5D8F65303389C830112CE8F /* psy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psy.h; sourceTree = "<group>"; };
-		F5D8F65403389C830112CE8F /* psytune.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = psytune.c; sourceTree = "<group>"; };
-		F5D8F65503389C830112CE8F /* registry.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = registry.c; sourceTree = "<group>"; };
-		F5D8F65603389C830112CE8F /* registry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = registry.h; sourceTree = "<group>"; };
-		F5D8F65703389C830112CE8F /* res0.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = res0.c; sourceTree = "<group>"; };
-		F5D8F65803389C830112CE8F /* scales.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scales.h; sourceTree = "<group>"; };
-		F5D8F65903389C830112CE8F /* sharedbook.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sharedbook.c; sourceTree = "<group>"; };
-		F5D8F65A03389C830112CE8F /* smallft.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = smallft.c; sourceTree = "<group>"; };
-		F5D8F65B03389C830112CE8F /* smallft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = smallft.h; sourceTree = "<group>"; };
-		F5D8F65C03389C830112CE8F /* synthesis.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = synthesis.c; sourceTree = "<group>"; };
-		F5D8F65D03389C830112CE8F /* tone.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tone.c; sourceTree = "<group>"; };
-		F5D8F65E03389C830112CE8F /* vorbisenc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vorbisenc.c; sourceTree = "<group>"; };
-		F5D8F65F03389C830112CE8F /* vorbisfile.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vorbisfile.c; sourceTree = "<group>"; };
-		F5D8F66003389C830112CE8F /* window.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = window.c; sourceTree = "<group>"; };
-		F5D8F66103389C830112CE8F /* window.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = window.h; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		730F23E9091827B100AB638C /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				730F23FB0918281100AB638C /* Ogg.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				730F23F1091827B100AB638C /* Vorbis.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		0867D691FE84028FC02AAC07 /* vorbis */ = {
-			isa = PBXGroup;
-			children = (
-				F58520B70191D12B01A802FE /* Headers */,
-				F5D8F60803389C830112CE8F /* lib */,
-				089C1665FE841158C02AAC07 /* Resources */,
-				0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
-				034768DFFF38A50411DB9C8B /* Products */,
-			);
-			name = vorbis;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
-			isa = PBXGroup;
-			children = (
-				730F23FA0918281100AB638C /* Ogg.framework */,
-			);
-			name = "External Frameworks and Libraries";
-			sourceTree = "<group>";
-		};
-		089C1665FE841158C02AAC07 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				730F23F0091827B100AB638C /* Info.plist */,
-				089C1666FE841158C02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		F58520B70191D12B01A802FE /* Headers */ = {
-			isa = PBXGroup;
-			children = (
-				F58520B90191D12B01A802FE /* codec.h */,
-				F58520BA0191D12B01A802FE /* vorbisenc.h */,
-				F58520BB0191D12B01A802FE /* vorbisfile.h */,
-			);
-			name = Headers;
-			path = ../include/vorbis;
-			sourceTree = SOURCE_ROOT;
-		};
-		F5D8F60803389C830112CE8F /* lib */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F60A03389C830112CE8F /* analysis.c */,
-				F5D8F60B03389C830112CE8F /* backends.h */,
-				F5D8F60C03389C830112CE8F /* barkmel.c */,
-				F5D8F60D03389C830112CE8F /* bitrate.c */,
-				F5D8F60E03389C830112CE8F /* bitrate.h */,
-				F5D8F60F03389C830112CE8F /* block.c */,
-				F5D8F61003389C830112CE8F /* books */,
-				F5D8F62303389C830112CE8F /* codebook.c */,
-				F5D8F62403389C830112CE8F /* codebook.h */,
-				F5D8F62503389C830112CE8F /* codec_internal.h */,
-				F5D8F62603389C830112CE8F /* envelope.c */,
-				F5D8F62703389C830112CE8F /* envelope.h */,
-				F5D8F62803389C830112CE8F /* floor0.c */,
-				F5D8F62903389C830112CE8F /* floor1.c */,
-				F5D8F62A03389C830112CE8F /* highlevel.h */,
-				F5D8F62B03389C830112CE8F /* info.c */,
-				F5D8F62C03389C830112CE8F /* lookup.c */,
-				F5D8F62D03389C830112CE8F /* lookup.h */,
-				F5D8F62E03389C830112CE8F /* lookup_data.h */,
-				F5D8F63003389C830112CE8F /* lpc.c */,
-				F5D8F63103389C830112CE8F /* lpc.h */,
-				F5D8F63203389C830112CE8F /* lsp.c */,
-				F5D8F63303389C830112CE8F /* lsp.h */,
-				F5D8F63603389C830112CE8F /* mapping0.c */,
-				F5D8F63703389C830112CE8F /* masking.h */,
-				F5D8F63803389C830112CE8F /* mdct.c */,
-				F5D8F63903389C830112CE8F /* mdct.h */,
-				F5D8F63A03389C830112CE8F /* misc.c */,
-				F5D8F63B03389C830112CE8F /* misc.h */,
-				F5D8F63C03389C830112CE8F /* modes */,
-				F5D8F65103389C830112CE8F /* os.h */,
-				F5D8F65203389C830112CE8F /* psy.c */,
-				F5D8F65303389C830112CE8F /* psy.h */,
-				F5D8F65403389C830112CE8F /* psytune.c */,
-				F5D8F65503389C830112CE8F /* registry.c */,
-				F5D8F65603389C830112CE8F /* registry.h */,
-				F5D8F65703389C830112CE8F /* res0.c */,
-				F5D8F65803389C830112CE8F /* scales.h */,
-				F5D8F65903389C830112CE8F /* sharedbook.c */,
-				F5D8F65A03389C830112CE8F /* smallft.c */,
-				F5D8F65B03389C830112CE8F /* smallft.h */,
-				F5D8F65C03389C830112CE8F /* synthesis.c */,
-				F5D8F65D03389C830112CE8F /* tone.c */,
-				F5D8F65E03389C830112CE8F /* vorbisenc.c */,
-				F5D8F65F03389C830112CE8F /* vorbisfile.c */,
-				F5D8F66003389C830112CE8F /* window.c */,
-				F5D8F66103389C830112CE8F /* window.h */,
-			);
-			name = lib;
-			path = ../lib;
-			sourceTree = "<group>";
-		};
-		F5D8F61003389C830112CE8F /* books */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F61203389C830112CE8F /* coupled */,
-				F5D8F61703389C830112CE8F /* floor */,
-				F5D8F61E03389C830112CE8F /* uncoupled */,
-			);
-			path = books;
-			sourceTree = "<group>";
-		};
-		F5D8F61203389C830112CE8F /* coupled */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F61603389C830112CE8F /* res_books_stereo.h */,
-			);
-			path = coupled;
-			sourceTree = "<group>";
-		};
-		F5D8F61703389C830112CE8F /* floor */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F61903389C830112CE8F /* floor_books.h */,
-			);
-			path = floor;
-			sourceTree = "<group>";
-		};
-		F5D8F61E03389C830112CE8F /* uncoupled */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F62203389C830112CE8F /* res_books_uncoupled.h */,
-			);
-			path = uncoupled;
-			sourceTree = "<group>";
-		};
-		F5D8F63C03389C830112CE8F /* modes */ = {
-			isa = PBXGroup;
-			children = (
-				F5D8F63E03389C830112CE8F /* floor_all.h */,
-				F5D8F64103389C830112CE8F /* psych_11.h */,
-				F5D8F64203389C830112CE8F /* psych_16.h */,
-				F5D8F64303389C830112CE8F /* psych_44.h */,
-				F5D8F64403389C830112CE8F /* psych_8.h */,
-				F5D8F64503389C830112CE8F /* residue_16.h */,
-				F5D8F64603389C830112CE8F /* residue_44.h */,
-				F5D8F64703389C830112CE8F /* residue_44u.h */,
-				F5D8F64803389C830112CE8F /* residue_8.h */,
-				F5D8F64903389C830112CE8F /* setup_11.h */,
-				F5D8F64A03389C830112CE8F /* setup_16.h */,
-				F5D8F64B03389C830112CE8F /* setup_22.h */,
-				F5D8F64C03389C830112CE8F /* setup_32.h */,
-				F5D8F64D03389C830112CE8F /* setup_44.h */,
-				F5D8F64E03389C830112CE8F /* setup_44u.h */,
-				F5D8F64F03389C830112CE8F /* setup_8.h */,
-				F5D8F65003389C830112CE8F /* setup_X.h */,
-			);
-			path = modes;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		730F23A2091827B100AB638C /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				730F23A3091827B100AB638C /* codec.h in Headers */,
-				730F23A4091827B100AB638C /* vorbisenc.h in Headers */,
-				730F23A5091827B100AB638C /* vorbisfile.h in Headers */,
-				730F23A6091827B100AB638C /* backends.h in Headers */,
-				730F23A7091827B100AB638C /* bitrate.h in Headers */,
-				730F23A8091827B100AB638C /* res_books_stereo.h in Headers */,
-				730F23A9091827B100AB638C /* floor_books.h in Headers */,
-				730F23AA091827B100AB638C /* res_books_uncoupled.h in Headers */,
-				730F23AB091827B100AB638C /* codebook.h in Headers */,
-				730F23AC091827B100AB638C /* codec_internal.h in Headers */,
-				730F23AD091827B100AB638C /* envelope.h in Headers */,
-				730F23AE091827B100AB638C /* highlevel.h in Headers */,
-				730F23AF091827B100AB638C /* lookup.h in Headers */,
-				730F23B0091827B100AB638C /* lookup_data.h in Headers */,
-				730F23B1091827B100AB638C /* lpc.h in Headers */,
-				730F23B2091827B100AB638C /* lsp.h in Headers */,
-				730F23B3091827B100AB638C /* masking.h in Headers */,
-				730F23B4091827B100AB638C /* mdct.h in Headers */,
-				730F23B5091827B100AB638C /* misc.h in Headers */,
-				730F23B6091827B100AB638C /* floor_all.h in Headers */,
-				730F23B7091827B100AB638C /* psych_11.h in Headers */,
-				730F23B8091827B100AB638C /* psych_16.h in Headers */,
-				730F23B9091827B100AB638C /* psych_44.h in Headers */,
-				730F23BA091827B100AB638C /* psych_8.h in Headers */,
-				730F23BB091827B100AB638C /* residue_16.h in Headers */,
-				730F23BC091827B100AB638C /* residue_44.h in Headers */,
-				730F23BD091827B100AB638C /* residue_44u.h in Headers */,
-				730F23BE091827B100AB638C /* residue_8.h in Headers */,
-				730F23BF091827B100AB638C /* setup_11.h in Headers */,
-				730F23C0091827B100AB638C /* setup_16.h in Headers */,
-				730F23C1091827B100AB638C /* setup_22.h in Headers */,
-				730F23C2091827B100AB638C /* setup_32.h in Headers */,
-				730F23C3091827B100AB638C /* setup_44.h in Headers */,
-				730F23C4091827B100AB638C /* setup_44u.h in Headers */,
-				730F23C5091827B100AB638C /* setup_8.h in Headers */,
-				730F23C6091827B100AB638C /* setup_X.h in Headers */,
-				730F23C7091827B100AB638C /* os.h in Headers */,
-				730F23C8091827B100AB638C /* psy.h in Headers */,
-				730F23C9091827B100AB638C /* registry.h in Headers */,
-				730F23CA091827B100AB638C /* scales.h in Headers */,
-				730F23CB091827B100AB638C /* smallft.h in Headers */,
-				730F23CC091827B100AB638C /* window.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		730F23A1091827B100AB638C /* Vorbis */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 730F23EC091827B100AB638C /* Build configuration list for PBXNativeTarget "Vorbis" */;
-			buildPhases = (
-				730F23A2091827B100AB638C /* Headers */,
-				730F23CD091827B100AB638C /* Resources */,
-				730F23D2091827B100AB638C /* Sources */,
-				730F23E9091827B100AB638C /* Frameworks */,
-				730F23EB091827B100AB638C /* Rez */,
-			);
-			buildRules = (
-			);
-			buildSettings = {
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = (
-					/Library/Frameworks,
-					../../ogg/macosx/build,
-				);
-				FRAMEWORK_VERSION = A;
-				HEADER_SEARCH_PATHS = "";
-				INSTALL_PATH = /Library/Frameworks;
-				LIBRARY_SEARCH_PATHS = "";
-				OTHER_CFLAGS = "-D__MACOSX__";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = Vorbis;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = framework;
-			};
-			dependencies = (
-			);
-			name = Vorbis;
-			productInstallPath = /Library/Frameworks;
-			productName = vorbis;
-			productReference = 730F23F1091827B100AB638C /* Vorbis.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = 730F23F3091827B200AB638C /* Build configuration list for PBXProject "Vorbis" */;
-			buildSettings = {
-			};
-			buildStyles = (
-				014CEA440018CDF011CA2923 /* Development */,
-				014CEA450018CDF011CA2923 /* Deployment */,
-			);
-			hasScannedForEncodings = 0;
-			mainGroup = 0867D691FE84028FC02AAC07 /* vorbis */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			targets = (
-				730F23A1091827B100AB638C /* Vorbis */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		730F23CD091827B100AB638C /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				730F23CE091827B100AB638C /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
-		730F23EB091827B100AB638C /* Rez */ = {
-			isa = PBXRezBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		730F23D2091827B100AB638C /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				730F23D3091827B100AB638C /* analysis.c in Sources */,
-				730F23D4091827B100AB638C /* bitrate.c in Sources */,
-				730F23D5091827B100AB638C /* block.c in Sources */,
-				730F23D6091827B100AB638C /* codebook.c in Sources */,
-				730F23D7091827B100AB638C /* envelope.c in Sources */,
-				730F23D8091827B100AB638C /* floor0.c in Sources */,
-				730F23D9091827B100AB638C /* floor1.c in Sources */,
-				730F23DA091827B100AB638C /* info.c in Sources */,
-				730F23DB091827B100AB638C /* lookup.c in Sources */,
-				730F23DC091827B100AB638C /* lpc.c in Sources */,
-				730F23DD091827B100AB638C /* lsp.c in Sources */,
-				730F23DE091827B100AB638C /* mapping0.c in Sources */,
-				730F23DF091827B100AB638C /* mdct.c in Sources */,
-				730F23E0091827B100AB638C /* psy.c in Sources */,
-				730F23E1091827B100AB638C /* registry.c in Sources */,
-				730F23E2091827B100AB638C /* res0.c in Sources */,
-				730F23E3091827B100AB638C /* sharedbook.c in Sources */,
-				730F23E4091827B100AB638C /* smallft.c in Sources */,
-				730F23E5091827B100AB638C /* synthesis.c in Sources */,
-				730F23E6091827B100AB638C /* vorbisenc.c in Sources */,
-				730F23E7091827B100AB638C /* vorbisfile.c in Sources */,
-				730F23E8091827B100AB638C /* window.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C1667FE841158C02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		730F23ED091827B100AB638C /* Development */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
-				FRAMEWORK_VERSION = A;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				HEADER_SEARCH_PATHS = ../lib;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /Library/Frameworks;
-				LIBRARY_SEARCH_PATHS = "";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = Vorbis;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = framework;
-				ZERO_LINK = YES;
-			};
-			name = Development;
-		};
-		730F23EE091827B100AB638C /* Deployment */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
-				FRAMEWORK_VERSION = A;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				HEADER_SEARCH_PATHS = ../lib;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /Library/Frameworks;
-				LIBRARY_SEARCH_PATHS = "";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = Vorbis;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = framework;
-				ZERO_LINK = NO;
-			};
-			name = Deployment;
-		};
-		730F23EF091827B100AB638C /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
-				FRAMEWORK_VERSION = A;
-				HEADER_SEARCH_PATHS = ../lib;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /Library/Frameworks;
-				LIBRARY_SEARCH_PATHS = "";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = Vorbis;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = framework;
-			};
-			name = Default;
-		};
-		730F23F4091827B200AB638C /* Development */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
-			};
-			name = Development;
-		};
-		730F23F5091827B200AB638C /* Deployment */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
-			};
-			name = Deployment;
-		};
-		730F23F6091827B200AB638C /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
-			};
-			name = Default;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		730F23EC091827B100AB638C /* Build configuration list for PBXNativeTarget "Vorbis" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				730F23ED091827B100AB638C /* Development */,
-				730F23EE091827B100AB638C /* Deployment */,
-				730F23EF091827B100AB638C /* Default */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-		730F23F3091827B200AB638C /* Build configuration list for PBXProject "Vorbis" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				730F23F4091827B200AB638C /* Development */,
-				730F23F5091827B200AB638C /* Deployment */,
-				730F23F6091827B200AB638C /* Default */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}

Copied: branches/vorbis-aotuv/macosx/Vorbis.xcodeproj/project.pbxproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/macosx/Vorbis.xcodeproj/project.pbxproj)

Deleted: branches/vorbis-aotuv/win32/Makefile.am
===================================================================
--- branches/vorbis-aotuv/win32/Makefile.am	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/Makefile.am	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,11 +0,0 @@
-## Process this with automake to create Makefile.in
-
-EXTRA_DIST = vorbis.def vorbis_dynamic.dsp vorbis_static.dsp\
-	vorbisfile.def vorbisfile_dynamic.dsp vorbisfile_static.dsp\
-	vorbisenc.def vorbisenc_dynamic.dsp vorbisenc_static.dsp\
-	build_vorbis_dynamic.bat build_vorbis_dynamic_debug.bat\
-	build_vorbis_static.bat build_vorbis_static_debug.bat\
-	build_vorbisenc_dynamic.bat build_vorbisenc_dynamic_debug.bat\
-	build_vorbisenc_static.bat build_vorbisenc_static_debug.bat\
-	build_vorbisfile_dynamic.bat build_vorbisfile_dynamic_debug.bat\
-	build_vorbisfile_static.bat build_vorbisfile_static_debug.bat vorbis.dsw

Copied: branches/vorbis-aotuv/win32/VS2003 (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003)

Copied: branches/vorbis-aotuv/win32/VS2003/libvorbis (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbis)

Deleted: branches/vorbis-aotuv/win32/VS2003/libvorbis/libvorbis.vcproj
===================================================================
--- tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbis/libvorbis.vcproj	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/VS2003/libvorbis/libvorbis.vcproj	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,467 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="libvorbis"
-	ProjectGUID="{3A214E06-B95E-4D61-A291-1F8DF2EC10FD}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="2"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbis.dll"
-				LinkIncremental="2"
-				ModuleDefinitionFile="..\..\vorbis.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/libvorbis.pdb"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/libvorbis.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="2"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"
-				DisableSpecificWarnings="4244;4100;4267;4189;4305;4127;4706"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbis.dll"
-				LinkIncremental="1"
-				ModuleDefinitionFile="..\..\vorbis.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/libvorbis.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"
-				DisableSpecificWarnings="4244;4100;4267;4189;4305;4127;4706"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbis.dll"
-				LinkIncremental="1"
-				ModuleDefinitionFile="..\..\vorbis.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/libvorbis.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE2|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBVORBIS_EXPORTS"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"
-				DisableSpecificWarnings="4244;4100;4267;4189;4305;4127;4706"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbis.dll"
-				LinkIncremental="1"
-				ModuleDefinitionFile="..\..\vorbis.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/libvorbis.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\lib\analysis.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\bitrate.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\block.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\codebook.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\envelope.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\floor0.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\floor1.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\info.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lookup.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lpc.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lsp.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\mapping0.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\mdct.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\psy.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\registry.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\res0.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\sharedbook.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\smallft.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\synthesis.c">
-			</File>
-			<File
-				RelativePath="..\..\vorbis.def">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\vorbisenc.c">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\window.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath="..\..\..\lib\backends.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\bitrate.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\codebook.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\vorbis\codec.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\codec_internal.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\envelope.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\floor_all.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\books\floor\floor_books.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\highlevel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lookup.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lookup_data.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lpc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\lsp.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\masking.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\mdct.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\misc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\os.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\psy.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\psych_11.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\psych_16.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\psych_44.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\psych_8.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\registry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\books\coupled\res_books_stereo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\books\uncoupled\res_books_uncoupled.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\residue_16.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\residue_44.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\residue_44u.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\residue_8.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\scales.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_11.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_16.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_22.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_32.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_44.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_44u.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_8.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\modes\setup_X.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\smallft.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\vorbis\vorbisenc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\vorbis\vorbisfile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\window.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: branches/vorbis-aotuv/win32/VS2003/libvorbis/libvorbis.vcproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbis/libvorbis.vcproj)

Copied: branches/vorbis-aotuv/win32/VS2003/libvorbisfile (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbisfile)

Deleted: branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.def
===================================================================
--- tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbisfile/libvorbisfile.def	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.def	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,47 +0,0 @@
-LIBRARY	libvorbisfile
-EXPORTS
-ov_clear
-ov_open
-ov_open_callbacks
-;
-ov_test
-ov_test_callbacks
-ov_test_open
-;
-ov_bitrate
-ov_bitrate_instant
-;
-ov_streams
-ov_seekable
-ov_serialnumber
-;
-ov_raw_total
-ov_pcm_total
-ov_time_total
-;
-ov_raw_seek
-ov_pcm_seek
-ov_pcm_seek_page
-ov_time_seek
-ov_time_seek_page
-;
-ov_raw_seek_lap
-ov_pcm_seek_lap
-ov_pcm_seek_page_lap
-ov_time_seek_lap
-ov_time_seek_page_lap
-;
-ov_raw_tell
-ov_pcm_tell
-ov_time_tell
-;
-ov_info
-ov_comment
-;
-ov_read_float
-ov_read
-ov_crosslap
-;
-ov_halfrate
-ov_halfrate_p
-;
\ No newline at end of file

Copied: branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.def (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbisfile/libvorbisfile.def)

Deleted: branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.vcproj
===================================================================
--- tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbisfile/libvorbisfile.vcproj	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.vcproj	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="libvorbisfile"
-	ProjectGUID="{CEBDE98B-A6AA-46E6-BC79-FAAF823DB9EC}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="2"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBVORBISFILE_EXPORTS"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbisfile.dll"
-				LinkIncremental="2"
-				ModuleDefinitionFile="libvorbisfile.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/libvorbisfile.pdb"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/libvorbisfile.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="2"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBVORBISFILE_EXPORTS"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/libvorbisfile.dll"
-				LinkIncremental="1"
-				ModuleDefinitionFile="libvorbisfile.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/libvorbisfile.lib"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath=".\libvorbisfile.def">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\vorbisfile.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath="..\..\..\include\vorbis\vorbisfile.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: branches/vorbis-aotuv/win32/VS2003/libvorbisfile/libvorbisfile.vcproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/libvorbisfile/libvorbisfile.vcproj)

Copied: branches/vorbis-aotuv/win32/VS2003/vorbisdec (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisdec)

Deleted: branches/vorbis-aotuv/win32/VS2003/vorbisdec/vorbisdec.vcproj
===================================================================
--- tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisdec/vorbisdec.vcproj	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/VS2003/vorbisdec/vorbisdec.vcproj	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,268 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="vorbisdec"
-	ProjectGUID="{5833EEA1-1068-431F-A6E5-316E7DC5D90A}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisdec.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/vorbisdec.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisdec.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisdec.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE2|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisdec.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\examples\decoder_example.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: branches/vorbis-aotuv/win32/VS2003/vorbisdec/vorbisdec.vcproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisdec/vorbisdec.vcproj)

Copied: branches/vorbis-aotuv/win32/VS2003/vorbisenc (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisenc)

Deleted: branches/vorbis-aotuv/win32/VS2003/vorbisenc/vorbisenc.vcproj
===================================================================
--- tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisenc/vorbisenc.vcproj	2006-11-05 15:20:01 UTC (rev 12030)
+++ branches/vorbis-aotuv/win32/VS2003/vorbisenc/vorbisenc.vcproj	2006-11-05 15:39:26 UTC (rev 12031)
@@ -1,268 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="vorbisenc"
-	ProjectGUID="{E48B6A8B-F7FE-4DA8-8248-E64DBAC4F56C}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				ExceptionHandling="FALSE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisenc.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/vorbisenc.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisenc.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisenc.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release_SSE2|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"
-				CompileAs="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/vorbisenc.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\examples\encoder_example.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: branches/vorbis-aotuv/win32/VS2003/vorbisenc/vorbisenc.vcproj (from rev 12030, tags/vorbis/libvorbis-1.1.2/win32/VS2003/vorbisenc/vorbisenc.vcproj)



More information about the commits mailing list