]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
i've tested, now you can too
authorBrian West <brian@freeswitch.org>
Fri, 21 Dec 2012 02:08:42 +0000 (20:08 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 21 Dec 2012 02:08:42 +0000 (20:08 -0600)
94 files changed:
libs/libcodec2/COPYING
libs/libcodec2/INSTALL
libs/libcodec2/Makefile.am
libs/libcodec2/README
libs/libcodec2/configure.in
libs/libcodec2/octave/glottal.m
libs/libcodec2/octave/lsp_pdf.m
libs/libcodec2/octave/phase2.m
libs/libcodec2/octave/pl.m
libs/libcodec2/octave/plamp.m
libs/libcodec2/octave/plphase.m
libs/libcodec2/script/menu.sh
libs/libcodec2/src/Makefile.am
libs/libcodec2/src/_kiss_fft_guts.h [new file with mode: 0644]
libs/libcodec2/src/ampexp.c [new file with mode: 0644]
libs/libcodec2/src/ampexp.h [new file with mode: 0644]
libs/libcodec2/src/c2dec.c
libs/libcodec2/src/c2demo.c [new file with mode: 0644]
libs/libcodec2/src/c2enc.c
libs/libcodec2/src/c2sim.c
libs/libcodec2/src/codebook.c
libs/libcodec2/src/codebookd.c [new file with mode: 0644]
libs/libcodec2/src/codebookdt.c [new file with mode: 0644]
libs/libcodec2/src/codebookge.c [new file with mode: 0644]
libs/libcodec2/src/codebookjnd.c [new file with mode: 0644]
libs/libcodec2/src/codebookjvm.c [new file with mode: 0644]
libs/libcodec2/src/codebookres.c [new file with mode: 0644]
libs/libcodec2/src/codebookvq.c [new file with mode: 0644]
libs/libcodec2/src/codebookvqanssi.c [new file with mode: 0644]
libs/libcodec2/src/codec2.c
libs/libcodec2/src/codec2.h
libs/libcodec2/src/codec2_internal.h [new file with mode: 0644]
libs/libcodec2/src/comp.h
libs/libcodec2/src/defines.h
libs/libcodec2/src/dump.c
libs/libcodec2/src/dump.h
libs/libcodec2/src/fdmdv.c [new file with mode: 0644]
libs/libcodec2/src/fdmdv.h [new file with mode: 0644]
libs/libcodec2/src/fdmdv_demod.c [new file with mode: 0644]
libs/libcodec2/src/fdmdv_get_test_bits.c [new file with mode: 0644]
libs/libcodec2/src/fdmdv_interleave.c [new file with mode: 0644]
libs/libcodec2/src/fdmdv_internal.h [new file with mode: 0644]
libs/libcodec2/src/fdmdv_mod.c [new file with mode: 0644]
libs/libcodec2/src/fdmdv_put_test_bits.c [new file with mode: 0644]
libs/libcodec2/src/fifo.c [new file with mode: 0644]
libs/libcodec2/src/fifo.h [new file with mode: 0644]
libs/libcodec2/src/generate_codebook.c [new file with mode: 0644]
libs/libcodec2/src/genlspdtcb.c [new file with mode: 0644]
libs/libcodec2/src/globals.c
libs/libcodec2/src/globals.h
libs/libcodec2/src/glottal.c [new file with mode: 0644]
libs/libcodec2/src/hanning.h [new file with mode: 0644]
libs/libcodec2/src/interp.c
libs/libcodec2/src/interp.h
libs/libcodec2/src/kiss_fft.c [new file with mode: 0644]
libs/libcodec2/src/kiss_fft.h [new file with mode: 0644]
libs/libcodec2/src/listensim.sh
libs/libcodec2/src/lpc.c
libs/libcodec2/src/lpc.h
libs/libcodec2/src/lsp.c
libs/libcodec2/src/lsp.h
libs/libcodec2/src/nlp.c
libs/libcodec2/src/nlp.h
libs/libcodec2/src/octave.c [new file with mode: 0644]
libs/libcodec2/src/octave.h [new file with mode: 0644]
libs/libcodec2/src/os.h [new file with mode: 0644]
libs/libcodec2/src/pack.c
libs/libcodec2/src/phase.c
libs/libcodec2/src/phase.h
libs/libcodec2/src/phaseexp.c [new file with mode: 0644]
libs/libcodec2/src/phaseexp.h [new file with mode: 0644]
libs/libcodec2/src/pilot_coeff.h [new file with mode: 0644]
libs/libcodec2/src/postfilter.c
libs/libcodec2/src/postfilter.h
libs/libcodec2/src/quantise.c
libs/libcodec2/src/quantise.h
libs/libcodec2/src/rn.h [new file with mode: 0644]
libs/libcodec2/src/sim.sh
libs/libcodec2/src/sine.c
libs/libcodec2/src/sine.h
libs/libcodec2/src/test_bits.h [new file with mode: 0644]
libs/libcodec2/unittest/Makefile.am
libs/libcodec2/unittest/extract.c
libs/libcodec2/unittest/genlsp.c
libs/libcodec2/unittest/genres.c
libs/libcodec2/unittest/sd.c
libs/libcodec2/unittest/sd.h [new file with mode: 0644]
libs/libcodec2/unittest/tcodec2.c
libs/libcodec2/unittest/tcontphase.c
libs/libcodec2/unittest/tinterp.c
libs/libcodec2/unittest/tnlp.c
libs/libcodec2/unittest/tquant.c
libs/libcodec2/unittest/vqtrain.c
src/mod/codecs/mod_codec2/mod_codec2.c

index 4362b49151d7b34ef83b3067a8f9c9f877d72a0e..cc40a46821ebd2695137f89df713cec9fa793535 100644 (file)
@@ -484,8 +484,8 @@ convey the exclusion of warranty; and each file should have at least the
     Lesser General Public License for more details.
 
     You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+    License along with this library; if not, see 
+    <http://www.gnu.org/licenses/>. 
 
 Also add information on how to contact you by electronic and paper mail.
 
index 23e5f25d0e5f85798dcfb368ecb2f04f59777f61..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,236 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-These are generic installation instructions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
-
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
-     Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
index 085b8a5b1eb7ac108a8ccbe69f8a3777fe218042..f4b1bfb68efcbbc9eb73b18eeaf9b2e04469b5ca 100644 (file)
@@ -1,11 +1,9 @@
-AM_CFLAGS = -Isrc -Wall -lm
-AUTOMAKE_OPTIONS = gnu
-NAME = libcodec2
+AM_CFLAGS = -Isrc -fPIC -Wall -O3 -lm
+AUTOMAKE_OPTS = gnu
+NAME = codec2
 AM_CPPFLAGS = $(AM_CFLAGS)
 
-EXTRA_DIST = pitch/hts1a.p \
-pitch/hts2a.p \
-octave/glottal.m \
+EXTRA_DIST = octave/glottal.m \
 octave/lsp_pdf.m \
 octave/phase.m \
 octave/pl2.m \
@@ -68,11 +66,6 @@ wav/hts2a_g729a.wav \
 wav/m2400.wav \
 wav/morig_speex_8k.wav \
 src/globals.c \
-doc/A_m.gif \
-doc/omega_0.gif \
-doc/phi_m.gif \
-doc/s_n.gif \
-doc/s_n.txt \
 unittest/lsp2.txt \
 unittest/lsp7.txt \
 unittest/lspd78.txt \
@@ -87,12 +80,15 @@ unittest/lspd123.txt \
 unittest/lsp1.txt \
 unittest/lsp6.txt \
 unittest/lspd456.txt \
-src/codeall.sh \
-src/fq20.sh \
-src/listen1.sh \
-src/listen.sh \
-src/listensim.sh \
-src/sim.sh
-
+src/codebook/lsp1.txt \
+src/codebook/lsp2.txt \
+src/codebook/lsp3.txt \
+src/codebook/lsp4.txt \
+src/codebook/lsp5.txt \
+src/codebook/lsp6.txt \
+src/codebook/lsp7.txt \
+src/codebook/lsp8.txt \
+src/codebook/lsp9.txt \
+src/codebook/lsp10.txt
 
 SUBDIRS = src unittest
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c83988830f112cc8aa2b2dc150b4b4a97078807c 100644 (file)
@@ -0,0 +1,84 @@
+Codec 2 README
+--------------
+
+Codec 2 is an open source (LGPL licensed) speech codec for 2400 bit/s
+and below.  For more information please see:
+
+    http://rowetel.com/codec2.html
+
+Also included is a FDMDV modem, see README_fdmdv.txt
+
+Quickstart
+----------
+
+1/ Listen to Codec 2:
+
+   $ ./configure && make
+   $ cd src
+   $ ./c2demo ../raw/hts1a.raw hts1a_c2.raw
+   $ ../script/menu.sh ../raw/hts1a.raw hts1a_c2.raw
+
+   NOTE: For playback testing, menu.sh requires either the 'play',
+   'aplay' or 'ossplay' programs to be installed (see
+   http://sox.sourceforge.net/, http://www.alsa-project.org/, or
+   http://www.opensound.com/ respectively).
+
+2/ Compress and Decompress a file:
+
+   $ ./c2enc 2400 ../raw/hts1a.raw hts1a_c2.bit
+   $ ./c2dec 2400 hts1a_c2.bit hts1a_c2.raw 
+
+3/ Same thing with pipes:
+
+   $ ./c2enc 1400 ../raw/hts1a.raw - | ./c2dec 1400 - - | play -t raw -r 8000 -s -2 -
+
+Programs
+--------
+1/ c2demo encodes a file of speech samples, then decodes them and
+saves the result.
+
+2/ c2enc encodes a file of speech samples to a compressed file of
+encoded bits.
+
+3/ c2dec decodes a compressed file of bits to a file of speech
+samples.
+
+4/ c2sim is a simulation/development version of Codec 2.  It allows
+selective use of the various Codec 2 algorithms.  For example
+switching phase modelling or LSP quantisation on and off.
+
+Debugging
+---------
+
+1/ For dump file support:
+
+  $ cd codec2
+  $ CFLAGS=-DDUMP ./configure
+  $ make clean && make
+
+2/ To use gdb:
+
+  $ libtool --mode=execute gdb c2sim
+
+Directories
+-----------
+
+  fltk      - FLTK GUI programs(s)
+  octave    - Octave scripts used for visualising internal signals 
+              during development
+  portaudio - Portaudio test programs
+  script    - shell scripts for playing and converting raw files
+  src       - C source code
+  raw       - speech files in raw format (16 bits signed linear 8 kHz)
+  unittest  - unit test source code
+  voicing   - hand-estimated voicing files, used for development
+  wav       - speech files in wave file format
+  win32     - Support for building Windows DLL version of Codec 2 and FDMDV libraries
+
+TODO
+----
+
+[ ] Get win32/Makefile integrated into Automake system, such that if
+    i586-mingw32msvc exists the Win32 code gets automatically built.
+[ ] Same for fltk & portaudio, build these conditionally if libs exist
\ No newline at end of file
index 378ef5f2b9334906ece53aea2b11b8924fca492f..8adbf2a3c83492d3df900e75bcc7f703e75cdef0 100644 (file)
@@ -2,8 +2,8 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.59])
-AC_INIT(libcodec2, 1.0, david@rowetel.com)
-AM_INIT_AUTOMAKE(libcodec2,1.0)
+AC_INIT(codec2, 0.2, david@rowetel.com)
+AM_INIT_AUTOMAKE(codec2,0.2)
 
 # Checks for programs.
 AC_PROG_CC
index 2b823c37e3f2c65c41f2bbcad04a4030d5147404..46675e7d6c35b6f4ed4ead42b96af994835e9837 100644 (file)
@@ -11,13 +11,17 @@ kexc = [ 8,  -16,   26, -48,  86, -162, 294, -502, 718, -728, 184 672, -610, -67
 kexc = shift(kexc,sh);
 kexc = [kexc(1:sh) zeros(1,512-25) kexc(sh+1:25)];
 figure(1)
+clf
 plot(kexc)
 figure(2)
 G = fft(kexc);
+subplot(211)
 plot((1:256)*(4000/256),unwrap(angle(G(1:256))))
+subplot(212)
+plot(20*log10(abs(G)))
 
 f=fopen("glottal.c","wt");
-fprintf(f,"float glottal[]={\n");
+fprintf(f,"const float glottal[]={\n");
 for m=1:255
   fprintf(f,"  %f,\n",angle(G(m)));
 endfor
index 6617066e3db578832d6dd2617249be80e3c7c4d5..4fc1359a36e9ddf0bfca61d8a049d2c40a6e4534 100644 (file)
@@ -7,14 +7,19 @@ function lsp_pdf(lsp)
 
   % LSPs
 
-  figure(3);
+  figure(1);
   clf;
   [x,y] = hist(lsp(:,1),100);
-  plot(y*4000/pi,x,";1;");
+  plot(y*4000/pi,x,"+;1;");
   hold on;
-  for i=2:c
+  for i=2:5
     [x,y] = hist(lsp(:,i),100);
-    legend = sprintf(";%d;",i);
+    legend = sprintf("+%d;%d;",i,i);
+    plot(y*4000/pi,x,legend);
+  endfor
+  for i=6:c
+    [x,y] = hist(lsp(:,i),100);
+    legend = sprintf("+%d;%d;",i-5,i);
     plot(y*4000/pi,x,legend);
   endfor
   hold off;
@@ -22,29 +27,65 @@ function lsp_pdf(lsp)
 
   % LSP differences
 
-  figure(4);
+  figure(2);
   clf;
   subplot(211)
   [x,y] = hist(lsp(:,1),100);
-  plot(y,x,";1;");
+  plot(y*4000/pi,x,"1;1;");
   hold on;
   for i=2:5
     [x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
-    legend = sprintf(";%d;",i);
-    plot(y,x,legend);
+    legend = sprintf("%d;%d;",i,i);
+    plot(y*4000/pi,x,legend);
   endfor
   hold off;
   grid;
 
   subplot(212)
   [x,y] = hist(lsp(:,6)-lsp(:,5),100);
-  plot(y,x,";6;");
+  plot(y*4000/pi,x,"1;6;");
   hold on;
   for i=7:c
     [x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
-    legend = sprintf(";%d;",i);
-    plot(y,x,legend);
+    legend = sprintf("%d;%d;",i-5,i);
+    plot(y*4000/pi,x,legend);
   endfor
   hold off;
   grid;
+
+  % LSP differences delta from last frame
+
+  lspd(:,1) = lsp(:,1);
+  lspd(:,2:10) = lsp(:,2:10) - lsp(:,1:9);
+
+  [m,n] = size(lspd);
+  lspdd = lspd(5:m,:) -  lspd(1:m-4,:);
+  
+  figure(3);
+  clf;
+  subplot(211)
+  for i=1:5
+    [x,y] = hist(lspdd(:,i),100);
+    legend = sprintf("%d;%d;",i,i);
+    plot(y*4000/pi,x,legend);
+    hold on;
+  endfor
+  hold off;
+  grid;
+  axis([-200 200 0 35000]);
+
+  subplot(212)
+  for i=6:10
+    [x,y] = hist(lspdd(:,i),100);
+    legend = sprintf("%d;%d;",i-5,i);
+    plot(y*4000/pi,x,legend);
+    hold on;
+  endfor
+  hold off;
+  grid;
+  axis([-200 200 0 16000]);
+
+  figure(4);
+  clf;
+  plot((4000/pi)*(lsp(2:r,3)-lsp(1:r-1,3)))
 endfunction
index ea58dcbe11c79f748250680febe0e0a14642ef7a..5c148f38d26b63ab2e924f22aec072dda076f7fa 100644 (file)
@@ -6,8 +6,8 @@
 function phase2(samname, png)
   N = 16000;
 
-  f=45;
-  model = load("../src/hts1a_model.txt");
+  f=43;
+  model = load("../src/hts1a_phase_model.txt");
   phase = load("../src/hts1a_phase_phase.txt");
   Wo = model(f,1);
   P=2*pi/Wo;
@@ -15,13 +15,13 @@ function phase2(samname, png)
   A = model(f,3:(L+2));
   phi = phase(f,1:L);
   phi = zeros(1,L);
-  for m=L/2:L
-    phi(m) = 2*pi*rand(1,1);
-  end
+  phi(3) = -pi/2;
+  phi(4) = -pi/4;
+  phi(5) = pi/2;
 
   s = zeros(1,N);
 
-  for m=1:L
+  for m=3:5
     s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi(m));
     s = s + s_m;
   endfor
@@ -30,6 +30,13 @@ function phase2(samname, png)
   clf;
   plot(s(1:250));
 
+  figure(2);
+  clf;
+  subplot(211)
+  plot((1:L)*Wo*4000/pi, 20*log10(A),'+');
+  subplot(212)
+  plot((1:L)*Wo*4000/pi, phi,'+');
+
   fs=fopen(samname,"wb");
   fwrite(fs,s,"short");
   fclose(fs);
index 49968961d462cf86fad219ef864018b9c0930f94..0d547882152c15474c8cd1d037ecb9134ae0b3fd 100644 (file)
@@ -1,6 +1,9 @@
 % Copyright David Rowe 2009
 % This program is distributed under the terms of the GNU General Public License 
 % Version 2
+%
+% Plots a raw speech sample file, you can optionally specify the start and end
+% samples and create a large and small PNGs
 
 function pl(samname1, start_sam, end_sam, pngname)
   
@@ -19,7 +22,7 @@ function pl(samname1, start_sam, end_sam, pngname)
   figure(1);
   clf;
   plot(s(st:en));
-  axis([1 en-st min(s) max(s)]);
+  axis([1 en-st 1.1*min(s) 1.1*max(s)]);
  
   if (nargin == 4)
 
index 892830f0320eeca2cebbab9b6a02ef726a1220e0..62b6893ad5362f91f4a8e9bbe829e9a22c5a29c5 100644 (file)
@@ -4,8 +4,16 @@
 %
 % Plot ampltiude modelling information from dump files.
 
-function plamp(samname, f)
+function plamp(samname, f, samname2)
   
+  % switch some stuff off to unclutter display
+
+  plot_lsp = 0;
+  plot_snr = 0;
+  plot_vsnr = 0;
+  plot_sw = 0;
+  plot_pw = 0;
+
   sn_name = strcat(samname,"_sn.txt");
   Sn = load(sn_name);
 
@@ -17,6 +25,16 @@ function plamp(samname, f)
     Sw_ = load(sw__name);
   endif
 
+  ew_name = strcat(samname,"_ew.txt");
+  if (file_in_path(".",ew_name))
+    Ew = load(ew_name);
+  endif
+
+  rk_name = strcat(samname,"_rk.txt");
+  if (file_in_path(".",rk_name))
+    Rk = load(rk_name);
+  endif
+
   model_name = strcat(samname,"_model.txt");
   model = load(model_name);
 
@@ -50,12 +68,24 @@ function plamp(samname, f)
     snr = load(snr_name);
   endif
 
+  % optional second file, for exploring post filter
+
+  model2q_name = " ";
+  if nargin == 3
+    model2q_name = strcat(samname2,"_qmodel.txt");
+    if file_in_path(".",modelq_name)
+      model2q = load(model2q_name);
+    end
+  end
+
+  Ew_on = 1;
   k = ' ';
   do 
     figure(1);
     clf;
 %    s = [ Sn(2*(f-2)-1,:) Sn(2*(f-2),:) ];
     s = [ Sn(2*f-1,:) Sn(2*f,:) ];
+    size(s);
     plot(s);
     axis([1 length(s) -20000 20000]);
 
@@ -66,13 +96,14 @@ function plamp(samname, f)
     plot((1:L)*Wo*4000/pi, 20*log10(Am),";Am;r");
     axis([1 4000 -10 80]);
     hold on;
-%    plot((0:255)*4000/256, Sw(f-2,:),";Sw;");
-    plot((0:255)*4000/256, Sw(f,:),";Sw;");
-
+    if plot_sw
+      plot((0:255)*4000/256, Sw(f,:),";Sw;");
+    end
     if (file_in_path(".",modelq_name))
       Amq = modelq(f,3:(L+2));
       plot((1:L)*Wo*4000/pi, 20*log10(Amq),";Amq;g" );
-      if (file_in_path(".",pw_name))
+      if (file_in_path(".",pw_name) && plot_pw)
         plot((0:255)*4000/256, 10*log10(Pw(f,:)),";Pw;c");
       endif    
       signal = Am * Am';
@@ -82,8 +113,13 @@ function plamp(samname, f)
       plot((1:L)*Wo*4000/pi, 20*log10(Amq) - 20*log10(Am), Am_err_label);
     endif
 
-    if (file_in_path(".",snr_name))
-      snr_label = sprintf(";phase SNR %4.2f dB;",snr(f));
+    if file_in_path(".",model2q_name)
+      Amq2 = model2q(f,3:(L+2));
+      plot((1:L)*Wo*4000/pi, 20*log10(Amq2),";Amq2;m" );
+    end
+
+    if (file_in_path(".",snr_name) && plot_vsnr)
+      snr_label = sprintf(";Voicing SNR %4.2f dB;",snr(f));
       plot(1,1,snr_label);
     endif
 
@@ -96,11 +132,11 @@ function plamp(samname, f)
       noise = (orig-synth) * (orig-synth)';
       snr_phase = 10*log10(signal/noise);
 
-      phase_err_label = sprintf(";phase_err SNR %4.2f dB;",snr_phase);
-      plot((1:L)*Wo*4000/pi, 20*log10(orig-synth), phase_err_label);
+      %phase_err_label = sprintf(";phase_err SNR %4.2f dB;",snr_phase);
+      %plot((1:L)*Wo*4000/pi, 20*log10(orig-synth), phase_err_label);
     endif
 
-    if (file_in_path(".",lsp_name))
+    if (file_in_path(".",lsp_name) && plot_lsp)
       for l=1:10
         plot([lsp(f,l)*4000/pi lsp(f,l)*4000/pi], [60 80], 'r');
       endfor
@@ -108,33 +144,21 @@ function plamp(samname, f)
 
     hold off;
 
-    if (file_in_path(".",phase_name))
-      figure(3);
-      plot((1:L)*Wo*4000/pi, phase(f,1:L), ";phase;");
-      axis;
-      if (file_in_path(".",phase_name_))
-        hold on;
-        plot((1:L)*Wo*4000/pi, phase_(f,1:L), ";phase_;");
-       hold off;
-      endif
-      figure(2);
-    endif
-
-    % autocorrelation function to research voicing est
-    
-    %M = length(s);
-    %sw = s .* hanning(M)';
-    %for k=0:159
-    %  R(k+1) = sw(1:320-k) * sw(1+k:320)';
-    %endfor
-    %figure(4);
-    %R_label = sprintf(";R(k) %3.2f;",max(R(20:159))/R(1));
-    %plot(R/R(1),R_label);
-    %grid
+    %if (file_in_path(".",phase_name))
+      %figure(3);
+      %plot((1:L)*Wo*4000/pi, phase(f,1:L), ";phase;");
+      %axis;
+      %if (file_in_path(".",phase_name_))
+        %hold on;
+        %plot((1:L)*Wo*4000/pi, phase_(f,1:L), ";phase_;");
+       %hold off;
+      %endif
+      %figure(2);
+    %endif
 
     % interactive menu
 
-    printf("\rframe: %d  menu: n-next  b-back  p-png  q-quit ", f);
+    printf("\rframe: %d  menu: n-next  b-back  p-png  q-quit e-toggle Ew", f);
     fflush(stdout);
     k = kbhit();
     if (k == 'n')
@@ -143,6 +167,13 @@ function plamp(samname, f)
     if (k == 'b')
       f = f - 1;
     endif
+    if (k == 'e')
+       if (Ew_on == 1)
+           Ew_on = 0;
+        else
+           Ew_on = 1;
+        endif
+    endif
 
     % optional print to PNG
 
@@ -157,7 +188,7 @@ function plamp(samname, f)
       pngname = sprintf("%s_%d_sw.png",samname,f);
       print(pngname, '-dpng', "-S500,500")
       pngname = sprintf("%s_%d_sw_large.png",samname,f);
-      print(pngname, '-dpng', "-S800,600")
+      print(pngname, '-dpng', "-S1200,800")
     endif
 
   until (k == 'q')
index 9e6118567694e0a986bcceef7eb62e60e9df3519..c12422ea95dc6474705bce4475650c4954cf0884 100644 (file)
@@ -112,7 +112,7 @@ function plphase(samname, f)
       axis;
       if (file_in_path(".", phase_name_))
         hold on;
-        plot((1:L)*Wo*4000/pi, phase_(f,1:L)*180/pi, "g;phase_;");
+        plot((1:L)*Wo*4000/pi, phase_(f,1:L)*180/pi, "g;phase after;");
        grid
        hold off;
       endif
index 11297df9b93818b0ac1071d4347029806156b131..c0335d274812e729f15cac30265e295d2d28cef8 100755 (executable)
@@ -35,8 +35,7 @@
 #  GNU General Public License for more details.
 # 
 #  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#  along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 files=0
 items="Q-Quit\n"
@@ -52,19 +51,30 @@ do
   shift
 done
 
-readchar=1
 echo -n -e "\r" $items"- "
-while [ $readchar -ne 0 ]
-do
+while true ; do
   echo -n -e "\r -"
-  stty cbreak         # or stty raw
-  readchar=`dd if=/dev/tty bs=1 count=1 2>/dev/null`
+  stty cbreak         # or stty raw. Stty uses file descriptor 0, not /dev/tty.
+  readchar=`dd bs=1 count=1 2>/dev/null`
   stty -cbreak
-  if [ $readchar == 'q' ] ; then
-    readchar=0
-  fi
-  if [ $readchar -ne 0 ] ; then
-    play -r 8000 -s -2 ${file[$readchar]} $dsp 2> /dev/null
+  if [ -n "$readchar" ] ; then
+    if [ x$readchar == 'xq' -o x$readchar == 'xQ' ] ; then
+      echo
+      exit 0
+    fi
+    if [ -z ${file[$readchar]} ] ; then
+        echo -n -e "\nUnknown input\n" $items"- "
+        continue
+    fi
+    if ( play --version ) >/dev/null 2>&1; then
+      play -r 8000 -s -2 ${file[$readchar]} $dsp 2> /dev/null
+    elif ( aplay --version ) > /dev/null 2>&1; then
+      aplay -r 8000 -f S16_LE ${file[$readchar]} 2> /dev/null
+    elif ( ossplay -f? ) > /dev/null 2>&1; then
+      ossplay -s8000 -fS16_LE ${file[$readchar]} 2> /dev/null
+    else
+      echo "could not find play, aplay or ossplay program"
+    fi
   fi
 done
 echo
index e9b2fbc341003ae2732011abcde516082136df22..8d0d990c43c5110e08df4aec953277dff7a87c7a 100644 (file)
@@ -1,8 +1,120 @@
-AM_CFLAGS = -I../src -Wall -DFLOATING_POINT -DVAR_ARRAYS
-AUTOMAKE_OPTIONS = gnu
-NAME = libcodec2
+AM_CFLAGS = -I../src -fPIC -Wall -O3 -g
+AUTOMAKE_OPTS = gnu
+NAME = codec2
 AM_CPPFLAGS = $(AM_CFLAGS)
 
+D=codebook
+
+# lsp quantisers
+
+CODEBOOKS= \
+  $D/lsp1.txt \
+  $D/lsp2.txt \
+  $D/lsp3.txt \
+  $D/lsp4.txt \
+  $D/lsp5.txt \
+  $D/lsp6.txt \
+  $D/lsp7.txt \
+  $D/lsp8.txt \
+  $D/lsp9.txt \
+  $D/lsp10.txt
+
+# lspd quantisers
+
+CODEBOOKSD= \
+  $D/dlsp1.txt \
+  $D/dlsp2.txt \
+  $D/dlsp3.txt \
+  $D/dlsp4.txt \
+  $D/dlsp5.txt \
+  $D/dlsp6.txt \
+  $D/dlsp7.txt \
+  $D/dlsp8.txt \
+  $D/dlsp9.txt \
+  $D/dlsp10.txt 
+
+# lspd VQ quantisers
+
+CODEBOOKSVQ= \
+  $D/lsp1.txt \
+  $D/lsp2.txt \
+  $D/lsp3.txt \
+  $D/lsp4.txt \
+  $(top_srcdir)/unittest/lsp45678910.txt
+
+CODEBOOKSJND= \
+  $D/lsp1.txt \
+  $D/lsp2.txt \
+  $D/lsp3.txt \
+  $D/lsp4.txt \
+  $(top_srcdir)/unittest/lspjnd5-10.txt
+
+CODEBOOKSDT= \
+  $D/lspdt1.txt \
+  $D/lspdt2.txt \
+  $D/lspdt3.txt \
+  $D/lspdt4.txt \
+  $D/lspdt5.txt \
+  $D/lspdt6.txt \
+  $D/lspdt7.txt \
+  $D/lspdt8.txt \
+  $D/lspdt9.txt \
+  $D/lspdt10.txt
+
+CODEBOOKSJVM= \
+  $D/lspjvm1.txt \
+  $D/lspjvm2.txt \
+  $D/lspjvm3.txt
+
+CODEBOOKSVQANSSI= \
+  $D/lspvqanssi1.txt \
+  $D/lspvqanssi2.txt \
+  $D/lspvqanssi3.txt \
+  $D/lspvqanssi4.txt
+
+CODEBOOKSGE= \
+  $D/gecb.txt 
+
+noinst_PROGRAMS = generate_codebook genlspdtcb
+
+codebook.$(OBJEXT): codebook.c
+codebookd.$(OBJEXT): codebookd.c
+codebookdt.$(OBJEXT): codebookdt.c
+codebookvq.$(OBJEXT): codebookvq.c
+codebookjnd.$(OBJEXT): codebookjnd.c
+codebookjvm.$(OBJEXT): codebookjvm.c
+codebookvqanssi.$(OBJEXT): codebookvqanssi.c
+codebookge.$(OBJEXT): codebookge.c
+
+codebook.lo: codebook.c
+
+codebook.c: generate_codebook $(CODEBOOKS)
+       ./generate_codebook lsp_cb $(CODEBOOKS) > codebook.c
+
+codebookd.c: generate_codebook $(CODEBOOKSD)
+       ./generate_codebook lsp_cbd $(CODEBOOKSD) > codebookd.c
+
+codebookdt.c: generate_codebook $(CODEBOOKSDT)
+       ./generate_codebook lsp_cbdt $(CODEBOOKSDT) > codebookdt.c
+
+codebookvq.c: generate_codebook $(CODEBOOKSVQ)
+       ./generate_codebook lsp_cbvq $(CODEBOOKSVQ) > codebookvq.c
+
+codebookjnd.c: generate_codebook $(CODEBOOKSJND)
+       ./generate_codebook lsp_cbjnd $(CODEBOOKSJND) > codebookjnd.c
+
+codebookjvm.c: generate_codebook $(CODEBOOKSJVM)
+       ./generate_codebook lsp_cbjvm $(CODEBOOKSJVM) > codebookjvm.c
+
+codebookvqanssi.c: generate_codebook $(CODEBOOKSVQANSSI)
+       ./generate_codebook lsp_cbvqanssi $(CODEBOOKSVQANSSI) > codebookvqanssi.c
+
+codebookge.c: generate_codebook $(CODEBOOKSGE)
+       ./generate_codebook ge_cb $(CODEBOOKSGE) > codebookge.c
+
+clean-local:
+       -rm -f codebook.c codebookd.c codebookdvq.c codebookjnd.c codebookdt.c codebookjvm.c codebookge.c codebookvqanssi.c
+
 lib_LTLIBRARIES        = libcodec2.la
 libcodec2_la_SOURCES = dump.c \
 lpc.c \
@@ -10,44 +122,60 @@ nlp.c \
 postfilter.c \
 sine.c \
 codec2.c \
-four1.c \
+fifo.c \
+fdmdv.c \
+kiss_fft.c \
 interp.c \
 lsp.c \
 phase.c \
 quantise.c \
 pack.c \
-codebook.c
+codebook.c \
+codebookd.c \
+codebookvq.c \
+codebookjnd.c \
+codebookjvm.c \
+codebookvqanssi.c \
+codebookdt.c \
+codebookge.c 
+
 
 libcodec2_la_CFLAGS = $(AM_CFLAGS)
 libcodec2_la_LDFLAGS = $(LIBS)
 
-library_includedir = $(prefix)
-library_include_HEADERS        = codec2.h \
-defines.h \
-four1.h \
-interp.h \
-lsp.h \
-phase.h \
-quantise.h \
-comp.h \
-dump.h \
-globals.h \
-lpc.h \
-nlp.h  \
-postfilter.h \
-sine.h \
-codebook.h
-
-bin_PROGRAMS = c2dec c2enc c2sim
+library_includedir = $(prefix)/include
+library_include_HEADERS        = codec2.h
 
-c2dec_SOURCES = c2dec.c
-c2dec_LDADD = $(lib_LTLIBRARIES) 
-c2dec_LDFLAGS = $(LIBS)
+bin_PROGRAMS = c2demo c2enc c2dec c2sim fdmdv_get_test_bits fdmdv_mod fdmdv_demod fdmdv_put_test_bits fdmdv_interleave
+
+c2demo_SOURCES = c2demo.c
+c2demo_LDADD = $(lib_LTLIBRARIES) 
+c2demo_LDFLAGS = $(LIBS)
 
 c2enc_SOURCES = c2enc.c
 c2enc_LDADD = $(lib_LTLIBRARIES) 
 c2enc_LDFLAGS = $(LIBS)
 
-c2sim_SOURCES = c2sim.c
+c2dec_SOURCES = c2dec.c
+c2dec_LDADD = $(lib_LTLIBRARIES) 
+c2dec_LDFLAGS = $(LIBS)
+
+c2sim_SOURCES = c2sim.c ampexp.c phaseexp.c
 c2sim_LDADD = $(lib_LTLIBRARIES) 
 c2sim_LDFLAGS = $(LIBS)
+
+fdmdv_get_test_bits_SOURCES = fdmdv_get_test_bits.c fdmdv.c kiss_fft.c
+fdmdv_get_test_bits_LDFLAGS = $(LIBS)
+
+fdmdv_mod_SOURCES = fdmdv_mod.c fdmdv.c kiss_fft.c
+fdmdv_mod_LDFLAGS = $(LIBS)
+
+fdmdv_demod_SOURCES = fdmdv_demod.c fdmdv.c kiss_fft.c octave.c
+fdmdv_demod_LDFLAGS = $(LIBS)
+
+fdmdv_put_test_bits_SOURCES = fdmdv_put_test_bits.c fdmdv.c kiss_fft.c
+fdmdv_put_test_bits_LDFLAGS = $(LIBS)
+
+fdmdv_interleave_SOURCES = fdmdv_interleave.c
+fdmdv_interleave_LDFLAGS = $(LIBS)
+
diff --git a/libs/libcodec2/src/_kiss_fft_guts.h b/libs/libcodec2/src/_kiss_fft_guts.h
new file mode 100644 (file)
index 0000000..ba66144
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+Copyright (c) 2003-2010, Mark Borgerding
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* kiss_fft.h
+   defines kiss_fft_scalar as either short or a float type
+   and defines
+   typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */
+#include "kiss_fft.h"
+#include <limits.h>
+
+#define MAXFACTORS 32
+/* e.g. an fft of length 128 has 4 factors 
+ as far as kissfft is concerned
+ 4*4*4*2
+ */
+
+struct kiss_fft_state{
+    int nfft;
+    int inverse;
+    int factors[2*MAXFACTORS];
+    kiss_fft_cpx twiddles[1];
+};
+
+/*
+  Explanation of macros dealing with complex math:
+
+   C_MUL(m,a,b)         : m = a*b
+   C_FIXDIV( c , div )  : if a fixed point impl., c /= div. noop otherwise
+   C_SUB( res, a,b)     : res = a - b
+   C_SUBFROM( res , a)  : res -= a
+   C_ADDTO( res , a)    : res += a
+ * */
+#ifdef FIXED_POINT
+#if (FIXED_POINT==32)
+# define FRACBITS 31
+# define SAMPPROD int64_t
+#define SAMP_MAX 2147483647
+#else
+# define FRACBITS 15
+# define SAMPPROD int32_t 
+#define SAMP_MAX 32767
+#endif
+
+#define SAMP_MIN -SAMP_MAX
+
+#if defined(CHECK_OVERFLOW)
+#  define CHECK_OVERFLOW_OP(a,op,b)  \
+       if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
+               fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) );  }
+#endif
+
+
+#   define smul(a,b) ( (SAMPPROD)(a)*(b) )
+#   define sround( x )  (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS )
+
+#   define S_MUL(a,b) sround( smul(a,b) )
+
+#   define C_MUL(m,a,b) \
+      do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
+          (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
+
+#   define DIVSCALAR(x,k) \
+       (x) = sround( smul(  x, SAMP_MAX/k ) )
+
+#   define C_FIXDIV(c,div) \
+       do {    DIVSCALAR( (c).r , div);  \
+               DIVSCALAR( (c).i  , div); }while (0)
+
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r =  sround( smul( (c).r , s ) ) ;\
+        (c).i =  sround( smul( (c).i , s ) ) ; }while(0)
+
+#else  /* not FIXED_POINT*/
+
+#   define S_MUL(a,b) ( (a)*(b) )
+#define C_MUL(m,a,b) \
+    do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
+        (m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
+#   define C_FIXDIV(c,div) /* NOOP */
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r *= (s);\
+        (c).i *= (s); }while(0)
+#endif
+
+#ifndef CHECK_OVERFLOW_OP
+#  define CHECK_OVERFLOW_OP(a,op,b) /* noop */
+#endif
+
+#define  C_ADD( res, a,b)\
+    do { \
+           CHECK_OVERFLOW_OP((a).r,+,(b).r)\
+           CHECK_OVERFLOW_OP((a).i,+,(b).i)\
+           (res).r=(a).r+(b).r;  (res).i=(a).i+(b).i; \
+    }while(0)
+#define  C_SUB( res, a,b)\
+    do { \
+           CHECK_OVERFLOW_OP((a).r,-,(b).r)\
+           CHECK_OVERFLOW_OP((a).i,-,(b).i)\
+           (res).r=(a).r-(b).r;  (res).i=(a).i-(b).i; \
+    }while(0)
+#define C_ADDTO( res , a)\
+    do { \
+           CHECK_OVERFLOW_OP((res).r,+,(a).r)\
+           CHECK_OVERFLOW_OP((res).i,+,(a).i)\
+           (res).r += (a).r;  (res).i += (a).i;\
+    }while(0)
+
+#define C_SUBFROM( res , a)\
+    do {\
+           CHECK_OVERFLOW_OP((res).r,-,(a).r)\
+           CHECK_OVERFLOW_OP((res).i,-,(a).i)\
+           (res).r -= (a).r;  (res).i -= (a).i; \
+    }while(0)
+
+
+#ifdef FIXED_POINT
+#  define KISS_FFT_COS(phase)  floor(.5+SAMP_MAX * cos (phase))
+#  define KISS_FFT_SIN(phase)  floor(.5+SAMP_MAX * sin (phase))
+#  define HALF_OF(x) ((x)>>1)
+#elif defined(USE_SIMD)
+#  define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
+#  define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
+#  define HALF_OF(x) ((x)*_mm_set1_ps(.5))
+#else
+#  define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)
+#  define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
+#  define HALF_OF(x) ((x)*.5)
+#endif
+
+#define  kf_cexp(x,phase) \
+       do{ \
+               (x)->r = KISS_FFT_COS(phase);\
+               (x)->i = KISS_FFT_SIN(phase);\
+       }while(0)
+
+
+/* a debugging function */
+#define pcpx(c)\
+    fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) )
+
+
+#ifdef KISS_FFT_USE_ALLOCA
+// define this to allow use of alloca instead of malloc for temporary buffers
+// Temporary buffers are used in two case: 
+// 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5
+// 2. "in-place" FFTs.  Notice the quotes, since kissfft does not really do an in-place transform.
+#include <alloca.h>
+#define  KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes)
+#define  KISS_FFT_TMP_FREE(ptr) 
+#else
+#define  KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes)
+#define  KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr)
+#endif
diff --git a/libs/libcodec2/src/ampexp.c b/libs/libcodec2/src/ampexp.c
new file mode 100644 (file)
index 0000000..4d3b70a
--- /dev/null
@@ -0,0 +1,1093 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: ampexp.c                                
+  AUTHOR......: David Rowe                                             
+  DATE CREATED: 7 August 2012
+                                                                             
+  Functions for experimenting with amplitude quantisation.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not,see <http://www.gnu.org/licenses/>. 
+*/
+
+
+#include <assert.h>
+#include <ctype.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ampexp.h"
+
+
+#define PRED_COEFF 0.9
+
+/* states for amplitude experiments */
+
+struct codebook {
+    unsigned int        k;
+    unsigned int        log2m;
+    unsigned int        m;
+    float               *cb;
+    unsigned int         offset; 
+};
+
+struct AEXP {
+    float            A_prev[MAX_AMP];
+    int              frames;
+    float            snr;
+    int              snr_n;
+    float            var;
+    int              var_n;
+    float            vq_var;
+    int              vq_var_n;
+    struct codebook *vq1,*vq2,*vq3,*vq4,*vq5;
+
+    int              indexes[5][3];
+    MODEL            model[3];
+    float            mag[3];
+    MODEL            model_uq[3];
+};
+
+
+/*---------------------------------------------------------------------------*\
+
+  Bruce Perens' funcs to load codebook files
+
+\*---------------------------------------------------------------------------*/
+
+
+static const char format[] =
+"The table format must be:\n"
+"\tTwo integers describing the dimensions of the codebook.\n"
+"\tThen, enough numbers to fill the specified dimensions.\n";
+
+static float get_float(FILE * in, const char * name, char * * cursor, char * buffer, int size)
+{
+  for ( ; ; ) {
+    char *     s = *cursor;
+    char       c;
+
+    while ( (c = *s) != '\0' && !isdigit(c) && c != '-' && c != '.' )
+      s++;
+     
+    /* Comments start with "#" and continue to the end of the line. */
+    if ( c != '\0' && c != '#' ) {
+      char *   end = 0;
+      float    f = 0;
+
+      f = strtod(s, &end);
+
+      if ( end != s )
+        *cursor = end;
+        return f;
+    }
+
+    if ( fgets(buffer, size, in) == NULL ) {
+      fprintf(stderr, "%s: Format error. %s\n", name, format);
+      exit(1);
+    }
+    *cursor = buffer;
+  }
+}
+
+static struct codebook *load(const char * name)
+{
+    FILE               *file;
+    char               line[2048];
+    char               *cursor = line;
+    struct codebook    *b = malloc(sizeof(struct codebook));
+    int                        i;
+    int                        size;
+
+    file = fopen(name, "rt");
+    assert(file != NULL);
+
+    *cursor = '\0';
+
+    b->k = (int)get_float(file, name, &cursor, line, sizeof(line));
+    b->m = (int)get_float(file, name ,&cursor, line, sizeof(line));
+    size = b->k * b->m;
+
+    b->cb = (float *)malloc(size * sizeof(float));
+
+    for ( i = 0; i < size; i++ ) {
+       b->cb[i] = get_float(file, name, &cursor, line, sizeof(line));
+    }
+
+    fclose(file);
+
+    return b;
+}
+
+
+/*---------------------------------------------------------------------------* \
+
+  amp_experiment_create()
+
+  Inits states for amplitude quantisation experiments.
+
+\*---------------------------------------------------------------------------*/
+
+struct AEXP *amp_experiment_create() {
+    struct AEXP *aexp;
+    int i,j,m;
+
+    aexp = (struct AEXP *)malloc(sizeof(struct AEXP));
+    assert (aexp != NULL);
+
+    for(i=0; i<MAX_AMP; i++)
+       aexp->A_prev[i] = 1.0;
+    aexp->frames = 0;
+    aexp->snr = 0.0;
+    aexp->snr_n = 0;
+    aexp->var = 0.0;
+    aexp->var_n = 0;
+    aexp->vq_var = 0.0;
+    aexp->vq_var_n = 0;
+
+    //aexp->vq1 = load("amp_1_80_1024a.txt");
+    //aexp->vq1 = load("../unittest/st1_10_1024.txt");
+    //aexp->vq1 = load("../unittest/amp41_80_1024.txt");
+    //aexp->vq1->offset = 40;
+    aexp->vq1 = load("../unittest/amp1_10_1024.txt");
+    aexp->vq1->offset = 0;
+    aexp->vq2 = load("../unittest/amp11_20_1024.txt");
+    aexp->vq2->offset = 10;
+
+    aexp->vq3 = load("../unittest/amp21_40_1024.txt");
+    aexp->vq3->offset = 20;
+    aexp->vq4 = load("../unittest/amp41_60_1024.txt");
+    aexp->vq4->offset = 40;
+    aexp->vq5 = load("../unittest/amp61_80_256.txt");
+    aexp->vq5->offset = 60;
+
+    #ifdef CAND2_GS
+    //aexp->vq1 = load("../unittest/t1_amp1_20_1024.txt");
+    //aexp->vq1 = load("../unittest/t2_amp1_20_1024.txt");
+    aexp->vq1 = load("../unittest/amp1_20_1024.txt");
+    aexp->vq1->offset = 0;
+    aexp->vq2 = load("../unittest/amp21_40_1024.txt");
+    aexp->vq2->offset = 20;
+    aexp->vq3 = load("../unittest/amp41_60_1024.txt");
+    aexp->vq3->offset = 40;
+    aexp->vq4 = load("../unittest/amp61_80_32.txt");
+    aexp->vq4->offset = 60;
+    #endif
+
+    //#define CAND2_GS
+    #ifdef CAND2_GS
+    aexp->vq1 = load("../unittest/amp1_20_1024.txt");
+    aexp->vq2 = load("../unittest/amp21_40_1024.txt");
+    aexp->vq3 = load("../unittest/amp41_80_1024.txt");
+    aexp->vq4 = load("../unittest/amp61_80_32.txt");
+    aexp->vq1->offset = 0;
+    aexp->vq2->offset = 20;
+    aexp->vq3->offset = 40;
+    aexp->vq4->offset = 60;
+    #endif
+
+    //#define CAND1
+    #ifdef CAND1
+    aexp->vq1 = load("../unittest/amp1_10_128.txt");
+    aexp->vq2 = load("../unittest/amp11_20_512.txt");
+    aexp->vq3 = load("../unittest/amp21_40_1024.txt");
+    aexp->vq4 = load("../unittest/amp41_60_1024.txt");
+    aexp->vq5 = load("../unittest/amp61_80_32.txt");
+    aexp->vq1->offset = 0;
+    aexp->vq2->offset = 10;
+    aexp->vq3->offset = 20;
+    aexp->vq4->offset = 40;
+    aexp->vq5->offset = 60;
+    #endif
+
+    for(i=0; i<3; i++) {
+       for(j=0; j<5; j++)
+           aexp->indexes[j][i] = 0;
+       aexp->mag[i] = 1.0;
+       aexp->model[i].Wo = TWO_PI*100.0/8000.0;
+       aexp->model[i].L = floor(PI/aexp->model[i].Wo); 
+       for(m=1; m<=MAX_AMP; m++)
+           aexp->model[i].A[m] = 10.0;
+       aexp->model_uq[i] = aexp->model[i];
+    }
+
+    return aexp;
+}
+
+
+/*---------------------------------------------------------------------------* \
+
+  amp_experiment_destroy()
+
+\*---------------------------------------------------------------------------*/
+
+void amp_experiment_destroy(struct AEXP *aexp) {
+    assert(aexp != NULL);
+    if (aexp->snr != 0.0)
+       printf("snr: %4.2f dB\n", aexp->snr/aexp->snr_n);
+    if (aexp->var != 0.0)
+       printf("var...: %4.3f  std dev...: %4.3f (%d amplitude samples)\n", 
+              aexp->var/aexp->var_n, sqrt(aexp->var/aexp->var_n), aexp->var_n);
+    if (aexp->vq_var != 0.0)
+       printf("vq var: %4.3f  std dev...: %4.3f (%d amplitude samples)\n", 
+              aexp->vq_var/aexp->vq_var_n, sqrt(aexp->vq_var/aexp->vq_var_n), aexp->vq_var_n);
+    free(aexp);
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+  Various test and experimental functions ................
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Quantisation noise simulation.  Assume noise on amplitudes is a uniform
+  distribution, of +/- x dB.  This means x = sqrt(3)*sigma.
+
+  Note: for uniform distribution var = = sigma * sigma = (b-a)*(b-a)/12. 
+*/
+
+static void add_quant_noise(struct AEXP *aexp, MODEL *model, int start, int end, float sigma_dB)
+{
+    int   m;
+    float x_dB;
+    float noise_sam_dB;
+    float noise_sam_lin;
+
+    x_dB = sqrt(3.0) * sigma_dB;
+
+    for(m=start; m<=end; m++) {
+       noise_sam_dB = x_dB*(1.0 - 2.0*rand()/RAND_MAX);
+       //printf("%f\n", noise_sam_dB);
+       noise_sam_lin = pow(10.0, noise_sam_dB/20.0);
+       model->A[m] *= noise_sam_lin;
+       aexp->var += noise_sam_dB*noise_sam_dB;
+       aexp->var_n++;
+    }
+
+}
+
+/*
+  void print_sparse_pred_error()
+
+  use to check pred error stats (e.g. of first 1kHz) in Octave:
+
+     $ ./c2sim ../raw/hts1a.raw --ampexp > amppe.txt
+
+     octave> load ../src/amppe.txt
+     octave> std(nonzeros(amppe(:,1:20)))
+     octave> hist(nonzeros(amppe(:,1:20)),20);
+
+ */
+
+
+static void print_sparse_pred_error(struct AEXP *aexp, MODEL *model, float mag_thresh)
+{
+    int    m, index;
+    float  mag, error;
+    float  sparse_pe[MAX_AMP];
+
+    mag = 0.0;
+    for(m=1; m<=model->L; m++)
+       mag += model->A[m]*model->A[m];
+    mag = 10*log10(mag/model->L);
+
+    if (mag > mag_thresh) {
+       for(m=0; m<MAX_AMP; m++) {
+           sparse_pe[m] = 0.0;
+       }
+
+       for(m=1; m<=model->L; m++) {
+           assert(model->A[m] > 0.0);
+           error = PRED_COEFF*20.0*log10(aexp->A_prev[m]) - 20.0*log10(model->A[m]);
+           //error = 20.0*log10(model->A[m]) - mag;
+
+           index = MAX_AMP*m*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe[index] = error;
+       }
+
+       /* dump sparse amp vector */
+
+       for(m=0; m<MAX_AMP; m++)
+           printf("%f ", sparse_pe[m]);
+       printf("\n");
+    }
+}
+
+
+static float frame_energy(MODEL *model, float *enormdB) {
+    int   m;
+    float e, edB;
+
+    e = 0.0;
+    for(m=1; m<=model->L; m++)
+       e += model->A[m]*model->A[m];
+    edB = 10*log10(e);
+
+    #define VER_E0
+
+    #ifdef VER_E0
+    *enormdB = 10*log10(e/model->L); /* make high and low pitches have similar amps */
+    #endif
+
+    #ifdef VER_E1
+    e = 0.0;
+    for(m=1; m<=model->L; m++)
+       e += 10*log10(model->A[m]*model->A[m]);
+    *enormdB = e;
+    #endif
+
+    #ifdef VER_E2
+    e = 0.0;
+    for(m=1; m<=model->L; m++)
+       e += 10*log10(model->A[m]*model->A[m]);
+    *enormdB = e/model->L;
+    #endif
+    //printf("%f\n", enormdB);
+
+    return edB;
+}
+
+static void print_sparse_amp_error(struct AEXP *aexp, MODEL *model, float edB_thresh)
+{
+    int    m, index;
+    float  edB, enormdB, error, dWo, Am;
+    float  sparse_pe[MAX_AMP];
+
+    edB = frame_energy(model, &enormdB);
+    //printf("%f\n", enormdB);
+    dWo = fabs((aexp->model_uq[2].Wo - aexp->model_uq[1].Wo)/aexp->model_uq[2].Wo);
+    
+    if ((edB > edB_thresh) && (dWo < 0.1)) {
+       for(m=0; m<MAX_AMP; m++) {
+           sparse_pe[m] = 0.0;
+       }
+
+       for(m=1; m<=model->L; m++) {
+           assert(model->A[m] > 0.0);
+           error = 20.0*log10(model->A[m]) - enormdB;
+
+           index = MAX_AMP*m*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe[index] = error;
+       }
+
+       /* dump sparse amp vector */
+       
+       for(m=0; m<MAX_AMP; m++)
+           printf("%f ", sparse_pe[m]);
+       printf("\n");
+    }
+}
+
+
+int vq_amp(float cb[], float vec[], float weights[], int d, int e, float *se)
+{
+   float   error;      /* current error                */
+   int     besti;      /* best index so far            */
+   float   best_error; /* best error so far            */
+   int    i,j;
+   float   diff, metric, best_metric;
+
+   besti = 0;
+   best_metric = best_error = 1E32;
+   for(j=0; j<e; j++) {
+       metric = error = 0.0;
+       for(i=0; i<d; i++) {
+          if (vec[i] != 0.0) {
+              diff = (cb[j*d+i] - vec[i]);
+              error += diff*diff;
+              metric += weights[i]*diff*diff;
+          }
+       }
+       if (metric < best_metric) {
+          best_error = error;
+          best_metric = metric;
+          besti = j;
+       }
+   }
+
+   *se += best_error;
+
+   return(besti);
+}
+
+
+static int split_vq(float sparse_pe_out[], struct AEXP *aexp, struct codebook *vq, float weights[], float sparse_pe_in[])
+{
+    int i, j, non_zero, vq_ind;
+    float se;
+
+    vq_ind = vq_amp(vq->cb, &sparse_pe_in[vq->offset], &weights[vq->offset], vq->k, vq->m, &se);
+    printf("\n offset %d k %d m %d vq_ind %d j: ", vq->offset, vq->k, vq->m, vq_ind);
+    
+    non_zero = 0;
+    for(i=0, j=vq->offset; i<vq->k; i++,j++) {
+       if (sparse_pe_in[j] != 0.0) {
+           printf("%d ", j);
+           sparse_pe_in[j]  -= vq->cb[vq->k * vq_ind + i];
+           sparse_pe_out[j] += vq->cb[vq->k * vq_ind + i];
+           non_zero++;
+       }
+    }
+    aexp->vq_var_n += non_zero;
+    return vq_ind;
+}
+
+
+static void sparse_vq_pred_error(struct AEXP *aexp, 
+                                MODEL       *model 
+)
+{
+    int    m, index;
+    float  error, amp_dB, edB, enormdB;
+    float  sparse_pe_in[MAX_AMP];
+    float  sparse_pe_out[MAX_AMP];
+    float  weights[MAX_AMP];
+
+    edB = frame_energy(model, &enormdB);
+
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_in[m] = 0.0;
+       sparse_pe_out[m] = 0.0;
+    }
+
+    for(m=1; m<=model->L; m++) {
+       assert(model->A[m] > 0.0);
+       error = PRED_COEFF*20.0*log10(aexp->A_prev[m]) - 20.0*log10(model->A[m]);
+
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_in[index] = error;
+       weights[index] = model->A[m];
+    }
+
+    /* vector quantise */
+        
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_out[m] = sparse_pe_in[m];
+    }
+
+    //#define SIM_VQ
+    #ifndef SIM_VQ
+    split_vq(sparse_pe_out, aexp, aexp->vq1, weights, sparse_pe_in);
+    #else
+    for(m=aexp->vq->offset; m<aexp->vq->offset+aexp->vq->k; m++) {
+       if (sparse_pe_in[m] != 0.0) {
+           float error = 8*(1.0 - 2.0*rand()/RAND_MAX);
+           aexp->vq_var += error*error;
+           aexp->vq_var_n++;
+           sparse_pe_out[m] = sparse_pe_in[m] + error;
+       }
+    }
+    #endif
+
+    if (edB > -100.0)
+       for(m=0; m<MAX_AMP; m++) {
+           if (sparse_pe_in[m] != 0.0)
+               aexp->vq_var += pow(sparse_pe_out[m] - sparse_pe_in[m], 2.0);
+       }
+    
+    /* transform quantised amps back */
+
+    for(m=1; m<=model->L; m++) {
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       amp_dB = PRED_COEFF*20.0*log10(aexp->A_prev[m]) - sparse_pe_out[index];
+       //printf("in: %f  out: %f\n", sparse_pe_in[index], sparse_pe_out[index]);
+       //printf("amp_dB: %f A[m] (dB) %f\n", amp_dB, 20.0*log10(model->A[m]));
+       model->A[m] = pow(10.0, amp_dB/20.0);
+    }
+    //exit(0);
+}
+
+
+static void split_error(struct AEXP *aexp, struct codebook *vq, float sparse_pe_in[], int ind)
+{
+    int i, j;
+
+    for(i=0, j=vq->offset; i<vq->k; i++,j++) {
+       if (sparse_pe_in[j] != 0.0) {
+           sparse_pe_in[j] -= vq->cb[vq->k * ind + i];
+       }
+    }
+}
+
+
+static void sparse_vq_amp(struct AEXP *aexp, MODEL *model)
+{
+    int    m, index;
+    float  error, amp_dB, edB, enormdB;
+    float  sparse_pe_in[MAX_AMP];
+    float  sparse_pe_out[MAX_AMP];
+    float  weights[MAX_AMP];
+
+    edB = frame_energy(model, &enormdB);
+
+    aexp->mag[2] = enormdB;
+   
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_in[m] = 0.0;
+       sparse_pe_out[m] = 0.0;
+    }
+
+    for(m=1; m<=model->L; m++) {
+       assert(model->A[m] > 0.0);
+       error = 20.0*log10(model->A[m]) - enormdB;
+
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_in[index] = error;
+       weights[index] = pow(model->A[m],0.8);
+    }
+
+    /* vector quantise */
+        
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_out[m] = sparse_pe_in[m];
+    }
+    
+    for(m=0; m<80; m++)
+       sparse_pe_out[m] = 0;
+    
+    #define SPLIT
+    #ifdef SPLIT
+    aexp->indexes[0][2] = split_vq(sparse_pe_out, aexp, aexp->vq1, weights, sparse_pe_in);
+    
+    aexp->indexes[1][2] = split_vq(sparse_pe_out, aexp, aexp->vq2, weights, sparse_pe_in);
+    aexp->indexes[2][2] = split_vq(sparse_pe_out, aexp, aexp->vq3, weights, sparse_pe_in);
+    aexp->indexes[3][2] = split_vq(sparse_pe_out, aexp, aexp->vq4, weights, sparse_pe_in);
+    aexp->indexes[4][2] = split_vq(sparse_pe_out, aexp, aexp->vq5, weights, sparse_pe_in);
+    #endif
+    //#define MULTISTAGE
+    #ifdef MULTISTAGE
+    aexp->indexes[0][2] = split_vq(sparse_pe_out, aexp, aexp->vq1, weights, sparse_pe_in);
+    aexp->indexes[1][2] = split_vq(sparse_pe_out, aexp, aexp->vq2, weights, sparse_pe_in);
+    aexp->indexes[2][2] = split_vq(sparse_pe_out, aexp, aexp->vq3, weights, sparse_pe_in);
+    //aexp->indexes[3][2] = split_vq(sparse_pe_out, aexp, aexp->vq4, weights, sparse_pe_in);
+    #endif
+
+    for(m=0; m<MAX_AMP; m++) {
+       if (sparse_pe_in[m] != 0.0)
+           aexp->vq_var += pow(sparse_pe_out[m] - sparse_pe_in[m], 2.0);
+    }
+    
+    /* transform quantised amps back */
+
+    for(m=1; m<=model->L; m++) {
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       amp_dB = sparse_pe_out[index] + enormdB;
+       model->A[m] = pow(10.0, amp_dB/20.0);
+    }
+    //exit(0);
+}
+
+
+static void update_snr_calc(struct AEXP *aexp, MODEL *m1, MODEL *m2)
+{
+    int m;
+    float signal, noise, signal_dB;
+
+    assert(m1->L == m2->L);
+
+    signal = 0.0; noise = 1E-32;
+    for(m=1; m<=m1->L; m++) {      
+       signal += m1->A[m]*m1->A[m];
+       noise  += pow(m1->A[m] - m2->A[m], 2.0);
+       //printf("%f %f\n", before[m], model->phi[m]);
+    }
+    signal_dB = 10*log10(signal);
+    if (signal_dB > -100.0) {
+       aexp->snr += 10.0*log10(signal/noise);
+       aexp->snr_n++;
+    }
+}
+
+
+/* gain/shape vq search.  Returns index of best gain.  Gain is additive (as we use log quantisers) */
+
+int gain_shape_vq_amp(float cb[], float vec[], float weights[], int d, int e, float *se, float *best_gain)
+{
+   float   error;      /* current error                */
+   int     besti;      /* best index so far            */
+   float   best_error; /* best error so far            */
+   int    i,j,m;
+   float   diff, metric, best_metric, gain, sumAm, sumCb;
+
+   besti = 0;
+   best_metric = best_error = 1E32;
+   for(j=0; j<e; j++) {
+
+       /* compute optimum gain */
+
+       sumAm = sumCb = 0.0;
+       m = 0;
+       for(i=0; i<d; i++) {
+          if (vec[i] != 0.0) {
+              m++;
+              sumAm += vec[i];
+              sumCb += cb[j*d+i];
+          }
+       }
+       gain = (sumAm - sumCb)/m;
+       
+       /* compute error */
+
+       metric = error = 0.0;
+       for(i=0; i<d; i++) {
+          if (vec[i] != 0.0) {
+              diff = vec[i] - cb[j*d+i] - gain;
+              error += diff*diff;
+              metric += weights[i]*diff*diff;
+          }
+       }
+       if (metric < best_metric) {
+          best_error = error;
+          best_metric = metric;
+          *best_gain = gain;
+          besti = j;
+       }
+   }
+
+   *se += best_error;
+
+   return(besti);
+}
+
+
+static void gain_shape_split_vq(float sparse_pe_out[], struct AEXP *aexp, struct codebook *vq, float weights[], float sparse_pe_in[], float *best_gain)
+{
+    int i, j, non_zero, vq_ind;
+    float se;
+
+    vq_ind = gain_shape_vq_amp(vq->cb, &sparse_pe_in[vq->offset], &weights[vq->offset], vq->k, vq->m, &se, best_gain);
+    //printf("\n offset %d k %d m %d vq_ind %d gain: %4.2f j: ", vq->offset, vq->k, vq->m, vq_ind, *best_gain);
+  
+    non_zero = 0;
+    for(i=0, j=vq->offset; i<vq->k; i++,j++) {
+       if (sparse_pe_in[j] != 0.0) {
+           //printf("%d ", j);
+           sparse_pe_out[j] = vq->cb[vq->k * vq_ind + i] + *best_gain;
+           non_zero++;
+       }
+    }
+    aexp->vq_var_n += non_zero;
+}
+
+
+static void gain_shape_sparse_vq_amp(struct AEXP *aexp, MODEL *model)
+{
+    int    m, index;
+    float  amp_dB, best_gain;
+    float  sparse_pe_in[MAX_AMP];
+    float  sparse_pe_out[MAX_AMP];
+    float  weights[MAX_AMP];
+
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_in[m] = 0.0;
+       sparse_pe_out[m] = 0.0;
+    }
+
+    for(m=1; m<=model->L; m++) {
+       assert(model->A[m] > 0.0);
+
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_in[index] = 20.0*log10(model->A[m]);
+       weights[index] = model->A[m];
+    }
+
+    /* vector quantise */
+        
+    for(m=0; m<=MAX_AMP; m++) {
+       sparse_pe_out[m] = sparse_pe_in[m];
+    }
+
+    gain_shape_split_vq(sparse_pe_out, aexp, aexp->vq1, weights, sparse_pe_in, &best_gain);
+    gain_shape_split_vq(sparse_pe_out, aexp, aexp->vq2, weights, sparse_pe_in, &best_gain);
+    gain_shape_split_vq(sparse_pe_out, aexp, aexp->vq3, weights, sparse_pe_in, &best_gain);
+    gain_shape_split_vq(sparse_pe_out, aexp, aexp->vq4, weights, sparse_pe_in, &best_gain);
+
+    for(m=0; m<MAX_AMP; m++) {
+       if (sparse_pe_in[m] != 0.0)
+           aexp->vq_var += pow(sparse_pe_out[m] - sparse_pe_in[m], 2.0);
+    }
+    
+    /* transform quantised amps back */
+
+    for(m=1; m<=model->L; m++) {
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       amp_dB = sparse_pe_out[index];
+       model->A[m] = pow(10.0, amp_dB/20.0);
+    }
+    //exit(0);
+}
+
+
+static void interp_split_vq(float sparse_pe_out[], struct AEXP *aexp, struct codebook *vq, float sparse_pe_in[], int ind)
+{
+    int   i, j;
+    float amp_dB;
+  
+    for(i=0, j=vq->offset; i<vq->k; i++,j++) {
+       if (sparse_pe_in[j] != 0.0) {
+           amp_dB  = 0.5*(aexp->mag[0] + vq->cb[vq->k * aexp->indexes[ind][0] + i]);
+           amp_dB += 0.5*(aexp->mag[2] + vq->cb[vq->k * aexp->indexes[ind][2] + i]);
+           sparse_pe_out[j] = amp_dB;
+       }
+    }
+}
+
+
+static void vq_interp(struct AEXP *aexp, MODEL *model, int on)
+{
+    int              i, j, m, index;
+    float            amp_dB;
+    //struct codebook *vq = aexp->vq1;
+    float  sparse_pe_in[MAX_AMP];
+    float  sparse_pe_out[MAX_AMP];
+    /* replace odd frames with interp */
+    /* once we get an even input frame we can interpolate and output odd */
+    /* using VQ to interpolate.  This assumes some correlation in
+       adjacent VQ samples */
+
+    memcpy(&aexp->model[2], model, sizeof(MODEL));
+
+    /* once we get an even input frame we have enough information to
+      replace prev odd frame with interpolated version */
+
+    if (on && ((aexp->frames % 2) == 0)) {
+
+       /* copy Wo, L, and phases */
+
+       memcpy(model, &aexp->model[1], sizeof(MODEL));
+       //printf("mags: %4.2f %4.2f %4.2f Am: \n", aexp->mag[0], aexp->mag[1], aexp->mag[2]);
+
+       /* now replace Am by interpolation, use similar design to VQ
+          to handle different bands  */
+
+       for(m=1; m<=model->L; m++) {
+           assert(model->A[m] > 0.0);
+
+           index = MAX_AMP*m*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe_in[index] = 20.0*log10(model->A[m]);
+       }
+
+       /* this can be used for when just testing partial interpolation */
+
+       for(m=0; m<MAX_AMP; m++) {
+           //sparse_pe_out[m] = sparse_pe_in[m];
+           sparse_pe_out[m] = 0;
+       }
+       
+       interp_split_vq(sparse_pe_out, aexp, aexp->vq1, sparse_pe_in, 0);
+       interp_split_vq(sparse_pe_out, aexp, aexp->vq2, sparse_pe_in, 1);
+       interp_split_vq(sparse_pe_out, aexp, aexp->vq3, sparse_pe_in, 2);
+       interp_split_vq(sparse_pe_out, aexp, aexp->vq4, sparse_pe_in, 3);
+       interp_split_vq(sparse_pe_out, aexp, aexp->vq5, sparse_pe_in, 4);
+
+       for(m=1; m<=model->L; m++) {
+           index = MAX_AMP*m*model->Wo/PI;
+           assert(index < MAX_AMP);
+           amp_dB = sparse_pe_out[index];
+           //printf("  %4.2f", 10.0*log10(model->A[m]));
+           model->A[m] = pow(10.0, amp_dB/20.0);
+           //printf("  %4.2f\n", 10.0*log10(model->A[m]));
+       }
+        #ifdef INITIAL_VER
+        
+       for(m=1; m<=model->L; m++) {
+           index = MAX_AMP*m*model->Wo/PI;
+           assert(index < MAX_AMP);
+
+           if (index < vq->k) {
+               amp_dB  = 0.5*(aexp->mag[0] + vq->cb[vq->k * aexp->indexes[0] + index]);
+               amp_dB += 0.5*(aexp->mag[2] + vq->cb[vq->k * aexp->indexes[2] + index]);
+               //printf("  %4.2f", 10.0*log10(model->A[m]));
+               //amp_dB = 10;
+               model->A[m] = pow(10.0, amp_dB/20.0);
+               printf("  %4.2f\n", 10.0*log10(model->A[m]));
+           }
+       }
+       
+       #endif
+    }
+    else
+       memcpy(model, &aexp->model[1], sizeof(MODEL));
+
+    /* update memories */
+
+    for(i=0; i<2; i++) {
+       memcpy(&aexp->model[i], &aexp->model[i+1], sizeof(MODEL));
+       for(j=0; j<5; j++)
+           aexp->indexes[j][i] = aexp->indexes[j][i+1];
+       aexp->mag[i] = aexp->mag[i+1];
+    }
+
+}
+
+
+/*
+  This functions tests theory that some bands can be combined together
+  due to less frequency resolution at higher frequencies.  This will
+  reduce the amount of information we need to encode.
+*/
+
+void smooth_samples(struct AEXP *aexp, MODEL *model, int mode)
+{
+    int    m, i, j, index, step, nav, v, en;
+    float  sparse_pe_in[MAX_AMP], av, amp_dB;
+    float  sparse_pe_out[MAX_AMP];
+    float  smoothed[MAX_AMP], smoothed_out[MAX_AMP];
+    float  weights[MAX_AMP];
+    float  edB, enormdB;
+
+    edB = frame_energy(model, &enormdB);
+    
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_in[m] = 0.0;
+       sparse_pe_out[m] = 0.0;
+    }
+
+    /* set up sparse array */
+
+    for(m=1; m<=model->L; m++) {
+       assert(model->A[m] > 0.0);
+
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_out[index] = sparse_pe_in[index] = 20.0*log10(model->A[m]) - enormdB;
+    }
+
+    /* now combine samples at high frequencies to reduce dimension */
+
+    step=4;
+    for(i=MAX_AMP/2,v=0; i<MAX_AMP; i+=step,v++) {
+
+       /* average over one band */
+
+       av = 0.0; nav = 0;
+       en = i+step;
+       if (en > (MAX_AMP-1))
+           en = MAX_AMP-1;
+       for(j=i; j<en; j++) {
+           if (sparse_pe_in[j] != 0.0) {
+               av += sparse_pe_in[j];
+               nav++;
+           }
+       }
+       if (nav) {
+           av /= nav;
+           smoothed[v] = av;
+           weights[v] = pow(10.0,av/20.0);
+           //weights[v] = 1.0;
+       }
+       else
+           smoothed[v] = 0.0;
+
+    }
+
+    if (mode == 1) {
+       for(i=0; i<v; i++)
+           printf("%5.2f ", smoothed[i]);
+       printf("\n");
+    }
+
+    if (mode == 2) {
+       for(i=0; i<v; i++)
+           smoothed_out[i] = 0;
+       split_vq(smoothed_out, aexp, aexp->vq1, weights, smoothed);
+       for(i=0; i<v; i++)
+           smoothed[i] = smoothed_out[i];
+    }
+       
+    /* set all samples to smoothed average */
+
+    step = 4;
+    for(i=MAX_AMP/2,v=0; i<MAX_AMP; i+=step,v++) {
+       en = i+step;
+       if (en > (MAX_AMP-1))
+           en = MAX_AMP-1;
+       for(j=i; j<en; j++)
+           sparse_pe_out[j] = smoothed[v];
+    }
+         
+    /* convert back to Am */
+    
+    for(m=1; m<=model->L; m++) {
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       amp_dB = sparse_pe_out[index] + enormdB;
+       //printf("%d %4.2f %4.2f\n", m, 10.0*log10(model->A[m]), amp_dB);
+       model->A[m] = pow(10.0, amp_dB/20.0);
+    }
+    
+}
+
+#define MAX_BINS 40
+static float bins[] = {
+    /*1000.0, 1200.0, 1400.0, 1600.0, 1800,*/
+    2000.0, 2400.0, 2800.0,
+    3000.0, 3400.0, 3600.0, 4000.0};
+
+void smooth_amp(struct AEXP *aexp, MODEL *model) {
+    int    m, i;
+    int    nbins;
+    int    b;
+    float  f;
+    float  av[MAX_BINS];
+    int    nav[MAX_BINS];
+
+    nbins = sizeof(bins)/sizeof(float);
+
+    /* clear all bins */
+
+    for(i=0; i<MAX_BINS; i++) {
+       av[i] = 0.0;
+       nav[i] = 0;
+    }
+
+    /* add amps into each bin */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin  */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           av[b] += model->A[m]*model->A[m];
+           nav[b]++;
+       }
+           
+    }
+
+    /* use averages to est amps */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           /* add predicted phase error to this bin */
+
+           printf("L %d m %d f %4.f b %d\n", model->L, m, f, b);
+
+           printf(" %d: %4.3f -> ", m, 20*log10(model->A[m])); 
+           model->A[m] = sqrt(av[b]/nav[b]);
+           printf("%4.3f\n", 20*log10(model->A[m])); 
+       }
+    }
+    printf("\n");
+}
+
+/*---------------------------------------------------------------------------* \
+
+  amp_experiment()
+
+  Amplitude quantisation experiments.
+
+\*---------------------------------------------------------------------------*/
+
+void amp_experiment(struct AEXP *aexp, MODEL *model, char *arg) {
+    int m,i;
+    
+    memcpy(&aexp->model_uq[2], model, sizeof(MODEL));
+
+    if (strcmp(arg, "qn") == 0) {
+       add_quant_noise(aexp, model, 1, model->L, 1);
+       update_snr_calc(aexp, &aexp->model_uq[2], model);
+   }
+
+    /* print training samples that can be > train.txt for training VQ */
+
+    if (strcmp(arg, "train") == 0) 
+       print_sparse_amp_error(aexp, model, 00.0);
+
+    /* VQ of amplitudes, no interpolation (ie 10ms rate) */
+
+    if (strcmp(arg, "vq") == 0) {
+       sparse_vq_amp(aexp, model);
+       vq_interp(aexp, model, 0);
+       update_snr_calc(aexp, &aexp->model_uq[1], model);
+    }
+
+    /* VQ of amplitudes, interpolation (ie 20ms rate) */
+
+    if (strcmp(arg, "vqi") == 0) {
+       sparse_vq_amp(aexp, model);
+       vq_interp(aexp, model, 1);
+       update_snr_calc(aexp, &aexp->model_uq[1], model);
+    }
+
+    /* gain/shape VQ of amplitudes, 10ms rate (doesn't work that well) */
+
+    if (strcmp(arg, "gsvq") == 0) {
+       gain_shape_sparse_vq_amp(aexp, model);
+       vq_interp(aexp, model, 0);
+       update_snr_calc(aexp, &aexp->model_uq[1], model);
+    }
+
+    if (strcmp(arg, "smooth") == 0) {
+       smooth_samples(aexp, model, 0);
+       update_snr_calc(aexp, &aexp->model_uq[2], model);
+    }
+
+    if (strcmp(arg, "smoothtrain") == 0) {
+       smooth_samples(aexp, model, 1);
+       //update_snr_calc(aexp, &aexp->model_uq[2], model);
+    }
+
+    if (strcmp(arg, "smoothvq") == 0) {
+       smooth_samples(aexp, model, 2);
+       update_snr_calc(aexp, &aexp->model_uq[2], model);
+    }
+
+    if (strcmp(arg, "smoothamp") == 0) {
+       smooth_amp(aexp, model);
+       update_snr_calc(aexp, &aexp->model_uq[2], model);
+    }
+
+    /* update states */
+
+    for(m=1; m<=model->L; m++)
+       aexp->A_prev[m] = model->A[m];      
+    aexp->frames++;
+    for(i=0; i<3; i++)
+       aexp->model_uq[i] = aexp->model_uq[i+1];
+}
+
diff --git a/libs/libcodec2/src/ampexp.h b/libs/libcodec2/src/ampexp.h
new file mode 100644 (file)
index 0000000..313abb1
--- /dev/null
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: ampexp.h                                     
+  AUTHOR......: David Rowe                                             
+  DATE CREATED: & August 2012
+                                                                             
+  Functions for experimenting with amplitude quantisation.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not,see <http://www.gnu.org/licenses/>. 
+*/
+
+#ifndef __AMPEX__
+#define __AMPEXP__
+
+#include "defines.h"
+
+struct AEXP;
+
+struct AEXP *amp_experiment_create();
+void amp_experiment_destroy(struct AEXP *aexp);
+void amp_experiment(struct AEXP *aexp, MODEL *model, char *arg);
+
+#endif
index 3b876bcac035d6778eaa952d1a9cf1e0b6977c70..fd4a04d31fcb8975e9855af57d87a6bb953d2577 100644 (file)
@@ -4,12 +4,7 @@
   AUTHOR......: David Rowe
   DATE CREATED: 23/8/2010
 
-  Decodes a file of bits to a file of raw speech samples using codec2. Demo
-  program for codec2.
-
-  NOTE: the bit file is not packed, 51 bits/frame actually consumes 51
-  bytes/frame on disk.  If you are using this for a real world
-  application you may want to pack the 51 bytes into 7 bytes.
+  Decodes a file of bits to a file of raw speech samples using codec2.
 
 \*---------------------------------------------------------------------------*/
 
@@ -27,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "codec2.h"
 #include <string.h>
 #include <errno.h>
 
+#define NONE      0  /* no bit errors         */
+#define UNIFORM   1  /* random bit errors     */
+#define TWO_STATE 2  /* Two state error model */
+
 int main(int argc, char *argv[])
 {
-    static const int bitsSize = ((CODEC2_BITS_PER_FRAME + 7) / 8);
-    void *codec2;
-    FILE *fin;
-    FILE *fout;
-    short buf[CODEC2_SAMPLES_PER_FRAME];
-    unsigned char  bits[bitsSize];
-
-    if (argc != 3) {
-       printf("usage: %s InputBitFile OutputRawSpeechFile\n", argv[0]);
+    int            mode;
+    void          *codec2;
+    FILE          *fin;
+    FILE          *fout;
+    short         *buf;
+    unsigned char *bits;
+    int            nsam, nbit, nbyte, i, byte, frames, bit_errors, error_mode;
+    int            state, next_state;
+    float          ber, r, pstate0, pstate1;
+
+    if (argc < 4) {
+       printf("basic usage...............: c2dec 3200|2400|1400|1200 InputBitFile OutputRawSpeechFile\n");
+       printf("uniform errors usage.......: c2dec 3200|2400|1400|1200 InputBitFile OutputRawSpeechFile uniformBER\n");
+       printf("two state fading usage....: c2dec 3200|2400|1400|1200 InputBitFile OutputRawSpeechFile probGood probBad\n");
+       printf("e.g    c2dec 1400 hts1a.c2 hts1a_1400.raw\n");
+       printf("e.g    c2dec 1400 hts1a.c2 hts1a_1400.raw 0.9\n");
+       printf("e.g    c2dec 1400 hts1a.c2 hts1a_1400.raw 0.99 0.9\n");
        exit(1);
     }
-    if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+
+    if (strcmp(argv[1],"3200") == 0)
+       mode = CODEC2_MODE_3200;
+    else if (strcmp(argv[1],"2400") == 0)
+       mode = CODEC2_MODE_2400;
+    else if (strcmp(argv[1],"1400") == 0)
+       mode = CODEC2_MODE_1400;
+    else if (strcmp(argv[1],"1200") == 0)
+       mode = CODEC2_MODE_1200;
+    else {
+       fprintf(stderr, "Error in mode: %s.  Must be 4800, 3200, 2400, 1400 or 1200\n", argv[1]);
+       exit(1);
+    }
+    
+    if (strcmp(argv[2], "-")  == 0) fin = stdin;
+    else if ( (fin = fopen(argv[2],"rb")) == NULL ) {
        fprintf(stderr, "Error opening input bit file: %s: %s.\n",
-         argv[1], strerror(errno));
+         argv[2], strerror(errno));
        exit(1);
     }
 
-    if ( (fout = fopen(argv[2],"wb")) == NULL ) {
+    if (strcmp(argv[3], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[3],"wb")) == NULL ) {
        fprintf(stderr, "Error opening output speech file: %s: %s.\n",
-         argv[2], strerror(errno));
+         argv[3], strerror(errno));
        exit(1);
     }
 
-    codec2 = codec2_create();
+    error_mode = NONE;
+    ber = 0.0;
+    pstate0 = pstate1 = 0.0;
+
+    if (argc == 5) {
+        error_mode = UNIFORM;
+       ber = atof(argv[4]);
+    }
+
+    if (argc == 6) {
+        error_mode = TWO_STATE;
+       pstate0 = atof(argv[4]);
+       pstate1 = atof(argv[5]);
+        state = 0;
+    }
+
+    codec2 = codec2_create(mode);
+    nsam = codec2_samples_per_frame(codec2);
+    nbit = codec2_bits_per_frame(codec2);
+    buf = (short*)malloc(nsam*sizeof(short));
+    nbyte = (nbit + 7) / 8;
+    bits = (unsigned char*)malloc(nbyte*sizeof(char));
+    frames = bit_errors = 0;
+
+    while(fread(bits, sizeof(char), nbyte, fin) == (size_t)nbyte) {
+       frames++;
+       if (error_mode == UNIFORM) {
+           for(i=0; i<nbit; i++) {
+               r = (float)rand()/RAND_MAX;
+               if (r < ber) {
+                   byte = i/8;
+                   //printf("nbyte %d nbit %d i %d byte %d\n", nbyte, nbit, i, byte);
+                   bits[byte] ^= 1 << (i - byte*8);
+                   bit_errors++;
+               }
+           }
+       }
+
+       if (error_mode == TWO_STATE) {
+            next_state = state;
+            switch(state) {
+            case 0:
+
+                /* clear channel state - no bit errors */
+
+               r = (float)rand()/RAND_MAX;
+                if (r > pstate0)
+                    next_state = 1;
+                break;
+
+            case 1:
+                
+                /* burst error state - 50% bit error rate */
+
+                for(i=0; i<nbit; i++) {
+                    r = (float)rand()/RAND_MAX;
+                    if (r < 0.5) {
+                        byte = i/8;
+                        bits[byte] ^= 1 << (i - byte*8);
+                        bit_errors++;
+                    }
+               }
+
+               r = (float)rand()/RAND_MAX;
+                if (r > pstate1)
+                    next_state = 0;
+                break;
+
+           }
+               
+            state = next_state;
+        }
 
-    while(fread(bits, sizeof(char), bitsSize, fin) == bitsSize) {
        codec2_decode(codec2, buf, bits);
-       fwrite(buf, sizeof(short), CODEC2_SAMPLES_PER_FRAME, fout);
+       fwrite(buf, sizeof(short), nsam, fout);
+       //if this is in a pipeline, we probably don't want the usual
+        //buffering to occur
+        if (fout == stdout) fflush(stdout);
+        if (fin == stdin) fflush(stdin);         
     }
 
+    if (ber != 0.0)
+       fprintf(stderr, "actual BER: %1.3f\n", (float)bit_errors/(frames*nbit));
+
     codec2_destroy(codec2);
 
+    free(buf);
+    free(bits);
     fclose(fin);
     fclose(fout);
 
diff --git a/libs/libcodec2/src/c2demo.c b/libs/libcodec2/src/c2demo.c
new file mode 100644 (file)
index 0000000..3b67414
--- /dev/null
@@ -0,0 +1,92 @@
+/*---------------------------------------------------------------------------*\
+
+  FILE........: c2demo.c
+  AUTHOR......: David Rowe
+  DATE CREATED: 15/11/2010
+
+  Encodes and decodes a file of raw speech samples using Codec 2.
+  Demonstrates use of Codec 2 function API.
+
+  Note to convert a wave file to raw and vice-versa:
+
+    $ sox file.wav -r 8000 -s -2 file.raw
+    $ sox -r 8000 -s -2 file.raw file.wav
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2010 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "codec2.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#define BITS_SIZE      ((CODEC2_BITS_PER_FRAME + 7) / 8)
+
+int main(int argc, char *argv[])
+{
+    struct CODEC2 *codec2;
+    FILE          *fin;
+    FILE          *fout;
+    short         *buf;
+    unsigned char *bits;
+    int            nsam, nbit;
+
+    if (argc != 3) {
+       printf("usage: %s InputRawSpeechFile OutputRawSpeechFile\n", argv[0]);
+       exit(1);
+    }
+    if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input speech file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    if ( (fout = fopen(argv[2],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output speech file: %s: %s.\n",
+         argv[2], strerror(errno));
+       exit(1);
+    }
+
+    /* Note only one set of Codec 2 states is required for an encoder
+       and decoder pair. */
+
+    codec2 = codec2_create(CODEC2_MODE_1400);
+    nsam = codec2_samples_per_frame(codec2);
+    buf = (short*)malloc(nsam*sizeof(short));
+    nbit = codec2_bits_per_frame(codec2);
+    bits = (unsigned char*)malloc(nbit*sizeof(char));
+
+    while(fread(buf, sizeof(short), nsam, fin) == (size_t)nsam) {
+       codec2_encode(codec2, bits, buf);
+       codec2_decode(codec2, buf, bits);
+       fwrite(buf, sizeof(short), nsam, fout);
+    }
+
+    free(buf);
+    free(bits);
+    codec2_destroy(codec2);
+
+    fclose(fin);
+    fclose(fout);
+
+    return 0;
+}
index 8fd7c7778d20698bc7554a7d2b886139632fcb62..d171c39a67b7fa06cfe567f2b003579304a2560d 100644 (file)
@@ -4,13 +4,8 @@
   AUTHOR......: David Rowe
   DATE CREATED: 23/8/2010
 
-  Encodes a file of raw speech samples using codec2 and ouputs a file
-  of bits (each bit is stored in the LSB or each output byte). Demo
-  program for codec2.
-
-  NOTE: the bit file is not packed, 51 bits/frame actually consumes 51
-  bytes/frame on disk.  If you are using this for a real world
-  application you may want to pack the 51 bytes into 7 bytes.
+  Encodes a file of raw speech samples using codec2 and outputs a file
+  of bits.
 
 \*---------------------------------------------------------------------------*/
 
@@ -28,8 +23,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "codec2.h"
 
 int main(int argc, char *argv[])
 {
-    static const int bitsSize = ((CODEC2_BITS_PER_FRAME + 7) / 8);
-    void *codec2;
-    FILE *fin;
-    FILE *fout;
-    short buf[CODEC2_SAMPLES_PER_FRAME];
-    unsigned char  bits[bitsSize];
-
-    if (argc != 3) {
-       printf("usage: %s InputRawspeechFile OutputBitFile\n", argv[0]);
+    int            mode;
+    void          *codec2;
+    FILE          *fin;
+    FILE          *fout;
+    short         *buf;
+    unsigned char *bits;
+    int            nsam, nbit, nbyte;
+    if (argc != 4) {
+       printf("usage: c2enc 3200|2400|1400|1200 InputRawspeechFile OutputBitFile\n");
+       printf("e.g    c2enc 1400 ../raw/hts1a.raw hts1a.c2\n");
        exit(1);
     }
  
-    if ( (fin = fopen(argv[1],"rb")) == NULL ) {
-       fprintf(stderr, "Error opening input bit file: %s: %s.\n",
-         argv[1], strerror(errno));
+    if (strcmp(argv[1],"3200") == 0)
+       mode = CODEC2_MODE_3200;
+    else if (strcmp(argv[1],"2400") == 0)
+       mode = CODEC2_MODE_2400;
+    else if (strcmp(argv[1],"1400") == 0)
+       mode = CODEC2_MODE_1400;
+    else if (strcmp(argv[1],"1200") == 0)
+       mode = CODEC2_MODE_1200;
+    else {
+       fprintf(stderr, "Error in mode: %s.  Must be 3200, 2400, 1400 or 1200\n", argv[1]);
        exit(1);
     }
 
-    if ( (fout = fopen(argv[2],"wb")) == NULL ) {
-       fprintf(stderr, "Error opening output speech file: %s: %s.\n",
+    if (strcmp(argv[2], "-")  == 0) fin = stdin;
+    else if ( (fin = fopen(argv[2],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input speech file: %s: %s.\n",
          argv[2], strerror(errno));
        exit(1);
     }
 
-    codec2 = codec2_create();
+    if (strcmp(argv[3], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[3],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output compressed bit file: %s: %s.\n",
+         argv[3], strerror(errno));
+       exit(1);
+    }
+
+    codec2 = codec2_create(mode);
+    nsam = codec2_samples_per_frame(codec2);
+    nbit = codec2_bits_per_frame(codec2);
+    buf = (short*)malloc(nsam*sizeof(short));
+    nbyte = (nbit + 7) / 8;
 
-    while(fread(buf, sizeof(short), CODEC2_SAMPLES_PER_FRAME, fin) ==
-         CODEC2_SAMPLES_PER_FRAME) {
+    bits = (unsigned char*)malloc(nbyte*sizeof(char));
+    
+    while(fread(buf, sizeof(short), nsam, fin) == (size_t)nsam) {
        codec2_encode(codec2, bits, buf);
-       fwrite(bits, sizeof(char), bitsSize, fout);
+       fwrite(bits, sizeof(char), nbyte, fout);
+       // if this is in a pipeline, we probably don't want the usual
+        // buffering to occur
+        if (fout == stdout) fflush(stdout);
+        if (fin == stdin) fflush(stdin);
     }
 
     codec2_destroy(codec2);
 
+    free(buf);
+    free(bits);
     fclose(fin);
     fclose(fout);
 
index b9e5f0f78a19d5e74573d4ffe5c5b3bd9fa45e00..d47f0bbd42b999cfc27fc47aa1c46c1447c7f1b9 100644 (file)
@@ -4,8 +4,9 @@
   AUTHOR......: David Rowe
   DATE CREATED: 20/8/2010
 
-  Codec2 simulation.  Combines encoder and decoder and allows switching in 
-  out various algorithms and quantisation steps. 
+  Codec2 simulation.  Combines encoder and decoder and allows
+  switching in and out various algorithms and quantisation steps. Used
+  for algorithm development.
 
 \*---------------------------------------------------------------------------*/
 
@@ -23,8 +24,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <assert.h>
@@ -33,6 +33,8 @@
 #include <string.h>
 #include <errno.h>
 #include <math.h>
+#include <unistd.h>
+#include <getopt.h>
 
 #include "defines.h"
 #include "sine.h"
 #include "phase.h"
 #include "postfilter.h"
 #include "interp.h"
+#include "ampexp.h"
+#include "phaseexp.h"
 
-/*---------------------------------------------------------------------------*\
-                                                                             
- switch_present()                                                            
-                                                                             
- Searches the command line arguments for a "switch".  If the switch is       
- found, returns the command line argument where it ws found, else returns    
- NULL.                                                                       
-                                                                             
-\*---------------------------------------------------------------------------*/
+void synth_one_frame(kiss_fft_cfg fft_inv_cfg, short buf[], MODEL *model, float Sn_[], float Pn[], int prede, float *de_mem, float gain);
+void print_help(const struct option *long_options, int num_opts, char* argv[]);
 
-int switch_present(sw,argc,argv)
-register char sw[];     /* switch in string form */
-register int argc;      /* number of command line arguments */
-register char *argv[];  /* array of command line arguments in string form */
-{
-  register int i;       /* loop variable */
-
-  for(i=1; i<argc; i++)
-    if (!strcmp(sw,argv[i]))
-      return(i);
-
-  return 0;
-}
-
-void synth_one_frame(short buf[], MODEL *model, float Sn_[], float Pn[]);
 
 /*---------------------------------------------------------------------------*\
                                                                           
@@ -79,324 +61,820 @@ void synth_one_frame(short buf[], MODEL *model, float Sn_[], float Pn[]);
 
 int main(int argc, char *argv[])
 {
-  FILE *fout;          /* output speech file                    */
-  FILE *fin;           /* input speech file                     */
-  short buf[N];                /* input/output buffer                   */
-  float Sn[M];         /* float input speech samples            */
-  COMP  Sw[FFT_ENC];   /* DFT of Sn[]                           */
-  float w[M];          /* time domain hamming window            */
-  COMP  W[FFT_ENC];    /* DFT of w[]                            */
-  MODEL model;
-  float Pn[2*N];       /* trapezoidal synthesis window          */
-  float Sn_[2*N];      /* synthesised speech */
-  int   i;             /* loop variable                         */
-  int   frames;
-  float prev_Wo;
-  float pitch;
-  int   voiced1;
-
-  char  out_file[MAX_STR];
-  int   arg;
-  float snr;
-  float sum_snr;
-
-  int lpc_model, order;
-  int lsp, lsp_quantiser;
-  float ak[LPC_MAX];
-  COMP  Sw_[FFT_ENC];
-  
-  int dump;
-  
-  int phase0;
-  float ex_phase[MAX_AMP+1];
-
-  int   postfilt;
-  float bg_est;
-
-  int   hand_voicing;
-  FILE *fvoicing;
-
-  MODEL prev_model, interp_model;
-  int decimate;
-
-  void *nlp_states;
-
-  for(i=0; i<M; i++)
-      Sn[i] = 1.0;
-  for(i=0; i<2*N; i++)
-      Sn_[i] = 0;
-
-  prev_Wo = TWO_PI/P_MAX;
-
-  prev_model.Wo = TWO_PI/P_MIN;
-  prev_model.L = floor(PI/prev_model.Wo);
-  for(i=1; i<=prev_model.L; i++) {
-      prev_model.A[i] = 0.0;
-      prev_model.phi[i] = 0.0;
-  }
-  for(i=1; i<=MAX_AMP; i++) {
-      ex_phase[i] = 0.0;
-  }
-
-  nlp_states = nlp_create();
-
-  if (argc < 2) {
-    fprintf(stderr, "\nCodec2 - 2400 bit/s speech codec - Simulation Program\n"
-     "\thttp://rowetel.com/codec2.html\n\n"
-     "usage: %s InputFile [-o OutputFile]\n"
-     "\t[-o lpc Order]\n"
-     "\t[--lsp]\n"
-     "\t[--phase0]\n"
-     "\t[--postfilter]\n"
-     "\t[--hand_voicing]\n"
-     "\t[--dec]\n"
-     "\t[--dump DumpFilePrefix]\n", argv[0]);
-    exit(1);
-  }
-
-  /* Interpret command line arguments -------------------------------------*/
-
-  /* Input file */
-
-  if ((fin = fopen(argv[1],"rb")) == NULL) {
-    fprintf(stderr, "Error opening input bit file: %s: %s.\n",
-     argv[1], strerror(errno));
-    exit(1);
-  }
-
-  /* Output file */
-
-  if ((arg = switch_present("-o",argc,argv))) {
-    if ((fout = fopen(argv[arg+1],"wb")) == NULL) {
-      fprintf(stderr, "Error opening output speech file: %s: %s.\n",
-       argv[arg+1], strerror(errno));
-      exit(1);
-    }
-    strcpy(out_file,argv[arg+1]);
-  }
-  else
-    fout = NULL;
-
-  lpc_model = 0;
-  if ((arg = switch_present("--lpc",argc,argv))) {
-      lpc_model = 1;
-      order = atoi(argv[arg+1]);
-      if ((order < 4) || (order > 20)) {
-        fprintf(stderr, "Error in lpc order: %d\n", order);
-        exit(1);
-      }          
-  }
-
-  dump = switch_present("--dump",argc,argv);
-  if (dump) 
-      dump_on(argv[dump+1]);
-
-  lsp = switch_present("--lsp",argc,argv);
-  lsp_quantiser = 0;
-
-  phase0 = switch_present("--phase0",argc,argv);
-  if (phase0) {
-      ex_phase[0] = 0;
-  }
-
-  hand_voicing = switch_present("--hand_voicing",argc,argv);
-  if (hand_voicing) {
-      fvoicing = fopen(argv[hand_voicing+1],"rt");
-      assert(fvoicing != NULL);
-  }
-
-  bg_est = 0.0;
-  postfilt = switch_present("--postfilter",argc,argv);
-
-  decimate = switch_present("--dec",argc,argv);
-
-  /* Initialise ------------------------------------------------------------*/
-
-  make_analysis_window(w,W);
-  make_synthesis_window(Pn);
-  quantise_init();
-
-  /* Main loop ------------------------------------------------------------*/
-
-  frames = 0;
-  sum_snr = 0;
-  while(fread(buf,sizeof(short),N,fin)) {
-    frames++;
+    FILE *fout = NULL; /* output speech file                    */
+    FILE *fin;         /* input speech file                     */
+    short buf[N];      /* input/output buffer                   */
+    float Sn[M];       /* float input speech samples            */
+    float Sn_pre[M];   /* pre-emphasised input speech samples   */
+    COMP  Sw[FFT_ENC]; /* DFT of Sn[]                           */
+    kiss_fft_cfg  fft_fwd_cfg;
+    kiss_fft_cfg  fft_inv_cfg;
+    float w[M];                /* time domain hamming window            */
+    COMP  W[FFT_ENC];  /* DFT of w[]                            */
+    MODEL model;
+    float Pn[2*N];     /* trapezoidal synthesis window          */
+    float Sn_[2*N];    /* synthesised speech */
+    int   i;           /* loop variable                         */
+    int   frames;
+    float prev_Wo, prev__Wo, uq_Wo, prev_uq_Wo;
+    float pitch;
+    int   voiced1 = 0;
+    char  out_file[MAX_STR];
+    char  ampexp_arg[MAX_STR];
+    char  phaseexp_arg[MAX_STR];
+    float snr;
+    float sum_snr;
+
+    int lpc_model = 0, order = LPC_ORD;
+    int lsp = 0, lspd = 0, lspvq = 0;
+    int lspres = 0;
+    int lspdt = 0, lspdt_mode = LSPDT_ALL;
+    int dt = 0, lspjvm = 0, lspanssi = 0, lspjnd = 0, lspmel = 0;
+    int prede = 0;
+    float pre_mem = 0.0, de_mem = 0.0;
+    float ak[LPC_MAX];
+    COMP  Sw_[FFT_ENC];
+    COMP  Ew[FFT_ENC]; 
+    int phase0 = 0;
+    float ex_phase[MAX_AMP+1];
+
+    int   postfilt;
+    float bg_est;
+
+    int   hand_voicing = 0, phaseexp = 0, ampexp = 0, hi = 0, simlpcpf = 0;
+    int   lpcpf = 0;
+    FILE *fvoicing = 0;
+
+    MODEL prev_model, interp_model;
+    int decimate = 0;
+    float lsps[LPC_MAX];
+    float prev_lsps[LPC_MAX], prev_lsps_[LPC_MAX];
+    float lsps__prev[LPC_MAX];
+    float lsps__prev2[LPC_MAX];
+    float e, prev_e;
+    float ak_interp[LPC_MAX];
+    int   lsp_indexes[LPC_MAX];
+    float lsps_[LPC_MAX];
+    float Woe_[2];
+
+    void *nlp_states;
+    float hpf_states[2];
+    int   scalar_quant_Wo_e = 0;
+    int   vector_quant_Wo_e = 0;
+    int   dump_pitch_e = 0;
+    FILE *fjvm = NULL;
+    #ifdef DUMP
+    int   dump;
+    #endif
+    struct PEXP *pexp = NULL;
+    struct AEXP *aexp = NULL;
+    float gain = 1.0;
+
+    char* opt_string = "ho:";
+    struct option long_options[] = {
+        { "lpc", required_argument, &lpc_model, 1 },
+        { "lspjnd", no_argument, &lspjnd, 1 },
+        { "lspmel", no_argument, &lspmel, 1 },
+        { "lsp", no_argument, &lsp, 1 },
+        { "lspd", no_argument, &lspd, 1 },
+        { "lspvq", no_argument, &lspvq, 1 },
+        { "lspres", no_argument, &lspres, 1 },
+        { "lspdt", no_argument, &lspdt, 1 },
+        { "lspdt_mode", required_argument, NULL, 0 },
+        { "lspjvm", no_argument, &lspjvm, 1 },
+        { "lspanssi", no_argument, &lspanssi, 1 },
+        { "phase0", no_argument, &phase0, 1 },
+        { "phaseexp", required_argument, &phaseexp, 1 },
+        { "ampexp", required_argument, &ampexp, 1 },
+        { "postfilter", no_argument, &postfilt, 1 },
+        { "hand_voicing", required_argument, &hand_voicing, 1 },
+        { "dec", no_argument, &decimate, 1 },
+        { "dt", no_argument, &dt, 1 },
+        { "hi", no_argument, &hi, 1 },
+        { "simlpcpf", no_argument, &simlpcpf, 1 },
+        { "lpcpf", no_argument, &lpcpf, 1 },
+        { "prede", no_argument, &prede, 1 },
+        { "dump_pitch_e", required_argument, &dump_pitch_e, 1 },
+        { "sq_pitch_e", no_argument, &scalar_quant_Wo_e, 1 },
+        { "vq_pitch_e", no_argument, &vector_quant_Wo_e, 1 },
+        { "rate", required_argument, NULL, 0 },
+        { "gain", required_argument, NULL, 0 },
+        #ifdef DUMP
+        { "dump", required_argument, &dump, 1 },
+        #endif
+        { "help", no_argument, NULL, 'h' },
+        { NULL, no_argument, NULL, 0 }
+    };
+    int num_opts=sizeof(long_options)/sizeof(struct option);
     
-    /* Read input speech */
+    for(i=0; i<M; i++) {
+       Sn[i] = 1.0;
+       Sn_pre[i] = 1.0;
+    }
+    for(i=0; i<2*N; i++)
+       Sn_[i] = 0;
 
-    for(i=0; i<M-N; i++)
-      Sn[i] = Sn[i+N];
-    for(i=0; i<N; i++)
-      Sn[i+M-N] = buf[i];
-    /* Estimate pitch */
+    prev_uq_Wo = prev_Wo = prev__Wo = TWO_PI/P_MAX;
 
-    nlp(nlp_states,Sn,N,M,P_MIN,P_MAX,&pitch,Sw,&prev_Wo);
-    prev_Wo = TWO_PI/pitch;
-    model.Wo = TWO_PI/pitch;
+    prev_model.Wo = TWO_PI/P_MIN;
+    prev_model.L = floor(PI/prev_model.Wo);
+    for(i=1; i<=prev_model.L; i++) {
+       prev_model.A[i] = 0.0;
+       prev_model.phi[i] = 0.0;
+    }
+    for(i=1; i<=MAX_AMP; i++) {
+       //ex_phase[i] = (PI/3)*(float)rand()/RAND_MAX;
+       ex_phase[i] = 0.0;
+    }
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_[i] = prev_lsps[i] = prev_lsps_[i] = i*PI/(LPC_ORD+1);
+       lsps__prev[i] = lsps__prev2[i] = i*PI/(LPC_ORD+1);
+    }
+    e = prev_e = 1;
+    hpf_states[0] = hpf_states[1] = 0.0;
 
-    /* estimate model parameters */
+    nlp_states = nlp_create();
 
-    dft_speech(Sw, Sn, w); 
-    two_stage_pitch_refinement(&model, Sw);
-    estimate_amplitudes(&model, Sw, W);
-    dump_Sn(Sn); dump_Sw(Sw); dump_model(&model);
+    if (argc < 2) {
+        print_help(long_options, num_opts, argv);
+    }
 
-    /* optional zero-phase modelling */
+    /*----------------------------------------------------------------*\
+
+                     Interpret Command Line Arguments
+
+    \*----------------------------------------------------------------*/
+
+    while(1) {
+        int option_index = 0;
+        int opt = getopt_long(argc, argv, opt_string, 
+                    long_options, &option_index);
+        if (opt == -1)
+            break;
+        switch (opt) {
+         case 0:
+            if(strcmp(long_options[option_index].name, "lpc") == 0) {
+                order = atoi(optarg);
+                if((order < 4) || (order > 20)) {
+                    fprintf(stderr, "Error in LPC order: %s\n", optarg);
+                    exit(1);
+                }
+            #ifdef DUMP
+            } else if(strcmp(long_options[option_index].name, "dump") == 0) {
+                if (dump) 
+                   dump_on(optarg);
+            #endif
+            } else if(strcmp(long_options[option_index].name, "lsp") == 0
+                  || strcmp(long_options[option_index].name, "lspd") == 0
+                  || strcmp(long_options[option_index].name, "lspvq") == 0) {
+               assert(order == LPC_ORD);
+            } else if(strcmp(long_options[option_index].name, "lspdt_mode") == 0) {
+               if (strcmp(optarg,"all") == 0)
+                   lspdt_mode = LSPDT_ALL;
+               else if (strcmp(optarg,"low") == 0)
+                   lspdt_mode = LSPDT_LOW;
+               else if (strcmp(optarg,"high") == 0)
+                   lspdt_mode = LSPDT_HIGH;
+               else {
+                   fprintf(stderr, "Error in lspdt_mode: %s\n", optarg);
+                   exit(1);
+               }
+            } else if(strcmp(long_options[option_index].name, "hand_voicing") == 0) {
+               if ((fvoicing = fopen(optarg,"rt")) == NULL) {
+                   fprintf(stderr, "Error opening voicing file: %s: %s.\n",
+                       optarg, strerror(errno));
+                    exit(1);
+                }
+           } else if(strcmp(long_options[option_index].name, "dump_pitch_e") == 0) {
+               if ((fjvm = fopen(optarg,"wt")) == NULL) {
+                   fprintf(stderr, "Error opening pitch & energy dump file: %s: %s.\n",
+                       optarg, strerror(errno));
+                    exit(1);
+                }
+           } else if(strcmp(long_options[option_index].name, "phaseexp") == 0) {
+               strcpy(phaseexp_arg, optarg);
+           } else if(strcmp(long_options[option_index].name, "ampexp") == 0) {
+               strcpy(ampexp_arg, optarg);
+           } else if(strcmp(long_options[option_index].name, "gain") == 0) {
+               gain = atof(optarg);
+           } else if(strcmp(long_options[option_index].name, "rate") == 0) {
+                if(strcmp(optarg,"3200") == 0) {
+                   lpc_model = 1; order = 10;
+                   scalar_quant_Wo_e = 1;
+                   lspd = 1;
+                   phase0 = 1;
+                   postfilt = 1;
+                   decimate = 1;
+                   lpcpf = 1;
+               } else if(strcmp(optarg,"2400") == 0) {
+                   lpc_model = 1; order = 10;
+                   vector_quant_Wo_e = 1;
+                   lsp = 1;
+                   phase0 = 1;
+                   postfilt = 1;
+                   decimate = 1;
+                   lpcpf = 1;
+               } else if(strcmp(optarg,"1400") == 0) {
+                   lpc_model = 1; order = 10;
+                   vector_quant_Wo_e = 1;
+                   lsp = 1; lspdt = 1;
+                   phase0 = 1;
+                   postfilt = 1;
+                   decimate = 1;
+                   dt = 1;
+                   lpcpf = 1;
+                } else if(strcmp(optarg,"1200") == 0) {
+                   lpc_model = 1; order = 10;
+                   scalar_quant_Wo_e = 1;
+                   lspjvm = 1; lspdt = 1;
+                   phase0 = 1;
+                   postfilt = 1;
+                   decimate = 1;
+                   dt = 1;
+                   lpcpf = 1;
+                } else {
+                    fprintf(stderr, "Error: invalid output rate %s\n", optarg);
+                    exit(1);
+                }
+            }
+            break;
+
+         case 'h':
+            print_help(long_options, num_opts, argv);
+            break;
+
+         case 'o':
+            if (strcmp(optarg, "-") == 0) fout = stdout;
+            else if ((fout = fopen(optarg,"wb")) == NULL) {
+               fprintf(stderr, "Error opening output speech file: %s: %s.\n",
+                   optarg, strerror(errno));
+               exit(1);
+            }
+            strcpy(out_file,optarg);
+            break;
+
+         default:
+            /* This will never be reached */
+            break;
+        }
+    }
 
-    if (phase0) {
-       float Wn[M];                    /* windowed speech samples */
-       float Rk[LPC_ORD+1];            /* autocorrelation coeffs  */
-       
-       dump_phase(&model.phi[0], model.L);
+    /* Input file */
 
-       /* find aks here, these are overwritten if LPC modelling is enabled */
+     if ((fin = fopen(argv[optind],"rb")) == NULL) {
+       fprintf(stderr, "Error opening input speech file: %s: %s.\n",
+               argv[optind], strerror(errno));
+       exit(1);
+    }
 
-       for(i=0; i<M; i++)
-           Wn[i] = Sn[i]*w[i];
-       autocorrelate(Wn,Rk,M,LPC_ORD);
-       levinson_durbin(Rk,ak,LPC_ORD);
+    ex_phase[0] = 0;
+    bg_est = 0.0;
+    Woe_[0] = Woe_[1] = 1.0;
 
-       if (lpc_model)
-           assert(order == LPC_ORD);
+    /*
+      printf("lspd: %d lspdt: %d lspdt_mode: %d  phase0: %d postfilt: %d "
+          "decimate: %d dt: %d\n",lspd,lspdt,lspdt_mode,phase0,postfilt,
+          decimate,dt);
+    */
 
-       dump_ak(ak, LPC_ORD);
-       
-       /* determine voicing */
+    /* Initialise ------------------------------------------------------------*/
 
-       snr = est_voicing_mbe(&model, Sw, W, (FS/TWO_PI)*model.Wo, Sw_);
-       dump_Sw_(Sw_);
-       dump_snr(snr);
+    fft_fwd_cfg = kiss_fft_alloc(FFT_ENC, 0, NULL, NULL); /* fwd FFT,used in several places   */
+    fft_inv_cfg = kiss_fft_alloc(FFT_DEC, 1, NULL, NULL); /* inverse FFT, used just for synth */
+    make_analysis_window(fft_fwd_cfg, w, W);
+    make_synthesis_window(Pn);
+    quantise_init();
+    if (phaseexp)
+       pexp = phase_experiment_create();
+    if (ampexp)
+       aexp = amp_experiment_create();
 
-       /* just to make sure we are not cheating - kill all phases */
+    /*----------------------------------------------------------------*\
 
-       for(i=0; i<MAX_AMP; i++)
-           model.phi[i] = 0;
+                            Main Loop
+
+    \*----------------------------------------------------------------*/
+
+    frames = 0;
+    sum_snr = 0;
+    while(fread(buf,sizeof(short),N,fin)) {
+       frames++;
+       //printf("frame: %d ", frames);
+
+       /* Read input speech */
        
-       if (hand_voicing) {
-           fscanf(fvoicing,"%d\n",&model.voiced);
+       for(i=0; i<M-N; i++) {
+           Sn[i] = Sn[i+N];
+           Sn_pre[i] = Sn_pre[i+N];
        }
-    }
+       for(i=0; i<N; i++)
+           Sn[i+M-N] = buf[i];
+
+       pre_emp(&Sn_pre[M-N], &Sn[M-N], &pre_mem, N);
+       
+
+       /*------------------------------------------------------------*\
+
+                      Estimate Sinusoidal Model Parameters
+
+       \*------------------------------------------------------------*/
+
+       nlp(nlp_states,Sn,N,M,P_MIN,P_MAX,&pitch,Sw,W,&prev_uq_Wo);
+       model.Wo = TWO_PI/pitch;
+
+       dft_speech(fft_fwd_cfg, Sw, Sn, w);
+       two_stage_pitch_refinement(&model, Sw);
+       estimate_amplitudes(&model, Sw, W);
+       uq_Wo = model.Wo;
  
-    /* optional LPC model amplitudes */
+        #ifdef DUMP 
+       dump_Sn(Sn); dump_Sw(Sw); dump_model(&model);
+        #endif
+
+       if (ampexp)
+           amp_experiment(aexp, &model, ampexp_arg);
+
+       if (phaseexp) {
+            #ifdef DUMP
+           dump_phase(&model.phi[0], model.L);
+            #endif
+           phase_experiment(pexp, &model, phaseexp_arg);
+            #ifdef DUMP
+           dump_phase_(&model.phi[0], model.L);
+            #endif
+       }
+       
+       if (hi) {
+           int m;
+           for(m=1; m<model.L/2; m++)
+               model.A[m] = 0.0;
+           for(m=3*model.L/4; m<=model.L; m++)
+               model.A[m] = 0.0;
+       }
+
+       /*------------------------------------------------------------*\
+
+                            Zero-phase modelling
+
+       \*------------------------------------------------------------*/
+
+       if (phase0) {
+           float Wn[M];                        /* windowed speech samples */
+           float Rk[LPC_MAX+1];                /* autocorrelation coeffs  */
+           int ret;
 
-    if (lpc_model) {
-       int lpc_correction;
-       float e;
-       float lsps[LPC_ORD];
-       int   lsp_indexes[LPC_ORD];
+            #ifdef DUMP
+           dump_phase(&model.phi[0], model.L);
+            #endif
 
-       e = speech_to_uq_lsps(lsps, ak, Sn, w, order);
-       lpc_correction = need_lpc_correction(&model, ak, e);
+           /* find aks here, these are overwritten if LPC modelling is enabled */
 
-       if (lsp) {
-           encode_lsps(lsp_indexes, lsps, LPC_ORD);
+           if (prede) {
+               for(i=0; i<M; i++)
+                   Wn[i] = Sn_pre[i]*w[i];
+           }
+           else {
+           
+               for(i=0; i<M; i++)
+                   Wn[i] = Sn[i]*w[i];
+           }
+           autocorrelate(Wn,Rk,M,order);
+           levinson_durbin(Rk,ak,order);
+
+           /* determine voicing */
+
+           snr = est_voicing_mbe(&model, Sw, W, Sw_, Ew, prev_uq_Wo);
+
+           if (dump_pitch_e)
+               fprintf(fjvm, "%f %f %d ", model.Wo, snr, model.voiced);
+
+           //printf("snr %3.2f v: %d Wo: %f prev_Wo: %f\n", snr, model.voiced,
+           //     model.Wo, prev_uq_Wo);
+            #ifdef DUMP
+           dump_Sw_(Sw_);
+           dump_Ew(Ew);
+           dump_snr(snr);
+            #endif
+
+           /* just to make sure we are not cheating - kill all phases */
+
+           for(i=0; i<=MAX_AMP; i++)
+               model.phi[i] = 0;
+       
+           if (hand_voicing) {
+               ret = fscanf(fvoicing,"%d\n",&model.voiced);
+           }
+       }
+
+       /*------------------------------------------------------------*\
+
+               LPC model amplitudes and LSP quantisation 
+
+       \*------------------------------------------------------------*/
+
+       if (lpc_model) {
+           
+           if (prede)
+               e = speech_to_uq_lsps(lsps, ak, Sn_pre, w, order);
+           else
+               e = speech_to_uq_lsps(lsps, ak, Sn, w, order);
+
+            #ifdef DUMP
+           dump_ak(ak, LPC_ORD);
+            #endif
+       
+           /* tracking down -ve energy values with BW expansion */
            /*
-             for(i=0; i<LPC_ORD; i++)
-               printf("lsps[%d] = %f lsp_indexes[%d] = %d\n", 
-                      i, lsps[i], i, lsp_indexes[i]);
-             printf("\n");
+           if (e < 0.0) {
+               int i;
+               FILE*f=fopen("x.txt","wt");
+               for(i=0; i<M; i++)
+                   fprintf(f,"%f\n", Sn[i]);
+               fclose(f);
+               printf("e = %f frames = %d\n", e, frames);
+               for(i=0; i<order; i++)
+                   printf("%f ", ak[i]);
+               exit(0);
+           }
            */
-           decode_lsps(lsps, lsp_indexes, LPC_ORD);
-           bw_expand_lsps(lsps, LPC_ORD);
-           lsp_to_lpc(lsps, ak, LPC_ORD);
-       }
 
-       e = decode_energy(encode_energy(e));
-       model.Wo = decode_Wo(encode_Wo(model.Wo));
+           if (dump_pitch_e)
+               fprintf(fjvm, "%f\n", e);
 
-       aks_to_M2(ak, order, &model, e, &snr, 1); 
-       apply_lpc_correction(&model, lpc_correction);
-       sum_snr += snr;
-        dump_quantised_model(&model);
-    }
+            #ifdef DUMP
+           /* dump order is different if we are decimating */
+           if (!decimate)
+               dump_lsp(lsps);
+           for(i=0; i<LPC_ORD; i++)
+               prev_lsps[i] = lsps[i];
+            #endif
 
-    /* option decimation to 20ms rate, which enables interpolation
-       routine to synthesise in between frame */
-  
-    if (decimate) {
-       if (!phase0) {
-           printf("needs --phase0 to resample phase for interpolated Wo\n");
-           exit(0);
-       }
+           /* various LSP quantisation schemes */
+
+           if (lsp) {
+               encode_lsps_scalar(lsp_indexes, lsps, LPC_ORD);
+               decode_lsps_scalar(lsps_, lsp_indexes, LPC_ORD);
+               bw_expand_lsps(lsps_, LPC_ORD);
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
 
-       /* odd frame - interpolate */
+           if (lspd) {
+               encode_lspds_scalar(lsp_indexes, lsps, LPC_ORD);
+               decode_lspds_scalar(lsps_, lsp_indexes, LPC_ORD);
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
 
-       if (frames%2) {
+           if (lspvq) {
+               lspvq_quantise(lsps, lsps_, LPC_ORD);
+               bw_expand_lsps(lsps_, LPC_ORD);
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
 
-           #ifdef TEST
-           model.voiced = 1;
-           prev_model.voiced = 1;
-           if (fabs(prev_model.Wo - model.Wo) < 0.1*model.Wo) {
-               interp_model.voiced = 1;
-               interpolate(&interp_model, &prev_model, &model);
-               for(i=0; i<=interp_model.L; i++) {
-                   interp_model.phi[i] = phi1[i];
+           if (lspjvm) {
+               /* Jean-Marc's multi-stage, split VQ */
+               lspjvm_quantise(lsps, lsps_, LPC_ORD);
+               { 
+                   float lsps_bw[LPC_ORD];
+                   memcpy(lsps_bw, lsps_, sizeof(float)*LPC_ORD);
+                   bw_expand_lsps(lsps_bw, LPC_ORD);                       
+                   lsp_to_lpc(lsps_bw, ak, LPC_ORD);
                }
-               printf("interp\n");
            }
-           else
-               interp_model = tmp_model;
-           #endif
 
-           interp_model.voiced = voiced1;
-           interpolate(&interp_model, &prev_model, &model);
+           if (lspanssi) {
+               /*  multi-stage VQ from Anssi Ramo OH3GDD */
+
+               lspanssi_quantise(lsps, lsps_, LPC_ORD, 5);
+               bw_expand_lsps(lsps_, LPC_ORD);                     
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
+
+           /* experimenting with non-linear LSP spacing to see if
+              it's just noticable */
+
+           if (lspjnd) {
+               for(i=0; i<LPC_ORD; i++)
+                   lsps_[i] = lsps[i];
+               locate_lsps_jnd_steps(lsps_, LPC_ORD);
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
+
+           /* Another experiment with non-linear LSP spacing, this
+              time using a scaled version of mel frequency axis
+              warping.  The scaling is such that the integer output
+              can be directly sent over the channel.
+           */
+
+           if (lspmel) {
+               float f, f_;
+               int mel[LPC_ORD];
+
+               for(i=0; i<LPC_ORD; i++) {
+                   f = (4000.0/PI)*lsps[i];
+                   mel[i] = floor(100.0*log10(1.0 + f/700.0) + 0.5);
+               }
+
+               for(i=1; i<LPC_ORD; i++) {
+                   if (mel[i] == mel[i-1])
+                       mel[i]++;
+               }
+
+               for(i=0; i<LPC_ORD; i++) {
+                   f_ = 700.0*( pow(10.0, (float)mel[i]/100.0) - 1.0);
+                   lsps_[i] = f_*(PI/4000.0);
+               }
+               for(i=5; i<10; i++) {
+                   lsps_[i] = lsps[i];
+               }
+
+               lsp_to_lpc(lsps_, ak, LPC_ORD);
+           }
+
+           /* we need lsp__prev[] for lspdt and decimate.  If no
+              other LSP quantisation is used we use original LSPs as
+              there is no quantised version available. TODO: this is
+              mess, we should have structures and standard
+              nomenclature for previous frames values, lsp_[]
+              shouldn't be overwritten as we may want to dump it for
+              analysis.  Re-design some time.
+           */
+
+           if (!lsp && !lspd && !lspvq && !lspres && !lspjvm && !lspanssi && !lspjnd && !lspmel)
+               for(i=0; i<LPC_ORD; i++)
+                   lsps_[i] = lsps[i];
+
+           /* Odd frames are generated by quantising the difference
+              between the previous frames LSPs and this frames */
+       
+           if (lspdt && !decimate) {
+               if (frames%2) {
+                   lspdt_quantise(lsps, lsps_, lsps__prev, lspdt_mode);
+                   bw_expand_lsps(lsps_, LPC_ORD);
+                   lsp_to_lpc(lsps_, ak, LPC_ORD);
+               }
+               for(i=0; i<LPC_ORD; i++)
+                   lsps__prev[i] = lsps_[i];           
+           }
+
+           /* 
+              When decimation is enabled we only send LSPs to the
+              decoder on odd frames.  In the Delta-time LSPs case we
+              encode every second odd frame (i.e. every 3rd frame out
+              of 4) by quantising the difference between the 1st
+              frames LSPs and the 3rd frames:
+
+              10ms, frame 1: discard (interpolate at decoder)
+              20ms, frame 2: send "full" LSP frame
+              30ms, frame 3: discard (interpolate at decoder)
+              40ms, frame 4: send LSPs differences between frame 4 and frame 2
+           */
+   
+           if (lspdt && decimate) {
+               /* print previous LSPs to make sure we are using the right set */
+               if ((frames%4) == 0) {
+                   //printf("  lspdt ");  
+                    //#define LSPDT                
+                    #ifdef LSPDT                   
+                   lspdt_quantise(lsps, lsps_, lsps__prev2, lspdt_mode);
+                    #else
+                   for(i=0; i<LPC_ORD; i++)
+                       lsps_[i] = lsps__prev2[i];                
+                    #endif                 
+                   bw_expand_lsps(lsps_, LPC_ORD);
+                   lsp_to_lpc(lsps_, ak, LPC_ORD);
+               }
+               
+               for(i=0; i<LPC_ORD; i++) {
+                   lsps__prev2[i] = lsps__prev[i];
+                   lsps__prev[i] = lsps_[i];
+               }
+           }
+            #ifdef DUMP
+           /* if using decimated (20ms) frames we dump interp
+              LSPs below */
+           if (!decimate)
+               dump_lsp_(lsps_);
+            #endif
+       
+           if (scalar_quant_Wo_e) {
+
+               e = decode_energy(encode_energy(e));
+
+               if (!decimate) {
+                   /* we send params every 10ms, delta-time every 20ms */
+                   if (dt && (frames % 2)) 
+                       model.Wo = decode_Wo_dt(encode_Wo_dt(model.Wo, prev_Wo),prev_Wo);
+                   else
+                       model.Wo = decode_Wo(encode_Wo(model.Wo));
+               }
+
+               if (decimate) {
+                   /* we send params every 20ms */
+                   if (dt && ((frames % 4) == 0)) {
+                       /* delta-time every 40ms */
+                       model.Wo = decode_Wo_dt(encode_Wo_dt(model.Wo, prev__Wo),prev__Wo);
+                   }
+                   else
+                       model.Wo = decode_Wo(encode_Wo(model.Wo));                  
+               }
+
+               model.L  = PI/model.Wo; /* if we quantise Wo re-compute L */
+           }
+
+           if (vector_quant_Wo_e) {
+
+               /* JVM's experimental joint Wo & LPC energy quantiser */
+
+               //printf("\nWo %f e %f\n", model.Wo, e);
+               quantise_WoE(&model, &e, Woe_);
+               //printf("Wo %f e %f\n", model.Wo, e);
+
+           }
+
+           aks_to_M2(fft_fwd_cfg, ak, order, &model, e, &snr, 1, simlpcpf, lpcpf, 1, LPCPF_BETA, LPCPF_GAMMA); 
+           apply_lpc_correction(&model);
+
+            #ifdef DUMP
+           dump_ak_(ak, LPC_ORD);
+            #endif
+
+           /* note SNR on interpolated frames can't be measured properly
+              by comparing Am as L has changed.  We can dump interp lsps
+              and compare them,
+           */
+            #ifdef DUMP
+           dump_lpc_snr(snr);
+            #endif
+           sum_snr += snr;
+            #ifdef DUMP
+           dump_quantised_model(&model);
+            #endif
+       }
+
+       /*------------------------------------------------------------*\
+
+                         Decimation to 20ms frame rate
+
+       \*------------------------------------------------------------*/
+
+       if (decimate) {
+           float lsps_interp[LPC_ORD];
+
+           if (!phase0) {
+               printf("needs --phase0 to resample phase for interpolated Wo\n");
+               exit(0);
+           }
+           if (!lpc_model) {
+               printf("needs --lpc 10 to resample amplitudes\n");
+               exit(0);
+           }
+
+           /* 
+              Each 20ms we synthesise two 10ms frames:
+
+              frame 1: discard except for voicing bit
+              frame 2: interpolate frame 1 LSPs from frame 2 and frame 0
+                       synthesise frame 1 and frame 2 speech
+              frame 3: discard except for voicing bit
+              frame 4: interpolate frame 3 LSPs from frame 4 and frame 2
+                       synthesise frame 3 and frame 4 speech
+           */
+
+           if ((frames%2) == 0) {
+               //printf("frame: %d\n", frames);
+
+               /* decode interpolated frame */
+
+               interp_model.voiced = voiced1;
+               
+               interpolate_lsp(fft_fwd_cfg, &interp_model, &prev_model, &model,
+                               prev_lsps_, prev_e, lsps_, e, ak_interp, lsps_interp);          
+               apply_lpc_correction(&interp_model);
+
+               /* used to compare with c2enc/c2dec version 
+
+               printf("  Wo: %1.5f  L: %d v1: %d prev_e: %f\n", 
+                      interp_model.Wo, interp_model.L, interp_model.voiced, prev_e);
+               printf("  lsps_interp: ");
+               for(i=0; i<LPC_ORD; i++)
+                   printf("%5.3f  ", lsps_interp[i]);
+               printf("\n  A..........: ");
+               for(i=0; i<10; i++)
+                   printf("%5.3f  ",interp_model.A[i]);
+
+               printf("\n  Wo: %1.5f  L: %d e: %3.2f v2: %d\n", 
+                      model.Wo, model.L, e, model.voiced);
+               printf("  lsps_......: ");
+               for(i=0; i<LPC_ORD; i++)
+                   printf("%5.3f  ", lsps_[i]);
+               printf("\n  A..........: ");
+               for(i=0; i<10; i++)
+                   printf("%5.3f  ",model.A[i]);
+               printf("\n");
+               */
+                       
+                #ifdef DUMP
+               /* do dumping here so we get lsp dump file in correct order */
+               dump_lsp(prev_lsps);
+               dump_lsp(lsps_interp);
+               dump_lsp(lsps);
+               dump_lsp(lsps_);
+                #endif
+
+               if (phase0)
+                   phase_synth_zero_order(fft_fwd_cfg, &interp_model, ak_interp, ex_phase,
+                                          order);      
+               if (postfilt)
+                   postfilter(&interp_model, &bg_est);
+               synth_one_frame(fft_inv_cfg, buf, &interp_model, Sn_, Pn, prede, &de_mem, gain);
+               //printf("  buf[0] %d\n", buf[0]);
+               if (fout != NULL) 
+                   fwrite(buf,sizeof(short),N,fout);
+
+               /* decode this frame */
+
+               if (phase0)
+                   phase_synth_zero_order(fft_fwd_cfg, &model, ak, ex_phase, order);   
+               if (postfilt)
+                   postfilter(&model, &bg_est);
+               synth_one_frame(fft_inv_cfg, buf, &model, Sn_, Pn, prede, &de_mem, gain);
+               //printf("  buf[0] %d\n", buf[0]);
+               if (fout != NULL) 
+                   fwrite(buf,sizeof(short),N,fout);
+
+               /* update states for next time */
+
+               prev_model = model;
+               for(i=0; i<LPC_ORD; i++)
+                   prev_lsps_[i] = lsps_[i];
+               prev_e = e;
+           }
+           else {
+               voiced1 = model.voiced;
+           }
+       }
+       else {
+           /* no decimation - sythesise each 10ms frame immediately */
            
            if (phase0)
-               phase_synth_zero_order(&interp_model, ak, ex_phase);    
-           if (postfilt)
-               postfilter(&interp_model, &bg_est);
-           synth_one_frame(buf, &interp_model, Sn_, Pn);
-           if (fout != NULL) fwrite(buf,sizeof(short),N,fout);
+               phase_synth_zero_order(fft_fwd_cfg, &model, ak, ex_phase, order);           
 
-           if (phase0)
-               phase_synth_zero_order(&model, ak, ex_phase);   
            if (postfilt)
                postfilter(&model, &bg_est);
-           synth_one_frame(buf, &model, Sn_, Pn);
+           synth_one_frame(fft_inv_cfg, buf, &model, Sn_, Pn, prede, &de_mem, gain);
            if (fout != NULL) fwrite(buf,sizeof(short),N,fout);
-
-           prev_model = model;
        }
-       else {
-           voiced1 = model.voiced;
-       }
-    }
-    else {
-       if (phase0)
-          phase_synth_zero_order(&model, ak, ex_phase);        
-       if (postfilt)
-           postfilter(&model, &bg_est);
-       synth_one_frame(buf, &model, Sn_, Pn);
-       if (fout != NULL) fwrite(buf,sizeof(short),N,fout);
+
+       prev__Wo = prev_Wo;
+       prev_Wo = model.Wo;
+       prev_uq_Wo = uq_Wo;
+       //if (frames == 8) {
+       //    exit(0);
+       //}
     }
-  }
 
-  if (fout != NULL)
-    fclose(fout);
+    /*----------------------------------------------------------------*\
 
-  if (lpc_model)
-      printf("SNR av = %5.2f dB\n", sum_snr/frames);
+                            End Main Loop
 
-  if (dump)
-      dump_off();
+    \*----------------------------------------------------------------*/
 
-  if (hand_voicing)
-    fclose(fvoicing);
+    fclose(fin);
 
-  nlp_destroy(nlp_states);
+    if (fout != NULL)
+       fclose(fout);
 
-  return 0;
+    if (lpc_model)
+       printf("SNR av = %5.2f dB\n", sum_snr/frames);
+
+    if (phaseexp)
+       phase_experiment_destroy(pexp);
+    if (ampexp)
+       amp_experiment_destroy(aexp);
+    #ifdef DUMP
+    if (dump)
+       dump_off();
+    #endif
+
+    if (hand_voicing)
+       fclose(fvoicing);
+
+    nlp_destroy(nlp_states);
+
+    return 0;
 }
 
-void synth_one_frame(short buf[], MODEL *model, float Sn_[], float Pn[])
+void synth_one_frame(kiss_fft_cfg fft_inv_cfg, short buf[], MODEL *model, float Sn_[], float Pn[], int prede, float *de_mem, float gain)
 {
     int     i;
 
-    synthesise(Sn_, model, Pn, 1);
+    synthesise(fft_inv_cfg, Sn_, model, Pn, 1);
+    if (prede)
+        de_emp(Sn_, Sn_, de_mem, N);   
 
     for(i=0; i<N; i++) {
+       Sn_[i] *= gain;
        if (Sn_[i] > 32767.0)
            buf[i] = 32767;
        else if (Sn_[i] < -32767.0)
@@ -406,3 +884,36 @@ void synth_one_frame(short buf[], MODEL *model, float Sn_[], float Pn[])
     }
 
 }
+
+void print_help(const struct option* long_options, int num_opts, char* argv[])
+{
+       int i;
+       char *option_parameters;
+
+       fprintf(stderr, "\nCodec2 - low bit rate speech codec - Simulation Program\n"
+               "\thttp://rowetel.com/codec2.html\n\n"
+               "usage: %s [OPTIONS] <InputFile>\n\n"
+                "Options:\n"
+                "\t-o <OutputFile>\n", argv[0]);
+        for(i=0; i<num_opts-1; i++) {
+               if(long_options[i].has_arg == no_argument) {
+                       option_parameters="";
+               } else if (strcmp("lpc", long_options[i].name) == 0) {
+                       option_parameters = " <Order>";
+               } else if (strcmp("lspdt_mode", long_options[i].name) == 0) {
+                       option_parameters = " <all|high|low>";
+               } else if (strcmp("hand_voicing", long_options[i].name) == 0) {
+                       option_parameters = " <VoicingFile>";
+               } else if (strcmp("dump_pitch_e", long_options[i].name) == 0) {
+                       option_parameters = " <Dump File>";
+               } else if (strcmp("rate", long_options[i].name) == 0) {
+                       option_parameters = " <4800|2400|1400|1200>";
+               } else if (strcmp("dump", long_options[i].name) == 0) {
+                       option_parameters = " <DumpFilePrefix>";
+               } else {
+                       option_parameters = " <UNDOCUMENTED parameter>";
+               }
+               fprintf(stderr, "\t--%s%s\n", long_options[i].name, option_parameters);
+       }
+       exit(1);
+}
index 74ed9ad5feacf7ef4820d4e068ded64c4af4eef5..70e1d2abcff943f0fef900966fad49d97a8faf27 100644 (file)
-float codebook_lsp1[] = {
-       225,
-       250,
-       275,
-       300,
-       325,
-       350,
-       375,
-       400,
-       425,
-       450,
-       475,
-       500,
-       525,
-       550,
-       575,
-       600,0,0,0,0,0,0,0,0,0,0
-};
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
 
-float codebook_lsp2[] = {
-       325,
-       350,
-       375,
-       400,
-       425,
-       450,
-       475,
-       500,
-       525,
-       550,
-       575,
-       600,
-       625,
-       650,
-       675,
-       700,0,0,0,0,0,0,0,0,0,0
-};
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
 
-float codebook_lsp3[] = {
-       500,
-       550,
-       600,
-       650,
-       700,
-       750,
-       800,
-       850,
-       900,
-       950,
-       1000,
-       1050,
-       1100,
-       1150,
-       1200,
-       1250,0,0,0,0,0,0,0,0,0,0
-};
+#include "defines.h"
 
-float codebook_lsp4[] = {
-       700,
-       800,
-       900,
-       1000,
-       1100,
-       1200,
-       1300,
-       1400,
-       1500,
-       1600,
-       1700,
-       1800,
-       1900,
-       2000,
-       2100,
-       2200,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp1.txt */
+static const float codes0[] = {
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600
 };
-
-float codebook_lsp5[] = {
-       950,
-       1050,
-       1150,
-       1250,
-       1350,
-       1450,
-       1550,
-       1650,
-       1750,
-       1850,
-       1950,
-       2050,
-       2150,
-       2250,
-       2350,
-       2450,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp2.txt */
+static const float codes1[] = {
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700
 };
-
-float codebook_lsp6[] = {
-       1100,
-       1200,
-       1300,
-       1400,
-       1500,
-       1600,
-       1700,
-       1800,
-       1900,
-       2000,
-       2100,
-       2200,
-       2300,
-       2400,
-       2500,
-       2600,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp3.txt */
+static const float codes2[] = {
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250
 };
-
-float codebook_lsp7[] = {
-       1500,
-       1600,
-       1700,
-       1800,
-       1900,
-       2000,
-       2100,
-       2200,
-       2300,
-       2400,
-       2500,
-       2600,
-       2700,
-       2800,
-       2900,
-       3000,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp4.txt */
+static const float codes3[] = {
+  700,
+  800,
+  900,
+  1000,
+  1100,
+  1200,
+  1300,
+  1400,
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200
 };
-
-float codebook_lsp8[] = {
-       2300,
-       2400,
-       2500,
-       2600,
-       2700,
-       2800,
-       2900,
-       3000,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp5.txt */
+static const float codes4[] = {
+  950,
+  1050,
+  1150,
+  1250,
+  1350,
+  1450,
+  1550,
+  1650,
+  1750,
+  1850,
+  1950,
+  2050,
+  2150,
+  2250,
+  2350,
+  2450
 };
-
-float codebook_lsp9[] = {
-       2500,
-       2600,
-       2700,
-       2800,
-       2900,
-       3000,
-       3100,
-       3200,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp6.txt */
+static const float codes5[] = {
+  1100,
+  1200,
+  1300,
+  1400,
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200,
+  2300,
+  2400,
+  2500,
+  2600
 };
-
-float codebook_lsp10[] = {
-       2900,
-       3100,
-       3300,
-       3500,0,0,0,0,0,0,0,0,0,0
+  /* codebook/lsp7.txt */
+static const float codes6[] = {
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200,
+  2300,
+  2400,
+  2500,
+  2600,
+  2700,
+  2800,
+  2900,
+  3000
+};
+  /* codebook/lsp8.txt */
+static const float codes7[] = {
+  2300,
+  2400,
+  2500,
+  2600,
+  2700,
+  2800,
+  2900,
+  3000
+};
+  /* codebook/lsp9.txt */
+static const float codes8[] = {
+  2500,
+  2600,
+  2700,
+  2800,
+  2900,
+  3000,
+  3100,
+  3200
+};
+  /* codebook/lsp10.txt */
+static const float codes9[] = {
+  2900,
+  3100,
+  3300,
+  3500
 };
 
+const struct lsp_codebook lsp_cb[] = {
+  /* codebook/lsp1.txt */
+  {
+    1,
+    4,
+    16,
+    codes0
+  },
+  /* codebook/lsp2.txt */
+  {
+    1,
+    4,
+    16,
+    codes1
+  },
+  /* codebook/lsp3.txt */
+  {
+    1,
+    4,
+    16,
+    codes2
+  },
+  /* codebook/lsp4.txt */
+  {
+    1,
+    4,
+    16,
+    codes3
+  },
+  /* codebook/lsp5.txt */
+  {
+    1,
+    4,
+    16,
+    codes4
+  },
+  /* codebook/lsp6.txt */
+  {
+    1,
+    4,
+    16,
+    codes5
+  },
+  /* codebook/lsp7.txt */
+  {
+    1,
+    4,
+    16,
+    codes6
+  },
+  /* codebook/lsp8.txt */
+  {
+    1,
+    3,
+    8,
+    codes7
+  },
+  /* codebook/lsp9.txt */
+  {
+    1,
+    3,
+    8,
+    codes8
+  },
+  /* codebook/lsp10.txt */
+  {
+    1,
+    2,
+    4,
+    codes9
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookd.c b/libs/libcodec2/src/codebookd.c
new file mode 100644 (file)
index 0000000..48c35cf
--- /dev/null
@@ -0,0 +1,433 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/dlsp1.txt */
+static const float codes0[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp2.txt */
+static const float codes1[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp3.txt */
+static const float codes2[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp4.txt */
+static const float codes3[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  250,
+  300,
+  350,
+  400,
+  450,
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250,
+  1300,
+  1350,
+  1400
+};
+  /* codebook/dlsp5.txt */
+static const float codes4[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  250,
+  300,
+  350,
+  400,
+  450,
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250,
+  1300,
+  1350,
+  1400
+};
+  /* codebook/dlsp6.txt */
+static const float codes5[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  250,
+  300,
+  350,
+  400,
+  450,
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250,
+  1300,
+  1350,
+  1400
+};
+  /* codebook/dlsp7.txt */
+static const float codes6[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp8.txt */
+static const float codes7[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp9.txt */
+static const float codes8[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+  /* codebook/dlsp10.txt */
+static const float codes9[] = {
+  25,
+  50,
+  75,
+  100,
+  125,
+  150,
+  175,
+  200,
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700,
+  725,
+  750,
+  775,
+  800
+};
+
+const struct lsp_codebook lsp_cbd[] = {
+  /* codebook/dlsp1.txt */
+  {
+    1,
+    5,
+    32,
+    codes0
+  },
+  /* codebook/dlsp2.txt */
+  {
+    1,
+    5,
+    32,
+    codes1
+  },
+  /* codebook/dlsp3.txt */
+  {
+    1,
+    5,
+    32,
+    codes2
+  },
+  /* codebook/dlsp4.txt */
+  {
+    1,
+    5,
+    32,
+    codes3
+  },
+  /* codebook/dlsp5.txt */
+  {
+    1,
+    5,
+    32,
+    codes4
+  },
+  /* codebook/dlsp6.txt */
+  {
+    1,
+    5,
+    32,
+    codes5
+  },
+  /* codebook/dlsp7.txt */
+  {
+    1,
+    5,
+    32,
+    codes6
+  },
+  /* codebook/dlsp8.txt */
+  {
+    1,
+    5,
+    32,
+    codes7
+  },
+  /* codebook/dlsp9.txt */
+  {
+    1,
+    5,
+    32,
+    codes8
+  },
+  /* codebook/dlsp10.txt */
+  {
+    1,
+    5,
+    32,
+    codes9
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookdt.c b/libs/libcodec2/src/codebookdt.c
new file mode 100644 (file)
index 0000000..a80c6e4
--- /dev/null
@@ -0,0 +1,153 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/lspdt1.txt */
+static const float codes0[] = {
+  -75,
+  -50,
+  -25,
+  0,
+  25,
+  50,
+  75,
+  100
+};
+  /* codebook/lspdt2.txt */
+static const float codes1[] = {
+  -75,
+  -50,
+  -25,
+  0,
+  25,
+  50,
+  75,
+  100
+};
+  /* codebook/lspdt3.txt */
+static const float codes2[] = {
+  -50,
+  0,
+  50,
+  100
+};
+  /* codebook/lspdt4.txt */
+static const float codes3[] = {
+  -50,
+  0,
+  50,
+  100
+};
+  /* codebook/lspdt5.txt */
+static const float codes4[] = {
+  -50,
+  0,
+  50,
+  100
+};
+  /* codebook/lspdt6.txt */
+static const float codes5[] = {
+  -50,
+  0,
+  50,
+  100
+};
+  /* codebook/lspdt7.txt */
+static const float codes6[] = {
+  -50,
+  50
+};
+  /* codebook/lspdt8.txt */
+static const float codes7[] = {
+  -50,
+  50
+};
+  /* codebook/lspdt9.txt */
+static const float codes8[] = {
+  -50,
+  50
+};
+  /* codebook/lspdt10.txt */
+static const float codes9[] = {
+  -50,
+  50
+};
+
+const struct lsp_codebook lsp_cbdt[] = {
+  /* codebook/lspdt1.txt */
+  {
+    1,
+    3,
+    8,
+    codes0
+  },
+  /* codebook/lspdt2.txt */
+  {
+    1,
+    3,
+    8,
+    codes1
+  },
+  /* codebook/lspdt3.txt */
+  {
+    1,
+    2,
+    4,
+    codes2
+  },
+  /* codebook/lspdt4.txt */
+  {
+    1,
+    2,
+    4,
+    codes3
+  },
+  /* codebook/lspdt5.txt */
+  {
+    1,
+    2,
+    4,
+    codes4
+  },
+  /* codebook/lspdt6.txt */
+  {
+    1,
+    2,
+    4,
+    codes5
+  },
+  /* codebook/lspdt7.txt */
+  {
+    1,
+    1,
+    2,
+    codes6
+  },
+  /* codebook/lspdt8.txt */
+  {
+    1,
+    1,
+    2,
+    codes7
+  },
+  /* codebook/lspdt9.txt */
+  {
+    1,
+    1,
+    2,
+    codes8
+  },
+  /* codebook/lspdt10.txt */
+  {
+    1,
+    1,
+    2,
+    codes9
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookge.c b/libs/libcodec2/src/codebookge.c
new file mode 100644 (file)
index 0000000..9472272
--- /dev/null
@@ -0,0 +1,279 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/gecb.txt */
+static const float codes0[] = {
+  2.71,  12.0184,
+  0.04675,  -2.73881,
+  0.120993,  8.38895,
+  -1.58028,  -0.892307,
+  1.19307,  -1.91561,
+  0.187101,  -3.27679,
+  0.332251,  -7.66455,
+  -1.47944,  31.2461,
+  1.52761,  27.7095,
+  -0.524379,  5.25012,
+  0.55333,  7.4388,
+  -0.843451,  -1.95299,
+  2.26389,  8.61029,
+  0.143143,  2.36549,
+  0.616506,  1.28427,
+  -1.71133,  22.0967,
+  1.00813,  17.3965,
+  -0.106718,  1.41891,
+  -0.136246,  14.2736,
+  -1.70909,  -20.5319,
+  1.65787,  -3.39107,
+  0.138049,  -4.95785,
+  0.536729,  -1.94375,
+  0.196307,  36.8519,
+  1.27248,  22.5565,
+  -0.670219,  -1.90604,
+  0.382092,  6.40113,
+  -0.756911,  -4.90102,
+  1.82931,  4.6138,
+  0.318794,  0.73683,
+  0.612815,  -2.07505,
+  -0.410151,  24.7871,
+  1.77602,  13.1909,
+  0.106457,  -0.104492,
+  0.192206,  10.1838,
+  -1.82442,  -7.71565,
+  0.931346,  4.34835,
+  0.308813,  -4.086,
+  0.397143,  -11.8089,
+  -0.048715,  41.2273,
+  0.877342,  35.8503,
+  -0.759794,  0.476634,
+  0.978593,  7.67467,
+  -1.19506,  3.03883,
+  2.63989,  -3.41106,
+  0.191127,  3.60351,
+  0.402932,  1.0843,
+  -2.15202,  18.1076,
+  1.5468,  8.32271,
+  -0.143089,  -4.07592,
+  -0.150142,  5.86674,
+  -1.40844,  -3.2507,
+  1.56615,  -10.4132,
+  0.178171,  -10.2267,
+  0.362164,  -0.028556,
+  -0.070125,  24.3907,
+  0.594752,  17.4828,
+  -0.28698,  -6.90407,
+  0.464818,  10.2055,
+  -1.00684,  -14.3572,
+  2.32957,  -3.69161,
+  0.335745,  2.40714,
+  1.01966,  -3.15565,
+  -1.25945,  7.9919,
+  2.38369,  19.6806,
+  -0.094947,  -2.41374,
+  0.20933,  6.66477,
+  -2.22103,  1.37986,
+  1.29239,  2.04633,
+  0.243626,  -0.890741,
+  0.428773,  -7.19366,
+  -1.11374,  41.3414,
+  2.6098,  31.1405,
+  -0.446468,  2.53419,
+  0.490104,  4.62757,
+  -1.11723,  -3.24174,
+  1.79156,  8.41493,
+  0.156012,  0.183336,
+  0.532447,  3.15455,
+  -0.764484,  18.514,
+  0.952395,  11.7713,
+  -0.332567,  0.346987,
+  0.202165,  14.7168,
+  -2.12924,  -15.559,
+  1.35358,  -1.92679,
+  -0.010963,  -16.3364,
+  0.399053,  -2.79057,
+  0.750657,  31.1483,
+  0.655743,  24.4819,
+  -0.45321,  -0.735879,
+  0.2869,  6.5467,
+  -0.715673,  -12.3578,
+  1.54849,  3.87217,
+  0.271874,  0.802339,
+  0.502073,  -4.85485,
+  -0.497037,  17.7619,
+  1.19116,  13.9544,
+  0.01563,  1.33157,
+  0.341867,  8.93537,
+  -2.31601,  -5.39506,
+  0.75861,  1.9645,
+  0.24132,  -3.23769,
+  0.267151,  -11.2344,
+  -0.273126,  32.6248,
+  1.75352,  40.432,
+  -0.784011,  3.04576,
+  0.705987,  5.66118,
+  -1.3864,  1.35356,
+  2.37646,  1.67485,
+  0.242973,  4.73218,
+  0.491227,  0.354061,
+  -1.60676,  8.65895,
+  1.16711,  5.9871,
+  -0.137601,  -12.0417,
+  -0.251375,  10.3972,
+  -1.43151,  -8.90411,
+  0.98828,  -13.209,
+  0.261484,  -6.35497,
+  0.395932,  -0.702529,
+  0.283704,  26.8996,
+  0.420959,  15.4418,
+  -0.355804,  -13.7278,
+  0.527372,  12.3985,
+  -1.16956,  -15.9985,
+  1.90669,  -5.81605,
+  0.354492,  3.85157,
+  0.82576,  -4.16264,
+  -0.49019,  13.0572,
+  2.25577,  13.5264,
+  -0.004956,  -3.23713,
+  0.026709,  7.86645,
+  -1.81037,  -0.451183,
+  1.08383,  -0.18362,
+  0.135836,  -2.26658,
+  0.375812,  -5.51225,
+  -1.96644,  38.6829,
+  1.97799,  24.5655,
+  -0.704656,  6.35881,
+  0.480786,  7.05175,
+  -0.976417,  -2.42273,
+  2.50215,  6.75935,
+  0.083588,  3.2588,
+  0.543629,  0.910013,
+  -1.23196,  23.0915,
+  0.785492,  14.807,
+  -0.213554,  1.688,
+  0.004748,  18.1718,
+  -1.54719,  -16.1168,
+  1.50104,  -3.28114,
+  0.080133,  -4.63472,
+  0.476592,  -2.18093,
+  0.44247,  40.304,
+  1.07277,  27.592,
+  -0.594738,  -4.16681,
+  0.42248,  7.61609,
+  -0.927521,  -7.27441,
+  1.99162,  1.29636,
+  0.291307,  2.39878,
+  0.721081,  -1.95062,
+  -0.804256,  24.9295,
+  1.64839,  19.1197,
+  0.060852,  -0.590639,
+  0.266085,  9.10325,
+  -1.9574,  -2.88461,
+  1.11693,  2.6724,
+  0.35458,  -2.74854,
+  0.330733,  -14.1561,
+  -0.527851,  39.5756,
+  0.991152,  43.195,
+  -0.589619,  1.26919,
+  0.787401,  8.73071,
+  -1.0138,  1.02507,
+  2.8254,  1.89538,
+  0.24089,  2.74557,
+  0.427195,  2.54446,
+  -1.95311,  12.244,
+  1.44862,  12.0607,
+  -0.210492,  -3.37906,
+  -0.056713,  10.204,
+  -1.65237,  -5.10274,
+  1.29475,  -12.2708,
+  0.111608,  -8.67592,
+  0.326634,  -1.16763,
+  0.021781,  31.1258,
+  0.455335,  21.4684,
+  -0.37544,  -3.37121,
+  0.39362,  11.302,
+  -0.851456,  -19.4149,
+  2.10703,  -2.22886,
+  0.373233,  1.92406,
+  0.884438,  -1.72058,
+  -0.975127,  9.84013,
+  2.0033,  17.3954,
+  -0.036915,  -1.11137,
+  0.148456,  5.39997,
+  -1.91441,  4.77382,
+  1.44791,  0.537122,
+  0.194979,  -1.03818,
+  0.495771,  -9.95502,
+  -1.05899,  32.9471,
+  2.01122,  32.4544,
+  -0.30965,  4.71911,
+  0.436082,  4.63552,
+  -1.23711,  -1.25428,
+  2.02274,  9.42834,
+  0.190342,  1.46077,
+  0.479017,  2.48479,
+  -1.07848,  16.2217,
+  1.20764,  9.65421,
+  -0.258087,  -1.67236,
+  0.071852,  13.416,
+  -1.87723,  -16.072,
+  1.28957,  -4.87118,
+  0.067713,  -13.4427,
+  0.435551,  -4.1655,
+  0.46614,  30.5895,
+  0.904895,  21.598,
+  -0.518369,  -2.53205,
+  0.337363,  5.63726,
+  -0.554975,  -17.4005,
+  1.69188,  1.14574,
+  0.227934,  0.889297,
+  0.587303,  -5.72973,
+  -0.262133,  18.6666,
+  1.39505,  17.0029,
+  -0.01909,  4.30838,
+  0.304235,  12.6699,
+  -2.07406,  -6.46084,
+  0.920546,  1.21296,
+  0.284927,  -1.78547,
+  0.209724,  -16.024,
+  -0.636067,  31.5768,
+  1.34989,  34.6775,
+  -0.971625,  5.30086,
+  0.590249,  4.44971,
+  -1.56787,  3.60239,
+  2.1455,  4.51666,
+  0.296022,  4.12017,
+  0.445299,  0.868772,
+  -1.44193,  14.1284,
+  1.35575,  6.0074,
+  -0.012814,  -7.49657,
+  -0.43,  8.50012,
+  -1.20469,  -7.11326,
+  1.10102,  -6.83682,
+  0.196463,  -6.234,
+  0.436747,  -1.12979,
+  0.141052,  22.8549,
+  0.290821,  18.8114,
+  -0.529536,  -7.73251,
+  0.63428,  10.7898,
+  -1.33472,  -20.3258,
+  1.81564,  -1.90332,
+  0.394778,  3.79758,
+  0.732682,  -8.18382,
+  -0.741244,  11.7683
+};
+
+const struct lsp_codebook ge_cb[] = {
+  /* codebook/gecb.txt */
+  {
+    2,
+    8,
+    256,
+    codes0
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookjnd.c b/libs/libcodec2/src/codebookjnd.c
new file mode 100644 (file)
index 0000000..76eedd7
--- /dev/null
@@ -0,0 +1,3496 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/lsp1.txt */
+static const float codes0[] = {
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600
+};
+  /* codebook/lsp2.txt */
+static const float codes1[] = {
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700
+};
+  /* codebook/lsp3.txt */
+static const float codes2[] = {
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250
+};
+  /* codebook/lsp4.txt */
+static const float codes3[] = {
+  700,
+  800,
+  900,
+  1000,
+  1100,
+  1200,
+  1300,
+  1400,
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200
+};
+  /* ../unittest/lspjnd5-10.txt */
+static const float codes4[] = {
+  1400,  2000,  2400,  2500,  3300,  3400,
+  1400,  1900,  2400,  2500,  3200,  3400,
+  1400,  1800,  2400,  2500,  3200,  3300,
+  1400,  1800,  2400,  2500,  3300,  3400,
+  1400,  2100,  2400,  2600,  3300,  3400,
+  1400,  1900,  2300,  2600,  3200,  3300,
+  1400,  1900,  2100,  2600,  3100,  3200,
+  1600,  2100,  2400,  2500,  3200,  3300,
+  1500,  1900,  2300,  2600,  3100,  3200,
+  1600,  1800,  2400,  2600,  3200,  3300,
+  1700,  1900,  2300,  2500,  3200,  3300,
+  1800,  1900,  2300,  2500,  3200,  3300,
+  1800,  2000,  2300,  2500,  3300,  3400,
+  1900,  2000,  2200,  2600,  3300,  3400,
+  1700,  2000,  2700,  2900,  3200,  3300,
+  1700,  2100,  2600,  2900,  3200,  3300,
+  1600,  2000,  2500,  2800,  3200,  3400,
+  1500,  1800,  2300,  2400,  3200,  3300,
+  1400,  1700,  2200,  2400,  3200,  3300,
+  1300,  1700,  2200,  2300,  3200,  3300,
+  1300,  1600,  2200,  2300,  3200,  3300,
+  1200,  1600,  2200,  2400,  3200,  3300,
+  1200,  1600,  2200,  2300,  3200,  3300,
+  1200,  1500,  2200,  2300,  3100,  3300,
+  1200,  1500,  2200,  2300,  3200,  3300,
+  1300,  1500,  2100,  2300,  3000,  3200,
+  1300,  1600,  2000,  2200,  3000,  3200,
+  1400,  1700,  2000,  2300,  3100,  3200,
+  1500,  1700,  2000,  2300,  3200,  3300,
+  1300,  1600,  1900,  2100,  3100,  3200,
+  1200,  1500,  2100,  2300,  3200,  3300,
+  1500,  1800,  2000,  2300,  3000,  3200,
+  1200,  1500,  2200,  2400,  3300,  3400,
+  1200,  1500,  2200,  2400,  3200,  3400,
+  1200,  1500,  2200,  2400,  3200,  3300,
+  1300,  1500,  2300,  2400,  3200,  3300,
+  1300,  1500,  2200,  2500,  3000,  3200,
+  1300,  1600,  2300,  2600,  3000,  3200,
+  1400,  1800,  2400,  2600,  3100,  3200,
+  1700,  2000,  2500,  2800,  3200,  3300,
+  1900,  2200,  2600,  2700,  3100,  3200,
+  1900,  2300,  2600,  2900,  3200,  3300,
+  2000,  2300,  2600,  2900,  3300,  3400,
+  1900,  2300,  2500,  2900,  3300,  3400,
+  1800,  2300,  2500,  2800,  3300,  3400,
+  1600,  1800,  2400,  2500,  3200,  3400,
+  1500,  1800,  2400,  2600,  3100,  3400,
+  1800,  2100,  2600,  2900,  3300,  3500,
+  2000,  2500,  2700,  3000,  3400,  3500,
+  2200,  2500,  2700,  3100,  3300,  3400,
+  2300,  2500,  2700,  3100,  3300,  3400,
+  2100,  2500,  2600,  3000,  3200,  3300,
+  2100,  2400,  2500,  3000,  3200,  3300,
+  1700,  2000,  2300,  2700,  3100,  3200,
+  1700,  2000,  2300,  2800,  3100,  3300,
+  1600,  1900,  2200,  2800,  3000,  3200,
+  1500,  1900,  2100,  2700,  3000,  3200,
+  1400,  1900,  2000,  2600,  3000,  3100,
+  1200,  1600,  2100,  2400,  3200,  3300,
+  1500,  1600,  2300,  2400,  3200,  3400,
+  1600,  1700,  2200,  2400,  3100,  3400,
+  1600,  1700,  2200,  2400,  3200,  3400,
+  1700,  1800,  2300,  2400,  3200,  3400,
+  1700,  1800,  2300,  2400,  3200,  3300,
+  1700,  1800,  2300,  2400,  3100,  3200,
+  1700,  1800,  2200,  2500,  3100,  3200,
+  1600,  1800,  2100,  2400,  3000,  3100,
+  1500,  1700,  2100,  2300,  3000,  3100,
+  1400,  1700,  2100,  2500,  3000,  3200,
+  1000,  1700,  2300,  2500,  3200,  3300,
+  1100,  1700,  2400,  2500,  3300,  3400,
+  1500,  2000,  2300,  2600,  3000,  3300,
+  1300,  1600,  1800,  2600,  2900,  3100,
+  1300,  1600,  1900,  2200,  2900,  3000,
+  1500,  1700,  2200,  2500,  2900,  3000,
+  1500,  1600,  2100,  2400,  2900,  3100,
+  1500,  1600,  2000,  2600,  3000,  3100,
+  1600,  1700,  2100,  2600,  3100,  3200,
+  1700,  1900,  2100,  2500,  3300,  3400,
+  1700,  1900,  2200,  2500,  3300,  3400,
+  1600,  2000,  2400,  2600,  3000,  3300,
+  1700,  2100,  2400,  2600,  3100,  3300,
+  1700,  2100,  2400,  2600,  3200,  3400,
+  1400,  1600,  2300,  2400,  3300,  3400,
+  1300,  1400,  2100,  2200,  2900,  3200,
+  1000,  1300,  2200,  2300,  3200,  3400,
+  1600,  2000,  2300,  2600,  2800,  3100,
+  1600,  2000,  2300,  2600,  2900,  3200,
+  1600,  2000,  2300,  2600,  3100,  3300,
+  1700,  2000,  2300,  2600,  3100,  3300,
+  1600,  1900,  2300,  2500,  3100,  3400,
+  1500,  1900,  2300,  2600,  3000,  3300,
+  1500,  1900,  2300,  2600,  3100,  3300,
+  1500,  2000,  2300,  2700,  3100,  3300,
+  2000,  2500,  2700,  2900,  3300,  3400,
+  2000,  2400,  2600,  2800,  3300,  3400,
+  1700,  2300,  2600,  2800,  3300,  3400,
+  1400,  1700,  2400,  2500,  3200,  3300,
+  1300,  1600,  2300,  2500,  3200,  3300,
+  1300,  1500,  2000,  2300,  3200,  3300,
+  1500,  1800,  2200,  2400,  2900,  3300,
+  1500,  1700,  2200,  2400,  3000,  3200,
+  1400,  1800,  2200,  2400,  3000,  3300,
+  1400,  1800,  2200,  2400,  3000,  3200,
+  1200,  1500,  2100,  2400,  3100,  3300,
+  1300,  1800,  2200,  2300,  3300,  3400,
+  1300,  1700,  2200,  2400,  3300,  3400,
+  1400,  1500,  2300,  2500,  3100,  3400,
+  1500,  1600,  2300,  2500,  3100,  3300,
+  1500,  1600,  2400,  2500,  3100,  3300,
+  1400,  1800,  2400,  2500,  3000,  3300,
+  1300,  1700,  2100,  2500,  3000,  3200,
+  1300,  1600,  2100,  2500,  3100,  3200,
+  1300,  1700,  2200,  2500,  3100,  3200,
+  1300,  1600,  2200,  2500,  3100,  3300,
+  1300,  1700,  2300,  2600,  3200,  3300,
+  1300,  1700,  2400,  2500,  3200,  3400,
+  1500,  1900,  2500,  2600,  3200,  3400,
+  1500,  2000,  2500,  2600,  3300,  3400,
+  1600,  2100,  2600,  2900,  3400,  3500,
+  1600,  1900,  2500,  2800,  3300,  3400,
+  1500,  2000,  2500,  2600,  3200,  3300,
+  1600,  2000,  2500,  2700,  3100,  3200,
+  1500,  1700,  2400,  2700,  3100,  3200,
+  1500,  1600,  2400,  2600,  3100,  3300,
+  1500,  1600,  2200,  2400,  3000,  3200,
+  1500,  1600,  2200,  2300,  3000,  3200,
+  1400,  1700,  2100,  2300,  3000,  3100,
+  1700,  1800,  2300,  2800,  3100,  3300,
+  1800,  2100,  2500,  2800,  3200,  3300,
+  1800,  2200,  2500,  2700,  3200,  3300,
+  1900,  2200,  2500,  2800,  3200,  3300,
+  1800,  2200,  2500,  2800,  3200,  3300,
+  1600,  2000,  2300,  2500,  3000,  3200,
+  1500,  1900,  2200,  2500,  3100,  3200,
+  1500,  1700,  2200,  2400,  3100,  3200,
+  1600,  1700,  2200,  2400,  3000,  3100,
+  1600,  1700,  2300,  2400,  3000,  3100,
+  1600,  1700,  2300,  2400,  3000,  3200,
+  1600,  1700,  2300,  2400,  2900,  3100,
+  1600,  1700,  2300,  2400,  2900,  3200,
+  1600,  1700,  2300,  2500,  2900,  3200,
+  1500,  1600,  2300,  2500,  2900,  3300,
+  1400,  1500,  2200,  2500,  3000,  3300,
+  1200,  1400,  2300,  2400,  3000,  3300,
+  1100,  1400,  2300,  2400,  3100,  3300,
+  1200,  1800,  2400,  2500,  3300,  3400,
+  1400,  2000,  2400,  2700,  3300,  3400,
+  1600,  2100,  2500,  2800,  3300,  3400,
+  1700,  2300,  2600,  2900,  3300,  3400,
+  1400,  2100,  2400,  2600,  3100,  3200,
+  1300,  1600,  2300,  2500,  3000,  3200,
+  1200,  1500,  2100,  2500,  3000,  3200,
+  1300,  1700,  2100,  2300,  2900,  3200,
+  1500,  1600,  2200,  2400,  3000,  3100,
+  1500,  1600,  2200,  2500,  3000,  3200,
+  1600,  1700,  2200,  2500,  3100,  3200,
+  1600,  1700,  2200,  2500,  3100,  3300,
+  1600,  1700,  2200,  2400,  3100,  3300,
+  1600,  1700,  2300,  2500,  3300,  3400,
+  1700,  1800,  2300,  2500,  3300,  3400,
+  1800,  2000,  2300,  2700,  3200,  3300,
+  1900,  2000,  2300,  2700,  3300,  3400,
+  1900,  2000,  2100,  2400,  3300,  3400,
+  1800,  2100,  2400,  2800,  3200,  3400,
+  2000,  2200,  2500,  2700,  3100,  3300,
+  2000,  2300,  2500,  2700,  3100,  3300,
+  2000,  2300,  2500,  2800,  3300,  3400,
+  1900,  2300,  2500,  2800,  3300,  3400,
+  1800,  1900,  2300,  2600,  3300,  3400,
+  1800,  1900,  2400,  2600,  3200,  3300,
+  1700,  1900,  2400,  2500,  3200,  3300,
+  1700,  1800,  2300,  2600,  3200,  3300,
+  1600,  1700,  2300,  2600,  3200,  3300,
+  1600,  1900,  2300,  2600,  3200,  3300,
+  1500,  1800,  2200,  2400,  3200,  3300,
+  1500,  1800,  2100,  2500,  3100,  3200,
+  1700,  2100,  2400,  2800,  3200,  3300,
+  1900,  2100,  2500,  2900,  3200,  3300,
+  1900,  2100,  2400,  2900,  3200,  3300,
+  1800,  2100,  2400,  2800,  3100,  3200,
+  2000,  2200,  2500,  2800,  3100,  3300,
+  2000,  2200,  2700,  2800,  3100,  3300,
+  2000,  2300,  2600,  2800,  3200,  3300,
+  1800,  2000,  2600,  2800,  3200,  3300,
+  1800,  2100,  2600,  2800,  3200,  3400,
+  1800,  2200,  2500,  2700,  3300,  3400,
+  1700,  1900,  2500,  2600,  3200,  3400,
+  1700,  1900,  2400,  2700,  3200,  3400,
+  1500,  1900,  2500,  2600,  3100,  3300,
+  1200,  2100,  2400,  2600,  3200,  3300,
+  1300,  1800,  2400,  2500,  3200,  3300,
+  1200,  1600,  2400,  2600,  3200,  3300,
+  1200,  1900,  2500,  2700,  3200,  3300,
+  1300,  2000,  2400,  2700,  3200,  3300,
+  1200,  1900,  2300,  2500,  3200,  3300,
+  1100,  1800,  2300,  2400,  3200,  3300,
+  1100,  1900,  2300,  2500,  3200,  3300,
+  1100,  2100,  2400,  2600,  3200,  3300,
+  1000,  1900,  2400,  2500,  3200,  3300,
+  1000,  1500,  2400,  2500,  3100,  3200,
+  1000,  1500,  2300,  2400,  3100,  3200,
+  1000,  1900,  2300,  2500,  3000,  3100,
+  1100,  1900,  2300,  2400,  3100,  3200,
+  1200,  1800,  2300,  2400,  3100,  3200,
+  1300,  1800,  2300,  2400,  3100,  3200,
+  1400,  1800,  2300,  2400,  3200,  3300,
+  1600,  1700,  2300,  2400,  3100,  3300,
+  1600,  1700,  2300,  2400,  3100,  3200,
+  1600,  1700,  2200,  2400,  3100,  3200,
+  1500,  1800,  2200,  2400,  3100,  3200,
+  1400,  1800,  2200,  2400,  3100,  3200,
+  1400,  1800,  2200,  2400,  3000,  3100,
+  1800,  2000,  2300,  2800,  2900,  3100,
+  1500,  1900,  2300,  2500,  3100,  3200,
+  1500,  1900,  2300,  2400,  3300,  3400,
+  1500,  2000,  2400,  2600,  3300,  3400,
+  1600,  2000,  2400,  2700,  3300,  3400,
+  1600,  2000,  2400,  2500,  3300,  3400,
+  1600,  2000,  2400,  2600,  3300,  3400,
+  1700,  2100,  2400,  2600,  2900,  3200,
+  1600,  2000,  2500,  2700,  2900,  3200,
+  1500,  1800,  2400,  2800,  3000,  3200,
+  1500,  1800,  2100,  2400,  2900,  3100,
+  1600,  1900,  2100,  2400,  3100,  3300,
+  1600,  1900,  2100,  2500,  3100,  3200,
+  1800,  1900,  2300,  2400,  3100,  3300,
+  1900,  2000,  2500,  2600,  3200,  3300,
+  1900,  2200,  2600,  2700,  3300,  3400,
+  1900,  2300,  2600,  2700,  3300,  3400,
+  1900,  2300,  2700,  2800,  3300,  3400,
+  2000,  2200,  2700,  2800,  3300,  3400,
+  2000,  2400,  2700,  2800,  3300,  3400,
+  2000,  2300,  2700,  2800,  3300,  3400,
+  2000,  2400,  2600,  2700,  3300,  3400,
+  2000,  2200,  2600,  2700,  3200,  3300,
+  1900,  2100,  2600,  2700,  3200,  3300,
+  1900,  2100,  2500,  2700,  3200,  3300,
+  1900,  2000,  2400,  2600,  3200,  3300,
+  1900,  2000,  2400,  2600,  3100,  3200,
+  1900,  2000,  2300,  2500,  3100,  3200,
+  1800,  2000,  2300,  2500,  3100,  3200,
+  1800,  1900,  2300,  2500,  3000,  3100,
+  1800,  1900,  2400,  2700,  3000,  3200,
+  1800,  1900,  2500,  2700,  3000,  3200,
+  1800,  2000,  2500,  2700,  3100,  3200,
+  2000,  2300,  2600,  2900,  3100,  3300,
+  1900,  2300,  2700,  3000,  3200,  3300,
+  2000,  2400,  2700,  3000,  3200,  3300,
+  2100,  2500,  2800,  3000,  3200,  3300,
+  2200,  2400,  2800,  3000,  3300,  3400,
+  1900,  2200,  2700,  2900,  3300,  3400,
+  2200,  2400,  2900,  3100,  3300,  3400,
+  2100,  2400,  2800,  3100,  3300,  3400,
+  2200,  2500,  2800,  3100,  3300,  3400,
+  2100,  2400,  2600,  2800,  3300,  3400,
+  2000,  2400,  2600,  2700,  3200,  3300,
+  1700,  2000,  2400,  2600,  3200,  3300,
+  1700,  1900,  2400,  2600,  3100,  3300,
+  1800,  1900,  2400,  2700,  3200,  3300,
+  1800,  1900,  2400,  2700,  3100,  3200,
+  1800,  1900,  2400,  2700,  3100,  3300,
+  1800,  1900,  2300,  2700,  3100,  3200,
+  1700,  1900,  2200,  2700,  3000,  3300,
+  1700,  1800,  2300,  2700,  2900,  3200,
+  1700,  1900,  2300,  2700,  2900,  3200,
+  1700,  1900,  2200,  2700,  3000,  3200,
+  1700,  2000,  2300,  2800,  3000,  3200,
+  1400,  1700,  2300,  2400,  3300,  3400,
+  1400,  1800,  2300,  2400,  3300,  3400,
+  1400,  1900,  2300,  2400,  3300,  3400,
+  1400,  2100,  2300,  2500,  3300,  3400,
+  1400,  2100,  2300,  2600,  3300,  3400,
+  1700,  2200,  2500,  2700,  3200,  3400,
+  1800,  2100,  2600,  2900,  3200,  3400,
+  1800,  2100,  2600,  2800,  3300,  3400,
+  1800,  2100,  2600,  2700,  3300,  3400,
+  1800,  2000,  2500,  2700,  3300,  3400,
+  1800,  2100,  2400,  2700,  3300,  3400,
+  1800,  2100,  2400,  2600,  3300,  3400,
+  1800,  2200,  2400,  2600,  3300,  3400,
+  1800,  2200,  2400,  2700,  3300,  3400,
+  1900,  2300,  2600,  2900,  3200,  3400,
+  1900,  2200,  2600,  2700,  3200,  3400,
+  1900,  2100,  2600,  2700,  3300,  3400,
+  2000,  2100,  2500,  2700,  3200,  3300,
+  2000,  2100,  2500,  2700,  3300,  3400,
+  2000,  2200,  2500,  2700,  3300,  3400,
+  2000,  2100,  2600,  2700,  3300,  3400,
+  2000,  2100,  2500,  2700,  3400,  3500,
+  1900,  2100,  2500,  2600,  3200,  3400,
+  2000,  2200,  2600,  2700,  3200,  3400,
+  2100,  2300,  2600,  2800,  3300,  3400,
+  2100,  2500,  2700,  3100,  3300,  3400,
+  2100,  2500,  2800,  3100,  3300,  3400,
+  2100,  2300,  2400,  2700,  3200,  3300,
+  2000,  2300,  2500,  2800,  3200,  3300,
+  1700,  2100,  2500,  2700,  3200,  3300,
+  1600,  1900,  2300,  2700,  3100,  3300,
+  1600,  1800,  2300,  2800,  3100,  3300,
+  1500,  1800,  2300,  2400,  3100,  3200,
+  1500,  1700,  2300,  2400,  3100,  3300,
+  1400,  1700,  2300,  2400,  3100,  3300,
+  1400,  1500,  2300,  2400,  3100,  3300,
+  1300,  1500,  2300,  2400,  3100,  3300,
+  1300,  1500,  2400,  2500,  3100,  3300,
+  1300,  1500,  2400,  2500,  3000,  3300,
+  1300,  1500,  2300,  2400,  2900,  3300,
+  1400,  1500,  2400,  2500,  2900,  3300,
+  1500,  1600,  2300,  2500,  2800,  3300,
+  1600,  1700,  2300,  2500,  2800,  3400,
+  1700,  1800,  2300,  2500,  2800,  3300,
+  1800,  1900,  2400,  2500,  3100,  3400,
+  1800,  1900,  2400,  2500,  3200,  3400,
+  1900,  2000,  2400,  2500,  3300,  3400,
+  1900,  2000,  2300,  2500,  3300,  3400,
+  1900,  2200,  2600,  2900,  3400,  3500,
+  1800,  2200,  2600,  2900,  3300,  3400,
+  1900,  2300,  2600,  3000,  3400,  3500,
+  2000,  2300,  2600,  3000,  3300,  3400,
+  1800,  2200,  2500,  2900,  3200,  3300,
+  1800,  2100,  2400,  2700,  3200,  3300,
+  1900,  2100,  2500,  2800,  3200,  3300,
+  1700,  2100,  2500,  2700,  3100,  3300,
+  1400,  1800,  2300,  2600,  3100,  3200,
+  1300,  1600,  1700,  2400,  3000,  3100,
+  1500,  1800,  2300,  2600,  3000,  3200,
+  1900,  2200,  2500,  2800,  3000,  3300,
+  2000,  2300,  2600,  2800,  3100,  3300,
+  2000,  2300,  2700,  2900,  3100,  3300,
+  2100,  2300,  2700,  2900,  3100,  3300,
+  2000,  2300,  2700,  3000,  3300,  3400,
+  1700,  2200,  2500,  2600,  3300,  3400,
+  1400,  2000,  2400,  2600,  3300,  3400,
+  1300,  1900,  2300,  2600,  3100,  3300,
+  1200,  1600,  2200,  2400,  3000,  3100,
+  1100,  1500,  2200,  2400,  3100,  3200,
+  1100,  1400,  2300,  2400,  3200,  3300,
+  1100,  1500,  2300,  2400,  3200,  3300,
+  1100,  1500,  2300,  2400,  3300,  3400,
+  1300,  1400,  2400,  2500,  3100,  3300,
+  1500,  2200,  2500,  2600,  3100,  3200,
+  2100,  2400,  2700,  3000,  3200,  3300,
+  2200,  2400,  2700,  3000,  3300,  3400,
+  2000,  2400,  2700,  3000,  3300,  3400,
+  2000,  2400,  2700,  2900,  3300,  3400,
+  2000,  2300,  2700,  3000,  3400,  3500,
+  2100,  2400,  2700,  3000,  3400,  3500,
+  2100,  2500,  2700,  3100,  3400,  3500,
+  1900,  2400,  2600,  2800,  3300,  3400,
+  1900,  2100,  2600,  2800,  3300,  3400,
+  1900,  2100,  2500,  2700,  3300,  3400,
+  1900,  2100,  2500,  2600,  3300,  3400,
+  1800,  2200,  2400,  2800,  3300,  3400,
+  1800,  2000,  2400,  2700,  3300,  3400,
+  1900,  2000,  2400,  2700,  3200,  3300,
+  2000,  2100,  2400,  2600,  3300,  3400,
+  1500,  2100,  2200,  2500,  3300,  3400,
+  1400,  1900,  2300,  2500,  3300,  3400,
+  1400,  2000,  2300,  2600,  3200,  3300,
+  1400,  1800,  2200,  2600,  3100,  3200,
+  1700,  2100,  2400,  2700,  3100,  3300,
+  1800,  2000,  2400,  2700,  3000,  3200,
+  1600,  2000,  2300,  2500,  3100,  3200,
+  1700,  2000,  2300,  2500,  3100,  3300,
+  1600,  1900,  2200,  2600,  2900,  3200,
+  1600,  1900,  2300,  2600,  2900,  3200,
+  1600,  1900,  2300,  2600,  3000,  3200,
+  1600,  1800,  2200,  2500,  3000,  3200,
+  1600,  1800,  2300,  2600,  3100,  3200,
+  1700,  1800,  2400,  2600,  3100,  3200,
+  1700,  1800,  2300,  2500,  3000,  3100,
+  1700,  1800,  2300,  2500,  3100,  3200,
+  1700,  1800,  2200,  2400,  3000,  3200,
+  1700,  1800,  2100,  2300,  3100,  3200,
+  1700,  1900,  2100,  2400,  3000,  3200,
+  1800,  2000,  2200,  2400,  3000,  3200,
+  1800,  2000,  2300,  2500,  3100,  3300,
+  1800,  2000,  2300,  2600,  3200,  3300,
+  1800,  2000,  2400,  2600,  3200,  3300,
+  1800,  2000,  2400,  2600,  3300,  3400,
+  1800,  1900,  2400,  2500,  3300,  3400,
+  1700,  1900,  2400,  2500,  3300,  3400,
+  1700,  2100,  2400,  2600,  3300,  3400,
+  1800,  2100,  2500,  2900,  3300,  3400,
+  1800,  2200,  2600,  2800,  3300,  3500,
+  1800,  2100,  2600,  2900,  3300,  3400,
+  1800,  2100,  2600,  3000,  3200,  3300,
+  1800,  2200,  2600,  2900,  3200,  3300,
+  1800,  2100,  2600,  2800,  3200,  3300,
+  1900,  2200,  2400,  2700,  3100,  3200,
+  1700,  2000,  2300,  2700,  3000,  3100,
+  1700,  2000,  2300,  2600,  3000,  3100,
+  1800,  2100,  2400,  2600,  3100,  3200,
+  1800,  2100,  2400,  2700,  3100,  3200,
+  1900,  2100,  2400,  2700,  3200,  3300,
+  1800,  2000,  2400,  2700,  3100,  3300,
+  1700,  2000,  2400,  2700,  3100,  3300,
+  1700,  1900,  2300,  2700,  3100,  3300,
+  1700,  2000,  2300,  2600,  3100,  3200,
+  1600,  1900,  2300,  2600,  3100,  3200,
+  1400,  1700,  2200,  2500,  3000,  3200,
+  1500,  1700,  2100,  2500,  2900,  3100,
+  1500,  1800,  2300,  2600,  2900,  3200,
+  1500,  1900,  2400,  2600,  3000,  3200,
+  1600,  2000,  2300,  2700,  3100,  3200,
+  1600,  2000,  2400,  2700,  3100,  3300,
+  1600,  2200,  2600,  2900,  3300,  3400,
+  1700,  2200,  2600,  3000,  3300,  3400,
+  1700,  2100,  2500,  2900,  3300,  3400,
+  1700,  2200,  2500,  2900,  3300,  3400,
+  1500,  1800,  2400,  2500,  3200,  3400,
+  1500,  1700,  2400,  2500,  3300,  3400,
+  1500,  1700,  2300,  2400,  3300,  3400,
+  1600,  1800,  2300,  2400,  3300,  3400,
+  1600,  1800,  2400,  2500,  3300,  3400,
+  1600,  1700,  2400,  2500,  2800,  3300,
+  1600,  1800,  2300,  2500,  2700,  3200,
+  1600,  1700,  2300,  2500,  2700,  3200,
+  1600,  1700,  2200,  2500,  2700,  3100,
+  1600,  1700,  2200,  2500,  2600,  3000,
+  1600,  1700,  2400,  2500,  2700,  3200,
+  1600,  1700,  2400,  2500,  2800,  3200,
+  1700,  1800,  2400,  2600,  2900,  3300,
+  1700,  1800,  2300,  2600,  2800,  3300,
+  1700,  1800,  2400,  2600,  3000,  3400,
+  1700,  1800,  2300,  2500,  2900,  3300,
+  1600,  1700,  2300,  2500,  3000,  3300,
+  1400,  1800,  2000,  2400,  3000,  3200,
+  1400,  1700,  2000,  2300,  3000,  3200,
+  1700,  2000,  2300,  2500,  3100,  3200,
+  1700,  1800,  2400,  2500,  3100,  3200,
+  1800,  2000,  2400,  2500,  3200,  3300,
+  1900,  2000,  2400,  2600,  3300,  3400,
+  1900,  2000,  2300,  2600,  3300,  3400,
+  2000,  2100,  2200,  2600,  3300,  3400,
+  2000,  2100,  2300,  2600,  3300,  3400,
+  2100,  2200,  2500,  2800,  3300,  3400,
+  2000,  2100,  2300,  2500,  3200,  3300,
+  1900,  2000,  2200,  2600,  3200,  3300,
+  1800,  1900,  2100,  2600,  3100,  3200,
+  1700,  1900,  2100,  2600,  3000,  3200,
+  1500,  1800,  2100,  2300,  3000,  3200,
+  1500,  1800,  2100,  2400,  3100,  3300,
+  1500,  1700,  2200,  2500,  3100,  3300,
+  1500,  1800,  2200,  2300,  3200,  3300,
+  1500,  1900,  2300,  2500,  3300,  3400,
+  1800,  2300,  2600,  3000,  3400,  3500,
+  1900,  2300,  2700,  3000,  3400,  3500,
+  2000,  2300,  2800,  3100,  3300,  3400,
+  2100,  2300,  2800,  3100,  3300,  3400,
+  2000,  2300,  2700,  3000,  3200,  3300,
+  2000,  2200,  2600,  2900,  3100,  3300,
+  2000,  2200,  2500,  2800,  3000,  3200,
+  2000,  2200,  2400,  2800,  3100,  3200,
+  1600,  2000,  2400,  2600,  3100,  3200,
+  1400,  1900,  2400,  2500,  3100,  3200,
+  1400,  1900,  2300,  2600,  3000,  3200,
+  1500,  2000,  2400,  2700,  2900,  3200,
+  2000,  2300,  2800,  3000,  3200,  3400,
+  2100,  2300,  2900,  3100,  3300,  3400,
+  1800,  2300,  2600,  2900,  3400,  3500,
+  1700,  2300,  2500,  2900,  3300,  3400,
+  1300,  2000,  2400,  2700,  3300,  3400,
+  1200,  1900,  2300,  2600,  3300,  3400,
+  1200,  1800,  2300,  2600,  3300,  3400,
+  1100,  1800,  2300,  2500,  3300,  3400,
+  1800,  2200,  2600,  2800,  3300,  3400,
+  1800,  2000,  2500,  2700,  3200,  3400,
+  1700,  2100,  2600,  2700,  3200,  3300,
+  1700,  2200,  2600,  2800,  3300,  3400,
+  1800,  2200,  2600,  3000,  3300,  3500,
+  1700,  2100,  2600,  2800,  3300,  3400,
+  1700,  2100,  2500,  2800,  3300,  3400,
+  1700,  2200,  2500,  2800,  3300,  3400,
+  1700,  2200,  2500,  2800,  3300,  3500,
+  1800,  2200,  2500,  2900,  3300,  3400,
+  2100,  2200,  2600,  2700,  3100,  3400,
+  1900,  2100,  2500,  2600,  3100,  3400,
+  1900,  2000,  2500,  2600,  3200,  3400,
+  1900,  2000,  2600,  2700,  3200,  3400,
+  1800,  1900,  2500,  2600,  3100,  3400,
+  1600,  2000,  2700,  2800,  3300,  3400,
+  1400,  2000,  2700,  2800,  3300,  3400,
+  1000,  1900,  2700,  2800,  3300,  3400,
+  1000,  1400,  2700,  2900,  3200,  3400,
+  1100,  1500,  2700,  2900,  3200,  3300,
+  1200,  1700,  2400,  2500,  3100,  3300,
+  1300,  1900,  2400,  2500,  3300,  3400,
+  1300,  2000,  2400,  2600,  3200,  3300,
+  1400,  2000,  2400,  2600,  3100,  3300,
+  1500,  2000,  2400,  2700,  3000,  3300,
+  1300,  2100,  2400,  2700,  3200,  3300,
+  1400,  1900,  2700,  2800,  3300,  3400,
+  1500,  1900,  2700,  2800,  3300,  3400,
+  1400,  1800,  2600,  2700,  3200,  3400,
+  1800,  2300,  2600,  2700,  2900,  3200,
+  1500,  1700,  2400,  2600,  2800,  3300,
+  1600,  1700,  2500,  2700,  2900,  3300,
+  1800,  1900,  2600,  2700,  3200,  3400,
+  1800,  1900,  2600,  2700,  3200,  3300,
+  2000,  2200,  2600,  2800,  3200,  3300,
+  2000,  2100,  2600,  2700,  3200,  3400,
+  2000,  2100,  2500,  2800,  3200,  3400,
+  2000,  2100,  2600,  2700,  3100,  3300,
+  1900,  2000,  2400,  2600,  3100,  3300,
+  1800,  1900,  2400,  2600,  3100,  3200,
+  1700,  2000,  2300,  2400,  3200,  3300,
+  1900,  2100,  2500,  2700,  3200,  3400,
+  1900,  2000,  2500,  2700,  3200,  3400,
+  1800,  2000,  2500,  2600,  3200,  3300,
+  1800,  2100,  2500,  2700,  3200,  3400,
+  1800,  2000,  2500,  2600,  3200,  3400,
+  1800,  1900,  2400,  2500,  3000,  3300,
+  1800,  2000,  2400,  2600,  3100,  3300,
+  1900,  2100,  2500,  2600,  3200,  3300,
+  2000,  2100,  2500,  2600,  3300,  3400,
+  2000,  2200,  2500,  2600,  3300,  3400,
+  2100,  2200,  2500,  2600,  3300,  3400,
+  2100,  2200,  2500,  2600,  3200,  3400,
+  2100,  2200,  2400,  2500,  3200,  3400,
+  2000,  2100,  2400,  2500,  3200,  3400,
+  1800,  1900,  2400,  2600,  3200,  3400,
+  1800,  1900,  2500,  2600,  3200,  3400,
+  1800,  2300,  2700,  2900,  3300,  3400,
+  1900,  2400,  2800,  3000,  3300,  3500,
+  1900,  2300,  2800,  3100,  3300,  3400,
+  2000,  2300,  2700,  2900,  3200,  3400,
+  1800,  2000,  2600,  2900,  3300,  3400,
+  1700,  2000,  2500,  2600,  3200,  3400,
+  1600,  2100,  2500,  2600,  3300,  3400,
+  1500,  2100,  2500,  2600,  3300,  3400,
+  1500,  2000,  2400,  2500,  3200,  3300,
+  1400,  2000,  2400,  2600,  3200,  3300,
+  1300,  1900,  2400,  2600,  3100,  3300,
+  1300,  2000,  2600,  2800,  3300,  3400,
+  1500,  2000,  2600,  2700,  3300,  3400,
+  1600,  2000,  2500,  2700,  3200,  3400,
+  1600,  2000,  2500,  2600,  3200,  3400,
+  1600,  2000,  2400,  2500,  3200,  3400,
+  1700,  2000,  2300,  2500,  3300,  3400,
+  1600,  1900,  2300,  2400,  3300,  3400,
+  1500,  1700,  2200,  2400,  3200,  3300,
+  1500,  1800,  2200,  2500,  2900,  3200,
+  1300,  1700,  2200,  2500,  3000,  3300,
+  1200,  1700,  2200,  2600,  3000,  3200,
+  1100,  1700,  2300,  2600,  3100,  3300,
+  1200,  1800,  2300,  2500,  3300,  3400,
+  1100,  2100,  2400,  2600,  3300,  3400,
+  1200,  2200,  2400,  2700,  3300,  3400,
+  1200,  2300,  2500,  2700,  3300,  3400,
+  1200,  2300,  2500,  2800,  3300,  3400,
+  1200,  2300,  2600,  2800,  3300,  3400,
+  1100,  1800,  2500,  2600,  3400,  3500,
+  1300,  1700,  2500,  2600,  3200,  3400,
+  1400,  1800,  2500,  2600,  3200,  3400,
+  1500,  1900,  2500,  2600,  3200,  3300,
+  1500,  1900,  2500,  2700,  3200,  3300,
+  1800,  1900,  2500,  2700,  3100,  3200,
+  1900,  2100,  2400,  2500,  3200,  3300,
+  2000,  2100,  2300,  2500,  3300,  3400,
+  1500,  1900,  2400,  2800,  3100,  3300,
+  1200,  1700,  2500,  2600,  3300,  3400,
+  1300,  1900,  2500,  2600,  3300,  3400,
+  1400,  1800,  2500,  2700,  3300,  3400,
+  1300,  1700,  2400,  2700,  3200,  3400,
+  1100,  2100,  2600,  2700,  3300,  3400,
+  1200,  2100,  2600,  2700,  3300,  3400,
+  1200,  2100,  2500,  2700,  3300,  3400,
+  1200,  2100,  2500,  2600,  3300,  3400,
+  1200,  2000,  2500,  2600,  3300,  3400,
+  1200,  2200,  2500,  2700,  3400,  3500,
+  1400,  1800,  2400,  2600,  3100,  3400,
+  1400,  1900,  2400,  2600,  3100,  3300,
+  1500,  1800,  2400,  2700,  3100,  3300,
+  1500,  1900,  2400,  2600,  3200,  3400,
+  1600,  2100,  2400,  2600,  3300,  3400,
+  1900,  2200,  2400,  2600,  3300,  3400,
+  2000,  2200,  2400,  2600,  3200,  3300,
+  2000,  2100,  2400,  2500,  3200,  3300,
+  2100,  2200,  2500,  2600,  3200,  3300,
+  2100,  2200,  2500,  2700,  3200,  3300,
+  2000,  2100,  2400,  2600,  3100,  3200,
+  1500,  2100,  2300,  2600,  3100,  3200,
+  1500,  1900,  2300,  2400,  3100,  3300,
+  1500,  1800,  2300,  2400,  3100,  3300,
+  1400,  1800,  2300,  2400,  3100,  3300,
+  1400,  1900,  2300,  2500,  3100,  3300,
+  1600,  1900,  2500,  2600,  3200,  3300,
+  1500,  1800,  2300,  2600,  3100,  3300,
+  1400,  1700,  2200,  2600,  3100,  3200,
+  1400,  1600,  2200,  2500,  3000,  3200,
+  1300,  1700,  2400,  2600,  3100,  3200,
+  1400,  1700,  2200,  2500,  3200,  3300,
+  1400,  1800,  2300,  2500,  3200,  3300,
+  1300,  1900,  2200,  2400,  3200,  3300,
+  1100,  1500,  2300,  2400,  3200,  3400,
+  1000,  1600,  2500,  2600,  3300,  3400,
+  1000,  1700,  2500,  2600,  3300,  3400,
+  1000,  1800,  2600,  2700,  3300,  3400,
+  1000,  1900,  2600,  2700,  3300,  3400,
+  1000,  1800,  2800,  2900,  3300,  3400,
+  1400,  1600,  2500,  2600,  3100,  3400,
+  1600,  1700,  2500,  2600,  3100,  3400,
+  1600,  1700,  2500,  2600,  3000,  3400,
+  1700,  1800,  2500,  2600,  3000,  3400,
+  1700,  1800,  2400,  2600,  2800,  3300,
+  1700,  1800,  2400,  2600,  2900,  3400,
+  1700,  1800,  2500,  2600,  3200,  3400,
+  1700,  1800,  2500,  2600,  3100,  3400,
+  1600,  1800,  2500,  2600,  3200,  3400,
+  1600,  1800,  2600,  2700,  3200,  3400,
+  1600,  1900,  2600,  2700,  3300,  3400,
+  1600,  2000,  2600,  2700,  3200,  3400,
+  1800,  2300,  2800,  3000,  3300,  3400,
+  1800,  2100,  2800,  3100,  3300,  3400,
+  1900,  2100,  2700,  2900,  3300,  3400,
+  1800,  2000,  2600,  2800,  3200,  3400,
+  1700,  1900,  2500,  2800,  3100,  3300,
+  1700,  1800,  2400,  2600,  3000,  3300,
+  1700,  1800,  2500,  2700,  3000,  3400,
+  1700,  1900,  2600,  2700,  3100,  3400,
+  1600,  1900,  2600,  2700,  3000,  3300,
+  1700,  2000,  2600,  2700,  3100,  3300,
+  1700,  1900,  2600,  2700,  3200,  3300,
+  1700,  1900,  2600,  2800,  3200,  3300,
+  1600,  1900,  2600,  2800,  3200,  3400,
+  1200,  1800,  2700,  2800,  3200,  3400,
+  1100,  1700,  2700,  2800,  3200,  3300,
+  1500,  1800,  2600,  2700,  3100,  3400,
+  1500,  1800,  2500,  2600,  3100,  3400,
+  1600,  1800,  2500,  2600,  3100,  3400,
+  1600,  1800,  2400,  2500,  3100,  3400,
+  1500,  1700,  2400,  2500,  3000,  3400,
+  1400,  1600,  2400,  2500,  3000,  3400,
+  1400,  1600,  2400,  2600,  2900,  3300,
+  1200,  1700,  2600,  2700,  3100,  3300,
+  1200,  1800,  2600,  2700,  3200,  3400,
+  1100,  1900,  2600,  2700,  3200,  3400,
+  1400,  1800,  2500,  2700,  3200,  3400,
+  1700,  1900,  2500,  2600,  2900,  3300,
+  1600,  1700,  2500,  2700,  3000,  3400,
+  1400,  1500,  2500,  2700,  3200,  3400,
+  1400,  1700,  2500,  2700,  3000,  3300,
+  1800,  2000,  2200,  2600,  2900,  3200,
+  1900,  2100,  2400,  2600,  3100,  3300,
+  1900,  2300,  2400,  2700,  3200,  3300,
+  1800,  2200,  2400,  2700,  3200,  3300,
+  1600,  1900,  2200,  2400,  3000,  3200,
+  1500,  1900,  2100,  2500,  3100,  3200,
+  1500,  1900,  2100,  2400,  3100,  3200,
+  1400,  1900,  2100,  2500,  3200,  3300,
+  1300,  2000,  2200,  2500,  3200,  3300,
+  1200,  2000,  2200,  2500,  3200,  3300,
+  1200,  2100,  2300,  2600,  3200,  3300,
+  1100,  2000,  2500,  2600,  3300,  3400,
+  1200,  2200,  2500,  2600,  3300,  3400,
+  1500,  1800,  2400,  2500,  3300,  3400,
+  1800,  1900,  2300,  2400,  3300,  3400,
+  2100,  2200,  2400,  2600,  3300,  3400,
+  2200,  2300,  2600,  2700,  3300,  3400,
+  2200,  2300,  2600,  2800,  3300,  3400,
+  2100,  2300,  2500,  2800,  3100,  3300,
+  2200,  2300,  2600,  2700,  3100,  3400,
+  2100,  2200,  2600,  2700,  3200,  3400,
+  1900,  2300,  2600,  2900,  3100,  3300,
+  2000,  2300,  2600,  2900,  3200,  3300,
+  2200,  2300,  2700,  2900,  3300,  3400,
+  2000,  2300,  2500,  2900,  3300,  3400,
+  1500,  1700,  2200,  2600,  3100,  3300,
+  1500,  1700,  2200,  2600,  3000,  3300,
+  1500,  1800,  2200,  2600,  3100,  3300,
+  1500,  1800,  2000,  2300,  3200,  3300,
+  1600,  1800,  2000,  2300,  3200,  3300,
+  1600,  1900,  2100,  2300,  3200,  3300,
+  1700,  1900,  2200,  2400,  3200,  3300,
+  1700,  1900,  2300,  2400,  3300,  3400,
+  1800,  1900,  2300,  2500,  3300,  3400,
+  1800,  2000,  2400,  2500,  3200,  3400,
+  1800,  2000,  2400,  2600,  3100,  3400,
+  1800,  1900,  2400,  2600,  3100,  3400,
+  1400,  1600,  2500,  2600,  2900,  3300,
+  1300,  1500,  2500,  2600,  2900,  3300,
+  1300,  1700,  2300,  2700,  3000,  3200,
+  1600,  1900,  2400,  2800,  3100,  3200,
+  1500,  2000,  2400,  2800,  3100,  3300,
+  1100,  1700,  2600,  2700,  3200,  3400,
+  1100,  1800,  2600,  2700,  3300,  3400,
+  1100,  1800,  2700,  2800,  3300,  3400,
+  1700,  2000,  2600,  2700,  3100,  3400,
+  1700,  2100,  2500,  2600,  3000,  3200,
+  1700,  2200,  2600,  2700,  3100,  3200,
+  1700,  2000,  2500,  2600,  3000,  3200,
+  1700,  1900,  2500,  2600,  3000,  3300,
+  1700,  1900,  2400,  2600,  3000,  3300,
+  2000,  2200,  2400,  2600,  3300,  3400,
+  1800,  2100,  2400,  2500,  3300,  3400,
+  1700,  2100,  2400,  2500,  3300,  3400,
+  1500,  2100,  2400,  2500,  3300,  3400,
+  1600,  2100,  2400,  2500,  3300,  3400,
+  1700,  2000,  2300,  2400,  3300,  3400,
+  1700,  2000,  2400,  2500,  3300,  3400,
+  1800,  2000,  2400,  2500,  3300,  3400,
+  1900,  2000,  2400,  2500,  3100,  3400,
+  1900,  2000,  2400,  2500,  3000,  3400,
+  1900,  2000,  2300,  2400,  2800,  3300,
+  1800,  2000,  2200,  2400,  2600,  3200,
+  1900,  2000,  2300,  2500,  2800,  3200,
+  1700,  2000,  2300,  2700,  3100,  3300,
+  1700,  1900,  2500,  2800,  3200,  3300,
+  1700,  2000,  2500,  2800,  3300,  3400,
+  1700,  2000,  2600,  2900,  3300,  3400,
+  1700,  1800,  2500,  2700,  3200,  3400,
+  1600,  1700,  2400,  2600,  2900,  3300,
+  1600,  1700,  2500,  2600,  2900,  3300,
+  1600,  1800,  2600,  2700,  3100,  3400,
+  1600,  1700,  2600,  2700,  3000,  3300,
+  1600,  1700,  2600,  2700,  3100,  3300,
+  1700,  1900,  2500,  2800,  3200,  3400,
+  2100,  2500,  2700,  3000,  3300,  3400,
+  2100,  2400,  2700,  2900,  3300,  3400,
+  2200,  2500,  2700,  3000,  3300,  3400,
+  2200,  2500,  2800,  2900,  3400,  3500,
+  2200,  2500,  2800,  2900,  3300,  3500,
+  2100,  2500,  2700,  2800,  3300,  3400,
+  2100,  2400,  2700,  2900,  3200,  3400,
+  2100,  2300,  2600,  2800,  3100,  3400,
+  2100,  2200,  2500,  2700,  3100,  3400,
+  2200,  2300,  2500,  2700,  3200,  3400,
+  1900,  2100,  2400,  2500,  3200,  3400,
+  1700,  2000,  2400,  2500,  3200,  3300,
+  1500,  1900,  2400,  2500,  3100,  3300,
+  1400,  1900,  2500,  2600,  3300,  3400,
+  1200,  1900,  2600,  2700,  3300,  3400,
+  1100,  2000,  2600,  2700,  3300,  3400,
+  1100,  1700,  2600,  2700,  3300,  3400,
+  1300,  1600,  2500,  2600,  3100,  3400,
+  1500,  1600,  2400,  2500,  3000,  3400,
+  1600,  1700,  2400,  2500,  3100,  3400,
+  1900,  2000,  2300,  2500,  2900,  3400,
+  1900,  2000,  2400,  2500,  2800,  3300,
+  1900,  2000,  2500,  2700,  3300,  3400,
+  1900,  2000,  2500,  2800,  3300,  3400,
+  2000,  2200,  2700,  2900,  3300,  3400,
+  1900,  2200,  2700,  2800,  3200,  3300,
+  1900,  2200,  2700,  2900,  3200,  3300,
+  2000,  2300,  2700,  2900,  3200,  3300,
+  2200,  2600,  2700,  2900,  3300,  3400,
+  2100,  2400,  2700,  2800,  3300,  3400,
+  2100,  2200,  2500,  2700,  3300,  3400,
+  1900,  2100,  2400,  2500,  3300,  3400,
+  1600,  2000,  2400,  2500,  3200,  3300,
+  1500,  2000,  2400,  2500,  3300,  3400,
+  1200,  1900,  2400,  2500,  3300,  3500,
+  1200,  1600,  2400,  2500,  3200,  3400,
+  1700,  2100,  2600,  2900,  3300,  3400,
+  1800,  2200,  2700,  3000,  3300,  3400,
+  1800,  2200,  2800,  3000,  3300,  3400,
+  1700,  2100,  2600,  2900,  3200,  3400,
+  1700,  2000,  2600,  2800,  3200,  3400,
+  1600,  1800,  2500,  2700,  3200,  3400,
+  1500,  1700,  2500,  2600,  3200,  3400,
+  1500,  1700,  2400,  2600,  3200,  3300,
+  1500,  1800,  2400,  2600,  3200,  3300,
+  1500,  1800,  2300,  2500,  3200,  3400,
+  1400,  1800,  2300,  2500,  3300,  3400,
+  1400,  1800,  2300,  2400,  3200,  3400,
+  1600,  1900,  2500,  2600,  3200,  3400,
+  1500,  1900,  2600,  2700,  3200,  3400,
+  1500,  1900,  2600,  2700,  3300,  3400,
+  1400,  1900,  2600,  2700,  3300,  3400,
+  1400,  1900,  2600,  2700,  3200,  3400,
+  1500,  1700,  2600,  2700,  3100,  3300,
+  1600,  1800,  2600,  2700,  3100,  3200,
+  1900,  2100,  2700,  2900,  3200,  3300,
+  2000,  2100,  2500,  2700,  3200,  3400,
+  2000,  2100,  2400,  2600,  3100,  3400,
+  2000,  2100,  2300,  2600,  3000,  3300,
+  1900,  2000,  2300,  2500,  3000,  3400,
+  1800,  1900,  2300,  2400,  3000,  3400,
+  1600,  1800,  2300,  2400,  3000,  3400,
+  1400,  1700,  2400,  2500,  2900,  3400,
+  1300,  1700,  2400,  2500,  3100,  3400,
+  1400,  1700,  2300,  2600,  3100,  3300,
+  1200,  1600,  2400,  2500,  3200,  3300,
+  1200,  1600,  2500,  2600,  3200,  3300,
+  1300,  1800,  2500,  2600,  3200,  3300,
+  1400,  1800,  2500,  2600,  3200,  3300,
+  1700,  2000,  2400,  2600,  3100,  3200,
+  1800,  1900,  2400,  2600,  3000,  3300,
+  2000,  2300,  2700,  2900,  3300,  3400,
+  1900,  2300,  2900,  3100,  3400,  3500,
+  1900,  2100,  2700,  3000,  3300,  3400,
+  1800,  1900,  2300,  2700,  3100,  3300,
+  1800,  1900,  2200,  2500,  3100,  3300,
+  1700,  1800,  2100,  2400,  3000,  3300,
+  1700,  1800,  2200,  2400,  3100,  3300,
+  1400,  1900,  2100,  2300,  3200,  3300,
+  1300,  1800,  2000,  2300,  3200,  3300,
+  1300,  1800,  1900,  2500,  3200,  3300,
+  1300,  1900,  2100,  2600,  3200,  3300,
+  2000,  2100,  2400,  2500,  3100,  3400,
+  2100,  2200,  2400,  2500,  3100,  3400,
+  2100,  2400,  2800,  2900,  3100,  3300,
+  2000,  2200,  2600,  2900,  3200,  3300,
+  2100,  2200,  2700,  2800,  3200,  3300,
+  2000,  2100,  2700,  2800,  3200,  3300,
+  2000,  2100,  2600,  2800,  3200,  3400,
+  1900,  2000,  2600,  2700,  3300,  3400,
+  1800,  1900,  2500,  2700,  3300,  3400,
+  2000,  2100,  2600,  2700,  3200,  3300,
+  2000,  2100,  2600,  2700,  3100,  3400,
+  1900,  2100,  2600,  2700,  3200,  3400,
+  1800,  2000,  2600,  2700,  3300,  3400,
+  1800,  2000,  2600,  2700,  3300,  3500,
+  1700,  1900,  2500,  2700,  3200,  3400,
+  1800,  2100,  2700,  2900,  3200,  3400,
+  1900,  2200,  2600,  2900,  3200,  3300,
+  1900,  2200,  2700,  2900,  3200,  3400,
+  1800,  2200,  2700,  3000,  3200,  3400,
+  1800,  2100,  2700,  2900,  3300,  3400,
+  1900,  2200,  2600,  2900,  3300,  3500,
+  1700,  2100,  2500,  2800,  3400,  3500,
+  1600,  1900,  2400,  2600,  3200,  3400,
+  1600,  1900,  2400,  2500,  3300,  3400,
+  1700,  2000,  2400,  2500,  3200,  3400,
+  1700,  2000,  2300,  2500,  3200,  3300,
+  1700,  2000,  2300,  2400,  2900,  3200,
+  1900,  2000,  2600,  2700,  3100,  3200,
+  1900,  2000,  2600,  2700,  3100,  3400,
+  1800,  2000,  2600,  2700,  3100,  3300,
+  1400,  1800,  2300,  2600,  3000,  3200,
+  1300,  1800,  2200,  2500,  3100,  3300,
+  1300,  1900,  2200,  2600,  3100,  3300,
+  1400,  1800,  2100,  2500,  3000,  3200,
+  1300,  1600,  1700,  2500,  3100,  3200,
+  1300,  1600,  1700,  2400,  3100,  3200,
+  1300,  1600,  1800,  2300,  3100,  3200,
+  1500,  1800,  2400,  2500,  3100,  3200,
+  1500,  1900,  2500,  2600,  3000,  3200,
+  1800,  2200,  2600,  2800,  3200,  3400,
+  1800,  2000,  2500,  2700,  3100,  3300,
+  1700,  1900,  2400,  2700,  3100,  3300,
+  1800,  1900,  2500,  2700,  3100,  3300,
+  1800,  1900,  2600,  2700,  3000,  3300,
+  2100,  2200,  2600,  2700,  3200,  3300,
+  2100,  2200,  2600,  2700,  3300,  3400,
+  1900,  2100,  2300,  2500,  3300,  3400,
+  1700,  2100,  2500,  2800,  3100,  3300,
+  1600,  2100,  2500,  2700,  3100,  3300,
+  1500,  1900,  2400,  2700,  3100,  3300,
+  1200,  1700,  1800,  2100,  3200,  3400,
+  1400,  1700,  1800,  2200,  3300,  3400,
+  1600,  1800,  1900,  2400,  3200,  3300,
+  1700,  1900,  2000,  2500,  3100,  3200,
+  1700,  1900,  2100,  2400,  2900,  3100,
+  1800,  2000,  2200,  2400,  2800,  3200,
+  1900,  2100,  2300,  2600,  2900,  3300,
+  1900,  2100,  2300,  2600,  3200,  3400,
+  2000,  2100,  2400,  2500,  3300,  3400,
+  1800,  1900,  2400,  2500,  3200,  3500,
+  1700,  1900,  2500,  2700,  3200,  3300,
+  1800,  2000,  2600,  3000,  3300,  3400,
+  1900,  2000,  2500,  2700,  2900,  3200,
+  1900,  2000,  2500,  2700,  2900,  3100,
+  1900,  2000,  2400,  2600,  2900,  3200,
+  1700,  2000,  2300,  2600,  2900,  3200,
+  1800,  2000,  2300,  2600,  2900,  3200,
+  1900,  2000,  2400,  2600,  2900,  3300,
+  1900,  2000,  2400,  2600,  3000,  3300,
+  1900,  2000,  2500,  2600,  3100,  3400,
+  1600,  1800,  2200,  2600,  3000,  3300,
+  1600,  1800,  2200,  2500,  3000,  3300,
+  1700,  1900,  2300,  2600,  3000,  3200,
+  1800,  1900,  2300,  2600,  3000,  3200,
+  1800,  1900,  2400,  2500,  3000,  3400,
+  1700,  1800,  2400,  2500,  3200,  3400,
+  1600,  1700,  2400,  2600,  3100,  3300,
+  1600,  1700,  2400,  2500,  3200,  3300,
+  1500,  1600,  2400,  2500,  3200,  3400,
+  1400,  1600,  2400,  2500,  3200,  3400,
+  1300,  1600,  2400,  2500,  3200,  3300,
+  1400,  2000,  2500,  2700,  3100,  3300,
+  1700,  1900,  2200,  2500,  3000,  3300,
+  1700,  1900,  2300,  2500,  3100,  3300,
+  2000,  2100,  2400,  2600,  3100,  3300,
+  2000,  2200,  2500,  2600,  3100,  3300,
+  1900,  2000,  2400,  2500,  3200,  3400,
+  2100,  2200,  2300,  2400,  3200,  3400,
+  2000,  2100,  2300,  2500,  3000,  3400,
+  1600,  1800,  2100,  2500,  3000,  3200,
+  1700,  1800,  2200,  2700,  3200,  3300,
+  1800,  1900,  2400,  2800,  3200,  3400,
+  1800,  2000,  2500,  2800,  3200,  3400,
+  1700,  2100,  2600,  2900,  3300,  3500,
+  1800,  2200,  2600,  2900,  3300,  3500,
+  1700,  2200,  2600,  2900,  3300,  3400,
+  1700,  2100,  2500,  2800,  3200,  3400,
+  1700,  1900,  2600,  2700,  3300,  3400,
+  1700,  1800,  2600,  2700,  3100,  3400,
+  1700,  1800,  2600,  2700,  3200,  3400,
+  1700,  1900,  2700,  2800,  3200,  3400,
+  1600,  1900,  2700,  2800,  3200,  3300,
+  1400,  1900,  2800,  2900,  3200,  3300,
+  1600,  2000,  2600,  2700,  3200,  3300,
+  1700,  2000,  2600,  2700,  3200,  3300,
+  1700,  2000,  2600,  2700,  3200,  3400,
+  1700,  2000,  2600,  2700,  3300,  3400,
+  1700,  1900,  2500,  2600,  3300,  3400,
+  1700,  1800,  2500,  2700,  3100,  3300,
+  1700,  1900,  2500,  2800,  3300,  3400,
+  1700,  2000,  2400,  2800,  3300,  3400,
+  1600,  1800,  2100,  2400,  3100,  3200,
+  1700,  1800,  2000,  2700,  3100,  3200,
+  1700,  1900,  2100,  2700,  3100,  3200,
+  1800,  2000,  2200,  2700,  3100,  3200,
+  1900,  2000,  2300,  2700,  3100,  3200,
+  1900,  2100,  2300,  2700,  3100,  3200,
+  1900,  2100,  2400,  2700,  3100,  3200,
+  2000,  2100,  2400,  2700,  3100,  3200,
+  2000,  2200,  2400,  2700,  3100,  3200,
+  1900,  2100,  2300,  2600,  3100,  3200,
+  1800,  2100,  2200,  2600,  3100,  3200,
+  1600,  2000,  2200,  2600,  3100,  3200,
+  1500,  2000,  2200,  2700,  3100,  3200,
+  1500,  1900,  2200,  2700,  3100,  3200,
+  1500,  1800,  2200,  2600,  3100,  3200,
+  1800,  2100,  2600,  2700,  3100,  3300,
+  1700,  2100,  2600,  2700,  3100,  3300,
+  1500,  1800,  2600,  2700,  3200,  3400,
+  1200,  1400,  2500,  2700,  3200,  3400,
+  1400,  1700,  2400,  2600,  3200,  3400,
+  1400,  1600,  2400,  2600,  3100,  3400,
+  1500,  1700,  2500,  2600,  3000,  3300,
+  1600,  1800,  2500,  2600,  3100,  3300,
+  1700,  1900,  2500,  2600,  3100,  3300,
+  1800,  1900,  2400,  2600,  3000,  3400,
+  2000,  2100,  2500,  2600,  3000,  3300,
+  2100,  2200,  2500,  2600,  3100,  3400,
+  2200,  2300,  2500,  2600,  3100,  3400,
+  1400,  1900,  2300,  2400,  2800,  3200,
+  1400,  1900,  2300,  2400,  2700,  3100,
+  1500,  1700,  2300,  2400,  2800,  3200,
+  1600,  1700,  2100,  2500,  3000,  3300,
+  1700,  2000,  2400,  2800,  3000,  3300,
+  1800,  2000,  2600,  2800,  3100,  3300,
+  1800,  2000,  2500,  2700,  3200,  3300,
+  1800,  2000,  2600,  2700,  3200,  3400,
+  1800,  2000,  2600,  2700,  3200,  3300,
+  1800,  2200,  2600,  2800,  3200,  3300,
+  1800,  2100,  2600,  2800,  3100,  3300,
+  1700,  1900,  2500,  2700,  3000,  3300,
+  1800,  1900,  2500,  2700,  3000,  3300,
+  1900,  2000,  2500,  2700,  3100,  3300,
+  1900,  2000,  2500,  2700,  3100,  3400,
+  1700,  1900,  2600,  2800,  3200,  3400,
+  1600,  1900,  2600,  2800,  3300,  3400,
+  1500,  1800,  2500,  2700,  3300,  3400,
+  1500,  1900,  2400,  2500,  3200,  3400,
+  1200,  1800,  2200,  2300,  3100,  3200,
+  1400,  1900,  2300,  2600,  3000,  3300,
+  1300,  1400,  2300,  2400,  2800,  3100,
+  1300,  1400,  2300,  2500,  3000,  3200,
+  1300,  1600,  2400,  2600,  3000,  3200,
+  1400,  1600,  2400,  2500,  2900,  3200,
+  1500,  1600,  2400,  2600,  3000,  3200,
+  1500,  1700,  2400,  2600,  2900,  3200,
+  1600,  1800,  2400,  2600,  2900,  3100,
+  1800,  2000,  2500,  2700,  3000,  3300,
+  1900,  2100,  2600,  2700,  3000,  3300,
+  1900,  2100,  2500,  2700,  3000,  3200,
+  2000,  2100,  2400,  2700,  3100,  3300,
+  2000,  2200,  2400,  2700,  3100,  3300,
+  1900,  2300,  2600,  2700,  3000,  3200,
+  2000,  2200,  2500,  2600,  3000,  3200,
+  1900,  2000,  2500,  2600,  3000,  3300,
+  1800,  2000,  2400,  2600,  3000,  3300,
+  1500,  1900,  2300,  2500,  2700,  3000,
+  1500,  2000,  2400,  2500,  2700,  3100,
+  1200,  1900,  2300,  2500,  2800,  3000,
+  1300,  1800,  2200,  2300,  3100,  3200,
+  1600,  1900,  2400,  2500,  3100,  3200,
+  2100,  2200,  2600,  2700,  3100,  3300,
+  2100,  2200,  2600,  2700,  3000,  3300,
+  2000,  2200,  2600,  2700,  3100,  3300,
+  2000,  2100,  2400,  2600,  3200,  3300,
+  1800,  2000,  2300,  2400,  3100,  3300,
+  1500,  2000,  2200,  2500,  3200,  3300,
+  1600,  1900,  2400,  2600,  3100,  3300,
+  1500,  1800,  2200,  2600,  3000,  3200,
+  1500,  1800,  2100,  2600,  2900,  3100,
+  1400,  1700,  1900,  2300,  2800,  3000,
+  1500,  1700,  1900,  2200,  2800,  2900,
+  1500,  1700,  2000,  2200,  2900,  3000,
+  1500,  1700,  2100,  2300,  2900,  3000,
+  1500,  1800,  2200,  2300,  3000,  3100,
+  1500,  1800,  2200,  2400,  3000,  3100,
+  1600,  1800,  2300,  2400,  3100,  3200,
+  1600,  1800,  2300,  2500,  3100,  3200,
+  1600,  1800,  2400,  2500,  3100,  3200,
+  1600,  1800,  2400,  2500,  3100,  3300,
+  1600,  1800,  2400,  2500,  3200,  3300,
+  1500,  1700,  2400,  2500,  3200,  3300,
+  1500,  1700,  2300,  2500,  2900,  3300,
+  1800,  2100,  2500,  2600,  3200,  3300,
+  1900,  2100,  2400,  2500,  3100,  3400,
+  1900,  2100,  2200,  2500,  3100,  3300,
+  1700,  1800,  2200,  2500,  2900,  3300,
+  1700,  1800,  2400,  2500,  3000,  3300,
+  1600,  1700,  2400,  2500,  3100,  3300,
+  1500,  1700,  2400,  2500,  3100,  3300,
+  1400,  1700,  2500,  2600,  3100,  3200,
+  1300,  1600,  2500,  2600,  3100,  3200,
+  1200,  1600,  2500,  2600,  3100,  3200,
+  1100,  1700,  2600,  2700,  3100,  3200,
+  1100,  1500,  2600,  2700,  3100,  3200,
+  1100,  1500,  2600,  2700,  3100,  3300,
+  1100,  1500,  2500,  2700,  3000,  3300,
+  1000,  1600,  2600,  2700,  3100,  3300,
+  1300,  1600,  2600,  2700,  3100,  3300,
+  1300,  1600,  2600,  2700,  3200,  3300,
+  1500,  1700,  2500,  2600,  3100,  3300,
+  1700,  1800,  2500,  2600,  3100,  3300,
+  1700,  1900,  2500,  2600,  3200,  3300,
+  1800,  1900,  2500,  2600,  3200,  3300,
+  1800,  2000,  2500,  2700,  3100,  3400,
+  1800,  2100,  2500,  2700,  3100,  3300,
+  1900,  2200,  2500,  2700,  3200,  3300,
+  1900,  2200,  2400,  2600,  3100,  3300,
+  1900,  2300,  2500,  2600,  3100,  3300,
+  1900,  2000,  2200,  2400,  3200,  3300,
+  1600,  1900,  2200,  2300,  3200,  3300,
+  1400,  1600,  2200,  2400,  3100,  3200,
+  1100,  1500,  2300,  2500,  3000,  3100,
+  1400,  1700,  2500,  2700,  3200,  3300,
+  1500,  1800,  2400,  2500,  3200,  3300,
+  1800,  2100,  2500,  2800,  3100,  3300,
+  1800,  1900,  2300,  2500,  3200,  3400,
+  1700,  1900,  2300,  2500,  3200,  3400,
+  1800,  2100,  2500,  2800,  3200,  3400,
+  1800,  2000,  2500,  2800,  3200,  3300,
+  1900,  2100,  2600,  2800,  3100,  3400,
+  1700,  2100,  2600,  2700,  3200,  3400,
+  1800,  2100,  2600,  2700,  3300,  3500,
+  1900,  2000,  2500,  2600,  3300,  3400,
+  1600,  1900,  2200,  2400,  3200,  3300,
+  1400,  2000,  2300,  2600,  3100,  3200,
+  1300,  1800,  2300,  2400,  3000,  3100,
+  1300,  1700,  2300,  2500,  3000,  3100,
+  1600,  1700,  2600,  2700,  3200,  3300,
+  1700,  2000,  2300,  2400,  3100,  3300,
+  2200,  2300,  2600,  2800,  3200,  3400,
+  2100,  2300,  2500,  2900,  3200,  3300,
+  2200,  2300,  2500,  2900,  3200,  3300,
+  2000,  2300,  2500,  2700,  3200,  3300,
+  2200,  2400,  2500,  2700,  3200,  3300,
+  2200,  2400,  2600,  2800,  3200,  3300,
+  1700,  2000,  2400,  2700,  3000,  3200,
+  1700,  1900,  2500,  2700,  3000,  3200,
+  1700,  1900,  2600,  2700,  3100,  3300,
+  1500,  1800,  2600,  2700,  3100,  3300,
+  1600,  1700,  2600,  2700,  2900,  3300,
+  1600,  1700,  2600,  2800,  3000,  3300,
+  1700,  2000,  2700,  2800,  3100,  3400,
+  1600,  1900,  2500,  2700,  3000,  3300,
+  1800,  2200,  2800,  2900,  3300,  3400,
+  2000,  2500,  2800,  2900,  3400,  3500,
+  2000,  2400,  2800,  2900,  3400,  3500,
+  2000,  2300,  2700,  2800,  3200,  3400,
+  1600,  1700,  2400,  2600,  3200,  3300,
+  1500,  1900,  2400,  2500,  3200,  3300,
+  1400,  1900,  2400,  2500,  3200,  3300,
+  1400,  1900,  2500,  2600,  3200,  3300,
+  1300,  1900,  2500,  2600,  3200,  3300,
+  1300,  1700,  2500,  2600,  3100,  3300,
+  1300,  1500,  2500,  2600,  3100,  3300,
+  1200,  1400,  2400,  2500,  3100,  3300,
+  1200,  1500,  2400,  2500,  3100,  3300,
+  1200,  1600,  2400,  2500,  3100,  3300,
+  1200,  1700,  2500,  2600,  3100,  3300,
+  1200,  1700,  2500,  2600,  3200,  3300,
+  1200,  1800,  2500,  2600,  3200,  3300,
+  1200,  1800,  2400,  2500,  3200,  3300,
+  1200,  1800,  2400,  2500,  3100,  3300,
+  1200,  1700,  2400,  2500,  3100,  3200,
+  1200,  1600,  2400,  2500,  3000,  3200,
+  1200,  1600,  2400,  2500,  2900,  3100,
+  1200,  1700,  2400,  2500,  3000,  3300,
+  1300,  1700,  2400,  2500,  3100,  3300,
+  1200,  1700,  2400,  2500,  3000,  3100,
+  1200,  1700,  2300,  2400,  3000,  3100,
+  1600,  2000,  2300,  2600,  3000,  3300,
+  1400,  1600,  1900,  2200,  3000,  3100,
+  1400,  1600,  1800,  2100,  3000,  3100,
+  1300,  1500,  1600,  2000,  3100,  3200,
+  1300,  1500,  1700,  1900,  3100,  3200,
+  1400,  1600,  1700,  1900,  3100,  3200,
+  1600,  1700,  2000,  2100,  3100,  3200,
+  1600,  1800,  2100,  2200,  3100,  3200,
+  1800,  1900,  2300,  2400,  3200,  3300,
+  1900,  2100,  2600,  2700,  3100,  3400,
+  1900,  2000,  2500,  2600,  3000,  3400,
+  1800,  2100,  2600,  2700,  3200,  3400,
+  1800,  2300,  2600,  2800,  3300,  3500,
+  1600,  2100,  2400,  2600,  3200,  3300,
+  1300,  1900,  2500,  2600,  3100,  3300,
+  1300,  1800,  2500,  2600,  3100,  3300,
+  1400,  1800,  2600,  2700,  3100,  3300,
+  1600,  1800,  2500,  2700,  3100,  3300,
+  1600,  1800,  2500,  2600,  3200,  3300,
+  1700,  1800,  2500,  2600,  3200,  3300,
+  1900,  2000,  2500,  2700,  2900,  3300,
+  2000,  2100,  2400,  2600,  2900,  3200,
+  2000,  2100,  2400,  2600,  3000,  3300,
+  2100,  2200,  2400,  2600,  3000,  3300,
+  2000,  2100,  2500,  2600,  3100,  3400,
+  1900,  2000,  2400,  2600,  3000,  3400,
+  1800,  1900,  2300,  2500,  2900,  3400,
+  1700,  1800,  2500,  2700,  3100,  3400,
+  1700,  1900,  2500,  2700,  3100,  3400,
+  1800,  1900,  2700,  2800,  3200,  3400,
+  2100,  2200,  2600,  2800,  3100,  3400,
+  2200,  2300,  2600,  2800,  3100,  3400,
+  1800,  2300,  2500,  2700,  3100,  3300,
+  1500,  2000,  2400,  2500,  2800,  3100,
+  1600,  2000,  2400,  2500,  2800,  3100,
+  1600,  2000,  2400,  2500,  2800,  3200,
+  1600,  2000,  2400,  2500,  2900,  3300,
+  1800,  2200,  2500,  2600,  3000,  3300,
+  2100,  2300,  2500,  2600,  3100,  3300,
+  2100,  2200,  2600,  2700,  3100,  3200,
+  1800,  1900,  2600,  2700,  3100,  3200,
+  1800,  1900,  2600,  2700,  3100,  3300,
+  1700,  1800,  2600,  2700,  3100,  3300,
+  1700,  1800,  2600,  2700,  3200,  3300,
+  1600,  1700,  2600,  2700,  3200,  3400,
+  1600,  1700,  2500,  2700,  3200,  3300,
+  1500,  1800,  2400,  2500,  3000,  3300,
+  1500,  1900,  2300,  2500,  3000,  3200,
+  1700,  2100,  2300,  2600,  3100,  3300,
+  1800,  2000,  2700,  2800,  3100,  3300,
+  1700,  1800,  2500,  2700,  2900,  3300,
+  1600,  1800,  2500,  2700,  3000,  3300,
+  1700,  1800,  2400,  2600,  3100,  3300,
+  1700,  1800,  2400,  2500,  3200,  3300,
+  1800,  1900,  2400,  2500,  3200,  3300,
+  1900,  2000,  2400,  2500,  3200,  3300,
+  2000,  2100,  2300,  2500,  3200,  3400,
+  2000,  2100,  2200,  2400,  3200,  3400,
+  2000,  2100,  2300,  2400,  3100,  3400,
+  1700,  1900,  2400,  2500,  3200,  3400,
+  1700,  1900,  2400,  2500,  3100,  3400,
+  1700,  1800,  2400,  2600,  3300,  3400,
+  1700,  1800,  2500,  2600,  3300,  3400,
+  1600,  1900,  2500,  2600,  3300,  3400,
+  1700,  1900,  2600,  2800,  3100,  3300,
+  1700,  2100,  2600,  2700,  3300,  3400,
+  1800,  2000,  2400,  2500,  3100,  3300,
+  2000,  2100,  2300,  2400,  3200,  3400,
+  1400,  1900,  2300,  2400,  3000,  3300,
+  1400,  2000,  2300,  2500,  3000,  3100,
+  1400,  1700,  2500,  2600,  3100,  3300,
+  1300,  1600,  2400,  2600,  3100,  3300,
+  1300,  1600,  2400,  2500,  3200,  3400,
+  1500,  2000,  2500,  2700,  3200,  3400,
+  1800,  2100,  2500,  2900,  3200,  3400,
+  1800,  2200,  2500,  2800,  3300,  3400,
+  1700,  2000,  2500,  2900,  3300,  3400,
+  1700,  2100,  2600,  2900,  3400,  3500,
+  1500,  1900,  2400,  2800,  3300,  3400,
+  1800,  2100,  2500,  2800,  3300,  3400,
+  1700,  2000,  2600,  2800,  3300,  3400,
+  1700,  2100,  2600,  2800,  3200,  3400,
+  1900,  2200,  2600,  2800,  3200,  3300,
+  1900,  2100,  2600,  2800,  3200,  3300,
+  1800,  2100,  2700,  2800,  3300,  3400,
+  1700,  2100,  2700,  2800,  3200,  3400,
+  1800,  2200,  2600,  2700,  3200,  3400,
+  1800,  2200,  2600,  2700,  3300,  3400,
+  1800,  2300,  2600,  2700,  3300,  3400,
+  1900,  2300,  2500,  2700,  3300,  3400,
+  1800,  2200,  2500,  2800,  3200,  3400,
+  1800,  2200,  2500,  2700,  3100,  3300,
+  1700,  2200,  2400,  2600,  3100,  3200,
+  1800,  2000,  2300,  2500,  3200,  3300,
+  1800,  2000,  2200,  2500,  3300,  3400,
+  1800,  2000,  2200,  2600,  3300,  3400,
+  1500,  1800,  1900,  2400,  3200,  3300,
+  1500,  1700,  1900,  2500,  3200,  3300,
+  1500,  1800,  1900,  2500,  3200,  3300,
+  1600,  1800,  2000,  2400,  3300,  3400,
+  1500,  1700,  2200,  2600,  3000,  3200,
+  1400,  1700,  2000,  2600,  3000,  3200,
+  1500,  1900,  2400,  2600,  3100,  3200,
+  1400,  1900,  2500,  2600,  3100,  3300,
+  1200,  1600,  2500,  2700,  3100,  3300,
+  1200,  1800,  2500,  2600,  3100,  3200,
+  1400,  1800,  2300,  2400,  3100,  3200,
+  1400,  1700,  2200,  2300,  3200,  3300,
+  1800,  1900,  2200,  2300,  3300,  3400,
+  1800,  2100,  2300,  2400,  2900,  3200,
+  1900,  2100,  2300,  2500,  3000,  3300,
+  1900,  2100,  2400,  2600,  3300,  3400,
+  1600,  1900,  2400,  2500,  3200,  3300,
+  1500,  1700,  2300,  2400,  3200,  3300,
+  1500,  1900,  2300,  2500,  3200,  3300,
+  1600,  2000,  2500,  2700,  3200,  3300,
+  1900,  2200,  2500,  2700,  3300,  3400,
+  1800,  2300,  2500,  2700,  3300,  3400,
+  1800,  2400,  2500,  2900,  3300,  3400,
+  1900,  2400,  2600,  3000,  3300,  3400,
+  2000,  2400,  2700,  3000,  3400,  3500,
+  1800,  2100,  2500,  2900,  3200,  3300,
+  1700,  2100,  2500,  2900,  3200,  3400,
+  1800,  2100,  2600,  2800,  3100,  3400,
+  1800,  2200,  2700,  2800,  3200,  3400,
+  1800,  2300,  2700,  2900,  3300,  3500,
+  1400,  2000,  2600,  2700,  3200,  3400,
+  1300,  1800,  2200,  2300,  3000,  3100,
+  1300,  1700,  2100,  2200,  3100,  3200,
+  1400,  1700,  2000,  2200,  3000,  3100,
+  1400,  1600,  2000,  2100,  3000,  3100,
+  1500,  1800,  2000,  2300,  3100,  3200,
+  1600,  1800,  2000,  2300,  3100,  3200,
+  1600,  1800,  2000,  2200,  3100,  3200,
+  1700,  2000,  2200,  2300,  3000,  3200,
+  1700,  2100,  2400,  2800,  3100,  3300,
+  1800,  2000,  2600,  2800,  3000,  3200,
+  1700,  1900,  2600,  2700,  3200,  3400,
+  1600,  1700,  2400,  2600,  3200,  3400,
+  1600,  1700,  2400,  2500,  3200,  3400,
+  1700,  2100,  2500,  2800,  3200,  3300,
+  1700,  2200,  2500,  2800,  3200,  3300,
+  1700,  2100,  2400,  2600,  3200,  3300,
+  1700,  1900,  2400,  2600,  3200,  3300,
+  1600,  1900,  2200,  2500,  3100,  3300,
+  1500,  1900,  2100,  2400,  3100,  3300,
+  1500,  1600,  2000,  2300,  3000,  3200,
+  1500,  1700,  2100,  2500,  3100,  3300,
+  1600,  1800,  2300,  2700,  3100,  3300,
+  1600,  1700,  2300,  2600,  3100,  3200,
+  1500,  1700,  2300,  2500,  3000,  3200,
+  1400,  1700,  2400,  2500,  3000,  3200,
+  1200,  1500,  2500,  2600,  3000,  3100,
+  1100,  1900,  2600,  2700,  3000,  3100,
+  1500,  2000,  2700,  2800,  3200,  3400,
+  1700,  2100,  2700,  2800,  3300,  3400,
+  1800,  2200,  2700,  2800,  3300,  3400,
+  1800,  2400,  2700,  2800,  3200,  3300,
+  1800,  2300,  2500,  2600,  3100,  3200,
+  1500,  1800,  2100,  2400,  3000,  3200,
+  1400,  1600,  1800,  2200,  3000,  3100,
+  1300,  1600,  1700,  2100,  3000,  3100,
+  1200,  1400,  1600,  2400,  3000,  3100,
+  1300,  1500,  1600,  2100,  3000,  3100,
+  1400,  1600,  1700,  2100,  3000,  3100,
+  1400,  1700,  2100,  2300,  3100,  3200,
+  1400,  1700,  2200,  2300,  3100,  3200,
+  1400,  1600,  2200,  2300,  3100,  3200,
+  1400,  1700,  2200,  2400,  3100,  3200,
+  1400,  1700,  2300,  2400,  3100,  3200,
+  1400,  1600,  2300,  2400,  3100,  3200,
+  1400,  1600,  2200,  2300,  3000,  3200,
+  1500,  2000,  2400,  2600,  3200,  3300,
+  1700,  2000,  2700,  2800,  3200,  3400,
+  2100,  2400,  2800,  2900,  3200,  3400,
+  2000,  2500,  2700,  2800,  3400,  3500,
+  2100,  2600,  2800,  2900,  3400,  3500,
+  2000,  2500,  2700,  2800,  3300,  3400,
+  1900,  2100,  2700,  2800,  3200,  3400,
+  2100,  2200,  2700,  2800,  3200,  3400,
+  2100,  2200,  2700,  2900,  3300,  3400,
+  2200,  2300,  2700,  2800,  3200,  3400,
+  1700,  2100,  2400,  2700,  3200,  3400,
+  1600,  2100,  2400,  2600,  2900,  3200,
+  1500,  2100,  2400,  2500,  2800,  3100,
+  1600,  2100,  2400,  2500,  2800,  3200,
+  1600,  2100,  2400,  2500,  2900,  3200,
+  1600,  2100,  2400,  2500,  3000,  3200,
+  1600,  2100,  2300,  2500,  3200,  3300,
+  1700,  1800,  2200,  2600,  3100,  3300,
+  1700,  1900,  2300,  2600,  3100,  3300,
+  1800,  1900,  2300,  2500,  3100,  3300,
+  1800,  1900,  2400,  2500,  3100,  3200,
+  1600,  1800,  2200,  2500,  3100,  3300,
+  1500,  1700,  1900,  2200,  3100,  3200,
+  1500,  1700,  1900,  2100,  3100,  3200,
+  1500,  1700,  1900,  2300,  3200,  3300,
+  1500,  1700,  1900,  2400,  3200,  3300,
+  1500,  1700,  1800,  2400,  3200,  3300,
+  1500,  1700,  1900,  2200,  3200,  3300,
+  1500,  1700,  1900,  2100,  3200,  3300,
+  1500,  1600,  1900,  2000,  3100,  3200,
+  1500,  1700,  2000,  2100,  3200,  3300,
+  1600,  1700,  2000,  2100,  3200,  3300,
+  1600,  1800,  2100,  2300,  3200,  3300,
+  1700,  1900,  2300,  2500,  3100,  3200,
+  1700,  2000,  2400,  2600,  3000,  3100,
+  1700,  2100,  2400,  2600,  3000,  3100,
+  1600,  2000,  2400,  2600,  2900,  3100,
+  1800,  2200,  2600,  2800,  3000,  3200,
+  2000,  2400,  2500,  2800,  3100,  3200,
+  2100,  2500,  2600,  2800,  3200,  3300,
+  2200,  2500,  2700,  3000,  3200,  3300,
+  2100,  2500,  2700,  3000,  3200,  3300,
+  2200,  2500,  2600,  3000,  3200,  3300,
+  2200,  2500,  2600,  2900,  3200,  3300,
+  2200,  2400,  2600,  2800,  3100,  3300,
+  2000,  2300,  2500,  2700,  3100,  3200,
+  2000,  2200,  2500,  2700,  3100,  3200,
+  2000,  2300,  2500,  2800,  3100,  3200,
+  2000,  2300,  2400,  2800,  3100,  3200,
+  2100,  2200,  2500,  2800,  3100,  3200,
+  2000,  2100,  2500,  2800,  3200,  3300,
+  1900,  2000,  2200,  2500,  3200,  3300,
+  1600,  1800,  2100,  2400,  3100,  3300,
+  1500,  1600,  1800,  2100,  3200,  3300,
+  1500,  1700,  1800,  2100,  3200,  3300,
+  1500,  1700,  1800,  2300,  3200,  3300,
+  2000,  2200,  2400,  2600,  3000,  3200,
+  2000,  2400,  2600,  2800,  3100,  3300,
+  2000,  2400,  2500,  2700,  3100,  3300,
+  1800,  2200,  2500,  2600,  3100,  3300,
+  1600,  1800,  2400,  2500,  3000,  3200,
+  1500,  1800,  2400,  2500,  3000,  3100,
+  1800,  2000,  2200,  2700,  3000,  3300,
+  1600,  1900,  2100,  2600,  3000,  3200,
+  1500,  1700,  1900,  2300,  3000,  3100,
+  1500,  1700,  1900,  2200,  3000,  3100,
+  1600,  1700,  2200,  2400,  2900,  3000,
+  1600,  1800,  2200,  2400,  2900,  3000,
+  1800,  2300,  2600,  2700,  3200,  3400,
+  1800,  1900,  2500,  2600,  3300,  3400,
+  1800,  1900,  2400,  2600,  3300,  3400,
+  1700,  1900,  2300,  2500,  3300,  3400,
+  1600,  1800,  2300,  2400,  3200,  3300,
+  1300,  1900,  2300,  2400,  3100,  3200,
+  1600,  1700,  2400,  2600,  3100,  3200,
+  2000,  2100,  2500,  2600,  3200,  3300,
+  2100,  2200,  2400,  2600,  3200,  3400,
+  1700,  2000,  2400,  2600,  3100,  3400,
+  1700,  1800,  2400,  2500,  3100,  3300,
+  1600,  1900,  2300,  2400,  3100,  3200,
+  1600,  1900,  2200,  2500,  3000,  3100,
+  1500,  1800,  2000,  2300,  3000,  3100,
+  1500,  1700,  1900,  2100,  2900,  3000,
+  1400,  1600,  2400,  2700,  2900,  3100,
+  1400,  1600,  2300,  2600,  3000,  3100,
+  1500,  1600,  2300,  2500,  2900,  3100,
+  1600,  1700,  2400,  2600,  3000,  3200,
+  1600,  1800,  2400,  2600,  3100,  3200,
+  1600,  1900,  2400,  2600,  3100,  3200,
+  1700,  2100,  2400,  2600,  3100,  3200,
+  1600,  2000,  2300,  2600,  3100,  3200,
+  1400,  1600,  2200,  2300,  3100,  3300,
+  1400,  1600,  2200,  2300,  3200,  3300,
+  1300,  1800,  2300,  2500,  3300,  3400,
+  1200,  1900,  2400,  2500,  3300,  3400,
+  1200,  1700,  2400,  2500,  3300,  3400,
+  1500,  1700,  2300,  2500,  3100,  3200,
+  1900,  2000,  2300,  2400,  3200,  3300,
+  2200,  2300,  2500,  2700,  3200,  3300,
+  2100,  2300,  2500,  2800,  3300,  3400,
+  1300,  1900,  2300,  2400,  3100,  3300,
+  1800,  2000,  2400,  2700,  3200,  3300,
+  1500,  2000,  2300,  2400,  3000,  3300,
+  1600,  2000,  2400,  2700,  3000,  3200,
+  1800,  2100,  2400,  2600,  3000,  3200,
+  1800,  2100,  2400,  2600,  3000,  3300,
+  1800,  2100,  2400,  2500,  3100,  3300,
+  1700,  2100,  2300,  2600,  3100,  3200,
+  1600,  2000,  2200,  2500,  3200,  3300,
+  1500,  1800,  2200,  2300,  3200,  3400,
+  1400,  1600,  2200,  2300,  3200,  3400,
+  1300,  1500,  2200,  2300,  3200,  3300,
+  1200,  1600,  2300,  2400,  3300,  3400,
+  1200,  1500,  2300,  2400,  3200,  3400,
+  1200,  1400,  2300,  2400,  3100,  3400,
+  1300,  1500,  2400,  2500,  3200,  3400,
+  1700,  2300,  2600,  2700,  3300,  3400,
+  1800,  2400,  2700,  3000,  3300,  3400,
+  1800,  2300,  2700,  2800,  3200,  3300,
+  1800,  2200,  2500,  2600,  3300,  3400,
+  1700,  1900,  2400,  2600,  3200,  3400,
+  1700,  1800,  2200,  2500,  3200,  3400,
+  1500,  1700,  2300,  2500,  3100,  3300,
+  1400,  1700,  2200,  2400,  3000,  3200,
+  1300,  1600,  2200,  2300,  3000,  3100,
+  1300,  1900,  2200,  2400,  2900,  3100,
+  1400,  1900,  2300,  2400,  3000,  3100,
+  1400,  1900,  2300,  2500,  2900,  3100,
+  1400,  1800,  2400,  2600,  2800,  3100,
+  1600,  2000,  2500,  2700,  3100,  3300,
+  1500,  2000,  2500,  2700,  3200,  3300,
+  1500,  2100,  2600,  2900,  3300,  3400,
+  1800,  2300,  2600,  2800,  3300,  3400,
+  1700,  2200,  2600,  2700,  3300,  3400,
+  2000,  2200,  2500,  2700,  3000,  3100,
+  2000,  2300,  2600,  2800,  3100,  3200,
+  2100,  2400,  2500,  2900,  3200,  3300,
+  2100,  2300,  2500,  2800,  3100,  3200,
+  1900,  2200,  2300,  2700,  3100,  3200,
+  1200,  1900,  2000,  2300,  3100,  3200,
+  1300,  1600,  1700,  2100,  3200,  3300,
+  1400,  1600,  1700,  2100,  3200,  3300,
+  1400,  1600,  1700,  2200,  3200,  3300,
+  1600,  1700,  2200,  2600,  2900,  3100,
+  1900,  2300,  2700,  2900,  3200,  3300,
+  1700,  2100,  2700,  2900,  3200,  3400,
+  1800,  2100,  2700,  2800,  3100,  3400,
+  1800,  2100,  2600,  2800,  3000,  3200,
+  1800,  2100,  2700,  2800,  3200,  3400,
+  1400,  1600,  2600,  2700,  3000,  3300,
+  1400,  1500,  2600,  2700,  3000,  3400,
+  1300,  1400,  2400,  2800,  3000,  3300,
+  1800,  2200,  2600,  2900,  3200,  3400,
+  1600,  2100,  2600,  2900,  3200,  3400,
+  1200,  1700,  2500,  2600,  3000,  3100,
+  1200,  1800,  2300,  2600,  3000,  3100,
+  1200,  1800,  2300,  2500,  3000,  3100,
+  1300,  1700,  2400,  2500,  3000,  3100,
+  1500,  1800,  2400,  2500,  2900,  3000,
+  1600,  2300,  2500,  2700,  3000,  3100,
+  1900,  2200,  2700,  2900,  3100,  3200,
+  1900,  2200,  2800,  2900,  3100,  3200,
+  1900,  2300,  2800,  2900,  3200,  3300,
+  2200,  2500,  2800,  3000,  3300,  3400,
+  2100,  2500,  2800,  3000,  3300,  3400,
+  2000,  2400,  2700,  2800,  3300,  3500,
+  1900,  2200,  2600,  2800,  3300,  3400,
+  1900,  2100,  2700,  2800,  3300,  3400,
+  1700,  1900,  2600,  2700,  3000,  3300,
+  1600,  1700,  2500,  2600,  3100,  3300,
+  1800,  1900,  2600,  2800,  3100,  3300,
+  1800,  1900,  2500,  2800,  3000,  3300,
+  1900,  2000,  2600,  2800,  3100,  3400,
+  2000,  2100,  2500,  2700,  3000,  3300,
+  2100,  2200,  2500,  2700,  3000,  3300,
+  2100,  2200,  2500,  2800,  3000,  3300,
+  2000,  2100,  2400,  2700,  2900,  3200,
+  1900,  2000,  2400,  2600,  2800,  3100,
+  1700,  2000,  2500,  2700,  3100,  3300,
+  1700,  2100,  2700,  2800,  3100,  3300,
+  1500,  1700,  2400,  2600,  3100,  3400,
+  1500,  1600,  2400,  2500,  3000,  3300,
+  1400,  1600,  2300,  2600,  3100,  3300,
+  1400,  1500,  2300,  2600,  3100,  3300,
+  1500,  1600,  2400,  2600,  2900,  3200,
+  1600,  1700,  2300,  2600,  3000,  3200,
+  1600,  1700,  2300,  2700,  3000,  3200,
+  1700,  1800,  2400,  2600,  3000,  3200,
+  1600,  1700,  2300,  2500,  3100,  3200,
+  1500,  1600,  2200,  2400,  3100,  3200,
+  1300,  1800,  2200,  2400,  3100,  3200,
+  1300,  1800,  2300,  2400,  3000,  3200,
+  1200,  1700,  2300,  2400,  2900,  3100,
+  1200,  1800,  2400,  2500,  2900,  3200,
+  1200,  1800,  2300,  2500,  3100,  3200,
+  1300,  1800,  2400,  2600,  3200,  3300,
+  1300,  1700,  2400,  2500,  3200,  3300,
+  1200,  1700,  2400,  2500,  3200,  3300,
+  1200,  1500,  2400,  2500,  3200,  3300,
+  1900,  2100,  2500,  2800,  3100,  3300,
+  1800,  2000,  2400,  2700,  3000,  3300,
+  1800,  2000,  2300,  2600,  3000,  3300,
+  1900,  2000,  2300,  2400,  3200,  3500,
+  1900,  2000,  2300,  2400,  3100,  3400,
+  1800,  2000,  2300,  2500,  3200,  3400,
+  1700,  2000,  2500,  2600,  3300,  3400,
+  1800,  2100,  2500,  2800,  3100,  3400,
+  1800,  2000,  2500,  2800,  3100,  3300,
+  1800,  2100,  2500,  2600,  3100,  3300,
+  1700,  2100,  2500,  2700,  3100,  3400,
+  1600,  1700,  2500,  2600,  3200,  3300,
+  1500,  2200,  2400,  2700,  3200,  3300,
+  1400,  2000,  2300,  2700,  3300,  3400,
+  1400,  2000,  2300,  2500,  3300,  3400,
+  1600,  2000,  2400,  2600,  3100,  3300,
+  1600,  2000,  2300,  2600,  3300,  3400,
+  1600,  2100,  2300,  2600,  3300,  3400,
+  1700,  1900,  2300,  2600,  3300,  3400,
+  1900,  2000,  2300,  2400,  3300,  3400,
+  1900,  2000,  2200,  2400,  3300,  3400,
+  1700,  1800,  2200,  2500,  3000,  3200,
+  1700,  1800,  2100,  2500,  3000,  3200,
+  1500,  1700,  2100,  2500,  3000,  3200,
+  1500,  1600,  2100,  2500,  3000,  3200,
+  1500,  1700,  2200,  2700,  3100,  3200,
+  1600,  1900,  2300,  2700,  3200,  3300,
+  1500,  1700,  1800,  2600,  3200,  3300,
+  1600,  1900,  2100,  2500,  3100,  3300,
+  2000,  2300,  2700,  2800,  3100,  3300,
+  2200,  2500,  2900,  3000,  3200,  3300,
+  2300,  2500,  2900,  3000,  3200,  3300,
+  1400,  1900,  2300,  2500,  3200,  3300,
+  1600,  2000,  2300,  2700,  3200,  3300,
+  1500,  1900,  2000,  2400,  3200,  3300,
+  1300,  1800,  2000,  2400,  3300,  3400,
+  1400,  1900,  2200,  2500,  3200,  3300,
+  1800,  2200,  2600,  3000,  3300,  3400,
+  1900,  2200,  2800,  2900,  3300,  3400,
+  2000,  2500,  2900,  3100,  3200,  3300,
+  2000,  2400,  2900,  3000,  3300,  3400,
+  2100,  2400,  2800,  3000,  3200,  3300,
+  2000,  2400,  2700,  2900,  3200,  3300,
+  1700,  2100,  2600,  2800,  3200,  3300,
+  1500,  1900,  2300,  2700,  3100,  3300,
+  1500,  1800,  2200,  2600,  3200,  3300,
+  1500,  1700,  2200,  2500,  3200,  3400,
+  1100,  2200,  2500,  2800,  3200,  3300,
+  1000,  2100,  2500,  2700,  3200,  3300,
+  1000,  2000,  2500,  2700,  3200,  3300,
+  1000,  2000,  2400,  2600,  3200,  3300,
+  1100,  1900,  2400,  2600,  3100,  3200,
+  1600,  1900,  2400,  2700,  3100,  3400,
+  1700,  2100,  2500,  2700,  3000,  3200,
+  2000,  2200,  2600,  2800,  3100,  3300,
+  2100,  2200,  2600,  2800,  3100,  3300,
+  1900,  2100,  2400,  2700,  3100,  3300,
+  1900,  2000,  2300,  2600,  3100,  3200,
+  1800,  1900,  2200,  2600,  3100,  3200,
+  1500,  1700,  2000,  2600,  3100,  3200,
+  1400,  1500,  1800,  2800,  3200,  3300,
+  1300,  1500,  1700,  2600,  3200,  3300,
+  1600,  1900,  2400,  2700,  3100,  3200,
+  1600,  1900,  2400,  2700,  3100,  3300,
+  1700,  1900,  2300,  2700,  3000,  3200,
+  1700,  1900,  2200,  2600,  3000,  3200,
+  1200,  1600,  1800,  2000,  3100,  3400,
+  1100,  1600,  2400,  2500,  3000,  3300,
+  1400,  1700,  2300,  2400,  2900,  3200,
+  1700,  2000,  2300,  2700,  3200,  3300,
+  1600,  1700,  2300,  2400,  3000,  3400,
+  1700,  1800,  2300,  2400,  2900,  3400,
+  1700,  1800,  2300,  2400,  2800,  3300,
+  1800,  1900,  2300,  2400,  2800,  3200,
+  1800,  1900,  2300,  2400,  3000,  3300,
+  1800,  1900,  2300,  2400,  2900,  3300,
+  1700,  1800,  2200,  2300,  2600,  3200,
+  1700,  1800,  2200,  2300,  2700,  3200,
+  1700,  1800,  2300,  2400,  3000,  3300,
+  1700,  1800,  2300,  2400,  3100,  3400,
+  1700,  1800,  2200,  2400,  3200,  3400,
+  1700,  1900,  2200,  2400,  3300,  3400,
+  1800,  1900,  2200,  2400,  3200,  3400,
+  1800,  1900,  2300,  2400,  3200,  3400,
+  1800,  1900,  2300,  2400,  3100,  3400,
+  1800,  2000,  2200,  2400,  3200,  3300,
+  1800,  1900,  2200,  2400,  3200,  3300,
+  1700,  1800,  2000,  2200,  3200,  3300,
+  1400,  1700,  1800,  2200,  3200,  3300,
+  1400,  1800,  2100,  2500,  3100,  3300,
+  1500,  1800,  2200,  2700,  3100,  3200,
+  1600,  2000,  2300,  2500,  2900,  3200,
+  1800,  2200,  2500,  2700,  3000,  3300,
+  2000,  2400,  2700,  2800,  3100,  3300,
+  2200,  2500,  2800,  2900,  3200,  3300,
+  1500,  2300,  2500,  2900,  3300,  3400,
+  1500,  1700,  2300,  2600,  3000,  3200,
+  1700,  1900,  2300,  2600,  3000,  3300,
+  1600,  1700,  2200,  2300,  3200,  3400,
+  1600,  1700,  2200,  2300,  3300,  3400,
+  1200,  2000,  2400,  2600,  3200,  3300,
+  1000,  1800,  2400,  2500,  3200,  3300,
+  1000,  2000,  2300,  2500,  3200,  3300,
+  1300,  1700,  2200,  2600,  3100,  3200,
+  1600,  1900,  2500,  2700,  3000,  3200,
+  1300,  1900,  2400,  2700,  3000,  3200,
+  1600,  1800,  2200,  2700,  3100,  3200,
+  1700,  2100,  2300,  2500,  3100,  3300,
+  1600,  1900,  2400,  2500,  3200,  3400,
+  1600,  2000,  2300,  2500,  3100,  3300,
+  1600,  1900,  2300,  2400,  3000,  3200,
+  1500,  1900,  2200,  2300,  3000,  3200,
+  1500,  2000,  2200,  2400,  3100,  3200,
+  1400,  2000,  2200,  2400,  3100,  3200,
+  1300,  2000,  2200,  2500,  3100,  3200,
+  1100,  2100,  2300,  2600,  3100,  3200,
+  1000,  2000,  2400,  2500,  3100,  3200,
+  1000,  1700,  2400,  2500,  3100,  3200,
+  1000,  1600,  2400,  2500,  3100,  3200,
+  1100,  1600,  2400,  2500,  3100,  3200,
+  1100,  1600,  2400,  2600,  3100,  3200,
+  1100,  1600,  2500,  2600,  3200,  3300,
+  1100,  1500,  2500,  2600,  3200,  3300,
+  1100,  1500,  2500,  2600,  3100,  3200,
+  1200,  1400,  2400,  2600,  3100,  3200,
+  1300,  1700,  2300,  2400,  3200,  3300,
+  1300,  1800,  2300,  2400,  3200,  3300,
+  1300,  1900,  2300,  2400,  3200,  3300,
+  1400,  1900,  2300,  2400,  3100,  3300,
+  1500,  1700,  2300,  2400,  3000,  3200,
+  1500,  1700,  2300,  2400,  3000,  3300,
+  2100,  2300,  2800,  3000,  3300,  3400,
+  2200,  2400,  2900,  3000,  3200,  3300,
+  2100,  2300,  2900,  3000,  3300,  3400,
+  2000,  2300,  2600,  3000,  3200,  3300,
+  1300,  1600,  2200,  2600,  3100,  3300,
+  1000,  2000,  2300,  2500,  3300,  3400,
+  1000,  2100,  2400,  2600,  3300,  3400,
+  1300,  1700,  1900,  2100,  3100,  3200,
+  1500,  1800,  2000,  2400,  3200,  3300,
+  1600,  1800,  2000,  2500,  3200,  3300,
+  1600,  1800,  2100,  2600,  3200,  3300,
+  1700,  1900,  2100,  2700,  3200,  3300,
+  1600,  1800,  2100,  2500,  3300,  3400,
+  1700,  1900,  2100,  2500,  2900,  3200,
+  1600,  1900,  2100,  2300,  2800,  3200,
+  1200,  1700,  2200,  2600,  3000,  3300,
+  1200,  1700,  2300,  2600,  3100,  3300,
+  1600,  2100,  2400,  2700,  3100,  3300,
+  1500,  2000,  2400,  2600,  3100,  3400,
+  2100,  2200,  2700,  3000,  3200,  3300,
+  2100,  2200,  2700,  2900,  3100,  3300,
+  1500,  1800,  2200,  2600,  2900,  3200,
+  1400,  1600,  1800,  2900,  3200,  3300,
+  1600,  1700,  1900,  2500,  3100,  3200,
+  1700,  1800,  2000,  2600,  3100,  3200,
+  1700,  1800,  2100,  2600,  3200,  3300,
+  1700,  1900,  2200,  2600,  3200,  3300,
+  1700,  1900,  2200,  2600,  3100,  3200,
+  1700,  1900,  2200,  2500,  3100,  3200,
+  1700,  1800,  2200,  2600,  3200,  3300,
+  1700,  1800,  2200,  2500,  3200,  3300,
+  1600,  1800,  2100,  2300,  3100,  3200,
+  2300,  2500,  2800,  2900,  3200,  3300,
+  1700,  1900,  2400,  2700,  3200,  3300,
+  1700,  2000,  2400,  2800,  3200,  3300,
+  1500,  1900,  2300,  2700,  3200,  3300,
+  1500,  2000,  2300,  2500,  3200,  3300,
+  1600,  1900,  2200,  2500,  3200,  3300,
+  1600,  1900,  2200,  2400,  3100,  3300,
+  1600,  1800,  2200,  2300,  3000,  3300,
+  1700,  1800,  2200,  2300,  3000,  3300,
+  1700,  1900,  2200,  2400,  3100,  3300,
+  1700,  1900,  2200,  2400,  3100,  3400,
+  1700,  1800,  2200,  2400,  3100,  3400,
+  1500,  1800,  2300,  2400,  2900,  3300,
+  1500,  1700,  2200,  2400,  3100,  3400,
+  1400,  1700,  2200,  2300,  3100,  3400,
+  1600,  1900,  2500,  2700,  3200,  3400,
+  1500,  1800,  2400,  2600,  3000,  3300,
+  1400,  2100,  2500,  2600,  3100,  3300,
+  1200,  1800,  2100,  2300,  3200,  3300,
+  1800,  2100,  2600,  2900,  3100,  3200,
+  2000,  2400,  2900,  3100,  3300,  3400,
+  1500,  1800,  2200,  2400,  3300,  3400,
+  1500,  2000,  2100,  2700,  3300,  3400,
+  1600,  1800,  2000,  2400,  2900,  3100,
+  1600,  1800,  2200,  2600,  3000,  3200,
+  1500,  1800,  2100,  2600,  3000,  3200,
+  1600,  1900,  2100,  2400,  3000,  3300,
+  1600,  2000,  2200,  2500,  3300,  3400,
+  1600,  2000,  2100,  2400,  3300,  3400,
+  1400,  1700,  2200,  2600,  3000,  3200,
+  1300,  1600,  2200,  2500,  3000,  3200,
+  1300,  1500,  2100,  2500,  3000,  3300,
+  1200,  1600,  1700,  2400,  3300,  3400,
+  1300,  1600,  1700,  2500,  3300,  3400,
+  1300,  1600,  1700,  2500,  3200,  3300,
+  1400,  1700,  1800,  2500,  3200,  3300,
+  1500,  1800,  2000,  2500,  3200,  3300,
+  1500,  1900,  2000,  2500,  3200,  3300,
+  1600,  1800,  2100,  2400,  3200,  3300,
+  1600,  1900,  2100,  2400,  3200,  3300,
+  1500,  1700,  2100,  2200,  3000,  3300,
+  1400,  1600,  2100,  2200,  3000,  3200,
+  1400,  1800,  2100,  2300,  3000,  3200,
+  1600,  2100,  2300,  2700,  3100,  3300,
+  1200,  2100,  2400,  2700,  3300,  3400,
+  1600,  2100,  2200,  2600,  3300,  3400,
+  1300,  2000,  2200,  2500,  3300,  3400,
+  1300,  2300,  2500,  2800,  3300,  3400,
+  1300,  2000,  2300,  2500,  3200,  3300,
+  1700,  2000,  2400,  2800,  3100,  3300,
+  1900,  2200,  2500,  2900,  3100,  3300,
+  2000,  2100,  2600,  2800,  3200,  3300,
+  2000,  2100,  2700,  2900,  3200,  3300,
+  1000,  1900,  2400,  2600,  3300,  3400,
+  1000,  1900,  2500,  2600,  3200,  3300,
+  1000,  1900,  2500,  2600,  3300,  3400,
+  1000,  1800,  2400,  2600,  3200,  3300,
+  1000,  1800,  2400,  2600,  3300,  3400,
+  1000,  1900,  2400,  2600,  3200,  3300,
+  1400,  1700,  2200,  2600,  3100,  3300,
+  1400,  1600,  2100,  2500,  3000,  3300,
+  1300,  1800,  2100,  2400,  3200,  3300,
+  1100,  1900,  2200,  2400,  3200,  3300,
+  1100,  1900,  2300,  2500,  3300,  3400,
+  1100,  1900,  2400,  2500,  3200,  3300,
+  1100,  1900,  2400,  2600,  3200,  3300,
+  1100,  1900,  2300,  2400,  3300,  3400,
+  1200,  2000,  2300,  2500,  3200,  3300,
+  1300,  1900,  2200,  2400,  3300,  3400,
+  1500,  1800,  2200,  2300,  3300,  3400,
+  1700,  2200,  2700,  3000,  3300,  3400,
+  1900,  2200,  2800,  3000,  3200,  3300,
+  1900,  2200,  2500,  3000,  3200,  3300,
+  1600,  2100,  2300,  2700,  3300,  3400,
+  1600,  2000,  2300,  2700,  3300,  3400,
+  1600,  2100,  2500,  3000,  3300,  3400,
+  1600,  2200,  2600,  3000,  3300,  3400,
+  1900,  2400,  2900,  3100,  3300,  3400,
+  2100,  2500,  2900,  3000,  3300,  3400,
+  2000,  2400,  2900,  3000,  3200,  3300,
+  1700,  2200,  2400,  2900,  3200,  3300,
+  1300,  1800,  2100,  2500,  3200,  3300,
+  1500,  1600,  1800,  2300,  3000,  3200,
+  1500,  1600,  1900,  2000,  3000,  3300,
+  1400,  1800,  2200,  2600,  3200,  3300,
+  1600,  1800,  2200,  2400,  2900,  3100,
+  1500,  1700,  2100,  2400,  2900,  3100,
+  1400,  1700,  2100,  2400,  3000,  3200,
+  1400,  1700,  2300,  2600,  3200,  3300,
+  1300,  1900,  2300,  2600,  3200,  3300,
+  1000,  2100,  2500,  2700,  3300,  3400,
+  1400,  1900,  2000,  2500,  3200,  3300,
+  1600,  1900,  2100,  2500,  3300,  3400,
+  1600,  2000,  2300,  2500,  3200,  3300,
+  2200,  2400,  2800,  3000,  3200,  3300,
+  1900,  2300,  2400,  2700,  3100,  3200,
+  1900,  2200,  2300,  2600,  3100,  3200,
+  1900,  2100,  2300,  2800,  3200,  3300,
+  1700,  2000,  2400,  2700,  3200,  3300,
+  1900,  2200,  2500,  2700,  3100,  3300,
+  1700,  1800,  2200,  2500,  3300,  3400,
+  1700,  1900,  2200,  2700,  3200,  3300,
+  1700,  1900,  2300,  2700,  3300,  3400,
+  1800,  2000,  2400,  2800,  3300,  3400,
+  1800,  2000,  2300,  2600,  3300,  3400,
+  1900,  2000,  2300,  2500,  3200,  3300,
+  1900,  2100,  2400,  2600,  3200,  3300,
+  2000,  2200,  2400,  2700,  3200,  3300,
+  2100,  2200,  2500,  2900,  3200,  3300,
+  2200,  2300,  2600,  2900,  3200,  3300,
+  2200,  2300,  2700,  2900,  3100,  3300,
+  2100,  2400,  2600,  2800,  3200,  3300,
+  1900,  2200,  2600,  2800,  3000,  3200,
+  1800,  2100,  2400,  2700,  3000,  3200,
+  1800,  2000,  2400,  2700,  3100,  3200,
+  1600,  2000,  2200,  2500,  3100,  3200,
+  1300,  1900,  2100,  2300,  3100,  3300,
+  1200,  1600,  2100,  2200,  3200,  3400,
+  1100,  2000,  2400,  2600,  3200,  3300,
+  1400,  1700,  2100,  2300,  3100,  3300,
+  1400,  1900,  2200,  2500,  3300,  3400,
+  1300,  1800,  2200,  2700,  3200,  3300,
+  1300,  1900,  2200,  2600,  3200,  3300,
+  1400,  2000,  2200,  2700,  3200,  3300,
+  1400,  2000,  2200,  2600,  3300,  3400,
+  1400,  2000,  2200,  2500,  3200,  3300,
+  1400,  1900,  2200,  2400,  3200,  3300,
+  1400,  1800,  2200,  2300,  3000,  3300,
+  1400,  1800,  2200,  2300,  3100,  3300,
+  1400,  1800,  2100,  2300,  3200,  3400,
+  1500,  2000,  2400,  2700,  3300,  3400,
+  1700,  2100,  2500,  3000,  3300,  3400,
+  1400,  1900,  2300,  2800,  3200,  3300,
+  1400,  2000,  2200,  2400,  3200,  3300,
+  1200,  1900,  2200,  2400,  3200,  3300,
+  1200,  1900,  2200,  2500,  3200,  3300,
+  1200,  2000,  2200,  2500,  3300,  3400,
+  1700,  2100,  2300,  2400,  3200,  3400,
+  1400,  1600,  1800,  2500,  3100,  3200,
+  1500,  1800,  2100,  2500,  3000,  3200,
+  1700,  1800,  2200,  2500,  3100,  3300,
+  2000,  2100,  2500,  2800,  3100,  3300,
+  1900,  2100,  2200,  2700,  3100,  3200,
+  1500,  1800,  2100,  2300,  3200,  3400,
+  1600,  1800,  2000,  2300,  3200,  3400,
+  1600,  1800,  2100,  2300,  3200,  3400,
+  1500,  1800,  2000,  2300,  3300,  3400,
+  1500,  1700,  1900,  2400,  3300,  3400,
+  1600,  1900,  2000,  2700,  3100,  3200,
+  1700,  1900,  2200,  2600,  3100,  3300,
+  1700,  1900,  2200,  2500,  3200,  3300,
+  1700,  2000,  2400,  2600,  3100,  3300,
+  1700,  2000,  2400,  2700,  3100,  3200,
+  2300,  2400,  2700,  3000,  3200,  3300,
+  2200,  2400,  2600,  2900,  3200,  3300,
+  2200,  2400,  2500,  2800,  3200,  3300,
+  2100,  2400,  2500,  2800,  3200,  3300,
+  2000,  2400,  2500,  2700,  3200,  3300,
+  1900,  2300,  2400,  2800,  3200,  3300,
+  1900,  2300,  2600,  2700,  3100,  3300,
+  2000,  2400,  2800,  2900,  3200,  3300,
+  1700,  2200,  2500,  2800,  3200,  3400,
+  1500,  2100,  2400,  2600,  3100,  3300,
+  1500,  1900,  2300,  2500,  3200,  3400,
+  1400,  1900,  2300,  2400,  3200,  3300,
+  1100,  1700,  2400,  2600,  3200,  3300,
+  1100,  1700,  2400,  2600,  3300,  3400,
+  1100,  1800,  2400,  2500,  3300,  3400,
+  1100,  1800,  2400,  2500,  3200,  3300,
+  1100,  2000,  2500,  2600,  3200,  3300,
+  1100,  2100,  2500,  2600,  3200,  3300,
+  1100,  2100,  2500,  2700,  3200,  3300,
+  1000,  2200,  2600,  2700,  3200,  3300,
+  1100,  2300,  2600,  2800,  3200,  3300,
+  1100,  2100,  2500,  2700,  3100,  3200,
+  1500,  1700,  2300,  2500,  2900,  3200,
+  1600,  1700,  2200,  2600,  2800,  3100,
+  1600,  1700,  2100,  2600,  2800,  3000,
+  1500,  1700,  2100,  2500,  2800,  3000,
+  1500,  1600,  2200,  2500,  2800,  3100,
+  1500,  1600,  2300,  2600,  2800,  3100,
+  1400,  1500,  2300,  2700,  2900,  3100,
+  1400,  1500,  2200,  2700,  2800,  3100,
+  1400,  1600,  2000,  2700,  2900,  3100,
+  1500,  1700,  2200,  2700,  3100,  3300,
+  1500,  1800,  2300,  2700,  3100,  3300,
+  1600,  1700,  2300,  2700,  3000,  3300,
+  1700,  1800,  2200,  2700,  2900,  3200,
+  1800,  1900,  2200,  2700,  2900,  3100,
+  1700,  1900,  2200,  2600,  2900,  3000,
+  1800,  2000,  2300,  2700,  2900,  3100,
+  1800,  2000,  2300,  2800,  3000,  3200,
+  1800,  2000,  2400,  2800,  3000,  3200,
+  1800,  1900,  2300,  2800,  3000,  3200,
+  1500,  1700,  2200,  2500,  3000,  3100,
+  1700,  2100,  2400,  2800,  3100,  3200,
+  1800,  2200,  2700,  2900,  3400,  3500,
+  1900,  2400,  2700,  2900,  3400,  3500,
+  2000,  2400,  2600,  2900,  3300,  3400,
+  1900,  2400,  2500,  2800,  3200,  3300,
+  1900,  2300,  2500,  2600,  3200,  3300,
+  1700,  1900,  2400,  2500,  3100,  3200,
+  1600,  1700,  2300,  2600,  2900,  3100,
+  1600,  1700,  2400,  2600,  2900,  3100,
+  1600,  2100,  2600,  2800,  3300,  3400,
+  1700,  2200,  2700,  3000,  3200,  3300,
+  1700,  2300,  2800,  2900,  3200,  3300,
+  1700,  2300,  2700,  3000,  3200,  3300,
+  1600,  2100,  2700,  2900,  3300,  3400,
+  1200,  1600,  2400,  2600,  3000,  3300,
+  1100,  1400,  2400,  2700,  2900,  3100,
+  1200,  1800,  2200,  2500,  3100,  3300,
+  1200,  1700,  2200,  2500,  3100,  3300,
+  1800,  1900,  2300,  2500,  2900,  3200,
+  1900,  2000,  2400,  2500,  2800,  3100,
+  2000,  2200,  2400,  2500,  2800,  3100,
+  2000,  2200,  2400,  2600,  2800,  3200,
+  2000,  2100,  2500,  2700,  3100,  3400,
+  1900,  2000,  2600,  2700,  3100,  3300,
+  1900,  2000,  2600,  2700,  3200,  3300,
+  1900,  2400,  2700,  3000,  3300,  3400,
+  2000,  2400,  2800,  2900,  3200,  3400,
+  1900,  2000,  2300,  2600,  3000,  3200,
+  1900,  2100,  2400,  2700,  3000,  3200,
+  1900,  2100,  2400,  2800,  3100,  3200,
+  1900,  2100,  2400,  2800,  3300,  3400,
+  1500,  1800,  2100,  2600,  3100,  3300,
+  1600,  1800,  2100,  2200,  3000,  3300,
+  1800,  2100,  2300,  2500,  3000,  3200,
+  2000,  2100,  2300,  2500,  3000,  3300,
+  2000,  2100,  2300,  2500,  2900,  3300,
+  2000,  2100,  2300,  2400,  2900,  3300,
+  1600,  1800,  2300,  2500,  2900,  3200,
+  1700,  1900,  2400,  2700,  3000,  3200,
+  1700,  2000,  2400,  2600,  3000,  3300,
+  1600,  2000,  2300,  2700,  3000,  3200,
+  1500,  1800,  2300,  2600,  3100,  3200,
+  1700,  1800,  2300,  2400,  2800,  3000,
+  1800,  2000,  2400,  2500,  2900,  3200,
+  1800,  2000,  2400,  2600,  3000,  3200,
+  1900,  2000,  2400,  2500,  3000,  3200,
+  1900,  2000,  2300,  2500,  3000,  3200,
+  1800,  1900,  2200,  2400,  2900,  3200,
+  1800,  1900,  2200,  2300,  2900,  3200,
+  1600,  1800,  2200,  2400,  3100,  3300,
+  1600,  2000,  2400,  2700,  3100,  3200,
+  1800,  2100,  2500,  2700,  3000,  3200,
+  2000,  2200,  2500,  2700,  3000,  3200,
+  2000,  2300,  2500,  2700,  3000,  3200,
+  2000,  2300,  2400,  2700,  3000,  3200,
+  2100,  2200,  2400,  2500,  3000,  3300,
+  1900,  2000,  2300,  2600,  2800,  3300,
+  1900,  2000,  2400,  2700,  3100,  3300,
+  1500,  2000,  2400,  2700,  3100,  3300,
+  1600,  1900,  2500,  2800,  3000,  3300,
+  1900,  2000,  2400,  2700,  2900,  3200,
+  2000,  2200,  2400,  2700,  2900,  3200,
+  2100,  2200,  2400,  2700,  2900,  3200,
+  2100,  2300,  2400,  2600,  2800,  3200,
+  1300,  2000,  2300,  2500,  2700,  3100,
+  1800,  1900,  2100,  2400,  2900,  3100,
+  1700,  1900,  2100,  2500,  2900,  3100,
+  1800,  1900,  2300,  2600,  3100,  3300,
+  1600,  1700,  2300,  2600,  2800,  3200,
+  1700,  1800,  2300,  2600,  2800,  3100,
+  1700,  1800,  2300,  2700,  2800,  3200,
+  1500,  1700,  2300,  2600,  3000,  3300,
+  1400,  1700,  2200,  2500,  3000,  3300,
+  1400,  1600,  2200,  2300,  3000,  3300,
+  1400,  1600,  2200,  2400,  2800,  3300,
+  1500,  1600,  2200,  2400,  2900,  3300,
+  1500,  1600,  2200,  2400,  2800,  3300,
+  1500,  1700,  2200,  2500,  3000,  3200,
+  1700,  1900,  2300,  2700,  3000,  3300,
+  1600,  1800,  2400,  2700,  3000,  3200,
+  1600,  2000,  2500,  2800,  3000,  3300,
+  2000,  2200,  2500,  2600,  3200,  3300,
+  1600,  1800,  2200,  2500,  3100,  3200,
+  1500,  1700,  1800,  2300,  3300,  3400,
+  1400,  1600,  1800,  2000,  3200,  3400,
+  1400,  1600,  1800,  1900,  3100,  3400,
+  1400,  1600,  1900,  2000,  2900,  3300,
+  1400,  1500,  1900,  2000,  2900,  3200,
+  1900,  2200,  2500,  2800,  3100,  3200,
+  1800,  2200,  2500,  2700,  3000,  3200,
+  1800,  2200,  2600,  2700,  3100,  3200,
+  2000,  2300,  2700,  2800,  3200,  3300,
+  2100,  2200,  2600,  2800,  3000,  3300,
+  2100,  2200,  2500,  2700,  3100,  3300,
+  1700,  1800,  2000,  2100,  2800,  3200,
+  1600,  1700,  1900,  2000,  2800,  3200,
+  1400,  1500,  1800,  1900,  2800,  3200,
+  1400,  1800,  2100,  2400,  3000,  3200,
+  1600,  1900,  2300,  2600,  3000,  3300,
+  1600,  1900,  2300,  2500,  3100,  3300,
+  1600,  1900,  2400,  2700,  3000,  3200,
+  1600,  1900,  2400,  2700,  3000,  3300,
+  1500,  1900,  2400,  2700,  3000,  3300,
+  1100,  1400,  2500,  2800,  3000,  3300,
+  1100,  1300,  2300,  2800,  3000,  3200,
+  1400,  1500,  2100,  2700,  2900,  3100,
+  1500,  1600,  2100,  2700,  2900,  3100,
+  1700,  1800,  2200,  2600,  2800,  3100,
+  1800,  2000,  2300,  2600,  2800,  3000,
+  1900,  2100,  2300,  2600,  2800,  3100,
+  2000,  2100,  2300,  2600,  2800,  3100,
+  2000,  2100,  2400,  2500,  2800,  3200,
+  1900,  2100,  2300,  2500,  2800,  3200,
+  1800,  1900,  2300,  2500,  2800,  3300,
+  1700,  1800,  2300,  2500,  3000,  3300,
+  1700,  1900,  2400,  2600,  3000,  3200,
+  1500,  1900,  2200,  2600,  3100,  3300,
+  1300,  1500,  1800,  1900,  2900,  3200,
+  1300,  1500,  1800,  1900,  2900,  3300,
+  1300,  1500,  1800,  1900,  2800,  3200,
+  1400,  1500,  1700,  1900,  2800,  3200,
+  1400,  1500,  1700,  1800,  2800,  3200,
+  1700,  2000,  2400,  2500,  3100,  3300,
+  2100,  2400,  2700,  2800,  3300,  3500,
+  1800,  2300,  2700,  2900,  3200,  3400,
+  1700,  2300,  2700,  2900,  3300,  3400,
+  1700,  2100,  2700,  2900,  3300,  3400,
+  1800,  2400,  2700,  2900,  3300,  3400,
+  1900,  2500,  2800,  3000,  3300,  3400,
+  2000,  2500,  2800,  3000,  3300,  3400,
+  2000,  2400,  2700,  3000,  3200,  3400,
+  1900,  2300,  2700,  3000,  3200,  3400,
+  1800,  2000,  2500,  2700,  2900,  3200,
+  1800,  2000,  2400,  2700,  2900,  3100,
+  1900,  2000,  2300,  2700,  2900,  3000,
+  1900,  2000,  2400,  2700,  2900,  3100,
+  1800,  1900,  2400,  2700,  2900,  3100,
+  1800,  1900,  2300,  2700,  2800,  3100,
+  1800,  1900,  2300,  2600,  2800,  3100,
+  1500,  1800,  2400,  2700,  3200,  3400,
+  1600,  1800,  2500,  2700,  3100,  3400,
+  1500,  1700,  2400,  2700,  3000,  3300,
+  1400,  1500,  2400,  2700,  2900,  3200,
+  1300,  1500,  2300,  2700,  2900,  3100,
+  1400,  1600,  2100,  2600,  2800,  3000,
+  1500,  1600,  2100,  2600,  2800,  3000,
+  1400,  1600,  2200,  2400,  3000,  3200,
+  1300,  1600,  2200,  2500,  2900,  3200,
+  1300,  1700,  2200,  2600,  3000,  3300,
+  1300,  1700,  2200,  2700,  3100,  3200,
+  1200,  1400,  2200,  2700,  2900,  3100,
+  1100,  1400,  2300,  2700,  2900,  3100,
+  1100,  1300,  2400,  2800,  3000,  3200,
+  1200,  1600,  2300,  2600,  3100,  3200,
+  1500,  2100,  2400,  2700,  3200,  3300,
+  1800,  2100,  2400,  2800,  3200,  3300,
+  1600,  2100,  2400,  2800,  3200,  3300,
+  1600,  2000,  2500,  2900,  3200,  3300,
+  1800,  2000,  2500,  2900,  3200,  3300,
+  1700,  1900,  2400,  2800,  3100,  3300,
+  1600,  1800,  2400,  2700,  3100,  3300,
+  1500,  1600,  2200,  2500,  2900,  3200,
+  1500,  1600,  2200,  2500,  2800,  3200,
+  1400,  1600,  2100,  2500,  2800,  3100,
+  1200,  1400,  2200,  2500,  2700,  3100,
+  1100,  1400,  2400,  2800,  2900,  3100,
+  1400,  1700,  2300,  2600,  2900,  3200,
+  1500,  1800,  2300,  2500,  2900,  3300,
+  1500,  1700,  2000,  2100,  3000,  3300,
+  1500,  1700,  2000,  2200,  3100,  3300,
+  1500,  1700,  2100,  2300,  3100,  3200,
+  1600,  1900,  2500,  2700,  3100,  3200,
+  1800,  2300,  2800,  3100,  3300,  3400,
+  1800,  2200,  2700,  2900,  3200,  3400,
+  1700,  2200,  2700,  2800,  3200,  3400,
+  1500,  1800,  2600,  2700,  3000,  3200,
+  1500,  1700,  2300,  2700,  2800,  3100,
+  1400,  1500,  2100,  2200,  2700,  3200,
+  1400,  1500,  2000,  2100,  2600,  3100,
+  1300,  1500,  1900,  2000,  2500,  3100,
+  1400,  1500,  1800,  1900,  2700,  3200,
+  1500,  1600,  2000,  2100,  2600,  3100,
+  1700,  1800,  2000,  2200,  2600,  3100,
+  1700,  1800,  2100,  2200,  2700,  3100,
+  1600,  2000,  2400,  2500,  3000,  3200,
+  2000,  2200,  2500,  2900,  3100,  3300,
+  1900,  2200,  2400,  2600,  2900,  3100,
+  1600,  1700,  2200,  2400,  2700,  3300,
+  1700,  1800,  2300,  2400,  2800,  3200,
+  1800,  1900,  2300,  2500,  2800,  3200,
+  1900,  2100,  2400,  2500,  3000,  3300,
+  2100,  2200,  2500,  2600,  3000,  3300,
+  2000,  2100,  2500,  2700,  2900,  3200,
+  1700,  1900,  2200,  2700,  2800,  3100,
+  1800,  1900,  2400,  2700,  2800,  3200,
+  1800,  1900,  2400,  2700,  2900,  3200,
+  1700,  1800,  2200,  2700,  2800,  3100,
+  1700,  1800,  2200,  2700,  3000,  3200,
+  1900,  2100,  2500,  2900,  3100,  3300,
+  1700,  2000,  2500,  2700,  3200,  3400,
+  1900,  2200,  2700,  3000,  3300,  3400,
+  2000,  2400,  2800,  3100,  3400,  3500,
+  2100,  2400,  2600,  2900,  3200,  3300,
+  2100,  2400,  2500,  2700,  3100,  3300,
+  1800,  2100,  2500,  2700,  3200,  3300,
+  1700,  2100,  2400,  2700,  3200,  3300,
+  1500,  1600,  1800,  1900,  2600,  3100,
+  1500,  1600,  1900,  2000,  2500,  3100,
+  1600,  1700,  2000,  2100,  2500,  3100,
+  1800,  2100,  2300,  2500,  2800,  3200,
+  1900,  2100,  2300,  2500,  2700,  3200,
+  2000,  2200,  2400,  2600,  2900,  3300,
+  2000,  2200,  2400,  2600,  2900,  3200,
+  2000,  2100,  2400,  2500,  2900,  3300,
+  1800,  2200,  2500,  2900,  3400,  3500,
+  1800,  2300,  2500,  2900,  3300,  3400,
+  2000,  2300,  2500,  2800,  3000,  3300,
+  1800,  2000,  2400,  2500,  2800,  3300,
+  1100,  1400,  2600,  2800,  3000,  3200,
+  1300,  1500,  2200,  2700,  2900,  3200,
+  1400,  1600,  2200,  2700,  3000,  3200,
+  1400,  1600,  2200,  2600,  3100,  3200,
+  1500,  1800,  2200,  2400,  3100,  3300,
+  1700,  1800,  2200,  2500,  3000,  3300,
+  1700,  1800,  2200,  2600,  3000,  3200,
+  1700,  1800,  2300,  2600,  3000,  3200,
+  1700,  1800,  2400,  2700,  3000,  3100,
+  1600,  1700,  2500,  2800,  3000,  3200,
+  1400,  1500,  2200,  2700,  2900,  3100,
+  1300,  1400,  2100,  2700,  2900,  3200,
+  1500,  1900,  2300,  2600,  3000,  3200,
+  1400,  1600,  2200,  2500,  2700,  3100,
+  1600,  1700,  2200,  2500,  2800,  3200,
+  1600,  1800,  2100,  2500,  2900,  3200,
+  1600,  1800,  2100,  2600,  3000,  3200,
+  1800,  2100,  2400,  2800,  3100,  3300,
+  1800,  2100,  2400,  2700,  3000,  3300,
+  2000,  2100,  2500,  2800,  3000,  3200,
+  1800,  2000,  2500,  2700,  3000,  3200,
+  1600,  1900,  2300,  2700,  2900,  3200,
+  1600,  1900,  2100,  2500,  2800,  3100,
+  1700,  1900,  2100,  2500,  2800,  3000,
+  1700,  1800,  2100,  2600,  2800,  3000,
+  1600,  1700,  2000,  2600,  2800,  3000,
+  1400,  1700,  2200,  2700,  3000,  3200,
+  1500,  1800,  2300,  2700,  3000,  3200,
+  1600,  1800,  2300,  2600,  3000,  3300,
+  1600,  1800,  2300,  2600,  3100,  3300,
+  1600,  1900,  2300,  2600,  3100,  3300,
+  1200,  1300,  2100,  2700,  3000,  3100,
+  1300,  1400,  2100,  2700,  2900,  3100,
+  1300,  1400,  2200,  2700,  2900,  3100,
+  1300,  1400,  2100,  2600,  2800,  3100,
+  1300,  1500,  2100,  2600,  2800,  3100,
+  1500,  1600,  1900,  2500,  2900,  3100,
+  1500,  1700,  2100,  2700,  2900,  3200,
+  1600,  1900,  2400,  2700,  3200,  3300,
+  1900,  2100,  2500,  2800,  3200,  3400,
+  1700,  2000,  2400,  2800,  3200,  3400,
+  1600,  1700,  2200,  2400,  2800,  3300,
+  1500,  1600,  2200,  2400,  3000,  3300,
+  1500,  1700,  2300,  2700,  3100,  3300,
+  1400,  1500,  2000,  2600,  2900,  3100,
+  1400,  1500,  2100,  2500,  2800,  3100,
+  1400,  1700,  2200,  2600,  3000,  3300,
+  1000,  1500,  2600,  2800,  3100,  3400,
+  1300,  1500,  2500,  2700,  2900,  3300,
+  1500,  1600,  2200,  2600,  2800,  3100,
+  1700,  1800,  2200,  2400,  2700,  3200,
+  1700,  1800,  2100,  2400,  2600,  3100,
+  1600,  1700,  2100,  2400,  2700,  3200,
+  1600,  1900,  2300,  2700,  3000,  3300,
+  1500,  1600,  2000,  2400,  3000,  3300,
+  1600,  1800,  2300,  2600,  3200,  3300,
+  1700,  1800,  2400,  2600,  3200,  3400,
+  1600,  1800,  2400,  2600,  3200,  3400,
+  1700,  1800,  2300,  2600,  3000,  3300,
+  1700,  1800,  2100,  2500,  2900,  3200,
+  1800,  1900,  2100,  2600,  2800,  3000,
+  1800,  1900,  2200,  2600,  2800,  3000,
+  1800,  1900,  2200,  2600,  2900,  3100,
+  1700,  1800,  2100,  2600,  2900,  3100,
+  1600,  1700,  2100,  2700,  2900,  3100,
+  1400,  1600,  2100,  2700,  2900,  3200,
+  1200,  1600,  2200,  2400,  3000,  3300,
+  1600,  1900,  2300,  2700,  3100,  3400,
+  1200,  1800,  2300,  2700,  3100,  3300,
+  1600,  2000,  2400,  2800,  3100,  3300,
+  1700,  1900,  2100,  2600,  3100,  3300,
+  1800,  1900,  2300,  2600,  3100,  3400,
+  1900,  2000,  2300,  2600,  3200,  3300,
+  1900,  2000,  2300,  2600,  3100,  3300,
+  1900,  2100,  2300,  2700,  3100,  3300,
+  1200,  1400,  2200,  2800,  3000,  3100,
+  1800,  2100,  2400,  2700,  3200,  3400,
+  1600,  2100,  2500,  2800,  3100,  3300,
+  1600,  2000,  2500,  2800,  3200,  3300,
+  1700,  2000,  2500,  2800,  3200,  3400,
+  1700,  1900,  2700,  2800,  3100,  3400,
+  1600,  1800,  2400,  2600,  3100,  3400,
+  1600,  1800,  2300,  2500,  3100,  3400,
+  1600,  1800,  2200,  2500,  3100,  3400,
+  1600,  1800,  2100,  2300,  3100,  3400,
+  1500,  1700,  2000,  2200,  3000,  3300,
+  1500,  1600,  1900,  2000,  3000,  3200,
+  1300,  1500,  1700,  1900,  2800,  3200,
+  1800,  2000,  2300,  2600,  3000,  3200,
+  1700,  2000,  2200,  2600,  3000,  3200,
+  1600,  1900,  2400,  2600,  3000,  3300,
+  1300,  1700,  2100,  2400,  2900,  3200,
+  1600,  1800,  2400,  2600,  3000,  3300,
+  1300,  1600,  2200,  2300,  2900,  3200,
+  1300,  1400,  2100,  2200,  3000,  3200,
+  1300,  1500,  1800,  2000,  3000,  3200,
+  1300,  1400,  1800,  1900,  2800,  3200,
+  1300,  1700,  2200,  2500,  3000,  3200,
+  1200,  1800,  2300,  2600,  3200,  3300,
+  1400,  1900,  2300,  2700,  3100,  3300,
+  1500,  2000,  2400,  2600,  3000,  3300,
+  1600,  2000,  2500,  2600,  3100,  3300,
+  1600,  1900,  2500,  2700,  3100,  3300,
+  1600,  2000,  2500,  2600,  3000,  3200,
+  1400,  1600,  2300,  2600,  2800,  3200,
+  1300,  1500,  2000,  2600,  2700,  3000,
+  1300,  1500,  2200,  2600,  2800,  3100,
+  1400,  1500,  2100,  2600,  2800,  3100,
+  1400,  1500,  2100,  2600,  2800,  3000,
+  1500,  1600,  2000,  2500,  2700,  3000,
+  1500,  1700,  2000,  2500,  2700,  3000,
+  1600,  1700,  2000,  2500,  2800,  3000,
+  1700,  1800,  2100,  2500,  2900,  3100,
+  1700,  1900,  2100,  2500,  2900,  3000,
+  1800,  2000,  2200,  2600,  2800,  3000,
+  1800,  2100,  2300,  2600,  2800,  3100,
+  1800,  2100,  2300,  2600,  2900,  3100,
+  1800,  2000,  2200,  2600,  2900,  3100,
+  1800,  2000,  2300,  2600,  2900,  3100,
+  1800,  2000,  2300,  2600,  2800,  3100,
+  1700,  1900,  2200,  2600,  2800,  3000,
+  1700,  1800,  2100,  2500,  2700,  3000,
+  1500,  1700,  2200,  2400,  2800,  3300,
+  1500,  1900,  2300,  2500,  3100,  3300,
+  1700,  1800,  2200,  2800,  3100,  3200,
+  1700,  1900,  2100,  2700,  3000,  3200,
+  1900,  2100,  2400,  2600,  3000,  3200,
+  2000,  2200,  2400,  2700,  3000,  3200,
+  1900,  2300,  2400,  2700,  3100,  3300,
+  1500,  1600,  1800,  2000,  3100,  3300,
+  1200,  1400,  1900,  2500,  2900,  3100,
+  1600,  1700,  2000,  2100,  2900,  3300,
+  1700,  1800,  2100,  2200,  2900,  3300,
+  1800,  1900,  2200,  2300,  3000,  3300,
+  1900,  2000,  2200,  2300,  3100,  3300,
+  2000,  2100,  2300,  2500,  3100,  3400,
+  1900,  2100,  2300,  2500,  3000,  3200,
+  1800,  2000,  2300,  2400,  2900,  3200,
+  1900,  2200,  2600,  2800,  3100,  3300,
+  2000,  2400,  2600,  2700,  3200,  3400,
+  1800,  2200,  2600,  2700,  3100,  3300,
+  1600,  2100,  2600,  2700,  3100,  3300,
+  1600,  2100,  2500,  2800,  3200,  3400,
+  1900,  2200,  2500,  2800,  3200,  3400,
+  1800,  2000,  2500,  2800,  3300,  3400,
+  1700,  1900,  2600,  2800,  3100,  3400,
+  1600,  1700,  2400,  2700,  3100,  3300,
+  1400,  1600,  2200,  2500,  2800,  3200,
+  1400,  1600,  2300,  2500,  2900,  3200,
+  1400,  1500,  2300,  2600,  2900,  3200,
+  1300,  1500,  2400,  2600,  3000,  3300,
+  1200,  1400,  2400,  2600,  2900,  3300,
+  1200,  1300,  2300,  2600,  2800,  3200,
+  1200,  1300,  2300,  2600,  2800,  3100,
+  1200,  1400,  2300,  2600,  2800,  3200,
+  1200,  1400,  2300,  2500,  2800,  3200,
+  1200,  1400,  2300,  2500,  2700,  3200,
+  1300,  1400,  2300,  2500,  2700,  3200,
+  1300,  1400,  2300,  2400,  2900,  3200,
+  1300,  1600,  2300,  2400,  2900,  3200,
+  1600,  1700,  2200,  2500,  3000,  3200,
+  1600,  1700,  2200,  2500,  2900,  3200,
+  1600,  1800,  2300,  2400,  2900,  3200,
+  1600,  1800,  2200,  2400,  2900,  3200,
+  1700,  1900,  2400,  2700,  3000,  3300,
+  1600,  1800,  2400,  2700,  3000,  3300,
+  1600,  1800,  2300,  2600,  2900,  3200,
+  1600,  1800,  2500,  2700,  2900,  3200,
+  1600,  1900,  2500,  2800,  3100,  3300,
+  1600,  1900,  2500,  2800,  3000,  3200,
+  1400,  1700,  2400,  2700,  2900,  3200,
+  1400,  1500,  2200,  2600,  2800,  3100,
+  1300,  1500,  2300,  2600,  2800,  3100,
+  1200,  1400,  2300,  2500,  2700,  3100,
+  1300,  1600,  2200,  2600,  3000,  3300,
+  1200,  1600,  2500,  2700,  3100,  3400,
+  1300,  1800,  2400,  2700,  3200,  3400,
+  1300,  1700,  2300,  2700,  3100,  3300,
+  1300,  1700,  2200,  2500,  3100,  3300,
+  1300,  1600,  2200,  2600,  2900,  3200,
+  1400,  1600,  2200,  2700,  2800,  3100,
+  1600,  1700,  2200,  2700,  3100,  3200,
+  1800,  2000,  2400,  2800,  3100,  3300,
+  1800,  2000,  2400,  2800,  3200,  3300,
+  1700,  1800,  2200,  2700,  2900,  3100,
+  1700,  1800,  2300,  2700,  3000,  3300,
+  1800,  1900,  2600,  2800,  3300,  3400,
+  1900,  2100,  2300,  2600,  2900,  3100,
+  1900,  2200,  2400,  2700,  3000,  3100,
+  1800,  2300,  2400,  2700,  3000,  3100,
+  1800,  2300,  2400,  2600,  3100,  3200,
+  2000,  2300,  2400,  2700,  3100,  3200,
+  2100,  2300,  2500,  2700,  3000,  3200,
+  2000,  2100,  2500,  2700,  3000,  3200,
+  1900,  2000,  2300,  2700,  2900,  3100,
+  1600,  1800,  2200,  2500,  2700,  3000,
+  1500,  1800,  2300,  2500,  2700,  3000,
+  1500,  1800,  2200,  2500,  2700,  3000,
+  1600,  1800,  2300,  2500,  2800,  3000,
+  1700,  1800,  2400,  2700,  3000,  3200,
+  1700,  1800,  2500,  2700,  3000,  3200,
+  1700,  1800,  2400,  2700,  3000,  3300,
+  1600,  1700,  2400,  2600,  2900,  3200,
+  1500,  1700,  2400,  2600,  2800,  3200,
+  1500,  1700,  2400,  2500,  2800,  3200,
+  1400,  1600,  2400,  2500,  3000,  3300,
+  1500,  1700,  2300,  2400,  2900,  3200,
+  1500,  1800,  2200,  2400,  2800,  3000,
+  1600,  1900,  2200,  2600,  2900,  3100,
+  1800,  2000,  2300,  2600,  2900,  3000,
+  1600,  2000,  2300,  2500,  2900,  3100,
+  1600,  1800,  2100,  2300,  2900,  3100,
+  1300,  1500,  2200,  2400,  3000,  3200,
+  1300,  1500,  2200,  2400,  2900,  3200,
+  1300,  1500,  2200,  2500,  2900,  3200,
+  1400,  1500,  2300,  2500,  2900,  3200,
+  1600,  1700,  2100,  2500,  2800,  3100,
+  1600,  1700,  2100,  2600,  2800,  3100,
+  1700,  1800,  2100,  2500,  2800,  3100,
+  1700,  1800,  2200,  2600,  2900,  3100,
+  1700,  1900,  2300,  2600,  2900,  3200,
+  1800,  2100,  2300,  2600,  2900,  3200,
+  1800,  2100,  2300,  2700,  2900,  3200,
+  1900,  2200,  2400,  2700,  2900,  3200,
+  1900,  2100,  2300,  2700,  2900,  3100,
+  1900,  2000,  2300,  2600,  2800,  3100,
+  1900,  2200,  2500,  2800,  3100,  3300,
+  1900,  2200,  2400,  2800,  3000,  3200,
+  1900,  2200,  2400,  2700,  2900,  3100,
+  1900,  2300,  2400,  2800,  3100,  3200,
+  2000,  2300,  2500,  2800,  3100,  3300,
+  1900,  2400,  2500,  2800,  3100,  3200,
+  1800,  2000,  2200,  2500,  3000,  3200,
+  1800,  1900,  2100,  2400,  2900,  3200,
+  1500,  1600,  2200,  2400,  2700,  3200,
+  1300,  1400,  2200,  2500,  2700,  3200,
+  1200,  1500,  2500,  2700,  3000,  3300,
+  1300,  1600,  2400,  2600,  3000,  3300,
+  2000,  2200,  2600,  2700,  3000,  3300,
+  2100,  2300,  2500,  2700,  3000,  3300,
+  2100,  2300,  2600,  2700,  3000,  3300,
+  2000,  2200,  2600,  2700,  3000,  3200,
+  1800,  2300,  2500,  2600,  2900,  3200,
+  1800,  2300,  2500,  2700,  2900,  3100,
+  1800,  2200,  2400,  2600,  2900,  3200,
+  1800,  2200,  2400,  2600,  2800,  3100,
+  1800,  2200,  2300,  2600,  2900,  3100,
+  1800,  2000,  2200,  2800,  3000,  3200,
+  1800,  1900,  2200,  2800,  3000,  3200,
+  1700,  1900,  2300,  2800,  3000,  3300,
+  1600,  1800,  2300,  2800,  3000,  3300,
+  1400,  1700,  2200,  2500,  2800,  2900,
+  1400,  1700,  2100,  2500,  2900,  3200,
+  1700,  2000,  2200,  2800,  3200,  3300,
+  1800,  1900,  2200,  2700,  2900,  3200,
+  1800,  2000,  2200,  2700,  2900,  3100,
+  1800,  2000,  2200,  2700,  2800,  3000,
+  1800,  2000,  2200,  2700,  2800,  3100,
+  1600,  1900,  2100,  2600,  2900,  3200,
+  2000,  2100,  2600,  2900,  3000,  3200,
+  2000,  2200,  2700,  2900,  3100,  3300,
+  2000,  2200,  2400,  2800,  3000,  3200,
+  2000,  2200,  2300,  2700,  3000,  3200,
+  1700,  2200,  2400,  2600,  2900,  3100,
+  1800,  2200,  2400,  2700,  3000,  3200,
+  1900,  2300,  2500,  2700,  3000,  3200,
+  1900,  2300,  2500,  2700,  2900,  3100,
+  1900,  2300,  2500,  2800,  3000,  3200,
+  1900,  2300,  2500,  2700,  2900,  3200,
+  1800,  2200,  2400,  2700,  2900,  3100,
+  1800,  2000,  2300,  2700,  3000,  3200,
+  1600,  1700,  2100,  2800,  3100,  3200,
+  1400,  1800,  2200,  2500,  3000,  3100,
+  1400,  1800,  2300,  2500,  3000,  3100,
+  1400,  1800,  2300,  2500,  2900,  3100,
+  1600,  1800,  2500,  2800,  3100,  3200,
+  1700,  2000,  2400,  2700,  3200,  3400,
+  1700,  2000,  2500,  2800,  3100,  3400,
+  1500,  1700,  2300,  2600,  2900,  3200,
+  1500,  1700,  2200,  2600,  2800,  3200,
+  1500,  1700,  2200,  2600,  2900,  3300,
+  1400,  1700,  2200,  2600,  2900,  3300,
+  1200,  1500,  2200,  2300,  3100,  3400,
+  1200,  1600,  2300,  2400,  3200,  3300,
+  1200,  1700,  2300,  2400,  3100,  3300,
+  1100,  1700,  2400,  2500,  3100,  3300,
+  1100,  1800,  2500,  2600,  3100,  3300,
+  1100,  1800,  2500,  2600,  3200,  3300,
+  1000,  1800,  2500,  2600,  3200,  3300,
+  1000,  1700,  2400,  2500,  3200,  3300,
+  1100,  1600,  2400,  2500,  3200,  3300,
+  1100,  1600,  2300,  2400,  3200,  3300,
+  1300,  1600,  2300,  2500,  3100,  3300,
+  1400,  1700,  2300,  2500,  3100,  3300,
+  2000,  2100,  2500,  2600,  3200,  3400,
+  1700,  2100,  2600,  2800,  3100,  3200,
+  1800,  2200,  2700,  2900,  3100,  3300,
+  2100,  2400,  2700,  2900,  3200,  3300,
+  2100,  2500,  2700,  2900,  3300,  3400,
+  2100,  2400,  2600,  2800,  3200,  3400,
+  1700,  1900,  2400,  2600,  2900,  3000,
+  1600,  1900,  2400,  2500,  2800,  2900,
+  1300,  2000,  2400,  2500,  2900,  3200,
+  1500,  2000,  2400,  2500,  2900,  3100,
+  1600,  2000,  2400,  2600,  3000,  3100,
+  1700,  1900,  2500,  2600,  3100,  3200,
+  1600,  1800,  2600,  2700,  3300,  3400,
+  1500,  1600,  2600,  2700,  3200,  3400,
+  1500,  1700,  2600,  2700,  3200,  3400,
+  1500,  2100,  2600,  2800,  3300,  3400,
+  1700,  2200,  2700,  2900,  3300,  3400,
+  1700,  2300,  2700,  2800,  3300,  3400,
+  1800,  2300,  2700,  2800,  3300,  3400,
+  1400,  1700,  2500,  2600,  3000,  3300,
+  1400,  1800,  2500,  2600,  3000,  3300,
+  1800,  2200,  2700,  2900,  3300,  3400,
+  1800,  2300,  2600,  2900,  3300,  3400,
+  1400,  1900,  2500,  2600,  3200,  3400,
+  1400,  2000,  2400,  2500,  3200,  3300,
+  1400,  2100,  2400,  2600,  3200,  3300,
+  1200,  2000,  2400,  2700,  3200,  3300,
+  1300,  1900,  2300,  2600,  3100,  3200,
+  1300,  1800,  2300,  2500,  3100,  3200,
+  1200,  1700,  2300,  2500,  3000,  3100,
+  1200,  1800,  2400,  2500,  3000,  3100,
+  1100,  2100,  2300,  2600,  3000,  3100,
+  1400,  1800,  2200,  2700,  3100,  3200,
+  1600,  2000,  2400,  2600,  3200,  3300,
+  1600,  1900,  2400,  2600,  3300,  3400,
+  1600,  2000,  2500,  2600,  3300,  3400,
+  1600,  2000,  2300,  2500,  3300,  3400,
+  1500,  2400,  2700,  2800,  3100,  3300,
+  1300,  2000,  2500,  2600,  3200,  3300,
+  1400,  2000,  2500,  2600,  3200,  3300,
+  1600,  1900,  2400,  2600,  3200,  3300,
+  1600,  2000,  2300,  2600,  3200,  3300,
+  1600,  2100,  2300,  2500,  3000,  3100,
+  1800,  2100,  2400,  2700,  2900,  3200,
+  1500,  1700,  2000,  2600,  3200,  3300,
+  1400,  1700,  2000,  2400,  3200,  3300,
+  1400,  1900,  2200,  2500,  3100,  3300,
+  1500,  1900,  2200,  2500,  3100,  3300,
+  1200,  1900,  2500,  2600,  3100,  3300,
+  1000,  1700,  2600,  2800,  3300,  3400,
+  1200,  1500,  2400,  2700,  2900,  3200,
+  1700,  2100,  2400,  2800,  3200,  3400,
+  1700,  2000,  2600,  2800,  3100,  3400,
+  1700,  2000,  2600,  2700,  3000,  3300,
+  1500,  1700,  2500,  2700,  3000,  3300,
+  1600,  2000,  2600,  2800,  3100,  3300,
+  1500,  2000,  2500,  2800,  3200,  3400,
+  1400,  1800,  2500,  2800,  3300,  3400,
+  1700,  2200,  2600,  2900,  3200,  3400,
+  1700,  2200,  2600,  2800,  3200,  3400,
+  1800,  2000,  2500,  2600,  3300,  3400,
+  1500,  1800,  2200,  2500,  3100,  3200,
+  1600,  2100,  2400,  2700,  3300,  3400,
+  1400,  1800,  2500,  2700,  3000,  3300,
+  1300,  1600,  2500,  2600,  3200,  3400,
+  1400,  1700,  2500,  2600,  3300,  3400,
+  1500,  1700,  2400,  2500,  3200,  3400,
+  1900,  2000,  2300,  2500,  3200,  3400,
+  1600,  1900,  2100,  2500,  3000,  3200,
+  1600,  2100,  2500,  2800,  3200,  3300,
+  1400,  2000,  2400,  2700,  3200,  3300,
+  900,  1800,  2400,  2600,  3200,  3300,
+  1100,  1600,  2700,  2800,  3200,  3400,
+  1200,  1600,  2600,  2800,  3200,  3400,
+  1300,  1700,  2500,  2700,  3100,  3300,
+  1400,  1700,  2400,  2700,  3200,  3300,
+  1400,  1800,  2300,  2500,  3100,  3200,
+  1400,  2100,  2400,  2600,  2900,  3100,
+  1300,  2000,  2400,  2600,  3100,  3200,
+  1200,  1800,  2300,  2500,  3200,  3300,
+  1300,  1900,  2300,  2500,  3100,  3300,
+  1600,  2000,  2400,  2600,  3200,  3400,
+  1800,  2000,  2300,  2500,  3100,  3400,
+  1700,  1900,  2300,  2400,  3100,  3300,
+  1600,  1800,  2300,  2400,  2900,  3300,
+  1600,  1800,  2300,  2400,  3000,  3300,
+  1600,  1700,  2300,  2400,  3000,  3300,
+  1600,  1700,  2300,  2400,  2800,  3200,
+  1600,  1700,  2300,  2400,  2900,  3300,
+  1500,  1700,  2300,  2500,  3000,  3300,
+  1400,  1700,  2500,  2600,  3200,  3300,
+  1300,  1600,  2500,  2700,  3100,  3300,
+  1300,  1500,  2500,  2700,  3100,  3300,
+  1300,  1600,  2400,  2700,  3000,  3400,
+  1800,  2300,  2600,  2800,  3100,  3300,
+  1800,  2200,  2500,  2800,  3100,  3300,
+  1700,  2100,  2500,  2700,  3000,  3300,
+  1600,  1900,  2500,  2700,  2900,  3200,
+  1700,  2000,  2500,  2700,  3000,  3200,
+  1700,  2300,  2600,  2700,  3200,  3400,
+  1400,  1700,  1900,  2200,  3200,  3300,
+  1200,  1900,  2100,  2600,  3100,  3200,
+  1200,  1900,  2200,  2700,  3100,  3200,
+  1200,  1900,  2300,  2700,  3200,  3300,
+  1100,  2000,  2300,  2600,  3200,  3300,
+  1200,  1900,  2400,  2700,  3200,  3300,
+  1200,  1800,  2300,  2600,  3200,  3400,
+  1200,  1600,  2400,  2700,  3200,  3400,
+  1200,  1500,  2400,  2600,  3000,  3200,
+  1300,  1500,  2100,  2500,  2700,  3000,
+  1200,  1800,  2400,  2600,  3100,  3200,
+  1200,  2000,  2400,  2500,  3200,  3300,
+  1700,  2400,  2700,  3100,  3300,  3400,
+  2000,  2500,  2700,  3100,  3400,  3500,
+  1900,  2400,  2700,  3100,  3400,  3500,
+  1900,  2200,  2700,  3100,  3300,  3400,
+  1800,  2200,  2700,  3100,  3300,  3400,
+  1500,  1700,  2100,  2500,  3200,  3300,
+  1400,  1800,  2100,  2600,  3200,  3300,
+  1200,  1700,  2000,  2300,  3300,  3400,
+  1300,  1500,  1600,  2300,  3100,  3200,
+  1500,  1900,  2400,  2600,  3000,  3300,
+  1500,  2000,  2400,  2500,  2800,  3200,
+  1400,  2000,  2400,  2500,  2900,  3200,
+  1300,  1600,  1700,  2300,  3300,  3400,
+  1300,  1600,  1700,  2100,  3200,  3400,
+  2000,  2200,  2500,  2900,  3300,  3400,
+  2100,  2300,  2500,  2700,  3300,  3400,
+  1900,  2200,  2400,  2700,  3300,  3400,
+  1500,  1900,  2200,  2400,  3000,  3300,
+  1500,  1900,  2400,  2700,  3300,  3400,
+  1500,  1700,  2500,  2700,  3200,  3400,
+  1500,  1700,  2500,  2600,  3100,  3400,
+  1600,  2000,  2400,  2700,  3200,  3300,
+  1600,  1800,  2200,  2600,  3000,  3100,
+  1500,  1800,  2200,  2600,  3000,  3100,
+  1500,  1900,  2400,  2500,  3000,  3200,
+  1200,  1500,  2400,  2600,  3200,  3300,
+  1500,  2000,  2500,  2700,  3100,  3300,
+  1700,  2100,  2500,  2900,  3200,  3300,
+  1400,  1800,  2400,  2500,  3100,  3300,
+  1400,  2000,  2300,  2500,  3200,  3400,
+  1200,  1900,  2200,  2400,  3300,  3400,
+  1200,  1900,  2300,  2500,  3300,  3400,
+  1200,  1900,  2300,  2400,  3300,  3400,
+  1200,  1700,  2300,  2400,  3300,  3400,
+  1200,  1600,  2200,  2300,  3300,  3400,
+  1200,  1600,  2200,  2400,  3300,  3400,
+  1300,  1600,  2100,  2400,  3200,  3300,
+  1500,  1700,  2200,  2600,  2900,  3200,
+  2100,  2200,  2500,  2800,  3200,  3300,
+  1600,  1800,  2300,  2500,  3100,  3300,
+  1500,  1800,  2300,  2500,  3100,  3300,
+  1400,  1800,  2300,  2600,  3100,  3300,
+  1400,  1800,  2400,  2600,  3100,  3300,
+  1300,  1800,  2400,  2700,  3200,  3300,
+  1100,  1800,  2400,  2700,  3200,  3300,
+  1400,  2000,  2500,  2600,  2900,  3200,
+  1500,  2100,  2500,  2600,  2900,  3200,
+  1500,  1900,  2400,  2600,  3100,  3300,
+  1300,  1900,  2400,  2800,  3100,  3300,
+  1300,  2000,  2500,  2700,  3200,  3300,
+  1300,  1800,  2600,  2700,  3100,  3400,
+  1300,  1700,  2600,  2700,  3100,  3300,
+  1300,  1700,  2600,  2700,  3100,  3400,
+  1400,  1900,  2400,  2600,  2900,  3100,
+  1500,  1800,  2300,  2600,  2900,  3100,
+  1600,  1900,  2400,  2600,  3000,  3200,
+  1700,  2000,  2600,  2900,  3100,  3300,
+  1800,  2300,  2500,  2800,  3200,  3400,
+  1900,  2300,  2600,  2900,  3300,  3400,
+  1600,  1900,  2500,  2600,  3000,  3100,
+  1600,  1900,  2500,  2600,  3000,  3200,
+  1500,  1800,  2200,  2500,  3200,  3300,
+  1500,  1900,  2200,  2500,  3300,  3400,
+  1500,  1800,  2200,  2400,  3200,  3400,
+  1500,  1800,  2100,  2400,  3200,  3400,
+  1600,  1800,  2100,  2200,  3200,  3400,
+  1700,  1800,  2100,  2400,  3100,  3300,
+  1600,  1700,  2300,  2400,  2700,  3100,
+  1600,  1900,  2400,  2500,  3000,  3300,
+  1600,  2100,  2500,  2600,  3200,  3400,
+  1200,  2000,  2400,  2500,  3400,  3500,
+  1200,  1600,  2300,  2400,  3200,  3400,
+  1400,  1900,  2400,  2500,  3000,  3200,
+  1300,  1800,  2100,  2500,  3100,  3300,
+  1300,  1700,  2300,  2500,  3100,  3300,
+  1300,  1700,  2200,  2400,  3200,  3300,
+  1300,  1800,  2200,  2400,  3200,  3300,
+  1500,  1800,  2300,  2500,  3200,  3300,
+  1600,  1800,  2300,  2500,  3300,  3400,
+  1700,  1900,  2400,  2600,  3300,  3400,
+  1700,  1900,  2500,  2700,  3000,  3100,
+  1700,  1800,  2500,  2600,  3100,  3200,
+  1700,  1800,  2500,  2600,  3000,  3200,
+  1600,  1800,  2400,  2600,  3000,  3200,
+  1600,  1800,  2400,  2600,  3100,  3300,
+  1500,  1700,  2400,  2600,  3100,  3300,
+  1300,  1700,  2400,  2600,  3100,  3300,
+  1300,  1700,  2400,  2600,  3200,  3300,
+  1400,  1800,  2400,  2600,  3200,  3300,
+  1400,  1800,  2300,  2600,  3200,  3300,
+  1500,  1800,  2300,  2600,  3300,  3400,
+  1500,  1800,  2300,  2500,  3300,  3400,
+  1500,  1700,  2200,  2400,  3300,  3400,
+  1800,  2200,  2400,  2600,  3200,  3300,
+  1700,  1900,  2300,  2700,  3200,  3300,
+  1600,  1800,  2000,  2600,  3200,  3300,
+  1900,  2000,  2200,  2500,  3300,  3400,
+  1900,  2100,  2300,  2600,  3300,  3400,
+  1800,  1900,  2200,  2600,  3100,  3300,
+  1100,  1900,  2600,  2700,  3200,  3300,
+  1000,  1700,  2700,  2800,  3200,  3300,
+  1000,  1800,  2600,  2700,  3000,  3100,
+  1200,  2000,  2600,  2800,  3200,  3300,
+  1200,  2000,  2500,  2700,  3200,  3300,
+  1200,  2000,  2500,  2600,  3200,  3300,
+  1200,  2000,  2400,  2500,  3300,  3400,
+  1300,  2000,  2300,  2500,  3300,  3400,
+  1300,  1900,  2300,  2500,  3300,  3400,
+  1400,  1900,  2300,  2600,  3300,  3400,
+  2200,  2400,  2500,  2900,  3200,  3300,
+  2100,  2200,  2400,  2800,  3200,  3300,
+  2000,  2200,  2400,  2800,  3200,  3300,
+  1900,  2100,  2400,  2800,  3200,  3300,
+  1600,  1800,  2000,  2400,  2800,  3000,
+  1600,  1900,  2300,  2400,  2900,  3300,
+  1800,  2100,  2400,  2500,  3100,  3200,
+  1800,  2300,  2500,  2700,  3200,  3300,
+  1800,  2100,  2500,  2700,  3300,  3400,
+  1500,  1900,  2100,  2700,  3000,  3100,
+  1500,  1700,  1800,  2600,  3300,  3400,
+  1500,  1700,  1800,  2500,  3300,  3400,
+  1300,  1500,  1600,  2500,  3200,  3300,
+  1300,  1500,  1700,  2400,  3000,  3100,
+  1600,  2000,  2500,  2700,  3300,  3400,
+  2000,  2100,  2400,  2700,  3300,  3400,
+  1800,  2000,  2200,  2600,  3100,  3300,
+  1800,  1900,  2100,  2600,  3200,  3300,
+  1700,  2000,  2100,  2700,  3200,  3300,
+  1700,  2100,  2200,  2700,  3200,  3300,
+  1700,  2200,  2400,  2700,  3200,  3300,
+  1700,  2200,  2400,  2600,  3200,  3300,
+  1700,  2100,  2500,  2600,  3200,  3300,
+  1800,  2400,  2600,  3000,  3300,  3400,
+  1800,  2400,  2800,  3100,  3300,  3400,
+  1900,  2400,  2800,  3100,  3300,  3500,
+  1900,  2300,  2800,  3000,  3300,  3400,
+  1600,  1800,  2400,  2600,  3000,  3100,
+  1500,  1700,  1900,  2500,  3300,  3400,
+  1200,  1700,  2200,  2300,  3100,  3300,
+  1100,  1500,  2300,  2400,  3000,  3300,
+  1200,  1600,  2300,  2400,  3100,  3300,
+  1200,  1600,  2300,  2400,  3100,  3400,
+  1300,  1600,  2200,  2400,  3200,  3300,
+  1500,  1600,  2100,  2400,  3000,  3300,
+  1600,  1700,  2100,  2400,  3100,  3300,
+  1500,  1600,  2100,  2500,  3100,  3300,
+  1600,  1900,  2200,  2600,  3100,  3300,
+  1500,  1800,  2200,  2500,  3000,  3200,
+  1400,  1800,  2200,  2500,  2900,  3200,
+  1300,  1600,  2200,  2600,  3000,  3200,
+  1700,  2000,  2400,  2800,  3000,  3100,
+  1700,  2100,  2400,  2700,  3000,  3100,
+  1800,  2200,  2500,  2800,  3000,  3200,
+  1700,  2100,  2500,  2800,  3100,  3200,
+  1800,  2200,  2500,  2700,  3200,  3400,
+  1600,  1900,  2300,  2500,  3200,  3300,
+  1600,  1800,  2100,  2500,  3200,  3300,
+  1600,  1800,  2000,  2400,  3200,  3300,
+  1500,  1700,  1900,  2300,  3300,  3400,
+  1400,  1600,  1800,  2200,  3300,  3400,
+  1500,  1600,  1900,  2600,  3000,  3200,
+  1500,  2000,  2300,  2600,  3200,  3300,
+  1200,  1900,  2100,  2500,  3200,  3300,
+  1900,  2100,  2300,  2600,  3200,  3300,
+  1800,  2100,  2300,  2600,  3300,  3400,
+  1700,  2100,  2300,  2600,  3200,  3300,
+  1600,  2100,  2300,  2700,  3200,  3300,
+  1500,  1900,  2400,  2700,  3200,  3300,
+  1400,  1900,  2400,  2700,  3200,  3300,
+  1400,  1900,  2400,  2600,  3200,  3300,
+  1500,  2100,  2500,  2600,  3200,  3300,
+  1600,  1800,  2100,  2500,  2900,  3100,
+  1800,  2000,  2500,  2800,  3000,  3200,
+  1400,  1600,  2100,  2600,  3000,  3300,
+  1700,  2000,  2400,  2700,  3300,  3400,
+  1700,  2100,  2500,  2700,  3300,  3400,
+  1700,  2100,  2600,  2700,  3000,  3300,
+  1800,  2100,  2500,  2700,  3100,  3200,
+  2200,  2300,  2500,  2800,  3200,  3300,
+  2100,  2300,  2500,  2800,  3200,  3300,
+  2000,  2200,  2500,  2800,  3200,  3300,
+  1900,  2000,  2400,  2700,  3100,  3200,
+  1600,  2000,  2400,  2700,  3100,  3400,
+  1300,  1800,  2100,  2500,  3100,  3200,
+  1300,  1800,  2200,  2800,  3100,  3200,
+  1300,  2000,  2200,  2600,  3200,  3300,
+  1900,  2100,  2400,  2500,  3000,  3200,
+  1800,  2100,  2400,  2600,  3200,  3300,
+  1500,  1900,  2400,  2600,  3300,  3400,
+  1500,  1800,  2400,  2600,  3200,  3400,
+  1500,  1700,  2400,  2600,  3200,  3400,
+  1400,  1700,  2400,  2600,  3100,  3300,
+  1400,  1900,  2500,  2600,  2900,  3200,
+  1400,  1900,  2400,  2700,  3000,  3200,
+  1400,  1900,  2400,  2600,  3000,  3100,
+  1400,  1900,  2300,  2500,  2700,  3000,
+  1300,  1800,  2200,  2500,  3300,  3400,
+  1300,  1800,  2200,  2400,  3300,  3400,
+  1300,  1700,  2100,  2400,  3200,  3400,
+  1400,  1900,  2300,  2600,  3100,  3300,
+  1900,  2200,  2400,  2800,  3100,  3200,
+  1600,  2200,  2400,  2700,  3300,  3400,
+  1600,  2100,  2400,  2700,  3200,  3300,
+  1400,  1700,  2000,  2500,  3000,  3200,
+  1400,  1800,  2300,  2500,  3000,  3200,
+  1700,  1900,  2100,  2400,  3200,  3300,
+  1800,  1900,  2200,  2500,  3200,  3300,
+  1900,  2000,  2500,  2700,  3200,  3300,
+  1900,  2000,  2500,  2600,  3100,  3300,
+  1400,  1900,  2300,  2500,  2800,  3200,
+  1400,  1900,  2300,  2500,  2900,  3300,
+  1400,  1600,  2300,  2500,  3000,  3200,
+  1400,  1600,  2200,  2500,  3100,  3200,
+  2000,  2200,  2500,  2700,  3000,  3300,
+  1600,  2100,  2600,  2900,  3200,  3300,
+  1500,  1700,  2100,  2500,  3100,  3200,
+  1200,  2100,  2600,  2700,  3200,  3300,
+  1100,  2100,  2600,  2800,  3200,  3300,
+  1000,  2000,  2800,  2900,  3100,  3200,
+  1600,  1900,  2100,  2500,  3000,  3100,
+  1700,  1900,  2200,  2500,  3000,  3100,
+  1700,  1900,  2300,  2400,  3100,  3200,
+  1400,  2000,  2300,  2400,  3200,  3300,
+  1300,  2000,  2200,  2400,  3100,  3200,
+  1200,  2000,  2300,  2500,  3100,  3200,
+  1200,  1800,  2300,  2600,  3100,  3200,
+  1300,  1600,  2300,  2700,  3100,  3200,
+  1300,  1700,  2300,  2700,  3100,  3200,
+  1100,  2000,  2300,  2600,  3100,  3200,
+  1300,  2000,  2400,  2500,  3200,  3300,
+  1300,  1900,  2400,  2500,  3200,  3300,
+  1500,  1800,  2100,  2600,  3300,  3400,
+  1500,  1900,  2100,  2500,  2800,  3000,
+  1500,  2000,  2200,  2500,  3000,  3100,
+  1500,  2000,  2200,  2600,  3100,  3200,
+  1600,  1900,  2300,  2500,  3100,  3200,
+  1600,  1900,  2200,  2400,  3100,  3200,
+  1600,  1900,  2400,  2600,  2900,  3100,
+  1900,  2300,  2600,  2800,  3100,  3200,
+  2000,  2400,  2700,  2800,  3100,  3200,
+  1300,  1800,  2000,  2400,  3100,  3200,
+  1100,  1700,  2100,  2400,  3100,  3200,
+  1300,  1600,  2100,  2500,  3000,  3100,
+  1200,  1700,  2200,  2500,  3000,  3200,
+  1400,  1800,  2100,  2300,  3100,  3200,
+  1700,  1800,  2100,  2200,  3200,  3300,
+  1700,  1900,  2100,  2300,  3200,  3300,
+  1800,  1900,  2400,  2800,  3100,  3200,
+  2000,  2300,  2800,  3000,  3100,  3300,
+  2100,  2300,  2700,  3000,  3200,  3300,
+  2100,  2300,  2600,  2900,  3200,  3300,
+  2200,  2400,  2700,  2800,  3200,  3300,
+  1700,  2000,  2300,  2500,  3000,  3100,
+  1600,  2000,  2300,  2400,  2800,  3200,
+  1700,  2100,  2300,  2400,  2900,  3200,
+  1400,  1800,  2300,  2600,  3000,  3300,
+  1500,  2200,  2400,  2700,  3100,  3200,
+  1500,  2200,  2500,  2700,  3200,  3300,
+  1400,  1600,  2400,  2500,  3100,  3400,
+  1600,  2200,  2500,  2800,  3300,  3400,
+  1600,  2000,  2500,  2800,  3300,  3400,
+  1400,  1700,  2400,  2500,  3200,  3400,
+  1400,  1600,  2400,  2600,  3200,  3300,
+  1400,  1700,  2300,  2500,  3200,  3300,
+  1500,  2000,  2300,  2400,  2800,  3200,
+  1500,  2000,  2300,  2400,  2700,  3200,
+  1400,  1900,  2300,  2500,  3000,  3300,
+  1200,  1400,  2300,  2600,  2900,  3100,
+  1500,  2000,  2300,  2500,  3000,  3200,
+  1800,  2000,  2500,  2600,  3100,  3200,
+  1500,  1800,  2400,  2600,  3000,  3200,
+  1200,  1500,  2200,  2400,  3000,  3100,
+  1500,  1900,  2400,  2600,  3200,  3300,
+  1700,  2000,  2600,  2800,  3200,  3300,
+  1500,  1900,  2100,  2500,  3200,  3300,
+  1700,  1800,  2000,  2300,  3000,  3100,
+  1600,  1900,  2300,  2500,  2800,  3100,
+  1600,  1800,  2300,  2500,  3000,  3200,
+  1700,  1800,  2300,  2500,  3200,  3300,
+  1700,  1800,  2300,  2500,  3100,  3300,
+  1600,  1700,  2200,  2400,  3000,  3300,
+  1500,  1700,  2300,  2500,  3200,  3400,
+  1500,  1700,  2300,  2400,  2800,  3300,
+  1600,  1700,  2200,  2400,  2600,  3200,
+  1700,  1800,  2200,  2400,  2900,  3300,
+  1900,  2100,  2400,  2500,  3100,  3300,
+  1900,  2000,  2400,  2500,  3100,  3300,
+  1900,  2300,  2500,  2900,  3200,  3300,
+  2200,  2400,  2700,  3100,  3300,  3400,
+  2200,  2400,  2800,  3100,  3300,  3400,
+  1500,  1900,  2300,  2400,  3200,  3300,
+  1500,  1800,  2200,  2300,  3100,  3300,
+  1700,  2000,  2600,  2900,  3200,  3400,
+  1500,  2000,  2300,  2500,  3100,  3200,
+  1300,  1600,  2000,  2500,  3000,  3200,
+  1800,  2000,  2200,  2500,  3000,  3100,
+  1200,  1800,  2200,  2400,  3100,  3200,
+  1300,  1500,  2100,  2200,  3100,  3200,
+  1400,  1900,  2200,  2300,  3200,  3300,
+  1900,  2300,  2600,  3000,  3200,  3400,
+  1900,  2300,  2600,  2800,  3200,  3300,
+  1900,  2200,  2600,  2900,  3100,  3300,
+  1200,  1500,  2500,  2600,  3100,  3200,
+  1400,  1900,  2300,  2400,  2600,  3100,
+  1500,  1600,  2100,  2400,  2900,  3200,
+  1400,  1600,  2200,  2600,  2900,  3200,
+  1700,  1800,  2100,  2300,  3000,  3100,
+  1700,  1900,  2100,  2300,  3100,  3200,
+  1800,  1900,  2200,  2300,  3200,  3300,
+  1700,  1900,  2200,  2300,  3200,  3300,
+  1700,  1800,  2200,  2300,  3200,  3300,
+  1600,  1700,  2200,  2300,  3100,  3300,
+  1700,  2100,  2400,  2900,  3300,  3400,
+  1600,  2100,  2500,  2700,  3300,  3400,
+  1500,  2000,  2400,  2600,  3100,  3200,
+  1600,  2000,  2300,  2500,  2800,  3000,
+  1500,  1700,  1800,  2200,  2800,  2900,
+  1500,  1700,  1900,  2100,  2700,  2800,
+  1600,  2000,  2300,  2500,  3000,  3300,
+  1900,  2300,  2500,  2800,  3100,  3200,
+  2200,  2400,  2600,  3000,  3200,  3300,
+  2300,  2500,  2800,  3100,  3300,  3400,
+  1900,  2400,  2700,  3000,  3400,  3500,
+  1900,  2400,  2600,  3000,  3400,  3500,
+  1800,  2300,  2700,  3100,  3400,  3500,
+  1800,  2300,  2700,  3000,  3300,  3400,
+  1400,  1700,  2200,  2500,  3200,  3400,
+  1600,  1900,  2500,  2600,  3100,  3300,
+  2000,  2300,  2600,  2800,  3300,  3400,
+  1900,  2200,  2500,  2800,  3300,  3400,
+  1700,  2100,  2400,  2700,  3300,  3400,
+  1600,  1700,  2300,  2500,  3200,  3400,
+  1600,  1700,  2300,  2400,  3300,  3400,
+  1600,  1800,  2400,  2600,  3300,  3400,
+  1500,  1700,  2300,  2700,  3300,  3400,
+  1400,  1800,  2300,  2400,  3100,  3400,
+  1500,  2000,  2300,  2400,  2900,  3200,
+  1500,  1900,  2300,  2400,  2800,  3200,
+  1300,  1800,  2200,  2500,  3000,  3100,
+  1200,  1700,  2200,  2300,  3200,  3300,
+  1200,  1700,  2200,  2400,  3200,  3300,
+  1100,  1700,  2200,  2400,  3200,  3300,
+  1100,  1700,  2300,  2500,  3100,  3200,
+  1100,  1700,  2300,  2600,  3100,  3200,
+  1300,  1800,  2300,  2600,  3000,  3200,
+  1300,  1900,  2300,  2600,  3000,  3300,
+  1300,  1800,  2300,  2600,  3100,  3300,
+  1400,  2000,  2500,  2800,  3200,  3300,
+  1200,  1600,  2400,  2700,  3200,  3300,
+  1500,  1800,  2300,  2500,  3100,  3200,
+  1500,  1600,  2200,  2600,  3000,  3200,
+  1500,  1600,  2200,  2500,  3000,  3300,
+  1200,  1600,  2400,  2600,  3200,  3400,
+  1000,  2300,  2800,  2900,  3100,  3200,
+  900,  1700,  2700,  2800,  3200,  3300,
+  1500,  1700,  2400,  2500,  3100,  3200,
+  1500,  1900,  2400,  2500,  3100,  3200,
+  1400,  1900,  2400,  2500,  2900,  3100,
+  1600,  2100,  2400,  2600,  3000,  3100,
+  1700,  1900,  2300,  2500,  3000,  3100,
+  2100,  2400,  2600,  2900,  3100,  3300,
+  2200,  2400,  2700,  2900,  3200,  3300,
+  2100,  2200,  2700,  2800,  3100,  3300,
+  2000,  2100,  2300,  2600,  3100,  3300,
+  1800,  2000,  2100,  2600,  3100,  3200,
+  1800,  1900,  2200,  2500,  2900,  3000,
+  1800,  1900,  2300,  2400,  3000,  3100,
+  1800,  1900,  2200,  2400,  3000,  3100,
+  1800,  2000,  2200,  2500,  3100,  3200,
+  1800,  2000,  2300,  2800,  3100,  3200,
+  1800,  2000,  2400,  2800,  3100,  3200,
+  1800,  2000,  2400,  2800,  3000,  3100,
+  1700,  1900,  2300,  2700,  2900,  3100,
+  1700,  1900,  2200,  2700,  2900,  3100,
+  1600,  1800,  2000,  2600,  2800,  3000,
+  1500,  1700,  2000,  2500,  2900,  3100,
+  1700,  1900,  2200,  2500,  3000,  3200,
+  1700,  1800,  2300,  2400,  3100,  3300,
+  1800,  2000,  2300,  2500,  3000,  3100,
+  1800,  1900,  2200,  2400,  3100,  3200,
+  1400,  1600,  2100,  2600,  3000,  3200,
+  1400,  1600,  2000,  2500,  3000,  3200,
+  1400,  1800,  2000,  2400,  3200,  3300,
+  1200,  1900,  2100,  2500,  3100,  3200,
+  1100,  1700,  2100,  2300,  3000,  3100,
+  1300,  1500,  1700,  2000,  2900,  3100,
+  1600,  1900,  2200,  2400,  2900,  3100,
+  1700,  2000,  2200,  2500,  3200,  3300,
+  1700,  1800,  2100,  2500,  3100,  3300,
+  2000,  2300,  2500,  2700,  3100,  3400,
+  1900,  2200,  2500,  2600,  3000,  3300,
+  1900,  2000,  2300,  2400,  3100,  3300,
+  1800,  1900,  2300,  2400,  3000,  3200,
+  1800,  1900,  2300,  2500,  3100,  3200,
+  1700,  1800,  2300,  2400,  3000,  3100,
+  1500,  1600,  2500,  2600,  2900,  3300,
+  1500,  1700,  2500,  2600,  3100,  3200,
+  1900,  2300,  2500,  2800,  3200,  3300,
+  1400,  1600,  2000,  2600,  3000,  3200,
+  1700,  1900,  2100,  2600,  3000,  3100,
+  1800,  1900,  2400,  2900,  3100,  3300,
+  1800,  1900,  2500,  2900,  3100,  3300,
+  1600,  1800,  2100,  2700,  3000,  3200,
+  1700,  2000,  2300,  2700,  2900,  3200,
+  1600,  2000,  2400,  2600,  2900,  3200,
+  1500,  1700,  2300,  2500,  3300,  3400,
+  1400,  1600,  2200,  2400,  3100,  3300,
+  1500,  1600,  2200,  2500,  3200,  3400,
+  1600,  1700,  2300,  2400,  3200,  3300,
+  1600,  1700,  2300,  2500,  3200,  3300,
+  1600,  1700,  2200,  2500,  3200,  3300,
+  1700,  2100,  2300,  2400,  3100,  3300,
+  1600,  2000,  2400,  2500,  3000,  3300,
+  1500,  1800,  2300,  2400,  2900,  3200,
+  1600,  2000,  2400,  2800,  3200,  3400,
+  1900,  2200,  2600,  2800,  3200,  3400,
+  1900,  2200,  2500,  2800,  3100,  3400,
+  1300,  1800,  2400,  2600,  3100,  3400,
+  1300,  1500,  2400,  2500,  2900,  3300,
+  1300,  1700,  2500,  2600,  3100,  3200,
+  1300,  1700,  2600,  2700,  3200,  3300,
+  1400,  1900,  2600,  2700,  3200,  3300,
+  1400,  2000,  2600,  2700,  3200,  3300,
+  1700,  1900,  2100,  2600,  3200,  3300,
+  1700,  2000,  2100,  2300,  3200,  3300,
+  2000,  2100,  2400,  2600,  3200,  3400,
+  2100,  2200,  2500,  2700,  3200,  3400,
+  1800,  1900,  2500,  2700,  3200,  3400,
+  1700,  2000,  2500,  2700,  3300,  3400,
+  1400,  1900,  2500,  2700,  3100,  3200,
+  1500,  1800,  2500,  2600,  3100,  3300,
+  1600,  2000,  2300,  2600,  3000,  3200,
+  1600,  1900,  2300,  2700,  3000,  3200,
+  1600,  1800,  2300,  2600,  3000,  3200,
+  1400,  1600,  2100,  2500,  3000,  3200,
+  1400,  1800,  2200,  2500,  2700,  3100,
+  1400,  1900,  2300,  2500,  3100,  3200,
+  1300,  2000,  2300,  2500,  3100,  3200,
+  1300,  1900,  2300,  2500,  3100,  3200,
+  1800,  2100,  2500,  2700,  3000,  3300,
+  1800,  2100,  2400,  2700,  3100,  3300,
+  1900,  2100,  2500,  2700,  3100,  3300,
+  1600,  1800,  2300,  2400,  3200,  3400,
+  1700,  1800,  2400,  2500,  3300,  3400,
+  1900,  2000,  2700,  2800,  3200,  3400,
+  1900,  2000,  2600,  2900,  3100,  3300,
+  2000,  2200,  2800,  2900,  3300,  3400,
+  2000,  2100,  2700,  2800,  3300,  3400,
+  1900,  2100,  2400,  2700,  3300,  3400,
+  1600,  1900,  2100,  2500,  3200,  3300,
+  1400,  1900,  2100,  2400,  3200,  3300,
+  1200,  1900,  2100,  2400,  3100,  3200,
+  1200,  1800,  2100,  2500,  2900,  3200,
+  1300,  1700,  1900,  2400,  2800,  2900,
+  1900,  2300,  2600,  3000,  3200,  3300,
+  1800,  2300,  2600,  3000,  3300,  3400,
+  1800,  2200,  2500,  2800,  3300,  3500,
+  1700,  1900,  2300,  2400,  3200,  3400,
+  1800,  1900,  2400,  2500,  3100,  3300,
+  2100,  2200,  2400,  2500,  3100,  3300,
+  1800,  2100,  2500,  2800,  3100,  3200,
+  2000,  2300,  2600,  2700,  3100,  3300,
+  2100,  2200,  2500,  2600,  3100,  3300,
+  2000,  2200,  2300,  2500,  3100,  3300,
+  1800,  1900,  2100,  2300,  3200,  3300,
+  1800,  1900,  2100,  2400,  3300,  3400,
+  1700,  1800,  2200,  2300,  3300,  3400,
+  1700,  1800,  2200,  2300,  3200,  3400,
+  1600,  1700,  2200,  2300,  2900,  3400,
+  1400,  1600,  2500,  2600,  3100,  3200,
+  1300,  1400,  2400,  2600,  3000,  3100,
+  1300,  1500,  2400,  2500,  3000,  3200,
+  1300,  1800,  2400,  2500,  3100,  3200,
+  1300,  1900,  2400,  2500,  3100,  3200,
+  1800,  1900,  2200,  2400,  3300,  3400,
+  1000,  1500,  2500,  2600,  3200,  3400,
+  1000,  1700,  2500,  2600,  3200,  3300,
+  1300,  1700,  2200,  2600,  3000,  3200,
+  900,  1800,  2400,  2600,  3300,  3400,
+  900,  1800,  2300,  2400,  3300,  3400,
+  1000,  1600,  2300,  2400,  3300,  3400,
+  1400,  1900,  2200,  2600,  3300,  3400,
+  1500,  1900,  2300,  2600,  3300,  3400,
+  1300,  2000,  2200,  2500,  3000,  3200,
+  1100,  1800,  2300,  2500,  3200,  3300,
+  1100,  1800,  2400,  2600,  3200,  3300,
+  1100,  1900,  2400,  2700,  3200,  3300,
+  1300,  2000,  2200,  2400,  3200,  3300,
+  1800,  2100,  2400,  2800,  3300,  3400,
+  1700,  2200,  2500,  2700,  3300,  3400,
+  1700,  2000,  2300,  2700,  3200,  3400,
+  1200,  1600,  2500,  2600,  3200,  3400,
+  1100,  1900,  2500,  2600,  3200,  3300,
+  1500,  1600,  2400,  2700,  2900,  3200,
+  1500,  1800,  2500,  2700,  3100,  3400,
+  1600,  1900,  2600,  2800,  3100,  3300,
+  1700,  1800,  2600,  2700,  3000,  3300,
+  1700,  1800,  2500,  2600,  2900,  3200,
+  1700,  1800,  2500,  2600,  3000,  3300,
+  1600,  1700,  2500,  2600,  3000,  3300,
+  1700,  2000,  2400,  2700,  3100,  3400,
+  1700,  1800,  2400,  2600,  2900,  3200,
+  1800,  1900,  2500,  2600,  2900,  3200,
+  1700,  1800,  2200,  2500,  2700,  3200,
+  1700,  1800,  2300,  2500,  2800,  3200,
+  1500,  1600,  2000,  2400,  2600,  2900,
+  1200,  1300,  2100,  2400,  2600,  3200,
+  1700,  2200,  2500,  2900,  3200,  3400,
+  1700,  2200,  2600,  2900,  3400,  3500,
+  1700,  2100,  2700,  2900,  3400,  3500,
+  1500,  1800,  2400,  2600,  3100,  3300,
+  1100,  1700,  2500,  2600,  3200,  3300,
+  1300,  1700,  2600,  2700,  3200,  3400,
+  1400,  1900,  2600,  2800,  3200,  3300,
+  1600,  2000,  2500,  2900,  3300,  3400,
+  1500,  1700,  2500,  2700,  3100,  3300,
+  1800,  2000,  2500,  2700,  2900,  3300,
+  1900,  2000,  2600,  2700,  2900,  3300,
+  1900,  2100,  2400,  2700,  2900,  3200,
+  1900,  2000,  2500,  2700,  3000,  3300,
+  1900,  2000,  2400,  2700,  3000,  3300,
+  1700,  1900,  2500,  2600,  3100,  3400,
+  1600,  1900,  2500,  2600,  3200,  3500,
+  1900,  2100,  2600,  2900,  3200,  3400,
+  2100,  2300,  2700,  2900,  3200,  3300,
+  1600,  2000,  2200,  2400,  3100,  3200,
+  1700,  1900,  2200,  2400,  2900,  3100,
+  1700,  1800,  2100,  2400,  2800,  3200,
+  1900,  2200,  2500,  2700,  3000,  3200,
+  1900,  2300,  2600,  2700,  3100,  3200,
+  1800,  2400,  2600,  2900,  3200,  3300,
+  1800,  2300,  2500,  2900,  3200,  3300,
+  1600,  1800,  2500,  2600,  3300,  3400,
+  1500,  1700,  2200,  2400,  2900,  3200,
+  1500,  1600,  2200,  2300,  2800,  3200,
+  1400,  1500,  2100,  2200,  2800,  3200,
+  1400,  1500,  2100,  2300,  2800,  3200,
+  1400,  1500,  2200,  2400,  2700,  3100,
+  1700,  1900,  2400,  2800,  3100,  3200,
+  1700,  1800,  2400,  2700,  3100,  3300,
+  1800,  1900,  2300,  2700,  2900,  3300,
+  2000,  2100,  2400,  2700,  3000,  3300,
+  1400,  1600,  2500,  2700,  3100,  3400,
+  1000,  1600,  2300,  2400,  3100,  3200,
+  1100,  1700,  2400,  2500,  3200,  3300,
+  1200,  1700,  2300,  2400,  3100,  3200,
+  2000,  2100,  2400,  2500,  3100,  3300,
+  1900,  2000,  2300,  2500,  3100,  3300,
+  1600,  1800,  2300,  2500,  3200,  3300,
+  1400,  1600,  2300,  2400,  3100,  3300,
+  1300,  1500,  2300,  2500,  3000,  3300,
+  1300,  1500,  2300,  2500,  3100,  3200,
+  1300,  1800,  2300,  2600,  3100,  3200,
+  1800,  1900,  2400,  2500,  3000,  3200,
+  1900,  2400,  2600,  3000,  3200,  3300,
+  1400,  1500,  2400,  2600,  2900,  3300,
+  1400,  1500,  2200,  2600,  2800,  3300,
+  1400,  1500,  2200,  2500,  2800,  3200,
+  1400,  1500,  2300,  2500,  3000,  3300,
+  1600,  2000,  2400,  2700,  3200,  3400,
+  1700,  2200,  2600,  2800,  3100,  3300,
+  1800,  2100,  2600,  2700,  3200,  3300,
+  1700,  2200,  2500,  2700,  3200,  3300,
+  1500,  1700,  2200,  2300,  3000,  3300,
+  1600,  1700,  2200,  2500,  3200,  3400,
+  1600,  1800,  2300,  2400,  3100,  3300,
+  1700,  1800,  2200,  2400,  3000,  3300,
+  1700,  1800,  2200,  2300,  3000,  3200,
+  1700,  1800,  2200,  2300,  3100,  3300,
+  1700,  2000,  2200,  2600,  3200,  3300,
+  1800,  1900,  2200,  2500,  3100,  3200,
+  1600,  1700,  2100,  2400,  2900,  3200,
+  1500,  1800,  2300,  2700,  3000,  3300,
+  1500,  1800,  2200,  2600,  3000,  3300,
+  1700,  2000,  2500,  2700,  3200,  3300,
+  1900,  2000,  2600,  2800,  3200,  3400,
+  1800,  1900,  2500,  2800,  3100,  3300,
+  1600,  1800,  2500,  2600,  3000,  3300,
+  1200,  1500,  2500,  2700,  3100,  3200,
+  1100,  1900,  2500,  2600,  3100,  3200,
+  1200,  1900,  2400,  2500,  3100,  3200,
+  1500,  1700,  2100,  2200,  3200,  3300,
+  1600,  1800,  2000,  2200,  3300,  3400,
+  1500,  1600,  1800,  2000,  3300,  3400,
+  1400,  1600,  1800,  1900,  3300,  3400,
+  1400,  1600,  2400,  2600,  3000,  3400,
+  1400,  1800,  2500,  2600,  3100,  3200,
+  1500,  1700,  2400,  2700,  3100,  3300,
+  1500,  1800,  2500,  2700,  3000,  3300,
+  1400,  1500,  2400,  2600,  3000,  3300,
+  1200,  1400,  2300,  2400,  3000,  3200,
+  1200,  1600,  2300,  2400,  3100,  3200,
+  1400,  2000,  2400,  2700,  3100,  3300,
+  1600,  1900,  2300,  2700,  3100,  3200,
+  1500,  1900,  2300,  2700,  3100,  3200,
+  1200,  1400,  2300,  2500,  3100,  3300,
+  1800,  1900,  2400,  2600,  3000,  3100,
+  1800,  1900,  2500,  2600,  2900,  3100,
+  1600,  2000,  2400,  2700,  3000,  3300,
+  1600,  1900,  2400,  2500,  3100,  3300,
+  1600,  1900,  2500,  2600,  3100,  3200,
+  1700,  1800,  2400,  2500,  2900,  3300,
+  1700,  1800,  2300,  2500,  2900,  3200,
+  1700,  1800,  2400,  2500,  3000,  3200,
+  1800,  1900,  2200,  2500,  3000,  3200,
+  1700,  2000,  2300,  2500,  3000,  3200,
+  1800,  2000,  2300,  2500,  3000,  3200,
+  1900,  2100,  2300,  2600,  3000,  3200,
+  1900,  2100,  2400,  2600,  3000,  3300,
+  2000,  2100,  2300,  2500,  3000,  3200,
+  1700,  1800,  2300,  2600,  3100,  3300,
+  1700,  2100,  2500,  2700,  3200,  3400,
+  1700,  1900,  2300,  2500,  3000,  3200,
+  1800,  1900,  2200,  2400,  2900,  3300,
+  1800,  1900,  2300,  2500,  3000,  3300,
+  1800,  2000,  2200,  2500,  2900,  3200,
+  1900,  2200,  2400,  2600,  2900,  3200,
+  1700,  2100,  2600,  2800,  3100,  3300,
+  1800,  2300,  2700,  2900,  3200,  3300,
+  2000,  2300,  2800,  2900,  3100,  3300,
+  2100,  2200,  2600,  2800,  3200,  3300,
+  1800,  1900,  2300,  2400,  3100,  3200,
+  1700,  1800,  2300,  2500,  3000,  3200,
+  1800,  1900,  2300,  2500,  3000,  3200,
+  1800,  1900,  2300,  2600,  3100,  3200,
+  1800,  2000,  2300,  2600,  3100,  3200,
+  1400,  1600,  1800,  2000,  3100,  3300,
+  1300,  1700,  2300,  2400,  3100,  3200,
+  1500,  1700,  2300,  2400,  3100,  3200,
+  1600,  1700,  2300,  2500,  2900,  3100,
+  1500,  1700,  2300,  2500,  2900,  3100,
+  1500,  1700,  2300,  2500,  2800,  3000,
+  1500,  1600,  2300,  2500,  2800,  3200,
+  1400,  1500,  2300,  2600,  3000,  3200,
+  1200,  1600,  2400,  2500,  3000,  3300,
+  1400,  1600,  2200,  2500,  2900,  3200,
+  1500,  1900,  2300,  2600,  2900,  3200,
+  1400,  1800,  2400,  2700,  3200,  3400,
+  1500,  1900,  2400,  2700,  3200,  3400,
+  1700,  2100,  2400,  2800,  3000,  3300,
+  1700,  2000,  2500,  2700,  3100,  3400,
+  1800,  1900,  2400,  2800,  3200,  3300,
+  1800,  1900,  2300,  2900,  3200,  3300,
+  1800,  1900,  2500,  2800,  3200,  3300,
+  1700,  1800,  2400,  2800,  3200,  3300,
+  1700,  1800,  2400,  2700,  3200,  3300,
+  1600,  1700,  2300,  2600,  3000,  3300,
+  1600,  1700,  2200,  2500,  2900,  3300,
+  1500,  1600,  2300,  2500,  3000,  3300,
+  1500,  1900,  2400,  2500,  3300,  3400,
+  1500,  2000,  2400,  2800,  3200,  3300,
+  1400,  1800,  2400,  2700,  3200,  3300,
+  1400,  1900,  2400,  2700,  3200,  3400,
+  1300,  1700,  2300,  2500,  3200,  3400,
+  1100,  1700,  2300,  2400,  3100,  3200,
+  1500,  1700,  1900,  2200,  3300,  3400,
+  1900,  2300,  2600,  2800,  3200,  3400,
+  1900,  2400,  2700,  2800,  3300,  3400,
+  2000,  2300,  2700,  2900,  3400,  3500,
+  1900,  2300,  2700,  2900,  3400,  3500,
+  1900,  2100,  2800,  2900,  3300,  3400,
+  1700,  1800,  2700,  2800,  3100,  3300,
+  1500,  1700,  2700,  2800,  3200,  3300,
+  1500,  1600,  2600,  2700,  3000,  3300,
+  1400,  1600,  2600,  2800,  3000,  3200,
+  1200,  1400,  2600,  2700,  3000,  3200,
+  1000,  1500,  2600,  2800,  3200,  3400,
+  1100,  1300,  2500,  2800,  3000,  3200,
+  1500,  1600,  2500,  2600,  3000,  3300,
+  1400,  1500,  2300,  2600,  2800,  3200,
+  1400,  1600,  2200,  2600,  2800,  3100,
+  1500,  1600,  2300,  2700,  2900,  3200,
+  1400,  1500,  2500,  2600,  3100,  3400,
+  1400,  1500,  2400,  2600,  2800,  3300,
+  1400,  1600,  2400,  2600,  2800,  3200,
+  1300,  1600,  2300,  2600,  2900,  3300,
+  1700,  2200,  2600,  2700,  3200,  3300,
+  1700,  2300,  2600,  2700,  3200,  3300,
+  1700,  1900,  2400,  2600,  3100,  3200,
+  1800,  2300,  2500,  2600,  3200,  3300,
+  1900,  2400,  2500,  2800,  3300,  3400,
+  1800,  2000,  2600,  2800,  3300,  3400,
+  1600,  1900,  2400,  2800,  3200,  3300,
+  1700,  1800,  2600,  2800,  3000,  3300,
+  1900,  2000,  2600,  2800,  3200,  3300,
+  2000,  2100,  2700,  2800,  3200,  3400,
+  2000,  2100,  2600,  2800,  3300,  3400,
+  1600,  1700,  2300,  2600,  2900,  3300,
+  1400,  1600,  2400,  2500,  2800,  3200,
+  1800,  1900,  2500,  2700,  3000,  3400,
+  1900,  2000,  2600,  2700,  3000,  3300,
+  1700,  2000,  2400,  2600,  2900,  3200,
+  1500,  1600,  2300,  2600,  3000,  3300,
+  1500,  1600,  2400,  2600,  2900,  3300,
+  1400,  1500,  2300,  2700,  3000,  3300,
+  1600,  1800,  2500,  2600,  2900,  3200,
+  2000,  2100,  2400,  2600,  3000,  3200,
+  1800,  2000,  2300,  2400,  3200,  3300,
+  1600,  1900,  2300,  2400,  3200,  3300,
+  1500,  1800,  2400,  2700,  3200,  3300,
+  1700,  1900,  2300,  2400,  3000,  3200,
+  2000,  2200,  2400,  2500,  3200,  3300,
+  2200,  2300,  2600,  2700,  3200,  3300,
+  2100,  2200,  2400,  2700,  3000,  3200,
+  2100,  2200,  2500,  2700,  3000,  3200,
+  2200,  2300,  2600,  2800,  3000,  3300,
+  1900,  2200,  2600,  2700,  3000,  3300,
+  1700,  1800,  2500,  2700,  2800,  3200,
+  1700,  1800,  2600,  2700,  3000,  3200,
+  1700,  1900,  2500,  2700,  3100,  3300,
+  1700,  1900,  2500,  2700,  3300,  3400,
+  1800,  2000,  2400,  2600,  3100,  3200,
+  1700,  2200,  2300,  2500,  3200,  3300,
+  1700,  2200,  2300,  2600,  3100,  3200,
+  1600,  1700,  2400,  2600,  3300,  3400,
+  1600,  1700,  2400,  2500,  3300,  3400,
+  1900,  2100,  2500,  2800,  3000,  3100,
+  1800,  2100,  2500,  2800,  3000,  3100,
+  1800,  2100,  2600,  2800,  3100,  3200,
+  1800,  2000,  2500,  2800,  3100,  3200,
+  1900,  2100,  2500,  2600,  3000,  3200,
+  1800,  1900,  2600,  2800,  3200,  3400,
+  1500,  2100,  2500,  2700,  3300,  3400,
+  1100,  2000,  2400,  2600,  3300,  3400,
+  1100,  1900,  2400,  2500,  3300,  3400,
+  1300,  1500,  2200,  2400,  2900,  3300,
+  1600,  1700,  2300,  2500,  2900,  3300,
+  1600,  1700,  2400,  2500,  3000,  3200,
+  1800,  1900,  2500,  2600,  3100,  3300,
+  1900,  2000,  2500,  2700,  3100,  3200,
+  2100,  2200,  2400,  2600,  3100,  3400,
+  2100,  2200,  2500,  2600,  3000,  3400,
+  1900,  2100,  2400,  2700,  3000,  3100,
+  1600,  1800,  2200,  2400,  3000,  3200,
+  1600,  1700,  2200,  2300,  2900,  3300,
+  1600,  1700,  2100,  2300,  2800,  3100,
+  2200,  2300,  2600,  2800,  3100,  3300,
+  2200,  2300,  2700,  2800,  3100,  3400,
+  2000,  2100,  2600,  2800,  3100,  3400,
+  1700,  1800,  2400,  2700,  2900,  3200,
+  1600,  1800,  2400,  2700,  3100,  3200,
+  1600,  1800,  2300,  2400,  3000,  3200,
+  1800,  1900,  2400,  2600,  3100,  3300,
+  1900,  2000,  2300,  2600,  2900,  3200,
+  1900,  2100,  2300,  2700,  2800,  3000,
+  1800,  2000,  2600,  2700,  3000,  3300,
+  1800,  1900,  2400,  2600,  2900,  3300,
+  1700,  1800,  2300,  2400,  2900,  3300,
+  1600,  1700,  2100,  2500,  3000,  3200,
+  1600,  1800,  2200,  2600,  3100,  3200,
+  1500,  1700,  2200,  2500,  2900,  3300,
+  1500,  1600,  2300,  2400,  2800,  3300,
+  1400,  1600,  2300,  2400,  3000,  3300,
+  1500,  2000,  2500,  2800,  3200,  3300,
+  1300,  1500,  2600,  2700,  3100,  3300,
+  1200,  1400,  1700,  1900,  3100,  3300,
+  1200,  1700,  1900,  2300,  3200,  3300,
+  1200,  1900,  2000,  2300,  3200,  3300,
+  1200,  2000,  2100,  2500,  3300,  3400,
+  1200,  2000,  2200,  2600,  3300,  3400,
+  1200,  2000,  2300,  2400,  3200,  3300,
+  1000,  1900,  2300,  2500,  3200,  3300,
+  1200,  1800,  2200,  2500,  3100,  3200,
+  1400,  1600,  2300,  2500,  3200,  3300,
+  1500,  1600,  2500,  2700,  2900,  3200,
+  1600,  1900,  2400,  2800,  3100,  3300,
+  1700,  1800,  2400,  2800,  3100,  3200,
+  1700,  1800,  2500,  2800,  3100,  3200,
+  1500,  1800,  2400,  2500,  2900,  3100,
+  1500,  1600,  2400,  2500,  2900,  3200,
+  1300,  1500,  2200,  2500,  2800,  3100,
+  1300,  1400,  2000,  2400,  2600,  2900,
+  1400,  1500,  2100,  2500,  2700,  3100,
+  1500,  2000,  2300,  2600,  3000,  3200,
+  1700,  2100,  2400,  2600,  2900,  3100,
+  1400,  1500,  2300,  2600,  3000,  3300,
+  1500,  1700,  2200,  2300,  3200,  3300,
+  1400,  1600,  2000,  2400,  3100,  3300,
+  1500,  1700,  2000,  2100,  3100,  3300,
+  1600,  1900,  2200,  2500,  2900,  3200,
+  1500,  1600,  2200,  2400,  2800,  3200,
+  1500,  1600,  2100,  2500,  3000,  3300,
+  1500,  1600,  2000,  2500,  2900,  3300,
+  1500,  1600,  2100,  2500,  2900,  3200,
+  1500,  1600,  2200,  2700,  2800,  3100,
+  1300,  1400,  2200,  2600,  3000,  3200,
+  1400,  1900,  2400,  2700,  3100,  3300,
+  1600,  1800,  2500,  2600,  3000,  3200,
+  1500,  1700,  2300,  2500,  2800,  3200,
+  1700,  1800,  2200,  2400,  3200,  3300,
+  1700,  1900,  2200,  2300,  3000,  3300,
+  1600,  1700,  2000,  2400,  3000,  3200,
+  1700,  1800,  2300,  2600,  2900,  3200,
+  1500,  2000,  2300,  2600,  3100,  3400,
+  1400,  1900,  2500,  2700,  3100,  3300,
+  1400,  1700,  2600,  2700,  3100,  3300,
+  1500,  1600,  2300,  2600,  2800,  3200,
+  1700,  1800,  2300,  2500,  3100,  3400,
+  1500,  1600,  2200,  2300,  3100,  3300,
+  1400,  1500,  2200,  2400,  3100,  3200,
+  1400,  1600,  2200,  2400,  3000,  3100,
+  1700,  2100,  2300,  2700,  3100,  3200,
+  1900,  2300,  2500,  2700,  3100,  3200,
+  1900,  2300,  2600,  2800,  3100,  3300,
+  1900,  2400,  2600,  2900,  3200,  3300,
+  1900,  2300,  2600,  2800,  3300,  3400,
+  1800,  2400,  2600,  2800,  3300,  3400,
+  1600,  1800,  2600,  2700,  3000,  3300,
+  1600,  1700,  2600,  2700,  2900,  3200,
+  1500,  1600,  2500,  2700,  3000,  3300,
+  1300,  1400,  2400,  2700,  2900,  3300,
+  1300,  1400,  2300,  2700,  2800,  3100,
+  1300,  1400,  2500,  2800,  3000,  3300,
+  1500,  1700,  2400,  2500,  2800,  3300,
+  1900,  2000,  2500,  2600,  3000,  3200,
+  1800,  2000,  2400,  2500,  3100,  3200,
+  1700,  1800,  2100,  2300,  2800,  3100,
+  1700,  1800,  2200,  2400,  2800,  3200,
+  1600,  1700,  2200,  2400,  2800,  3200,
+  1500,  1600,  2200,  2400,  2700,  3300,
+  1400,  1500,  2200,  2400,  2900,  3200,
+  1600,  1700,  2300,  2500,  2700,  3000,
+  1600,  1700,  2200,  2500,  2700,  3000,
+  1700,  1900,  2200,  2500,  2800,  3100,
+  1900,  2000,  2300,  2500,  2900,  3100,
+  1900,  2100,  2300,  2500,  2900,  3200,
+  1900,  2100,  2300,  2500,  3100,  3300,
+  2000,  2200,  2600,  2800,  3000,  3200,
+  1900,  2200,  2500,  2700,  2900,  3200,
+  2100,  2300,  2600,  2800,  3100,  3300,
+  2100,  2300,  2600,  2700,  3000,  3200,
+  2100,  2200,  2500,  2600,  3000,  3200,
+  1500,  1600,  2300,  2400,  2900,  3200,
+  1400,  1500,  2100,  2400,  2800,  3100,
+  1300,  1600,  2100,  2400,  3100,  3200,
+  1300,  1400,  2300,  2600,  2800,  3200,
+  1400,  1500,  2200,  2500,  2700,  3200,
+  1400,  1500,  2300,  2500,  2700,  3200,
+  1500,  1600,  2400,  2500,  2800,  3200,
+  1600,  1700,  2400,  2500,  2900,  3200,
+  1700,  1800,  2400,  2500,  2900,  3100,
+  1800,  1900,  2400,  2600,  3000,  3200,
+  2100,  2200,  2700,  2900,  3200,  3300,
+  1800,  2100,  2500,  2900,  3100,  3300,
+  1700,  1800,  2500,  2800,  2900,  3300,
+  1200,  1600,  2100,  2400,  3000,  3200,
+  1600,  1700,  2100,  2600,  2900,  3000,
+  1600,  1700,  2200,  2700,  2900,  3000,
+  1600,  1800,  2200,  2500,  2900,  3000,
+  1700,  1800,  2300,  2500,  2900,  3100,
+  1700,  1900,  2300,  2600,  2900,  3100,
+  1500,  1700,  2000,  2600,  2900,  3100,
+  1400,  1600,  1800,  2600,  3000,  3100,
+  1300,  1500,  1700,  2700,  3100,  3200,
+  1300,  1700,  2400,  2700,  3100,  3300,
+  1200,  1600,  2400,  2600,  2900,  3200,
+  1300,  1400,  2000,  2700,  2800,  3000,
+  1400,  1500,  2000,  2600,  2800,  3000,
+  1500,  1700,  2100,  2600,  2800,  3000,
+  1600,  1800,  2200,  2700,  2800,  3000,
+  1600,  1800,  2100,  2700,  2900,  3100,
+  1500,  1900,  2300,  2700,  3000,  3100,
+  1500,  1900,  2300,  2700,  3000,  3200,
+  1500,  2000,  2300,  2700,  3000,  3200,
+  1800,  2100,  2300,  2700,  3100,  3300,
+  1500,  2000,  2300,  2600,  3000,  3100,
+  1500,  2100,  2300,  2700,  3100,  3200,
+  1600,  2100,  2200,  2700,  3100,  3200,
+  1500,  2100,  2200,  2600,  3100,  3200,
+  1400,  2300,  2500,  2700,  3100,  3200,
+  1700,  2100,  2300,  2700,  2900,  3100,
+  1500,  1800,  2300,  2700,  3000,  3100,
+  1500,  1700,  2300,  2700,  3000,  3100,
+  1500,  1600,  2100,  2700,  3000,  3100,
+  1400,  1500,  1900,  2600,  3100,  3200,
+  1200,  1300,  1900,  2600,  2900,  3100,
+  1100,  1200,  1800,  2700,  3000,  3100,
+  1200,  1300,  1800,  2700,  3000,  3100,
+  1200,  1400,  1900,  2700,  3000,  3100,
+  1300,  1500,  1800,  2600,  3000,  3100,
+  1200,  1400,  2300,  2700,  2900,  3100,
+  1300,  1400,  2200,  2700,  2800,  3100,
+  1300,  1500,  2000,  2600,  2900,  3100,
+  1300,  1500,  2100,  2700,  2900,  3100,
+  1400,  1800,  2100,  2600,  2800,  3000,
+  1400,  1800,  2100,  2500,  2900,  3100,
+  1700,  2000,  2500,  2800,  3000,  3200,
+  1900,  2000,  2700,  2800,  3100,  3400,
+  1900,  2100,  2600,  2800,  3100,  3300,
+  1600,  2100,  2400,  2700,  3200,  3400,
+  1700,  2000,  2300,  2500,  2800,  3200,
+  1500,  1700,  2100,  2300,  3000,  3200,
+  1400,  1900,  2200,  2500,  2900,  3200,
+  1400,  1900,  2300,  2500,  2700,  3100,
+  1300,  1500,  2100,  2700,  2800,  3100,
+  1300,  1500,  2000,  2600,  2800,  3100,
+  1300,  1400,  2100,  2600,  2800,  3000,
+  1300,  1400,  2000,  2600,  2800,  3000,
+  1200,  1300,  2000,  2700,  2800,  3000,
+  1200,  1400,  2300,  2600,  2900,  3200,
+  1300,  1600,  2300,  2700,  2900,  3200,
+  1600,  1900,  2300,  2800,  3100,  3200,
+  1700,  1900,  2300,  2800,  3000,  3200,
+  1700,  1900,  2100,  2600,  2900,  3000,
+  1700,  1900,  2400,  2600,  2800,  3100,
+  1700,  2100,  2400,  2500,  2800,  3100,
+  1700,  2000,  2400,  2500,  2900,  3100,
+  1900,  2200,  2400,  2600,  3000,  3200,
+  1700,  2000,  2400,  2700,  3000,  3100,
+  1500,  1900,  2300,  2600,  3000,  3100,
+  1500,  1600,  2100,  2600,  2900,  3200,
+  1400,  1600,  1800,  2300,  2800,  2900,
+  1400,  1600,  1700,  2500,  3200,  3300,
+  1400,  1600,  1800,  2400,  3200,  3300,
+  1400,  1700,  1900,  2200,  3100,  3200,
+  1300,  1700,  1900,  2300,  3100,  3200,
+  1100,  1600,  2000,  2300,  3000,  3100,
+  1500,  1900,  2500,  2800,  3200,  3300,
+  1800,  2000,  2300,  2800,  3000,  3100,
+  1800,  1900,  2300,  2700,  2900,  3200,
+  1700,  1900,  2300,  2600,  2800,  3100,
+  1700,  1900,  2100,  2500,  2700,  3000,
+  1700,  1900,  2100,  2600,  2800,  3000,
+  1700,  1900,  2100,  2700,  2900,  3100,
+  1700,  1900,  2500,  2800,  3000,  3300
+};
+
+const struct lsp_codebook lsp_cbjnd[] = {
+  /* codebook/lsp1.txt */
+  {
+    1,
+    4,
+    16,
+    codes0
+  },
+  /* codebook/lsp2.txt */
+  {
+    1,
+    4,
+    16,
+    codes1
+  },
+  /* codebook/lsp3.txt */
+  {
+    1,
+    4,
+    16,
+    codes2
+  },
+  /* codebook/lsp4.txt */
+  {
+    1,
+    4,
+    16,
+    codes3
+  },
+  /* ../unittest/lspjnd5-10.txt */
+  {
+    6,
+    11.7181,
+    3369,
+    codes4
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookjvm.c b/libs/libcodec2/src/codebookjvm.c
new file mode 100644 (file)
index 0000000..917674e
--- /dev/null
@@ -0,0 +1,1579 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/lspjvm1.txt */
+static const float codes0[] = {
+  0.435217,  0.668864,  1.0103,  1.22042,  1.50398,  1.78468,  2.13546,  2.35747,  2.61891,  2.73804,
+  0.179285,  0.33316,  0.500638,  0.79695,  1.03999,  1.23497,  1.6523,  1.84823,  2.62556,  2.80497,
+  0.268785,  0.356576,  0.595753,  1.04434,  1.24938,  1.42868,  1.68699,  1.86469,  2.33991,  2.5138,
+  0.12007,  0.165585,  0.484694,  0.95916,  1.23753,  1.52915,  1.83751,  2.10773,  2.48749,  2.76685,
+  0.150214,  0.229487,  0.62824,  0.961255,  1.33706,  1.59831,  1.91974,  2.21786,  2.53732,  2.75956,
+  0.268624,  0.34598,  0.569637,  0.754737,  0.916538,  1.50854,  1.78635,  1.95442,  2.36953,  2.50182,
+  0.246064,  0.468874,  0.662711,  0.890015,  1.14715,  1.51043,  1.78106,  2.09594,  2.65539,  2.80037,
+  0.191631,  0.280628,  0.393229,  0.611761,  1.42017,  1.70774,  1.87303,  2.10155,  2.28035,  2.49949,
+  0.361668,  0.507047,  0.789974,  1.04599,  1.50238,  1.67703,  1.90534,  2.16255,  2.43226,  2.59087,
+  0.20816,  0.294285,  0.448634,  0.694229,  0.872517,  1.07032,  1.70335,  2.16874,  2.42619,  2.60366,
+  0.316939,  0.513618,  0.705487,  0.917036,  1.17599,  1.31114,  1.6186,  2.03784,  2.45052,  2.5794,
+  0.241068,  0.377728,  0.521595,  0.717203,  1.31041,  1.53999,  1.73643,  2.09893,  2.29792,  2.58735,
+  0.234937,  0.281875,  0.780422,  1.44073,  1.60943,  1.75643,  1.97721,  2.14861,  2.60203,  2.7225,
+  0.178679,  0.242672,  0.416988,  0.708348,  0.95562,  1.17667,  1.7818,  2.05449,  2.28159,  2.44811,
+  0.345036,  0.42108,  0.740887,  1.16544,  1.32494,  1.4888,  1.76346,  1.90617,  2.39505,  2.64916,
+  0.249586,  0.357494,  0.520747,  0.847195,  1.42841,  1.59778,  1.77819,  2.1785,  2.41344,  2.56466,
+  0.295235,  0.574231,  1.2491,  1.4641,  1.72756,  1.92679,  2.09536,  2.28483,  2.56707,  2.72248,
+  0.34193,  0.427307,  0.634001,  0.804212,  0.905629,  1.33337,  1.79033,  1.89276,  2.44582,  2.60283,
+  0.363948,  0.508985,  0.667357,  0.946354,  1.43756,  1.62654,  1.81114,  2.03909,  2.29188,  2.43549,
+  0.163514,  0.277407,  0.409207,  0.902065,  1.18907,  1.33964,  1.80241,  1.96077,  2.65293,  2.81899,
+  0.302643,  0.359753,  0.651207,  1.20802,  1.4237,  1.54815,  1.88213,  2.01559,  2.26054,  2.5789,
+  0.155928,  0.216908,  0.381812,  0.654803,  1.11237,  1.58993,  1.84756,  1.97672,  2.22408,  2.72534,
+  0.274981,  0.347675,  0.572,  0.736046,  0.894248,  1.63237,  1.89139,  2.05689,  2.6029,  2.72178,
+  0.154496,  0.243461,  0.348174,  0.689505,  1.57381,  1.70031,  1.94318,  2.10158,  2.56466,  2.77317,
+  0.292612,  0.466612,  0.795936,  1.04747,  1.41369,  1.75085,  2.06289,  2.34007,  2.61361,  2.76949,
+  0.242896,  0.3615,  0.555859,  0.793597,  0.932291,  1.40947,  1.86386,  2.00953,  2.4645,  2.67749,
+  0.221646,  0.344724,  0.554564,  0.729403,  1.13657,  1.30177,  1.52918,  2.16359,  2.39582,  2.61081,
+  0.160969,  0.224467,  0.371545,  0.626879,  1.16095,  1.44423,  1.67597,  1.87978,  2.47859,  2.67202,
+  0.214172,  0.341585,  0.676575,  0.977397,  1.32543,  1.7201,  2.07259,  2.36954,  2.63528,  2.77879,
+  0.203311,  0.289438,  0.458739,  0.914153,  1.12288,  1.30292,  1.58384,  1.88683,  2.18787,  2.42704,
+  0.280383,  0.3716,  0.824827,  1.10025,  1.23623,  1.39892,  1.57804,  2.016,  2.36897,  2.50673,
+  0.170627,  0.251778,  0.393686,  0.608347,  1.2876,  1.44667,  1.79328,  2.03655,  2.31015,  2.75244,
+  0.18058,  0.288746,  0.987854,  1.43171,  1.67722,  1.91566,  2.12494,  2.28945,  2.58961,  2.75426,
+  0.176335,  0.266263,  0.445421,  0.706403,  0.875402,  1.42292,  1.75867,  1.96091,  2.41068,  2.60175,
+  0.216173,  0.287404,  0.480696,  1.00977,  1.2913,  1.47664,  1.89558,  2.06429,  2.28406,  2.48311,
+  0.176523,  0.273934,  0.403407,  0.966139,  1.30472,  1.43661,  1.94473,  2.08484,  2.54446,  2.76242,
+  0.311836,  0.550501,  0.879591,  1.09623,  1.27666,  1.47786,  1.81771,  2.15434,  2.56047,  2.77984,
+  0.179765,  0.25056,  0.455939,  1.02389,  1.22513,  1.47566,  1.73462,  1.91871,  2.14734,  2.43824,
+  0.271033,  0.457235,  0.599622,  0.821049,  0.940125,  1.20094,  1.84972,  1.98666,  2.54817,  2.75158,
+  0.179326,  0.248002,  0.426405,  0.81706,  1.28589,  1.56502,  2.11736,  2.29871,  2.5724,  2.7527,
+  0.374409,  0.535936,  0.897009,  1.18507,  1.59157,  1.7572,  1.96794,  2.17999,  2.45739,  2.62264,
+  0.185472,  0.282752,  0.409439,  0.657499,  0.856446,  1.0294,  1.87993,  2.06932,  2.34474,  2.7531,
+  0.375964,  0.578457,  0.758945,  0.929339,  1.12748,  1.25944,  1.70411,  2.12297,  2.33603,  2.4983,
+  0.225641,  0.36103,  0.501679,  0.783379,  1.31485,  1.45262,  1.71415,  1.98716,  2.2257,  2.72436,
+  0.144996,  0.252919,  0.632145,  1.22604,  1.57534,  1.90155,  2.17148,  2.39055,  2.68229,  2.80983,
+  0.172022,  0.263338,  0.448634,  0.729435,  0.984007,  1.1716,  1.75705,  1.99023,  2.32131,  2.77121,
+  0.235731,  0.351117,  0.796871,  1.05571,  1.30022,  1.59182,  1.89587,  2.12292,  2.41789,  2.59982,
+  0.254053,  0.319371,  0.455623,  1.08614,  1.66467,  1.91588,  2.05908,  2.23342,  2.45204,  2.58679,
+  0.375538,  0.742993,  1.13991,  1.33776,  1.73556,  2.01391,  2.31501,  2.48343,  2.65158,  2.75521,
+  0.247245,  0.481131,  0.710366,  0.897602,  1.12109,  1.27171,  1.78735,  2.1995,  2.42966,  2.74067,
+  0.226103,  0.311441,  0.501648,  0.844424,  1.36282,  1.53134,  1.77747,  1.98993,  2.18749,  2.3585,
+  0.195862,  0.296224,  0.609554,  0.783241,  1.24347,  1.44548,  1.63703,  2.02264,  2.48356,  2.64614,
+  0.233302,  0.299441,  0.472792,  1.24946,  1.45788,  1.60186,  1.83143,  1.99372,  2.59719,  2.75543,
+  0.168096,  0.224183,  0.3827,  0.596214,  1.06059,  1.29442,  1.60576,  1.84849,  2.3577,  2.56919,
+  0.33005,  0.445912,  0.661713,  0.874446,  1.00079,  1.45297,  1.94399,  2.07692,  2.42388,  2.61236,
+  0.226382,  0.287303,  0.517631,  0.806229,  1.30901,  1.88528,  2.16051,  2.28641,  2.52638,  2.66082,
+  0.20317,  0.499314,  0.887358,  1.23507,  1.46292,  1.69826,  1.99932,  2.22922,  2.57161,  2.76669,
+  0.307531,  0.378353,  0.573606,  0.712218,  0.850169,  1.309,  2.05909,  2.26382,  2.49794,  2.67682,
+  0.276203,  0.51025,  0.6868,  0.902844,  1.2052,  1.32798,  1.71889,  2.03895,  2.25639,  2.69715,
+  0.161948,  0.229115,  0.393619,  0.683613,  1.13781,  1.32269,  1.78372,  1.96158,  2.38907,  2.63608,
+  0.201334,  0.276773,  0.468994,  0.967017,  1.47597,  1.63242,  1.96577,  2.19728,  2.48059,  2.70155,
+  0.214587,  0.315421,  0.469498,  0.733397,  1.146,  1.27791,  1.72784,  2.22713,  2.44026,  2.68112,
+  0.255602,  0.394609,  0.743393,  0.977796,  1.19908,  1.40597,  1.91834,  2.22483,  2.47919,  2.66339,
+  0.245989,  0.352625,  0.517055,  0.80283,  1.55871,  1.79565,  1.94405,  2.13364,  2.33327,  2.47998,
+  0.337423,  0.480433,  0.869036,  1.13957,  1.63076,  1.82296,  2.07484,  2.29261,  2.47913,  2.62532,
+  0.220974,  0.35885,  0.57164,  0.752791,  0.937013,  1.15172,  1.6744,  2.06247,  2.55872,  2.78484,
+  0.267518,  0.331708,  0.541111,  1.11655,  1.41112,  1.53287,  1.79295,  1.93352,  2.24894,  2.62864,
+  0.084613,  0.105083,  0.297424,  0.916949,  1.2563,  1.56703,  1.88539,  2.18987,  2.52279,  2.7921,
+  0.205328,  0.287223,  0.724462,  1.0324,  1.45771,  1.64217,  1.92563,  2.17552,  2.42964,  2.60549,
+  0.232554,  0.338724,  0.502115,  0.859975,  1.04409,  1.24565,  1.80656,  1.99964,  2.26116,  2.45998,
+  0.291638,  0.379172,  0.626072,  0.792796,  0.959124,  1.50489,  1.73447,  1.91961,  2.61436,  2.72271,
+  0.191554,  0.263114,  0.426797,  0.610628,  1.07741,  1.82954,  2.02195,  2.21057,  2.42765,  2.61383,
+  0.389151,  0.679476,  0.915414,  1.03664,  1.25085,  1.58661,  2.04097,  2.2815,  2.56794,  2.71882,
+  0.2032,  0.30128,  0.470357,  0.668716,  0.851737,  0.980327,  1.57086,  2.03762,  2.28907,  2.69388,
+  0.304064,  0.405934,  0.710274,  0.962705,  1.12882,  1.34167,  1.63505,  1.84538,  2.07992,  2.50751,
+  0.171777,  0.240705,  0.409371,  0.786432,  1.2232,  1.37569,  1.69176,  1.86608,  2.35041,  2.49394,
+  0.231251,  0.277994,  0.557867,  1.32582,  1.66035,  1.77948,  2.00714,  2.17232,  2.44046,  2.65231,
+  0.188101,  0.259494,  0.412543,  0.624843,  0.839549,  1.0337,  1.63413,  1.93194,  2.24608,  2.42577,
+  0.361304,  0.419465,  0.795676,  1.18461,  1.2968,  1.57845,  1.84175,  1.99736,  2.54054,  2.68714,
+  0.274372,  0.338938,  0.492443,  0.963516,  1.50951,  1.70638,  1.86988,  2.07717,  2.26128,  2.44418,
+  0.41599,  0.652103,  1.03129,  1.26955,  1.57275,  1.77297,  2.00466,  2.17527,  2.43061,  2.59655,
+  0.242045,  0.370942,  0.534392,  0.763529,  1.00117,  1.12976,  1.68219,  2.14464,  2.32448,  2.7157,
+  0.377438,  0.588168,  0.765394,  0.976873,  1.35665,  1.49009,  1.73797,  2.00677,  2.21369,  2.38997,
+  0.191625,  0.284123,  0.405342,  1.01678,  1.43273,  1.54759,  1.81393,  1.95832,  2.47077,  2.64926,
+  0.272672,  0.349555,  0.633911,  1.15223,  1.30394,  1.54764,  1.9195,  2.0477,  2.56278,  2.73058,
+  0.168423,  0.23633,  0.421468,  0.831345,  1.08354,  1.55345,  1.88073,  2.0647,  2.37086,  2.63295,
+  0.219318,  0.301481,  0.513617,  0.765086,  1.02602,  1.51465,  2.0482,  2.24857,  2.49981,  2.65707,
+  0.232695,  0.347947,  0.495203,  0.71883,  1.42301,  1.72249,  1.87958,  2.16504,  2.42025,  2.58966,
+  0.270284,  0.336865,  0.684929,  1.15579,  1.69042,  1.87674,  2.02736,  2.22618,  2.44675,  2.582,
+  0.149701,  0.193747,  0.352019,  0.520123,  0.823974,  1.43475,  1.68659,  1.96115,  2.37091,  2.69307,
+  0.254818,  0.412303,  0.601514,  0.771438,  1.17545,  1.37657,  1.53903,  1.93704,  2.40858,  2.56362,
+  0.233713,  0.355886,  0.593725,  0.76288,  1.27148,  1.5639,  1.79752,  2.09469,  2.53863,  2.71173,
+  0.179028,  0.237103,  0.396818,  1.04202,  1.63354,  1.76268,  2.12393,  2.32239,  2.58819,  2.75134,
+  0.182027,  0.251039,  0.434581,  0.714302,  0.950997,  1.4379,  1.81357,  1.9691,  2.14588,  2.35397,
+  0.501538,  0.692148,  0.84886,  1.07131,  1.35054,  1.48948,  1.84164,  2.10428,  2.34154,  2.51529,
+  0.27453,  0.38147,  0.526682,  0.922143,  1.44495,  1.5736,  1.85877,  2.06675,  2.2848,  2.62682,
+  0.360617,  0.583131,  0.979491,  1.25408,  1.48835,  1.79756,  2.21952,  2.48218,  2.74237,  2.86203,
+  0.140913,  0.220301,  0.619552,  0.818307,  1.05243,  1.33997,  1.83073,  2.13395,  2.53638,  2.75113,
+  0.293514,  0.391691,  0.79008,  0.96274,  1.16032,  1.5266,  1.80549,  2.04146,  2.36162,  2.56496,
+  0.199542,  0.290571,  0.452891,  0.689515,  1.25853,  1.40988,  1.88624,  2.22813,  2.46568,  2.72665,
+  0.29692,  0.356356,  0.784287,  0.99654,  1.14618,  1.62387,  1.8155,  2.0383,  2.60063,  2.7057,
+  0.206451,  0.276025,  0.537547,  0.802572,  1.22041,  1.64206,  1.86363,  2.00198,  2.21534,  2.58538,
+  0.33365,  0.464751,  0.653772,  0.966306,  1.10387,  1.3402,  1.7847,  1.91459,  2.47017,  2.68692,
+  0.181861,  0.24487,  0.376456,  0.554383,  1.3299,  1.81044,  2.04784,  2.20232,  2.66086,  2.81706,
+  0.450565,  0.647291,  0.951172,  1.22943,  1.51964,  1.68681,  2.04911,  2.26717,  2.50128,  2.6506,
+  0.219996,  0.320591,  0.427747,  0.601183,  0.753448,  0.929578,  1.74198,  2.28579,  2.47263,  2.74957,
+  0.333848,  0.423373,  0.658791,  1.0313,  1.22263,  1.36577,  1.90189,  2.1211,  2.29031,  2.53118,
+  0.166064,  0.233902,  0.383355,  0.661806,  1.22657,  1.39968,  1.77127,  1.97454,  2.17349,  2.56634,
+  0.189286,  0.243602,  0.390584,  1.38793,  1.58872,  1.76324,  2.09112,  2.31631,  2.59353,  2.75508,
+  0.158404,  0.224878,  0.385,  0.668463,  0.942954,  1.41197,  1.70031,  1.82807,  2.0594,  2.69255,
+  0.325989,  0.461263,  0.851471,  1.04571,  1.28403,  1.5162,  1.79734,  2.08839,  2.43767,  2.62721,
+  0.223709,  0.28919,  0.632812,  0.858738,  1.5419,  1.74677,  1.93574,  2.18482,  2.40433,  2.58301,
+  0.545842,  0.95242,  1.34082,  1.51684,  1.83888,  2.01289,  2.24497,  2.40317,  2.59228,  2.69112,
+  0.238526,  0.349079,  0.494582,  0.987665,  1.17075,  1.34823,  1.46864,  2.29696,  2.64416,  2.78738,
+  0.270857,  0.442003,  0.655998,  0.881913,  1.25925,  1.42836,  1.76987,  1.99853,  2.39559,  2.65284,
+  0.154384,  0.211806,  0.489481,  0.997257,  1.24982,  1.54123,  1.77886,  1.9494,  2.31914,  2.62339,
+  0.268258,  0.312888,  0.589114,  1.25863,  1.57271,  1.67543,  1.91278,  2.07046,  2.27993,  2.56423,
+  0.170715,  0.224965,  0.374011,  0.540197,  1.16189,  1.49907,  1.92587,  2.08257,  2.24662,  2.46972,
+  0.324358,  0.391989,  0.706816,  0.833614,  1.01573,  1.56899,  1.73598,  2.12707,  2.55841,  2.65387,
+  0.178059,  0.258575,  0.374125,  0.536831,  1.33483,  1.79863,  1.98698,  2.18925,  2.43227,  2.6267,
+  0.198857,  0.420955,  0.817664,  1.17836,  1.46674,  1.8213,  2.20733,  2.47441,  2.73828,  2.85119,
+  0.188344,  0.324302,  0.470468,  0.790033,  0.934101,  1.18872,  1.88717,  2.05283,  2.44832,  2.63024,
+  0.201295,  0.365646,  0.526513,  0.758388,  1.1401,  1.26733,  1.65017,  1.87934,  2.10289,  2.60029,
+  0.135058,  0.169428,  0.307348,  0.50316,  1.01808,  1.44795,  1.81098,  2.134,  2.48028,  2.75985,
+  0.178006,  0.26661,  0.390327,  0.928681,  1.50161,  1.62133,  1.87136,  2.02586,  2.58044,  2.7708,
+  0.246182,  0.42429,  0.644023,  0.801168,  1.11488,  1.27776,  1.50332,  2.07489,  2.2957,  2.50138,
+  0.322996,  0.430355,  0.6316,  1.0477,  1.22184,  1.42673,  1.90308,  2.03222,  2.51673,  2.70845,
+  0.292994,  0.430599,  0.619178,  0.794567,  1.28303,  1.65282,  1.84084,  2.06995,  2.38538,  2.52825,
+  0.525494,  0.787797,  1.12182,  1.38748,  1.67457,  1.93622,  2.22404,  2.39062,  2.63428,  2.74323,
+  0.299504,  0.409196,  0.602235,  0.892336,  1.05643,  1.25377,  1.48914,  1.63988,  2.42748,  2.65037,
+  0.423758,  0.52048,  0.758987,  1.04126,  1.17366,  1.42368,  1.81824,  1.93641,  2.363,  2.62664,
+  0.155042,  0.247496,  0.641445,  0.954509,  1.22497,  1.46585,  1.83784,  2.09046,  2.4515,  2.71616,
+  0.251949,  0.421094,  0.706797,  0.975659,  1.25991,  1.52007,  1.81631,  2.12202,  2.47491,  2.71667,
+  0.21522,  0.302248,  0.730598,  0.896343,  1.14557,  1.37019,  1.70069,  2.02256,  2.28327,  2.48922,
+  0.28523,  0.453559,  0.66367,  0.861526,  1.0116,  1.24742,  1.65598,  1.86129,  2.57894,  2.73133,
+  0.162067,  0.219409,  0.373433,  0.544669,  1.1033,  1.59718,  1.92104,  2.1434,  2.4065,  2.66048,
+  0.342367,  0.511499,  0.93135,  1.16322,  1.39365,  1.61115,  1.97277,  2.19442,  2.47077,  2.64926,
+  0.25101,  0.364125,  0.560956,  0.746545,  1.01984,  1.17072,  1.53295,  2.28867,  2.57709,  2.72307,
+  0.315001,  0.489412,  0.720682,  0.877607,  1.09047,  1.25385,  1.44822,  1.92295,  2.25589,  2.40863,
+  0.174666,  0.235793,  0.387644,  0.554402,  1.23109,  1.45614,  1.68803,  2.12745,  2.36703,  2.59727,
+  0.215113,  0.341915,  1.04372,  1.32275,  1.49541,  1.74189,  1.96116,  2.23982,  2.5449,  2.70394,
+  0.219852,  0.30177,  0.513912,  0.705474,  0.87754,  1.2959,  1.699,  1.98706,  2.28797,  2.49697,
+  0.290638,  0.366442,  0.655155,  1.04499,  1.17215,  1.53254,  1.80079,  1.94893,  2.50968,  2.66005,
+  0.232252,  0.31377,  0.658552,  0.941977,  1.46317,  1.66549,  1.86246,  2.02784,  2.53402,  2.70124,
+  0.326539,  0.552681,  1.12173,  1.33138,  1.52007,  1.86708,  2.08286,  2.33247,  2.60604,  2.73709,
+  0.190254,  0.340428,  0.492777,  0.739738,  0.895461,  1.07937,  1.64316,  1.79529,  2.49182,  2.72938,
+  0.283586,  0.41844,  0.587306,  0.870866,  1.41855,  1.57703,  1.7995,  2.0694,  2.27448,  2.4381,
+  0.235752,  0.35765,  0.502891,  1.01243,  1.25885,  1.40779,  1.82006,  1.95583,  2.5059,  2.73433,
+  0.278412,  0.343137,  0.849977,  1.2329,  1.3505,  1.59063,  1.78752,  2.09158,  2.54136,  2.66386,
+  0.162966,  0.243159,  0.439238,  0.684821,  0.887783,  1.4629,  1.88174,  2.04425,  2.28939,  2.705,
+  0.235063,  0.371799,  0.57821,  0.752199,  1.00855,  1.47628,  1.80491,  2.2714,  2.65504,  2.78965,
+  0.154939,  0.223696,  0.344718,  0.667555,  1.49566,  1.66944,  2.06988,  2.30721,  2.62769,  2.81134,
+  0.239702,  0.335917,  0.716616,  1.1318,  1.45251,  1.63913,  2.10552,  2.27982,  2.50203,  2.66922,
+  0.226818,  0.331261,  0.472705,  0.651974,  0.781639,  1.2198,  1.8229,  2.08273,  2.43933,  2.6109,
+  0.223413,  0.359594,  0.534704,  0.741518,  1.22589,  1.38987,  1.61819,  2.00991,  2.207,  2.45984,
+  0.171308,  0.268378,  0.383799,  0.858926,  1.37629,  1.51917,  1.7806,  1.92291,  2.62309,  2.8024,
+  0.140134,  0.21232,  0.443224,  0.967457,  1.26424,  1.56215,  1.92915,  2.21739,  2.66834,  2.83075,
+  0.221323,  0.322124,  0.485563,  0.818589,  1.01184,  1.19898,  1.42362,  1.6694,  2.15752,  2.36319,
+  0.369687,  0.525655,  0.719213,  0.939654,  1.13763,  1.31222,  1.59994,  1.82681,  2.35522,  2.58068,
+  0.211975,  0.314411,  0.489148,  0.739213,  1.3778,  1.5545,  1.82437,  2.15887,  2.35299,  2.72262,
+  0.170698,  0.296368,  0.934285,  1.24313,  1.5559,  1.86654,  2.15994,  2.36344,  2.58503,  2.73853,
+  0.189263,  0.305887,  0.439912,  0.78461,  1.22726,  1.34251,  1.58765,  1.75491,  2.43989,  2.72131,
+  0.296339,  0.385169,  0.612012,  1.08132,  1.27636,  1.43718,  1.87147,  2.00172,  2.33909,  2.64022,
+  0.229588,  0.320544,  0.517278,  0.969137,  1.14256,  1.62609,  1.87792,  2.11546,  2.54674,  2.70802,
+  0.248869,  0.420193,  0.732388,  1.04902,  1.30341,  1.60146,  1.94921,  2.23946,  2.64822,  2.82261,
+  0.2076,  0.29232,  0.496539,  0.857149,  1.18229,  1.39985,  1.71416,  1.86824,  2.02794,  2.20074,
+  0.225558,  0.396897,  0.541783,  0.873366,  1.17897,  1.29958,  1.67719,  1.8496,  2.33048,  2.75272,
+  0.176821,  0.231377,  0.372767,  0.508565,  1.15282,  1.80805,  2.11268,  2.25007,  2.57134,  2.74855,
+  0.352149,  0.515765,  1.02324,  1.26022,  1.44357,  1.62207,  1.8728,  2.10018,  2.48928,  2.67104,
+  0.166138,  0.263444,  0.370151,  0.590066,  0.754819,  0.940533,  1.76187,  1.94661,  2.44501,  2.75819,
+  0.342082,  0.476411,  0.656223,  0.851774,  1.00399,  1.15337,  1.6944,  2.06562,  2.25564,  2.44015,
+  0.227237,  0.376514,  0.514329,  0.894887,  1.14167,  1.28305,  1.83138,  1.9859,  2.33447,  2.78488,
+  0.215891,  0.269548,  0.684111,  1.40566,  1.67481,  1.80093,  2.17209,  2.3394,  2.59157,  2.7301,
+  0.23624,  0.400377,  0.533684,  0.750343,  0.910405,  1.08911,  1.73773,  1.91281,  2.19252,  2.68873,
+  0.169242,  0.284879,  0.916252,  1.16977,  1.43368,  1.64438,  1.91912,  2.16162,  2.48266,  2.68259,
+  0.270731,  0.336506,  0.477594,  1.04271,  1.60584,  1.79686,  1.94591,  2.16004,  2.35491,  2.52095,
+  0.420586,  0.652563,  1.11716,  1.40601,  1.74754,  1.94742,  2.20309,  2.35997,  2.5479,  2.68217,
+  0.281552,  0.395037,  0.640181,  0.944531,  1.19396,  1.33049,  1.71866,  2.18839,  2.44459,  2.57867,
+  0.311824,  0.476892,  0.633431,  0.845825,  1.33252,  1.49166,  1.69361,  2.04108,  2.28932,  2.4394,
+  0.133945,  0.20079,  0.647237,  0.927687,  1.18888,  1.36966,  1.69956,  1.97278,  2.29526,  2.67818,
+  0.204796,  0.278215,  0.443465,  1.27048,  1.40521,  1.64092,  1.82425,  2.32709,  2.59964,  2.77253,
+  0.18397,  0.244116,  0.410594,  0.639103,  1.22159,  1.40487,  1.62836,  1.90244,  2.16863,  2.3068,
+  0.343622,  0.434735,  0.666599,  0.868069,  1.04894,  1.53278,  1.81983,  1.97188,  2.2887,  2.44875,
+  0.238017,  0.320361,  0.657255,  0.917611,  1.30331,  1.72736,  1.98891,  2.18145,  2.44297,  2.61332,
+  0.323613,  0.545056,  0.930173,  1.22606,  1.44018,  1.7723,  2.05689,  2.34781,  2.68938,  2.82062,
+  0.28893,  0.401387,  0.617124,  0.836453,  0.990306,  1.26123,  1.91328,  2.11005,  2.32458,  2.55716,
+  0.33267,  0.480804,  0.656147,  0.880536,  1.02957,  1.23049,  1.76906,  1.9323,  2.20037,  2.58521,
+  0.185551,  0.265352,  0.409432,  0.608847,  1.0347,  1.22282,  1.87697,  2.17165,  2.4035,  2.66644,
+  0.155026,  0.223348,  0.401684,  1.07914,  1.41579,  1.62002,  2.04552,  2.25851,  2.63162,  2.80229,
+  0.183461,  0.263081,  0.425694,  0.635685,  1.18866,  1.35756,  1.57499,  2.08598,  2.28872,  2.51111,
+  0.314738,  0.463011,  0.648733,  0.877651,  1.00289,  1.26581,  2.00541,  2.1981,  2.48153,  2.71418,
+  0.244411,  0.318444,  0.546578,  0.793615,  1.32615,  1.73548,  1.9456,  2.11466,  2.31535,  2.47853,
+  0.326237,  0.54354,  0.987361,  1.30441,  1.68493,  1.90215,  2.20717,  2.37427,  2.55753,  2.71622,
+  0.157795,  0.283302,  0.430398,  0.660379,  0.81106,  1.14254,  1.4793,  1.71871,  2.67026,  2.84756,
+  0.220856,  0.283872,  0.779935,  1.07494,  1.31221,  1.62633,  1.83761,  1.96888,  2.15599,  2.60238,
+  0.140763,  0.205719,  0.406561,  0.762459,  1.04127,  1.48699,  1.83831,  2.11461,  2.55281,  2.77228,
+  0.140451,  0.39592,  0.79211,  1.108,  1.40264,  1.62308,  1.94315,  2.22795,  2.54616,  2.774,
+  0.229862,  0.336462,  0.54659,  0.81015,  1.20191,  1.34679,  1.82532,  2.09293,  2.28573,  2.47336,
+  0.224913,  0.328246,  0.517269,  0.874793,  1.01259,  1.45218,  1.69578,  2.01493,  2.51145,  2.67257,
+  0.247745,  0.335741,  0.546558,  0.710177,  1.17056,  1.72779,  1.97068,  2.15853,  2.48282,  2.62891,
+  0.398252,  0.555087,  0.890367,  1.1212,  1.38153,  1.60123,  1.86665,  2.06661,  2.40516,  2.58802,
+  0.198563,  0.288867,  0.478054,  0.658477,  0.851841,  1.0271,  1.53974,  2.02111,  2.57946,  2.78418,
+  0.304271,  0.371642,  0.66159,  1.06898,  1.22425,  1.41193,  1.68052,  1.86977,  2.10007,  2.30855,
+  0.188223,  0.257939,  0.432402,  0.73505,  1.31804,  1.48553,  1.82811,  2.04644,  2.30702,  2.45724,
+  0.246723,  0.297276,  0.604475,  1.3109,  1.57044,  1.68885,  1.91366,  2.05133,  2.55601,  2.71497,
+  0.158309,  0.234509,  0.435792,  0.6679,  0.957567,  1.23592,  1.59294,  1.81816,  2.30739,  2.76897,
+  0.419843,  0.501412,  0.766892,  1.07317,  1.18937,  1.48022,  1.7666,  1.92215,  2.53794,  2.69477,
+  0.27514,  0.335563,  0.678421,  1.08152,  1.59238,  1.77263,  1.93124,  2.1407,  2.3338,  2.49086,
+  0.372056,  0.856814,  1.23954,  1.40999,  1.6903,  1.86302,  2.0727,  2.27355,  2.53266,  2.69052,
+  0.321254,  0.422981,  0.604856,  0.793437,  0.912112,  1.12845,  1.79598,  2.17323,  2.36015,  2.53614,
+  0.395214,  0.598779,  0.771997,  0.946713,  1.21378,  1.33043,  1.66033,  1.97715,  2.16506,  2.34402,
+  0.225286,  0.317828,  0.464801,  1.11233,  1.36951,  1.512,  1.92195,  2.05341,  2.59352,  2.77729,
+  0.330612,  0.407807,  0.730129,  1.25973,  1.45981,  1.60567,  1.98131,  2.13701,  2.46597,  2.67972,
+  0.213145,  0.305305,  0.507016,  0.662299,  1.05685,  1.47986,  1.6719,  2.10271,  2.36987,  2.58199,
+  0.219658,  0.296096,  0.443507,  0.610973,  0.799691,  1.67658,  1.96549,  2.15323,  2.50223,  2.693,
+  0.174947,  0.257739,  0.373547,  0.552567,  1.40532,  1.61425,  1.84892,  2.11779,  2.31788,  2.7119,
+  0.209667,  0.297529,  0.756195,  1.0953,  1.5642,  1.84477,  2.1037,  2.29266,  2.52005,  2.67949,
+  0.170138,  0.24031,  0.452247,  0.684414,  0.880102,  1.36692,  1.74165,  2.13129,  2.50573,  2.73261,
+  0.278164,  0.468635,  0.707518,  0.853693,  1.05478,  1.21046,  1.54094,  2.17456,  2.41066,  2.61214,
+  0.155738,  0.23889,  0.352836,  0.621012,  1.44144,  1.6197,  1.82517,  1.97533,  2.52537,  2.74857,
+  0.223776,  0.274424,  0.479048,  0.797871,  1.69419,  1.87813,  2.13528,  2.37373,  2.59542,  2.72979,
+  0.151088,  0.198286,  0.326558,  0.536276,  0.845893,  1.14165,  1.46056,  1.76287,  2.02585,  2.1773,
+  0.434445,  0.614208,  0.887657,  1.02845,  1.19136,  1.3922,  1.78689,  2.06248,  2.4234,  2.61936,
+  0.180755,  0.275311,  0.397787,  0.859366,  1.40976,  1.52332,  1.90885,  2.08232,  2.38972,  2.74389,
+  0.275975,  0.508416,  0.889894,  1.31893,  1.63331,  1.90473,  2.16901,  2.37466,  2.72697,  2.84767,
+  0.156239,  0.262624,  0.406657,  0.739074,  1.04449,  1.20123,  1.81089,  2.0056,  2.5817,  2.80489,
+  0.195391,  0.258771,  0.654924,  0.824371,  1.31526,  1.50073,  1.76594,  2.06399,  2.34118,  2.51366,
+  0.178034,  0.301047,  0.46302,  0.716172,  1.19887,  1.34045,  1.83456,  2.02213,  2.40075,  2.77629,
+  0.340368,  0.404236,  0.843747,  1.03924,  1.20211,  1.70805,  1.91495,  2.16951,  2.52152,  2.62335,
+  0.218465,  0.289694,  0.528045,  0.817051,  1.13234,  1.58046,  1.83889,  1.98339,  2.14749,  2.34813,
+  0.322509,  0.458058,  0.654679,  0.958976,  1.11821,  1.32157,  1.90139,  2.04641,  2.36093,  2.66422,
+  0.191821,  0.252321,  0.389176,  0.581111,  1.52967,  1.93169,  2.08361,  2.27046,  2.56685,  2.71388,
+  0.493961,  0.710827,  0.98226,  1.19627,  1.41933,  1.62091,  1.92801,  2.14565,  2.42977,  2.60197,
+  0.213148,  0.311589,  0.424636,  0.602664,  0.736895,  1.02216,  1.99228,  2.21853,  2.61163,  2.85032,
+  0.288129,  0.434441,  0.629313,  0.856153,  1.28967,  1.42452,  1.8758,  2.15024,  2.35181,  2.53684,
+  0.160031,  0.230716,  0.406654,  0.870424,  1.15652,  1.39232,  1.8041,  1.95144,  2.21048,  2.73516,
+  0.22934,  0.293962,  0.503222,  1.2421,  1.47582,  1.62465,  1.99868,  2.1445,  2.57855,  2.75327,
+  0.15877,  0.220035,  0.363386,  0.577761,  0.96309,  1.17494,  1.73817,  1.9792,  2.16244,  2.66192,
+  0.346062,  0.444816,  0.716985,  1.18072,  1.37058,  1.523,  1.89217,  2.06668,  2.3958,  2.62766,
+  0.307495,  0.38933,  0.612607,  0.969283,  1.55771,  1.83994,  1.99674,  2.17238,  2.42063,  2.5392,
+  0.437804,  0.726957,  1.29117,  1.5033,  1.76543,  1.96212,  2.16365,  2.33623,  2.57962,  2.70852,
+  0.232184,  0.333678,  0.528368,  0.706749,  1.20328,  1.37902,  1.61116,  2.15468,  2.5929,  2.75032,
+  0.272652,  0.46171,  0.625777,  0.839609,  1.34202,  1.49673,  1.71538,  2.13757,  2.37004,  2.59739,
+  0.184908,  0.302324,  0.454883,  0.880307,  1.10438,  1.29253,  1.7772,  1.94336,  2.44417,  2.62273,
+  0.265644,  0.341261,  0.553228,  1.13947,  1.42715,  1.56044,  1.93394,  2.08413,  2.39331,  2.65413,
+  0.16792,  0.207301,  0.370331,  0.525538,  1.03089,  1.36816,  1.78247,  2.0624,  2.33276,  2.5263,
+  0.343172,  0.433912,  0.717501,  0.889734,  1.05206,  1.69528,  2.05316,  2.20846,  2.60887,  2.71832,
+  0.216527,  0.305247,  0.44589,  0.729271,  1.63974,  1.90328,  2.05335,  2.22125,  2.43225,  2.56802,
+  0.110545,  0.209955,  0.844788,  1.1742,  1.4922,  1.81024,  2.17727,  2.4405,  2.69729,  2.83523,
+  0.217384,  0.337412,  0.488999,  0.761842,  0.879715,  1.20953,  1.97075,  2.1208,  2.61165,  2.79176,
+  0.190459,  0.296484,  0.469967,  0.800649,  1.10556,  1.27853,  1.51694,  1.69307,  2.11442,  2.71674,
+  0.134814,  0.175978,  0.300425,  0.496817,  1.2443,  1.48531,  1.86172,  2.13123,  2.48505,  2.77388,
+  0.210174,  0.278266,  0.435508,  0.927538,  1.60691,  1.7539,  1.95755,  2.16628,  2.39852,  2.74961,
+  0.213766,  0.3153,  0.509924,  0.70993,  0.964724,  1.10678,  1.38261,  2.00107,  2.32321,  2.56531,
+  0.400615,  0.524954,  0.798552,  1.01285,  1.13549,  1.47485,  1.98903,  2.13091,  2.50797,  2.67946,
+  0.2494,  0.377023,  0.519635,  0.754227,  1.45956,  1.64276,  1.82896,  2.07788,  2.29823,  2.46753,
+  0.473365,  0.683973,  1.05234,  1.37583,  1.54811,  1.74759,  2.1393,  2.31877,  2.60998,  2.73925,
+  0.203877,  0.341791,  0.48518,  0.884069,  1.09759,  1.26953,  1.47992,  1.75788,  2.6484,  2.82239,
+  0.273046,  0.404254,  0.555403,  0.954547,  1.29123,  1.39902,  1.72289,  1.90344,  2.17198,  2.64531,
+  0.040369,  0.117266,  0.617136,  0.892043,  1.26033,  1.54165,  1.85938,  2.1531,  2.49823,  2.76189,
+  0.132414,  0.211358,  0.742445,  1.06686,  1.33108,  1.57079,  1.86746,  2.13253,  2.47962,  2.73108,
+  0.237329,  0.326529,  0.612538,  0.790663,  0.990133,  1.41374,  1.73823,  1.93691,  2.16773,  2.45163,
+  0.27396,  0.405794,  0.57253,  0.933672,  1.05782,  1.39795,  1.85653,  1.99755,  2.59949,  2.76004,
+  0.199334,  0.29838,  0.442931,  0.628638,  1.30321,  1.64014,  1.80402,  2.11302,  2.37545,  2.54895,
+  0.350188,  0.50201,  0.821298,  1.03864,  1.36929,  1.5924,  1.91082,  2.15649,  2.46051,  2.65326,
+  0.281558,  0.399892,  0.573105,  0.753299,  0.900613,  1.05457,  1.58199,  2.17844,  2.43035,  2.61604,
+  0.344653,  0.543532,  0.703715,  0.862285,  1.19822,  1.33821,  1.57908,  2.06077,  2.30675,  2.48575,
+  0.220701,  0.326795,  0.520618,  0.755133,  1.29555,  1.45189,  1.6905,  2.20005,  2.41427,  2.61591,
+  0.279478,  0.332193,  0.801527,  1.34597,  1.48748,  1.6785,  1.9222,  2.10002,  2.58557,  2.71339,
+  0.163502,  0.212169,  0.365096,  0.525464,  0.869846,  1.20881,  1.79399,  2.04031,  2.29718,  2.4698,
+  0.285531,  0.341488,  0.754059,  1.17002,  1.30084,  1.5137,  1.69986,  1.88992,  2.58146,  2.70687,
+  0.249595,  0.366997,  0.626427,  0.945219,  1.40704,  1.56056,  1.83166,  2.23115,  2.46635,  2.65452,
+  0.271671,  0.443136,  1.15641,  1.40646,  1.67652,  1.85648,  2.06322,  2.2305,  2.47584,  2.63958,
+  0.28662,  0.427806,  0.63732,  0.803409,  0.996161,  1.26638,  1.68175,  2.00397,  2.39465,  2.58855,
+  0.314906,  0.440519,  0.612129,  0.896126,  1.47241,  1.71769,  1.88135,  2.09944,  2.36917,  2.49547,
+  0.170277,  0.25127,  0.405477,  0.915641,  1.12689,  1.43663,  1.71477,  1.8932,  2.55299,  2.73852,
+  0.27941,  0.337137,  0.734563,  1.28105,  1.4806,  1.61188,  1.85321,  1.99488,  2.41605,  2.65483,
+  0.165776,  0.226083,  0.417544,  0.744574,  1.04447,  1.53489,  1.80849,  1.94495,  2.13849,  2.60179,
+  0.264579,  0.336652,  0.542033,  0.71019,  0.913338,  1.65575,  1.81776,  2.23196,  2.52444,  2.65852,
+  0.158194,  0.235588,  0.338347,  0.541657,  1.58338,  1.76629,  2.00914,  2.24334,  2.50394,  2.77516,
+  0.332612,  0.50962,  0.822935,  1.07588,  1.45429,  1.65079,  1.97445,  2.25128,  2.53734,  2.74512,
+  0.262817,  0.359709,  0.520893,  0.707667,  0.818364,  1.43885,  1.97125,  2.08767,  2.49701,  2.64644,
+  0.2332,  0.399599,  0.612456,  0.775547,  1.19919,  1.35576,  1.6469,  2.13625,  2.34249,  2.69574,
+  0.149687,  0.238538,  0.372248,  0.63452,  1.25581,  1.43379,  1.77004,  1.92875,  2.61191,  2.82493,
+  0.137016,  0.210297,  0.591489,  1.12545,  1.37565,  1.6853,  2.08961,  2.39089,  2.70446,  2.84443,
+  0.21349,  0.341024,  0.541716,  0.750061,  1.0882,  1.24458,  1.55534,  1.96557,  2.1879,  2.38371,
+  0.300159,  0.489291,  0.825022,  1.0371,  1.19409,  1.34738,  1.68475,  2.02494,  2.46561,  2.74097,
+  0.170029,  0.255033,  0.392758,  0.727117,  1.38207,  1.57968,  1.80091,  1.95907,  2.28234,  2.7288,
+  0.175883,  0.365509,  1.11217,  1.38587,  1.72039,  1.97781,  2.2453,  2.42161,  2.62957,  2.754,
+  0.16259,  0.248164,  0.45463,  0.763209,  0.966031,  1.28234,  1.73074,  1.93805,  2.47938,  2.66756,
+  0.258043,  0.345866,  0.55652,  0.981312,  1.36153,  1.48238,  1.87224,  2.15823,  2.36227,  2.55503,
+  0.234139,  0.348843,  0.528234,  0.987884,  1.19522,  1.42215,  1.96003,  2.12737,  2.60332,  2.793,
+  0.179699,  0.559209,  0.867682,  1.08884,  1.31689,  1.5715,  1.9222,  2.19739,  2.50112,  2.72868,
+  0.216784,  0.310791,  0.487492,  0.932903,  1.20195,  1.36655,  1.8004,  1.9775,  2.17426,  2.53707,
+  0.186878,  0.400655,  0.580952,  0.846287,  1.10387,  1.26678,  1.84277,  2.01959,  2.488,  2.71722,
+  0.164641,  0.248712,  0.389358,  0.772822,  1.21256,  1.36992,  2.02587,  2.27762,  2.61752,  2.80953,
+  0.351899,  0.520326,  0.926597,  1.21965,  1.50984,  1.67684,  1.92174,  2.11125,  2.35638,  2.54593,
+  0.242182,  0.365285,  0.506156,  0.71602,  0.865221,  1.01169,  1.78692,  2.12298,  2.35088,  2.76773,
+  0.413776,  0.559566,  0.7358,  0.928997,  1.07912,  1.26718,  1.88007,  2.15249,  2.32483,  2.53986,
+  0.210597,  0.329568,  0.469735,  0.78859,  1.21549,  1.31981,  1.71146,  2.05899,  2.24544,  2.65373,
+  0.197937,  0.254148,  0.477985,  1.22709,  1.62992,  1.76743,  2.18698,  2.3851,  2.59487,  2.72554,
+  0.205489,  0.333855,  0.523915,  0.706275,  1.10215,  1.24661,  1.6489,  2.02683,  2.28169,  2.75931,
+  0.230328,  0.322431,  0.861834,  1.14561,  1.34721,  1.57611,  1.80728,  2.00482,  2.35437,  2.57225,
+  0.224898,  0.282022,  0.506636,  1.1523,  1.62656,  1.75209,  2.02818,  2.21882,  2.48896,  2.67046,
+  0.313732,  0.625469,  1.16447,  1.49908,  1.74961,  2.01853,  2.26223,  2.4296,  2.69216,  2.8225,
+  0.375623,  0.575307,  0.7912,  0.93577,  1.09694,  1.34339,  1.80799,  2.18731,  2.51972,  2.6948,
+  0.236981,  0.332412,  0.47927,  0.844461,  1.34764,  1.49073,  1.68394,  2.03914,  2.29762,  2.45843,
+  0.129047,  0.20625,  0.636751,  0.865101,  1.13689,  1.35661,  1.7048,  1.91668,  2.51836,  2.75632,
+  0.195171,  0.266517,  0.414793,  1.23956,  1.45291,  1.60836,  1.83305,  2.0478,  2.47352,  2.62199,
+  0.165853,  0.21272,  0.372757,  0.536136,  1.01394,  1.33963,  1.55512,  1.94574,  2.23628,  2.44095,
+  0.256981,  0.368868,  0.635878,  0.802543,  1.08476,  1.43912,  1.81473,  2.12052,  2.45815,  2.62146,
+  0.214382,  0.297135,  0.445091,  0.70205,  1.3651,  1.85126,  2.06703,  2.2073,  2.47073,  2.61243,
+  0.34071,  0.532103,  0.935278,  1.17102,  1.37789,  1.6386,  1.96527,  2.24616,  2.63127,  2.80634,
+  0.310524,  0.412051,  0.582478,  0.768755,  0.871594,  1.11985,  1.92635,  2.20751,  2.40709,  2.63663,
+  0.249349,  0.443517,  0.631532,  0.810096,  1.20513,  1.35721,  1.6074,  1.98416,  2.20802,  2.64511,
+  0.14309,  0.185312,  0.325214,  0.504,  1.13447,  1.32791,  1.67365,  2.0069,  2.38928,  2.74609,
+  0.226575,  0.298946,  0.453938,  0.998061,  1.3946,  1.59728,  2.06418,  2.22325,  2.42547,  2.56946,
+  0.183924,  0.255181,  0.415834,  0.624247,  1.04234,  1.20308,  1.55524,  2.12531,  2.40035,  2.66192,
+  0.27561,  0.365968,  0.654909,  0.990108,  1.1708,  1.45533,  2.07756,  2.25267,  2.50232,  2.68595,
+  0.204334,  0.287844,  0.39481,  0.761295,  1.5012,  1.78471,  1.93557,  2.15283,  2.34926,  2.54564,
+  0.342976,  0.527539,  0.917466,  1.16059,  1.49953,  1.76183,  2.09527,  2.30187,  2.54057,  2.69469,
+  0.202374,  0.333367,  0.480179,  0.708677,  0.819505,  1.10529,  1.80664,  1.95335,  2.61084,  2.7975,
+  0.307033,  0.368471,  0.602486,  1.10861,  1.41335,  1.52864,  1.79852,  1.98614,  2.16905,  2.43726,
+  0.144073,  0.196932,  0.386988,  0.819061,  1.28977,  1.62507,  1.90192,  2.13611,  2.48302,  2.70797,
+  0.17676,  0.268627,  0.662082,  1.05687,  1.54797,  1.71139,  1.97294,  2.24991,  2.54447,  2.76109,
+  0.191409,  0.292985,  0.492193,  0.800526,  1.04184,  1.27855,  1.83663,  2.02868,  2.24939,  2.62778,
+  0.324102,  0.399146,  0.687435,  0.868704,  1.02296,  1.58208,  1.85385,  1.98188,  2.55491,  2.67706,
+  0.229172,  0.302836,  0.481418,  0.704363,  0.967567,  1.82827,  2.0973,  2.25847,  2.54911,  2.70465,
+  0.467124,  0.696788,  0.9395,  1.09499,  1.27754,  1.4885,  1.89628,  2.15847,  2.47418,  2.65999,
+  0.175418,  0.234039,  0.367674,  0.513586,  0.747619,  1.0084,  1.58316,  2.05311,  2.36329,  2.68115,
+  0.410273,  0.561949,  0.736215,  0.956685,  1.13569,  1.28842,  1.75061,  1.93771,  2.15132,  2.48934,
+  0.204541,  0.277613,  0.529607,  0.722971,  1.19998,  1.44734,  1.71563,  1.92105,  2.35778,  2.50749,
+  0.253116,  0.311907,  0.696982,  1.32008,  1.57542,  1.70532,  2.00507,  2.16867,  2.46188,  2.66505,
+  0.163657,  0.237902,  0.393374,  0.60949,  0.854272,  1.08998,  1.52639,  1.84234,  2.12625,  2.67905,
+  0.448627,  0.530664,  0.812719,  1.0952,  1.20764,  1.57541,  1.88421,  2.0343,  2.55301,  2.68835,
+  0.262717,  0.338748,  0.512685,  1.00354,  1.48018,  1.62208,  1.82852,  2.14242,  2.35646,  2.51153,
+  0.417111,  0.636688,  1.03657,  1.31988,  1.67992,  1.87339,  2.07372,  2.2494,  2.50773,  2.65105,
+  0.263698,  0.461151,  0.618737,  0.830471,  1.00404,  1.15887,  1.80157,  2.02022,  2.30656,  2.74304,
+  0.387779,  0.575108,  0.729791,  0.932981,  1.36116,  1.50516,  1.75118,  2.06847,  2.33826,  2.48764,
+  0.18151,  0.265666,  0.454631,  1.08238,  1.2873,  1.5792,  1.85118,  2.09696,  2.46724,  2.64693,
+  0.277668,  0.345119,  0.602341,  1.1792,  1.37899,  1.54562,  1.81386,  1.96259,  2.4918,  2.66445,
+  0.17932,  0.24808,  0.456925,  0.722589,  1.12693,  1.57945,  1.7994,  1.95067,  2.48412,  2.70724,
+  0.314322,  0.381145,  0.608651,  0.727613,  0.890472,  1.61028,  2.13617,  2.25836,  2.59638,  2.70978,
+  0.189539,  0.266068,  0.419729,  0.651693,  1.41016,  1.64311,  1.85481,  2.27558,  2.49205,  2.72201,
+  0.254466,  0.313038,  0.594149,  1.01254,  1.68881,  1.93546,  2.11918,  2.28787,  2.53554,  2.66793,
+  0.134691,  0.171906,  0.30274,  0.492936,  0.899551,  1.22919,  1.73394,  2.01288,  2.44634,  2.74276,
+  0.231556,  0.365068,  0.680761,  0.889142,  1.11134,  1.2959,  1.54264,  1.97178,  2.42756,  2.63191,
+  0.222525,  0.305606,  0.527193,  0.687519,  1.18138,  1.67176,  1.86368,  2.07202,  2.63452,  2.77927,
+  0.17877,  0.237415,  0.37516,  0.856692,  1.67368,  1.81374,  2.01679,  2.27242,  2.5226,  2.73596,
+  0.193532,  0.268731,  0.451328,  0.753471,  0.984854,  1.28535,  1.68565,  1.88412,  2.09168,  2.24342,
+  0.476037,  0.65161,  0.801054,  1.01016,  1.24137,  1.35584,  1.77598,  2.08615,  2.27291,  2.45435,
+  0.211657,  0.308331,  0.421366,  0.865966,  1.41877,  1.55674,  1.78615,  2.02033,  2.19859,  2.63198,
+  0.203789,  0.490794,  1.01014,  1.27501,  1.47221,  1.81014,  2.17064,  2.43766,  2.66212,  2.78806,
+  0.174355,  0.252095,  0.674715,  0.842194,  1.05509,  1.278,  1.69868,  2.07056,  2.39938,  2.65743,
+  0.245109,  0.324049,  0.628822,  0.92791,  1.1236,  1.58007,  1.87864,  2.0546,  2.35872,  2.54684,
+  0.182644,  0.253804,  0.386248,  0.614056,  1.36482,  1.54588,  2.04017,  2.21883,  2.41901,  2.62461,
+  0.295605,  0.367794,  0.690701,  1.05516,  1.1866,  1.64445,  1.94415,  2.10144,  2.56212,  2.69127,
+  0.220878,  0.289573,  0.640307,  0.822072,  1.14406,  1.5678,  1.76641,  1.90811,  2.10346,  2.56049,
+  0.403453,  0.526298,  0.732204,  0.90115,  1.03587,  1.33938,  1.78399,  1.94196,  2.37103,  2.62665,
+  0.212825,  0.25857,  0.471588,  0.685549,  1.26374,  1.82105,  2.16382,  2.2884,  2.62806,  2.78816,
+  0.401181,  0.642053,  1.03247,  1.23611,  1.44445,  1.68668,  2.00672,  2.22851,  2.57211,  2.72396,
+  0.239433,  0.341091,  0.492629,  0.70763,  0.881426,  1.03082,  1.71925,  2.34406,  2.57906,  2.75694,
+  0.294093,  0.38277,  0.577412,  1.00928,  1.31304,  1.4193,  1.74467,  2.09423,  2.28904,  2.47584,
+  0.169805,  0.236922,  0.403314,  0.638995,  1.17645,  1.35214,  1.66557,  1.90976,  2.15012,  2.71624,
+  0.210447,  0.277913,  0.452474,  1.40269,  1.51343,  1.72094,  1.90394,  2.2785,  2.58376,  2.74318,
+  0.159574,  0.225382,  0.374008,  0.714137,  1.01125,  1.37171,  1.69916,  1.87159,  2.02706,  2.49119,
+  0.258602,  0.557253,  0.81972,  1.03886,  1.30147,  1.44536,  1.83061,  2.09817,  2.32081,  2.54107,
+  0.232756,  0.282242,  0.631974,  0.898694,  1.53744,  1.86922,  2.06397,  2.23446,  2.49823,  2.63352,
+  0.580133,  0.997946,  1.32096,  1.48187,  1.73161,  1.89858,  2.12071,  2.29013,  2.53009,  2.65166,
+  0.21184,  0.307093,  0.45336,  0.945579,  1.25082,  1.49029,  1.72414,  2.2811,  2.5627,  2.7526,
+  0.314276,  0.493555,  0.667782,  0.8965,  1.32301,  1.48262,  1.66749,  1.97441,  2.42735,  2.55568,
+  0.182455,  0.261592,  0.418011,  1.05093,  1.26139,  1.44337,  1.66547,  1.93903,  2.44469,  2.63845,
+  0.24157,  0.306934,  0.491293,  1.10595,  1.55483,  1.66652,  1.92392,  2.08765,  2.3676,  2.65489,
+  0.190084,  0.25485,  0.454062,  0.724519,  1.08336,  1.39389,  1.89234,  2.08886,  2.32176,  2.4843,
+  0.306497,  0.389831,  0.721793,  0.839714,  1.12475,  1.6524,  1.82292,  2.27331,  2.5692,  2.6696,
+  0.1862,  0.27346,  0.383201,  0.564758,  1.51107,  1.84502,  1.99828,  2.1941,  2.38869,  2.58792,
+  0.300722,  0.478218,  0.823364,  1.12749,  1.59114,  1.87135,  2.17472,  2.40318,  2.62478,  2.7824,
+  0.228884,  0.358342,  0.504622,  0.795874,  1.00562,  1.15261,  1.90805,  2.12479,  2.37247,  2.79758,
+  0.171885,  0.248234,  0.432842,  0.833143,  1.04089,  1.26929,  1.66164,  1.91863,  2.15896,  2.6534,
+  0.140943,  0.193684,  0.343025,  0.562303,  1.06955,  1.54333,  1.82447,  1.96164,  2.46351,  2.77054,
+  0.173053,  0.245656,  0.360656,  0.960618,  1.58953,  1.68991,  1.98414,  2.143,  2.58839,  2.7594,
+  0.24018,  0.429951,  0.63744,  0.786596,  1.06915,  1.22657,  1.47088,  1.95205,  2.19506,  2.61597,
+  0.367862,  0.471897,  0.730834,  1.08232,  1.22629,  1.46293,  1.92817,  2.05247,  2.40674,  2.66246,
+  0.247175,  0.358209,  0.535946,  0.781876,  1.3637,  1.63524,  1.80723,  1.99378,  2.45277,  2.60104,
+  0.445578,  0.687898,  1.11411,  1.30103,  1.5774,  1.88604,  2.2249,  2.43653,  2.65969,  2.76103,
+  0.214389,  0.336025,  0.487794,  0.759534,  0.970518,  1.1411,  1.45733,  1.62464,  2.30692,  2.71527,
+  0.3773,  0.466775,  0.716121,  1.08378,  1.25654,  1.41124,  1.78943,  1.93637,  2.20557,  2.56236,
+  0.148362,  0.214593,  0.545023,  0.840437,  1.19333,  1.48066,  1.79187,  2.08342,  2.41054,  2.67613,
+  0.150403,  0.278398,  0.792676,  0.97668,  1.21885,  1.40524,  1.77506,  2.16246,  2.54786,  2.74638,
+  0.236301,  0.328633,  0.630867,  0.839915,  1.04235,  1.29887,  1.62775,  1.83949,  2.29893,  2.49396,
+  0.337889,  0.49792,  0.711277,  0.85042,  0.992027,  1.24688,  1.71075,  2.08668,  2.52716,  2.70716,
+  0.172215,  0.23654,  0.372897,  0.525146,  1.18258,  1.73573,  1.92703,  2.11462,  2.31917,  2.54278,
+  0.415304,  0.624807,  0.906616,  1.11784,  1.44615,  1.66942,  1.94841,  2.17282,  2.50453,  2.67075,
+  0.265417,  0.407241,  0.613894,  0.816534,  0.980063,  1.15606,  1.75675,  2.27485,  2.49719,  2.71224,
+  0.27644,  0.468209,  0.649518,  0.816686,  1.19517,  1.35552,  1.54923,  1.93527,  2.21787,  2.42698,
+  0.188925,  0.277012,  0.412665,  0.672627,  1.35481,  1.51452,  1.69999,  2.14455,  2.38219,  2.58608,
+  0.24263,  0.352485,  0.912974,  1.34378,  1.60443,  1.80187,  2.01479,  2.19307,  2.46081,  2.632,
+  0.190903,  0.285841,  0.44907,  0.760328,  0.954285,  1.18294,  1.69264,  1.87816,  2.27684,  2.46596,
+  0.220659,  0.300374,  0.721694,  0.947306,  1.29833,  1.56298,  1.76062,  1.88825,  2.50644,  2.68968,
+  0.213168,  0.290928,  0.695227,  0.918179,  1.37819,  1.63199,  1.84789,  2.00307,  2.35836,  2.61935,
+  0.328586,  0.517244,  0.93732,  1.37624,  1.57484,  1.76435,  2.05863,  2.22433,  2.58444,  2.75665,
+  0.248486,  0.367007,  0.562147,  0.750632,  0.902785,  1.14756,  1.63742,  1.91206,  2.41399,  2.6057,
+  0.310691,  0.477895,  0.670796,  0.940507,  1.41829,  1.5635,  1.80514,  2.11408,  2.37636,  2.53516,
+  0.256555,  0.41421,  0.559427,  0.981289,  1.19165,  1.37831,  1.6784,  1.84931,  2.5767,  2.75663,
+  0.291424,  0.335003,  0.750149,  1.28965,  1.43721,  1.59999,  1.80318,  1.96741,  2.60175,  2.73376,
+  0.195254,  0.279513,  0.451755,  0.649111,  0.828694,  1.60951,  1.91491,  2.09122,  2.31959,  2.5349,
+  0.222304,  0.332624,  0.475678,  0.685205,  1.03033,  1.73722,  1.92098,  2.37829,  2.70672,  2.81773,
+  0.164833,  0.240093,  0.359862,  0.801929,  1.51368,  1.64171,  2.04052,  2.24884,  2.48866,  2.71403,
+  0.214777,  0.287322,  0.572644,  1.14507,  1.36711,  1.75269,  2.04242,  2.22207,  2.54305,  2.69789,
+  0.226099,  0.330382,  0.474439,  0.687757,  0.799187,  1.31984,  1.94457,  2.0781,  2.3678,  2.50846,
+  0.24454,  0.392163,  0.553692,  0.729765,  1.24786,  1.44838,  1.61759,  2.07464,  2.34005,  2.51806,
+  0.175381,  0.314231,  0.446023,  0.797404,  1.32846,  1.43973,  1.79335,  1.93957,  2.4688,  2.72165,
+  0.205808,  0.29367,  0.452447,  1.07427,  1.28823,  1.65563,  1.8575,  2.36469,  2.63981,  2.79814,
+  0.253926,  0.392653,  0.587584,  0.800134,  0.97631,  1.18559,  1.57069,  1.82141,  2.09089,  2.34902,
+  0.322461,  0.410912,  0.723569,  1.06064,  1.20152,  1.40036,  1.57919,  1.78876,  2.46024,  2.6166,
+  0.211266,  0.304981,  0.436011,  0.771978,  1.49062,  1.67775,  1.88623,  2.1135,  2.32635,  2.72726,
+  0.235012,  0.406911,  0.864785,  1.29148,  1.70829,  1.93855,  2.1799,  2.3524,  2.56379,  2.71145,
+  0.176814,  0.26862,  0.445837,  0.823113,  1.02978,  1.27157,  1.62339,  1.81122,  2.40214,  2.61417,
+  0.241865,  0.339268,  0.507509,  1.00368,  1.20435,  1.37256,  1.94079,  2.10137,  2.38561,  2.66998,
+  0.230878,  0.334743,  0.50037,  0.879929,  1.02189,  1.53377,  1.97079,  2.12897,  2.56726,  2.71729,
+  0.297505,  0.451574,  0.748848,  0.988527,  1.36624,  1.60667,  1.89466,  2.17448,  2.52143,  2.75917,
+  0.199265,  0.271145,  0.49816,  0.854679,  1.1721,  1.36415,  1.76208,  1.96909,  2.17354,  2.31163,
+  0.222173,  0.424864,  0.564942,  0.829809,  1.03817,  1.19405,  1.7206,  1.85809,  2.43176,  2.74146,
+  0.181961,  0.226819,  0.390513,  0.556339,  1.0566,  1.55306,  2.12835,  2.25802,  2.6025,  2.80212,
+  0.3576,  0.565047,  1.15301,  1.35031,  1.53358,  1.71854,  1.95789,  2.17535,  2.50565,  2.67849,
+  0.162257,  0.236808,  0.374039,  0.570569,  0.748034,  1.17226,  1.82339,  2.05303,  2.51377,  2.77207,
+  0.305794,  0.46587,  0.645121,  0.88265,  1.14129,  1.26686,  1.70158,  2.00288,  2.18412,  2.41125,
+  0.231652,  0.380738,  0.549642,  0.83741,  1.22527,  1.33297,  1.85158,  2.11937,  2.31508,  2.73211,
+  0.235449,  0.286771,  0.684809,  1.34666,  1.52663,  1.70348,  2.10149,  2.25455,  2.57718,  2.71899,
+  0.23387,  0.446515,  0.60508,  0.814654,  1.05496,  1.1788,  1.63316,  1.84974,  2.13938,  2.73277,
+  0.271706,  0.335152,  0.857227,  1.25374,  1.38719,  1.70217,  1.89677,  2.19111,  2.48,  2.60136,
+  0.237386,  0.314549,  0.438339,  0.912164,  1.57776,  1.87779,  2.03279,  2.19704,  2.41232,  2.53648,
+  0.361168,  0.574093,  1.02384,  1.46852,  1.69056,  1.91737,  2.18737,  2.33403,  2.6691,  2.80629,
+  0.27848,  0.398742,  0.573342,  0.839212,  1.07389,  1.22209,  1.69168,  2.16526,  2.37741,  2.53688,
+  0.286018,  0.447947,  0.61506,  0.849446,  1.31947,  1.46358,  1.76995,  2.00103,  2.18943,  2.45038,
+  0.21944,  0.301601,  0.668534,  0.861094,  1.21,  1.49867,  1.74512,  1.87777,  2.31438,  2.6196,
+  0.223591,  0.352153,  0.598841,  1.21789,  1.35908,  1.59174,  1.77109,  2.21386,  2.56154,  2.73542,
+  0.176857,  0.236601,  0.395107,  0.634632,  1.13349,  1.33512,  1.77037,  1.98131,  2.20656,  2.33972,
+  0.334735,  0.402265,  0.659168,  0.781639,  0.975228,  1.665,  1.87207,  2.04753,  2.47696,  2.57398,
+  0.215968,  0.284755,  0.524241,  0.78146,  1.33481,  1.77238,  1.95388,  2.19421,  2.57825,  2.74194,
+  0.298193,  0.489879,  0.812985,  1.18369,  1.49642,  1.67998,  2.10879,  2.31656,  2.67378,  2.85161,
+  0.312989,  0.415446,  0.618011,  0.899096,  1.08368,  1.26338,  1.8874,  2.24306,  2.41945,  2.57048,
+  0.244471,  0.431115,  0.601512,  0.813139,  1.10216,  1.22106,  1.69244,  2.03316,  2.2218,  2.61984,
+  0.150949,  0.21906,  0.349217,  0.611327,  1.07711,  1.25055,  1.91552,  2.08398,  2.45,  2.79254,
+  0.161611,  0.218964,  0.445377,  0.927863,  1.45115,  1.76846,  2.13001,  2.36672,  2.666,  2.81405,
+  0.196,  0.297256,  0.497266,  0.6919,  1.08988,  1.27368,  1.51372,  2.00647,  2.27378,  2.57222,
+  0.335268,  0.460795,  0.685187,  0.867664,  1.01381,  1.47955,  2.01199,  2.16848,  2.57264,  2.71756,
+  0.257604,  0.340872,  0.499757,  0.843052,  1.39655,  1.83169,  2.03423,  2.17033,  2.42262,  2.5405,
+  0.417663,  0.631718,  0.955424,  1.19732,  1.6598,  1.87988,  2.1688,  2.35905,  2.57809,  2.69825,
+  0.162052,  0.251583,  0.4399,  0.660911,  0.903902,  1.3203,  1.62476,  1.77858,  2.53053,  2.79971,
+  0.256861,  0.322803,  0.68537,  1.08644,  1.26328,  1.56988,  1.85165,  2.01495,  2.26471,  2.44701,
+  0.125192,  0.176171,  0.336135,  0.7816,  1.20022,  1.43997,  1.80542,  2.07752,  2.46247,  2.73819,
+  0.102286,  0.191322,  0.774556,  1.07615,  1.36946,  1.62715,  1.97301,  2.236,  2.60937,  2.81298,
+  0.173442,  0.232622,  0.491622,  0.844157,  1.09524,  1.3708,  1.69697,  2.05141,  2.31606,  2.50205,
+  0.257531,  0.343598,  0.654071,  0.838985,  1.0481,  1.48747,  1.72538,  1.89742,  2.43051,  2.586,
+  0.1979,  0.276312,  0.440283,  0.705103,  1.26734,  1.7403,  1.93448,  2.15401,  2.4002,  2.62414,
+  0.40959,  0.596785,  0.983751,  1.18177,  1.37115,  1.50238,  1.75828,  2.01857,  2.38005,  2.59215,
+  0.231819,  0.33289,  0.483514,  0.644585,  0.816808,  0.926308,  1.4033,  2.23301,  2.46786,  2.67846,
+  0.25861,  0.340064,  0.670485,  0.908467,  1.10761,  1.45624,  1.75958,  1.93218,  2.11312,  2.31013,
+  0.184377,  0.249203,  0.410806,  0.587907,  1.3025,  1.51032,  1.72443,  1.98189,  2.2829,  2.42213,
+  0.25411,  0.313328,  0.659859,  1.26582,  1.41295,  1.66593,  1.92715,  2.10198,  2.55145,  2.67303,
+  0.161592,  0.23748,  0.376535,  0.637094,  0.823028,  1.13761,  1.69642,  1.87577,  2.40363,  2.63962,
+  0.384501,  0.466812,  0.740791,  0.938093,  1.06235,  1.50928,  1.74914,  1.9178,  2.54816,  2.67151,
+  0.333872,  0.419367,  0.638994,  1.09262,  1.52055,  1.64945,  1.86662,  2.14894,  2.34672,  2.50614,
+  0.426216,  0.686997,  1.23588,  1.42885,  1.61159,  1.79286,  2.01759,  2.23372,  2.54777,  2.69661,
+  0.262949,  0.367509,  0.530429,  0.741867,  0.872474,  1.0696,  1.74557,  2.06119,  2.28384,  2.49418,
+  0.335782,  0.547236,  0.716211,  0.919077,  1.27569,  1.40844,  1.68512,  1.96739,  2.21764,  2.44668,
+  0.227629,  0.330991,  0.486068,  1.11757,  1.30498,  1.51013,  1.75726,  1.94697,  2.62556,  2.7826,
+  0.35985,  0.436633,  0.750634,  1.20151,  1.33757,  1.59484,  1.97027,  2.11384,  2.57381,  2.72996,
+  0.211871,  0.304028,  0.512758,  0.663762,  1.08635,  1.63333,  1.81802,  2.12958,  2.39108,  2.60077,
+  0.196092,  0.279726,  0.434488,  0.624802,  0.772358,  1.40438,  1.94878,  2.16092,  2.63,  2.77518,
+  0.176304,  0.262521,  0.373719,  0.581101,  1.52011,  1.73617,  1.93323,  2.14017,  2.35813,  2.75352,
+  0.254932,  0.381411,  0.806187,  1.10229,  1.53452,  1.75028,  1.9709,  2.15987,  2.45592,  2.65841,
+  0.190385,  0.288656,  0.449066,  0.678174,  0.812376,  1.44933,  1.72866,  1.96632,  2.63881,  2.78955,
+  0.251178,  0.386509,  0.609363,  0.797102,  1.02416,  1.18173,  1.45466,  2.01263,  2.49309,  2.69893,
+  0.166654,  0.266226,  0.385171,  0.71199,  1.3979,  1.53235,  1.91597,  2.088,  2.56527,  2.78953,
+  0.238453,  0.306036,  0.449309,  0.876277,  1.52144,  1.93398,  2.13442,  2.26799,  2.5376,  2.65825,
+  0.161634,  0.219919,  0.353206,  0.524346,  0.961806,  1.20771,  1.68792,  1.91694,  2.16187,  2.32066,
+  0.413612,  0.597095,  0.793763,  0.98629,  1.28179,  1.41266,  1.65246,  2.01609,  2.38416,  2.52858,
+  0.228655,  0.341562,  0.480989,  0.988605,  1.371,  1.47742,  1.86103,  2.01585,  2.33975,  2.77315,
+  0.259092,  0.597012,  0.985224,  1.32174,  1.64335,  1.95737,  2.28868,  2.49747,  2.71649,  2.84447,
+  0.185652,  0.304664,  0.446232,  0.864434,  1.09179,  1.27377,  1.94257,  2.09554,  2.52465,  2.76824,
+  0.176687,  0.256678,  0.745652,  0.934909,  1.28376,  1.44006,  1.76524,  2.12209,  2.3881,  2.59055,
+  0.189805,  0.275637,  0.440995,  0.821356,  1.25602,  1.41098,  1.92978,  2.12014,  2.39603,  2.60464,
+  0.266823,  0.337688,  0.819408,  1.13475,  1.2892,  1.77703,  1.98289,  2.22175,  2.59029,  2.6981,
+  0.205348,  0.276512,  0.527305,  0.727412,  1.02465,  1.65398,  1.90418,  2.04661,  2.21792,  2.45566,
+  0.293498,  0.424494,  0.613795,  0.95613,  1.13398,  1.3248,  1.80903,  1.95392,  2.29385,  2.57588,
+  0.18312,  0.24965,  0.376204,  0.543914,  1.35083,  1.90722,  2.09255,  2.25571,  2.51439,  2.6879,
+  0.541205,  0.789796,  1.05895,  1.26942,  1.5039,  1.70219,  1.97018,  2.17544,  2.49681,  2.65224,
+  0.229326,  0.339475,  0.451881,  0.66121,  0.795832,  1.0738,  2.0271,  2.20637,  2.4789,  2.72678,
+  0.330006,  0.506868,  0.673076,  0.887406,  1.22877,  1.34923,  1.78129,  2.08658,  2.27776,  2.48003,
+  0.138389,  0.200001,  0.396259,  0.811975,  1.09071,  1.46041,  1.74549,  1.90427,  2.34825,  2.69989,
+  0.176584,  0.242161,  0.37827,  1.17785,  1.56472,  1.67817,  1.95162,  2.12141,  2.58011,  2.73713,
+  0.145852,  0.198423,  0.335644,  0.550505,  1.01973,  1.37119,  1.79763,  1.94383,  2.20749,  2.74647,
+  0.385078,  0.503696,  0.703239,  1.06999,  1.36574,  1.47205,  1.82583,  2.15964,  2.37128,  2.52097,
+  0.28495,  0.38805,  0.507352,  0.879125,  1.52353,  1.77624,  1.9296,  2.15756,  2.44799,  2.5864,
+  0.491116,  0.756155,  1.2552,  1.52246,  1.77658,  2.02812,  2.28606,  2.42977,  2.67911,  2.77616,
+  0.252477,  0.396081,  0.713022,  0.861502,  1.15222,  1.3708,  1.61401,  2.1448,  2.57407,  2.71253,
+  0.282756,  0.438437,  0.613566,  0.847746,  1.26077,  1.37906,  1.6422,  2.13754,  2.36837,  2.52216,
+  0.203971,  0.322195,  0.479842,  0.953133,  1.21128,  1.39763,  1.80081,  1.95452,  2.40348,  2.57371,
+  0.264533,  0.358424,  0.628768,  1.11124,  1.34025,  1.50648,  1.99959,  2.19411,  2.46141,  2.66736,
+  0.17773,  0.22368,  0.394553,  0.556177,  0.947415,  1.50064,  1.73353,  1.92605,  2.26147,  2.43605,
+  0.314223,  0.363636,  0.727886,  0.85188,  1.05384,  1.79813,  1.97435,  2.1826,  2.538,  2.62968,
+  0.201778,  0.2755,  0.404891,  0.747466,  1.50005,  1.84118,  1.99884,  2.22681,  2.48199,  2.66951,
+  0.132164,  0.314955,  0.821473,  1.19604,  1.42659,  1.69993,  2.03686,  2.3235,  2.68547,  2.82896,
+  0.223374,  0.347335,  0.50773,  0.773547,  0.967916,  1.13413,  1.9914,  2.30657,  2.52136,  2.78875,
+  0.312742,  0.449784,  0.583287,  0.934234,  1.26857,  1.36506,  1.5693,  1.68705,  2.0773,  2.59502,
+  0.124286,  0.162126,  0.29073,  0.654031,  1.23166,  1.53846,  1.89307,  2.18478,  2.56264,  2.79822,
+  0.177049,  0.251654,  0.367891,  0.912504,  1.55758,  1.69305,  1.89899,  2.07214,  2.35016,  2.64604,
+  0.240517,  0.378333,  0.547809,  0.754272,  0.973321,  1.10367,  1.57442,  2.02805,  2.21113,  2.56271,
+  0.427795,  0.519003,  0.771284,  0.93724,  1.08662,  1.60988,  1.87875,  2.05279,  2.53412,  2.65715,
+  0.22437,  0.317969,  0.439666,  0.812931,  1.3985,  1.62663,  1.79418,  2.114,  2.30916,  2.49684
+};
+  /* codebook/lspjvm2.txt */
+static const float codes1[] = {
+  0.005167,  -0.03731,  -0.002159,  0.016849,  0.130396,
+  0.039445,  0.03168,  -0.074412,  -0.031499,  0.060536,
+  0.019479,  -0.030564,  -0.048137,  -0.056279,  -0.027829,
+  0.020585,  -0.01127,  0.023913,  -0.005706,  0.011407,
+  -0.023217,  0.107455,  -0.037777,  0.00407,  -0.017279,
+  -0.090444,  0.007641,  0.099001,  -0.047913,  -0.017199,
+  0.0227,  -0.063865,  0.047213,  0.043843,  -0.036225,
+  0.001312,  -0.123861,  -0.038988,  0.058666,  0.074541,
+  0.039508,  0.1103,  0.013954,  -0.119228,  -0.035807,
+  -0.047392,  0.027035,  -0.004412,  -0.03265,  -0.03715,
+  0.002491,  -0.045447,  0.15826,  0.022828,  -0.030124,
+  -0.047856,  0.088744,  -0.009678,  0.106688,  0.08769,
+  -0.027941,  0.044084,  -0.0285,  0.018736,  -0.069969,
+  -0.035358,  -0.051568,  -0.030459,  -0.017899,  0.027632,
+  -0.018607,  -0.123557,  0.019228,  0.057485,  -0.028907,
+  0.019057,  0.038151,  -0.08022,  0.034222,  0.023081,
+  0.021312,  0.041905,  0.112903,  0.024092,  0.093974,
+  -0.116679,  0.015344,  -0.066059,  -0.096437,  0.004041,
+  -0.022464,  -0.11626,  0.047819,  -0.003921,  -0.073504,
+  0.001975,  -0.025869,  0.0282,  0.12269,  0.010627,
+  -0.035672,  0.078963,  -0.009686,  0.000743,  -0.147582,
+  0.016932,  -0.020291,  -0.096896,  -0.237875,  -0.029121,
+  0.017376,  -0.04013,  -0.053865,  0.15406,  -0.013215,
+  0.015215,  -0.019023,  -0.070604,  0.032265,  0.04034,
+  0.102365,  -0.022746,  0.019895,  0.05057,  0.008845,
+  -0.034134,  0.044441,  -0.049387,  -0.140481,  0.07257,
+  0.013023,  -0.006079,  0.037574,  0.004937,  -0.081501,
+  0.003696,  0.049908,  0.007355,  0.000403,  0.026006,
+  -0.008466,  0.08068,  0.061382,  -0.108985,  -0.08806,
+  -0.012275,  -0.081061,  0.020333,  -0.079001,  0.068724,
+  -0.014081,  -0.042609,  0.093365,  0.04412,  0.000303,
+  0.063391,  0.096574,  -0.105424,  0.039041,  0.010412,
+  -0.054031,  -0.084948,  0.080406,  -0.035883,  0.137428,
+  0.063037,  0.050562,  0.02469,  -0.031394,  0.13032,
+  -0.015501,  -0.078884,  -0.076886,  -0.013864,  -0.073587,
+  0.048778,  0.003814,  -0.031125,  0.046897,  0.028304,
+  0.048692,  0.132795,  0.06545,  0.059487,  -0.042396,
+  -0.176999,  0.056943,  -0.004135,  -0.049378,  -0.041083,
+  -0.039445,  -0.016292,  -0.00455,  0.06201,  -0.079613,
+  -0.054566,  -0.008476,  -0.01671,  0.049202,  0.025758,
+  -0.078723,  0.092091,  0.096536,  -0.065079,  0.021161,
+  0.076657,  0.009203,  -0.036866,  -0.016559,  0.012823,
+  0.008225,  -0.003006,  0.108033,  0.04312,  -0.06087,
+  -0.019346,  0.02279,  -0.001728,  0.062304,  -0.016965,
+  -0.001302,  -0.01449,  -0.041803,  -0.034058,  -0.197066,
+  -0.033655,  -0.127217,  -0.108681,  -0.010571,  -0.004705,
+  -0.015553,  -0.086069,  0.034109,  -0.101379,  0.002068,
+  -0.004003,  -0.044637,  -0.068617,  0.052228,  -0.047812,
+  -0.043307,  0.035681,  0.042207,  -0.055946,  0.055944,
+  -0.026792,  -0.012601,  -0.05671,  -0.021094,  0.105842,
+  -0.025598,  -0.078858,  -0.013487,  0.030728,  -0.031956,
+  0.031444,  0.022763,  0.025364,  0.121366,  0.070736,
+  -0.084556,  0.098118,  -0.024301,  -0.058655,  -0.043194,
+  -0.011752,  -0.043781,  0.091051,  -0.071201,  -0.02098,
+  0.082904,  -0.031657,  -0.088247,  0.066709,  -0.079182,
+  -0.012151,  0.011796,  -0.010589,  0.100656,  0.094539,
+  0.035967,  0.025338,  0.071826,  0.009741,  -0.040209,
+  0.006866,  -0.015095,  -0.168469,  -0.056133,  0.060145,
+  0.04583,  -0.068969,  0.034551,  0.015842,  -0.092809,
+  0.054699,  0.138744,  0.001726,  0.006927,  0.005167,
+  0.016978,  0.046384,  -0.060183,  -0.040742,  -0.072692,
+  -0.022489,  -0.029728,  -0.065018,  -0.124741,  0.044927,
+  -0.029057,  -0.037154,  0.031068,  0.060086,  0.009984,
+  0.009311,  -0.006957,  -0.105508,  0.059637,  -0.019564,
+  -0.068154,  -0.066443,  0.000799,  0.028579,  0.097063,
+  0.096936,  0.03023,  -0.034623,  -0.088918,  0.040334,
+  0.019439,  -0.050707,  -0.003294,  -0.028505,  -0.053599,
+  0.06246,  -0.070688,  -0.016465,  -0.03568,  0.017378,
+  0.009363,  0.048761,  0.043374,  0.039587,  -0.023232,
+  -0.067033,  0.042663,  0.05407,  -0.042797,  -0.089391,
+  -0.030497,  -0.050249,  0.059528,  0.089089,  -0.029633,
+  0.064125,  -0.086614,  -0.002005,  0.08062,  0.000502,
+  -0.00349,  0.097336,  0.099565,  0.015648,  0.006691,
+  0.077668,  0.016572,  0.035404,  -0.046026,  0.017237,
+  -0.048631,  0.009314,  0.141479,  0.017079,  0.043796,
+  -0.106474,  0.145951,  0.05774,  0.01125,  -0.059443,
+  0.027572,  0.02665,  0.008527,  0.002949,  -0.03768,
+  -0.077991,  -0.090617,  0.00342,  -0.04601,  0.007354,
+  0.019056,  -0.128651,  0.016464,  0.004584,  -0.030883,
+  -0.092069,  0.038976,  -0.08184,  0.066695,  -0.04734,
+  0.003513,  0.040613,  0.046815,  -0.023406,  0.062389,
+  0.021759,  0.024928,  -0.018922,  -0.048006,  0.0638,
+  -0.014416,  -0.050333,  0.042628,  -0.114934,  -0.10145,
+  0.062139,  0.029295,  -0.065908,  0.111463,  0.050781,
+  -0.022707,  0.135414,  0.003548,  0.134535,  -0.048259,
+  -0.092344,  -0.027727,  0.016343,  -0.060786,  -0.081502,
+  -0.005412,  -0.026229,  -0.143331,  0.052404,  -0.077298,
+  -0.035919,  -0.041968,  -0.106108,  -0.004369,  0.065028,
+  0.09637,  -0.053299,  0.043317,  -0.049735,  0.049815,
+  0.032324,  0.051309,  -0.009607,  -0.205917,  0.005023,
+  -0.054316,  -0.022895,  0.099327,  -0.006927,  -0.076574,
+  -0.111024,  0.111026,  0.038381,  -0.060368,  0.064238,
+  -0.034316,  0.026846,  0.02574,  -0.076162,  -0.163904,
+  0.055955,  -0.056885,  0.014831,  -0.120715,  0.090938,
+  0.035289,  -0.036439,  0.060012,  0.080302,  0.036215,
+  0.06525,  0.08303,  -0.058784,  0.104826,  -0.051805,
+  -0.011099,  -0.00642,  0.053042,  0.024127,  0.092534,
+  0.058569,  -0.033442,  0.025186,  -0.018222,  0.117744,
+  0.044345,  -0.042456,  -0.043767,  -0.021378,  -0.121965,
+  0.027371,  0.052731,  -0.020316,  0.036912,  0.115357,
+  0.03115,  0.041547,  0.059267,  -0.039672,  -0.086918,
+  -0.162369,  0.024801,  0.031725,  0.0834,  -0.034463,
+  0.000272,  -0.008147,  -0.002016,  0.131953,  -0.092911,
+  -0.091944,  -0.062864,  -0.005221,  0.063647,  -0.012658,
+  0.042685,  0.067952,  0.038644,  -0.153221,  0.096841,
+  0.108299,  0.089446,  -0.047164,  0.004196,  -0.043268,
+  -0.035456,  0.050838,  0.070444,  0.084465,  -0.07998,
+  -0.048916,  0.057726,  0.023894,  0.027653,  0.017775,
+  0.015461,  -0.030287,  -0.022245,  0.052081,  -0.150947,
+  -0.002682,  -0.056774,  -0.123366,  -0.091754,  0.006536,
+  0.006473,  -0.143025,  0.05469,  -0.043189,  0.03297,
+  0.027446,  0.033127,  -0.132722,  -0.010417,  -0.080097,
+  -0.018187,  0.001858,  0.11129,  -0.090749,  0.059434,
+  -0.068738,  0.090679,  -0.14507,  -0.065277,  0.063514,
+  -0.003982,  -0.056382,  -0.003673,  0.015845,  -0.073396,
+  0.043688,  0.002836,  0.069211,  0.124852,  -0.053313,
+  -0.040946,  0.07044,  -0.107024,  -0.019199,  -0.033672,
+  -0.00144,  0.02168,  0.110595,  -0.053452,  -0.052426,
+  0.035461,  -0.028179,  -0.049041,  0.02258,  -0.010989,
+  -0.002913,  -0.051691,  -0.075881,  0.037241,  0.076377,
+  0.034735,  -0.031556,  0.073516,  -0.001427,  0.016296,
+  -0.017537,  0.003346,  -0.099774,  -0.067624,  -0.044257,
+  -0.018202,  0.030622,  0.012773,  0.046475,  -0.121785,
+  -0.057265,  0.116179,  -0.079916,  0.066396,  0.050104,
+  -0.013177,  0.057766,  -0.047879,  -0.109526,  -0.146491,
+  0.032675,  -0.049318,  -0.057045,  -0.080068,  0.089621,
+  -0.046564,  -0.029992,  0.040828,  0.029281,  -0.037369,
+  -0.009731,  -0.082145,  -0.117622,  0.117077,  0.037369,
+  0.00082,  -0.106634,  -0.007967,  0.000812,  0.140637,
+  0.03653,  0.062121,  -0.065504,  -0.09493,  0.121336,
+  0.01753,  -0.01733,  -0.040402,  -0.018255,  0.010992,
+  0.019746,  -0.027564,  0.033588,  0.042466,  -0.003143,
+  0.013767,  0.084179,  0.033753,  -0.017279,  -0.009676,
+  -0.006452,  0.032645,  0.031852,  -0.030975,  -0.043384,
+  -0.005433,  -0.015258,  0.053273,  0.054748,  -0.064736,
+  0.008959,  -0.141223,  -0.032957,  -0.015079,  0.018198,
+  -0.001681,  0.143079,  0.076,  0.001037,  -0.048744,
+  0.022062,  0.02603,  -0.008263,  -0.050353,  -0.023037,
+  -0.036477,  -0.051733,  0.137823,  -0.034438,  -0.007573,
+  -0.004256,  0.064218,  0.075183,  0.095106,  0.026497,
+  0.02636,  0.009791,  -0.058039,  0.053315,  -0.077817,
+  -0.033283,  -0.081151,  -0.05522,  0.004268,  0.017539,
+  -0.007329,  -0.1172,  0.09322,  0.037359,  0.002718,
+  0.010749,  0.018281,  -0.0758,  -0.024889,  0.00572,
+  0.022129,  0.035613,  0.036187,  0.032246,  0.105439,
+  -0.073766,  0.016887,  -0.059934,  -0.049471,  0.07352,
+  -0.024041,  -0.104642,  0.023557,  -0.059746,  -0.043871,
+  0.022311,  -0.00025,  -0.074027,  0.198593,  0.102732,
+  0.024478,  0.077658,  -0.060042,  -0.018229,  -0.149648,
+  -0.009871,  -0.105822,  0.007585,  -0.161459,  -0.041121,
+  -0.02146,  0.00902,  -0.065018,  0.111801,  -0.024953,
+  0.074594,  -0.026041,  -0.062859,  0.009199,  0.069609,
+  0.078672,  -0.033414,  0.054128,  0.005408,  -0.016273,
+  0.052076,  0.10761,  -0.067518,  -0.0964,  0.033703,
+  -0.01435,  -0.024676,  0.056254,  -0.04377,  -0.060847,
+  -0.004185,  0.07355,  -0.05783,  -0.016644,  0.029096,
+  0.005755,  0.026472,  0.040449,  -0.09195,  -0.048538,
+  -0.034439,  -0.107938,  0.090712,  -0.117001,  0.04317,
+  -0.006505,  -0.035277,  0.117316,  0.127002,  0.047906,
+  -0.001441,  0.118379,  -0.132165,  0.00738,  0.023823,
+  -0.02012,  -0.083725,  0.047284,  0.023795,  0.074123,
+  -0.013439,  0.024994,  0.060254,  -0.06912,  0.166373,
+  -0.024228,  -0.06315,  -0.046506,  -0.077202,  -0.054592,
+  -0.006571,  0.010335,  -0.006568,  0.003982,  0.075837,
+  0.008643,  0.136339,  -0.005502,  0.03391,  -0.066379,
+  -0.127371,  -0.006954,  0.03977,  -0.070123,  0.060925,
+  -0.046386,  -0.02642,  -0.00528,  0.103509,  -0.02231,
+  -0.00374,  -0.014999,  -0.03777,  0.080005,  0.025231,
+  -0.054995,  0.071017,  0.009442,  -0.075737,  0.013441,
+  0.051947,  0.027097,  -0.070351,  -0.055705,  -0.021115,
+  0.021387,  0.029232,  0.163331,  -0.03238,  0.010008,
+  -0.011987,  -0.028631,  0.002665,  0.01477,  -0.009558,
+  -0.034325,  0.01583,  -0.091253,  -0.012677,  -0.107378,
+  -0.034624,  -0.047725,  -0.10233,  0.042525,  -0.006869,
+  0.014048,  -0.043127,  0.052384,  -0.047473,  0.055102,
+  0.009744,  -0.033646,  -0.081755,  -0.001464,  -0.016223,
+  -0.036697,  -0.002279,  0.023279,  -0.036221,  0.101478,
+  -0.058454,  0.065074,  0.003524,  0.00501,  0.097182,
+  -0.038171,  -0.037943,  -0.009994,  -0.033355,  -0.044552,
+  0.041318,  0.065041,  9.2e-05,  0.100816,  0.029007,
+  -0.031803,  0.183537,  -0.009617,  -0.010544,  -0.028465,
+  0.0069,  -0.014988,  0.09049,  -0.174817,  0.027464,
+  0.063314,  -0.049281,  -0.001567,  0.091421,  -0.078603,
+  -0.004869,  -0.063266,  -0.001922,  0.069338,  0.081771,
+  0.058737,  0.073195,  0.081676,  -0.047808,  -0.025797,
+  -0.004185,  0.033203,  -0.125472,  -0.108148,  0.031258,
+  0.035192,  0.029957,  0.046675,  0.047238,  -0.088197,
+  0.033315,  0.114919,  -0.04918,  0.025707,  0.053843,
+  0.035182,  0.140206,  -0.05866,  -0.025978,  -0.019658,
+  -0.014847,  -0.021051,  -0.034385,  -0.121789,  0.173406,
+  -0.112251,  -0.022333,  0.071206,  0.028998,  0.046468,
+  0.067704,  -0.026159,  -0.158316,  0.014936,  0.040216,
+  -0.010137,  -0.053492,  0.004935,  -0.011277,  0.073852,
+  0.091261,  0.114794,  -0.01406,  -0.051545,  0.077316,
+  0.101258,  -0.046137,  0.022994,  -0.066767,  -0.065537,
+  0.049952,  -0.043582,  0.012823,  0.009313,  0.036343,
+  0.054885,  0.037796,  0.02194,  0.013211,  0.006019,
+  -0.099578,  0.058596,  -0.045463,  -0.015632,  -0.087141,
+  -0.019273,  -0.03314,  0.043796,  0.119057,  -0.081813,
+  -0.021538,  -0.070453,  -0.052551,  0.077213,  9.4e-05,
+  0.050268,  0.092271,  0.051688,  -0.025224,  0.075437,
+  0.027983,  0.069205,  0.031787,  -0.099975,  0.004387,
+  -0.002747,  -0.056567,  0.161394,  0.000164,  0.084189,
+  -0.124844,  0.050329,  0.009844,  0.055877,  0.055701,
+  0.030479,  0.028843,  -0.001076,  -0.017173,  -0.10277,
+  -0.038426,  -0.133841,  -0.03584,  -0.072046,  0.020206,
+  0.016438,  -0.097885,  0.041857,  0.034601,  0.030422,
+  -0.089192,  -0.014112,  -0.052276,  0.012005,  -0.029335,
+  -0.011331,  0.101833,  0.063827,  0.044288,  0.101597,
+  -0.034689,  -0.027434,  -0.017801,  -0.079224,  0.067103,
+  -0.027456,  -0.098034,  0.009448,  -0.038986,  -0.156729,
+  0.085023,  0.033136,  -0.021343,  0.110701,  -0.011901,
+  -0.006484,  0.082023,  -0.027094,  0.091208,  -0.013163,
+  -0.012223,  0.005933,  0.010653,  -0.098119,  -0.005304,
+  -0.021061,  -0.058077,  -0.073035,  0.097856,  -0.102847,
+  -0.035329,  -0.092754,  -0.101463,  -0.048671,  0.055015,
+  0.102145,  0.062017,  0.016002,  0.036489,  0.059,
+  0.042861,  0.025447,  -0.019735,  -0.107841,  -0.033752,
+  -0.043982,  -0.067059,  0.051092,  0.025235,  -0.147107,
+  -0.016269,  0.123009,  0.035894,  -0.020453,  0.040013,
+  0.015557,  0.015825,  0.080712,  -0.06963,  -0.149739,
+  0.022006,  -0.008848,  0.040169,  -0.095688,  0.059575,
+  -0.030641,  -0.061353,  0.046302,  0.104489,  0.043372,
+  -0.001579,  0.059737,  -0.104073,  0.042342,  -0.048611,
+  -0.013811,  -0.056255,  0.107179,  0.057433,  0.084815,
+  0.030217,  0.02236,  -0.040342,  -0.028775,  0.120588,
+  0.04127,  -0.045775,  -0.030195,  -0.106859,  -0.104349,
+  0.072418,  -0.003603,  -0.013072,  0.040728,  0.086869,
+  0.091943,  0.066517,  0.024442,  -0.030929,  -0.03292,
+  -0.160336,  -0.010347,  -0.068458,  0.017458,  0.044823,
+  0.050694,  0.067625,  0.040303,  0.113164,  -0.038747,
+  -0.065558,  -0.106357,  -0.028352,  0.121488,  0.026548,
+  -0.00782,  0.054872,  0.094674,  -0.099533,  0.005231,
+  0.118132,  0.04278,  -0.065079,  0.03144,  0.043229,
+  -0.050024,  0.015943,  0.073917,  0.034049,  0.010548,
+  -0.024979,  0.022639,  0.027795,  0.049491,  0.048762,
+  -0.002738,  -0.010783,  -0.027637,  -0.006986,  -0.104141,
+  -0.066719,  -0.061742,  -0.067028,  -0.053057,  -0.003478,
+  -0.050948,  -0.122196,  0.022082,  0.002595,  0.015094,
+  0.006014,  0.005784,  -0.184537,  -0.034872,  -0.036104,
+  0.055412,  0.006886,  0.103488,  -0.063001,  0.096665,
+  -0.035533,  0.009847,  -0.095114,  0.008588,  0.023736,
+  -0.034278,  -0.11197,  -0.041172,  0.03973,  -0.102952,
+  0.063775,  0.039273,  0.109863,  0.0918,  0.030306,
+  -0.082206,  0.089449,  -0.058478,  -0.029341,  0.038389,
+  0.061057,  -0.024711,  0.111044,  -0.035079,  -0.027985,
+  0.01457,  0.002046,  -0.031545,  0.058848,  -0.0195,
+  -0.002475,  -0.025589,  -0.144358,  0.063478,  0.124927,
+  -0.014094,  -0.01097,  0.031621,  -0.040043,  0.004389,
+  0.025003,  0.052397,  -0.054526,  -0.073469,  0.026795,
+  -0.024697,  0.024739,  0.118299,  0.014948,  -0.132109,
+  0.020192,  0.037815,  -0.09027,  0.049313,  0.082764,
+  -0.022642,  -0.006053,  -0.038073,  -0.057363,  -0.107347,
+  0.033166,  -0.027556,  -0.019765,  -0.111958,  0.027773,
+  -0.063001,  -0.052998,  0.019353,  -0.009646,  -0.01127,
+  0.011872,  -0.006508,  -0.122226,  0.059824,  0.041779,
+  0.016445,  -0.03189,  -0.03631,  0.013085,  0.091631,
+  0.062866,  0.054501,  -0.117523,  -0.010907,  0.087026,
+  -0.014974,  -0.03592,  -0.048565,  -0.019246,  -0.043405,
+  -0.006959,  0.006211,  0.04237,  0.014603,  -0.006435,
+  0.019149,  0.078038,  -0.020556,  0.018114,  -0.036521,
+  -0.054036,  0.007325,  0.056349,  -0.033497,  -0.02596,
+  0.050184,  -0.066536,  0.091501,  0.071356,  -0.049044,
+  -0.032263,  -0.095268,  -0.008784,  0.049033,  0.036929,
+  0.020357,  0.152151,  0.040814,  -0.063159,  -0.024324,
+  -0.017084,  0.011876,  -0.015442,  -0.019811,  -0.000366,
+  -0.0027,  -0.072981,  0.109288,  0.007473,  -0.049442,
+  -0.05404,  0.051947,  0.019359,  0.12916,  0.021981,
+  0.002248,  0.035262,  -0.023141,  0.064666,  -0.078273,
+  -0.031663,  -0.031343,  -0.006058,  -0.045421,  0.017466,
+  -0.067122,  -0.130784,  0.067057,  0.05246,  -0.041165,
+  -0.004411,  0.046453,  -0.055461,  0.048162,  -0.009687,
+  0.02153,  0.007211,  0.104764,  0.079849,  0.086248,
+  -0.072791,  0.001112,  -0.027964,  -0.071233,  -0.013339,
+  0.007979,  -0.118231,  0.076826,  -0.060762,  -0.084358,
+  -0.011447,  0.009765,  0.014163,  0.164784,  -0.015892,
+  -0.020756,  0.152509,  -0.014014,  -0.041853,  -0.117008,
+  -0.011755,  -0.005766,  -0.086896,  -0.13965,  -0.032342,
+  0.025651,  -0.007843,  -0.039073,  0.103397,  -0.042591,
+  -0.005971,  -0.001324,  -0.053945,  -0.000716,  0.048977,
+  0.130185,  0.028226,  0.061179,  0.024489,  -0.021939,
+  -0.007019,  0.054336,  -0.01004,  -0.095411,  0.082406,
+  -0.03213,  -0.015054,  0.033059,  0.002802,  -0.080159,
+  -0.022452,  0.077426,  -0.015314,  0.033583,  0.028479,
+  0.023293,  0.035078,  0.006442,  -0.110541,  -0.106244,
+  -0.034737,  -0.10414,  -0.03457,  -0.114316,  0.079382,
+  0.006009,  0.003901,  0.080081,  0.055082,  0.012896,
+  0.064981,  0.057219,  -0.112986,  0.003906,  -0.028414,
+  -0.012383,  -0.054541,  0.077483,  0.004267,  0.123567,
+  0.007369,  0.099856,  0.023273,  -0.028194,  0.12203,
+  -0.036635,  -0.126589,  -0.034567,  -0.028288,  -0.06504,
+  0.01428,  0.011435,  -0.004867,  0.043901,  0.035395,
+  0.028599,  0.075858,  0.11846,  0.070581,  -0.051903,
+  -0.170905,  0.050352,  0.053514,  -0.017139,  0.021748,
+  -0.09661,  0.008904,  -0.001049,  0.078787,  -0.101201,
+  -0.026229,  -0.019757,  -0.035771,  0.054142,  0.068041,
+  -0.020328,  0.099979,  0.096623,  -0.046957,  -0.001733,
+  0.049586,  0.052458,  -0.031724,  -0.028332,  -0.005418,
+  0.04671,  0.014238,  0.133125,  -0.005428,  -0.080055,
+  -0.033226,  0.034007,  0.025272,  0.033924,  -0.044662,
+  -0.03469,  -0.079173,  -0.160689,  -0.153893,  -0.228771,
+  -0.00245,  -0.083966,  -0.168294,  0.010694,  -0.012167,
+  4e-06,  -0.044377,  0.023373,  -0.077437,  0.012178,
+  -0.015899,  -0.010828,  -0.062847,  0.029927,  -0.074557,
+  -0.053306,  0.049688,  0.057017,  -0.022571,  0.015337,
+  -0.046545,  0.018895,  -0.024848,  -0.004424,  0.165442,
+  -0.060201,  -0.098629,  -0.06519,  0.036582,  -0.038566,
+  0.051453,  0.093478,  0.039619,  0.117535,  0.090386,
+  -0.029366,  0.108075,  -0.016568,  -0.093576,  -0.048799,
+  -0.045599,  -0.023619,  0.070072,  -0.109294,  0.001548,
+  0.076285,  -0.091274,  -0.068829,  0.000215,  -0.046519,
+  -0.022512,  -0.027067,  0.014905,  0.079017,  0.140699,
+  0.061141,  0.009178,  0.097811,  0.033468,  -0.006666,
+  0.007163,  -0.007578,  -0.124238,  -0.025271,  0.017581,
+  0.042405,  -0.034252,  0.06489,  0.0025,  -0.139083,
+  0.009733,  0.158179,  0.014474,  0.038913,  0.05629,
+  -0.004998,  0.075401,  -0.030557,  -0.038595,  -0.04907,
+  -0.01468,  -0.076306,  -0.132365,  -0.177693,  0.09176,
+  -0.057238,  -0.072379,  0.050877,  0.051489,  0.028125,
+  0.004991,  0.032621,  -0.167359,  0.041002,  -0.007072,
+  -0.086405,  -0.042263,  -0.019757,  -0.011524,  0.066004,
+  0.08567,  0.008071,  -0.013614,  -0.062142,  0.08328,
+  0.000887,  -0.07582,  0.008295,  -0.020136,  -0.016886,
+  0.089657,  -0.10626,  -0.051491,  -0.012687,  0.054778,
+  0.011535,  0.086613,  0.053803,  0.027164,  -0.023825,
+  -0.040009,  0.080987,  0.026309,  -0.000334,  -0.085288,
+  -0.024208,  -0.08504,  0.096077,  0.120527,  -0.044181,
+  0.003034,  -0.091142,  0.006471,  0.115971,  -0.026358,
+  0.003489,  0.083633,  0.109975,  -0.029425,  0.061726,
+  0.056115,  -0.006711,  0.013158,  -0.062917,  -0.015029,
+  0.003354,  0.031574,  0.119045,  0.022859,  0.023777,
+  -0.068292,  0.115604,  0.031617,  0.008953,  0.006943,
+  0.01442,  0.008569,  -0.031547,  -0.006857,  -0.05169,
+  -0.086683,  -0.108339,  0.005093,  -0.108646,  -0.03472,
+  0.054273,  -0.096753,  0.050806,  -0.021115,  -0.025278,
+  -0.079997,  0.027008,  -0.034211,  0.090949,  0.005678,
+  0.019288,  0.042083,  0.062119,  0.019301,  0.040859,
+  -0.009113,  0.022427,  -0.004019,  -0.06089,  0.032884,
+  -0.012373,  -0.037976,  0.017625,  -0.079369,  -0.050788,
+  0.07972,  -0.039347,  -0.085324,  0.091044,  0.026653,
+  -0.063122,  0.099371,  -0.024736,  0.084631,  -0.100421,
+  -0.073313,  0.014317,  0.022555,  -0.116051,  -0.063966,
+  -0.009688,  -0.063666,  -0.131709,  0.016744,  -0.135028,
+  -0.003708,  -0.043685,  -0.121631,  -0.03693,  0.125776,
+  0.084333,  0.010114,  0.071231,  -0.010395,  0.059391,
+  0.01776,  0.033034,  -0.018996,  -0.13054,  0.025758,
+  -0.018261,  -0.060044,  0.127025,  -0.032724,  -0.107299,
+  -0.064538,  0.090073,  -0.010186,  -0.066127,  0.107025,
+  -0.01094,  0.003083,  0.01903,  -0.023935,  -0.140176,
+  0.003549,  -0.042402,  -0.010695,  -0.185915,  0.060835,
+  0.005405,  -0.013822,  0.029205,  0.079338,  0.068155,
+  0.071485,  0.030282,  -0.087207,  0.07348,  -0.02794,
+  0.004896,  -0.033246,  0.072637,  0.018017,  0.054712,
+  0.026184,  -0.005287,  0.034456,  -0.036753,  0.079232,
+  0.072707,  0.004506,  -0.039353,  -0.01556,  -0.071466,
+  0.010257,  0.067446,  -0.006598,  0.047396,  0.072218,
+  0.023405,  0.082663,  0.015319,  -0.035436,  -0.075461,
+  -0.124036,  -0.032046,  0.060837,  0.010231,  -0.053024,
+  0.0228,  0.042891,  -0.041549,  0.132395,  -0.09533,
+  -0.077091,  -0.058554,  -0.070632,  0.04757,  0.031856,
+  0.000127,  0.114996,  0.05866,  -0.092472,  0.064503,
+  0.09645,  0.0662,  -0.001059,  0.039487,  -0.032859,
+  -0.065721,  0.001601,  0.088037,  0.059828,  -0.047411,
+  -0.077714,  0.010275,  0.013629,  0.003304,  0.005407,
+  0.000665,  0.012927,  -0.077525,  0.069202,  -0.157417,
+  0.014547,  -0.095965,  -0.087546,  -0.067375,  -0.027867,
+  0.005458,  -0.095839,  0.105294,  -0.044892,  0.045151,
+  -0.001349,  0.038356,  -0.127152,  -0.080503,  -0.105423,
+  -0.018484,  0.008439,  0.104398,  -0.027959,  0.082086,
+  -0.020605,  0.042785,  -0.109139,  -0.025958,  0.079733,
+  0.036289,  -0.083773,  -0.033819,  0.032566,  -0.065556,
+  0.006659,  0.00209,  0.097027,  0.115715,  -0.013271,
+  -0.067514,  0.128365,  -0.089129,  0.02616,  -0.040584,
+  -0.002443,  -0.017254,  0.129204,  -0.110078,  -0.064943,
+  0.089215,  -0.022299,  -0.034959,  0.022446,  -0.019254,
+  -0.0389,  -0.069862,  -0.07054,  0.069949,  0.111993,
+  -0.006311,  -0.009057,  0.094278,  -0.014932,  0.003657,
+  -0.019323,  0.026145,  -0.062611,  -0.073753,  -0.007182,
+  0.014101,  0.015776,  0.052537,  0.064728,  -0.160187,
+  -0.005122,  0.076356,  -0.104763,  0.091493,  0.020225,
+  -0.000433,  0.062698,  -0.060457,  -0.14754,  -0.066168,
+  0.007195,  -0.061498,  -0.037801,  -0.039763,  0.059551,
+  -0.02841,  -0.07451,  0.057667,  0.020584,  -0.04251,
+  -0.025311,  -0.037825,  -0.18801,  0.077423,  0.030749,
+  -0.025465,  -0.067541,  0.003073,  -0.049778,  0.127789,
+  0.002786,  0.120009,  -0.067812,  -0.026565,  0.111272,
+  0.023219,  -0.024403,  -0.014507,  -0.048624,  0.022163,
+  0.014596,  -0.052136,  0.00158,  0.064595,  0.017963,
+  0.02133,  0.098862,  -0.009253,  -0.041062,  0.008903,
+  -0.013829,  0.031967,  0.076571,  -0.005348,  -0.04401,
+  0.031252,  0.000369,  0.036818,  0.072854,  -0.038569,
+  0.004161,  -0.128017,  -0.053152,  0.050896,  -0.015212,
+  -0.036159,  0.097995,  0.068397,  -0.048472,  -0.056131,
+  -0.01192,  0.059188,  0.010215,  -0.061152,  -0.011717,
+  -0.035949,  -0.057039,  0.090859,  -0.029682,  0.041466,
+  -0.025106,  0.131191,  0.059327,  0.085383,  0.021699,
+  0.04923,  0.03663,  -0.077086,  0.017806,  -0.08879,
+  0.00404,  -0.069533,  -0.026785,  0.009666,  0.014017,
+  -0.055897,  -0.096299,  0.120693,  0.029995,  0.032602,
+  -0.001365,  0.034015,  -0.053512,  0.001573,  -0.01917,
+  0.003956,  0.006452,  0.067313,  0.028301,  0.160615,
+  -0.053111,  0.01399,  -0.02706,  -0.013638,  0.039376,
+  -0.054462,  -0.096553,  0.079994,  -0.043791,  -0.025051,
+  -0.003222,  0.019418,  -0.049525,  0.151136,  0.034123,
+  0.055117,  0.058918,  -0.017393,  0.026169,  -0.12638,
+  -0.019008,  -0.028939,  -0.014027,  -0.173373,  -0.032841,
+  -0.00337,  0.03968,  -0.118311,  0.114094,  -0.041869,
+  0.041121,  -0.038391,  -0.096074,  -0.032479,  0.060222,
+  0.063968,  -0.024528,  0.018158,  -0.009892,  -0.043882,
+  -0.005004,  0.1298,  -0.025438,  -0.121186,  0.04986,
+  0.010448,  -0.040388,  0.061853,  -0.017304,  -0.035088,
+  -0.008678,  0.061476,  -0.039493,  -0.005055,  0.079169,
+  0.046134,  0.00977,  0.068294,  -0.078965,  -0.043792,
+  -0.030529,  -0.053845,  0.053853,  -0.140682,  0.111461,
+  0.003549,  -0.014939,  0.148955,  0.072861,  0.004332,
+  0.015386,  0.062006,  -0.122325,  -0.032529,  0.010241,
+  -0.047982,  -0.12644,  0.05584,  0.067128,  0.101189,
+  -0.00263,  0.031969,  0.046076,  -0.080194,  0.10474,
+  -0.033486,  -0.077818,  -0.058697,  -0.095258,  -0.111074,
+  0.037236,  0.011711,  0.001113,  -0.005664,  0.048588,
+  0.041131,  0.098257,  0.033126,  0.029317,  -0.095311,
+  -0.071555,  -0.039999,  0.026678,  -0.072182,  0.035031,
+  -0.007997,  -0.048174,  -0.006796,  0.075959,  -0.05206,
+  -0.007645,  0.037076,  -0.035574,  0.085576,  0.034126,
+  -0.050676,  0.05143,  0.031999,  -0.134308,  -0.001489,
+  0.084564,  -0.018394,  -0.09741,  -0.042931,  -0.025608,
+  -0.025489,  0.041919,  0.142482,  0.004617,  -0.041085,
+  -0.028816,  -0.015527,  -0.031005,  0.028405,  -0.02224,
+  -0.067737,  -0.025241,  -0.052578,  0.012322,  -0.120556,
+  0.016278,  -0.081744,  -0.09916,  0.025144,  0.025441,
+  0.003176,  -0.073871,  0.031718,  -0.028622,  0.029031,
+  0.01791,  -0.030693,  -0.104215,  -0.015422,  -0.065738,
+  -0.048346,  -0.012847,  0.046849,  -0.008621,  0.058771,
+  -0.054495,  0.031597,  -0.038844,  0.043138,  0.092588,
+  -0.071371,  -0.059093,  -0.001197,  0.001766,  -0.074762,
+  0.02947,  0.089616,  0.005009,  0.052977,  0.015899,
+  -0.045424,  0.158466,  -0.038717,  -0.032506,  0.028687,
+  0.011435,  -0.006772,  0.047605,  -0.144659,  -0.031229,
+  0.073577,  0.01153,  -0.008172,  0.058883,  -0.088412,
+  0.033615,  -0.03412,  -0.030701,  0.101215,  0.096645,
+  0.027368,  0.041249,  0.081502,  -0.02544,  0.007592,
+  0.059893,  0.012106,  -0.112009,  -0.114692,  0.016397,
+  0.087068,  0.016199,  0.051263,  0.011915,  -0.085364,
+  0.026046,  0.145258,  -0.047521,  0.077134,  -0.000345,
+  0.034532,  0.099801,  -0.087591,  -0.059719,  -0.058671,
+  0.022737,  -0.001887,  -0.107049,  -0.116757,  0.134115,
+  -0.055403,  0.005157,  0.067618,  0.081074,  0.071787,
+  0.063802,  -0.00343,  -0.106491,  0.017543,  0.002214,
+  -0.013785,  -0.032962,  0.010084,  0.024325,  0.045963,
+  0.059883,  0.072282,  -0.008608,  -0.015127,  0.048225,
+  0.041752,  -0.068845,  0.012227,  -0.090748,  -0.035309,
+  0.045353,  -0.078624,  -0.019489,  0.035531,  0.058571,
+  0.045414,  0.039032,  -0.011106,  0.048787,  -0.025336,
+  -0.084893,  0.031896,  0.01085,  0.012526,  -0.053205,
+  0.016952,  -0.044041,  0.068766,  0.097328,  -0.122229,
+  0.027016,  -0.051759,  -0.057246,  0.074566,  0.006201,
+  0.069904,  0.100068,  0.076124,  0.004278,  0.029466,
+  0.045229,  0.055683,  0.01879,  -0.067806,  0.039373,
+  0.029179,  -0.036787,  0.129921,  -0.028993,  0.037711,
+  -0.105011,  0.138747,  -0.00437,  0.05208,  0.050835,
+  0.025511,  -0.002962,  0.007852,  -0.055234,  -0.075055,
+  0.00046,  -0.089231,  -0.030467,  -0.080347,  0.007488,
+  0.06746,  -0.076368,  0.084991,  0.039544,  0.033391,
+  -0.044318,  0.00639,  -0.079387,  -0.002909,  -0.029708,
+  -0.047882,  0.06304,  0.065719,  0.021811,  0.070945,
+  -0.007571,  -0.001302,  -0.064119,  -0.068005,  0.05104,
+  -0.017747,  -0.063938,  0.018673,  -0.038391,  -0.099966,
+  0.057475,  -0.007669,  0.009384,  0.109283,  0.012248,
+  -0.048858,  0.092498,  0.011967,  0.061525,  -0.028819,
+  -0.015131,  -0.02416,  -0.03322,  -0.101648,  -0.01798,
+  -0.003342,  -0.049829,  -0.125096,  0.128241,  -0.047377,
+  -0.028943,  -0.109072,  -0.066133,  -0.015454,  0.098334,
+  0.053371,  0.011324,  0.042781,  0.044313,  0.06251,
+  0.098408,  0.06541,  -0.040693,  -0.116351,  -0.032327,
+  -0.013634,  -0.058591,  0.081507,  0.042019,  -0.09977,
+  -0.018275,  0.084624,  -0.007512,  -0.041113,  0.054203,
+  0.017879,  -0.029747,  0.059865,  -0.048281,  -0.111513,
+  -0.022478,  0.002059,  0.022383,  -0.12536,  0.058216,
+  0.002386,  -0.0816,  0.049288,  0.157428,  0.057724,
+  0.005046,  0.102125,  -0.083473,  0.044059,  -0.094864,
+  0.03912,  -0.063306,  0.057341,  0.060519,  0.107383,
+  0.007076,  -0.009373,  -0.012555,  -0.06663,  0.117121,
+  0.025254,  -0.008796,  -0.062102,  -0.083164,  -0.079007,
+  0.084839,  0.042308,  -0.055353,  0.036386,  0.132641,
+  0.084464,  0.056288,  -0.011636,  -0.059554,  -0.087748,
+  -0.147377,  -0.052414,  -0.010203,  -0.009159,  -0.018829,
+  0.009621,  0.061633,  0.015716,  0.086332,  -0.061465,
+  -0.011833,  -0.062998,  -0.021168,  0.125194,  0.045025,
+  0.052316,  0.02572,  0.095155,  -0.093252,  0.02872,
+  0.056113,  0.063321,  -0.045315,  0.025199,  0.023591,
+  -0.070481,  0.07235,  0.092458,  0.047973,  -0.025439,
+  -0.001281,  0.021028,  0.034576,  0.084779,  0.006867,
+  -0.010323,  -0.04633,  -0.009172,  0.030485,  -0.117679,
+  -0.021782,  -0.034737,  -0.086292,  -0.045885,  0.009655,
+  -0.037167,  -0.123331,  0.017291,  -0.028319,  0.071447,
+  -0.05718,  -0.032912,  -0.139418,  -0.025966,  -0.039305,
+  0.009411,  -0.054017,  0.076307,  -0.060252,  0.110087,
+  -0.061366,  0.038897,  -0.098107,  0.046119,  0.043021,
+  -0.02913,  -0.096885,  0.007623,  0.090513,  -0.097416,
+  0.053264,  0.058296,  0.054372,  0.060769,  0.015586,
+  -0.067956,  0.059996,  -0.03785,  0.005986,  0.000778,
+  0.045873,  -0.065546,  0.0779,  -0.085638,  0.000698,
+  0.027694,  -0.021241,  -0.002777,  0.034509,  -0.048173,
+  0.009988,  0.001008,  -0.077434,  0.026002,  0.13949,
+  0.00891,  0.007791,  0.059292,  -0.057047,  0.014127,
+  -0.022959,  0.08571,  -0.068087,  -0.081561,  0.005935,
+  0.007577,  0.061544,  0.076542,  0.00166,  -0.113279,
+  0.024973,  0.08675,  -0.061674,  0.095059,  0.089352,
+  -0.024436,  0.024181,  -0.016117,  -0.073634,  -0.067986,
+  0.074701,  -0.046868,  -0.054634,  -0.092485,  0.006662,
+  -0.033256,  -0.053774,  0.049001,  -0.002339,  0.013545,
+  -0.006432,  -0.012089,  -0.086842,  0.104105,  0.061991
+};
+  /* codebook/lspjvm3.txt */
+static const float codes2[] = {
+  0.007066,  0.075781,  -0.070082,  -0.092014,  -0.066477,
+  0.09051,  0.106622,  0.025911,  -0.01676,  0.003724,
+  -0.024628,  0.058332,  0.012876,  0.059557,  -0.002092,
+  -0.065092,  -0.096975,  -0.041837,  -0.002432,  0.058918,
+  0.014358,  0.080049,  -0.008803,  -0.002091,  -0.097584,
+  0.085323,  -0.026053,  -0.086585,  -0.009541,  0.130555,
+  0.045391,  0.037557,  0.074726,  -0.050453,  0.033517,
+  -0.035576,  -0.084211,  -0.08643,  0.00891,  -0.072674,
+  -0.098699,  -0.02454,  -0.048972,  -0.066975,  -0.048791,
+  0.032184,  0.070992,  -0.014416,  0.141892,  -0.044249,
+  -0.108921,  -0.02045,  0.115988,  0.011287,  -0.026273,
+  0.024341,  0.138519,  -0.036467,  0.020684,  0.074258,
+  -0.053563,  0.077463,  0.072166,  0.032112,  -0.079303,
+  -0.025039,  0.079675,  0.094211,  -0.115754,  0.038892,
+  0.050897,  -0.024639,  0.057826,  -0.110429,  0.071184,
+  0.015309,  -0.034027,  -0.055726,  0.043179,  -0.063089,
+  0.043359,  -0.011698,  0.006637,  0.002751,  0.03011,
+  -0.001261,  0.11147,  0.043277,  -0.004205,  -0.021599,
+  -0.005698,  0.058842,  0.168422,  0.059313,  -0.007971,
+  -0.087599,  0.073891,  -0.083238,  0.099279,  -0.017364,
+  -0.018429,  0.01404,  -0.014864,  -0.111512,  0.08945,
+  -0.028498,  -0.087983,  -0.07732,  -0.062602,  0.000328,
+  -0.027152,  -0.093796,  0.111381,  -0.018603,  0.092394,
+  -0.007256,  0.025391,  0.011454,  0.012802,  -0.04168,
+  0.008078,  0.020905,  -0.105401,  -0.083265,  0.027756,
+  -0.04963,  -0.044085,  -0.051424,  0.104125,  -0.000779,
+  -0.063079,  -0.130699,  0.0705,  0.033468,  -0.019802,
+  -0.061011,  0.094839,  -0.040122,  0.118409,  0.05695,
+  0.086391,  -0.006615,  0.045337,  -0.04419,  -0.106474,
+  -0.081912,  0.067557,  -0.031649,  -0.014437,  0.057585,
+  -0.121755,  -0.049113,  0.057109,  -0.049872,  0.044104,
+  0.064705,  -0.091589,  0.037286,  -0.048606,  -0.045398,
+  0.003456,  0.05723,  0.006262,  -0.055206,  -0.063871,
+  -0.005249,  0.081783,  0.134969,  -0.002331,  0.052643,
+  -0.093346,  0.072093,  0.116025,  -0.031453,  -0.006012,
+  -0.038574,  -0.030841,  0.010288,  0.02442,  0.051657,
+  -0.086584,  0.046381,  0.00541,  0.052622,  -0.072741,
+  0.079023,  0.078099,  -0.093912,  0.005477,  -0.006721,
+  0.100232,  -0.017587,  0.044819,  0.036655,  0.02158,
+  -0.006829,  -0.050076,  -0.00302,  0.088246,  0.01356,
+  -0.01569,  0.012477,  -0.052595,  -0.048861,  -0.033688,
+  0.055615,  0.092298,  -0.066194,  0.016416,  -0.066059,
+  0.046976,  0.003023,  0.104646,  0.109136,  0.018293,
+  -0.016507,  -0.006859,  0.004326,  0.070843,  0.14075,
+  0.025774,  0.03473,  -0.07959,  0.050054,  -0.10795,
+  0.002378,  0.097498,  0.027111,  -0.122953,  -0.002423,
+  -0.020539,  -0.063263,  -0.095493,  -0.157361,  -0.039183,
+  0.025721,  0.026897,  -0.0012,  0.033997,  -0.001749,
+  0.061593,  -0.013053,  -0.106317,  -0.06819,  0.046352,
+  -0.05606,  0.157084,  -0.049365,  0.053959,  -0.051065,
+  -0.047672,  0.08157,  0.064342,  -0.030705,  -0.070806,
+  -0.076503,  -0.059471,  0.012419,  0.073968,  -0.026179,
+  -0.038473,  0.059013,  -0.035783,  -0.030057,  -0.036346,
+  -0.052692,  -0.015346,  -0.022687,  -0.035279,  0.013314,
+  0.068397,  -0.046609,  -0.009593,  -0.040796,  0.157438,
+  -0.07536,  -0.110464,  0.031839,  -0.029035,  -0.015222,
+  0.041013,  -0.099212,  -0.10892,  -0.008627,  0.012095,
+  0.020855,  0.009935,  -0.086917,  0.058827,  -0.006536,
+  0.022104,  -0.005013,  0.003496,  0.046663,  -0.051061,
+  -0.036803,  -0.067317,  -0.007075,  0.18087,  -0.027434,
+  -0.025056,  -0.039341,  -0.073918,  -0.00318,  -0.11093,
+  -0.042711,  0.005519,  -0.035005,  -0.088419,  0.170942,
+  0.001503,  -0.121485,  0.066383,  -0.067346,  0.005643,
+  0.080088,  -0.042562,  -0.006668,  -0.036538,  0.020683,
+  0.042848,  0.027852,  -0.029088,  -0.156468,  0.006503,
+  0.037716,  0.032082,  0.038416,  0.021835,  -0.106963,
+  -0.043017,  0.018166,  0.070409,  -0.005426,  -0.035585,
+  -0.111071,  -0.039986,  0.05043,  0.035157,  0.066902,
+  -0.040684,  0.060527,  0.036225,  0.002527,  -0.015087,
+  0.059243,  0.021268,  -0.010682,  -0.018434,  0.059128,
+  0.111314,  -0.05407,  0.105744,  -0.051476,  -0.01297,
+  -0.000358,  -0.099249,  -0.077385,  0.069924,  -0.039101,
+  -0.072139,  -0.049069,  -0.088018,  0.006144,  0.000712,
+  0.08103,  0.021987,  -0.046031,  0.058087,  -0.00132,
+  -0.046851,  -0.011062,  0.108321,  -0.001146,  -0.071193,
+  0.044973,  -0.002915,  -0.003323,  0.041735,  0.094566,
+  0.05353,  0.035927,  0.100282,  0.059082,  -0.054059,
+  -0.012158,  -0.035417,  0.020412,  -0.073193,  0.059296,
+  -0.040489,  -0.09525,  -0.003821,  -0.084904,  0.053925,
+  0.109183,  -0.005862,  -0.036538,  0.080962,  -0.040647,
+  0.02007,  0.057778,  -0.020197,  -0.079626,  -0.003186,
+  -0.050855,  0.128185,  0.034731,  0.05746,  -0.035236,
+  -0.057096,  -0.001238,  0.122018,  -0.071204,  -0.047253,
+  -0.051767,  0.048301,  -0.052678,  0.02599,  -0.017481,
+  -0.029379,  0.030738,  0.047207,  -0.047864,  -0.033561,
+  0.029884,  -0.091175,  -0.085446,  -0.02614,  0.092628,
+  0.067706,  -0.085617,  0.081433,  0.047305,  0.031945,
+  -0.048728,  -0.040387,  0.046206,  0.010578,  -0.037639,
+  0.011328,  -0.042458,  -0.149597,  0.033882,  -0.061869,
+  0.0088,  0.057754,  -0.095876,  0.03823,  0.096876,
+  -0.033487,  -0.141669,  -0.014172,  0.028439,  -0.092764,
+  -0.053714,  0.086926,  0.034786,  0.136053,  -0.005569,
+  0.028753,  0.00963,  0.044114,  -0.050365,  -0.066224,
+  0.006017,  0.014348,  0.024471,  0.000489,  0.067234,
+  -0.021678,  -0.11876,  0.036349,  -0.040295,  0.076358,
+  -0.008444,  -0.086082,  -0.044018,  -0.025804,  0.028971,
+  -0.009233,  0.053026,  -0.035341,  -0.182193,  -0.102515,
+  0.08921,  0.066812,  0.032417,  0.046882,  -0.034815,
+  -0.052293,  0.022814,  0.129622,  0.128232,  -0.012105,
+  -0.087084,  0.004762,  0.086538,  0.046566,  0.098359,
+  -0.018713,  0.039204,  -0.021707,  -0.06011,  -0.117527,
+  -0.005459,  0.060994,  -0.057718,  -0.021783,  0.035154,
+  0.100557,  -0.01547,  -0.025818,  0.00845,  0.051535,
+  -0.001388,  -0.11461,  -0.057903,  0.041862,  0.061778,
+  0.045701,  -0.078563,  -0.070166,  -0.04845,  -0.08853,
+  0.021375,  -0.004598,  -0.09071,  -0.009399,  -0.073952,
+  -0.035575,  -0.05028,  0.11478,  0.137866,  0.065234,
+  0.003594,  -0.066802,  -0.144989,  0.166201,  0.039564,
+  -0.022457,  -0.03009,  0.016187,  0.115443,  -0.097331,
+  -0.019139,  0.09944,  0.002198,  -0.030953,  0.021099,
+  -0.045399,  -0.046871,  0.022533,  -0.064657,  0.005776,
+  0.049063,  -0.028478,  0.019268,  0.054265,  0.028042,
+  0.045559,  -0.005541,  -0.01441,  -0.024165,  -0.054976,
+  -0.073258,  0.084205,  0.036077,  -0.068683,  0.004708,
+  -0.085228,  0.001234,  0.046261,  -0.050496,  -0.028227,
+  -0.086828,  -0.001218,  0.021865,  0.003791,  -0.000568,
+  -0.088733,  -0.040041,  -0.035891,  -0.054915,  0.073463,
+  -0.132031,  -0.012844,  -0.068544,  0.013052,  0.087335,
+  0.038603,  -0.115382,  -0.010433,  -0.007113,  0.095126,
+  -0.047378,  -0.081353,  0.018021,  -0.021156,  -0.120774,
+  0.040038,  0.007633,  -0.088728,  -0.009928,  0.020142,
+  0.052024,  -0.021063,  -0.118121,  0.102739,  -0.055837,
+  0.005253,  -0.061924,  0.06368,  -0.014512,  -0.020259,
+  0.029493,  -0.013435,  -0.020638,  0.089342,  0.001092,
+  -0.046491,  -0.145634,  -0.083159,  -0.158142,  -0.279281,
+  0.003611,  0.055863,  -0.064655,  -0.088773,  0.089283,
+  -0.029619,  -0.089949,  0.017197,  -0.066633,  -0.052347,
+  0.090828,  -0.087551,  0.000338,  0.085238,  -0.005313,
+  0.096211,  0.071381,  -0.076546,  -0.077927,  -0.040864,
+  0.062936,  0.041559,  0.016235,  -0.017513,  0.014773,
+  -0.025734,  0.028586,  0.070292,  0.055794,  -0.026131,
+  -0.076954,  -0.082228,  0.043947,  -0.035921,  0.152668,
+  -0.04951,  0.023159,  0.008506,  -0.044773,  -0.160358,
+  0.024984,  -0.025587,  -0.071627,  -0.038376,  0.088478,
+  0.120568,  0.046723,  0.086731,  0.000695,  -0.015751,
+  -0.027837,  -0.160937,  -0.095031,  0.036271,  -0.009061,
+  -0.015078,  -0.036281,  -0.103665,  -0.058258,  -0.049573,
+  0.022021,  0.108296,  -0.002586,  0.065655,  -0.018584,
+  -0.046441,  -0.031018,  0.06735,  0.014328,  0.00886,
+  -0.000245,  0.0634,  -0.00181,  0.043515,  0.090344,
+  -0.063845,  0.020485,  0.079401,  0.070558,  -0.116428,
+  0.032628,  0.068949,  0.052238,  -0.04453,  0.096813,
+  0.029911,  -0.008814,  0.044352,  -0.168172,  0.009604,
+  0.055828,  -0.100739,  -0.026013,  0.021193,  -0.051425,
+  0.035891,  -0.004085,  0.030216,  -0.060801,  0.037202,
+  0.007262,  0.120686,  0.026846,  0.058464,  -0.100792,
+  -0.009176,  0.027589,  0.123957,  -0.011283,  -0.025744,
+  -0.105081,  0.118244,  -0.042122,  -0.025404,  0.000873,
+  -0.012703,  0.084159,  -0.067539,  -0.140536,  0.041637,
+  -0.014485,  -0.043382,  -0.048004,  -0.075416,  0.054401,
+  -0.018651,  -0.032908,  0.164231,  -0.053236,  0.033946,
+  -0.021681,  -0.012655,  -0.037049,  -0.001613,  -0.053393,
+  -0.014635,  0.017954,  -0.116115,  -0.027232,  0.034005,
+  -0.035376,  0.026492,  -0.03725,  0.070733,  0.074835,
+  -0.021378,  -0.14298,  0.123195,  0.003699,  0.025398,
+  0.015629,  0.07737,  0.032623,  0.12158,  0.0971,
+  0.000946,  -0.056355,  0.042065,  0.008184,  -0.081824,
+  -0.101937,  0.065473,  0.00336,  0.069241,  0.073002,
+  -0.053844,  -0.044301,  0.080351,  -0.091833,  0.044288,
+  0.007447,  -0.120723,  -0.013806,  -0.023636,  -0.064616,
+  0.030556,  0.07263,  0.074428,  -0.087759,  -0.02644,
+  0.06484,  0.049162,  0.091053,  0.023891,  0.033811,
+  -0.027746,  0.116392,  0.106126,  -0.056644,  -0.014781,
+  0.036137,  -0.002632,  0.055512,  0.070077,  0.067819,
+  -0.030625,  0.053772,  -0.078457,  -0.021351,  -0.113011,
+  0.052797,  0.044875,  -0.077269,  -0.009867,  0.101493,
+  0.073477,  -0.024103,  0.049145,  -0.004706,  -0.025211,
+  -0.053731,  -0.049009,  -0.035786,  0.05443,  0.046515,
+  0.025154,  -0.043569,  -0.034789,  -0.05861,  0.006931,
+  0.012049,  0.046809,  -0.129441,  0.025541,  -0.030933,
+  0.000297,  -0.054058,  0.179837,  0.081515,  0.004932,
+  -0.028445,  -0.073753,  0.010629,  0.080042,  0.09871,
+  -0.014017,  0.057597,  0.00101,  0.071658,  -0.06757,
+  0.074384,  0.110366,  -0.018121,  -0.108754,  0.037793,
+  0.028041,  -0.047508,  -0.031359,  -0.098913,  -0.036486,
+  -0.017311,  -0.001279,  -0.013694,  0.051968,  0.036512,
+  0.088201,  0.031155,  -0.043442,  -0.065045,  0.023486,
+  0.027,  0.104768,  -0.015176,  -0.038754,  -0.004178,
+  0.003732,  0.062166,  0.085438,  -0.077368,  -0.101645,
+  -0.118347,  0.007589,  -0.056489,  0.082268,  0.020253,
+  -0.035623,  0.034235,  -0.099354,  -0.061237,  -0.024285,
+  0.005441,  -0.039694,  -0.025957,  -0.004411,  0.049903,
+  0.00304,  0.036243,  0.023552,  -0.007334,  0.128963,
+  -0.077727,  -0.059175,  -0.019437,  -0.024872,  0.004339,
+  0.084006,  -0.076605,  -0.102261,  0.036714,  -0.035205,
+  -0.007642,  -0.005125,  -0.030525,  0.09639,  -0.053138,
+  -0.002192,  -0.024851,  0.050645,  0.04149,  -0.043183,
+  0.046796,  -0.050894,  0.055023,  0.133834,  -0.024013,
+  0.000872,  -0.057072,  -0.00063,  0.04207,  -0.129339,
+  -0.064283,  0.037836,  -0.066393,  0.004438,  0.125379,
+  -0.062213,  -0.067468,  0.090177,  -0.046094,  -0.025725,
+  0.079101,  -0.074909,  -0.04373,  -0.073483,  0.069672,
+  -0.020413,  -7.9e-05,  -0.049725,  -0.120751,  -0.04698,
+  0.039894,  0.072305,  0.009798,  0.005613,  -0.045217,
+  0.006862,  0.036285,  0.074819,  -0.006747,  0.015144,
+  -0.071562,  0.012324,  -0.001082,  0.014835,  0.07996,
+  -0.027804,  0.103358,  -0.017203,  0.014914,  -0.056687,
+  0.030827,  0.028076,  0.003395,  -0.073255,  0.11031,
+  0.056498,  -0.044893,  0.110122,  -0.109058,  -0.052302,
+  -0.001604,  -0.089977,  -0.060548,  0.107808,  0.025463,
+  -0.070203,  -0.000513,  -0.123913,  0.046247,  -0.085392,
+  0.096343,  0.09589,  -0.06495,  0.070363,  0.034272,
+  0.037773,  -0.07695,  0.124858,  -0.009008,  -0.010115,
+  0.083868,  0.051242,  0.039149,  0.015185,  0.083375,
+  0.029773,  -0.045961,  0.100395,  0.003743,  -0.138294,
+  -0.041755,  0.010806,  0.057797,  -0.147374,  0.095858,
+  -0.009929,  -0.103347,  -0.03231,  -0.11056,  0.121377,
+  0.145244,  0.017079,  -0.080587,  0.020516,  -0.044939,
+  -0.010477,  0.038347,  -0.003466,  -0.001618,  0.0196,
+  -0.021762,  0.125482,  0.011074,  0.065815,  0.040298,
+  0.009202,  -0.051686,  0.129684,  -0.131135,  0.044536,
+  0.009313,  0.102518,  -0.075351,  0.054338,  0.020273,
+  -0.045753,  0.031345,  0.000407,  -0.097294,  -0.000416,
+  -0.007466,  -0.044972,  -0.078744,  0.042414,  0.066624,
+  0.030318,  -0.067852,  0.061416,  -0.028992,  0.056606,
+  0.004038,  -0.036253,  -0.014279,  0.023123,  -0.007832,
+  -0.000137,  -0.027684,  -0.127648,  -0.007713,  -0.008746,
+  -0.0265,  0.049032,  -0.183319,  0.059107,  0.0665,
+  0.016902,  -0.093331,  0.090129,  0.016648,  -0.083492,
+  -0.023669,  -0.010473,  0.027614,  0.145068,  0.000681,
+  0.044133,  -0.035809,  0.005668,  -0.090461,  -0.090732,
+  -0.033927,  0.042997,  0.0217,  -0.046955,  0.044487,
+  -0.026444,  -0.061011,  0.01011,  -0.023804,  0.030427,
+  -0.015195,  -0.155603,  -0.016584,  0.021461,  -0.003528,
+  -0.059784,  0.032214,  0.000847,  -0.098859,  -0.07898,
+  0.043188,  0.066433,  0.062309,  0.144507,  0.006865,
+  -0.068953,  0.046698,  0.099369,  0.043354,  -0.014309,
+  -0.033202,  -0.00295,  0.040734,  0.083454,  0.039319,
+  0.051358,  0.006074,  -0.073465,  -0.090554,  -0.120787,
+  -0.040676,  0.092412,  -0.085151,  -0.021699,  0.005813,
+  0.103135,  0.024964,  0.025832,  -0.075982,  0.035699,
+  -0.02731,  -0.153007,  0.03642,  0.0576,  0.08163,
+  0.001605,  -0.054191,  -0.033043,  -0.01439,  -0.071383,
+  0.03618,  0.03586,  -0.04698,  0.038541,  -0.044757,
+  -0.078032,  -0.029878,  0.078183,  0.082251,  0.010549,
+  0.053317,  -0.038231,  -0.06561,  0.055798,  0.037504,
+  0.076317,  -0.027605,  0.010349,  0.095361,  -0.088636,
+  0.049089,  0.113316,  0.051084,  0.038589,  0.03433,
+  -0.055948,  -0.037217,  -0.015418,  -0.139976,  0.036306,
+  0.039306,  -0.009889,  -0.04491,  0.016559,  -5e-05,
+  0.106073,  0.01528,  -0.002563,  -0.109085,  -0.048475,
+  -0.035319,  0.16386,  0.032981,  -0.044932,  0.003227,
+  -0.123233,  -0.010638,  0.055479,  -0.003666,  -0.072249,
+  -0.111158,  0.065365,  0.010691,  0.039119,  -0.001837,
+  -0.118729,  0.06147,  -0.002077,  -0.033335,  -0.060165,
+  -0.026081,  -0.001806,  -0.079616,  -7.5e-05,  0.080598,
+  0.032908,  -0.03514,  -0.003136,  -0.029024,  0.094622,
+  -0.075773,  -0.022898,  -0.014817,  0.058393,  -0.111505,
+  0.036794,  -0.01576,  -0.112602,  0.030323,  0.085897,
+  -0.020834,  0.056079,  -0.103762,  0.117671,  -0.041205,
+  0.041684,  -0.084336,  0.034186,  0.011973,  -0.006313,
+  0.040836,  -0.035709,  0.03417,  0.122672,  0.090973,
+  -0.053182,  -0.059371,  0.091017,  -0.090998,  -0.116986,
+  0.001405,  0.138364,  0.017107,  -0.064076,  0.103486,
+  -0.031142,  -0.030068,  0.046547,  -0.133471,  -0.042055,
+  0.140418,  -0.125084,  0.035218,  -0.001162,  -0.02113,
+  -0.012034,  0.097413,  -0.079006,  -0.03903,  -0.054011,
+  0.143887,  0.078835,  -0.000601,  -0.021173,  -0.039895,
+  -0.02505,  0.075865,  0.039221,  0.032458,  0.038206,
+  -0.038873,  -0.085003,  -0.032736,  -0.026956,  0.113525,
+  -0.023933,  0.120794,  -0.003862,  -0.026459,  -0.138724,
+  0.089559,  0.029002,  -0.052098,  -0.085692,  0.115174,
+  0.083497,  0.024179,  0.119021,  -0.067541,  0.019047,
+  -0.02772,  -0.086083,  -0.055329,  0.020087,  -0.027086,
+  -0.047858,  -0.051975,  -0.035205,  -0.059342,  -0.068582,
+  0.058936,  0.044141,  -0.080315,  0.119744,  -0.046518,
+  -0.064588,  -0.027212,  0.147823,  0.032404,  0.01669,
+  0.024302,  0.08556,  -0.001525,  0.016469,  0.038891,
+  -0.020146,  0.019943,  0.045067,  0.03807,  -0.086274,
+  -0.025769,  0.044192,  0.102141,  -0.064765,  0.055849,
+  0.048803,  -0.030066,  -0.00922,  -0.116655,  0.068295,
+  0.04758,  -0.076138,  -0.070307,  0.047582,  -0.111342,
+  0.004656,  -0.004452,  0.029703,  -0.004259,  0.01113,
+  0.014446,  0.166086,  0.059565,  0.000985,  -0.052607,
+  0.013251,  0.094476,  0.106216,  0.016715,  -0.025581,
+  -0.101244,  0.072897,  -0.114526,  0.024681,  0.010784,
+  -0.051759,  0.032389,  -0.050202,  -0.083316,  0.052334,
+  -0.0351,  -0.116721,  -0.110336,  -0.053391,  0.065541,
+  -0.02979,  -0.020457,  0.135285,  -0.004142,  0.111508,
+  -0.030936,  0.018549,  -0.016034,  0.018572,  -0.084336,
+  -0.048615,  -0.018739,  -0.096815,  -0.090162,  0.01941,
+  -0.040821,  -0.009925,  -0.097427,  0.091891,  0.031793,
+  -0.024598,  -0.132848,  0.078353,  0.089339,  -0.068562,
+  -0.020779,  0.040974,  -0.055675,  0.169131,  0.029649,
+  0.078165,  -0.050679,  -0.005881,  -0.004983,  -0.104324,
+  -0.069096,  0.12796,  0.011392,  -0.000769,  0.062168,
+  -0.079842,  0.001606,  0.089284,  -0.035465,  0.031075,
+  0.029519,  -0.102956,  -0.010902,  -0.06403,  -0.019669,
+  0.057492,  0.075802,  -0.008904,  -0.060743,  -0.053144,
+  0.005126,  0.06298,  0.085674,  0.019895,  0.104448,
+  -0.086473,  0.056906,  0.056795,  -0.01294,  0.036606,
+  -0.008604,  -0.04045,  0.042062,  0.04181,  0.02768,
+  -0.092256,  0.091237,  -0.0395,  0.024761,  -0.088978,
+  0.068585,  0.088295,  -0.048033,  -0.017808,  0.04537,
+  0.1246,  -0.03532,  0.056751,  0.092751,  0.054025,
+  -0.015725,  -0.061938,  0.036806,  0.078768,  -0.016065,
+  0.002444,  -0.023887,  -0.072177,  -0.02979,  -0.00586,
+  0.015478,  0.129142,  -0.091024,  0.071482,  -0.065445,
+  0.005867,  -0.006051,  0.098646,  0.054089,  0.018713,
+  0.033837,  -0.008355,  -0.051959,  0.05744,  0.160305,
+  -0.001863,  0.016738,  -0.033705,  0.062233,  -0.140759,
+  0.027342,  0.060074,  0.030362,  -0.117875,  0.06102,
+  -0.028026,  -0.088238,  -0.003782,  -0.146288,  -0.080395,
+  0.050048,  0.036136,  0.0195,  0.066902,  0.020355,
+  0.024817,  -0.056254,  -0.140918,  -0.085803,  0.02054,
+  -0.00373,  0.161411,  -0.049408,  0.000219,  -0.002348,
+  -0.055021,  0.06782,  0.126483,  -0.031063,  -0.119299,
+  -0.102834,  0.001133,  0.010172,  0.107707,  -0.029106,
+  -0.059813,  0.036698,  -0.02172,  -0.043189,  -0.00227,
+  -0.031694,  0.009605,  -0.022459,  -0.036417,  0.053675,
+  0.061561,  -0.012723,  0.05004,  -0.02945,  0.131044,
+  -0.124516,  -0.107579,  -0.012171,  0.011761,  0.002599,
+  0.016327,  -0.060854,  -0.08091,  0.030875,  -0.002997,
+  -0.02097,  -0.01188,  -0.086096,  0.037912,  0.012421,
+  0.055253,  -0.00725,  0.04174,  0.055596,  -0.02442,
+  -0.017564,  -0.079202,  0.008897,  0.180091,  0.05449,
+  0.001772,  -0.022151,  -0.082048,  -0.010559,  -0.163377,
+  -0.02066,  -0.017827,  -0.0308,  -0.045856,  0.122405,
+  -0.052946,  -0.13049,  0.097383,  -0.116737,  0.039855,
+  0.056504,  -0.059549,  -0.059931,  -0.018658,  0.034898,
+  0.054889,  0.005373,  -0.066796,  -0.12736,  0.04796,
+  0.071746,  0.02741,  -0.006212,  0.024132,  -0.094062,
+  0.005369,  -0.008926,  0.073085,  -0.014265,  -0.029204,
+  -0.100025,  -0.072076,  0.014651,  0.069368,  0.048275,
+  -0.066823,  0.086074,  0.014921,  -0.015395,  -0.045138,
+  0.026224,  0.000902,  -0.038208,  -0.035221,  0.057397,
+  0.097606,  -0.073195,  0.051626,  -0.033488,  0.027813,
+  0.00207,  -0.09751,  -0.057877,  0.12668,  -0.082194,
+  -0.072597,  0.006014,  -0.093185,  -0.016853,  -0.02279,
+  0.138461,  0.005394,  -0.056485,  0.102778,  0.028918,
+  -0.045604,  -0.060041,  0.121251,  0.02926,  -0.101404,
+  0.061194,  0.033039,  -0.016798,  0.064263,  0.065144,
+  0.010925,  0.023151,  0.107623,  0.027977,  -0.090356,
+  -0.024863,  -0.00644,  0.04787,  -0.047486,  0.088211,
+  -0.012139,  -0.116121,  -0.000525,  -0.140961,  0.016604,
+  0.06349,  -0.022732,  -0.046944,  0.06697,  -0.068838,
+  0.016143,  0.026202,  -0.043344,  -0.064881,  0.024877,
+  -0.072845,  0.120531,  0.077901,  0.047272,  0.011713,
+  -0.044646,  0.040932,  0.076164,  -0.101233,  -0.029615,
+  -0.065118,  0.050966,  -0.023273,  0.053517,  0.02371,
+  -0.007489,  0.035822,  0.023439,  -0.055528,  -0.004033,
+  -0.007662,  -0.096546,  -0.081662,  0.037141,  0.137562,
+  0.075526,  -0.097496,  0.12399,  0.013996,  0.087005,
+  -0.019788,  -0.082043,  0.020524,  0.007027,  -0.021537,
+  -0.036264,  -0.090952,  -0.177722,  -0.009306,  -0.031473,
+  -0.009287,  0.047557,  -0.090241,  0.089347,  0.056375,
+  -0.005506,  -0.112128,  0.004356,  0.064421,  -0.038478,
+  -0.035674,  0.040616,  0.007731,  0.160236,  -0.054199,
+  -0.007537,  0.012434,  0.022001,  -0.021567,  -0.075163,
+  -0.026053,  0.015909,  0.041015,  0.021832,  0.034152,
+  -0.048539,  -0.086655,  0.047465,  0.000682,  0.04264,
+  0.023697,  -0.095971,  -0.022874,  -0.000369,  0.003413,
+  0.046005,  0.064807,  0.010131,  -0.129517,  -0.092254,
+  0.116469,  0.053796,  0.03811,  0.09447,  0.018435,
+  -0.034803,  0.073591,  0.108348,  0.104096,  0.049884,
+  -0.021274,  0.022097,  0.065347,  0.065555,  0.089319,
+  0.000474,  -0.004186,  -0.040493,  -0.065543,  -0.083167,
+  -0.017425,  0.049177,  -0.044248,  0.008399,  0.06818,
+  0.154778,  0.027549,  -0.008012,  0.01495,  0.043254,
+  0.039599,  -0.136415,  -0.018716,  0.0619,  0.031263,
+  0.058118,  -0.0372,  -0.114692,  -0.080876,  -0.053238,
+  0.077436,  0.015015,  -0.092517,  0.005804,  -0.065541,
+  -0.005653,  -0.073184,  0.095594,  0.08247,  0.060989,
+  -0.000262,  -0.035766,  -0.083441,  0.122634,  0.088429,
+  -0.014397,  -0.055434,  -0.005659,  0.069697,  -0.064892,
+  0.008824,  0.082498,  0.051866,  -0.03607,  0.033403,
+  -0.082855,  -0.087376,  0.002714,  -0.097121,  -0.01917,
+  0.027179,  -0.06987,  -0.009316,  0.04745,  0.040657,
+  0.060527,  0.00462,  -0.040264,  -0.051228,  -0.029023,
+  -0.071384,  0.101421,  0.009538,  -0.099185,  0.0601,
+  -0.048395,  -0.024677,  0.025125,  -0.056043,  -0.058045,
+  -0.054059,  0.008107,  0.021078,  0.04529,  -0.018459,
+  -0.113359,  0.014009,  -0.006826,  -0.052747,  0.046922,
+  -0.075976,  0.008538,  -0.084411,  -0.004369,  0.045801,
+  0.075392,  -0.06734,  0.014454,  0.032407,  0.092478,
+  -0.061859,  -0.083458,  0.051442,  0.031695,  -0.080233,
+  0.054028,  0.027,  -0.073549,  0.0323,  0.036501,
+  -0.011384,  -0.02078,  -0.124142,  0.093905,  -0.028332,
+  0.039139,  -0.030944,  0.079952,  -0.001717,  0.013976,
+  0.038005,  -0.001751,  -0.044097,  0.129827,  0.014385,
+  -0.001682,  -0.063458,  -0.002511,  -0.07815,  -0.141236,
+  0.021955,  0.104851,  -0.093246,  -0.060019,  0.069998,
+  0.004399,  -0.096408,  0.059327,  -0.062268,  -0.074327,
+  0.108063,  -0.090534,  -0.045654,  0.048119,  0.049187,
+  0.042105,  0.043964,  -0.091516,  -0.047999,  -0.028881,
+  0.070471,  0.055401,  -0.025605,  0.011176,  0.008475,
+  0.022254,  0.038266,  0.048106,  0.047176,  -0.017967,
+  -0.010978,  -0.088762,  0.034806,  0.019311,  0.126815,
+  -0.010571,  0.053073,  0.032162,  -0.00078,  -0.1522,
+  -0.014253,  -0.021954,  -0.13104,  -0.061376,  0.113838,
+  0.060725,  0.020201,  0.102533,  -0.011392,  -0.052046,
+  -0.069625,  -0.091011,  -0.097954,  0.067847,  0.017856,
+  -0.053461,  -0.040679,  -0.121664,  -0.077208,  -0.106919,
+  0.057996,  0.069756,  -0.012433,  0.069569,  -0.055159,
+  -0.024801,  -0.060448,  0.1017,  0.014619,  0.03658,
+  -0.004526,  0.093977,  -0.028211,  0.045261,  0.149736,
+  -0.014691,  -0.007959,  0.097708,  0.107128,  -0.079723,
+  0.029157,  0.020116,  0.104828,  -0.064208,  0.119172,
+  0.039583,  -0.029446,  0.006628,  -0.110398,  0.004062,
+  0.048132,  -0.060601,  0.009448,  0.051777,  -0.053127,
+  0.050551,  -0.001924,  0.028079,  -0.050618,  -0.013698,
+  0.00192,  0.088162,  0.073078,  0.085795,  -0.066788,
+  0.014025,  0.042699,  0.176241,  -0.046674,  -0.034822,
+  -0.051433,  0.121729,  -0.057076,  0.023901,  0.045075,
+  -0.057182,  0.05478,  -0.01728,  -0.146674,  0.00209,
+  -0.016223,  -0.044841,  -0.084524,  -0.152479,  0.072688,
+  -0.006962,  0.008711,  0.127455,  -0.003876,  0.053162,
+  -0.013682,  -0.025386,  -0.000427,  -0.024811,  -0.024474,
+  -0.056267,  0.062116,  -0.121311,  -0.053011,  0.065651,
+  -0.075385,  -0.00868,  -0.063033,  0.083039,  0.110577,
+  -0.000152,  -0.127017,  0.055904,  0.013659,  0.005664,
+  -0.002852,  0.047248,  0.001128,  0.100773,  0.037274,
+  0.026368,  -0.042205,  0.021887,  -0.020247,  -0.056678,
+  -0.077475,  0.089799,  0.058003,  0.039741,  0.106663,
+  -0.016853,  -0.015972,  0.075741,  -0.048829,  0.015374,
+  -0.032657,  -0.125677,  -0.06206,  -0.057409,  -0.061287,
+  0.073151,  0.050357,  0.053547,  -0.059886,  -0.051298,
+  0.057954,  -0.003817,  0.076028,  0.006757,  0.061109,
+  -0.03803,  0.143209,  0.092207,  -0.018493,  0.062291,
+  0.005751,  -0.036449,  0.067582,  0.031449,  0.101894,
+  -0.080754,  0.011515,  -0.049485,  -0.016137,  -0.087818,
+  0.108851,  0.038222,  -0.099315,  -0.003117,  0.052278,
+  0.107517,  -0.036233,  0.06537,  0.040409,  -0.057029,
+  -0.033167,  -0.081758,  -0.019502,  0.033438,  0.013365,
+  -0.01776,  -0.025906,  -0.020244,  -0.078722,  -0.011697,
+  -0.028246,  0.068647,  -0.106417,  0.026956,  -0.064914,
+  0.062711,  -0.017857,  0.151539,  0.044613,  -0.01782,
+  0.009085,  -0.032785,  -0.025795,  0.07579,  0.075667,
+  -0.040398,  0.058556,  -0.042634,  0.093973,  -0.099529,
+  0.057103,  0.073562,  0.01264,  -0.066141,  0.029558,
+  0.060219,  -0.083699,  -0.054799,  -0.120442,  -0.000374,
+  0.006521,  0.034512,  -0.039558,  0.042191,  0.033865,
+  0.103992,  -0.014977,  -0.077384,  -0.05134,  0.001873,
+  0.047451,  0.140612,  -0.024885,  -0.02142,  -0.046604,
+  0.030606,  0.10066,  0.076356,  -0.019288,  -0.09857,
+  -0.114463,  -0.010855,  -0.034657,  0.025618,  -0.003356,
+  -0.087913,  0.064346,  -0.07554,  -0.091569,  -0.024965,
+  -0.021232,  -0.017255,  -0.056931,  -0.003104,  0.030219,
+  -0.020112,  -0.012334,  0.035298,  0.001405,  0.161753,
+  -0.064618,  -0.064401,  -0.007218,  -0.00012,  -0.047208,
+  0.116105,  -0.056464,  -0.069645,  -0.007032,  -0.01209,
+  -0.023237,  0.016,  -0.039802,  0.074319,  -0.012604,
+  0.014863,  -0.058081,  0.093219,  0.062253,  -0.040302,
+  0.027405,  -0.128683,  0.039923,  0.116808,  -0.011706,
+  0.012483,  -0.017698,  0.003645,  -0.007588,  -0.120662,
+  -0.032868,  0.066217,  -0.031343,  -0.034166,  0.146334,
+  -0.031228,  -0.125921,  0.117756,  -0.042686,  -0.062094,
+  0.049375,  -0.112262,  0.010166,  -0.073599,  0.04869,
+  0.028292,  0.020076,  -0.062865,  -0.106114,  -0.0253,
+  0.066916,  0.029279,  0.028191,  -0.003599,  -0.040614,
+  0.020491,  0.060238,  0.052747,  -0.01039,  -0.022389,
+  -0.063358,  -0.028707,  0.035907,  -0.011898,  0.079703,
+  -0.003758,  0.078051,  -0.017869,  0.009045,  -0.018982,
+  0.034974,  0.069405,  -0.018909,  -0.038613,  0.083909,
+  0.033935,  -0.036607,  0.088891,  -0.052599,  -0.059839,
+  0.052758,  -0.068308,  -0.063615,  0.126093,  -0.00946,
+  -0.042175,  -0.011113,  -0.073071,  0.052086,  -0.052619,
+  0.049226,  0.066898,  -0.045666,  0.117923,  0.053656,
+  -0.010739,  -0.043962,  0.141903,  0.001792,  -0.035469,
+  0.090671,  0.043993,  -0.013655,  0.018989,  0.127223,
+  0.00103,  -0.001154,  0.081839,  -0.024979,  -0.103704,
+  -0.07792,  0.036083,  0.06822,  -0.06221,  0.11373,
+  -0.010501,  -0.065801,  0.050885,  -0.104304,  0.121937,
+  0.11185,  0.00968,  -0.011791,  0.001677,  -0.035029,
+  0.010677,  0.024572,  -0.01286,  -0.030323,  -0.010466,
+  0.011279,  0.167752,  0.003136,  0.109709,  0.007292,
+  0.000987,  0.004572,  0.108706,  -0.113192,  -0.012431,
+  -0.015225,  0.073653,  -0.051275,  0.077928,  -0.012752,
+  -0.011708,  0.014172,  0.025162,  -0.095378,  0.026382,
+  -0.028889,  -0.058569,  -0.129329,  0.011087,  0.061452,
+  0.056893,  -0.058004,  0.103586,  -0.060752,  0.081824,
+  -0.042805,  -0.015991,  -0.024444,  0.028952,  -0.013528,
+  0.042851,  0.019988,  -0.165741,  -0.031012,  -0.014713,
+  -0.026059,  0.031698,  -0.134343,  0.03209,  0.020828,
+  0.051674,  -0.128006,  0.050856,  0.02222,  -0.073513,
+  -0.00934,  0.013756,  0.036163,  0.098407,  -0.023495,
+  0.023858,  0.008121,  0.02222,  -0.103489,  -0.046663,
+  -0.033,  0.063565,  0.029224,  -0.012693,  0.084202,
+  0.012187,  -0.051,  0.026126,  -0.043293,  0.008675,
+  -0.019812,  -0.16507,  -0.014555,  -0.047431,  0.01799,
+  -0.040073,  0.107192,  0.022228,  -0.089023,  -0.066885,
+  0.01463,  0.073186,  0.069902,  0.072634,  0.019593,
+  -0.041539,  0.031788,  0.09231,  0.027223,  0.034027,
+  -0.051855,  0.000391,  0.007869,  0.13191,  0.069384,
+  0.046276,  0.04044,  -0.037093,  -0.031393,  -0.112828,
+  0.015709,  0.096749,  -0.103205,  -0.021284,  0.011405,
+  0.158287,  -0.021028,  0.042219,  -0.050759,  0.069715,
+  -0.042907,  -0.11698,  0.014224,  0.094648,  0.028395,
+  0.041535,  -0.057033,  -0.047607,  -0.024419,  -0.034905,
+  0.010125,  0.036728,  -0.052503,  -0.001839,  -0.033477,
+  -0.053414,  -0.070394,  0.092895,  0.1006,  -0.026352,
+  0.080574,  -0.028763,  -0.059548,  0.094571,  0.091787,
+  0.041437,  0.014312,  0.045792,  0.108269,  -0.081586,
+  0.056288,  0.137447,  0.054718,  -0.032474,  0.054502,
+  -0.100144,  -0.00646,  0.024739,  -0.117043,  -0.008919,
+  0.070299,  -0.036862,  -0.014543,  0.0245,  -0.015222,
+  0.114975,  -0.043705,  0.000421,  -0.061872,  -0.035148,
+  -0.022797,  0.128575,  -0.031798,  -0.086718,  -0.007172,
+  -0.071706,  -0.006833,  0.028645,  -0.007011,  -0.096745,
+  -0.142269,  0.027996,  0.06521,  0.061381,  0.000741,
+  -0.140531,  0.01748,  -0.014986,  -0.040893,  -0.012718,
+  -0.012494,  -0.021869,  -0.032923,  0.016456,  0.104475,
+  0.010792,  -0.066178,  0.019097,  -0.001893,  0.067513,
+  -0.092673,  -0.059851,  -0.045936,  0.052642,  -0.0625,
+  0.065013,  -0.025659,  -0.149301,  0.051705,  0.035692,
+  -0.04579,  -0.007482,  -0.069141,  0.149365,  -0.042039,
+  0.018492,  -0.081315,  0.05588,  0.058158,  0.019669,
+  0.063836,  -0.012391,  0.007057,  0.155454,  0.033854,
+  -0.016532,  -0.007661,  0.043113,  -0.080283,  -0.10867,
+  -0.029344,  0.093781,  -0.01584,  -0.068134,  0.091804,
+  0.004148,  -0.058507,  0.059633,  -0.095883,  -0.004939,
+  0.086151,  -0.113571,  -0.019466,  -0.009167,  0.003662
+};
+
+const struct lsp_codebook lsp_cbjvm[] = {
+  /* codebook/lspjvm1.txt */
+  {
+    10,
+    9,
+    512,
+    codes0
+  },
+  /* codebook/lspjvm2.txt */
+  {
+    5,
+    9,
+    512,
+    codes1
+  },
+  /* codebook/lspjvm3.txt */
+  {
+    5,
+    9,
+    512,
+    codes2
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookres.c b/libs/libcodec2/src/codebookres.c
new file mode 100644 (file)
index 0000000..e410dfc
--- /dev/null
@@ -0,0 +1,97 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* ../src/codebook/lspres_centre1.txt */
+static const float codes0[] = {
+  300,
+  350,
+  400,
+  450,
+  500,
+  550,
+  600,
+  650
+};
+  /* ../src/codebook/lspres_bw1.txt */
+static const float codes1[] = {
+  35,
+  80,
+  140,
+  250
+};
+  /* ../src/codebook/lsp3.txt */
+static const float codes2[] = {
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250
+};
+  /* ../src/codebook/lsp4.txt */
+static const float codes3[] = {
+  700,
+  800,
+  900,
+  1000,
+  1100,
+  1200,
+  1300,
+  1400,
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200
+};
+
+const struct lsp_codebook lsp_cbres[] = {
+  /* ../src/codebook/lspres_centre1.txt */
+  {
+    1,
+    3,
+    8,
+    codes0
+  },
+  /* ../src/codebook/lspres_bw1.txt */
+  {
+    1,
+    2,
+    4,
+    codes1
+  },
+  /* ../src/codebook/lsp3.txt */
+  {
+    1,
+    4,
+    16,
+    codes2
+  },
+  /* ../src/codebook/lsp4.txt */
+  {
+    1,
+    4,
+    16,
+    codes3
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookvq.c b/libs/libcodec2/src/codebookvq.c
new file mode 100644 (file)
index 0000000..bb9f605
--- /dev/null
@@ -0,0 +1,4223 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/lsp1.txt */
+static const float codes0[] = {
+  225,
+  250,
+  275,
+  300,
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600
+};
+  /* codebook/lsp2.txt */
+static const float codes1[] = {
+  325,
+  350,
+  375,
+  400,
+  425,
+  450,
+  475,
+  500,
+  525,
+  550,
+  575,
+  600,
+  625,
+  650,
+  675,
+  700
+};
+  /* codebook/lsp3.txt */
+static const float codes2[] = {
+  500,
+  550,
+  600,
+  650,
+  700,
+  750,
+  800,
+  850,
+  900,
+  950,
+  1000,
+  1050,
+  1100,
+  1150,
+  1200,
+  1250
+};
+  /* codebook/lsp4.txt */
+static const float codes3[] = {
+  700,
+  800,
+  900,
+  1000,
+  1100,
+  1200,
+  1300,
+  1400,
+  1500,
+  1600,
+  1700,
+  1800,
+  1900,
+  2000,
+  2100,
+  2200
+};
+  /* ../unittest/lsp45678910.txt */
+static const float codes4[] = {
+  1.08123,  1.57884,  1.85557,  1.93731,  2.53244,  2.64981,
+  1.0628,  1.45001,  1.83956,  1.9565,  2.48885,  2.65346,
+  1.10159,  1.36102,  1.83358,  1.93241,  2.50518,  2.62981,
+  1.07906,  1.37686,  1.87269,  1.95508,  2.54134,  2.63378,
+  1.09554,  1.63104,  1.86627,  2.06699,  2.50666,  2.57043,
+  1.09306,  1.56136,  1.77247,  2.12386,  2.54748,  2.61826,
+  1.09365,  1.50021,  1.78605,  2.07712,  2.48377,  2.57254,
+  1.03502,  1.48598,  1.67865,  2.07936,  2.40234,  2.51331,
+  1.23172,  1.63057,  1.84991,  2.02345,  2.46721,  2.57161,
+  1.20636,  1.47819,  1.85565,  2.0092,  2.43743,  2.55238,
+  1.20425,  1.49576,  1.8464,  2.03998,  2.50063,  2.59244,
+  1.27202,  1.43835,  1.8545,  2.03871,  2.51872,  2.62009,
+  1.29891,  1.48336,  1.83887,  1.98366,  2.48837,  2.59701,
+  1.38559,  1.50018,  1.81943,  1.9817,  2.50554,  2.61253,
+  1.41367,  1.56655,  1.76718,  1.99449,  2.56961,  2.62524,
+  1.46905,  1.62608,  1.75177,  2.04119,  2.60895,  2.65878,
+  1.48951,  1.61764,  1.68918,  2.05385,  2.66224,  2.70553,
+  1.43112,  1.53558,  1.64732,  1.81092,  2.57577,  2.6922,
+  1.41167,  1.60617,  1.73036,  1.96937,  2.62811,  2.69185,
+  1.34102,  1.63997,  2.19739,  2.28132,  2.44971,  2.626,
+  1.31988,  1.67483,  2.10118,  2.28173,  2.49978,  2.61148,
+  1.27462,  1.61012,  1.90144,  2.23566,  2.51818,  2.62888,
+  1.17221,  1.36564,  1.7847,  1.90445,  2.53808,  2.64619,
+  1.09616,  1.35011,  1.75499,  1.86967,  2.48657,  2.6055,
+  1.03654,  1.3262,  1.72989,  1.86212,  2.46119,  2.57545,
+  1.01653,  1.27725,  1.6888,  1.80838,  2.46298,  2.57624,
+  0.968031,  1.32901,  1.71641,  1.82136,  2.48115,  2.56195,
+  0.940641,  1.28334,  1.76788,  1.86054,  2.50314,  2.5949,
+  0.926995,  1.24333,  1.73891,  1.901,  2.4495,  2.55764,
+  0.839883,  1.23712,  1.70215,  1.81262,  2.42139,  2.49298,
+  0.924474,  1.18807,  1.75752,  1.8249,  2.45594,  2.61106,
+  0.96423,  1.20727,  1.66622,  1.87681,  2.50715,  2.58041,
+  0.989772,  1.18973,  1.69345,  1.80714,  2.44571,  2.56195,
+  0.919183,  1.20312,  1.67383,  1.77261,  2.3858,  2.51167,
+  0.978552,  1.17542,  1.61386,  1.72687,  2.32896,  2.5167,
+  1.01454,  1.25425,  1.58728,  1.75663,  2.40306,  2.51083,
+  1.09672,  1.23117,  1.5574,  1.84394,  2.46358,  2.55546,
+  1.16877,  1.35118,  1.61393,  1.83103,  2.47627,  2.58122,
+  1.17651,  1.26415,  1.56492,  1.76049,  2.48352,  2.58104,
+  1.01797,  1.24983,  1.42449,  1.59354,  2.45834,  2.52503,
+  1.05399,  1.21603,  1.51742,  1.85194,  2.34275,  2.50233,
+  0.908986,  1.2508,  1.59392,  1.8871,  2.37309,  2.53013,
+  0.993871,  1.16402,  1.61662,  1.77573,  2.56946,  2.65857,
+  1.10248,  1.38615,  1.57368,  1.78564,  2.31793,  2.50856,
+  1.20724,  1.39083,  1.55105,  1.85061,  2.33598,  2.49433,
+  0.905032,  1.41648,  1.58005,  1.84183,  2.50381,  2.6016,
+  0.79589,  1.10793,  1.59771,  2.0155,  2.40215,  2.53461,
+  0.732401,  1.15861,  1.55747,  1.938,  2.62642,  2.70543,
+  0.85967,  1.12906,  1.67186,  1.95399,  2.51479,  2.61587,
+  0.921647,  1.24536,  1.68375,  1.89446,  2.59964,  2.71656,
+  0.845409,  1.19476,  1.76731,  1.84451,  2.58977,  2.71694,
+  0.977678,  1.1414,  1.66711,  1.92383,  2.63201,  2.68907,
+  0.951137,  1.12255,  1.71418,  1.8859,  2.53576,  2.67211,
+  1.02995,  1.15955,  1.73944,  1.92833,  2.48818,  2.62352,
+  0.925634,  1.22593,  1.7518,  1.97075,  2.5329,  2.62107,
+  1.0123,  1.21143,  1.79395,  1.88586,  2.46727,  2.57249,
+  0.993978,  1.13747,  1.74347,  1.84089,  2.39008,  2.56639,
+  0.989822,  1.17307,  1.68756,  1.94893,  2.32553,  2.47342,
+  0.955854,  1.23723,  1.80741,  2.11677,  2.39103,  2.50278,
+  1.10336,  1.35799,  1.85224,  2.09709,  2.39275,  2.55324,
+  1.12887,  1.4409,  1.92791,  2.1767,  2.40798,  2.54428,
+  1.31613,  1.57544,  1.96457,  2.15894,  2.48584,  2.57613,
+  1.4696,  1.7721,  1.95484,  2.16407,  2.39962,  2.48192,
+  1.50652,  1.75488,  2.01841,  2.24949,  2.48627,  2.60761,
+  1.52419,  1.77645,  2.05458,  2.27569,  2.58498,  2.66908,
+  1.518,  1.85028,  2.02643,  2.30188,  2.57753,  2.66918,
+  1.42205,  1.78898,  1.96748,  2.18477,  2.59685,  2.69968,
+  1.20841,  1.4347,  1.92362,  2.00377,  2.60293,  2.68501,
+  1.22117,  1.43657,  1.87997,  2.0334,  2.49815,  2.69542,
+  1.21771,  1.37598,  1.90861,  1.97303,  2.48056,  2.6454,
+  1.20035,  1.41224,  1.86328,  2.05454,  2.40923,  2.64633,
+  1.43945,  1.67593,  2.06471,  2.27323,  2.60645,  2.69621,
+  1.54757,  1.95602,  2.08379,  2.38708,  2.63432,  2.71122,
+  1.74537,  1.99526,  2.17627,  2.40949,  2.63225,  2.70742,
+  1.81929,  1.98216,  2.21017,  2.45219,  2.60377,  2.66452,
+  1.66955,  1.94018,  2.10087,  2.38694,  2.53082,  2.63087,
+  1.59768,  1.94591,  2.07284,  2.33889,  2.54425,  2.60825,
+  1.65615,  1.88869,  1.98455,  2.30113,  2.51078,  2.58636,
+  1.6188,  1.89886,  2.02474,  2.29131,  2.44053,  2.56029,
+  1.48128,  1.82621,  1.97192,  2.19291,  2.41702,  2.53029,
+  1.31873,  1.58154,  1.84545,  2.164,  2.38923,  2.50542,
+  1.34133,  1.56585,  1.80288,  2.21848,  2.43077,  2.54583,
+  1.31851,  1.41266,  1.67762,  2.18235,  2.37275,  2.47653,
+  1.24372,  1.45667,  1.66571,  2.12671,  2.33287,  2.43845,
+  1.1525,  1.45886,  1.58294,  2.03752,  2.3421,  2.4283,
+  1.02538,  1.4076,  1.55153,  1.84679,  2.28286,  2.38544,
+  0.87656,  1.38433,  1.5829,  1.74194,  2.23992,  2.33845,
+  0.953781,  1.44188,  1.5924,  1.76417,  2.29409,  2.4742,
+  0.899968,  1.45403,  1.63436,  1.72431,  2.3534,  2.5975,
+  0.784159,  1.42393,  1.73726,  1.85596,  2.39003,  2.61454,
+  0.802442,  1.39707,  1.65855,  1.81679,  2.42939,  2.5001,
+  0.863071,  1.31849,  1.64602,  1.81297,  2.3981,  2.50385,
+  0.89687,  1.30624,  1.67159,  1.90217,  2.46653,  2.60152,
+  0.999503,  1.30429,  1.70842,  1.89904,  2.51234,  2.65519,
+  1.04528,  1.2663,  1.66963,  1.84632,  2.51707,  2.63748,
+  1.03846,  1.15853,  1.64378,  1.86528,  2.5832,  2.65894,
+  1.02632,  1.21931,  1.76835,  1.84092,  2.53817,  2.67333,
+  1.08097,  1.21543,  1.73019,  1.83693,  2.23686,  2.60887,
+  1.1018,  1.43151,  1.75208,  1.91896,  2.09124,  2.53896,
+  1.17873,  1.29731,  1.7241,  1.85075,  2.31029,  2.62153,
+  1.15118,  1.23968,  1.75479,  1.85052,  2.5391,  2.70599,
+  1.2027,  1.3006,  1.76334,  1.86743,  2.47072,  2.66465,
+  1.26112,  1.36868,  1.75328,  1.84665,  2.46151,  2.6526,
+  1.26307,  1.36429,  1.79767,  1.87694,  2.54373,  2.66022,
+  1.32015,  1.41593,  1.80983,  1.90322,  2.51555,  2.64824,
+  1.33987,  1.45935,  1.80668,  1.92458,  2.49148,  2.58705,
+  1.35517,  1.45177,  1.7634,  1.94416,  2.47263,  2.56117,
+  1.32792,  1.42891,  1.70445,  1.91482,  2.39737,  2.50347,
+  1.3076,  1.41535,  1.61629,  1.84079,  2.32217,  2.47099,
+  1.24825,  1.34921,  1.61761,  1.77273,  2.25068,  2.48653,
+  1.09657,  1.35568,  1.62611,  1.94199,  2.31385,  2.49821,
+  1.01253,  1.34284,  1.64785,  1.90716,  2.43593,  2.53319,
+  0.944393,  1.39928,  1.643,  1.93199,  2.33198,  2.48991,
+  0.883306,  1.40234,  1.70636,  2.02537,  2.37371,  2.54371,
+  0.829559,  1.23577,  1.71275,  2.18485,  2.38674,  2.54418,
+  0.923799,  1.51311,  1.70309,  2.10529,  2.47648,  2.55516,
+  0.772688,  1.4433,  1.65612,  2.05301,  2.45044,  2.53252,
+  0.776285,  1.4032,  1.73402,  1.93526,  2.46409,  2.5668,
+  0.782396,  1.41881,  1.75888,  1.97322,  2.54833,  2.6103,
+  0.789572,  1.41108,  1.77153,  2.06041,  2.54026,  2.63125,
+  0.774326,  1.28802,  1.83727,  1.96095,  2.51242,  2.58163,
+  0.811751,  1.27403,  1.81001,  1.88574,  2.56546,  2.63922,
+  0.844982,  1.32083,  1.87391,  1.9446,  2.56105,  2.66172,
+  0.881256,  1.69536,  1.90698,  2.07889,  2.61855,  2.67865,
+  1.09989,  1.72782,  1.97132,  2.15314,  2.50969,  2.60295,
+  1.17385,  1.68544,  1.91746,  2.14743,  2.38305,  2.56703,
+  1.10155,  1.54322,  1.82061,  2.05532,  2.33872,  2.58503,
+  0.975012,  1.37972,  1.77663,  2.03329,  2.19415,  2.51822,
+  0.967054,  1.08246,  1.61897,  2.07793,  2.20684,  2.37089,
+  1.00961,  1.12061,  1.53418,  2.08853,  2.28294,  2.42058,
+  0.899159,  1.20852,  1.42369,  1.97032,  2.28727,  2.4989,
+  0.879682,  1.31448,  1.47949,  1.68936,  2.20974,  2.28576,
+  1.03347,  1.24384,  1.47314,  1.66799,  2.15942,  2.25504,
+  1.04841,  1.25589,  1.537,  1.82005,  2.14225,  2.31375,
+  1.04825,  1.18926,  1.70511,  1.83599,  2.10545,  2.37206,
+  1.03432,  1.13888,  1.51462,  1.82966,  2.17045,  2.42561,
+  1.10388,  1.21765,  1.62215,  1.80585,  2.02753,  2.37681,
+  1.08723,  1.19501,  1.55902,  1.89504,  2.25012,  2.3792,
+  1.13001,  1.29387,  1.6924,  1.85888,  2.1972,  2.34906,
+  1.16289,  1.3046,  1.69102,  1.96932,  2.26861,  2.43029,
+  1.15181,  1.25793,  1.67383,  1.90202,  2.18916,  2.45871,
+  1.16844,  1.27183,  1.55733,  2.08415,  2.30803,  2.42037,
+  1.2351,  1.34019,  1.65679,  2.09516,  2.28319,  2.40964,
+  1.25239,  1.35536,  1.60985,  2.08519,  2.33271,  2.48887,
+  1.22631,  1.34399,  1.67305,  2.21553,  2.46,  2.54692,
+  1.40818,  1.56645,  1.70193,  2.1551,  2.54024,  2.58859,
+  1.304,  1.549,  1.65358,  2.12874,  2.58947,  2.63332,
+  1.31253,  1.48894,  1.69055,  1.98288,  2.55839,  2.62252,
+  1.30359,  1.48566,  1.773,  1.99142,  2.55563,  2.65006,
+  1.2572,  1.52892,  1.88049,  2.04567,  2.40009,  2.56749,
+  1.29472,  1.63432,  1.91154,  2.04666,  2.43808,  2.61113,
+  1.32844,  1.71607,  1.8503,  2.02126,  2.50705,  2.61286,
+  1.13808,  1.26904,  1.79259,  1.89815,  2.53041,  2.65356,
+  1.02479,  1.14554,  1.68822,  1.81293,  2.42504,  2.65093,
+  1.05666,  1.17804,  1.59034,  1.74735,  2.36845,  2.61871,
+  0.994299,  1.11084,  1.63265,  1.73054,  2.33769,  2.5503,
+  0.96003,  1.10348,  1.6328,  1.74508,  2.19725,  2.53053,
+  0.952099,  1.07891,  1.70416,  1.83731,  2.31907,  2.54431,
+  0.901034,  1.0748,  1.65366,  1.78859,  2.39383,  2.53312,
+  0.970595,  1.13005,  1.56835,  1.82097,  2.44511,  2.56337,
+  0.8832,  1.02914,  1.48058,  1.88436,  2.32162,  2.47072,
+  0.817959,  0.941844,  1.41014,  1.54071,  2.17404,  2.48277,
+  0.772028,  0.888033,  1.49012,  1.71709,  2.32435,  2.56046,
+  0.8742,  1.0201,  1.57148,  1.74681,  2.43739,  2.56133,
+  0.827282,  1.01003,  1.60538,  1.75068,  2.26185,  2.4816,
+  0.790605,  1.149,  1.65382,  1.78105,  2.35864,  2.49161,
+  0.746581,  0.96108,  1.60491,  1.879,  2.31927,  2.55158,
+  0.845418,  0.96953,  1.69617,  1.89093,  2.30188,  2.62149,
+  0.826083,  1.01605,  1.6586,  1.85255,  2.43588,  2.57274,
+  0.80426,  0.948999,  1.68449,  2.10334,  2.47505,  2.57585,
+  0.837016,  1.03,  1.67699,  1.79665,  2.49802,  2.63103,
+  0.779629,  0.917041,  1.60707,  1.8689,  2.45957,  2.6289,
+  0.802981,  0.922379,  1.55614,  1.96784,  2.59545,  2.69251,
+  0.821239,  0.952349,  1.58525,  2.0958,  2.59371,  2.65593,
+  0.819528,  1.10955,  1.52684,  1.76751,  2.6378,  2.71051,
+  0.846222,  1.05572,  1.70728,  1.83863,  2.114,  2.5014,
+  0.956553,  1.43985,  1.7249,  1.93982,  2.14519,  2.43191,
+  1.33429,  1.55159,  1.7214,  2.01917,  2.178,  2.32944,
+  1.24736,  1.57146,  1.83452,  2.11416,  2.26821,  2.48981,
+  1.22315,  1.57342,  1.84625,  2.01609,  2.21928,  2.45785,
+  1.23993,  1.53779,  1.8228,  2.04648,  2.44445,  2.57805,
+  1.29968,  1.55774,  1.7983,  2.08069,  2.39337,  2.5752,
+  1.27312,  1.47413,  1.81487,  2.01491,  2.40501,  2.60292,
+  1.22903,  1.4485,  1.75715,  2.05057,  2.41716,  2.59461,
+  1.2063,  1.5151,  1.78896,  2.04215,  2.36856,  2.5858,
+  1.1589,  1.5448,  1.86145,  2.06665,  2.40525,  2.59099,
+  1.20326,  1.47986,  1.83352,  2.07062,  2.4318,  2.5857,
+  1.17077,  1.55578,  1.82667,  2.07708,  2.46748,  2.61941,
+  1.11628,  1.59353,  1.82425,  2.16082,  2.42781,  2.60049,
+  1.25031,  1.6173,  1.96265,  2.15224,  2.53124,  2.63143,
+  1.353,  1.64524,  2.07019,  2.18038,  2.61203,  2.68877,
+  1.46033,  1.91719,  2.08682,  2.31459,  2.64118,  2.72306,
+  1.5571,  1.91661,  2.0569,  2.2632,  2.64033,  2.7028,
+  1.41067,  1.90339,  2.07783,  2.22294,  2.6154,  2.69412,
+  1.34049,  1.80404,  2.04002,  2.14956,  2.60771,  2.67815,
+  1.09068,  1.32106,  1.86274,  1.98378,  2.47586,  2.59244,
+  1.00246,  1.26551,  1.81302,  1.90434,  2.49926,  2.62654,
+  1.05139,  1.16129,  1.83253,  1.95508,  2.50234,  2.62475,
+  0.942516,  1.06424,  1.66956,  1.97725,  2.46418,  2.59833,
+  0.869608,  0.984141,  1.45461,  1.95618,  2.50789,  2.61787,
+  0.972489,  1.13547,  1.52915,  1.72998,  2.41157,  2.57108,
+  1.05128,  1.14941,  1.54752,  1.82715,  2.51133,  2.61762,
+  1.07974,  1.19121,  1.53936,  1.94473,  2.54524,  2.63216,
+  1.18206,  1.26003,  1.5961,  2.08466,  2.51186,  2.57941,
+  1.172,  1.35276,  1.46275,  2.01506,  2.62536,  2.67937,
+  1.20054,  1.32298,  1.5156,  1.7692,  2.52314,  2.66683,
+  1.22809,  1.30713,  1.73403,  1.91475,  2.24482,  2.56203,
+  1.17619,  1.32166,  1.78231,  1.88258,  2.27136,  2.52145,
+  1.15003,  1.48622,  1.77415,  1.97093,  2.38508,  2.61264,
+  1.10316,  1.455,  1.72062,  1.89959,  2.35671,  2.59138,
+  1.07047,  1.38631,  1.74693,  1.89198,  2.36751,  2.54357,
+  0.95361,  1.17616,  1.64355,  1.91998,  2.37206,  2.57246,
+  1.05232,  1.40517,  1.68895,  1.83167,  2.54288,  2.63248,
+  0.996802,  1.44143,  1.68446,  1.82195,  2.59599,  2.65884,
+  1.02655,  1.33494,  1.74094,  1.84038,  2.57165,  2.67897,
+  1.10832,  1.20084,  1.70613,  1.99908,  2.51466,  2.64821,
+  1.13332,  1.21947,  1.74777,  2.01308,  2.40664,  2.64036,
+  1.14214,  1.21872,  1.81464,  1.95106,  2.43007,  2.66618,
+  1.08156,  1.20709,  1.84645,  1.94628,  2.33914,  2.61266,
+  1.14637,  1.23863,  1.87425,  1.9681,  2.42738,  2.59563,
+  1.06941,  1.39313,  1.85976,  1.94182,  2.37447,  2.53818,
+  1.06022,  1.40293,  1.78464,  1.90995,  2.08085,  2.37542,
+  0.893759,  1.22533,  1.74143,  1.89549,  2.06221,  2.44178,
+  0.911307,  1.30139,  1.65149,  1.79817,  1.99688,  2.20866,
+  1.10291,  1.50331,  1.70777,  1.80853,  1.95863,  2.31168,
+  1.14945,  1.32806,  1.73828,  1.90461,  2.06187,  2.25797,
+  1.12135,  1.23056,  1.74878,  1.95066,  2.08647,  2.38929,
+  0.94897,  1.10189,  1.67664,  1.87539,  2.01682,  2.29668,
+  1.03508,  1.16223,  1.64138,  1.95271,  2.10095,  2.35872,
+  0.994183,  1.11431,  1.5476,  1.77373,  1.96608,  2.3363,
+  1.02511,  1.1397,  1.58524,  1.91237,  2.10246,  2.48243,
+  0.955352,  1.06222,  1.65906,  1.84841,  2.04328,  2.48743,
+  1.0491,  1.12055,  1.44698,  1.94902,  2.0269,  2.56059,
+  1.01243,  1.13828,  1.36794,  2.00847,  2.18944,  2.42242,
+  1.08203,  1.23491,  1.35176,  1.82717,  2.17316,  2.30024,
+  1.09436,  1.23514,  1.41642,  1.92259,  2.12823,  2.41941,
+  1.03451,  1.15131,  1.49236,  1.98085,  2.14904,  2.36531,
+  1.01309,  1.15454,  1.45996,  1.94304,  2.28176,  2.39727,
+  0.987103,  1.27435,  1.56187,  1.91746,  2.33429,  2.49565,
+  0.989791,  1.28917,  1.62314,  1.98233,  2.34503,  2.54805,
+  1.04201,  1.22597,  1.61002,  1.9748,  2.40631,  2.53704,
+  1.01969,  1.32372,  1.67908,  1.98369,  2.44302,  2.56193,
+  1.03098,  1.24991,  1.75329,  1.9703,  2.44275,  2.5771,
+  1.07865,  1.28137,  1.82168,  2.04699,  2.51249,  2.6143,
+  1.0425,  1.31828,  1.81754,  1.97774,  2.53877,  2.64347,
+  1.03375,  1.32343,  1.88596,  1.99364,  2.58713,  2.64829,
+  1.08416,  1.43412,  1.89966,  1.97448,  2.66167,  2.7171,
+  1.09579,  1.4813,  1.91655,  1.97041,  2.67123,  2.73097,
+  1.14796,  1.55307,  1.88454,  1.96066,  2.50184,  2.66788,
+  1.13778,  1.49891,  1.96262,  2.04724,  2.53731,  2.64235,
+  1.10886,  1.43549,  1.95549,  2.19587,  2.51428,  2.60153,
+  1.19107,  1.55785,  1.98454,  2.27079,  2.54188,  2.64206,
+  1.11074,  1.55308,  1.97813,  2.21105,  2.61337,  2.70664,
+  1.11409,  1.72802,  1.97504,  2.12448,  2.60293,  2.68194,
+  1.14848,  1.62709,  1.96813,  2.0739,  2.60736,  2.68667,
+  1.109,  1.45065,  1.9611,  2.05861,  2.61165,  2.69461,
+  1.0959,  1.31876,  1.86664,  2.09629,  2.57468,  2.65884,
+  1.11656,  1.36797,  1.92253,  2.01651,  2.54944,  2.64623,
+  1.12947,  1.52911,  1.9422,  2.00334,  2.52787,  2.69992,
+  1.13905,  1.67954,  1.94587,  2.03292,  2.53743,  2.64217,
+  1.21921,  1.59942,  1.9296,  2.01109,  2.5391,  2.70528,
+  1.23397,  1.5562,  1.931,  2.08479,  2.57858,  2.67583,
+  1.23443,  1.65374,  2.03321,  2.25676,  2.63755,  2.69966,
+  1.25529,  1.47504,  2.02254,  2.28923,  2.58769,  2.70395,
+  1.25339,  1.4722,  1.9564,  2.21119,  2.57424,  2.6761,
+  1.12685,  1.58721,  1.95082,  2.03149,  2.41685,  2.61446,
+  1.00706,  1.6083,  1.89623,  1.98634,  2.22302,  2.52403,
+  1.06728,  1.72945,  1.93189,  2.04533,  2.16485,  2.40091,
+  0.94666,  1.69978,  1.87062,  1.98183,  2.13567,  2.44769,
+  1.00269,  1.72856,  1.93991,  2.07252,  2.27479,  2.46748,
+  1.14879,  1.60055,  2.00306,  2.12803,  2.40911,  2.50653,
+  1.19137,  1.35951,  1.90844,  2.11699,  2.36908,  2.52939,
+  1.22974,  1.31636,  1.90147,  2.00117,  2.36835,  2.5757,
+  1.16745,  1.28408,  1.85155,  2.05628,  2.44629,  2.57376,
+  1.17705,  1.28298,  1.79608,  2.01457,  2.4099,  2.52443,
+  1.16655,  1.28173,  1.80413,  1.93859,  2.38305,  2.5438,
+  1.14471,  1.2662,  1.75578,  1.86551,  2.35412,  2.57514,
+  1.16847,  1.28356,  1.69505,  1.81754,  2.30279,  2.52956,
+  1.09347,  1.31611,  1.62583,  1.79105,  2.30331,  2.40856,
+  1.07299,  1.21888,  1.58691,  1.72531,  2.2192,  2.34352,
+  0.946241,  1.17284,  1.42629,  1.55168,  2.19257,  2.32173,
+  1.0018,  1.17498,  1.50744,  1.69786,  2.2408,  2.47824,
+  0.992564,  1.25778,  1.42909,  1.81983,  2.23415,  2.43492,
+  0.933586,  1.25556,  1.37246,  1.68627,  2.26598,  2.34947,
+  0.987914,  1.16288,  1.40442,  1.56348,  2.22767,  2.48537,
+  1.05858,  1.18583,  1.32538,  1.44559,  2.16451,  2.45514,
+  1.04227,  1.14961,  1.38904,  1.47383,  1.90667,  2.39013,
+  0.966952,  1.07554,  1.28815,  1.4051,  2.06186,  2.45199,
+  0.90153,  1.19448,  1.35473,  1.70575,  2.32503,  2.43481,
+  1.03842,  1.29243,  1.52731,  1.90984,  2.23033,  2.46514,
+  1.33601,  1.44169,  1.84913,  2.20803,  2.4144,  2.53251,
+  1.43622,  1.64565,  2.00864,  2.19816,  2.50228,  2.60141,
+  1.42434,  1.68443,  1.92981,  2.1225,  2.51228,  2.60486,
+  1.4522,  1.72299,  1.96221,  2.15666,  2.4841,  2.58459,
+  1.482,  1.73524,  1.97119,  2.2228,  2.51231,  2.62362,
+  1.39256,  1.72127,  1.9403,  2.17497,  2.48894,  2.60185,
+  1.24335,  1.55846,  1.80982,  1.99089,  2.38197,  2.53748,
+  1.19929,  1.4215,  1.76311,  1.99088,  2.35892,  2.48956,
+  1.21777,  1.34878,  1.71467,  1.91684,  2.37973,  2.45696,
+  1.21952,  1.32685,  1.71966,  1.83808,  2.29933,  2.43541,
+  1.26307,  1.35366,  1.78723,  1.91897,  2.32039,  2.44825,
+  1.27096,  1.3738,  1.71818,  1.85793,  2.36692,  2.48175,
+  1.28435,  1.36807,  1.79391,  1.89508,  2.35679,  2.5246,
+  1.24479,  1.35366,  1.78295,  1.92869,  2.22572,  2.37995,
+  1.26928,  1.36873,  1.71918,  1.90968,  2.26716,  2.49154,
+  1.24931,  1.33819,  1.79992,  1.9171,  2.27469,  2.53322,
+  1.1795,  1.25905,  1.80297,  1.92733,  2.22893,  2.50364,
+  1.14096,  1.2459,  1.70866,  1.92379,  2.24346,  2.55734,
+  1.06395,  1.20903,  1.73729,  1.94535,  2.3387,  2.57309,
+  1.00347,  1.10916,  1.74513,  1.90219,  2.30844,  2.60161,
+  0.937618,  1.07754,  1.7478,  1.86965,  2.20505,  2.57045,
+  0.885099,  1.19245,  1.79054,  1.87616,  2.36031,  2.59811,
+  0.803485,  0.966415,  1.76846,  1.92874,  2.19672,  2.53046,
+  0.797205,  1.12072,  1.77658,  1.87857,  2.37036,  2.61434,
+  0.831514,  1.05908,  1.8088,  1.90548,  2.44821,  2.57305,
+  0.806597,  0.967446,  1.82939,  1.96368,  2.35863,  2.65324,
+  0.699378,  0.851831,  1.73945,  1.93394,  2.51638,  2.65525,
+  0.739203,  1.03399,  1.90211,  2.01033,  2.49415,  2.62982,
+  0.945605,  1.07971,  1.79635,  2.03954,  2.58186,  2.69978,
+  0.843512,  1.30486,  1.83545,  2.03683,  2.60022,  2.67783,
+  0.970152,  1.41437,  1.85405,  1.95779,  2.59605,  2.66543,
+  1.06728,  1.43854,  1.88843,  2.06709,  2.53102,  2.64318,
+  1.11762,  1.56311,  1.88632,  2.21887,  2.53022,  2.62408,
+  1.20966,  1.62691,  1.9437,  2.18743,  2.55509,  2.65867,
+  1.33889,  1.81288,  2.03089,  2.3052,  2.56927,  2.66116,
+  1.30337,  1.8401,  2.03598,  2.28675,  2.61423,  2.71336,
+  1.19343,  1.72735,  1.9262,  2.1844,  2.57478,  2.63181,
+  1.06351,  1.71719,  1.90366,  2.11905,  2.44481,  2.49767,
+  1.06218,  1.18895,  1.81048,  2.04498,  2.32238,  2.57878,
+  1.0732,  1.17756,  1.65473,  2.02326,  2.20037,  2.44287,
+  1.02781,  1.16542,  1.66947,  1.85961,  2.20214,  2.46247,
+  1.03558,  1.14824,  1.6049,  1.87255,  2.25785,  2.55168,
+  1.00721,  1.13109,  1.57915,  1.96979,  2.33164,  2.50791,
+  0.908594,  1.0056,  1.46327,  2.07237,  2.30436,  2.40736,
+  0.981614,  1.12643,  1.28057,  1.88685,  2.10192,  2.48784,
+  1.00676,  1.13256,  1.25309,  1.71832,  2.18925,  2.4366,
+  0.89983,  1.15654,  1.26075,  1.69671,  2.11666,  2.2283,
+  0.896996,  1.24655,  1.43687,  1.64519,  2.07364,  2.14913,
+  0.965481,  1.06967,  1.44649,  1.94949,  2.09158,  2.29833,
+  0.898113,  1.05877,  1.61756,  1.94155,  2.11357,  2.37474,
+  0.769481,  1.15938,  1.59741,  1.95985,  2.28384,  2.4182,
+  0.908091,  1.30534,  1.47357,  1.86255,  2.16415,  2.33109,
+  0.924282,  1.33469,  1.5632,  2.04354,  2.40601,  2.51576,
+  0.972939,  1.38197,  1.54999,  2.02124,  2.26849,  2.41933,
+  1.03223,  1.48403,  1.62003,  1.95223,  2.26732,  2.48644,
+  1.00523,  1.35469,  1.6202,  1.77792,  2.22307,  2.49757,
+  1.07274,  1.24504,  1.66167,  1.81939,  2.2605,  2.4687,
+  1.13447,  1.25048,  1.73703,  1.86897,  2.3032,  2.46643,
+  1.14594,  1.29326,  1.72851,  1.95098,  2.35098,  2.50402,
+  1.22636,  1.3298,  1.75078,  1.98214,  2.34784,  2.55303,
+  1.2348,  1.32811,  1.69673,  2.06056,  2.43731,  2.5356,
+  1.24713,  1.3605,  1.74295,  1.96135,  2.47408,  2.66845,
+  1.23474,  1.32984,  1.68863,  1.91333,  2.44294,  2.6277,
+  1.23043,  1.32664,  1.69759,  1.80604,  2.38147,  2.61854,
+  1.18857,  1.27308,  1.70898,  1.969,  2.34068,  2.58896,
+  1.20428,  1.33122,  1.83552,  2.14126,  2.46323,  2.58349,
+  1.20237,  1.39722,  1.86375,  2.15516,  2.59973,  2.68119,
+  1.21758,  1.3333,  1.7639,  1.99498,  2.60184,  2.68482,
+  1.27237,  1.36445,  1.77635,  1.9521,  2.56342,  2.67617,
+  1.33017,  1.43465,  1.82509,  1.93803,  2.57941,  2.6661,
+  1.38355,  1.51477,  1.77471,  2.135,  2.52858,  2.61471,
+  1.48823,  1.63125,  1.79594,  2.18059,  2.49779,  2.58593,
+  1.49785,  1.59843,  1.7604,  1.98572,  2.53807,  2.62222,
+  1.44651,  1.55569,  1.67548,  1.89962,  2.54707,  2.63713,
+  1.42019,  1.65176,  1.88812,  2.20156,  2.49872,  2.62437,
+  1.52485,  1.74892,  1.93948,  2.13259,  2.42662,  2.6043,
+  1.58821,  1.78697,  1.96571,  2.12325,  2.41743,  2.57989,
+  1.60305,  1.80525,  1.93272,  2.08806,  2.49088,  2.62847,
+  1.52171,  1.85304,  1.96816,  2.19842,  2.53092,  2.59723,
+  1.49631,  1.78581,  2.00198,  2.20617,  2.57416,  2.64528,
+  1.4052,  1.50056,  1.90867,  2.17922,  2.54373,  2.64577,
+  1.36955,  1.50131,  1.8488,  2.08986,  2.55112,  2.64362,
+  1.39538,  1.48864,  1.8724,  2.02812,  2.53026,  2.59919,
+  1.35458,  1.50897,  1.84888,  1.97668,  2.50493,  2.57936,
+  1.32575,  1.41133,  1.83713,  1.97079,  2.50272,  2.58483,
+  1.2645,  1.39044,  1.76476,  2.08734,  2.51928,  2.62504,
+  1.2809,  1.35565,  1.79029,  1.99571,  2.50257,  2.58736,
+  1.26744,  1.36084,  1.85803,  2.03563,  2.50938,  2.58487,
+  1.2389,  1.48754,  1.78666,  2.08035,  2.48091,  2.58214,
+  1.22871,  1.44114,  1.71596,  1.89333,  2.50707,  2.56513,
+  1.16735,  1.39731,  1.67205,  1.92353,  2.43839,  2.52352,
+  1.16923,  1.35681,  1.56743,  1.95038,  2.37895,  2.46801,
+  1.24024,  1.4709,  1.62973,  2.02468,  2.37672,  2.45487,
+  1.37086,  1.66529,  1.8315,  2.17643,  2.4864,  2.58657,
+  1.51337,  1.65704,  1.96501,  2.29801,  2.53215,  2.62301,
+  1.44694,  1.61268,  1.92909,  2.2323,  2.46621,  2.56515,
+  1.43066,  1.66453,  1.88216,  2.23458,  2.42166,  2.52729,
+  1.51155,  1.65893,  1.94404,  2.1985,  2.45195,  2.58835,
+  1.53944,  1.74136,  2.11106,  2.22992,  2.43894,  2.61506,
+  1.51095,  1.84689,  2.06179,  2.20245,  2.48411,  2.57263,
+  1.36639,  1.61165,  2.07937,  2.26007,  2.46706,  2.58803,
+  1.38358,  1.64134,  1.99735,  2.22615,  2.49144,  2.61163,
+  1.38146,  1.7069,  1.96306,  2.12555,  2.5968,  2.68111,
+  1.36003,  1.55825,  1.94966,  2.05483,  2.59957,  2.71455,
+  1.37934,  1.49178,  1.9259,  2.04634,  2.53937,  2.69605,
+  1.31327,  1.4694,  1.86311,  2.14175,  2.55396,  2.6681,
+  1.20152,  1.563,  1.92503,  2.09301,  2.47661,  2.61441,
+  0.965563,  1.66213,  1.8361,  2.07187,  2.53005,  2.57845,
+  0.976435,  1.63512,  1.84473,  2.00512,  2.55308,  2.61415,
+  1.09816,  1.54948,  1.82643,  1.90791,  2.49067,  2.62563,
+  0.971599,  1.43193,  1.81819,  1.92319,  2.49384,  2.56812,
+  0.881008,  1.27287,  1.90143,  1.95922,  2.51367,  2.59602,
+  0.915929,  1.47877,  1.9557,  2.08255,  2.49435,  2.58578,
+  1.00818,  1.57939,  1.8982,  2.13917,  2.47763,  2.55121,
+  0.937399,  1.50757,  1.80391,  1.92259,  2.54605,  2.6373,
+  0.848413,  1.35823,  1.78393,  1.90623,  2.47701,  2.58853,
+  0.863404,  1.48863,  1.8355,  1.93003,  2.4655,  2.54532,
+  0.844376,  1.62228,  1.8268,  2.04836,  2.49055,  2.54581,
+  0.869731,  1.70503,  1.8547,  2.1116,  2.51701,  2.59345,
+  0.862235,  1.62302,  1.89937,  2.02871,  2.52784,  2.5748,
+  0.931658,  1.57634,  1.85361,  1.97512,  2.54224,  2.61479,
+  0.848799,  1.58841,  1.8471,  1.9559,  2.53407,  2.58456,
+  0.737814,  1.45722,  1.82999,  1.9662,  2.50127,  2.57945,
+  0.786199,  1.10008,  1.86037,  1.96428,  2.41936,  2.56613,
+  0.728962,  1.04084,  1.77382,  1.96373,  2.35695,  2.57887,
+  0.733093,  1.14778,  1.78977,  1.90929,  2.34982,  2.4811,
+  0.785959,  1.28024,  1.73049,  1.9267,  2.34691,  2.42248,
+  0.784924,  1.44682,  1.66969,  1.93537,  2.36832,  2.4596,
+  0.758523,  1.46692,  1.8059,  1.94659,  2.35221,  2.42634,
+  0.767907,  1.54429,  1.76817,  2.00394,  2.23904,  2.38619,
+  0.896374,  1.56207,  1.71693,  1.9033,  2.30824,  2.43058,
+  0.83453,  1.50481,  1.73742,  1.91773,  2.40928,  2.49329,
+  0.896027,  1.40695,  1.73003,  1.90333,  2.43125,  2.53972,
+  1.03967,  1.36412,  1.80628,  1.94817,  2.44069,  2.55797,
+  1.09345,  1.41236,  1.83372,  1.9401,  2.48965,  2.56445,
+  1.19018,  1.38617,  1.8487,  1.9562,  2.48155,  2.58088,
+  1.24316,  1.35042,  1.8118,  1.89359,  2.46758,  2.61352,
+  1.22199,  1.30871,  1.81591,  1.91199,  2.41753,  2.601,
+  1.22837,  1.34362,  1.76316,  1.8726,  2.39489,  2.58272,
+  1.27839,  1.38971,  1.7385,  1.87027,  2.42085,  2.53285,
+  1.21164,  1.40179,  1.71015,  1.81102,  2.36383,  2.48224,
+  1.1615,  1.40068,  1.76667,  1.89174,  2.39261,  2.49592,
+  1.11494,  1.40549,  1.71834,  1.92742,  2.35682,  2.46833,
+  1.07468,  1.45296,  1.66872,  1.89809,  2.33653,  2.44346,
+  1.00671,  1.35625,  1.62948,  1.84847,  2.31389,  2.42632,
+  0.966452,  1.45792,  1.65469,  1.90639,  2.32006,  2.41834,
+  0.939007,  1.51999,  1.66701,  1.98942,  2.39067,  2.48895,
+  0.94684,  1.48398,  1.70109,  2.10557,  2.39144,  2.49007,
+  0.909129,  1.50106,  1.66537,  2.00494,  2.2567,  2.38984,
+  0.958919,  1.39061,  1.68008,  2.10716,  2.29725,  2.44084,
+  1.46216,  1.58856,  1.80854,  2.10989,  2.26483,  2.41747,
+  1.30164,  1.67381,  1.89252,  2.16811,  2.47756,  2.56162,
+  1.15277,  1.52933,  1.78378,  2.01435,  2.44661,  2.56093,
+  1.1287,  1.49302,  1.74816,  1.93027,  2.53067,  2.62159,
+  1.16436,  1.49686,  1.76766,  1.87114,  2.60725,  2.68479,
+  1.12271,  1.38051,  1.76224,  1.8756,  2.44152,  2.73281,
+  1.17391,  1.54593,  1.8438,  1.93379,  2.12345,  2.62901,
+  1.15544,  1.46581,  1.79388,  1.92855,  2.16855,  2.60961,
+  1.14781,  1.48454,  1.81642,  1.90876,  2.26262,  2.70408,
+  1.18587,  1.39352,  1.81185,  1.88111,  2.54429,  2.7359,
+  1.1533,  1.45114,  1.8554,  1.88862,  2.60331,  2.73808,
+  1.20885,  1.58236,  1.78486,  1.88009,  2.59648,  2.72788,
+  1.19484,  1.5429,  1.91906,  2.02314,  2.55189,  2.63419,
+  1.23033,  1.49206,  1.93722,  2.13361,  2.61573,  2.69023,
+  1.25876,  1.58131,  1.98007,  2.13876,  2.59904,  2.69103,
+  1.22069,  1.57296,  1.91721,  2.17754,  2.59959,  2.70201,
+  1.25814,  1.55663,  1.87174,  2.13263,  2.58551,  2.67331,
+  1.23377,  1.59824,  1.84996,  2.01367,  2.54286,  2.63448,
+  1.26976,  1.56079,  1.86522,  2.07633,  2.52108,  2.61744,
+  1.11656,  1.68088,  1.78169,  1.9205,  2.59221,  2.67584,
+  1.04821,  1.663,  1.8174,  1.91517,  2.48459,  2.62308,
+  0.954241,  1.61967,  1.81346,  1.88169,  2.55067,  2.63197,
+  0.964363,  1.57975,  1.72871,  1.86213,  2.56757,  2.63633,
+  1.29692,  1.64688,  1.88926,  2.06927,  2.32023,  2.48139,
+  1.23277,  1.6196,  1.95547,  2.06656,  2.33528,  2.45651,
+  1.23897,  1.35179,  1.87757,  2.16641,  2.31797,  2.47439,
+  1.18029,  1.38835,  1.60745,  1.95083,  2.21086,  2.47772,
+  1.124,  1.42354,  1.61732,  1.8268,  2.20607,  2.44408,
+  1.14779,  1.48705,  1.62797,  1.92602,  2.27842,  2.48653,
+  1.09265,  1.49972,  1.62304,  1.88016,  2.41166,  2.64865,
+  1.11529,  1.46869,  1.60763,  1.81446,  2.3569,  2.57609,
+  1.17604,  1.42463,  1.61423,  1.96634,  2.35268,  2.57035,
+  1.21105,  1.46743,  1.61778,  1.85149,  2.38977,  2.59186,
+  1.28768,  1.46486,  1.63379,  1.85623,  2.34975,  2.56532,
+  1.29859,  1.49522,  1.639,  1.94264,  2.41539,  2.51812,
+  1.30989,  1.43114,  1.75719,  1.97721,  2.41487,  2.52088,
+  1.39224,  1.47741,  1.8113,  1.90969,  2.44042,  2.57389,
+  1.41494,  1.51538,  1.859,  2.12794,  2.49067,  2.63542,
+  1.49044,  1.56597,  1.95241,  2.04907,  2.49994,  2.60018,
+  1.48507,  1.73412,  1.99737,  2.08938,  2.52477,  2.60816,
+  1.50713,  1.7872,  2.0481,  2.12836,  2.53363,  2.62465,
+  1.48522,  1.77259,  2.0481,  2.14437,  2.59574,  2.67979,
+  1.56004,  1.74452,  2.07614,  2.15684,  2.61506,  2.69877,
+  1.50628,  1.85545,  2.06419,  2.14453,  2.58566,  2.68779,
+  1.59288,  1.90345,  2.08453,  2.16339,  2.4969,  2.63359,
+  1.60945,  1.87086,  2.11982,  2.18659,  2.5995,  2.69782,
+  1.59478,  1.85535,  2.02562,  2.14254,  2.5723,  2.63784,
+  1.52719,  1.71409,  2.07627,  2.18517,  2.52655,  2.63114,
+  1.51801,  1.62801,  2.03926,  2.13453,  2.45384,  2.57636,
+  1.53131,  1.67808,  2.03518,  2.14689,  2.50486,  2.58417,
+  1.50863,  1.63261,  1.96514,  2.14868,  2.49664,  2.59275,
+  1.4999,  1.59942,  1.91369,  2.03686,  2.45019,  2.53817,
+  1.48116,  1.58381,  1.88446,  2.01387,  2.3595,  2.4811,
+  1.47574,  1.5697,  1.79999,  1.91618,  2.32922,  2.5359,
+  1.49864,  1.6236,  1.79282,  1.94522,  2.35863,  2.49073,
+  1.43113,  1.57463,  1.74326,  2.00612,  2.34776,  2.5089,
+  1.42706,  1.53658,  1.79069,  1.94303,  2.34447,  2.45265,
+  1.43684,  1.54202,  1.75892,  1.92562,  2.24291,  2.41684,
+  1.41979,  1.50904,  1.86332,  1.9954,  2.27579,  2.42473,
+  1.4244,  1.51048,  1.88289,  2.17902,  2.30471,  2.45567,
+  1.36605,  1.46119,  1.93532,  2.14755,  2.26342,  2.46579,
+  1.4074,  1.56497,  1.98112,  2.10344,  2.44529,  2.5651,
+  1.59701,  1.87701,  2.0685,  2.27031,  2.49936,  2.60489,
+  1.48498,  1.81813,  2.14982,  2.33759,  2.50475,  2.58944,
+  1.48788,  1.93718,  2.11827,  2.30837,  2.51178,  2.60463,
+  1.6823,  1.97703,  2.19229,  2.37368,  2.52293,  2.61128,
+  1.74946,  1.90568,  2.21827,  2.35201,  2.57423,  2.68148,
+  1.67622,  1.93651,  2.23718,  2.34378,  2.53591,  2.66127,
+  1.72336,  1.98992,  2.27124,  2.41314,  2.55083,  2.64937,
+  1.75601,  1.99691,  2.31266,  2.46148,  2.62542,  2.70874,
+  1.49977,  1.7633,  2.15887,  2.34688,  2.59272,  2.68285,
+  1.74752,  1.92713,  2.24894,  2.41084,  2.60412,  2.69088,
+  1.67035,  1.93826,  2.24767,  2.44713,  2.65754,  2.73004,
+  1.66924,  1.95961,  2.17932,  2.44053,  2.58843,  2.6408,
+  1.78023,  2.01514,  2.16481,  2.39902,  2.58191,  2.64694,
+  1.73956,  1.96722,  2.06569,  2.36448,  2.58998,  2.64944,
+  1.60501,  1.87511,  2.0189,  2.2274,  2.54118,  2.60354,
+  1.51125,  1.8926,  2.02783,  2.14811,  2.52,  2.6082,
+  1.36336,  1.56877,  1.91085,  2.05769,  2.46351,  2.55882,
+  1.3385,  1.48382,  1.8837,  2.06707,  2.44895,  2.5779,
+  1.36919,  1.43786,  1.84522,  2.07846,  2.4285,  2.61589,
+  1.3777,  1.49829,  1.86767,  2.16496,  2.49255,  2.57091,
+  1.4081,  1.48776,  1.87241,  2.09795,  2.44727,  2.55172,
+  1.40236,  1.53195,  1.89769,  2.12667,  2.41916,  2.55144,
+  1.4565,  1.55463,  1.84107,  2.09581,  2.42129,  2.56176,
+  1.43493,  1.52915,  1.79534,  2.1637,  2.44647,  2.53031,
+  1.39111,  1.4955,  1.86968,  2.16123,  2.38141,  2.53202,
+  1.38893,  1.53447,  1.797,  2.10294,  2.39851,  2.52127,
+  1.35857,  1.4713,  1.76005,  2.10088,  2.3502,  2.54655,
+  1.2766,  1.51921,  1.77942,  2.09582,  2.44294,  2.66594,
+  1.20666,  1.45786,  1.76046,  2.24428,  2.49588,  2.64485,
+  1.21461,  1.46027,  1.97902,  2.23945,  2.39832,  2.63447,
+  1.27547,  1.47347,  1.87857,  2.20312,  2.47503,  2.68785,
+  1.29171,  1.39929,  1.81381,  2.19412,  2.50276,  2.61489,
+  1.26006,  1.398,  1.92489,  2.18672,  2.51167,  2.64455,
+  1.21063,  1.32671,  1.89759,  2.10744,  2.46008,  2.71172,
+  1.20266,  1.31923,  1.89263,  2.07986,  2.37942,  2.67989,
+  0.967019,  1.10597,  1.76132,  2.10743,  2.32843,  2.59315,
+  0.947746,  1.0358,  1.39373,  2.06123,  2.30074,  2.66828,
+  0.996167,  1.21503,  1.37899,  1.86198,  2.32966,  2.60502,
+  1.00882,  1.19848,  1.31384,  1.69352,  2.36075,  2.60482,
+  1.05406,  1.21851,  1.36811,  1.73801,  2.17491,  2.54607,
+  1.02157,  1.13399,  1.36917,  1.93564,  2.2678,  2.54441,
+  1.03374,  1.22777,  1.45129,  2.00592,  2.41262,  2.59503,
+  1.06516,  1.16864,  1.53018,  2.0615,  2.41074,  2.48548,
+  1.12123,  1.28128,  1.43223,  1.90993,  2.20273,  2.50931,
+  1.17003,  1.30604,  1.49495,  1.98191,  2.20282,  2.35174,
+  1.15263,  1.26619,  1.621,  2.05767,  2.21445,  2.38164,
+  1.22813,  1.31327,  1.75147,  2.11847,  2.26342,  2.45389,
+  1.30783,  1.39865,  1.79975,  2.12574,  2.26062,  2.4518,
+  1.3601,  1.47744,  1.83574,  2.12187,  2.29156,  2.49979,
+  1.39848,  1.49297,  1.80652,  2.10714,  2.24141,  2.43415,
+  1.35121,  1.46251,  1.72639,  2.12239,  2.28579,  2.42184,
+  1.2972,  1.49887,  1.76625,  2.15784,  2.37671,  2.49716,
+  1.37735,  1.51897,  1.80379,  2.19115,  2.35637,  2.4789,
+  1.28917,  1.55324,  1.67459,  2.11263,  2.40335,  2.47388,
+  1.18897,  1.70034,  1.83432,  2.05558,  2.59953,  2.70041,
+  1.07704,  1.66767,  1.90219,  2.04569,  2.60291,  2.70006,
+  1.07206,  1.27246,  1.84374,  1.90118,  2.58625,  2.72056,
+  1.08439,  1.39207,  1.82356,  1.9013,  2.58943,  2.68003,
+  1.10632,  1.44136,  1.76614,  1.85372,  2.54936,  2.62741,
+  1.09457,  1.55002,  1.77192,  1.87095,  2.55968,  2.62805,
+  1.0419,  1.59855,  1.8137,  1.92849,  2.54563,  2.6715,
+  1.0902,  1.61051,  1.81256,  2.01926,  2.55632,  2.60879,
+  1.01653,  1.62666,  1.74241,  2.04192,  2.54154,  2.60225,
+  1.07557,  1.64775,  1.87067,  2.07397,  2.5746,  2.6288,
+  1.12666,  1.58621,  1.79257,  1.98241,  2.62918,  2.72556,
+  1.02778,  1.54267,  1.8314,  1.95688,  2.60301,  2.66852,
+  1.1119,  1.54342,  1.86147,  1.94292,  2.62196,  2.67286,
+  1.08051,  1.58319,  1.8573,  1.95846,  2.6336,  2.69514,
+  1.13224,  1.44916,  1.88495,  1.977,  2.60785,  2.70942,
+  1.23277,  1.6126,  1.96044,  2.07169,  2.64468,  2.72712,
+  1.32501,  1.7799,  1.9673,  2.11387,  2.54784,  2.66872,
+  1.40459,  1.64445,  2.05809,  2.25711,  2.51912,  2.63461,
+  1.41349,  1.6094,  2.00252,  2.1841,  2.58753,  2.69615,
+  1.35402,  1.59388,  2.01444,  2.1222,  2.61725,  2.72181,
+  1.37382,  1.65676,  1.99218,  2.18987,  2.54872,  2.70251,
+  1.42118,  1.61108,  1.95807,  2.12362,  2.56983,  2.64814,
+  1.37918,  1.6202,  1.92264,  2.09395,  2.55069,  2.64186,
+  1.36773,  1.65667,  1.83845,  1.99212,  2.59623,  2.65404,
+  1.39455,  1.75062,  1.87227,  2.03843,  2.55322,  2.62359,
+  1.46402,  1.74159,  1.91299,  2.15026,  2.56559,  2.64882,
+  1.46113,  1.80906,  1.95461,  2.2099,  2.57028,  2.64252,
+  1.43452,  1.77083,  1.90402,  2.21731,  2.63118,  2.687,
+  1.37553,  1.63166,  1.886,  2.08659,  2.6005,  2.67126,
+  1.33921,  1.56872,  1.81737,  2.08557,  2.59134,  2.66646,
+  1.5044,  1.77959,  2.05714,  2.27244,  2.5346,  2.63465,
+  1.4745,  1.74632,  2.04471,  2.13738,  2.47455,  2.63053,
+  1.55704,  1.75502,  2.03966,  2.08094,  2.66134,  2.74174,
+  1.57345,  1.71536,  2.05673,  2.09837,  2.69164,  2.74369,
+  1.51143,  1.83189,  1.99159,  2.15604,  2.62435,  2.70952,
+  1.50191,  1.71403,  2.01293,  2.07943,  2.55466,  2.69041,
+  1.54718,  1.67191,  1.97797,  2.10406,  2.50716,  2.61481,
+  1.56326,  1.63597,  1.99013,  2.12372,  2.56382,  2.63319,
+  1.58777,  1.69779,  2.00754,  2.12736,  2.58884,  2.65654,
+  1.6183,  1.72223,  2.00849,  2.13128,  2.61817,  2.68764,
+  1.58008,  1.68493,  2.00065,  2.08783,  2.61398,  2.68767,
+  1.57278,  1.73632,  1.96154,  2.14435,  2.64125,  2.68794,
+  1.53899,  1.65285,  1.95211,  2.15604,  2.6393,  2.68573,
+  1.53713,  1.6228,  1.96353,  2.07594,  2.6122,  2.67933,
+  1.53745,  1.63325,  1.98652,  2.07568,  2.54279,  2.6438,
+  1.54323,  1.77202,  2.05391,  2.14247,  2.53641,  2.69049,
+  1.6218,  1.83,  2.05274,  2.21086,  2.58321,  2.66584,
+  1.60957,  1.93532,  2.14668,  2.39332,  2.59721,  2.67056,
+  1.56082,  1.93554,  2.19144,  2.44438,  2.60992,  2.6926,
+  1.70428,  1.87459,  2.01026,  2.3801,  2.52866,  2.6048,
+  1.62478,  1.83779,  1.92536,  2.19301,  2.49717,  2.56943,
+  1.55613,  1.83265,  1.98694,  2.18932,  2.4532,  2.53163,
+  1.34743,  1.66967,  1.94393,  2.10805,  2.50663,  2.60842,
+  1.27841,  1.49725,  1.83841,  2.07392,  2.45455,  2.59232,
+  1.27105,  1.41512,  1.75811,  2.23246,  2.42277,  2.55467,
+  1.26034,  1.35671,  1.91317,  2.22589,  2.3806,  2.55725,
+  1.2231,  1.30797,  1.78409,  2.20752,  2.36287,  2.48779,
+  1.24945,  1.53816,  1.7166,  1.99832,  2.36211,  2.46553,
+  1.20801,  1.50306,  1.7613,  1.91708,  2.44805,  2.52513,
+  1.15185,  1.46115,  1.78394,  1.94689,  2.45256,  2.55631,
+  1.16556,  1.34777,  1.79995,  1.92075,  2.43788,  2.54695,
+  1.10979,  1.31045,  1.81589,  1.92338,  2.4273,  2.6028,
+  1.09199,  1.23364,  1.78961,  1.92504,  2.4678,  2.61117,
+  1.05232,  1.19475,  1.8099,  1.91423,  2.39018,  2.55632,
+  1.03227,  1.18949,  1.77562,  1.88969,  2.39325,  2.64083,
+  0.992854,  1.16963,  1.81416,  1.91225,  2.32027,  2.63432,
+  1.05441,  1.17775,  1.76276,  1.9072,  2.26618,  2.5163,
+  1.02954,  1.16736,  1.78006,  1.97354,  2.22784,  2.61389,
+  1.06778,  1.18481,  1.74132,  1.91913,  2.12196,  2.50079,
+  1.16784,  1.26305,  1.77863,  1.90072,  2.15081,  2.56866,
+  1.24703,  1.32367,  1.81105,  1.93459,  2.18402,  2.67462,
+  1.33178,  1.42614,  1.78514,  1.96603,  2.11456,  2.54183,
+  1.3609,  1.44414,  1.86253,  1.94975,  2.42674,  2.64611,
+  1.40854,  1.45179,  1.86692,  2.01423,  2.47884,  2.70591,
+  1.40555,  1.48355,  1.87498,  1.96029,  2.50276,  2.66254,
+  1.44237,  1.54466,  1.88335,  1.98759,  2.56298,  2.64776,
+  1.48072,  1.5362,  1.88182,  2.01887,  2.58235,  2.66179,
+  1.51308,  1.58325,  1.89576,  1.98715,  2.58617,  2.67601,
+  1.49776,  1.60209,  1.83101,  1.9854,  2.56409,  2.64364,
+  1.49706,  1.56491,  1.84464,  1.9577,  2.53993,  2.67716,
+  1.46811,  1.52375,  1.86584,  1.94008,  2.60797,  2.68486,
+  1.4681,  1.56439,  1.85892,  1.9824,  2.60648,  2.70969,
+  1.42273,  1.5192,  1.80679,  1.89159,  2.61482,  2.70389,
+  1.39687,  1.4767,  1.7764,  2.01325,  2.60785,  2.66599,
+  1.39153,  1.50457,  1.83054,  2.08154,  2.61102,  2.72081,
+  1.37288,  1.64506,  1.83336,  2.01576,  2.63134,  2.70134,
+  1.33129,  1.7474,  1.89795,  2.14651,  2.58668,  2.65827,
+  1.50318,  1.73469,  1.915,  2.28209,  2.59839,  2.67919,
+  1.46524,  1.71176,  2.02517,  2.28408,  2.65366,  2.71739,
+  1.4234,  1.76876,  2.08441,  2.27788,  2.63644,  2.71152,
+  1.42382,  1.72447,  2.03259,  2.30031,  2.60334,  2.68611,
+  1.43318,  1.81887,  2.05388,  2.40924,  2.6286,  2.69946,
+  1.50985,  1.79349,  2.05264,  2.35777,  2.64413,  2.71806,
+  1.57573,  1.85153,  2.03296,  2.3749,  2.58353,  2.66224,
+  1.50126,  1.78083,  1.99855,  2.32927,  2.5056,  2.60674,
+  1.46006,  1.76321,  1.91233,  2.21442,  2.49433,  2.57762,
+  1.44404,  1.65767,  1.89536,  2.14855,  2.47846,  2.59545,
+  1.45429,  1.61986,  1.93589,  2.18975,  2.47883,  2.59488,
+  1.37724,  1.64218,  1.91967,  2.14284,  2.42151,  2.54104,
+  1.05106,  1.42102,  1.8304,  2.02122,  2.37369,  2.54883,
+  0.964571,  1.07164,  1.3949,  2.1512,  2.37178,  2.46495,
+  0.966306,  1.18103,  1.30221,  2.01482,  2.37509,  2.43513,
+  0.89556,  1.20784,  1.33531,  1.82392,  2.23992,  2.3631,
+  1.00678,  1.20309,  1.31782,  1.87398,  2.33664,  2.40878,
+  1.05413,  1.22559,  1.37901,  2.02469,  2.33331,  2.42155,
+  1.0902,  1.22477,  1.40967,  2.0132,  2.24536,  2.35323,
+  1.07648,  1.20397,  1.56389,  2.03395,  2.20336,  2.3691,
+  1.12797,  1.24913,  1.66469,  2.08043,  2.25662,  2.46954,
+  1.20201,  1.42968,  1.79368,  2.08071,  2.33998,  2.46005,
+  1.51722,  1.6739,  1.92792,  2.20364,  2.38676,  2.52014,
+  1.58662,  1.78624,  2.04167,  2.199,  2.41637,  2.58119,
+  1.5933,  1.80855,  2.14878,  2.25028,  2.37209,  2.53241,
+  1.65729,  1.78346,  2.15039,  2.25813,  2.45392,  2.61621,
+  1.57149,  1.79266,  2.11765,  2.35038,  2.57719,  2.66695,
+  1.30199,  1.72975,  1.97442,  2.09325,  2.5939,  2.66302,
+  1.10022,  1.5634,  1.91991,  2.05922,  2.56297,  2.63776,
+  1.02507,  1.54074,  1.8119,  2.05791,  2.49188,  2.60325,
+  1.01531,  1.4735,  1.80259,  2.01308,  2.43676,  2.60532,
+  1.02207,  1.15848,  1.68979,  2.18353,  2.38378,  2.49237,
+  1.21248,  1.45311,  1.82395,  2.06144,  2.39619,  2.53658,
+  1.12624,  1.45293,  1.80959,  2.07107,  2.40894,  2.54956,
+  0.880332,  1.32478,  1.62134,  1.96725,  2.31316,  2.42693,
+  0.749583,  1.35841,  1.57507,  1.87059,  2.27923,  2.37743,
+  0.901917,  1.29022,  1.67443,  1.95441,  2.23336,  2.39152,
+  0.850971,  1.2521,  1.65765,  1.81646,  2.18389,  2.32881,
+  0.88148,  1.2841,  1.69816,  1.84466,  2.34182,  2.44091,
+  0.874499,  1.18268,  1.70949,  1.91745,  2.36597,  2.49965,
+  0.833751,  1.23113,  1.80332,  1.91802,  2.45909,  2.54688,
+  0.85097,  1.12709,  1.77207,  1.85522,  2.48758,  2.58286,
+  0.88165,  1.1148,  1.8207,  1.95908,  2.52175,  2.59873,
+  0.803558,  1.15029,  1.79848,  1.95267,  2.53892,  2.6349,
+  0.867833,  0.990496,  1.83228,  1.92977,  2.54766,  2.68108,
+  0.865057,  1.06744,  1.77326,  1.86019,  2.55833,  2.70222,
+  0.832529,  0.98596,  1.75637,  1.86293,  2.43828,  2.62378,
+  0.850804,  1.06055,  1.89222,  1.98401,  2.48377,  2.66112,
+  0.873803,  1.04198,  1.7462,  1.93244,  2.33822,  2.55458,
+  0.958594,  1.10347,  1.83644,  1.93678,  2.39376,  2.5732,
+  1.01483,  1.14087,  1.82593,  2.01371,  2.40149,  2.60942,
+  1.07537,  1.45764,  1.90046,  2.03349,  2.31419,  2.49095,
+  1.20171,  1.73617,  1.91408,  2.0665,  2.38691,  2.47696,
+  1.21522,  1.87361,  2.0659,  2.18299,  2.37498,  2.48955,
+  1.62021,  1.85126,  2.11154,  2.3428,  2.52749,  2.63389,
+  1.68388,  1.86037,  2.12601,  2.40434,  2.56298,  2.63616,
+  1.70382,  1.93438,  2.13367,  2.39321,  2.60193,  2.68247,
+  1.52688,  1.90013,  2.1511,  2.36164,  2.57517,  2.65898,
+  1.58725,  1.88139,  2.12995,  2.26786,  2.57786,  2.65784,
+  1.53916,  1.87134,  2.19028,  2.36038,  2.62461,  2.70564,
+  1.62575,  1.86218,  2.12009,  2.33946,  2.59216,  2.68214,
+  1.67953,  1.92069,  2.16117,  2.31711,  2.6489,  2.71211,
+  1.6352,  1.92283,  2.17484,  2.4074,  2.63005,  2.70927,
+  1.45419,  1.9757,  2.15185,  2.37134,  2.60918,  2.68579,
+  1.67244,  2.0114,  2.18302,  2.46392,  2.65296,  2.71152,
+  1.61211,  1.98748,  2.10258,  2.29335,  2.61613,  2.67026,
+  1.52807,  1.89507,  2.05358,  2.2325,  2.54491,  2.62412,
+  1.42035,  1.6835,  1.96343,  2.15942,  2.53673,  2.62013,
+  1.45632,  1.69313,  1.96923,  2.16474,  2.58716,  2.67759,
+  1.48111,  1.63754,  1.99264,  2.17848,  2.54814,  2.63276,
+  1.48852,  1.59117,  2.0165,  2.12332,  2.52866,  2.61492,
+  1.47743,  1.65152,  1.96289,  2.10218,  2.5433,  2.61884,
+  1.47386,  1.6223,  1.99223,  2.08035,  2.57269,  2.64443,
+  1.47822,  1.6334,  1.9312,  2.06413,  2.55228,  2.62934,
+  1.45248,  1.67676,  1.94591,  2.08475,  2.60097,  2.66889,
+  1.41156,  1.70618,  1.89025,  2.16962,  2.56732,  2.65016,
+  1.3834,  1.66463,  1.80326,  2.10861,  2.59577,  2.64622,
+  1.4346,  1.64501,  1.87175,  2.11549,  2.52896,  2.66026,
+  1.44454,  1.58183,  1.89864,  2.09407,  2.52845,  2.6315,
+  1.46556,  1.562,  1.84142,  2.0516,  2.55994,  2.63232,
+  1.49929,  1.58105,  1.85745,  2.09899,  2.5116,  2.60434,
+  1.52868,  1.65135,  1.87131,  2.07123,  2.56255,  2.62246,
+  1.51447,  1.63348,  1.7786,  2.1235,  2.6061,  2.66239,
+  1.30148,  1.68391,  1.79606,  2.17075,  2.64495,  2.69178,
+  1.15442,  1.62694,  1.74922,  1.99641,  2.57924,  2.6529,
+  1.11791,  1.56927,  1.79538,  1.8853,  2.37672,  2.73973,
+  1.25179,  1.62567,  1.83926,  1.99131,  2.35012,  2.65505,
+  1.41213,  1.69423,  1.83936,  1.9984,  2.44522,  2.73968,
+  1.37016,  1.68726,  1.87973,  2.00645,  2.32901,  2.63296,
+  1.17478,  1.72905,  1.88737,  2.01391,  2.25939,  2.55774,
+  1.31792,  1.73704,  1.87808,  1.97931,  2.17536,  2.63486,
+  1.14013,  1.58645,  1.93222,  2.02771,  2.23684,  2.48495,
+  1.10014,  1.6001,  1.85129,  1.97238,  2.60483,  2.64945,
+  1.11197,  1.52598,  1.84271,  2.01149,  2.6016,  2.66939,
+  1.08082,  1.49258,  1.81023,  1.96531,  2.55673,  2.64517,
+  1.12935,  1.6359,  1.78518,  2.1374,  2.498,  2.57252,
+  1.00359,  1.60301,  1.7227,  2.1394,  2.43159,  2.511,
+  1.12017,  1.42515,  1.67568,  2.05077,  2.34325,  2.46068,
+  1.32861,  1.59915,  1.87358,  2.17045,  2.47054,  2.61353,
+  1.38209,  1.59534,  1.92346,  2.08211,  2.34955,  2.51075,
+  1.46619,  1.57286,  1.87047,  2.18,  2.34634,  2.47187,
+  1.37977,  1.63301,  1.80827,  2.16629,  2.39872,  2.49247,
+  1.30592,  1.61002,  1.85641,  2.00154,  2.39067,  2.53391,
+  1.38309,  1.58681,  1.75722,  1.9348,  2.43354,  2.58795,
+  1.30751,  1.45094,  1.67533,  2.03394,  2.24423,  2.41812,
+  1.1915,  1.48407,  1.75027,  2.09664,  2.24938,  2.50498,
+  1.24138,  1.49179,  1.77688,  2.07173,  2.36793,  2.50807,
+  1.2657,  1.45992,  1.78175,  2.0099,  2.34858,  2.51604,
+  1.27951,  1.41465,  1.7951,  2.05594,  2.3957,  2.53054,
+  1.33734,  1.44593,  1.85301,  2.07518,  2.38598,  2.53549,
+  1.28897,  1.42471,  1.79799,  2.02629,  2.2998,  2.42371,
+  1.36528,  1.47179,  1.80171,  1.9377,  2.3453,  2.4667,
+  1.35379,  1.44775,  1.73621,  1.86889,  2.27436,  2.47558,
+  1.36086,  1.44961,  1.68047,  1.80265,  2.39554,  2.51326,
+  1.38833,  1.52625,  1.67333,  1.90987,  2.38502,  2.53543,
+  1.42443,  1.54422,  1.7202,  1.93624,  2.30797,  2.49142,
+  1.44894,  1.55201,  1.79794,  1.93752,  2.40687,  2.54612,
+  1.43203,  1.52162,  1.79932,  2.02144,  2.47733,  2.57175,
+  1.46309,  1.54628,  1.83442,  2.06349,  2.4898,  2.59527,
+  1.42547,  1.55643,  1.90472,  2.11082,  2.46637,  2.58756,
+  1.38484,  1.56941,  1.92558,  2.07237,  2.56129,  2.64054,
+  1.41849,  1.53942,  1.93754,  2.01432,  2.6092,  2.67676,
+  1.39701,  1.48328,  1.93673,  1.97775,  2.59561,  2.73585,
+  1.33562,  1.44187,  1.88474,  1.99496,  2.58963,  2.69575,
+  1.35749,  1.519,  1.8716,  1.9802,  2.62902,  2.7003,
+  1.35356,  1.52432,  1.89108,  1.96371,  2.59581,  2.67933,
+  1.2951,  1.63928,  1.90739,  2.10314,  2.58336,  2.67978,
+  1.45554,  1.66759,  1.9532,  2.24049,  2.57067,  2.67362,
+  1.46028,  1.78665,  1.99775,  2.28513,  2.58293,  2.67762,
+  1.54312,  1.72939,  2.15567,  2.28027,  2.65558,  2.74425,
+  1.43444,  1.74878,  2.0422,  2.20129,  2.6065,  2.69586,
+  1.43608,  1.74734,  2.06784,  2.25326,  2.57594,  2.67908,
+  1.47087,  1.69825,  2.08313,  2.25757,  2.56534,  2.66619,
+  1.41742,  1.69344,  2.05319,  2.24354,  2.54484,  2.6328,
+  1.41211,  1.68159,  2.0818,  2.3261,  2.47245,  2.57058,
+  1.39723,  1.76474,  2.03156,  2.29712,  2.47165,  2.57588,
+  1.4665,  1.6943,  2.00592,  2.20633,  2.53451,  2.63576,
+  1.43711,  1.74657,  1.92384,  2.12785,  2.35663,  2.46448,
+  1.32402,  1.59792,  1.75778,  2.12435,  2.34799,  2.44047,
+  1.37539,  1.62639,  1.77807,  2.0684,  2.25894,  2.39753,
+  1.37958,  1.62179,  1.85796,  1.99428,  2.30609,  2.47721,
+  1.41641,  1.64889,  1.86912,  2.09836,  2.3454,  2.47513,
+  1.42624,  1.6392,  1.9254,  2.07268,  2.44895,  2.53255,
+  1.45905,  1.61587,  1.91117,  2.12546,  2.4837,  2.59209,
+  1.45943,  1.6907,  1.85242,  2.13607,  2.5294,  2.5972,
+  1.48514,  1.57805,  1.81057,  2.15062,  2.55904,  2.61824,
+  1.52905,  1.59466,  1.7389,  2.26122,  2.59577,  2.65162,
+  1.53249,  1.58533,  1.82094,  2.22962,  2.62316,  2.65848,
+  1.3744,  1.52808,  1.84802,  2.04246,  2.45823,  2.59109,
+  1.39987,  1.59747,  1.85308,  2.09608,  2.4316,  2.55685,
+  1.45743,  1.60951,  1.93076,  2.1861,  2.39229,  2.52506,
+  1.44051,  1.60759,  1.86998,  2.15828,  2.42428,  2.55553,
+  1.37676,  1.47479,  1.75056,  2.19062,  2.40618,  2.54712,
+  1.32771,  1.45424,  1.64463,  2.11036,  2.35245,  2.45593,
+  1.3028,  1.41895,  1.60978,  2.09312,  2.26349,  2.39325,
+  1.20771,  1.37987,  1.53641,  2.05993,  2.3173,  2.4554,
+  1.15421,  1.30297,  1.49921,  2.07038,  2.3222,  2.63083,
+  1.11147,  1.22442,  1.62564,  2.17608,  2.34255,  2.60619,
+  0.945723,  1.0833,  1.62541,  2.21453,  2.3899,  2.51008,
+  0.992344,  1.11699,  1.45192,  2.00842,  2.31359,  2.43786,
+  1.11731,  1.39299,  1.71346,  2.13231,  2.27682,  2.49761,
+  1.33287,  1.58093,  1.89551,  2.129,  2.4251,  2.57695,
+  1.32204,  1.49774,  1.81922,  2.12864,  2.44361,  2.56795,
+  1.36194,  1.54738,  1.79097,  2.06294,  2.46532,  2.54609,
+  1.25268,  1.48388,  1.75863,  2.03345,  2.41628,  2.53922,
+  1.09938,  1.34475,  1.68653,  2.01675,  2.35586,  2.53084,
+  1.12611,  1.26362,  1.64994,  1.99154,  2.30909,  2.51489,
+  1.19062,  1.28965,  1.69271,  2.00948,  2.16009,  2.41707,
+  1.17498,  1.41431,  1.79786,  1.9876,  2.27882,  2.49276,
+  1.20535,  1.48205,  1.85076,  2.02555,  2.34228,  2.52343,
+  1.24803,  1.56119,  1.85276,  2.09645,  2.42836,  2.55187,
+  1.26073,  1.60183,  1.90105,  2.13198,  2.40985,  2.56555,
+  1.26504,  1.69384,  2.00053,  2.20004,  2.50351,  2.61771,
+  1.27884,  1.73826,  2.06202,  2.28998,  2.60444,  2.67811,
+  1.33943,  1.73592,  2.05012,  2.35241,  2.59739,  2.68822,
+  1.30106,  1.70875,  1.96598,  2.28621,  2.54671,  2.65318,
+  1.2786,  1.74616,  1.95007,  2.21477,  2.60579,  2.68762,
+  1.18377,  1.52306,  1.87912,  2.00491,  2.60031,  2.69049,
+  1.18622,  1.34213,  1.81783,  1.94008,  2.5049,  2.65925,
+  1.17939,  1.24368,  1.89426,  1.97975,  2.55802,  2.72182,
+  1.17562,  1.35704,  1.85319,  1.94081,  2.64681,  2.70566,
+  1.21112,  1.36964,  1.82525,  1.91329,  2.63472,  2.71226,
+  1.16947,  1.34515,  1.76494,  1.88367,  2.59108,  2.71452,
+  1.22209,  1.38948,  1.80018,  1.9359,  2.57377,  2.70292,
+  1.28727,  1.37591,  1.87874,  1.98605,  2.626,  2.70847,
+  1.29971,  1.3896,  1.8739,  1.94272,  2.53348,  2.69147,
+  1.27136,  1.4242,  1.84985,  1.95357,  2.55556,  2.65237,
+  1.25357,  1.44851,  1.82953,  1.9191,  2.48784,  2.63076,
+  1.22392,  1.32302,  1.84126,  1.93273,  2.22685,  2.57072,
+  1.22617,  1.32139,  1.77179,  1.94807,  2.13788,  2.56305,
+  1.31624,  1.39947,  1.78933,  1.96557,  2.13204,  2.42471,
+  1.26439,  1.36395,  1.73553,  2.0056,  2.15584,  2.41892,
+  1.21403,  1.31978,  1.66202,  1.90295,  2.06463,  2.42483,
+  1.2426,  1.34231,  1.62476,  1.92942,  2.08355,  2.31844,
+  1.24161,  1.43912,  1.64633,  1.81792,  1.99776,  2.19663,
+  1.23935,  1.33692,  1.77706,  2.02801,  2.15585,  2.3287,
+  1.17842,  1.26633,  1.80204,  1.95982,  2.1457,  2.46951,
+  1.2477,  1.32863,  1.81269,  1.99279,  2.20064,  2.49944,
+  1.27008,  1.37091,  1.88227,  1.99723,  2.25428,  2.52605,
+  1.29555,  1.37642,  1.86044,  2.07673,  2.249,  2.56712,
+  1.30484,  1.38609,  1.83276,  2.06162,  2.2194,  2.48635,
+  1.31431,  1.38148,  1.91283,  2.01753,  2.28775,  2.57642,
+  1.27508,  1.35377,  1.85847,  2.03703,  2.36206,  2.61542,
+  1.28711,  1.3668,  1.83552,  1.96109,  2.29199,  2.56297,
+  1.25667,  1.34116,  1.79881,  1.92126,  2.33365,  2.59691,
+  1.22928,  1.33751,  1.75398,  1.94239,  2.40355,  2.60217,
+  1.22487,  1.32298,  1.79261,  1.91891,  2.36331,  2.52058,
+  1.21845,  1.32159,  1.65149,  1.88416,  2.36654,  2.52128,
+  1.19322,  1.35912,  1.6324,  1.85763,  2.32285,  2.45271,
+  1.20547,  1.36803,  1.60803,  1.81504,  2.34185,  2.57451,
+  1.06125,  1.31843,  1.54502,  1.88874,  2.40188,  2.61702,
+  1.07252,  1.36579,  1.51413,  1.89367,  2.36962,  2.47423,
+  1.11164,  1.43679,  1.6061,  1.84246,  2.38242,  2.47411,
+  1.01206,  1.3162,  1.47159,  1.79906,  2.34943,  2.45513,
+  1.08947,  1.24857,  1.57279,  1.95306,  2.29844,  2.46178,
+  1.06836,  1.19581,  1.62402,  2.11129,  2.31148,  2.41925,
+  1.14751,  1.52522,  1.72481,  1.95717,  2.38753,  2.47131,
+  1.33434,  1.56815,  1.74904,  1.96257,  2.39063,  2.48465,
+  1.29814,  1.46788,  1.8144,  1.94157,  2.38423,  2.52218,
+  1.29501,  1.41849,  1.85947,  1.96233,  2.37632,  2.52176,
+  1.33583,  1.43664,  1.85826,  1.96633,  2.44658,  2.56348,
+  1.34649,  1.47798,  1.90564,  1.99809,  2.49005,  2.58447,
+  1.40718,  1.54076,  1.8793,  1.99298,  2.48794,  2.56401,
+  1.44766,  1.62857,  1.8282,  2.05365,  2.53405,  2.60586,
+  1.52471,  1.62005,  1.83788,  2.01792,  2.59217,  2.65337,
+  1.56458,  1.64714,  1.76118,  2.02415,  2.61525,  2.65657,
+  1.52937,  1.59398,  1.68316,  1.97983,  2.60164,  2.65439,
+  1.58508,  1.65284,  1.78677,  2.03185,  2.518,  2.62098,
+  1.58891,  1.64423,  1.81381,  2.04148,  2.61072,  2.66605,
+  1.60136,  1.68607,  1.86295,  2.12711,  2.60886,  2.65502,
+  1.64024,  1.75092,  1.9211,  2.16441,  2.54752,  2.61719,
+  1.5486,  1.6382,  1.9174,  2.09265,  2.56383,  2.61584,
+  1.51587,  1.61696,  1.84416,  2.00703,  2.52817,  2.60107,
+  1.46587,  1.5722,  1.74097,  2.01129,  2.49342,  2.58193,
+  1.41191,  1.53428,  1.66939,  2.02551,  2.41906,  2.53499,
+  1.3394,  1.5249,  1.67455,  2.01899,  2.344,  2.44379,
+  1.30067,  1.52706,  1.67307,  2.03619,  2.26952,  2.38379,
+  1.19308,  1.4765,  1.66446,  1.93323,  2.291,  2.41495,
+  1.19279,  1.48559,  1.64926,  1.84405,  2.29509,  2.502,
+  1.19782,  1.36486,  1.70369,  1.82721,  2.26277,  2.4998,
+  1.13827,  1.37925,  1.65813,  1.91249,  2.38908,  2.58338,
+  1.1666,  1.35794,  1.68892,  1.94273,  2.49153,  2.58925,
+  1.17061,  1.39155,  1.72193,  1.88951,  2.50612,  2.61639,
+  1.21096,  1.4527,  1.75562,  1.84497,  2.49006,  2.62473,
+  1.21214,  1.51972,  1.78592,  1.88927,  2.55126,  2.62949,
+  1.276,  1.66462,  1.95776,  2.24934,  2.60229,  2.6777,
+  1.40086,  1.81618,  1.99446,  2.32596,  2.65178,  2.7173,
+  1.46605,  1.83456,  2.11857,  2.37243,  2.62538,  2.70468,
+  1.57886,  1.79094,  2.1361,  2.39283,  2.63855,  2.71402,
+  1.4807,  1.81656,  2.20645,  2.43239,  2.57589,  2.64511,
+  1.61729,  1.80766,  2.24172,  2.44007,  2.56723,  2.63175,
+  1.5701,  1.78507,  2.17821,  2.34813,  2.46705,  2.55664,
+  1.57968,  1.70153,  2.00519,  2.28877,  2.43415,  2.54859,
+  1.57869,  1.67421,  1.96547,  2.19945,  2.33487,  2.4798,
+  1.64055,  1.72692,  1.99161,  2.24034,  2.40097,  2.52363,
+  1.58853,  1.70967,  1.87442,  2.16082,  2.38152,  2.51723,
+  1.4475,  1.66548,  1.90094,  2.10338,  2.39787,  2.53557,
+  1.20302,  1.59921,  1.88428,  2.03226,  2.36901,  2.50474,
+  1.14652,  1.51319,  1.8805,  1.98579,  2.40738,  2.52248,
+  1.13127,  1.435,  1.83409,  2.11135,  2.30655,  2.53115,
+  1.17671,  1.64034,  1.87012,  2.06494,  2.313,  2.43912,
+  1.25449,  1.59061,  1.95849,  2.20017,  2.34427,  2.47982,
+  1.24396,  1.68449,  2.0165,  2.19295,  2.45108,  2.54733,
+  1.53731,  1.76385,  2.18864,  2.37173,  2.53993,  2.64808,
+  1.64654,  1.88757,  2.28095,  2.44345,  2.59307,  2.68077,
+  1.56746,  1.87617,  2.10871,  2.42783,  2.61173,  2.69136,
+  1.34106,  1.87413,  2.11422,  2.3962,  2.62123,  2.70277,
+  1.4492,  1.83784,  2.0584,  2.30747,  2.61691,  2.68969,
+  1.31349,  1.79435,  1.96106,  2.2375,  2.59774,  2.68519,
+  1.20218,  1.70691,  1.9051,  2.13915,  2.61289,  2.69366,
+  1.08034,  1.59049,  1.84652,  2.05928,  2.63137,  2.69738,
+  1.04322,  1.60191,  1.90035,  2.14104,  2.58835,  2.66252,
+  0.984957,  1.55615,  1.84148,  2.14877,  2.57734,  2.66295,
+  0.979403,  1.55384,  1.84417,  2.0526,  2.57775,  2.64111,
+  0.947313,  1.45389,  1.83646,  1.99878,  2.56655,  2.63755,
+  0.95946,  1.44168,  1.83287,  2.1065,  2.55364,  2.63088,
+  0.951016,  1.39788,  1.79374,  2.05307,  2.49264,  2.62257,
+  0.870727,  1.36922,  1.81779,  2.10748,  2.52423,  2.62794,
+  0.902872,  1.38516,  1.7548,  2.01343,  2.53699,  2.65482,
+  0.891101,  1.3624,  1.75358,  1.87804,  2.5598,  2.66247,
+  0.835616,  1.25933,  1.75717,  1.83234,  2.48635,  2.63568,
+  0.787419,  1.13204,  1.69397,  1.77693,  2.53318,  2.61631,
+  0.791106,  1.06813,  1.69774,  1.8516,  2.57196,  2.66955,
+  0.759951,  1.11236,  1.56236,  1.8552,  2.49068,  2.60197,
+  0.792061,  1.14,  1.72482,  1.95446,  2.60886,  2.68968,
+  0.823952,  1.27093,  1.74109,  2.07766,  2.6132,  2.66939,
+  0.736534,  1.12497,  1.74368,  2.09325,  2.57979,  2.66172,
+  0.797043,  1.05194,  1.78023,  2.24036,  2.58348,  2.66231,
+  0.923582,  1.50315,  1.77688,  2.01847,  2.61391,  2.70304,
+  1.42154,  1.73503,  2.00689,  2.21034,  2.57432,  2.67074,
+  1.35017,  1.60612,  1.96301,  2.08497,  2.47819,  2.58995,
+  1.3618,  1.65658,  1.97408,  2.17388,  2.47963,  2.61201,
+  1.31994,  1.76445,  2.02745,  2.24929,  2.52964,  2.63574,
+  1.39403,  1.6642,  2.00631,  2.24619,  2.55809,  2.67132,
+  1.38539,  1.75543,  2.08002,  2.32987,  2.63089,  2.72267,
+  1.33369,  1.66943,  2.02149,  2.25061,  2.60027,  2.6891,
+  1.34153,  1.69816,  1.975,  2.23711,  2.56085,  2.68438,
+  1.38861,  1.78505,  1.95689,  2.28139,  2.56358,  2.64371,
+  1.34589,  1.70624,  1.84298,  2.26416,  2.60622,  2.69479,
+  1.32033,  1.69419,  1.92336,  2.21815,  2.64548,  2.75026,
+  1.33239,  1.74839,  2.01472,  2.22178,  2.60263,  2.69746,
+  1.3976,  1.71535,  1.94972,  2.236,  2.5778,  2.66148,
+  1.61881,  1.79597,  2.01642,  2.20519,  2.50664,  2.63683,
+  1.65981,  1.73533,  2.02109,  2.17584,  2.44338,  2.64145,
+  1.53953,  1.65206,  1.94677,  2.09508,  2.44664,  2.63655,
+  1.53227,  1.59287,  1.97782,  2.05341,  2.55149,  2.67491,
+  1.50935,  1.58111,  2.00424,  2.05938,  2.5246,  2.70294,
+  1.43253,  1.50463,  1.93071,  2.04233,  2.44066,  2.69085,
+  1.19464,  1.67704,  2.0231,  2.07839,  2.44691,  2.74585,
+  1.21037,  1.82483,  2.02151,  2.13909,  2.53993,  2.65964,
+  1.27662,  1.71544,  1.95249,  2.08382,  2.47346,  2.66435,
+  1.23566,  1.54844,  2.06734,  2.11862,  2.42744,  2.72754,
+  1.28347,  1.3743,  1.96342,  2.09842,  2.47439,  2.70286,
+  1.30502,  1.3947,  2.068,  2.13904,  2.52017,  2.70621,
+  1.28482,  1.49431,  2.05521,  2.14033,  2.60212,  2.69883,
+  1.29659,  1.58772,  2.0872,  2.15656,  2.61856,  2.71863,
+  1.25247,  1.58335,  2.10888,  2.17387,  2.6005,  2.68503,
+  1.17744,  1.61204,  2.09388,  2.15517,  2.58107,  2.69512,
+  1.13296,  1.57299,  2.13546,  2.2206,  2.61573,  2.71057,
+  1.06032,  1.54298,  2.16575,  2.23041,  2.60944,  2.69779,
+  0.993306,  1.5422,  2.17075,  2.24721,  2.63117,  2.70689,
+  0.78375,  1.56854,  2.32332,  2.39888,  2.5942,  2.6906,
+  0.866024,  1.45443,  2.11329,  2.18704,  2.66201,  2.71994,
+  0.793002,  1.4377,  2.12567,  2.22555,  2.58888,  2.66479,
+  0.863183,  1.43983,  2.03195,  2.20395,  2.58648,  2.64689,
+  0.817301,  1.44308,  2.07874,  2.35666,  2.57215,  2.63532,
+  0.8402,  1.2682,  1.97396,  2.38069,  2.54674,  2.62412,
+  0.90591,  1.47285,  2.0008,  2.42018,  2.60601,  2.66254,
+  0.885218,  1.59913,  2.06396,  2.33538,  2.68875,  2.73625,
+  0.812099,  1.48097,  2.10316,  2.19363,  2.62136,  2.70211,
+  0.727009,  1.48128,  2.08817,  2.17056,  2.57558,  2.66056,
+  0.783755,  1.48208,  2.21077,  2.28199,  2.56464,  2.65808,
+  0.81089,  1.318,  2.15666,  2.25015,  2.56537,  2.66617,
+  0.775372,  1.35271,  2.27746,  2.37173,  2.58724,  2.65549,
+  0.765239,  1.28061,  2.22745,  2.3049,  2.57753,  2.69687,
+  0.860727,  1.30996,  2.23921,  2.35825,  2.52375,  2.68183,
+  0.828001,  1.15751,  2.1572,  2.2792,  2.55451,  2.65538,
+  0.776568,  1.131,  2.11047,  2.28237,  2.50224,  2.63453,
+  0.662804,  1.21065,  2.21449,  2.27527,  2.48015,  2.59817,
+  0.752595,  1.17213,  2.27025,  2.35479,  2.53437,  2.61343,
+  0.769014,  1.03754,  2.23985,  2.32019,  2.52388,  2.63727,
+  0.747299,  1.03652,  2.05988,  2.38032,  2.50772,  2.67777,
+  0.818428,  1.11045,  2.13257,  2.30679,  2.44267,  2.59784,
+  0.838124,  1.25603,  2.15252,  2.30408,  2.50108,  2.59185,
+  0.84274,  1.14734,  2.04509,  2.31707,  2.45929,  2.58847,
+  0.950977,  1.15093,  2.09764,  2.29,  2.49742,  2.64345,
+  0.932262,  1.15976,  1.94518,  2.23375,  2.53889,  2.63575,
+  0.87264,  1.29467,  1.88108,  2.11219,  2.48873,  2.6127,
+  0.953242,  1.39834,  1.90676,  2.02445,  2.39667,  2.61633,
+  1.01916,  1.44724,  1.91732,  2.02333,  2.21302,  2.5289,
+  0.98091,  1.42044,  1.85762,  1.94344,  2.29448,  2.59612,
+  1.00792,  1.47472,  1.82759,  1.92148,  2.56736,  2.64375,
+  1.05767,  1.58382,  1.86222,  1.98831,  2.50759,  2.60278,
+  1.08948,  1.61094,  1.8942,  2.06798,  2.40143,  2.58925,
+  1.15564,  1.60152,  1.85378,  2.10992,  2.26642,  2.65488,
+  1.19039,  1.40321,  1.85032,  2.12943,  2.35548,  2.59965,
+  1.16567,  1.26623,  1.84792,  2.19176,  2.35216,  2.57681,
+  1.11254,  1.23723,  1.75555,  2.19641,  2.37841,  2.5159,
+  1.0932,  1.22932,  1.63097,  2.19849,  2.39433,  2.49006,
+  1.03092,  1.16009,  1.537,  2.15027,  2.34576,  2.52617,
+  1.09013,  1.22746,  1.4703,  2.12166,  2.32569,  2.41426,
+  1.08419,  1.35343,  1.49577,  2.16541,  2.39664,  2.50153,
+  1.12869,  1.38014,  1.55146,  2.11031,  2.29686,  2.419,
+  1.08717,  1.45426,  1.65879,  2.02039,  2.1963,  2.38146,
+  1.03939,  1.58219,  1.7281,  2.07018,  2.30185,  2.48943,
+  1.01902,  1.64687,  1.82892,  2.12577,  2.54247,  2.62493,
+  1.01791,  1.67544,  2.00939,  2.20063,  2.43227,  2.53275,
+  0.975365,  1.56846,  2.09963,  2.24376,  2.46967,  2.55866,
+  1.04514,  1.75055,  2.09119,  2.27703,  2.474,  2.55964,
+  1.00349,  1.67,  2.14987,  2.21681,  2.54414,  2.59102,
+  0.972271,  1.66935,  2.06691,  2.25346,  2.52812,  2.62679,
+  1.0014,  1.91054,  2.2089,  2.32209,  2.47505,  2.59415,
+  1.10624,  1.7624,  2.17021,  2.36833,  2.53238,  2.63695,
+  0.937567,  1.5708,  2.20831,  2.31208,  2.5476,  2.60415,
+  0.984015,  1.53165,  2.15445,  2.2604,  2.51955,  2.62137,
+  1.05805,  1.58968,  2.13047,  2.23879,  2.55922,  2.636,
+  1.12629,  1.6743,  2.14238,  2.30438,  2.58199,  2.6598,
+  1.09217,  1.54725,  2.13885,  2.24696,  2.57092,  2.65374,
+  1.16415,  1.51357,  2.1206,  2.20304,  2.55593,  2.62912,
+  1.15444,  1.45166,  2.10988,  2.19379,  2.56938,  2.66869,
+  1.17101,  1.29755,  2.10579,  2.22429,  2.52972,  2.66324,
+  1.13937,  1.34334,  2.02494,  2.16127,  2.57005,  2.66206,
+  1.21497,  1.75949,  2.01362,  2.12671,  2.35066,  2.50893,
+  1.41044,  1.78736,  1.94045,  2.082,  2.25578,  2.40636,
+  1.19253,  1.69828,  1.95689,  2.08484,  2.23574,  2.49064,
+  1.17363,  1.44875,  2.01112,  2.14525,  2.28014,  2.53471,
+  1.1728,  1.32718,  1.93887,  2.09591,  2.24756,  2.52684,
+  1.12971,  1.37614,  1.89153,  1.98533,  2.19635,  2.58265,
+  1.19522,  1.29291,  1.88721,  2.02514,  2.2007,  2.52559,
+  1.24628,  1.33897,  1.85165,  2.07279,  2.20907,  2.45744,
+  1.24471,  1.39554,  1.91684,  2.09705,  2.29649,  2.52665,
+  1.34643,  1.45327,  2.12841,  2.31384,  2.56627,  2.66621,
+  1.39218,  1.50657,  2.06042,  2.18383,  2.52364,  2.65642,
+  1.39767,  1.47836,  2.03787,  2.14002,  2.52288,  2.63488,
+  1.40508,  1.43797,  2.0647,  2.12168,  2.48434,  2.66409,
+  1.52797,  1.73164,  2.0014,  2.18228,  2.47746,  2.60968,
+  1.60222,  1.69405,  2.06501,  2.17614,  2.56757,  2.65075,
+  1.54924,  1.66815,  2.06194,  2.13605,  2.57595,  2.67854,
+  1.59049,  1.69321,  1.92159,  2.19358,  2.52234,  2.65782,
+  1.59312,  1.7156,  2.05786,  2.17281,  2.50201,  2.60776,
+  1.50846,  1.71395,  2.05346,  2.14686,  2.38304,  2.62867,
+  1.50094,  1.57787,  1.97852,  2.08096,  2.51787,  2.64082,
+  1.50382,  1.5592,  1.93328,  2.0306,  2.51619,  2.6575,
+  1.43095,  1.50644,  1.85636,  2.01451,  2.40691,  2.5838,
+  1.39442,  1.47116,  1.91477,  2.01533,  2.41451,  2.56893,
+  1.37672,  1.47674,  1.84174,  1.96157,  2.45962,  2.55251,
+  1.30483,  1.50926,  1.80786,  1.89902,  2.5326,  2.61656,
+  1.48624,  1.64687,  1.92899,  2.17664,  2.50338,  2.64553,
+  1.47707,  1.57641,  1.9373,  2.09445,  2.46873,  2.64363,
+  1.43149,  1.55127,  1.93581,  2.02799,  2.46876,  2.60559,
+  1.42717,  1.67082,  1.94498,  2.10994,  2.48274,  2.65243,
+  1.39319,  1.64956,  1.99108,  2.07033,  2.58645,  2.66734,
+  1.40697,  1.51853,  1.96705,  2.06775,  2.50172,  2.62411,
+  1.39913,  1.48738,  1.88033,  1.97257,  2.35919,  2.60481,
+  1.41945,  1.54191,  1.92089,  2.01526,  2.41644,  2.54754,
+  1.44774,  1.62665,  1.9116,  2.03784,  2.5083,  2.60909,
+  1.50794,  1.64922,  1.95449,  2.06384,  2.51578,  2.59147,
+  1.51251,  1.69788,  1.91927,  2.07717,  2.54577,  2.63108,
+  1.57749,  1.65292,  1.96938,  2.05711,  2.5335,  2.61048,
+  1.60471,  1.68784,  1.94363,  2.0307,  2.55246,  2.65947,
+  1.63482,  1.71009,  1.94351,  2.03574,  2.55304,  2.65052,
+  1.62911,  1.72105,  1.90726,  2.02014,  2.5701,  2.65261,
+  1.65386,  1.73101,  1.91707,  2.0165,  2.55131,  2.67898,
+  1.67562,  1.74025,  1.92311,  1.99547,  2.54389,  2.69347,
+  1.70432,  1.761,  1.89209,  1.9586,  2.52034,  2.70958,
+  1.63175,  1.69802,  1.87977,  1.97482,  2.47504,  2.68871,
+  1.56339,  1.66235,  1.8635,  1.96166,  2.49207,  2.69214,
+  1.53527,  1.6218,  1.86452,  2.01688,  2.4572,  2.70145,
+  1.46363,  1.69,  1.94259,  2.01949,  2.51608,  2.68408,
+  1.42716,  1.54573,  1.9226,  1.98339,  2.54908,  2.72404,
+  1.38786,  1.46942,  1.87429,  2.04709,  2.48657,  2.64301,
+  1.36474,  1.46274,  1.90851,  2.07652,  2.46877,  2.62742,
+  1.42161,  1.61667,  2.07439,  2.24363,  2.60481,  2.69712,
+  1.44357,  1.80248,  2.14589,  2.31103,  2.61513,  2.70497,
+  1.40281,  1.86481,  2.20938,  2.37797,  2.65429,  2.73144,
+  1.47267,  1.8608,  2.16288,  2.44727,  2.64842,  2.71902,
+  1.5185,  1.79472,  2.07501,  2.33921,  2.5521,  2.65593,
+  1.5036,  1.75847,  2.11155,  2.30448,  2.551,  2.64355,
+  1.46676,  1.58771,  2.04614,  2.2766,  2.54651,  2.64991,
+  1.41461,  1.49916,  2.00069,  2.08085,  2.54908,  2.65441,
+  1.32462,  1.59742,  1.9617,  2.07526,  2.51879,  2.63826,
+  1.26245,  1.66607,  1.96155,  2.09827,  2.5491,  2.63037,
+  1.22087,  1.63212,  1.94765,  2.05495,  2.51597,  2.60756,
+  1.13665,  1.56914,  1.92325,  2.0114,  2.51398,  2.61292,
+  1.05857,  1.57058,  1.92127,  2.03797,  2.48449,  2.5695,
+  1.03982,  1.49237,  1.86238,  2.11332,  2.46263,  2.58629,
+  1.29165,  1.54669,  1.88843,  2.16034,  2.44457,  2.57368,
+  1.15415,  1.62983,  1.97872,  2.11452,  2.50541,  2.61617,
+  1.01899,  1.84423,  2.0035,  2.14564,  2.43005,  2.54966,
+  1.00364,  1.90025,  2.10397,  2.20081,  2.55527,  2.67887,
+  1.00718,  1.65253,  2.03338,  2.1179,  2.53436,  2.59384,
+  1.01407,  1.62531,  2.07357,  2.164,  2.54614,  2.61183,
+  1.00985,  1.72901,  2.00161,  2.19007,  2.55455,  2.63543,
+  1.01949,  1.59982,  2.06292,  2.18098,  2.58535,  2.65191,
+  1.04228,  1.55985,  2.06172,  2.18491,  2.60883,  2.71127,
+  1.09398,  1.6067,  2.06705,  2.17946,  2.57811,  2.64708,
+  1.11752,  1.5545,  2.01046,  2.17126,  2.52419,  2.60461,
+  1.18915,  1.68712,  2.02682,  2.22074,  2.58466,  2.6736,
+  1.18429,  1.59293,  2.01141,  2.14056,  2.57563,  2.65276,
+  1.24327,  1.54434,  1.99135,  2.10372,  2.54773,  2.63384,
+  1.2498,  1.53006,  1.93046,  2.04451,  2.4895,  2.61104,
+  1.31723,  1.55086,  1.92747,  2.01911,  2.56358,  2.63241,
+  1.30015,  1.5712,  1.81721,  1.96732,  2.57201,  2.65975,
+  1.30479,  1.45907,  1.80435,  1.8738,  2.57235,  2.67785,
+  1.27211,  1.38793,  1.71059,  1.79844,  2.51912,  2.63097,
+  1.16882,  1.27144,  1.68047,  1.84764,  2.47259,  2.63611,
+  1.12771,  1.38042,  1.70269,  1.94834,  2.2548,  2.51659,
+  1.03734,  1.36207,  1.69887,  1.94336,  2.31998,  2.57611,
+  0.912701,  1.21524,  1.77476,  2.05793,  2.4073,  2.60974,
+  0.884045,  1.28334,  1.74009,  2.01204,  2.33233,  2.53015,
+  0.859928,  1.36139,  1.78777,  2.03243,  2.43916,  2.5725,
+  0.933575,  1.49731,  1.86011,  2.00776,  2.46078,  2.63658,
+  0.980843,  1.37667,  1.80827,  1.8993,  2.55138,  2.66068,
+  0.888314,  1.39084,  1.81906,  1.9386,  2.61173,  2.7137,
+  0.839112,  1.45505,  1.86425,  1.93257,  2.56126,  2.64948,
+  0.851738,  1.63344,  1.85494,  2.0651,  2.59153,  2.63797,
+  0.927993,  1.73919,  1.88202,  2.1332,  2.58502,  2.64078,
+  0.938681,  1.79566,  1.96211,  2.13893,  2.56523,  2.6279,
+  0.939389,  1.84213,  2.02182,  2.19635,  2.61152,  2.65832,
+  0.876668,  1.92276,  2.0666,  2.23861,  2.65783,  2.70914,
+  0.92889,  1.83181,  2.05372,  2.20362,  2.65364,  2.69541,
+  0.843177,  1.78595,  2.18004,  2.25807,  2.59681,  2.66987,
+  0.90471,  1.73857,  2.04548,  2.17133,  2.65908,  2.70177,
+  0.870576,  1.67285,  2.04668,  2.1603,  2.66339,  2.70628,
+  0.863208,  1.61128,  2.03958,  2.13199,  2.66274,  2.71021,
+  0.911587,  1.52148,  1.97225,  2.1177,  2.67151,  2.73629,
+  0.857624,  1.50623,  1.92746,  2.09207,  2.599,  2.67135,
+  0.876724,  1.38621,  1.9301,  2.02012,  2.64025,  2.71571,
+  0.822485,  1.36308,  1.9511,  2.01209,  2.54628,  2.70422,
+  0.896312,  1.29923,  1.94615,  2.04,  2.42757,  2.66043,
+  0.993275,  1.37977,  2.00112,  2.08344,  2.47648,  2.62108,
+  1.11197,  1.36926,  1.98057,  2.05008,  2.51842,  2.65472,
+  1.16821,  1.42116,  1.92965,  2.01373,  2.5139,  2.65946,
+  1.18553,  1.47731,  1.9417,  2.02179,  2.54584,  2.63683,
+  1.13468,  1.49839,  1.99686,  2.07705,  2.4871,  2.60596,
+  1.41173,  1.50081,  1.93056,  2.25169,  2.39141,  2.51475,
+  1.3871,  1.55163,  1.93927,  2.13443,  2.39065,  2.5381,
+  1.43647,  1.60163,  1.85631,  2.00172,  2.49843,  2.57968,
+  1.49076,  1.67386,  1.86537,  2.01526,  2.49094,  2.5896,
+  1.53229,  1.66582,  1.85411,  1.98779,  2.54431,  2.63455,
+  1.56314,  1.68325,  1.81921,  1.98134,  2.5924,  2.65599,
+  1.53269,  1.64287,  1.79509,  1.95595,  2.59557,  2.68867,
+  1.50694,  1.59687,  1.72472,  1.90252,  2.49715,  2.64677,
+  1.38523,  1.5533,  1.73378,  1.99349,  2.38568,  2.62019,
+  1.19137,  1.50809,  1.91412,  2.17718,  2.46035,  2.60064,
+  0.990202,  1.26842,  1.7603,  1.98849,  2.51666,  2.66102,
+  1.00489,  1.27303,  1.91958,  1.97696,  2.62153,  2.71115,
+  1.01329,  1.47917,  1.98377,  2.02111,  2.56129,  2.68139,
+  1.09438,  1.4242,  1.985,  2.16479,  2.59214,  2.67097,
+  1.05777,  1.37751,  1.86611,  2.16542,  2.49067,  2.62334,
+  1.00177,  1.3213,  1.90229,  2.13388,  2.49989,  2.65935,
+  0.896048,  1.41478,  1.92755,  2.1276,  2.57065,  2.6585,
+  0.862503,  1.58697,  1.94655,  2.15362,  2.61512,  2.67787,
+  0.837783,  1.70001,  1.93298,  2.20945,  2.58857,  2.68753,
+  0.901209,  1.63977,  1.99997,  2.07058,  2.5153,  2.76315,
+  0.955829,  1.60125,  2.00897,  2.11223,  2.50389,  2.59284,
+  0.939285,  1.70409,  2.02741,  2.12592,  2.43001,  2.53892,
+  0.948268,  1.70087,  2.00277,  2.08835,  2.56347,  2.62211,
+  0.959154,  1.62427,  2.00582,  2.07776,  2.57772,  2.65873,
+  0.932538,  1.59344,  1.95283,  2.04466,  2.56798,  2.6445,
+  0.933107,  1.59056,  1.9457,  2.1119,  2.53428,  2.60887,
+  0.943808,  1.64909,  1.89702,  2.10465,  2.57817,  2.68976,
+  1.00303,  1.61916,  1.93023,  2.21672,  2.58234,  2.63789,
+  0.93681,  1.69235,  1.96553,  2.11865,  2.62852,  2.6848,
+  0.973578,  1.73782,  1.97567,  2.10634,  2.65829,  2.72245,
+  0.955324,  1.75019,  1.96144,  2.07537,  2.65561,  2.73176,
+  0.994013,  1.72739,  1.94678,  2.06241,  2.64338,  2.73849,
+  1.00536,  1.69392,  1.92987,  2.10018,  2.61875,  2.68486,
+  0.967862,  1.64008,  1.93026,  2.02155,  2.63989,  2.72666,
+  0.928258,  1.57936,  1.86441,  1.97301,  2.63891,  2.71789,
+  1.05833,  1.41059,  1.87085,  2.06602,  2.45158,  2.6337,
+  1.12305,  1.48688,  1.86297,  2.08608,  2.41298,  2.59174,
+  1.17747,  1.43154,  1.84929,  2.09976,  2.42334,  2.56613,
+  1.18703,  1.44351,  1.88207,  1.98332,  2.55067,  2.63939,
+  1.26797,  1.62839,  1.93261,  2.04328,  2.55223,  2.64173,
+  1.35555,  1.70156,  1.92424,  2.03456,  2.59018,  2.66096,
+  1.47206,  1.73998,  1.91426,  2.05233,  2.57389,  2.64493,
+  1.46149,  1.79066,  1.91131,  2.05787,  2.5256,  2.58723,
+  1.54235,  1.7424,  1.90165,  2.06306,  2.49917,  2.58066,
+  1.55081,  1.6429,  1.87739,  1.99515,  2.47436,  2.56117,
+  1.62535,  1.72476,  1.89911,  2.05259,  2.44709,  2.55685,
+  1.6367,  1.7422,  1.90449,  2.15532,  2.47031,  2.56929,
+  1.60869,  1.70103,  1.95711,  2.08558,  2.46532,  2.5522,
+  1.51757,  1.68517,  1.92305,  2.02897,  2.3829,  2.50393,
+  1.21585,  1.64813,  1.84289,  2.04997,  2.39383,  2.48435,
+  1.1585,  1.45299,  1.75267,  1.85902,  2.46727,  2.57552,
+  1.12827,  1.38415,  1.8015,  1.89918,  2.47245,  2.60999,
+  1.08062,  1.41434,  1.81249,  1.91664,  2.42269,  2.62012,
+  1.10487,  1.49291,  1.85404,  1.97194,  2.444,  2.58358,
+  1.23581,  1.43782,  1.91948,  2.04279,  2.484,  2.61715,
+  1.16741,  1.4076,  1.77439,  2.07357,  2.3906,  2.54332,
+  1.09657,  1.31723,  1.78221,  2.01354,  2.39437,  2.57181,
+  1.10431,  1.2068,  1.71858,  2.00101,  2.35134,  2.50564,
+  1.04732,  1.31689,  1.82432,  2.05077,  2.41716,  2.53103,
+  1.08718,  1.4084,  1.84314,  2.03167,  2.44048,  2.54426,
+  1.10852,  1.3942,  1.76003,  2.00573,  2.43503,  2.55215,
+  1.12177,  1.34059,  1.7495,  1.96363,  2.49382,  2.60964,
+  1.12241,  1.45271,  1.79313,  2.03041,  2.50213,  2.59324,
+  1.02688,  1.4681,  1.74534,  1.86047,  2.48368,  2.57975,
+  0.97167,  1.24409,  1.75298,  1.83733,  2.38472,  2.62532,
+  0.917302,  1.10441,  1.67493,  1.79243,  2.33619,  2.62947,
+  0.96156,  1.08836,  1.55578,  1.66371,  2.28232,  2.57975,
+  0.919563,  1.06328,  1.5732,  1.7111,  2.42269,  2.67598,
+  0.875889,  1.02261,  1.38084,  1.82916,  2.58466,  2.66738,
+  0.763749,  1.01881,  1.50632,  1.70798,  2.47153,  2.59587,
+  0.886944,  1.03139,  1.42506,  1.71002,  2.42792,  2.57639,
+  0.890351,  1.03765,  1.44399,  1.58788,  2.52021,  2.69583,
+  0.906256,  1.03505,  1.40561,  1.52374,  2.53653,  2.59608,
+  0.929418,  1.06107,  1.15709,  1.5666,  2.52826,  2.69407,
+  0.917396,  1.10612,  1.25304,  1.38951,  2.55157,  2.7091,
+  0.91023,  1.04207,  1.16253,  1.36213,  2.39308,  2.60535,
+  0.804288,  1.05959,  1.41808,  1.53036,  2.41057,  2.66344,
+  0.907675,  1.04629,  1.39254,  1.50823,  2.49535,  2.69234,
+  0.835212,  1.12687,  1.3505,  1.46321,  2.56773,  2.69467,
+  0.770295,  1.1507,  1.42826,  1.60117,  2.61023,  2.68367,
+  0.924536,  1.07541,  1.46853,  1.66987,  2.54368,  2.6932,
+  0.972382,  1.19176,  1.54476,  1.63867,  2.53532,  2.64297,
+  0.903877,  1.10193,  1.51078,  1.60266,  2.48704,  2.63827,
+  0.881279,  1.0969,  1.55425,  1.6443,  2.42466,  2.55757,
+  0.866115,  1.11888,  1.60304,  1.70247,  2.5439,  2.6493,
+  0.906645,  1.16025,  1.67202,  1.74726,  2.51791,  2.65086,
+  0.861085,  1.20586,  1.66099,  1.84709,  2.46274,  2.63203,
+  0.837175,  1.18778,  1.80604,  1.8895,  2.50861,  2.68456,
+  0.797709,  1.17852,  1.90318,  2.02165,  2.54618,  2.69007,
+  0.802875,  1.26275,  1.92394,  2.00058,  2.56844,  2.67011,
+  0.766638,  1.32083,  1.96102,  2.05894,  2.58231,  2.64672,
+  0.811579,  1.45519,  2.01148,  2.08478,  2.54842,  2.63993,
+  0.82977,  1.48496,  2.05271,  2.12723,  2.53064,  2.60818,
+  0.799011,  1.56745,  2.15563,  2.26511,  2.57317,  2.6685,
+  0.730379,  1.35861,  2.12579,  2.19459,  2.5187,  2.60543,
+  0.720667,  1.27784,  2.04281,  2.11192,  2.5928,  2.6753,
+  0.777663,  1.1637,  2.06679,  2.1792,  2.57,  2.67551,
+  0.839969,  1.37318,  2.18588,  2.30468,  2.50936,  2.60258,
+  0.815752,  1.91522,  2.23363,  2.28848,  2.56998,  2.62843,
+  1.19188,  1.94569,  2.17513,  2.29905,  2.52352,  2.63204,
+  1.03628,  1.74221,  2.07271,  2.14156,  2.57319,  2.64155,
+  1.04251,  1.30305,  2.01289,  2.15461,  2.53068,  2.64918,
+  1.10994,  1.20424,  1.92869,  2.05823,  2.3841,  2.63957,
+  1.18739,  1.2877,  1.95425,  2.07126,  2.38256,  2.64181,
+  1.23919,  1.32776,  1.93055,  2.01528,  2.36169,  2.6275,
+  1.29208,  1.35198,  1.93801,  2.01732,  2.4115,  2.66343,
+  1.30624,  1.3824,  1.91845,  2.03831,  2.33939,  2.63774,
+  1.33024,  1.40164,  1.87376,  1.99044,  2.1855,  2.51091,
+  1.35639,  1.45976,  1.88339,  1.98046,  2.26455,  2.54181,
+  1.3474,  1.43864,  1.89167,  2.01801,  2.30257,  2.64381,
+  1.30088,  1.39017,  1.88927,  1.97293,  2.33752,  2.60564,
+  1.31867,  1.41012,  1.89535,  1.99037,  2.38468,  2.65404,
+  1.30927,  1.4255,  1.96615,  2.0219,  2.50112,  2.69851,
+  1.29385,  1.37092,  1.90844,  1.99915,  2.46548,  2.674,
+  1.2774,  1.38284,  2.0023,  2.06684,  2.49685,  2.66407,
+  1.24538,  1.42244,  2.00291,  2.07072,  2.55684,  2.66639,
+  1.27259,  1.49109,  2.0123,  2.12924,  2.56231,  2.65743,
+  1.26518,  1.53394,  2.02094,  2.09309,  2.49838,  2.63095,
+  1.2657,  1.47703,  2.10301,  2.19653,  2.45528,  2.61989,
+  1.2885,  1.64245,  2.09385,  2.24783,  2.56169,  2.65879,
+  1.41026,  1.82897,  2.17187,  2.37413,  2.56459,  2.65338,
+  1.35389,  1.71004,  2.20933,  2.42604,  2.62932,  2.70219,
+  1.41361,  1.76693,  2.13772,  2.43485,  2.63206,  2.70291,
+  1.45905,  1.70694,  2.13508,  2.37703,  2.62642,  2.70895,
+  1.49802,  1.68792,  2.09482,  2.34295,  2.55878,  2.6657,
+  1.41391,  1.58827,  2.08673,  2.29308,  2.51359,  2.64213,
+  1.4,  1.55334,  1.93877,  2.18387,  2.45866,  2.61041,
+  1.37352,  1.44979,  1.8806,  2.07984,  2.29824,  2.55977,
+  1.36754,  1.44075,  1.97377,  2.08607,  2.33911,  2.62191,
+  1.36884,  1.46082,  2.00605,  2.12979,  2.39152,  2.65052,
+  1.37599,  1.49624,  2.05005,  2.13085,  2.45392,  2.69863,
+  1.34057,  1.48416,  2.08413,  2.14094,  2.54992,  2.68543,
+  1.38997,  1.55301,  2.06378,  2.14798,  2.59226,  2.70382,
+  1.24745,  1.50338,  2.0443,  2.13649,  2.34449,  2.59917,
+  1.31511,  1.54085,  2.02833,  2.11633,  2.27254,  2.43155,
+  1.29883,  1.58749,  2.07193,  2.18587,  2.33569,  2.50078,
+  1.29366,  1.56243,  2.0311,  2.14961,  2.40817,  2.51729,
+  1.35755,  1.5133,  1.99809,  2.15305,  2.45046,  2.5838,
+  1.31441,  1.51742,  2.07946,  2.17944,  2.52229,  2.6162,
+  1.23775,  1.51356,  2.05223,  2.18107,  2.53904,  2.62816,
+  1.20856,  1.48604,  2.0465,  2.19467,  2.48998,  2.63667,
+  1.19657,  1.46249,  2.07314,  2.23086,  2.54763,  2.7006,
+  1.08094,  1.45943,  2.1105,  2.21771,  2.53813,  2.67835,
+  1.09448,  1.37861,  2.16788,  2.24618,  2.56793,  2.69132,
+  0.942435,  1.46334,  2.25353,  2.33078,  2.53848,  2.62677,
+  0.828468,  1.39017,  2.15232,  2.21803,  2.54527,  2.62149,
+  0.883311,  1.3342,  2.09482,  2.19126,  2.47558,  2.57346,
+  0.863185,  1.41868,  2.08049,  2.16638,  2.5561,  2.71409,
+  0.84852,  1.39108,  2.04932,  2.13419,  2.70254,  2.78082,
+  0.826225,  1.37358,  2.03739,  2.12058,  2.73609,  2.78259,
+  0.823246,  1.34385,  2.03389,  2.1118,  2.74087,  2.78707,
+  0.833848,  1.33679,  2.04545,  2.11801,  2.69961,  2.79618,
+  0.811654,  1.32134,  2.09499,  2.17812,  2.49423,  2.6499,
+  0.947528,  1.36115,  2.12785,  2.21901,  2.51138,  2.66819,
+  0.875759,  1.25161,  2.13342,  2.24175,  2.47382,  2.66293,
+  0.933534,  1.44844,  2.13913,  2.24451,  2.48676,  2.60694,
+  0.945109,  1.2808,  2.20894,  2.33506,  2.51132,  2.61453,
+  0.956935,  1.37124,  2.1072,  2.19452,  2.40325,  2.57303,
+  0.981,  1.25193,  2.14796,  2.2666,  2.44042,  2.62437,
+  1.06161,  1.23169,  2.07602,  2.2334,  2.4386,  2.63699,
+  1.01887,  1.35404,  1.99803,  2.26008,  2.44314,  2.55477,
+  1.0803,  1.30189,  2.03463,  2.1456,  2.41506,  2.59122,
+  1.13387,  1.35976,  2.06395,  2.16463,  2.43939,  2.62866,
+  1.12504,  1.41413,  1.99754,  2.10372,  2.39242,  2.59958,
+  1.16727,  1.39356,  1.99818,  2.07648,  2.44178,  2.64329,
+  1.1987,  1.42119,  1.96798,  2.05702,  2.43282,  2.64507,
+  1.25623,  1.37807,  1.94185,  2.01933,  2.44458,  2.60885,
+  1.29557,  1.41215,  1.93241,  2.00835,  2.43005,  2.64902,
+  1.28135,  1.46452,  1.88824,  2.00652,  2.42528,  2.6352,
+  1.27058,  1.4067,  1.90119,  1.96929,  2.47098,  2.6479,
+  1.2667,  1.37289,  1.87181,  1.95759,  2.41497,  2.64862,
+  1.19439,  1.35174,  1.88825,  1.97809,  2.40086,  2.66266,
+  1.19887,  1.29984,  1.86428,  1.96365,  2.36279,  2.61951,
+  1.12658,  1.2401,  1.90254,  1.99765,  2.33143,  2.60863,
+  1.10462,  1.21418,  1.87979,  2.01431,  2.25166,  2.57337,
+  1.02429,  1.19321,  1.86892,  2.12788,  2.37601,  2.62345,
+  1.00036,  1.23021,  1.9603,  2.07524,  2.32935,  2.58413,
+  0.977548,  1.32199,  1.98875,  2.10426,  2.38103,  2.60792,
+  0.927608,  1.44792,  2.02789,  2.12301,  2.47848,  2.58588,
+  0.887733,  1.51653,  2.0469,  2.15389,  2.48052,  2.58201,
+  0.898681,  1.56475,  2.09153,  2.17965,  2.57394,  2.67678,
+  0.974718,  1.50086,  2.08197,  2.17778,  2.53228,  2.63499,
+  1.02382,  1.39064,  2.06059,  2.14203,  2.46939,  2.63691,
+  1.10658,  1.43105,  1.97713,  2.09715,  2.47169,  2.65912,
+  1.20126,  1.48566,  1.94465,  2.11254,  2.50025,  2.66593,
+  1.28569,  1.52066,  1.91106,  2.04425,  2.48771,  2.6658,
+  1.36249,  1.53479,  1.91055,  1.99094,  2.50571,  2.66153,
+  1.43459,  1.51484,  1.93419,  2.01741,  2.50153,  2.69388,
+  1.42084,  1.51949,  1.90935,  1.98665,  2.4604,  2.68819,
+  1.40441,  1.46981,  1.96429,  2.05423,  2.36679,  2.65527,
+  1.38829,  1.46691,  1.96405,  2.05895,  2.28653,  2.60493,
+  1.368,  1.43481,  1.8577,  2.00712,  2.19658,  2.60419,
+  1.30084,  1.38054,  1.74025,  2.04689,  2.23523,  2.52191,
+  1.2313,  1.3216,  1.86723,  2.14763,  2.35463,  2.57914,
+  1.15492,  1.2559,  1.93232,  2.16437,  2.39283,  2.60599,
+  1.09866,  1.20222,  1.94827,  2.15016,  2.4926,  2.62574,
+  1.05746,  1.22185,  1.86913,  2.26883,  2.45654,  2.58036,
+  1.03308,  1.1501,  1.70887,  2.26488,  2.47604,  2.56361,
+  0.988998,  1.15927,  1.96203,  2.30271,  2.44872,  2.56072,
+  1.02842,  1.22869,  2.02591,  2.26037,  2.56185,  2.66176,
+  0.93486,  1.34821,  2.05389,  2.21474,  2.5253,  2.64771,
+  0.91915,  1.26456,  2.06814,  2.1834,  2.53498,  2.64432,
+  0.975247,  1.36223,  2.05215,  2.23142,  2.5828,  2.72448,
+  0.954336,  1.31118,  1.97737,  2.23816,  2.47811,  2.61705,
+  0.941853,  1.33598,  1.97642,  2.21901,  2.57949,  2.7143,
+  0.928694,  1.36645,  1.88488,  2.18315,  2.58056,  2.65759,
+  0.986067,  1.33837,  1.95432,  2.18786,  2.56652,  2.63883,
+  0.912646,  1.2844,  1.81414,  2.17507,  2.55393,  2.63852,
+  0.968965,  1.3105,  1.83969,  2.07808,  2.59033,  2.66057,
+  0.977192,  1.30463,  1.88095,  2.12702,  2.59804,  2.71211,
+  1.02384,  1.29962,  1.94471,  2.10378,  2.62592,  2.7309,
+  1.11021,  1.28631,  1.95938,  2.05397,  2.56459,  2.67613,
+  1.02814,  1.32424,  1.97674,  2.09494,  2.5862,  2.75473,
+  1.1298,  1.26991,  2.01187,  2.10922,  2.5889,  2.69654,
+  1.05697,  1.34048,  2.01617,  2.10555,  2.55761,  2.74716,
+  1.0375,  1.25577,  2.02939,  2.13619,  2.51178,  2.70963,
+  1.00616,  1.41717,  2.07195,  2.13261,  2.5439,  2.70196,
+  1.13696,  1.41621,  2.05034,  2.11204,  2.44967,  2.6952,
+  1.13532,  1.43627,  2.08385,  2.19492,  2.38638,  2.65693,
+  1.09407,  1.38546,  2.01516,  2.11333,  2.3201,  2.64153,
+  1.02593,  1.36065,  1.8783,  1.98146,  2.12804,  2.45894,
+  1.14275,  1.41616,  1.90101,  2.05488,  2.17021,  2.45905,
+  1.09321,  1.48838,  1.80138,  2.07358,  2.20343,  2.49483,
+  1.16124,  1.26326,  1.78481,  2.0712,  2.19458,  2.43622,
+  1.01079,  1.14118,  1.72817,  2.11872,  2.25127,  2.42633,
+  1.0838,  1.27598,  1.88843,  2.06839,  2.22746,  2.51111,
+  1.09382,  1.3034,  1.92409,  2.18396,  2.34853,  2.5317,
+  1.40987,  1.54006,  1.72233,  2.04991,  2.23569,  2.38925,
+  1.4666,  1.61703,  1.81939,  2.03581,  2.43973,  2.54332,
+  1.52688,  1.81173,  1.92615,  2.1292,  2.48147,  2.55606,
+  1.42046,  1.73161,  1.92536,  2.08112,  2.47445,  2.57028,
+  1.24837,  1.46252,  1.69927,  1.90711,  2.35535,  2.4848,
+  1.18322,  1.55816,  1.64662,  1.99981,  2.37407,  2.4616,
+  1.14384,  1.51329,  1.67569,  1.90675,  2.42836,  2.51879,
+  1.06699,  1.50005,  1.66753,  1.96146,  2.4459,  2.52156,
+  1.04665,  1.52076,  1.70516,  1.87838,  2.45976,  2.53273,
+  1.01371,  1.55953,  1.73753,  1.95585,  2.43782,  2.51586,
+  1.02195,  1.58688,  1.73703,  1.92918,  2.52364,  2.57788,
+  0.942307,  1.57915,  1.7761,  2.06027,  2.43722,  2.51765,
+  0.914226,  1.64208,  1.8128,  2.00109,  2.50851,  2.57006,
+  0.952017,  1.68807,  1.93502,  2.01615,  2.44679,  2.56358,
+  0.85628,  1.69751,  1.90273,  2.01269,  2.52241,  2.5844,
+  0.891878,  1.55315,  1.9355,  2.04697,  2.53266,  2.59497,
+  0.845424,  1.60229,  1.93772,  2.02752,  2.58302,  2.64917,
+  0.876501,  1.71662,  1.93957,  2.06754,  2.58826,  2.62536,
+  0.901014,  1.86437,  1.97892,  2.07519,  2.46267,  2.6098,
+  0.911677,  1.76785,  1.94779,  2.07258,  2.59574,  2.63495,
+  0.937394,  1.70873,  1.92774,  2.05461,  2.57411,  2.64743,
+  1.00365,  1.61461,  1.94206,  2.03598,  2.59201,  2.66472,
+  1.08941,  1.56371,  1.91069,  1.97496,  2.59091,  2.68182,
+  1.1802,  1.45723,  1.84084,  1.92159,  2.57341,  2.65935,
+  1.23938,  1.44428,  1.81891,  1.89387,  2.5596,  2.65742,
+  1.37732,  1.52899,  1.7449,  1.86222,  2.59116,  2.66907,
+  1.5049,  1.58946,  1.77776,  1.88723,  2.50621,  2.61775,
+  1.62841,  1.69744,  1.8306,  1.95757,  2.49541,  2.65298,
+  1.65534,  1.72676,  1.91445,  2.04295,  2.58971,  2.65897,
+  1.69817,  1.75401,  1.96719,  2.09043,  2.60271,  2.67713,
+  1.6763,  1.76771,  2.04285,  2.15667,  2.62832,  2.69069,
+  1.72497,  1.78993,  2.02225,  2.13845,  2.57623,  2.67177,
+  1.74819,  1.80267,  2.03778,  2.18025,  2.54251,  2.63895,
+  1.72749,  1.82059,  1.98449,  2.15907,  2.52527,  2.64111,
+  1.68116,  1.82095,  1.9757,  2.15738,  2.4858,  2.59041,
+  1.69559,  1.80719,  1.99368,  2.18089,  2.38033,  2.56086,
+  1.70693,  1.8107,  2.00812,  2.1331,  2.42075,  2.64175,
+  1.65458,  1.76573,  2.02476,  2.12403,  2.49348,  2.66085,
+  1.48228,  1.84953,  2.03934,  2.24048,  2.45722,  2.54777,
+  1.60391,  1.83254,  2.0516,  2.25163,  2.46114,  2.56041,
+  1.61191,  1.78732,  2.13446,  2.25032,  2.62094,  2.67828,
+  1.70226,  1.85766,  2.09357,  2.24578,  2.63356,  2.6878,
+  1.69236,  1.77625,  2.02619,  2.27536,  2.58055,  2.68324,
+  1.58711,  1.7503,  1.99794,  2.24207,  2.58654,  2.69145,
+  1.53555,  1.76534,  2.05361,  2.23362,  2.64673,  2.71788,
+  1.18962,  1.33679,  1.76375,  2.00182,  2.43607,  2.59429,
+  1.19096,  1.32263,  1.6625,  2.02854,  2.34741,  2.53098,
+  1.17093,  1.39469,  1.72743,  2.02281,  2.38266,  2.5526,
+  1.0828,  1.38331,  1.62323,  1.82565,  2.46313,  2.57449,
+  1.05886,  1.31642,  1.61784,  1.7344,  2.49668,  2.60735,
+  1.03174,  1.33271,  1.53473,  1.70742,  2.43327,  2.54421,
+  1.09663,  1.40593,  1.54058,  1.71992,  2.50965,  2.57321,
+  1.08814,  1.38193,  1.50722,  1.61855,  2.48411,  2.61844,
+  1.12836,  1.34181,  1.49417,  1.71555,  2.49597,  2.57986,
+  1.17504,  1.36011,  1.5729,  1.75716,  2.48116,  2.58891,
+  1.25184,  1.38829,  1.58041,  1.74429,  2.53023,  2.61428,
+  1.31074,  1.44427,  1.65725,  1.82349,  2.51511,  2.6146,
+  1.32959,  1.48366,  1.70393,  1.87146,  2.53237,  2.62192,
+  1.36465,  1.5031,  1.75584,  1.91903,  2.54748,  2.62441,
+  1.40014,  1.51678,  1.80865,  1.94381,  2.57234,  2.65555,
+  1.40394,  1.53678,  1.85457,  1.96117,  2.52777,  2.65014,
+  1.44164,  1.5349,  1.87363,  1.97075,  2.52812,  2.67083,
+  1.44861,  1.52867,  1.86098,  1.95195,  2.47324,  2.65781,
+  1.45162,  1.54784,  1.82415,  2.01998,  2.46245,  2.6541,
+  1.47491,  1.54848,  1.89089,  1.99547,  2.48461,  2.65999,
+  1.43235,  1.54152,  1.88892,  2.0602,  2.40709,  2.63044,
+  1.44374,  1.52979,  1.8927,  1.99659,  2.3738,  2.62098,
+  1.37922,  1.48973,  1.89736,  2.01674,  2.41678,  2.6275,
+  1.37707,  1.46312,  1.91165,  2.02262,  2.35539,  2.60865,
+  1.3318,  1.43104,  1.92917,  2.0469,  2.37404,  2.605,
+  1.26139,  1.44854,  1.97546,  2.08252,  2.36686,  2.6208,
+  1.22253,  1.41897,  1.97979,  2.11631,  2.43959,  2.66463,
+  1.14294,  1.30444,  1.9845,  2.07136,  2.47308,  2.67295,
+  1.16307,  1.26852,  1.93044,  2.0463,  2.3051,  2.59445,
+  1.10251,  1.24609,  1.95173,  2.10327,  2.29978,  2.57198,
+  1.01057,  1.14733,  1.90254,  2.04624,  2.28802,  2.567,
+  1.01047,  1.307,  1.82765,  2.07687,  2.33326,  2.55597,
+  1.24634,  1.53463,  1.85908,  2.18799,  2.38807,  2.54162,
+  1.20049,  1.57894,  1.89923,  2.16502,  2.44888,  2.58318,
+  0.969958,  1.32117,  1.8792,  2.16627,  2.41795,  2.60245,
+  0.883738,  1.35958,  2.00452,  2.10073,  2.51698,  2.63339,
+  0.844286,  1.40555,  2.05705,  2.14052,  2.51643,  2.66006,
+  0.862435,  1.50233,  2.10741,  2.20516,  2.55819,  2.66049,
+  0.940459,  1.42824,  2.13982,  2.23332,  2.56448,  2.67376,
+  0.930987,  1.58398,  2.0219,  2.15239,  2.40404,  2.50634,
+  1.04656,  1.79826,  1.98842,  2.12929,  2.35758,  2.45354,
+  1.05348,  1.59375,  2.10433,  2.23268,  2.37281,  2.49815,
+  1.13765,  1.64278,  2.08915,  2.23181,  2.38316,  2.57557,
+  1.18078,  1.89984,  2.11471,  2.22334,  2.45315,  2.55491,
+  1.14477,  1.7958,  2.05817,  2.1941,  2.45214,  2.55875,
+  1.13255,  1.6883,  1.98025,  2.10745,  2.32195,  2.44657,
+  1.15584,  1.527,  1.95125,  2.10187,  2.26567,  2.42326,
+  1.21899,  1.55188,  1.97893,  2.1295,  2.36524,  2.54789,
+  1.26996,  1.59283,  1.9574,  2.05925,  2.47736,  2.62007,
+  1.30477,  1.59715,  1.97427,  2.08441,  2.41441,  2.61344,
+  1.30461,  1.64552,  1.9768,  2.10058,  2.36447,  2.5106,
+  1.35745,  1.72162,  2.01397,  2.14179,  2.38518,  2.51214,
+  1.33572,  1.83391,  2.00127,  2.15585,  2.40144,  2.4961,
+  1.3114,  1.55829,  1.93876,  2.06328,  2.30727,  2.52662,
+  1.36036,  1.44076,  1.89358,  2.07531,  2.23753,  2.5046,
+  1.3316,  1.46849,  1.9289,  2.06096,  2.31803,  2.56782,
+  1.31861,  1.5376,  1.92447,  2.01519,  2.35881,  2.59331,
+  1.21436,  1.54619,  1.8821,  1.99525,  2.37793,  2.65294,
+  1.29633,  1.56653,  1.87514,  2.00328,  2.47632,  2.63153,
+  1.39778,  1.58615,  1.86148,  2.03011,  2.58706,  2.65465,
+  1.47524,  1.6442,  1.91588,  2.04703,  2.65327,  2.71442,
+  1.52474,  1.71602,  1.95782,  2.06765,  2.6237,  2.69024,
+  1.57869,  1.67781,  1.94092,  2.06678,  2.61383,  2.70458,
+  1.55866,  1.70253,  1.93011,  2.02827,  2.61505,  2.68653,
+  1.5009,  1.6999,  1.90892,  1.99874,  2.62063,  2.69128,
+  1.44295,  1.70267,  1.90099,  1.97533,  2.62473,  2.69924,
+  1.37288,  1.63829,  1.91771,  2.02829,  2.62618,  2.69745,
+  1.28422,  1.65621,  1.89785,  1.99256,  2.64442,  2.70738,
+  1.20404,  1.65182,  1.88977,  1.99256,  2.63849,  2.70958,
+  1.1492,  1.62207,  1.88451,  1.97925,  2.63269,  2.69924,
+  1.13373,  1.61863,  1.89504,  1.97754,  2.62505,  2.69488,
+  1.15757,  1.66233,  1.88978,  1.97839,  2.62603,  2.68454,
+  1.21894,  1.6671,  1.87906,  2.00517,  2.60227,  2.65813,
+  1.22423,  1.62686,  1.79198,  1.89465,  2.51764,  2.64787,
+  1.35435,  1.55876,  1.84308,  1.93089,  2.57122,  2.63086,
+  1.33953,  1.59509,  1.76225,  1.97927,  2.54602,  2.6132,
+  1.38922,  1.59242,  1.85964,  1.96212,  2.55095,  2.63771,
+  1.44127,  1.59043,  1.87939,  1.98705,  2.58201,  2.66674,
+  1.43103,  1.60981,  1.89027,  2.03787,  2.52504,  2.67206,
+  1.46838,  1.57542,  1.94585,  2.02987,  2.55147,  2.70532,
+  1.45009,  1.60143,  1.9541,  2.0628,  2.53413,  2.66697,
+  1.48217,  1.56544,  1.97359,  2.12415,  2.52021,  2.65602,
+  1.42942,  1.56017,  1.98437,  2.07841,  2.51093,  2.66835,
+  1.44091,  1.58793,  1.97609,  2.09796,  2.46414,  2.62167,
+  1.43247,  1.58261,  1.97335,  2.15993,  2.50051,  2.66833,
+  1.4291,  1.59392,  1.97481,  2.07021,  2.52705,  2.68379,
+  1.37725,  1.57105,  1.93703,  2.09434,  2.48861,  2.65319,
+  1.48527,  1.57272,  1.93552,  2.01586,  2.47189,  2.68702,
+  1.47361,  1.56926,  1.87262,  1.96288,  2.4128,  2.65437,
+  1.48606,  1.58025,  1.86625,  1.97554,  2.31875,  2.58671,
+  1.46521,  1.58112,  1.78499,  1.91302,  2.17248,  2.55592,
+  1.43366,  1.56634,  1.72851,  1.85326,  2.06197,  2.41395,
+  1.36761,  1.54384,  1.70007,  1.85497,  2.03462,  2.28202,
+  1.50326,  1.65718,  1.80936,  1.93767,  2.14319,  2.43561,
+  1.34074,  1.59327,  1.83384,  2.12941,  2.46894,  2.57284,
+  1.33672,  1.4817,  1.94477,  2.23061,  2.48029,  2.58012,
+  1.32132,  1.60314,  1.96833,  2.20337,  2.5151,  2.65005,
+  1.34193,  1.66834,  1.98884,  2.18525,  2.56414,  2.65322,
+  1.31555,  1.6489,  1.9599,  2.14764,  2.51689,  2.61262,
+  1.27731,  1.62022,  2.00186,  2.22941,  2.53155,  2.62182,
+  1.30517,  1.5786,  2.03863,  2.29551,  2.56534,  2.65484,
+  1.33051,  1.60991,  1.99154,  2.26271,  2.56334,  2.66596,
+  1.374,  1.68393,  1.98007,  2.33857,  2.5956,  2.68273,
+  1.2687,  1.38975,  1.88538,  2.1104,  2.48811,  2.63864,
+  1.21681,  1.31005,  1.85469,  2.03671,  2.27759,  2.56653,
+  1.23495,  1.33781,  1.94943,  2.05936,  2.29533,  2.56647,
+  1.18894,  1.30239,  1.9962,  2.10744,  2.34919,  2.58524,
+  1.26898,  1.44015,  2.02477,  2.13685,  2.44401,  2.66404,
+  1.27437,  1.38312,  2.06673,  2.15117,  2.40756,  2.6542,
+  1.26455,  1.35612,  2.00166,  2.11886,  2.28778,  2.56954,
+  1.23434,  1.32978,  2.06339,  2.15077,  2.36719,  2.5986,
+  1.15521,  1.25744,  2.0825,  2.21144,  2.39059,  2.6201,
+  1.19946,  1.26556,  1.93498,  2.22669,  2.54089,  2.6642,
+  1.3047,  1.52685,  1.95455,  2.17466,  2.47769,  2.62171,
+  1.63807,  1.89626,  2.07708,  2.36101,  2.64603,  2.71884,
+  1.64382,  1.94311,  2.13199,  2.32962,  2.57872,  2.64546,
+  1.6409,  1.98922,  2.16147,  2.26921,  2.58647,  2.6554,
+  1.72301,  1.91007,  2.07019,  2.25957,  2.56439,  2.64034,
+  1.65207,  1.99873,  2.13594,  2.35282,  2.65251,  2.71747,
+  1.68072,  2.07409,  2.26967,  2.45347,  2.69994,  2.76304,
+  1.69509,  2.05897,  2.19364,  2.31357,  2.63934,  2.69945,
+  1.78296,  2.01403,  2.2249,  2.33229,  2.64535,  2.7244,
+  1.70596,  1.97475,  2.18083,  2.25608,  2.57518,  2.71694,
+  1.66256,  1.98864,  2.11518,  2.20528,  2.54838,  2.65766,
+  1.56205,  1.8439,  2.17327,  2.26589,  2.47795,  2.69597,
+  1.68592,  1.79584,  2.07833,  2.18014,  2.46537,  2.66731,
+  1.68061,  1.73855,  1.99474,  2.13119,  2.47319,  2.64954,
+  1.65929,  1.83364,  2.00009,  2.14017,  2.56491,  2.69272,
+  1.71489,  1.78482,  1.97491,  2.08523,  2.56667,  2.70104,
+  1.72911,  1.82606,  1.89504,  2.05372,  2.60392,  2.69924,
+  1.69629,  1.79108,  1.91604,  2.01774,  2.58311,  2.7042,
+  1.62684,  1.72099,  1.89044,  2.01448,  2.58919,  2.68914,
+  1.57418,  1.678,  1.8808,  1.9828,  2.57498,  2.66408,
+  1.4326,  1.67638,  1.83467,  1.96466,  2.5353,  2.63865,
+  1.31853,  1.53537,  1.83696,  1.93288,  2.47841,  2.57835,
+  1.22629,  1.49295,  1.83642,  1.94607,  2.43017,  2.58207,
+  1.09891,  1.49905,  1.89629,  2.02887,  2.54053,  2.6186,
+  1.03446,  1.53337,  1.96484,  2.07097,  2.57858,  2.65152,
+  0.979835,  1.48091,  1.97596,  2.08932,  2.53424,  2.63263,
+  0.916592,  1.48129,  1.96751,  2.05329,  2.55835,  2.64274,
+  0.937338,  1.47437,  2.02376,  2.11046,  2.58544,  2.66546,
+  0.873055,  1.56053,  2.0288,  2.08642,  2.57502,  2.68478,
+  0.901938,  1.62841,  2.03181,  2.10285,  2.61016,  2.68565,
+  0.862562,  1.55614,  1.99757,  2.08174,  2.5332,  2.61576,
+  0.90614,  1.66574,  2.01937,  2.13334,  2.58193,  2.66115,
+  0.872836,  1.63866,  2.03844,  2.09728,  2.64501,  2.69779,
+  0.829264,  1.4419,  2.03919,  2.11114,  2.61166,  2.68861,
+  0.825197,  1.30453,  2.05635,  2.14379,  2.59031,  2.65782,
+  0.79352,  1.52102,  1.97944,  2.05842,  2.59623,  2.66858,
+  0.849751,  1.48553,  1.9861,  2.05546,  2.62427,  2.7019,
+  0.849936,  1.38559,  2.00752,  2.06058,  2.56723,  2.67845,
+  0.829655,  1.23098,  1.9884,  2.10148,  2.53073,  2.67733,
+  0.940677,  1.26451,  1.94632,  2.04672,  2.49981,  2.67798,
+  1.03888,  1.29749,  1.95821,  2.036,  2.40697,  2.65032,
+  1.15791,  1.24731,  1.89251,  1.98433,  2.39699,  2.6634,
+  1.23706,  1.31883,  1.84331,  1.95477,  2.42085,  2.69391,
+  1.32887,  1.40395,  1.80868,  1.94612,  2.40089,  2.6834,
+  1.39319,  1.46081,  1.82213,  1.9396,  2.24255,  2.72323,
+  1.37096,  1.52614,  1.78537,  1.96316,  2.13675,  2.6448,
+  1.50113,  1.60677,  1.84183,  2.00946,  2.19846,  2.61465,
+  1.46794,  1.55147,  1.84985,  1.98283,  2.2086,  2.51479,
+  1.40594,  1.48098,  1.85598,  1.99706,  2.17872,  2.49001,
+  1.44817,  1.52096,  1.86881,  1.97537,  2.24103,  2.61635,
+  1.38081,  1.61267,  1.86996,  2.02679,  2.44348,  2.63998,
+  1.48372,  1.59611,  1.96973,  2.10091,  2.57743,  2.68814,
+  1.46768,  1.57822,  1.98656,  2.19471,  2.57095,  2.67109,
+  1.4963,  1.6142,  2.03202,  2.21832,  2.55346,  2.68181,
+  1.59696,  1.72273,  2.14453,  2.31998,  2.60439,  2.70396,
+  1.56328,  1.83007,  2.21313,  2.43293,  2.64111,  2.721,
+  1.5911,  1.94848,  2.28841,  2.48658,  2.66684,  2.74357,
+  1.47571,  1.71866,  2.05098,  2.21796,  2.48728,  2.5718,
+  1.55893,  1.7723,  2.09447,  2.23446,  2.51893,  2.59774,
+  1.56759,  1.82209,  2.10059,  2.28665,  2.53395,  2.64811,
+  1.75003,  1.93667,  2.1356,  2.34764,  2.5469,  2.63832,
+  1.75688,  1.99858,  2.1168,  2.22341,  2.55656,  2.64706,
+  1.70004,  1.92226,  2.07535,  2.18437,  2.55608,  2.63906,
+  1.59867,  1.70971,  1.99456,  2.09879,  2.5214,  2.62844,
+  1.60978,  1.7198,  1.93753,  2.09198,  2.54758,  2.62107,
+  1.58074,  1.68669,  1.92793,  2.05951,  2.58033,  2.64353,
+  1.54116,  1.68466,  1.9448,  2.03825,  2.56852,  2.6371,
+  1.4745,  1.63389,  1.88133,  1.98885,  2.5547,  2.62359,
+  1.42769,  1.61681,  1.89847,  1.99412,  2.54591,  2.63584,
+  1.36697,  1.58374,  1.86076,  2.01809,  2.52625,  2.59403,
+  1.2579,  1.5624,  1.87076,  1.96175,  2.51205,  2.58959,
+  1.18331,  1.57125,  1.86744,  1.98879,  2.54377,  2.60779,
+  1.13772,  1.60719,  1.87915,  2.00877,  2.5368,  2.60748,
+  1.05382,  1.51142,  1.90444,  2.00239,  2.58485,  2.65709,
+  1.02931,  1.56067,  1.91347,  1.98444,  2.61342,  2.67092,
+  0.990299,  1.5203,  1.91971,  2.00599,  2.61587,  2.70596,
+  0.927002,  1.48685,  1.9001,  1.97777,  2.61462,  2.69576,
+  0.924166,  1.5003,  1.83727,  1.91582,  2.60179,  2.70283,
+  0.901854,  1.42276,  1.89801,  1.95014,  2.57299,  2.7593,
+  0.910623,  1.28648,  1.80128,  1.92579,  2.43815,  2.67129,
+  0.904293,  1.22614,  1.87334,  1.94691,  2.48527,  2.64553,
+  0.872654,  1.12266,  1.9125,  2.04762,  2.46806,  2.64549,
+  1.13608,  1.24801,  1.7254,  2.18063,  2.49378,  2.5794,
+  1.1615,  1.34697,  1.80404,  2.15702,  2.55031,  2.63316,
+  1.28729,  1.66372,  2.04419,  2.32192,  2.59928,  2.68713,
+  1.4568,  1.75827,  2.05527,  2.31065,  2.54931,  2.66007,
+  1.41695,  1.74137,  2.10419,  2.35776,  2.59176,  2.67954,
+  1.37953,  1.75252,  2.17341,  2.36107,  2.6175,  2.69932,
+  1.361,  1.76202,  2.11571,  2.33066,  2.562,  2.65039,
+  1.34078,  1.68536,  2.02489,  2.28195,  2.54742,  2.63946,
+  1.27817,  1.68614,  1.96141,  2.16547,  2.55417,  2.64787,
+  1.29452,  1.54762,  1.98197,  2.18343,  2.54751,  2.63723,
+  1.20162,  1.34364,  2.00786,  2.08943,  2.53568,  2.66074,
+  1.202,  1.33211,  1.94915,  2.05181,  2.5532,  2.66547,
+  1.18035,  1.35425,  1.89052,  2.06991,  2.51523,  2.62012,
+  1.12873,  1.41976,  1.85478,  2.05663,  2.4807,  2.58354,
+  1.13319,  1.40234,  1.82266,  2.01361,  2.53991,  2.63944,
+  1.14927,  1.37693,  1.82119,  1.91493,  2.56242,  2.66404,
+  1.08087,  1.40844,  1.78802,  1.87993,  2.51751,  2.65668,
+  1.15244,  1.5096,  1.82234,  1.93981,  2.52894,  2.61915,
+  1.22726,  1.54378,  1.93541,  2.01768,  2.57551,  2.66563,
+  1.25365,  1.48594,  1.94554,  1.98737,  2.53919,  2.71509,
+  1.2245,  1.52134,  1.98216,  2.04494,  2.52268,  2.68745,
+  1.25872,  1.47612,  1.98186,  2.0731,  2.53617,  2.63409,
+  1.25558,  1.47113,  1.98394,  2.05256,  2.54104,  2.70865,
+  1.22142,  1.55673,  2.01332,  2.08977,  2.5386,  2.7065,
+  1.17848,  1.47465,  2.00764,  2.12209,  2.56026,  2.62943,
+  1.13664,  1.45929,  2.03373,  2.10043,  2.5447,  2.68913,
+  1.0352,  1.46256,  2.02497,  2.19409,  2.5306,  2.66221,
+  1.09088,  1.52242,  2.03844,  2.12942,  2.58762,  2.68739,
+  1.05454,  1.53834,  2.00059,  2.08401,  2.51651,  2.64433,
+  1.06957,  1.47115,  1.97701,  2.10266,  2.54822,  2.64566,
+  1.08464,  1.23507,  1.99903,  2.09101,  2.40519,  2.62241,
+  1.07391,  1.18049,  1.96138,  2.10188,  2.2553,  2.5318,
+  1.18554,  1.32028,  2.00675,  2.09885,  2.44308,  2.58297,
+  1.25681,  1.41999,  1.98353,  2.13096,  2.47042,  2.55869,
+  1.29074,  1.39192,  1.99538,  2.10656,  2.35166,  2.48517,
+  1.42857,  1.7483,  2.04481,  2.27757,  2.51309,  2.62525,
+  1.49577,  1.68666,  2.13566,  2.29223,  2.49901,  2.6165,
+  1.48246,  1.63201,  2.08388,  2.29724,  2.48855,  2.60533,
+  1.53884,  1.63087,  2.11175,  2.22311,  2.57684,  2.69324,
+  1.55163,  1.62855,  2.0406,  2.158,  2.59018,  2.71351,
+  1.57001,  1.63772,  1.9581,  2.12426,  2.57018,  2.69279,
+  1.53459,  1.60799,  1.80164,  2.08727,  2.3927,  2.60093,
+  1.50278,  1.60763,  1.8438,  2.08234,  2.32328,  2.52239,
+  1.5157,  1.61344,  1.83784,  2.02724,  2.40291,  2.60224,
+  1.51003,  1.60758,  1.82642,  1.95546,  2.34057,  2.67962,
+  1.44583,  1.56664,  1.75642,  1.86971,  2.29615,  2.60165,
+  1.41071,  1.48852,  1.82002,  1.91044,  2.35823,  2.61465,
+  1.30157,  1.42828,  1.81243,  1.90258,  2.29336,  2.72528,
+  1.10681,  1.35151,  1.88873,  1.95633,  2.32044,  2.64689,
+  1.05626,  1.36692,  1.86662,  1.96895,  2.42146,  2.65352,
+  1.14875,  1.36805,  1.80964,  2.06411,  2.43779,  2.6041,
+  0.99027,  1.45316,  1.88728,  2.03517,  2.29694,  2.6003,
+  0.943695,  1.20427,  1.748,  1.88645,  2.18161,  2.5098,
+  1.05705,  1.2214,  1.83597,  1.97244,  2.15495,  2.49297,
+  0.936404,  1.22552,  1.89505,  1.99806,  2.53953,  2.64493,
+  0.941516,  1.22449,  1.96641,  2.05527,  2.51509,  2.60908,
+  1.00024,  1.31497,  1.942,  2.05192,  2.53588,  2.63478,
+  1.03139,  1.4074,  1.95347,  2.04544,  2.55082,  2.63437,
+  1.11887,  1.44195,  1.95252,  2.062,  2.49434,  2.60804,
+  1.1971,  1.55316,  1.88765,  2.00919,  2.4721,  2.55066,
+  1.2938,  1.58834,  1.86838,  2.04592,  2.4811,  2.56611,
+  1.35377,  1.61065,  1.89762,  2.08348,  2.40829,  2.5434,
+  1.40368,  1.522,  1.89167,  2.05414,  2.35729,  2.51225,
+  1.3704,  1.44625,  1.87133,  1.99814,  2.33668,  2.57069,
+  1.49939,  1.75525,  2.09033,  2.28295,  2.48403,  2.57439,
+  1.56771,  1.84261,  2.13662,  2.27873,  2.47712,  2.57607,
+  1.59155,  1.76754,  2.16941,  2.30293,  2.52513,  2.6375,
+  1.45827,  1.79974,  2.22722,  2.3975,  2.61653,  2.70557,
+  1.49671,  1.84604,  2.2799,  2.43719,  2.64967,  2.72662,
+  1.50276,  1.73132,  2.26873,  2.46421,  2.62362,  2.70674,
+  1.4973,  1.61793,  2.15658,  2.38626,  2.57903,  2.66472,
+  1.37998,  1.53869,  1.85063,  2.10952,  2.41066,  2.58615,
+  1.40587,  1.49793,  1.7417,  1.93228,  2.33718,  2.56385,
+  1.34617,  1.43104,  1.65743,  1.88442,  2.37395,  2.58735,
+  1.30791,  1.40637,  1.73414,  1.87583,  2.46072,  2.60209,
+  1.27394,  1.57115,  1.77128,  1.91225,  2.53645,  2.59561,
+  1.20006,  1.57518,  1.77085,  1.87763,  2.50802,  2.57915,
+  1.12581,  1.53942,  1.72263,  1.85997,  2.51165,  2.57463,
+  1.0649,  1.48451,  1.69086,  1.83275,  2.51958,  2.58928,
+  1.04287,  1.48323,  1.62712,  1.86708,  2.49587,  2.55026,
+  0.95091,  1.47482,  1.57611,  1.83009,  2.51944,  2.56991,
+  1.00452,  1.42303,  1.55012,  1.83522,  2.4736,  2.54437,
+  1.02641,  1.36569,  1.51066,  1.87911,  2.46718,  2.54387,
+  0.978321,  1.33849,  1.52802,  1.91388,  2.46507,  2.52472,
+  0.922555,  1.40958,  1.52026,  1.93266,  2.40471,  2.47222,
+  1.00902,  1.34503,  1.51873,  1.99953,  2.46306,  2.54494,
+  0.989351,  1.43316,  1.57387,  2.01544,  2.4012,  2.49098,
+  1.03533,  1.55632,  1.67731,  2.08678,  2.48152,  2.56795,
+  1.00412,  1.57529,  1.79639,  2.07552,  2.40291,  2.57424,
+  1.03735,  1.68182,  1.94311,  2.06542,  2.47889,  2.5989,
+  1.00585,  1.68475,  1.97239,  2.10931,  2.56505,  2.62351,
+  0.954873,  1.71979,  2.00619,  2.11235,  2.59863,  2.68278,
+  0.937994,  1.72832,  1.99376,  2.10525,  2.63205,  2.70071,
+  0.889626,  1.70953,  2.00129,  2.09009,  2.62054,  2.7098,
+  0.912128,  1.65762,  1.96678,  2.05864,  2.62643,  2.70292,
+  0.972006,  1.56912,  1.98595,  2.13024,  2.56915,  2.67726,
+  1.03879,  1.65117,  2.00829,  2.11811,  2.59919,  2.70129,
+  1.1022,  1.62499,  1.99876,  2.12503,  2.56976,  2.64664,
+  1.18774,  1.63937,  2.05924,  2.1473,  2.47586,  2.63496,
+  1.2741,  1.59067,  2.01675,  2.09963,  2.54872,  2.66899,
+  1.3734,  1.63001,  1.98149,  2.07093,  2.50595,  2.68933,
+  1.51121,  1.60261,  1.91134,  2.0229,  2.47594,  2.64575,
+  1.55308,  1.6394,  1.8704,  1.97561,  2.47343,  2.62657,
+  1.63342,  1.77332,  1.87513,  1.95948,  2.41315,  2.62591,
+  1.59672,  1.74731,  1.87805,  2.04902,  2.58749,  2.66928,
+  1.66467,  1.93335,  2.15604,  2.28003,  2.46274,  2.57155,
+  1.55119,  1.6958,  2.0471,  2.23698,  2.44759,  2.57084,
+  1.6483,  1.72807,  2.06079,  2.27374,  2.47514,  2.6312,
+  1.63355,  1.75757,  2.08928,  2.24098,  2.43612,  2.55685,
+  1.60864,  1.68471,  2.12375,  2.25657,  2.4865,  2.59823,
+  1.65318,  1.71454,  2.10535,  2.20323,  2.50932,  2.64178,
+  1.54105,  1.67996,  2.10427,  2.24726,  2.54038,  2.62672,
+  1.55966,  1.65964,  2.10138,  2.21367,  2.47324,  2.563,
+  1.60881,  1.67178,  2.07143,  2.18483,  2.49328,  2.63946,
+  1.53888,  1.61019,  2.08308,  2.17154,  2.55439,  2.65099,
+  1.51102,  1.59546,  2.03164,  2.13009,  2.5876,  2.6604,
+  1.34069,  1.58784,  1.931,  2.11712,  2.59986,  2.67657,
+  1.48468,  1.53325,  2.02449,  2.11315,  2.54832,  2.65995,
+  1.53434,  1.60831,  2.03154,  2.136,  2.5371,  2.61772,
+  1.57158,  1.61831,  2.05673,  2.13975,  2.52541,  2.62221,
+  1.56447,  1.63127,  2.06059,  2.16604,  2.47,  2.63566,
+  1.53365,  1.66351,  2.09396,  2.19079,  2.40674,  2.62275,
+  1.57012,  1.63104,  2.04937,  2.16517,  2.39357,  2.5885,
+  1.55247,  1.63452,  2.00848,  2.09888,  2.5092,  2.66932,
+  1.49854,  1.60281,  2.00888,  2.09973,  2.52514,  2.65917,
+  1.45092,  1.66054,  1.99176,  2.1033,  2.54407,  2.69647,
+  1.4476,  1.5691,  1.99305,  2.07976,  2.58771,  2.67639,
+  1.39457,  1.5447,  2.00666,  2.07897,  2.57902,  2.72188,
+  1.34792,  1.50775,  1.99379,  2.07733,  2.51023,  2.68268,
+  1.26519,  1.35538,  1.87785,  2.06383,  2.4258,  2.6578,
+  1.2663,  1.37693,  2.00888,  2.27501,  2.47904,  2.63616,
+  1.41473,  1.68062,  2.0574,  2.33275,  2.54997,  2.65245,
+  1.49988,  1.70879,  2.05474,  2.31358,  2.52103,  2.61391,
+  1.44568,  1.74177,  2.12639,  2.33881,  2.49512,  2.59797,
+  1.4592,  1.79234,  2.11349,  2.34607,  2.5637,  2.66497,
+  1.41684,  1.64439,  2.13147,  2.32291,  2.5788,  2.67716,
+  1.44797,  1.70822,  2.14489,  2.27258,  2.59321,  2.70087,
+  1.47461,  1.74298,  2.06694,  2.34163,  2.60175,  2.68525,
+  1.34672,  1.65394,  1.99915,  2.21854,  2.63336,  2.7236,
+  1.37521,  1.55141,  2.05268,  2.23201,  2.58684,  2.69703,
+  1.26095,  1.50175,  1.9252,  2.03394,  2.54669,  2.65203,
+  1.25934,  1.50019,  1.90965,  1.98291,  2.54588,  2.63867,
+  1.25284,  1.56384,  1.91059,  1.97368,  2.57931,  2.66428,
+  1.263,  1.54633,  1.87808,  2.03115,  2.58347,  2.65379,
+  1.2652,  1.52127,  1.90571,  1.96739,  2.58143,  2.65872,
+  1.3077,  1.54772,  1.88142,  1.96204,  2.57347,  2.65883,
+  1.29134,  1.57501,  1.91524,  1.98556,  2.60208,  2.6977,
+  1.29543,  1.62646,  1.9233,  2.02372,  2.59129,  2.68014,
+  1.30121,  1.62408,  1.87893,  1.99808,  2.5601,  2.63451,
+  1.30581,  1.62092,  1.88803,  1.98904,  2.60623,  2.66943,
+  1.30809,  1.64233,  1.88596,  2.01357,  2.61191,  2.69665,
+  1.3121,  1.62786,  1.86184,  1.9741,  2.60262,  2.65849,
+  1.2929,  1.60573,  1.87713,  1.97339,  2.59964,  2.68284,
+  1.27314,  1.59174,  1.87042,  1.94745,  2.60233,  2.67415,
+  1.28358,  1.62082,  1.84727,  1.92803,  2.59005,  2.63688,
+  1.2462,  1.56007,  1.85162,  1.95453,  2.58753,  2.67354,
+  1.26039,  1.53964,  1.83162,  1.92843,  2.55229,  2.62963,
+  1.26122,  1.50523,  1.85731,  1.93391,  2.569,  2.69631,
+  1.28311,  1.71986,  1.8239,  1.97603,  2.56544,  2.62875,
+  1.31439,  1.61774,  1.80406,  1.96054,  2.59681,  2.68674,
+  1.3387,  1.63728,  1.89693,  2.00913,  2.52347,  2.63738,
+  1.33648,  1.57703,  1.85003,  1.94324,  2.52134,  2.59683,
+  1.39891,  1.54928,  1.72446,  1.86193,  2.16679,  2.46633,
+  1.40689,  1.49743,  1.80504,  1.90912,  2.28428,  2.54258,
+  1.47485,  1.57937,  1.97076,  2.0797,  2.37143,  2.54262,
+  1.45231,  1.5394,  2.07666,  2.138,  2.44297,  2.64951,
+  1.45062,  1.50661,  2.03639,  2.13145,  2.48483,  2.67472,
+  1.4348,  1.58308,  2.02767,  2.13681,  2.42911,  2.57834,
+  1.08757,  1.36721,  1.7863,  2.02503,  2.29808,  2.51567,
+  0.992092,  1.43643,  1.72551,  1.96511,  2.42572,  2.54902,
+  0.969474,  1.49732,  1.73009,  2.01605,  2.41437,  2.63332,
+  0.936277,  1.41301,  1.68361,  2.02977,  2.4431,  2.55283,
+  1.17635,  1.55964,  1.74877,  2.06189,  2.31148,  2.43469,
+  1.06711,  1.40664,  1.64389,  1.97881,  2.37473,  2.54784,
+  0.989262,  1.33311,  1.47509,  1.72865,  2.49202,  2.55347,
+  0.957471,  1.30854,  1.42456,  1.82347,  2.49022,  2.55232,
+  1.03577,  1.25449,  1.35208,  1.78625,  2.53949,  2.58578,
+  1.02368,  1.23242,  1.39848,  1.87577,  2.45168,  2.54025,
+  1.03725,  1.24729,  1.38742,  2.00855,  2.41927,  2.49611,
+  1.04592,  1.23169,  1.36195,  1.88761,  2.38445,  2.4715,
+  1.00098,  1.25084,  1.37666,  1.76767,  2.39805,  2.48444,
+  1.06177,  1.21461,  1.41076,  1.72825,  2.42398,  2.51427,
+  1.16823,  1.29119,  1.59751,  1.90001,  2.41542,  2.55501,
+  1.15079,  1.41286,  1.82595,  1.95326,  2.40005,  2.53532,
+  1.16692,  1.51763,  1.94353,  2.03425,  2.37336,  2.52147,
+  1.18318,  1.52316,  1.99531,  2.11989,  2.43346,  2.59116,
+  1.15948,  1.52173,  2.07237,  2.17696,  2.5149,  2.66076,
+  1.26032,  1.72266,  2.11677,  2.24905,  2.53412,  2.64563,
+  1.45043,  1.71771,  2.04879,  2.21275,  2.49949,  2.63613,
+  1.44923,  1.65312,  2.02364,  2.19689,  2.45305,  2.61252,
+  1.38812,  1.59757,  1.96865,  2.16345,  2.42543,  2.57803,
+  1.3476,  1.44981,  1.89414,  2.16897,  2.44647,  2.60227,
+  1.39801,  1.47176,  1.92206,  2.12096,  2.39643,  2.60072,
+  1.42866,  1.54131,  2.04605,  2.13251,  2.39709,  2.6431,
+  1.49267,  1.58516,  2.05934,  2.1583,  2.48082,  2.64875,
+  1.55899,  1.64879,  2.03751,  2.15332,  2.51238,  2.64766,
+  1.5875,  1.65909,  2.0205,  2.13969,  2.53746,  2.61656,
+  1.63435,  1.73936,  2.04449,  2.21819,  2.53013,  2.62274,
+  1.65015,  1.73677,  2.04927,  2.14892,  2.55187,  2.65129,
+  1.6407,  1.70735,  1.99133,  2.11956,  2.58759,  2.64283,
+  1.65582,  1.70975,  1.94195,  2.09079,  2.57008,  2.63037,
+  1.60644,  1.69562,  1.85276,  2.04784,  2.5549,  2.62809,
+  1.48459,  1.65703,  1.82298,  2.00896,  2.58403,  2.65372,
+  1.34838,  1.6278,  1.77907,  1.89733,  2.52187,  2.6464,
+  1.15564,  1.46487,  1.7638,  1.94355,  2.55585,  2.64209,
+  1.33945,  1.67633,  1.97104,  2.1868,  2.43889,  2.57107,
+  1.29738,  1.61553,  1.94676,  2.15118,  2.42984,  2.55813,
+  1.13646,  1.51989,  1.86723,  2.10739,  2.45273,  2.55371,
+  0.943433,  1.35098,  1.71433,  1.83088,  2.38004,  2.57361,
+  0.93395,  1.07858,  1.55309,  1.66234,  2.02795,  2.45315,
+  0.896937,  1.24693,  1.58663,  1.68408,  2.39714,  2.61171,
+  0.892078,  1.35006,  1.56008,  1.68985,  2.50628,  2.60756,
+  0.772181,  1.31368,  1.52566,  1.65028,  2.46898,  2.63641,
+  0.863603,  1.32858,  1.48114,  1.76889,  2.49678,  2.54657,
+  0.908312,  1.25841,  1.38277,  1.69975,  2.44859,  2.54733,
+  0.863083,  1.2738,  1.42241,  1.57588,  2.50992,  2.5671,
+  0.798143,  1.23338,  1.32805,  1.71855,  2.54548,  2.65489,
+  0.937997,  1.29721,  1.44739,  1.65945,  2.53943,  2.66437,
+  1.01531,  1.28265,  1.44965,  1.65693,  2.51959,  2.59724,
+  1.0126,  1.30809,  1.42876,  1.74264,  2.58138,  2.65475,
+  1.07522,  1.35994,  1.46636,  1.79046,  2.58293,  2.65492,
+  1.17472,  1.35459,  1.47068,  1.80811,  2.61181,  2.6906,
+  1.30467,  1.38057,  1.48642,  1.86325,  2.49909,  2.64664,
+  1.32925,  1.45894,  1.59974,  1.9851,  2.41224,  2.4896,
+  1.32685,  1.46696,  1.65071,  1.97288,  2.17365,  2.36378,
+  1.44073,  1.59786,  1.75692,  1.94212,  2.13442,  2.3309,
+  1.49091,  1.61528,  1.79973,  1.98918,  2.30719,  2.53596,
+  1.523,  1.67644,  1.84139,  2.08449,  2.49007,  2.6195,
+  1.53645,  1.67293,  1.83434,  2.06794,  2.59485,  2.65573,
+  1.58521,  1.67342,  1.87935,  2.02614,  2.60916,  2.69133,
+  1.57645,  1.66211,  1.86811,  1.98727,  2.62983,  2.70249,
+  1.56114,  1.62908,  1.91041,  2.00543,  2.63344,  2.72614,
+  1.53121,  1.61555,  1.87364,  1.96628,  2.52259,  2.70606,
+  1.47329,  1.59122,  1.90894,  1.97341,  2.53504,  2.73312,
+  1.41254,  1.47364,  1.87172,  1.95732,  2.3412,  2.7407,
+  1.37981,  1.47324,  1.92392,  1.98607,  2.44717,  2.65758,
+  1.33369,  1.50012,  1.93353,  2.13803,  2.5018,  2.61583,
+  1.40577,  1.57009,  2.02811,  2.33267,  2.57368,  2.66412,
+  1.38605,  1.54675,  2.10184,  2.38012,  2.6073,  2.71246,
+  1.42055,  1.66408,  2.09684,  2.28767,  2.54543,  2.64567,
+  1.42992,  1.63289,  2.05645,  2.24534,  2.46973,  2.59462,
+  1.45034,  1.54233,  1.93614,  2.16009,  2.38966,  2.59495,
+  1.45865,  1.54584,  1.97395,  2.13284,  2.28055,  2.51911,
+  1.49962,  1.62185,  1.92436,  2.08658,  2.25382,  2.39346,
+  1.48012,  1.59661,  1.8229,  2.03008,  2.21246,  2.44059,
+  1.38557,  1.51579,  1.76353,  2.00756,  2.20701,  2.50516,
+  1.36348,  1.48371,  1.74539,  2.02083,  2.17738,  2.42842,
+  1.42241,  1.52636,  1.80247,  2.04137,  2.26763,  2.50998,
+  1.45178,  1.5395,  1.88862,  2.07975,  2.25853,  2.50082,
+  1.46274,  1.54888,  1.92575,  2.06529,  2.3201,  2.59188,
+  1.45961,  1.52679,  1.9373,  2.02975,  2.426,  2.61822,
+  1.42677,  1.49596,  1.9348,  2.02868,  2.47432,  2.63994,
+  1.39548,  1.4946,  1.92354,  2.00687,  2.5088,  2.6516,
+  1.31532,  1.47588,  1.92587,  2.01244,  2.56254,  2.64267,
+  1.21621,  1.54231,  1.86761,  1.96291,  2.57851,  2.63891,
+  1.18812,  1.59211,  1.82616,  1.95676,  2.59273,  2.65931,
+  1.15728,  1.51903,  1.84128,  1.93613,  2.59672,  2.66939,
+  1.04273,  1.33486,  1.85281,  1.92781,  2.50926,  2.72139,
+  1.07692,  1.51273,  1.89221,  1.97602,  2.37074,  2.63564,
+  1.32864,  1.55521,  1.82696,  2.08002,  2.44793,  2.60775,
+  1.27122,  1.38353,  1.74055,  2.04872,  2.35626,  2.56711,
+  1.28876,  1.38548,  1.79387,  1.97785,  2.3904,  2.60455,
+  1.32866,  1.42224,  1.80564,  2.00282,  2.28916,  2.5443,
+  1.37794,  1.49365,  1.79368,  2.03187,  2.35373,  2.51891,
+  1.38443,  1.45365,  1.83807,  2.00184,  2.39078,  2.63512,
+  1.28946,  1.40343,  1.87102,  1.98612,  2.47998,  2.7238,
+  1.20789,  1.38822,  1.86505,  2.03166,  2.45007,  2.59141,
+  1.21863,  1.30931,  1.90985,  2.00378,  2.49942,  2.60498,
+  1.17883,  1.2733,  1.83281,  2.02504,  2.50863,  2.65023,
+  1.14748,  1.25919,  1.93016,  2.02773,  2.52207,  2.63407,
+  1.10091,  1.26803,  1.85791,  1.9519,  2.50889,  2.66039,
+  1.06983,  1.22567,  1.88895,  1.97434,  2.49213,  2.5921,
+  1.04226,  1.18221,  1.89174,  2.03996,  2.55965,  2.67933,
+  0.956414,  1.18097,  1.88146,  1.99433,  2.31647,  2.61769,
+  1.06179,  1.5717,  1.92657,  2.10718,  2.40416,  2.52545,
+  1.37431,  1.4759,  1.67843,  1.97242,  2.36429,  2.51653,
+  1.36344,  1.45577,  1.76316,  1.9708,  2.36833,  2.58698,
+  1.42304,  1.59189,  1.7982,  2.01278,  2.38811,  2.60218,
+  1.52726,  1.60578,  1.90951,  2.03343,  2.40668,  2.59346,
+  1.58513,  1.66451,  1.91801,  2.02654,  2.42573,  2.60092,
+  1.61189,  1.72856,  1.90767,  2.03404,  2.39568,  2.64177,
+  1.46301,  1.62466,  1.87229,  1.99824,  2.48782,  2.66247,
+  1.50707,  1.59791,  1.89375,  1.99701,  2.53598,  2.67246,
+  1.5024,  1.61803,  1.88856,  2.02416,  2.58185,  2.65654,
+  1.55312,  1.63948,  1.91892,  2.03428,  2.57686,  2.65568,
+  1.57736,  1.64826,  1.95809,  2.05341,  2.56789,  2.65652,
+  1.59537,  1.65463,  1.99777,  2.09975,  2.53164,  2.67521,
+  1.62164,  1.70401,  1.95775,  2.07464,  2.58431,  2.66051,
+  1.61843,  1.71139,  1.95479,  2.06745,  2.53377,  2.69523,
+  1.61785,  1.71631,  1.94968,  2.10336,  2.63594,  2.68689,
+  1.64932,  1.74631,  1.90161,  2.06435,  2.60677,  2.69024,
+  1.63506,  1.7696,  1.90462,  2.0191,  2.6076,  2.71333,
+  1.64557,  1.7795,  1.86895,  1.96533,  2.59215,  2.7149,
+  1.68657,  1.7575,  1.85807,  1.92204,  2.50527,  2.69889,
+  1.61272,  1.70323,  1.83105,  1.9259,  2.37381,  2.61368,
+  1.24435,  1.40956,  1.71346,  1.9677,  2.35146,  2.53736,
+  1.26999,  1.3873,  1.64097,  1.99183,  2.32491,  2.50177,
+  1.30535,  1.45577,  1.78878,  2.09123,  2.48724,  2.61473,
+  1.41386,  1.51881,  1.88852,  2.25227,  2.44809,  2.59472,
+  1.40942,  1.59146,  1.94472,  2.19692,  2.51839,  2.63823,
+  1.39914,  1.70331,  1.96615,  2.22486,  2.61691,  2.73408,
+  1.37531,  1.63638,  2.06176,  2.29242,  2.58662,  2.70574,
+  1.39467,  1.73342,  2.0736,  2.29715,  2.57382,  2.67289,
+  1.36608,  1.73861,  2.01663,  2.28566,  2.60549,  2.69352,
+  1.36062,  1.60169,  1.96797,  2.19484,  2.56485,  2.65792,
+  1.3547,  1.47154,  1.99017,  2.16544,  2.569,  2.67912,
+  1.31937,  1.40392,  2.03022,  2.11501,  2.4527,  2.63591,
+  1.30326,  1.37473,  1.97504,  2.11117,  2.36982,  2.66061,
+  1.32579,  1.43105,  2.03617,  2.11394,  2.476,  2.68507,
+  1.30748,  1.51036,  2.1177,  2.17917,  2.55458,  2.69578,
+  1.31143,  1.54831,  2.12835,  2.27973,  2.5517,  2.6455,
+  1.29377,  1.44223,  2.11556,  2.28956,  2.4159,  2.53121,
+  1.27867,  1.69711,  2.0925,  2.19954,  2.36852,  2.56114,
+  1.29264,  1.86793,  2.12883,  2.20633,  2.45084,  2.55178,
+  1.23486,  1.63107,  2.1437,  2.30446,  2.49101,  2.56573,
+  1.21995,  1.36757,  2.1498,  2.21849,  2.49521,  2.6353,
+  1.2089,  1.48484,  2.1803,  2.27669,  2.52633,  2.62673,
+  1.16526,  1.45824,  2.15559,  2.22728,  2.49018,  2.5968,
+  1.11619,  1.49218,  2.17727,  2.2419,  2.53233,  2.62053,
+  1.0969,  1.52492,  2.09349,  2.34525,  2.48036,  2.61116,
+  1.04378,  1.36903,  2.22928,  2.30665,  2.52743,  2.61303,
+  1.08072,  1.33613,  2.13554,  2.24061,  2.46344,  2.63428,
+  1.12626,  1.50254,  2.06533,  2.27483,  2.51283,  2.58825,
+  1.19913,  1.448,  2.04058,  2.21686,  2.44913,  2.5443,
+  1.2443,  1.54083,  2.03653,  2.17483,  2.47027,  2.58034,
+  1.27719,  1.57406,  2.06637,  2.15037,  2.50854,  2.61173,
+  1.34175,  1.57688,  2.03148,  2.12065,  2.49616,  2.57534,
+  1.33544,  1.5416,  1.99434,  2.1088,  2.51884,  2.62295,
+  1.35172,  1.54371,  2.00331,  2.07535,  2.57916,  2.65663,
+  1.3593,  1.47053,  1.96846,  2.04232,  2.56515,  2.66484,
+  1.3682,  1.43322,  1.98377,  2.04495,  2.4386,  2.6706,
+  1.35118,  1.42613,  1.99129,  2.08773,  2.43075,  2.61637,
+  1.34987,  1.4833,  2.00027,  2.24283,  2.53591,  2.62905,
+  1.32206,  1.59678,  2.11312,  2.40815,  2.54898,  2.62526,
+  1.38129,  1.64876,  2.19246,  2.37836,  2.57952,  2.6545,
+  1.37213,  1.54266,  2.06255,  2.30731,  2.47559,  2.58062,
+  1.36357,  1.46348,  1.86476,  2.28846,  2.4678,  2.57169,
+  1.33579,  1.5363,  1.88616,  2.22187,  2.54338,  2.67053,
+  1.25976,  1.39335,  1.60476,  1.93429,  2.43051,  2.5096,
+  1.22472,  1.34965,  1.48194,  1.83683,  2.38496,  2.46313,
+  1.25366,  1.36921,  1.50551,  1.99434,  2.36606,  2.45456,
+  1.25045,  1.37222,  1.56344,  2.13328,  2.39153,  2.46111,
+  1.29898,  1.41253,  1.56,  2.16285,  2.47558,  2.55147,
+  1.3087,  1.48723,  1.61657,  2.14089,  2.42252,  2.52784,
+  1.36226,  1.50974,  1.69114,  2.15185,  2.42506,  2.50401,
+  1.41519,  1.57382,  1.72634,  2.14569,  2.42361,  2.51895,
+  1.4683,  1.62457,  1.768,  2.10708,  2.43369,  2.50188,
+  1.47421,  1.64517,  1.82938,  2.15047,  2.33054,  2.45413,
+  1.48873,  1.66222,  1.85318,  2.16043,  2.39072,  2.50747,
+  1.51537,  1.6851,  1.8209,  2.09082,  2.47713,  2.54132,
+  1.53394,  1.68102,  1.91115,  2.10105,  2.43121,  2.50742,
+  1.54702,  1.76275,  1.90532,  2.0573,  2.36997,  2.49646,
+  1.52475,  1.7075,  1.88085,  2.14514,  2.33129,  2.4433,
+  1.53267,  1.68946,  1.83844,  2.06671,  2.35207,  2.48759,
+  1.44908,  1.63991,  1.78652,  2.04704,  2.32879,  2.42622,
+  1.39341,  1.607,  1.75213,  2.06596,  2.381,  2.47377,
+  1.23492,  1.62038,  1.75171,  2.07935,  2.40097,  2.47182,
+  1.12865,  1.58919,  1.72598,  2.09781,  2.42178,  2.50718,
+  1.20512,  1.49111,  1.70703,  2.14313,  2.40768,  2.4896,
+  1.10599,  1.52409,  1.74026,  2.14252,  2.42276,  2.53271,
+  1.14687,  1.42809,  1.69879,  2.10033,  2.42333,  2.5455,
+  1.11601,  1.3519,  1.75431,  2.14602,  2.4117,  2.52754,
+  1.17851,  1.30684,  1.82411,  2.27204,  2.45289,  2.54631,
+  1.38605,  1.68653,  2.01082,  2.14869,  2.4392,  2.57093,
+  1.33438,  1.67405,  1.96249,  2.10873,  2.40392,  2.5875,
+  1.30954,  1.51943,  2.0306,  2.11973,  2.43608,  2.6208,
+  1.19962,  1.42519,  2.03789,  2.16133,  2.49331,  2.63953,
+  0.913804,  1.25173,  2.05508,  2.17687,  2.41685,  2.64493,
+  0.822137,  1.06733,  2.01912,  2.21659,  2.39556,  2.65819,
+  0.859923,  0.985874,  1.90428,  2.16059,  2.43371,  2.63982,
+  0.906761,  1.14062,  2.0105,  2.14624,  2.46964,  2.64413,
+  0.950845,  1.25396,  2.03953,  2.0959,  2.60028,  2.71109,
+  0.953879,  1.24532,  1.98547,  2.13315,  2.54365,  2.613,
+  1.03167,  1.28659,  1.97462,  2.03713,  2.54102,  2.69028,
+  1.0516,  1.37316,  1.90525,  2.00964,  2.49555,  2.67405,
+  1.08826,  1.2974,  1.89869,  2.01858,  2.50884,  2.69051,
+  1.1467,  1.28227,  1.93071,  2.01015,  2.43941,  2.64701,
+  1.1572,  1.34385,  1.93082,  2.02912,  2.36815,  2.598,
+  1.24735,  1.43274,  1.94259,  2.06745,  2.39283,  2.5543,
+  1.29762,  1.51602,  1.99339,  2.07927,  2.43946,  2.54827,
+  1.38625,  1.4836,  1.96585,  2.07161,  2.44479,  2.59437,
+  1.42969,  1.49987,  1.88063,  2.07411,  2.3462,  2.60425,
+  1.56913,  1.64448,  1.94276,  2.0452,  2.37069,  2.58937,
+  1.69636,  1.74562,  1.98094,  2.09366,  2.43348,  2.58367,
+  1.69484,  1.80115,  1.96103,  2.06832,  2.45264,  2.63829,
+  1.61979,  1.78559,  1.91963,  2.05582,  2.23816,  2.49876,
+  1.22369,  1.62122,  1.79172,  1.89869,  2.16167,  2.49995,
+  1.14441,  1.45291,  1.78089,  1.86674,  2.21421,  2.49427,
+  1.13554,  1.49512,  1.82078,  1.89436,  2.11501,  2.44158,
+  1.13138,  1.53582,  1.73732,  1.84242,  2.02164,  2.42595,
+  1.21265,  1.31217,  1.75291,  1.88932,  2.10891,  2.4697,
+  1.25395,  1.35241,  1.65265,  1.96095,  2.39444,  2.56868,
+  1.36268,  1.58079,  1.91332,  2.21262,  2.3816,  2.52899,
+  1.41733,  1.58205,  1.97763,  2.23799,  2.41308,  2.58029,
+  1.38316,  1.60355,  2.01614,  2.21013,  2.44905,  2.58723,
+  1.44211,  1.54421,  1.93895,  2.14188,  2.495,  2.59016,
+  1.38173,  1.57916,  1.982,  2.13878,  2.48578,  2.62057,
+  1.36159,  1.59781,  1.96493,  2.13812,  2.54261,  2.62247,
+  1.36066,  1.61469,  2.01078,  2.1615,  2.46045,  2.5839,
+  1.39009,  1.62865,  1.96383,  2.13056,  2.47773,  2.61338,
+  1.34617,  1.6485,  2.08237,  2.32171,  2.55595,  2.64942,
+  1.44042,  1.74244,  2.00765,  2.20824,  2.45099,  2.57791,
+  1.44483,  1.69506,  2.02687,  2.21048,  2.41403,  2.53277,
+  1.34554,  1.58917,  1.95542,  2.12931,  2.40989,  2.54316,
+  1.40004,  1.48192,  1.94707,  2.11026,  2.31316,  2.53117,
+  1.38478,  1.48479,  1.98387,  2.10714,  2.36009,  2.58548,
+  1.42919,  1.51494,  2.01966,  2.13766,  2.32955,  2.58529,
+  1.45055,  1.51832,  2.01003,  2.1028,  2.40169,  2.60328,
+  1.44136,  1.52541,  1.96497,  2.07672,  2.37601,  2.59481,
+  1.46479,  1.52155,  1.96899,  2.07787,  2.44496,  2.62108,
+  1.4867,  1.57368,  2.00184,  2.10852,  2.43377,  2.62616,
+  1.47103,  1.5436,  1.99166,  2.11171,  2.47331,  2.64546,
+  1.41527,  1.52449,  2.0127,  2.09575,  2.45882,  2.64202,
+  1.40751,  1.50149,  2.05031,  2.1562,  2.48019,  2.62327,
+  1.37612,  1.45958,  2.00994,  2.16941,  2.4802,  2.64269,
+  1.34595,  1.47288,  2.07312,  2.18486,  2.48613,  2.61036,
+  1.30637,  1.43838,  2.0905,  2.21314,  2.5542,  2.68395,
+  1.21926,  1.42304,  2.09092,  2.17049,  2.55962,  2.66821,
+  1.18047,  1.40808,  1.93517,  2.08818,  2.54813,  2.63944,
+  1.20954,  1.52893,  1.88727,  1.96188,  2.48344,  2.64934,
+  1.21992,  1.52138,  1.93918,  1.98802,  2.46003,  2.67348,
+  1.19875,  1.4741,  1.85911,  1.98104,  2.39535,  2.7192,
+  1.11841,  1.50485,  1.89794,  2.00238,  2.24287,  2.59852,
+  1.01853,  1.45989,  1.74659,  2.05195,  2.32486,  2.45885,
+  0.86699,  1.38778,  1.6541,  1.79974,  2.32579,  2.40738,
+  0.862252,  1.36583,  1.70576,  1.80225,  2.41635,  2.49385,
+  0.928394,  1.54645,  1.71668,  1.87707,  2.37972,  2.52459,
+  1.08335,  1.48734,  1.80115,  2.00569,  2.32174,  2.55873,
+  1.05743,  1.3398,  1.83442,  1.9346,  2.27962,  2.5307,
+  0.954787,  1.141,  1.79287,  1.8918,  2.34291,  2.49204,
+  0.996853,  1.13004,  1.79215,  1.89541,  2.23624,  2.40335,
+  0.920268,  1.06949,  1.87486,  2.07209,  2.33523,  2.48657,
+  0.954214,  1.08107,  1.82732,  2.07915,  2.23882,  2.50812,
+  0.894487,  1.01384,  1.71654,  2.01845,  2.17535,  2.48224,
+  0.842005,  0.979634,  1.64453,  1.9459,  2.27102,  2.43863,
+  0.95571,  1.09,  1.75405,  1.96707,  2.12784,  2.44888,
+  0.954385,  1.09447,  1.72755,  2.00558,  2.26657,  2.5144,
+  1.02562,  1.1376,  1.78753,  2.00208,  2.3369,  2.51184,
+  1.01381,  1.1751,  1.88194,  2.01664,  2.34586,  2.44572,
+  1.08267,  1.2273,  1.92324,  2.02278,  2.40238,  2.52097,
+  1.11811,  1.22414,  1.82445,  1.96175,  2.24583,  2.51583,
+  1.14645,  1.29899,  1.87293,  1.99547,  2.37173,  2.5269,
+  1.18855,  1.31065,  1.90221,  1.99678,  2.29037,  2.52054,
+  1.30992,  1.41653,  1.87845,  2.05009,  2.22418,  2.38779,
+  1.39476,  1.50627,  1.93489,  2.05682,  2.27119,  2.45334,
+  1.37793,  1.57264,  1.9907,  2.08357,  2.38159,  2.60652,
+  1.44402,  1.6893,  1.99746,  2.15321,  2.36113,  2.5077,
+  1.51504,  1.64277,  1.92909,  2.15934,  2.33551,  2.49784,
+  1.54008,  1.70831,  1.88382,  2.09498,  2.39862,  2.5701,
+  1.60091,  1.69851,  1.88148,  2.08517,  2.45101,  2.65374,
+  1.50263,  1.75606,  2.04072,  2.1634,  2.37617,  2.54867,
+  1.53211,  1.85534,  1.99384,  2.13955,  2.30249,  2.43099,
+  1.48486,  1.82205,  1.9643,  2.13596,  2.33702,  2.47234,
+  1.53669,  1.76692,  1.95125,  2.09052,  2.32417,  2.52921,
+  1.58228,  1.72385,  1.91207,  2.06937,  2.30294,  2.4739,
+  1.49971,  1.59329,  1.9127,  2.0341,  2.36655,  2.55379,
+  1.4342,  1.54071,  1.86757,  1.98917,  2.32371,  2.5394,
+  1.1891,  1.50082,  1.76342,  1.9762,  2.13728,  2.44118,
+  1.16592,  1.47018,  1.773,  1.9271,  2.08801,  2.3043,
+  1.25015,  1.60042,  1.81807,  1.92211,  2.08025,  2.24181,
+  1.12269,  1.6288,  1.81441,  1.93295,  2.0993,  2.41867,
+  1.01962,  1.51066,  1.85073,  1.99562,  2.1302,  2.45706,
+  0.958176,  1.63968,  1.84043,  1.95653,  2.10428,  2.27903,
+  1.01054,  1.53751,  1.77222,  1.93052,  2.10162,  2.24851,
+  0.904371,  1.50502,  1.66433,  1.82788,  2.27803,  2.34842,
+  1.06773,  1.45454,  1.68686,  1.80346,  2.38437,  2.49979,
+  1.26287,  1.516,  1.88275,  1.97556,  2.35357,  2.51973,
+  1.56064,  1.69896,  1.92154,  2.00006,  2.54029,  2.60523,
+  1.66562,  1.74409,  1.99592,  2.104,  2.53894,  2.62016,
+  1.61517,  1.7485,  2.02411,  2.12606,  2.40816,  2.61413,
+  1.67803,  1.75295,  2.0279,  2.14656,  2.38237,  2.56851,
+  1.58035,  1.68027,  1.99741,  2.12246,  2.45985,  2.58783,
+  1.59008,  1.69205,  1.93478,  2.09576,  2.55298,  2.62588,
+  1.539,  1.62024,  1.92077,  2.0316,  2.48167,  2.59269,
+  1.4088,  1.51179,  1.74425,  1.89659,  2.41202,  2.51558,
+  1.32056,  1.48799,  1.75496,  1.89691,  2.43716,  2.56318,
+  1.17487,  1.52485,  1.70818,  1.96295,  2.51378,  2.58101,
+  1.28764,  1.55957,  1.90308,  2.10518,  2.45098,  2.59946,
+  1.22403,  1.508,  1.92279,  2.07637,  2.37291,  2.58121,
+  1.16322,  1.44496,  1.73467,  2.02018,  2.32215,  2.54157,
+  1.21226,  1.448,  1.63849,  2.03192,  2.22935,  2.39947,
+  1.10889,  1.28333,  1.48115,  1.90707,  2.10001,  2.29348,
+  1.15522,  1.29037,  1.47672,  1.68807,  2.08922,  2.18177,
+  1.17147,  1.29039,  1.55651,  1.82599,  2.01814,  2.24349,
+  1.14989,  1.28265,  1.6019,  1.7453,  2.11078,  2.40906,
+  1.22391,  1.36072,  1.65007,  1.79294,  2.2651,  2.37093,
+  1.25437,  1.40454,  1.70667,  1.85465,  2.27647,  2.39469,
+  1.22583,  1.44211,  1.76613,  1.92412,  2.2924,  2.39468,
+  1.21114,  1.46189,  1.80455,  1.92702,  2.36199,  2.45328,
+  1.21864,  1.40578,  1.80953,  1.9142,  2.31845,  2.52005,
+  1.22294,  1.39467,  1.84011,  1.9324,  2.39167,  2.50319,
+  1.2069,  1.37287,  1.84295,  1.9438,  2.42446,  2.57876,
+  1.24631,  1.42383,  1.86621,  1.96241,  2.43605,  2.59566,
+  1.27092,  1.4559,  1.88805,  1.97634,  2.46928,  2.58281,
+  1.19826,  1.32394,  1.88024,  1.94941,  2.47166,  2.6448,
+  1.17432,  1.2932,  1.76561,  2.01928,  2.28224,  2.57624,
+  1.14173,  1.38319,  1.88283,  2.12653,  2.45304,  2.61119,
+  1.48334,  1.65073,  2.04359,  2.1938,  2.51727,  2.62292,
+  1.44607,  1.6219,  1.99961,  2.10353,  2.49348,  2.58192,
+  1.41467,  1.63024,  1.94568,  2.06177,  2.50065,  2.58895,
+  1.43843,  1.61559,  1.90335,  2.01303,  2.42611,  2.61364,
+  1.55667,  1.62312,  1.87546,  1.97231,  2.36669,  2.62922,
+  1.4665,  1.63832,  1.79658,  1.95927,  2.45762,  2.60323,
+  1.30828,  1.48139,  1.73054,  1.97927,  2.33226,  2.53809,
+  1.30165,  1.41374,  1.67444,  1.93338,  2.14349,  2.50814,
+  1.31891,  1.41656,  1.75164,  1.91344,  2.29409,  2.55512,
+  1.32451,  1.42562,  1.84492,  1.94741,  2.37538,  2.59737,
+  1.267,  1.35973,  1.84915,  1.95084,  2.37072,  2.5793,
+  1.1627,  1.34431,  1.90693,  1.98657,  2.47058,  2.58342,
+  1.116,  1.36583,  1.94803,  2.04008,  2.46113,  2.5836,
+  1.0618,  1.35029,  2.00628,  2.08046,  2.45163,  2.52696,
+  1.02433,  1.23357,  1.98941,  2.08505,  2.38718,  2.49582,
+  0.962287,  1.21924,  1.967,  2.08919,  2.42466,  2.59986,
+  0.881533,  1.35683,  2.04743,  2.15539,  2.40907,  2.50875,
+  0.85601,  1.21772,  2.00853,  2.11153,  2.42481,  2.53774,
+  0.774065,  0.965055,  1.87414,  2.03588,  2.25102,  2.52797,
+  0.820344,  0.990331,  1.96096,  2.24212,  2.34955,  2.53547,
+  0.846158,  1.06289,  1.97251,  2.16915,  2.35316,  2.55609,
+  0.748812,  1.06344,  1.94995,  2.06685,  2.36451,  2.602,
+  0.855725,  1.15838,  2.00842,  2.14414,  2.3285,  2.60048,
+  0.862076,  1.18823,  1.90646,  2.19135,  2.36851,  2.54264,
+  0.814218,  1.19401,  2.0864,  2.15686,  2.48295,  2.57478,
+  0.811087,  1.32095,  2.03826,  2.11283,  2.50888,  2.59894,
+  0.967874,  1.19172,  2.04932,  2.14652,  2.42267,  2.56678,
+  1.00803,  1.2342,  2.04091,  2.12104,  2.48015,  2.60909,
+  1.11818,  1.31227,  1.96142,  2.07124,  2.40932,  2.60053,
+  1.18934,  1.30243,  1.96196,  2.06321,  2.43212,  2.5453,
+  1.25389,  1.37123,  1.93188,  2.03014,  2.38756,  2.55895,
+  1.3073,  1.39804,  1.91099,  2.00694,  2.40944,  2.57714,
+  1.33009,  1.46846,  1.90852,  2.01222,  2.41802,  2.53768,
+  1.36799,  1.49229,  1.94202,  2.03675,  2.49887,  2.581,
+  1.36837,  1.44343,  1.94748,  2.01318,  2.48634,  2.58524,
+  1.41828,  1.49685,  1.93344,  2.02463,  2.47368,  2.59404,
+  1.44389,  1.55122,  1.90491,  2.0181,  2.45672,  2.54287,
+  1.47369,  1.5871,  1.89983,  2.07901,  2.4215,  2.58448,
+  1.42467,  1.61133,  1.97452,  2.14272,  2.40288,  2.62076,
+  1.43149,  1.62266,  1.94023,  2.12544,  2.42965,  2.58185,
+  1.48454,  1.69058,  1.92186,  2.1091,  2.4744,  2.60783,
+  1.49814,  1.75158,  1.92573,  2.03913,  2.44052,  2.61618,
+  1.50525,  1.78918,  1.99467,  2.11413,  2.40842,  2.59989,
+  1.60987,  1.79304,  1.98623,  2.1606,  2.51957,  2.59325,
+  1.56282,  1.73991,  1.97418,  2.14322,  2.53959,  2.62009,
+  1.65026,  1.72396,  2.00295,  2.1504,  2.5321,  2.60075,
+  1.58463,  1.66548,  1.83385,  1.97966,  2.51117,  2.57618,
+  1.54756,  1.66563,  1.80511,  1.93045,  2.42867,  2.54861,
+  1.49908,  1.59512,  1.70027,  1.82419,  2.37692,  2.57548,
+  1.30084,  1.55295,  1.66458,  1.79171,  2.4883,  2.56108,
+  1.1686,  1.31195,  1.66858,  1.87291,  2.41357,  2.49328,
+  1.04746,  1.24996,  1.69989,  1.91418,  2.41703,  2.49638,
+  0.948776,  1.27559,  1.73894,  1.99868,  2.31215,  2.46202,
+  0.921081,  1.31195,  1.77524,  1.89549,  2.38216,  2.52844,
+  0.811311,  1.12522,  1.74519,  2.09474,  2.32611,  2.51188,
+  0.796518,  1.06023,  1.74013,  2.0605,  2.17951,  2.3855,
+  0.868836,  1.15335,  1.79283,  1.94564,  2.1255,  2.248,
+  0.915536,  1.21816,  1.81891,  2.06835,  2.2434,  2.34865,
+  0.966595,  1.30161,  1.89525,  2.11196,  2.24865,  2.38925,
+  0.995849,  1.44208,  1.95207,  2.06612,  2.24012,  2.33859,
+  1.05639,  1.37221,  1.98417,  2.11933,  2.2717,  2.37274,
+  1.0984,  1.32416,  1.78153,  2.08286,  2.2188,  2.34432,
+  1.03916,  1.35647,  1.82018,  2.11462,  2.34673,  2.45039,
+  0.988689,  1.29388,  1.91635,  2.0882,  2.3625,  2.48127,
+  1.10441,  1.23068,  1.93943,  2.1224,  2.25481,  2.37771,
+  1.0861,  1.17448,  1.82635,  2.11132,  2.23769,  2.47167,
+  1.0698,  1.20649,  1.84538,  2.11863,  2.47109,  2.5754,
+  1.07496,  1.34279,  1.95531,  2.14771,  2.51147,  2.58927,
+  1.1492,  1.41881,  1.88704,  1.96697,  2.47262,  2.58725,
+  1.45575,  1.66983,  1.9641,  2.17518,  2.46999,  2.60501,
+  1.41855,  1.60357,  1.96443,  2.17568,  2.46676,  2.58333,
+  1.38939,  1.60116,  1.92575,  2.13186,  2.44202,  2.57423,
+  1.41533,  1.50734,  1.91126,  2.08714,  2.5352,  2.62958,
+  1.38248,  1.45371,  1.87229,  1.95541,  2.55434,  2.65851,
+  1.39294,  1.4823,  1.83853,  1.92858,  2.47373,  2.63372,
+  1.39046,  1.46304,  1.83991,  1.92201,  2.51494,  2.69879,
+  1.33938,  1.47012,  1.85875,  1.95952,  2.53943,  2.68638,
+  1.35378,  1.54103,  1.82255,  2.02216,  2.54222,  2.6772,
+  1.35087,  1.63188,  1.91879,  2.18353,  2.50109,  2.61731,
+  1.40764,  1.66913,  2.00074,  2.22423,  2.5228,  2.6349,
+  1.43378,  1.58691,  1.99963,  2.19292,  2.53598,  2.62612,
+  1.41388,  1.63943,  1.9522,  2.1707,  2.50111,  2.61059,
+  1.50539,  1.61369,  1.99159,  2.21446,  2.48787,  2.61284,
+  1.40925,  1.56369,  2.04804,  2.15415,  2.48373,  2.64218,
+  1.41102,  1.6467,  1.98318,  2.15255,  2.56881,  2.66125,
+  1.38475,  1.60381,  1.93449,  2.14195,  2.50764,  2.63005,
+  1.36612,  1.55134,  1.99956,  2.17747,  2.48911,  2.59676,
+  1.35554,  1.63502,  2.00842,  2.16267,  2.46527,  2.66141,
+  1.45397,  1.6737,  2.03786,  2.1802,  2.61597,  2.70928,
+  1.36954,  1.69647,  1.99979,  2.08485,  2.48277,  2.66629,
+  1.34974,  1.46231,  1.96672,  2.05172,  2.47262,  2.65262,
+  1.32731,  1.43776,  1.92852,  2.00639,  2.50581,  2.65892,
+  1.34135,  1.41915,  1.9212,  1.99146,  2.53082,  2.61358,
+  1.3427,  1.50533,  1.94693,  2.02943,  2.53822,  2.63558,
+  1.39274,  1.5351,  1.9361,  2.02457,  2.52728,  2.61426,
+  1.43256,  1.54379,  1.95185,  2.04985,  2.54624,  2.62371,
+  1.45294,  1.56943,  1.93237,  2.03725,  2.55869,  2.6381,
+  1.468,  1.59745,  1.92031,  2.01857,  2.53622,  2.62282,
+  1.48681,  1.56965,  1.87585,  1.96607,  2.53674,  2.63191,
+  1.45462,  1.57813,  1.81162,  1.97466,  2.53751,  2.60633,
+  1.41804,  1.50767,  1.78357,  1.893,  2.5518,  2.62899,
+  1.26414,  1.47438,  1.77059,  1.89893,  2.52476,  2.59407,
+  1.11834,  1.45667,  1.73472,  1.99659,  2.41229,  2.51915,
+  1.09643,  1.60312,  1.80839,  2.01224,  2.40962,  2.54436,
+  0.976303,  1.47374,  1.75917,  1.85583,  2.41293,  2.48395,
+  0.990184,  1.3907,  1.71071,  1.83167,  2.37709,  2.45494,
+  1.0569,  1.38737,  1.78311,  1.87351,  2.40142,  2.48642,
+  0.989786,  1.45262,  1.85157,  1.94592,  2.40345,  2.48294,
+  1.11208,  1.36482,  1.77,  1.922,  2.29041,  2.4373,
+  1.09625,  1.33639,  1.74186,  1.96857,  2.21161,  2.36249,
+  1.00003,  1.34618,  1.70453,  1.96685,  2.27739,  2.38937,
+  1.0279,  1.17407,  1.793,  2.02685,  2.1782,  2.38723,
+  1.05688,  1.1675,  1.861,  2.20442,  2.35125,  2.48563,
+  1.07597,  1.22642,  1.99764,  2.19618,  2.3301,  2.49414,
+  1.14722,  1.25813,  1.95867,  2.25855,  2.38775,  2.55212,
+  1.16281,  1.29057,  2.05279,  2.20183,  2.42462,  2.56048,
+  1.14789,  1.26573,  2.02568,  2.13079,  2.49688,  2.62026,
+  1.23956,  1.31573,  2.01838,  2.12351,  2.46395,  2.56921,
+  1.18113,  1.35894,  1.94216,  2.15983,  2.4587,  2.59396,
+  1.24746,  1.38644,  1.89825,  1.99901,  2.44602,  2.54276,
+  1.22769,  1.50489,  1.818,  1.90802,  2.21333,  2.55223,
+  1.20197,  1.57787,  1.77128,  1.87335,  2.06126,  2.53582,
+  1.30623,  1.51631,  1.81923,  1.92342,  2.38203,  2.58257,
+  1.50572,  1.58565,  1.94933,  2.0462,  2.44831,  2.61596,
+  1.62375,  1.69873,  2.00954,  2.10801,  2.46152,  2.6479,
+  1.69086,  1.76429,  2.0361,  2.1755,  2.51525,  2.61682,
+  1.71534,  1.82829,  2.07855,  2.25221,  2.48367,  2.60765,
+  1.65997,  1.80717,  1.97501,  2.25559,  2.48134,  2.58962,
+  1.73482,  1.85022,  2.01204,  2.27674,  2.51936,  2.60818,
+  1.63577,  1.86255,  1.95646,  2.32874,  2.56887,  2.63247,
+  1.61635,  1.8254,  1.94952,  2.28122,  2.56086,  2.6418,
+  1.59247,  1.80436,  1.92716,  2.16734,  2.57751,  2.64687,
+  1.60648,  1.89509,  1.98315,  2.11245,  2.47761,  2.57696,
+  1.70849,  1.83507,  1.96671,  2.12724,  2.42757,  2.54308,
+  1.69109,  1.88958,  1.98607,  2.20677,  2.5224,  2.6018,
+  1.70244,  1.90212,  2.07638,  2.21622,  2.48484,  2.60354,
+  1.32949,  1.54259,  1.87544,  2.10553,  2.38523,  2.53663,
+  1.32138,  1.47416,  1.93227,  2.1525,  2.37442,  2.50671,
+  1.27775,  1.45858,  1.96309,  2.18238,  2.417,  2.55865,
+  1.20802,  1.41871,  2.00974,  2.13853,  2.39678,  2.55451,
+  1.19891,  1.29992,  1.98363,  2.15013,  2.29612,  2.50594,
+  1.25034,  1.36116,  2.01056,  2.19594,  2.34098,  2.50087,
+  1.30866,  1.58516,  2.10634,  2.21416,  2.40267,  2.63589,
+  1.33017,  1.49463,  2.1419,  2.23581,  2.45958,  2.64947,
+  1.29631,  1.43411,  2.09809,  2.20413,  2.35521,  2.60011,
+  1.30962,  1.40298,  1.89254,  2.18495,  2.33361,  2.51316,
+  1.26907,  1.49184,  1.95896,  2.17457,  2.32469,  2.54367,
+  1.43498,  1.62885,  1.98127,  2.24728,  2.4764,  2.59398,
+  1.45964,  1.65008,  2.02437,  2.26772,  2.54631,  2.6752,
+  1.38149,  1.70319,  2.13891,  2.29556,  2.54576,  2.64253,
+  1.44184,  1.70059,  2.19791,  2.27629,  2.46821,  2.69495,
+  1.53967,  1.99967,  2.20653,  2.35148,  2.65123,  2.73482,
+  1.58958,  1.92641,  2.17346,  2.2562,  2.63324,  2.70768,
+  1.43426,  1.85937,  2.14195,  2.21145,  2.51178,  2.62838,
+  1.32681,  1.59657,  2.02477,  2.11581,  2.42614,  2.60934,
+  1.22907,  1.32555,  1.8387,  2.01305,  2.4713,  2.63928,
+  1.23081,  1.32906,  1.87262,  1.96451,  2.44475,  2.59469,
+  1.1937,  1.4263,  1.89859,  2.03936,  2.50271,  2.58105,
+  1.17564,  1.47329,  1.91242,  2.00274,  2.47622,  2.60685,
+  1.09927,  1.4439,  1.89246,  1.99757,  2.52208,  2.61109,
+  1.11374,  1.4391,  1.91227,  2.00048,  2.46277,  2.55934,
+  1.08551,  1.46963,  1.91446,  2.06461,  2.42792,  2.51241,
+  1.05248,  1.5012,  1.9188,  1.99979,  2.49368,  2.57171,
+  1.0436,  1.33162,  1.92795,  1.98919,  2.44573,  2.57808,
+  1.05198,  1.20039,  1.93863,  2.02681,  2.44675,  2.62988,
+  0.978672,  1.08304,  1.86878,  2.13358,  2.43014,  2.58027,
+  0.904772,  1.10521,  1.96057,  2.06495,  2.36256,  2.60488,
+  0.859439,  1.08463,  1.90171,  2.033,  2.27617,  2.57472,
+  0.948943,  1.04355,  1.85564,  2.05086,  2.44443,  2.66148,
+  0.974338,  1.12646,  1.92732,  2.02091,  2.45549,  2.55978,
+  0.995629,  1.17589,  1.93774,  2.01368,  2.37897,  2.61729,
+  1.00131,  1.22439,  1.9017,  1.97647,  2.42588,  2.57484,
+  0.985969,  1.2826,  1.88661,  2.03245,  2.45596,  2.59953,
+  0.92759,  1.32045,  1.92401,  2.01217,  2.49831,  2.59968,
+  1.00794,  1.38396,  1.92163,  2.00762,  2.50757,  2.6075,
+  0.972512,  1.44677,  1.92036,  2.01349,  2.49021,  2.57649,
+  0.951123,  1.45204,  1.88986,  1.98727,  2.42148,  2.56222,
+  0.924342,  1.36995,  1.85174,  1.94274,  2.47566,  2.54428,
+  0.882605,  1.30167,  1.85081,  2.0325,  2.36463,  2.54182,
+  0.933888,  1.369,  1.94311,  2.02385,  2.40544,  2.53033,
+  0.927916,  1.11238,  1.84743,  1.97909,  2.2556,  2.56399,
+  1.03194,  1.24913,  1.83317,  1.92522,  2.31031,  2.52014,
+  0.934046,  1.23989,  1.9096,  2.00815,  2.37287,  2.54896,
+  0.984297,  1.22003,  1.82379,  1.9476,  2.26436,  2.47865,
+  0.933366,  1.27898,  1.86047,  1.943,  2.2898,  2.46567,
+  0.983115,  1.22771,  1.8421,  2.0477,  2.27265,  2.53198,
+  0.953311,  1.24582,  1.84968,  1.94514,  2.28957,  2.57228,
+  0.994609,  1.30346,  1.86814,  1.97156,  2.37244,  2.58526,
+  0.986061,  1.36409,  1.85213,  1.91782,  2.43511,  2.63387,
+  0.975486,  1.24885,  1.8488,  1.93443,  2.40202,  2.5742,
+  1.00839,  1.30468,  1.80431,  1.88851,  2.36947,  2.59823,
+  0.999393,  1.32994,  1.90144,  1.99438,  2.3975,  2.50455,
+  0.922186,  1.32154,  1.85108,  1.96206,  2.38216,  2.47299,
+  0.897224,  1.38219,  1.78084,  1.92173,  2.35959,  2.44809,
+  0.859516,  1.44737,  1.73231,  1.88119,  2.29523,  2.38085,
+  0.986347,  1.60164,  1.75239,  1.96636,  2.31438,  2.4591,
+  1.26526,  1.61653,  1.81127,  2.09714,  2.37124,  2.55036,
+  1.31896,  1.60043,  1.75564,  2.02981,  2.32919,  2.49314,
+  1.2099,  1.47013,  1.67019,  1.97073,  2.41621,  2.52342,
+  1.12223,  1.3084,  1.45711,  1.72023,  2.38426,  2.47042,
+  1.07767,  1.24551,  1.36648,  1.66428,  2.32734,  2.4192,
+  1.07545,  1.22813,  1.36538,  1.55895,  2.23858,  2.32456,
+  1.0445,  1.21579,  1.32599,  1.64519,  2.14864,  2.22575,
+  0.955863,  1.15061,  1.28313,  1.49231,  2.17758,  2.26668,
+  0.909204,  1.04511,  1.16616,  1.32059,  2.21597,  2.35285,
+  0.960368,  1.10354,  1.27835,  1.46773,  2.26015,  2.46024,
+  1.01022,  1.18678,  1.29006,  1.57843,  2.38873,  2.50032,
+  1.02014,  1.13572,  1.23934,  1.38884,  2.43818,  2.56392,
+  1.08249,  1.20695,  1.34746,  1.49004,  2.40482,  2.49462,
+  1.14411,  1.27864,  1.43473,  1.56789,  2.32277,  2.4248,
+  1.2743,  1.34879,  1.5156,  1.63222,  2.36011,  2.55279,
+  1.30133,  1.39063,  1.63849,  1.76491,  2.34796,  2.57611,
+  1.35852,  1.44445,  1.72449,  1.84371,  2.47814,  2.57455,
+  1.39971,  1.51331,  1.79171,  1.90217,  2.49582,  2.58159,
+  1.44887,  1.53475,  1.82151,  1.93149,  2.51782,  2.62286,
+  1.4384,  1.53006,  1.83144,  1.99933,  2.53193,  2.62328,
+  1.51192,  1.58109,  1.92748,  2.0414,  2.57329,  2.66347,
+  1.53538,  1.60831,  1.92423,  2.0488,  2.54675,  2.68165,
+  1.54437,  1.62041,  1.98043,  2.06813,  2.4774,  2.62665,
+  1.55846,  1.64301,  2.02461,  2.12101,  2.45187,  2.63949,
+  1.5242,  1.61395,  2.0059,  2.11548,  2.42909,  2.66308,
+  1.50452,  1.59038,  1.96636,  2.07263,  2.3769,  2.62109,
+  1.43939,  1.51234,  1.95035,  2.05856,  2.27641,  2.57304,
+  1.31521,  1.40005,  1.85475,  1.95763,  2.2462,  2.5765,
+  1.28812,  1.4889,  1.94557,  2.02484,  2.43985,  2.60568,
+  1.43628,  1.66725,  2.05685,  2.14644,  2.54824,  2.66174,
+  1.41739,  1.81984,  2.08357,  2.22028,  2.60669,  2.69086,
+  1.3736,  1.96301,  2.14457,  2.27406,  2.54739,  2.6389,
+  1.32037,  1.91864,  2.06321,  2.23772,  2.41585,  2.51765,
+  1.22378,  1.61975,  1.89059,  2.10791,  2.521,  2.6297,
+  1.01875,  1.42767,  1.91757,  2.00178,  2.43551,  2.56435,
+  1.02625,  1.37705,  1.94917,  2.03921,  2.39377,  2.53005,
+  1.00999,  1.47285,  1.99805,  2.07988,  2.48496,  2.55395,
+  1.05327,  1.46837,  2.01612,  2.12931,  2.45662,  2.56413,
+  1.10107,  1.35527,  2.01044,  2.10747,  2.39561,  2.53775,
+  1.1328,  1.39166,  2.01657,  2.1141,  2.49762,  2.5851,
+  1.17331,  1.44301,  1.97063,  2.10486,  2.44788,  2.53594,
+  1.20948,  1.3841,  1.97224,  2.06959,  2.45749,  2.57369,
+  1.24242,  1.45356,  1.98373,  2.06842,  2.47104,  2.59361,
+  1.32039,  1.46365,  1.99783,  2.08233,  2.47203,  2.60589,
+  1.38952,  1.47773,  1.97869,  2.09404,  2.48017,  2.64444,
+  1.41374,  1.52609,  1.96375,  2.11392,  2.40385,  2.65443,
+  1.51942,  1.59285,  1.91946,  2.02449,  2.30117,  2.66889,
+  1.51366,  1.60013,  1.92201,  2.1051,  2.27832,  2.52342,
+  1.48185,  1.65994,  1.91355,  2.04944,  2.27225,  2.49379,
+  1.56755,  1.65917,  1.93065,  2.07152,  2.31259,  2.56427,
+  1.55089,  1.67766,  1.86393,  2.01013,  2.22347,  2.52001,
+  1.57277,  1.68302,  1.86305,  2.0022,  2.32038,  2.56079,
+  1.62194,  1.73405,  1.92064,  2.06293,  2.33511,  2.57625,
+  1.63149,  1.69714,  1.95288,  2.05658,  2.45963,  2.65286,
+  1.59471,  1.67149,  1.93609,  2.0133,  2.43078,  2.66963,
+  1.60144,  1.6687,  1.9455,  2.03717,  2.50337,  2.68212,
+  1.58757,  1.6649,  1.94462,  2.03299,  2.56976,  2.70341,
+  1.55642,  1.63125,  1.93071,  2.04051,  2.45387,  2.66518,
+  1.48785,  1.56563,  1.89287,  2.01173,  2.39394,  2.64712,
+  1.40601,  1.52018,  1.79165,  1.98788,  2.28933,  2.60276,
+  1.35822,  1.43604,  1.81848,  1.95708,  2.3098,  2.60578,
+  1.30934,  1.40533,  1.8357,  2.07637,  2.34081,  2.61306,
+  1.30379,  1.41561,  1.98515,  2.12949,  2.46936,  2.64312,
+  1.35895,  1.43773,  1.98883,  2.12737,  2.53798,  2.65647,
+  1.33387,  1.48046,  1.95007,  2.12244,  2.43117,  2.58713,
+  1.38453,  1.53971,  1.96409,  2.13055,  2.51045,  2.65281,
+  1.41262,  1.54444,  1.94728,  2.17319,  2.59302,  2.71664,
+  1.43327,  1.53989,  2.00413,  2.20195,  2.51505,  2.63524,
+  1.44758,  1.55402,  2.12827,  2.24017,  2.47075,  2.65708,
+  1.48065,  1.6099,  2.09796,  2.16757,  2.4737,  2.7007,
+  1.60782,  1.67596,  2.02341,  2.14638,  2.42691,  2.63625,
+  1.6433,  1.71778,  2.06066,  2.19756,  2.41541,  2.61433,
+  1.73739,  1.81697,  2.03936,  2.21971,  2.423,  2.62353,
+  1.69426,  1.79937,  2.0426,  2.2801,  2.41863,  2.58327,
+  1.55619,  1.83187,  1.98536,  2.2079,  2.47168,  2.63082,
+  1.42115,  1.8039,  1.98458,  2.12351,  2.4382,  2.5225,
+  1.32744,  1.66887,  1.88843,  2.02994,  2.22446,  2.46175,
+  1.10982,  1.5622,  1.86266,  1.97786,  2.13955,  2.32864,
+  1.23388,  1.5808,  1.85419,  2.02179,  2.1935,  2.35592,
+  1.20754,  1.56864,  1.87291,  1.98667,  2.13794,  2.48765,
+  1.17998,  1.62595,  1.9,  2.00814,  2.23166,  2.59435,
+  1.46984,  1.7172,  1.87567,  2.02443,  2.32546,  2.48842,
+  1.6411,  1.80978,  1.92676,  2.06205,  2.41404,  2.5429,
+  1.6488,  1.73412,  1.9669,  2.08673,  2.35448,  2.49884,
+  1.60547,  1.68939,  2.01005,  2.11421,  2.40763,  2.52707,
+  1.52089,  1.62873,  1.97701,  2.08677,  2.34016,  2.48934,
+  1.50382,  1.60059,  2.03901,  2.13038,  2.39648,  2.51374,
+  1.43782,  1.54532,  2.04393,  2.18837,  2.35682,  2.52145,
+  1.4454,  1.54921,  1.98221,  2.09666,  2.32863,  2.46213,
+  1.41642,  1.50436,  1.97377,  2.08043,  2.39348,  2.54353,
+  1.42582,  1.52808,  1.99573,  2.16253,  2.44069,  2.56251,
+  1.39427,  1.47395,  2.04354,  2.14909,  2.43298,  2.54908,
+  1.37375,  1.47605,  2.0439,  2.16025,  2.34535,  2.50188,
+  1.37018,  1.44359,  2.09287,  2.1781,  2.41306,  2.5906,
+  1.32039,  1.46637,  2.03678,  2.13781,  2.43562,  2.57891,
+  1.28693,  1.39332,  2.06073,  2.20094,  2.50002,  2.58235,
+  1.32339,  1.42179,  2.0585,  2.15393,  2.49555,  2.63809,
+  1.29531,  1.39322,  2.00442,  2.13819,  2.52637,  2.64154,
+  1.23098,  1.35513,  2.04737,  2.15642,  2.52238,  2.66413,
+  1.23375,  1.30852,  1.93949,  2.09735,  2.48735,  2.64984,
+  1.22759,  1.3551,  1.87583,  1.97754,  2.31929,  2.57519,
+  1.22737,  1.50711,  1.85352,  2.02289,  2.21243,  2.57649,
+  1.1529,  1.47051,  1.83043,  1.95431,  2.33145,  2.53325,
+  1.33666,  1.65018,  1.77921,  2.04342,  2.44482,  2.53964,
+  1.45582,  1.58294,  2.02225,  2.17668,  2.48134,  2.59266,
+  1.43763,  1.55624,  2.08145,  2.17496,  2.48245,  2.61457,
+  1.41647,  1.62089,  2.03301,  2.15707,  2.46292,  2.60159,
+  1.3763,  1.55149,  2.11721,  2.19834,  2.41619,  2.60563,
+  1.4428,  1.65786,  2.12709,  2.2063,  2.34486,  2.57811,
+  1.36811,  1.53873,  2.0602,  2.19805,  2.36688,  2.62224,
+  1.34644,  1.42834,  1.98045,  2.12661,  2.28327,  2.53061,
+  1.30459,  1.37326,  1.92352,  2.09636,  2.23996,  2.50843,
+  1.29803,  1.37159,  1.95497,  2.10751,  2.34971,  2.54557,
+  1.30718,  1.41617,  1.98034,  2.06446,  2.3891,  2.58844,
+  1.2793,  1.39078,  1.95978,  2.09069,  2.43615,  2.61261,
+  1.31702,  1.41587,  1.92187,  2.07179,  2.46382,  2.61622,
+  1.29431,  1.4123,  1.9162,  2.0192,  2.48471,  2.61134,
+  1.31005,  1.40777,  1.85317,  2.00991,  2.46649,  2.64501,
+  1.3413,  1.42233,  1.88516,  1.96781,  2.48386,  2.62632,
+  1.42826,  1.52612,  1.88512,  1.97853,  2.49939,  2.60339,
+  1.50117,  1.58051,  1.84728,  2.00049,  2.46595,  2.60887,
+  1.53851,  1.6254,  1.81392,  1.95006,  2.5229,  2.62047,
+  1.56663,  1.6396,  1.77179,  1.87875,  2.54176,  2.66369,
+  1.54343,  1.64782,  1.74862,  1.8226,  2.43468,  2.63128,
+  1.62339,  1.68092,  1.75915,  1.84454,  2.52147,  2.65361,
+  1.57486,  1.66372,  1.76778,  1.86974,  2.45334,  2.65822,
+  1.55831,  1.66125,  1.79384,  1.89513,  2.26187,  2.57233,
+  1.54368,  1.62776,  1.81767,  1.92128,  2.433,  2.65334,
+  1.49354,  1.57566,  1.80569,  1.93945,  2.47064,  2.66508,
+  1.44005,  1.51384,  1.83221,  1.9378,  2.53025,  2.70287,
+  1.3191,  1.50623,  1.82349,  1.93161,  2.53955,  2.6767,
+  1.30727,  1.56337,  1.84793,  1.95172,  2.25182,  2.45322,
+  1.33641,  1.6616,  1.82882,  1.98833,  2.18951,  2.35425,
+  1.34292,  1.59875,  1.78474,  1.91512,  2.10999,  2.45064,
+  1.3367,  1.64636,  1.80074,  1.89121,  2.23591,  2.55851,
+  1.31176,  1.50001,  1.83022,  1.94504,  2.43039,  2.64458,
+  1.26611,  1.43196,  1.85876,  2.05915,  2.59049,  2.67476,
+  1.31778,  1.41995,  1.91646,  2.12482,  2.57473,  2.66848,
+  1.34152,  1.43617,  1.96842,  2.09744,  2.57279,  2.6851,
+  1.30593,  1.43886,  1.93375,  2.03608,  2.56907,  2.65642,
+  1.27913,  1.40647,  1.94309,  2.03172,  2.53008,  2.63088,
+  1.28601,  1.41003,  1.96969,  2.04024,  2.44857,  2.65137,
+  1.25754,  1.39106,  1.96657,  2.03921,  2.40242,  2.64679,
+  1.22439,  1.35213,  1.93137,  2.00634,  2.4562,  2.69615,
+  1.29629,  1.4881,  1.99695,  2.06819,  2.59454,  2.69584,
+  1.33457,  1.60772,  1.92214,  2.16316,  2.54592,  2.67997,
+  1.38178,  1.64677,  2.03764,  2.20409,  2.54579,  2.63933,
+  1.41682,  1.62893,  2.04593,  2.20935,  2.52385,  2.67579,
+  1.43146,  1.6948,  1.99893,  2.15953,  2.52293,  2.66475,
+  1.38424,  1.62294,  2.03694,  2.11571,  2.52889,  2.63393,
+  1.40383,  1.55836,  2.02735,  2.13802,  2.56277,  2.65938,
+  1.39059,  1.67194,  2.01794,  2.16459,  2.59282,  2.68361,
+  1.35753,  1.55376,  2.02314,  2.21231,  2.42046,  2.55826,
+  1.30172,  1.46582,  2.05293,  2.21596,  2.42069,  2.54852,
+  1.33933,  1.59705,  2.03516,  2.14582,  2.5096,  2.64414,
+  1.34609,  1.63387,  2.00692,  2.11472,  2.57003,  2.68888,
+  1.35844,  1.50167,  1.94958,  2.02763,  2.47964,  2.63746,
+  1.42799,  1.53369,  1.85363,  1.96081,  2.43754,  2.58846,
+  1.507,  1.58581,  1.86464,  1.95027,  2.47877,  2.62455,
+  1.53515,  1.61948,  1.7846,  1.92633,  2.53715,  2.6658,
+  1.49966,  1.57482,  1.68583,  1.82255,  2.53399,  2.70531,
+  1.58548,  1.64242,  1.72185,  1.84674,  2.52449,  2.71035,
+  1.16736,  1.62721,  1.76839,  1.85304,  2.26556,  2.54052,
+  1.11032,  1.50695,  1.80563,  1.88181,  2.36127,  2.58996,
+  1.06643,  1.53942,  1.7463,  1.93612,  2.12799,  2.46118,
+  1.111,  1.56535,  1.85208,  1.96046,  2.21492,  2.4979,
+  1.11612,  1.59069,  1.87918,  1.96908,  2.32329,  2.53297,
+  1.1484,  1.55745,  1.81996,  1.96379,  2.38034,  2.48453,
+  1.09256,  1.56982,  1.784,  1.95924,  2.32426,  2.46849,
+  1.213,  1.57893,  1.75164,  1.90157,  2.27177,  2.38609,
+  1.12398,  1.62627,  1.75806,  1.98376,  2.29113,  2.408,
+  1.07579,  1.53483,  1.78478,  2.04194,  2.2367,  2.36811,
+  1.11878,  1.41569,  1.97193,  2.12276,  2.33025,  2.44046,
+  1.01609,  1.33452,  1.8992,  2.12157,  2.42514,  2.54387,
+  1.0662,  1.28942,  1.94816,  2.08195,  2.47149,  2.59382,
+  1.06499,  1.25576,  1.93597,  2.03695,  2.49318,  2.61275,
+  1.04967,  1.22845,  1.82953,  2.02506,  2.43107,  2.67084,
+  1.01963,  1.31358,  1.88031,  1.95395,  2.49169,  2.64266,
+  1.15348,  1.5519,  1.90975,  2.13353,  2.54007,  2.62647,
+  1.29303,  1.60048,  2.03569,  2.16688,  2.57297,  2.65826,
+  1.40931,  1.62414,  1.99362,  2.26849,  2.52706,  2.65186,
+  1.4264,  1.68151,  2.03941,  2.21528,  2.55906,  2.6814,
+  1.42204,  1.75264,  2.02799,  2.23143,  2.54648,  2.63124,
+  1.40307,  1.73555,  2.00708,  2.20211,  2.63554,  2.71835,
+  1.36412,  1.68736,  2.01193,  2.29363,  2.6407,  2.70526,
+  1.32806,  1.60827,  1.98985,  2.36496,  2.59056,  2.68945,
+  1.33359,  1.64487,  2.1305,  2.30858,  2.64414,  2.73281,
+  1.40524,  1.66596,  2.12336,  2.31586,  2.65694,  2.73287,
+  1.43537,  1.67954,  2.0191,  2.2544,  2.59608,  2.67406,
+  1.04103,  1.47652,  1.92332,  2.29056,  2.59234,  2.67362,
+  0.818396,  1.18975,  2.05137,  2.23338,  2.4171,  2.62257,
+  0.745703,  1.24025,  2.13926,  2.22418,  2.47642,  2.55879,
+  0.786217,  1.29674,  2.00436,  2.24582,  2.54872,  2.6314,
+  0.781573,  1.12234,  1.87575,  2.27728,  2.45942,  2.55721,
+  0.697586,  1.32715,  2.09799,  2.17356,  2.57467,  2.6936,
+  0.773107,  1.39301,  1.97117,  2.27022,  2.5915,  2.65154,
+  0.799951,  1.25267,  1.92838,  2.21123,  2.57772,  2.68382,
+  0.737528,  1.23791,  1.82716,  2.11053,  2.4763,  2.62767,
+  0.896067,  1.42136,  1.84116,  2.10482,  2.43287,  2.58572,
+  0.920446,  1.41858,  1.94342,  2.2527,  2.49124,  2.62311,
+  0.905094,  1.28473,  1.84369,  2.26911,  2.47954,  2.59591,
+  1.04955,  1.4475,  1.84117,  2.16036,  2.57575,  2.6557,
+  1.2828,  1.44542,  1.90123,  2.29017,  2.58164,  2.67873,
+  1.17471,  1.51702,  1.86793,  2.17662,  2.54748,  2.64015,
+  1.24126,  1.5185,  1.93677,  2.20877,  2.52132,  2.61983,
+  1.32193,  1.5402,  1.99853,  2.20577,  2.60566,  2.70791,
+  1.3038,  1.62293,  1.88039,  2.18949,  2.58891,  2.66997,
+  1.36083,  1.65855,  1.90332,  2.17801,  2.55428,  2.63477,
+  1.38546,  1.62331,  1.9591,  2.25774,  2.60539,  2.69462,
+  1.46795,  1.62817,  2.0031,  2.34892,  2.5961,  2.67456,
+  1.41184,  1.69139,  1.94701,  2.25922,  2.52614,  2.61511,
+  1.41526,  1.69746,  2.0031,  2.28429,  2.52624,  2.64336,
+  1.36534,  1.61019,  2.0221,  2.1717,  2.5576,  2.64224,
+  1.34395,  1.63077,  2.04084,  2.26171,  2.47792,  2.64736,
+  1.33358,  1.63038,  2.0312,  2.21087,  2.50406,  2.62333,
+  1.34412,  1.70468,  2.06581,  2.19257,  2.54136,  2.65852,
+  1.43988,  1.66659,  2.08273,  2.20601,  2.63634,  2.69917,
+  1.34435,  1.65594,  2.02685,  2.22783,  2.56587,  2.66126,
+  1.29968,  1.58529,  1.96155,  2.23114,  2.59956,  2.6776,
+  1.18443,  1.44165,  1.88854,  2.25541,  2.55466,  2.62551,
+  1.44657,  1.79255,  2.02266,  2.17921,  2.49716,  2.59111,
+  1.46468,  1.80928,  2.06019,  2.20545,  2.54596,  2.64191,
+  1.48129,  1.72952,  2.02569,  2.25001,  2.53746,  2.66775,
+  1.47646,  1.65779,  2.00806,  2.2492,  2.50322,  2.61312,
+  1.38626,  1.58955,  2.0317,  2.2183,  2.50921,  2.6191,
+  1.38626,  1.66286,  2.05258,  2.20868,  2.48839,  2.62305,
+  1.43812,  1.64607,  1.96782,  2.21244,  2.50872,  2.6294,
+  1.4376,  1.59023,  2.08908,  2.18445,  2.56655,  2.67785,
+  1.36702,  1.65253,  2.08437,  2.16949,  2.4836,  2.65574,
+  1.40378,  1.70134,  2.0628,  2.14854,  2.44319,  2.65725,
+  1.39919,  1.70605,  2.06243,  2.14458,  2.53122,  2.63501,
+  1.40966,  1.75057,  2.00507,  2.08724,  2.60283,  2.69407,
+  1.43015,  1.7604,  2.0488,  2.11806,  2.56938,  2.65727,
+  1.41885,  1.85893,  2.01867,  2.14141,  2.59787,  2.67114,
+  1.51504,  1.81561,  1.94217,  2.08906,  2.55465,  2.6346,
+  1.42003,  1.74012,  1.95375,  2.19613,  2.50269,  2.63975,
+  1.3841,  1.72331,  1.90117,  2.1602,  2.42662,  2.52258,
+  1.34105,  1.73737,  1.89475,  2.11087,  2.40751,  2.50284,
+  1.37576,  1.55398,  1.78427,  1.98142,  2.50412,  2.57153,
+  1.41459,  1.52055,  1.71537,  2.01302,  2.5112,  2.60864,
+  1.38497,  1.51911,  1.69669,  1.93938,  2.5757,  2.64475,
+  1.37786,  1.61168,  1.75124,  2.04456,  2.4936,  2.56797,
+  1.36085,  1.55368,  1.69398,  2.03611,  2.53589,  2.58847,
+  1.39163,  1.48933,  1.63148,  1.85308,  2.52955,  2.63182,
+  1.36408,  1.47605,  1.62904,  1.94902,  2.52574,  2.58792,
+  1.2439,  1.39859,  1.53969,  2.06632,  2.52865,  2.59222,
+  1.25551,  1.42936,  1.54884,  1.95098,  2.51998,  2.57485,
+  1.21333,  1.3888,  1.50598,  1.88664,  2.48612,  2.54536,
+  1.1258,  1.2869,  1.53495,  1.98205,  2.49021,  2.57068,
+  1.13252,  1.2962,  1.46083,  1.92525,  2.35567,  2.44404,
+  1.14673,  1.36534,  1.49607,  2.02061,  2.44833,  2.51065,
+  1.19278,  1.37894,  1.49116,  1.95926,  2.45914,  2.51972,
+  1.27161,  1.38388,  1.52586,  1.95321,  2.47314,  2.52627,
+  1.19995,  1.36609,  1.51973,  1.92677,  2.56299,  2.62374,
+  1.23602,  1.38351,  1.51039,  1.7933,  2.58549,  2.67708,
+  1.27722,  1.41656,  1.53945,  1.92379,  2.59908,  2.66772,
+  1.19596,  1.40806,  1.56871,  2.09079,  2.62218,  2.6689,
+  1.17444,  1.3008,  1.70657,  2.07033,  2.33283,  2.491,
+  1.12025,  1.25279,  1.5621,  2.05712,  2.35786,  2.4881,
+  1.17632,  1.29197,  1.76026,  2.09335,  2.39555,  2.59153,
+  1.19772,  1.41553,  1.80193,  2.03318,  2.45962,  2.59256,
+  1.17046,  1.49125,  1.88804,  2.08248,  2.39229,  2.52815,
+  1.08351,  1.49178,  1.94946,  2.0462,  2.42247,  2.59161,
+  1.05994,  1.41798,  1.95482,  2.07325,  2.48096,  2.59912,
+  0.939633,  1.34851,  2.00568,  2.09423,  2.47405,  2.58029,
+  0.849679,  1.29353,  1.99812,  2.10527,  2.4101,  2.61591,
+  0.886534,  1.43235,  1.99045,  2.0898,  2.37908,  2.5395,
+  0.973462,  1.47362,  1.94439,  2.05184,  2.3931,  2.46861,
+  1.04199,  1.57643,  1.95273,  2.06254,  2.32632,  2.43777,
+  1.0487,  1.54395,  1.79902,  2.01526,  2.41591,  2.48738,
+  1.06075,  1.46328,  1.792,  1.94049,  2.41744,  2.51762,
+  1.08688,  1.35051,  1.71544,  1.80448,  2.48199,  2.57724,
+  1.23776,  1.48723,  1.7249,  1.80832,  2.52853,  2.61455,
+  1.39846,  1.49959,  1.70594,  1.81787,  2.53742,  2.61115,
+  1.46184,  1.54928,  1.71949,  1.83518,  2.48005,  2.65662,
+  1.41193,  1.59484,  1.72262,  1.84021,  2.5366,  2.61871,
+  1.52708,  1.60947,  1.70484,  1.83282,  2.51277,  2.60508,
+  1.5493,  1.64971,  1.74718,  1.83885,  2.59328,  2.68152,
+  1.40865,  1.62213,  1.79776,  1.95077,  2.23897,  2.46394,
+  1.46356,  1.64796,  1.79073,  1.92141,  2.34804,  2.57262,
+  1.53189,  1.70037,  1.83404,  2.0056,  2.41348,  2.57054,
+  1.5952,  1.68156,  1.85702,  2.02018,  2.47538,  2.62026,
+  1.57838,  1.65186,  1.91226,  2.01199,  2.5125,  2.62561,
+  1.55111,  1.64436,  1.93621,  2.04161,  2.52732,  2.61724,
+  1.53197,  1.62315,  1.9276,  2.00745,  2.52804,  2.63456,
+  1.49246,  1.57949,  1.90868,  1.99823,  2.49061,  2.58309,
+  1.44543,  1.54876,  1.9137,  2.0028,  2.51924,  2.61095,
+  1.39728,  1.48225,  1.89122,  1.98384,  2.47449,  2.60778,
+  1.3583,  1.56294,  1.90205,  2.00361,  2.42564,  2.58541,
+  1.31335,  1.51889,  1.92307,  2.01194,  2.49694,  2.5837,
+  1.32168,  1.50683,  1.90306,  1.99006,  2.51061,  2.61974,
+  1.27289,  1.51344,  1.8979,  2.03966,  2.53652,  2.60414,
+  1.25574,  1.43115,  1.89662,  1.96089,  2.52675,  2.62424,
+  1.25356,  1.39283,  1.89379,  1.97508,  2.52068,  2.59667,
+  1.21234,  1.37522,  1.86031,  1.96496,  2.53119,  2.59867,
+  1.17744,  1.32419,  1.80663,  1.88529,  2.48732,  2.59546,
+  1.185,  1.38308,  1.78322,  1.86347,  2.46657,  2.57065,
+  1.16227,  1.44473,  1.79788,  1.96024,  2.51584,  2.59443,
+  1.29313,  1.61263,  1.91287,  2.11307,  2.4672,  2.59265,
+  1.3544,  1.69802,  1.96011,  2.14947,  2.53298,  2.65269,
+  1.41207,  1.72912,  2.03409,  2.17295,  2.53881,  2.64369,
+  1.39179,  1.80176,  1.94479,  2.19455,  2.4673,  2.54771,
+  1.47608,  1.74319,  1.98255,  2.14116,  2.55905,  2.64289,
+  1.42368,  1.8572,  1.99841,  2.14699,  2.4995,  2.58386,
+  1.42068,  1.87817,  2.01232,  2.29828,  2.57827,  2.66549,
+  1.45566,  1.91054,  2.06984,  2.39305,  2.59349,  2.67981,
+  1.52558,  1.92571,  2.18647,  2.40072,  2.66013,  2.74311,
+  1.37615,  1.63344,  1.9343,  2.25049,  2.49406,  2.61897,
+  1.3545,  1.56095,  1.93126,  2.20732,  2.5007,  2.61105,
+  1.30807,  1.56951,  1.96724,  2.24546,  2.46112,  2.59551,
+  1.34701,  1.65498,  1.98091,  2.25189,  2.51009,  2.63498,
+  1.47801,  1.58844,  2.0382,  2.22414,  2.49937,  2.64663,
+  1.45153,  1.63029,  2.1141,  2.24973,  2.4165,  2.6518,
+  1.41214,  1.65583,  2.12835,  2.22464,  2.52506,  2.68174,
+  1.3745,  1.84889,  2.14083,  2.2919,  2.60283,  2.691,
+  1.37857,  1.74485,  2.10667,  2.20122,  2.62683,  2.712,
+  1.08274,  1.60312,  2.07077,  2.12957,  2.50429,  2.65755,
+  1.01329,  1.46791,  1.96003,  2.09179,  2.36205,  2.56155,
+  0.9941,  1.32807,  1.7917,  1.90255,  2.41063,  2.50132,
+  0.999159,  1.32525,  1.72231,  1.87138,  2.28118,  2.50209,
+  1.03528,  1.33808,  1.65302,  1.75976,  2.44146,  2.54067,
+  1.07713,  1.29359,  1.56567,  1.7118,  2.33034,  2.43626,
+  1.05812,  1.24303,  1.48833,  1.62368,  2.33012,  2.42954,
+  1.15066,  1.2962,  1.57472,  1.70184,  2.39048,  2.50735,
+  1.16792,  1.38204,  1.57381,  1.7953,  2.44065,  2.49036,
+  1.22137,  1.40507,  1.53578,  1.72864,  2.41229,  2.51938,
+  1.24827,  1.38398,  1.57228,  1.82686,  2.42535,  2.49422,
+  1.27415,  1.38627,  1.55782,  1.73411,  2.37831,  2.47797,
+  1.34389,  1.45603,  1.66853,  1.8156,  2.24874,  2.4197,
+  1.35602,  1.5593,  1.73128,  1.85333,  2.34397,  2.51476,
+  1.43321,  1.57591,  1.67319,  1.78146,  2.2928,  2.49126,
+  1.35471,  1.6376,  1.87537,  2.16287,  2.40849,  2.56638,
+  1.46466,  1.59144,  2.07122,  2.23546,  2.39889,  2.56349,
+  1.42481,  1.62265,  2.02033,  2.16131,  2.32826,  2.46819,
+  1.36427,  1.51615,  2.01176,  2.10961,  2.3957,  2.55472,
+  1.34268,  1.46052,  2.0389,  2.12298,  2.50665,  2.64345,
+  1.33831,  1.51988,  2.03004,  2.10015,  2.53334,  2.67477,
+  1.32113,  1.54557,  1.97723,  2.12227,  2.55759,  2.68022,
+  1.31509,  1.46711,  1.97243,  2.06854,  2.52684,  2.64563,
+  1.30446,  1.40069,  1.95455,  2.05314,  2.5625,  2.68589,
+  1.26718,  1.37666,  1.88806,  2.02989,  2.54542,  2.66931,
+  1.22501,  1.33934,  1.88732,  1.96524,  2.54351,  2.67229,
+  1.22621,  1.40353,  1.79766,  1.95969,  2.54099,  2.62735,
+  1.34703,  1.60794,  1.96677,  2.18451,  2.47788,  2.60882,
+  1.3321,  1.75596,  1.94842,  2.17671,  2.51339,  2.60137,
+  1.34929,  1.7814,  1.92279,  2.10923,  2.46288,  2.55986,
+  1.36238,  1.69359,  1.88434,  2.08805,  2.52247,  2.61397,
+  1.32029,  1.5103,  1.85775,  2.06543,  2.49473,  2.60556,
+  1.28299,  1.45974,  1.74491,  1.96142,  2.43994,  2.62375,
+  1.25136,  1.38192,  1.67354,  1.7727,  2.32354,  2.66159,
+  1.20426,  1.43515,  1.65423,  1.7378,  2.30506,  2.58156,
+  1.18196,  1.46528,  1.67003,  1.8613,  2.44412,  2.54613,
+  1.34712,  1.62826,  1.93134,  2.12343,  2.46685,  2.59892,
+  1.17048,  1.28493,  1.55274,  1.83255,  2.29979,  2.51981,
+  1.19004,  1.28402,  1.64609,  1.96917,  2.49692,  2.62045,
+  1.25541,  1.38147,  1.78173,  2.09499,  2.43136,  2.59352,
+  1.23188,  1.33417,  1.79625,  2.04,  2.38708,  2.55466,
+  1.18052,  1.30857,  1.81824,  1.97632,  2.2935,  2.4518,
+  1.10256,  1.26632,  1.84425,  1.96176,  2.32484,  2.51408,
+  1.00464,  1.14487,  1.83502,  1.9971,  2.18238,  2.52208,
+  0.956994,  1.21291,  1.94092,  2.06045,  2.31223,  2.44167,
+  0.795434,  1.44428,  1.93242,  2.04716,  2.36568,  2.45052,
+  0.942462,  1.60604,  2.02512,  2.11974,  2.29995,  2.43181,
+  0.812186,  1.46939,  2.07832,  2.17302,  2.39197,  2.47405,
+  0.831008,  1.62061,  2.09294,  2.16773,  2.33486,  2.41672,
+  0.917049,  1.801,  2.12123,  2.19938,  2.34728,  2.44052,
+  0.857286,  1.67915,  2.11243,  2.20307,  2.44474,  2.52921,
+  0.809582,  1.54255,  2.18237,  2.23944,  2.46198,  2.54337,
+  0.912283,  1.7792,  2.16632,  2.25109,  2.46168,  2.57688,
+  0.774827,  1.7702,  2.1792,  2.23961,  2.48732,  2.56023,
+  1.22299,  1.57457,  2.08108,  2.22359,  2.50152,  2.6613,
+  1.39422,  1.69632,  2.03665,  2.27333,  2.5704,  2.68413,
+  1.37077,  1.69891,  2.08266,  2.24567,  2.59879,  2.69545,
+  1.37241,  1.64717,  2.14237,  2.27291,  2.60809,  2.68656,
+  1.34279,  1.69454,  2.12328,  2.25676,  2.57528,  2.69095,
+  1.38055,  1.75068,  2.1234,  2.19974,  2.48804,  2.61024,
+  1.39506,  1.88332,  2.0887,  2.18949,  2.45826,  2.54814,
+  1.41315,  1.87284,  2.02083,  2.16196,  2.39617,  2.48701,
+  1.4031,  1.76424,  1.91125,  2.05585,  2.39101,  2.4846,
+  1.25059,  1.60685,  1.83481,  1.91441,  2.34409,  2.54946,
+  1.17101,  1.40644,  1.69912,  1.8581,  2.35407,  2.47105,
+  1.13269,  1.25187,  1.52135,  1.63829,  2.35528,  2.47061,
+  1.01168,  1.2879,  1.45026,  1.66382,  2.28546,  2.37145,
+  1.03024,  1.20842,  1.36667,  1.55035,  2.33752,  2.4214,
+  0.964915,  1.17119,  1.28816,  1.58842,  2.32729,  2.3883,
+  0.953674,  1.10289,  1.26375,  1.83559,  2.31685,  2.42482,
+  0.886544,  1.07464,  1.24224,  1.96444,  2.29681,  2.41295,
+  0.853009,  1.07708,  1.18453,  1.75232,  2.28304,  2.38922,
+  0.840278,  1.03322,  1.15255,  1.52095,  2.33398,  2.45453,
+  0.91077,  1.08387,  1.22354,  1.66808,  2.34624,  2.51185,
+  0.967915,  1.12182,  1.22026,  1.80659,  2.42113,  2.49818,
+  0.992265,  1.16907,  1.26005,  1.67999,  2.39894,  2.45914,
+  1.06528,  1.23096,  1.32238,  1.75348,  2.3144,  2.41593,
+  1.08131,  1.27178,  1.45801,  1.7294,  2.3323,  2.40512,
+  1.01781,  1.34909,  1.51584,  1.72189,  2.29296,  2.39899,
+  1.09765,  1.33294,  1.57003,  1.77646,  2.37727,  2.46589,
+  1.14764,  1.3025,  1.64016,  1.79704,  2.36388,  2.4748,
+  1.12717,  1.32201,  1.68488,  1.79646,  2.40705,  2.57866,
+  1.15953,  1.26665,  1.70955,  1.83058,  2.43816,  2.57242,
+  1.1371,  1.33151,  1.7494,  1.846,  2.41439,  2.51149,
+  1.12127,  1.3511,  1.72822,  1.84666,  2.44921,  2.56416,
+  1.11868,  1.26154,  1.79446,  1.88577,  2.42901,  2.55277,
+  1.07699,  1.21216,  1.72764,  1.86126,  2.43299,  2.56404,
+  1.08209,  1.2617,  1.76092,  1.85803,  2.31585,  2.57359,
+  1.08635,  1.27906,  1.76312,  1.86419,  2.38079,  2.4853,
+  0.988401,  1.26239,  1.7379,  1.83671,  2.37578,  2.49239,
+  1.07471,  1.1962,  1.67728,  1.80631,  2.3414,  2.56064,
+  1.06786,  1.26529,  1.68935,  1.80299,  2.40195,  2.52406,
+  1.01048,  1.28954,  1.65272,  1.77873,  2.3623,  2.46655,
+  0.97757,  1.26131,  1.57627,  1.74133,  2.29762,  2.40409,
+  1.09718,  1.46442,  1.60666,  1.71761,  2.33071,  2.41207,
+  1.38384,  1.65227,  1.8982,  2.09661,  2.47672,  2.57418,
+  1.27973,  1.70061,  1.89499,  2.02987,  2.46839,  2.58449,
+  1.23667,  1.68331,  1.79106,  1.95337,  2.5331,  2.58708,
+  1.18505,  1.59913,  1.8539,  1.94492,  2.49995,  2.5729,
+  1.16357,  1.30732,  1.87244,  1.95399,  2.54467,  2.62323,
+  1.19097,  1.44925,  1.86329,  1.93767,  2.52527,  2.59997,
+  1.11855,  1.51311,  1.85667,  1.96882,  2.49739,  2.57553,
+  1.15652,  1.63093,  1.84545,  2.05111,  2.44317,  2.53405,
+  1.41004,  1.54198,  2.13551,  2.23561,  2.57541,  2.68055,
+  1.39279,  1.72067,  2.03495,  2.19246,  2.48715,  2.6534,
+  1.58125,  1.83784,  2.10976,  2.18748,  2.4979,  2.66009,
+  1.66308,  1.9013,  2.15166,  2.24829,  2.53479,  2.63979,
+  1.62316,  1.84307,  2.17777,  2.25531,  2.5436,  2.68119,
+  1.53971,  1.84607,  2.11908,  2.31502,  2.60542,  2.69501,
+  1.53269,  1.80536,  2.16618,  2.27652,  2.58208,  2.69532,
+  1.5172,  1.86473,  2.11184,  2.24103,  2.6024,  2.67859,
+  1.481,  1.87977,  2.1834,  2.2585,  2.62458,  2.71471,
+  1.48006,  1.94783,  2.12659,  2.23931,  2.6027,  2.68976,
+  1.61575,  2.02568,  2.18841,  2.29147,  2.6737,  2.72328,
+  1.54669,  2.02367,  2.13758,  2.23388,  2.56357,  2.62736,
+  1.51727,  1.90243,  2.13241,  2.18928,  2.54838,  2.64335,
+  1.49876,  1.60236,  2.15993,  2.27567,  2.54058,  2.68296,
+  1.57357,  1.6552,  2.07174,  2.2146,  2.52345,  2.64214,
+  1.60199,  1.68036,  2.13015,  2.24731,  2.56771,  2.67057,
+  1.63293,  1.73367,  2.1347,  2.25513,  2.55999,  2.68208,
+  1.70743,  1.75206,  2.1397,  2.25206,  2.56764,  2.64791,
+  1.68079,  1.81258,  2.18923,  2.2873,  2.57824,  2.64474,
+  1.74613,  1.77855,  2.11951,  2.28339,  2.59638,  2.68683,
+  1.68024,  1.77494,  2.09785,  2.21399,  2.55851,  2.65628,
+  1.69816,  1.77769,  2.09692,  2.21101,  2.51242,  2.62563,
+  1.75722,  1.8282,  2.09218,  2.21863,  2.4599,  2.65391,
+  1.7683,  1.81576,  2.0446,  2.1744,  2.4698,  2.67439,
+  1.74091,  1.83001,  2.0445,  2.16843,  2.4425,  2.58767,
+  1.72899,  1.80159,  2.0369,  2.13569,  2.483,  2.64735,
+  1.7402,  1.78035,  2.03984,  2.11648,  2.46008,  2.66641,
+  1.67917,  1.81059,  1.9762,  2.08515,  2.33097,  2.5747,
+  1.67538,  1.74168,  1.98661,  2.08699,  2.44484,  2.64839,
+  1.60537,  1.68464,  1.97715,  2.08431,  2.40138,  2.62667,
+  1.59359,  1.66701,  1.99308,  2.09579,  2.47706,  2.66052,
+  1.49544,  1.67749,  1.91544,  2.10752,  2.5041,  2.68752,
+  1.37119,  1.58101,  1.81209,  2.15997,  2.54081,  2.65451,
+  1.3089,  1.65276,  1.8777,  2.10022,  2.49836,  2.63527,
+  1.25755,  1.70119,  1.90866,  2.06398,  2.33088,  2.58848,
+  1.26064,  1.73383,  1.90131,  2.04602,  2.23042,  2.37971,
+  1.19202,  1.69544,  1.86633,  1.96986,  2.13128,  2.36781,
+  1.3313,  1.72762,  1.87569,  1.96723,  2.11549,  2.46165,
+  1.22185,  1.64479,  1.86107,  1.95729,  2.26379,  2.50923,
+  1.29701,  1.68481,  1.82511,  1.98127,  2.3887,  2.49794,
+  1.29299,  1.62169,  1.7955,  1.89158,  2.43094,  2.59724,
+  1.29334,  1.41244,  1.67843,  2.01344,  2.40627,  2.57529,
+  1.35525,  1.47052,  1.74829,  2.04483,  2.41107,  2.59082,
+  1.35208,  1.47438,  1.81195,  2.02853,  2.44538,  2.59798,
+  1.38043,  1.47298,  1.83619,  1.95777,  2.39037,  2.57117,
+  1.41757,  1.51497,  1.83999,  1.97461,  2.38249,  2.51071,
+  1.39633,  1.51162,  1.74391,  2.00952,  2.41409,  2.5335,
+  1.356,  1.5112,  1.77504,  1.97354,  2.4454,  2.56885,
+  1.35748,  1.53331,  1.82063,  1.99833,  2.39546,  2.5737,
+  1.24454,  1.44655,  1.72685,  1.93599,  2.42899,  2.55595,
+  1.20656,  1.36587,  1.51002,  1.80904,  2.46485,  2.52024,
+  1.20471,  1.34027,  1.47715,  1.7318,  2.46108,  2.52582,
+  1.15214,  1.29476,  1.42987,  1.66978,  2.43609,  2.50483,
+  1.12233,  1.28467,  1.44544,  1.8119,  2.44447,  2.53569,
+  1.1671,  1.312,  1.43068,  1.93122,  2.57918,  2.62637,
+  1.14096,  1.25556,  1.41692,  1.91311,  2.46264,  2.55265,
+  1.17538,  1.32509,  1.43414,  1.82628,  2.53411,  2.59969,
+  1.15295,  1.31134,  1.42875,  1.73328,  2.49916,  2.55542,
+  1.20894,  1.31815,  1.45086,  1.63113,  2.48479,  2.56076,
+  1.21498,  1.3123,  1.49697,  1.60268,  2.44106,  2.51374,
+  1.1549,  1.27435,  1.49783,  1.61108,  2.49397,  2.62846,
+  1.22174,  1.32448,  1.52936,  1.6685,  2.49634,  2.57245,
+  1.26548,  1.36044,  1.57445,  1.69829,  2.46587,  2.52945,
+  1.29997,  1.41147,  1.63433,  1.79017,  2.46419,  2.54621,
+  1.29682,  1.4613,  1.67405,  1.8673,  2.47283,  2.54653,
+  1.31923,  1.49303,  1.70292,  1.86718,  2.41758,  2.50385,
+  1.3077,  1.51173,  1.79546,  1.9887,  2.41583,  2.50206,
+  1.34144,  1.56729,  1.84964,  2.05441,  2.36855,  2.48494,
+  1.34609,  1.70986,  1.84782,  2.08987,  2.32039,  2.42693,
+  1.35121,  1.5824,  1.85395,  2.08778,  2.26974,  2.40613,
+  1.40341,  1.68126,  1.93063,  2.06474,  2.3176,  2.44551,
+  1.30356,  1.80043,  1.94655,  2.06478,  2.3479,  2.57565,
+  1.40197,  1.79512,  2.04385,  2.14916,  2.33742,  2.47542,
+  1.48635,  1.89691,  2.03368,  2.16458,  2.42721,  2.51671,
+  1.58122,  1.92036,  2.03292,  2.18664,  2.45883,  2.53417,
+  1.62367,  1.94922,  2.05695,  2.22087,  2.54473,  2.61274,
+  1.72008,  1.91633,  2.06966,  2.31006,  2.50308,  2.59265,
+  1.65207,  1.9939,  2.12217,  2.28232,  2.53373,  2.60413,
+  1.69638,  1.99027,  2.08866,  2.3179,  2.56235,  2.6308,
+  1.68861,  1.97655,  2.0855,  2.35442,  2.4834,  2.56768,
+  1.79189,  1.95662,  2.08476,  2.34413,  2.47321,  2.57802,
+  1.77015,  1.95597,  2.07514,  2.2631,  2.50858,  2.59481,
+  1.68817,  1.95839,  2.09717,  2.23713,  2.44313,  2.55839,
+  1.61409,  1.85811,  1.99613,  2.15125,  2.32732,  2.48534,
+  1.51766,  1.72978,  1.97539,  2.11873,  2.39083,  2.52342,
+  1.57639,  1.76492,  1.93735,  2.15944,  2.35454,  2.47655,
+  1.59652,  1.79672,  1.93068,  2.17377,  2.41526,  2.51519,
+  1.59827,  1.75891,  1.94152,  2.24294,  2.46192,  2.54838,
+  1.56459,  1.66781,  1.91021,  2.20751,  2.43297,  2.56229,
+  1.50226,  1.59876,  1.70104,  1.99352,  2.43166,  2.56861,
+  1.26117,  1.37926,  1.66944,  1.86426,  2.42439,  2.56028,
+  1.18314,  1.29168,  1.49624,  1.77509,  2.41535,  2.57185,
+  1.17686,  1.28064,  1.39729,  1.55628,  2.48261,  2.55691,
+  1.15141,  1.26909,  1.40261,  1.52942,  2.5473,  2.66072,
+  1.13835,  1.27009,  1.3867,  1.65651,  2.51668,  2.57083,
+  1.16764,  1.28839,  1.3794,  1.81595,  2.48874,  2.54402,
+  1.19113,  1.31858,  1.43306,  1.89873,  2.44099,  2.50552,
+  1.23155,  1.33971,  1.50583,  1.86546,  2.40192,  2.56755,
+  1.249,  1.34254,  1.52652,  1.64463,  2.26006,  2.52811,
+  1.29212,  1.38504,  1.56729,  1.92802,  2.3436,  2.52673,
+  1.55306,  1.7312,  1.87558,  2.03762,  2.18958,  2.43362,
+  1.55633,  1.80735,  2.00987,  2.13476,  2.39511,  2.51776,
+  1.7008,  1.863,  2.01606,  2.21287,  2.46583,  2.57661,
+  1.74452,  1.8923,  2.04288,  2.2037,  2.39302,  2.52939,
+  1.61468,  1.86704,  2.02413,  2.17237,  2.40215,  2.56787,
+  1.66255,  1.92647,  2.01622,  2.15368,  2.54468,  2.63661,
+  1.60774,  1.84063,  2.03651,  2.14887,  2.47573,  2.62342,
+  1.5426,  1.78941,  1.98821,  2.1337,  2.50007,  2.62384,
+  1.52049,  1.85402,  1.96628,  2.10023,  2.4655,  2.59099,
+  1.4291,  1.7262,  1.95857,  2.06874,  2.39713,  2.57827,
+  1.23096,  1.48391,  1.90942,  2.03717,  2.27816,  2.44268,
+  1.16547,  1.40247,  1.87767,  1.98503,  2.337,  2.4823,
+  1.06065,  1.34179,  1.89159,  1.9978,  2.34225,  2.47385,
+  1.04598,  1.26441,  1.89288,  2.02811,  2.26571,  2.41834,
+  0.872467,  1.31861,  1.94129,  2.05489,  2.26598,  2.523,
+  0.878165,  1.20878,  1.86352,  2.07417,  2.31989,  2.4605,
+  0.87138,  1.05093,  1.86631,  2.04429,  2.18427,  2.46922,
+  0.814866,  1.20623,  1.93624,  2.04636,  2.24399,  2.39101,
+  0.791495,  1.1548,  1.95086,  2.06223,  2.27019,  2.49712,
+  0.734873,  1.1175,  2.01389,  2.14635,  2.25208,  2.34022,
+  0.717596,  1.11331,  2.14512,  2.21429,  2.35066,  2.43709,
+  0.747897,  1.18189,  1.98264,  2.07339,  2.39106,  2.46122,
+  0.81421,  1.5937,  1.93081,  2.05189,  2.27992,  2.45097,
+  1.008,  1.63525,  1.8487,  1.99829,  2.26496,  2.39937,
+  1.05813,  1.54826,  1.72511,  1.88587,  2.17415,  2.38675,
+  1.06533,  1.44683,  1.76311,  2.06116,  2.39393,  2.53335,
+  1.24544,  1.51311,  1.69987,  1.88597,  2.16373,  2.41256,
+  1.40222,  1.55017,  1.6791,  2.10448,  2.31427,  2.46462,
+  1.43969,  1.56554,  1.74616,  2.17576,  2.35318,  2.44597,
+  1.28279,  1.46757,  1.68979,  2.05702,  2.29957,  2.50654,
+  1.15751,  1.36008,  1.53152,  1.93168,  2.27783,  2.38736,
+  1.12772,  1.28719,  1.42109,  1.84436,  2.28107,  2.38522,
+  1.17251,  1.31751,  1.49783,  1.76833,  2.3271,  2.4534,
+  1.21562,  1.35145,  1.55462,  1.70686,  2.28027,  2.41032,
+  1.16271,  1.31851,  1.56882,  1.75711,  2.22556,  2.32124,
+  1.22115,  1.36407,  1.7282,  1.86724,  2.14964,  2.32343,
+  1.27453,  1.45588,  1.65181,  1.92988,  2.11952,  2.24537,
+  1.32483,  1.46666,  1.83773,  1.98275,  2.16784,  2.29489,
+  1.20741,  1.46374,  1.90723,  2.01094,  2.18761,  2.31538,
+  1.1975,  1.32537,  1.90394,  2.10426,  2.26437,  2.40602,
+  0.964658,  1.42133,  1.80059,  2.07554,  2.24967,  2.39142,
+  0.900184,  1.41949,  1.86053,  2.05217,  2.20467,  2.41473,
+  0.976462,  1.44499,  1.83716,  1.99709,  2.13357,  2.30319,
+  0.943062,  1.5438,  1.91463,  1.99313,  2.18465,  2.34418,
+  0.89678,  1.42697,  1.92355,  2.03999,  2.25792,  2.50452,
+  0.957615,  1.55318,  1.86268,  2.04465,  2.19266,  2.48417,
+  1.02438,  1.62687,  1.89128,  2.04179,  2.30477,  2.61313,
+  1.2607,  1.57098,  1.79692,  1.93891,  2.45798,  2.54369,
+  1.43387,  1.67689,  2.02035,  2.24929,  2.48843,  2.61923,
+  1.42779,  1.60531,  1.99984,  2.19762,  2.47258,  2.62826,
+  1.34494,  1.54775,  2.01991,  2.15346,  2.48252,  2.6649,
+  1.39455,  1.83086,  2.07575,  2.1467,  2.52985,  2.66294,
+  1.39353,  1.57998,  2.00527,  2.06832,  2.59583,  2.67795,
+  1.37167,  1.50166,  2.01236,  2.06929,  2.60572,  2.70121,
+  1.36597,  1.44376,  1.8937,  2.06336,  2.54086,  2.63575,
+  1.39281,  1.47093,  1.92042,  1.98528,  2.61205,  2.67063,
+  1.39358,  1.50234,  1.92649,  2.01951,  2.57154,  2.6457,
+  1.33144,  1.47006,  1.84434,  1.94554,  2.52733,  2.62083,
+  1.28039,  1.38,  1.82279,  1.92768,  2.47072,  2.61404,
+  1.23045,  1.39485,  1.77224,  1.9107,  2.49488,  2.56917,
+  1.10377,  1.421,  1.74216,  1.90103,  2.45853,  2.54496,
+  1.07083,  1.43846,  1.75479,  1.82779,  2.32372,  2.48412,
+  1.02392,  1.52234,  1.71372,  1.83474,  2.2896,  2.49685,
+  1.12384,  1.53995,  1.76628,  1.86662,  2.34998,  2.44122,
+  1.04667,  1.49658,  1.79154,  1.85948,  2.40075,  2.4683,
+  1.03123,  1.5049,  1.71427,  1.94435,  2.36522,  2.45944,
+  1.20118,  1.37012,  1.88263,  2.01133,  2.41129,  2.51029,
+  1.24946,  1.32446,  1.90762,  2.059,  2.44862,  2.55141,
+  1.30858,  1.40302,  1.96116,  2.04859,  2.47571,  2.56247,
+  1.35436,  1.47604,  2.00873,  2.11132,  2.51324,  2.59156,
+  1.41531,  1.55963,  2.02019,  2.10785,  2.50535,  2.59646,
+  1.45215,  1.53696,  2.03346,  2.12047,  2.47346,  2.60024,
+  1.47616,  1.57067,  1.98144,  2.08987,  2.44173,  2.57494,
+  1.53214,  1.60732,  1.99626,  2.09911,  2.44899,  2.57508,
+  1.57825,  1.6709,  1.94645,  2.06793,  2.48457,  2.59603,
+  1.64599,  1.71983,  1.90843,  2.03481,  2.5215,  2.63014,
+  1.6752,  1.73909,  1.85801,  1.95115,  2.54962,  2.66814,
+  1.6988,  1.74067,  1.81622,  1.87221,  2.55299,  2.67504,
+  1.58931,  1.66594,  1.75197,  1.83425,  2.49582,  2.66392,
+  1.44357,  1.53506,  1.6855,  1.78803,  2.39178,  2.64485,
+  1.38939,  1.59756,  1.88429,  2.16105,  2.45363,  2.57728,
+  1.34469,  1.5734,  1.94905,  2.03321,  2.43648,  2.65023,
+  1.34068,  1.44219,  1.90408,  1.99239,  2.42751,  2.60434,
+  1.30157,  1.36352,  1.87021,  1.95339,  2.44581,  2.60937,
+  1.26564,  1.36552,  1.83866,  1.92217,  2.43174,  2.55248,
+  1.29187,  1.45107,  1.77074,  1.90068,  2.38049,  2.47459,
+  1.3198,  1.50206,  1.68621,  1.92201,  2.2912,  2.39261,
+  1.25322,  1.4458,  1.59175,  1.89356,  2.29503,  2.3815,
+  1.17138,  1.37063,  1.52321,  1.82582,  2.33635,  2.39918,
+  1.23899,  1.36509,  1.48683,  1.79013,  2.30251,  2.38422,
+  1.18649,  1.32753,  1.46369,  1.68078,  2.32204,  2.40225,
+  1.16077,  1.2949,  1.46764,  1.61324,  2.21966,  2.32965,
+  1.16797,  1.31227,  1.45879,  1.72547,  2.18251,  2.27065,
+  1.16049,  1.37138,  1.54665,  1.85991,  2.15148,  2.26711,
+  1.06064,  1.44774,  1.58936,  1.76203,  2.18795,  2.31254,
+  1.09687,  1.44937,  1.66994,  1.88079,  2.20516,  2.32292,
+  0.965471,  1.39498,  1.66486,  1.86974,  2.13014,  2.2721,
+  0.992815,  1.27623,  1.73632,  1.88313,  2.19849,  2.29195,
+  0.989087,  1.34899,  1.86928,  1.94503,  2.2171,  2.32962,
+  0.90585,  1.29647,  1.83941,  1.98449,  2.13136,  2.26164,
+  0.913468,  1.3471,  1.97494,  2.05681,  2.23306,  2.3124,
+  0.891335,  1.51815,  1.95606,  2.01705,  2.23425,  2.36954,
+  0.838007,  1.4907,  2.01764,  2.09778,  2.33146,  2.41797,
+  0.918242,  1.41122,  2.04709,  2.15794,  2.31221,  2.4143,
+  0.73747,  1.47534,  2.13171,  2.1951,  2.33607,  2.41009,
+  0.804454,  1.24701,  2.18319,  2.2531,  2.37687,  2.45747,
+  0.910989,  1.12058,  2.03128,  2.13474,  2.30167,  2.40132,
+  0.823657,  1.02371,  1.8993,  2.15349,  2.27816,  2.4689,
+  0.820197,  0.968457,  1.65567,  2.13731,  2.32041,  2.44255,
+  0.901009,  1.04763,  1.78579,  2.12632,  2.24814,  2.41922,
+  0.908944,  1.15154,  1.94127,  2.15376,  2.28778,  2.47786,
+  1.02292,  1.32981,  1.97353,  2.1212,  2.26916,  2.49693,
+  1.00803,  1.17657,  1.83255,  2.13074,  2.26309,  2.48407,
+  1.1484,  1.26162,  1.86817,  2.13834,  2.28791,  2.47577,
+  1.13164,  1.24554,  1.7469,  2.12721,  2.27364,  2.43952,
+  1.10545,  1.23069,  1.75987,  2.02322,  2.2259,  2.48502,
+  1.23228,  1.36348,  1.91488,  2.02165,  2.31404,  2.45593,
+  1.28797,  1.37746,  1.85366,  2.03963,  2.34808,  2.50271,
+  1.28514,  1.52079,  1.95102,  2.05364,  2.36654,  2.48611,
+  1.27636,  1.65661,  1.88233,  2.08463,  2.43062,  2.524,
+  1.3057,  1.53254,  1.86153,  2.02916,  2.43563,  2.51958,
+  1.29572,  1.47484,  1.83837,  2.04501,  2.41302,  2.5453,
+  1.2328,  1.30721,  1.78676,  1.91145,  2.53363,  2.62579,
+  1.10601,  1.25243,  1.73731,  1.8274,  2.39547,  2.65803,
+  1.08032,  1.24974,  1.76381,  1.84223,  2.48808,  2.63797,
+  1.08481,  1.3027,  1.7911,  1.91571,  2.53275,  2.62698,
+  1.02408,  1.39849,  1.75815,  1.94769,  2.53675,  2.6478,
+  1.05255,  1.48652,  1.83597,  2.01313,  2.52654,  2.62152,
+  0.980943,  1.52889,  1.88771,  1.99043,  2.55923,  2.63173,
+  0.954706,  1.35519,  1.89085,  1.96874,  2.5383,  2.6458,
+  0.894853,  1.31642,  1.93192,  2.00063,  2.61782,  2.70696,
+  0.859848,  1.16666,  1.85185,  2.01109,  2.62987,  2.73106,
+  0.817565,  1.16914,  1.97568,  2.11707,  2.59314,  2.68371,
+  0.776768,  0.999874,  1.95167,  2.127,  2.57853,  2.71922,
+  0.750075,  1.10567,  2.01524,  2.09916,  2.46918,  2.63788,
+  0.878438,  1.03962,  2.07882,  2.1891,  2.45317,  2.61062,
+  0.915136,  1.11488,  2.01769,  2.23653,  2.37028,  2.53828,
+  0.82611,  1.20898,  2.06907,  2.15683,  2.33186,  2.46307,
+  0.869876,  1.28956,  2.0617,  2.14305,  2.31374,  2.39581,
+  0.790056,  1.42106,  1.94573,  2.02523,  2.25492,  2.38411,
+  0.782642,  1.67814,  1.92831,  1.98015,  2.1697,  2.29002,
+  0.79594,  1.40966,  1.7678,  1.89476,  2.19165,  2.28019,
+  0.832117,  1.16909,  1.82801,  1.91103,  2.22865,  2.36616,
+  0.862231,  1.1894,  1.75495,  1.92413,  2.31213,  2.41255,
+  1.03477,  1.29047,  1.7835,  1.99616,  2.34376,  2.46273,
+  1.13581,  1.35879,  1.78919,  1.98063,  2.37636,  2.49584,
+  1.3039,  1.415,  1.78751,  1.91844,  2.43546,  2.54775,
+  1.48925,  1.59296,  1.85058,  1.95005,  2.42804,  2.57134,
+  1.63147,  1.74264,  1.88788,  1.99493,  2.49377,  2.61966,
+  1.68385,  1.80038,  1.92661,  2.06405,  2.50915,  2.59263,
+  1.74531,  1.85426,  1.98854,  2.11714,  2.50431,  2.61134,
+  1.76427,  1.89058,  2.03799,  2.1743,  2.50772,  2.60061,
+  1.68017,  1.81737,  1.93711,  2.22898,  2.55014,  2.62331,
+  1.55262,  1.81946,  1.95732,  2.26349,  2.51728,  2.58051,
+  1.55842,  1.78491,  2.02149,  2.23937,  2.54371,  2.63746,
+  1.24066,  1.73929,  1.88981,  2.10508,  2.53244,  2.61823,
+  0.928972,  1.44027,  1.76926,  1.85335,  2.40041,  2.63688,
+  1.05577,  1.48884,  1.75607,  1.83257,  2.20968,  2.65031,
+  1.0133,  1.38103,  1.70409,  1.77271,  2.15549,  2.58513,
+  1.00919,  1.33324,  1.74138,  1.8465,  2.15877,  2.51776,
+  1.00638,  1.5199,  1.81375,  1.91629,  2.40767,  2.58185,
+  1.35773,  1.53055,  1.88364,  2.14151,  2.46327,  2.61463,
+  1.42682,  1.56088,  1.88252,  2.17521,  2.48835,  2.6287,
+  1.31598,  1.57984,  1.85956,  2.08348,  2.41988,  2.56465,
+  1.21305,  1.5389,  1.80025,  1.88207,  2.34157,  2.57461,
+  1.27506,  1.54351,  1.9171,  2.12745,  2.38894,  2.54272,
+  1.43894,  1.69814,  1.85661,  2.07519,  2.26671,  2.43737,
+  1.45433,  1.66376,  1.86982,  2.01141,  2.36627,  2.53339,
+  1.38217,  1.67292,  1.82744,  1.94203,  2.45391,  2.55986,
+  1.40066,  1.58545,  1.84133,  2.00274,  2.427,  2.51776,
+  1.38214,  1.68809,  1.81976,  2.06315,  2.41779,  2.49255,
+  1.2551,  1.60338,  1.75391,  2.04757,  2.45556,  2.56959,
+  1.13478,  1.40915,  1.70528,  1.80211,  2.48803,  2.64714,
+  1.11188,  1.26013,  1.67605,  1.77849,  2.50159,  2.627,
+  1.06035,  1.20881,  1.66035,  1.77686,  2.48876,  2.60446,
+  0.94712,  1.16465,  1.64204,  1.72379,  2.47516,  2.56741,
+  0.902077,  1.2512,  1.66403,  1.76901,  2.499,  2.5767,
+  0.92017,  1.24389,  1.70968,  1.79499,  2.53435,  2.62383,
+  0.93877,  1.26768,  1.72586,  1.87016,  2.54951,  2.6282,
+  0.914357,  1.25432,  1.71291,  1.78474,  2.59043,  2.70748,
+  0.930246,  1.28124,  1.80279,  1.87886,  2.56022,  2.68722,
+  0.95535,  1.14867,  1.81473,  1.90259,  2.55782,  2.68459,
+  0.96833,  1.09859,  1.81344,  1.91188,  2.46314,  2.64649,
+  0.990311,  1.18544,  1.86467,  1.94159,  2.48811,  2.66446,
+  1.1869,  1.59093,  1.95416,  2.0337,  2.59786,  2.66218,
+  1.30264,  1.69442,  1.99744,  2.16905,  2.61741,  2.69308,
+  1.37926,  1.71828,  1.99322,  2.2122,  2.54373,  2.64086,
+  1.40516,  1.78053,  1.99789,  2.15115,  2.55578,  2.63222,
+  1.29777,  1.87826,  2.02027,  2.19057,  2.54647,  2.61734,
+  1.44216,  1.85664,  2.10104,  2.29971,  2.56148,  2.64412,
+  1.37017,  1.78121,  2.11499,  2.25182,  2.44675,  2.54984,
+  1.40345,  1.70357,  2.0793,  2.2214,  2.44877,  2.59398,
+  1.41335,  1.64917,  2.00998,  2.15916,  2.51868,  2.61514,
+  1.32666,  1.71994,  1.95044,  2.02547,  2.52107,  2.63595,
+  1.38595,  1.55275,  1.85678,  1.93751,  2.49665,  2.58016,
+  1.34541,  1.48801,  1.88554,  2.01719,  2.54687,  2.6256,
+  1.33572,  1.42021,  1.78707,  1.97684,  2.50133,  2.64355,
+  1.3038,  1.40827,  1.80145,  1.90147,  2.37505,  2.57595,
+  1.31291,  1.40809,  1.83798,  1.95009,  2.31854,  2.4759,
+  1.19361,  1.29364,  1.81906,  1.97449,  2.46808,  2.58528,
+  1.19153,  1.31147,  1.71163,  1.85459,  2.39504,  2.55402,
+  1.10318,  1.33217,  1.71792,  1.85799,  2.34029,  2.44522,
+  0.996011,  1.23417,  1.75102,  1.86827,  2.28588,  2.40672,
+  1.05531,  1.37824,  1.71212,  1.84167,  2.2067,  2.44054,
+  1.07861,  1.46591,  1.78701,  1.94898,  2.23174,  2.47898,
+  0.98452,  1.42059,  1.8153,  1.92522,  2.26343,  2.43094,
+  0.984574,  1.49518,  1.77419,  1.96413,  2.22166,  2.34685,
+  1.15484,  1.5072,  1.8121,  1.94937,  2.28174,  2.4261,
+  1.17006,  1.42938,  1.74509,  1.93793,  2.23502,  2.37477,
+  1.20649,  1.48753,  1.7673,  2.00984,  2.20705,  2.33947,
+  1.07366,  1.37773,  1.82868,  1.993,  2.13061,  2.25678,
+  1.08845,  1.49539,  1.90777,  1.99687,  2.2139,  2.39049,
+  1.12298,  1.42221,  1.86583,  2.03711,  2.25375,  2.41839,
+  1.13417,  1.38264,  1.80424,  1.9632,  2.16117,  2.4736,
+  1.2454,  1.55261,  1.96081,  2.13469,  2.4536,  2.57754,
+  1.1187,  1.56721,  1.95262,  2.17652,  2.44663,  2.57856,
+  1.14171,  1.6436,  2.01334,  2.27743,  2.55738,  2.63478,
+  1.39251,  1.80792,  2.03934,  2.23792,  2.57802,  2.66829,
+  1.43321,  1.83371,  2.02062,  2.25218,  2.51864,  2.60086,
+  1.37926,  1.71223,  2.025,  2.24296,  2.51553,  2.60248,
+  1.36698,  1.67564,  1.97659,  2.19947,  2.51697,  2.59881,
+  1.35276,  1.80187,  2.03361,  2.18194,  2.49138,  2.58988,
+  1.32366,  1.74357,  2.00964,  2.1227,  2.47452,  2.56638,
+  1.19009,  1.54054,  1.93307,  2.08808,  2.50673,  2.57061,
+  1.51983,  1.76619,  1.906,  2.07675,  2.26142,  2.40768,
+  1.53469,  1.71407,  2.01648,  2.1309,  2.32326,  2.45761,
+  1.52205,  1.79476,  2.05095,  2.21828,  2.40801,  2.53773,
+  1.66536,  1.90687,  2.02566,  2.23238,  2.43013,  2.55064,
+  1.6663,  1.83465,  1.99804,  2.22024,  2.40151,  2.50239,
+  1.52361,  1.73009,  1.86296,  2.1646,  2.46626,  2.54923,
+  1.21612,  1.50347,  1.76046,  1.96747,  2.38172,  2.56435,
+  1.17113,  1.42943,  1.61663,  1.91778,  2.38793,  2.47727,
+  1.0913,  1.35137,  1.56866,  1.7962,  2.43759,  2.51487,
+  1.00128,  1.38691,  1.5396,  1.77505,  2.41327,  2.48215,
+  0.952227,  1.39731,  1.52793,  1.72252,  2.44275,  2.49237,
+  0.824979,  1.38889,  1.56898,  1.73526,  2.40875,  2.47118,
+  0.794444,  1.43306,  1.58885,  1.74958,  2.48937,  2.57636,
+  0.899067,  1.52185,  1.6814,  1.78029,  2.44175,  2.50829,
+  0.922249,  1.46461,  1.59253,  1.82844,  2.41816,  2.47726,
+  0.871556,  1.44442,  1.53832,  1.88901,  2.35369,  2.41254,
+  0.857823,  1.27025,  1.50127,  1.76026,  2.35576,  2.4073,
+  0.846263,  1.17661,  1.48198,  1.61417,  2.36993,  2.48569,
+  0.882414,  1.17609,  1.37797,  1.49739,  2.38001,  2.51651,
+  0.938718,  1.10065,  1.48911,  1.57621,  2.32557,  2.54347,
+  0.932462,  1.10559,  1.29435,  1.47096,  2.40012,  2.55472,
+  0.945253,  1.161,  1.30388,  1.58026,  2.46668,  2.58461,
+  1.01832,  1.21474,  1.33058,  1.68375,  2.48296,  2.55716,
+  1.04824,  1.17548,  1.2581,  1.59909,  2.52145,  2.6425,
+  1.07374,  1.20351,  1.2987,  1.68876,  2.55568,  2.61447,
+  1.09679,  1.26086,  1.3686,  1.75534,  2.49303,  2.60645,
+  1.10564,  1.22703,  1.40439,  1.8497,  2.52331,  2.60157,
+  1.14386,  1.26939,  1.38734,  1.82908,  2.39517,  2.49646,
+  1.09925,  1.22861,  1.34441,  1.66442,  2.44063,  2.51807,
+  1.11618,  1.22832,  1.33295,  1.66731,  2.33167,  2.51226,
+  1.20152,  1.29939,  1.47847,  1.57791,  2.00331,  2.45158,
+  1.16799,  1.29273,  1.47073,  1.81462,  2.14096,  2.43615,
+  1.28052,  1.42488,  1.59521,  1.80388,  2.20583,  2.31538,
+  1.23016,  1.36494,  1.61044,  2.00251,  2.17287,  2.35572,
+  1.30255,  1.40061,  1.73433,  2.074,  2.20855,  2.38927,
+  1.51269,  1.81823,  2.14478,  2.26692,  2.44774,  2.56939,
+  1.50753,  1.76042,  2.16423,  2.27687,  2.47949,  2.62484,
+  1.44651,  1.76044,  2.1147,  2.2567,  2.57257,  2.66147,
+  1.46887,  1.81236,  2.11457,  2.19302,  2.61774,  2.71384,
+  1.44965,  1.77645,  2.0806,  2.21016,  2.54091,  2.71399,
+  1.44125,  1.71952,  2.11461,  2.21869,  2.5113,  2.66005,
+  1.47766,  1.61984,  2.1127,  2.1987,  2.5206,  2.6557,
+  1.53287,  1.71815,  2.13263,  2.2223,  2.55144,  2.66573,
+  1.34103,  1.81458,  2.12504,  2.24586,  2.54798,  2.64959,
+  1.36191,  1.69809,  2.07692,  2.25511,  2.52488,  2.64704,
+  1.31533,  1.59277,  2.10978,  2.21019,  2.51775,  2.66697,
+  1.3828,  1.57159,  2.10684,  2.20406,  2.4952,  2.66142,
+  1.45363,  1.64175,  2.10031,  2.19937,  2.4624,  2.60888,
+  1.3761,  1.64657,  1.98719,  2.21841,  2.41362,  2.52681,
+  1.37284,  1.63246,  2.05624,  2.16372,  2.37619,  2.58687,
+  1.43261,  1.62463,  2.07417,  2.11989,  2.48066,  2.66903,
+  1.41068,  1.6628,  2.06922,  2.13037,  2.58137,  2.714,
+  1.17413,  1.52452,  2.03205,  2.10525,  2.50238,  2.65331,
+  1.15083,  1.24978,  2.00479,  2.15823,  2.31798,  2.58817,
+  1.05764,  1.19972,  2.04367,  2.16548,  2.37102,  2.60817,
+  1.07033,  1.16919,  2.05106,  2.1872,  2.47645,  2.67133,
+  0.989962,  1.10088,  1.95972,  2.10766,  2.45186,  2.65933,
+  0.995945,  1.12508,  1.96773,  2.17105,  2.35276,  2.58638,
+  0.951054,  1.07341,  1.76868,  2.2131,  2.36251,  2.50427,
+  0.912647,  1.06363,  1.87431,  2.20935,  2.34779,  2.51505,
+  0.880146,  1.0577,  1.93951,  2.2982,  2.44787,  2.55972,
+  0.808391,  0.999903,  1.78946,  2.22109,  2.38324,  2.5121,
+  0.872797,  1.05131,  1.90798,  2.34589,  2.55144,  2.62038,
+  0.736864,  0.925226,  2.10155,  2.27386,  2.39295,  2.56886,
+  0.704727,  1.0262,  2.09473,  2.21249,  2.47416,  2.6562,
+  0.793545,  1.02948,  1.90102,  2.33368,  2.65025,  2.72142,
+  0.890709,  1.27007,  2.13985,  2.23832,  2.54438,  2.71132,
+  0.971655,  1.31769,  2.24547,  2.35109,  2.63196,  2.71126,
+  1.08079,  1.55577,  2.01062,  2.24599,  2.52841,  2.64489,
+  1.40951,  1.76932,  2.1067,  2.28426,  2.51225,  2.63834,
+  1.24844,  1.66199,  2.03514,  2.28324,  2.53429,  2.64733,
+  0.95246,  1.1238,  2.10348,  2.25807,  2.39474,  2.60457,
+  0.989645,  1.18166,  2.02343,  2.23737,  2.36952,  2.52253,
+  0.926042,  1.34812,  1.94934,  2.06208,  2.34696,  2.44908,
+  0.919696,  1.4053,  1.83405,  2.0997,  2.37621,  2.49339,
+  1.00081,  1.37165,  1.83665,  2.2241,  2.41011,  2.5393,
+  1.20009,  1.43679,  1.83915,  2.17928,  2.39885,  2.49843,
+  1.22352,  1.48641,  1.94399,  2.25226,  2.40733,  2.54068,
+  1.11367,  1.47721,  1.84416,  2.21801,  2.38133,  2.48688,
+  1.13811,  1.49875,  1.98095,  2.29747,  2.45785,  2.56077,
+  1.14615,  1.61454,  1.8989,  2.23248,  2.41657,  2.51096,
+  1.11967,  1.58992,  1.82441,  2.11191,  2.35476,  2.45328,
+  1.03204,  1.58942,  1.85285,  2.14299,  2.324,  2.47294,
+  0.989427,  1.52898,  1.91464,  2.17919,  2.37674,  2.49437,
+  1.09575,  1.49456,  1.86612,  2.13681,  2.28371,  2.46406,
+  0.834557,  1.46372,  1.88257,  2.15093,  2.37864,  2.46309,
+  0.835589,  1.29607,  1.77137,  2.09878,  2.28624,  2.42638,
+  0.806577,  1.40333,  1.68522,  2.04095,  2.23574,  2.3564,
+  0.800011,  1.38309,  1.81416,  1.95993,  2.30958,  2.38679,
+  0.804745,  1.31821,  1.82136,  1.9087,  2.23513,  2.42714,
+  0.895849,  1.36723,  1.86481,  1.97967,  2.32424,  2.42079,
+  0.82739,  1.42508,  1.76716,  2.05819,  2.37623,  2.46943,
+  0.917915,  1.49792,  1.85534,  1.98721,  2.31538,  2.45164,
+  0.940855,  1.40956,  1.78919,  1.98853,  2.33667,  2.53469,
+  0.972711,  1.2917,  1.78694,  1.91488,  2.32326,  2.40549,
+  0.993281,  1.36882,  1.80724,  1.95862,  2.35727,  2.45928,
+  1.07469,  1.34931,  1.84084,  1.95484,  2.26908,  2.38406,
+  1.1006,  1.21857,  1.75613,  1.90019,  2.27787,  2.40621,
+  1.16562,  1.31369,  1.8437,  1.96222,  2.1571,  2.34291,
+  1.15777,  1.37236,  1.87996,  1.99193,  2.25808,  2.39087,
+  1.28609,  1.78099,  1.9597,  2.11887,  2.32454,  2.43759,
+  1.45517,  1.73815,  2.09889,  2.23501,  2.42846,  2.53971,
+  1.50025,  1.68426,  2.161,  2.27259,  2.39908,  2.51033,
+  1.48567,  1.8464,  2.19572,  2.30566,  2.54628,  2.65059,
+  1.72782,  2.01371,  2.16728,  2.30421,  2.58661,  2.65216,
+  1.67677,  1.96053,  2.21701,  2.36881,  2.59828,  2.68162,
+  1.63196,  1.91575,  2.22704,  2.33518,  2.6031,  2.71022,
+  1.66386,  1.97302,  2.12471,  2.22235,  2.66048,  2.72432,
+  1.54201,  1.92958,  2.0756,  2.17063,  2.62855,  2.70775,
+  1.50969,  1.70605,  2.05691,  2.19767,  2.57833,  2.6539,
+  1.48207,  1.67373,  2.13105,  2.19487,  2.58632,  2.69029,
+  1.42345,  1.64327,  2.09232,  2.17894,  2.5272,  2.63675,
+  1.35515,  1.56517,  2.02393,  2.23649,  2.53832,  2.65549,
+  1.32842,  1.55398,  2.08156,  2.16192,  2.47274,  2.65693,
+  1.33076,  1.41904,  2.02671,  2.12905,  2.368,  2.57102,
+  1.27065,  1.37759,  2.02595,  2.14013,  2.38924,  2.57594,
+  1.23682,  1.34543,  2.02239,  2.10985,  2.47813,  2.63391,
+  1.22208,  1.32043,  1.93967,  2.02174,  2.43681,  2.62853,
+  1.25217,  1.35827,  1.97262,  2.07935,  2.37145,  2.59893,
+  1.26623,  1.4702,  1.93045,  2.14581,  2.47186,  2.61815,
+  1.33228,  1.54641,  2.02572,  2.21952,  2.46462,  2.64511,
+  1.4186,  1.64948,  2.00831,  2.12811,  2.48988,  2.67687,
+  1.45568,  1.68468,  1.98898,  2.15265,  2.4704,  2.65153,
+  1.44749,  1.60065,  1.9359,  2.27176,  2.51299,  2.63183,
+  1.44477,  1.55636,  2.02038,  2.28232,  2.47577,  2.61234,
+  1.38748,  1.48741,  2.02468,  2.24466,  2.44505,  2.58283,
+  1.35392,  1.44328,  1.95756,  2.17131,  2.33611,  2.56008,
+  1.36979,  1.44771,  2.00618,  2.19142,  2.40471,  2.60473,
+  1.42596,  1.50428,  2.07231,  2.17818,  2.41766,  2.60341,
+  1.44024,  1.5405,  2.0824,  2.21198,  2.37707,  2.63732,
+  1.49701,  1.58268,  2.05652,  2.17217,  2.38928,  2.59384,
+  1.50496,  1.58456,  1.98409,  2.14933,  2.36756,  2.55972,
+  1.51904,  1.60399,  1.9938,  2.10993,  2.32726,  2.59969,
+  1.56956,  1.65105,  1.98894,  2.11673,  2.34577,  2.56992,
+  1.56989,  1.68368,  1.98057,  2.18292,  2.35723,  2.58728,
+  1.60707,  1.7127,  1.95147,  2.12568,  2.30717,  2.54725,
+  1.64523,  1.7366,  1.95236,  2.13149,  2.37622,  2.60646,
+  1.66961,  1.76398,  1.97965,  2.17323,  2.33235,  2.51667,
+  1.63244,  1.75887,  1.9808,  2.12427,  2.2859,  2.44383,
+  1.55741,  1.6677,  1.90206,  2.10693,  2.26086,  2.48392,
+  1.47042,  1.68895,  1.84638,  2.03283,  2.18513,  2.37587,
+  1.42194,  1.53148,  1.82567,  2.02659,  2.18038,  2.36012,
+  1.38564,  1.60616,  1.84636,  2.07139,  2.4885,  2.60745,
+  1.35971,  1.57766,  1.8971,  2.11196,  2.47111,  2.603,
+  1.33945,  1.54264,  1.93397,  2.13374,  2.45491,  2.58319,
+  1.32581,  1.69176,  2.08023,  2.16421,  2.47416,  2.60522,
+  1.34715,  1.6247,  2.07411,  2.2144,  2.43059,  2.56295,
+  1.31486,  1.54184,  1.96763,  2.16414,  2.37269,  2.60652,
+  1.3129,  1.53408,  1.91728,  2.08995,  2.41161,  2.57067,
+  1.28302,  1.5574,  1.93788,  2.10334,  2.52062,  2.6237,
+  1.13883,  1.33747,  1.87109,  1.97275,  2.43348,  2.64765,
+  1.15594,  1.28112,  1.83135,  1.91924,  2.2666,  2.60094,
+  1.16684,  1.27382,  1.8432,  1.94603,  2.31838,  2.57879,
+  1.17229,  1.27501,  1.83258,  2.02592,  2.35381,  2.62469,
+  1.08216,  1.26544,  1.89236,  1.98901,  2.38316,  2.60142,
+  1.0919,  1.20882,  1.83501,  2.03446,  2.39472,  2.5629,
+  1.09883,  1.19949,  1.75765,  2.06589,  2.3904,  2.57889,
+  1.1328,  1.24439,  1.87662,  2.07155,  2.33918,  2.53792,
+  1.1806,  1.25947,  1.82316,  2.09506,  2.2569,  2.54272,
+  1.18699,  1.31291,  1.80079,  2.10504,  2.36699,  2.49608,
+  1.26639,  1.37714,  1.81043,  2.11327,  2.32962,  2.53315,
+  1.32359,  1.40452,  1.90424,  2.14593,  2.38611,  2.58094,
+  1.35217,  1.4514,  1.94982,  2.07705,  2.39082,  2.53857,
+  1.34386,  1.45223,  1.88989,  2.02674,  2.31748,  2.48249,
+  1.24481,  1.37885,  1.79256,  1.98674,  2.42257,  2.53695,
+  1.12462,  1.2536,  1.70382,  1.95132,  2.43964,  2.54515,
+  0.995104,  1.41175,  1.72851,  1.86164,  2.4566,  2.54496,
+  1.00107,  1.40911,  1.79773,  1.89757,  2.40948,  2.55532,
+  1.03398,  1.42816,  1.78694,  1.88029,  2.32636,  2.50316,
+  0.970169,  1.32072,  1.71664,  1.84157,  2.2202,  2.38892,
+  0.930477,  1.37338,  1.7984,  1.90473,  2.30579,  2.5253,
+  0.939935,  1.41846,  1.7727,  1.87809,  2.36749,  2.46153,
+  0.949116,  1.52711,  1.7659,  1.84073,  2.16493,  2.47434,
+  0.993353,  1.62934,  1.81344,  1.91022,  2.10077,  2.4929,
+  1.01383,  1.54962,  1.79683,  1.89194,  2.23976,  2.55635,
+  0.970121,  1.5098,  1.83401,  1.93898,  2.33857,  2.50435,
+  0.947238,  1.36138,  1.78355,  1.98471,  2.4239,  2.54718,
+  0.980991,  1.38878,  1.78331,  2.13171,  2.45463,  2.55869,
+  1.00267,  1.40234,  1.80719,  2.02446,  2.46442,  2.55428,
+  1.0107,  1.40419,  1.87256,  2.07936,  2.47933,  2.56962,
+  0.972976,  1.3758,  1.84337,  1.9807,  2.51361,  2.57827,
+  0.932062,  1.27768,  1.85113,  1.98588,  2.46629,  2.56626,
+  0.938577,  1.18115,  1.83396,  1.96503,  2.45801,  2.55053,
+  0.940095,  1.14545,  1.79669,  2.07827,  2.4829,  2.61063,
+  0.909789,  1.07408,  1.7174,  2.13911,  2.46252,  2.57226,
+  0.882446,  1.06665,  1.72956,  2.28466,  2.4789,  2.55502,
+  0.938178,  1.1215,  1.82849,  2.23404,  2.47478,  2.5571,
+  0.917165,  1.28307,  1.7795,  2.10029,  2.47583,  2.59018,
+  1.06294,  1.34904,  1.76276,  2.1183,  2.50481,  2.60679,
+  1.18696,  1.4619,  1.88904,  2.11274,  2.48132,  2.62131,
+  1.48072,  1.61923,  1.97948,  2.1771,  2.43648,  2.57898,
+  1.44872,  1.56634,  1.88013,  2.13853,  2.33968,  2.55459,
+  1.40799,  1.61355,  1.82893,  2.0527,  2.3445,  2.53808,
+  1.61602,  1.69101,  1.85635,  1.98008,  2.54825,  2.63776,
+  1.62817,  1.68416,  1.88615,  2.01287,  2.56377,  2.62158,
+  1.59574,  1.68801,  1.9354,  2.02581,  2.48363,  2.61682,
+  1.64156,  1.70866,  1.95546,  2.04699,  2.51983,  2.64574,
+  1.67367,  1.75221,  1.95129,  2.08092,  2.48739,  2.64072,
+  1.65642,  1.73624,  1.99136,  2.09832,  2.57191,  2.67683,
+  1.65982,  1.73245,  1.95125,  2.07702,  2.58164,  2.69352,
+  1.6548,  1.71621,  1.96664,  2.04423,  2.56325,  2.6802,
+  1.60273,  1.68261,  1.91741,  1.99483,  2.53109,  2.67329,
+  1.58255,  1.63953,  1.9261,  1.99207,  2.53207,  2.69711,
+  1.46237,  1.585,  1.8183,  1.89755,  2.55713,  2.70626,
+  1.4532,  1.55073,  1.81519,  1.91646,  2.39997,  2.66768,
+  1.41939,  1.55772,  1.78444,  1.90918,  2.51138,  2.66998,
+  1.39516,  1.53982,  1.84748,  1.93084,  2.58396,  2.70362,
+  1.34885,  1.61088,  1.95815,  2.04307,  2.58609,  2.66435,
+  1.37239,  1.65814,  1.95866,  2.18944,  2.45048,  2.65032,
+  1.35259,  1.52809,  1.92314,  2.19484,  2.42773,  2.56214,
+  1.38093,  1.61227,  1.99338,  2.17611,  2.50893,  2.63506,
+  1.42958,  1.68659,  2.01713,  2.17256,  2.48642,  2.60927,
+  1.39212,  1.64104,  1.95208,  2.06507,  2.42122,  2.57491,
+  1.39959,  1.78826,  1.95209,  2.09858,  2.48993,  2.62939,
+  1.38376,  1.66244,  1.9831,  2.11224,  2.5328,  2.63181,
+  1.37273,  1.67362,  1.91212,  2.13425,  2.433,  2.61228,
+  1.39603,  1.64262,  1.96263,  2.19739,  2.52132,  2.66069,
+  1.37936,  1.62399,  2.0694,  2.24312,  2.56203,  2.66844,
+  1.33867,  1.61863,  2.04204,  2.19512,  2.57016,  2.6991,
+  1.29412,  1.71208,  2.05016,  2.12013,  2.60784,  2.68169,
+  1.29325,  1.59625,  1.99341,  2.06004,  2.58308,  2.66414,
+  1.20992,  1.36267,  1.95512,  2.02835,  2.51296,  2.6258,
+  1.3817,  1.70662,  2.00317,  2.14647,  2.50003,  2.61301,
+  1.20467,  1.73456,  1.9288,  2.10969,  2.4769,  2.54909,
+  1.11449,  1.69632,  1.88882,  2.04367,  2.53927,  2.63717,
+  1.11931,  1.60146,  1.84673,  2.08566,  2.57754,  2.64535,
+  1.12875,  1.53118,  1.85828,  2.14677,  2.59635,  2.68872,
+  1.13025,  1.67465,  1.83066,  2.17211,  2.56255,  2.67283,
+  1.10077,  1.64441,  1.83323,  2.04061,  2.59933,  2.65229,
+  1.06697,  1.5306,  1.76863,  2.00332,  2.61732,  2.67806,
+  1.06312,  1.46936,  1.79782,  1.88185,  2.56819,  2.67915,
+  1.17729,  1.70328,  1.86551,  2.06104,  2.48107,  2.58144,
+  1.40413,  1.6575,  1.92706,  2.18185,  2.45741,  2.58043,
+  1.42836,  1.66354,  1.98499,  2.18345,  2.45866,  2.56949,
+  1.4032,  1.66715,  1.95509,  2.14645,  2.46264,  2.56266,
+  1.23413,  1.59785,  1.91775,  2.03444,  2.40755,  2.56026,
+  1.22453,  1.36863,  1.84807,  1.92472,  2.49495,  2.67021,
+  1.21477,  1.58834,  1.76581,  2.00386,  2.52678,  2.63596,
+  1.26488,  1.63647,  1.82522,  2.07706,  2.56349,  2.67929,
+  1.26961,  1.58898,  1.78218,  2.09502,  2.62041,  2.69179,
+  1.29641,  1.50434,  1.80291,  2.01338,  2.60569,  2.68162,
+  1.33438,  1.52077,  1.79661,  1.96388,  2.60042,  2.70374,
+  1.39757,  1.60058,  1.84597,  1.94012,  2.61622,  2.69611,
+  1.43088,  1.55907,  1.79924,  1.99405,  2.59895,  2.6747,
+  1.48212,  1.58304,  1.80751,  1.98143,  2.57538,  2.68473,
+  1.46434,  1.56562,  1.77603,  1.91763,  2.575,  2.65927,
+  1.4554,  1.53823,  1.73066,  1.88207,  2.56375,  2.66044,
+  1.49958,  1.58442,  1.68807,  1.89207,  2.5871,  2.68867,
+  1.47976,  1.5737,  1.69519,  2.02444,  2.55818,  2.63904,
+  1.45227,  1.54712,  1.75057,  2.07203,  2.53701,  2.67379,
+  1.44738,  1.56304,  1.79438,  2.14163,  2.35339,  2.50255,
+  1.35172,  1.45071,  1.73023,  1.99189,  2.29835,  2.46355,
+  1.31876,  1.41462,  1.64199,  1.94834,  2.32625,  2.47429,
+  1.21205,  1.34623,  1.6851,  1.95989,  2.32224,  2.51295,
+  1.20902,  1.30295,  1.63462,  1.93085,  2.28291,  2.50754,
+  1.18895,  1.29282,  1.66566,  2.17785,  2.37356,  2.47429,
+  1.25754,  1.45115,  1.83601,  2.16148,  2.44729,  2.59664,
+  1.25342,  1.3702,  1.83372,  2.24474,  2.47977,  2.57602,
+  1.17995,  1.30201,  1.59215,  2.15158,  2.45596,  2.51812,
+  1.11448,  1.25765,  1.41158,  2.04236,  2.54829,  2.62041,
+  1.09999,  1.30707,  1.40717,  2.15942,  2.58591,  2.64936,
+  1.13115,  1.24686,  1.40128,  2.1166,  2.48376,  2.54666,
+  1.17377,  1.34087,  1.4499,  2.0937,  2.56103,  2.62648,
+  1.18957,  1.3462,  1.46559,  2.00354,  2.51775,  2.5757,
+  1.21797,  1.30299,  1.56949,  2.02897,  2.45573,  2.55014,
+  1.23191,  1.39323,  1.52046,  1.95573,  2.47623,  2.64224,
+  1.27718,  1.45114,  1.59102,  1.92599,  2.45809,  2.56656,
+  1.21624,  1.48312,  1.68868,  1.98897,  2.45463,  2.59962,
+  1.18429,  1.55304,  1.83889,  2.10027,  2.38501,  2.55005,
+  1.23917,  1.79282,  1.95907,  2.1826,  2.44529,  2.52957,
+  1.62457,  1.86085,  2.12033,  2.21992,  2.42941,  2.5941,
+  1.75324,  1.88933,  2.13652,  2.25457,  2.43633,  2.56246,
+  1.75727,  1.95692,  2.24234,  2.36011,  2.49374,  2.58763,
+  1.80684,  1.9852,  2.19776,  2.33868,  2.49634,  2.60068,
+  1.85991,  2.03042,  2.28254,  2.396,  2.54859,  2.63263,
+  1.7711,  1.89613,  2.30676,  2.42126,  2.53834,  2.62596,
+  1.50565,  1.89323,  2.01933,  2.32579,  2.48797,  2.58553,
+  1.18914,  1.7711,  1.91507,  2.25487,  2.53443,  2.61278,
+  1.104,  1.64935,  1.83499,  1.93594,  2.53413,  2.652,
+  1.07901,  1.52244,  1.76728,  1.93497,  2.52313,  2.59639,
+  1.10621,  1.60804,  1.75144,  2.00839,  2.49173,  2.57715,
+  1.22513,  1.59727,  1.85783,  2.10361,  2.46542,  2.59305,
+  1.37537,  1.61836,  1.93052,  2.21445,  2.44556,  2.5762,
+  1.42999,  1.69897,  1.98214,  2.23334,  2.49044,  2.60535,
+  1.4828,  1.67946,  1.99776,  2.2224,  2.46458,  2.58682,
+  1.408,  1.67664,  1.97085,  2.22109,  2.44036,  2.59243,
+  1.2799,  1.6188,  1.92099,  2.16109,  2.43881,  2.62742,
+  0.936959,  1.31029,  1.66337,  2.0101,  2.51599,  2.59778,
+  1.01466,  1.40151,  1.59008,  2.08087,  2.55691,  2.62215,
+  1.04365,  1.38457,  1.5715,  1.98823,  2.56866,  2.64789,
+  1.10727,  1.41397,  1.56206,  1.87714,  2.55472,  2.63729,
+  1.17948,  1.46739,  1.605,  1.839,  2.52348,  2.6405,
+  1.21832,  1.41202,  1.59163,  1.79653,  2.5198,  2.66057,
+  1.30537,  1.42738,  1.61458,  1.76369,  2.49727,  2.65779,
+  1.33854,  1.45634,  1.6422,  1.86235,  2.44879,  2.63162,
+  1.32868,  1.44222,  1.57523,  1.85891,  2.47066,  2.57043,
+  1.35122,  1.46628,  1.60143,  1.86374,  2.42525,  2.50034,
+  1.36091,  1.47648,  1.62462,  1.83211,  2.48627,  2.56333,
+  1.40173,  1.49988,  1.6134,  1.74973,  2.42322,  2.59141,
+  1.26155,  1.40299,  1.52378,  1.80204,  2.49974,  2.60553,
+  1.16,  1.46705,  1.6056,  1.78769,  2.50805,  2.55736,
+  1.27952,  1.53509,  1.62057,  1.75862,  2.40962,  2.67642,
+  1.16136,  1.50546,  1.6262,  1.7331,  2.39883,  2.61748,
+  1.18463,  1.52853,  1.61429,  1.69821,  2.35034,  2.6671,
+  1.11735,  1.53807,  1.65845,  1.75962,  2.28126,  2.58068,
+  1.10984,  1.49283,  1.70197,  1.78983,  2.15124,  2.48973,
+  1.01023,  1.46712,  1.63109,  1.88642,  2.42002,  2.52278,
+  0.950861,  1.33689,  1.617,  1.78955,  2.44962,  2.52889,
+  1.02847,  1.3481,  1.57189,  1.88039,  2.54391,  2.60801,
+  1.11075,  1.41566,  1.69055,  2.00551,  2.55818,  2.6501,
+  1.11015,  1.43266,  1.6694,  1.90159,  2.51693,  2.60274,
+  1.06783,  1.54338,  1.71944,  1.979,  2.54367,  2.61757,
+  1.42254,  1.70106,  1.94043,  2.32706,  2.55761,  2.64296,
+  1.38612,  1.78193,  2.04068,  2.38389,  2.57395,  2.63346,
+  1.51277,  1.69633,  2.1845,  2.29598,  2.57899,  2.67726,
+  1.57185,  1.70524,  2.22523,  2.31919,  2.5426,  2.67616,
+  1.51491,  1.84429,  2.24734,  2.36159,  2.52907,  2.6533,
+  1.60358,  1.94842,  2.27181,  2.4296,  2.52821,  2.61773,
+  1.62041,  2.02418,  2.37902,  2.47798,  2.62296,  2.67076,
+  1.57882,  1.90635,  2.23831,  2.37884,  2.55696,  2.64712,
+  1.61114,  1.90067,  2.18578,  2.31738,  2.51701,  2.61014,
+  1.55461,  1.94143,  2.13305,  2.24986,  2.49176,  2.57161,
+  1.46962,  1.9189,  2.09418,  2.22518,  2.49035,  2.56434,
+  1.33537,  1.69721,  2.01709,  2.23232,  2.47434,  2.57102,
+  1.22194,  1.51906,  1.81406,  2.1294,  2.45829,  2.56013,
+  1.19335,  1.42604,  1.73164,  2.00909,  2.48569,  2.5661,
+  1.14086,  1.30414,  1.72407,  1.96212,  2.45682,  2.67358,
+  1.17199,  1.317,  1.75694,  2.05081,  2.52062,  2.67935,
+  1.13514,  1.41021,  1.71529,  2.0926,  2.49945,  2.61771,
+  1.11453,  1.48721,  1.5954,  2.01378,  2.53196,  2.6284,
+  1.18516,  1.39989,  1.58265,  2.19579,  2.51838,  2.58247,
+  1.10455,  1.42368,  1.65629,  2.26253,  2.59319,  2.66401,
+  1.1643,  1.59699,  1.71775,  2.20785,  2.56315,  2.6214,
+  1.02259,  1.59646,  1.83176,  2.28798,  2.51904,  2.58042,
+  0.920067,  1.6565,  1.82922,  2.20717,  2.5356,  2.58254,
+  0.940069,  1.57744,  1.96057,  2.18925,  2.48282,  2.54933,
+  0.824619,  1.70849,  1.93223,  2.18861,  2.55188,  2.60548,
+  0.819752,  1.68897,  1.95061,  2.08345,  2.46319,  2.51587,
+  0.820934,  1.71848,  2.02163,  2.15842,  2.52112,  2.57629,
+  0.860984,  1.61569,  2.04686,  2.14622,  2.46989,  2.57106,
+  0.7224,  1.64737,  1.97316,  2.0661,  2.43884,  2.60907,
+  0.853506,  1.57795,  1.94985,  2.08284,  2.44874,  2.51242,
+  0.745605,  1.46451,  1.99332,  2.07751,  2.46918,  2.53247,
+  0.710718,  1.53369,  1.89005,  2.01388,  2.4256,  2.51639,
+  0.877569,  1.51198,  1.8316,  2.0319,  2.44162,  2.51744,
+  1.25962,  1.51952,  1.8797,  2.13883,  2.45029,  2.61407,
+  1.32666,  1.6701,  1.91934,  2.14837,  2.36293,  2.46445,
+  1.43771,  1.67164,  1.95505,  2.16671,  2.40595,  2.55752,
+  1.60387,  1.74029,  1.98995,  2.19878,  2.46753,  2.58565,
+  1.6385,  1.74325,  2.05109,  2.14971,  2.46263,  2.56933,
+  1.63183,  1.72177,  2.00292,  2.13115,  2.43893,  2.56922,
+  1.60316,  1.76319,  2.08219,  2.17477,  2.37672,  2.50226,
+  1.63098,  1.70394,  2.00922,  2.14927,  2.36918,  2.58057,
+  1.5766,  1.65869,  1.92294,  2.12495,  2.44873,  2.57827,
+  1.51627,  1.63071,  1.8608,  2.12704,  2.4444,  2.58228,
+  1.45888,  1.54763,  1.79608,  2.04697,  2.37806,  2.53559,
+  1.37666,  1.51251,  1.73356,  2.09821,  2.36177,  2.45214,
+  1.13475,  1.32018,  1.58255,  2.05289,  2.44906,  2.52706,
+  1.07945,  1.16406,  1.57337,  2.22076,  2.5003,  2.56093,
+  1.06047,  1.18642,  1.45666,  2.15579,  2.437,  2.5269,
+  0.974645,  1.13281,  1.56353,  2.08986,  2.50461,  2.57178,
+  0.925733,  1.04903,  1.55569,  2.09544,  2.54168,  2.61417,
+  1.01286,  1.15468,  1.28381,  2.12616,  2.55879,  2.59581,
+  0.970704,  1.08889,  1.3988,  1.96967,  2.51746,  2.62149,
+  0.99667,  1.1556,  1.28423,  1.96774,  2.47805,  2.53675,
+  1.06187,  1.17276,  1.29685,  1.89013,  2.46531,  2.55049,
+  0.971133,  1.1469,  1.42509,  1.82366,  2.3102,  2.51319,
+  1.12232,  1.24695,  1.57393,  1.94586,  2.35067,  2.54611,
+  1.13044,  1.2818,  1.71175,  2.05285,  2.47117,  2.56897,
+  1.28579,  1.42518,  1.8744,  2.08523,  2.42611,  2.57699,
+  1.27354,  1.49021,  1.87877,  2.10625,  2.40245,  2.54437,
+  1.22424,  1.46248,  1.90461,  2.12819,  2.41656,  2.57002,
+  1.25206,  1.44985,  1.80251,  2.11987,  2.41888,  2.5188,
+  1.32712,  1.41759,  1.78996,  2.17493,  2.34065,  2.46871,
+  1.34678,  1.43555,  1.73431,  2.03604,  2.35655,  2.53105,
+  1.23582,  1.31596,  1.59712,  1.89787,  2.28422,  2.57595,
+  0.955415,  1.30377,  1.56019,  1.73007,  2.44977,  2.64812,
+  0.909089,  1.47167,  1.62448,  1.89097,  2.38965,  2.62795,
+  0.919631,  1.36687,  1.50602,  1.84259,  2.342,  2.55449,
+  0.855197,  1.27967,  1.53955,  1.68852,  2.38691,  2.50206,
+  0.807057,  1.13562,  1.5416,  1.6813,  2.24391,  2.51087,
+  0.849115,  1.19024,  1.44993,  1.54139,  2.30258,  2.6556,
+  0.832569,  1.27336,  1.59248,  1.79281,  2.28417,  2.49848,
+  0.835449,  1.16892,  1.54463,  1.71893,  2.42389,  2.63262,
+  0.826578,  1.27619,  1.40786,  1.66029,  2.37804,  2.47453,
+  0.873632,  1.36031,  1.50287,  1.75833,  2.5708,  2.71226,
+  0.82832,  1.28463,  1.46241,  1.6242,  2.57586,  2.70561,
+  0.86693,  1.13331,  1.25406,  1.42989,  2.49929,  2.56231,
+  0.807119,  1.21808,  1.34601,  1.54062,  2.48761,  2.6331,
+  0.98368,  1.14658,  1.33665,  1.47931,  2.32716,  2.61436,
+  0.991742,  1.17073,  1.29617,  1.48561,  2.54305,  2.66382,
+  0.857243,  1.17219,  1.29859,  1.6239,  2.58125,  2.67565,
+  1.02446,  1.24516,  1.33583,  1.92396,  2.62349,  2.68982,
+  1.03526,  1.29306,  1.41981,  1.88269,  2.47498,  2.67367,
+  0.98116,  1.23984,  1.33455,  1.62845,  2.54405,  2.68174,
+  0.948338,  1.22739,  1.3601,  1.57206,  2.44798,  2.66861,
+  1.09712,  1.2561,  1.36219,  1.63254,  2.50779,  2.65642,
+  1.06074,  1.284,  1.52793,  1.67627,  2.54094,  2.63814,
+  0.999111,  1.2307,  1.53126,  1.64398,  2.37306,  2.63434,
+  0.900037,  1.35716,  1.5199,  1.69115,  2.33345,  2.6059,
+  0.906535,  1.20048,  1.61525,  1.71596,  2.28887,  2.60957,
+  0.841267,  1.3377,  1.72119,  1.79912,  2.17636,  2.62724,
+  0.950819,  1.50712,  1.71882,  1.82673,  2.05053,  2.48989,
+  0.922437,  1.44759,  1.83206,  1.92051,  2.14899,  2.50957,
+  0.797637,  1.12047,  1.75627,  1.94611,  2.20911,  2.53594,
+  0.821846,  1.16874,  1.83791,  1.97773,  2.36161,  2.64241,
+  0.802821,  1.39464,  1.94559,  2.03152,  2.33749,  2.58995,
+  0.808599,  1.21429,  1.87853,  2.00233,  2.28022,  2.57778,
+  0.825133,  1.3293,  1.89662,  1.97956,  2.45575,  2.5731,
+  0.847939,  1.23595,  1.89729,  2.01661,  2.42221,  2.65115,
+  0.793266,  1.31179,  1.88526,  1.97487,  2.49392,  2.69992,
+  0.835729,  1.41812,  1.83973,  1.90323,  2.50796,  2.64513,
+  0.84938,  1.4762,  1.83681,  1.97738,  2.32134,  2.5611,
+  0.77457,  1.28461,  1.75819,  1.86442,  2.36773,  2.5612,
+  0.896154,  1.46644,  1.77022,  1.87135,  2.58655,  2.68848,
+  1.0978,  1.5765,  1.74232,  1.91022,  2.16067,  2.65845,
+  0.95072,  1.45287,  1.76016,  1.93477,  2.19628,  2.62419,
+  0.947778,  1.33478,  1.74561,  1.83051,  2.25611,  2.66786,
+  0.970291,  1.21491,  1.74593,  1.84071,  2.26878,  2.55518,
+  1.02748,  1.19305,  1.65541,  1.77056,  2.11599,  2.50296,
+  1.10863,  1.22404,  1.55642,  1.7059,  2.01907,  2.46382,
+  1.13733,  1.24864,  1.6599,  1.836,  2.0873,  2.49402,
+  1.19278,  1.29031,  1.65286,  1.87863,  2.08608,  2.61596,
+  1.23183,  1.34329,  1.52821,  1.64612,  1.91216,  2.35441,
+  1.04315,  1.3807,  1.67914,  1.83012,  2.00837,  2.41401,
+  1.10289,  1.24306,  1.74748,  1.86138,  2.20309,  2.50438,
+  1.04973,  1.35437,  1.73588,  1.819,  2.24881,  2.55779,
+  1.10598,  1.57142,  1.76481,  1.95355,  2.42885,  2.56011,
+  1.29085,  1.55016,  1.83756,  2.1266,  2.48883,  2.60078,
+  1.19424,  1.4267,  1.83766,  1.91401,  2.44321,  2.63552,
+  1.1655,  1.26009,  1.79094,  1.89331,  2.40045,  2.64664,
+  1.22495,  1.30814,  1.82593,  1.91949,  2.32136,  2.69508,
+  1.24849,  1.34538,  1.77545,  1.87671,  2.35372,  2.65414,
+  1.27114,  1.39967,  1.81154,  1.89758,  2.40349,  2.65392,
+  1.3091,  1.40766,  1.80684,  1.89783,  2.33922,  2.63235,
+  1.29102,  1.38333,  1.80244,  1.88719,  2.24772,  2.66245,
+  1.26136,  1.37051,  1.75597,  1.87125,  2.1019,  2.59359,
+  1.28264,  1.37654,  1.77553,  1.9045,  2.19234,  2.50743,
+  1.36136,  1.45086,  1.79107,  1.90616,  2.2215,  2.54334,
+  1.33499,  1.43138,  1.71627,  1.90549,  2.0892,  2.37826,
+  1.38567,  1.47042,  1.7654,  1.90922,  2.17384,  2.45657,
+  1.36432,  1.45506,  1.75488,  1.87147,  2.36504,  2.57228,
+  1.38778,  1.48689,  1.71209,  1.8475,  2.24356,  2.57069,
+  1.31245,  1.42529,  1.62289,  1.75678,  1.97847,  2.36751,
+  1.3472,  1.45434,  1.68343,  1.82547,  2.08792,  2.46256,
+  1.32645,  1.40544,  1.72764,  1.83555,  2.32887,  2.61433,
+  1.33311,  1.42971,  1.79607,  1.90035,  2.44506,  2.65291,
+  1.3228,  1.42159,  1.73694,  1.8435,  2.53212,  2.64664,
+  1.34468,  1.43186,  1.76621,  1.92458,  2.55008,  2.68986,
+  1.38828,  1.48581,  1.71196,  1.82621,  2.49614,  2.65849,
+  1.41113,  1.49561,  1.77687,  1.87667,  2.49259,  2.65135,
+  1.41779,  1.49158,  1.80169,  1.89041,  2.44245,  2.70699,
+  1.40612,  1.51559,  1.75734,  1.89697,  2.38205,  2.63363,
+  1.42586,  1.51481,  1.77326,  1.90174,  2.44755,  2.63472,
+  1.47603,  1.55503,  1.74573,  1.86162,  2.39877,  2.61498,
+  1.45985,  1.56153,  1.78645,  1.91123,  2.47654,  2.59179,
+  1.40306,  1.51419,  1.72076,  1.90094,  2.48989,  2.57733,
+  1.42813,  1.52351,  1.68976,  1.83521,  2.4589,  2.56597,
+  1.32896,  1.43471,  1.60407,  1.73425,  2.4663,  2.56683,
+  1.24132,  1.34325,  1.458,  1.69662,  2.52782,  2.64566,
+  1.13662,  1.31113,  1.42996,  1.69536,  2.54253,  2.66041,
+  1.15311,  1.34414,  1.69081,  1.98593,  2.42001,  2.55378,
+  1.23176,  1.37392,  1.66882,  2.11744,  2.40191,  2.48888,
+  0.978581,  1.11559,  1.51713,  2.00053,  2.44902,  2.52602,
+  0.951081,  1.10796,  1.20861,  1.73722,  2.4743,  2.61185,
+  0.981806,  1.12784,  1.22059,  1.72099,  2.58653,  2.69889,
+  0.977554,  1.22407,  1.33776,  1.71327,  2.59337,  2.67541,
+  0.986078,  1.2604,  1.40744,  1.57149,  2.56942,  2.63175,
+  1.06877,  1.2094,  1.46443,  1.55798,  2.55135,  2.66975,
+  1.03419,  1.17431,  1.46726,  1.55529,  2.46049,  2.64226,
+  1.05663,  1.17869,  1.5099,  1.62154,  2.15303,  2.54053,
+  1.10894,  1.24024,  1.65138,  1.77854,  2.22761,  2.57195,
+  1.04085,  1.39778,  1.70963,  1.83002,  2.3987,  2.61895,
+  1.06308,  1.56403,  1.69554,  1.79469,  2.41902,  2.57735,
+  1.15665,  1.57989,  1.74299,  1.88897,  2.41901,  2.62687,
+  1.28215,  1.60467,  1.76982,  1.98481,  2.29053,  2.40855,
+  1.41496,  1.75259,  1.9379,  2.07679,  2.28769,  2.50228,
+  1.56159,  1.88269,  2.08718,  2.19987,  2.3986,  2.50906,
+  1.74177,  1.96305,  2.16108,  2.26221,  2.51606,  2.62613,
+  1.57955,  1.9163,  2.20167,  2.30168,  2.45849,  2.64834,
+  1.6562,  1.8493,  2.1017,  2.30217,  2.48776,  2.57383,
+  1.76171,  1.93589,  2.1671,  2.42309,  2.53131,  2.61977,
+  1.74734,  1.94646,  2.12972,  2.45212,  2.59171,  2.6811,
+  1.66477,  1.95071,  2.06484,  2.45292,  2.65328,  2.71998,
+  1.18212,  1.80699,  2.03181,  2.24045,  2.58934,  2.66695,
+  0.911793,  1.44443,  1.9382,  2.00954,  2.51885,  2.66242,
+  0.906235,  1.35395,  1.86014,  1.94894,  2.57034,  2.65373,
+  0.915756,  1.18244,  1.77937,  1.91835,  2.49518,  2.68524,
+  0.923262,  1.16808,  1.70545,  2.00799,  2.40124,  2.58442,
+  0.915338,  1.1961,  1.64118,  1.9578,  2.23516,  2.50251,
+  1.11694,  1.26915,  1.59747,  1.9508,  2.1291,  2.3925,
+  1.22715,  1.34423,  1.80926,  1.99916,  2.32077,  2.54577,
+  1.30788,  1.51797,  1.83234,  2.04216,  2.34776,  2.54341,
+  1.14291,  1.42748,  1.83152,  2.02229,  2.35648,  2.58964,
+  1.02021,  1.20271,  1.78017,  2.07079,  2.56583,  2.66165,
+  1.08785,  1.26596,  1.65328,  2.09396,  2.62566,  2.70924,
+  1.14659,  1.23417,  1.66629,  2.02225,  2.60572,  2.67625,
+  1.08906,  1.31141,  1.64715,  1.83385,  2.66668,  2.72276,
+  1.18839,  1.31996,  1.72568,  1.80695,  2.57119,  2.66417,
+  1.20957,  1.35804,  1.69743,  1.7942,  2.47045,  2.64023,
+  1.24605,  1.33829,  1.69554,  1.782,  2.56576,  2.66694,
+  1.26125,  1.38448,  1.61968,  1.77958,  2.5918,  2.71243,
+  1.33751,  1.45023,  1.64699,  1.77421,  2.57897,  2.70337,
+  1.38769,  1.4781,  1.61892,  1.74728,  2.53199,  2.6657,
+  1.30178,  1.39264,  1.54187,  1.66565,  2.48454,  2.65506,
+  1.25701,  1.39883,  1.52736,  1.73414,  2.61953,  2.68968,
+  1.21116,  1.32426,  1.66434,  1.91151,  2.58934,  2.68525,
+  1.11303,  1.32541,  1.6977,  1.94018,  2.59112,  2.67963,
+  1.00034,  1.35223,  1.71949,  2.02479,  2.57766,  2.6391,
+  0.952537,  1.56466,  1.91458,  2.02111,  2.48126,  2.55357,
+  0.94138,  1.57337,  1.89848,  1.99082,  2.3884,  2.52782,
+  0.835656,  1.42686,  1.9149,  2.0063,  2.45584,  2.54443,
+  0.762518,  1.61797,  1.84816,  1.95272,  2.51168,  2.57689,
+  0.760103,  1.72025,  1.88404,  1.9725,  2.52618,  2.66897,
+  0.788105,  1.51594,  1.76089,  1.95372,  2.49866,  2.5539,
+  0.84239,  1.23509,  1.68744,  2.01111,  2.39147,  2.52955,
+  0.970555,  1.30488,  1.68991,  2.0601,  2.38601,  2.52427,
+  1.07851,  1.22081,  1.63039,  2.10393,  2.41141,  2.5183,
+  1.03513,  1.37429,  1.73952,  2.01539,  2.38354,  2.54289,
+  1.23277,  1.46612,  1.94288,  2.1126,  2.35987,  2.47684,
+  1.03214,  1.46016,  1.84361,  2.11132,  2.40561,  2.54561,
+  0.863004,  1.57537,  1.75434,  2.02642,  2.48406,  2.54587,
+  0.78188,  1.62113,  1.87611,  2.13162,  2.59115,  2.66521,
+  0.689257,  1.56767,  1.95132,  2.24673,  2.50779,  2.64996,
+  0.76292,  1.45451,  2.05214,  2.23995,  2.40891,  2.57038,
+  0.735313,  1.36954,  2.14112,  2.22674,  2.40426,  2.51585,
+  0.692794,  1.21322,  2.02173,  2.17001,  2.40979,  2.63261,
+  0.749191,  1.32741,  1.8763,  2.15981,  2.39637,  2.54356,
+  0.723514,  1.31193,  1.77912,  2.00099,  2.33306,  2.52163,
+  0.800844,  1.39933,  1.70253,  1.88677,  2.1838,  2.39184,
+  0.935365,  1.5324,  1.7461,  1.84327,  2.02788,  2.36693,
+  0.879717,  1.39098,  1.69669,  1.87323,  2.27339,  2.53295,
+  1.11563,  1.39538,  1.55249,  2.06254,  2.37975,  2.48566,
+  1.25346,  1.37982,  1.72652,  2.1649,  2.38685,  2.50781,
+  1.28865,  1.54861,  1.76922,  2.10614,  2.42884,  2.5175,
+  1.36965,  1.61115,  1.79367,  1.97047,  2.36765,  2.55804,
+  1.39903,  1.69493,  1.86562,  2.03676,  2.40916,  2.58643,
+  1.43333,  1.74573,  1.93073,  2.15938,  2.42655,  2.57904,
+  1.26759,  1.66587,  1.97138,  2.10332,  2.44452,  2.56774,
+  1.22612,  1.49722,  1.88861,  2.08359,  2.54785,  2.62348,
+  1.21786,  1.50232,  1.85015,  1.97391,  2.50602,  2.62557,
+  1.21379,  1.59537,  1.87504,  1.97942,  2.42715,  2.60646,
+  1.23975,  1.51387,  1.76668,  1.94793,  2.28162,  2.49207,
+  1.24763,  1.58563,  1.72974,  1.8947,  2.38196,  2.52212,
+  1.20115,  1.47447,  1.74657,  1.83424,  2.28973,  2.52518,
+  1.18147,  1.55532,  1.7036,  1.82308,  2.31583,  2.44389,
+  1.19633,  1.57376,  1.73522,  1.80803,  2.4035,  2.55724,
+  1.14908,  1.63161,  1.76916,  1.92557,  2.36812,  2.54281,
+  1.07109,  1.63355,  1.76134,  1.87247,  2.40846,  2.57352,
+  1.06523,  1.55174,  1.71341,  1.88049,  2.38743,  2.51216,
+  0.987564,  1.63573,  1.78594,  1.95671,  2.4134,  2.54862,
+  0.931677,  1.52646,  1.77301,  1.89696,  2.43796,  2.5139,
+  0.900322,  1.64588,  1.78798,  2.04104,  2.33427,  2.43459,
+  0.867303,  1.71472,  1.90161,  2.09919,  2.3871,  2.47589,
+  0.868278,  1.69374,  1.9173,  2.01308,  2.2746,  2.38253,
+  0.848816,  1.56719,  1.82901,  1.92983,  2.3394,  2.42562,
+  0.789452,  1.36929,  1.82686,  1.91727,  2.41428,  2.50207,
+  0.737031,  1.1733,  1.87303,  1.97283,  2.45513,  2.54124,
+  0.759015,  1.25073,  1.78111,  1.99463,  2.42044,  2.55494,
+  0.749485,  1.36394,  1.89637,  1.99357,  2.44226,  2.50985,
+  0.749379,  1.21466,  1.94066,  2.03408,  2.45072,  2.5683,
+  0.801242,  1.26916,  1.8709,  1.95599,  2.40516,  2.47386,
+  0.82329,  1.25895,  1.87986,  2.0697,  2.41177,  2.5101,
+  0.836531,  1.27393,  1.9573,  2.04747,  2.49016,  2.58229,
+  0.834116,  1.18388,  1.88646,  1.96919,  2.49948,  2.60434,
+  0.876413,  1.17115,  1.94662,  2.0309,  2.43135,  2.55301,
+  0.839364,  1.05611,  1.85364,  2.10059,  2.39261,  2.55434,
+  0.864173,  1.16468,  1.83549,  1.96885,  2.37631,  2.5161,
+  0.932804,  1.29457,  1.83095,  1.90104,  2.44527,  2.55257,
+  0.963048,  1.35686,  1.76883,  1.89322,  2.47992,  2.61467,
+  1.03707,  1.35972,  1.82081,  1.89105,  2.51931,  2.60502,
+  1.06061,  1.46234,  1.79795,  1.93929,  2.52187,  2.59188,
+  1.07992,  1.50417,  1.80221,  1.93053,  2.46514,  2.5432,
+  1.14011,  1.33906,  1.81335,  1.90531,  2.37007,  2.53042,
+  1.15187,  1.35617,  1.77236,  1.88371,  2.37001,  2.61081,
+  1.28808,  1.63863,  1.75106,  2.27992,  2.55539,  2.62328,
+  1.45144,  1.73949,  1.9164,  2.3887,  2.63615,  2.70283,
+  1.59125,  1.85154,  2.21828,  2.38549,  2.59375,  2.67943,
+  1.59226,  2.01614,  2.2338,  2.33376,  2.54482,  2.66517,
+  1.6542,  1.94158,  2.25097,  2.37237,  2.4589,  2.59983,
+  1.70325,  2.0255,  2.2296,  2.3371,  2.46858,  2.61766,
+  1.63882,  2.00556,  2.20195,  2.26846,  2.49954,  2.61841,
+  1.92467,  2.13532,  2.45818,  2.50417,  2.59384,  2.6254,
+  1.80381,  2.06257,  2.19935,  2.28946,  2.55004,  2.64392,
+  1.77301,  1.97662,  2.10757,  2.22087,  2.44498,  2.54384,
+  1.76495,  2.00173,  2.21445,  2.2547,  2.47561,  2.57975,
+  1.67833,  1.86391,  2.24464,  2.34367,  2.47113,  2.63609,
+  1.75581,  1.86025,  2.22372,  2.35306,  2.4983,  2.58668,
+  1.69343,  1.86924,  2.2833,  2.3958,  2.51974,  2.58367,
+  1.7044,  1.79121,  2.14719,  2.33645,  2.47903,  2.59089,
+  1.68326,  1.86225,  2.16334,  2.35184,  2.52091,  2.61603,
+  1.62322,  1.80421,  2.22207,  2.3603,  2.6199,  2.69951,
+  1.65724,  1.82561,  2.25849,  2.34735,  2.54573,  2.69471,
+  1.66007,  1.86034,  2.25357,  2.36412,  2.56409,  2.63073,
+  1.5969,  1.83951,  2.21893,  2.38579,  2.54647,  2.62589,
+  1.62232,  1.8512,  1.99621,  2.3774,  2.52207,  2.59549,
+  1.02947,  1.25453,  1.74899,  2.05352,  2.44588,  2.57611,
+  0.856689,  0.993818,  1.56961,  2.21376,  2.46185,  2.54708,
+  1.01658,  1.1919,  1.29347,  1.77814,  2.4558,  2.55165,
+  1.01054,  1.22815,  1.31143,  1.82028,  2.53151,  2.65675,
+  0.908278,  1.18958,  1.28554,  1.8586,  2.52592,  2.61992,
+  0.871987,  1.17192,  1.31749,  1.82652,  2.40074,  2.51809,
+  1.03312,  1.18885,  1.4397,  2.03901,  2.57242,  2.6561,
+  0.970197,  1.29563,  1.40244,  2.03504,  2.48818,  2.54989,
+  1.0882,  1.22065,  1.55306,  2.13338,  2.5357,  2.59506,
+  1.00995,  1.3898,  1.51706,  2.11522,  2.47419,  2.55069,
+  0.993372,  1.42737,  1.53917,  1.9724,  2.52584,  2.58386,
+  1.04829,  1.48208,  1.63718,  2.16108,  2.52317,  2.61471,
+  1.02433,  1.56286,  1.69224,  2.29516,  2.59484,  2.64857,
+  0.907692,  1.61256,  1.74613,  2.16254,  2.57575,  2.61626,
+  0.890482,  1.61113,  1.77393,  1.97073,  2.57775,  2.6596,
+  0.808392,  1.5978,  1.78596,  2.0064,  2.56504,  2.63896,
+  0.766474,  1.58442,  1.83584,  1.92974,  2.58154,  2.64107,
+  0.769957,  1.62677,  1.86926,  2.02945,  2.60278,  2.66048,
+  0.798945,  1.53186,  1.83489,  1.94653,  2.62826,  2.69262,
+  0.720628,  1.38023,  1.8176,  1.89535,  2.54776,  2.6072,
+  0.717991,  1.30127,  1.75327,  1.88057,  2.50111,  2.57068,
+  0.757538,  1.19751,  1.71932,  1.8634,  2.4672,  2.58075,
+  0.753702,  1.29247,  1.69185,  1.7758,  2.47259,  2.58378,
+  0.814552,  1.2342,  1.58385,  1.68828,  2.54626,  2.60138,
+  0.892573,  1.25942,  1.54867,  1.62871,  2.46518,  2.55748,
+  0.949846,  1.26057,  1.42925,  1.62028,  2.39675,  2.4574,
+  1.0353,  1.2441,  1.49824,  1.64392,  2.38137,  2.52433,
+  1.10807,  1.33757,  1.53819,  1.80059,  2.51358,  2.61769,
+  1.18254,  1.37047,  1.56189,  1.84416,  2.54573,  2.61445,
+  1.21527,  1.3744,  1.59539,  1.9408,  2.51228,  2.59416,
+  1.23283,  1.3567,  1.64836,  2.04066,  2.51833,  2.60689,
+  1.29553,  1.441,  1.62601,  2.06359,  2.53545,  2.6072,
+  1.31746,  1.48417,  1.66663,  2.1072,  2.50946,  2.56956,
+  1.28814,  1.40484,  1.70844,  2.1424,  2.47826,  2.55815,
+  1.30118,  1.49063,  1.68866,  2.20974,  2.51657,  2.5826,
+  1.38891,  1.4886,  1.75307,  2.24911,  2.46845,  2.53274,
+  1.43236,  1.50195,  1.75604,  2.22738,  2.54031,  2.63382,
+  1.27063,  1.44425,  1.69718,  2.16774,  2.57417,  2.66708,
+  1.37795,  1.51182,  1.61924,  2.07059,  2.58057,  2.65545,
+  1.31909,  1.43763,  1.57516,  1.82626,  2.5685,  2.64694,
+  1.27334,  1.43938,  1.61468,  1.97782,  2.58918,  2.64227,
+  1.36481,  1.49144,  1.65464,  1.9149,  2.27758,  2.49171,
+  1.3814,  1.48233,  1.6257,  1.76745,  2.29282,  2.53541,
+  1.31612,  1.4108,  1.57452,  1.6965,  2.24155,  2.54414,
+  1.24921,  1.44841,  1.65161,  1.81201,  2.16694,  2.52883,
+  1.32999,  1.4301,  1.63778,  1.7537,  2.14427,  2.49173,
+  1.21201,  1.46018,  1.66372,  1.72397,  2.45273,  2.65487,
+  1.15467,  1.42799,  1.63984,  1.70382,  2.52478,  2.64719,
+  1.13219,  1.27638,  1.63819,  1.75073,  2.36014,  2.63024,
+  1.1068,  1.2922,  1.56399,  1.73715,  2.27638,  2.67348,
+  1.00947,  1.4092,  1.60525,  1.75588,  2.54981,  2.6669,
+  0.849242,  1.42476,  1.60734,  1.77047,  2.59306,  2.69757,
+  0.884126,  1.41867,  1.69054,  1.91036,  2.64889,  2.75356,
+  0.835786,  1.50533,  1.65083,  1.83983,  2.66751,  2.73182,
+  0.830887,  1.41843,  1.69822,  1.81279,  2.54661,  2.60518,
+  0.770144,  1.45618,  1.73535,  1.83979,  2.48532,  2.53941,
+  0.741204,  1.4612,  1.72026,  2.03966,  2.61315,  2.65662,
+  0.746126,  1.43606,  1.67492,  1.86887,  2.61646,  2.6596,
+  0.785082,  1.34349,  1.67545,  1.75655,  2.55005,  2.61191,
+  0.745773,  1.35482,  1.63002,  1.93899,  2.4536,  2.54908,
+  0.84578,  1.46925,  1.62908,  1.97497,  2.49928,  2.54978,
+  0.949421,  1.46277,  1.57299,  2.28604,  2.54958,  2.60293,
+  1.02515,  1.38536,  1.64839,  2.19293,  2.44063,  2.53102,
+  1.03372,  1.43617,  1.74409,  2.13226,  2.54404,  2.6189,
+  1.08284,  1.45584,  1.59799,  2.00309,  2.62826,  2.73613,
+  1.02162,  1.3808,  1.5378,  2.00792,  2.65618,  2.72548,
+  0.934605,  1.33831,  1.72128,  2.02138,  2.45266,  2.63594,
+  0.974987,  1.2806,  1.74048,  1.98864,  2.38339,  2.58854,
+  0.963572,  1.35863,  1.77509,  2.07708,  2.37441,  2.55255,
+  1.33939,  1.60607,  1.94104,  2.1598,  2.44654,  2.58731,
+  1.26864,  1.60406,  1.94006,  2.17892,  2.48766,  2.5975,
+  1.12981,  1.52262,  1.87297,  2.07507,  2.47971,  2.63317,
+  1.13535,  1.4223,  1.86599,  1.94531,  2.52336,  2.68614,
+  1.13554,  1.56227,  1.76815,  1.92201,  2.50605,  2.73613,
+  1.17333,  1.63762,  1.8454,  1.97453,  2.37951,  2.62759,
+  1.22309,  1.47716,  1.79951,  1.94529,  2.6037,  2.69777,
+  1.28565,  1.78142,  1.97253,  2.33525,  2.64962,  2.71925,
+  1.51607,  1.86247,  2.08499,  2.38614,  2.56337,  2.65052,
+  1.62251,  1.80088,  2.07468,  2.3711,  2.4941,  2.60895,
+  1.64422,  1.73091,  2.23525,  2.34462,  2.4606,  2.62177,
+  1.64649,  1.74384,  2.11867,  2.33454,  2.48765,  2.5973,
+  1.57447,  1.66694,  2.16568,  2.29463,  2.46302,  2.64293,
+  1.56853,  1.66268,  2.06838,  2.24007,  2.37478,  2.53429,
+  1.50109,  1.67557,  2.0192,  2.25394,  2.40396,  2.56021,
+  1.33322,  1.48186,  1.81038,  2.03244,  2.23527,  2.46402,
+  1.18419,  1.37647,  1.74307,  2.07718,  2.24737,  2.43664,
+  0.860298,  1.01797,  1.39947,  2.03136,  2.44583,  2.51204,
+  0.987543,  1.18722,  1.32467,  2.08656,  2.44026,  2.50786,
+  0.987539,  1.05739,  1.40051,  2.29103,  2.46201,  2.53454,
+  1.07257,  1.16846,  1.33543,  2.28155,  2.59528,  2.64199,
+  1.04242,  1.21947,  1.32875,  2.10439,  2.48141,  2.54485,
+  1.07584,  1.20487,  1.37029,  2.20656,  2.50952,  2.5572,
+  1.07591,  1.18808,  1.41434,  2.3201,  2.53091,  2.58942,
+  1.07615,  1.2674,  1.41198,  2.21842,  2.45229,  2.54095,
+  1.15455,  1.31481,  1.50039,  2.30097,  2.50519,  2.56979,
+  1.17038,  1.30037,  1.47778,  2.20108,  2.41823,  2.51101,
+  1.16483,  1.29078,  1.43643,  2.04217,  2.4346,  2.51715,
+  1.19386,  1.29319,  1.52759,  2.00881,  2.37081,  2.47326,
+  1.26354,  1.38567,  1.59613,  2.04876,  2.42779,  2.50408,
+  1.30519,  1.42101,  1.65888,  2.09585,  2.42943,  2.51858,
+  1.3783,  1.49436,  1.71028,  2.07804,  2.47796,  2.55948,
+  1.33373,  1.47526,  1.67404,  2.03963,  2.44671,  2.52705,
+  1.34615,  1.46853,  1.67367,  1.96109,  2.4626,  2.56716,
+  1.32426,  1.4669,  1.74709,  2.00944,  2.48056,  2.57128,
+  1.30692,  1.41105,  1.74078,  2.0324,  2.46634,  2.57579,
+  1.2773,  1.40831,  1.71568,  1.95693,  2.50597,  2.5973,
+  1.23917,  1.40986,  1.63569,  1.84314,  2.51134,  2.59249,
+  1.26227,  1.3779,  1.66588,  1.78528,  2.41492,  2.5191,
+  1.22377,  1.37861,  1.70694,  1.81201,  2.47211,  2.5535,
+  1.24828,  1.56097,  1.68845,  2.02442,  2.46468,  2.53208,
+  1.55115,  1.67483,  1.86392,  2.2426,  2.42567,  2.51231,
+  1.61354,  1.73636,  1.91583,  2.28434,  2.5051,  2.5755,
+  1.67565,  1.76455,  2.01326,  2.3086,  2.47931,  2.57088,
+  1.67679,  1.73219,  2.21691,  2.35074,  2.51681,  2.58494,
+  1.67209,  1.76809,  2.1703,  2.27753,  2.41116,  2.49253,
+  1.64585,  1.88123,  2.21635,  2.32063,  2.46081,  2.56493,
+  1.71409,  1.93321,  2.22012,  2.3277,  2.45303,  2.55743,
+  1.86416,  1.9656,  2.21189,  2.35407,  2.45155,  2.5437,
+  1.84051,  1.9809,  2.14136,  2.27592,  2.48783,  2.60703,
+  1.28163,  1.50854,  1.87809,  2.15331,  2.51039,  2.59772,
+  1.28594,  1.55852,  1.89593,  2.1545,  2.51005,  2.62888,
+  1.1797,  1.45797,  1.80582,  2.0887,  2.53683,  2.64835,
+  1.21318,  1.47414,  1.79648,  1.88639,  2.42644,  2.59714,
+  1.17576,  1.56663,  1.7868,  1.95963,  2.44398,  2.62181,
+  1.24128,  1.49554,  1.77294,  1.95943,  2.51364,  2.61189,
+  1.25286,  1.54735,  1.7413,  1.87367,  2.44728,  2.67464,
+  1.23425,  1.43703,  1.74215,  1.83575,  2.37217,  2.58149,
+  1.2624,  1.35128,  1.71028,  1.83349,  2.30891,  2.5836,
+  1.33086,  1.4241,  1.67389,  1.80298,  2.27185,  2.55676,
+  1.37492,  1.47319,  1.70336,  1.80452,  2.37449,  2.62583,
+  1.35042,  1.47764,  1.74193,  1.86958,  2.46816,  2.63785,
+  1.29945,  1.40927,  1.70733,  1.82882,  2.41262,  2.66007,
+  1.28367,  1.41318,  1.69401,  1.91384,  2.235,  2.66336,
+  1.13135,  1.54545,  1.7382,  1.92713,  2.24255,  2.52954,
+  1.3104,  1.44532,  1.80081,  1.94176,  2.22418,  2.4307,
+  1.20782,  1.40771,  1.79229,  1.89783,  2.27858,  2.58879,
+  1.17208,  1.38037,  1.76961,  1.87071,  2.42071,  2.66541,
+  1.05037,  1.29292,  1.70868,  1.81557,  2.3983,  2.64784,
+  1.0122,  1.35284,  1.71047,  1.79843,  2.50105,  2.62211,
+  0.949688,  1.51131,  1.80223,  2.05177,  2.38659,  2.54393,
+  1.23953,  1.52331,  1.99264,  2.17592,  2.53584,  2.66332,
+  1.17041,  1.42396,  1.91809,  2.07296,  2.37133,  2.60069,
+  1.15328,  1.63164,  1.94366,  2.04139,  2.42629,  2.52794,
+  1.13099,  1.68734,  1.9131,  1.98242,  2.36664,  2.59216,
+  0.876015,  1.53912,  1.95282,  2.04039,  2.35419,  2.59247,
+  0.741027,  1.33078,  2.01026,  2.08898,  2.40638,  2.51241,
+  0.692068,  1.22098,  1.96684,  2.05317,  2.52761,  2.62537,
+  0.697907,  1.40678,  2.01601,  2.08582,  2.57318,  2.65234,
+  0.747161,  1.54248,  1.98219,  2.09109,  2.57331,  2.6146,
+  0.759939,  1.51811,  1.93822,  2.16296,  2.53435,  2.63909,
+  0.752015,  1.44593,  2.09774,  2.15063,  2.47989,  2.58714,
+  0.80419,  1.42852,  2.01245,  2.19581,  2.47075,  2.57726,
+  0.757784,  1.35654,  1.87818,  2.23225,  2.531,  2.6303,
+  0.782189,  1.2517,  1.76691,  2.20655,  2.56445,  2.6177,
+  0.692136,  1.30829,  1.59302,  1.84293,  2.50433,  2.65265,
+  0.779817,  1.26499,  1.68969,  1.80369,  2.5305,  2.66946,
+  0.774734,  1.19962,  1.64959,  1.72658,  2.4371,  2.59153,
+  0.885025,  1.31194,  1.64647,  1.73919,  2.57872,  2.67199,
+  0.949387,  1.38711,  1.64193,  1.76257,  2.52877,  2.58579,
+  1.01204,  1.45536,  1.66673,  1.75258,  2.43427,  2.55352,
+  1.10407,  1.52937,  1.68209,  1.97304,  2.34551,  2.51158,
+  1.424,  1.61941,  1.99551,  2.29891,  2.43078,  2.52129,
+  1.58246,  1.83207,  2.2751,  2.38313,  2.4828,  2.53932,
+  1.70637,  2.00167,  2.30003,  2.39481,  2.48697,  2.58695,
+  1.53226,  1.93376,  2.28401,  2.42231,  2.62294,  2.70604,
+  1.67894,  1.88906,  2.33897,  2.51297,  2.63237,  2.6795,
+  1.63441,  1.78371,  2.12418,  2.463,  2.61035,  2.69136,
+  1.61835,  1.75102,  2.02613,  2.41802,  2.6094,  2.67895,
+  1.5652,  1.7943,  1.90207,  2.40566,  2.62933,  2.69687,
+  1.28214,  1.59125,  1.85203,  2.31423,  2.61778,  2.72294,
+  1.22037,  1.42168,  1.69434,  1.88174,  2.5568,  2.65318,
+  1.1394,  1.29901,  1.62237,  1.77043,  2.54387,  2.6407,
+  1.21449,  1.46742,  1.62803,  1.79401,  2.56341,  2.6917,
+  1.05963,  1.52181,  1.63195,  1.86516,  2.60104,  2.68366,
+  1.1802,  1.53659,  1.67186,  2.13796,  2.58765,  2.63839,
+  1.21365,  1.58211,  1.7095,  2.15751,  2.4768,  2.57401,
+  1.24846,  1.55305,  1.6453,  1.89754,  2.57776,  2.68128,
+  1.34058,  1.60143,  1.67999,  1.88914,  2.64709,  2.75513,
+  1.19455,  1.57556,  1.69753,  1.80137,  2.59652,  2.75237,
+  1.15299,  1.53138,  1.71641,  1.81272,  2.41715,  2.69646,
+  1.17528,  1.56527,  1.65742,  1.73478,  2.51798,  2.67121,
+  1.31588,  1.51598,  1.77517,  2.05808,  2.3073,  2.4493,
+  1.24713,  1.38127,  1.56836,  1.85701,  2.15728,  2.43501,
+  1.24025,  1.38365,  1.58057,  1.99147,  2.30357,  2.41106,
+  1.2868,  1.38585,  1.7307,  2.06754,  2.32691,  2.47304,
+  1.20411,  1.33789,  1.66549,  2.03875,  2.23142,  2.5434,
+  1.18234,  1.31211,  1.52226,  1.97103,  2.23777,  2.48363,
+  1.09543,  1.31991,  1.46571,  2.03259,  2.27994,  2.52364,
+  1.1525,  1.29451,  1.45831,  2.03253,  2.30603,  2.40676,
+  0.991441,  1.27466,  1.42822,  1.94058,  2.3991,  2.50937,
+  0.850157,  1.27472,  1.45373,  1.89353,  2.38229,  2.47766,
+  0.93606,  1.31321,  1.42674,  1.88897,  2.55174,  2.60439,
+  0.972592,  1.32833,  1.43283,  2.01105,  2.57367,  2.61367,
+  0.9094,  1.42276,  1.49463,  2.07395,  2.62063,  2.66268,
+  0.828475,  1.4317,  1.56949,  2.05425,  2.62211,  2.66974,
+  0.779249,  1.37567,  1.47663,  1.94919,  2.559,  2.62214,
+  0.81571,  1.47269,  1.65049,  2.00091,  2.56521,  2.61168,
+  0.822357,  1.33351,  1.55165,  1.86418,  2.59585,  2.70612,
+  0.736497,  1.25989,  1.49082,  1.88222,  2.49441,  2.61998,
+  0.90224,  1.431,  1.5205,  1.91079,  2.6054,  2.67859,
+  0.900488,  1.36305,  1.46181,  2.00977,  2.66588,  2.71718,
+  1.01539,  1.36153,  1.47485,  1.92044,  2.63748,  2.70257,
+  0.950918,  1.33518,  1.44088,  1.87435,  2.67892,  2.74624,
+  0.965674,  1.30691,  1.41289,  1.72718,  2.65632,  2.73947,
+  1.12134,  1.29133,  1.41298,  1.73139,  2.62458,  2.736,
+  1.13549,  1.29997,  1.44863,  1.63579,  2.61671,  2.68774,
+  1.12041,  1.2482,  1.38368,  1.57976,  2.39717,  2.58524,
+  1.11342,  1.2945,  1.48237,  1.60279,  2.39483,  2.63481,
+  1.24175,  1.31817,  1.47317,  1.5775,  2.426,  2.64978,
+  1.18438,  1.27289,  1.49775,  1.60805,  2.14445,  2.53727,
+  1.28314,  1.37732,  1.54304,  1.64518,  2.10579,  2.4909,
+  1.13801,  1.38076,  1.56048,  1.64098,  2.27101,  2.62552,
+  1.24388,  1.35154,  1.60307,  1.73979,  2.03808,  2.44751,
+  1.26726,  1.50996,  1.64165,  1.83198,  2.33133,  2.47283,
+  1.27637,  1.4764,  1.62502,  1.93034,  2.31938,  2.52437,
+  1.22268,  1.55941,  1.66998,  1.80547,  2.32691,  2.58028,
+  1.26522,  1.50389,  1.83098,  2.09154,  2.39672,  2.56909,
+  1.25605,  1.52888,  1.85303,  2.10617,  2.36514,  2.50328,
+  1.2365,  1.47912,  1.7283,  2.04146,  2.52856,  2.6129,
+  1.22064,  1.60519,  1.71377,  1.95092,  2.59764,  2.64949,
+  1.25555,  1.59187,  1.70675,  2.06271,  2.56138,  2.6269,
+  1.30708,  1.58002,  1.65355,  1.94129,  2.55273,  2.64371,
+  1.31097,  1.5128,  1.65653,  1.83919,  2.5921,  2.67771,
+  1.1886,  1.31608,  1.57937,  1.69077,  2.4385,  2.64188,
+  1.11467,  1.23599,  1.59197,  1.74919,  2.35944,  2.54521,
+  1.08007,  1.27713,  1.728,  2.04141,  2.33707,  2.54979,
+  1.03222,  1.25021,  1.681,  1.99834,  2.31853,  2.5022,
+  1.06472,  1.15918,  1.66673,  2.01929,  2.25657,  2.57347,
+  1.02631,  1.14637,  1.67293,  2.05406,  2.43323,  2.61572,
+  0.942929,  1.09279,  1.61352,  2.07778,  2.36514,  2.49974,
+  0.98025,  1.25478,  1.492,  1.80119,  2.44532,  2.57571,
+  0.957395,  1.25187,  1.37834,  1.74457,  2.50297,  2.66587,
+  0.840336,  1.26799,  1.39773,  1.82798,  2.55587,  2.65128,
+  1.0099,  1.17581,  1.27777,  2.04836,  2.6379,  2.7009,
+  0.88384,  1.02678,  1.14669,  1.89368,  2.51869,  2.61056,
+  0.997171,  1.13829,  1.24641,  1.83753,  2.54982,  2.64269,
+  0.992125,  1.17887,  1.28227,  1.9744,  2.55911,  2.61297,
+  1.06759,  1.2558,  1.35902,  1.96394,  2.54142,  2.59631,
+  1.08633,  1.32907,  1.43233,  1.92884,  2.52833,  2.59824,
+  1.10035,  1.34558,  1.46953,  1.94236,  2.46972,  2.56168,
+  1.10102,  1.37438,  1.56114,  1.94256,  2.48429,  2.553,
+  1.1775,  1.45517,  1.57149,  1.9435,  2.50031,  2.5509,
+  1.26077,  1.4779,  1.60161,  2.02402,  2.48743,  2.55424,
+  1.21644,  1.47008,  1.6396,  1.95721,  2.52383,  2.58819,
+  1.25798,  1.4072,  1.65143,  1.91072,  2.4642,  2.62087,
+  1.16209,  1.43654,  1.68217,  1.89692,  2.4473,  2.67707,
+  1.25022,  1.48463,  1.65387,  1.93047,  2.49389,  2.63344,
+  1.23798,  1.51339,  1.64878,  1.88034,  2.50409,  2.58149,
+  1.2232,  1.41246,  1.63408,  1.79718,  2.45121,  2.62062,
+  1.25874,  1.3584,  1.62772,  1.7261,  2.42829,  2.62133,
+  1.23492,  1.34561,  1.55215,  1.70868,  2.38574,  2.60605,
+  1.18642,  1.34181,  1.63691,  1.75468,  2.42972,  2.54439,
+  1.21626,  1.30589,  1.63278,  1.75577,  2.32081,  2.58379,
+  1.16534,  1.28415,  1.56053,  1.68204,  2.24322,  2.49467,
+  1.08586,  1.21511,  1.5906,  1.71533,  2.23163,  2.52723,
+  1.09165,  1.38416,  1.65516,  1.71656,  2.30278,  2.53555,
+  1.06033,  1.23908,  1.62721,  1.73757,  2.42016,  2.59915,
+  1.09008,  1.39478,  1.68248,  1.7999,  2.33181,  2.53286,
+  1.16904,  1.56812,  1.78572,  2.03155,  2.37221,  2.49786,
+  1.2419,  1.66208,  1.82249,  2.16954,  2.42454,  2.52519,
+  1.04029,  1.69041,  1.8531,  2.03859,  2.47201,  2.53597,
+  0.974879,  1.68906,  1.85014,  2.15131,  2.50742,  2.56254,
+  0.879683,  1.74384,  1.96806,  2.16115,  2.46392,  2.54585,
+  0.790116,  1.79441,  2.0373,  2.15974,  2.5084,  2.56488,
+  0.793374,  1.79617,  2.06052,  2.33107,  2.5913,  2.64858,
+  0.859332,  1.80046,  2.02545,  2.20064,  2.53432,  2.61132,
+  0.825206,  1.89513,  2.06358,  2.26453,  2.51403,  2.6108,
+  0.974068,  1.90478,  2.00264,  2.31585,  2.53967,  2.59516,
+  0.961311,  1.82128,  2.01521,  2.27454,  2.60079,  2.65336,
+  0.97104,  1.73701,  1.91495,  2.2439,  2.57236,  2.6126,
+  0.999552,  1.8179,  1.9531,  2.17859,  2.57433,  2.62628,
+  0.9773,  1.75604,  1.92914,  2.13535,  2.42421,  2.55609,
+  1.06554,  1.74764,  1.89917,  2.30975,  2.58739,  2.63059,
+  1.07706,  1.65572,  1.86833,  2.2386,  2.50891,  2.57184,
+  1.07783,  1.71642,  1.79146,  2.26622,  2.61548,  2.65405,
+  1.27602,  1.71338,  1.78883,  2.10144,  2.62562,  2.67959,
+  1.26317,  1.69909,  1.77693,  2.03511,  2.61035,  2.65342,
+  1.29714,  1.66767,  1.74401,  2.03012,  2.60806,  2.67807,
+  1.26237,  1.62646,  1.78116,  2.02618,  2.63626,  2.69918,
+  1.31803,  1.65777,  1.76358,  1.93904,  2.57545,  2.70561,
+  0.980669,  1.55589,  1.72298,  1.97855,  2.56896,  2.63842,
+  0.840013,  1.4634,  1.77278,  2.16486,  2.56689,  2.66623,
+  0.832158,  1.50575,  1.93789,  2.23397,  2.63013,  2.69488,
+  0.745541,  1.5301,  2.06073,  2.163,  2.61913,  2.69213,
+  0.83205,  1.59799,  2.12768,  2.19666,  2.52887,  2.6193,
+  0.820544,  1.61648,  2.04484,  2.13356,  2.58766,  2.66815,
+  0.789348,  1.63857,  1.99603,  2.2128,  2.57293,  2.61543,
+  0.806795,  1.74253,  2.04392,  2.18384,  2.60341,  2.66027,
+  0.843597,  1.76138,  1.99882,  2.13297,  2.5965,  2.67316,
+  0.927714,  1.7594,  1.98717,  2.20199,  2.59168,  2.65081,
+  1.0705,  1.76711,  1.97829,  2.22719,  2.6427,  2.68638,
+  1.02285,  1.85683,  1.98982,  2.21722,  2.48094,  2.57469,
+  0.886409,  1.74269,  1.86307,  2.0549,  2.54233,  2.62705,
+  0.996501,  1.55364,  1.80806,  1.94851,  2.51673,  2.60575,
+  1.21822,  1.52501,  1.87802,  2.1072,  2.42395,  2.57889,
+  1.27471,  1.49178,  1.90624,  2.10124,  2.45572,  2.56357,
+  1.31948,  1.58708,  1.87982,  2.24044,  2.43946,  2.54799,
+  1.47451,  1.699,  1.92926,  2.22822,  2.45187,  2.56313,
+  1.54527,  1.72271,  1.8921,  2.16916,  2.52024,  2.60296,
+  1.54616,  1.66889,  1.96149,  2.21208,  2.506,  2.62127,
+  1.53562,  1.69929,  2.01636,  2.25082,  2.55009,  2.64562,
+  1.58341,  1.68775,  2.05195,  2.33263,  2.49172,  2.59804,
+  1.50093,  1.59405,  1.92923,  2.25985,  2.42262,  2.54776,
+  1.46492,  1.61478,  1.8817,  2.21673,  2.52895,  2.62322,
+  1.40673,  1.60503,  1.80598,  2.22272,  2.50901,  2.58784,
+  1.10642,  1.52778,  1.73018,  2.04592,  2.54946,  2.6375,
+  1.00815,  1.43972,  1.66547,  1.94137,  2.65244,  2.7511,
+  0.971347,  1.40208,  1.7089,  1.95327,  2.61333,  2.68499,
+  0.946352,  1.50104,  1.67215,  1.97587,  2.5279,  2.58557,
+  0.909229,  1.45358,  1.7139,  2.06564,  2.52931,  2.61316,
+  0.975079,  1.52329,  1.83956,  2.13855,  2.49869,  2.58372,
+  0.899524,  1.55241,  1.83164,  2.06857,  2.54488,  2.61118,
+  0.805175,  1.46233,  1.86054,  2.10134,  2.57044,  2.65485,
+  0.859011,  1.51453,  1.8924,  2.01252,  2.57968,  2.64852,
+  0.763528,  1.52243,  1.90254,  2.01852,  2.55645,  2.60958,
+  0.814387,  1.49485,  1.94172,  2.07798,  2.54033,  2.61284,
+  0.853805,  1.40187,  1.94299,  2.08809,  2.48839,  2.57861,
+  0.782036,  1.34855,  1.9353,  2.02508,  2.51682,  2.59805,
+  0.754386,  1.38495,  1.90024,  1.99966,  2.60037,  2.66376,
+  0.746921,  1.42114,  1.93457,  2.03891,  2.55327,  2.6123,
+  0.731911,  1.45076,  1.92451,  2.03274,  2.4979,  2.55649,
+  0.706741,  1.54373,  1.8766,  1.99252,  2.51018,  2.56596,
+  0.852548,  1.54995,  1.89917,  2.2265,  2.52279,  2.58394,
+  0.885718,  1.657,  1.86579,  2.16289,  2.46739,  2.55377,
+  0.951271,  1.64172,  1.814,  2.15306,  2.4271,  2.49961,
+  0.928485,  1.50278,  1.80944,  2.22477,  2.4724,  2.55392,
+  0.816616,  1.3911,  1.66558,  2.17614,  2.51072,  2.58282,
+  0.915934,  1.39094,  1.76751,  2.16955,  2.47166,  2.65253,
+  1.11534,  1.36231,  1.72259,  2.03303,  2.40636,  2.60188,
+  1.13866,  1.25298,  1.68452,  1.93737,  2.38431,  2.6239,
+  1.08432,  1.21195,  1.63364,  1.88994,  2.41309,  2.62623,
+  1.12622,  1.34492,  1.6486,  2.07112,  2.48419,  2.60566,
+  1.1239,  1.46156,  1.8451,  2.17246,  2.46266,  2.60514,
+  1.13256,  1.46864,  1.74022,  2.18493,  2.46794,  2.5801,
+  1.14825,  1.50617,  1.6766,  2.04929,  2.44677,  2.56542,
+  0.999544,  1.4047,  1.64177,  1.86332,  2.52384,  2.59211,
+  0.932167,  1.39598,  1.70943,  1.84574,  2.52479,  2.59962,
+  0.870085,  1.47633,  1.72151,  1.89709,  2.49026,  2.59376,
+  0.891107,  1.42911,  1.78973,  1.95843,  2.5191,  2.60499,
+  0.85555,  1.42127,  1.90094,  2.01101,  2.54662,  2.60976,
+  0.895038,  1.48258,  1.87357,  1.97483,  2.51943,  2.58445,
+  0.809092,  1.4865,  1.90227,  2.00088,  2.51837,  2.59726,
+  0.808211,  1.46017,  1.88158,  1.9614,  2.46839,  2.61633,
+  0.774237,  1.47186,  1.90122,  2.01376,  2.56487,  2.66569,
+  0.800018,  1.57695,  1.93818,  2.04372,  2.49438,  2.6301,
+  0.804705,  1.57076,  1.88936,  1.97549,  2.44765,  2.55519,
+  0.840709,  1.60338,  1.82708,  2.02632,  2.44289,  2.49242,
+  0.887288,  1.53614,  1.78162,  1.9522,  2.50081,  2.57651,
+  0.847527,  1.5047,  1.79295,  1.89159,  2.57889,  2.63732,
+  0.959025,  1.53382,  1.82149,  1.97974,  2.46375,  2.5443,
+  1.03632,  1.64079,  1.88602,  1.96289,  2.35866,  2.57776,
+  0.981142,  1.48674,  1.7331,  1.87828,  2.53797,  2.61047,
+  1.04649,  1.43851,  1.74084,  1.85001,  2.59088,  2.68414,
+  1.1034,  1.48978,  1.73824,  1.8175,  2.58837,  2.70105,
+  1.17692,  1.47368,  1.73285,  1.82327,  2.52453,  2.73354,
+  1.17332,  1.43838,  1.69656,  1.79254,  2.58079,  2.66577,
+  1.13496,  1.42186,  1.60407,  1.75613,  2.61795,  2.70664,
+  1.13601,  1.38418,  1.6991,  1.85532,  2.59101,  2.68321,
+  1.20171,  1.42193,  1.73786,  2.0112,  2.54096,  2.68109,
+  1.22745,  1.62446,  2.12523,  2.34056,  2.59344,  2.67145,
+  1.26513,  1.76569,  2.13134,  2.39177,  2.61396,  2.69985,
+  1.34228,  1.58141,  1.97924,  2.29776,  2.52039,  2.60226,
+  1.44901,  1.72555,  2.17628,  2.35474,  2.53876,  2.62732,
+  1.41873,  1.89868,  2.20633,  2.2756,  2.48875,  2.58679,
+  1.55571,  1.8376,  2.16574,  2.34619,  2.53018,  2.62876,
+  1.44444,  1.79005,  1.91101,  2.30191,  2.46886,  2.54056,
+  1.37805,  1.6685,  1.84527,  2.32489,  2.53771,  2.60147,
+  1.39474,  1.68271,  1.81735,  2.07553,  2.51212,  2.56689,
+  1.2972,  1.65588,  1.82541,  2.0621,  2.51331,  2.57737,
+  1.28066,  1.6699,  1.82457,  2.16821,  2.52817,  2.60199,
+  1.3069,  1.60081,  1.76797,  2.09529,  2.50987,  2.606,
+  1.25768,  1.55975,  1.7878,  2.07689,  2.54039,  2.62718,
+  1.19685,  1.59755,  1.81742,  2.15266,  2.5808,  2.65125,
+  1.23593,  1.67664,  1.94231,  2.32648,  2.56154,  2.64559,
+  1.18906,  1.81889,  2.0815,  2.36645,  2.60802,  2.67209,
+  1.42759,  1.88542,  2.26491,  2.42422,  2.57137,  2.65115,
+  1.71447,  1.93787,  2.39001,  2.45715,  2.55202,  2.60193,
+  1.87414,  2.07351,  2.37047,  2.51126,  2.70918,  2.7495,
+  1.64782,  1.9878,  2.28191,  2.4121,  2.60469,  2.67482,
+  1.59637,  1.88153,  2.19399,  2.38052,  2.51192,  2.58456,
+  1.55551,  1.77522,  2.06409,  2.3257,  2.51293,  2.59926,
+  1.33005,  1.71296,  1.91762,  2.2859,  2.46659,  2.57928,
+  0.990071,  1.41087,  1.63233,  1.96589,  2.46688,  2.58042,
+  0.92515,  1.29903,  1.5514,  1.89749,  2.49848,  2.64521,
+  0.96808,  1.36713,  1.52036,  1.98816,  2.31347,  2.54694,
+  0.974374,  1.28381,  1.47481,  2.0783,  2.33109,  2.45515,
+  1.00062,  1.29915,  1.41568,  1.95576,  2.26155,  2.35426,
+  0.964045,  1.13649,  1.30593,  1.93641,  2.19754,  2.29942,
+  1.01309,  1.20114,  1.37266,  1.82018,  2.06358,  2.21066,
+  1.08648,  1.2167,  1.47666,  1.60404,  1.85596,  2.3245,
+  1.09016,  1.20121,  1.46078,  1.56222,  2.01609,  2.45898,
+  1.13375,  1.25747,  1.40719,  1.78768,  2.28953,  2.53085,
+  1.13483,  1.34122,  1.63629,  1.81377,  2.21945,  2.58465,
+  0.952747,  1.30093,  1.61689,  1.75101,  2.35211,  2.54788,
+  1.0787,  1.49004,  1.57158,  1.80053,  2.46817,  2.65044,
+  1.23905,  1.33303,  1.55138,  1.70782,  2.24292,  2.60425,
+  1.17652,  1.29911,  1.58888,  1.71408,  2.12886,  2.53352,
+  1.13583,  1.25306,  1.53841,  1.63448,  2.25809,  2.59387,
+  1.09238,  1.25324,  1.54177,  1.67988,  2.4232,  2.61758,
+  1.14266,  1.2564,  1.52828,  1.62968,  2.39158,  2.58969,
+  1.17279,  1.28125,  1.4792,  1.60888,  2.33594,  2.59368,
+  1.14678,  1.25195,  1.43292,  1.55329,  2.23894,  2.53418,
+  1.10995,  1.23142,  1.4121,  1.51605,  2.30857,  2.5999,
+  1.12027,  1.23554,  1.42574,  1.50952,  2.43553,  2.64381,
+  1.08587,  1.1893,  1.39272,  1.49435,  2.12934,  2.50899,
+  1.0205,  1.17314,  1.44097,  1.57442,  2.33586,  2.52405,
+  1.04055,  1.17434,  1.52572,  1.69311,  2.49375,  2.63235,
+  1.03452,  1.20526,  1.36509,  1.513,  2.47179,  2.57801,
+  1.07938,  1.204,  1.33243,  1.4566,  2.50213,  2.66563,
+  1.08886,  1.23695,  1.357,  1.56494,  2.60202,  2.70758,
+  1.10679,  1.2624,  1.36727,  1.82395,  2.59858,  2.6763,
+  1.08501,  1.23353,  1.31146,  1.73033,  2.56009,  2.69032,
+  1.06921,  1.18022,  1.34302,  1.47483,  2.26805,  2.54431,
+  1.03939,  1.37562,  1.72144,  2.03802,  2.464,  2.60081,
+  1.26785,  1.38411,  1.6599,  1.93402,  2.20776,  2.42458,
+  1.22528,  1.31662,  1.67815,  1.81923,  2.16534,  2.49855,
+  1.11414,  1.28303,  1.65552,  1.87967,  2.35247,  2.55354,
+  1.09476,  1.37002,  1.79913,  2.08238,  2.46949,  2.57882,
+  1.04125,  1.47276,  1.74873,  2.04759,  2.5117,  2.58983,
+  1.07167,  1.45655,  1.70052,  1.92732,  2.44148,  2.607,
+  0.929006,  1.48724,  1.66955,  1.88562,  2.54427,  2.62832,
+  0.844366,  1.33971,  1.81246,  2.30021,  2.56601,  2.63125,
+  0.761441,  1.27995,  1.67045,  2.00635,  2.52682,  2.60756,
+  0.716643,  1.37484,  1.84344,  2.12696,  2.55299,  2.61315,
+  0.749967,  1.59846,  1.88327,  2.05044,  2.57918,  2.61411,
+  0.759376,  1.59638,  1.9291,  1.98455,  2.56673,  2.65421,
+  0.724977,  1.6829,  1.88829,  2.0348,  2.50386,  2.5655,
+  0.812327,  1.66987,  1.96177,  2.10215,  2.53878,  2.59856,
+  0.767334,  1.59463,  1.98432,  2.13342,  2.50169,  2.55781,
+  0.76023,  1.65065,  1.92837,  2.09405,  2.56524,  2.59608,
+  0.766762,  1.64806,  1.85855,  2.07859,  2.58708,  2.60821,
+  0.860938,  1.62925,  1.82485,  2.06735,  2.56337,  2.60321,
+  0.960953,  1.58363,  1.75221,  2.07844,  2.55553,  2.62851,
+  1.00793,  1.548,  1.73495,  2.18566,  2.48935,  2.55145,
+  1.0404,  1.47112,  1.64352,  2.05156,  2.50852,  2.57917,
+  1.09602,  1.45743,  1.60401,  1.9262,  2.48203,  2.5522,
+  1.13043,  1.43153,  1.59281,  2.01474,  2.51065,  2.56778,
+  1.1979,  1.46548,  1.62293,  2.07595,  2.50705,  2.58275,
+  1.25883,  1.5048,  1.65911,  1.97065,  2.59575,  2.68565,
+  1.31545,  1.46745,  1.70572,  1.89863,  2.60257,  2.70498,
+  1.27248,  1.43189,  1.71285,  1.94026,  2.65038,  2.71717,
+  1.27886,  1.52865,  1.7962,  1.9952,  2.50176,  2.58761,
+  1.45862,  1.69394,  2.0679,  2.26484,  2.50686,  2.62394,
+  1.7188,  1.90961,  2.1476,  2.35417,  2.48558,  2.59127,
+  1.81387,  1.87548,  2.09764,  2.32968,  2.4978,  2.59625,
+  1.74429,  1.85945,  2.04317,  2.28459,  2.4309,  2.53857,
+  1.51418,  1.8083,  1.93379,  2.23465,  2.46223,  2.54624,
+  1.48926,  1.78119,  1.908,  2.14448,  2.41859,  2.51386,
+  1.43479,  1.67979,  1.81735,  2.10537,  2.43137,  2.52824,
+  1.46958,  1.58951,  1.81351,  2.21313,  2.4405,  2.52051,
+  1.49629,  1.64005,  1.89386,  2.29862,  2.4847,  2.57621,
+  1.33342,  1.58473,  1.89302,  2.12181,  2.52535,  2.63262,
+  1.51872,  1.73584,  1.95653,  2.17643,  2.46534,  2.57234,
+  1.52095,  1.74256,  2.01058,  2.13358,  2.44746,  2.5667,
+  1.45812,  1.69223,  2.00192,  2.12054,  2.43104,  2.56511,
+  1.52691,  1.66239,  2.02514,  2.12506,  2.53787,  2.62681,
+  1.4983,  1.64421,  1.96073,  2.10329,  2.44031,  2.57241,
+  1.41548,  1.54829,  1.7708,  2.09993,  2.45026,  2.59946,
+  1.36719,  1.46063,  1.73948,  2.07403,  2.55195,  2.64
+};
+
+const struct lsp_codebook lsp_cbvq[] = {
+  /* codebook/lsp1.txt */
+  {
+    1,
+    4,
+    16,
+    codes0
+  },
+  /* codebook/lsp2.txt */
+  {
+    1,
+    4,
+    16,
+    codes1
+  },
+  /* codebook/lsp3.txt */
+  {
+    1,
+    4,
+    16,
+    codes2
+  },
+  /* codebook/lsp4.txt */
+  {
+    1,
+    4,
+    16,
+    codes3
+  },
+  /* ../unittest/lsp45678910.txt */
+  {
+    6,
+    12,
+    4096,
+    codes4
+  },
+  { 0, 0, 0, 0 }
+};
diff --git a/libs/libcodec2/src/codebookvqanssi.c b/libs/libcodec2/src/codebookvqanssi.c
new file mode 100644 (file)
index 0000000..b755740
--- /dev/null
@@ -0,0 +1,565 @@
+/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */
+
+/*
+ * This intermediary file and the files that used to create it are under 
+ * The LGPL. See the file COPYING.
+ */
+
+#include "defines.h"
+
+  /* codebook/lspvqanssi1.txt */
+static const float codes0[] = {
+  0.5862,  0.7213,  0.9146,  1.0909,  1.291,  1.4954,  1.837,  2.084,  2.3771,  2.5518,
+  0.0871,  0.2049,  0.5849,  0.8552,  1.2096,  1.4686,  1.821,  2.0926,  2.4508,  2.7389,
+  0.2274,  0.3126,  0.6088,  0.8338,  1.1824,  1.5948,  1.8228,  1.9856,  2.1832,  2.4793,
+  0.1827,  0.2706,  0.5842,  0.7761,  1.0301,  1.2462,  1.6313,  1.9786,  2.3479,  2.679,
+  0.3055,  0.3863,  0.7194,  1.1609,  1.3303,  1.5017,  1.7265,  1.9412,  2.4659,  2.6315,
+  0.1794,  0.2522,  0.5477,  0.7892,  1.3887,  1.7101,  1.9471,  2.1667,  2.4361,  2.631,
+  0.1825,  0.2729,  0.4185,  0.6024,  1.2531,  1.7291,  1.9937,  2.1849,  2.5865,  2.7748,
+  0.3219,  0.4045,  0.7357,  1.2708,  1.4626,  1.6439,  1.9388,  2.1212,  2.5005,  2.6749,
+  0.2234,  0.3496,  0.5054,  0.6981,  0.8672,  1.0431,  1.7091,  2.069,  2.329,  2.6195,
+  0.3009,  0.3957,  0.7576,  0.9751,  1.1955,  1.7727,  2.0383,  2.2474,  2.5612,  2.7188,
+  0.3841,  0.5544,  0.9209,  1.1811,  1.5441,  1.8126,  2.1175,  2.3192,  2.5486,  2.6935,
+  0.2153,  0.3105,  0.5597,  0.8313,  1.2168,  1.4512,  1.7012,  1.8962,  2.3893,  2.5852,
+  0.3196,  0.4814,  0.7629,  1.0869,  1.5517,  1.778,  2.0462,  2.2547,  2.5023,  2.6706,
+  0.1964,  0.3055,  0.4307,  0.7178,  1.426,  1.624,  1.8392,  2.0576,  2.2976,  2.5492,
+  0.426,  0.6888,  1.2019,  1.4194,  1.6437,  1.8221,  2.0469,  2.2508,  2.5142,  2.6795,
+  0.3004,  0.3944,  0.5847,  1.005,  1.1812,  1.3559,  1.5479,  1.7847,  2.4924,  2.6703,
+  0.1595,  0.2398,  0.4336,  0.9228,  1.2602,  1.5064,  1.7915,  1.984,  2.232,  2.5692,
+  0.1832,  0.2985,  0.4205,  0.598,  0.762,  0.9894,  1.7499,  2.1151,  2.4814,  2.7214,
+  0.2234,  0.3207,  0.5457,  0.9799,  1.2074,  1.7079,  1.9734,  2.1742,  2.4575,  2.6366,
+  0.3598,  0.4819,  0.6385,  0.8878,  1.3226,  1.491,  1.7257,  1.9456,  2.2061,  2.4579,
+  0.4671,  0.5911,  0.8513,  1.0923,  1.5104,  1.7043,  1.9727,  2.1839,  2.4484,  2.6111,
+  0.2418,  0.3937,  0.542,  0.8971,  1.1152,  1.3054,  1.7928,  1.9796,  2.5441,  2.7572,
+  0.3541,  0.473,  0.6546,  0.9063,  1.0792,  1.2743,  1.8545,  2.0555,  2.3083,  2.5404,
+  0.3121,  0.4016,  0.7137,  0.8835,  1.0736,  1.5907,  1.8624,  2.0857,  2.5075,  2.6668,
+  0.2232,  0.3631,  0.5273,  0.7438,  1.0492,  1.2235,  1.5449,  2.2198,  2.516,  2.6852,
+  0.2557,  0.3528,  0.5051,  0.6528,  0.8351,  1.5688,  1.8838,  2.1056,  2.4401,  2.6111,
+  0.4342,  0.5318,  0.9234,  1.1146,  1.3015,  1.5198,  1.8211,  2.034,  2.3694,  2.5506,
+  0.431,  0.5269,  0.7431,  0.9018,  1.0734,  1.5196,  1.8267,  2.0244,  2.4508,  2.6177,
+  0.215,  0.3249,  0.4966,  0.9434,  1.1627,  1.3497,  1.8003,  2.0045,  2.3567,  2.5909,
+  0.2798,  0.4111,  0.5786,  0.7971,  1.0414,  1.2142,  1.6947,  2.0866,  2.3351,  2.5545,
+  0.1688,  0.2693,  0.4004,  0.6337,  1.3058,  1.5064,  1.7535,  1.9689,  2.5542,  2.7424,
+  0.4419,  0.6209,  1.0127,  1.2135,  1.4104,  1.6111,  1.882,  2.1005,  2.4238,  2.5966,
+  0.3645,  0.512,  0.8977,  1.2209,  1.5286,  1.7204,  1.9787,  2.1779,  2.439,  2.6114,
+  0.2897,  0.4136,  0.5504,  0.8515,  1.2641,  1.4334,  1.8079,  2.0656,  2.3509,  2.7593,
+  0.1611,  0.4723,  0.742,  1.0071,  1.2571,  1.5891,  1.9224,  2.2345,  2.5647,  2.7991,
+  0.2528,  0.4178,  0.8909,  1.3117,  1.6622,  1.8641,  2.1017,  2.2974,  2.5299,  2.6982,
+  0.1749,  0.27,  0.4116,  0.6036,  1.143,  1.7776,  2.0394,  2.222,  2.4667,  2.6598,
+  0.3451,  0.4325,  0.6194,  0.7406,  0.9176,  1.554,  1.8426,  2.0479,  2.4401,  2.5965,
+  0.3672,  0.5164,  0.6558,  0.8441,  1.2332,  1.4114,  1.6955,  2.0875,  2.3674,  2.5471,
+  0.2194,  0.3467,  0.7384,  1.1079,  1.5398,  1.8437,  2.1212,  2.3296,  2.58,  2.7403,
+  0.1525,  0.2343,  0.3915,  0.6843,  1.0517,  1.502,  1.7905,  1.9667,  2.2027,  2.6725,
+  0.3531,  0.5908,  0.7462,  0.9441,  1.2774,  1.4743,  1.8268,  2.1059,  2.4478,  2.6484,
+  0.3611,  0.4981,  0.7598,  0.9676,  1.4024,  1.633,  1.9094,  2.1433,  2.4408,  2.613,
+  0.2153,  0.3366,  0.4974,  0.6693,  1.1944,  1.6791,  1.9002,  2.1105,  2.41,  2.5922,
+  0.2421,  0.3392,  0.5123,  0.9818,  1.5411,  1.7092,  1.9989,  2.1981,  2.5659,  2.7656,
+  0.2116,  0.325,  0.4845,  0.8021,  1.0088,  1.2158,  1.8038,  2.0223,  2.2975,  2.581,
+  0.1902,  0.2942,  0.8003,  1.1086,  1.3606,  1.6008,  1.8956,  2.1328,  2.4481,  2.6405,
+  0.2772,  0.3914,  0.5826,  0.7654,  0.9495,  1.124,  1.3949,  2.0411,  2.3891,  2.5959,
+  0.2678,  0.522,  0.763,  1.1,  1.3747,  1.6432,  1.9391,  2.2237,  2.5511,  2.7893,
+  0.32,  0.4245,  0.6174,  0.9904,  1.1662,  1.3882,  1.7601,  1.9524,  2.3998,  2.5819,
+  0.1702,  0.4871,  0.837,  1.0989,  1.3593,  1.583,  1.875,  2.1277,  2.4666,  2.6885,
+  0.228,  0.3748,  0.6554,  0.9113,  1.2081,  1.4619,  1.8181,  2.0541,  2.3791,  2.5701,
+  0.1752,  0.4363,  0.6454,  0.8798,  1.1079,  1.5367,  1.8667,  2.1716,  2.4804,  2.7249,
+  0.3804,  0.47,  0.8224,  1.0099,  1.1892,  1.5906,  1.8879,  2.0907,  2.4544,  2.6238,
+  0.1808,  0.291,  0.4683,  0.7059,  0.898,  1.4031,  1.7063,  1.9444,  2.4658,  2.6776,
+  0.2418,  0.3803,  0.5443,  0.7589,  1.1496,  1.3185,  1.5451,  1.7433,  2.131,  2.6523,
+  0.2698,  0.369,  0.5362,  1.0732,  1.2921,  1.4696,  1.744,  1.947,  2.5051,  2.6841,
+  0.4099,  0.5102,  0.6983,  1.0468,  1.2459,  1.4185,  1.8851,  2.0815,  2.3464,  2.5605,
+  0.0669,  0.1354,  0.3764,  0.8433,  1.1719,  1.4834,  1.8181,  2.1312,  2.4626,  2.8044,
+  0.1614,  0.2372,  0.3878,  0.5708,  1.2759,  1.495,  1.8052,  2.0807,  2.3485,  2.6293,
+  0.1688,  0.2875,  0.4301,  0.9059,  1.2361,  1.4054,  1.8057,  1.9924,  2.5589,  2.7495,
+  0.2864,  0.3783,  0.7032,  1.0817,  1.2382,  1.5741,  1.8619,  2.0656,  2.5139,  2.6848,
+  0.3829,  0.4781,  0.6766,  0.834,  1.0056,  1.4147,  1.665,  1.884,  2.3922,  2.5619,
+  0.3259,  0.4187,  0.6139,  0.7338,  1.1831,  1.6497,  1.9,  2.1278,  2.4322,  2.593,
+  0.2569,  0.379,  0.5426,  0.839,  0.9871,  1.485,  1.8652,  2.0732,  2.4314,  2.6005,
+  0.1408,  0.2283,  0.4024,  0.8784,  1.1485,  1.4003,  1.7004,  1.9205,  2.3723,  2.6522,
+  0.2971,  0.5039,  0.8005,  1.1212,  1.4232,  1.7801,  2.1255,  2.3907,  2.6795,  2.8487,
+  0.1515,  0.2344,  0.4684,  0.804,  1.0401,  1.3774,  1.8329,  2.1235,  2.5555,  2.777,
+  0.5778,  0.7157,  0.891,  1.0966,  1.4235,  1.6482,  1.9551,  2.1831,  2.4572,  2.6234,
+  0.3017,  0.4161,  0.8088,  0.9971,  1.2,  1.4419,  1.7867,  2.0224,  2.3473,  2.54,
+  0.1208,  0.2814,  0.6564,  0.9448,  1.2377,  1.5663,  1.9084,  2.2112,  2.5583,  2.8155,
+  0.2127,  0.3127,  0.4635,  0.6416,  0.8449,  1.6652,  2.0577,  2.2656,  2.5811,  2.7434,
+  0.1942,  0.3011,  0.4212,  0.6901,  1.5369,  1.7639,  1.9608,  2.1766,  2.4435,  2.6663,
+  0.351,  0.4345,  0.7146,  0.9086,  1.0678,  1.2579,  1.4425,  2.0265,  2.4574,  2.6252,
+  0.3225,  0.4323,  0.6168,  0.858,  1.5388,  1.791,  1.9927,  2.2013,  2.4494,  2.616,
+  0.2271,  0.4488,  0.6287,  0.7857,  1.2086,  1.383,  1.6194,  2.1955,  2.5236,  2.6945,
+  0.2568,  0.351,  0.5613,  1.05,  1.2521,  1.4359,  1.6995,  1.9187,  2.2148,  2.4275,
+  0.2933,  0.3941,  0.6128,  0.8899,  1.072,  1.2862,  1.5331,  1.8301,  2.1553,  2.3865,
+  0.348,  0.4626,  0.6009,  0.763,  0.9044,  1.1225,  1.8539,  2.1845,  2.5035,  2.7091,
+  0.1337,  0.4722,  0.8099,  1.1273,  1.4252,  1.699,  2.0188,  2.2922,  2.6018,  2.8168,
+  0.1138,  0.3263,  0.8059,  1.0473,  1.3262,  1.6202,  1.9439,  2.2007,  2.5347,  2.7702,
+  0.1979,  0.313,  0.4635,  0.8504,  1.1143,  1.3221,  2.0371,  2.2421,  2.5406,  2.7491,
+  0.3321,  0.4194,  0.8239,  1.0458,  1.1981,  1.3733,  1.5661,  1.9985,  2.3747,  2.5416,
+  0.3729,  0.5958,  0.9551,  1.265,  1.5484,  1.9255,  2.2256,  2.4809,  2.7276,  2.8935,
+  0.1664,  0.2516,  0.5347,  0.7545,  1.1971,  1.4089,  1.74,  2.0871,  2.4098,  2.6795,
+  0.237,  0.3178,  0.6123,  1.3315,  1.547,  1.7257,  2.0063,  2.1977,  2.5449,  2.7252,
+  0.203,  0.3328,  0.4766,  0.7357,  1.278,  1.4439,  1.7229,  1.9405,  2.2278,  2.6816,
+  0.1702,  0.2919,  0.4598,  0.7123,  0.9077,  1.145,  1.8632,  2.0806,  2.499,  2.71,
+  0.2421,  0.3578,  0.54,  0.7217,  0.8971,  1.4898,  1.8518,  2.1205,  2.6077,  2.7894,
+  0.303,  0.3935,  0.5812,  0.7404,  0.9425,  1.8342,  2.0887,  2.2811,  2.5596,  2.7118,
+  0.1322,  0.1997,  0.3466,  0.6981,  1.1811,  1.4849,  1.8594,  2.1114,  2.4708,  2.7804,
+  0.2317,  0.3069,  0.686,  1.4306,  1.7121,  1.8671,  2.1249,  2.2995,  2.5705,  2.7456,
+  0.3778,  0.4863,  0.6639,  0.9163,  1.156,  1.3186,  1.5389,  1.7169,  2.1603,  2.5797,
+  0.2118,  0.3499,  0.5259,  0.72,  1.1348,  1.314,  1.5657,  2.0241,  2.2873,  2.5184,
+  0.2902,  0.4368,  0.6331,  0.8971,  1.3102,  1.5219,  1.8674,  2.1512,  2.4708,  2.6809,
+  0.1418,  0.3988,  0.6251,  0.8544,  1.1268,  1.3964,  1.7585,  2.0322,  2.3964,  2.6928,
+  0.2314,  0.3462,  0.7282,  0.9211,  1.1766,  1.4941,  1.7368,  1.9546,  2.517,  2.7066,
+  0.2076,  0.3251,  0.7423,  0.959,  1.1936,  1.5329,  1.8887,  2.1588,  2.4667,  2.6709,
+  0.2058,  0.4139,  0.5745,  0.7832,  0.9595,  1.1688,  1.7561,  1.9562,  2.484,  2.7001,
+  0.1834,  0.2971,  0.4643,  0.6625,  0.8802,  1.1137,  1.5183,  1.8417,  2.3842,  2.7042,
+  0.1688,  0.4218,  0.707,  1.0465,  1.4496,  1.6953,  1.956,  2.2174,  2.5172,  2.7404,
+  0.2323,  0.3981,  0.5489,  0.7227,  1.2886,  1.5221,  1.7158,  2.1184,  2.4066,  2.5898,
+  0.347,  0.5265,  0.814,  1.0152,  1.3206,  1.5411,  1.849,  2.0588,  2.3556,  2.5393,
+  0.1707,  0.2595,  0.6762,  0.9037,  1.2781,  1.4903,  1.7946,  2.061,  2.3741,  2.5771,
+  0.1457,  0.2318,  0.6039,  1.0078,  1.3461,  1.5908,  1.8818,  2.1248,  2.4432,  2.6714,
+  0.6574,  0.8086,  1.0243,  1.2183,  1.4837,  1.7129,  2.0197,  2.2464,  2.5059,  2.6716,
+  0.2546,  0.4983,  0.8674,  1.2536,  1.6704,  1.9529,  2.2134,  2.4319,  2.6532,  2.8109,
+  0.2455,  0.3379,  0.4632,  0.8635,  1.5286,  1.8047,  1.9909,  2.1806,  2.4031,  2.5729,
+  0.4772,  0.6742,  1,  1.2474,  1.5288,  1.7415,  2.0102,  2.2168,  2.477,  2.6449,
+  0.3357,  0.4382,  0.6033,  1.1317,  1.3681,  1.5576,  1.9251,  2.1119,  2.5548,  2.7395,
+  0.2588,  0.7015,  0.8953,  1.083,  1.2828,  1.516,  1.8965,  2.1921,  2.515,  2.7258,
+  0.2466,  0.3512,  0.5047,  0.6646,  0.8161,  1.2577,  1.8046,  2.0214,  2.4447,  2.6491,
+  0.1631,  0.2283,  0.407,  0.5955,  1.1126,  1.3894,  1.8978,  2.1849,  2.5384,  2.7382,
+  0.3424,  0.4748,  0.6222,  0.802,  0.9706,  1.1568,  1.7044,  1.9297,  2.2127,  2.5627,
+  0.2088,  0.5143,  0.74,  0.9277,  1.1032,  1.3561,  1.8841,  2.2004,  2.5882,  2.7993,
+  0.2016,  0.3488,  0.5894,  0.7419,  1.1488,  1.3626,  1.5566,  1.9694,  2.5488,  2.7209,
+  0.2558,  0.3914,  0.536,  0.7521,  1.433,  1.6955,  1.8886,  2.1428,  2.419,  2.5966,
+  0.4021,  0.5034,  0.6653,  0.8123,  0.9586,  1.2825,  1.9184,  2.112,  2.409,  2.597,
+  0.2343,  0.48,  0.6934,  0.8523,  1.2786,  1.4763,  1.7235,  2.04,  2.3602,  2.5562,
+  0.246,  0.3687,  0.5325,  0.7044,  1.1488,  1.3608,  1.8112,  2.0757,  2.4183,  2.663,
+  0.1616,  0.3644,  0.5725,  0.9166,  1.2481,  1.4938,  1.8388,  2.1175,  2.4712,  2.7464,
+  0.376,  0.4841,  0.635,  1.0082,  1.211,  1.4003,  1.8127,  2.0018,  2.5199,  2.7238,
+  0.1988,  0.2824,  0.6553,  1.0337,  1.5413,  1.7369,  1.9751,  2.1751,  2.4372,  2.6265,
+  0.2728,  0.4094,  0.7498,  1.0645,  1.3516,  1.5946,  1.991,  2.2172,  2.483,  2.6614,
+  0.1657,  0.5327,  0.7281,  0.9966,  1.2385,  1.4629,  1.8119,  2.0973,  2.4469,  2.6979,
+  0.1413,  0.2098,  0.354,  0.5492,  0.8486,  1.1288,  1.632,  1.9056,  2.2805,  2.5438,
+  0.2856,  0.3666,  0.6259,  1.1424,  1.6605,  1.8197,  2.0147,  2.1986,  2.4121,  2.5919,
+  0.2725,  0.4829,  0.765,  1.0119,  1.2977,  1.5488,  1.8755,  2.1155,  2.4383,  2.6377,
+  0.2736,  0.3804,  0.5537,  1.0258,  1.2269,  1.4186,  1.9718,  2.1468,  2.5665,  2.7689,
+  0.2341,  0.5953,  1.103,  1.4549,  1.7361,  1.9758,  2.2126,  2.4213,  2.6405,  2.8181,
+  0.2273,  0.4638,  0.6228,  0.85,  1.1016,  1.2823,  1.7094,  1.9523,  2.2669,  2.7029,
+  0.2438,  0.3798,  0.7299,  0.96,  1.3765,  1.6104,  1.8644,  2.1161,  2.5073,  2.7137,
+  0.1551,  0.4869,  0.8676,  1.2274,  1.5069,  1.8857,  2.1868,  2.4411,  2.7106,  2.8767,
+  0.2746,  0.5454,  0.7589,  0.9458,  1.1597,  1.3349,  1.6653,  2.1142,  2.4356,  2.6239,
+  0.1793,  0.2646,  0.4344,  0.7482,  1.1502,  1.3733,  1.8558,  2.0817,  2.3248,  2.5171,
+  0.2698,  0.4202,  0.5765,  0.8301,  1.0073,  1.2101,  1.9714,  2.2051,  2.5138,  2.7395,
+  0.1929,  0.3091,  0.446,  0.6266,  1.1805,  1.3672,  1.599,  2.1514,  2.4729,  2.6468,
+  0.1901,  0.3047,  0.4607,  1.1019,  1.3168,  1.5343,  1.9234,  2.1365,  2.5924,  2.7807,
+  0.3139,  0.5009,  0.67,  0.8268,  1.0117,  1.181,  1.6539,  2.1984,  2.4828,  2.6576,
+  0.1403,  0.2173,  0.4117,  0.7302,  1.0038,  1.2732,  1.7392,  2.0337,  2.3809,  2.7386,
+  0.4166,  0.5101,  0.7449,  1.1663,  1.3492,  1.5543,  1.9,  2.0941,  2.4588,  2.6365,
+  0.3342,  0.4335,  0.616,  0.8559,  1.0112,  1.2097,  1.4029,  1.6361,  2.4129,  2.6324,
+  0.4543,  0.6159,  0.7932,  0.9843,  1.2562,  1.4308,  1.7116,  1.9919,  2.2671,  2.4631,
+  0.2153,  0.3609,  0.5302,  0.7089,  0.8756,  1.0376,  1.6496,  2.2826,  2.568,  2.7441,
+  0.438,  0.6439,  0.8282,  1.0651,  1.365,  1.5829,  1.8838,  2.1005,  2.4006,  2.5771,
+  0.2523,  0.3636,  0.5879,  1.1628,  1.3542,  1.6756,  2.0488,  2.2543,  2.6093,  2.7953,
+  0.4179,  0.5426,  0.7065,  0.8996,  1.0684,  1.3146,  1.9705,  2.2021,  2.5051,  2.7061,
+  0.1659,  0.286,  0.6693,  0.9229,  1.3959,  1.6544,  1.9709,  2.2257,  2.5236,  2.746,
+  0.254,  0.4356,  0.5946,  0.7627,  1.2274,  1.4222,  1.6573,  1.9601,  2.2514,  2.4711,
+  0.1633,  0.2337,  0.3698,  0.5421,  1.1757,  1.5916,  2.1561,  2.3371,  2.5534,  2.7737,
+  0.1953,  0.273,  0.4521,  1.2005,  1.7062,  1.8627,  2.1313,  2.3266,  2.5906,  2.7667,
+  0.3053,  0.4054,  0.5651,  0.747,  0.891,  1.172,  1.8864,  2.1074,  2.3705,  2.5744,
+  0.1761,  0.3033,  0.6501,  0.8268,  1.0369,  1.2687,  1.8534,  2.1889,  2.5074,  2.7339,
+  0.2265,  0.399,  1.1359,  1.4137,  1.6839,  1.8912,  2.0948,  2.3042,  2.5489,  2.7234,
+  0.3326,  0.54,  0.8711,  1.0948,  1.3752,  1.6155,  1.936,  2.1537,  2.4451,  2.6133,
+  0.2162,  0.3522,  0.5309,  0.747,  0.9677,  1.1747,  1.5056,  1.7942,  2.1615,  2.48,
+  0.1872,  0.2761,  0.4053,  0.7469,  1.5858,  1.8945,  2.1198,  2.3197,  2.5819,  2.7758,
+  0.5381,  0.8651,  1.2695,  1.4918,  1.7774,  1.9696,  2.1865,  2.3687,  2.5739,  2.7158,
+  0.2663,  0.3422,  0.6098,  1.212,  1.4516,  1.6092,  1.8506,  2.0376,  2.2929,  2.5088,
+  0.1904,  0.3051,  0.5663,  0.7391,  1.1589,  1.5705,  1.8756,  2.1653,  2.5518,  2.7693,
+  0.1543,  0.3519,  0.6976,  1.0664,  1.3696,  1.7817,  2.1308,  2.4259,  2.707,  2.8753,
+  0.3304,  0.4283,  0.5942,  0.7425,  0.8906,  1.4067,  2.0676,  2.246,  2.5394,  2.7006,
+  0.208,  0.3215,  0.6278,  0.7882,  1.3123,  1.5592,  1.8048,  2.0831,  2.4303,  2.6266,
+  0.1188,  0.2481,  0.827,  1.242,  1.5824,  1.8976,  2.1816,  2.4248,  2.6645,  2.8459,
+  0.0635,  0.1528,  0.5973,  0.9377,  1.2653,  1.5465,  1.8818,  2.1681,  2.5089,  2.7924,
+  0.3249,  0.5179,  0.9143,  1.2973,  1.4966,  1.755,  2.0715,  2.3166,  2.65,  2.8305,
+  0.1918,  0.3107,  0.4506,  0.6994,  1.3463,  1.5348,  1.8447,  2.1903,  2.448,  2.6877,
+  0.3405,  0.4644,  0.7232,  0.9199,  1.2611,  1.5175,  1.8446,  2.0652,  2.3915,  2.5781,
+  0.3289,  0.5152,  0.6602,  1.0213,  1.1886,  1.5496,  1.9553,  2.1883,  2.5394,  2.7362,
+  0.3,  0.4097,  0.8372,  1.0793,  1.3095,  1.5684,  1.8746,  2.0783,  2.3643,  2.549,
+  0.2421,  0.328,  0.5288,  0.9261,  1.6911,  1.8959,  2.1013,  2.2823,  2.5238,  2.696,
+  0.107,  0.3131,  0.6226,  0.8881,  1.1808,  1.4867,  1.8146,  2.1088,  2.4594,  2.7186,
+  0.44,  0.5533,  0.7025,  0.9206,  1.4089,  1.582,  1.808,  2.0832,  2.3577,  2.53,
+  0.225,  0.3434,  0.4808,  0.6721,  0.8198,  1.1446,  2.0201,  2.2625,  2.552,  2.7604,
+  0.1671,  0.2551,  0.4603,  0.6777,  0.9661,  1.5579,  1.8659,  2.1196,  2.4425,  2.6551,
+  0.391,  0.5877,  1.0287,  1.3547,  1.6899,  1.9166,  2.1451,  2.3337,  2.5519,  2.7071,
+  0.1435,  0.2165,  0.3968,  0.8376,  1.2572,  1.5298,  1.8791,  2.1352,  2.4636,  2.7011,
+  0.1756,  0.2799,  0.412,  0.5808,  0.7573,  1.334,  1.8235,  2.12,  2.4993,  2.7365,
+  0.1332,  0.2174,  0.4716,  0.9483,  1.2723,  1.6028,  1.9272,  2.219,  2.5588,  2.799,
+  0.2122,  0.3143,  0.7042,  0.8849,  1.1312,  1.3711,  1.6832,  1.9633,  2.2685,  2.5156,
+  0.2089,  0.3339,  0.4817,  0.8526,  1.0657,  1.2741,  1.5747,  1.8,  2.486,  2.6843,
+  0.1636,  0.2617,  0.44,  0.7357,  1.0355,  1.2638,  1.5672,  1.8504,  2.1904,  2.6588,
+  0.1945,  0.2934,  0.4869,  0.8567,  1.1262,  1.3604,  1.6898,  1.9143,  2.1475,  2.3503,
+  0.1606,  0.2442,  0.3931,  0.9237,  1.5811,  1.7529,  2.0133,  2.2272,  2.525,  2.7265,
+  0.4866,  0.7045,  1.0593,  1.2795,  1.5326,  1.8221,  2.1461,  2.3665,  2.6041,  2.7599,
+  0.4012,  0.4911,  0.7103,  0.8585,  1.0495,  1.7244,  2.0116,  2.2041,  2.5189,  2.6643,
+  0.4365,  0.6694,  0.8644,  1.133,  1.451,  1.7627,  2.1032,  2.369,  2.628,  2.8306,
+  0.2072,  0.4018,  0.6227,  0.8913,  1.3038,  1.6056,  1.9704,  2.2816,  2.6135,  2.8182,
+  0.3302,  0.4968,  0.8713,  1.0761,  1.2576,  1.4654,  1.8152,  2.14,  2.5404,  2.7493,
+  0.1385,  0.2292,  0.353,  0.6006,  1.4699,  1.6571,  1.9438,  2.1663,  2.5027,  2.7308,
+  0.1894,  0.2915,  0.4345,  0.6341,  1.0024,  1.1896,  1.6896,  2.0966,  2.4086,  2.6768,
+  0.3841,  0.5197,  0.8889,  1.148,  1.4383,  1.6285,  1.8642,  2.0669,  2.3466,  2.5325,
+  0.2008,  0.3097,  0.4664,  0.6638,  1.2798,  1.494,  1.727,  2.0264,  2.2915,  2.475,
+  0.1864,  0.2857,  0.4481,  1.1025,  1.3096,  1.5035,  1.7614,  1.9891,  2.4255,  2.6031,
+  0.4081,  0.6134,  0.9514,  1.1818,  1.3943,  1.6361,  1.9891,  2.2395,  2.5547,  2.7287,
+  0.2964,  0.3876,  0.945,  1.2247,  1.3906,  1.5882,  1.8241,  2.0589,  2.4188,  2.5871,
+  0.3127,  0.4038,  0.6168,  1.081,  1.3067,  1.4759,  1.8817,  2.0781,  2.3394,  2.5539,
+  0.2066,  0.3059,  0.4989,  0.7132,  0.9066,  1.446,  1.7584,  1.9755,  2.221,  2.4741,
+  0.2634,  0.3956,  0.5667,  0.8777,  1.0517,  1.6029,  2.059,  2.2607,  2.6064,  2.7647,
+  0.4331,  0.5315,  0.7764,  1.0444,  1.2269,  1.4311,  1.7093,  1.9187,  2.4337,  2.6149,
+  0.2161,  0.4429,  0.6851,  0.8336,  1.1037,  1.2966,  1.5283,  2.0299,  2.3407,  2.5384,
+  0.2814,  0.3637,  0.5416,  0.9475,  1.5137,  1.6945,  1.8892,  2.1017,  2.319,  2.5007,
+  0.4454,  0.6883,  1.1402,  1.4098,  1.7435,  2.0014,  2.2521,  2.4457,  2.6495,  2.7985,
+  0.1641,  0.4083,  0.6426,  1.0592,  1.3258,  1.5754,  1.8666,  2.1381,  2.4572,  2.7177,
+  0.3391,  0.4607,  0.6072,  0.8463,  1.4207,  1.6062,  1.8303,  2.0887,  2.3615,  2.5348,
+  0.2414,  0.3396,  0.51,  0.747,  1.3329,  1.8618,  2.0751,  2.2564,  2.5147,  2.6874,
+  0.1694,  0.2535,  0.4156,  0.8302,  1.2853,  1.5838,  2.0907,  2.3085,  2.5929,  2.7951,
+  0.2047,  0.3652,  0.65,  0.8068,  1.0178,  1.1865,  1.4889,  2.0671,  2.5966,  2.7634,
+  0.2425,  0.3247,  0.602,  1.2226,  1.4272,  1.5996,  1.8377,  2.0413,  2.5333,  2.7021,
+  0.3842,  0.503,  0.6541,  0.8771,  1.0576,  1.2612,  1.6744,  1.8735,  2.4781,  2.6803,
+  0.2042,  0.328,  0.7283,  0.8985,  1.1444,  1.3299,  1.6032,  2.1539,  2.4739,  2.6547,
+  0.1268,  0.1924,  0.3208,  0.5153,  1.1304,  1.4443,  1.8047,  2.0552,  2.4385,  2.7572,
+  0.2713,  0.3659,  0.5395,  1.0705,  1.4228,  1.5836,  1.9763,  2.1641,  2.4459,  2.6301,
+  0.3047,  0.4043,  0.5727,  0.7368,  0.8997,  1.3242,  1.6473,  1.8879,  2.433,  2.6295,
+  0.1224,  0.3948,  0.6903,  0.9199,  1.2852,  1.5516,  1.8645,  2.1231,  2.4657,  2.7044,
+  0.2157,  0.3281,  0.5036,  0.9272,  1.0975,  1.5285,  1.808,  2.0569,  2.5448,  2.7221,
+  0.167,  0.249,  0.3696,  0.5921,  1.3019,  1.8398,  2.2165,  2.3725,  2.6142,  2.8338,
+  0.3899,  0.5573,  0.81,  1.0732,  1.3966,  1.6598,  2.0001,  2.2517,  2.5548,  2.7403,
+  0.4905,  0.6064,  0.8222,  0.9966,  1.1912,  1.5714,  1.9628,  2.1727,  2.53,  2.7055,
+  0.1309,  0.2342,  0.6232,  0.8795,  1.1283,  1.3655,  1.7371,  2.0251,  2.3992,  2.6885,
+  0.1805,  0.2672,  0.4297,  1.244,  1.4967,  1.6796,  1.9592,  2.1784,  2.5439,  2.7289,
+  0.228,  0.5429,  0.6967,  0.8732,  1.4074,  1.6074,  1.9516,  2.2124,  2.5486,  2.7722,
+  0.2339,  0.3379,  0.4924,  0.9061,  1.3074,  1.4719,  1.8884,  2.111,  2.3618,  2.5545,
+  0.1384,  0.2291,  0.5127,  1.045,  1.4017,  1.7884,  2.1134,  2.3664,  2.6588,  2.8435,
+  0.2196,  0.6359,  0.91,  1.2007,  1.4589,  1.7053,  2.0128,  2.2722,  2.552,  2.7643,
+  0.1698,  0.2615,  0.381,  0.5706,  1.4297,  1.8686,  2.0728,  2.2559,  2.486,  2.6701,
+  0.1445,  0.2158,  0.3658,  0.5451,  0.9389,  1.3669,  1.79,  2.0846,  2.3924,  2.7161,
+  0.2789,  0.3816,  0.5277,  0.8487,  1.3751,  1.5461,  1.7832,  2.0264,  2.2695,  2.4665,
+  0.1733,  0.3023,  0.9216,  1.2368,  1.4776,  1.7229,  1.9952,  2.2471,  2.539,  2.7265,
+  0.3374,  0.5033,  1.0951,  1.3262,  1.5284,  1.7336,  1.9733,  2.2009,  2.4992,  2.6751,
+  0.1293,  0.2743,  0.7533,  1.0166,  1.2416,  1.4444,  1.7962,  2.0851,  2.477,  2.7204,
+  0.3106,  0.4176,  0.6358,  0.9434,  1.1419,  1.3458,  1.9638,  2.1678,  2.439,  2.6235,
+  0.4533,  0.576,  0.7392,  0.9136,  1.0829,  1.2759,  1.7903,  2.036,  2.3124,  2.5325,
+  0.3702,  0.5218,  0.6977,  0.8776,  1.1096,  1.2855,  1.5612,  1.948,  2.217,  2.4361,
+  0.1637,  0.2647,  0.4185,  0.6666,  1.1584,  1.327,  1.7829,  1.9821,  2.4361,  2.7094,
+  0.1769,  0.2767,  0.3942,  0.5746,  1.3595,  1.711,  1.9176,  2.1405,  2.3722,  2.5705,
+  0.2712,  0.382,  0.6524,  0.8317,  1.0341,  1.3972,  1.7312,  1.9918,  2.3854,  2.5886,
+  0.1003,  0.2046,  0.7261,  1.1004,  1.4057,  1.6697,  1.9903,  2.2603,  2.5813,  2.8009,
+  0.2534,  0.3752,  0.7192,  0.9323,  1.3698,  1.5955,  1.8653,  2.0656,  2.3368,  2.534,
+  0.3589,  0.4508,  0.6631,  1.0521,  1.5065,  1.6697,  1.8929,  2.1074,  2.3466,  2.5242,
+  0.1955,  0.2862,  0.6111,  0.8053,  1.0501,  1.5218,  1.7996,  2.0303,  2.3788,  2.5973,
+  0.2982,  0.4033,  0.566,  0.8924,  1.1933,  1.3465,  1.7895,  2.0173,  2.2606,  2.5069,
+  0.3356,  0.4711,  0.631,  0.8491,  1.0049,  1.4364,  1.8176,  2.0292,  2.571,  2.7525,
+  0.2016,  0.2912,  0.4363,  0.98,  1.4897,  1.6494,  1.8862,  2.0819,  2.3636,  2.6091,
+  0.4549,  0.6491,  0.845,  1.0209,  1.1747,  1.3745,  1.8824,  2.113,  2.376,  2.5768,
+  0.251,  0.3524,  0.5171,  0.8931,  1.4094,  1.571,  1.8536,  2.0478,  2.4766,  2.732,
+  0.1576,  0.2547,  0.3891,  0.8551,  1.4282,  1.588,  1.8583,  2.0521,  2.5359,  2.734,
+  0.3481,  0.4382,  0.772,  1.1289,  1.3203,  1.5019,  1.7665,  1.957,  2.2231,  2.4465,
+  0.3116,  0.4068,  0.6991,  0.8894,  1.0912,  1.5356,  1.8084,  2.0006,  2.2323,  2.4367,
+  0.2706,  0.4033,  0.8272,  1.0851,  1.482,  1.6927,  1.9292,  2.1267,  2.4049,  2.5857,
+  0.2745,  0.355,  0.8663,  1.3742,  1.5545,  1.7324,  1.9664,  2.1538,  2.4581,  2.6245,
+  0.1736,  0.2553,  0.5357,  0.9009,  1.1888,  1.5132,  1.8579,  2.1181,  2.4273,  2.6847,
+  0.3026,  0.4148,  0.9044,  1.1695,  1.3657,  1.7036,  1.9891,  2.2226,  2.5441,  2.7085,
+  0.3998,  0.5108,  0.7205,  0.9848,  1.1828,  1.3716,  1.7154,  1.9191,  2.1875,  2.4257,
+  0.2141,  0.3095,  0.7428,  1.0426,  1.2851,  1.5571,  1.7901,  1.9804,  2.2462,  2.5265,
+  0.1574,  0.229,  0.3869,  0.5735,  1.0925,  1.3383,  1.6598,  1.9364,  2.2095,  2.4195
+};
+  /* codebook/lspvqanssi2.txt */
+static const float codes1[] = {
+  0.012,  0.0022,  0.0068,  -0.0112,  -0.0508,  -0.049,  0.2249,  0.1476,  0.0133,  -0.0379,
+  0.0598,  0.0477,  0.038,  0.066,  0.0517,  0.015,  0.0617,  0.0081,  -0.0768,  -0.1007,
+  -0.0087,  -0.044,  0.0873,  0.0882,  0.0391,  -0.006,  0.11,  0.0569,  -0.0241,  -0.0468,
+  0.0146,  -0.0005,  0.0322,  -0.065,  -0.0778,  -0.078,  -0.0255,  -0.0527,  -0.0301,  -0.0401,
+  -0.024,  -0.056,  -0.0374,  0.0274,  0.0484,  -0.0227,  0.0328,  0.1135,  0.0117,  -0.03,
+  -0.0324,  -0.0574,  0.0302,  0.0137,  -0.0603,  -0.1194,  -0.0105,  -0.0513,  0.0698,  0.0538,
+  0.0635,  0.0382,  0.0531,  0.0897,  0.0495,  0.0039,  -0.0421,  -0.0919,  0.0407,  0.0167,
+  0.0954,  0.0854,  0.036,  -0.0025,  -0.0252,  -0.0528,  -0.0435,  -0.0561,  -0.0405,  -0.0432,
+  0.011,  -0.001,  -0.0433,  -0.0167,  0.1402,  0.0738,  0.0423,  -0.0024,  -0.092,  -0.1099,
+  0.0179,  0.0184,  -0.0041,  -0.064,  0.1004,  0.0608,  -0.0023,  -0.0357,  0.1509,  0.1262,
+  -0.0145,  -0.024,  -0.0595,  -0.1063,  0.0597,  -0.004,  -0.0886,  0.1184,  0.038,  0.0126,
+  -0.0072,  0.0172,  0.0076,  0.0288,  0.081,  0.0278,  0.0709,  0.0051,  0.0214,  -0.0301,
+  0.0127,  -0.0126,  -0.0434,  0.161,  0.1178,  0.0704,  0.0257,  -0.0073,  -0.0425,  -0.061,
+  -0.0165,  -0.0369,  -0.0785,  0.1007,  0.0309,  -0.0651,  0.0142,  -0.0614,  0.0426,  0.0289,
+  -0.0374,  -0.0712,  0.0049,  -0.0382,  0.0472,  0.0095,  -0.0268,  -0.0747,  -0.0457,  -0.0758,
+  -0.0211,  -0.0432,  -0.0547,  -0.0446,  -0.1078,  0.009,  -0.0565,  -0.1298,  0.0721,  0.0351,
+  -0.0014,  -0.0072,  -0.0283,  -0.0324,  -0.0208,  -0.0703,  0.0979,  0.0865,  -0.0007,  0.1881,
+  -0.0077,  -0.0302,  0.1231,  0.0905,  0.0786,  0.0432,  -0.0286,  -0.0661,  -0.0055,  -0.0275,
+  0.001,  0.0043,  0.0044,  0.038,  -0.1201,  -0.0098,  -0.0166,  0.0105,  0.0153,  0.0134,
+  0.0843,  0.0636,  0.0416,  -0.0004,  -0.057,  -0.0592,  0.1158,  0.059,  0.0126,  0.0034,
+  0.0346,  0.029,  -0.0037,  -0.0026,  -0.0457,  0.1824,  0.1469,  0.087,  0.0291,  -0.0074,
+  0.0066,  0.0682,  -0.0148,  0.0287,  0.0095,  -0.0563,  0.1296,  0.0426,  0.1215,  0.0886,
+  -0.0132,  -0.0399,  0.096,  0.0474,  0.014,  0.0306,  -0.0192,  -0.0703,  -0.1559,  -0.1556,
+  -0.06,  0.0482,  0.1257,  0.0521,  0.0229,  -0.0031,  0.0817,  0.0571,  -0.0138,  -0.0277,
+  0.0013,  -0.0103,  -0.047,  -0.0687,  -0.1444,  0.0181,  0.135,  0.0559,  -0.0177,  -0.0598,
+  -0.0215,  -0.0318,  -0.0689,  -0.0268,  0.0917,  0.0307,  0.0135,  -0.0184,  -0.0857,  0.1231,
+  0.0137,  -0.0152,  0.0199,  -0.0291,  -0.0685,  0.0438,  -0.1137,  0.0231,  -0.0632,  -0.0802,
+  -0.0011,  0.0314,  0.0535,  -0.0135,  -0.0291,  -0.0579,  -0.1049,  0.0288,  -0.0628,  0.1355,
+  -0.0901,  0.0041,  -0.017,  0.0351,  0.0144,  -0.0505,  0.0396,  0.0638,  -0.0145,  0.0141,
+  -0.04,  -0.0603,  -0.0714,  0.0329,  -0.0049,  -0.0529,  -0.1251,  0.0022,  -0.0449,  -0.0778,
+  0.0247,  0.0296,  0.0239,  0.0122,  -0.0348,  -0.1224,  -0.0033,  0.1237,  -0.0016,  -0.0436,
+  0.0246,  0.005,  0.0322,  0.0818,  0.0203,  0.0846,  0.0022,  0.0876,  0.0149,  -0.0184,
+  -0.0204,  -0.0228,  0.0365,  -0.0164,  0.1087,  0.0374,  -0.055,  0.033,  -0.0582,  -0.0736,
+  -0.0305,  -0.0485,  -0.0572,  0.0275,  -0.0271,  -0.0436,  0.1217,  0.07,  0.1253,  0.099,
+  -0.0079,  -0.0204,  -0.0325,  0.0491,  0.0158,  -0.0365,  -0.1309,  -0.1812,  0.1428,  0.1148,
+  0.068,  0.0547,  0.0309,  0.0079,  -0.0332,  0.0391,  -0.0287,  0.1258,  0.1123,  0.1016,
+  -0.0264,  -0.0409,  -0.0538,  -0.0192,  -0.0393,  -0.0713,  -0.0618,  -0.1078,  -0.185,  0.0532,
+  0.0081,  -0.0115,  -0.009,  0.1201,  -0.0413,  -0.0995,  0.0445,  -0.0032,  -0.0286,  -0.0497,
+  -0.0023,  -0.0184,  -0.0358,  0.1279,  0.0847,  0.053,  0.023,  -0.0212,  0.1245,  0.0965,
+  0.0111,  0.1038,  0.0597,  0.0413,  0.0533,  0.0011,  0.0031,  0.0705,  0.0242,  0.0198,
+  0.002,  -0.0071,  -0.0262,  -0.0496,  -0.075,  -0.1273,  -0.1785,  0.0606,  -0.0223,  -0.0583,
+  -0.0202,  0.0669,  0.0081,  0.0335,  -0.0218,  -0.1073,  -0.0146,  -0.0673,  0.049,  0.021,
+  -0.0108,  -0.023,  -0.0614,  -0.0986,  0.0629,  0.0006,  0.1496,  0.1099,  0.0316,  0.0098,
+  -0.0368,  -0.0685,  0.0138,  -0.0213,  -0.0009,  0.0344,  -0.0249,  0.0311,  0.0803,  0.0759,
+  0.0038,  -0.0158,  0.0142,  0.0254,  0.097,  0.0021,  -0.1029,  0.0006,  0.0576,  0.0261,
+  -0.0083,  0.0698,  0.0406,  -0.0348,  0.02,  0.0833,  0.0186,  -0.0145,  -0.0725,  -0.0872,
+  -0.0506,  -0.0673,  0.0776,  -0.0172,  -0.0444,  -0.0531,  -0.0799,  0.0005,  -0.0359,  -0.0446,
+  0.0368,  0.0376,  -0.0407,  -0.019,  0.0987,  0.0212,  -0.0349,  -0.0951,  -0.0084,  -0.0342,
+  -0.0309,  -0.0561,  0.095,  -0.0125,  -0.1028,  -0.0133,  0.092,  0.0965,  0.0668,  0.0409,
+  -0.0898,  0.0036,  -0.0353,  -0.0024,  -0.0365,  -0.0259,  -0.0485,  -0.0843,  -0.0063,  -0.0167,
+  -0.0255,  -0.0407,  -0.0456,  -0.0931,  -0.0892,  -0.0293,  -0.051,  0.0183,  -0.0104,  0.0472,
+  -0.0172,  -0.0399,  -0.0731,  0.0546,  0.032,  -0.0283,  0.0415,  -0.0107,  -0.1237,  -0.1102,
+  0.021,  0.0294,  -0.0038,  -0.009,  -0.0551,  -0.0922,  0.0261,  -0.0334,  -0.1181,  -0.1536,
+  0.0092,  0.0032,  -0.0162,  0.0398,  0.0205,  0.1266,  -0.0107,  -0.0858,  0.0392,  0.0032,
+  -0.0038,  -0.0269,  -0.0737,  0.1138,  0.0263,  -0.0031,  -0.1188,  0.1621,  0.0831,  0.0526,
+  0.0023,  -0.0149,  -0.0497,  0.0898,  0.0456,  -0.0145,  -0.0928,  -0.1507,  -0.0611,  -0.0938,
+  0.012,  0.0124,  -0.0286,  -0.1319,  0.0219,  0.0311,  -0.0398,  -0.0465,  -0.0008,  -0.0375,
+  0.0138,  0.0023,  0.0024,  0.1072,  0.0531,  0.0006,  0.0292,  -0.0115,  -0.062,  0.165,
+  0.007,  -0.0251,  0.0715,  0.038,  -0.0404,  0.123,  0.0629,  0.0096,  0.0973,  0.0641,
+  -0.0586,  0.0772,  0.0128,  0.106,  0.0715,  0.0374,  -0.0074,  -0.0365,  -0.0543,  -0.0489,
+  -0.0392,  0.0871,  -0.0069,  -0.1084,  0.0264,  -0.0495,  0.0396,  0.0005,  -0.0293,  -0.024,
+  -0.0327,  0.0605,  0.0662,  0.01,  -0.0007,  -0.0525,  -0.0812,  -0.0686,  -0.0873,  -0.083,
+  0.0119,  0.0058,  0.003,  -0.0307,  0.065,  0.0175,  -0.0741,  -0.15,  -0.1947,  0.0881,
+  0.0572,  0.0411,  0.0152,  -0.0127,  -0.0589,  -0.051,  -0.0212,  -0.0834,  0.1434,  0.1318,
+  0.0518,  0.0417,  -0.043,  0.0963,  -0.0014,  0.0173,  0.0234,  -0.0273,  0.0359,  -0.0118,
+  0.0652,  0.0587,  0.0013,  -0.07,  0.1262,  0.0975,  0.068,  0.0598,  0.0048,  -0.0305,
+  -0.0185,  -0.044,  0.1178,  0.0656,  0.0052,  -0.0534,  -0.1151,  0.1116,  0.0659,  0.0344,
+  0.0788,  0.0577,  0.0452,  0.0283,  -0.0278,  0.0911,  0.028,  -0.0254,  0.0029,  -0.0361,
+  -0.0165,  -0.0322,  -0.0526,  -0.1057,  0.0927,  0.0293,  -0.1026,  -0.1671,  0.047,  0.0355,
+  0.01,  0.0001,  -0.0221,  -0.0775,  -0.1109,  -0.1416,  0.0884,  0.0441,  0.0632,  0.0409,
+  0.0204,  0.0432,  0.0141,  -0.0296,  0.1073,  0.058,  0.0383,  0.027,  -0.0857,  0.1246,
+  0.0488,  0.0231,  0.0648,  -0.0179,  0.0747,  0.0156,  -0.0384,  -0.0733,  -0.0732,  -0.097,
+  0.0005,  -0.0199,  -0.026,  -0.0511,  -0.111,  0.067,  -0.0413,  0.1571,  0.0498,  0.0191,
+  0.0037,  -0.0085,  -0.0796,  0.0086,  -0.0852,  0.085,  0.0115,  -0.0065,  0.1161,  0.0727,
+  0.0023,  0.0483,  0.0285,  -0.0642,  -0.0477,  0.0175,  0.0346,  0.0452,  0.0655,  0.0284,
+  -0.0986,  0.0463,  0.0326,  -0.0055,  0.0702,  0.0194,  -0.0423,  -0.0107,  0.0338,  0.0619,
+  0.0126,  -0.0138,  -0.1115,  0.0159,  -0.0331,  0.0217,  -0.0376,  -0.0407,  -0.0222,  -0.0503,
+  0.0222,  0.0071,  -0.049,  0.1017,  0.0551,  -0.0164,  0.1578,  0.1059,  0.0025,  -0.0107,
+  0.0124,  -0.009,  0.0322,  0.093,  0.0281,  -0.0403,  -0.0781,  0.0125,  -0.067,  -0.1058,
+  0.0363,  0.0077,  0.1052,  0.0039,  0.0676,  0.0891,  0.0433,  0.0252,  0.0224,  -0.0043,
+  -0.0045,  -0.0194,  -0.0193,  -0.048,  -0.064,  -0.0695,  -0.1597,  -0.003,  0.1728,  0.1231,
+  0.0297,  0.0025,  0.0619,  -0.0347,  -0.1171,  0.1043,  0.0868,  0.0191,  -0.0739,  -0.1075,
+  0.0073,  0.0914,  0.0367,  -0.0236,  0.0232,  0.0304,  -0.0787,  -0.1099,  0.046,  0.0082,
+  0.0296,  0.0297,  -0.0444,  0.0184,  0.0602,  -0.0295,  -0.0934,  0.0636,  -0.0347,  -0.0722,
+  -0.029,  -0.0629,  0.0598,  0.0013,  0.0064,  0.1431,  0.092,  0.0468,  -0.0311,  -0.0614,
+  -0.0152,  -0.0311,  -0.05,  -0.0672,  -0.1257,  -0.0134,  -0.022,  -0.0612,  -0.1131,  -0.1417,
+  0.0371,  0.0153,  -0.0817,  -0.0007,  0.0837,  0.0481,  0.046,  0.0678,  0.0524,  0.0432,
+  0.0126,  -0.0069,  -0.0092,  -0.0693,  -0.025,  0.151,  0.0098,  -0.0683,  -0.0566,  -0.0769,
+  -0.0199,  -0.0423,  0.0806,  0.0562,  0.0009,  -0.0563,  -0.1358,  -0.1578,  -0.0456,  0.0032,
+  0.0091,  0.0101,  -0.009,  -0.0279,  -0.0489,  -0.1038,  -0.0815,  0.2184,  0.1172,  0.0902,
+  -0.0024,  -0.0135,  0.0392,  0.0028,  0.0792,  0.0404,  0.0867,  0.161,  0.0954,  0.0846,
+  -0.0004,  -0.022,  -0.0282,  -0.1022,  -0.0799,  0.1278,  0.0765,  0.0402,  0.085,  0.0611,
+  0.0443,  0.032,  -0.0384,  -0.0964,  0.003,  -0.0398,  -0.073,  -0.0052,  -0.0267,  0.1209,
+  -0.0706,  0.1151,  0.0722,  -0.0175,  -0.0927,  -0.0559,  0.0316,  0.0186,  0.0105,  0.0314,
+  -0.0145,  -0.0263,  -0.0564,  0.0248,  -0.0181,  -0.0817,  -0.0938,  0.0366,  -0.0315,  0.1253,
+  0.0307,  0.0039,  0.129,  0.0402,  -0.0439,  -0.0384,  0.0044,  -0.0177,  -0.0172,  -0.031,
+  0.0447,  0.0298,  0.0287,  0.0273,  -0.035,  -0.0708,  -0.1829,  -0.0317,  0.0643,  0.0057,
+  -0.082,  -0.0326,  0.0209,  -0.0711,  0.0084,  0.0111,  0.0426,  0.0262,  -0.0061,  0.0005,
+  0.0545,  0.0377,  -0.0417,  -0.0625,  0.0114,  -0.0405,  0.0573,  0.0191,  -0.0263,  -0.0472,
+  -0.0053,  -0.0049,  -0.0255,  -0.0578,  -0.0237,  -0.0721,  -0.1487,  -0.1636,  0.0046,  -0.0355,
+  0.0309,  0.0107,  0.0163,  0.0132,  -0.0536,  -0.0009,  -0.0706,  -0.135,  -0.0514,  -0.096,
+  0.0306,  0.0003,  0.0494,  0.0701,  0.0027,  -0.0458,  0.078,  0.0327,  0.0937,  0.0605,
+  -0.0017,  -0.0275,  0.0797,  -0.0268,  -0.1014,  0.0593,  -0.0528,  -0.1103,  0.0682,  0.0322,
+  -0.0507,  -0.0806,  -0.0646,  -0.0052,  -0.0576,  0.0451,  0.0489,  0.015,  0.0029,  -0.0189,
+  0.027,  0.0143,  -0.0375,  -0.0071,  -0.0607,  -0.1157,  -0.0345,  -0.1115,  0.0201,  -0.0104,
+  -0.0807,  -0.1088,  0.0845,  0.072,  0.0441,  0.0301,  0.0043,  0.0052,  0.0016,  0.0201,
+  -0.029,  -0.0532,  0.0036,  -0.0201,  -0.0723,  -0.1321,  0.0867,  0.0479,  -0.0556,  -0.085,
+  -0.0271,  0.0126,  0.1283,  0.0533,  -0.003,  -0.0352,  -0.0326,  -0.0553,  0.1402,  0.1121,
+  -0.0358,  -0.0518,  -0.108,  0.0134,  0.095,  0.0384,  -0.004,  -0.0254,  0.0026,  -0.0217,
+  -0.0152,  -0.0375,  -0.0827,  0.0916,  0.0188,  0.1306,  0.0983,  0.0606,  0.0381,  0.008,
+  -0.0107,  -0.0269,  -0.0573,  -0.1189,  0.0258,  0.1009,  0.0565,  0.027,  -0.0557,  -0.0778,
+  -0.0193,  -0.0242,  -0.0784,  -0.0816,  0.0287,  -0.0484,  0.0292,  -0.0414,  0.1124,  0.0767,
+  0.0177,  -0.0148,  0.0472,  -0.0808,  0.0623,  -0.0636,  0.075,  -0.0107,  0.0673,  0.0425,
+  -0.022,  0.0577,  -0.0769,  -0.0247,  -0.0321,  0.0341,  -0.0108,  0.0109,  -0.0142,  0.0122,
+  0.0194,  0.0248,  -0.0096,  -0.0205,  -0.046,  -0.116,  0.0492,  -0.0188,  -0.1535,  0.0816,
+  0.0301,  -0.0286,  -0.0077,  -0.0117,  -0.0036,  -0.0026,  0.0133,  -0.0032,  0.0007,  -0.016,
+  0.0115,  -0.0111,  0.0246,  -0.0639,  0.0325,  -0.0313,  0.0808,  0.0435,  -0.0777,  -0.1108,
+  -0.0079,  -0.0334,  -0.0144,  -0.0539,  0.1564,  0.1175,  0.0549,  0.034,  0.0319,  0.0027,
+  -0.0155,  -0.0275,  -0.0739,  -0.0932,  0.0108,  -0.0698,  0.0036,  -0.0213,  -0.0486,  -0.067,
+  -0.0234,  -0.0567,  0.002,  0.0908,  -0.0151,  0.046,  -0.0175,  -0.0523,  0.0098,  -0.0237,
+  0.0057,  -0.0066,  -0.0418,  0.0418,  -0.0449,  0.1069,  0.0629,  -0.0016,  -0.1068,  -0.1492,
+  -0.0791,  0.0403,  -0.0009,  0.0285,  -0.0065,  0.0963,  0.055,  0.0634,  0.0693,  0.0694,
+  -0.0068,  -0.0197,  -0.0919,  0.0071,  -0.0551,  -0.1173,  0.0926,  0.0413,  0.0127,  -0.0158,
+  0.054,  0.0389,  -0.0195,  -0.08,  -0.1383,  0.044,  -0.0139,  -0.0405,  0.0147,  -0.0183,
+  0.038,  0.0248,  0.052,  -0.0609,  0.0339,  -0.007,  -0.0974,  0.1182,  0.0221,  -0.031,
+  0.0043,  0.0046,  -0.0274,  -0.0502,  0.0326,  -0.0143,  -0.0586,  -0.0866,  -0.1673,  -0.1624,
+  0.0428,  0.0385,  -0.0228,  0.0704,  0.0069,  -0.0145,  -0.0623,  -0.0639,  -0.1479,  0.0212,
+  -0.0078,  -0.0297,  0.0025,  -0.0239,  -0.0793,  0.0896,  0.0315,  -0.0546,  -0.1309,  0.108
+};
+  /* codebook/lspvqanssi3.txt */
+static const float codes2[] = {
+  -0.0291,  0.0272,  -0.0364,  -0.0313,  -0.0487,  -0.0205,  0.0501,  0.0225,  0.0178,  0.008,
+  -0.0406,  -0.0383,  0.0013,  -0.0155,  -0.0261,  -0.0598,  0.0003,  -0.0242,  0.0151,  -0.014,
+  -0.0445,  0.0356,  0.018,  -0.0272,  -0.0018,  -0.0177,  -0.0703,  0.0471,  0.0128,  -0.0068,
+  -0.0033,  -0.0285,  -0.056,  -0.0186,  -0.0499,  -0.007,  0.0068,  -0.0126,  0.0388,  -0.0097,
+  -0.0071,  -0.0114,  -0.0308,  -0.0094,  -0.0541,  -0.0272,  -0.0756,  0.0477,  -0.0234,  0.0678,
+  0.0048,  0.0307,  -0.0174,  -0.0593,  0.0097,  -0.0134,  0.0034,  -0.0212,  -0.0418,  0.0869,
+  -0.0189,  0.0165,  -0.0269,  0.0744,  0.0344,  -0.0177,  -0.0603,  0.0212,  -0.0104,  0.0345,
+  -0.013,  -0.0352,  -0.0086,  -0.0257,  -0.0286,  0.0409,  0.0656,  0.0106,  -0.0598,  0.0252,
+  0.0041,  0.0097,  -0.0032,  -0.0154,  -0.0405,  0.067,  -0.0164,  0.0451,  0.0774,  0.0504,
+  0.001,  -0.0091,  -0.0345,  0.0511,  0.0016,  0.0011,  0.0684,  0.0167,  0.0601,  0.0512,
+  0.0204,  -0.0038,  -0.0426,  0.0185,  -0.0191,  -0.063,  0.0295,  -0.0153,  -0.0559,  0.056,
+  -0.0461,  -0.0041,  0.0515,  0.0219,  0.0322,  0.0093,  0.0044,  0.0106,  -0.0329,  -0.0521,
+  0.0304,  0.0017,  0.0209,  -0.0002,  0.0689,  0.0136,  0.0216,  -0.0268,  -0.0682,  0.0333,
+  -0.0175,  -0.0425,  0.0153,  -0.005,  -0.0113,  0.0297,  -0.0659,  -0.0344,  0.0302,  -0.0272,
+  -0.0217,  -0.0362,  0.0426,  0.0233,  -0.0393,  0.0052,  0.0138,  0.0657,  0.0427,  0.022,
+  -0.0039,  -0.0011,  -0.0002,  -0.0453,  -0.0835,  0.0144,  -0.0268,  -0.0589,  -0.0185,  0.0133,
+  0.0081,  -0.0032,  0.0638,  0.0032,  0.006,  0.0002,  -0.0303,  -0.0823,  0.0124,  -0.0308,
+  0.0108,  0.0011,  0.0059,  0.0396,  0.0392,  0.0351,  -0.0045,  -0.0323,  -0.0512,  -0.0975,
+  -0.0144,  -0.0306,  -0.0302,  -0.007,  0.0123,  -0.0042,  -0.0083,  -0.0514,  0.012,  0.1116,
+  -0.0046,  -0.0131,  0.0472,  0.0144,  -0.0296,  -0.0518,  0.0337,  -0.0145,  -0.0733,  0.0793,
+  -0.0064,  -0.0162,  -0.0327,  -0.0711,  0.0108,  -0.0131,  0.0025,  -0.0254,  -0.0277,  -0.068,
+  -0.0306,  0.0055,  0.0272,  -0.0189,  -0.0173,  0.0221,  0.0773,  0.0043,  0.0458,  -0.0169,
+  -0.0006,  0.0299,  0.0259,  0.0227,  -0.053,  -0.0596,  -0.0271,  -0.0091,  0.0181,  -0.0233,
+  -0.0116,  -0.0398,  0.0089,  0.0708,  -0.0028,  -0.0084,  -0.0206,  -0.0354,  -0.0275,  -0.0037,
+  0.0259,  -0.0064,  -0.038,  0.0572,  0.0083,  0.0286,  -0.0565,  0.0158,  0.0396,  -0.0123,
+  0.0552,  0.0331,  -0.0052,  -0.0346,  -0.018,  -0.0194,  -0.0237,  0.0184,  0.0056,  -0.0199,
+  0.0143,  0.0131,  -0.0166,  0.0196,  0.0154,  0.031,  -0.0048,  0.0901,  -0.0333,  0.0761,
+  0.0118,  -0.0107,  0.0099,  0.0078,  0.0002,  -0.0716,  -0.0233,  0.0793,  0.0516,  0.03,
+  0.0204,  0.0243,  0.0192,  0.0181,  0.0001,  -0.0243,  -0.0764,  -0.0622,  -0.0324,  0.064,
+  0.0132,  0.0016,  -0.0187,  -0.0425,  0.0627,  0.0094,  -0.0786,  0.0304,  0.0294,  -0.0146,
+  -0.0221,  -0.0154,  0.0285,  -0.0709,  0.0406,  0.0114,  0.0073,  -0.0199,  0.0081,  0.0268,
+  0.0227,  0.0055,  0.0163,  -0.0447,  0.0246,  0.0795,  0.0239,  0.0211,  -0.0145,  -0.0576,
+  -0.0119,  0.0637,  0.0278,  0.0202,  -0.0086,  0.0389,  0.032,  -0.0049,  -0.0272,  -0.0274,
+  0.004,  -0.0211,  0.0426,  0.048,  0.0415,  0.0659,  0.0408,  0.0198,  0.0327,  0.0029,
+  0.043,  0.0311,  0.0083,  0.0353,  0.025,  0.0143,  0.0106,  -0.0305,  0.0633,  0.0227,
+  -0.0277,  0.0302,  0.0337,  0.0176,  0.0191,  -0.0156,  0.0231,  0.0118,  0.0465,  0.0875,
+  0.0221,  0.0146,  0.0147,  -0.0211,  -0.0317,  -0.0179,  -0.0049,  -0.0297,  -0.1078,  -0.0413,
+  -0.0531,  0.018,  -0.0066,  0.0365,  -0.0033,  0.009,  -0.0158,  -0.0698,  0.0315,  -0.0048,
+  0.0289,  0.0053,  0.0082,  0.0077,  -0.0664,  0.0474,  0.0407,  -0.0096,  0.0028,  -0.0526,
+  -0.0106,  -0.0129,  -0.0315,  0.0335,  -0.0217,  -0.0427,  0.0582,  0.0193,  -0.0288,  -0.0777,
+  -0.0003,  -0.0141,  -0.0102,  0.0007,  -0.0077,  -0.0517,  -0.0909,  0.0128,  -0.0349,  -0.0769,
+  -0.0227,  -0.0159,  -0.0327,  0.0011,  0.0312,  0.01,  -0.018,  -0.0537,  -0.0997,  0.0122,
+  0.019,  -0.0139,  0.0341,  -0.0131,  -0.0368,  -0.0138,  -0.0074,  -0.0415,  0.0791,  0.0503,
+  0.0182,  0.0027,  0.0032,  -0.0325,  -0.0309,  -0.0898,  0.0509,  -0.017,  0.0301,  -0.0137,
+  0.0233,  0.01,  0.0231,  0.073,  0.0212,  -0.0299,  0.044,  0.0041,  -0.0101,  -0.0251,
+  0.0074,  -0.0033,  -0.0285,  -0.035,  0.0101,  0.0735,  0.0036,  -0.0659,  0.0429,  -0.0052,
+  0.0148,  -0.0035,  -0.0233,  0.0079,  -0.0142,  -0.0402,  -0.0358,  -0.0985,  -0.008,  -0.0549,
+  0.0203,  0.0057,  -0.0604,  0.0098,  0.0402,  0.0151,  0.05,  0.0058,  -0.0086,  -0.0401,
+  0.0056,  -0.0381,  0.042,  -0.0125,  0.0157,  -0.0268,  0.0433,  0.0123,  -0.0176,  -0.0685,
+  0.003,  0.0502,  0.0067,  -0.0222,  0.0405,  -0.0226,  0.002,  -0.0401,  -0.0026,  -0.0521,
+  0.0317,  0.0089,  0.062,  0.0251,  0.0066,  0.0089,  -0.0565,  0.0414,  0.0005,  -0.0365,
+  -0.0058,  0.0086,  -0.0291,  -0.0164,  -0.0134,  -0.049,  -0.0427,  -0.0451,  0.0869,  0.0334,
+  0.0024,  0.0328,  -0.0415,  0.0003,  -0.0287,  0.0193,  -0.0547,  -0.0222,  -0.0196,  -0.0571,
+  -0.0271,  -0.0397,  -0.0431,  -0.0043,  0.0332,  0.0093,  0.0082,  0.0585,  0.0282,  0.0004,
+  -0.0251,  -0.0167,  -0.0289,  0.0196,  -0.0363,  0.085,  0.0028,  0.0319,  -0.0202,  -0.0512,
+  0.0389,  0.0226,  0.0401,  -0.0091,  -0.0152,  0.0001,  0.0738,  0.0402,  0.0097,  0.031,
+  -0.0126,  0.013,  -0.0046,  -0.0216,  0.0298,  -0.0344,  0.0713,  0.0547,  -0.047,  -0.0294,
+  0.0125,  0.0044,  -0.0028,  0.0209,  -0.02,  0.0854,  0.0018,  -0.0386,  -0.0703,  0.0778,
+  -0.0036,  -0.0347,  0.0309,  -0.0184,  0.029,  -0.0025,  -0.0644,  0.0347,  -0.0523,  0.0644,
+  0.0064,  0.0295,  -0.0017,  0.0282,  0.0176,  0.0027,  0.0246,  0.0967,  0.0401,  -0.0231,
+  0.0054,  -0.0109,  0.0055,  -0.0479,  -0.049,  -0.0136,  -0.0245,  0.0839,  0.0026,  -0.0493,
+  0.0128,  -0.005,  -0.0219,  -0.0621,  0.0313,  0.0019,  0.0696,  0.0459,  0.0574,  0.0299,
+  -0.0091,  -0.029,  -0.0068,  0.0276,  0.0645,  -0.015,  0.0015,  -0.0374,  0.0415,  -0.0124,
+  -0.0171,  0.0177,  -0.0138,  0.0034,  0.084,  0.0584,  0.0233,  0.01,  0.0122,  0.0047
+};
+  /* codebook/lspvqanssi4.txt */
+static const float codes3[] = {
+  0.0221,  -0.0035,  -0.0032,  -0.0177,  -0.0327,  0.0518,  -0.011,  -0.015,  -0.0136,  -0.0327,
+  0.0099,  -0.0059,  0.0031,  -0.0174,  0.0464,  -0.024,  0.0251,  -0.027,  0.0454,  -0.0082,
+  -0.0029,  0.0025,  -0.0267,  -0.0318,  -0.0157,  0.0173,  0.0253,  0.0063,  -0.0481,  0.0419,
+  -0.0332,  -0.0179,  -0.0042,  0.0241,  0.0044,  -0.0098,  -0.0081,  0.0024,  -0.0414,  0.0339,
+  -0.006,  0.0182,  -0.0051,  -0.0479,  0.0016,  -0.0179,  0.0316,  0.0222,  -0.0029,  -0.0351,
+  0.0074,  0.0015,  0.0337,  -0.0082,  -0.0008,  0.0129,  0.0001,  0.065,  0.0175,  0.0309,
+  -0.0212,  -0.0261,  0.0196,  -0.0309,  0.0093,  -0.0272,  0.026,  0.0169,  0.0132,  0.0116,
+  -0.001,  0.0202,  0.0228,  -0.0227,  -0.0141,  0.0192,  -0.0423,  -0.0097,  -0.0342,  0.0338,
+  -0.0149,  -0.011,  -0.0156,  0.029,  0.0028,  0.0123,  -0.035,  -0.0501,  0.0272,  -0.0245,
+  -0.0005,  -0.0194,  0.046,  -0.0001,  -0.028,  0.0216,  -0.0028,  -0.0162,  0.0177,  -0.0254,
+  -0.0109,  -0.0026,  0.0038,  -0.015,  -0.0421,  -0.0422,  0.0164,  -0.0436,  0.0054,  -0.0098,
+  0.0061,  -0.0106,  0.0062,  0.0207,  -0.0329,  0.0177,  -0.0578,  0.0408,  0.0077,  -0.026,
+  0.0001,  -0.0098,  0.0106,  -0.0003,  -0.0292,  0.0032,  0.056,  0.0311,  -0.0282,  -0.0445,
+  0.0033,  0.0345,  -0.0022,  -0.0029,  -0.0228,  0.0242,  0.0197,  -0.0286,  0.0194,  -0.0328,
+  0.0094,  -0.001,  0.0121,  0.0229,  0.0161,  0.0363,  -0.0124,  0.0179,  -0.0626,  0.002,
+  -0.007,  -0.0272,  -0.0171,  -0.0249,  -0.0039,  0.0254,  0.0317,  -0.0324,  0.0276,  -0.009,
+  -0.0002,  0.0057,  -0.0204,  0.0512,  -0.017,  0.0113,  0.0157,  0.0427,  -0.0024,  0.0162,
+  -0.0064,  -0.0144,  0.0216,  0.0053,  -0.0361,  0.0287,  0.023,  -0.0161,  -0.0189,  0.0589,
+  0.0091,  -0.0059,  -0.0308,  0.0171,  -0.0137,  -0.0033,  -0.0505,  -0.0155,  -0.0527,  0.0133,
+  -0.0121,  -0.0051,  0.0219,  0.0136,  0.0476,  -0.009,  -0.046,  0.0208,  0.0072,  -0.0076,
+  0.0098,  -0.0328,  -0.0211,  0.0054,  -0.0146,  -0.0263,  0.0248,  0.0045,  -0.0183,  0.0301,
+  0.0101,  0.0139,  -0.0073,  0.0234,  0.0083,  -0.0194,  -0.0365,  0.0307,  0.058,  0.0153,
+  -0.0111,  0.0019,  0.0265,  -0.015,  0.0311,  0.0362,  0.0244,  -0.0213,  -0.0224,  -0.0299,
+  0.0061,  0.0082,  -0.0181,  0.0081,  -0.0344,  0.0133,  -0.0095,  -0.0411,  0.0462,  0.0371,
+  0.0089,  -0.0157,  0.0179,  -0.0256,  -0.0118,  -0.0302,  -0.0329,  0.0212,  -0.0463,  -0.0162,
+  -0.0313,  0.0096,  -0.004,  0.0186,  0.0248,  -0.0126,  0.0472,  -0.0079,  0.0115,  -0.027,
+  0.0055,  0.0044,  0.0172,  0.0079,  -0.0089,  -0.0202,  -0.0233,  -0.0397,  -0.0305,  -0.062,
+  -0.0282,  -0.0104,  -0.0071,  -0.0242,  -0.0255,  0.0204,  -0.0187,  -0.0103,  -0.0227,  -0.0424,
+  -0.0056,  0.0065,  0.0151,  -0.0376,  0.0039,  0.0009,  -0.0507,  -0.004,  0.0393,  -0.0201,
+  0.0128,  -0.0228,  0.0115,  -0.0446,  0.0316,  0.0266,  -0.0036,  0.0117,  -0.0009,  0.0048,
+  -0.0088,  0.0226,  0.0125,  0.009,  0.0008,  -0.0341,  0.0243,  -0.0178,  -0.0589,  0.0278,
+  0.0151,  0.0021,  -0.0349,  -0.0365,  -0.0098,  -0.0179,  -0.0212,  -0.0313,  0.0109,  -0.0164,
+  -0.0211,  -0.0112,  -0.0446,  0.0014,  -0.0034,  -0.0179,  0.011,  0.0176,  0.0286,  0.0045,
+  0.0034,  -0.0151,  0.038,  0.0331,  -0.0034,  -0.0439,  0.0145,  0.012,  0.0036,  0.0017,
+  -0.0348,  0.0192,  0.0167,  0.0069,  -0.0266,  -0.0085,  -0.0076,  0.026,  0.0234,  0.0075,
+  -0.0237,  0.015,  -0.0094,  -0.0201,  0.0234,  -0.0041,  -0.016,  -0.0549,  -0.0021,  0.0239,
+  -0.0019,  0.0173,  0.0295,  0.0443,  0.0081,  0.0181,  -0.0039,  -0.027,  0.0155,  0.0107,
+  0.0065,  -0.0055,  -0.0368,  0.0232,  0.037,  0.0367,  0.0046,  -0.0167,  0.0047,  0.0173,
+  0.0116,  0.0053,  -0.0229,  0.0382,  0.016,  -0.0453,  0.0057,  -0.0267,  0.002,  -0.0051,
+  -0.014,  0.0302,  -0.0208,  0.0106,  0.0101,  -0.0049,  -0.0319,  0.0227,  -0.0206,  -0.0371,
+  -0.0007,  -0.0109,  -0.0053,  0.0078,  0.041,  -0.0001,  0.0543,  0.0328,  -0.0196,  0.0332,
+  -0.0043,  -0.0028,  -0.0246,  0.0285,  -0.0248,  0.0153,  0.0303,  -0.031,  -0.0335,  -0.0315,
+  -0.0417,  0.1029,  0.0377,  0.0069,  0.0012,  0.0065,  0.0007,  -0.0144,  -0.0083,  0.0004,
+  0.0295,  0.0099,  -0.0144,  -0.0145,  0.0141,  -0.0013,  0.0362,  -0.0142,  -0.0428,  -0.0161,
+  -0.0095,  -0.0206,  0.0116,  0.0132,  0.0164,  0.0158,  0.0012,  -0.0024,  0.064,  0.0364,
+  0.0005,  -0.0022,  -0.0165,  -0.0057,  0.0263,  0.0339,  0.0014,  0.0541,  0.0164,  -0.0411,
+  0.0039,  -0.0143,  -0.0107,  0.0032,  -0.016,  -0.0502,  0.001,  0.0272,  0.0161,  -0.05,
+  0.0083,  0.0292,  -0.0076,  -0.0201,  0.0313,  0.0213,  0.012,  0.0087,  0.0285,  0.0332,
+  0.017,  0.0018,  0.0001,  0.0205,  0.0106,  -0.0064,  -0.0082,  -0.0083,  -0.0082,  0.0886,
+  0.0075,  -0.0078,  -0.0038,  -0.0337,  -0.0491,  0.0048,  0.0069,  0.03,  0.0369,  0.0088,
+  -0.0091,  -0.0327,  0.0041,  0.0376,  0.017,  0.0154,  0.0126,  0.0153,  -0.0024,  -0.0353,
+  0.0289,  -0.008,  0.0063,  0.0274,  -0.0061,  0.0208,  0.039,  -0.006,  0.0294,  -0.0088,
+  -0.0037,  -0.0195,  0.0058,  0.0023,  -0.0149,  -0.036,  -0.0587,  -0.0248,  0.0288,  0.0203,
+  -0.0031,  0.0081,  -0.0112,  -0.0221,  0.0067,  -0.0505,  -0.0233,  0.0353,  -0.0131,  0.0417,
+  0.0243,  0.0231,  -0.0013,  0.0049,  -0.0423,  -0.0245,  -0.0029,  0.0184,  -0.0162,  -0.001,
+  0.0045,  0.0101,  -0.0042,  0.0014,  -0.0133,  -0.0321,  0.0642,  0.0153,  0.0377,  0.0277,
+  0.0275,  0.0083,  0.0286,  -0.0243,  -0.0084,  -0.0236,  0.0027,  -0.0289,  0.0201,  0.0235,
+  0.0281,  0.0078,  0.0038,  0.0069,  0.0302,  0.017,  -0.0423,  -0.034,  0.0104,  -0.0181,
+  0.0334,  -0.0034,  -0.0257,  -0.0061,  0.014,  -0.0099,  -0.0195,  0.0529,  0.0019,  0.001,
+  -0.0114,  0.0012,  -0.0038,  -0.0016,  -0.014,  0.0697,  0.0372,  0.0243,  0.0172,  0.0066,
+  0.0192,  0.0149,  0.0285,  0.0077,  0.0246,  -0.0135,  0.0145,  0.0317,  -0.0074,  -0.0438,
+  -0.0034,  -0.0175,  -0.0245,  -0.0153,  0.0357,  -0.0102,  -0.0062,  -0.0053,  -0.0308,  -0.0499,
+  0.0025,  -0.0253,  0.0148,  0.0031,  0.0189,  -0.0023,  -0.0085,  -0.0596,  -0.0337,  0.0175,
+  -0.0091,  -0.0171,  -0.0217,  -0.0189,  0.0056,  0.0249,  -0.0499,  0.0236,  0.0042,  0.0449
+};
+
+const struct lsp_codebook lsp_cbvqanssi[] = {
+  /* codebook/lspvqanssi1.txt */
+  {
+    10,
+    8,
+    256,
+    codes0
+  },
+  /* codebook/lspvqanssi2.txt */
+  {
+    10,
+    7,
+    128,
+    codes1
+  },
+  /* codebook/lspvqanssi3.txt */
+  {
+    10,
+    6,
+    64,
+    codes2
+  },
+  /* codebook/lspvqanssi4.txt */
+  {
+    10,
+    6,
+    64,
+    codes3
+  },
+  { 0, 0, 0, 0 }
+};
index 30142fec1da27448d7c44a998eafc48d87750b48..db5c5ee36631c1de5284683685e8dab5bd5a3d2a 100644 (file)
@@ -23,8 +23,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <assert.h>
 #include "interp.h"
 #include "postfilter.h"
 #include "codec2.h"
-
-typedef struct {
-    float  Sn[M];        /* input speech                              */
-    float  w[M];        /* time domain hamming window                */
-    COMP   W[FFT_ENC];  /* DFT of w[]                                */
-    float  Pn[2*N];     /* trapezoidal synthesis window              */
-    float  Sn_[2*N];    /* synthesised speech                        */
-    float  prev_Wo;      /* previous frame's pitch estimate           */
-    float  ex_phase;     /* excitation model phase track              */
-    float  bg_est;       /* background noise estimate for post filter */
-    MODEL  prev_model;   /* model parameters from 20ms ago            */
-    void  *nlp;          /* pitch predictor states                    */
-} CODEC2;
+#include "lsp.h"
+#include "codec2_internal.h"
 
 /*---------------------------------------------------------------------------*\
                                                        
@@ -63,8 +51,18 @@ typedef struct {
 
 \*---------------------------------------------------------------------------*/
 
-void analyse_one_frame(CODEC2 *c2, MODEL *model, short speech[]);
-void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model,float ak[]);
+void analyse_one_frame(struct CODEC2 *c2, MODEL *model, short speech[]);
+void synthesise_one_frame(struct CODEC2 *c2, short speech[], MODEL *model,
+                         float ak[]);
+void codec2_encode_3200(struct CODEC2 *c2, unsigned char * bits, short speech[]);
+void codec2_decode_3200(struct CODEC2 *c2, short speech[], const unsigned char * bits);
+void codec2_encode_2400(struct CODEC2 *c2, unsigned char * bits, short speech[]);
+void codec2_decode_2400(struct CODEC2 *c2, short speech[], const unsigned char * bits);
+void codec2_encode_1400(struct CODEC2 *c2, unsigned char * bits, short speech[]);
+void codec2_decode_1400(struct CODEC2 *c2, short speech[], const unsigned char * bits);
+void codec2_encode_1200(struct CODEC2 *c2, unsigned char * bits, short speech[]);
+void codec2_decode_1200(struct CODEC2 *c2, short speech[], const unsigned char * bits);
+void ear_protection(float in_out[], int n);
 
 /*---------------------------------------------------------------------------*\
                                                        
@@ -86,29 +84,46 @@ void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model,float ak[]);
 
 \*---------------------------------------------------------------------------*/
 
-void *codec2_create()
+struct CODEC2 * CODEC2_WIN32SUPPORT codec2_create(int mode)
 {
-    CODEC2 *c2;
-    int     i,l;
+    struct CODEC2 *c2;
+    int            i,l;
 
-    c2 = (CODEC2*)malloc(sizeof(CODEC2));
+    c2 = (struct CODEC2*)malloc(sizeof(struct CODEC2));
     if (c2 == NULL)
        return NULL;
-
+    
+    assert(
+          (mode == CODEC2_MODE_3200) || 
+          (mode == CODEC2_MODE_2400) || 
+          (mode == CODEC2_MODE_1400) || 
+          (mode == CODEC2_MODE_1200)
+          );
+    c2->mode = mode;
     for(i=0; i<M; i++)
        c2->Sn[i] = 1.0;
+    c2->hpf_states[0] = c2->hpf_states[1] = 0.0;
     for(i=0; i<2*N; i++)
        c2->Sn_[i] = 0;
-    make_analysis_window(c2->w,c2->W);
+    c2->fft_fwd_cfg = kiss_fft_alloc(FFT_ENC, 0, NULL, NULL);
+    make_analysis_window(c2->fft_fwd_cfg, c2->w,c2->W);
     make_synthesis_window(c2->Pn);
+    c2->fft_inv_cfg = kiss_fft_alloc(FFT_DEC, 1, NULL, NULL);
     quantise_init();
-    c2->prev_Wo = 0.0;
+    c2->prev_Wo_enc = 0.0;
     c2->bg_est = 0.0;
     c2->ex_phase = 0.0;
 
     for(l=1; l<=MAX_AMP; l++)
-       c2->prev_model.A[l] = 0.0;
-    c2->prev_model.Wo = TWO_PI/P_MAX;
+       c2->prev_model_dec.A[l] = 0.0;
+    c2->prev_model_dec.Wo = TWO_PI/P_MAX;
+    c2->prev_model_dec.L = PI/c2->prev_model_dec.Wo;
+    c2->prev_model_dec.voiced = 0;
+
+    for(i=0; i<LPC_ORD; i++) {
+      c2->prev_lsps_dec[i] = i*PI/(LPC_ORD+1);
+    }
+    c2->prev_e_dec = 1;
 
     c2->nlp = nlp_create();
     if (c2->nlp == NULL) {
@@ -116,12 +131,17 @@ void *codec2_create()
        return NULL;
     }
 
-    return (void*)c2;
+    c2->lpc_pf = 1; c2->bass_boost = 1; c2->beta = LPCPF_BETA; c2->gamma = LPCPF_GAMMA;
+
+    c2->xq_enc[0] = c2->xq_enc[1] = 0.0;
+    c2->xq_dec[0] = c2->xq_dec[1] = 0.0;
+
+    return c2;
 }
 
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: codec2_create       
+  FUNCTION....: codec2_destroy      
   AUTHOR......: David Rowe                           
   DATE CREATED: 21/8/2010 
 
@@ -129,27 +149,263 @@ void *codec2_create()
 
 \*---------------------------------------------------------------------------*/
 
-void codec2_destroy(void *codec2_state)
+void CODEC2_WIN32SUPPORT codec2_destroy(struct CODEC2 *c2)
 {
-    CODEC2 *c2;
-    
-    assert(codec2_state != NULL);
-    c2 = (CODEC2*)codec2_state;
+    assert(c2 != NULL);
     nlp_destroy(c2->nlp);
-    free(codec2_state);
+    KISS_FFT_FREE(c2->fft_fwd_cfg);
+    KISS_FFT_FREE(c2->fft_inv_cfg);
+    free(c2);
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_bits_per_frame     
+  AUTHOR......: David Rowe                           
+  DATE CREATED: Nov 14 2011
+
+  Returns the number of bits per frame.
+
+\*---------------------------------------------------------------------------*/
+
+int CODEC2_WIN32SUPPORT codec2_bits_per_frame(struct CODEC2 *c2) {
+    if (c2->mode == CODEC2_MODE_3200)
+       return 64;
+    if (c2->mode == CODEC2_MODE_2400)
+       return 48;
+    if  (c2->mode == CODEC2_MODE_1400)
+       return 56;
+    if  (c2->mode == CODEC2_MODE_1200)
+       return 48;
+
+    return 0; /* shouldn't get here */
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_samples_per_frame     
+  AUTHOR......: David Rowe                           
+  DATE CREATED: Nov 14 2011
+
+  Returns the number of bits per frame.
+
+\*---------------------------------------------------------------------------*/
+
+int CODEC2_WIN32SUPPORT codec2_samples_per_frame(struct CODEC2 *c2) {
+    if (c2->mode == CODEC2_MODE_3200)
+       return 160;
+    if (c2->mode == CODEC2_MODE_2400)
+       return 160;
+    if  (c2->mode == CODEC2_MODE_1400)
+       return 320;
+    if  (c2->mode == CODEC2_MODE_1200)
+       return 320;
+
+    return 0; /* shouldnt get here */
+}
+
+void CODEC2_WIN32SUPPORT codec2_encode(struct CODEC2 *c2, unsigned char *bits, short speech[])
+{
+    assert(c2 != NULL);
+    assert(
+          (c2->mode == CODEC2_MODE_3200) || 
+          (c2->mode == CODEC2_MODE_2400) || 
+          (c2->mode == CODEC2_MODE_1400) || 
+          (c2->mode == CODEC2_MODE_1200)
+          );
+
+    if (c2->mode == CODEC2_MODE_3200)
+       codec2_encode_3200(c2, bits, speech);
+    if (c2->mode == CODEC2_MODE_2400)
+       codec2_encode_2400(c2, bits, speech);
+    if (c2->mode == CODEC2_MODE_1400)
+       codec2_encode_1400(c2, bits, speech);
+    if (c2->mode == CODEC2_MODE_1200)
+       codec2_encode_1200(c2, bits, speech);
+}
+
+void CODEC2_WIN32SUPPORT codec2_decode(struct CODEC2 *c2, short speech[], const unsigned char *bits)
+{
+    assert(c2 != NULL);
+    assert(
+          (c2->mode == CODEC2_MODE_3200) || 
+          (c2->mode == CODEC2_MODE_2400) || 
+          (c2->mode == CODEC2_MODE_1400) || 
+          (c2->mode == CODEC2_MODE_1200)
+          );
+
+    if (c2->mode == CODEC2_MODE_3200)
+       codec2_decode_3200(c2, speech, bits);
+    if (c2->mode == CODEC2_MODE_2400)
+       codec2_decode_2400(c2, speech, bits);
+    if (c2->mode == CODEC2_MODE_1400)
+       codec2_decode_1400(c2, speech, bits);
+    if (c2->mode == CODEC2_MODE_1200)
+       codec2_decode_1200(c2, speech, bits);
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_encode_3200          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 13 Sep 2012
+
+  Encodes 160 speech samples (20ms of speech) into 64 bits.  
+
+  The codec2 algorithm actually operates internally on 10ms (80
+  sample) frames, so we run the encoding algorithm twice.  On the
+  first frame we just send the voicing bits.  On the second frame we
+  send all model parameters.  Compared to 2400 we use a larger number
+  of bits for the LSPs and non-VQ pitch and energy.
+
+  The bit allocation is:
+
+    Parameter                      bits/frame
+    --------------------------------------
+    Harmonic magnitudes (LSPs)     50
+    Pitch (Wo)                      7
+    Energy                          5
+    Voicing (10ms update)           2
+    TOTAL                          64
+\*---------------------------------------------------------------------------*/
+
+void codec2_encode_3200(struct CODEC2 *c2, unsigned char * bits, short speech[])
+{
+    MODEL   model;
+    float   ak[LPC_ORD+1];
+    float   lsps[LPC_ORD];
+    float   e;
+    int     Wo_index, e_index;
+    int     lspd_indexes[LPC_ORD];
+    int     i;
+    unsigned int nbit = 0;
+
+    assert(c2 != NULL);
+
+    memset(bits, '\0', ((codec2_bits_per_frame(c2) + 7) / 8));
+
+    /* first 10ms analysis frame - we just want voicing */
+
+    analyse_one_frame(c2, &model, speech);
+    pack(bits, &nbit, model.voiced, 1);
+
+    /* second 10ms analysis frame */
+
+    analyse_one_frame(c2, &model, &speech[N]);
+    pack(bits, &nbit, model.voiced, 1);
+    Wo_index = encode_Wo(model.Wo);
+    pack(bits, &nbit, Wo_index, WO_BITS);
+   
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+    e_index = encode_energy(e);
+    pack(bits, &nbit, e_index, E_BITS);
+
+    encode_lspds_scalar(lspd_indexes, lsps, LPC_ORD);
+    for(i=0; i<LSPD_SCALAR_INDEXES; i++) {
+       pack(bits, &nbit, lspd_indexes[i], lspd_bits(i));
+    }
+
+    assert(nbit == (unsigned)codec2_bits_per_frame(c2));
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_decode_3200          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 13 Sep 2012
+
+  Decodes a frame of 64 bits into 160 samples (20ms) of speech.
+
+\*---------------------------------------------------------------------------*/
+
+void codec2_decode_3200(struct CODEC2 *c2, short speech[], const unsigned char * bits)
+{
+    MODEL   model[2];
+    int     lspd_indexes[LPC_ORD];
+    float   lsps[2][LPC_ORD];
+    int     Wo_index, e_index;
+    float   e[2];
+    float   snr;
+    float   ak[2][LPC_ORD+1];
+    int     i,j;
+    unsigned int nbit = 0;
+
+    assert(c2 != NULL);
+    
+    /* only need to zero these out due to (unused) snr calculation */
+
+    for(i=0; i<2; i++)
+       for(j=1; j<=MAX_AMP; j++)
+           model[i].A[j] = 0.0;
+
+    /* unpack bits from channel ------------------------------------*/
+
+    /* this will partially fill the model params for the 2 x 10ms
+       frames */
+
+    model[0].voiced = unpack(bits, &nbit, 1);
+    model[1].voiced = unpack(bits, &nbit, 1);
+
+    Wo_index = unpack(bits, &nbit, WO_BITS);
+    model[1].Wo = decode_Wo(Wo_index);
+    model[1].L  = PI/model[1].Wo;
+
+    e_index = unpack(bits, &nbit, E_BITS);
+    e[1] = decode_energy(e_index);
+
+    for(i=0; i<LSPD_SCALAR_INDEXES; i++) {
+       lspd_indexes[i] = unpack(bits, &nbit, lspd_bits(i));
+    }
+    decode_lspds_scalar(&lsps[1][0], lspd_indexes, LPC_ORD);
+    /* interpolate ------------------------------------------------*/
+
+    /* Wo and energy are sampled every 20ms, so we interpolate just 1
+       10ms frame between 20ms samples */
+
+    interp_Wo(&model[0], &c2->prev_model_dec, &model[1]);
+    e[0] = interp_energy(c2->prev_e_dec, e[1]);
+    /* LSPs are sampled every 20ms so we interpolate the frame in
+       between, then recover spectral amplitudes */
+
+    interpolate_lsp_ver2(&lsps[0][0], c2->prev_lsps_dec, &lsps[1][0], 0.5);
+    for(i=0; i<2; i++) {
+       lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
+       aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0, 
+                  c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma); 
+       apply_lpc_correction(&model[i]);
+    }
+
+    /* synthesise ------------------------------------------------*/
+
+    for(i=0; i<2; i++)
+       synthesise_one_frame(c2, &speech[N*i], &model[i], &ak[i][0]);
+
+    /* update memories for next frame ----------------------------*/
+
+    c2->prev_model_dec = model[1];
+    c2->prev_e_dec = e[1];
+    for(i=0; i<LPC_ORD; i++)
+       c2->prev_lsps_dec[i] = lsps[1][i];
 }
 
+
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: codec2_encode       
+  FUNCTION....: codec2_encode_2400          
   AUTHOR......: David Rowe                           
   DATE CREATED: 21/8/2010 
 
-  Encodes 160 speech samples (20ms of speech) into 51 bits.  
+  Encodes 160 speech samples (20ms of speech) into 48 bits.  
 
   The codec2 algorithm actually operates internally on 10ms (80
   sample) frames, so we run the encoding algorithm twice.  On the
-  first frame we just send the voicing bit.  One the second frame we
+  first frame we just send the voicing bit.  On the second frame we
   send all model parameters.
 
   The bit allocation is:
@@ -157,115 +413,485 @@ void codec2_destroy(void *codec2_state)
     Parameter                      bits/frame
     --------------------------------------
     Harmonic magnitudes (LSPs)     36
-    Low frequency LPC correction    1
-    Energy                          5
-    Wo (fundamental frequnecy)      7
+    Joint VQ of Energy and Wo       8
     Voicing (10ms update)           2
-    TOTAL                          51
+    Spare                           2
+    TOTAL                          48
  
 \*---------------------------------------------------------------------------*/
 
-void codec2_encode(void *codec2_state, unsigned char * bits, short speech[])
+void codec2_encode_2400(struct CODEC2 *c2, unsigned char * bits, short speech[])
 {
-    CODEC2 *c2;
     MODEL   model;
-    int     voiced1, voiced2;
+    float   ak[LPC_ORD+1];
+    float   lsps[LPC_ORD];
+    float   e;
+    int     WoE_index;
     int     lsp_indexes[LPC_ORD];
-    int     lpc_correction;
-    int     energy_index;
-    int     Wo_index;
     int     i;
+    int     spare = 0;
     unsigned int nbit = 0;
 
-    assert(codec2_state != NULL);
-    c2 = (CODEC2*)codec2_state;
+    assert(c2 != NULL);
+
+    memset(bits, '\0', ((codec2_bits_per_frame(c2) + 7) / 8));
 
     /* first 10ms analysis frame - we just want voicing */
 
     analyse_one_frame(c2, &model, speech);
-    voiced1 = model.voiced;
+    pack(bits, &nbit, model.voiced, 1);
 
     /* second 10ms analysis frame */
 
     analyse_one_frame(c2, &model, &speech[N]);
-    voiced2 = model.voiced;
+    pack(bits, &nbit, model.voiced, 1);
     
-    Wo_index = encode_Wo(model.Wo);
-    encode_amplitudes(lsp_indexes, 
-                     &lpc_correction, 
-                     &energy_index,
-                     &model, 
-                      c2->Sn, 
-                      c2->w);   
-    memset(bits, '\0', ((CODEC2_BITS_PER_FRAME + 7) / 8));
-    pack(bits, &nbit, Wo_index, WO_BITS);
-    for(i=0; i<LPC_ORD; i++) {
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+    WoE_index = encode_WoE(&model, e, c2->xq_enc);
+    pack(bits, &nbit, WoE_index, WO_E_BITS);
+
+    encode_lsps_scalar(lsp_indexes, lsps, LPC_ORD);
+    for(i=0; i<LSP_SCALAR_INDEXES; i++) {
        pack(bits, &nbit, lsp_indexes[i], lsp_bits(i));
     }
-    pack(bits, &nbit, lpc_correction, 1);
-    pack(bits, &nbit, energy_index, E_BITS);
-    pack(bits, &nbit, voiced1, 1);
-    pack(bits, &nbit, voiced2, 1);
-    
-    assert(nbit == CODEC2_BITS_PER_FRAME);
+    pack(bits, &nbit, spare, 2);
+
+    assert(nbit == (unsigned)codec2_bits_per_frame(c2));
 }
 
+
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: codec2_decode       
+  FUNCTION....: codec2_decode_2400          
   AUTHOR......: David Rowe                           
   DATE CREATED: 21/8/2010 
 
-  Decodes frames of 51 bits into 160 samples (20ms) of speech.
+  Decodes frames of 48 bits into 160 samples (20ms) of speech.
 
 \*---------------------------------------------------------------------------*/
 
-void codec2_decode(void *codec2_state, short speech[],
-                   const unsigned char * bits)
+void codec2_decode_2400(struct CODEC2 *c2, short speech[], const unsigned char * bits)
 {
-    CODEC2 *c2;
-    MODEL   model;
-    int     voiced1, voiced2;
+    MODEL   model[2];
     int     lsp_indexes[LPC_ORD];
-    int     lpc_correction;
-    int     energy_index;
-    int     Wo_index;
+    float   lsps[2][LPC_ORD];
+    int     WoE_index;
+    float   e[2];
+    float   snr;
+    float   ak[2][LPC_ORD+1];
+    int     i,j;
+    unsigned int nbit = 0;
+
+    assert(c2 != NULL);
+    
+    /* only need to zero these out due to (unused) snr calculation */
+
+    for(i=0; i<2; i++)
+       for(j=1; j<=MAX_AMP; j++)
+           model[i].A[j] = 0.0;
+
+    /* unpack bits from channel ------------------------------------*/
+
+    /* this will partially fill the model params for the 2 x 10ms
+       frames */
+
+    model[0].voiced = unpack(bits, &nbit, 1);
+
+    model[1].voiced = unpack(bits, &nbit, 1);
+    WoE_index = unpack(bits, &nbit, WO_E_BITS);
+    decode_WoE(&model[1], &e[1], c2->xq_dec, WoE_index);
+
+    for(i=0; i<LSP_SCALAR_INDEXES; i++) {
+       lsp_indexes[i] = unpack(bits, &nbit, lsp_bits(i));
+    }
+    decode_lsps_scalar(&lsps[1][0], lsp_indexes, LPC_ORD);
+    check_lsp_order(&lsps[1][0], LPC_ORD);
+    bw_expand_lsps(&lsps[1][0], LPC_ORD);
+    /* interpolate ------------------------------------------------*/
+
+    /* Wo and energy are sampled every 20ms, so we interpolate just 1
+       10ms frame between 20ms samples */
+
+    interp_Wo(&model[0], &c2->prev_model_dec, &model[1]);
+    e[0] = interp_energy(c2->prev_e_dec, e[1]);
+    /* LSPs are sampled every 20ms so we interpolate the frame in
+       between, then recover spectral amplitudes */
+
+    interpolate_lsp_ver2(&lsps[0][0], c2->prev_lsps_dec, &lsps[1][0], 0.5);
+    for(i=0; i<2; i++) {
+       lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
+       aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0, 
+                  c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma); 
+       apply_lpc_correction(&model[i]);
+    }
+
+    /* synthesise ------------------------------------------------*/
+
+    for(i=0; i<2; i++)
+       synthesise_one_frame(c2, &speech[N*i], &model[i], &ak[i][0]);
+
+    /* update memories for next frame ----------------------------*/
+
+    c2->prev_model_dec = model[1];
+    c2->prev_e_dec = e[1];
+    for(i=0; i<LPC_ORD; i++)
+       c2->prev_lsps_dec[i] = lsps[1][i];
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_encode_1400          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: May 11 2012
+
+  Encodes 320 speech samples (40ms of speech) into 56 bits.
+
+  The codec2 algorithm actually operates internally on 10ms (80
+  sample) frames, so we run the encoding algorithm 4 times:
+
+  frame 0: voicing bit
+  frame 1: voicing bit, joint VQ of Wo and E
+  frame 2: voicing bit
+  frame 3: voicing bit, joint VQ of Wo and E, scalar LSPs
+
+  The bit allocation is:
+
+    Parameter                      frame 2  frame 4   Total
+    -------------------------------------------------------
+    Harmonic magnitudes (LSPs)      0       36        36
+    Energy+Wo                       8        8        16
+    Voicing (10ms update)           2        2         4
+    TOTAL                          10       46        56
+\*---------------------------------------------------------------------------*/
+
+void codec2_encode_1400(struct CODEC2 *c2, unsigned char * bits, short speech[])
+{
+    MODEL   model;
+    float   lsps[LPC_ORD];
     float   ak[LPC_ORD+1];
+    float   e;
+    int     lsp_indexes[LPC_ORD];
+    int     WoE_index;
     int     i;
     unsigned int nbit = 0;
-    MODEL   model_interp;
 
-    assert(codec2_state != NULL);
-    c2 = (CODEC2*)codec2_state;
+    assert(c2 != NULL);
 
-    Wo_index = unpack(bits, &nbit, WO_BITS);
-    for(i=0; i<LPC_ORD; i++) {
+    memset(bits, '\0',  ((codec2_bits_per_frame(c2) + 7) / 8));
+
+    /* frame 1: - voicing ---------------------------------------------*/
+
+    analyse_one_frame(c2, &model, speech);
+    pack(bits, &nbit, model.voiced, 1);
+    /* frame 2: - voicing, joint Wo & E -------------------------------*/
+
+    analyse_one_frame(c2, &model, &speech[N]);
+    pack(bits, &nbit, model.voiced, 1);
+
+    /* need to run this just to get LPC energy */
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+
+    WoE_index = encode_WoE(&model, e, c2->xq_enc);
+    pack(bits, &nbit, WoE_index, WO_E_BITS);
+    /* frame 3: - voicing ---------------------------------------------*/
+
+    analyse_one_frame(c2, &model, &speech[2*N]);
+    pack(bits, &nbit, model.voiced, 1);
+
+    /* frame 4: - voicing, joint Wo & E, scalar LSPs ------------------*/
+
+    analyse_one_frame(c2, &model, &speech[3*N]);
+    pack(bits, &nbit, model.voiced, 1);
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+    WoE_index = encode_WoE(&model, e, c2->xq_enc);
+    pack(bits, &nbit, WoE_index, WO_E_BITS);
+    encode_lsps_scalar(lsp_indexes, lsps, LPC_ORD);
+    for(i=0; i<LSP_SCALAR_INDEXES; i++) {
+       pack(bits, &nbit, lsp_indexes[i], lsp_bits(i));
+    }
+
+    assert(nbit == (unsigned)codec2_bits_per_frame(c2));
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_decode_1400          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 11 May 2012
+
+  Decodes frames of 56 bits into 320 samples (40ms) of speech.
+
+\*---------------------------------------------------------------------------*/
+
+void codec2_decode_1400(struct CODEC2 *c2, short speech[], const unsigned char * bits)
+{
+    MODEL   model[4];
+    int     lsp_indexes[LPC_ORD];
+    float   lsps[4][LPC_ORD];
+    int     WoE_index;
+    float   e[4];
+    float   snr;
+    float   ak[4][LPC_ORD+1];
+    int     i,j;
+    unsigned int nbit = 0;
+    float   weight;
+
+    assert(c2 != NULL);
+
+    /* only need to zero these out due to (unused) snr calculation */
+
+    for(i=0; i<4; i++)
+       for(j=1; j<=MAX_AMP; j++)
+           model[i].A[j] = 0.0;
+
+    /* unpack bits from channel ------------------------------------*/
+
+    /* this will partially fill the model params for the 4 x 10ms
+       frames */
+
+    model[0].voiced = unpack(bits, &nbit, 1);
+    
+    model[1].voiced = unpack(bits, &nbit, 1);
+    WoE_index = unpack(bits, &nbit, WO_E_BITS);
+    decode_WoE(&model[1], &e[1], c2->xq_dec, WoE_index);
+
+    model[2].voiced = unpack(bits, &nbit, 1);
+
+    model[3].voiced = unpack(bits, &nbit, 1);
+    WoE_index = unpack(bits, &nbit, WO_E_BITS);
+    decode_WoE(&model[3], &e[3], c2->xq_dec, WoE_index);
+    for(i=0; i<LSP_SCALAR_INDEXES; i++) {
        lsp_indexes[i] = unpack(bits, &nbit, lsp_bits(i));
     }
-    lpc_correction = unpack(bits, &nbit, 1);
-    energy_index = unpack(bits, &nbit, E_BITS);
-    voiced1 = unpack(bits, &nbit, 1);
-    voiced2 = unpack(bits, &nbit, 1);
-    assert(nbit == CODEC2_BITS_PER_FRAME);
-
-    model.Wo = decode_Wo(Wo_index);
-    model.L = PI/model.Wo;
-    decode_amplitudes(&model, 
-                     ak,
-                     lsp_indexes,
-                     lpc_correction, 
-                     energy_index);
-
-    model.voiced = voiced2;
-    model_interp.voiced = voiced1;
-    interpolate(&model_interp, &c2->prev_model, &model);
-
-    synthesise_one_frame(c2,  speech,     &model_interp, ak);
-    synthesise_one_frame(c2, &speech[N],  &model, ak);
-
-    memcpy(&c2->prev_model, &model, sizeof(MODEL));
+    decode_lsps_scalar(&lsps[3][0], lsp_indexes, LPC_ORD);
+    check_lsp_order(&lsps[3][0], LPC_ORD);
+    bw_expand_lsps(&lsps[3][0], LPC_ORD);
+    /* interpolate ------------------------------------------------*/
+
+    /* Wo and energy are sampled every 20ms, so we interpolate just 1
+       10ms frame between 20ms samples */
+
+    interp_Wo(&model[0], &c2->prev_model_dec, &model[1]);
+    e[0] = interp_energy(c2->prev_e_dec, e[1]);
+    interp_Wo(&model[2], &model[1], &model[3]);
+    e[2] = interp_energy(e[1], e[3]);
+    /* LSPs are sampled every 40ms so we interpolate the 3 frames in
+       between, then recover spectral amplitudes */
+
+    for(i=0, weight=0.25; i<3; i++, weight += 0.25) {
+       interpolate_lsp_ver2(&lsps[i][0], c2->prev_lsps_dec, &lsps[3][0], weight);
+    }
+    for(i=0; i<4; i++) {
+       lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
+       aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
+                  c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma); 
+       apply_lpc_correction(&model[i]);
+    }
+
+    /* synthesise ------------------------------------------------*/
+
+    for(i=0; i<4; i++)
+       synthesise_one_frame(c2, &speech[N*i], &model[i], &ak[i][0]);
+
+    /* update memories for next frame ----------------------------*/
+
+    c2->prev_model_dec = model[3];
+    c2->prev_e_dec = e[3];
+    for(i=0; i<LPC_ORD; i++)
+       c2->prev_lsps_dec[i] = lsps[3][i];
+
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_encode_1200          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: Nov 14 2011 
+
+  Encodes 320 speech samples (40ms of speech) into 48 bits.  
+
+  The codec2 algorithm actually operates internally on 10ms (80
+  sample) frames, so we run the encoding algorithm four times:
+
+  frame 0: voicing bit
+  frame 1: voicing bit, joint VQ of Wo and E
+  frame 2: voicing bit
+  frame 3: voicing bit, joint VQ of Wo and E, VQ LSPs
+
+  The bit allocation is:
+
+    Parameter                      frame 2  frame 4   Total
+    -------------------------------------------------------
+    Harmonic magnitudes (LSPs)      0       27        27
+    Energy+Wo                       8        8        16
+    Voicing (10ms update)           2        2         4
+    Spare                           0        1         1
+    TOTAL                          10       38        48
+\*---------------------------------------------------------------------------*/
+
+void codec2_encode_1200(struct CODEC2 *c2, unsigned char * bits, short speech[])
+{
+    MODEL   model;
+    float   lsps[LPC_ORD];
+    float   lsps_[LPC_ORD];
+    float   ak[LPC_ORD+1];
+    float   e;
+    int     lsp_indexes[LPC_ORD];
+    int     WoE_index;
+    int     i;
+    int     spare = 0;
+    unsigned int nbit = 0;
+
+    assert(c2 != NULL);
+
+    memset(bits, '\0',  ((codec2_bits_per_frame(c2) + 7) / 8));
+
+    /* frame 1: - voicing ---------------------------------------------*/
+
+    analyse_one_frame(c2, &model, speech);
+    pack(bits, &nbit, model.voiced, 1);
+    /* frame 2: - voicing, joint Wo & E -------------------------------*/
+
+    analyse_one_frame(c2, &model, &speech[N]);
+    pack(bits, &nbit, model.voiced, 1);
+
+    /* need to run this just to get LPC energy */
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+
+    WoE_index = encode_WoE(&model, e, c2->xq_enc);
+    pack(bits, &nbit, WoE_index, WO_E_BITS);
+    /* frame 3: - voicing ---------------------------------------------*/
+
+    analyse_one_frame(c2, &model, &speech[2*N]);
+    pack(bits, &nbit, model.voiced, 1);
+
+    /* frame 4: - voicing, joint Wo & E, scalar LSPs ------------------*/
+
+    analyse_one_frame(c2, &model, &speech[3*N]);
+    pack(bits, &nbit, model.voiced, 1);
+    e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+    WoE_index = encode_WoE(&model, e, c2->xq_enc);
+    pack(bits, &nbit, WoE_index, WO_E_BITS);
+    encode_lsps_vq(lsp_indexes, lsps, lsps_, LPC_ORD);
+    for(i=0; i<LSP_PRED_VQ_INDEXES; i++) {
+       pack(bits, &nbit, lsp_indexes[i], lsp_pred_vq_bits(i));
+    }
+    pack(bits, &nbit, spare, 1);
+    assert(nbit == (unsigned)codec2_bits_per_frame(c2));
 }
 
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: codec2_decode_1200          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 14 Feb 2012
+
+  Decodes frames of 48 bits into 320 samples (40ms) of speech.
+
+\*---------------------------------------------------------------------------*/
+
+void codec2_decode_1200(struct CODEC2 *c2, short speech[], const unsigned char * bits)
+{
+    MODEL   model[4];
+    int     lsp_indexes[LPC_ORD];
+    float   lsps[4][LPC_ORD];
+    int     WoE_index;
+    float   e[4];
+    float   snr;
+    float   ak[4][LPC_ORD+1];
+    int     i,j;
+    unsigned int nbit = 0;
+    float   weight;
+
+    assert(c2 != NULL);
+
+    /* only need to zero these out due to (unused) snr calculation */
+
+    for(i=0; i<4; i++)
+       for(j=1; j<=MAX_AMP; j++)
+           model[i].A[j] = 0.0;
+
+    /* unpack bits from channel ------------------------------------*/
+
+    /* this will partially fill the model params for the 4 x 10ms
+       frames */
+
+    model[0].voiced = unpack(bits, &nbit, 1);
+
+    model[1].voiced = unpack(bits, &nbit, 1);
+    WoE_index = unpack(bits, &nbit, WO_E_BITS);
+    decode_WoE(&model[1], &e[1], c2->xq_dec, WoE_index);
+
+    model[2].voiced = unpack(bits, &nbit, 1);
+
+    model[3].voiced = unpack(bits, &nbit, 1);
+    WoE_index = unpack(bits, &nbit, WO_E_BITS);
+    decode_WoE(&model[3], &e[3], c2->xq_dec, WoE_index);
+    for(i=0; i<LSP_PRED_VQ_INDEXES; i++) {
+       lsp_indexes[i] = unpack(bits, &nbit, lsp_pred_vq_bits(i));
+    }
+    decode_lsps_vq(lsp_indexes, &lsps[3][0], LPC_ORD);
+    check_lsp_order(&lsps[3][0], LPC_ORD);
+    bw_expand_lsps(&lsps[3][0], LPC_ORD);
+    /* interpolate ------------------------------------------------*/
+
+    /* Wo and energy are sampled every 20ms, so we interpolate just 1
+       10ms frame between 20ms samples */
+
+    interp_Wo(&model[0], &c2->prev_model_dec, &model[1]);
+    e[0] = interp_energy(c2->prev_e_dec, e[1]);
+    interp_Wo(&model[2], &model[1], &model[3]);
+    e[2] = interp_energy(e[1], e[3]);
+    /* LSPs are sampled every 40ms so we interpolate the 3 frames in
+       between, then recover spectral amplitudes */
+
+    for(i=0, weight=0.25; i<3; i++, weight += 0.25) {
+       interpolate_lsp_ver2(&lsps[i][0], c2->prev_lsps_dec, &lsps[3][0], weight);
+    }
+    for(i=0; i<4; i++) {
+       lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
+       aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
+                  c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma); 
+       apply_lpc_correction(&model[i]);
+    }
+
+    /* synthesise ------------------------------------------------*/
+
+    for(i=0; i<4; i++)
+       synthesise_one_frame(c2, &speech[N*i], &model[i], &ak[i][0]);
+
+    /* update memories for next frame ----------------------------*/
+
+    c2->prev_model_dec = model[3];
+    c2->prev_e_dec = e[3];
+    for(i=0; i<LPC_ORD; i++)
+       c2->prev_lsps_dec[i] = lsps[3][i];
+}
+
+
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: synthesise_one_frame()      
@@ -276,13 +902,14 @@ void codec2_decode(void *codec2_state, short speech[],
 
 \*---------------------------------------------------------------------------*/
 
-void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model, float ak[])
+void synthesise_one_frame(struct CODEC2 *c2, short speech[], MODEL *model, float ak[])
 {
     int     i;
 
-    phase_synth_zero_order(model, ak, &c2->ex_phase);
+    phase_synth_zero_order(c2->fft_fwd_cfg, model, ak, &c2->ex_phase, LPC_ORD);
     postfilter(model, &c2->bg_est);
-    synthesise(c2->Sn_, model, c2->Pn, 1);
+    synthesise(c2->fft_inv_cfg, c2->Sn_, model, c2->Pn, 1);
+    ear_protection(c2->Sn_, N);
 
     for(i=0; i<N; i++) {
        if (c2->Sn_[i] > 32767.0)
@@ -306,11 +933,12 @@ void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model, float ak[])
  
 \*---------------------------------------------------------------------------*/
 
-void analyse_one_frame(CODEC2 *c2, MODEL *model, short speech[])
+void analyse_one_frame(struct CODEC2 *c2, MODEL *model, short speech[])
 {
     COMP    Sw[FFT_ENC];
     COMP    Sw_[FFT_ENC];
-    float   pitch;
+    COMP    Ew[FFT_ENC];
+    float   pitch, snr;
     int     i;
 
     /* Read input speech */
@@ -319,19 +947,113 @@ void analyse_one_frame(CODEC2 *c2, MODEL *model, short speech[])
       c2->Sn[i] = c2->Sn[i+N];
     for(i=0; i<N; i++)
       c2->Sn[i+M-N] = speech[i];
-    dft_speech(Sw, c2->Sn, c2->w);
+
+    dft_speech(c2->fft_fwd_cfg, Sw, c2->Sn, c2->w);
 
     /* Estimate pitch */
 
-    nlp(c2->nlp,c2->Sn,N,M,P_MIN,P_MAX,&pitch,Sw,&c2->prev_Wo);
-    c2->prev_Wo = TWO_PI/pitch;
+    nlp(c2->nlp,c2->Sn,N,M,P_MIN,P_MAX,&pitch,Sw, c2->W, &c2->prev_Wo_enc);
     model->Wo = TWO_PI/pitch;
     model->L = PI/model->Wo;
 
     /* estimate model parameters */
 
-    dft_speech(Sw, c2->Sn, c2->w); 
     two_stage_pitch_refinement(model, Sw);
     estimate_amplitudes(model, Sw, c2->W);
-    est_voicing_mbe(model, Sw, c2->W, (FS/TWO_PI)*model->Wo, Sw_);
+    snr = est_voicing_mbe(model, Sw, c2->W, Sw_, Ew, c2->prev_Wo_enc);
+    //fprintf(stderr,"snr %3.2f  v: %d  Wo: %f prev_Wo: %f\n", 
+    //    snr, model->voiced, model->Wo, c2->prev_Wo_enc);
+    c2->prev_Wo_enc = model->Wo;
 }
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: ear_protection()   
+  AUTHOR......: David Rowe                           
+  DATE CREATED: Nov 7 2012
+
+  Limits output level to protect ears when there are bit errors or the input
+  is overdriven.  This doesn't correct or mask bit erros, just reduces the
+  worst of their damage.
+
+\*---------------------------------------------------------------------------*/
+
+void ear_protection(float in_out[], int n) {
+    float max_sample, over, gain;
+    int   i;
+
+    /* find maximum sample in frame */
+
+    max_sample = 0.0;
+    for(i=0; i<n; i++)
+        if (in_out[i] > max_sample)
+            max_sample = in_out[i];
+
+    /* determine how far above set point */
+
+    over = max_sample/30000.0;
+
+    /* If we are x dB over set point we reduce level by 2x dB, this
+       attenuates major excursions in amplitude (likely to be caused
+       by bit errors) more than smaller ones */
+
+    if (over > 1.0) {
+        gain = 1.0/(over*over);
+        //fprintf(stderr, "gain: %f\n", gain);
+        for(i=0; i<n; i++)
+            in_out[i] *= gain;
+    }
+}
+
+void CODEC2_WIN32SUPPORT codec2_set_lpc_post_filter(struct CODEC2 *c2, int enable, int bass_boost, float beta, float gamma)
+{
+    assert((beta >= 0.0) && (beta <= 1.0));
+    assert((gamma >= 0.0) && (gamma <= 1.0));
+    c2->lpc_pf = enable;
+    c2->bass_boost = bass_boost;
+    c2->beta = beta;
+    c2->gamma = gamma;
+}
+
+/* 
+   Allows optional stealing of one of the voicing bits for use as a
+   spare bit, only 1400 bit/s supported for now.  Experimental method
+   of sending voice/data frames for FreeDV.
+*/
+
+int CODEC2_WIN32SUPPORT codec2_get_spare_bit_index(struct CODEC2 *c2)
+{
+    assert(c2 != NULL);
+
+    if (c2->mode != CODEC2_MODE_1400)
+        return -1;
+    
+    return 10; // bit 10 (11th bit) is v2 (third voicing bit)
+}
+
+/*
+   Reconstructs the spare voicing bit.  Note works on unpacked bits
+   for convenience.
+*/
+
+int CODEC2_WIN32SUPPORT codec2_rebuild_spare_bit(struct CODEC2 *c2, int unpacked_bits[])
+{
+    int v0,v1,v3;
+
+    assert(c2 != NULL);
+
+    if (c2->mode != CODEC2_MODE_1400)
+        return -1;
+
+    v0 = unpacked_bits[0];
+    v1 = unpacked_bits[1];
+    v3 = unpacked_bits[11];
+
+    /* if either adjacent frame is voiced, make this one voiced */
+
+    unpacked_bits[10] = (v1 || v3);  
+
+    return 0;
+}
+
+
index 7a1d1450a5951f35935141901b6fabdbda7cf55a..8baa307eb620df81fdcf4064363ae87430de9b3d 100644 (file)
@@ -2,10 +2,10 @@
 
   FILE........: codec2.h
   AUTHOR......: David Rowe
-  DATE CREATED: 21/8/2010
+  DATE CREATED: 21 August 2010
 
-  Codec2 fully quantised encoder and decoder functions.  If you want use 
-  codec2, these are the functions you need to call.
+  Codec 2 fully quantised encoder and decoder functions.  If you want use 
+  Codec 2, these are the functions you need to call.
 
 \*---------------------------------------------------------------------------*/
 
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
 #ifndef __CODEC2__
 #define  __CODEC2__
-#include "codebook.h"
 
-#define CODEC2_SAMPLES_PER_FRAME 160
-#define CODEC2_BITS_PER_FRAME     51
+/* set up the calling convention for DLL function import/export for
+   WIN32 cross compiling */
+
+#ifdef __CODEC2_WIN32__
+#ifdef __CODEC2_BUILDING_DLL__
+#define CODEC2_WIN32SUPPORT __declspec(dllexport) __stdcall
+#else
+#define CODEC2_WIN32SUPPORT __declspec(dllimport) __stdcall
+#endif
+#else
+#define CODEC2_WIN32SUPPORT
+#endif
+
+#define CODEC2_MODE_3200 0
+#define CODEC2_MODE_2400 1
+#define CODEC2_MODE_1400 2
+#define CODEC2_MODE_1200 3
 
-void *codec2_create();
-void codec2_destroy(void *codec2_state);
-void codec2_encode(void *codec2_state, unsigned char * bits, short speech_in[]);
-void codec2_decode(void *codec2_state, short speech_out[],
-      const unsigned char * bits);
+struct CODEC2;
+
+struct CODEC2 * CODEC2_WIN32SUPPORT codec2_create(int mode);
+void CODEC2_WIN32SUPPORT codec2_destroy(struct CODEC2 *codec2_state);
+void CODEC2_WIN32SUPPORT codec2_encode(struct CODEC2 *codec2_state, unsigned char * bits, short speech_in[]);
+void CODEC2_WIN32SUPPORT codec2_decode(struct CODEC2 *codec2_state, short speech_out[], const unsigned char *bits);
+int  CODEC2_WIN32SUPPORT codec2_samples_per_frame(struct CODEC2 *codec2_state);
+int  CODEC2_WIN32SUPPORT codec2_bits_per_frame(struct CODEC2 *codec2_state);
+
+void CODEC2_WIN32SUPPORT codec2_set_lpc_post_filter(struct CODEC2 *codec2_state, int enable, int bass_boost, float beta, float gamma);
+int  CODEC2_WIN32SUPPORT codec2_get_spare_bit_index(struct CODEC2 *codec2_state);
+int  CODEC2_WIN32SUPPORT codec2_rebuild_spare_bit(struct CODEC2 *codec2_state, int unpacked_bits[]);
 
 #endif
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/libs/libcodec2/src/codec2_internal.h b/libs/libcodec2/src/codec2_internal.h
new file mode 100644 (file)
index 0000000..5c6d279
--- /dev/null
@@ -0,0 +1,60 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: codec2_internal.h
+  AUTHOR......: David Rowe                                                          
+  DATE CREATED: April 16 2012
+                                                                             
+  Header file for Codec2 internal states, exposed via this header
+  file to assist in testing.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __CODEC2_INTERNAL__
+#define __CODEC2_INTERNAL__
+
+struct CODEC2 {
+    int           mode;
+    kiss_fft_cfg  fft_fwd_cfg;             /* forward FFT config                        */
+    float         w[M];                           /* time domain hamming window                */
+    COMP          W[FFT_ENC];             /* DFT of w[]                                */
+    float         Pn[2*N];                /* trapezoidal synthesis window              */
+    float         Sn[M];                   /* input speech                              */
+    float         hpf_states[2];           /* high pass filter states                   */
+    void         *nlp;                     /* pitch predictor states                    */
+
+    kiss_fft_cfg  fft_inv_cfg;             /* inverse FFT config                        */
+    float         Sn_[2*N];               /* synthesised output speech                 */
+    float         ex_phase;                /* excitation model phase track              */
+    float         bg_est;                  /* background noise estimate for post filter */
+    float         prev_Wo_enc;             /* previous frame's pitch estimate           */
+    MODEL         prev_model_dec;          /* previous frame's model parameters         */
+    float         prev_lsps_dec[LPC_ORD];  /* previous frame's LSPs                     */
+    float         prev_e_dec;              /* previous frame's LPC energy               */
+    
+    int           lpc_pf;                  /* LPC post filter on                        */
+    int           bass_boost;              /* LPC post filter bass boost                */
+    float         beta;                    /* LPC post filter parameters                */
+    float         gamma;
+
+    float         xq_enc[2];               /* joint pitch and energy VQ states          */
+    float         xq_dec[2];
+};
+
+#endif
index bca01b5d2fceb51cf50cb96df7c9f821c8dc54f0..cedcab37f2ae79c107a3d3f17d66cd6d1c61fa97 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __COMP__
index ef4899f70ac059bef53c310f177e823062ead3ea..4870770c9873e69fed4fe85a5fd8d48d90a13ac5 100644 (file)
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 
   FILE........: defines.h                                                     
-  AUTHOR......: David Rowe                                                          
+  AUTHOR......: David Rowe 
   DATE CREATED: 23/4/93                                                       
                                                                              
   Defines and structures used throughout the codec.                         
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __DEFINES__
@@ -48,7 +47,7 @@
 #define FFT_ENC    512         /* size of FFT used for encoder         */
 #define FFT_DEC    512         /* size of FFT used in decoder          */
 #define TW         40          /* Trapezoidal synthesis window overlap */
-#define V_THRESH   4.0          /* voicing threshold in dB              */
+#define V_THRESH   6.0          /* voicing threshold in dB              */
 #define LPC_MAX    20          /* maximum LPC order                    */
 #define LPC_ORD    10          /* phase modelling LPC order            */
 
                                                                              
 \*---------------------------------------------------------------------------*/
 
-/* Complex number */
-
-typedef struct {
-  float real;
-  float imag;
-} COMP;
-
 /* Structure to hold model parameters for one frame */
 
 typedef struct {
   float Wo;            /* fundamental frequency estimate in radians  */
   int   L;             /* number of harmonics                        */
-  float A[MAX_AMP];    /* amplitiude of each harmonic                */
-  float phi[MAX_AMP];  /* phase of each harmonic                     */
+  float A[MAX_AMP+1];  /* amplitiude of each harmonic                */
+  float phi[MAX_AMP+1];        /* phase of each harmonic                     */
   int   voiced;                /* non-zero if this frame is voiced           */
 } MODEL;
 
+/* describes each codebook  */
+
+struct lsp_codebook {
+    int                        k;        /* dimension of vector        */
+    int                        log2m;    /* number of bits in m        */
+    int                        m;        /* elements in codebook       */
+    const float        *       cb;       /* The elements               */
+};
+
+extern const struct lsp_codebook lsp_cb[];
+extern const struct lsp_codebook lsp_cbd[];
+extern const struct lsp_codebook lsp_cbvq[];
+extern const struct lsp_codebook lsp_cbjnd[];
+extern const struct lsp_codebook lsp_cbdt[];
+extern const struct lsp_codebook lsp_cbjvm[];
+extern const struct lsp_codebook lsp_cbvqanssi[];
+extern const struct lsp_codebook ge_cb[];
+
 #endif
index 2d187444838d219bb480fdbef9fa82b176d34b83..b414c794d508ab927b1a258a84a5c6aee3e2e275 100644 (file)
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
                                                                              
   FILE........: dump.c
-  AUTHOR......: David Rowe                                                          
+  AUTHOR......: David Rowe          
   DATE CREATED: 25/8/09                                                       
                                                                              
   Routines to dump data to text files for Octave analysis.
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "defines.h"
+#include "comp.h"
 #include "dump.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
 
+#ifdef DUMP
 static int dumpon = 0;
 
 static FILE *fsn = NULL;
 static FILE *fsw = NULL;
+static FILE *few = NULL;
 static FILE *fsw_ = NULL;
 static FILE *fmodel = NULL;
 static FILE *fqmodel = NULL;
+static FILE *fpwb = NULL;
 static FILE *fpw = NULL;
+static FILE *frw = NULL;
 static FILE *flsp = NULL;
+static FILE *fweights = NULL;
+static FILE *flsp_ = NULL;
 static FILE *fphase = NULL;
 static FILE *fphase_ = NULL;
 static FILE *ffw = NULL;
@@ -48,9 +54,13 @@ static FILE *fe = NULL;
 static FILE *fsq = NULL;
 static FILE *fdec = NULL;
 static FILE *fsnr = NULL;
+static FILE *flpcsnr = NULL;
 static FILE *fak = NULL;
+static FILE *fak_ = NULL;
 static FILE *fbg = NULL;
 static FILE *fE = NULL;
+static FILE *frk = NULL;
+static FILE *fhephase = NULL;
 
 static char  prefix[MAX_STR];
 
@@ -66,14 +76,24 @@ void dump_off(){
        fclose(fsw);
     if (fsw_ != NULL)
        fclose(fsw_);
+    if (few != NULL)
+       fclose(few);
     if (fmodel != NULL)
        fclose(fmodel);
     if (fqmodel != NULL)
        fclose(fqmodel);
+    if (fpwb != NULL)
+       fclose(fpwb);
     if (fpw != NULL)
        fclose(fpw);
+    if (frw != NULL)
+       fclose(frw);
     if (flsp != NULL)
        fclose(flsp);
+    if (fweights != NULL)
+       fclose(fweights);
+    if (flsp_ != NULL)
+       fclose(flsp_);
     if (fphase != NULL)
        fclose(fphase);
     if (fphase_ != NULL)
@@ -88,12 +108,20 @@ void dump_off(){
        fclose(fdec);
     if (fsnr != NULL)
        fclose(fsnr);
+    if (flpcsnr != NULL)
+       fclose(flpcsnr);
     if (fak != NULL)
        fclose(fak);
+    if (fak_ != NULL)
+       fclose(fak_);
     if (fbg != NULL)
        fclose(fbg);
     if (fE != NULL)
        fclose(fE);
+    if (frk != NULL)
+       fclose(frk);
+    if (fhephase != NULL)
+       fclose(fhephase);
 }
 
 void dump_Sn(float Sn[]) {
@@ -155,6 +183,24 @@ void dump_Sw_(COMP Sw_[]) {
     fprintf(fsw_,"\n");    
 }
 
+void dump_Ew(COMP Ew[]) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (few == NULL) {
+       sprintf(s,"%s_ew.txt", prefix);
+       few = fopen(s, "wt");
+       assert(few != NULL);
+    }
+
+    for(i=0; i<FFT_ENC/2; i++)
+       fprintf(few,"%f\t",
+               10.0*log10(Ew[i].real*Ew[i].real + Ew[i].imag*Ew[i].imag));
+    fprintf(few,"\n");    
+}
+
 void dump_model(MODEL *model) {
     int l;
     char s[MAX_STR];
@@ -234,6 +280,25 @@ void dump_phase_(float phase_[], int L) {
     fprintf(fphase_,"\n");    
 }
 
+
+void dump_hephase(int ind[], int dim) {
+    int m;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (fhephase == NULL) {
+       sprintf(s,"%s_hephase.txt", prefix);
+       fhephase = fopen(s, "wt");
+       assert(fhephase != NULL);
+    }
+
+    for(m=0; m<dim; m++)
+       fprintf(fhephase,"%d\t",ind[m]);
+    fprintf(fhephase,"\n");    
+}
+
+
 void dump_snr(float snr) {
     char s[MAX_STR];
 
@@ -248,6 +313,39 @@ void dump_snr(float snr) {
     fprintf(fsnr,"%f\n",snr);
 }
 
+void dump_lpc_snr(float snr) {
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (flpcsnr == NULL) {
+       sprintf(s,"%s_lpc_snr.txt", prefix);
+       flpcsnr = fopen(s, "wt");
+       assert(flpcsnr != NULL);
+    }
+    
+    fprintf(flpcsnr,"%f\n",snr);
+}
+
+/* Pw "before" post filter so we can plot before and after */
+
+void dump_Pwb(COMP Pwb[]) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (fpwb == NULL) {
+       sprintf(s,"%s_pwb.txt", prefix);
+       fpwb = fopen(s, "wt");
+       assert(fpwb != NULL);
+    }
+
+    for(i=0; i<FFT_ENC/2; i++)
+       fprintf(fpwb,"%f\t",Pwb[i].real);
+    fprintf(fpwb,"\n");    
+}
+
 void dump_Pw(COMP Pw[]) {
     int i;
     char s[MAX_STR];
@@ -260,11 +358,45 @@ void dump_Pw(COMP Pw[]) {
        assert(fpw != NULL);
     }
 
-    for(i=0; i<FFT_DEC/2; i++)
+    for(i=0; i<FFT_ENC/2; i++)
        fprintf(fpw,"%f\t",Pw[i].real);
     fprintf(fpw,"\n");    
 }
 
+void dump_Rw(float Rw[]) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (frw == NULL) {
+       sprintf(s,"%s_rw.txt", prefix);
+       frw = fopen(s, "wt");
+       assert(frw != NULL);
+    }
+
+    for(i=0; i<FFT_ENC/2; i++)
+       fprintf(frw,"%f\t",Rw[i]);
+    fprintf(frw,"\n");    
+}
+
+void dump_weights(float w[], int order) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (fweights == NULL) {
+       sprintf(s,"%s_weights.txt", prefix);
+       fweights = fopen(s, "wt");
+       assert(fweights != NULL);
+    }
+
+    for(i=0; i<order; i++)
+       fprintf(fweights,"%f\t", w[i]);
+    fprintf(fweights,"\n");    
+}
+
 void dump_lsp(float lsp[]) {
     int i;
     char s[MAX_STR];
@@ -282,6 +414,23 @@ void dump_lsp(float lsp[]) {
     fprintf(flsp,"\n");    
 }
 
+void dump_lsp_(float lsp_[]) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (flsp_ == NULL) {
+       sprintf(s,"%s_lsp_.txt", prefix);
+       flsp_ = fopen(s, "wt");
+       assert(flsp_ != NULL);
+    }
+
+    for(i=0; i<10; i++)
+       fprintf(flsp_,"%f\t",lsp_[i]);
+    fprintf(flsp_,"\n");    
+}
+
 void dump_ak(float ak[], int order) {
     int i;
     char s[MAX_STR];
@@ -299,6 +448,23 @@ void dump_ak(float ak[], int order) {
     fprintf(fak,"\n");    
 }
 
+void dump_ak_(float ak_[], int order) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (fak_ == NULL) {
+       sprintf(s,"%s_ak_.txt", prefix);
+       fak_ = fopen(s, "wt");
+       assert(fak_ != NULL);
+    }
+
+    for(i=0; i<=order; i++)
+       fprintf(fak_,"%f\t",ak_[i]);
+    fprintf(fak_,"\n");    
+}
+
 void dump_Fw(COMP Fw[]) {
     int i;
     char s[MAX_STR];
@@ -400,3 +566,22 @@ void dump_E(float E) {
 
     fprintf(fE,"%f\n", 10.0*log10(E));
 }
+
+void dump_Rk(float Rk[]) {
+    int i;
+    char s[MAX_STR];
+
+    if (!dumpon) return;
+
+    if (frk == NULL) {
+       sprintf(s,"%s_rk.txt", prefix);
+       frk = fopen(s, "wt");
+       assert(frk != NULL);
+    }
+
+    for(i=0; i<P_MAX; i++)
+       fprintf(frk,"%f\t",Rk[i]);
+    fprintf(frk,"\n");    
+}
+
+#endif
index 8f402251f849917153c1ef23b76b09f1a30ecb71..a8ccbc4cf4bf3650620ebd4c2dfbb7a902b6ea2b 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __DUMP__
 #define __DUMP__
 
+#include "comp.h"
+
 void dump_on(char filename_prefix[]);
 void dump_off();
 
 void dump_Sn(float Sn[]);
 void dump_Sw(COMP Sw[]);
 void dump_Sw_(COMP Sw_[]);
+void dump_Ew(COMP Ew[]);
 
 /* amplitude modelling */
 
 void dump_model(MODEL *m);
 void dump_quantised_model(MODEL *m);
+void dump_Pwn(COMP Pw[]);
 void dump_Pw(COMP Pw[]);
+void dump_Rw(float Rw[]);
 void dump_lsp(float lsp[]);
+void dump_weights(float w[], int ndim);
+void dump_lsp_(float lsp_[]);
 void dump_ak(float ak[], int order);
+void dump_ak_(float ak[], int order);
 void dump_E(float E);
+void dump_lpc_snr(float snr);
 
 /* phase modelling */
 
 void dump_snr(float snr);
 void dump_phase(float phase[], int L);
 void dump_phase_(float phase[], int L);
+void dump_hephase(int ind[], int dim);
 
 /* NLP states */
 
@@ -55,6 +64,7 @@ void dump_sq(float sq[]);
 void dump_dec(COMP Fw[]);
 void dump_Fw(COMP Fw[]);
 void dump_e(float e_hz[]);
+void dump_Rk(float Rk[]);
 
 /* post filter */
 
diff --git a/libs/libcodec2/src/fdmdv.c b/libs/libcodec2/src/fdmdv.c
new file mode 100644 (file)
index 0000000..a6204f4
--- /dev/null
@@ -0,0 +1,1500 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv.c
+  AUTHOR......: David Rowe
+  DATE CREATED: April 14 2012
+                                                                             
+  Functions that implement the FDMDV modem.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+                               INCLUDES
+
+\*---------------------------------------------------------------------------*/
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include "fdmdv_internal.h"
+#include "fdmdv.h"
+#include "rn.h"
+#include "test_bits.h"
+#include "pilot_coeff.h"
+#include "kiss_fft.h"
+#include "hanning.h"
+#include "os.h"
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+                               FUNCTIONS
+
+\*---------------------------------------------------------------------------*/
+
+static COMP cneg(COMP a)
+{
+    COMP res;
+
+    res.real = -a.real;
+    res.imag = -a.imag;
+
+    return res;
+}
+
+static COMP cconj(COMP a)
+{
+    COMP res;
+
+    res.real = a.real;
+    res.imag = -a.imag;
+
+    return res;
+}
+
+static COMP cmult(COMP a, COMP b)
+{
+    COMP res;
+
+    res.real = a.real*b.real - a.imag*b.imag;
+    res.imag = a.real*b.imag + a.imag*b.real;
+
+    return res;
+}
+
+static COMP fcmult(float a, COMP b)
+{
+    COMP res;
+
+    res.real = a*b.real;
+    res.imag = a*b.imag;
+
+    return res;
+}
+
+static COMP cadd(COMP a, COMP b)
+{
+    COMP res;
+
+    res.real = a.real + b.real;
+    res.imag = a.imag + b.imag;
+
+    return res;
+}
+
+static float cabsolute(COMP a)
+{
+    return sqrt(pow(a.real, 2.0) + pow(a.imag, 2.0));
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_create        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 16/4/2012 
+
+  Create and initialise an instance of the modem.  Returns a pointer
+  to the modem states or NULL on failure.  One set of states is
+  sufficient for a full duplex modem.
+
+\*---------------------------------------------------------------------------*/
+
+struct FDMDV * CODEC2_WIN32SUPPORT fdmdv_create(void)
+{
+    struct FDMDV *f;
+    int           c, i, k;
+    float         carrier_freq;
+
+    assert(FDMDV_BITS_PER_FRAME == NC*NB);
+    assert(FDMDV_NOM_SAMPLES_PER_FRAME == M);
+    assert(FDMDV_MAX_SAMPLES_PER_FRAME == (M+M/P));
+
+    f = (struct FDMDV*)malloc(sizeof(struct FDMDV));
+    if (f == NULL)
+       return NULL;
+    
+    f->current_test_bit = 0;
+    for(i=0; i<NTEST_BITS; i++)
+       f->rx_test_bits_mem[i] = 0;
+
+    f->tx_pilot_bit = 0;
+
+    for(c=0; c<NC+1; c++) {
+       f->prev_tx_symbols[c].real = 1.0;
+       f->prev_tx_symbols[c].imag = 0.0;
+       f->prev_rx_symbols[c].real = 1.0;
+       f->prev_rx_symbols[c].imag = 0.0;
+
+       for(k=0; k<NSYM; k++) {
+           f->tx_filter_memory[c][k].real = 0.0;
+           f->tx_filter_memory[c][k].imag = 0.0;
+       }
+
+       for(k=0; k<NFILTER; k++) {
+           f->rx_filter_memory[c][k].real = 0.0;
+           f->rx_filter_memory[c][k].imag = 0.0;
+       }
+
+       /* Spread initial FDM carrier phase out as far as possible.
+           This helped PAPR for a few dB.  We don't need to adjust rx
+           phase as DQPSK takes care of that. */
+       
+       f->phase_tx[c].real = cos(2.0*PI*c/(NC+1));
+       f->phase_tx[c].imag = sin(2.0*PI*c/(NC+1));
+
+       f->phase_rx[c].real = 1.0;
+       f->phase_rx[c].imag = 0.0;
+
+       for(k=0; k<NT*P; k++) {
+           f->rx_filter_mem_timing[c][k].real = 0.0;
+           f->rx_filter_mem_timing[c][k].imag = 0.0;
+       }
+       for(k=0; k<NFILTERTIMING; k++) {
+           f->rx_baseband_mem_timing[c][k].real = 0.0;
+           f->rx_baseband_mem_timing[c][k].imag = 0.0;
+       }
+  }
+    
+    /* Set up frequency of each carrier */
+
+    for(c=0; c<NC/2; c++) {
+       carrier_freq = (-NC/2 + c)*FSEP + FDMDV_FCENTRE;
+       f->freq[c].real = cos(2.0*PI*carrier_freq/FS);
+       f->freq[c].imag = sin(2.0*PI*carrier_freq/FS);
+    }
+
+    for(c=NC/2; c<NC; c++) {
+       carrier_freq = (-NC/2 + c + 1)*FSEP + FDMDV_FCENTRE;
+       f->freq[c].real = cos(2.0*PI*carrier_freq/FS);
+       f->freq[c].imag = sin(2.0*PI*carrier_freq/FS);
+    }
+       
+    f->freq[NC].real = cos(2.0*PI*FDMDV_FCENTRE/FS);
+    f->freq[NC].imag = sin(2.0*PI*FDMDV_FCENTRE/FS);
+
+    /* Generate DBPSK pilot Look Up Table (LUT) */
+
+    generate_pilot_lut(f->pilot_lut, &f->freq[NC]);
+
+    /* freq Offset estimation states */
+
+    f->fft_pilot_cfg = kiss_fft_alloc (MPILOTFFT, 0, NULL, NULL);
+    assert(f->fft_pilot_cfg != NULL);
+
+    for(i=0; i<NPILOTBASEBAND; i++) {
+       f->pilot_baseband1[i].real = f->pilot_baseband2[i].real = 0.0;
+       f->pilot_baseband1[i].imag = f->pilot_baseband2[i].imag = 0.0;
+    }
+    f->pilot_lut_index = 0;
+    f->prev_pilot_lut_index = 3*M;
+    
+    for(i=0; i<NPILOTLPF; i++) {
+       f->pilot_lpf1[i].real = f->pilot_lpf2[i].real = 0.0;
+       f->pilot_lpf1[i].imag = f->pilot_lpf2[i].imag = 0.0;
+    }
+
+    f->foff = 0.0;
+    f->foff_rect.real = 1.0;
+    f->foff_rect.imag = 0.0;
+    f->foff_phase_rect.real = 1.0;
+    f->foff_phase_rect.imag = 0.0;
+
+    f->fest_state = 0;
+    f->coarse_fine = COARSE;
+    for(c=0; c<NC+1; c++) {
+       f->sig_est[c] = 0.0;
+       f->noise_est[c] = 0.0;
+    }
+
+    for(i=0; i<2*FDMDV_NSPEC; i++)
+       f->fft_buf[i] = 0.0;
+    f->fft_cfg = kiss_fft_alloc (2*FDMDV_NSPEC, 0, NULL, NULL);
+    assert(f->fft_cfg != NULL);
+
+
+    return f;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_destroy       
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 16/4/2012
+
+  Destroy an instance of the modem.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_destroy(struct FDMDV *fdmdv)
+{
+    assert(fdmdv != NULL);
+    KISS_FFT_FREE(fdmdv->fft_pilot_cfg);
+    KISS_FFT_FREE(fdmdv->fft_cfg);
+    free(fdmdv);
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_get_test_bits()       
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 16/4/2012
+
+  Generate a frame of bits from a repeating sequence of random data.  OK so
+  it's not very random if it repeats but it makes syncing at the demod easier
+  for test purposes.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_get_test_bits(struct FDMDV *f, int tx_bits[])
+{
+    int i;
+
+    for(i=0; i<FDMDV_BITS_PER_FRAME; i++) {
+       tx_bits[i] = test_bits[f->current_test_bit];
+       f->current_test_bit++;
+       if (f->current_test_bit > (NTEST_BITS-1))
+           f->current_test_bit = 0;
+    }
+ }
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: bits_to_dqpsk_symbols()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 16/4/2012
+
+  Maps bits to parallel DQPSK symbols. Generate Nc+1 QPSK symbols from
+  vector of (1,Nc*Nb) input tx_bits.  The Nc+1 symbol is the +1 -1 +1
+  .... BPSK sync carrier.
+
+\*---------------------------------------------------------------------------*/
+
+void bits_to_dqpsk_symbols(COMP tx_symbols[], COMP prev_tx_symbols[], int tx_bits[], int *pilot_bit)
+{
+    int c, msb, lsb;
+    COMP j = {0.0,1.0};
+
+    /* map tx_bits to to Nc DQPSK symbols */
+
+    for(c=0; c<NC; c++) {
+       msb = tx_bits[2*c]; 
+       lsb = tx_bits[2*c+1];
+       if ((msb == 0) && (lsb == 0))
+           tx_symbols[c] = prev_tx_symbols[c];
+       if ((msb == 0) && (lsb == 1))
+           tx_symbols[c] = cmult(j, prev_tx_symbols[c]);
+       if ((msb == 1) && (lsb == 0))
+           tx_symbols[c] = cneg(prev_tx_symbols[c]);
+       if ((msb == 1) && (lsb == 1))
+           tx_symbols[c] = cmult(cneg(j),prev_tx_symbols[c]);
+    }
+
+    /* +1 -1 +1 -1 BPSK sync carrier, once filtered becomes (roughly)
+       two spectral lines at +/- Rs/2 */
+    if (*pilot_bit)
+       tx_symbols[NC] = cneg(prev_tx_symbols[NC]);
+    else
+       tx_symbols[NC] = prev_tx_symbols[NC];
+
+    if (*pilot_bit) 
+       *pilot_bit = 0;
+    else
+       *pilot_bit = 1;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: tx_filter()         
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 17/4/2012
+
+  Given NC*NB bits construct M samples (1 symbol) of NC+1 filtered
+  symbols streams.
+
+\*---------------------------------------------------------------------------*/
+
+void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memory[NC+1][NSYM])
+{
+    int     c;
+    int     i,j,k;
+    float   acc;
+    COMP    gain;
+
+    gain.real = sqrt(2.0)/2.0;
+    gain.imag = 0.0;
+    
+    /*
+    for(c=0; c<NC+1; c++)
+       tx_filter_memory[c][NFILTER-1] = cmult(tx_symbols[c], gain);
+    */
+    for(c=0; c<NC+1; c++)
+       tx_filter_memory[c][NSYM-1] = cmult(tx_symbols[c], gain);
+    
+
+    /* 
+       tx filter each symbol, generate M filtered output samples for each symbol.
+       Efficient polyphase filter techniques used as tx_filter_memory is sparse
+    */
+
+    for(i=0; i<M; i++) {
+       for(c=0; c<NC+1; c++) {
+
+           /* filter real sample of symbol for carrier c */
+
+           acc = 0.0;
+           for(j=0,k=M-i-1; j<NSYM; j++,k+=M)
+               acc += M * tx_filter_memory[c][j].real * gt_alpha5_root[k];
+           tx_baseband[c][i].real = acc;       
+
+           /* filter imag sample of symbol for carrier c */
+
+           acc = 0.0;
+           for(j=0,k=M-i-1; j<NSYM; j++,k+=M)
+               acc += M * tx_filter_memory[c][j].imag * gt_alpha5_root[k];
+           tx_baseband[c][i].imag = acc;
+
+       }
+    }
+
+    /* shift memory, inserting zeros at end */
+
+    for(i=0; i<NSYM-1; i++)
+       for(c=0; c<NC+1; c++)
+           tx_filter_memory[c][i] = tx_filter_memory[c][i+1];
+
+    for(c=0; c<NC+1; c++) {
+       tx_filter_memory[c][NSYM-1].real = 0.0;
+       tx_filter_memory[c][NSYM-1].imag = 0.0;
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdm_upconvert()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 17/4/2012
+
+  Construct FDM signal by frequency shifting each filtered symbol
+  stream.  Returns complex signal so we can apply frequency offsets
+  easily.
+
+\*---------------------------------------------------------------------------*/
+
+void fdm_upconvert(COMP tx_fdm[], COMP tx_baseband[NC+1][M], COMP phase_tx[], COMP freq[])
+{
+    int  i,c;
+    COMP two = {2.0, 0.0};
+    COMP pilot;
+
+    for(i=0; i<M; i++) {
+       tx_fdm[i].real = 0.0;
+       tx_fdm[i].imag = 0.0;
+    }
+
+    /* Nc/2 tones below centre freq */
+  
+    for (c=0; c<NC/2; c++) 
+       for (i=0; i<M; i++) {
+           phase_tx[c] = cmult(phase_tx[c], freq[c]);
+           tx_fdm[i] = cadd(tx_fdm[i], cmult(tx_baseband[c][i], phase_tx[c]));
+       }
+
+    /* Nc/2 tones above centre freq */
+
+    for (c=NC/2; c<NC; c++) 
+       for (i=0; i<M; i++) {
+           phase_tx[c] = cmult(phase_tx[c], freq[c]);
+           tx_fdm[i] = cadd(tx_fdm[i], cmult(tx_baseband[c][i], phase_tx[c]));
+       }
+
+    /* add centre pilot tone  */
+
+    c = NC;
+    for (i=0; i<M; i++) {
+       phase_tx[c] = cmult(phase_tx[c],  freq[c]);
+       pilot = cmult(cmult(two, tx_baseband[c][i]), phase_tx[c]);
+       tx_fdm[i] = cadd(tx_fdm[i], pilot);
+    }
+
+    /*
+      Scale such that total Carrier power C of real(tx_fdm) = Nc.  This
+      excludes the power of the pilot tone.
+      We return the complex (single sided) signal to make frequency
+      shifting for the purpose of testing easier
+    */
+
+    for (i=0; i<M; i++) 
+       tx_fdm[i] = cmult(two, tx_fdm[i]);
+
+    /* normalise digital oscilators as the magnitude can drfift over time */
+
+    for (c=0; c<NC+1; c++) {
+       phase_tx[c].real /= cabsolute(phase_tx[c]);     
+       phase_tx[c].imag /= cabsolute(phase_tx[c]);     
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_mod()         
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 26/4/2012
+
+  FDMDV modulator, take a frame of FDMDV_BITS_PER_FRAME bits and
+  generates a frame of FDMDV_SAMPLES_PER_FRAME modulated symbols.
+  Sync bit is returned to aid alignment of your next frame.  
+
+  The sync_bit value returned will be used for the _next_ frame.
+
+  The output signal is complex to support single sided frequency
+  shifting, for example when testing frequency offsets in channel
+  simulation.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_mod(struct FDMDV *fdmdv, COMP tx_fdm[], 
+                                  int tx_bits[], int *sync_bit)
+{
+    COMP          tx_symbols[NC+1];
+    COMP          tx_baseband[NC+1][M];
+
+    bits_to_dqpsk_symbols(tx_symbols, fdmdv->prev_tx_symbols, tx_bits, &fdmdv->tx_pilot_bit);
+    memcpy(fdmdv->prev_tx_symbols, tx_symbols, sizeof(COMP)*(NC+1));
+    tx_filter(tx_baseband, tx_symbols, fdmdv->tx_filter_memory);
+    fdm_upconvert(tx_fdm, tx_baseband, fdmdv->phase_tx, fdmdv->freq);
+
+    *sync_bit = fdmdv->tx_pilot_bit;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: generate_pilot_fdm()        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 19/4/2012
+
+  Generate M samples of DBPSK pilot signal for Freq offset estimation.
+
+\*---------------------------------------------------------------------------*/
+
+void generate_pilot_fdm(COMP *pilot_fdm, int *bit, float *symbol, 
+                       float *filter_mem, COMP *phase, COMP *freq)
+{
+    int   i,j,k;
+    float tx_baseband[M];
+
+    /* +1 -1 +1 -1 DBPSK sync carrier, once filtered becomes (roughly)
+       two spectral lines at +/- RS/2 */
+    if (*bit)
+       *symbol = -*symbol;
+    else
+       *symbol = *symbol;
+    if (*bit) 
+       *bit = 0;
+    else
+       *bit = 1;
+
+    /* filter DPSK symbol to create M baseband samples */
+
+    filter_mem[NFILTER-1] = (sqrt(2)/2) * *symbol;
+    for(i=0; i<M; i++) {
+       tx_baseband[i] = 0.0; 
+       for(j=M-1,k=M-i-1; j<NFILTER; j+=M,k+=M)
+           tx_baseband[i] += M * filter_mem[j] * gt_alpha5_root[k];
+    }
+
+    /* shift memory, inserting zeros at end */
+
+    for(i=0; i<NFILTER-M; i++)
+       filter_mem[i] = filter_mem[i+M];
+
+    for(i=NFILTER-M; i<NFILTER; i++)
+       filter_mem[i] = 0.0;
+
+    /* upconvert */
+
+    for(i=0; i<M; i++) {
+       *phase = cmult(*phase, *freq);
+       pilot_fdm[i].real = sqrt(2)*2*tx_baseband[i] * phase->real;
+       pilot_fdm[i].imag = sqrt(2)*2*tx_baseband[i] * phase->imag;
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: generate_pilot_lut()        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 19/4/2012
+
+  Generate a 4M sample vector of DBPSK pilot signal.  As the pilot signal
+  is periodic in 4M samples we can then use this vector as a look up table
+  for pilot signal generation in the demod.
+
+\*---------------------------------------------------------------------------*/
+
+void generate_pilot_lut(COMP pilot_lut[], COMP *pilot_freq)
+{
+    int   pilot_rx_bit = 0;
+    float pilot_symbol = sqrt(2.0);
+    COMP  pilot_phase  = {1.0, 0.0};
+    float pilot_filter_mem[NFILTER];
+    COMP  pilot[M];
+    int   i,f;
+
+    for(i=0; i<NFILTER; i++)
+       pilot_filter_mem[i] = 0.0;
+
+    /* discard first 4 symbols as filter memory is filling, just keep
+       last four symbols */
+
+    for(f=0; f<8; f++) {
+       generate_pilot_fdm(pilot, &pilot_rx_bit, &pilot_symbol, pilot_filter_mem, &pilot_phase, pilot_freq);
+       if (f >= 4)
+           memcpy(&pilot_lut[M*(f-4)], pilot, M*sizeof(COMP));
+    }
+
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: lpf_peak_pick()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 20/4/2012
+
+  LPF and peak pick part of freq est, put in a function as we call it twice.
+
+\*---------------------------------------------------------------------------*/
+
+void lpf_peak_pick(float *foff, float *max, COMP pilot_baseband[], 
+                  COMP pilot_lpf[], kiss_fft_cfg fft_pilot_cfg, COMP S[], int nin)
+{
+    int   i,j,k;
+    int   mpilot;
+    COMP  s[MPILOTFFT];
+    float mag, imax;
+    int   ix;
+    float r;
+
+    /* LPF cutoff 200Hz, so we can handle max +/- 200 Hz freq offset */
+
+    for(i=0; i<NPILOTLPF-nin; i++)
+       pilot_lpf[i] = pilot_lpf[nin+i];
+    for(i=NPILOTLPF-nin, j=0; i<NPILOTLPF; i++,j++) {
+       pilot_lpf[i].real = 0.0; pilot_lpf[i].imag = 0.0;
+       for(k=0; k<NPILOTCOEFF; k++)
+           pilot_lpf[i] = cadd(pilot_lpf[i], fcmult(pilot_coeff[k], pilot_baseband[j+k]));
+    }
+
+    /* decimate to improve DFT resolution, window and DFT */
+
+    mpilot = FS/(2*200);  /* calc decimation rate given new sample rate is twice LPF freq */
+    for(i=0; i<MPILOTFFT; i++) {
+       s[i].real = 0.0; s[i].imag = 0.0;
+    }
+    for(i=0,j=0; i<NPILOTLPF; i+=mpilot,j++) {
+       s[j] = fcmult(hanning[i], pilot_lpf[i]); 
+    }
+
+    kiss_fft(fft_pilot_cfg, (kiss_fft_cpx *)s, (kiss_fft_cpx *)S);
+
+    /* peak pick and convert to Hz */
+
+    imax = 0.0;
+    ix = 0;
+    for(i=0; i<MPILOTFFT; i++) {
+       mag = S[i].real*S[i].real + S[i].imag*S[i].imag;
+       if (mag > imax) {
+           imax = mag;
+           ix = i;
+       }
+    }
+    r = 2.0*200.0/MPILOTFFT;     /* maps FFT bin to frequency in Hz */
+  
+    if (ix >= MPILOTFFT/2)
+       *foff = (ix - MPILOTFFT)*r;
+    else
+       *foff = (ix)*r;
+    *max = imax;
+
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: rx_est_freq_offset()        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 19/4/2012
+
+  Estimate frequency offset of FDM signal using BPSK pilot.  Note that
+  this algorithm is quite sensitive to pilot tone level wrt other
+  carriers, so test variations to the pilot amplitude carefully.
+
+\*---------------------------------------------------------------------------*/
+
+float rx_est_freq_offset(struct FDMDV *f, COMP rx_fdm[], int nin)
+{
+    int  i,j;
+    COMP pilot[M+M/P];
+    COMP prev_pilot[M+M/P];
+    float foff, foff1, foff2;
+    float   max1, max2;
+
+    assert(nin <= M+M/P);
+
+    /* get pilot samples used for correlation/down conversion of rx signal */
+
+    for (i=0; i<nin; i++) {
+       pilot[i] = f->pilot_lut[f->pilot_lut_index];
+       f->pilot_lut_index++;
+       if (f->pilot_lut_index >= 4*M)
+           f->pilot_lut_index = 0;
+       
+       prev_pilot[i] = f->pilot_lut[f->prev_pilot_lut_index];
+       f->prev_pilot_lut_index++;
+       if (f->prev_pilot_lut_index >= 4*M)
+           f->prev_pilot_lut_index = 0;
+    }
+
+    /*
+      Down convert latest M samples of pilot by multiplying by ideal
+      BPSK pilot signal we have generated locally.  The peak of the
+      resulting signal is sensitive to the time shift between the
+      received and local version of the pilot, so we do it twice at
+      different time shifts and choose the maximum.
+    */
+
+    for(i=0; i<NPILOTBASEBAND-nin; i++) {
+       f->pilot_baseband1[i] = f->pilot_baseband1[i+nin];
+       f->pilot_baseband2[i] = f->pilot_baseband2[i+nin];
+    }
+
+    for(i=0,j=NPILOTBASEBAND-nin; i<nin; i++,j++) {
+               f->pilot_baseband1[j] = cmult(rx_fdm[i], cconj(pilot[i]));
+       f->pilot_baseband2[j] = cmult(rx_fdm[i], cconj(prev_pilot[i]));
+    }
+
+    lpf_peak_pick(&foff1, &max1, f->pilot_baseband1, f->pilot_lpf1, f->fft_pilot_cfg, f->S1, nin);
+    lpf_peak_pick(&foff2, &max2, f->pilot_baseband2, f->pilot_lpf2, f->fft_pilot_cfg, f->S2, nin);
+
+    if (max1 > max2)
+       foff = foff1;
+    else
+       foff = foff2;
+       
+    return foff;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_freq_shift()          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 26/4/2012
+
+  Frequency shift modem signal.  The use of complex input and output allows
+  single sided frequency shifting (no images).
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_freq_shift(COMP rx_fdm_fcorr[], COMP rx_fdm[], float foff, 
+                                          COMP *foff_rect, COMP *foff_phase_rect, int nin)
+{
+    int   i;
+
+    foff_rect->real = cos(2.0*PI*foff/FS);
+    foff_rect->imag = sin(2.0*PI*foff/FS);
+    for(i=0; i<nin; i++) {
+       *foff_phase_rect = cmult(*foff_phase_rect, *foff_rect);
+       rx_fdm_fcorr[i] = cmult(rx_fdm[i], *foff_phase_rect);
+    }
+
+    /* normalise digital oscilator as the magnitude can drfift over time */
+
+    foff_phase_rect->real /= cabsolute(*foff_phase_rect);       
+    foff_phase_rect->imag /= cabsolute(*foff_phase_rect);       
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdm_downconvert()           
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 22/4/2012
+
+  Frequency shift each modem carrier down to Nc+1 baseband signals.
+
+\*---------------------------------------------------------------------------*/
+
+void fdm_downconvert(COMP rx_baseband[NC+1][M+M/P], COMP rx_fdm[], COMP phase_rx[], COMP freq[], int nin)
+{
+    int  i,c;
+
+    /* maximum number of input samples to demod */
+
+    assert(nin <= (M+M/P));
+
+    /* Nc/2 tones below centre freq */
+  
+    for (c=0; c<NC/2; c++) 
+       for (i=0; i<nin; i++) {
+           phase_rx[c] = cmult(phase_rx[c], freq[c]);
+           rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));
+       }
+
+    /* Nc/2 tones above centre freq */
+
+    for (c=NC/2; c<NC; c++) 
+       for (i=0; i<nin; i++) {
+           phase_rx[c] = cmult(phase_rx[c], freq[c]);
+           rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));
+       }
+
+    /* centre pilot tone  */
+
+    c = NC;
+    for (i=0; i<nin; i++) {
+       phase_rx[c] = cmult(phase_rx[c],  freq[c]);
+       rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));
+    }
+
+    /* normalise digital oscilators as the magnitude can drfift over time */
+
+    for (c=0; c<NC+1; c++) {
+       phase_rx[c].real /= cabsolute(phase_rx[c]);       
+       phase_rx[c].imag /= cabsolute(phase_rx[c]);       
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: rx_filter()         
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 22/4/2012
+
+  Receive filter each baseband signal at oversample rate P.  Filtering at
+  rate P lowers CPU compared to rate M.
+
+  Depending on the number of input samples to the demod nin, we
+  produce P-1, P (usually), or P+1 filtered samples at rate P.  nin is
+  occasionally adjusted to compensate for timing slips due to
+  different tx and rx sample clocks.
+
+\*---------------------------------------------------------------------------*/
+
+void rx_filter(COMP rx_filt[NC+1][P+1], COMP rx_baseband[NC+1][M+M/P], COMP rx_filter_memory[NC+1][NFILTER], int nin)
+{
+    int c, i,j,k,l;
+    int n=M/P;
+
+    /* rx filter each symbol, generate P filtered output samples for
+       each symbol.  Note we keep filter memory at rate M, it's just
+       the filter output at rate P */
+
+    for(i=0, j=0; i<nin; i+=n,j++) {
+
+       /* latest input sample */
+       
+       for(c=0; c<NC+1; c++)
+           for(k=NFILTER-n,l=i; k<NFILTER; k++,l++)    
+               rx_filter_memory[c][k] = rx_baseband[c][l];
+       
+       /* convolution (filtering) */
+
+       for(c=0; c<NC+1; c++) {
+           rx_filt[c][j].real = 0.0; rx_filt[c][j].imag = 0.0;
+           for(k=0; k<NFILTER; k++) 
+               rx_filt[c][j] = cadd(rx_filt[c][j], fcmult(gt_alpha5_root[k], rx_filter_memory[c][k]));
+       }
+
+       /* make room for next input sample */
+       
+       for(c=0; c<NC+1; c++)
+           for(k=0,l=n; k<NFILTER-n; k++,l++)  
+               rx_filter_memory[c][k] = rx_filter_memory[c][l];
+    }
+
+    assert(j <= (P+1)); /* check for any over runs */
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: rx_est_timing()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 23/4/2012
+
+  Estimate optimum timing offset, re-filter receive symbols at optimum
+  timing estimate.
+
+\*---------------------------------------------------------------------------*/
+
+float rx_est_timing(COMP rx_symbols[], 
+                   COMP rx_filt[NC+1][P+1], 
+                   COMP rx_baseband[NC+1][M+M/P], 
+                   COMP rx_filter_mem_timing[NC+1][NT*P], 
+                   float env[],
+                   COMP rx_baseband_mem_timing[NC+1][NFILTERTIMING], 
+                   int nin)     
+{
+    int   c,i,j,k;
+    int   adjust, s;
+    COMP  x, phase, freq;
+    float rx_timing;
+
+    /*
+      nin  adjust 
+      --------------------------------
+      120  -1 (one less rate P sample)
+      160   0 (nominal)
+      200   1 (one more rate P sample)
+    */
+
+    adjust = P - nin*P/M;
+    
+    /* update buffer of NT rate P filtered symbols */
+    
+    for(c=0; c<NC+1; c++) 
+       for(i=0,j=P-adjust; i<(NT-1)*P+adjust; i++,j++)
+           rx_filter_mem_timing[c][i] = rx_filter_mem_timing[c][j];
+    for(c=0; c<NC+1; c++) 
+       for(i=(NT-1)*P+adjust,j=0; i<NT*P; i++,j++)
+           rx_filter_mem_timing[c][i] = rx_filt[c][j];
+           
+    /* sum envelopes of all carriers */
+
+    for(i=0; i<NT*P; i++) {
+       env[i] = 0.0;
+       for(c=0; c<NC+1; c++)
+           env[i] += cabsolute(rx_filter_mem_timing[c][i]);
+    }
+
+    /* The envelope has a frequency component at the symbol rate.  The
+       phase of this frequency component indicates the timing.  So work
+       out single DFT at frequency 2*pi/P */
+
+    x.real = 0.0; x.imag = 0.0;
+    freq.real = cos(2*PI/P);
+    freq.imag = sin(2*PI/P);
+    phase.real = 1.0;
+    phase.imag = 0.0;
+
+    for(i=0; i<NT*P; i++) {
+       x = cadd(x, fcmult(env[i], phase));
+       phase = cmult(phase, freq);
+    }
+
+    /* Map phase to estimated optimum timing instant at rate M.  The
+       M/4 part was adjusted by experiment, I know not why.... */
+    
+    rx_timing = atan2(x.imag, x.real)*M/(2*PI) + M/4;
+    
+    if (rx_timing > M)
+       rx_timing -= M;
+    if (rx_timing < -M)
+       rx_timing += M;
+   
+    /* rx_filt_mem_timing contains M + Nfilter + M samples of the
+       baseband signal at rate M this enables us to resample the
+       filtered rx symbol with M sample precision once we have
+       rx_timing */
+
+    for(c=0; c<NC+1; c++) 
+       for(i=0,j=nin; i<NFILTERTIMING-nin; i++,j++)
+           rx_baseband_mem_timing[c][i] = rx_baseband_mem_timing[c][j];
+    for(c=0; c<NC+1; c++) 
+       for(i=NFILTERTIMING-nin,j=0; i<NFILTERTIMING; i++,j++)
+           rx_baseband_mem_timing[c][i] = rx_baseband[c][j];
+    
+    /* rx filter to get symbol for each carrier at estimated optimum
+       timing instant.  We use rate M filter memory to get fine timing
+       resolution. */
+
+    s = round(rx_timing) + M;
+    for(c=0; c<NC+1; c++) {
+       rx_symbols[c].real = 0.0;
+       rx_symbols[c].imag = 0.0;
+       for(k=s,j=0; k<s+NFILTER; k++,j++)
+           rx_symbols[c] = cadd(rx_symbols[c], fcmult(gt_alpha5_root[j], rx_baseband_mem_timing[c][k]));
+    }
+       
+    return rx_timing;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: qpsk_to_bits()      
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 24/4/2012
+
+  Convert DQPSK symbols back to an array of bits, extracts sync bit
+  from DBPSK pilot, and also uses pilot to estimate fine frequency
+  error.
+
+\*---------------------------------------------------------------------------*/
+
+float qpsk_to_bits(int rx_bits[], int *sync_bit, COMP phase_difference[], COMP prev_rx_symbols[], COMP rx_symbols[])
+{
+    int   c;
+    COMP  pi_on_4;
+    COMP  d;
+    int   msb=0, lsb=0;
+    float ferr;
+
+    pi_on_4.real = cos(PI/4.0);
+    pi_on_4.imag = sin(PI/4.0);
+
+    /* Extra 45 degree clockwise lets us use real and imag axis as
+       decision boundaries */
+
+    for(c=0; c<NC; c++)
+       phase_difference[c] = cmult(cmult(rx_symbols[c], cconj(prev_rx_symbols[c])), pi_on_4);
+                                   
+    /* map (Nc,1) DQPSK symbols back into an (1,Nc*Nb) array of bits */
+
+    for (c=0; c<NC; c++) {
+      d = phase_difference[c];
+      if ((d.real >= 0) && (d.imag >= 0)) {
+         msb = 0; lsb = 0;
+      }
+      if ((d.real < 0) && (d.imag >= 0)) {
+         msb = 0; lsb = 1;
+      }
+      if ((d.real < 0) && (d.imag < 0)) {
+         msb = 1; lsb = 0;
+      }
+      if ((d.real >= 0) && (d.imag < 0)) {
+         msb = 1; lsb = 1;
+      }
+      rx_bits[2*c] = msb;
+      rx_bits[2*c+1] = lsb;
+    }
+    /* Extract DBPSK encoded Sync bit and fine freq offset estimate */
+
+    phase_difference[NC] = cmult(rx_symbols[NC], cconj(prev_rx_symbols[NC]));
+    if (phase_difference[NC].real < 0) {
+      *sync_bit = 1;
+      ferr = phase_difference[NC].imag;
+    }
+    else {
+      *sync_bit = 0;
+      ferr = -phase_difference[NC].imag;
+    }
+    
+    /* pilot carrier gets an extra pi/4 rotation to make it consistent
+       with other carriers, as we need it for snr_update and scatter
+       diagram */
+
+    phase_difference[NC] = cmult(phase_difference[NC], pi_on_4);
+
+    return ferr;
+}
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: snr_update()        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 17 May 2012
+
+  Given phase differences update estimates of signal and noise levels.
+
+\*---------------------------------------------------------------------------*/
+
+void snr_update(float sig_est[], float noise_est[], COMP phase_difference[])
+{
+    float s[NC+1];
+    COMP  refl_symbols[NC+1];
+    float n[NC+1];
+    COMP  pi_on_4;
+    int   c;
+
+    pi_on_4.real = cos(PI/4.0);
+    pi_on_4.imag = sin(PI/4.0);
+
+    /* mag of each symbol is distance from origin, this gives us a
+       vector of mags, one for each carrier. */
+
+    for(c=0; c<NC+1; c++)
+       s[c] = cabsolute(phase_difference[c]);
+
+    /* signal mag estimate for each carrier is a smoothed version of
+       instantaneous magntitude, this gives us a vector of smoothed
+       mag estimates, one for each carrier. */
+
+    for(c=0; c<NC+1; c++)
+       sig_est[c] = SNR_COEFF*sig_est[c] + (1.0 - SNR_COEFF)*s[c];
+
+    /* noise mag estimate is distance of current symbol from average
+       location of that symbol.  We reflect all symbols into the first
+       quadrant for convenience. */
+    
+    for(c=0; c<NC+1; c++) {
+       refl_symbols[c].real = fabs(phase_difference[c].real);
+       refl_symbols[c].imag = fabs(phase_difference[c].imag);    
+       n[c] = cabsolute(cadd(fcmult(sig_est[c], pi_on_4), cneg(refl_symbols[c])));
+    }
+     
+    /* noise mag estimate for each carrier is a smoothed version of
+       instantaneous noise mag, this gives us a vector of smoothed
+       noise power estimates, one for each carrier. */
+
+    for(c=0; c<NC+1; c++)
+       noise_est[c] = SNR_COEFF*noise_est[c] + (1 - SNR_COEFF)*n[c];
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_put_test_bits()       
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 24/4/2012
+
+  Accepts nbits from rx and attempts to sync with test_bits sequence.
+  If sync OK measures bit errors.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_put_test_bits(struct FDMDV *f, int *sync, 
+                                            int *bit_errors, int *ntest_bits, 
+                                            int rx_bits[])
+{
+    int   i,j;
+    float ber;
+
+    /* Append to our memory */
+
+    for(i=0,j=FDMDV_BITS_PER_FRAME; i<NTEST_BITS-FDMDV_BITS_PER_FRAME; i++,j++)
+       f->rx_test_bits_mem[i] = f->rx_test_bits_mem[j];
+    for(i=NTEST_BITS-FDMDV_BITS_PER_FRAME,j=0; i<NTEST_BITS; i++,j++)
+       f->rx_test_bits_mem[i] = rx_bits[j];
+    
+    /* see how many bit errors we get when checked against test sequence */
+       
+    *bit_errors = 0;
+    for(i=0; i<NTEST_BITS; i++) {
+       *bit_errors += test_bits[i] ^ f->rx_test_bits_mem[i];
+       //printf("%d %d %d %d\n", i, test_bits[i], f->rx_test_bits_mem[i], test_bits[i] ^ f->rx_test_bits_mem[i]);
+    }
+
+    /* if less than a thresh we are aligned and in sync with test sequence */
+
+    ber = (float)*bit_errors/NTEST_BITS;
+  
+    *sync = 0;
+    if (ber < 0.2)
+       *sync = 1;
+   
+    *ntest_bits = NTEST_BITS;
+    
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: freq_state(()       
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 24/4/2012
+
+  Freq offset state machine.  Moves between coarse and fine states
+  based on BPSK pilot sequence.  Freq offset estimator occasionally
+  makes mistakes when used continuously.  So we use it until we have
+  acquired the BPSK pilot, then switch to a more robust "fine"
+  tracking algorithm.  If we lose sync we switch back to coarse mode
+  for fast re-acquisition of large frequency offsets.
+
+\*---------------------------------------------------------------------------*/
+
+int freq_state(int sync_bit, int *state)
+{
+    int next_state, coarse_fine;
+
+    /* acquire state, look for 6 symbol 010101 sequence from sync bit */
+
+    next_state = *state;
+    switch(*state) {
+    case 0:
+       if (sync_bit == 0)
+           next_state = 1;
+       break;
+    case 1:
+       if (sync_bit == 1)
+           next_state = 2;
+       else 
+           next_state = 0;
+       break;
+    case 2:
+       if (sync_bit == 0)
+           next_state = 3;
+       else 
+           next_state = 0;
+       break;
+    case 3:
+       if (sync_bit == 1)
+           next_state = 4;
+       else 
+           next_state = 0;
+       break;
+    case 4:
+       if (sync_bit == 0)
+           next_state = 5;
+       else 
+           next_state = 0;
+       break;
+    case 5:
+       if (sync_bit == 1)
+           next_state = 6;
+       else 
+           next_state = 0;
+       break;
+       
+       /* states 6 and above are track mode, make sure we keep
+          getting 0101 sync bit sequence */
+
+    case 6:
+       if (sync_bit == 0)
+           next_state = 7;
+       else 
+           next_state = 0;
+
+       break;
+    case 7:
+       if (sync_bit == 1)
+           next_state = 6;
+       else 
+           next_state = 0;
+       break;
+    }
+
+    *state = next_state;
+    if (*state >= 6)
+       coarse_fine = FINE;
+    else
+       coarse_fine = COARSE;
+    return coarse_fine;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_demod()       
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 26/4/2012
+
+  FDMDV demodulator, take an array of FDMDV_SAMPLES_PER_FRAME
+  modulated samples, returns an array of FDMDV_BITS_PER_FRAME bits,
+  plus the sync bit.  
+
+  The input signal is complex to support single sided frequcny shifting
+  before the demod input (e.g. fdmdv2 click to tune feature).
+
+  The number of input samples nin will normally be M ==
+  FDMDV_SAMPLES_PER_FRAME.  However to adjust for differences in
+  transmit and receive sample clocks nin will occasionally be M-M/P,
+  or M+M/P.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_demod(struct FDMDV *fdmdv, int rx_bits[], 
+                                    int *sync_bit, COMP rx_fdm[], int *nin)
+{
+    float         foff_coarse, foff_fine;
+    COMP          rx_fdm_fcorr[M+M/P];
+    COMP          rx_baseband[NC+1][M+M/P];
+    COMP          rx_filt[NC+1][P+1];
+    COMP          rx_symbols[NC+1];
+    float         env[NT*P];
+    /* freq offset estimation and correction */
+   
+    foff_coarse = rx_est_freq_offset(fdmdv, rx_fdm, *nin);
+    
+    if (fdmdv->coarse_fine == COARSE)
+       fdmdv->foff = foff_coarse;
+    fdmdv_freq_shift(rx_fdm_fcorr, rx_fdm, -fdmdv->foff, &fdmdv->foff_rect, &fdmdv->foff_phase_rect, *nin);
+       
+    /* baseband processing */
+
+    fdm_downconvert(rx_baseband, rx_fdm_fcorr, fdmdv->phase_rx, fdmdv->freq, *nin);
+    rx_filter(rx_filt, rx_baseband, fdmdv->rx_filter_memory, *nin);
+    fdmdv->rx_timing = rx_est_timing(rx_symbols, rx_filt, rx_baseband, fdmdv->rx_filter_mem_timing, env, fdmdv->rx_baseband_mem_timing, *nin);  
+    
+    /* Adjust number of input samples to keep timing within bounds */
+
+    *nin = M;
+
+    if (fdmdv->rx_timing > 2*M/P)
+       *nin += M/P;
+    
+    if (fdmdv->rx_timing < 0)
+       *nin -= M/P;
+    
+    foff_fine = qpsk_to_bits(rx_bits, sync_bit, fdmdv->phase_difference, fdmdv->prev_rx_symbols, rx_symbols);
+    memcpy(fdmdv->prev_rx_symbols, rx_symbols, sizeof(COMP)*(NC+1));
+    snr_update(fdmdv->sig_est, fdmdv->noise_est, fdmdv->phase_difference);
+
+    /* freq offset estimation state machine */
+
+    fdmdv->coarse_fine = freq_state(*sync_bit, &fdmdv->fest_state);
+    fdmdv->foff  -= TRACK_COEFF*foff_fine;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: calc_snr()          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 17 May 2012
+
+  Calculate current SNR estimate (3000Hz noise BW)
+
+\*---------------------------------------------------------------------------*/
+
+float calc_snr(float sig_est[], float noise_est[])
+{
+    float S, SdB;
+    float mean, N50, N50dB, N3000dB;
+    float snr_dB;
+    int   c;
+   
+    S = 0.0;
+    for(c=0; c<NC+1; c++)
+       S += pow(sig_est[c], 2.0);
+    SdB = 10.0*log10(S+1E-12);
+    
+    /* Average noise mag across all carriers and square to get an
+       average noise power.  This is an estimate of the noise power in
+       Rs = 50Hz of BW (note for raised root cosine filters Rs is the
+       noise BW of the filter) */
+
+    mean = 0.0;
+    for(c=0; c<NC+1; c++)
+       mean += noise_est[c];
+    mean /= (NC+1);
+    N50 = pow(mean, 2.0);
+    N50dB = 10.0*log10(N50+1E-12);
+
+    /* Now multiply by (3000 Hz)/(50 Hz) to find the total noise power
+       in 3000 Hz */
+
+    N3000dB = N50dB + 10.0*log10(3000.0/RS);
+
+    snr_dB = SdB - N3000dB;
+
+    return snr_dB;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_get_demod_stats()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 1 May 2012
+
+  Fills stats structure with a bunch of demod information.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_get_demod_stats(struct FDMDV *fdmdv, 
+                                              struct FDMDV_STATS *fdmdv_stats)
+{
+    int   c;
+
+    fdmdv_stats->snr_est = calc_snr(fdmdv->sig_est, fdmdv->noise_est);
+    fdmdv_stats->fest_coarse_fine = fdmdv->coarse_fine;
+    fdmdv_stats->foff = fdmdv->foff;
+    fdmdv_stats->rx_timing = fdmdv->rx_timing;
+    fdmdv_stats->clock_offset = 0.0; /* TODO - implement clock offset estimation */
+
+    assert((NC+1) == FDMDV_NSYM);
+
+    for(c=0; c<NC+1; c++) {
+       fdmdv_stats->rx_symbols[c] = fdmdv->phase_difference[c];
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_8_to_48()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 9 May 2012
+
+  Changes the sample rate of a signal from 8 to 48 kHz.  Experience
+  with PC based modems has shown that PC sound cards have a more
+  accurate sample clock when set for 48 kHz than 8 kHz.
+
+  n is the number of samples at the 8 kHz rate, there are FDMDV_OS*n samples
+  at the 48 kHz rate.  A memory of FDMDV_OS_TAPS/FDMDV_OS samples is reqd for
+  in8k[] (see t48_8.c unit test as example).
+
+  This is a classic polyphase upsampler.  We take the 8 kHz samples
+  and insert (FDMDV_OS-1) zeroes between each sample, then
+  FDMDV_OS_TAPS FIR low pass filter the signal at 4kHz.  As most of
+  the input samples are zeroes, we only need to multiply non-zero
+  input samples by filter coefficients.  The zero insertion and
+  filtering are combined in the code below and I'm too lazy to explain
+  it further right now....
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_8_to_48(float out48k[], float in8k[], int n)
+{
+    int i,j,k,l;
+
+    /* make sure n is an integer multiple of the oversampling rate, ow
+       this function breaks */
+
+    assert((n % FDMDV_OS) == 0);
+
+    for(i=0; i<n; i++) {
+       for(j=0; j<FDMDV_OS; j++) {
+           out48k[i*FDMDV_OS+j] = 0.0;
+           for(k=0,l=0; k<FDMDV_OS_TAPS; k+=FDMDV_OS,l++)
+               out48k[i*FDMDV_OS+j] += fdmdv_os_filter[k+j]*in8k[i-l];
+           out48k[i*FDMDV_OS+j] *= FDMDV_OS;
+           
+       }
+    }  
+
+    /* update filter memory */
+
+    for(i=-(FDMDV_OS_TAPS/FDMDV_OS); i<0; i++)
+       in8k[i] = in8k[i + n];
+
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_48_to_8()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 9 May 2012
+
+  Changes the sample rate of a signal from 48 to 8 kHz.
+  n is the number of samples at the 8 kHz rate, there are FDMDV_OS*n
+  samples at the 48 kHz rate.  As above however a memory of
+  FDMDV_OS_TAPS samples is reqd for in48k[] (see t48_8.c unit test as example).
+
+  Low pass filter the 48 kHz signal at 4 kHz using the same filter as
+  the upsampler, then just output every FDMDV_OS-th filtered sample.
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_48_to_8(float out8k[], float in48k[], int n)
+{
+    int i,j;
+
+    for(i=0; i<n; i++) {
+       out8k[i] = 0.0;
+       for(j=0; j<FDMDV_OS_TAPS; j++)
+           out8k[i] += fdmdv_os_filter[j]*in48k[i*FDMDV_OS-j];
+    }
+
+    /* update filter memory */
+
+    for(i=-FDMDV_OS_TAPS; i<0; i++)
+       in48k[i] = in48k[i + n*FDMDV_OS];
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: fdmdv_get_rx_spectrum()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 9 June 2012
+
+  Returns the FDMDV_NSPEC point magnitude spectrum of the rx signal in
+  dB. The spectral samples are scaled so that 0dB is the peak, a good
+  range for plotting is 0 to -40dB.
+
+  Note only the real part of the complex input signal is used at
+  present.  A complex variable is used for input for compatability
+  with the other rx signal procesing.
+
+  Successive calls can be used to build up a waterfall or spectrogram
+  plot, by mapping the received levels to colours.
+
+  The time-frequency resolution of the spectrum can be adjusted by varying
+  FDMDV_NSPEC.  Note that a 2*FDMDV_NSPEC size FFT is reqd to get
+  FDMDV_NSPEC output points. FDMDV_NSPEC must be a power of 2.
+
+  See octave/tget_spec.m for a demo real time spectral display using
+  Octave. This demo averages the output over time to get a smoother
+  display:
+
+     av = 0.9*av + 0.1*mag_dB
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_get_rx_spectrum(struct FDMDV *f, float mag_spec_dB[], 
+                                              COMP rx_fdm[], int nin) 
+{
+    int   i,j;
+    COMP  fft_in[2*FDMDV_NSPEC];
+    COMP  fft_out[2*FDMDV_NSPEC];
+    float full_scale_dB;
+
+    /* update buffer of input samples */
+
+    for(i=0; i<2*FDMDV_NSPEC-nin; i++)
+       f->fft_buf[i] = f->fft_buf[i+nin];
+    for(j=0; j<nin; j++,i++)
+       f->fft_buf[i] = rx_fdm[j].real;
+    assert(i == 2*FDMDV_NSPEC);
+
+    /* window and FFT */
+
+    for(i=0; i<2*FDMDV_NSPEC; i++) {
+       fft_in[i].real = f->fft_buf[i] * (0.5 - 0.5*cos((float)i*2.0*PI/(2*FDMDV_NSPEC)));
+       fft_in[i].imag = 0.0;
+    }
+
+    kiss_fft(f->fft_cfg, (kiss_fft_cpx *)fft_in, (kiss_fft_cpx *)fft_out);
+
+    /* FFT scales up a signal of level 1 FDMDV_NSPEC */
+
+    full_scale_dB = 20*log10(FDMDV_NSPEC);
+
+    /* scale and convert to dB */
+
+    for(i=0; i<FDMDV_NSPEC; i++) {
+       mag_spec_dB[i]  = 10.0*log10(fft_out[i].real*fft_out[i].real + fft_out[i].imag*fft_out[i].imag + 1E-12);
+       mag_spec_dB[i] -= full_scale_dB;
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  Function used during development to test if magnitude of digital
+  oscillators was drifting.  It was!
+
+\*---------------------------------------------------------------------------*/
+
+void CODEC2_WIN32SUPPORT fdmdv_dump_osc_mags(struct FDMDV *f) 
+{
+    int   i;
+
+    fprintf(stderr, "phase_tx[]:\n");
+    for(i=0; i<=NC; i++)
+       fprintf(stderr,"  %1.3f", cabsolute(f->phase_tx[i]));
+    fprintf(stderr,"\nfreq[]:\n");
+    for(i=0; i<=NC; i++)
+       fprintf(stderr,"  %1.3f", cabsolute(f->freq[i]));
+    fprintf(stderr,"\nfoff_rect %1.3f  foff_phase_rect: %1.3f", cabsolute(f->foff_rect), cabsolute(f->foff_phase_rect));
+    fprintf(stderr,"\nphase_rx[]:\n");
+    for(i=0; i<=NC; i++)
+       fprintf(stderr,"  %1.3f", cabsolute(f->phase_rx[i]));
+    fprintf(stderr, "\n\n");
+}
diff --git a/libs/libcodec2/src/fdmdv.h b/libs/libcodec2/src/fdmdv.h
new file mode 100644 (file)
index 0000000..3ad83e6
--- /dev/null
@@ -0,0 +1,114 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv.h
+  AUTHOR......: David Rowe
+  DATE CREATED: April 14 2012
+                                                                             
+  A 1400 bit/s Frequency Division Multiplexed Digital Voice (FDMDV)
+  modem.  Used for digital audio over HF SSB. See README_fdmdv.txt for
+  more information, and fdmdv_mod.c and fdmdv_demod.c for example
+  usage.
+                     
+  References:
+    [1] http://n1su.com/fdmdv/FDMDV_Docs_Rel_1_4b.pdf
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __FDMDV__
+#define __FDMDV__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* set up the calling convention for DLL function import/export for
+   WIN32 cross compiling */
+
+#ifdef __CODEC2_WIN32__
+#ifdef __CODEC2_BUILDING_DLL__
+#define CODEC2_WIN32SUPPORT __declspec(dllexport) __stdcall
+#else
+#define CODEC2_WIN32SUPPORT __declspec(dllimport) __stdcall
+#endif
+#else
+#define CODEC2_WIN32SUPPORT
+#endif
+
+#include "comp.h"
+
+#define FDMDV_BITS_PER_FRAME          28  /* 20ms frames, 1400 bit/s                                        */
+#define FDMDV_NOM_SAMPLES_PER_FRAME  160  /* modulator output samples/frame and nominal demod samples/frame */
+                                          /* at 8000 Hz sample rate                                         */
+#define FDMDV_MAX_SAMPLES_PER_FRAME  200  /* max demod samples/frame, use this to allocate storage          */
+#define FDMDV_SCALE                 1000  /* suggested scaling for 16 bit shorts                            */
+#define FDMDV_NSYM                    15
+#define FDMDV_FCENTRE               1500  /* Centre frequency, Nc/2 carriers below this, Nc/2 carriers above (Hz) */
+
+/* 8 to 48 kHz sample rate conversion */
+
+#define FDMDV_OS                 6         /* oversampling rate           */
+#define FDMDV_OS_TAPS           48         /* number of OS filter taps    */
+
+/* FFT points */
+
+#define FDMDV_NSPEC             512
+#define FDMDV_MAX_F_HZ          4000
+
+/* FDMDV states and stats structures */
+
+struct FDMDV;
+    
+struct FDMDV_STATS {
+    float  snr_est;                /* estimated SNR of rx signal in dB (3 kHz noise BW)  */
+    COMP   rx_symbols[FDMDV_NSYM]; /* latest received symbols, for scatter plot          */ 
+    int    fest_coarse_fine;       /* freq est state, 0-coarse 1-fine                    */ 
+    float  foff;                   /* estimated freq offset in Hz                        */       
+    float  rx_timing;              /* estimated optimum timing offset in samples         */
+    float  clock_offset;           /* Estimated tx/rx sample clock offset in ppm         */
+};
+
+struct FDMDV * CODEC2_WIN32SUPPORT fdmdv_create(void);
+void           CODEC2_WIN32SUPPORT fdmdv_destroy(struct FDMDV *fdmdv_state);
+    
+void           CODEC2_WIN32SUPPORT fdmdv_mod(struct FDMDV *fdmdv_state, COMP tx_fdm[], int tx_bits[], int *sync_bit);
+void           CODEC2_WIN32SUPPORT fdmdv_demod(struct FDMDV *fdmdv_state, int rx_bits[], int *sync_bit, COMP rx_fdm[], int *nin);
+    
+void           CODEC2_WIN32SUPPORT fdmdv_get_test_bits(struct FDMDV *fdmdv_state, int tx_bits[]);
+void           CODEC2_WIN32SUPPORT fdmdv_put_test_bits(struct FDMDV *f, int *sync, int *bit_errors, int *ntest_bits, int rx_bits[]);
+    
+void           CODEC2_WIN32SUPPORT fdmdv_get_demod_stats(struct FDMDV *fdmdv_state, struct FDMDV_STATS *fdmdv_stats);
+void           CODEC2_WIN32SUPPORT fdmdv_get_rx_spectrum(struct FDMDV *fdmdv_state, float mag_dB[], COMP rx_fdm[], int nin);
+
+void           CODEC2_WIN32SUPPORT fdmdv_8_to_48(float out48k[], float in8k[], int n);
+void           CODEC2_WIN32SUPPORT fdmdv_48_to_8(float out8k[], float in48k[], int n);
+
+void           CODEC2_WIN32SUPPORT fdmdv_freq_shift(COMP rx_fdm_fcorr[], COMP rx_fdm[], float foff, COMP *foff_rect, COMP *foff_phase_rect, int nin);
+
+/* debug/development function(s) */
+
+void CODEC2_WIN32SUPPORT fdmdv_dump_osc_mags(struct FDMDV *f);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/libs/libcodec2/src/fdmdv_demod.c b/libs/libcodec2/src/fdmdv_demod.c
new file mode 100644 (file)
index 0000000..96090d0
--- /dev/null
@@ -0,0 +1,233 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_demod.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: April 30 2012
+                                                                             
+  Given an input raw file (8kHz, 16 bit shorts) of FDMDV modem samples
+  outputs a file of bits.  The output file is assumed to be arranged
+  as codec frames of 56 bits (7 bytes) which are received as two 28
+  bit modem frames.
+
+  Demod states can be optionally logged to an Octave file for display
+  using the Octave script fdmdv_demod_c.m.  This is useful for
+  checking demod performance.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+
+#include "fdmdv.h"
+#include "octave.h"
+
+#define BITS_PER_CODEC_FRAME (2*FDMDV_BITS_PER_FRAME)
+#define BYTES_PER_CODEC_FRAME (BITS_PER_CODEC_FRAME/8)
+
+/* lof of information we want to dump to Octave */
+
+#define MAX_FRAMES 50*60 /* 1 minute at 50 symbols/s */
+
+int main(int argc, char *argv[])
+{
+    FILE         *fin, *fout;
+    struct FDMDV *fdmdv;
+    char          packed_bits[BYTES_PER_CODEC_FRAME];
+    int           rx_bits[FDMDV_BITS_PER_FRAME];
+    int           codec_bits[2*FDMDV_BITS_PER_FRAME];
+    COMP          rx_fdm[FDMDV_MAX_SAMPLES_PER_FRAME];
+    short         rx_fdm_scaled[FDMDV_MAX_SAMPLES_PER_FRAME];
+    int           i, bit, byte, c;
+    int           nin, nin_prev;
+    int           sync_bit;
+    int           state, next_state;
+    int           f;
+    FILE         *foct = NULL;
+    struct FDMDV_STATS stats;
+    float        *rx_fdm_log;
+    int           rx_fdm_log_col_index;
+    COMP          rx_symbols_log[FDMDV_NSYM][MAX_FRAMES];
+    int           coarse_fine_log[MAX_FRAMES];
+    float         rx_timing_log[MAX_FRAMES];
+    float         foff_log[MAX_FRAMES];
+    int           sync_bit_log[MAX_FRAMES];
+    int           rx_bits_log[FDMDV_BITS_PER_FRAME*MAX_FRAMES];
+    float         snr_est_log[MAX_FRAMES];
+    float        *rx_spec_log;
+    int           max_frames_reached;
+
+    if (argc < 3) {
+       printf("usage: %s InputModemRawFile OutputBitFile [OctaveDumpFile]\n", argv[0]);
+       printf("e.g    %s hts1a_fdmdv.raw hts1a.c2\n", argv[0]);
+       exit(1);
+    }
+
+    if (strcmp(argv[1], "-")  == 0) fin = stdin;
+    else if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input modem sample file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    if (strcmp(argv[2], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[2],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output bit file: %s: %s.\n",
+         argv[2], strerror(errno));
+       exit(1);
+    }
+
+    /* malloc some of the bigger variables to prevent out of stack problems */
+
+    rx_fdm_log = (float*)malloc(sizeof(float)*FDMDV_MAX_SAMPLES_PER_FRAME*MAX_FRAMES);
+    assert(rx_fdm_log != NULL);
+    rx_spec_log = (float*)malloc(sizeof(float)*FDMDV_NSPEC*MAX_FRAMES);
+    assert(rx_spec_log != NULL);
+
+    fdmdv = fdmdv_create();
+    f = 0;
+    state = 0;
+    nin = FDMDV_NOM_SAMPLES_PER_FRAME;
+    rx_fdm_log_col_index = 0;
+    max_frames_reached = 0;
+
+    while(fread(rx_fdm_scaled, sizeof(short), nin, fin) == nin)
+    {
+       for(i=0; i<nin; i++) {
+           rx_fdm[i].real = (float)rx_fdm_scaled[i]/FDMDV_SCALE;
+            rx_fdm[i].imag = 0;
+        }
+       nin_prev = nin;
+       fdmdv_demod(fdmdv, rx_bits, &sync_bit, rx_fdm, &nin);
+
+       /* log data for optional Octave dump */
+
+       if (f < MAX_FRAMES) {
+           fdmdv_get_demod_stats(fdmdv, &stats);
+
+           /* log modem states for later dumping to Octave log file */
+
+           memcpy(&rx_fdm_log[rx_fdm_log_col_index], rx_fdm, sizeof(float)*nin_prev);
+           rx_fdm_log_col_index += nin_prev;
+
+           for(c=0; c<FDMDV_NSYM; c++)
+               rx_symbols_log[c][f] = stats.rx_symbols[c];
+           foff_log[f] = stats.foff;
+           rx_timing_log[f] = stats.rx_timing;
+           coarse_fine_log[f] = stats.fest_coarse_fine;
+           sync_bit_log[f] = sync_bit;
+           memcpy(&rx_bits_log[FDMDV_BITS_PER_FRAME*f], rx_bits, sizeof(int)*FDMDV_BITS_PER_FRAME);
+           snr_est_log[f] = stats.snr_est;
+
+           fdmdv_get_rx_spectrum(fdmdv, &rx_spec_log[f*FDMDV_NSPEC], rx_fdm, nin_prev);
+
+           f++;
+       }
+       
+       if ((f == MAX_FRAMES) && !max_frames_reached) {
+           fprintf(stderr,"MAX_FRAMES exceed in Octave log, log truncated\n");
+           max_frames_reached = 1;
+       }
+
+       /* state machine to output codec bits only if we have a 0,1
+          sync bit sequence */
+
+       next_state = state;
+       switch (state) {
+       case 0:
+           if (sync_bit == 0) {
+               next_state = 1;
+               memcpy(codec_bits, rx_bits, FDMDV_BITS_PER_FRAME*sizeof(int));
+           }
+           else
+               next_state = 0;
+           break;
+       case 1:
+           if (sync_bit == 1) {
+               memcpy(&codec_bits[FDMDV_BITS_PER_FRAME], rx_bits, FDMDV_BITS_PER_FRAME*sizeof(int));
+
+               /* pack bits, MSB received first  */
+
+               bit = 7; byte = 0;
+               memset(packed_bits, 0, BYTES_PER_CODEC_FRAME);
+               for(i=0; i<BITS_PER_CODEC_FRAME; i++) {
+                   packed_bits[byte] |= (codec_bits[i] << bit);
+                   bit--;
+                   if (bit < 0) {
+                       bit = 7;
+                       byte++;
+                   }
+               }
+               assert(byte == BYTES_PER_CODEC_FRAME);
+
+               fwrite(packed_bits, sizeof(char), BYTES_PER_CODEC_FRAME, fout);
+           }
+           next_state = 0;
+           break;
+       }       
+       state = next_state;
+
+       /* if this is in a pipeline, we probably don't want the usual
+          buffering to occur */
+
+        if (fout == stdout) fflush(stdout);
+        if (fin == stdin) fflush(stdin);         
+    }
+
+    /* Optional dump to Octave log file */
+
+    if (argc == 4) {
+
+       /* make sure 3rd arg is not just the pipe command */
+
+       if (strcmp(argv[3],"|")) {
+           if ((foct = fopen(argv[3],"wt")) == NULL ) {
+               fprintf(stderr, "Error opening Octave dump file: %s: %s.\n",
+                       argv[3], strerror(errno));
+               exit(1);
+           }
+           octave_save_float(foct, "rx_fdm_log_c", rx_fdm_log, 1, rx_fdm_log_col_index, FDMDV_MAX_SAMPLES_PER_FRAME);  
+           octave_save_complex(foct, "rx_symbols_log_c", (COMP*)rx_symbols_log, FDMDV_NSYM, f, MAX_FRAMES);  
+           octave_save_float(foct, "foff_log_c", foff_log, 1, f, MAX_FRAMES);  
+           octave_save_float(foct, "rx_timing_log_c", rx_timing_log, 1, f, MAX_FRAMES);  
+           octave_save_int(foct, "coarse_fine_log_c", coarse_fine_log, 1, f);  
+           octave_save_int(foct, "rx_bits_log_c", rx_bits_log, 1, FDMDV_BITS_PER_FRAME*f);
+           octave_save_int(foct, "sync_bit_log_c", sync_bit_log, 1, f);  
+           octave_save_float(foct, "snr_est_log_c", snr_est_log, 1, f, MAX_FRAMES);  
+           octave_save_float(foct, "rx_spec_log_c", rx_spec_log, f, FDMDV_NSPEC, FDMDV_NSPEC);  
+           fclose(foct);
+       }
+    }
+
+    //fdmdv_dump_osc_mags(fdmdv);
+
+    fclose(fin);
+    fclose(fout);
+    free(rx_fdm_log);
+    free(rx_spec_log);
+    fdmdv_destroy(fdmdv);
+
+    return 0;
+}
+
diff --git a/libs/libcodec2/src/fdmdv_get_test_bits.c b/libs/libcodec2/src/fdmdv_get_test_bits.c
new file mode 100644 (file)
index 0000000..e3120e9
--- /dev/null
@@ -0,0 +1,100 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_get_test_bits.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: 1 May 2012
+                                                                             
+  Generates a file of packed test bits, useful for input to fdmdv_mod.
+
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+
+#include "fdmdv.h"
+
+#define BITS_PER_CODEC_FRAME (2*FDMDV_BITS_PER_FRAME)
+#define BYTES_PER_CODEC_FRAME (BITS_PER_CODEC_FRAME/8)
+
+int main(int argc, char *argv[])
+{
+    FILE         *fout;
+    struct FDMDV *fdmdv;
+    char          packed_bits[BYTES_PER_CODEC_FRAME];
+    int           tx_bits[2*FDMDV_BITS_PER_FRAME];
+    int           n, i, bit, byte;
+    int           numBits, nCodecFrames;
+
+    if (argc < 3) {
+       printf("usage: %s OutputBitFile numBits\n", argv[0]);
+       printf("e.g    %s test.c2 1400\n", argv[0]);
+       exit(1);
+    }
+
+    if (strcmp(argv[1], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[1],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output bit file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    numBits = atoi(argv[2]);
+    nCodecFrames = numBits/BITS_PER_CODEC_FRAME;
+
+    fdmdv = fdmdv_create();
+
+    for(n=0; n<nCodecFrames; n++) {
+
+       fdmdv_get_test_bits(fdmdv, tx_bits);
+       fdmdv_get_test_bits(fdmdv, &tx_bits[FDMDV_BITS_PER_FRAME]);
+       
+       /* pack bits, MSB received first  */
+
+       bit = 7; byte = 0;
+       memset(packed_bits, 0, BYTES_PER_CODEC_FRAME);
+       for(i=0; i<BITS_PER_CODEC_FRAME; i++) {
+           packed_bits[byte] |= (tx_bits[i] << bit);
+           bit--;
+           if (bit < 0) {
+               bit = 7;
+               byte++;
+           }
+       }
+       assert(byte == BYTES_PER_CODEC_FRAME);
+
+       fwrite(packed_bits, sizeof(char), BYTES_PER_CODEC_FRAME, fout);
+       /* if this is in a pipeline, we probably don't want the usual
+          buffering to occur */
+
+        if (fout == stdout) fflush(stdout);
+    }
+
+    fclose(fout);
+    fdmdv_destroy(fdmdv);
+
+    return 0;
+}
+
diff --git a/libs/libcodec2/src/fdmdv_interleave.c b/libs/libcodec2/src/fdmdv_interleave.c
new file mode 100644 (file)
index 0000000..010aa1a
--- /dev/null
@@ -0,0 +1,163 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_interleave.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: May 27 2012
+                                                                             
+  Given an input file of bits outputs an interleaved or optionally
+  de-intervleaved file of bits.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+
+#include "fdmdv.h"
+
+#define MAX_INTERLEAVER 1024
+
+int main(int argc, char *argv[])
+{
+    FILE         *fin, *fout, *finter;
+    int          interleaver[MAX_INTERLEAVER];
+    char         *packed_bits;
+    int          *bits;
+    int          *interleaved_bits;
+    int           i, bit, byte, m, mpacked, frames, interleave, src_bit, dest_bit;
+
+    if (argc < 4) {
+       printf("usage: %s InputBitFile OutputBitFile InterleaverFile [de]\n", argv[0]);
+       printf("e.g    %s hts1a.c2 hts1a_interleaved.c2 interleaver.txt\n", argv[0]);
+       exit(1);
+    }
+
+    if (strcmp(argv[1], "-")  == 0) fin = stdin;
+    else if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input bit file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    if (strcmp(argv[2], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[2],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output bit file: %s: %s.\n",
+         argv[2], strerror(errno));
+       exit(1);
+    }
+
+    if ((finter = fopen(argv[3],"rt")) == NULL ) {
+       fprintf(stderr, "Error opening interleaver file: %s: %s.\n",
+         argv[3], strerror(errno));
+       exit(1);
+    }
+
+    if (argc == 5)
+       interleave = 1;
+    else
+       interleave = 0;
+
+    /* load interleaver, size determines block size we will process */
+
+    src_bit = 0;
+    while(fscanf(finter, "%d\n", &dest_bit) == 1) {
+       if (interleave)
+           interleaver[dest_bit] = src_bit;
+       else
+           interleaver[src_bit] = dest_bit;
+           
+       src_bit++;
+       if (src_bit == MAX_INTERLEAVER) {
+           fprintf(stderr, "Error interleaver too big\n");
+           exit(1);
+       }       
+    }
+    fclose(finter);
+
+    m = src_bit;
+    fprintf(stderr, "Interleaver size m = %d  interleave = %d\n", m, interleave);
+    mpacked = m/8;
+
+    packed_bits = (char*)malloc(mpacked*sizeof(char));
+    assert(packed_bits != NULL);
+    bits = (int*)malloc(m*sizeof(int));
+    assert(bits != NULL);
+    interleaved_bits = (int*)malloc(m*sizeof(int));
+    assert(interleaved_bits != NULL);
+
+    frames = 0;
+
+    while(fread(packed_bits, sizeof(char), mpacked, fin) == mpacked) {
+       frames++;
+       
+       /* unpack bits, MSB first */
+
+       bit = 7; byte = 0;
+       for(i=0; i<m; i++) {
+           bits[i] = (packed_bits[byte] >> bit) & 0x1;
+           bit--;
+           if (bit < 0) {
+               bit = 7;
+               byte++;
+           }
+       }
+       assert(byte == mpacked);
+
+       /* (de) interleave */
+
+       for(i=0; i<m; i++)
+           interleaved_bits[i] = bits[interleaver[i]];
+
+       /* pack bits, MSB sent first  */
+
+       bit = 7; byte = 0;
+       memset(packed_bits, 0, mpacked);
+       for(i=0; i<m; i++) {
+           packed_bits[byte] |= (interleaved_bits[i] << bit);
+           bit--;
+           if (bit < 0) {
+               bit = 7;
+               byte++;
+           }
+       }
+       assert(byte == mpacked);
+
+       fwrite(packed_bits, sizeof(char), mpacked, fout);
+
+       /* if this is in a pipeline, we probably don't want the usual
+          buffering to occur */
+
+        if (fout == stdout) fflush(stdout);
+        if (fin == stdin) fflush(stdin);         
+    }
+
+    free(packed_bits);
+    free(bits);
+    free(interleaved_bits);
+
+    fclose(fin);
+    fclose(fout);
+
+    return 0;
+}
diff --git a/libs/libcodec2/src/fdmdv_internal.h b/libs/libcodec2/src/fdmdv_internal.h
new file mode 100644 (file)
index 0000000..7f3c779
--- /dev/null
@@ -0,0 +1,173 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_internal.h
+  AUTHOR......: David Rowe                                                          
+  DATE CREATED: April 16 2012
+                                                                             
+  Header file for FDMDV internal functions, exposed via this header
+  file for testing.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __FDMDV_INTERNAL__
+#define __FDMDV_INTERNAL__
+
+#include "comp.h"
+#include "fdmdv.h"
+#include "kiss_fft.h"
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+                               DEFINES
+
+\*---------------------------------------------------------------------------*/
+
+#define PI             3.141592654
+#define FS                    8000  /* sample rate in Hz                                                    */
+#define T                 (1.0/FS)  /* sample period in seconds                                             */
+#define RS                      50  /* symbol rate in Hz                                                    */
+#define NC                      14  /* number of data carriers (plus one pilot in the centre)               */
+#define NB                       2  /* Bits/symbol for QPSK modulation                                      */
+#define RB              (NC*RS*NB)  /* bit rate                                                             */
+#define M                  (FS/RS)  /* oversampling factor                                                  */
+#define NSYM                     6  /* number of symbols to filter over                                     */
+#define NFILTER            (NSYM*M) /* size of tx/rx filters at sample rate M                               */
+
+#define FSEP                    75  /* Separation between carriers (Hz)                                     */
+
+#define NT                       5  /* number of symbols we estimate timing over                            */
+#define P                        4  /* oversample factor used for initial rx symbol filtering               */
+#define NFILTERTIMING (M+NFILTER+M) /* filter memory used for resampling after timing estimation            */
+
+#define NTEST_BITS        (NC*NB*4) /* length of test bit sequence */
+
+#define NPILOT_LUT                 (4*M)    /* number of pilot look up table samples                 */
+#define NPILOTCOEFF                   30    /* number of FIR filter coeffs in LP filter              */
+#define NPILOTBASEBAND (NPILOTCOEFF+M+M/P)  /* number of pilot baseband samples reqd for pilot LPF   */
+#define NPILOTLPF                  (4*M)    /* number of samples we DFT pilot over, pilot est window */
+#define MPILOTFFT                    256
+
+/* freq offset sestimation states */
+
+#define COARSE                   0
+#define FINE                     1
+
+/* averaging filter coeffs */
+
+#define TRACK_COEFF              0.5
+#define SNR_COEFF                0.9       /* SNR est averaging filter coeff */
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+                               STRUCT for States
+
+\*---------------------------------------------------------------------------*/
+
+struct FDMDV {
+    /* test data (test frame) states */
+
+    int  current_test_bit;
+    int  rx_test_bits_mem[NTEST_BITS];
+
+    /* Modulator */
+
+    int  tx_pilot_bit;
+    COMP prev_tx_symbols[NC+1];
+    COMP tx_filter_memory[NC+1][NSYM];
+    COMP phase_tx[NC+1];
+    COMP freq[NC+1];
+    /* Pilot generation at demodulator */
+
+    COMP pilot_lut[NPILOT_LUT];
+    int  pilot_lut_index;
+    int  prev_pilot_lut_index;
+
+    /* freq offset estimation states */
+
+    kiss_fft_cfg fft_pilot_cfg;             
+    COMP pilot_baseband1[NPILOTBASEBAND];
+    COMP pilot_baseband2[NPILOTBASEBAND];
+    COMP pilot_lpf1[NPILOTLPF];
+    COMP pilot_lpf2[NPILOTLPF];
+    COMP S1[MPILOTFFT];
+    COMP S2[MPILOTFFT];
+
+    /* freq offset correction states */
+
+    float foff;
+    COMP foff_rect;
+    COMP foff_phase_rect;
+    
+    /* Demodulator */
+
+    COMP  phase_rx[NC+1];
+    COMP  rx_filter_memory[NC+1][NFILTER];
+    COMP  rx_filter_mem_timing[NC+1][NT*P];
+    COMP  rx_baseband_mem_timing[NC+1][NFILTERTIMING];
+    float rx_timing;
+    COMP  phase_difference[NC+1];
+    COMP  prev_rx_symbols[NC+1];
+    
+    /* freq est state machine */
+
+    int  fest_state;
+    int  coarse_fine;
+
+    /* SNR estimation states */
+
+    float sig_est[NC+1];
+    float noise_est[NC+1];
+
+    /* Buf for FFT/waterfall */
+
+    float fft_buf[2*FDMDV_NSPEC];
+    kiss_fft_cfg fft_cfg;             
+ };
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+                              FUNCTION PROTOTYPES
+
+\*---------------------------------------------------------------------------*/
+
+void bits_to_dqpsk_symbols(COMP tx_symbols[], COMP prev_tx_symbols[], int tx_bits[], int *pilot_bit);
+void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memory[NC+1][NSYM]);
+void fdm_upconvert(COMP tx_fdm[], COMP tx_baseband[NC+1][M], COMP phase_tx[], COMP freq_tx[]);
+void generate_pilot_fdm(COMP *pilot_fdm, int *bit, float *symbol, float *filter_mem, COMP *phase, COMP *freq);
+void generate_pilot_lut(COMP pilot_lut[], COMP *pilot_freq);
+float rx_est_freq_offset(struct FDMDV *f, COMP rx_fdm[], int nin);
+void lpf_peak_pick(float *foff, float *max, COMP pilot_baseband[], COMP pilot_lpf[], kiss_fft_cfg fft_pilot_cfg, COMP S[], int nin);
+void freq_shift(COMP rx_fdm_fcorr[], COMP rx_fdm[], float foff, COMP *foff_rect, COMP *foff_phase_rect, int nin);
+void fdm_downconvert(COMP rx_baseband[NC+1][M+M/P], COMP rx_fdm[], COMP phase_rx[], COMP freq[], int nin);
+void rx_filter(COMP rx_filt[NC+1][P+1], COMP rx_baseband[NC+1][M+M/P], COMP rx_filter_memory[NC+1][NFILTER], int nin);
+float rx_est_timing(COMP  rx_symbols[], 
+                  COMP  rx_filt[NC+1][P+1], 
+                  COMP  rx_baseband[NC+1][M+M/P], 
+                  COMP  rx_filter_mem_timing[NC+1][NT*P], 
+                  float env[],
+                  COMP  rx_baseband_mem_timing[NC+1][NFILTERTIMING], 
+                  int   nin);   
+float qpsk_to_bits(int rx_bits[], int *sync_bit, COMP phase_difference[], COMP prev_rx_symbols[], COMP rx_symbols[]);
+void snr_update(float sig_est[], float noise_est[], COMP phase_difference[]);
+int freq_state(int sync_bit, int *state);
+float calc_snr(float sig_est[], float noise_est[]);
+
+#endif
diff --git a/libs/libcodec2/src/fdmdv_mod.c b/libs/libcodec2/src/fdmdv_mod.c
new file mode 100644 (file)
index 0000000..b85f8d1
--- /dev/null
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_mod.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: April 28 2012
+                                                                             
+  Given an input file of bits outputs a raw file (8kHz, 16 bit shorts)
+  of FDMDV modem samples ready to send over a HF radio channel.  The
+  input file is assumed to be arranged as codec frames of 56 bits (7
+  bytes) which we send as two 28 bit modem frames.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+
+#include "fdmdv.h"
+
+#define BITS_PER_CODEC_FRAME (2*FDMDV_BITS_PER_FRAME)
+#define BYTES_PER_CODEC_FRAME (BITS_PER_CODEC_FRAME/8)
+
+int main(int argc, char *argv[])
+{
+    FILE         *fin, *fout;
+    struct FDMDV *fdmdv;
+    char          packed_bits[BYTES_PER_CODEC_FRAME];
+    int           tx_bits[2*FDMDV_BITS_PER_FRAME];
+    COMP          tx_fdm[2*FDMDV_NOM_SAMPLES_PER_FRAME];
+    short         tx_fdm_scaled[2*FDMDV_NOM_SAMPLES_PER_FRAME];
+    int           frames;
+    int           i, bit, byte;
+    int           sync_bit;
+
+    if (argc < 3) {
+       printf("usage: %s InputBitFile OutputModemRawFile\n", argv[0]);
+       printf("e.g    %s hts1a.c2 hts1a_fdmdv.raw\n", argv[0]);
+       exit(1);
+    }
+
+    if (strcmp(argv[1], "-")  == 0) fin = stdin;
+    else if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input bit file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    if (strcmp(argv[2], "-") == 0) fout = stdout;
+    else if ( (fout = fopen(argv[2],"wb")) == NULL ) {
+       fprintf(stderr, "Error opening output modem sample file: %s: %s.\n",
+         argv[2], strerror(errno));
+       exit(1);
+    }
+
+    fdmdv = fdmdv_create();
+    frames = 0;
+
+    while(fread(packed_bits, sizeof(char), BYTES_PER_CODEC_FRAME, fin) == BYTES_PER_CODEC_FRAME) {
+       frames++;
+       
+       /* unpack bits, MSB first */
+
+       bit = 7; byte = 0;
+       for(i=0; i<BITS_PER_CODEC_FRAME; i++) {
+           tx_bits[i] = (packed_bits[byte] >> bit) & 0x1;
+           bit--;
+           if (bit < 0) {
+               bit = 7;
+               byte++;
+           }
+       }
+       assert(byte == BYTES_PER_CODEC_FRAME);
+
+       /* modulate even and odd frames */
+
+       fdmdv_mod(fdmdv, tx_fdm, tx_bits, &sync_bit);
+       assert(sync_bit == 1);
+
+       fdmdv_mod(fdmdv, &tx_fdm[FDMDV_NOM_SAMPLES_PER_FRAME], &tx_bits[FDMDV_BITS_PER_FRAME], &sync_bit);
+       assert(sync_bit == 0);
+
+       /* scale and save to disk as shorts */
+
+       for(i=0; i<2*FDMDV_NOM_SAMPLES_PER_FRAME; i++)
+           tx_fdm_scaled[i] = FDMDV_SCALE * tx_fdm[i].real;
+
+       fwrite(tx_fdm_scaled, sizeof(short), 2*FDMDV_NOM_SAMPLES_PER_FRAME, fout);
+
+       /* if this is in a pipeline, we probably don't want the usual
+          buffering to occur */
+
+        if (fout == stdout) fflush(stdout);
+        if (fin == stdin) fflush(stdin);         
+    }
+
+    //fdmdv_dump_osc_mags(fdmdv);
+
+    fclose(fin);
+    fclose(fout);
+    fdmdv_destroy(fdmdv);
+
+    return 0;
+}
diff --git a/libs/libcodec2/src/fdmdv_put_test_bits.c b/libs/libcodec2/src/fdmdv_put_test_bits.c
new file mode 100644 (file)
index 0000000..ed773e7
--- /dev/null
@@ -0,0 +1,112 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv_put_test_bits.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: 1 May 2012
+                                                                             
+  Using a file of packed test bits as input, determines bit error
+  rate.  Useful for testing fdmdv_demod.
+
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+
+#include "fdmdv.h"
+
+#define BITS_PER_CODEC_FRAME (2*FDMDV_BITS_PER_FRAME)
+#define BYTES_PER_CODEC_FRAME (BITS_PER_CODEC_FRAME/8)
+
+int main(int argc, char *argv[])
+{
+    FILE         *fin;
+    struct FDMDV *fdmdv;
+    char          packed_bits[BYTES_PER_CODEC_FRAME];
+    int           rx_bits[2*FDMDV_BITS_PER_FRAME];
+    int           i, bit, byte;
+    int           test_frame_sync, bit_errors, total_bit_errors, total_bits, ntest_bits;
+
+    if (argc < 2) {
+       printf("usage: %s InputBitFile\n", argv[0]);
+       printf("e.g    %s test.c2\n", argv[0]);
+       exit(1);
+    }
+
+    if (strcmp(argv[1], "-") == 0) fin = stdin;
+    else if ( (fin = fopen(argv[1],"rb")) == NULL ) {
+       fprintf(stderr, "Error opening input bit file: %s: %s.\n",
+         argv[1], strerror(errno));
+       exit(1);
+    }
+
+    fdmdv = fdmdv_create();
+    total_bit_errors = 0;
+    total_bits = 0;
+
+    while(fread(packed_bits, sizeof(char), BYTES_PER_CODEC_FRAME, fin) == BYTES_PER_CODEC_FRAME) {
+       /* unpack bits, MSB first */
+
+       bit = 7; byte = 0;
+       for(i=0; i<BITS_PER_CODEC_FRAME; i++) {
+           rx_bits[i] = (packed_bits[byte] >> bit) & 0x1;
+           //printf("%d 0x%x %d\n", i, packed_bits[byte], rx_bits[i]);
+           bit--;
+           if (bit < 0) {
+               bit = 7;
+               byte++;
+           }
+       }
+       assert(byte == BYTES_PER_CODEC_FRAME);
+
+       fdmdv_put_test_bits(fdmdv, &test_frame_sync, &bit_errors, &ntest_bits, rx_bits);
+       if (test_frame_sync == 1) {
+           total_bit_errors += bit_errors;
+           total_bits = total_bits + ntest_bits;
+           printf("+");
+       }
+       else
+           printf("-");
+       fdmdv_put_test_bits(fdmdv, &test_frame_sync, &bit_errors, &ntest_bits, &rx_bits[FDMDV_BITS_PER_FRAME]);
+       if (test_frame_sync == 1) {
+           total_bit_errors += bit_errors;
+           total_bits = total_bits + ntest_bits;
+           printf("+");
+       }
+       else
+           printf("-");
+       
+       /* if this is in a pipeline, we probably don't want the usual
+          buffering to occur */
+
+        if (fin == stdin) fflush(stdin);
+    }
+
+    fclose(fin);
+    fdmdv_destroy(fdmdv);
+
+    printf("\nbits %d  errors %d  BER %1.4f\n", total_bits, total_bit_errors, (float)total_bit_errors/(1E-6+total_bits) );
+    return 0;
+}
+
diff --git a/libs/libcodec2/src/fifo.c b/libs/libcodec2/src/fifo.c
new file mode 100644 (file)
index 0000000..4d224da
--- /dev/null
@@ -0,0 +1,143 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fifo.c
+  AUTHOR......: David Rowe
+  DATE CREATED: Oct 15 2012
+                                                                             
+  A FIFO design useful in gluing the FDMDV modem and codec together in
+  integrated applications.  The unittest/tfifo indicates these
+  routines are thread safe without the need for syncronisation
+  object, e.g. a different thread can read and write to a fifo at the
+  same time.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "fifo.h"
+
+struct FIFO {
+    short *buf;
+    short *pin;
+    short *pout;
+    int    nshort;
+};
+
+struct FIFO *fifo_create(int nshort) {
+    struct FIFO *fifo;
+
+    fifo = (struct FIFO *)malloc(sizeof(struct FIFO));
+    assert(fifo != NULL);
+
+    fifo->buf = (short*)malloc(sizeof(short)*nshort);
+    assert(fifo->buf != NULL);
+    fifo->pin = fifo->buf;
+    fifo->pout = fifo->buf;
+    fifo->nshort = nshort;
+
+    return fifo;
+}
+
+void fifo_destroy(struct FIFO *fifo) {
+    assert(fifo != NULL);
+    free(fifo->buf);
+    free(fifo);
+}
+
+int fifo_write(struct FIFO *fifo, short data[], int n) {
+    int            i;
+    int            fifo_free;
+    short         *pdata;
+    short         *pin = fifo->pin;
+
+    assert(fifo != NULL);
+    assert(data != NULL);
+
+    // available storage is one less than nshort as prd == pwr
+    // is reserved for empty rather than full
+
+    fifo_free = fifo->nshort - fifo_used(fifo) - 1;
+
+    if (n > fifo_free) {
+       return -1;
+    }
+    else {
+
+       /* This could be made more efficient with block copies
+          using memcpy */
+
+       pdata = data;
+       for(i=0; i<n; i++) {
+           *pin++ = *pdata++;
+           if (pin == (fifo->buf + fifo->nshort))
+               pin = fifo->buf;
+       }
+       fifo->pin = pin;
+    }
+
+    return 0;
+}
+
+int fifo_read(struct FIFO *fifo, short data[], int n)
+{
+    int            i;
+    short         *pdata;
+    short         *pin = fifo->pin;
+    short         *pout = fifo->pout;
+
+    assert(fifo != NULL);
+    assert(data != NULL);
+    if (n > fifo_used(fifo)) {
+       return -1;
+    }
+    else {
+
+       /* This could be made more efficient with block copies
+          using memcpy */
+
+       pdata = data;
+       for(i=0; i<n; i++) {
+           *pdata++ = *pout++;
+           if (pout == (fifo->buf + fifo->nshort))
+               pout = fifo->buf;
+       }
+       fifo->pout = pout;
+    }
+
+    return 0;
+}
+
+int fifo_used(struct FIFO *fifo)
+{
+    short         *pin = fifo->pin;
+    short         *pout = fifo->pout;
+    unsigned int   used;
+
+    assert(fifo != NULL);
+    if (pin >= pout)
+        used = pin - pout;
+    else
+        used = fifo->nshort + (unsigned int)(pin - pout);
+
+    return used;
+}
+
diff --git a/libs/libcodec2/src/fifo.h b/libs/libcodec2/src/fifo.h
new file mode 100644 (file)
index 0000000..a6a1039
--- /dev/null
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fifo.h
+  AUTHOR......: David Rowe
+  DATE CREATED: Oct 15 2012
+                                                                             
+  A FIFO design useful in gluing the FDMDV modem and codec together in
+  integrated applications.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __FIFO__
+#define __FIFO__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct FIFO;
+
+struct FIFO *fifo_create(int nshort);
+void fifo_destroy(struct FIFO *fifo);
+int fifo_write(struct FIFO *fifo, short data[], int n);
+int fifo_read(struct FIFO *fifo, short data[], int n);
+int fifo_used(struct FIFO *fifo);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/libcodec2/src/generate_codebook.c b/libs/libcodec2/src/generate_codebook.c
new file mode 100644 (file)
index 0000000..0bea80d
--- /dev/null
@@ -0,0 +1,179 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: generate_codebook.c
+  AUTHOR......: Bruce Perens                                        
+  DATE CREATED: 29 Sep 2010                                                     
+                                                                             
+  Generate header files containing LSP quantisers, runs at compile time.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+
+static const char usage[] =
+"Usage: %s filename array_name [filename ...]\n"
+"\tCreate C code for codebook tables.\n";
+
+static const char format[] =
+"The table format must be:\n"
+"\tTwo integers describing the dimensions of the codebook.\n"
+"\tThen, enough numbers to fill the specified dimensions.\n";
+
+static const char header[] =
+"/* THIS IS A GENERATED FILE. Edit generate_codebook.c and its input */\n\n"
+"/*\n"
+" * This intermediary file and the files that used to create it are under \n"
+" * The LGPL. See the file COPYING.\n"
+" */\n\n"
+"#include \"defines.h\"\n\n";
+
+struct codebook {
+  unsigned int k;
+  unsigned int log2m;
+  unsigned int m;
+  float * cb;
+};
+
+static void
+dump_array(const struct codebook * b, int index)
+{
+  int  limit = b->k * b->m;
+  int  i;
+
+  printf("static const float codes%d[] = {\n", index);
+  for ( i = 0; i < limit; i++ ) {
+    printf("  %g", b->cb[i]);
+    if ( i < limit - 1 )
+      printf(",");
+
+    /* organise VQs by rows, looks prettier */
+    if ( ((i+1) % b->k) == 0 )
+       printf("\n");
+  }
+  printf("};\n");
+}
+
+static void
+dump_structure(const struct codebook * b, int index)
+{
+  printf("  {\n");
+  printf("    %d,\n", b->k);
+  printf("    %g,\n", log(b->m) / log(2));
+  printf("    %d,\n", b->m);
+  printf("    codes%d\n", index);
+  printf("  }");
+}
+
+float
+get_float(FILE * in, const char * name, char * * cursor, char * buffer,
+ int size)
+{
+  for ( ; ; ) {
+    char *     s = *cursor;
+    char       c;
+
+    while ( (c = *s) != '\0' && !isdigit(c) && c != '-' && c != '.' )
+      s++;
+     
+    /* Comments start with "#" and continue to the end of the line. */
+    if ( c != '\0' && c != '#' ) {
+      char *   end = 0;
+      float    f = 0;
+
+      f = strtod(s, &end);
+
+      if ( end != s )
+        *cursor = end;
+        return f;
+    }
+
+    if ( fgets(buffer, size, in) == NULL ) {
+      fprintf(stderr, "%s: Format error. %s\n", name, format);
+      exit(1);
+    }
+    *cursor = buffer;
+  }
+}
+
+static struct codebook *
+load(FILE * file, const char * name)
+{
+  char                 line[1024];
+  char *               cursor = line;
+  struct codebook *    b = malloc(sizeof(struct codebook));
+  int                  i;
+  int                  size;
+
+  *cursor = '\0';
+
+  b->k = (int)get_float(file, name, &cursor, line, sizeof(line));
+  b->m = (int)get_float(file, name ,&cursor, line, sizeof(line));
+  size = b->k * b->m;
+
+  b->cb = (float *)malloc(size * sizeof(float));
+
+  for ( i = 0; i < size; i++ )
+    b->cb[i] = get_float(file, name, &cursor, line, sizeof(line));
+
+  return b;
+}
+
+int
+main(int argc, char * * argv)
+{
+  struct codebook * *  cb = malloc(argc * sizeof(struct codebook *));
+  int                  i;
+
+  if ( argc < 2 ) {
+    fprintf(stderr, usage, argv[0]);
+    fprintf(stderr, format);
+    exit(1);
+  }
+
+  for ( i = 0; i < argc - 2; i++ ) {
+    FILE *     in = fopen(argv[i + 2], "r");
+
+    if ( in == NULL ) {
+      perror(argv[i + 2]);
+      exit(1);
+    }
+
+    cb[i] = load(in, argv[i + 2]);
+
+    fclose(in);
+  }
+
+  printf(header);
+  for ( i = 0; i < argc - 2; i++ ) {
+    printf("  /* %s */\n", argv[i + 2]);
+    dump_array(cb[i], i);
+  }
+  printf("\nconst struct lsp_codebook %s[] = {\n", argv[1]);
+  for ( i = 0; i < argc - 2; i++ ) {
+    printf("  /* %s */\n", argv[i + 2]);
+    dump_structure(cb[i], i);
+    printf(",\n");
+  }
+  printf("  { 0, 0, 0, 0 }\n");
+  printf("};\n");
+
+  return 0;
+}
diff --git a/libs/libcodec2/src/genlspdtcb.c b/libs/libcodec2/src/genlspdtcb.c
new file mode 100644 (file)
index 0000000..efac19c
--- /dev/null
@@ -0,0 +1,90 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: genlspdtcb.c
+  AUTHOR......: David Rowe                                                     
+  DATE CREATED: 2 Nov 2011
+                                                                             
+  Generates codebooks (quantisation tables) for LSP delta-T VQ.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#define MAX_ROWS 10
+
+float lsp1to4[] = {
+    -25,0,25,
+    -25,0,25,
+    -50,0,50,
+    -50,0,50
+};
+
+float lsp5to10[] = {
+    -50,0,50,
+    -50,0,50,
+    -50,0,50,
+    -50,0,50,
+    -50,0,50,
+    -50,0,50
+};
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+void create_codebook_text_file(char filename[], float lsp[], 
+                              int rows, int cols);
+
+int main(void) {
+    create_codebook_text_file("codebook/lspdt1-4.txt",  lsp1to4,  4, 3);
+    create_codebook_text_file("codebook/lspdt5-10.txt", lsp5to10, 6, 3); 
+    return 0;
+}
+
+void create_codebook_text_file(char filename[], float lsp[], 
+                              int rows, int cols) 
+{
+    FILE *f;
+    int   i, digits[MAX_ROWS]; 
+
+    f = fopen(filename, "wt");
+    if (f == NULL) {
+       printf("Can't open codebook text file %s\n", filename);
+       exit(0);
+    }
+
+    for(i=0; i<rows; i++)
+       digits[i] = 0;
+
+    fprintf(f, "%d %d\n", rows, (int)pow(cols, rows));
+
+    do {
+       for(i=0; i<rows; i++)
+           fprintf(f, "%4.0f ", lsp[cols*i + digits[i]]);
+       fprintf(f, "\n");
+       digits[0]++;
+       for(i=0; i<rows-1; i++)
+           if (digits[i]== cols) {
+               digits[i] = 0;
+               digits[i+1]++;
+           }
+    } while (digits[rows-1] != cols);
+       
+    fclose(f);
+}
index 2e04f6806d8785d5440e5240c828af5cb5df585d..f2182f79a5da586dd01b05db72bbeb56e1b847f2 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "sine.h"      /* global defines for coder */
index 44aab8b0a0b835077c5c559542b345897e5c9b1d..cef720344c75fea1211cdef70ca2557640c14ae6 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 /* Globals used in encoder and decoder */
diff --git a/libs/libcodec2/src/glottal.c b/libs/libcodec2/src/glottal.c
new file mode 100644 (file)
index 0000000..8ac3ff4
--- /dev/null
@@ -0,0 +1,257 @@
+const float glottal[]={
+  0.000000,
+  -0.057687,
+  -0.115338,
+  -0.172917,
+  -0.230385,
+  -0.287707,
+  -0.344845,
+  -0.401762,
+  -0.458419,
+  -0.514781,
+  -0.570809,
+  -0.626467,
+  -0.681721,
+  -0.736537,
+  -0.790884,
+  -0.844733,
+  -0.898057,
+  -0.950834,
+  -1.003044,
+  -1.054670,
+  -1.105700,
+  -1.156124,
+  -1.205936,
+  -1.255132,
+  -1.303711,
+  -1.351675,
+  -1.399026,
+  -1.445769,
+  -1.491908,
+  -1.537448,
+  -1.582393,
+  -1.626747,
+  -1.670514,
+  -1.713693,
+  -1.756285,
+  -1.798288,
+  -1.839697,
+  -1.880507,
+  -1.920712,
+  -1.960302,
+  -1.999269,
+  -2.037603,
+  -2.075295,
+  -2.112335,
+  -2.148716,
+  -2.184430,
+  -2.219472,
+  -2.253839,
+  -2.287531,
+  -2.320550,
+  -2.352900,
+  -2.384588,
+  -2.415623,
+  -2.446019,
+  -2.475788,
+  -2.504946,
+  -2.533512,
+  -2.561501,
+  -2.588934,
+  -2.615827,
+  -2.642198,
+  -2.668064,
+  -2.693439,
+  -2.718337,
+  -2.742767,
+  -2.766738,
+  -2.790256,
+  -2.813322,
+  -2.835936,
+  -2.858094,
+  -2.879790,
+  -2.901016,
+  -2.921759,
+  -2.942008,
+  -2.961747,
+  -2.980961,
+  -2.999632,
+  -3.017745,
+  -3.035282,
+  -3.052228,
+  -3.068567,
+  -3.084285,
+  -3.099371,
+  -3.113813,
+  -3.127605,
+  -3.140738,
+  3.129975,
+  3.118167,
+  3.107022,
+  3.096537,
+  3.086709,
+  3.077531,
+  3.068996,
+  3.061096,
+  3.053821,
+  3.047159,
+  3.041102,
+  3.035636,
+  3.030753,
+  3.026441,
+  3.022690,
+  3.019491,
+  3.016836,
+  3.014718,
+  3.013132,
+  3.012072,
+  3.011535,
+  3.011521,
+  3.012028,
+  3.013057,
+  3.014612,
+  3.016695,
+  3.019310,
+  3.022463,
+  3.026160,
+  3.030407,
+  3.035212,
+  3.040580,
+  3.046520,
+  3.053038,
+  3.060141,
+  3.067836,
+  3.076128,
+  3.085023,
+  3.094525,
+  3.104639,
+  3.115367,
+  3.126712,
+  3.138674,
+  -3.131930,
+  -3.118731,
+  -3.104915,
+  -3.090485,
+  -3.075444,
+  -3.059795,
+  -3.043543,
+  -3.026695,
+  -3.009254,
+  -2.991229,
+  -2.972625,
+  -2.953449,
+  -2.933710,
+  -2.913414,
+  -2.892567,
+  -2.871176,
+  -2.849248,
+  -2.826787,
+  -2.803798,
+  -2.780284,
+  -2.756247,
+  -2.731689,
+  -2.706609,
+  -2.681005,
+  -2.654875,
+  -2.628213,
+  -2.601015,
+  -2.573272,
+  -2.544977,
+  -2.516121,
+  -2.486694,
+  -2.456686,
+  -2.426084,
+  -2.394879,
+  -2.363060,
+  -2.330616,
+  -2.297538,
+  -2.263816,
+  -2.229444,
+  -2.194416,
+  -2.158727,
+  -2.122375,
+  -2.085359,
+  -2.047682,
+  -2.009347,
+  -1.970361,
+  -1.930732,
+  -1.890470,
+  -1.849587,
+  -1.808098,
+  -1.766017,
+  -1.723360,
+  -1.680145,
+  -1.636388,
+  -1.592105,
+  -1.547313,
+  -1.502025,
+  -1.456256,
+  -1.410016,
+  -1.363314,
+  -1.316157,
+  -1.268547,
+  -1.220486,
+  -1.171971,
+  -1.122997,
+  -1.073555,
+  -1.023636,
+  -0.973227,
+  -0.922312,
+  -0.870875,
+  -0.818899,
+  -0.766366,
+  -0.713257,
+  -0.659554,
+  -0.605242,
+  -0.550303,
+  -0.494723,
+  -0.438492,
+  -0.381598,
+  -0.324036,
+  -0.265800,
+  -0.206889,
+  -0.147303,
+  -0.087046,
+  -0.026121,
+  0.035463,
+  0.097698,
+  0.160576,
+  0.224087,
+  0.288221,
+  0.352969,
+  0.418323,
+  0.484276,
+  0.550822,
+  0.617958,
+  0.685681,
+  0.753991,
+  0.822889,
+  0.892378,
+  0.962462,
+  1.033144,
+  1.104430,
+  1.176325,
+  1.248833,
+  1.321956,
+  1.395696,
+  1.470051,
+  1.545019,
+  1.620593,
+  1.696763,
+  1.773516,
+  1.850837,
+  1.928705,
+  2.007097,
+  2.085987,
+  2.165347,
+  2.245145,
+  2.325347,
+  2.405919,
+  2.486824,
+  2.568025,
+  2.649485,
+  2.731167,
+  2.813033,
+  2.895045,
+  2.977167,
+  3.059362};
diff --git a/libs/libcodec2/src/hanning.h b/libs/libcodec2/src/hanning.h
new file mode 100644 (file)
index 0000000..81d88dc
--- /dev/null
@@ -0,0 +1,644 @@
+/* Generated by hanning_file() Octave function */
+
+const float hanning[]={
+  0,
+  2.4171e-05,
+  9.66816e-05,
+  0.000217525,
+  0.000386689,
+  0.000604158,
+  0.00086991,
+  0.00118392,
+  0.00154616,
+  0.00195659,
+  0.00241517,
+  0.00292186,
+  0.00347661,
+  0.00407937,
+  0.00473008,
+  0.00542867,
+  0.00617507,
+  0.00696922,
+  0.00781104,
+  0.00870045,
+  0.00963736,
+  0.0106217,
+  0.0116533,
+  0.0127322,
+  0.0138581,
+  0.0150311,
+  0.0162509,
+  0.0175175,
+  0.0188308,
+  0.0201906,
+  0.0215968,
+  0.0230492,
+  0.0245478,
+  0.0260923,
+  0.0276826,
+  0.0293186,
+  0.0310001,
+  0.032727,
+  0.034499,
+  0.036316,
+  0.0381779,
+  0.0400844,
+  0.0420354,
+  0.0440307,
+  0.04607,
+  0.0481533,
+  0.0502802,
+  0.0524506,
+  0.0546643,
+  0.056921,
+  0.0592206,
+  0.0615627,
+  0.0639473,
+  0.0663741,
+  0.0688427,
+  0.0713531,
+  0.0739048,
+  0.0764978,
+  0.0791318,
+  0.0818064,
+  0.0845214,
+  0.0872767,
+  0.0900718,
+  0.0929066,
+  0.0957807,
+  0.0986939,
+  0.101646,
+  0.104636,
+  0.107665,
+  0.110732,
+  0.113836,
+  0.116978,
+  0.120156,
+  0.123372,
+  0.126624,
+  0.129912,
+  0.133235,
+  0.136594,
+  0.139989,
+  0.143418,
+  0.146881,
+  0.150379,
+  0.153911,
+  0.157476,
+  0.161074,
+  0.164705,
+  0.168368,
+  0.172063,
+  0.17579,
+  0.179549,
+  0.183338,
+  0.187158,
+  0.191008,
+  0.194888,
+  0.198798,
+  0.202737,
+  0.206704,
+  0.2107,
+  0.214724,
+  0.218775,
+  0.222854,
+  0.226959,
+  0.231091,
+  0.235249,
+  0.239432,
+  0.243641,
+  0.247874,
+  0.252132,
+  0.256414,
+  0.260719,
+  0.265047,
+  0.269398,
+  0.273772,
+  0.278167,
+  0.282584,
+  0.287021,
+  0.29148,
+  0.295958,
+  0.300456,
+  0.304974,
+  0.30951,
+  0.314065,
+  0.318638,
+  0.323228,
+  0.327835,
+  0.332459,
+  0.3371,
+  0.341756,
+  0.346427,
+  0.351113,
+  0.355814,
+  0.360528,
+  0.365256,
+  0.369997,
+  0.374751,
+  0.379516,
+  0.384293,
+  0.389082,
+  0.393881,
+  0.398691,
+  0.40351,
+  0.408338,
+  0.413176,
+  0.418022,
+  0.422876,
+  0.427737,
+  0.432605,
+  0.43748,
+  0.44236,
+  0.447247,
+  0.452138,
+  0.457034,
+  0.461935,
+  0.466839,
+  0.471746,
+  0.476655,
+  0.481568,
+  0.486481,
+  0.491397,
+  0.496313,
+  0.501229,
+  0.506145,
+  0.511061,
+  0.515976,
+  0.520889,
+  0.5258,
+  0.530708,
+  0.535614,
+  0.540516,
+  0.545414,
+  0.550308,
+  0.555197,
+  0.560081,
+  0.564958,
+  0.56983,
+  0.574695,
+  0.579552,
+  0.584402,
+  0.589244,
+  0.594077,
+  0.598901,
+  0.603715,
+  0.60852,
+  0.613314,
+  0.618097,
+  0.622868,
+  0.627628,
+  0.632375,
+  0.63711,
+  0.641831,
+  0.646538,
+  0.651232,
+  0.655911,
+  0.660574,
+  0.665222,
+  0.669855,
+  0.67447,
+  0.679069,
+  0.683651,
+  0.688215,
+  0.69276,
+  0.697287,
+  0.701795,
+  0.706284,
+  0.710752,
+  0.7152,
+  0.719627,
+  0.724033,
+  0.728418,
+  0.73278,
+  0.73712,
+  0.741437,
+  0.74573,
+  0.75,
+  0.754246,
+  0.758467,
+  0.762663,
+  0.766833,
+  0.770978,
+  0.775097,
+  0.779189,
+  0.783254,
+  0.787291,
+  0.791301,
+  0.795283,
+  0.799236,
+  0.80316,
+  0.807055,
+  0.810921,
+  0.814756,
+  0.81856,
+  0.822334,
+  0.826077,
+  0.829788,
+  0.833468,
+  0.837115,
+  0.840729,
+  0.844311,
+  0.847859,
+  0.851374,
+  0.854855,
+  0.858301,
+  0.861713,
+  0.86509,
+  0.868431,
+  0.871737,
+  0.875007,
+  0.87824,
+  0.881437,
+  0.884598,
+  0.887721,
+  0.890806,
+  0.893854,
+  0.896864,
+  0.899835,
+  0.902768,
+  0.905661,
+  0.908516,
+  0.911331,
+  0.914106,
+  0.916841,
+  0.919536,
+  0.92219,
+  0.924804,
+  0.927376,
+  0.929907,
+  0.932397,
+  0.934845,
+  0.93725,
+  0.939614,
+  0.941935,
+  0.944213,
+  0.946448,
+  0.94864,
+  0.950789,
+  0.952894,
+  0.954955,
+  0.956972,
+  0.958946,
+  0.960874,
+  0.962759,
+  0.964598,
+  0.966393,
+  0.968142,
+  0.969846,
+  0.971505,
+  0.973118,
+  0.974686,
+  0.976207,
+  0.977683,
+  0.979112,
+  0.980495,
+  0.981832,
+  0.983122,
+  0.984365,
+  0.985561,
+  0.986711,
+  0.987813,
+  0.988868,
+  0.989876,
+  0.990837,
+  0.99175,
+  0.992616,
+  0.993434,
+  0.994204,
+  0.994927,
+  0.995601,
+  0.996228,
+  0.996807,
+  0.997337,
+  0.99782,
+  0.998255,
+  0.998641,
+  0.998979,
+  0.999269,
+  0.999511,
+  0.999704,
+  0.999849,
+  0.999946,
+  0.999994,
+  0.999994,
+  0.999946,
+  0.999849,
+  0.999704,
+  0.999511,
+  0.999269,
+  0.998979,
+  0.998641,
+  0.998255,
+  0.99782,
+  0.997337,
+  0.996807,
+  0.996228,
+  0.995601,
+  0.994927,
+  0.994204,
+  0.993434,
+  0.992616,
+  0.99175,
+  0.990837,
+  0.989876,
+  0.988868,
+  0.987813,
+  0.986711,
+  0.985561,
+  0.984365,
+  0.983122,
+  0.981832,
+  0.980495,
+  0.979112,
+  0.977683,
+  0.976207,
+  0.974686,
+  0.973118,
+  0.971505,
+  0.969846,
+  0.968142,
+  0.966393,
+  0.964598,
+  0.962759,
+  0.960874,
+  0.958946,
+  0.956972,
+  0.954955,
+  0.952894,
+  0.950789,
+  0.94864,
+  0.946448,
+  0.944213,
+  0.941935,
+  0.939614,
+  0.93725,
+  0.934845,
+  0.932397,
+  0.929907,
+  0.927376,
+  0.924804,
+  0.92219,
+  0.919536,
+  0.916841,
+  0.914106,
+  0.911331,
+  0.908516,
+  0.905661,
+  0.902768,
+  0.899835,
+  0.896864,
+  0.893854,
+  0.890806,
+  0.887721,
+  0.884598,
+  0.881437,
+  0.87824,
+  0.875007,
+  0.871737,
+  0.868431,
+  0.86509,
+  0.861713,
+  0.858301,
+  0.854855,
+  0.851374,
+  0.847859,
+  0.844311,
+  0.840729,
+  0.837115,
+  0.833468,
+  0.829788,
+  0.826077,
+  0.822334,
+  0.81856,
+  0.814756,
+  0.810921,
+  0.807055,
+  0.80316,
+  0.799236,
+  0.795283,
+  0.791301,
+  0.787291,
+  0.783254,
+  0.779189,
+  0.775097,
+  0.770978,
+  0.766833,
+  0.762663,
+  0.758467,
+  0.754246,
+  0.75,
+  0.74573,
+  0.741437,
+  0.73712,
+  0.73278,
+  0.728418,
+  0.724033,
+  0.719627,
+  0.7152,
+  0.710752,
+  0.706284,
+  0.701795,
+  0.697287,
+  0.69276,
+  0.688215,
+  0.683651,
+  0.679069,
+  0.67447,
+  0.669855,
+  0.665222,
+  0.660574,
+  0.655911,
+  0.651232,
+  0.646538,
+  0.641831,
+  0.63711,
+  0.632375,
+  0.627628,
+  0.622868,
+  0.618097,
+  0.613314,
+  0.60852,
+  0.603715,
+  0.598901,
+  0.594077,
+  0.589244,
+  0.584402,
+  0.579552,
+  0.574695,
+  0.56983,
+  0.564958,
+  0.560081,
+  0.555197,
+  0.550308,
+  0.545414,
+  0.540516,
+  0.535614,
+  0.530708,
+  0.5258,
+  0.520889,
+  0.515976,
+  0.511061,
+  0.506145,
+  0.501229,
+  0.496313,
+  0.491397,
+  0.486481,
+  0.481568,
+  0.476655,
+  0.471746,
+  0.466839,
+  0.461935,
+  0.457034,
+  0.452138,
+  0.447247,
+  0.44236,
+  0.43748,
+  0.432605,
+  0.427737,
+  0.422876,
+  0.418022,
+  0.413176,
+  0.408338,
+  0.40351,
+  0.398691,
+  0.393881,
+  0.389082,
+  0.384293,
+  0.379516,
+  0.374751,
+  0.369997,
+  0.365256,
+  0.360528,
+  0.355814,
+  0.351113,
+  0.346427,
+  0.341756,
+  0.3371,
+  0.332459,
+  0.327835,
+  0.323228,
+  0.318638,
+  0.314065,
+  0.30951,
+  0.304974,
+  0.300456,
+  0.295958,
+  0.29148,
+  0.287021,
+  0.282584,
+  0.278167,
+  0.273772,
+  0.269398,
+  0.265047,
+  0.260719,
+  0.256414,
+  0.252132,
+  0.247874,
+  0.243641,
+  0.239432,
+  0.235249,
+  0.231091,
+  0.226959,
+  0.222854,
+  0.218775,
+  0.214724,
+  0.2107,
+  0.206704,
+  0.202737,
+  0.198798,
+  0.194888,
+  0.191008,
+  0.187158,
+  0.183338,
+  0.179549,
+  0.17579,
+  0.172063,
+  0.168368,
+  0.164705,
+  0.161074,
+  0.157476,
+  0.153911,
+  0.150379,
+  0.146881,
+  0.143418,
+  0.139989,
+  0.136594,
+  0.133235,
+  0.129912,
+  0.126624,
+  0.123372,
+  0.120156,
+  0.116978,
+  0.113836,
+  0.110732,
+  0.107665,
+  0.104636,
+  0.101646,
+  0.0986939,
+  0.0957807,
+  0.0929066,
+  0.0900718,
+  0.0872767,
+  0.0845214,
+  0.0818064,
+  0.0791318,
+  0.0764978,
+  0.0739048,
+  0.0713531,
+  0.0688427,
+  0.0663741,
+  0.0639473,
+  0.0615627,
+  0.0592206,
+  0.056921,
+  0.0546643,
+  0.0524506,
+  0.0502802,
+  0.0481533,
+  0.04607,
+  0.0440307,
+  0.0420354,
+  0.0400844,
+  0.0381779,
+  0.036316,
+  0.034499,
+  0.032727,
+  0.0310001,
+  0.0293186,
+  0.0276826,
+  0.0260923,
+  0.0245478,
+  0.0230492,
+  0.0215968,
+  0.0201906,
+  0.0188308,
+  0.0175175,
+  0.0162509,
+  0.0150311,
+  0.0138581,
+  0.0127322,
+  0.0116533,
+  0.0106217,
+  0.00963736,
+  0.00870045,
+  0.00781104,
+  0.00696922,
+  0.00617507,
+  0.00542867,
+  0.00473008,
+  0.00407937,
+  0.00347661,
+  0.00292186,
+  0.00241517,
+  0.00195659,
+  0.00154616,
+  0.00118392,
+  0.00086991,
+  0.000604158,
+  0.000386689,
+  0.000217525,
+  9.66816e-05,
+  2.4171e-05,
+  0
+};
index ff7faacb6771d9b440ac0cd57fd70224a41a4d07..a8d818fa4279eebd19ee07b9dbc6800f1f5bfe2a 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <assert.h>
 #include <math.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "defines.h"
 #include "interp.h"
+#include "lsp.h"
+#include "quantise.h"
 
 float sample_log_amp(MODEL *model, float w);
 
@@ -48,6 +50,12 @@ float sample_log_amp(MODEL *model, float w);
 
   This version can interpolate the amplitudes between two frames of
   different Wo and L.
+
+  This version works by log linear interpolation, but listening tests
+  showed it creates problems in background noise, e.g. hts2a and mmt1.
+  When this function is used (--dec mode) bg noise appears to be
+  amplitude modulated, and gets louder.  The interp_lsp() function
+  below seems to do a better job.
   
 \*---------------------------------------------------------------------------*/
 
@@ -108,15 +116,170 @@ float sample_log_amp(MODEL *model, float w)
     assert(f <= 1.0);
 
     if (m < 1) {
-       log_amp = f*log10(model->A[1]);
+       log_amp = f*log10(model->A[1] + 1E-6);
     }
     else if ((m+1) > model->L) {
-       log_amp = (1.0-f)*log10(model->A[model->L]);
+       log_amp = (1.0-f)*log10(model->A[model->L] + 1E-6);
     }
     else {
-       log_amp = (1.0-f)*log10(model->A[m]) + f*log10(model->A[m+1]);
+       log_amp = (1.0-f)*log10(model->A[m] + 1E-6) + 
+                  f*log10(model->A[m+1] + 1E-6);
     }
 
     return log_amp;
 }
 
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: interp_lsp()        
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 10 Nov 2010
+        
+  Given two frames decribed by model parameters 20ms apart, determines
+  the model parameters of the 10ms frame between them.  Assumes
+  voicing is available for middle (interpolated) frame.  Outputs are
+  amplitudes and Wo for the interpolated frame.
+
+  This version uses interpolation of LSPs, seems to do a better job
+  with bg noise.
+  
+\*---------------------------------------------------------------------------*/
+
+void interpolate_lsp(
+  kiss_fft_cfg  fft_fwd_cfg, 
+  MODEL *interp,    /* interpolated model params                     */
+  MODEL *prev,      /* previous frames model params                  */
+  MODEL *next,      /* next frames model params                      */
+  float *prev_lsps, /* previous frames LSPs                          */
+  float  prev_e,    /* previous frames LPC energy                    */
+  float *next_lsps, /* next frames LSPs                              */
+  float  next_e,    /* next frames LPC energy                        */
+  float *ak_interp, /* interpolated aks for this frame               */
+  float *lsps_interp/* interpolated lsps for this frame              */
+)
+{
+    int   i;
+    float e;
+    float snr;
+
+    /* trap corner case where V est is probably wrong */
+
+    if (interp->voiced && !prev->voiced && !next->voiced) {
+       interp->voiced = 0;
+    }  
+   
+    /* Wo depends on voicing of this and adjacent frames */
+
+    if (interp->voiced) {
+       if (prev->voiced && next->voiced)
+           interp->Wo = (prev->Wo + next->Wo)/2.0;
+       if (!prev->voiced && next->voiced)
+           interp->Wo = next->Wo;
+       if (prev->voiced && !next->voiced)
+           interp->Wo = prev->Wo;
+    }
+    else {
+       interp->Wo = TWO_PI/P_MAX;
+    }
+    interp->L = PI/interp->Wo;
+
+    //printf("  interp: prev_v: %d next_v: %d prev_Wo: %f next_Wo: %f\n",
+    //    prev->voiced, next->voiced, prev->Wo, next->Wo);
+    //printf("  interp: Wo: %1.5f  L: %d\n", interp->Wo, interp->L);
+
+    /* interpolate LSPs */
+
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_interp[i] = (prev_lsps[i] + next_lsps[i])/2.0;
+    }
+
+    /* Interpolate LPC energy in log domain */
+
+    e = pow(10.0, (log10(prev_e) + log10(next_e))/2.0);
+    //printf("  interp: e: %f\n", e);
+
+    /* convert back to amplitudes */
+
+    lsp_to_lpc(lsps_interp, ak_interp, LPC_ORD);
+    aks_to_M2(fft_fwd_cfg, ak_interp, LPC_ORD, interp, e, &snr, 0, 0, 1, 1, LPCPF_BETA, LPCPF_GAMMA); 
+    //printf("  interp: ak[1]: %f A[1] %f\n", ak_interp[1], interp->A[1]);
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: interp_Wo()         
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 22 May 2012
+        
+  Interpolates centre 10ms sample of Wo and L samples given two
+  samples 20ms apart. Assumes voicing is available for centre
+  (interpolated) frame.
+  
+\*---------------------------------------------------------------------------*/
+
+void interp_Wo(
+  MODEL *interp,    /* interpolated model params                     */
+  MODEL *prev,      /* previous frames model params                  */
+  MODEL *next       /* next frames model params                      */
+              )
+{
+    /* trap corner case where voicing est is probably wrong */
+
+    if (interp->voiced && !prev->voiced && !next->voiced) {
+       interp->voiced = 0;
+    }  
+   
+    /* Wo depends on voicing of this and adjacent frames */
+
+    if (interp->voiced) {
+       if (prev->voiced && next->voiced)
+           interp->Wo = (prev->Wo + next->Wo)/2.0;
+       if (!prev->voiced && next->voiced)
+           interp->Wo = next->Wo;
+       if (prev->voiced && !next->voiced)
+           interp->Wo = prev->Wo;
+    }
+    else {
+       interp->Wo = TWO_PI/P_MAX;
+    }
+    interp->L = PI/interp->Wo;
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: interp_energy()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 22 May 2012
+        
+  Interpolates centre 10ms sample of energy given two samples 20ms
+  apart.
+  
+\*---------------------------------------------------------------------------*/
+
+float interp_energy(float prev_e, float next_e)
+{
+    return pow(10.0, (log10(prev_e) + log10(next_e))/2.0);
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: interpolate_lsp_ver2()      
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 22 May 2012
+        
+  Weighted interpolation of LSPs.
+  
+\*---------------------------------------------------------------------------*/
+
+void interpolate_lsp_ver2(float interp[], float prev[],  float next[], float weight)
+{
+    int i;
+
+    for(i=0; i<LPC_ORD; i++)
+       interp[i] = (1.0 - weight)*prev[i] + weight*next[i];
+}
+
index 0684b5bbff6c05698e47f772411085d69eb6d296..312ccb76da586e153b9db6420067d25147ac18b0 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __INTERP__
 #define __INTERP__
 
+#include "kiss_fft.h"
+
 void interpolate(MODEL *interp, MODEL *prev, MODEL *next);
+void interpolate_lsp(kiss_fft_cfg  fft_dec_cfg,
+                    MODEL *interp, MODEL *prev, MODEL *next, 
+                    float *prev_lsps, float  prev_e,
+                    float *next_lsps, float  next_e,
+                    float *ak_interp, float *lsps_interp);
+void interp_Wo(MODEL *interp, MODEL *prev, MODEL *next);
+float interp_energy(float prev, float next);
+void interpolate_lsp_ver2(float interp[], float prev[],  float next[], float weight);
 
 #endif
diff --git a/libs/libcodec2/src/kiss_fft.c b/libs/libcodec2/src/kiss_fft.c
new file mode 100644 (file)
index 0000000..465d6c9
--- /dev/null
@@ -0,0 +1,408 @@
+/*
+Copyright (c) 2003-2010, Mark Borgerding
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#include "_kiss_fft_guts.h"
+/* The guts header contains all the multiplication and addition macros that are defined for
+ fixed or floating point complex numbers.  It also delares the kf_ internal functions.
+ */
+
+static void kf_bfly2(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx * Fout2;
+    kiss_fft_cpx * tw1 = st->twiddles;
+    kiss_fft_cpx t;
+    Fout2 = Fout + m;
+    do{
+        C_FIXDIV(*Fout,2); C_FIXDIV(*Fout2,2);
+
+        C_MUL (t,  *Fout2 , *tw1);
+        tw1 += fstride;
+        C_SUB( *Fout2 ,  *Fout , t );
+        C_ADDTO( *Fout ,  t );
+        ++Fout2;
+        ++Fout;
+    }while (--m);
+}
+
+static void kf_bfly4(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        const size_t m
+        )
+{
+    kiss_fft_cpx *tw1,*tw2,*tw3;
+    kiss_fft_cpx scratch[6];
+    size_t k=m;
+    const size_t m2=2*m;
+    const size_t m3=3*m;
+
+
+    tw3 = tw2 = tw1 = st->twiddles;
+
+    do {
+        C_FIXDIV(*Fout,4); C_FIXDIV(Fout[m],4); C_FIXDIV(Fout[m2],4); C_FIXDIV(Fout[m3],4);
+
+        C_MUL(scratch[0],Fout[m] , *tw1 );
+        C_MUL(scratch[1],Fout[m2] , *tw2 );
+        C_MUL(scratch[2],Fout[m3] , *tw3 );
+
+        C_SUB( scratch[5] , *Fout, scratch[1] );
+        C_ADDTO(*Fout, scratch[1]);
+        C_ADD( scratch[3] , scratch[0] , scratch[2] );
+        C_SUB( scratch[4] , scratch[0] , scratch[2] );
+        C_SUB( Fout[m2], *Fout, scratch[3] );
+        tw1 += fstride;
+        tw2 += fstride*2;
+        tw3 += fstride*3;
+        C_ADDTO( *Fout , scratch[3] );
+
+        if(st->inverse) {
+            Fout[m].r = scratch[5].r - scratch[4].i;
+            Fout[m].i = scratch[5].i + scratch[4].r;
+            Fout[m3].r = scratch[5].r + scratch[4].i;
+            Fout[m3].i = scratch[5].i - scratch[4].r;
+        }else{
+            Fout[m].r = scratch[5].r + scratch[4].i;
+            Fout[m].i = scratch[5].i - scratch[4].r;
+            Fout[m3].r = scratch[5].r - scratch[4].i;
+            Fout[m3].i = scratch[5].i + scratch[4].r;
+        }
+        ++Fout;
+    }while(--k);
+}
+
+static void kf_bfly3(
+         kiss_fft_cpx * Fout,
+         const size_t fstride,
+         const kiss_fft_cfg st,
+         size_t m
+         )
+{
+     size_t k=m;
+     const size_t m2 = 2*m;
+     kiss_fft_cpx *tw1,*tw2;
+     kiss_fft_cpx scratch[5];
+     kiss_fft_cpx epi3;
+     epi3 = st->twiddles[fstride*m];
+
+     tw1=tw2=st->twiddles;
+
+     do{
+         C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);
+
+         C_MUL(scratch[1],Fout[m] , *tw1);
+         C_MUL(scratch[2],Fout[m2] , *tw2);
+
+         C_ADD(scratch[3],scratch[1],scratch[2]);
+         C_SUB(scratch[0],scratch[1],scratch[2]);
+         tw1 += fstride;
+         tw2 += fstride*2;
+
+         Fout[m].r = Fout->r - HALF_OF(scratch[3].r);
+         Fout[m].i = Fout->i - HALF_OF(scratch[3].i);
+
+         C_MULBYSCALAR( scratch[0] , epi3.i );
+
+         C_ADDTO(*Fout,scratch[3]);
+
+         Fout[m2].r = Fout[m].r + scratch[0].i;
+         Fout[m2].i = Fout[m].i - scratch[0].r;
+
+         Fout[m].r -= scratch[0].i;
+         Fout[m].i += scratch[0].r;
+
+         ++Fout;
+     }while(--k);
+}
+
+static void kf_bfly5(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
+    int u;
+    kiss_fft_cpx scratch[13];
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx *tw;
+    kiss_fft_cpx ya,yb;
+    ya = twiddles[fstride*m];
+    yb = twiddles[fstride*2*m];
+
+    Fout0=Fout;
+    Fout1=Fout0+m;
+    Fout2=Fout0+2*m;
+    Fout3=Fout0+3*m;
+    Fout4=Fout0+4*m;
+
+    tw=st->twiddles;
+    for ( u=0; u<m; ++u ) {
+        C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
+        scratch[0] = *Fout0;
+
+        C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
+        C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
+        C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
+        C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
+
+        C_ADD( scratch[7],scratch[1],scratch[4]);
+        C_SUB( scratch[10],scratch[1],scratch[4]);
+        C_ADD( scratch[8],scratch[2],scratch[3]);
+        C_SUB( scratch[9],scratch[2],scratch[3]);
+
+        Fout0->r += scratch[7].r + scratch[8].r;
+        Fout0->i += scratch[7].i + scratch[8].i;
+
+        scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);
+        scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);
+
+        scratch[6].r =  S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);
+        scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);
+
+        C_SUB(*Fout1,scratch[5],scratch[6]);
+        C_ADD(*Fout4,scratch[5],scratch[6]);
+
+        scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);
+        scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);
+        scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);
+        scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);
+
+        C_ADD(*Fout2,scratch[11],scratch[12]);
+        C_SUB(*Fout3,scratch[11],scratch[12]);
+
+        ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;
+    }
+}
+
+/* perform the butterfly for one stage of a mixed radix FFT */
+static void kf_bfly_generic(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m,
+        int p
+        )
+{
+    int u,k,q1,q;
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx t;
+    int Norig = st->nfft;
+
+    kiss_fft_cpx * scratch = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC(sizeof(kiss_fft_cpx)*p);
+
+    for ( u=0; u<m; ++u ) {
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            scratch[q1] = Fout[ k  ];
+            C_FIXDIV(scratch[q1],p);
+            k += m;
+        }
+
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            int twidx=0;
+            Fout[ k ] = scratch[0];
+            for (q=1;q<p;++q ) {
+                twidx += fstride * k;
+                if (twidx>=Norig) twidx-=Norig;
+                C_MUL(t,scratch[q] , twiddles[twidx] );
+                C_ADDTO( Fout[ k ] ,t);
+            }
+            k += m;
+        }
+    }
+    KISS_FFT_TMP_FREE(scratch);
+}
+
+static
+void kf_work(
+        kiss_fft_cpx * Fout,
+        const kiss_fft_cpx * f,
+        const size_t fstride,
+        int in_stride,
+        int * factors,
+        const kiss_fft_cfg st
+        )
+{
+    kiss_fft_cpx * Fout_beg=Fout;
+    const int p=*factors++; /* the radix  */
+    const int m=*factors++; /* stage's fft length/p */
+    const kiss_fft_cpx * Fout_end = Fout + p*m;
+
+#ifdef _OPENMP
+    // use openmp extensions at the 
+    // top-level (not recursive)
+    if (fstride==1 && p<=5)
+    {
+        int k;
+
+        // execute the p different work units in different threads
+#       pragma omp parallel for
+        for (k=0;k<p;++k) 
+            kf_work( Fout +k*m, f+ fstride*in_stride*k,fstride*p,in_stride,factors,st);
+        // all threads have joined by this point
+
+        switch (p) {
+            case 2: kf_bfly2(Fout,fstride,st,m); break;
+            case 3: kf_bfly3(Fout,fstride,st,m); break; 
+            case 4: kf_bfly4(Fout,fstride,st,m); break;
+            case 5: kf_bfly5(Fout,fstride,st,m); break; 
+            default: kf_bfly_generic(Fout,fstride,st,m,p); break;
+        }
+        return;
+    }
+#endif
+
+    if (m==1) {
+        do{
+            *Fout = *f;
+            f += fstride*in_stride;
+        }while(++Fout != Fout_end );
+    }else{
+        do{
+            // recursive call:
+            // DFT of size m*p performed by doing
+            // p instances of smaller DFTs of size m, 
+            // each one takes a decimated version of the input
+            kf_work( Fout , f, fstride*p, in_stride, factors,st);
+            f += fstride*in_stride;
+        }while( (Fout += m) != Fout_end );
+    }
+
+    Fout=Fout_beg;
+
+    // recombine the p smaller DFTs 
+    switch (p) {
+        case 2: kf_bfly2(Fout,fstride,st,m); break;
+        case 3: kf_bfly3(Fout,fstride,st,m); break; 
+        case 4: kf_bfly4(Fout,fstride,st,m); break;
+        case 5: kf_bfly5(Fout,fstride,st,m); break; 
+        default: kf_bfly_generic(Fout,fstride,st,m,p); break;
+    }
+}
+
+/*  facbuf is populated by p1,m1,p2,m2, ...
+    where 
+    p[i] * m[i] = m[i-1]
+    m0 = n                  */
+static 
+void kf_factor(int n,int * facbuf)
+{
+    int p=4;
+    double floor_sqrt;
+    floor_sqrt = floor( sqrt((double)n) );
+
+    /*factor out powers of 4, powers of 2, then any remaining primes */
+    do {
+        while (n % p) {
+            switch (p) {
+                case 4: p = 2; break;
+                case 2: p = 3; break;
+                default: p += 2; break;
+            }
+            if (p > floor_sqrt)
+                p = n;          /* no more factors, skip to end */
+        }
+        n /= p;
+        *facbuf++ = p;
+        *facbuf++ = n;
+    } while (n > 1);
+}
+
+/*
+ *
+ * User-callable function to allocate all necessary storage space for the fft.
+ *
+ * The return value is a contiguous block of memory, allocated with malloc.  As such,
+ * It can be freed with free(), rather than a kiss_fft-specific function.
+ * */
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem )
+{
+    kiss_fft_cfg st=NULL;
+    size_t memneeded = sizeof(struct kiss_fft_state)
+        + sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
+
+    if ( lenmem==NULL ) {
+        st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
+    }else{
+        if (mem != NULL && *lenmem >= memneeded)
+            st = (kiss_fft_cfg)mem;
+        *lenmem = memneeded;
+    }
+    if (st) {
+        int i;
+        st->nfft=nfft;
+        st->inverse = inverse_fft;
+
+        for (i=0;i<nfft;++i) {
+            const double pi=3.141592653589793238462643383279502884197169399375105820974944;
+            double phase = -2*pi*i / nfft;
+            if (st->inverse)
+                phase *= -1;
+            kf_cexp(st->twiddles+i, phase );
+        }
+
+        kf_factor(nfft,st->factors);
+    }
+    return st;
+}
+
+
+void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+{
+    if (fin == fout) {
+        //NOTE: this is not really an in-place FFT algorithm.
+        //It just performs an out-of-place FFT into a temp buffer
+        kiss_fft_cpx * tmpbuf = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC( sizeof(kiss_fft_cpx)*st->nfft);
+        kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
+        memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
+        KISS_FFT_TMP_FREE(tmpbuf);
+    }else{
+        kf_work( fout, fin, 1,in_stride, st->factors,st );
+    }
+}
+
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
+{
+    kiss_fft_stride(cfg,fin,fout,1);
+}
+
+
+void kiss_fft_cleanup(void)
+{
+    // nothing needed any more
+}
+
+int kiss_fft_next_fast_size(int n)
+{
+    while(1) {
+        int m=n;
+        while ( (m%2) == 0 ) m/=2;
+        while ( (m%3) == 0 ) m/=3;
+        while ( (m%5) == 0 ) m/=5;
+        if (m<=1)
+            break; /* n is completely factorable by twos, threes, and fives */
+        n++;
+    }
+    return n;
+}
diff --git a/libs/libcodec2/src/kiss_fft.h b/libs/libcodec2/src/kiss_fft.h
new file mode 100644 (file)
index 0000000..64c50f4
--- /dev/null
@@ -0,0 +1,124 @@
+#ifndef KISS_FFT_H
+#define KISS_FFT_H
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ ATTENTION!
+ If you would like a :
+ -- a utility that will handle the caching of fft objects
+ -- real-only (no imaginary time component ) FFT
+ -- a multi-dimensional FFT
+ -- a command-line utility to perform ffts
+ -- a command-line utility to perform fast-convolution filtering
+
+ Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
+  in the tools/ directory.
+*/
+
+#ifdef USE_SIMD
+# include <xmmintrin.h>
+# define kiss_fft_scalar __m128
+#define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16)
+#define KISS_FFT_FREE _mm_free
+#else  
+#define KISS_FFT_MALLOC malloc
+#define KISS_FFT_FREE free
+#endif 
+
+
+#ifdef FIXED_POINT
+#include <sys/types.h> 
+# if (FIXED_POINT == 32)
+#  define kiss_fft_scalar int32_t
+# else 
+#  define kiss_fft_scalar int16_t
+# endif
+#else
+# ifndef kiss_fft_scalar
+/*  default is float */
+#   define kiss_fft_scalar float
+# endif
+#endif
+
+typedef struct {
+    kiss_fft_scalar r;
+    kiss_fft_scalar i;
+}kiss_fft_cpx;
+
+typedef struct kiss_fft_state* kiss_fft_cfg;
+
+/* 
+ *  kiss_fft_alloc
+ *  
+ *  Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
+ *
+ *  typical usage:      kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
+ *
+ *  The return value from fft_alloc is a cfg buffer used internally
+ *  by the fft routine or NULL.
+ *
+ *  If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
+ *  The returned value should be free()d when done to avoid memory leaks.
+ *  
+ *  The state can be placed in a user supplied buffer 'mem':
+ *  If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
+ *      then the function places the cfg in mem and the size used in *lenmem
+ *      and returns mem.
+ *  
+ *  If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
+ *      then the function returns NULL and places the minimum cfg 
+ *      buffer size in *lenmem.
+ * */
+
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); 
+
+/*
+ * kiss_fft(cfg,in_out_buf)
+ *
+ * Perform an FFT on a complex input buffer.
+ * for a forward FFT,
+ * fin should be  f[0] , f[1] , ... ,f[nfft-1]
+ * fout will be   F[0] , F[1] , ... ,F[nfft-1]
+ * Note that each element is complex and can be accessed like
+    f[k].r and f[k].i
+ * */
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
+
+/*
+ A more generic version of the above function. It reads its input from every Nth sample.
+ * */
+void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
+
+/* If kiss_fft_alloc allocated a buffer, it is one contiguous 
+   buffer and can be simply free()d when no longer needed*/
+#define kiss_fft_free free
+
+/*
+ Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 
+ your compiler output to call this before you exit.
+*/
+void kiss_fft_cleanup(void);
+       
+
+/*
+ * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5)
+ */
+int kiss_fft_next_fast_size(int n);
+
+/* for real ffts, we need an even size */
+#define kiss_fftr_next_fast_size_real(n) \
+        (kiss_fft_next_fast_size( ((n)+1)>>1)<<1)
+
+#ifdef __cplusplus
+} 
+#endif
+
+#endif
index 64f7455ab31cdeb793360f2c3d968936b3f184a1..b296cac58867d39b4a91fd5e3564c3380e1f5b65 100755 (executable)
@@ -4,6 +4,6 @@
 #
 # Listen to files processed with sim.sh
 
-../script/menu.sh ../raw/$1.raw $1_uq.raw $1_phase0.raw $1_lpc10.raw $1_lsp.raw $1_phase0_lpc10.raw $1_phase0_lsp.raw $1_phase0_lsp_dec.raw $2 $3
+../script/menu.sh $1_uq.raw $1_lpc10.raw $1_lpcpf.raw $1_phase0.raw $1_phase0_lpcpf.raw $2 $3 $4 $5
 
 
index 1f9ff2bf10976db658e5d5452d2ff4cf869f2e83..a253289a4631024844da7eb3719dbbb0a27981c7 100644 (file)
@@ -2,14 +2,14 @@
                                                                            
   FILE........: lpc.c                                                              
   AUTHOR......: David Rowe                                                      
-  DATE CREATED: 30/9/90                                                   
+  DATE CREATED: 30 Sep 1990 (!)                                                 
                                                                           
   Linear Prediction functions written in C.                                
                                                                           
 \*---------------------------------------------------------------------------*/
 
 /*
-  Copyright (C) 2009 David Rowe
+  Copyright (C) 2009-2012 David Rowe
 
   All rights reserved.
 
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #define LPC_MAX_N 512          /* maximum no. of samples in frame */
 #define PI 3.141592654         /* mathematical constant */
 
+#define ALPHA 1.0
+#define BETA  0.94
+
 #include <assert.h>
 #include <math.h>
 #include "defines.h"
 #include "lpc.h"
 
+/*---------------------------------------------------------------------------*\
+                                                                         
+  pre_emp()                                                        
+                                                                         
+  Pre-emphasise (high pass filter with zero close to 0 Hz) a frame of
+  speech samples.  Helps reduce dynamic range of LPC spectrum, giving
+  greater weight and hensea better match to low energy formants.  
+
+  Should be balanced by de-emphasis of the output speech.
+                                                                           
+\*---------------------------------------------------------------------------*/
+
+void pre_emp(
+  float  Sn_pre[], /* output frame of speech samples                     */
+  float  Sn[],    /* input frame of speech samples                      */
+  float *mem,      /* Sn[-1]single sample memory                         */
+  int   Nsam      /* number of speech samples to use                    */
+)
+{
+    int   i;
+
+    for(i=0; i<Nsam; i++) {
+       Sn_pre[i] = Sn[i] - ALPHA * mem[0];
+       mem[0] = Sn[i];
+    }
+
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                                         
+  de_emp()                                                        
+                                                                         
+  De-emphasis filter (low pass filter with polse close to 0 Hz).
+                                                                           
+\*---------------------------------------------------------------------------*/
+
+void de_emp(
+  float  Sn_de[],  /* output frame of speech samples                     */
+  float  Sn[],    /* input frame of speech samples                      */
+  float *mem,      /* Sn[-1]single sample memory                         */
+  int    Nsam     /* number of speech samples to use                    */
+)
+{
+    int   i;
+
+    for(i=0; i<Nsam; i++) {
+       Sn_de[i] = Sn[i] + BETA * mem[0];
+       mem[0] = Sn_de[i];
+    }
+
+}
+
+
 /*---------------------------------------------------------------------------*\
                                                                          
   hanning_window()                                                        
index e9b42aefd7488f6a993a79e35be7e6b8acaf2047..d5385bdf5877ea92f7345525b186ce4043cb91d5 100644 (file)
@@ -9,7 +9,7 @@
 \*---------------------------------------------------------------------------*/
 
 /*
-  Copyright (C) 2009 David Rowe
+  Copyright (C) 2009-2012 David Rowe
 
   All rights reserved.
 
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __LPC__
@@ -31,6 +30,8 @@
 
 #define LPC_MAX_ORDER 20
 
+void pre_emp(float Sn_pre[], float Sn[], float *mem, int Nsam);
+void de_emp(float Sn_se[], float Sn[], float *mem, int Nsam);
 void hanning_window(float Sn[],        float Wn[], int Nsam);
 void autocorrelate(float Sn[], float Rn[], int Nsam, int order);
 void levinson_durbin(float R[],        float lpcs[], int order);
index feab4219abc7ecc38fe22b1d8170cc7a4aa620bc..47001c1efde15a28f29cf73b3d5161ed1b9a6b57 100644 (file)
-/*---------------------------------------------------------------------------*\\r
-\r
-  FILE........: lsp.c\r
-  AUTHOR......: David Rowe\r
-  DATE CREATED: 24/2/93\r
-\r
-\r
-  This file contains functions for LPC to LSP conversion and LSP to\r
-  LPC conversion. Note that the LSP coefficients are not in radians\r
-  format but in the x domain of the unit circle.\r
-\r
-\*---------------------------------------------------------------------------*/\r
-\r
-#include "defines.h"\r
-#include "lsp.h"\r
-#include <math.h>\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-\r
-/*---------------------------------------------------------------------------*\\r
-\r
-  Introduction to Line Spectrum Pairs (LSPs)\r
-  ------------------------------------------\r
-\r
-  LSPs are used to encode the LPC filter coefficients {ak} for\r
-  transmission over the channel.  LSPs have several properties (like\r
-  less sensitivity to quantisation noise) that make them superior to\r
-  direct quantisation of {ak}.\r
-\r
-  A(z) is a polynomial of order lpcrdr with {ak} as the coefficients.\r
-\r
-  A(z) is transformed to P(z) and Q(z) (using a substitution and some\r
-  algebra), to obtain something like:\r
-\r
-    A(z) = 0.5[P(z)(z+z^-1) + Q(z)(z-z^-1)]  (1)\r
-\r
-  As you can imagine A(z) has complex zeros all over the z-plane. P(z)\r
-  and Q(z) have the very neat property of only having zeros _on_ the\r
-  unit circle.  So to find them we take a test point z=exp(jw) and\r
-  evaluate P (exp(jw)) and Q(exp(jw)) using a grid of points between 0\r
-  and pi.\r
-\r
-  The zeros (roots) of P(z) also happen to alternate, which is why we\r
-  swap coefficients as we find roots.  So the process of finding the\r
-  LSP frequencies is basically finding the roots of 5th order\r
-  polynomials.\r
-\r
-  The root so P(z) and Q(z) occur in symmetrical pairs at +/-w, hence\r
-  the name Line Spectrum Pairs (LSPs).\r
-\r
-  To convert back to ak we just evaluate (1), "clocking" an impulse\r
-  thru it lpcrdr times gives us the impulse response of A(z) which is\r
-  {ak}.\r
-\r
-\*---------------------------------------------------------------------------*/\r
-\r
-/*---------------------------------------------------------------------------*\\r
-\r
-  FUNCTION....: cheb_poly_eva()\r
-  AUTHOR......: David Rowe\r
-  DATE CREATED: 24/2/93\r
-\r
-  This function evalutes a series of chebyshev polynomials\r
-\r
-  FIXME: performing memory allocation at run time is very inefficient,\r
-  replace with stack variables of MAX_P size.\r
-\r
-\*---------------------------------------------------------------------------*/\r
-\r
-\r
-float cheb_poly_eva(float *coef,float x,int m)\r
-/*  float coef[]       coefficients of the polynomial to be evaluated  */\r
-/*  float x            the point where polynomial is to be evaluated   */\r
-/*  int m              order of the polynomial                         */\r
-{\r
-    int i;\r
-    float *T,*t,*u,*v,sum;\r
-\r
-    /* Allocate memory for chebyshev series formulation */\r
-\r
-    if((T = (float *)malloc((m/2+1)*sizeof(float))) == NULL){\r
-       fprintf(stderr, "not enough memory to allocate buffer\n");\r
-       exit(1);\r
-    }\r
-\r
-    /* Initialise pointers */\r
-\r
-    t = T;                             /* T[i-2]                       */\r
-    *t++ = 1.0;\r
-    u = t--;                           /* T[i-1]                       */\r
-    *u++ = x;\r
-    v = u--;                           /* T[i]                         */\r
-\r
-    /* Evaluate chebyshev series formulation using iterative approach  */\r
-\r
-    for(i=2;i<=m/2;i++)\r
-       *v++ = (2*x)*(*u++) - *t++;     /* T[i] = 2*x*T[i-1] - T[i-2]   */\r
-\r
-    sum=0.0;                           /* initialise sum to zero       */\r
-    t = T;                             /* reset pointer                */\r
-\r
-    /* Evaluate polynomial and return value also free memory space */\r
-\r
-    for(i=0;i<=m/2;i++)\r
-       sum+=coef[(m/2)-i]**t++;\r
-\r
-    free(T);\r
-    return sum;\r
-}\r
-\r
-\r
-/*---------------------------------------------------------------------------*\\r
-\r
-  FUNCTION....: lpc_to_lsp()\r
-  AUTHOR......: David Rowe\r
-  DATE CREATED: 24/2/93\r
-\r
-  This function converts LPC coefficients to LSP coefficients.\r
-\r
-\*---------------------------------------------------------------------------*/\r
-\r
-int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta)\r
-/*  float *a                   lpc coefficients                        */\r
-/*  int lpcrdr                 order of LPC coefficients (10)          */\r
-/*  float *freq                LSP frequencies in radians              */\r
-/*  int nb                     number of sub-intervals (4)             */\r
-/*  float delta                        grid spacing interval (0.02)            */\r
-{\r
-    float psuml,psumr,psumm,temp_xr,xl,xr,xm;\r
-    float temp_psumr;\r
-    int i,j,m,flag,k;\r
-    float *Q;                  /* ptrs for memory allocation           */\r
-    float *P;\r
-    float *px;                 /* ptrs of respective P'(z) & Q'(z)     */\r
-    float *qx;\r
-    float *p;\r
-    float *q;\r
-    float *pt;                 /* ptr used for cheb_poly_eval()\r
-                                  whether P' or Q'                     */\r
-    int roots=0;               /* number of roots found                */\r
-    flag = 1;                  \r
-    m = lpcrdr/2;              /* order of P'(z) & Q'(z) polynimials   */\r
-\r
-    /* Allocate memory space for polynomials */\r
-\r
-    Q = (float *) malloc((m+1)*sizeof(float));\r
-    P = (float *) malloc((m+1)*sizeof(float));\r
-    if( (P == NULL) || (Q == NULL) ) {\r
-       fprintf(stderr,"not enough memory to allocate buffer\n");\r
-       exit(1);\r
-    }\r
-\r
-    /* determine P'(z)'s and Q'(z)'s coefficients where\r
-      P'(z) = P(z)/(1 + z^(-1)) and Q'(z) = Q(z)/(1-z^(-1)) */\r
-\r
-    px = P;                      /* initilaise ptrs */\r
-    qx = Q;\r
-    p = px;\r
-    q = qx;\r
-    *px++ = 1.0;\r
-    *qx++ = 1.0;\r
-    for(i=1;i<=m;i++){\r
-       *px++ = a[i]+a[lpcrdr+1-i]-*p++;\r
-       *qx++ = a[i]-a[lpcrdr+1-i]+*q++;\r
-    }\r
-    px = P;\r
-    qx = Q;\r
-    for(i=0;i<m;i++){\r
-       *px = 2**px;\r
-       *qx = 2**qx;\r
-        px++;\r
-        qx++;\r
-    }\r
-    px = P;                    /* re-initialise ptrs                   */\r
-    qx = Q;\r
-\r
-    /* Search for a zero in P'(z) polynomial first and then alternate to Q'(z).\r
-    Keep alternating between the two polynomials as each zero is found         */\r
-\r
-    xr = 0;                    /* initialise xr to zero                */\r
-    xl = 1.0;                  /* start at point xl = 1                */\r
-\r
-\r
-    for(j=0;j<lpcrdr;j++){\r
-       if(j%2)                 /* determines whether P' or Q' is eval. */\r
-           pt = qx;\r
-       else\r
-           pt = px;\r
-\r
-       psuml = cheb_poly_eva(pt,xl,lpcrdr);    /* evals poly. at xl    */\r
-       flag = 1;\r
-       while(flag && (xr >= -1.0)){\r
-           xr = xl - delta ;                   /* interval spacing     */\r
-           psumr = cheb_poly_eva(pt,xr,lpcrdr);/* poly(xl-delta_x)     */\r
-           temp_psumr = psumr;\r
-           temp_xr = xr;\r
-\r
-        /* if no sign change increment xr and re-evaluate\r
-           poly(xr). Repeat til sign change.  if a sign change has\r
-           occurred the interval is bisected and then checked again\r
-           for a sign change which determines in which interval the\r
-           zero lies in.  If there is no sign change between poly(xm)\r
-           and poly(xl) set interval between xm and xr else set\r
-           interval between xl and xr and repeat till root is located\r
-           within the specified limits  */\r
-\r
-           if((psumr*psuml)<0.0){\r
-               roots++;\r
-\r
-               psumm=psuml;\r
-               for(k=0;k<=nb;k++){\r
-                   xm = (xl+xr)/2;             /* bisect the interval  */\r
-                   psumm=cheb_poly_eva(pt,xm,lpcrdr);\r
-                   if(psumm*psuml>0.){\r
-                       psuml=psumm;\r
-                       xl=xm;\r
-                   }\r
-                   else{\r
-                       psumr=psumm;\r
-                       xr=xm;\r
-                   }\r
-               }\r
-\r
-              /* once zero is found, reset initial interval to xr      */\r
-              freq[j] = (xm);\r
-              xl = xm;\r
-              flag = 0;                /* reset flag for next search   */\r
-           }\r
-           else{\r
-               psuml=temp_psumr;\r
-               xl=temp_xr;\r
-           }\r
-       }\r
-    }\r
-    free(P);                           /* free memory space            */\r
-    free(Q);\r
-\r
-    /* convert from x domain to radians */\r
-\r
-    for(i=0; i<lpcrdr; i++) {\r
-       freq[i] = acos(freq[i]);\r
-    }\r
-\r
-    return(roots);\r
-}\r
-\r
-/*---------------------------------------------------------------------------*\\r
-\r
-  FUNCTION....: lsp_to_lpc()\r
-  AUTHOR......: David Rowe\r
-  DATE CREATED: 24/2/93\r
-\r
-  This function converts LSP coefficients to LPC coefficients.  In the\r
-  Speex code we worked out a wayto simplify this significantly.\r
-\r
-\*---------------------------------------------------------------------------*/\r
-\r
-void lsp_to_lpc(float *freq, float *ak, int lpcrdr)\r
-/*  float *freq         array of LSP frequencies in radians            */\r
-/*  float *ak          array of LPC coefficients                       */\r
-/*  int lpcrdr         order of LPC coefficients                       */\r
-\r
-\r
-{\r
-    int i,j;\r
-    float xout1,xout2,xin1,xin2;\r
-    float *Wp;\r
-    float *pw,*n1,*n2,*n3,*n4;\r
-    int m = lpcrdr/2;\r
-\r
-    /* convert from radians to the x=cos(w) domain */\r
-\r
-    for(i=0; i<lpcrdr; i++)\r
-       freq[i] = cos(freq[i]);\r
-\r
-    if((Wp = (float *) malloc((4*m+2)*sizeof(float))) == NULL){\r
-       printf("not enough memory to allocate buffer\n");\r
-       exit(1);\r
-    }\r
-    pw = Wp;\r
-\r
-    /* initialise contents of array */\r
-\r
-    for(i=0;i<=4*m+1;i++){             /* set contents of buffer to 0 */\r
-       *pw++ = 0.0;\r
-    }\r
-\r
-    /* Set pointers up */\r
-\r
-    pw = Wp;\r
-    xin1 = 1.0;\r
-    xin2 = 1.0;\r
-\r
-    /* reconstruct P(z) and Q(z) by cascading second order polynomials\r
-      in form 1 - 2xz(-1) +z(-2), where x is the LSP coefficient */\r
-\r
-    for(j=0;j<=lpcrdr;j++){\r
-       for(i=0;i<m;i++){\r
-           n1 = pw+(i*4);\r
-           n2 = n1 + 1;\r
-           n3 = n2 + 1;\r
-           n4 = n3 + 1;\r
-           xout1 = xin1 - 2*(freq[2*i]) * *n1 + *n2;\r
-           xout2 = xin2 - 2*(freq[2*i+1]) * *n3 + *n4;\r
-           *n2 = *n1;\r
-           *n4 = *n3;\r
-           *n1 = xin1;\r
-           *n3 = xin2;\r
-           xin1 = xout1;\r
-           xin2 = xout2;\r
-       }\r
-       xout1 = xin1 + *(n4+1);\r
-       xout2 = xin2 - *(n4+2);\r
-       ak[j] = (xout1 + xout2)*0.5;\r
-       *(n4+1) = xin1;\r
-       *(n4+2) = xin2;\r
-\r
-       xin1 = 0.0;\r
-       xin2 = 0.0;\r
-    }\r
-    free(Wp);\r
-}\r
-\r
+/*---------------------------------------------------------------------------*\
+
+  FILE........: lsp.c
+  AUTHOR......: David Rowe
+  DATE CREATED: 24/2/93
+
+
+  This file contains functions for LPC to LSP conversion and LSP to
+  LPC conversion. Note that the LSP coefficients are not in radians
+  format but in the x domain of the unit circle.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2009 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "defines.h"
+#include "lsp.h"
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Only 10 gets used, so far. */
+#define LSP_MAX_ORDER  20
+
+/*---------------------------------------------------------------------------*\
+
+  Introduction to Line Spectrum Pairs (LSPs)
+  ------------------------------------------
+
+  LSPs are used to encode the LPC filter coefficients {ak} for
+  transmission over the channel.  LSPs have several properties (like
+  less sensitivity to quantisation noise) that make them superior to
+  direct quantisation of {ak}.
+
+  A(z) is a polynomial of order lpcrdr with {ak} as the coefficients.
+
+  A(z) is transformed to P(z) and Q(z) (using a substitution and some
+  algebra), to obtain something like:
+
+    A(z) = 0.5[P(z)(z+z^-1) + Q(z)(z-z^-1)]  (1)
+
+  As you can imagine A(z) has complex zeros all over the z-plane. P(z)
+  and Q(z) have the very neat property of only having zeros _on_ the
+  unit circle.  So to find them we take a test point z=exp(jw) and
+  evaluate P (exp(jw)) and Q(exp(jw)) using a grid of points between 0
+  and pi.
+
+  The zeros (roots) of P(z) also happen to alternate, which is why we
+  swap coefficients as we find roots.  So the process of finding the
+  LSP frequencies is basically finding the roots of 5th order
+  polynomials.
+
+  The root so P(z) and Q(z) occur in symmetrical pairs at +/-w, hence
+  the name Line Spectrum Pairs (LSPs).
+
+  To convert back to ak we just evaluate (1), "clocking" an impulse
+  thru it lpcrdr times gives us the impulse response of A(z) which is
+  {ak}.
+
+\*---------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: cheb_poly_eva()
+  AUTHOR......: David Rowe
+  DATE CREATED: 24/2/93
+
+  This function evalutes a series of chebyshev polynomials
+
+  FIXME: performing memory allocation at run time is very inefficient,
+  replace with stack variables of MAX_P size.
+
+\*---------------------------------------------------------------------------*/
+
+
+static float
+cheb_poly_eva(float *coef,float x,int m)
+/*  float coef[]       coefficients of the polynomial to be evaluated  */
+/*  float x            the point where polynomial is to be evaluated   */
+/*  int m              order of the polynomial                         */
+{
+    int i;
+    float *t,*u,*v,sum;
+    float T[(LSP_MAX_ORDER / 2) + 1];
+
+    /* Initialise pointers */
+
+    t = T;                             /* T[i-2]                       */
+    *t++ = 1.0;
+    u = t--;                           /* T[i-1]                       */
+    *u++ = x;
+    v = u--;                           /* T[i]                         */
+
+    /* Evaluate chebyshev series formulation using iterative approach  */
+
+    for(i=2;i<=m/2;i++)
+       *v++ = (2*x)*(*u++) - *t++;     /* T[i] = 2*x*T[i-1] - T[i-2]   */
+
+    sum=0.0;                           /* initialise sum to zero       */
+    t = T;                             /* reset pointer                */
+
+    /* Evaluate polynomial and return value also free memory space */
+
+    for(i=0;i<=m/2;i++)
+       sum+=coef[(m/2)-i]**t++;
+
+    return sum;
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: lpc_to_lsp()
+  AUTHOR......: David Rowe
+  DATE CREATED: 24/2/93
+
+  This function converts LPC coefficients to LSP coefficients.
+
+\*---------------------------------------------------------------------------*/
+
+int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta)
+/*  float *a                   lpc coefficients                        */
+/*  int lpcrdr                 order of LPC coefficients (10)          */
+/*  float *freq                LSP frequencies in radians              */
+/*  int nb                     number of sub-intervals (4)             */
+/*  float delta                        grid spacing interval (0.02)            */
+{
+    float psuml,psumr,psumm,temp_xr,xl,xr,xm = 0;
+    float temp_psumr;
+    int i,j,m,flag,k;
+    float *px;                 /* ptrs of respective P'(z) & Q'(z)     */
+    float *qx;
+    float *p;
+    float *q;
+    float *pt;                 /* ptr used for cheb_poly_eval()
+                                  whether P' or Q'                     */
+    int roots=0;               /* number of roots found                */
+    float Q[LSP_MAX_ORDER + 1];
+    float P[LSP_MAX_ORDER + 1];
+
+    flag = 1;                  
+    m = lpcrdr/2;              /* order of P'(z) & Q'(z) polynimials   */
+
+    /* Allocate memory space for polynomials */
+
+    /* determine P'(z)'s and Q'(z)'s coefficients where
+      P'(z) = P(z)/(1 + z^(-1)) and Q'(z) = Q(z)/(1-z^(-1)) */
+
+    px = P;                      /* initilaise ptrs */
+    qx = Q;
+    p = px;
+    q = qx;
+    *px++ = 1.0;
+    *qx++ = 1.0;
+    for(i=1;i<=m;i++){
+       *px++ = a[i]+a[lpcrdr+1-i]-*p++;
+       *qx++ = a[i]-a[lpcrdr+1-i]+*q++;
+    }
+    px = P;
+    qx = Q;
+    for(i=0;i<m;i++){
+       *px = 2**px;
+       *qx = 2**qx;
+        px++;
+        qx++;
+    }
+    px = P;                    /* re-initialise ptrs                   */
+    qx = Q;
+
+    /* Search for a zero in P'(z) polynomial first and then alternate to Q'(z).
+    Keep alternating between the two polynomials as each zero is found         */
+
+    xr = 0;                    /* initialise xr to zero                */
+    xl = 1.0;                  /* start at point xl = 1                */
+
+
+    for(j=0;j<lpcrdr;j++){
+       if(j%2)                 /* determines whether P' or Q' is eval. */
+           pt = qx;
+       else
+           pt = px;
+
+       psuml = cheb_poly_eva(pt,xl,lpcrdr);    /* evals poly. at xl    */
+       flag = 1;
+       while(flag && (xr >= -1.0)){
+           xr = xl - delta ;                   /* interval spacing     */
+           psumr = cheb_poly_eva(pt,xr,lpcrdr);/* poly(xl-delta_x)     */
+           temp_psumr = psumr;
+           temp_xr = xr;
+
+        /* if no sign change increment xr and re-evaluate
+           poly(xr). Repeat til sign change.  if a sign change has
+           occurred the interval is bisected and then checked again
+           for a sign change which determines in which interval the
+           zero lies in.  If there is no sign change between poly(xm)
+           and poly(xl) set interval between xm and xr else set
+           interval between xl and xr and repeat till root is located
+           within the specified limits  */
+
+           if((psumr*psuml)<0.0){
+               roots++;
+
+               psumm=psuml;
+               for(k=0;k<=nb;k++){
+                   xm = (xl+xr)/2;             /* bisect the interval  */
+                   psumm=cheb_poly_eva(pt,xm,lpcrdr);
+                   if(psumm*psuml>0.){
+                       psuml=psumm;
+                       xl=xm;
+                   }
+                   else{
+                       psumr=psumm;
+                       xr=xm;
+                   }
+               }
+
+              /* once zero is found, reset initial interval to xr      */
+              freq[j] = (xm);
+              xl = xm;
+              flag = 0;                /* reset flag for next search   */
+           }
+           else{
+               psuml=temp_psumr;
+               xl=temp_xr;
+           }
+       }
+    }
+
+    /* convert from x domain to radians */
+
+    for(i=0; i<lpcrdr; i++) {
+       freq[i] = acos(freq[i]);
+    }
+
+    return(roots);
+}
+
+/*---------------------------------------------------------------------------*\
+
+  FUNCTION....: lsp_to_lpc()
+  AUTHOR......: David Rowe
+  DATE CREATED: 24/2/93
+
+  This function converts LSP coefficients to LPC coefficients.  In the
+  Speex code we worked out a way to simplify this significantly.
+
+\*---------------------------------------------------------------------------*/
+
+void lsp_to_lpc(float *lsp, float *ak, int lpcrdr)
+/*  float *freq         array of LSP frequencies in radians            */
+/*  float *ak          array of LPC coefficients                       */
+/*  int lpcrdr         order of LPC coefficients                       */
+
+
+{
+    int i,j;
+    float xout1,xout2,xin1,xin2;
+    float *pw,*n1,*n2,*n3,*n4 = 0;
+    int m = lpcrdr/2;
+    float freq[LSP_MAX_ORDER];
+    float Wp[(LSP_MAX_ORDER * 4) + 2];
+    
+    /* convert from radians to the x=cos(w) domain */
+
+    for(i=0; i<lpcrdr; i++)
+       freq[i] = cos(lsp[i]);
+
+    pw = Wp;
+
+    /* initialise contents of array */
+
+    for(i=0;i<=4*m+1;i++){             /* set contents of buffer to 0 */
+       *pw++ = 0.0;
+    }
+
+    /* Set pointers up */
+
+    pw = Wp;
+    xin1 = 1.0;
+    xin2 = 1.0;
+
+    /* reconstruct P(z) and Q(z) by cascading second order polynomials
+      in form 1 - 2xz(-1) +z(-2), where x is the LSP coefficient */
+
+    for(j=0;j<=lpcrdr;j++){
+       for(i=0;i<m;i++){
+           n1 = pw+(i*4);
+           n2 = n1 + 1;
+           n3 = n2 + 1;
+           n4 = n3 + 1;
+           xout1 = xin1 - 2*(freq[2*i]) * *n1 + *n2;
+           xout2 = xin2 - 2*(freq[2*i+1]) * *n3 + *n4;
+           *n2 = *n1;
+           *n4 = *n3;
+           *n1 = xin1;
+           *n3 = xin2;
+           xin1 = xout1;
+           xin2 = xout2;
+       }
+       xout1 = xin1 + *(n4+1);
+       xout2 = xin2 - *(n4+2);
+       ak[j] = (xout1 + xout2)*0.5;
+       *(n4+1) = xin1;
+       *(n4+2) = xin2;
+
+       xin1 = 0.0;
+       xin2 = 0.0;
+    }
+}
+
index 88eae7e46de96a11c9cfca6989a098ce14f418fd..5acef0184072e5f2ea3f937ce5ff936928b9511d 100644 (file)
 
 \*---------------------------------------------------------------------------*/
 
+/*
+  Copyright (C) 2009 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
 #ifndef __LSP__
 #define __LSP__
 
index 193ca92109f0e25a8ff1900c464ba4be7b938051..3214578e84ac721a6068b0a6b61787dbba3b84e7 100644 (file)
@@ -4,8 +4,8 @@
   AUTHOR......: David Rowe                                      
   DATE CREATED: 23/3/93                                    
                                                          
-  Non Linear Pitch (NLP) estimation functions.                   
-                                                               
+  Non Linear Pitch (NLP) estimation functions.
+
 \*---------------------------------------------------------------------------*/
 
 /*
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "defines.h"
 #include "nlp.h"
 #include "dump.h"
-#include "four1.h"
+#include "kiss_fft.h"
 
 #include <assert.h>
 #include <math.h>
@@ -60,7 +59,7 @@
 
 /* 48 tap 600Hz low pass FIR filter coefficients */
 
-float nlp_fir[] = {
+const float nlp_fir[] = {
   -1.0818124e-03,
   -1.1008344e-03,
   -9.2768838e-04,
@@ -112,12 +111,14 @@ float nlp_fir[] = {
 };
 
 typedef struct {
-    float sq[PMAX_M];       /* squared speech samples */
-    float mem_x,mem_y;       /* memory for notch filter */
-    float mem_fir[NLP_NTAP]; /* decimation FIR filter memory */
+    float         sq[PMAX_M];       /* squared speech samples       */
+    float         mem_x,mem_y;       /* memory for notch filter      */
+    float         mem_fir[NLP_NTAP]; /* decimation FIR filter memory */
+    kiss_fft_cfg  fft_cfg;           /* kiss FFT config              */
 } NLP;
 
-float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax);
+float test_candidate_mbe(COMP Sw[], COMP W[], float f0);
+float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax, COMP Sw[], COMP W[], float *prev_Wo);
 float post_process_sub_multiples(COMP Fw[], 
                                 int pmin, int pmax, float gmax, int gmax_bin,
                                 float *prev_Wo);
@@ -146,20 +147,27 @@ void *nlp_create()
     for(i=0; i<NLP_NTAP; i++)
        nlp->mem_fir[i] = 0.0;
 
+    nlp->fft_cfg = kiss_fft_alloc (PE_FFT_SIZE, 0, NULL, NULL);
+    assert(nlp->fft_cfg != NULL);
+
     return (void*)nlp;
 }
 
 /*---------------------------------------------------------------------------*\
                                                                              
-  nlp_destory()
+  nlp_destroy()
                                                                              
-  Initialisation function for NLP pitch estimator.
+  Shut down function for NLP pitch estimator.
 
 \*---------------------------------------------------------------------------*/
 
 void nlp_destroy(void *nlp_state)
 {
+    NLP   *nlp;
     assert(nlp_state != NULL);
+    nlp = (NLP*)nlp_state;
+
+    KISS_FFT_FREE(nlp->fft_cfg);
     free(nlp_state);
 }
 
@@ -198,27 +206,30 @@ float nlp(
   float  Sn[],                 /* input speech vector */
   int    n,                    /* frames shift (no. new samples in Sn[]) */
   int    m,                    /* analysis window size */
-  int    pmin,                 /* minimum pitch value */
+  int    pmin,                  /* minimum pitch value */
   int    pmax,                 /* maximum pitch value */
   float *pitch,                        /* estimated pitch period in samples */
   COMP   Sw[],                  /* Freq domain version of Sn[] */
+  COMP   W[],                   /* Freq domain window */
   float *prev_Wo
 )
 {
     NLP   *nlp;
-    float  notch;                  /* current notch filter output */
-    COMP   Fw[PE_FFT_SIZE];        /* DFT of squared signal */
+    float  notch;                  /* current notch filter output    */
+    COMP   fw[PE_FFT_SIZE];        /* DFT of squared signal (input)  */
+    COMP   Fw[PE_FFT_SIZE];        /* DFT of squared signal (output) */
     float  gmax;
     int    gmax_bin;
     int   i,j;
     float best_f0;
 
     assert(nlp_state != NULL);
+    assert(m <= PMAX_M);
     nlp = (NLP*)nlp_state;
 
     /* Square, notch filter at DC, and LP filter vector */
 
-    for(i=m-n; i<M; i++)           /* square latest speech samples */
+    for(i=m-n; i<m; i++)           /* square latest speech samples */
        nlp->sq[i] = Sn[i]*Sn[i];
 
     for(i=m-n; i<m; i++) {     /* notch filter at DC */
@@ -226,7 +237,14 @@ float nlp(
        notch += COEFF*nlp->mem_y;
        nlp->mem_x = nlp->sq[i];
        nlp->mem_y = notch;
-       nlp->sq[i] = notch;
+       nlp->sq[i] = notch + 1.0;  /* With 0 input vectors to codec,
+                                     kiss_fft() would take a long
+                                     time to execute when running in
+                                     real time.  Problem was traced
+                                     to kiss_fft function call in
+                                     this function. Adding this small
+                                     constant fixed problem.  Not
+                                     exactly sure why. */
     }
 
     for(i=m-n; i<m; i++) {     /* FIR filter vector */
@@ -243,19 +261,24 @@ float nlp(
     /* Decimate and DFT */
 
     for(i=0; i<PE_FFT_SIZE; i++) {
-       Fw[i].real = 0.0;
-       Fw[i].imag = 0.0;
+       fw[i].real = 0.0;
+       fw[i].imag = 0.0;
     }
     for(i=0; i<m/DEC; i++) {
-       Fw[i].real = nlp->sq[i*DEC]*(0.5 - 0.5*cos(2*PI*i/(m/DEC-1)));
+       fw[i].real = nlp->sq[i*DEC]*(0.5 - 0.5*cos(2*PI*i/(m/DEC-1)));
     }
+    #ifdef DUMP
     dump_dec(Fw);
-    four1(&Fw[-1].imag,PE_FFT_SIZE,1);
+    #endif
+
+    kiss_fft(nlp->fft_cfg, (kiss_fft_cpx *)fw, (kiss_fft_cpx *)Fw);
     for(i=0; i<PE_FFT_SIZE; i++)
        Fw[i].real = Fw[i].real*Fw[i].real + Fw[i].imag*Fw[i].imag;
 
+    #ifdef DUMP
     dump_sq(nlp->sq);
     dump_Fw(Fw);
+    #endif
 
     /* find global peak */
 
@@ -267,9 +290,13 @@ float nlp(
            gmax_bin = i;
        }
     }
-
-    best_f0 = post_process_sub_multiples(Fw, pmin, pmax, gmax, gmax_bin, 
-                                        prev_Wo);
+    
+    //#define POST_PROCESS_MBE
+    #ifdef POST_PROCESS_MBE
+    best_f0 = post_process_mbe(Fw, pmin, pmax, gmax, Sw, W, prev_Wo);
+    #else
+    best_f0 = post_process_sub_multiples(Fw, pmin, pmax, gmax, gmax_bin, prev_Wo);
+    #endif
 
     /* Shift samples in buffer to make room for new samples */
 
@@ -286,7 +313,7 @@ float nlp(
                                                                              
   post_process_sub_multiples() 
                                                                            
-  Given the global maximma of Fw[] we search interger submultiples for
+  Given the global maximma of Fw[] we search integer submultiples for
   local maxima.  If local maxima exist and they are above an
   experimentally derived threshold (OK a magic number I pulled out of
   the air) we choose the submultiple as the F0 estimate.
@@ -317,10 +344,10 @@ float post_process_sub_multiples(COMP Fw[],
     /* post process estimate by searching submultiples */
 
     mult = 2;
-    min_bin = PE_FFT_SIZE*DEC/pmax;
+    min_bin = PE_FFT_SIZE*DEC/pmax; 
     cmax_bin = gmax_bin;
     prev_f0_bin = *prev_Wo*(4000.0/PI)*(PE_FFT_SIZE*DEC)/SAMPLE_RATE;
-
+    
     while(gmax_bin/mult >= min_bin) {
 
        b = gmax_bin/mult;                      /* determine search interval */
@@ -339,7 +366,7 @@ float post_process_sub_multiples(COMP Fw[],
 
        lmax = 0;
        lmax_bin = bmin;
-       for (b=bmin; b<=bmax; b++)              /* look for maximum in interval */
+       for (b=bmin; b<=bmax; b++)           /* look for maximum in interval */
            if (Fw[b].real > lmax) {
                lmax = Fw[b].real;
                lmax_bin = b;
@@ -359,3 +386,158 @@ float post_process_sub_multiples(COMP Fw[],
     return best_f0;
 }
   
+/*---------------------------------------------------------------------------*\
+                                                                             
+  post_process_mbe() 
+                                                                           
+  Use the MBE pitch estimation algorithm to evaluate pitch candidates.  This
+  works OK but the accuracy at low F0 is affected by NW, the analysis window
+  size used for the DFT of the input speech Sw[].  Also favours high F0 in
+  the presence of background noise which causes periodic artifacts in the
+  synthesised speech.
+
+\*---------------------------------------------------------------------------*/
+
+float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax, COMP Sw[], COMP W[], float *prev_Wo)
+{
+  float candidate_f0;
+  float f0,best_f0;            /* fundamental frequency */
+  float e,e_min;                /* MBE cost function */
+  int   i;
+  float e_hz[F0_MAX];
+  int   bin;
+  float f0_min, f0_max;
+  float f0_start, f0_end;
+
+  f0_min = (float)SAMPLE_RATE/pmax;
+  f0_max = (float)SAMPLE_RATE/pmin;
+
+  /* Now look for local maxima.  Each local maxima is a candidate
+     that we test using the MBE pitch estimation algotithm */
+
+  for(i=0; i<F0_MAX; i++)
+      e_hz[i] = -1;
+  e_min = 1E32;
+  best_f0 = 50;
+  for(i=PE_FFT_SIZE*DEC/pmax; i<=PE_FFT_SIZE*DEC/pmin; i++) {
+    if ((Fw[i].real > Fw[i-1].real) && (Fw[i].real > Fw[i+1].real)) {
+
+       /* local maxima found, lets test if it's big enough */
+
+       if (Fw[i].real > T*gmax) {
+
+           /* OK, sample MBE cost function over +/- 10Hz range in 2.5Hz steps */
+
+           candidate_f0 = (float)i*SAMPLE_RATE/(PE_FFT_SIZE*DEC);
+           f0_start = candidate_f0-20;
+           f0_end = candidate_f0+20;
+           if (f0_start < f0_min) f0_start = f0_min;
+           if (f0_end > f0_max) f0_end = f0_max;
+
+           for(f0=f0_start; f0<=f0_end; f0+= 2.5) {
+               e = test_candidate_mbe(Sw, W, f0);
+               bin = floor(f0); assert((bin > 0) && (bin < F0_MAX));
+               e_hz[bin] = e;
+               if (e < e_min) {
+                   e_min = e;
+                   best_f0 = f0;
+               }
+           }
+
+       }
+    }
+  }
+
+  /* finally sample MBE cost function around previous pitch estimate
+     (form of pitch tracking) */
+
+  candidate_f0 = *prev_Wo * SAMPLE_RATE/TWO_PI;
+  f0_start = candidate_f0-20;
+  f0_end = candidate_f0+20;
+  if (f0_start < f0_min) f0_start = f0_min;
+  if (f0_end > f0_max) f0_end = f0_max;
+
+  for(f0=f0_start; f0<=f0_end; f0+= 2.5) {
+      e = test_candidate_mbe(Sw, W, f0);
+      bin = floor(f0); assert((bin > 0) && (bin < F0_MAX));
+      e_hz[bin] = e;
+      if (e < e_min) {
+         e_min = e;
+         best_f0 = f0;
+      }
+  }
+
+  #ifdef DUMP
+  dump_e(e_hz);
+  #endif
+
+  return best_f0;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                                             
+  test_candidate_mbe()          
+                                                                             
+  Returns the error of the MBE cost function for the input f0.  
+
+  Note: I think a lot of the operations below can be simplified as
+  W[].imag = 0 and has been normalised such that den always equals 1.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+float test_candidate_mbe(
+    COMP  Sw[],
+    COMP  W[],
+    float f0
+)
+{
+    COMP  Sw_[FFT_ENC];   /* DFT of all voiced synthesised signal */
+    int   l,al,bl,m;      /* loop variables */
+    COMP  Am;             /* amplitude sample for this band */
+    int   offset;         /* centers Hw[] about current harmonic */
+    float den;            /* denominator of Am expression */
+    float error;          /* accumulated error between originl and synthesised */
+    float Wo;             /* current "test" fundamental freq. */
+    int   L;
+    
+    L = floor((SAMPLE_RATE/2.0)/f0);
+    Wo = f0*(2*PI/SAMPLE_RATE);
+
+    error = 0.0;
+
+    /* Just test across the harmonics in the first 1000 Hz (L/4) */
+
+    for(l=1; l<L/4; l++) {
+       Am.real = 0.0;
+       Am.imag = 0.0;
+       den = 0.0;
+       al = ceil((l - 0.5)*Wo*FFT_ENC/TWO_PI);
+       bl = ceil((l + 0.5)*Wo*FFT_ENC/TWO_PI);
+
+       /* Estimate amplitude of harmonic assuming harmonic is totally voiced */
+
+       for(m=al; m<bl; m++) {
+           offset = FFT_ENC/2 + m - l*Wo*FFT_ENC/TWO_PI + 0.5;
+           Am.real += Sw[m].real*W[offset].real + Sw[m].imag*W[offset].imag;
+           Am.imag += Sw[m].imag*W[offset].real - Sw[m].real*W[offset].imag;
+           den += W[offset].real*W[offset].real + W[offset].imag*W[offset].imag;
+        }
+
+        Am.real = Am.real/den;
+        Am.imag = Am.imag/den;
+
+        /* Determine error between estimated harmonic and original */
+
+        for(m=al; m<bl; m++) {
+           offset = FFT_ENC/2 + m - l*Wo*FFT_ENC/TWO_PI + 0.5;
+           Sw_[m].real = Am.real*W[offset].real - Am.imag*W[offset].imag;
+           Sw_[m].imag = Am.real*W[offset].imag + Am.imag*W[offset].real;
+           error += (Sw[m].real - Sw_[m].real)*(Sw[m].real - Sw_[m].real);
+           error += (Sw[m].imag - Sw_[m].imag)*(Sw[m].imag - Sw_[m].imag);
+       }
+    }
+
+    return error;
+}
+
+
index eaaae970529d6616cd54646e79c4dd037cbd9b33..38265959024210e38e332afc315a20ae7cf8873c 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __NLP__
 #define __NLP__
 
+#include "comp.h"
+
 void *nlp_create();
 void nlp_destroy(void *nlp_state);
 float nlp(void *nlp_state, float Sn[], int n, int m, int pmin, int pmax, 
-         float *pitch, COMP Sw[], float *prev_Wo);
-float test_candidate_mbe(COMP Sw[], float f0, COMP Sw_[]);
+         float *pitch, COMP Sw[], COMP W[], float *prev_Wo);
 
 #endif
diff --git a/libs/libcodec2/src/octave.c b/libs/libcodec2/src/octave.c
new file mode 100644 (file)
index 0000000..2ff5ad1
--- /dev/null
@@ -0,0 +1,85 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: octave.c
+  AUTHOR......: David Rowe  
+  DATE CREATED: April 28 2012
+                                                                             
+  Functions to save C arrays in GNU Octave matrix format.  The output text
+  file can be directly read into Octave using "load filename".
+
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdio.h>
+#include "octave.h"
+
+void octave_save_int(FILE *f, char name[], int data[], int rows, int cols)
+{
+    int r,c;
+
+    fprintf(f, "# name: %s\n", name);
+    fprintf(f, "# type: matrix\n");
+    fprintf(f, "# rows: %d\n", rows);
+    fprintf(f, "# columns: %d\n", cols);
+    
+    for(r=0; r<rows; r++) {
+       for(c=0; c<cols; c++)
+           fprintf(f, " %d", data[r*cols+c]);
+       fprintf(f, "\n");
+    }
+
+    fprintf(f, "\n\n");
+}
+
+void octave_save_float(FILE *f, char name[], float data[], int rows, int cols, int col_len)
+{
+    int r,c;
+
+    fprintf(f, "# name: %s\n", name);
+    fprintf(f, "# type: matrix\n");
+    fprintf(f, "# rows: %d\n", rows);
+    fprintf(f, "# columns: %d\n", cols);
+    
+    for(r=0; r<rows; r++) {
+       for(c=0; c<cols; c++)
+           fprintf(f, " %f", data[r*col_len+c]);
+       fprintf(f, "\n");
+    }
+
+    fprintf(f, "\n\n");
+}
+
+void octave_save_complex(FILE *f, char name[], COMP data[], int rows, int cols, int col_len)
+{
+    int r,c;
+
+    fprintf(f, "# name: %s\n", name);
+    fprintf(f, "# type: complex matrix\n");
+    fprintf(f, "# rows: %d\n", rows);
+    fprintf(f, "# columns: %d\n", cols);
+    
+    for(r=0; r<rows; r++) {
+       for(c=0; c<cols; c++)
+           fprintf(f, " (%f,%f)", data[r*col_len+c].real, data[r*col_len+c].imag);
+       fprintf(f, "\n");
+    }
+
+    fprintf(f, "\n\n");
+}
diff --git a/libs/libcodec2/src/octave.h b/libs/libcodec2/src/octave.h
new file mode 100644 (file)
index 0000000..be6d8d3
--- /dev/null
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: octave.h
+  AUTHOR......: David Rowe  
+  DATE CREATED: April 28 2012
+                                                                             
+  Functions to save C arrays in Octave matrix format.  the output text
+  file can be directly read into octave using "load filename".
+
+\*---------------------------------------------------------------------------*/
+
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __OCTAVE__
+#define __OCTAVE__
+
+#include "comp.h"
+
+void octave_save_int(FILE *f, char name[], int data[], int rows, int cols);
+void octave_save_float(FILE *f, char name[], float data[], int rows, int cols, int col_len);
+void octave_save_complex(FILE *f, char name[], COMP data[], int rows, int cols, int col_len);
+
+#endif
diff --git a/libs/libcodec2/src/os.h b/libs/libcodec2/src/os.h
new file mode 100644 (file)
index 0000000..0dae9bf
--- /dev/null
@@ -0,0 +1,53 @@
+/* Generate using fir1(47,1/6) in Octave */
+
+const float fdmdv_os_filter[]= {
+    -3.55606818e-04,
+    -8.98615286e-04,
+    -1.40119781e-03,
+    -1.71713852e-03,
+    -1.56471179e-03,
+    -6.28128960e-04,
+    1.24522223e-03,
+    3.83138676e-03,
+    6.41309478e-03,
+    7.85893186e-03,
+    6.93514929e-03,
+    2.79361991e-03,
+    -4.51051400e-03,
+    -1.36671853e-02,
+    -2.21034939e-02,
+    -2.64084653e-02,
+    -2.31425052e-02,
+    -9.84218694e-03,
+    1.40648474e-02,
+    4.67316298e-02,
+    8.39615986e-02,
+    1.19925275e-01,
+    1.48381174e-01,
+    1.64097819e-01,
+    1.64097819e-01,
+    1.48381174e-01,
+    1.19925275e-01,
+    8.39615986e-02,
+    4.67316298e-02,
+    1.40648474e-02,
+    -9.84218694e-03,
+    -2.31425052e-02,
+    -2.64084653e-02,
+    -2.21034939e-02,
+    -1.36671853e-02,
+    -4.51051400e-03,
+    2.79361991e-03,
+    6.93514929e-03,
+    7.85893186e-03,
+    6.41309478e-03,
+    3.83138676e-03,
+    1.24522223e-03,
+    -6.28128960e-04,
+    -1.56471179e-03,
+    -1.71713852e-03,
+    -1.40119781e-03,
+    -8.98615286e-04,
+    -3.55606818e-04
+};
+
index 2cbff4438a6dfdd2bae4a063da950b492be2ca2b..5d67c3296e4d9eb65b6a03c1ead98c50aa5ceae3 100644 (file)
@@ -1,20 +1,20 @@
 /*
   Copyright (C) 2010 Perens LLC <bruce@perens.com>
 
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
+  All rights reserved.
 
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
 
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
 
- */
 #include "defines.h"
 #include "quantise.h"
 #include <stdio.h>
@@ -81,7 +81,8 @@ unpack(
  unsigned int          fieldWidth/* Width of the field in BITS, not bytes. */
  )
 {
-  unsigned int         field = 0;
+  unsigned int field = 0;
+  unsigned int t;
 
   do {
     unsigned int       bI = *bitIndex;
@@ -96,7 +97,7 @@ unpack(
   } while ( fieldWidth != 0 );
 
   /* Convert from Gray code to binary. Works for maximum 8-bit fields. */
-  unsigned int t = field ^ (field >> 8);
+  t = field ^ (field >> 8);
   t ^= (t >> 4);
   t ^= (t >> 2);
   t ^= (t >> 1);
index 83fd680e793f8c72ca7bdcef4316733520f413a7..d41303b73c3c52f5e395f53e4808f31d11a9fe4f 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not,see <http://www.gnu.org/licenses/>. 
 */
 
 #include "defines.h"
 #include "phase.h"
-#include "four1.h"
+#include "kiss_fft.h"
+#include "comp.h"
+#include "glottal.c"
 
 #include <assert.h>
+#include <ctype.h>
 #include <math.h>
 #include <string.h>
 #include <stdlib.h>
 
-#define VTHRESH 4.0
+#define GLOTTAL_FFT_SIZE 512
 
 /*---------------------------------------------------------------------------*\
 
@@ -47,6 +49,7 @@
 \*---------------------------------------------------------------------------*/
 
 void aks_to_H(
+              kiss_fft_cfg fft_fwd_cfg, 
              MODEL *model,     /* model parameters */
              float  aks[],     /* LPC's */
              float  G,         /* energy term */
@@ -54,7 +57,8 @@ void aks_to_H(
              int    order
 )
 {
-  COMP  Pw[FFT_DEC];   /* power spectrum */
+  COMP  pw[FFT_ENC];   /* power spectrum (input) */
+  COMP  Pw[FFT_ENC];   /* power spectrum (output) */
   int   i,m;           /* loop variables */
   int   am,bm;         /* limits of current band */
   float r;             /* no. rads/bin */
@@ -63,19 +67,19 @@ void aks_to_H(
   int   b;             /* centre bin of harmonic */
   float phi_;          /* phase of LPC spectra */
 
-  r = TWO_PI/(FFT_DEC);
+  r = TWO_PI/(FFT_ENC);
 
   /* Determine DFT of A(exp(jw)) ------------------------------------------*/
 
-  for(i=0; i<FFT_DEC; i++) {
-    Pw[i].real = 0.0;
-    Pw[i].imag = 0.0;
+  for(i=0; i<FFT_ENC; i++) {
+    pw[i].real = 0.0;
+    pw[i].imag = 0.0;
   }
 
   for(i=0; i<=order; i++)
-    Pw[i].real = aks[i];
+    pw[i].real = aks[i];
 
-  four1(&Pw[-1].imag,FFT_DEC,-1);
+  kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)pw, (kiss_fft_cpx *)Pw);
 
   /* Sample magnitude and phase at harmonics */
 
@@ -149,24 +153,26 @@ void aks_to_H(
    This E[m] then gets passed through the LPC synthesis filter to
    determine the final harmonic phase.
      
-   For a while there were prolems with low pitched males like hts1
-   sounding "clicky".  The synthesied time domain waveform also looked
-   clicky.  Many methods were tried to improve the sounds quality of
-   low pitched males. Finally adding a small amount of jitter to each
-   harmonic worked.
-
-   The current result sounds very close to the original phases, with
-   only 1 voicing bit per frame.  For example hts1a using original
-   amplitudes and this phase model produces speech hard to distinguish
-   from speech synthesise with the orginal phases.  The sound quality
-   of this patrtiallyuantised codec (nb original amplitudes) is higher
-   than g729, even though all the phase information has been
-   discarded.
+   Comparing to speech synthesised using original phases:
+
+   - Through headphones speech synthesised with this model is not as 
+     good. Through a loudspeaker it is very close to original phases.
+
+   - If there are voicing errors, the speech can sound clicky or
+     staticy.  If V speech is mistakenly declared UV, this model tends to
+     synthesise impulses or clicks, as there is usually very little shift or
+     dispersion through the LPC filter.
+
+   - When combined with LPC amplitude modelling there is an additional
+     drop in quality.  I am not sure why, theory is interformant energy
+     is raised making any phase errors more obvious.
 
    NOTES:
 
-     1/ This synthesis model is effectvely the same as simple LPC-10
-     vocoders, and yet sounds much better.  Why?
+     1/ This synthesis model is effectively the same as a simple LPC-10
+     vocoders, and yet sounds much better.  Why? Conventional wisdom
+     (AMBE, MELP) says mixed voicing is required for high quality
+     speech.
 
      2/ I am pretty sure the Lincoln Lab sinusoidal coding guys (like xMBE
      also from MIT) first described this zero phase model, I need to look
@@ -182,52 +188,64 @@ void aks_to_H(
      a small delta-W to make phase tracks line up for voiced
      harmonics.
 
-     4/ Why does this sound so great with 1 V/UV decision?  Conventional
-     wisdom says mixed voicing is required for high qaulity speech.
-
 \*---------------------------------------------------------------------------*/
 
 void phase_synth_zero_order(
+    kiss_fft_cfg fft_fwd_cfg,     
     MODEL *model,
     float  aks[],
-    float *ex_phase             /* excitation phase of fundamental */
+    float *ex_phase,            /* excitation phase of fundamental */
+    int    order
 )
 {
   int   m;
   float new_phi;
-  COMP  Ex[MAX_AMP];           /* excitation samples */
-  COMP  A_[MAX_AMP];           /* synthesised harmonic samples */
-  COMP  H[MAX_AMP];             /* LPC freq domain samples */
+  COMP  Ex[MAX_AMP+1];         /* excitation samples */
+  COMP  A_[MAX_AMP+1];         /* synthesised harmonic samples */
+  COMP  H[MAX_AMP+1];           /* LPC freq domain samples */
   float G;
-  float jitter;
+  float jitter = 0.0;
+  float r;
+  int   b;
 
   G = 1.0;
-  aks_to_H(model,aks,G,H,LPC_ORD);
+  aks_to_H(fft_fwd_cfg, model, aks, G, H, order);
 
   /* 
      Update excitation fundamental phase track, this sets the position
      of each pitch pulse during voiced speech.  After much experiment
-     I found that using just this frame Wo improved quality for UV
+     I found that using just this frame's Wo improved quality for UV
      sounds compared to interpolating two frames Wo like this:
      
-     ex_phase[0] += (*prev_Wo+mode->Wo)*N/2;
+     ex_phase[0] += (*prev_Wo+model->Wo)*N/2;
   */
   
   ex_phase[0] += (model->Wo)*N;
   ex_phase[0] -= TWO_PI*floor(ex_phase[0]/TWO_PI + 0.5);
+  r = TWO_PI/GLOTTAL_FFT_SIZE;
 
   for(m=1; m<=model->L; m++) {
-
+      
     /* generate excitation */
-
+           
     if (model->voiced) {
-       /* This method of adding jitter really helped remove the clicky
-          sound in low pitched makes like hts1a. This moves the onset
-          of each harmonic over at +/- 0.25 of a sample.
+       //float rnd;
+
+        b = floor(m*model->Wo/r + 0.5);
+       if (b > ((GLOTTAL_FFT_SIZE/2)-1)) {
+               b = (GLOTTAL_FFT_SIZE/2)-1;
+       }
+
+       /* I think adding a little jitter helps improve low pitch
+          males like hts1a. This moves the onset of each harmonic
+          over +/- 0.25 of a sample.
        */
-        jitter = 0.25*(1.0 - 2.0*rand()/RAND_MAX);
-       Ex[m].real = cos(ex_phase[0]*m - jitter*model->Wo*m);
-       Ex[m].imag = sin(ex_phase[0]*m - jitter*model->Wo*m);
+       //jitter = 0.25*(1.0 - 2.0*rand()/RAND_MAX);
+       jitter = 0;
+
+       //rnd = (PI/8)*(1.0 - 2.0*rand()/RAND_MAX);
+       Ex[m].real = cos(ex_phase[0]*m/* - jitter*model->Wo*m + glottal[b]*/);
+       Ex[m].imag = sin(ex_phase[0]*m/* - jitter*model->Wo*m + glottal[b]*/);
     }
     else {
 
@@ -252,3 +270,4 @@ void phase_synth_zero_order(
   }
 
 }
+
index 6dbf3fa2d604e4e61942829a6c929c2c1a912f4b..367948dffb843a0b971aee8d274af9b934f1672f 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __PHASE__
 #define __PHASE__
 
-void phase_synth_zero_order(MODEL *model, float aks[], float *ex_phase);
+#include "kiss_fft.h"
+
+void phase_synth_zero_order(kiss_fft_cfg fft_dec_cfg, 
+                           MODEL *model, 
+                           float aks[], 
+                            float *ex_phase, 
+                           int order);
 
 #endif
diff --git a/libs/libcodec2/src/phaseexp.c b/libs/libcodec2/src/phaseexp.c
new file mode 100644 (file)
index 0000000..57db0f0
--- /dev/null
@@ -0,0 +1,1574 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: phaseexp.c                                           
+  AUTHOR......: David Rowe                                             
+  DATE CREATED: June 2012                                                 
+                                                                             
+  Experimental functions for quantising, modelling and synthesising phase.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not,see <http://www.gnu.org/licenses/>. 
+*/
+
+#include "defines.h"
+#include "phase.h"
+#include "kiss_fft.h"
+#include "comp.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Bruce Perens' funcs to load codebook files */
+
+struct codebook {
+    unsigned int        k;
+    unsigned int        log2m;
+    unsigned int        m;
+    COMP                *cb;
+    unsigned int         offset; 
+};
+
+static const char format[] =
+"The table format must be:\n"
+"\tTwo integers describing the dimensions of the codebook.\n"
+"\tThen, enough numbers to fill the specified dimensions.\n";
+
+float get_float(FILE * in, const char * name, char * * cursor, char * buffer, int size)
+{
+  for ( ; ; ) {
+    char *     s = *cursor;
+    char       c;
+
+    while ( (c = *s) != '\0' && !isdigit(c) && c != '-' && c != '.' )
+      s++;
+     
+    /* Comments start with "#" and continue to the end of the line. */
+    if ( c != '\0' && c != '#' ) {
+      char *   end = 0;
+      float    f = 0;
+
+      f = strtod(s, &end);
+
+      if ( end != s )
+        *cursor = end;
+        return f;
+    }
+
+    if ( fgets(buffer, size, in) == NULL ) {
+      fprintf(stderr, "%s: Format error. %s\n", name, format);
+      exit(1);
+    }
+    *cursor = buffer;
+  }
+}
+
+static struct codebook *load(const char * name)
+{
+    FILE               *file;
+    char               line[2048];
+    char               *cursor = line;
+    struct codebook    *b = malloc(sizeof(struct codebook));
+    int                        i;
+    int                        size;
+    float               angle;
+
+    file = fopen(name, "rt");
+    assert(file != NULL);
+
+    *cursor = '\0';
+
+    b->k = (int)get_float(file, name, &cursor, line, sizeof(line));
+    b->m = (int)get_float(file, name ,&cursor, line, sizeof(line));
+    size = b->k * b->m;
+
+    b->cb = (COMP *)malloc(size * sizeof(COMP));
+
+    for ( i = 0; i < size; i++ ) {
+       angle = get_float(file, name, &cursor, line, sizeof(line));
+       b->cb[i].real = cos(angle);
+       b->cb[i].imag = sin(angle);
+    }
+
+    fclose(file);
+
+    return b;
+}
+
+
+/* states for phase experiments */
+
+struct PEXP {
+    float            phi1;
+    float            phi_prev[MAX_AMP];
+    float            Wo_prev;
+    int              frames;
+    float            snr;
+    float            var;
+    int              var_n;
+    struct codebook *vq1,*vq2,*vq3,*vq4,*vq5; 
+    float            vq_var;
+    int              vq_var_n;
+    MODEL            prev_model;
+    int              state;
+};
+
+
+/*---------------------------------------------------------------------------* \
+
+  phase_experiment_create()
+
+  Inits states for phase quantisation experiments.
+
+\*---------------------------------------------------------------------------*/
+
+struct PEXP * phase_experiment_create() {
+    struct PEXP *pexp;
+    int i;
+
+    pexp = (struct PEXP *)malloc(sizeof(struct PEXP));
+    assert (pexp != NULL);
+
+    pexp->phi1 = 0;
+    for(i=0; i<MAX_AMP; i++)
+       pexp->phi_prev[i] = 0.0;
+    pexp->Wo_prev = 0.0;
+    pexp->frames = 0;
+    pexp->snr = 0.0;
+    pexp->var = 0.0;
+    pexp->var_n = 0;
+    
+    /* smoothed 10th order for 1st 1 khz */
+    //pexp->vq1 = load("../unittest/ph1_10_1024.txt");
+    //pexp->vq1->offset = 0;
+
+    /* load experimental phase VQ */
+
+    //pexp->vq1 = load("../unittest/testn1_20_1024.txt");
+    pexp->vq1 = load("../unittest/test.txt");
+    //pexp->vq2 = load("../unittest/testn21_40_1024.txt");
+    pexp->vq2 = load("../unittest/test11_20_1024.txt");
+    pexp->vq3 = load("../unittest/test21_30_1024.txt");
+    pexp->vq4 = load("../unittest/test31_40_1024.txt");
+    pexp->vq5 = load("../unittest/test41_60_1024.txt");
+    pexp->vq1->offset = 0;
+    pexp->vq2->offset = 10;
+    pexp->vq3->offset = 20;
+    pexp->vq4->offset = 30;
+    pexp->vq5->offset = 40;
+
+    pexp->vq_var = 0.0;
+    pexp->vq_var_n = 0;
+
+    pexp->state = 0;
+
+    return pexp;
+}
+
+
+/*---------------------------------------------------------------------------* \
+
+  phase_experiment_destroy()
+
+\*---------------------------------------------------------------------------*/
+
+void phase_experiment_destroy(struct PEXP *pexp) {
+    assert(pexp != NULL);
+    if (pexp->snr != 0.0)
+       printf("snr: %4.2f dB\n", pexp->snr/pexp->frames);
+    if (pexp->var != 0.0)
+       printf("var...: %4.3f  std dev...: %4.3f (%d non zero phases)\n", 
+              pexp->var/pexp->var_n, sqrt(pexp->var/pexp->var_n), pexp->var_n);
+    if (pexp->vq_var != 0.0)
+       printf("vq var: %4.3f  vq std dev: %4.3f (%d non zero phases)\n", 
+              pexp->vq_var/pexp->vq_var_n, sqrt(pexp->vq_var/pexp->vq_var_n), pexp->vq_var_n);
+    free(pexp);
+}
+
+
+/*---------------------------------------------------------------------------* \
+
+  Various test and experimental functions ................
+
+\*---------------------------------------------------------------------------*/
+
+/* Bubblesort to find highest amplitude harmonics */
+
+struct AMPINDEX {
+    float amp;
+    int   index;
+};
+
+static void bubbleSort(struct AMPINDEX numbers[], int array_size)
+{
+    int i, j;
+    struct AMPINDEX temp;
+  for (i = (array_size - 1); i > 0; i--)
+  {
+    for (j = 1; j <= i; j++)
+    {
+       //printf("i %d j %d %f %f \n", i, j, numbers[j-1].amp, numbers[j].amp);
+      if (numbers[j-1].amp < numbers[j].amp)
+      {
+        temp = numbers[j-1];
+        numbers[j-1] = numbers[j];
+        numbers[j] = temp;
+      }
+    }
+  }
+}
+
+
+static void print_pred_error(struct PEXP *pexp, MODEL *model, int start, int end, float mag_thresh) {
+    int   i;
+    float mag;
+
+    mag = 0.0;
+    for(i=start; i<=end; i++)
+       mag += model->A[i]*model->A[i];
+    mag = 10*log10(mag/(end-start));
+    
+    if (mag > mag_thresh) {
+       for(i=start; i<=end; i++) {
+           float pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0;
+           float err = pred - model->phi[i];
+           err = atan2(sin(err),cos(err));
+           printf("%f\n",err);    
+       }
+       //printf("\n");
+    }
+  
+}
+
+
+static void predict_phases(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i;
+
+    for(i=start; i<=end; i++) {
+       model->phi[i] = pexp->phi_prev[i] + N*i*model->Wo;
+    }
+   
+}
+static float refine_Wo(struct PEXP     *pexp, 
+                      MODEL           *model, 
+                      int              start, 
+                      int              end);
+
+/* Fancy state based phase prediction.  Actually works OK on most utterances,
+   but could use some tuning.  Breaks down a bit on mmt1. */
+
+static void predict_phases_state(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i, next_state;
+    float best_Wo, dWo;
+
+    //best_Wo = refine_Wo(pexp, model, start, end);
+    //best_Wo = (model->Wo + pexp->Wo_prev)/2.0;
+    best_Wo = model->Wo;
+
+    dWo = fabs(model->Wo - pexp->Wo_prev)/model->Wo;
+    next_state = pexp->state;
+    switch(pexp->state) {
+    case 0:
+       if (dWo < 0.1) {
+           /* UV -> V transition, so start with phases in lock.  They will
+              drift a bit over voiced track which is kinda what we want, so
+              we don't get clicky speech.
+           */
+           next_state = 1;
+           for(i=start; i<=end; i++)
+               pexp->phi_prev[i] = i*pexp->phi1;
+       }
+       
+       break;
+    case 1:
+       if (dWo > 0.1)
+           next_state = 0;
+       break;
+    }
+    pexp->state = next_state;
+
+    if (pexp->state == 0)
+       for(i=start; i<=end; i++) {
+           model->phi[i] = PI*(1.0 - 2.0*rand()/RAND_MAX);
+       }
+    else
+       for(i=start; i<=end; i++) {
+           model->phi[i] = pexp->phi_prev[i] + N*i*best_Wo;
+       }
+    printf("state %d\n", pexp->state);
+}
+
+static void struct_phases(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i;
+
+    for(i=start; i<=end; i++)
+       model->phi[i] = pexp->phi1*i;
+   
+}
+
+
+static void predict_phases2(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i;
+    float pred, str, diff;
+
+    for(i=start; i<=end; i++) {
+       pred = pexp->phi_prev[i] + N*i*model->Wo;
+       str = pexp->phi1*i;
+       diff = str - pred;
+       diff = atan2(sin(diff), cos(diff));
+       if (diff > 0)
+           pred += PI/16;
+       else
+           pred -= PI/16;
+       model->phi[i] = pred;
+    }
+   
+}
+
+static void skip_phases(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i;
+
+    for(i=start; i<=end; i+=2)
+       model->phi[i] = model->phi[i-1] - model->phi[i-2];
+   
+}
+
+static void rand_phases(MODEL *model, int start, int end) {
+    int i;
+
+    for(i=start; i<=end; i++)
+       model->phi[i] = PI*(1.0 - 2.0*(float)rand()/RAND_MAX);
+   
+}
+
+static void quant_phase(float *phase, float min, float max, int bits) {
+    int   levels = 1 << bits; 
+    int   index;
+    float norm, step;
+
+    norm = (*phase - min)/(max - min);
+    index = floor(levels*norm);
+
+    //printf("phase %f norm %f index %d ", *phase, norm, index);
+    if (index < 0 ) index = 0;
+    if (index > (levels-1)) index = levels-1;
+    //printf("index %d ", index);
+    step = (max - min)/levels;
+    *phase = min + step*index + 0.5*step;
+    //printf("step %f phase %f\n", step, *phase);
+}
+
+static void quant_phases(MODEL *model, int start, int end, int bits) {
+    int i;
+
+    for(i=start; i<=end; i++) {
+       quant_phase(&model->phi[i], -PI, PI, bits);
+    }
+}
+
+static void fixed_bits_per_frame(struct PEXP *pexp, MODEL *model, int m, int budget) {
+    int res, finished;
+
+    res = 3;
+    finished = 0;
+
+    while(!finished) {
+       if (m > model->L/2)
+           res = 2;
+       if (((budget - res) < 0) || (m > model->L))
+           finished = 1;
+       else {
+           quant_phase(&model->phi[m], -PI, PI, res);      
+           budget -= res;
+           m++;
+       }
+    }
+    printf("m: %d L: %d budget: %d\n", m, model->L, budget);
+    predict_phases(pexp, model, m, model->L);
+    //rand_phases(model, m, model->L);
+}
+
+/* used to plot histogram of quantisation error, for 3 bits, 8 levels,
+   should be uniform between +/- PI/8 */
+
+static void check_phase_quant(MODEL *model, float tol)
+{
+    int m;
+    float phi_before[MAX_AMP];
+
+    for(m=1; m<=model->L; m++)
+       phi_before[m] = model->phi[m];
+
+    quant_phases(model, 1, model->L, 3);
+
+    for(m=1; m<=model->L; m++) {
+       float err = phi_before[m] - model->phi[m];
+       printf("%f\n", err);
+       if (fabs(err) > tol)
+           exit(0);
+    }
+}
+
+
+static float est_phi1(MODEL *model, int start, int end)
+{
+    int m;
+    float delta, s, c, phi1_est;
+
+    if (end > model->L) 
+       end = model->L;
+
+    s = c = 0.0;
+    for(m=start; m<end; m++) {
+       delta = model->phi[m+1] - model->phi[m];
+       s += sin(delta);
+       c += cos(delta);
+    }
+
+    phi1_est = atan2(s,c);
+    
+    return phi1_est;
+}
+
+static void print_phi1_pred_error(MODEL *model, int start, int end)
+{
+    int m;
+    float phi1_est;
+
+    phi1_est = est_phi1(model, start, end);
+
+    for(m=start; m<end; m++) {
+       float err = model->phi[m+1] - model->phi[m] - phi1_est;
+       err = atan2(sin(err),cos(err));
+       printf("%f\n", err);
+    }
+}
+
+
+static void first_order_band(MODEL *model, int start, int end, float phi1_est)
+{
+    int   m;
+    float pred_err, av_pred_err;
+    float c,s;
+
+    s = c = 0.0;
+    for(m=start; m<end; m++) {
+       pred_err = model->phi[m] - phi1_est*m;
+       s += sin(pred_err);
+       c += cos(pred_err);
+    }
+
+    av_pred_err = atan2(s,c);
+    for(m=start; m<end; m++) {
+       model->phi[m] = av_pred_err + phi1_est*m;
+       model->phi[m] = atan2(sin(model->phi[m]), cos(model->phi[m]));
+    }
+
+}
+
+
+static void sub_linear(MODEL *model, int start, int end, float phi1_est)
+{
+    int   m;
+
+    for(m=start; m<end; m++) {
+       model->phi[m] = m*phi1_est;
+    }
+}
+
+
+static void top_amp(struct PEXP *pexp, MODEL *model, int start, int end, int n_harm, int pred)
+{
+    int removed = 0, not_removed = 0;
+    int top, i, j;
+    struct AMPINDEX sorted[MAX_AMP];
+
+    /* sort into ascending order of amplitude */
+
+    printf("\n");
+    for(i=start,j=0; i<end; i++,j++) {
+       sorted[j].amp = model->A[i];
+       sorted[j].index = i;
+       printf("%f ", model->A[i]);
+    }
+    bubbleSort(sorted, end-start);
+
+    printf("\n");
+    for(j=0; j<n_harm; j++)
+       printf("%d %f\n", j, sorted[j].amp);
+
+    /* keep phase of top n_harm, predict others */
+
+    for(i=start; i<end; i++) {         
+       top = 0;
+       for(j=0; j<n_harm; j++) {
+           if (model->A[i] == sorted[j].amp) {
+               top = 1;
+               assert(i == sorted[j].index);
+           }
+       }
+       
+       #define ALTTOP
+       #ifdef ALTTOP
+       model->phi[i] = 0.0; /* make sure */
+       if (top) {
+           model->phi[i] = i*pexp->phi1;
+           removed++;
+       }
+       else {
+           model->phi[i] = PI*(1.0 - 2.0*(float)rand()/RAND_MAX); // note: try rand for higher harms
+           removed++;
+       }
+       #else
+       if (!top) {
+           model->phi[i] = 0.0; /* make sure */
+           if (pred)  {
+               //model->phi[i] = pexp->phi_prev[i] + i*N*(model->Wo + pexp->Wo_prev)/2.0;
+               model->phi[i] = i*model->phi[1];
+           }
+           else
+               model->phi[i] = PI*(1.0 - 2.0*(float)rand()/RAND_MAX); // note: try rand for higher harms
+           removed++;
+       }
+       else {
+           /* need to make this work thru budget of bits */
+           quant_phase(&model->phi[i], -PI, PI, 3);        
+           not_removed++;
+       }
+       #endif
+    }
+    printf("dim: %d rem %d not_rem %d\n", end-start, removed, not_removed);
+           
+}
+
+    
+static void limit_prediction_error(struct PEXP *pexp, MODEL *model, int start, int end, float limit) 
+{
+    int   i;
+    float pred, pred_error, error;
+
+    for(i=start; i<=end; i++) {
+       pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0;
+       pred_error = pred - model->phi[i]; 
+       pred_error -= TWO_PI*floor((pred_error+PI)/TWO_PI);
+       quant_phase(&pred_error, -limit, limit, 2);     
+       
+       error = pred - pred_error - model->phi[i];
+       error -= TWO_PI*floor((error+PI)/TWO_PI);
+       printf("%f\n", pred_error);
+       model->phi[i] = pred - pred_error;
+    }
+}
+
+
+static void quant_prediction_error(struct PEXP *pexp, MODEL *model, int start, int end, float limit) 
+{
+    int   i;
+    float pred, pred_error;
+
+    for(i=start; i<=end; i++) {
+       pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0;
+       pred_error = pred - model->phi[i]; 
+       pred_error -= TWO_PI*floor((pred_error+PI)/TWO_PI);
+       
+       printf("%f\n", pred_error);
+       model->phi[i] = pred - pred_error;
+    }
+}
+
+
+static void print_sparse_pred_error(struct PEXP *pexp, MODEL *model, int start, int end, float mag_thresh)
+{
+    int    i, index;
+    float  mag, pred, error;
+    float  sparse_pe[MAX_AMP];
+
+    mag = 0.0;
+    for(i=start; i<=end; i++)
+       mag += model->A[i]*model->A[i];
+    mag = 10*log10(mag/(end-start));
+    
+    if (mag > mag_thresh) {
+       for(i=0; i<MAX_AMP; i++) {
+           sparse_pe[i] = 0.0;
+       }
+
+       for(i=start; i<=end; i++) {
+           pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0;
+           error = pred - model->phi[i];
+           error = atan2(sin(error),cos(error));
+
+           index = MAX_AMP*i*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe[index] = error;
+       }
+
+       /* dump spare phase vector in polar format */
+
+       for(i=0; i<MAX_AMP; i++)
+           printf("%f ", sparse_pe[i]);
+       printf("\n");
+    }
+}
+
+
+static void update_snr_calc(struct PEXP *pexp, MODEL *model, float before[])
+{
+    int m;
+    float signal, noise, diff;
+
+    signal = 0.0; noise = 0.0;
+    for(m=1; m<=model->L; m++) {           
+       signal += model->A[m]*model->A[m];
+       diff = cos(model->phi[m]) - cos(before[m]);         
+       noise  += pow(model->A[m]*diff, 2.0);
+       diff = sin(model->phi[m]) - sin(before[m]);         
+       noise  += pow(model->A[m]*diff, 2.0);
+       //printf("%f %f\n", before[m], model->phi[m]);
+    }
+    //printf("%f %f snr = %f\n", signal, noise, 10.0*log10(signal/noise));
+    pexp->snr += 10.0*log10(signal/noise);
+}
+
+
+static void update_variance_calc(struct PEXP *pexp, MODEL *model, float before[])
+{
+    int m;
+    float diff;
+
+    for(m=1; m<model->L; m++) {            
+        diff = model->phi[m] - before[m];
+        diff = atan2(sin(diff), cos(diff));
+        pexp->var += diff*diff;
+    }
+    pexp->var_n += model->L;
+}
+
+void print_vec(COMP cb[], int d, int e)
+{
+    int i,j;
+
+    for(j=0; j<e; j++) {
+       for(i=0; i<d; i++) 
+           printf("%f %f ", cb[j*d+i].real, cb[j*d+i].imag);
+       printf("\n");
+    }
+}
+
+static COMP cconj(COMP a)
+{
+    COMP res;
+
+    res.real = a.real;
+    res.imag = -a.imag;
+
+    return res;
+}
+
+static COMP cadd(COMP a, COMP b)
+{
+    COMP res;
+
+    res.real = a.real + b.real;
+    res.imag = a.imag + b.imag;
+
+    return res;
+}
+
+static COMP cmult(COMP a, COMP b)
+{
+    COMP res;
+
+    res.real = a.real*b.real - a.imag*b.imag;
+    res.imag = a.real*b.imag + a.imag*b.real;
+
+    return res;
+}
+
+static int vq_phase(COMP cb[], COMP vec[], float weights[], int d, int e, float *se)
+{
+   float   error;      /* current error                */
+   int     besti;      /* best index so far            */
+   float   best_error; /* best error so far            */
+   int    i,j;
+   int     ignore;
+   COMP    diffr;
+   float   diffp, metric, best_metric;
+
+   besti = 0;
+   best_metric = best_error = 1E32;
+   for(j=0; j<e; j++) {
+       error = 0.0;
+       metric = 0.0;
+       for(i=0; i<d; i++) {
+           ignore = (vec[i].real == 0.0) && (vec[i].imag == 0.0);
+           if (!ignore) {
+               diffr = cmult(cb[j*d+i], cconj(vec[i]));
+               diffp = atan2(diffr.imag, diffr.real);
+               error  += diffp*diffp;
+               metric += weights[i]*weights[i]*diffp*diffp;
+               //metric += weights[i]*diffp*diffp;
+               //metric = log10(weights[i]*fabs(diffp));
+               //printf("diffp %f metric %f\n", diffp, metric);
+               //if (metric < log10(PI/(8.0*sqrt(3.0))))
+               //   metric = log10(PI/(8.0*sqrt(3.0)));
+           }
+       }
+       if (metric < best_metric) {
+           best_metric = metric;
+           best_error = error;
+           besti = j;
+       }
+   }
+
+   *se += best_error;
+
+   return(besti);
+}
+
+
+static float refine_Wo(struct PEXP     *pexp, 
+                      MODEL           *model, 
+                      int              start, 
+                      int              end)
+
+{
+    int i;
+    float Wo_est, best_var, Wo, var, pred, error, best_Wo;
+
+    /* test variance over a range of Wo values */
+
+    Wo_est = (model->Wo + pexp->Wo_prev)/2.0;
+    best_var = 1E32;
+    for(Wo=0.97*Wo_est; Wo<=1.03*Wo_est; Wo+=0.001*Wo_est) {
+
+       /* predict phase and sum differences between harmonics */
+
+       var = 0.0;
+       for(i=start; i<=end; i++) {
+           pred = pexp->phi_prev[i] + N*i*Wo;
+           error = pred - model->phi[i];
+           error = atan2(sin(error),cos(error));
+           var += error*error;
+       }
+
+       if (var < best_var) {
+           best_var = var;
+           best_Wo = Wo;
+       }
+    }
+
+    return best_Wo;
+}
+
+
+static void split_vq(COMP sparse_pe_out[], struct PEXP *pexp, struct codebook *vq, float weights[], COMP sparse_pe_in[])
+{
+    int i, j, non_zero, vq_ind;
+    
+    //printf("\n offset %d k %d m %d  j: ", vq->offset, vq->k, vq->m);
+    vq_ind = vq_phase(vq->cb, &sparse_pe_in[vq->offset], &weights[vq->offset], vq->k, vq->m, &pexp->vq_var);
+  
+    non_zero = 0;
+    for(i=0, j=vq->offset; i<vq->k; i++,j++) {
+       //printf("%f ", atan2(sparse_pe[i].imag, sparse_pe[i].real));
+       if ((sparse_pe_in[j].real != 0.0) && (sparse_pe_in[j].imag != 0.0)) {
+           //printf("%d ", j);
+           sparse_pe_out[j] = vq->cb[vq->k * vq_ind + i];
+           non_zero++;
+       }
+    }
+    pexp->vq_var_n += non_zero;
+}
+
+
+static void sparse_vq_pred_error(struct PEXP     *pexp, 
+                                MODEL           *model 
+)
+{
+    int              i, index;
+    float            pred, error, error_q_angle, best_Wo;
+    COMP             sparse_pe_in[MAX_AMP], sparse_pe_out[MAX_AMP];
+    float            weights[MAX_AMP];
+    COMP             error_q_rect;
+
+     best_Wo = refine_Wo(pexp, model, 1, model->L);
+    //best_Wo = (model->Wo + pexp->Wo_prev)/2.0;
+
+     /* transform to sparse pred error vector */
+
+    for(i=0; i<MAX_AMP; i++) {
+       sparse_pe_in[i].real = 0.0;
+       sparse_pe_in[i].imag = 0.0;
+       sparse_pe_out[i].real = 0.0;
+       sparse_pe_out[i].imag = 0.0;
+    }
+
+    //printf("\n");
+    for(i=1; i<=model->L; i++) {
+       pred = pexp->phi_prev[i] + N*i*best_Wo;
+       error = pred - model->phi[i];
+
+       index = MAX_AMP*i*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_in[index].real = cos(error);
+       sparse_pe_in[index].imag = sin(error);
+       sparse_pe_out[index] = sparse_pe_in[index];
+       weights[index] = model->A[i];
+       //printf("%d ", index);
+    }
+    
+    /* vector quantise */
+        
+    split_vq(sparse_pe_out, pexp, pexp->vq1, weights, sparse_pe_in);
+    split_vq(sparse_pe_out, pexp, pexp->vq2, weights, sparse_pe_in);
+    split_vq(sparse_pe_out, pexp, pexp->vq3, weights, sparse_pe_in);
+    split_vq(sparse_pe_out, pexp, pexp->vq4, weights, sparse_pe_in);
+    split_vq(sparse_pe_out, pexp, pexp->vq5, weights, sparse_pe_in);
+    
+    /* transform quantised phases back */
+
+    for(i=1; i<=model->L; i++) {
+       pred = pexp->phi_prev[i] + N*i*best_Wo;
+
+       index = MAX_AMP*i*model->Wo/PI;
+       assert(index < MAX_AMP);
+       error_q_rect  = sparse_pe_out[index];
+       error_q_angle = atan2(error_q_rect.imag, error_q_rect.real);
+       model->phi[i] = pred - error_q_angle;
+       model->phi[i] = atan2(sin(model->phi[i]), cos(model->phi[i]));
+    }
+}
+
+
+/*
+  est delta (in Wo)
+  see if this gives us a better (smaller variance) prediction error
+*/
+
+static void print_pred_error_sparse_wo_correction(struct PEXP *pexp, 
+                                                 MODEL *model, 
+                                                 int start, int end, 
+                                                 float mag_thresh)
+{
+    int   i, index;
+    float mag, pred, error[MAX_AMP], diff, c, s, delta, err;
+    float sparse_pe[MAX_AMP];
+
+    mag = 0.0;
+    for(i=start; i<=end; i++)
+       mag += model->A[i]*model->A[i];
+    mag = 10*log10(mag/(end-start));
+    
+    if (mag > mag_thresh) {
+       for(i=0; i<MAX_AMP; i++) {
+           sparse_pe[i] = 0.0;
+       }
+
+       /* predict phase and sum differences between harmonics */
+
+       for(i=start; i<=end; i++) {
+           //model->phi[i] = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0 + 0.01*N*i;
+           pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0;
+           error[i] = pred - model->phi[i];
+       }
+
+       /* estimate delta Wo */
+
+       c = s = 0.0;
+       for(i=start+1; i<=end; i++) {
+           diff = error[i] - error[i-1];
+           c += log(model->A[i])*cos(diff);
+           s += log(model->A[i])*sin(diff);
+       }
+       delta = atan2(s,c)/N;
+       //printf("delta %f\n",delta);
+       delta = 0;
+       /* now predict phases using corrected Wo */
+       for(i=start; i<=end; i++) {
+           pred = pexp->phi_prev[i] + N*i*(model->Wo + pexp->Wo_prev)/2.0 - N*i*delta;
+           err = pred - model->phi[i];
+           err = atan2(sin(err),cos(err));
+
+           index = MAX_AMP*i*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe[index] = err;
+       }
+
+       /* dump spare phase vector in polar format */
+       
+       for(i=0; i<MAX_AMP; i++)
+           printf("%f ", sparse_pe[i]);
+       printf("\n");
+       
+    }
+  
+}
+
+
+static void print_pred_error_sparse_wo_correction1(struct PEXP *pexp, 
+                                                 MODEL *model, 
+                                                 int start, int end, 
+                                                 float mag_thresh)
+{
+    int   i, index;
+    float mag, pred, best_Wo, err;
+    float sparse_pe[MAX_AMP];
+
+    mag = 0.0;
+    for(i=start; i<=end; i++)
+       mag += model->A[i]*model->A[i];
+    mag = 10*log10(mag/(end-start));
+    
+    if (mag > mag_thresh) {
+
+       best_Wo = refine_Wo(pexp, model, start, end);
+
+       /* now predict phases using corrected Wo */
+       for(i=0; i<MAX_AMP; i++) {
+           sparse_pe[i] = 0.0;
+       }
+
+       for(i=start; i<=end; i++) {
+           pred = pexp->phi_prev[i] + N*i*best_Wo;
+           err = pred - model->phi[i];
+           err = atan2(sin(err),cos(err));
+
+           index = MAX_AMP*i*model->Wo/PI;
+           assert(index < MAX_AMP);
+           sparse_pe[index] = err;
+       }
+
+       /* dump spare phase vector in polar format */
+       
+       for(i=0; i<MAX_AMP; i++)
+           printf("%f ", sparse_pe[i]);
+       printf("\n");
+       
+    }
+  
+}
+
+
+static void predict_phases1(struct PEXP *pexp, MODEL *model, int start, int end) {
+    int i;
+    float best_Wo;
+
+    best_Wo = refine_Wo(pexp, model, 1, model->L);
+    
+    for(i=start; i<=end; i++) {
+       model->phi[i] = pexp->phi_prev[i] + N*i*best_Wo;
+    }
+}
+
+
+/*
+  This functions tests theory that some bands can be combined together
+  due to less frequency resolution at higher frequencies.  This will
+  reduce the amount of information we need to encode.
+*/
+
+void smooth_phase(struct PEXP *pexp, MODEL *model, int mode)
+{
+    int    m, i, j, index, step, v, en, nav, st;
+    COMP   sparse_pe_in[MAX_AMP], av;
+    COMP   sparse_pe_out[MAX_AMP];
+    COMP   smoothed[MAX_AMP];
+    float  best_Wo, pred, err;
+    float  weights[MAX_AMP];
+    float  avw, smoothed_weights[MAX_AMP];
+    COMP   smoothed_in[MAX_AMP], smoothed_out[MAX_AMP];
+
+    best_Wo = refine_Wo(pexp, model, 1, model->L);
+
+    for(m=0; m<MAX_AMP; m++) {
+       sparse_pe_in[m].real = sparse_pe_in[m].imag = 0.0;
+       sparse_pe_out[m].real = sparse_pe_out[m].imag = 0.0;
+    }
+
+    /* set up sparse array */
+
+    for(m=1; m<=model->L; m++) {
+       pred = pexp->phi_prev[m] + N*m*best_Wo;
+       err = model->phi[m] - pred;
+       err = atan2(sin(err),cos(err));
+
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       sparse_pe_in[index].real = model->A[m]*cos(err);
+       sparse_pe_in[index].imag = model->A[m]*sin(err);
+       sparse_pe_out[index] = sparse_pe_in[index];
+       weights[index] = model->A[m];
+    }
+
+    /* now combine samples at high frequencies to reduce dimension */
+
+    step = 2;
+    st = 0;
+    for(i=st,v=0; i<MAX_AMP; i+=step,v++) {
+
+       /* average over one band */
+
+       av.real = 0.0; av.imag = 0.0; avw = 0.0; nav = 0;
+       en = i+step;
+       if (en > (MAX_AMP-1))
+           en = MAX_AMP-1;
+       for(j=i; j<en; j++) {
+           if ((sparse_pe_in[j].real != 0.0) &&(sparse_pe_in[j].imag != 0.0) ) {
+               av = cadd(av, sparse_pe_in[j]);
+               avw += weights[j];
+               nav++;
+           }
+       }
+       if (nav) {
+           smoothed[v] = av;
+           smoothed_weights[v] = avw/nav;
+       }
+       else
+           smoothed[v].real = smoothed[v].imag = 0.0;
+    }
+
+    if (mode == 2) {
+       for(i=0; i<MAX_AMP; i++) {
+           smoothed_in[i] = smoothed[i];
+           smoothed_out[i] = smoothed_in[i];
+       }
+       split_vq(smoothed_out, pexp, pexp->vq1, smoothed_weights, smoothed_in);
+       for(i=0; i<MAX_AMP; i++)
+           smoothed[i] = smoothed_out[i];
+    }
+
+    /* set all samples to smoothed average */
+
+    for(i=st,v=0; i<MAX_AMP; i+=step,v++) {
+       en = i+step;
+       if (en > (MAX_AMP-1))
+           en = MAX_AMP-1;
+       for(j=i; j<en; j++)
+           sparse_pe_out[j] = smoothed[v];
+       if (mode == 1)
+           printf("%f ", atan2(smoothed[v].imag, smoothed[v].real));
+    }
+    if (mode == 1)
+       printf("\n");
+
+    /* convert back to Am */
+    
+    for(m=1; m<=model->L; m++) {
+       index = MAX_AMP*m*model->Wo/PI;
+       assert(index < MAX_AMP);
+       pred = pexp->phi_prev[m] + N*m*best_Wo;
+       err = atan2(sparse_pe_out[index].imag, sparse_pe_out[index].real);
+       model->phi[m] = pred + err;
+    }
+    
+}
+
+/*
+  Another version of a functions that tests the theory that some bands
+  can be combined together due to less frequency resolution at higher
+  frequencies.  This will reduce the amount of information we need to
+  encode.
+*/
+
+void smooth_phase2(struct PEXP *pexp, MODEL *model) {
+    float m;
+    float step;
+    int   a,b,h,i;
+    float best_Wo, pred, err, s,c, phi1_;
+
+    best_Wo = refine_Wo(pexp, model, 1, model->L);
+
+    step = (float)model->L/30;
+    printf("\nL: %d step: %3.2f am,bm: ", model->L, step);
+    for(m=(float)model->L/4; m<=model->L; m+=step) {
+       a = floor(m);
+       b = floor(m+step);
+       if (b > model->L) b = model->L;
+       h = b-a;
+
+       printf("%d,%d,(%d)  ", a, b, h);
+       c = s = 0.0;
+       if (h>1) {
+           for(i=a; i<b; i++) {
+               pred = pexp->phi_prev[i] + N*i*best_Wo;
+               err = model->phi[i] - pred;
+               c += cos(err); s += sin(err);
+           }
+           phi1_ = atan2(s,c);
+           for(i=a; i<b; i++) {
+               pred = pexp->phi_prev[i] + N*i*best_Wo;
+               printf("%d: %4.3f -> ", i, model->phi[i]); 
+               model->phi[i] = pred + phi1_;
+               model->phi[i] = atan2(sin(model->phi[i]),cos(model->phi[i]));
+               printf("%4.3f  ", model->phi[i]); 
+           }
+       }
+    }
+}
+
+
+#define MAX_BINS 40
+//static float bins[] = {2600.0, 2800.0, 3000.0, 3200.0, 3400.0, 3600.0, 3800.0, 4000.0};
+static float bins[] = {/*
+
+                       1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 
+                      1500.0, 1600.0, 1700.0, 1800.0, 1900.0,*/
+
+    2000.0, 2400.0, 2800.0,
+    3000.0, 3400.0, 3600.0, 4000.0};
+
+void smooth_phase3(struct PEXP *pexp, MODEL *model) {
+    int    m, i;
+    int   nbins;
+    int   b;
+    float f, best_Wo, pred, err;
+    COMP  av[MAX_BINS];
+
+    nbins = sizeof(bins)/sizeof(float);
+    best_Wo = refine_Wo(pexp, model, 1, model->L);
+
+    /* clear all bins */
+
+    for(i=0; i<MAX_BINS; i++) {
+       av[i].real = 0.0;
+       av[i].imag = 0.0;
+    }
+
+    /* add phases into each bin */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin  */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           /* est predicted phase from average */
+
+           pred = pexp->phi_prev[m] + N*m*best_Wo; 
+           err = model->phi[m] - pred;
+           av[b].real += cos(err); av[b].imag += sin(err);
+       }
+           
+    }
+
+    /* use averages to est phases */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           /* add predicted phase error to this bin */
+
+           printf("L %d m %d f %4.f b %d\n", model->L, m, f, b);
+
+           pred = pexp->phi_prev[m] + N*m*best_Wo;
+           err = atan2(av[b].imag, av[b].real);
+           printf(" %d: %4.3f -> ", m, model->phi[m]); 
+           model->phi[m] = pred + err;
+           model->phi[m] = atan2(sin(model->phi[m]),cos(model->phi[m]));
+           printf("%4.3f\n", model->phi[m]); 
+       }
+    }
+    printf("\n");
+}
+
+
+/* 
+   Try to code the phase of the largest amplitude in each band.  Randomise the
+   phase of the other harmonics. The theory is that only the largest harmonic
+   will be audible.
+*/
+
+void cb_phase1(struct PEXP *pexp, MODEL *model) {
+    int   m, i;
+    int   nbins;
+    int   b;
+    float f, best_Wo;
+    float max_val[MAX_BINS];
+    int   max_ind[MAX_BINS];
+
+    nbins = sizeof(bins)/sizeof(float);
+    best_Wo = refine_Wo(pexp, model, 1, model->L);
+
+    for(i=0; i<nbins; i++)
+       max_val[i] = 0.0;
+
+    /* determine max amplitude for each bin */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin  */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           if (model->A[m] > max_val[b]) {
+               max_val[b] = model->A[m];
+               max_ind[b] = m;
+           }
+       }
+           
+    }
+
+    /* randomise phase of other harmonics */
+
+    for(m=1; m<=model->L; m++) {
+       f = m*model->Wo*FS/TWO_PI;
+       if (f > bins[0]) {
+
+           /* find bin */
+
+           for(i=0; i<nbins; i++)
+               if ((f > bins[i]) && (f <= bins[i+1]))
+                   b = i;
+           assert(b < MAX_BINS);
+
+           if (m != max_ind[b])
+               model->phi[m] = pexp->phi_prev[m] + N*m*best_Wo;
+       }
+    }
+}
+
+
+/* 
+   Theory is only the phase of the envelope of signal matters within a
+   Critical Band. So we estimate the position of an impulse that
+   approximates the envelope of the signal.
+*/
+
+void cb_phase2(struct PEXP *pexp, MODEL *model) {
+    int   st, m, i, a, b, step;
+    float diff,w,c,s,phi1_;
+    float A[MAX_AMP];
+
+    for(m=1; m<=model->L; m++) {
+       A[m] = model->A[m];
+       model->A[m] = 0;
+    }
+
+    st = 2*model->L/4;
+    step = 3;
+    model->phi[1] = pexp->phi_prev[1] + (pexp->Wo_prev+model->Wo)*N/2.0;
+
+    printf("L=%d ", model->L);
+    for(m=st; m<st+step*2; m+=step) {
+       a = m; b=a+step;
+       if (b > model->L)
+           b = model->L;
+       
+       c = s = 0;
+       for(i=a; i<b-1; i++) {
+           printf("diff %d,%d ", i, i+1);
+           diff = model->phi[i+1] - model->phi[i];
+           //w = (model->A[i+1] + model->A[i])/2; 
+           w = 1.0;
+           c += w*cos(diff); s += w*sin(diff);
+       }
+       phi1_ = atan2(s,c);
+       printf("replacing: ");
+       for(i=a; i<b; i++) {
+           //model->phi[i] = i*phi1_;
+           //model->phi[i] = i*model->phi[1];
+           //model->phi[i] = m*(pexp->Wo_prev+model->Wo)*N/2.0;
+           model->A[m] = A[m];
+           printf("%d ", i);
+       }
+       printf(" . ");
+    }
+    printf("\n");
+}
+
+
+static void smooth_phase4(MODEL *model) {
+    int    m;
+    float  phi_m, phi_m_1;
+
+    if (model->L > 25) {
+       printf("\nL %d\n", model->L);
+       for(m=model->L/2; m<=model->L; m+=2) {
+           if ((m+1) <= model->L) {
+               phi_m   = (model->phi[m] - model->phi[m+1])/2.0;
+               phi_m_1 = (model->phi[m+1] - model->phi[m])/2.0;
+               model->phi[m] = phi_m;
+               model->phi[m+1] = phi_m_1;
+               printf("%d %4.3f %4.3f  ", m, phi_m, phi_m_1);
+           }
+       }
+    }
+
+}
+
+/* try repeating last frame, just advance phases to account for time shift */
+
+static void repeat_phases(struct PEXP *pexp, MODEL *model) {
+    int m;
+
+    *model = pexp->prev_model;
+    for(m=1; m<=model->L; m++)
+       model->phi[m] += N*m*model->Wo;
+
+}
+
+/*---------------------------------------------------------------------------*\
+
+  phase_experiment()
+
+  Phase quantisation experiments.
+
+\*---------------------------------------------------------------------------*/
+
+void phase_experiment(struct PEXP *pexp, MODEL *model, char *arg) {
+    int              m;
+    float            before[MAX_AMP], best_Wo;
+
+    assert(pexp != NULL);
+    memcpy(before, &model->phi[0], sizeof(float)*MAX_AMP);
+
+    if (strcmp(arg,"q3") == 0) { 
+       quant_phases(model, 1, model->L, 3);
+       update_snr_calc(pexp, model, before);
+       update_variance_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"dec2") == 0) {
+       if ((pexp->frames % 2) != 0) {
+           predict_phases(pexp, model, 1, model->L);   
+           update_snr_calc(pexp, model, before);
+           update_variance_calc(pexp, model, before);
+       }
+    }
+
+    if (strcmp(arg,"repeat") == 0) {
+       if ((pexp->frames % 2) != 0) {
+           repeat_phases(pexp, model); 
+           update_snr_calc(pexp, model, before);
+           update_variance_calc(pexp, model, before);
+       }
+    }
+
+    if (strcmp(arg,"vq") == 0) {
+       sparse_vq_pred_error(pexp, model);
+       update_snr_calc(pexp, model, before);
+       update_variance_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"pred") == 0) 
+       predict_phases_state(pexp, model, 1, model->L);
+
+    if (strcmp(arg,"pred1k") == 0) 
+       predict_phases(pexp, model, 1, model->L/4);
+
+    if (strcmp(arg,"smooth") == 0) {
+       smooth_phase(pexp, model,0);
+       update_snr_calc(pexp, model, before);
+    }
+    if (strcmp(arg,"smoothtrain") == 0) 
+       smooth_phase(pexp, model,1);
+    if (strcmp(arg,"smoothvq") == 0) {
+       smooth_phase(pexp, model,2);
+       update_snr_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"smooth2") == 0) 
+       smooth_phase2(pexp, model);
+    if (strcmp(arg,"smooth3") == 0) 
+       smooth_phase3(pexp, model);
+    if (strcmp(arg,"smooth4") == 0) 
+       smooth_phase4(model);
+    if (strcmp(arg,"vqsmooth3") == 0)  {
+       sparse_vq_pred_error(pexp, model);
+       smooth_phase3(pexp, model);
+    }
+
+    if (strcmp(arg,"cb1") == 0) {
+       cb_phase1(pexp, model);
+       update_snr_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"top") == 0) {
+       //top_amp(pexp, model, 1, model->L/4, 4, 1);
+       //top_amp(pexp, model, model->L/4, model->L/3, 4, 1);
+       //top_amp(pexp, model, model->L/3+1, model->L/2, 4, 1);
+       //top_amp(pexp, model, model->L/2, model->L, 6, 1);
+        //rand_phases(model, model->L/2, 3*model->L/4);
+       //struct_phases(pexp, model, model->L/2, 3*model->L/4);
+       //update_snr_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"pred23") == 0) {
+       predict_phases2(pexp, model, model->L/2, model->L);
+       update_snr_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"struct23") == 0) {
+       struct_phases(pexp, model, model->L/2, 3*model->L/4 );
+       update_snr_calc(pexp, model, before);
+    }
+
+    if (strcmp(arg,"addnoise") == 0) {
+       int m;
+       float max;
+
+       max = 0;
+       for(m=1; m<=model->L; m++)
+           if (model->A[m] > max)
+               max = model->A[m];
+       max = 20.0*log10(max);
+       for(m=1; m<=model->L; m++)
+           if (20.0*log10(model->A[m]) < (max-20)) {
+               model->phi[m] += (PI/4)*(1.0 -2.0*rand()/RAND_MAX);
+               //printf("m %d\n", m);
+           }
+    }
+
+    /* normalise phases */
+
+    for(m=1; m<=model->L; m++)
+       model->phi[m] = atan2(sin(model->phi[m]), cos(model->phi[m]));
+
+    /* update states */
+
+    //best_Wo = refine_Wo(pexp, model,  model->L/2, model->L);
+    pexp->phi1 += N*model->Wo;
+    
+    for(m=1; m<=model->L; m++)
+       pexp->phi_prev[m] = model->phi[m];          
+    pexp->Wo_prev = model->Wo;
+    pexp->frames++;
+    pexp->prev_model = *model;
+}
+
+#ifdef OLD_STUFF
+    //quant_phases(model, 1, model->L, 3);
+    //update_variance_calc(pexp, model, before);
+    //print_sparse_pred_error(pexp, model, 1, model->L, 40.0);
+
+    //sparse_vq_pred_error(pexp, model);
+    //quant_phases(model, model->L/4+1, model->L, 3);
+
+    //predict_phases1(pexp, model, 1, model->L/4);
+    //quant_phases(model, model->L/4+1, model->L, 3);
+
+    //quant_phases(model, 1, model->L/8, 3);
+
+    //update_snr_calc(pexp, model, before);
+    //update_variance_calc(pexp, model, before);
+   
+    //fixed_bits_per_frame(pexp, model, 40);
+    //struct_phases(pexp, model, 1, model->L/4);
+    //rand_phases(model, 10, model->L);
+    //for(m=1; m<=model->L; m++)
+    // model->A[m] = 0.0;
+    //model->A[model->L/2] = 1000;
+    //repeat_phases(model, 20);
+    //predict_phases(pexp, model, 1, model->L/4);
+    //quant_phases(model, 1, 10, 3);
+    //quant_phases(model, 10, 20, 2);
+    //repeat_phases(model, 20);
+    //rand_phases(model, 3*model->L/4, model->L);
+    // print_phi1_pred_error(model, 1, model->L);
+    //predict_phases(pexp, model, 1, model->L/4);
+    //first_order_band(model, model->L/4, model->L/2);
+    //first_order_band(model, model->L/2, 3*model->L/4);
+    //if (fabs(model->Wo - pexp->Wo_prev)< 0.1*model->Wo)
+    
+    //print_pred_error(pexp, model, 1, model->L, 40.0);
+    //print_sparse_pred_error(pexp, model, 1, model->L, 40.0);
+
+    //phi1_est = est_phi1(model, 1, model->L/4);
+    //print_phi1_pred_error(model, 1, model->L/4);
+
+    //first_order_band(model, 1, model->L/4, phi1_est);        
+    //sub_linear(model, 1, model->L/4, phi1_est);
+
+    //top_amp(pexp, model, 1, model->L/4, 4);
+    //top_amp(pexp, model, model->L/4, model->L/2, 4);
+
+    //first_order_band(model, 1, model->L/4, phi1_est);        
+    //first_order_band(model, model->L/4, model->L/2, phi1_est);       
+
+    //if (fabs(model->Wo - pexp->Wo_prev) > 0.2*model->Wo)
+    // rand_phases(model, model->L/2, model->L);
+       
+    //top_amp(pexp, model, 1, model->L/4, 4);
+    //top_amp(pexp, model, model->L/4, model->L/2, 8);
+    //top_amp(pexp, model, model->L/4+1, model->L/2, 10, 1);
+    //top_amp(pexp, model, 1, model->L/4, 10, 1);
+    //top_amp(pexp, model, model->L/4+1, 3*model->L/4, 10, 1);
+    //top_amp(pexp, model, 1, 3*model->L/4, 20, 1);
+
+    #ifdef REAS_CAND1
+    predict_phases(pexp, model, 1, model->L/4);
+    top_amp(pexp, model, model->L/4+1, 3*model->L/4, 10, 1);
+    rand_phases(model, 3*model->L/4+1, model->L);
+    #endif
+
+    #ifdef REAS_CAND2
+    if ((pexp->frames % 2) == 0) {
+       //printf("quant\n");
+       predict_phases(pexp, model, 1, model->L/4);     
+       //top_amp(pexp, model, model->L/4+1, 3*model->L/4, 20, 1);
+       top_amp(pexp, model,  model->L/4+1, 7*model->L/8, 20, 1);
+       rand_phases(model, 7*model->L/8+1, model->L);
+     }
+    else {
+       //printf("predict\n");
+       predict_phases(pexp, model, 1, model->L);
+    }
+    #endif
+
+    //#define REAS_CAND3
+    #ifdef REAS_CAND3
+    if ((pexp->frames % 3) != 0) {
+       printf("pred\n");
+       predict_phases(pexp, model, 1, model->L);       
+    }
+    else {
+       predict_phases(pexp, model, 1, model->L/4);     
+       fixed_bits_per_frame(pexp, model, model->L/4+1, 60);
+    }
+    #endif
+    //predict_phases(pexp, model, model->L/4, model->L);       
+
+    //print_pred_error(pexp, model, 1, model->L);
+    //limit_prediction_error(pexp, model, model->L/2, model->L, PI/2);
+#endif
diff --git a/libs/libcodec2/src/phaseexp.h b/libs/libcodec2/src/phaseexp.h
new file mode 100644 (file)
index 0000000..b43db75
--- /dev/null
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: phaseexp.h                                          
+  AUTHOR......: David Rowe                                             
+  DATE CREATED: June 2012                                                
+                                                                             
+  Experimental functions for quantising, modelling and synthesising phase.
+                                                                             
+\*---------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __PHASEEXP__
+#define __PHASEEXP__
+
+#include "kiss_fft.h"
+
+struct PEXP;
+
+struct PEXP * phase_experiment_create();
+void phase_experiment_destroy(struct PEXP *pexp);
+void phase_experiment(struct PEXP *pexp, MODEL *model, char *arg);
+
+#endif
diff --git a/libs/libcodec2/src/pilot_coeff.h b/libs/libcodec2/src/pilot_coeff.h
new file mode 100644 (file)
index 0000000..66e7501
--- /dev/null
@@ -0,0 +1,34 @@
+/* Generated by pilot_coeff_file() Octave function */
+
+const float pilot_coeff[]={
+  0.00204705,
+  0.00276339,
+  0.00432595,
+  0.00697042,
+  0.0108452,
+  0.0159865,
+  0.0223035,
+  0.029577,
+  0.0374709,
+  0.045557,
+  0.0533491,
+  0.0603458,
+  0.0660751,
+  0.070138,
+  0.0722452,
+  0.0722452,
+  0.070138,
+  0.0660751,
+  0.0603458,
+  0.0533491,
+  0.045557,
+  0.0374709,
+  0.029577,
+  0.0223035,
+  0.0159865,
+  0.0108452,
+  0.00697042,
+  0.00432595,
+  0.00276339,
+  0.00204705
+};
index 6dad76b1e1ce6e6ea1a7a3704d73ff1cd4d98876..c78f495bedf849d5c8f4add2c7e2fbb60cffff25 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
 
 #include "defines.h"
+#include "comp.h"
 #include "dump.h"
 #include "postfilter.h"
 
 
 #define BG_THRESH 40.0     /* only consider low levels signals for bg_est */
 #define BG_BETA    0.1     /* averaging filter constant                   */
+#define BG_MARGIN  6.0     /* harmonics this far above BG noise are 
+                             randomised.  Helped make bg noise less 
+                             spikey (impulsive) for mmt1, but speech was
+                              perhaps a little rougher.
+                          */
 
 /*---------------------------------------------------------------------------*\
 
@@ -61,7 +67,7 @@
   (5-12) are required to transmit the frequency selective voicing
   information.  Mixed excitation also requires accurate voicing
   estimation (parameter estimators always break occasionally under
-  exceptional condition).
+  exceptional conditions).
 
   In our case we use a post filter approach which requires no
   additional bits to be transmitted.  The decoder measures the average
@@ -105,6 +111,7 @@ void postfilter(
   for(m=1; m<=model->L; m++)
       e += model->A[m]*model->A[m];
 
+  assert(e > 0.0);
   e = 10.0*log10(e/model->L);
 
   /* If beneath threhold, update bg estimate.  The idea
@@ -121,11 +128,13 @@ void postfilter(
   uv = 0;
   if (model->voiced)
       for(m=1; m<=model->L; m++)
-         if (20.0*log10(model->A[m]) < *bg_est) {
+         if (20.0*log10(model->A[m]) < (*bg_est + BG_MARGIN)) {
              model->phi[m] = TWO_PI*(float)rand()/RAND_MAX;
              uv++;
          }
 
+#ifdef DUMP
   dump_bg(e, *bg_est, 100.0*uv/model->L);
+#endif
 
 }
index d4dd4ae053bad0100551ef2a7209868a35d38650..bf080b1b65aef82e28582901139f54324015b510 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __POSTFILTER__
index a1cd728112c4e73d908239a5dacfa620ca255b26..1153943b9fe6a21f42d2f06f3db33001eea3142c 100644 (file)
@@ -20,8 +20,8 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+
 */
 
 #include <assert.h>
 #include "quantise.h"
 #include "lpc.h"
 #include "lsp.h"
-#include "four1.h"
-#include "codebook.h"
+#include "kiss_fft.h"
 
 #define LSP_DELTA1 0.01         /* grid spacing for LSP root searches */
-#define MAX_CB       20         /* max number of codebooks */
 
-/* describes each codebook  */
+/*---------------------------------------------------------------------------*\
+                                                                             
+                          FUNCTION HEADERS
 
-typedef struct {
-    int   k;        /* dimension of vector                   */
-    int   log2m;    /* number of bits in m                   */
-    int   m;        /* elements in codebook                  */
-    float *fn;       /* file name of text file storing the VQ */
-} LSP_CB;
+\*---------------------------------------------------------------------------*/
 
-/* lsp_q describes entire quantiser made up of several codebooks */
+float speech_to_uq_lsps(float lsp[], float ak[], float Sn[], float w[], 
+                       int order);
 
-#ifdef OLDER
-/* 10+10+6+6 = 32 bit LSP difference split VQ */
+/*---------------------------------------------------------------------------*\
+                                                                             
+                             FUNCTIONS
 
-LSP_CB lsp_q[] = {
-    {3,   1024, "/usr/src/freeswitch/libs/libcodec2-1.0/unittest/lspd123.txt"},
-    {3,   1024, "/usr/src/freeswitch/libs/libcodec2-1.0/unittest/lspd456.txt"},
-    {2,     64, "/usr/src/freeswitch/libs/libcodec2-1.0/unittest/lspd78.txt"},
-    {2,     64, "/usr/src/freeswitch/libs/libcodec2-1.0/unittest/lspd910.txt"},
-    {0,    0, ""}
-};
-#endif
+\*---------------------------------------------------------------------------*/
 
-LSP_CB lsp_q[] = {
-    {1,4,16, codebook_lsp1 },
-    {1,4,16, codebook_lsp2 },
-    {1,4,16, codebook_lsp3 },
-    {1,4,16, codebook_lsp4 },
-    {1,4,16, codebook_lsp5 },
-    {1,4,16, codebook_lsp6 },
-    {1,4,16, codebook_lsp7 },
-    {1,3,8, codebook_lsp8 },
-    {1,3,8, codebook_lsp9 },
-    {1,2,4, codebook_lsp10 },
-    {0,0,0, NULL },
-};
+int lsp_bits(int i) {
+    return lsp_cb[i].log2m;
+}
 
-/* ptr to each codebook */
+int lspd_bits(int i) {
+    return lsp_cbd[i].log2m;
+}
+
+int lspdt_bits(int i) {
+    return lsp_cbdt[i].log2m;
+}
 
-static float *plsp_cb[MAX_CB];
+int lsp_pred_vq_bits(int i) {
+    return lsp_cbjvm[i].log2m;
+}
 
 /*---------------------------------------------------------------------------*\
-                                                                             
-                          FUNCTION HEADERS
+
+  quantise_init
+
+  Loads the entire LSP quantiser comprised of several vector quantisers
+  (codebooks).
 
 \*---------------------------------------------------------------------------*/
 
-float speech_to_uq_lsps(float lsp[], float ak[], float Sn[], float w[], 
-                       int order);
+void quantise_init()
+{
+}
 
 /*---------------------------------------------------------------------------*\
-                                                                             
-                             FUNCTIONS
+
+  quantise
+
+  Quantises vec by choosing the nearest vector in codebook cb, and
+  returns the vector index.  The squared error of the quantised vector
+  is added to se.
 
 \*---------------------------------------------------------------------------*/
 
-int lsp_bits(int i) {
-    return lsp_q[i].log2m;
+long quantise(const float * cb, float vec[], float w[], int k, int m, float *se)
+/* float   cb[][K];    current VQ codebook             */
+/* float   vec[];      vector to quantise              */
+/* float   w[];         weighting vector                */
+/* int    k;           dimension of vectors            */
+/* int     m;          size of codebook                */
+/* float   *se;                accumulated squared error       */
+{
+   float   e;          /* current error                */
+   long           besti;       /* best index so far            */
+   float   beste;      /* best error so far            */
+   long           j;
+   int     i;
+   float   diff;
+
+   besti = 0;
+   beste = 1E32;
+   for(j=0; j<m; j++) {
+       e = 0.0;
+       for(i=0; i<k; i++) {
+           diff = cb[j*k+i]-vec[i];
+           e += pow(diff*w[i],2.0);
+       }
+       if (e < beste) {
+           beste = e;
+           besti = j;
+       }
+   }
+
+   *se += beste;
+
+   return(besti);
 }
 
 /*---------------------------------------------------------------------------*\
                                                                              
-  quantise_uniform
+  encode_lspds_scalar()
 
-  Simulates uniform quantising of a float.
+  Scalar/VQ LSP difference quantiser.
 
 \*---------------------------------------------------------------------------*/
 
-void quantise_uniform(float *val, float min, float max, int bits)
+void encode_lspds_scalar(
+                int   indexes[],
+                float lsp[], 
+                int   order
+) 
 {
-    int   levels = 1 << (bits-1);
-    float norm;
-    int   index;
+    int   i,k,m;
+    float lsp_hz[LPC_MAX];
+    float lsp__hz[LPC_MAX];
+    float dlsp[LPC_MAX];
+    float dlsp_[LPC_MAX];
+    float wt[LPC_MAX];
+    const float *cb;
+    float se;
+
+    assert(order == LPC_ORD);
+
+    for(i=0; i<order; i++) {
+       wt[i] = 1.0;
+    }
+
+    /* convert from radians to Hz so we can use human readable
+       frequencies */
+
+    for(i=0; i<order; i++)
+       lsp_hz[i] = (4000.0/PI)*lsp[i];
+
+    //printf("\n");
+
+    wt[0] = 1.0;
+    for(i=0; i<order; i++) {
+
+       /* find difference from previous qunatised lsp */
+
+       if (i) 
+           dlsp[i] = lsp_hz[i] - lsp__hz[i-1];     
+       else
+           dlsp[0] = lsp_hz[0];
+
+       k = lsp_cbd[i].k;
+       m = lsp_cbd[i].m;
+       cb = lsp_cbd[i].cb;
+       indexes[i] = quantise(cb, &dlsp[i], wt, k, m, &se);
+       dlsp_[i] = cb[indexes[i]*k];
+
+
+       if (i) 
+           lsp__hz[i] = lsp__hz[i-1] + dlsp_[i];
+       else
+           lsp__hz[0] = dlsp_[0];
+       
+       //printf("%d lsp %3.2f dlsp %3.2f dlsp_ %3.2f lsp_ %3.2f\n", i, lsp_hz[i], dlsp[i], dlsp_[i], lsp__hz[i]);
+    }
+
+}
+
+void decode_lspds_scalar(
+                float lsp_[], 
+                int   indexes[],
+                int   order
+) 
+{
+    int   i,k;
+    float lsp__hz[LPC_MAX];
+    float dlsp_[LPC_MAX];
+    const float *cb;
+
+    assert(order == LPC_ORD);
 
-    /* hard limit to quantiser range */
+     for(i=0; i<order; i++) {
 
-    printf("min: %f  max: %f  val: %f  ", min, max, val[0]);
-    if (val[0] < min) val[0] = min;
-    if (val[0] > max) val[0] = max;
+       k = lsp_cbd[i].k;
+       cb = lsp_cbd[i].cb;
+       dlsp_[i] = cb[indexes[i]*k];
 
-    norm = (*val - min)/(max-min);
-    printf("%f  norm: %f  ", val[0], norm);
-    index = fabs(levels*norm + 0.5);
+       if (i) 
+           lsp__hz[i] = lsp__hz[i-1] + dlsp_[i];
+       else
+           lsp__hz[0] = dlsp_[0];
 
-    *val = min + index*(max-min)/levels;
+       lsp_[i] = (PI/4000.0)*lsp__hz[i];
+
+       //printf("%d dlsp_ %3.2f lsp_ %3.2f\n", i, dlsp_[i], lsp__hz[i]);
+    }
 
-    printf("index %d  val_: %f\n", index, val[0]);
 }
 
+
 /*---------------------------------------------------------------------------*\
                                                                              
-  lspd_quantise
+  lspvq_quantise
 
-  Simulates differential lsp quantiser
+  Vector LSP quantiser.
 
 \*---------------------------------------------------------------------------*/
 
-void lsp_quantise(
+void lspvq_quantise(
   float lsp[], 
   float lsp_[],
   int   order
 ) 
 {
-    int   i;
-    float dlsp[LPC_MAX];
-    float dlsp_[LPC_MAX];
+    int   i,k,m,ncb, nlsp;
+    float  wt[LPC_ORD], lsp_hz[LPC_ORD];
+    const float *cb;
+    float se;
+    int   index;
+
+    for(i=0; i<LPC_ORD; i++) {
+       wt[i] = 1.0;
+       lsp_hz[i] = 4000.0*lsp[i]/PI;
+    }
 
-    dlsp[0] = lsp[0];
-    for(i=1; i<order; i++)
-       dlsp[i] = lsp[i] - lsp[i-1];
+    /* scalar quantise LSPs 1,2,3,4 */
 
-    for(i=0; i<order; i++)
-       dlsp_[i] = dlsp[i];
+    /* simple uniform scalar quantisers */
+
+   for(i=0; i<4; i++) {
+       k = lsp_cb[i].k;
+       m = lsp_cb[i].m;
+       cb = lsp_cb[i].cb;
+       index = quantise(cb, &lsp_hz[i], wt, k, m, &se);
+       lsp_[i] = cb[index*k]*PI/4000.0;
+    }
 
-    quantise_uniform(&dlsp_[0], 0.1, 0.5, 5);
+   //#define WGHT
+#ifdef WGHT
+    for(i=4; i<9; i++) {
+       wt[i] = 1.0/(lsp[i]-lsp[i-1]) + 1.0/(lsp[i+1]-lsp[i]);
+       //printf("wt[%d] = %f\n", i, wt[i]);
+    }
+    wt[9] = 1.0/(lsp[i]-lsp[i-1]);
+#endif
 
-    lsp_[0] = dlsp_[0];
-    for(i=1; i<order; i++)
-       lsp_[i] = lsp_[i-1] + dlsp_[i];
+    /* VQ LSPs 5,6,7,8,9,10 */
+
+    ncb = 4;
+    nlsp = 4;
+    k = lsp_cbjnd[ncb].k;
+    m = lsp_cbjnd[ncb].m;
+    cb = lsp_cbjnd[ncb].cb;
+    index = quantise(cb, &lsp_hz[nlsp], &wt[nlsp], k, m, &se);
+    for(i=4; i<LPC_ORD; i++) {
+       lsp_[i] = cb[index*k+i-4]*(PI/4000.0);
+       //printf("%4.f (%4.f) ", lsp_hz[i], cb[index*k+i-4]);
+    }
 }
 
 /*---------------------------------------------------------------------------*\
+                                                                             
+  lspjnd_quantise
 
-  scan_line()
-
-  This function reads a vector of floats from a line in a text file.
+  Experimental JND LSP quantiser.
 
 \*---------------------------------------------------------------------------*/
 
-void scan_line(FILE *fp, float f[], int n)
-/*  FILE   *fp;                file ptr to text file           */
-/*  float  f[];        array of floats to return       */
-/*  int    n;          number of floats in line        */
+void lspjnd_quantise(float lsps[], float lsps_[], int order) 
 {
-    char   s[MAX_STR];
-    char   *ps,*pe;
-    int           i;
+    int   i,k,m;
+    float  wt[LPC_ORD], lsps_hz[LPC_ORD];
+    const float *cb;
+    float se = 0.0;
+    int   index;
+    for(i=0; i<LPC_ORD; i++) {
+       wt[i] = 1.0;
+    }
+
+    /* convert to Hz */
+
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_hz[i] = lsps[i]*(4000.0/PI);
+       lsps_[i] = lsps[i];
+    }
+
+    /* simple uniform scalar quantisers */
+
+    for(i=0; i<4; i++) {
+       k = lsp_cbjnd[i].k;
+       m = lsp_cbjnd[i].m;
+       cb = lsp_cbjnd[i].cb;
+       index = quantise(cb, &lsps_hz[i], wt, k, m, &se);
+       lsps_[i] = cb[index*k]*(PI/4000.0);
+    }
 
-    fgets(s,MAX_STR,fp);
-    ps = pe = s;
-    for(i=0; i<n; i++) {
-       while( isspace(*pe)) pe++;
-       while( !isspace(*pe)) pe++;
-       sscanf(ps,"%f",&f[i]);
-       ps = pe;
+    /* VQ LSPs 5,6,7,8,9,10 */
+
+    k = lsp_cbjnd[4].k;
+    m = lsp_cbjnd[4].m;
+    cb = lsp_cbjnd[4].cb;
+    index = quantise(cb, &lsps_hz[4], &wt[4], k, m, &se);
+    //printf("k = %d m = %d c[0] %f cb[k] %f\n", k,m,cb[0],cb[k]);
+    //printf("index = %4d: ", index);
+    for(i=4; i<LPC_ORD; i++) {
+       lsps_[i] = cb[index*k+i-4]*(PI/4000.0);
+       //printf("%4.f (%4.f) ", lsps_hz[i], cb[index*k+i-4]);
     }
+    //printf("\n");
 }
 
+void compute_weights(const float *x, float *w, int ndim);
+
 /*---------------------------------------------------------------------------*\
+                                                                             
+  lspdt_quantise
+
+  LSP difference in time quantiser.  Split VQ, encoding LSPs 1-4 with
+  one VQ, and LSPs 5-10 with a second.  Update of previous lsp memory
+  is done outside of this function to handle dT between 10 or 20ms
+  frames.
 
-  load_cb
+  mode        action
+  ------------------
 
-  Loads a single codebook (LSP vector quantiser) into memory.
+  LSPDT_ALL   VQ LSPs 1-4 and 5-10
+  LSPDT_LOW   Just VQ LSPs 1-4, for LSPs 5-10 just copy previous
+  LSPDT_HIGH  Just VQ LSPs 5-10, for LSPs 1-4 just copy previous
 
 \*---------------------------------------------------------------------------*/
 
-void load_cb(float *source, float *cb, int k, int m)
+void lspdt_quantise(float lsps[], float lsps_[], float lsps__prev[], int mode)
 {
-    int   lines;
     int   i;
+    float wt[LPC_ORD];
+    float lsps_dt[LPC_ORD];
+#ifdef TRY_LSPDT_VQ
+    int k,m;
+    int   index;
+    const float *cb;
+    float se = 0.0;
+#endif // TRY_LSPDT_VQ
+    
+    //compute_weights(lsps, wt, LPC_ORD);
+    for(i=0; i<LPC_ORD; i++) {
+    wt[i] = 1.0;
+    }
+    //compute_weights(lsps, wt, LPC_ORD );
+
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_dt[i] = lsps[i] - lsps__prev[i];
+       lsps_[i] = lsps__prev[i];
+    }
+
+    //#define TRY_LSPDT_VQ
+#ifdef TRY_LSPDT_VQ
+    /* this actually improves speech a bit, but 40ms updates works surprsingly well.... */
+    k = lsp_cbdt[0].k;
+    m = lsp_cbdt[0].m;
+    cb = lsp_cbdt[0].cb;
+    index = quantise(cb, lsps_dt, wt, k, m, &se);
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_[i] += cb[index*k + i];
+    }
+#endif
+
+}
+
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#define MAX_ENTRIES 16384
+
+void compute_weights(const float *x, float *w, int ndim)
+{
+  int i;
+  w[0] = MIN(x[0], x[1]-x[0]);
+  for (i=1;i<ndim-1;i++)
+    w[i] = MIN(x[i]-x[i-1], x[i+1]-x[i]);
+  w[ndim-1] = MIN(x[ndim-1]-x[ndim-2], PI-x[ndim-1]);
+  
+  for (i=0;i<ndim;i++)
+    w[i] = 1./(.01+w[i]);
+  //w[0]*=3;
+  //w[1]*=2;
+}
+
+/* LSP weight calculation ported from m-file function kindly submitted
+   by Anssi, OH3GDD */
+
+void compute_weights_anssi_mode2(const float *x, float *w, int ndim)
+{
+  int i;
+  float d[LPC_ORD];
+
+  assert(ndim == LPC_ORD);
+
+  for(i=0; i<LPC_ORD; i++)
+      d[i] = 1.0;
+
+  d[0] = x[1];
+  for (i=1; i<LPC_ORD-1; i++)
+      d[i] = x[i+1] - x[i-1];
+  d[LPC_ORD-1] = PI - x[8];
+  for (i=0; i<LPC_ORD; i++) {
+        if (x[i]<((400.0/4000.0)*PI))
+            w[i]=5.0/(0.01+d[i]);
+        else if (x[i]<((700.0/4000.0)*PI))
+            w[i]=4.0/(0.01+d[i]);
+        else if (x[i]<((1200.0/4000.0)*PI))
+            w[i]=3.0/(0.01+d[i]);
+        else if (x[i]<((2000.0/4000.0)*PI))
+            w[i]=2.0/(0.01+d[i]);
+        else
+            w[i]=1.0/(0.01+d[i]);
+        
+        w[i]=pow(w[i]+0.3, 0.66);
+  }
+}
+
+int find_nearest(const float *codebook, int nb_entries, float *x, int ndim)
+{
+  int i, j;
+  float min_dist = 1e15;
+  int nearest = 0;
+  
+  for (i=0;i<nb_entries;i++)
+  {
+    float dist=0;
+    for (j=0;j<ndim;j++)
+      dist += (x[j]-codebook[i*ndim+j])*(x[j]-codebook[i*ndim+j]);
+    if (dist<min_dist)
+    {
+      min_dist = dist;
+      nearest = i;
+    }
+  }
+  return nearest;
+}
 
-    lines = 0;
-    for(i=0; i<m; i++) {
-               cb[k*lines++] = source[i];
+int find_nearest_weighted(const float *codebook, int nb_entries, float *x, const float *w, int ndim)
+{
+  int i, j;
+  float min_dist = 1e15;
+  int nearest = 0;
+  
+  for (i=0;i<nb_entries;i++)
+  {
+    float dist=0;
+    for (j=0;j<ndim;j++)
+      dist += w[j]*(x[j]-codebook[i*ndim+j])*(x[j]-codebook[i*ndim+j]);
+    if (dist<min_dist)
+    {
+      min_dist = dist;
+      nearest = i;
+    }
+  }
+  return nearest;
+}
+
+void lspjvm_quantise(float *x, float *xq, int ndim)
+{
+  int i, n1, n2, n3;
+  float err[LPC_ORD], err2[LPC_ORD], err3[LPC_ORD];
+  float w[LPC_ORD], w2[LPC_ORD], w3[LPC_ORD];
+  const float *codebook1 = lsp_cbjvm[0].cb;
+  const float *codebook2 = lsp_cbjvm[1].cb;
+  const float *codebook3 = lsp_cbjvm[2].cb;
+
+  w[0] = MIN(x[0], x[1]-x[0]);
+  for (i=1;i<ndim-1;i++)
+    w[i] = MIN(x[i]-x[i-1], x[i+1]-x[i]);
+  w[ndim-1] = MIN(x[ndim-1]-x[ndim-2], PI-x[ndim-1]);
+  
+  compute_weights(x, w, ndim);
+  
+  n1 = find_nearest(codebook1, lsp_cbjvm[0].m, x, ndim);
+  
+  for (i=0;i<ndim;i++)
+  {
+    xq[i] = codebook1[ndim*n1+i];
+    err[i] = x[i] - xq[i];
+  }
+  for (i=0;i<ndim/2;i++)
+  {
+    err2[i] = err[2*i];  
+    err3[i] = err[2*i+1];
+    w2[i] = w[2*i];  
+    w3[i] = w[2*i+1];
+  }
+  n2 = find_nearest_weighted(codebook2, lsp_cbjvm[1].m, err2, w2, ndim/2);
+  n3 = find_nearest_weighted(codebook3, lsp_cbjvm[2].m, err3, w3, ndim/2);
+  
+  for (i=0;i<ndim/2;i++)
+  {
+    xq[2*i] += codebook2[ndim*n2/2+i];
+    xq[2*i+1] += codebook3[ndim*n3/2+i];
+  }
+}
+
+#define MBEST_STAGES 4
+
+struct MBEST_LIST {
+    int   index[MBEST_STAGES];    /* index of each stage that lead us to this error */
+    float error;
+};
+
+struct MBEST {
+    int                entries;   /* number of entries in mbest list   */
+    struct MBEST_LIST *list;
+};
+
+
+static struct MBEST *mbest_create(int entries) {
+    int           i,j;
+    struct MBEST *mbest;
+
+    assert(entries > 0);
+    mbest = (struct MBEST *)malloc(sizeof(struct MBEST));
+    assert(mbest != NULL);
+
+    mbest->entries = entries;
+    mbest->list = (struct MBEST_LIST *)malloc(entries*sizeof(struct MBEST_LIST));
+    assert(mbest->list != NULL);
+
+    for(i=0; i<mbest->entries; i++) {
+       for(j=0; j<MBEST_STAGES; j++)
+           mbest->list[i].index[j] = 0;
+       mbest->list[i].error = 1E32;
     }
+
+    return mbest;
+}
+
+
+static void mbest_destroy(struct MBEST *mbest) {
+    assert(mbest != NULL);
+    free(mbest->list);
+    free(mbest);
 }
 
+
 /*---------------------------------------------------------------------------*\
 
-  quantise_init
+  mbest_insert
 
-  Loads the entire LSP quantiser comprised of several vector quantisers
-  (codebooks).
+  Insert the results of a vector to codebook entry comparison. The
+  list is ordered in order or error, so those entries with the
+  smallest error will be first on the list.
 
 \*---------------------------------------------------------------------------*/
 
-void quantise_init()
-{
-    int i,k,m;
+static void mbest_insert(struct MBEST *mbest, int index[], float error) {
+    int                i, j, found;
+    struct MBEST_LIST *list    = mbest->list;
+    int                entries = mbest->entries;
+
+    found = 0;
+    for(i=0; i<entries && !found; i++)
+       if (error < list[i].error) {
+           found = 1;
+           for(j=entries-1; j>i; j--)
+               list[j] = list[j-1];
+           for(j=0; j<MBEST_STAGES; j++)
+               list[i].index[j] = index[j];
+           list[i].error = error;
+       }
+}
+
 
-    i = 0;
-    while(lsp_q[i].k) {
-       k = lsp_q[i].k;
-               m = lsp_q[i].m;
-       plsp_cb[i] = (float*)malloc(sizeof(float)*k*m);
-       assert(plsp_cb[i] != NULL);
-       load_cb(lsp_q[i].fn, plsp_cb[i], k, m);
-       i++;
-       assert(i < MAX_CB);
+static void mbest_print(char title[], struct MBEST *mbest) {
+    int i,j;
+    
+    printf("%s\n", title);
+    for(i=0; i<mbest->entries; i++) {
+       for(j=0; j<MBEST_STAGES; j++)
+           printf("  %4d ", mbest->list[i].index[j]);
+       printf(" %f\n", mbest->list[i].error);
     }
 }
 
+
 /*---------------------------------------------------------------------------*\
 
-  quantise
+  mbest_search
 
-  Quantises vec by choosing the nearest vector in codebook cb, and
-  returns the vector index.  The squared error of the quantised vector
-  is added to se.
+  Searches vec[] to a codebbook of vectors, and maintains a list of the mbest
+  closest matches.
 
 \*---------------------------------------------------------------------------*/
 
-long quantise(float cb[], float vec[], float w[], int k, int m, float *se)
-/* float   cb[][K];    current VQ codebook             */
-/* float   vec[];      vector to quantise              */
-/* float   w[];         weighting vector                */
-/* int    k;           dimension of vectors            */
-/* int     m;          size of codebook                */
-/* float   *se;                accumulated squared error       */
+static void mbest_search(
+                 const float  *cb,     /* VQ codebook to search         */
+                 float         vec[],  /* target vector                 */
+                 float         w[],    /* weighting vector              */
+                 int           k,      /* dimension of vector           */ 
+                 int           m,      /* number on entries in codebook */
+                 struct MBEST *mbest,  /* list of closest matches       */
+                 int           index[] /* indexes that lead us here     */
+) 
 {
-   float   e;          /* current error                */
-   long           besti;       /* best index so far            */
-   float   beste;      /* best error so far            */
-   long           j;
-   int     i;
+   float   e;
+   int     i,j;
+   float   diff;
 
-   besti = 0;
-   beste = 1E32;
    for(j=0; j<m; j++) {
        e = 0.0;
-       for(i=0; i<k; i++)
-           e += pow((cb[j*k+i]-vec[i])*w[i],2.0);
-       if (e < beste) {
-           beste = e;
-           besti = j;
+       for(i=0; i<k; i++) {
+           diff = cb[j*k+i]-vec[i];
+           e += pow(diff*w[i],2.0);
        }
+       index[0] = j;
+       mbest_insert(mbest, index, e);
    }
-
-   *se += beste;
-
-   return(besti);
 }
 
-static float gmin=PI;
 
-float get_gmin(void) { return gmin; }
+/* 3 stage VQ LSP quantiser.  Design and guidance kindly submitted by Anssi, OH3GDD */
 
-void min_lsp_dist(float lsp[], int order)
+void lspanssi_quantise(float *x, float *xq, int ndim, int mbest_entries)
 {
-    int   i;
+  int i, j, n1, n2, n3, n4;
+  float w[LPC_ORD];
+  const float *codebook1 = lsp_cbvqanssi[0].cb;
+  const float *codebook2 = lsp_cbvqanssi[1].cb;
+  const float *codebook3 = lsp_cbvqanssi[2].cb;
+  const float *codebook4 = lsp_cbvqanssi[3].cb;
+  struct MBEST *mbest_stage1, *mbest_stage2, *mbest_stage3, *mbest_stage4;
+  float target[LPC_ORD];
+  int   index[MBEST_STAGES];
+
+  mbest_stage1 = mbest_create(mbest_entries);
+  mbest_stage2 = mbest_create(mbest_entries);
+  mbest_stage3 = mbest_create(mbest_entries);
+  mbest_stage4 = mbest_create(mbest_entries);
+  for(i=0; i<MBEST_STAGES; i++)
+      index[i] = 0;
+  
+  compute_weights_anssi_mode2(x, w, ndim);
+
+  #ifdef DUMP
+  dump_weights(w, ndim);
+  #endif
+
+  /* Stage 1 */
+
+  mbest_search(codebook1, x, w, ndim, lsp_cbvqanssi[0].m, mbest_stage1, index);
+  mbest_print("Stage 1:", mbest_stage1);
+
+  /* Stage 2 */
+
+  for (j=0; j<mbest_entries; j++) {
+      index[1] = n1 = mbest_stage1->list[j].index[0];
+      for(i=0; i<ndim; i++)
+         target[i] = x[i] - codebook1[ndim*n1+i];
+      mbest_search(codebook2, target, w, ndim, lsp_cbvqanssi[1].m, mbest_stage2, index);      
+  }
+  mbest_print("Stage 2:", mbest_stage2);
+
+  /* Stage 3 */
+
+  for (j=0; j<mbest_entries; j++) {
+      index[2] = n1 = mbest_stage2->list[j].index[1];
+      index[1] = n2 = mbest_stage2->list[j].index[0];
+      for(i=0; i<ndim; i++)
+         target[i] = x[i] - codebook1[ndim*n1+i] - codebook2[ndim*n2+i];
+      mbest_search(codebook3, target, w, ndim, lsp_cbvqanssi[2].m, mbest_stage3, index);      
+  }
+  mbest_print("Stage 3:", mbest_stage3);
+
+  /* Stage 4 */
 
-    for(i=1; i<order; i++)
-       if ((lsp[i]-lsp[i-1]) < gmin)
-           gmin = lsp[i]-lsp[i-1];
+  for (j=0; j<mbest_entries; j++) {
+      index[3] = n1 = mbest_stage3->list[j].index[2];
+      index[2] = n2 = mbest_stage3->list[j].index[1];
+      index[1] = n3 = mbest_stage3->list[j].index[0];
+      for(i=0; i<ndim; i++)
+         target[i] = x[i] - codebook1[ndim*n1+i] - codebook2[ndim*n2+i] - codebook3[ndim*n3+i];
+      mbest_search(codebook4, target, w, ndim, lsp_cbvqanssi[3].m, mbest_stage4, index);      
+  }
+  mbest_print("Stage 4:", mbest_stage4);
+
+  n1 = mbest_stage4->list[0].index[3];
+  n2 = mbest_stage4->list[0].index[2];
+  n3 = mbest_stage4->list[0].index[1];
+  n4 = mbest_stage4->list[0].index[0];
+  for (i=0;i<ndim;i++)
+      xq[i] = codebook1[ndim*n1+i] + codebook2[ndim*n2+i] + codebook3[ndim*n3+i] + codebook4[ndim*n4+i];
+
+  mbest_destroy(mbest_stage1);
+  mbest_destroy(mbest_stage2);
+  mbest_destroy(mbest_stage3);
+  mbest_destroy(mbest_stage4);
 }
 
-void check_lsp_order(float lsp[], int lpc_order)
+int check_lsp_order(float lsp[], int lpc_order)
 {
     int   i;
     float tmp;
+    int   swaps = 0;
 
     for(i=1; i<lpc_order; i++)
        if (lsp[i] < lsp[i-1]) {
-           printf("swap %d\n",i);
+           //printf("swap %d\n",i);
+           swaps++;
            tmp = lsp[i-1];
            lsp[i-1] = lsp[i]-0.05;
            lsp[i] = tmp+0.05;
        }
+
+    return swaps;
 }
 
 void force_min_lsp_dist(float lsp[], int lpc_order)
@@ -312,6 +747,7 @@ void force_min_lsp_dist(float lsp[], int lpc_order)
        }
 }
 
+#ifdef NOT_USED
 /*---------------------------------------------------------------------------*\
                                                                              
   lpc_model_amplitudes
@@ -341,10 +777,6 @@ float lpc_model_amplitudes(
   float lsp_hz[LPC_MAX];
   float lsp_[LPC_MAX];
   int   roots;                  /* number of LSP roots found */
-  int   index;
-  float se;
-  int   k,m;
-  float *cb;
   float wt[LPC_MAX];
 
   for(i=0; i<M; i++)
@@ -370,15 +802,17 @@ float lpc_model_amplitudes(
     for(i=0; i<order; i++)
        lsp_hz[i] = (4000.0/PI)*lsp[i];
     
+#ifdef NOT_NOW
     /* simple uniform scalar quantisers */
 
     for(i=0; i<10; i++) {
-       k = lsp_q[i].k;
-       m = lsp_q[i].m;
-       cb = plsp_cb[i];
+       k = lsp_cb[i].k;
+       m = lsp_cb[i].m;
+       cb = lsp_cb[i].cb;
        index = quantise(cb, &lsp_hz[i], wt, k, m, &se);
        lsp_hz[i] = cb[index*k];
     }
+#endif
     
     /* experiment: simulating uniform quantisation error
     for(i=0; i<order; i++)
@@ -390,7 +824,7 @@ float lpc_model_amplitudes(
 
     /* Bandwidth Expansion (BW).  Prevents any two LSPs getting too
        close together after quantisation.  We know from experiment
-       that LSP quantisation errors < 12.5Hz (25Hz setp size) are
+       that LSP quantisation errors < 12.5Hz (25Hz step size) are
        inaudible so we use that as the minimum LSP separation.
     */
 
@@ -415,10 +849,14 @@ float lpc_model_amplitudes(
        lsp_[j] = lsp[j];
 
     lsp_to_lpc(lsp_, ak, order);
+#ifdef DUMP
     dump_lsp(lsp);
+#endif
   }
 
+#ifdef DUMP
   dump_E(E);
+#endif
   #ifdef SIM_QUANT
   /* simulated LPC energy quantisation */
   {
@@ -428,31 +866,172 @@ float lpc_model_amplitudes(
   }
   #endif
 
-  aks_to_M2(ak,order,model,E,&snr, 1);   /* {ak} -> {Am} LPC decode */
+  aks_to_M2(ak,order,model,E,&snr, 1, 0, 1);   /* {ak} -> {Am} LPC decode */
 
   return snr;
 }
+#endif
 
 /*---------------------------------------------------------------------------*\
                                                                          
-   aks_to_M2()                                                             
-                                                                         
-   Transforms the linear prediction coefficients to spectral amplitude    
-   samples.  This function determines A(m) from the average energy per    
-   band using an FFT.                                                     
-                                                                        
+   lpc_post_filter()
+   
+   Applies a post filter to the LPC synthesis filter power spectrum
+   Pw, which supresses the inter-formant energy.
+
+   The algorithm is from p267 (Section 8.6) of "Digital Speech",
+   edited by A.M. Kondoz, 1994 published by Wiley and Sons.  Chapter 8
+   of this text is on the MBE vocoder, and this is a freq domain
+   adaptation of post filtering commonly used in CELP.
+
+   I used the Octave simulation lpcpf.m to get an understaing of the
+   algorithm.
+
+   Requires two more FFTs which is significantly more MIPs.  However
+   it should be possible to implement this more efficiently in the
+   time domain.  Just not sure how to handle relative time delays
+   between the synthesis stage and updating these coeffs.  A smaller
+   FFT size might also be accetable to save CPU.  
+
+   TODO:
+   [ ] sync var names between Octave and C version
+   [ ] doc gain normalisation
+   [ ] I think the first FFT is not rqd as we do the same
+       thing in aks_to_M2().
+
 \*---------------------------------------------------------------------------*/
 
-void aks_to_M2(
-  float  ak[], /* LPC's */
-  int    order,
-  MODEL *model,        /* sinusoidal model parameters for this frame */
-  float  E,    /* energy term */
-  float *snr,  /* signal to noise ratio for this frame in dB */
-  int    dump   /* true to dump sample to dump file */
+void lpc_post_filter(kiss_fft_cfg fft_fwd_cfg, MODEL *model, COMP Pw[], float ak[], 
+                     int order, int dump, float beta, float gamma, int bass_boost)
+{
+    int   i;
+    COMP  x[FFT_ENC];   /* input to FFTs                */
+    COMP  Aw[FFT_ENC];  /* LPC analysis filter spectrum */     
+    COMP  Ww[FFT_ENC];  /* weighting spectrum           */
+    float Rw[FFT_ENC];  /* R = WA                       */
+    float e_before, e_after, gain;
+    float Pfw[FFT_ENC]; /* Post filter mag spectrum     */
+    float max_Rw, min_Rw;
+    float range, thresh, r, w;
+    int   m, bin;
+
+    /* Determine LPC inverse filter spectrum 1/A(exp(jw)) -----------*/
+
+    /* we actually want the synthesis filter A(exp(jw)) but the
+       inverse (analysis) filter is easier to find as it's FIR, we
+       just use the inverse of 1/A to get the synthesis filter
+       A(exp(jw)) */
+
+    for(i=0; i<FFT_ENC; i++) {
+       x[i].real = 0.0;
+       x[i].imag = 0.0; 
+    }
+    
+    for(i=0; i<=order; i++)
+       x[i].real = ak[i];
+    kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)x, (kiss_fft_cpx *)Aw);
+
+    for(i=0; i<FFT_ENC/2; i++) {
+       Aw[i].real = 1.0/sqrt(Aw[i].real*Aw[i].real + Aw[i].imag*Aw[i].imag);
+    }
+
+    /* Determine weighting filter spectrum W(exp(jw)) ---------------*/
+
+    for(i=0; i<FFT_ENC; i++) {
+       x[i].real = 0.0;
+       x[i].imag = 0.0; 
+    }
+    
+    for(i=0; i<=order; i++)
+       x[i].real = ak[i] * pow(gamma, (float)i);
+    kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)x, (kiss_fft_cpx *)Ww);
+
+    for(i=0; i<FFT_ENC/2; i++) {
+       Ww[i].real = sqrt(Ww[i].real*Ww[i].real + Ww[i].imag*Ww[i].imag);
+    }
+
+    /* Determined combined filter R = WA ---------------------------*/
+
+    max_Rw = 0.0; min_Rw = 1E32;
+    for(i=0; i<FFT_ENC/2; i++) {
+       Rw[i] = Ww[i].real * Aw[i].real;
+       if (Rw[i] > max_Rw)
+           max_Rw = Rw[i];
+       if (Rw[i] < min_Rw)
+           min_Rw = Rw[i];
+
+    }
+    #ifdef DUMP
+    if (dump)
+      dump_Rw(Rw);
+    #endif
+
+    /* create post filter mag spectrum and apply ------------------*/
+    
+    /* measure energy before post filtering */
+
+    e_before = 1E-4;
+    for(i=0; i<FFT_ENC/2; i++)
+       e_before += Pw[i].real;
+
+    /* apply post filter and measure energy  */
+
+    #ifdef DUMP
+    if (dump)
+       dump_Pwb(Pw);
+    #endif
+
+    e_after = 1E-4;
+    for(i=0; i<FFT_ENC/2; i++) {
+       Pfw[i] = pow(Rw[i], beta);
+       Pw[i].real *= Pfw[i] * Pfw[i];
+       e_after += Pw[i].real;
+    }
+    gain = e_before/e_after;
+
+    /* apply gain factor to normalise energy */
+
+    for(i=0; i<FFT_ENC/2; i++) {
+       Pw[i].real *= gain;
+    }
+
+    if (bass_boost) {
+        /* add 3dB to first 1 kHz to account for LP effect of PF */
+
+        for(i=0; i<FFT_ENC/8; i++) {
+            Pw[i].real *= 1.4*1.4;
+        }    
+    }
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                                         
+   aks_to_M2()                                                             
+                                                                         
+   Transforms the linear prediction coefficients to spectral amplitude    
+   samples.  This function determines A(m) from the average energy per    
+   band using an FFT.                                                     
+                                                                        
+\*---------------------------------------------------------------------------*/
+
+void aks_to_M2(
+  kiss_fft_cfg  fft_fwd_cfg, 
+  float         ak[],       /* LPC's */
+  int           order,
+  MODEL        *model,      /* sinusoidal model parameters for this frame */
+  float         E,          /* energy term */
+  float        *snr,        /* signal to noise ratio for this frame in dB */
+  int           dump,        /* true to dump sample to dump file */
+  int           sim_pf,      /* true to simulate a post filter */
+  int           pf,          /* true to LPC post filter */
+  int           bass_boost,  /* enable LPC filter 0-1khz 3dB boost */
+  float         beta,
+  float         gamma        /* LPC post filter parameters */
 )
 {
-  COMP Pw[FFT_DEC];    /* power spectrum */
+  COMP pw[FFT_ENC];    /* input to FFT for power spectrum */
+  COMP Pw[FFT_ENC];    /* output power spectrum */
   int i,m;             /* loop variables */
   int am,bm;           /* limits of current band */
   float r;             /* no. rads/bin */
@@ -460,29 +1039,39 @@ void aks_to_M2(
   float Am;            /* spectral amplitude sample */
   float signal, noise;
 
-  r = TWO_PI/(FFT_DEC);
+  r = TWO_PI/(FFT_ENC);
 
   /* Determine DFT of A(exp(jw)) --------------------------------------------*/
 
-  for(i=0; i<FFT_DEC; i++) {
-    Pw[i].real = 0.0;
-    Pw[i].imag = 0.0; 
+  for(i=0; i<FFT_ENC; i++) {
+    pw[i].real = 0.0;
+    pw[i].imag = 0.0; 
   }
 
   for(i=0; i<=order; i++)
-    Pw[i].real = ak[i];
-  four1(&Pw[-1].imag,FFT_DEC,1);
+    pw[i].real = ak[i];
+  kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)pw, (kiss_fft_cpx *)Pw);
 
   /* Determine power spectrum P(w) = E/(A(exp(jw))^2 ------------------------*/
 
-  for(i=0; i<FFT_DEC/2; i++)
+  for(i=0; i<FFT_ENC/2; i++)
     Pw[i].real = E/(Pw[i].real*Pw[i].real + Pw[i].imag*Pw[i].imag);
+
+  if (pf)
+      lpc_post_filter(fft_fwd_cfg, model, Pw, ak, order, dump, beta, gamma, bass_boost);
+
+  #ifdef DUMP
   if (dump) 
       dump_Pw(Pw);
+  #endif
+
+  /* Determine magnitudes from P(w) ----------------------------------------*/
+
+  /* when used just by decoder {A} might be all zeroes so init signal
+     and noise to prevent log(0) errors */
 
-  /* Determine magnitudes by linear interpolation of P(w) -------------------*/
+  signal = 1E-30; noise = 1E-32;
 
-  signal = noise = 0.0;
   for(m=1; m<=model->L; m++) {
     am = floor((m - 0.5)*model->Wo/r + 0.5);
     bm = floor((m + 0.5)*model->Wo/r + 0.5);
@@ -494,6 +1083,22 @@ void aks_to_M2(
 
     signal += pow(model->A[m],2.0);
     noise  += pow(model->A[m] - Am,2.0);
+
+    /* This code significantly improves perf of LPC model, in
+       particular when combined with phase0.  The LPC spectrum tends
+       to track just under the peaks of the spectral envelope, and
+       just above nulls.  This algorithm does the reverse to
+       compensate - raising the amplitudes of spectral peaks, while
+       attenuating the null.  This enhances the formants, and
+       supresses the energy between formants. */
+
+    if (sim_pf) {
+       if (Am > model->A[m])
+           Am *= 0.7;
+       if (Am < model->A[m])
+           Am *= 1.4;
+    }
+
     model->A[m] = Am;
   }
   *snr = 10.0*log10(signal/noise);
@@ -547,6 +1152,84 @@ float decode_Wo(int index)
     return Wo;
 }
 
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: encode_Wo_dt()      
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 6 Nov 2011 
+
+  Encodes Wo difference from last frame.
+
+\*---------------------------------------------------------------------------*/
+
+int encode_Wo_dt(float Wo, float prev_Wo)
+{
+    int   index, mask, max_index, min_index;
+    float Wo_min = TWO_PI/P_MAX;
+    float Wo_max = TWO_PI/P_MIN;
+    float norm;
+
+    norm = (Wo - prev_Wo)/(Wo_max - Wo_min);
+    index = floor(WO_LEVELS * norm + 0.5);
+    //printf("ENC index: %d ", index);
+
+    /* hard limit */
+    
+    max_index = (1 << (WO_DT_BITS-1)) - 1;
+    min_index = - (max_index+1);
+    if (index > max_index) index = max_index;
+    if (index < min_index) index = min_index;
+    //printf("max_index: %d  min_index: %d hard index: %d ",
+    //    max_index,  min_index, index);
+
+    /* mask so that only LSB WO_DT_BITS remain, bit WO_DT_BITS is the sign bit */
+
+    mask = ((1 << WO_DT_BITS) - 1);
+    index &= mask;
+    //printf("mask: 0x%x index: 0x%x\n", mask, index);
+
+    return index;
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: decode_Wo_dt()      
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 6 Nov 2011 
+
+  Decodes Wo using WO_DT_BITS difference from last frame.
+
+\*---------------------------------------------------------------------------*/
+
+float decode_Wo_dt(int index, float prev_Wo)
+{
+    float Wo_min = TWO_PI/P_MAX;
+    float Wo_max = TWO_PI/P_MIN;
+    float step;
+    float Wo;
+    int   mask;
+
+    /* sign extend index */
+    
+    //printf("DEC index: %d ");
+    if (index & (1 << (WO_DT_BITS-1))) {
+       mask = ~((1 << WO_DT_BITS) - 1);
+       index |= mask;
+    }
+    //printf("DEC mask: 0x%x  index: %d \n", mask, index);
+    
+    step = (Wo_max - Wo_min)/WO_LEVELS;
+    Wo   = prev_Wo + step*(index);
+
+    /* bit errors can make us go out of range leading to all sorts of
+       probs like seg faults */
+
+    if (Wo > Wo_max) Wo = Wo_max;
+    if (Wo < Wo_min) Wo = Wo_min;
+
+    return Wo;
+}
+
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: speech_to_uq_lsps()         
@@ -569,40 +1252,65 @@ float speech_to_uq_lsps(float lsp[],
     int   i, roots;
     float Wn[M];
     float R[LPC_MAX+1];
-    float E;
+    float e, E;
 
-    for(i=0; i<M; i++)
+    e = 0.0;
+    for(i=0; i<M; i++) {
        Wn[i] = Sn[i]*w[i];
+       e += Wn[i]*Wn[i];
+    }
+
+    /* trap 0 energy case as LPC analysis will fail */
+    
+    if (e == 0.0) {
+       for(i=0; i<order; i++)
+           lsp[i] = (PI/order)*(float)i;
+       return 0.0;
+    }
+    
     autocorrelate(Wn, R, M, order);
     levinson_durbin(R, ak, order);
   
     E = 0.0;
     for(i=0; i<=order; i++)
        E += ak[i]*R[i];
+    
+    /* 15 Hz BW expansion as I can't hear the difference and it may help
+       help occasional fails in the LSP root finding.  Important to do this
+       after energy calculation to avoid -ve energy values.
+    */
+
+    for(i=0; i<=order; i++)
+       ak[i] *= pow(0.994,(float)i);
+
     roots = lpc_to_lsp(ak, order, lsp, 5, LSP_DELTA1);
-       //    assert(roots == order);
+    if (roots != order) {
+       /* if root finding fails use some benign LSP values instead */
+       for(i=0; i<order; i++)
+           lsp[i] = (PI/order)*(float)i;
+    }
 
     return E;
 }
 
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: encode_lsps()       
+  FUNCTION....: encode_lsps_scalar()        
   AUTHOR......: David Rowe                           
   DATE CREATED: 22/8/2010 
 
-  From a vector of unquantised (floating point) LSPs finds the quantised
-  LSP indexes.
+  Thirty-six bit sclar LSP quantiser. From a vector of unquantised
+  (floating point) LSPs finds the quantised LSP indexes.
 
 \*---------------------------------------------------------------------------*/
 
-void encode_lsps(int indexes[], float lsp[], int order)
+void encode_lsps_scalar(int indexes[], float lsp[], int order)
 {
     int    i,k,m;
     float  wt[1];
     float  lsp_hz[LPC_MAX];
-    float *cb, se;
+    const float * cb;
+    float se;
 
     /* convert from radians to Hz so we can use human readable
        frequencies */
@@ -610,20 +1318,20 @@ void encode_lsps(int indexes[], float lsp[], int order)
     for(i=0; i<order; i++)
        lsp_hz[i] = (4000.0/PI)*lsp[i];
     
-    /* simple uniform scalar quantisers */
+    /* scalar quantisers */
 
     wt[0] = 1.0;
     for(i=0; i<order; i++) {
-       k = lsp_q[i].k;
-       m = lsp_q[i].m;
-       cb = plsp_cb[i];
+       k = lsp_cb[i].k;
+       m = lsp_cb[i].m;
+       cb = lsp_cb[i].cb;
        indexes[i] = quantise(cb, &lsp_hz[i], wt, k, m, &se);
     }
 }
 
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: decode_lsps()       
+  FUNCTION....: decode_lsps_scalar()        
   AUTHOR......: David Rowe                           
   DATE CREATED: 22/8/2010 
 
@@ -632,15 +1340,15 @@ void encode_lsps(int indexes[], float lsp[], int order)
 
 \*---------------------------------------------------------------------------*/
 
-void decode_lsps(float lsp[], int indexes[], int order)
+void decode_lsps_scalar(float lsp[], int indexes[], int order)
 {
     int    i,k;
     float  lsp_hz[LPC_MAX];
-    float *cb;
+    const float * cb;
 
     for(i=0; i<order; i++) {
-       k = lsp_q[i].k;
-       cb = plsp_cb[i];
+       k = lsp_cb[i].k;
+       cb = lsp_cb[i].cb;
        lsp_hz[i] = cb[indexes[i]*k];
     }
 
@@ -650,6 +1358,271 @@ void decode_lsps(float lsp[], int indexes[], int order)
        lsp[i] = (PI/4000.0)*lsp_hz[i];
 }
 
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: encode_lsps_diff_freq_vq()          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 15 November 2011
+
+  Twenty-five bit LSP quantiser.  LSPs 1-4 are quantised with scalar
+  LSP differences (in frequency, i.e difference from the previous
+  LSP).  LSPs 5-10 are quantised with a VQ trained generated using
+  vqtrainjnd.c
+
+\*---------------------------------------------------------------------------*/
+
+void encode_lsps_diff_freq_vq(int indexes[], float lsp[], int order)
+{
+    int    i,k,m;
+    float  lsp_hz[LPC_MAX];
+    float lsp__hz[LPC_MAX];
+    float dlsp[LPC_MAX];
+    float dlsp_[LPC_MAX];
+    float wt[LPC_MAX];
+    const float * cb;
+    float se;
+
+    for(i=0; i<LPC_ORD; i++) {
+       wt[i] = 1.0;
+    }
+
+    /* convert from radians to Hz so we can use human readable
+       frequencies */
+
+    for(i=0; i<order; i++)
+       lsp_hz[i] = (4000.0/PI)*lsp[i];
+    
+    /* scalar quantisers for LSP differences 1..4 */
+
+    wt[0] = 1.0;
+    for(i=0; i<4; i++) {
+       if (i) 
+           dlsp[i] = lsp_hz[i] - lsp__hz[i-1];     
+       else
+           dlsp[0] = lsp_hz[0];
+
+       k = lsp_cbd[i].k;
+       m = lsp_cbd[i].m;
+       cb = lsp_cbd[i].cb;
+       indexes[i] = quantise(cb, &dlsp[i], wt, k, m, &se);
+       dlsp_[i] = cb[indexes[i]*k];
+
+       if (i) 
+           lsp__hz[i] = lsp__hz[i-1] + dlsp_[i];
+       else
+           lsp__hz[0] = dlsp_[0];
+    }
+
+    /* VQ LSPs 5,6,7,8,9,10 */
+
+    k = lsp_cbjnd[4].k;
+    m = lsp_cbjnd[4].m;
+    cb = lsp_cbjnd[4].cb;
+    indexes[4] = quantise(cb, &lsp_hz[4], &wt[4], k, m, &se);
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: decode_lsps_diff_freq_vq()          
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 15 Nov 2011
+
+  From a vector of quantised LSP indexes, returns the quantised
+  (floating point) LSPs.
+
+\*---------------------------------------------------------------------------*/
+
+void decode_lsps_diff_freq_vq(float lsp_[], int indexes[], int order)
+{
+    int    i,k,m;
+    float  dlsp_[LPC_MAX];
+    float  lsp__hz[LPC_MAX];
+    const float * cb;
+
+    /* scalar LSP differences */
+
+    for(i=0; i<4; i++) {
+       cb = lsp_cbd[i].cb;
+       dlsp_[i] = cb[indexes[i]];
+       if (i) 
+           lsp__hz[i] = lsp__hz[i-1] + dlsp_[i];
+       else
+           lsp__hz[0] = dlsp_[0];
+    }
+
+    /* VQ */
+
+    k = lsp_cbjnd[4].k;
+    m = lsp_cbjnd[4].m;
+    cb = lsp_cbjnd[4].cb;
+    for(i=4; i<order; i++)
+       lsp__hz[i] = cb[indexes[4]*k+i-4];
+
+    /* convert back to radians */
+
+    for(i=0; i<order; i++)
+       lsp_[i] = (PI/4000.0)*lsp__hz[i];
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: encode_lsps_diff_time()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 12 Sep 2012
+
+  Encode difference from preious frames's LSPs using
+  3,3,2,2,2,2,1,1,1,1 scalar quantisers (18 bits total).
+
+\*---------------------------------------------------------------------------*/
+
+void encode_lsps_diff_time(int indexes[], 
+                              float lsps[], 
+                              float lsps__prev[], 
+                              int order)
+{
+    int    i,k,m;
+    float  lsps_dt[LPC_ORD];
+    float  wt[LPC_MAX];
+    const  float * cb;
+    float  se;
+
+    /* Determine difference in time and convert from radians to Hz so
+       we can use human readable frequencies */
+
+    for(i=0; i<LPC_ORD; i++) {
+       lsps_dt[i] = (4000/PI)*(lsps[i] - lsps__prev[i]);
+    }
+    
+    /* scalar quantisers */
+
+    wt[0] = 1.0;
+    for(i=0; i<order; i++) {
+       k = lsp_cbdt[i].k;
+       m = lsp_cbdt[i].m;
+       cb = lsp_cbdt[i].cb;
+       indexes[i] = quantise(cb, &lsps_dt[i], wt, k, m, &se);
+    }
+
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: decode_lsps_diff_time()             
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 15 Nov 2011
+
+  From a quantised LSP indexes, returns the quantised
+  (floating point) LSPs.
+
+\*---------------------------------------------------------------------------*/
+
+void decode_lsps_diff_time(
+                             float lsps_[], 
+                             int indexes[], 
+                             float lsps__prev[],
+                             int order)
+{
+    int    i,k,m;
+    const  float * cb;
+
+    for(i=0; i<order; i++)
+       lsps_[i] = lsps__prev[i];
+
+    for(i=0; i<order; i++) {
+       k = lsp_cbdt[i].k;
+       cb = lsp_cbdt[i].cb;
+       lsps_[i] += (PI/4000.0)*cb[indexes[i]*k];
+    }
+
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: encode_lsps_vq()            
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 15 Feb 2012
+
+  Multi-stage VQ LSP quantiser developed by Jean-Marc Valin.
+
+\*---------------------------------------------------------------------------*/
+
+void encode_lsps_vq(int *indexes, float *x, float *xq, int ndim)
+{
+  int i, n1, n2, n3;
+  float err[LPC_ORD], err2[LPC_ORD], err3[LPC_ORD];
+  float w[LPC_ORD], w2[LPC_ORD], w3[LPC_ORD];
+  const float *codebook1 = lsp_cbjvm[0].cb;
+  const float *codebook2 = lsp_cbjvm[1].cb;
+  const float *codebook3 = lsp_cbjvm[2].cb;
+
+  assert(ndim <= LPC_ORD);
+
+  w[0] = MIN(x[0], x[1]-x[0]);
+  for (i=1;i<ndim-1;i++)
+    w[i] = MIN(x[i]-x[i-1], x[i+1]-x[i]);
+  w[ndim-1] = MIN(x[ndim-1]-x[ndim-2], PI-x[ndim-1]);
+  
+  compute_weights(x, w, ndim);
+  
+  n1 = find_nearest(codebook1, lsp_cbjvm[0].m, x, ndim);
+  
+  for (i=0;i<ndim;i++)
+  {
+    xq[i]  = codebook1[ndim*n1+i];
+    err[i] = x[i] - xq[i];
+  }
+  for (i=0;i<ndim/2;i++)
+  {
+    err2[i] = err[2*i];  
+    err3[i] = err[2*i+1];
+    w2[i] = w[2*i];  
+    w3[i] = w[2*i+1];
+  }
+  n2 = find_nearest_weighted(codebook2, lsp_cbjvm[1].m, err2, w2, ndim/2);
+  n3 = find_nearest_weighted(codebook3, lsp_cbjvm[2].m, err3, w3, ndim/2);
+  
+  indexes[0] = n1;
+  indexes[1] = n2;
+  indexes[2] = n3;
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: decode_lsps_vq()            
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 15 Feb 2012
+
+\*---------------------------------------------------------------------------*/
+
+void decode_lsps_vq(int *indexes, float *xq, int ndim)
+{
+  int i, n1, n2, n3;
+  const float *codebook1 = lsp_cbjvm[0].cb;
+  const float *codebook2 = lsp_cbjvm[1].cb;
+  const float *codebook3 = lsp_cbjvm[2].cb;
+
+  n1 = indexes[0];
+  n2 = indexes[1];
+  n3 = indexes[2];
+
+  for (i=0;i<ndim;i++)
+  {
+    xq[i] = codebook1[ndim*n1+i];
+  }
+  for (i=0;i<ndim/2;i++)
+  {
+    xq[2*i] += codebook2[ndim*n2/2+i];
+    xq[2*i+1] += codebook3[ndim*n3/2+i];
+  }
+}
+
+
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: bw_expand_lsps()            
@@ -658,7 +1631,7 @@ void decode_lsps(float lsp[], int indexes[], int order)
 
   Applies Bandwidth Expansion (BW) to a vector of LSPs.  Prevents any
   two LSPs getting too close together after quantisation.  We know
-  from experiment that LSP quantisation errors < 12.5Hz (25Hz setp
+  from experiment that LSP quantisation errors < 12.5Hz (25Hz step
   size) are inaudible so we use that as the minimum LSP separation.
 
 \*---------------------------------------------------------------------------*/
@@ -669,9 +1642,11 @@ void bw_expand_lsps(float lsp[],
 {
     int i;
 
-    for(i=1; i<5; i++) {
-       if (lsp[i] - lsp[i-1] < PI*(12.5/4000.0))
-           lsp[i] = lsp[i-1] + PI*(12.5/4000.0);
+    for(i=1; i<4; i++) {
+       
+       if ((lsp[i] - lsp[i-1]) < 50*(PI/4000.0))
+           lsp[i] = lsp[i-1] + 50.0*(PI/4000.0);
+       
     }
 
     /* As quantiser gaps increased, larger BW expansion was required
@@ -679,79 +1654,99 @@ void bw_expand_lsps(float lsp[],
        different quanstisers.
     */
 
-    for(i=5; i<8; i++) {
-       if (lsp[i] - lsp[i-1] < PI*(25.0/4000.0))
-           lsp[i] = lsp[i-1] + PI*(25.0/4000.0);
-    }
-    for(i=8; i<order; i++) {
-       if (lsp[i] - lsp[i-1] < PI*(75.0/4000.0))
-           lsp[i] = lsp[i-1] + PI*(75.0/4000.0);
+    for(i=4; i<order; i++) {
+       if (lsp[i] - lsp[i-1] < PI*(100.0/4000.0))
+           lsp[i] = lsp[i-1] + PI*(100.0/4000.0);
     }
 }
 
 /*---------------------------------------------------------------------------*\
                                                        
-  FUNCTION....: need_lpc_correction()       
+  FUNCTION....: locate_lsps_jnd_steps()             
   AUTHOR......: David Rowe                           
-  DATE CREATED: 22/8/2010 
+  DATE CREATED: 27/10/2011 
 
-  Determine if we need LPC correction of first harmonic.
+  Applies a form of Bandwidth Expansion (BW) to a vector of LSPs.
+  Listening tests have determined that "quantising" the position of
+  each LSP to the non-linear steps below introduces a "just noticable
+  difference" in the synthesised speech.
+
+  This operation can be used before quantisation to limit the input
+  data to the quantiser to a number of discrete steps.
+
+  This operation can also be used during quantisation as a form of
+  hysteresis in the calculation of quantiser error.  For example if
+  the quantiser target of lsp1 is 500 Hz, candidate vectors with lsp1
+  of 515 and 495 Hz sound effectively the same.
 
 \*---------------------------------------------------------------------------*/
 
-int need_lpc_correction(MODEL *model, float ak[], float E)
+void locate_lsps_jnd_steps(float lsps[], int order)
 {
-    MODEL  tmp;
-    float  snr,E1;
+    int   i;
+    float lsp_hz, step;
 
-    /* Find amplitudes so we can check if we need LPC correction.
-       TODO: replace call to aks_to_M2() by a single DFT calculation
-       of E/A(exp(jWo)) to make much more efficient.  We only need
-       A[1].
-    */
+    assert(order == 10);
+
+    /* quantise to 25Hz steps */
+           
+    step = 25;
+    for(i=0; i<2; i++) {
+       lsp_hz = lsps[i]*4000.0/PI;
+       lsp_hz = floor(lsp_hz/step + 0.5)*step;
+       lsps[i] = lsp_hz*PI/4000.0;
+       if (i) {
+           if (lsps[i] == lsps[i-1])
+               lsps[i]   += step*PI/4000.0;
 
-    memcpy(&tmp, model, sizeof(MODEL));
-    aks_to_M2(ak, LPC_ORD, &tmp, E, &snr, 0);   
+       }
+    }
 
-    /* 
-       Attenuate fundamental by 30dB if F0 < 150 Hz and LPC modelling
-       error for A[1] is larger than 6dB.
+    /* quantise to 50Hz steps */
 
-       LPC modelling often makes big errors on 1st harmonic, for example
-       when the fundamental has been removed by analog high pass
-       filtering before sampling.  However on unfiltered speech from
-       high quality sources we would like to keep the fundamental to
-       maintain the speech quality.  So we check the error in A[1] and
-       attenuate it if the error is large to avoid annoying low
-       frequency energy after LPC modelling.
+    step = 50;
+    for(i=2; i<4; i++) {
+       lsp_hz = lsps[i]*4000.0/PI;
+       lsp_hz = floor(lsp_hz/step + 0.5)*step;
+       lsps[i] = lsp_hz*PI/4000.0;
+       if (i) {
+           if (lsps[i] == lsps[i-1])
+               lsps[i] += step*PI/4000.0;
 
-       This requires a single bit to quantise, on top of the other
-       spectral magnitude bits (i.e. LSP bits + 1 total).
-    */
+       }
+    }
+
+    /* quantise to 100Hz steps */
 
-    E1 = fabs(20.0*log10(model->A[1]) - 20.0*log10(tmp.A[1]));
-    if (E1 > 6.0)
-       return 1;
-    else 
-       return 0;
+    step = 100;
+    for(i=4; i<10; i++) {
+       lsp_hz = lsps[i]*4000.0/PI;
+       lsp_hz = floor(lsp_hz/step + 0.5)*step;
+       lsps[i] = lsp_hz*PI/4000.0;
+       if (i) {
+           if (lsps[i] == lsps[i-1])
+               lsps[i] += step*PI/4000.0;
+
+       }
+    }
 }
 
+
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: apply_lpc_correction()      
   AUTHOR......: David Rowe                           
   DATE CREATED: 22/8/2010 
 
-  Apply first harmonic LPC correction at decoder.
+  Apply first harmonic LPC correction at decoder.  This helps improve
+  low pitch males after LPC modelling, like hts1a and morig.
 
 \*---------------------------------------------------------------------------*/
 
-void apply_lpc_correction(MODEL *model, int lpc_correction)
+void apply_lpc_correction(MODEL *model)
 {
-    if (lpc_correction) {
-       if (model->Wo < (PI*150.0/4000)) {
-           model->A[1] *= 0.032;
-       }
+    if (model->Wo < (PI*150.0/4000)) {
+       model->A[1] *= 0.032;
     }
 }
 
@@ -787,7 +1782,7 @@ int encode_energy(float e)
   AUTHOR......: David Rowe                           
   DATE CREATED: 22/8/2010 
 
-  Decodes energy using a WO_BITS quantiser.
+  Decodes energy using a E_LEVELS quantiser.
 
 \*---------------------------------------------------------------------------*/
 
@@ -805,36 +1800,7 @@ float decode_energy(int index)
     return e;
 }
 
-/*---------------------------------------------------------------------------*\
-                                                       
-  FUNCTION....: encode_amplitudes()         
-  AUTHOR......: David Rowe                           
-  DATE CREATED: 22/8/2010 
-
-  Time domain LPC is used model the amplitudes which are then
-  converted to LSPs and quantised.  So we don't actually encode the
-  amplitudes directly, rather we derive an equivalent representation
-  from the time domain speech.
-
-\*---------------------------------------------------------------------------*/
-
-void encode_amplitudes(int    lsp_indexes[], 
-                      int   *lpc_correction,
-                      int   *energy_index,
-                      MODEL *model, 
-                      float  Sn[], 
-                      float  w[])
-{
-    float lsps[LPC_ORD];
-    float ak[LPC_ORD+1];
-    float e;
-
-    e = speech_to_uq_lsps(lsps, ak, Sn, w, LPC_ORD);
-    encode_lsps(lsp_indexes, lsps, LPC_ORD);
-    *lpc_correction = need_lpc_correction(model, ak, e);
-    *energy_index = encode_energy(e);
-}
-
+#ifdef NOT_USED
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: decode_amplitudes()         
@@ -846,23 +1812,222 @@ void encode_amplitudes(int    lsp_indexes[],
 
 \*---------------------------------------------------------------------------*/
 
-float decode_amplitudes(MODEL *model, 
+float decode_amplitudes(kiss_fft_cfg  fft_fwd_cfg, 
+                       MODEL *model, 
                        float  ak[],
                        int    lsp_indexes[], 
-                       int    lpc_correction,
-                       int    energy_index
+                       int    energy_index,
+                       float  lsps[],
+                       float *e
 )
 {
-    float lsps[LPC_ORD];
-    float e;
     float snr;
 
-    decode_lsps(lsps, lsp_indexes, LPC_ORD);
+    decode_lsps_scalar(lsps, lsp_indexes, LPC_ORD);
     bw_expand_lsps(lsps, LPC_ORD);
     lsp_to_lpc(lsps, ak, LPC_ORD);
-    e = decode_energy(energy_index);
-    aks_to_M2(ak, LPC_ORD, model, e, &snr, 1); 
-    apply_lpc_correction(model, lpc_correction);
+    *e = decode_energy(energy_index);
+    aks_to_M2(ak, LPC_ORD, model, *e, &snr, 1, 0, 0, 1); 
+    apply_lpc_correction(model);
 
     return snr;
 }
+#endif
+
+static float ge_coeff[2] = {0.8, 0.9};
+
+void compute_weights2(const float *x, const float *xp, float *w, int ndim)
+{
+  w[0] = 30;
+  w[1] = 1;
+  if (x[1]<0)
+  {
+     w[0] *= .6;
+     w[1] *= .3;
+  }
+  if (x[1]<-10)
+  {
+     w[0] *= .3;
+     w[1] *= .3;
+  }
+  /* Higher weight if pitch is stable */
+  if (fabs(x[0]-xp[0])<.2)
+  {
+     w[0] *= 2;
+     w[1] *= 1.5;
+  } else if (fabs(x[0]-xp[0])>.5) /* Lower if not stable */
+  {
+     w[0] *= .5;
+  }
+
+  /* Lower weight for low energy */
+  if (x[1] < xp[1]-10)
+  {
+     w[1] *= .5;
+  }
+  if (x[1] < xp[1]-20)
+  {
+     w[1] *= .5;
+  }
+
+  //w[0] = 30;
+  //w[1] = 1;
+  
+  /* Square the weights because it's applied on the squared error */
+  w[0] *= w[0];
+  w[1] *= w[1];
+
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: quantise_WoE()      
+  AUTHOR......: Jean-Marc Valin & David Rowe                         
+  DATE CREATED: 29 Feb 2012
+
+  Experimental joint Wo and LPC energy vector quantiser developed by
+  Jean-Marc Valin.  Exploits correlations between the difference in
+  the log pitch and log energy from frame to frame.  For example
+  both the pitch and energy tend to only change by small amounts
+  during voiced speech, however it is important that these changes be
+  coded carefully.  During unvoiced speech they both change a lot but
+  the ear is less sensitve to errors so coarser quantisation is OK.
+
+  The ear is sensitive to log energy and loq pitch so we quantise in
+  these domains.  That way the error measure used to quantise the
+  values is close to way the ear senses errors.
+  
+  See http://jmspeex.livejournal.com/10446.html
+
+\*---------------------------------------------------------------------------*/
+
+void quantise_WoE(MODEL *model, float *e, float xq[])
+{
+  int          i, n1;
+  float        x[2];
+  float        err[2];
+  float        w[2];
+  const float *codebook1 = ge_cb[0].cb;
+  int          nb_entries = ge_cb[0].m;
+  int          ndim = ge_cb[0].k;
+  float Wo_min = TWO_PI/P_MAX;
+  float Wo_max = TWO_PI/P_MIN;
+
+  x[0] = log10((model->Wo/PI)*4000.0/50.0)/log10(2);
+  x[1] = 10.0*log10(1e-4 + *e);
+
+  compute_weights2(x, xq, w, ndim);
+  for (i=0;i<ndim;i++)
+    err[i] = x[i]-ge_coeff[i]*xq[i];
+  n1 = find_nearest_weighted(codebook1, nb_entries, err, w, ndim);
+  
+  for (i=0;i<ndim;i++)
+  {
+    xq[i] = ge_coeff[i]*xq[i] + codebook1[ndim*n1+i];
+    err[i] -= codebook1[ndim*n1+i];
+  }
+
+  /*
+    x = log2(4000*Wo/(PI*50));
+    2^x = 4000*Wo/(PI*50)
+    Wo = (2^x)*(PI*50)/4000;
+  */
+  
+  model->Wo = pow(2.0, xq[0])*(PI*50.0)/4000.0;
+
+  /* bit errors can make us go out of range leading to all sorts of
+     probs like seg faults */
+
+  if (model->Wo > Wo_max) model->Wo = Wo_max;
+  if (model->Wo < Wo_min) model->Wo = Wo_min;
+
+  model->L  = PI/model->Wo; /* if we quantise Wo re-compute L */
+
+  *e = pow(10.0, xq[1]/10.0);
+}
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: encode_WoE()        
+  AUTHOR......: Jean-Marc Valin & David Rowe                         
+  DATE CREATED: 11 May 2012
+
+  Joint Wo and LPC energy vector quantiser developed my Jean-Marc
+  Valin.  Returns index, and updated states xq[].
+  
+\*---------------------------------------------------------------------------*/
+
+int encode_WoE(MODEL *model, float e, float xq[])
+{
+  int          i, n1;
+  float        x[2];
+  float        err[2];
+  float        w[2];
+  const float *codebook1 = ge_cb[0].cb;
+  int          nb_entries = ge_cb[0].m;
+  int          ndim = ge_cb[0].k;
+
+  assert((1<<WO_E_BITS) == nb_entries);
+
+  if (e < 0.0) e = 0;  /* occasional small negative energies due LPC round off I guess */
+
+  x[0] = log10((model->Wo/PI)*4000.0/50.0)/log10(2);
+  x[1] = 10.0*log10(1e-4 + e);
+
+  compute_weights2(x, xq, w, ndim);
+  for (i=0;i<ndim;i++)
+    err[i] = x[i]-ge_coeff[i]*xq[i];
+  n1 = find_nearest_weighted(codebook1, nb_entries, err, w, ndim);
+  
+  for (i=0;i<ndim;i++)
+  {
+    xq[i] = ge_coeff[i]*xq[i] + codebook1[ndim*n1+i];
+    err[i] -= codebook1[ndim*n1+i];
+  }
+
+  //printf("enc: %f %f (%f)(%f) \n", xq[0], xq[1], e, 10.0*log10(1e-4 + e));
+  return n1;
+}
+
+
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: decode_WoE()        
+  AUTHOR......: Jean-Marc Valin & David Rowe                         
+  DATE CREATED: 11 May 2012
+
+  Joint Wo and LPC energy vector quantiser developed my Jean-Marc
+  Valin.  Given index and states xq[], returns Wo & E, and updates
+  states xq[].
+  
+\*---------------------------------------------------------------------------*/
+
+void decode_WoE(MODEL *model, float *e, float xq[], int n1)
+{
+  int          i;
+  float        err[2];
+  const float *codebook1 = ge_cb[0].cb;
+  int          ndim = ge_cb[0].k;
+  float Wo_min = TWO_PI/P_MAX;
+  float Wo_max = TWO_PI/P_MIN;
+
+  for (i=0;i<ndim;i++)
+  {
+    xq[i] = ge_coeff[i]*xq[i] + codebook1[ndim*n1+i];
+    err[i] -= codebook1[ndim*n1+i];
+  }
+
+  //printf("dec: %f %f\n", xq[0], xq[1]);
+  model->Wo = pow(2.0, xq[0])*(PI*50.0)/4000.0;
+
+  /* bit errors can make us go out of range leading to all sorts of
+     probs like seg faults */
+
+  if (model->Wo > Wo_max) model->Wo = Wo_max;
+  if (model->Wo < Wo_min) model->Wo = Wo_min;
+
+  model->L  = PI/model->Wo; /* if we quantise Wo re-compute L */
+
+  *e = pow(10.0, xq[1]/10.0);
+}
+
index ded7645381fe41ba6e9d9ef51f65340b9faaf9e6..1f5f9ee788d7890254e74ae7d1bff85c267ccdef 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __QUANTISE__
 #define __QUANTISE__
 
-#define WO_BITS   7
-#define WO_LEVELS (1<<WO_BITS)
-#define E_BITS    5
-#define E_LEVELS  (1<<E_BITS)
-#define E_MIN_DB -10.0
-#define E_MAX_DB  40.0
+#include "kiss_fft.h"
+
+#define WO_BITS     7
+#define WO_LEVELS   (1<<WO_BITS)
+#define WO_DT_BITS  3
+
+#define E_BITS      5
+#define E_LEVELS    (1<<E_BITS)
+#define E_MIN_DB   -10.0
+#define E_MAX_DB    40.0
+
+#define LSP_SCALAR_INDEXES    10
+#define LSPD_SCALAR_INDEXES    10
+#define LSP_PRED_VQ_INDEXES    3
+#define LSP_DIFF_FREQ_INDEXES  5
+#define LSP_DIFF_TIME_BITS     7
+
+#define LSPDT_ALL   0
+#define LSPDT_LOW   1
+#define LSPDT_HIGH  2
+
+#define WO_E_BITS   8
+
+#define LPCPF_GAMMA 0.5
+#define LPCPF_BETA  0.2
 
 void quantise_init();
 float lpc_model_amplitudes(float Sn[], float w[], MODEL *model, int order,
                           int lsp,float ak[]);
-void aks_to_M2(float ak[], int order, MODEL *model, float E, float *snr
-              int dump);
-float get_gmin(void);
+void aks_to_M2(kiss_fft_cfg fft_fwd_cfg, float ak[], int order, MODEL *model
+              float E, float *snr, int dump, int sim_pf, 
+               int pf, int bass_boost, float beta, float gamma);
 
 int   encode_Wo(float Wo);
 float decode_Wo(int index);
+int   encode_Wo_dt(float Wo, float prev_Wo);
+float decode_Wo_dt(int index, float prev_Wo);
+void  encode_lsps_scalar(int indexes[], float lsp[], int order);
+void  decode_lsps_scalar(float lsp[], int indexes[], int order);
+void  encode_lspds_scalar(int indexes[], float lsp[], int order);
+void  decode_lspds_scalar(float lsp[], int indexes[], int order);
+void  encode_lsps_diff_freq_vq(int indexes[], float lsp[], int order);
+void  decode_lsps_diff_freq_vq(float lsp_[], int indexes[], int order);
+void  encode_lsps_diff_time(int indexes[], 
+                           float lsp[], 
+                           float lsp__prev[], 
+                           int order);
+void decode_lsps_diff_time(float lsp_[], 
+                          int indexes[], 
+                          float lsp__prev[],
+                          int order);
 
-void encode_lsps(int indexes[], float lsp[], int order);
-void decode_lsps(float lsp[], int indexes[], int order);
+void encode_lsps_vq(int *indexes, float *x, float *xq, int ndim);
+void decode_lsps_vq(int *indexes, float *xq, int ndim);
 
-int encode_energy(float e);
-float decode_energy(int index);
+long quantise(const float * cb, float vec[], float w[], int k, int m, float *se);
+void lspvq_quantise(float lsp[], float lsp_[], int order); 
+void lspjnd_quantise(float lsp[], float lsp_[], int order);
+void lspdt_quantise(float lsps[], float lsps_[], float lsps__prev[], int mode);
+void lspjvm_quantise(float lsps[], float lsps_[], int order);
+void lspanssi_quantise(float lsps[], float lsps_[], int order, int mbest_entries);
 
-void encode_amplitudes(int    lsp_indexes[], 
-                      int   *lpc_correction, 
-                      int   *energy_index,
-                      MODEL *model, 
-                      float  Sn[], 
-                      float  w[]);
+void quantise_WoE(MODEL *model, float *e, float xq[]);
+int  encode_WoE(MODEL *model, float e, float xq[]);
+void decode_WoE(MODEL *model, float *e, float xq[], int n1);
 
-float decode_amplitudes(MODEL *model,
-                       float  ak[],
-                       int lsp_indexes[],
-                       int lpc_correction, 
-                       int energy_index);
+int encode_energy(float e);
+float decode_energy(int index);
 
 void pack(unsigned char * bits, unsigned int *nbit, int index, unsigned int index_bits);
 int  unpack(const unsigned char * bits, unsigned int *nbit, unsigned int index_bits);
 
 int lsp_bits(int i);
+int lspd_bits(int i);
+int lspdt_bits(int i);
+int lsp_pred_vq_bits(int i);
 
-int need_lpc_correction(MODEL *model, float ak[], float E);
-void apply_lpc_correction(MODEL *model, int lpc_correction);
+void apply_lpc_correction(MODEL *model);
 float speech_to_uq_lsps(float lsp[],
                        float ak[],
                        float Sn[], 
                        float w[],
                        int   order
                        );
-void bw_expand_lsps(float lsp[],
-                   int   order
-                   );
-void decode_lsps(float lsp[], int indexes[], int order);
+int check_lsp_order(float lsp[], int lpc_order);
+void bw_expand_lsps(float lsp[], int order);
+void locate_lsps_jnd_steps(float lsp[], int order);
+float decode_amplitudes(MODEL *model, 
+                       float  ak[],
+                       int    lsp_indexes[], 
+                       int    energy_index,
+                       float  lsps[],
+                       float *e);
 
 #endif
diff --git a/libs/libcodec2/src/rn.h b/libs/libcodec2/src/rn.h
new file mode 100644 (file)
index 0000000..934f458
--- /dev/null
@@ -0,0 +1,964 @@
+/* Generated by rn_file() Octave function */
+
+const float gt_alpha5_root[]={
+  2.86997e-05,
+  2.2286e-05,
+  1.82863e-05,
+  1.42303e-05,
+  1.04905e-05,
+  6.70859e-06,
+  3.05918e-06,
+  -6.22187e-07,
+  -4.22748e-06,
+  -7.85603e-06,
+  -1.14317e-05,
+  -1.50227e-05,
+  -1.85712e-05,
+  -2.21275e-05,
+  -2.56455e-05,
+  -2.91642e-05,
+  -3.26453e-05,
+  -3.61199e-05,
+  -3.95556e-05,
+  -4.29778e-05,
+  -4.63581e-05,
+  -4.97179e-05,
+  -5.3032e-05,
+  -5.63184e-05,
+  -5.95548e-05,
+  -6.27565e-05,
+  -6.59032e-05,
+  -6.90085e-05,
+  -7.20538e-05,
+  -7.50509e-05,
+  -7.7983e-05,
+  -8.08605e-05,
+  -8.36678e-05,
+  -8.64141e-05,
+  -8.9085e-05,
+  -9.16888e-05,
+  -9.42119e-05,
+  -9.66619e-05,
+  -9.9026e-05,
+  -0.000101311,
+  -0.000103505,
+  -0.000105614,
+  -0.000107627,
+  -0.00010955,
+  -0.000111372,
+  -0.000113099,
+  -0.00011472,
+  -0.000116241,
+  -0.000117652,
+  -0.000118959,
+  -0.000120152,
+  -0.000121235,
+  -0.000122201,
+  -0.000123053,
+  -0.000123784,
+  -0.000124397,
+  -0.000124884,
+  -0.00012525,
+  -0.000125487,
+  -0.000125598,
+  -0.000125578,
+  -0.000125428,
+  -0.000125145,
+  -0.000124729,
+  -0.000124185,
+  -0.000123518,
+  -0.000122709,
+  -0.000121766,
+  -0.000120685,
+  -0.000119471,
+  -0.000118119,
+  -0.000116633,
+  -0.000115009,
+  -0.000113251,
+  -0.000111356,
+  -0.000109326,
+  -0.00010716,
+  -0.00010486,
+  -0.000102424,
+  -9.98553e-05,
+  -9.71528e-05,
+  -9.43199e-05,
+  -9.13551e-05,
+  -8.82623e-05,
+  -8.50404e-05,
+  -8.16936e-05,
+  -7.82211e-05,
+  -7.46271e-05,
+  -7.09109e-05,
+  -6.70773e-05,
+  -6.31256e-05,
+  -5.90607e-05,
+  -5.48823e-05,
+  -5.05954e-05,
+  -4.62001e-05,
+  -4.17016e-05,
+  -3.71002e-05,
+  -3.24015e-05,
+  -2.7606e-05,
+  -2.27195e-05,
+  -1.77428e-05,
+  -1.2682e-05,
+  -7.53795e-06,
+  -2.31702e-06,
+  2.97965e-06,
+  8.34567e-06,
+  1.37796e-05,
+  1.9275e-05,
+  2.483e-05,
+  3.04382e-05,
+  3.60975e-05,
+  4.18011e-05,
+  4.75467e-05,
+  5.33273e-05,
+  5.91403e-05,
+  6.49787e-05,
+  7.08393e-05,
+  7.67152e-05,
+  8.26029e-05,
+  8.84957e-05,
+  9.43895e-05,
+  0.000100278,
+  0.000106157,
+  0.00011202,
+  0.000117864,
+  0.000123681,
+  0.000129468,
+  0.000135218,
+  0.000140929,
+  0.000146583,
+  0.000152183,
+  0.000157725,
+  0.000163202,
+  0.000168608,
+  0.000173938,
+  0.000179183,
+  0.00018434,
+  0.0001894,
+  0.00019436,
+  0.000199211,
+  0.000203949,
+  0.000208568,
+  0.000213063,
+  0.000217426,
+  0.000221654,
+  0.00022574,
+  0.000229678,
+  0.000233463,
+  0.000237089,
+  0.000240551,
+  0.000243843,
+  0.000246959,
+  0.000249895,
+  0.000252644,
+  0.000255202,
+  0.000257562,
+  0.000259721,
+  0.000261672,
+  0.000263411,
+  0.000264933,
+  0.000266234,
+  0.000267308,
+  0.000268152,
+  0.00026876,
+  0.000269128,
+  0.000269253,
+  0.000269129,
+  0.000268754,
+  0.000268123,
+  0.000267232,
+  0.000266079,
+  0.000264658,
+  0.000262968,
+  0.000261006,
+  0.000258767,
+  0.000256251,
+  0.000253453,
+  0.000250373,
+  0.000247007,
+  0.000243354,
+  0.000239412,
+  0.00023518,
+  0.000230655,
+  0.000225837,
+  0.000220723,
+  0.000215314,
+  0.000209608,
+  0.000203605,
+  0.000197304,
+  0.000190706,
+  0.000183812,
+  0.000176621,
+  0.000169145,
+  0.000161363,
+  0.000153275,
+  0.000144895,
+  0.000136224,
+  0.000127266,
+  0.00011802,
+  0.000108491,
+  9.8679e-05,
+  8.85877e-05,
+  7.82196e-05,
+  6.7577e-05,
+  5.66636e-05,
+  4.54822e-05,
+  3.40369e-05,
+  2.23311e-05,
+  1.03695e-05,
+  -1.844e-06,
+  -1.43041e-05,
+  -2.70061e-05,
+  -3.99444e-05,
+  -5.31139e-05,
+  -6.65082e-05,
+  -8.01218e-05,
+  -9.39481e-05,
+  -0.000107981,
+  -0.000122213,
+  -0.000136638,
+  -0.000151248,
+  -0.000166036,
+  -0.000180995,
+  -0.000196115,
+  -0.00021139,
+  -0.000226811,
+  -0.000242369,
+  -0.000258056,
+  -0.000273861,
+  -0.000289776,
+  -0.000305792,
+  -0.000321898,
+  -0.000338084,
+  -0.000354342,
+  -0.00037066,
+  -0.000387027,
+  -0.000403434,
+  -0.00041987,
+  -0.000436324,
+  -0.000452784,
+  -0.00046924,
+  -0.00048568,
+  -0.000502091,
+  -0.000518464,
+  -0.000534785,
+  -0.000551043,
+  -0.000567225,
+  -0.000583319,
+  -0.000599314,
+  -0.000615196,
+  -0.000630955,
+  -0.000646575,
+  -0.000662049,
+  -0.000677361,
+  -0.000692506,
+  -0.000707464,
+  -0.00072229,
+  -0.000736922,
+  -0.000751266,
+  -0.000765372,
+  -0.000779217,
+  -0.000792798,
+  -0.000806094,
+  -0.000819098,
+  -0.000831793,
+  -0.000844168,
+  -0.000856207,
+  -0.000867898,
+  -0.000879227,
+  -0.00089018,
+  -0.000900744,
+  -0.000910906,
+  -0.000920652,
+  -0.00092997,
+  -0.000938844,
+  -0.000947263,
+  -0.000955214,
+  -0.000962682,
+  -0.000969654,
+  -0.000976119,
+  -0.000982062,
+  -0.00098747,
+  -0.000992332,
+  -0.000996634,
+  -0.00100036,
+  -0.00100351,
+  -0.00100606,
+  -0.001008,
+  -0.00100932,
+  -0.00101,
+  -0.00101005,
+  -0.00100943,
+  -0.00100816,
+  -0.0010062,
+  -0.00100356,
+  -0.00100021,
+  -0.000996162,
+  -0.000991392,
+  -0.000985892,
+  -0.000979654,
+  -0.000972668,
+  -0.000964925,
+  -0.000956415,
+  -0.000947131,
+  -0.000937065,
+  -0.000926208,
+  -0.000914552,
+  -0.00090209,
+  -0.000888816,
+  -0.000874721,
+  -0.0008598,
+  -0.000844046,
+  -0.000827453,
+  -0.000810015,
+  -0.000791726,
+  -0.000772581,
+  -0.000752576,
+  -0.000731704,
+  -0.000709965,
+  -0.00068735,
+  -0.000663865,
+  -0.000639509,
+  -0.000614269,
+  -0.000588146,
+  -0.000561139,
+  -0.000533246,
+  -0.000504468,
+  -0.000474802,
+  -0.000444251,
+  -0.000412813,
+  -0.00038049,
+  -0.000347281,
+  -0.000313189,
+  -0.000278215,
+  -0.000242361,
+  -0.000205629,
+  -0.000168024,
+  -0.000129546,
+  -9.02024e-05,
+  -4.99954e-05,
+  -8.93026e-06,
+  3.2988e-05,
+  7.57537e-05,
+  0.000119361,
+  0.000163804,
+  0.000209075,
+  0.000255167,
+  0.000302074,
+  0.000349786,
+  0.000398297,
+  0.000447596,
+  0.000497676,
+  0.000548526,
+  0.000600136,
+  0.000652497,
+  0.000705598,
+  0.000759427,
+  0.000813972,
+  0.000869223,
+  0.000925166,
+  0.000981789,
+  0.00103908,
+  0.00109702,
+  0.00115561,
+  0.00121482,
+  0.00127464,
+  0.00133505,
+  0.00139605,
+  0.00145762,
+  0.00151973,
+  0.00158238,
+  0.00164555,
+  0.00170922,
+  0.00177337,
+  0.00183799,
+  0.00190305,
+  0.00196854,
+  0.00203445,
+  0.00210075,
+  0.00216742,
+  0.00223445,
+  0.00230181,
+  0.00236949,
+  0.00243747,
+  0.00250572,
+  0.00257423,
+  0.00264296,
+  0.00271192,
+  0.00278107,
+  0.00285039,
+  0.00291986,
+  0.00298947,
+  0.00305918,
+  0.00312898,
+  0.00319884,
+  0.00326874,
+  0.00333866,
+  0.00340857,
+  0.00347846,
+  0.00354831,
+  0.00361808,
+  0.00368775,
+  0.00375731,
+  0.00382673,
+  0.00389599,
+  0.00396506,
+  0.00403393,
+  0.00410256,
+  0.00417094,
+  0.00423904,
+  0.00430684,
+  0.00437431,
+  0.00444144,
+  0.0045082,
+  0.00457457,
+  0.00464052,
+  0.00470603,
+  0.00477108,
+  0.00483565,
+  0.00489972,
+  0.00496325,
+  0.00502623,
+  0.00508865,
+  0.00515046,
+  0.00521166,
+  0.00527223,
+  0.00533213,
+  0.00539135,
+  0.00544987,
+  0.00550766,
+  0.00556472,
+  0.005621,
+  0.00567651,
+  0.00573121,
+  0.00578508,
+  0.00583811,
+  0.00589028,
+  0.00594157,
+  0.00599196,
+  0.00604143,
+  0.00608996,
+  0.00613754,
+  0.00618415,
+  0.00622977,
+  0.00627439,
+  0.00631798,
+  0.00636054,
+  0.00640204,
+  0.0064425,
+  0.00648186,
+  0.00652009,
+  0.00655722,
+  0.00659322,
+  0.00662808,
+  0.00666179,
+  0.00669433,
+  0.00672571,
+  0.00675589,
+  0.00678488,
+  0.00681266,
+  0.00683921,
+  0.00686454,
+  0.00688863,
+  0.00691147,
+  0.00693305,
+  0.00695336,
+  0.0069724,
+  0.00699016,
+  0.00700663,
+  0.00702181,
+  0.00703569,
+  0.00704826,
+  0.00705952,
+  0.00706947,
+  0.00707809,
+  0.0070854,
+  0.00709138,
+  0.00709604,
+  0.00709937,
+  0.00710136,
+  0.00710203,
+  0.00710136,
+  0.00709937,
+  0.00709604,
+  0.00709138,
+  0.0070854,
+  0.00707809,
+  0.00706947,
+  0.00705952,
+  0.00704826,
+  0.00703569,
+  0.00702181,
+  0.00700663,
+  0.00699016,
+  0.0069724,
+  0.00695336,
+  0.00693305,
+  0.00691147,
+  0.00688863,
+  0.00686454,
+  0.00683921,
+  0.00681266,
+  0.00678488,
+  0.00675589,
+  0.00672571,
+  0.00669433,
+  0.00666179,
+  0.00662808,
+  0.00659322,
+  0.00655722,
+  0.00652009,
+  0.00648186,
+  0.0064425,
+  0.00640204,
+  0.00636054,
+  0.00631798,
+  0.00627439,
+  0.00622977,
+  0.00618415,
+  0.00613754,
+  0.00608996,
+  0.00604143,
+  0.00599196,
+  0.00594157,
+  0.00589028,
+  0.00583811,
+  0.00578508,
+  0.00573121,
+  0.00567651,
+  0.005621,
+  0.00556472,
+  0.00550766,
+  0.00544987,
+  0.00539135,
+  0.00533213,
+  0.00527223,
+  0.00521166,
+  0.00515046,
+  0.00508865,
+  0.00502623,
+  0.00496325,
+  0.00489972,
+  0.00483565,
+  0.00477108,
+  0.00470603,
+  0.00464052,
+  0.00457457,
+  0.0045082,
+  0.00444144,
+  0.00437431,
+  0.00430684,
+  0.00423904,
+  0.00417094,
+  0.00410256,
+  0.00403393,
+  0.00396506,
+  0.00389599,
+  0.00382673,
+  0.00375731,
+  0.00368775,
+  0.00361808,
+  0.00354831,
+  0.00347846,
+  0.00340857,
+  0.00333866,
+  0.00326874,
+  0.00319884,
+  0.00312898,
+  0.00305918,
+  0.00298947,
+  0.00291986,
+  0.00285039,
+  0.00278107,
+  0.00271192,
+  0.00264296,
+  0.00257423,
+  0.00250572,
+  0.00243747,
+  0.00236949,
+  0.00230181,
+  0.00223445,
+  0.00216742,
+  0.00210075,
+  0.00203445,
+  0.00196854,
+  0.00190305,
+  0.00183799,
+  0.00177337,
+  0.00170922,
+  0.00164555,
+  0.00158238,
+  0.00151973,
+  0.00145762,
+  0.00139605,
+  0.00133505,
+  0.00127464,
+  0.00121482,
+  0.00115561,
+  0.00109702,
+  0.00103908,
+  0.000981789,
+  0.000925166,
+  0.000869223,
+  0.000813972,
+  0.000759427,
+  0.000705598,
+  0.000652497,
+  0.000600136,
+  0.000548526,
+  0.000497676,
+  0.000447596,
+  0.000398297,
+  0.000349786,
+  0.000302074,
+  0.000255167,
+  0.000209075,
+  0.000163804,
+  0.000119361,
+  7.57537e-05,
+  3.2988e-05,
+  -8.93026e-06,
+  -4.99954e-05,
+  -9.02024e-05,
+  -0.000129546,
+  -0.000168024,
+  -0.000205629,
+  -0.000242361,
+  -0.000278215,
+  -0.000313189,
+  -0.000347281,
+  -0.00038049,
+  -0.000412813,
+  -0.000444251,
+  -0.000474802,
+  -0.000504468,
+  -0.000533246,
+  -0.000561139,
+  -0.000588146,
+  -0.000614269,
+  -0.000639509,
+  -0.000663865,
+  -0.00068735,
+  -0.000709965,
+  -0.000731704,
+  -0.000752576,
+  -0.000772581,
+  -0.000791726,
+  -0.000810015,
+  -0.000827453,
+  -0.000844046,
+  -0.0008598,
+  -0.000874721,
+  -0.000888816,
+  -0.00090209,
+  -0.000914552,
+  -0.000926208,
+  -0.000937065,
+  -0.000947131,
+  -0.000956415,
+  -0.000964925,
+  -0.000972668,
+  -0.000979654,
+  -0.000985892,
+  -0.000991392,
+  -0.000996162,
+  -0.00100021,
+  -0.00100356,
+  -0.0010062,
+  -0.00100816,
+  -0.00100943,
+  -0.00101005,
+  -0.00101,
+  -0.00100932,
+  -0.001008,
+  -0.00100606,
+  -0.00100351,
+  -0.00100036,
+  -0.000996634,
+  -0.000992332,
+  -0.00098747,
+  -0.000982062,
+  -0.000976119,
+  -0.000969654,
+  -0.000962682,
+  -0.000955214,
+  -0.000947263,
+  -0.000938844,
+  -0.00092997,
+  -0.000920652,
+  -0.000910906,
+  -0.000900744,
+  -0.00089018,
+  -0.000879227,
+  -0.000867898,
+  -0.000856207,
+  -0.000844168,
+  -0.000831793,
+  -0.000819098,
+  -0.000806094,
+  -0.000792798,
+  -0.000779217,
+  -0.000765372,
+  -0.000751266,
+  -0.000736922,
+  -0.00072229,
+  -0.000707464,
+  -0.000692506,
+  -0.000677361,
+  -0.000662049,
+  -0.000646575,
+  -0.000630955,
+  -0.000615196,
+  -0.000599314,
+  -0.000583319,
+  -0.000567225,
+  -0.000551043,
+  -0.000534785,
+  -0.000518464,
+  -0.000502091,
+  -0.00048568,
+  -0.00046924,
+  -0.000452784,
+  -0.000436324,
+  -0.00041987,
+  -0.000403434,
+  -0.000387027,
+  -0.00037066,
+  -0.000354342,
+  -0.000338084,
+  -0.000321898,
+  -0.000305792,
+  -0.000289776,
+  -0.000273861,
+  -0.000258056,
+  -0.000242369,
+  -0.000226811,
+  -0.00021139,
+  -0.000196115,
+  -0.000180995,
+  -0.000166036,
+  -0.000151248,
+  -0.000136638,
+  -0.000122213,
+  -0.000107981,
+  -9.39481e-05,
+  -8.01218e-05,
+  -6.65082e-05,
+  -5.31139e-05,
+  -3.99444e-05,
+  -2.70061e-05,
+  -1.43041e-05,
+  -1.844e-06,
+  1.03695e-05,
+  2.23311e-05,
+  3.40369e-05,
+  4.54822e-05,
+  5.66636e-05,
+  6.7577e-05,
+  7.82196e-05,
+  8.85877e-05,
+  9.8679e-05,
+  0.000108491,
+  0.00011802,
+  0.000127266,
+  0.000136224,
+  0.000144895,
+  0.000153275,
+  0.000161363,
+  0.000169145,
+  0.000176621,
+  0.000183812,
+  0.000190706,
+  0.000197304,
+  0.000203605,
+  0.000209608,
+  0.000215314,
+  0.000220723,
+  0.000225837,
+  0.000230655,
+  0.00023518,
+  0.000239412,
+  0.000243354,
+  0.000247007,
+  0.000250373,
+  0.000253453,
+  0.000256251,
+  0.000258767,
+  0.000261006,
+  0.000262968,
+  0.000264658,
+  0.000266079,
+  0.000267232,
+  0.000268123,
+  0.000268754,
+  0.000269129,
+  0.000269253,
+  0.000269128,
+  0.00026876,
+  0.000268152,
+  0.000267308,
+  0.000266234,
+  0.000264933,
+  0.000263411,
+  0.000261672,
+  0.000259721,
+  0.000257562,
+  0.000255202,
+  0.000252644,
+  0.000249895,
+  0.000246959,
+  0.000243843,
+  0.000240551,
+  0.000237089,
+  0.000233463,
+  0.000229678,
+  0.00022574,
+  0.000221654,
+  0.000217426,
+  0.000213063,
+  0.000208568,
+  0.000203949,
+  0.000199211,
+  0.00019436,
+  0.0001894,
+  0.00018434,
+  0.000179183,
+  0.000173938,
+  0.000168608,
+  0.000163202,
+  0.000157725,
+  0.000152183,
+  0.000146583,
+  0.000140929,
+  0.000135218,
+  0.000129468,
+  0.000123681,
+  0.000117864,
+  0.00011202,
+  0.000106157,
+  0.000100278,
+  9.43895e-05,
+  8.84957e-05,
+  8.26029e-05,
+  7.67152e-05,
+  7.08393e-05,
+  6.49787e-05,
+  5.91403e-05,
+  5.33273e-05,
+  4.75467e-05,
+  4.18011e-05,
+  3.60975e-05,
+  3.04382e-05,
+  2.483e-05,
+  1.9275e-05,
+  1.37796e-05,
+  8.34567e-06,
+  2.97965e-06,
+  -2.31702e-06,
+  -7.53795e-06,
+  -1.2682e-05,
+  -1.77428e-05,
+  -2.27195e-05,
+  -2.7606e-05,
+  -3.24015e-05,
+  -3.71002e-05,
+  -4.17016e-05,
+  -4.62001e-05,
+  -5.05954e-05,
+  -5.48823e-05,
+  -5.90607e-05,
+  -6.31256e-05,
+  -6.70773e-05,
+  -7.09109e-05,
+  -7.46271e-05,
+  -7.82211e-05,
+  -8.16936e-05,
+  -8.50404e-05,
+  -8.82623e-05,
+  -9.13551e-05,
+  -9.43199e-05,
+  -9.71528e-05,
+  -9.98553e-05,
+  -0.000102424,
+  -0.00010486,
+  -0.00010716,
+  -0.000109326,
+  -0.000111356,
+  -0.000113251,
+  -0.000115009,
+  -0.000116633,
+  -0.000118119,
+  -0.000119471,
+  -0.000120685,
+  -0.000121766,
+  -0.000122709,
+  -0.000123518,
+  -0.000124185,
+  -0.000124729,
+  -0.000125145,
+  -0.000125428,
+  -0.000125578,
+  -0.000125598,
+  -0.000125487,
+  -0.00012525,
+  -0.000124884,
+  -0.000124397,
+  -0.000123784,
+  -0.000123053,
+  -0.000122201,
+  -0.000121235,
+  -0.000120152,
+  -0.000118959,
+  -0.000117652,
+  -0.000116241,
+  -0.00011472,
+  -0.000113099,
+  -0.000111372,
+  -0.00010955,
+  -0.000107627,
+  -0.000105614,
+  -0.000103505,
+  -0.000101311,
+  -9.9026e-05,
+  -9.66619e-05,
+  -9.42119e-05,
+  -9.16888e-05,
+  -8.9085e-05,
+  -8.64141e-05,
+  -8.36678e-05,
+  -8.08605e-05,
+  -7.7983e-05,
+  -7.50509e-05,
+  -7.20538e-05,
+  -6.90085e-05,
+  -6.59032e-05,
+  -6.27565e-05,
+  -5.95548e-05,
+  -5.63184e-05,
+  -5.3032e-05,
+  -4.97179e-05,
+  -4.63581e-05,
+  -4.29778e-05,
+  -3.95556e-05,
+  -3.61199e-05,
+  -3.26453e-05,
+  -2.91642e-05,
+  -2.56455e-05,
+  -2.21275e-05,
+  -1.85712e-05,
+  -1.50227e-05,
+  -1.14317e-05,
+  -7.85603e-06,
+  -4.22748e-06,
+  -6.22187e-07,
+  3.05918e-06,
+  6.70859e-06,
+  1.04905e-05,
+  1.42303e-05,
+  1.82863e-05,
+  2.2286e-05
+};
index ed298e34f370e66176a942919556f00de1e4f925..10152d979a02f9cfcf5e483cddffce489ebb1a98 100755 (executable)
 
 ../src/c2sim ../raw/$1.raw -o $1_uq.raw
 ../src/c2sim ../raw/$1.raw --phase0 -o $1_phase0.raw --postfilter
-../src/c2sim ../raw/$1.raw --lpc 10 -o $1_lpc10.raw
-../src/c2sim ../raw/$1.raw --lpc 10 --lsp -o $1_lsp.raw
+../src/c2sim ../raw/$1.raw --lpc 10 -o $1_lpc10.raw --postfilter
 ../src/c2sim ../raw/$1.raw --phase0 --lpc 10 -o $1_phase0_lpc10.raw --postfilter
-../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --lsp -o $1_phase0_lsp.raw --postfilter
-../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --lsp -o $1_phase0_lsp_dec.raw --postfilter --dec
+../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --dec -o $1_phase0_lpc10_dec.raw --postfilter
+../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --lsp --dec -o $1_phase0_lsp_dec.raw --postfilter
+
+#../src/c2sim ../raw/$1.raw --lpc 10 --lsp -o $1_lsp.raw
+#../src/c2sim ../raw/$1.raw --phase0 --lpc 10 -o $1_phase0_lpc10.raw --postfilter
+#../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --lsp -o $1_phase0_lsp.raw --postfilter
+#../src/c2sim ../raw/$1.raw --phase0 --lpc 10 --lsp -o $1_phase0_lsp_dec.raw --postfilter --dec
 
index 9263151b7b6d85d1e024ed3458408f6ce729546b..67cbeaeb7236950afe47163739143cb814f64c1d 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 /*---------------------------------------------------------------------------*\
@@ -38,7 +37,9 @@
 
 #include "defines.h"
 #include "sine.h"
-#include "four1.h"
+#include "kiss_fft.h"
+
+#define HPF_BETA 0.125
 
 /*---------------------------------------------------------------------------*\
                                                                              
@@ -65,9 +66,10 @@ void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax,
 
 \*---------------------------------------------------------------------------*/
 
-void make_analysis_window(float w[],COMP W[])
+void make_analysis_window(kiss_fft_cfg fft_fwd_cfg, float w[], COMP W[])
 {
   float m;
+  COMP  wshift[FFT_ENC];
   COMP  temp;
   int   i,j;
 
@@ -122,15 +124,15 @@ void make_analysis_window(float w[],COMP W[])
   */
 
   for(i=0; i<FFT_ENC; i++) {
-    W[i].real = 0.0;
-    W[i].imag = 0.0;
+    wshift[i].real = 0.0;
+    wshift[i].imag = 0.0;
   }
   for(i=0; i<NW/2; i++)
-    W[i].real = w[i+M/2];
+    wshift[i].real = w[i+M/2];
   for(i=FFT_ENC-NW/2,j=M/2-NW/2; i<FFT_ENC; i++,j++)
-    W[i].real = w[j];
+   wshift[i].real = w[j];
 
-  four1(&W[-1].imag,FFT_ENC,-1);         /* "Numerical Recipes in C" FFT */
+  kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)wshift, (kiss_fft_cpx *)W);
 
   /* 
       Re-arrange W[] to be symmetrical about FFT_ENC/2.  Makes later 
@@ -167,6 +169,26 @@ void make_analysis_window(float w[],COMP W[])
 
 }
 
+/*---------------------------------------------------------------------------*\
+                                                       
+  FUNCTION....: hpf         
+  AUTHOR......: David Rowe                           
+  DATE CREATED: 16 Nov 2010
+
+  High pass filter with a -3dB point of about 160Hz.
+
+    y(n) = -HPF_BETA*y(n-1) + x(n) - x(n-1)
+\*---------------------------------------------------------------------------*/
+
+float hpf(float x, float states[])
+{
+    states[0] += -HPF_BETA*states[0] + x - states[1];
+    states[1] = x;
+
+    return states[0];
+}
+
 /*---------------------------------------------------------------------------*\
                                                        
   FUNCTION....: dft_speech          
@@ -177,13 +199,14 @@ void make_analysis_window(float w[],COMP W[])
 
 \*---------------------------------------------------------------------------*/
 
-void dft_speech(COMP Sw[], float Sn[], float w[])
+void dft_speech(kiss_fft_cfg fft_fwd_cfg, COMP Sw[], float Sn[], float w[])
 {
-  int i;
-  
+  int  i;
+  COMP sw[FFT_ENC];
+
   for(i=0; i<FFT_ENC; i++) {
-    Sw[i].real = 0.0;
-    Sw[i].imag = 0.0;
+    sw[i].real = 0.0;
+    sw[i].imag = 0.0;
   }
 
   /* Centre analysis window on time axis, we need to arrange input
@@ -192,14 +215,14 @@ void dft_speech(COMP Sw[], float Sn[], float w[])
   /* move 2nd half to start of FFT input vector */
 
   for(i=0; i<NW/2; i++)
-    Sw[i].real = Sn[i+M/2]*w[i+M/2];
+    sw[i].real = Sn[i+M/2]*w[i+M/2];
 
   /* move 1st half to end of FFT input vector */
 
   for(i=0; i<NW/2; i++)
-    Sw[FFT_ENC-NW/2+i].real = Sn[i+M/2-NW/2]*w[i+M/2-NW/2];
+    sw[FFT_ENC-NW/2+i].real = Sn[i+M/2-NW/2]*w[i+M/2-NW/2];
 
-  four1(&Sw[-1].imag,FFT_ENC,-1);
+  kiss_fft(fft_fwd_cfg, (kiss_fft_cpx *)sw, (kiss_fft_cpx *)Sw);
 }
 
 /*---------------------------------------------------------------------------*\
@@ -362,38 +385,38 @@ float est_voicing_mbe(
     MODEL *model,
     COMP   Sw[],
     COMP   W[],
-    float  f0,
-    COMP   Sw_[]          /* DFT of all voiced synthesised signal for f0 */
-                          /* useful for debugging/dump file              */
-)
+    COMP   Sw_[],         /* DFT of all voiced synthesised signal  */
+                          /* useful for debugging/dump file        */
+    COMP   Ew[],          /* DFT of error                          */
+    float prev_Wo)
 {
     int   i,l,al,bl,m;    /* loop variables */
     COMP  Am;             /* amplitude sample for this band */
     int   offset;         /* centers Hw[] about current harmonic */
     float den;            /* denominator of Am expression */
-    float error;          /* accumulated error between originl and synthesised */
-    float Wo;             /* current "test" fundamental freq. */
-    int   L;
+    float error;          /* accumulated error between original and synthesised */
+    float Wo;            
     float sig, snr;
+    float elow, ehigh, eratio;
+    float dF0, sixty;
 
-    sig = 0.0;
+    sig = 1E-4;
     for(l=1; l<=model->L/4; l++) {
        sig += model->A[l]*model->A[l];
     }
-
     for(i=0; i<FFT_ENC; i++) {
        Sw_[i].real = 0.0;
        Sw_[i].imag = 0.0;
+       Ew[i].real = 0.0;
+       Ew[i].imag = 0.0;
     }
 
-    L = floor((FS/2.0)/f0);
-    Wo = f0*(TWO_PI/FS);
-
-    error = 0.0;
+    Wo = model->Wo;
+    error = 1E-4;
 
     /* Just test across the harmonics in the first 1000 Hz (L/4) */
 
-    for(l=1; l<=L/4; l++) {
+    for(l=1; l<=model->L/4; l++) {
        Am.real = 0.0;
        Am.imag = 0.0;
        den = 0.0;
@@ -418,16 +441,73 @@ float est_voicing_mbe(
            offset = FFT_ENC/2 + m - l*Wo*FFT_ENC/TWO_PI + 0.5;
            Sw_[m].real = Am.real*W[offset].real - Am.imag*W[offset].imag;
            Sw_[m].imag = Am.real*W[offset].imag + Am.imag*W[offset].real;
-           error += (Sw[m].real - Sw_[m].real)*(Sw[m].real - Sw_[m].real);
-           error += (Sw[m].imag - Sw_[m].imag)*(Sw[m].imag - Sw_[m].imag);
+           Ew[m].real = Sw[m].real - Sw_[m].real;
+           Ew[m].imag = Sw[m].imag - Sw_[m].imag;
+           error += Ew[m].real*Ew[m].real;
+           error += Ew[m].imag*Ew[m].imag;
        }
     }
-
+    
     snr = 10.0*log10(sig/error);
     if (snr > V_THRESH)
        model->voiced = 1;
     else
        model->voiced = 0;
+    /* post processing, helps clean up some voicing errors ------------------*/
+
+    /* 
+       Determine the ratio of low freqency to high frequency energy,
+       voiced speech tends to be dominated by low frequency energy,
+       unvoiced by high frequency. This measure can be used to
+       determine if we have made any gross errors.
+    */
+
+    elow = ehigh = 1E-4;
+    for(l=1; l<=model->L/2; l++) {
+       elow += model->A[l]*model->A[l];
+    }
+    for(l=model->L/2; l<=model->L; l++) {
+       ehigh += model->A[l]*model->A[l];
+    }
+    eratio = 10.0*log10(elow/ehigh);
+    dF0 = 0.0;
+
+    /* Look for Type 1 errors, strongly V speech that has been
+       accidentally declared UV */
+
+    if (model->voiced == 0)
+       if (eratio > 10.0)
+           model->voiced = 1;
+
+    /* Look for Type 2 errors, strongly UV speech that has been
+       accidentally declared V */
+
+    if (model->voiced == 1) {
+       if (eratio < -10.0)
+           model->voiced = 0;
+
+       /* If pitch is jumping about it's likely this is UV */
+       
+       /* 13 Feb 2012 - this seems to add some V errors so comment out for now.  Maybe
+          double check on bg noise files
+
+          dF0 = (model->Wo - prev_Wo)*FS/TWO_PI;
+          if (fabs(dF0) > 15.0) 
+          model->voiced = 0;
+       */
+
+       /* A common source of Type 2 errors is the pitch estimator
+          gives a low (50Hz) estimate for UV speech, which gives a
+          good match with noise due to the close harmoonic spacing.
+          These errors are much more common than people with 50Hz3
+          pitch, so we have just a small eratio threshold. */
+
+       sixty = 60.0*TWO_PI/FS;
+       if ((eratio < -4.0) && (model->Wo <= sixty))
+           model->voiced = 0;
+    }
+    //printf(" v: %d snr: %f eratio: %3.2f %f\n",model->voiced,snr,eratio,dF0);
 
     return snr;
 }
@@ -471,20 +551,22 @@ void make_synthesis_window(float Pn[])
   DATE CREATED: 20/2/95                       
                                                                              
   Synthesise a speech signal in the frequency domain from the
-  sinusodal model parameters.  Uses overlap-add a triangular window to
-  smoothly interpolate betwen frames.
+  sinusodal model parameters.  Uses overlap-add with a trapezoidal
+  window to smoothly interpolate betwen frames.
                                                                              
 \*---------------------------------------------------------------------------*/
 
 void synthesise(
-  float  Sn_[],                /* time domain synthesised signal         */
-  MODEL *model,                /* ptr to model parameters for this frame */
-  float  Pn[],         /* time domain Parzen window              */
-  int    shift          /* used to handle transition frames       */
+  kiss_fft_cfg fft_inv_cfg, 
+  float  Sn_[],                /* time domain synthesised signal              */
+  MODEL *model,                /* ptr to model parameters for this frame      */
+  float  Pn[],         /* time domain Parzen window                   */
+  int    shift          /* flag used to handle transition frames       */
 )
 {
     int   i,l,j,b;     /* loop variables */
     COMP  Sw_[FFT_DEC];        /* DFT of synthesised signal */
+    COMP  sw_[FFT_DEC];        /* synthesised signal */
 
     if (shift) {
        /* Update memories */
@@ -500,10 +582,30 @@ void synthesise(
        Sw_[i].imag = 0.0;
     }
 
+    /*
+      Nov 2010 - found that synthesis using time domain cos() functions
+      gives better results for synthesis frames greater than 10ms.  Inverse
+      FFT synthesis using a 512 pt FFT works well for 10ms window.  I think
+      (but am not sure) that the problem is related to the quantisation of
+      the harmonic frequencies to the FFT bin size, e.g. there is a 
+      8000/512 Hz step between FFT bins.  For some reason this makes
+      the speech from longer frame > 10ms sound poor.  The effect can also
+      be seen when synthesising test signals like single sine waves, some
+      sort of amplitude modulation at the frame rate.
+
+      Another possibility is using a larger FFT size (1024 or 2048).
+    */
+
+#define FFT_SYNTHESIS
+#ifdef FFT_SYNTHESIS
     /* Now set up frequency domain synthesised speech */
-
     for(l=1; l<=model->L; l++) {
+    //for(l=model->L/2; l<=model->L; l++) {
+    //for(l=1; l<=model->L/4; l++) {
        b = floor(l*model->Wo*FFT_DEC/TWO_PI + 0.5);
+       if (b > ((FFT_DEC/2)-1)) {
+               b = (FFT_DEC/2)-1;
+       }
        Sw_[b].real = model->A[l]*cos(model->phi[l]);
        Sw_[b].imag = model->A[l]*sin(model->phi[l]);
        Sw_[FFT_DEC-b].real = Sw_[b].real;
@@ -512,19 +614,35 @@ void synthesise(
 
     /* Perform inverse DFT */
 
-    four1(&Sw_[-1].imag,FFT_DEC,1);
+    kiss_fft(fft_inv_cfg, (kiss_fft_cpx *)Sw_, (kiss_fft_cpx *)sw_);
+#else
+    /*
+       Direct time domain synthesis using the cos() function.  Works
+       well at 10ms and 20ms frames rates.  Note synthesis window is
+       still used to handle overlap-add between adjacent frames.  This
+       could be simplified as we don't need to synthesise where Pn[]
+       is zero.
+    */
+    for(l=1; l<=model->L; l++) {
+       for(i=0,j=-N+1; i<N-1; i++,j++) {
+           Sw_[FFT_DEC-N+1+i].real += 2.0*model->A[l]*cos(j*model->Wo*l + model->phi[l]);
+       }
+       for(i=N-1,j=0; i<2*N; i++,j++)
+           Sw_[j].real += 2.0*model->A[l]*cos(j*model->Wo*l + model->phi[l]);
+    }  
+#endif
 
     /* Overlap add to previous samples */
 
     for(i=0; i<N-1; i++) {
-       Sn_[i] += Sw_[FFT_DEC-N+1+i].real*Pn[i];
+       Sn_[i] += sw_[FFT_DEC-N+1+i].real*Pn[i];
     }
 
     if (shift)
        for(i=N-1,j=0; i<2*N; i++,j++)
-           Sn_[i] = Sw_[j].real*Pn[i];
+           Sn_[i] = sw_[j].real*Pn[i];
     else
        for(i=N-1,j=0; i<2*N; i++,j++)
-           Sn_[i] += Sw_[j].real*Pn[i];
+           Sn_[i] += sw_[j].real*Pn[i];
 }
 
index 9cdfbcfbc126bf9e451104d5d23e2c1001c5500f..202adfd2029356c3387d348eb71b7640bcd81a06 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __SINE__
 #define __SINE__
 
-void make_analysis_window(float w[], COMP W[]);
-void dft_speech(COMP Sw[], float Sn[], float w[]);
+#include "defines.h"
+#include "comp.h"
+#include "kiss_fft.h"
+
+void make_analysis_window(kiss_fft_cfg fft_fwd_cfg, float w[], COMP W[]);
+float hpf(float x, float states[]);
+void dft_speech(kiss_fft_cfg fft_fwd_cfg, COMP Sw[], float Sn[], float w[]);
 void two_stage_pitch_refinement(MODEL *model, COMP Sw[]);
 void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[]);
-float est_voicing_mbe(MODEL *model, COMP Sw[], COMP W[], float f0, COMP Sw_[]);
+float est_voicing_mbe(MODEL *model, COMP Sw[], COMP W[], COMP Sw_[],COMP Ew[], 
+                     float prev_Wo);
 void make_synthesis_window(float Pn[]);
-void synthesise(float Sn_[], MODEL *model, float Pn[], int shift);
+void synthesise(kiss_fft_cfg fft_inv_cfg, float Sn_[], MODEL *model, float Pn[], int shift);
 
 #endif
diff --git a/libs/libcodec2/src/test_bits.h b/libs/libcodec2/src/test_bits.h
new file mode 100644 (file)
index 0000000..19d7a92
--- /dev/null
@@ -0,0 +1,116 @@
+/* Generated by test_bits_file() Octave function */
+
+const int test_bits[]={
+  0,
+  1,
+  1,
+  0,
+  0,
+  0,
+  1,
+  1,
+  0,
+  0,
+  1,
+  0,
+  1,
+  0,
+  0,
+  1,
+  0,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  1,
+  1,
+  0,
+  1,
+  1,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  1,
+  1,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  0,
+  1,
+  1,
+  1,
+  1,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  0,
+  1,
+  0,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0
+};
index e18b44d5e45844063b52b90196c60ce02673fad7..df6e327261b07b9c673b99ba6acf6f6325ede9c8 100644 (file)
-AM_CFLAGS = -I../src -g  -DFLOATING_POINT -DVAR_ARRAYS
-AUTOMAKE_OPTIONS = gnu
+AM_CFLAGS = -I../src -fPIC -g  -DFLOATING_POINT -DVAR_ARRAYS -O2 -Wall
+AUTOMAKE_OPTS = gnu
 NAME = libcodec2
 AM_CPPFLAGS = $(AM_CFLAGS)
 
-bin_PROGRAMS = genres genlsp extract vqtrain tnlp tinterp tquant tcodec2
+noinst_PROGRAMS = genres genlsp extract vqtrain vqtrainjnd tnlp tinterp tquant vq_train_jvm scalarlsptest tfdmdv t48_8 lspsync create_interleaver tlspsens vqtrainph genphdata genampdata polar2rect vqtrainsp tprede pre de tfifo
 
-
-genres_SOURCES = genres.c ../src/lpc.c ../src/codebook.c
+genres_SOURCES = genres.c ../src/lpc.c
 genres_LDADD = $(lib_LTLIBRARIES) 
 genres_LDFLAGS = $(LIBS)
 
-genlsp_SOURCES = genlsp.c ../src/lpc.c ../src/lsp.c ../src/codebook.c
+genlsp_SOURCES = genlsp.c ../src/lpc.c ../src/lsp.c
 genlsp_LDADD = $(lib_LTLIBRARIES) 
 genlsp_LDFLAGS = $(LIBS)
 
-extract_SOURCES = extract.c ../src/codebook.c
+extract_SOURCES = extract.c
 extract_LDADD = $(lib_LTLIBRARIES) 
 extract_LDFLAGS = $(LIBS)
 
-vqtrain_SOURCES = vqtrain.c ../src/codebook.c
+vqtrain_SOURCES = vqtrain.c
 vqtrain_LDADD = $(lib_LTLIBRARIES) 
 vqtrain_LDFLAGS = $(LIBS)
 
-tnlp_SOURCES = tnlp.c ../src/sine.c ../src/nlp.c ../src/four1.c ../src/dump.c ../src/codebook.c
+vqtrainjnd_SOURCES = vqtrainjnd.c
+vqtrainjnd_LDADD = $(lib_LTLIBRARIES) 
+vqtrainjnd_LDFLAGS = $(LIBS)
+
+vqtrainph_SOURCES = vqtrainph.c
+vqtrainph_LDADD = $(lib_LTLIBRARIES) 
+vqtrainph_LDFLAGS = $(LIBS)
+
+vqtrainsp_SOURCES = vqtrainsp.c
+vqtrainsp_LDADD = $(lib_LTLIBRARIES) 
+vqtrainsp_LDFLAGS = $(LIBS)
+
+genphdata_SOURCES = genphdata.c
+genphdata_LDADD = $(lib_LTLIBRARIES) 
+genphdata_LDFLAGS = $(LIBS)
+
+genampdata_SOURCES = genampdata.c
+genampdata_LDADD = $(lib_LTLIBRARIES) 
+genampdata_LDFLAGS = $(LIBS)
+
+polar2rect_SOURCES = polar2rect.c
+polar2rect_LDADD = $(lib_LTLIBRARIES) 
+polar2rect_LDFLAGS = $(LIBS)
+
+vq_train_jvm_SOURCES = vq_train_jvm.c
+vq_train_jvm_LDADD = $(lib_LTLIBRARIES) 
+vq_train_jvm_LDFLAGS = $(LIBS)
+
+CODEBOOKS = ../src/codebook.c ../src/codebookd.c ../src/codebookvq.c ../src/codebookjnd.c ../src/codebookdt.c ../src/codebookjvm.c ../src/codebookvqanssi.c ../src/codebookge.c
+
+tnlp_SOURCES = tnlp.c ../src/sine.c ../src/nlp.c ../src/kiss_fft.c ../src/dump.c
 tnlp_LDADD = $(lib_LTLIBRARIES) 
 tnlp_LDFLAGS = $(LIBS)
 
-tinterp_SOURCES = tinterp.c ../src/sine.c ../src/four1.c ../src/interp.c ../src/codebook.c
+tinterp_SOURCES = tinterp.c ../src/sine.c ../src/kiss_fft.c ../src/interp.c ../src/lpc.c ../src/lsp.c ../src/quantise.c $(CODEBOOKS) ../src/dump.c
 tinterp_LDADD = $(lib_LTLIBRARIES) 
 tinterp_LDFLAGS = $(LIBS)
 
-tquant_SOURCES = tquant.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/four1.c ../src/codebook.c
+tquant_SOURCES = tquant.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/kiss_fft.c $(CODEBOOKS)
 tquant_LDADD = $(lib_LTLIBRARIES) 
 tquant_LDFLAGS = $(LIBS)
 
-tcodec2_SOURCES = tcodec2.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/four1.c \
-../src/codec2.c ../src/sine.c ../src/nlp.c ../src/postfilter.c ../src/phase.c ../src/interp.c ../src/pack.c ../src/codebook.c
-tcodec2_LDADD = $(lib_LTLIBRARIES) 
-tcodec2_LDFLAGS = $(LIBS)
+scalarlsptest_SOURCES = scalarlsptest.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/kiss_fft.c $(CODEBOOKS)
+scalarlsptest_LDADD = $(lib_LTLIBRARIES) 
+scalarlsptest_LDFLAGS = $(LIBS)
+
+tfdmdv_SOURCES = tfdmdv.c ../src/fdmdv.c ../src/kiss_fft.c ../src/octave.c
+tfdmdv_LDADD = $(lib_LTLIBRARIES) 
+tfdmdv_LDFLAGS = $(LIBS)
+
+t48_8_SOURCES = t48_8.c ../src/fdmdv.c ../src/kiss_fft.c
+t48_8_LDADD = $(lib_LTLIBRARIES) 
+t48_8_LDFLAGS = $(LIBS)
+
+lspsync_SOURCES = lspsync.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/kiss_fft.c \
+../src/codec2.c ../src/sine.c ../src/nlp.c ../src/postfilter.c ../src/phase.c ../src/interp.c ../src/pack.c $(CODEBOOKS)
+lspsync_LDADD = $(lib_LTLIBRARIES) 
+lspsync_LDFLAGS = $(LIBS)
+
+create_interleaver_SOURCES = create_interleaver.c 
+create_interleaver_LDADD = $(lib_LTLIBRARIES) 
+create_interleaver_LDFLAGS = $(LIBS)
+
+tlspsens_SOURCES = tlspsens.c ../src/quantise.c ../src/lpc.c ../src/lsp.c ../src/dump.c ../src/kiss_fft.c ../src/codec2.c ../src/sine.c ../src/nlp.c ../src/pack.c ../src/interp.c ../src/postfilter.c ../src/phase.c $(CODEBOOKS)
+tlspsens_LDADD = $(lib_LTLIBRARIES) 
+tlspsens_LDFLAGS = $(LIBS)
+
+tprede_SOURCES = tprede.c ../src/lpc.c 
+tprede_LDADD = $(lib_LTLIBRARIES) 
+tprede_LDFLAGS = $(LIBS)
+
+pre_SOURCES = pre.c ../src/lpc.c 
+pre_LDADD = $(lib_LTLIBRARIES) 
+pre_LDFLAGS = $(LIBS)
+
+de_SOURCES = de.c ../src/lpc.c 
+de_LDADD = $(lib_LTLIBRARIES) 
+de_LDFLAGS = $(LIBS)
 
+tfifo_SOURCES = tfifo.c ../src/fifo.c
+tfifo_LDADD = $(lib_LTLIBRARIES) -lpthread
+tfifo_LDFLAGS = $(LIBS)
index b7544edf3a6142ea94a68664a11b6a6596f089f0..2812d55ec4b340ae91a6a7c3ee218e22825591a6 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#define        MAX_STR 256             /* maximum string length                */
+#define        MAX_STR 2048            /* maximum string length                */
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <ctype.h>
+#include <assert.h>
 
 void scan_line(FILE *fp, float f[], int n);
 
@@ -45,8 +46,8 @@ int main(int argc, char *argv[]) {
     long   lines;      /* lines read so far                            */
 
     if (argc != 5) {
-       printf("usage: extract TextFile FloatFile start end\n");
-       exit(0);
+       printf("usage: %s TextFile FloatFile start(1 .. 10) end(1 .. 10)\n", argv[0]);
+       exit(1);
     }
 
     /* read command line arguments and open files */
@@ -75,8 +76,10 @@ int main(int argc, char *argv[]) {
     lines = 0;
     while(!feof(ftext)) {
        scan_line(ftext, buf, en);
-       fwrite(&buf[st-1], sizeof(float), en-st+1, ffloat);
-       printf("\r%ld lines",lines++);
+       if (!feof(ftext)) {
+           fwrite(&buf[st-1], sizeof(float), en-st+1, ffloat);
+           printf("\r%ld lines",++lines);
+       }
     }
     printf("\n");
 
@@ -108,9 +111,11 @@ void scan_line(FILE *fp, float f[], int n)
     char   s[MAX_STR];
     char   *ps,*pe;
     int           i;
-
-    fgets(s,MAX_STR,fp);
-    ps = pe = s;
+    
+    memset(s, 0, MAX_STR);
+    ps = pe = fgets(s,MAX_STR,fp); 
+    if (ps == NULL)
+       return;
     for(i=0; i<n; i++) {
        while( isspace(*pe)) pe++;
        while( !isspace(*pe)) pe++;
index 8340e2fe1617190c962cb15798482df027f63ab5..8a05b7fc8d9e5319b6c3159179799e8558986ea7 100644 (file)
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#define P      10      /* LP order                                     */
-#define LSP_DELTA1 0.05 /* grid spacing for LSP root searches */
+#define P      12      /* LP order                                     */
+#define LSP_DELTA1 0.01 /* grid spacing for LSP root searches */
 #define NW     279     /* frame size in samples                        */
 #define        N       80      /* frame to frame shift                         */
 #define THRESH 40.0    /* threshold energy/sample for frame inclusion  */
+#define PI         3.141592654 /* mathematical constant                */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -61,19 +61,22 @@ int main(int argc, char *argv[]) {
     float  Sn[NW];     /* float input speech samples                   */
     float  ak[P+1];    /* LPCs for current frame                       */
     float  lsp[P];     /* LSPs for current frame                       */
+    float  lsp_prev[P];        /* LSPs for previous frame                      */
     float  E;          /* frame energy                                 */
+    long   f;          /* number of frames                             */
     long   af;         /* number frames with "active" speech           */
     float  Eres;       /* LPC residual energy                          */
     int    i;
     int    roots;
     int    unstables;
-    int    lspd;
+    int    lspd, log, lspdt;
+    float  diff;
 
     /* Initialise ------------------------------------------------------*/
 
     if (argc < 3) {
-       printf("usage: gentest RawFile LSPTextFile [--lspd]\n");
-       exit(0);
+       printf("usage: %s RawFile LSPTextFile [--lspd] [--log] [--lspdt] \n", argv[0]);
+       exit(1);
     }
 
     /* Open files */
@@ -91,13 +94,15 @@ int main(int argc, char *argv[]) {
     }
 
     lspd = switch_present("--lspd", argc, argv);
+    log = switch_present("--log", argc, argv);
+    lspdt = switch_present("--lspdt", argc, argv);
 
     for(i=0; i<NW; i++)
        Sn[i] = 0.0;
 
     /* Read SPC file, and determine aks[] for each frame ------------------*/
 
-    af = 0;
+    f = af = 0;
     unstables = 0;
     while(fread(buf,sizeof(short),N,fspc) == N) {
 
@@ -117,30 +122,59 @@ int main(int argc, char *argv[]) {
 
        /* If energy high enough, include this frame */
 
+       f++;
        if (E > THRESH) {
            af++;
            printf("Active Frame: %ld  unstables: %d\n",af, unstables);
 
            find_aks(Sn, ak, NW, P, &Eres);
-           roots = lpc_to_lsp(&ak[1], P , lsp, 5, LSP_DELTA1);
+           roots = lpc_to_lsp(ak, P , lsp, 5, LSP_DELTA1);
            if (roots == P) {
                if (lspd) {
-                   fprintf(flsp,"%f ",lsp[0]);
-                   for(i=1; i<P; i++)
-                       fprintf(flsp,"%f ",lsp[i]-lsp[i-1]);
+                   if (log) {
+                       fprintf(flsp,"%f ",log10(lsp[0]));
+                       for(i=1; i<P; i++) {
+                           diff = lsp[i]-lsp[i-1];
+                           if (diff < (PI/4000.0)*25.0) diff = (PI/4000.0)*25.0;
+                           fprintf(flsp,"%f ",log10(diff));
+                       }
+                   } 
+                   else {
+                       fprintf(flsp,"%f ",lsp[0]);
+                       for(i=1; i<P; i++)
+                           fprintf(flsp,"%f ",lsp[i]-lsp[i-1]);
+                   }
+
                    fprintf(flsp,"\n");
+                   
                }
-               else {
+               else if (lspdt) {
                    for(i=0; i<P; i++)
-                       fprintf(flsp,"%f ",lsp[i]);
+                       fprintf(flsp,"%f ",lsp[i]-lsp_prev[i]);
                    fprintf(flsp,"\n");
+                   
                }
+               else {
+                   if (log) {
+                       for(i=0; i<P; i++)
+                           fprintf(flsp,"%f ",log10(lsp[i]));
+                       fprintf(flsp,"\n");
+                   }
+                   else {
+                       for(i=0; i<P; i++)
+                           fprintf(flsp,"%f ",lsp[i]);
+                       fprintf(flsp,"\n");
+                   }
+
+               }               
+               memcpy(lsp_prev, lsp, sizeof(lsp));
            }
            else 
                unstables++;
        }
     }
 
+    printf("%3.2f %% active frames\n", 100.0*(float)af/f);
     fclose(fspc);
     fclose(flsp);
 
index 8e5a266e82f0146d5b6ce0f6bf70f6e9d9d583ff..2da9662c824fdc6d510fbc0a657778e194e54554 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <stdio.h>
@@ -47,7 +46,7 @@ int main(int argc, char *argv[])
 
   if (argc < 3) {
     printf("usage: %s InputFile ResidualFile\n", argv[0]);
-    exit(0);
+    exit(1);
   }
 
   /* Open files */
index f77b5099d578367dc84896a054f5b43793347f09..74bec67df7457d4494e13adf67e8d133a7f4893b 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #define        MAX_N   2048    /* maximum DFT size     */
diff --git a/libs/libcodec2/unittest/sd.h b/libs/libcodec2/unittest/sd.h
new file mode 100644 (file)
index 0000000..c92e0f7
--- /dev/null
@@ -0,0 +1,33 @@
+/*--------------------------------------------------------------------------*\
+
+       FILE........: sd.h
+       AUTHOR......: David Rowe
+       DATE CREATED: 22/7/93
+
+       Function to determine spectral distortion between two sets of LPCs.
+
+\*--------------------------------------------------------------------------*/
+
+/*
+  Copyright (C) 2009 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __SD__
+#define __SD__
+
+float spectral_dist(float ak1[], float ak2[], int p, int n);
+
+#endif /* __SD__  */
index 33806fc7d3cced300b0fb77989cdc6472fb4f282..8624ce8af70a3ddb1fdce0f781da4ebc783b3fd5 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <assert.h>
 #include <string.h>
 #include <math.h>
 #include "defines.h"
+#include "comp.h"
 #include "codec2.h"
 #include "quantise.h"
 #include "interp.h"
 
 /* CODEC2 struct copies from codec2.c to help with testing */
 
-typedef struct {
-    float  Sn[M];        /* input speech                              */
-    float  w[M];        /* time domain hamming window                */
-    COMP   W[FFT_ENC];  /* DFT of w[]                                */
-    float  Pn[2*N];     /* trapezoidal synthesis window              */
-    float  Sn_[2*N];    /* synthesised speech                        */
-    float  prev_Wo;      /* previous frame's pitch estimate           */
-    float  ex_phase;     /* excitation model phase track              */
-    float  bg_est;       /* background noise estimate for post filter */
-    MODEL  prev_model;   /* model parameters from 20ms ago            */
-} CODEC2;
-
-void analyse_one_frame(CODEC2 *c2, MODEL *model, short speech[]);
-void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model, float ak[]);
+struct CODEC2 {
+    int    mode;
+    float  w[M];               /* time domain hamming window                */
+    COMP   W[FFT_ENC];         /* DFT of w[]                                */
+    float  Pn[2*N];            /* trapezoidal synthesis window              */
+    float  Sn[M];               /* input speech                              */
+    float  hpf_states[2];       /* high pass filter states                   */
+    void  *nlp;                 /* pitch predictor states                    */
+    float  Sn_[2*N];           /* synthesised output speech                 */
+    float  ex_phase;            /* excitation model phase track              */
+    float  bg_est;              /* background noise estimate for post filter */
+    float  prev_Wo;             /* previous frame's pitch estimate           */
+    MODEL  prev_model;          /* previous frame's model parameters         */
+    float  prev_lsps_[LPC_ORD]; /* previous frame's LSPs                     */
+    float  prev_energy;         /* previous frame's LPC energy               */
+};
+
+void analyse_one_frame(struct CODEC2 *c2, MODEL *model, short speech[]);
+void synthesise_one_frame(struct CODEC2 *c2, short speech[], MODEL *model, float ak[]);
 
 int test1()
 {
     FILE   *fin, *fout;
     short   buf[N];
-    void   *c2;
-    CODEC2 *c3;
+    struct CODEC2 *c2;
     MODEL   model;
     float   ak[LPC_ORD+1];
     float   lsps[LPC_ORD];
 
-    c2 = codec2_create();
-    c3 = (CODEC2*)c2;
+    c2 = codec2_create(CODEC2_MODE_2400);
 
     fin = fopen("../raw/hts1a.raw", "rb");
     assert(fin != NULL);
@@ -72,9 +75,9 @@ int test1()
     assert(fout != NULL);
 
     while(fread(buf, sizeof(short), N, fin) == N) {
-       analyse_one_frame(c3, &model, buf);
-       speech_to_uq_lsps(lsps, ak, c3->Sn, c3->w, LPC_ORD);
-       synthesise_one_frame(c3, buf, &model, ak);
+       analyse_one_frame(c2, &model, buf);
+       speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+       synthesise_one_frame(c2, buf, &model, ak);
        fwrite(buf, sizeof(short), N, fout);
     }
 
@@ -90,22 +93,22 @@ int test2()
 {
     FILE   *fin, *fout;
     short   buf[2*N];
-    void   *c2;
-    CODEC2 *c3;
+    struct  CODEC2 *c2;
     MODEL   model, model_interp;
     float   ak[LPC_ORD+1];
     int     voiced1, voiced2;
     int     lsp_indexes[LPC_ORD];
-    int     lpc_correction;
     int     energy_index;
     int     Wo_index;
-    char    bits[CODEC2_BITS_PER_FRAME];
+    char    *bits;
     int     nbit;
     int     i;
-
-    c2 = codec2_create();
-    c3 = (CODEC2*)c2;
-
+    float   lsps[LPC_ORD];
+    float   e;
+       
+    c2 = codec2_create(CODEC2_MODE_2400);
+    bits = (char*)malloc(codec2_bits_per_frame(c2));
+    assert(bits != NULL);
     fin = fopen("../raw/hts1a.raw", "rb");
     assert(fin != NULL);
     fout = fopen("hts1a_test.raw", "wb");
@@ -114,60 +117,57 @@ int test2()
     while(fread(buf, sizeof(short), 2*N, fin) == 2*N) {
        /* first 10ms analysis frame - we just want voicing */
 
-       analyse_one_frame(c3, &model, buf);
+       analyse_one_frame(c2, &model, buf);
        voiced1 = model.voiced;
 
        /* second 10ms analysis frame */
 
-       analyse_one_frame(c3, &model, &buf[N]);
+       analyse_one_frame(c2, &model, &buf[N]);
        voiced2 = model.voiced;
     
        Wo_index = encode_Wo(model.Wo);
-       encode_amplitudes(lsp_indexes, 
-                         &lpc_correction, 
-                         &energy_index,
-                         &model, 
-                         c3->Sn, 
-                         c3->w);   
+       e = speech_to_uq_lsps(lsps, ak, c2->Sn, c2->w, LPC_ORD);
+       encode_lsps_scalar(lsp_indexes, lsps, LPC_ORD);
+       energy_index = encode_energy(e);
        nbit = 0;
-       pack(bits, &nbit, Wo_index, WO_BITS);
+       pack((unsigned char*)bits, (unsigned *)&nbit, Wo_index, WO_BITS);
        for(i=0; i<LPC_ORD; i++) {
-           pack(bits, &nbit, lsp_indexes[i], lsp_bits(i));
+           pack((unsigned char*)bits, (unsigned *)&nbit, lsp_indexes[i], lsp_bits(i));
        }
-       pack(bits, &nbit, lpc_correction, 1);
-       pack(bits, &nbit, energy_index, E_BITS);
-       pack(bits, &nbit, voiced1, 1);
-       pack(bits, &nbit, voiced2, 1);
+       pack((unsigned char*)bits, (unsigned *)&nbit, energy_index, E_BITS);
+       pack((unsigned char*)bits, (unsigned *)&nbit, voiced1, 1);
+       pack((unsigned char*)bits, (unsigned *)&nbit, voiced2, 1);
  
        nbit = 0;
-       Wo_index = unpack(bits, &nbit, WO_BITS);
+       Wo_index = unpack((unsigned char*)bits, (unsigned *)&nbit, WO_BITS);
        for(i=0; i<LPC_ORD; i++) {
-           lsp_indexes[i] = unpack(bits, &nbit, lsp_bits(i));
+           lsp_indexes[i] = unpack((unsigned char*)bits, (unsigned *)&nbit, lsp_bits(i));
        }
-       lpc_correction = unpack(bits, &nbit, 1);
-       energy_index = unpack(bits, &nbit, E_BITS);
-       voiced1 = unpack(bits, &nbit, 1);
-       voiced2 = unpack(bits, &nbit, 1);
+       energy_index = unpack((unsigned char*)bits, (unsigned *)&nbit, E_BITS);
+       voiced1 = unpack((unsigned char*)bits, (unsigned *)&nbit, 1);
+       voiced2 = unpack((unsigned char*)bits, (unsigned *)&nbit, 1);
 
        model.Wo = decode_Wo(Wo_index);
        model.L = PI/model.Wo;
        decode_amplitudes(&model, 
                          ak,
                          lsp_indexes,
-                         lpc_correction, 
-                         energy_index);
+                         energy_index,
+                         lsps,
+                         &e);
 
        model.voiced = voiced2;
        model_interp.voiced = voiced1;
-       interpolate(&model_interp, &c3->prev_model, &model);
+       interpolate(&model_interp, &c2->prev_model, &model);
 
-       synthesise_one_frame(c3,  buf,     &model_interp, ak);
-       synthesise_one_frame(c3, &buf[N],  &model, ak);
+       synthesise_one_frame(c2,  buf,     &model_interp, ak);
+       synthesise_one_frame(c2, &buf[N],  &model, ak);
 
-       memcpy(&c3->prev_model, &model, sizeof(MODEL));
+       memcpy(&c2->prev_model, &model, sizeof(MODEL));
        fwrite(buf, sizeof(short), 2*N, fout);
     }
 
+    free(bits);
     codec2_destroy(c2);
 
     fclose(fin);
@@ -181,10 +181,14 @@ int test3()
     FILE   *fin, *fout, *fbits;
     short   buf1[2*N];
     short   buf2[2*N];
-    char    bits[CODEC2_BITS_PER_FRAME];
-    void   *c2;
+    char   *bits;
+    struct CODEC2 *c2;
+
+    c2 = codec2_create(CODEC2_MODE_2400);
+    int numBits  = codec2_bits_per_frame(c2);
+    int numBytes = (numBits+7)>>3;
 
-    c2 = codec2_create();
+    bits = (char*)malloc(numBytes);
 
     fin = fopen("../raw/hts1a.raw", "rb");
     assert(fin != NULL);
@@ -194,12 +198,13 @@ int test3()
     assert(fout != NULL);
 
     while(fread(buf1, sizeof(short), 2*N, fin) == 2*N) {
-       codec2_encode(c2, bits, buf1);
-       fwrite(bits, sizeof(char), CODEC2_BITS_PER_FRAME, fbits);
-       codec2_decode(c2, buf2, bits);
-       fwrite(buf2, sizeof(short), CODEC2_SAMPLES_PER_FRAME, fout);
+       codec2_encode(c2, (void*)bits, buf1);
+       fwrite(bits, sizeof(char), numBytes, fbits);
+       codec2_decode(c2, buf2, (void*)bits);
+       fwrite(buf2, sizeof(short), numBytes, fout);
     }
 
+    free(bits);
     codec2_destroy(c2);
 
     fclose(fin);
index ee2f662a48c3a987f222e873168c31cad3d5e6b5..6761bac8d095daa2aa1eeb04688acea84801b87d 100644 (file)
@@ -24,8 +24,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #define N  80          /* frame size          */
@@ -103,8 +102,8 @@ char *argv[];
     float f0;
 
     if (argc < 3) {
-       printf("\nusage: tcontphase OutputRawSpeechFile F0\n");
-        exit(0);
+       printf("\nusage: %s OutputRawSpeechFile F0\n", argv[0]);
+        exit(1);
     }
 
     /* Output file */
index 7bb37c5258900edafcb880b8796c7f8d383cbd6a..8520c832b222e1bc2fb83306ea42a8405ed90a13 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <assert.h>
@@ -32,6 +31,9 @@
 #include <string.h>
 #include <math.h>
 #include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "defines.h"
 #include "sine.h"
@@ -60,13 +62,14 @@ void write_amp(char file[], MODEL *model)
     fclose(f);
 }
 
-char *get_next_float(char *s, float *num)
+const char *get_next_float(const char *s, float *num)
 {
-    char *p = s;
+    const char *p = s;
     char  tmp[MAX_STR];
 
     while(*p && !isspace(*p)) 
        p++;
+    assert((p-s) < (int)(sizeof(tmp)-1));
     memcpy(tmp, s, p-s);
     tmp[p-s] = 0;
     *num = atof(tmp);
@@ -74,13 +77,14 @@ char *get_next_float(char *s, float *num)
     return p+1;
 }
 
-char *get_next_int(char *s, int *num)
+const char *get_next_int(const char *s, int *num)
 {
-    char *p = s;
+    const char *p = s;
     char  tmp[MAX_STR];
 
     while(*p && !isspace(*p)) 
        p++;
+    assert((p-s) < (int)(sizeof(tmp)-1));
     memcpy(tmp, s, p-s);
     tmp[p-s] = 0;
     *num = atoi(tmp);
@@ -88,18 +92,20 @@ char *get_next_int(char *s, int *num)
     return p+1;
 }
 
-void load_amp(MODEL *model, char file[], int frame)
+void load_amp(MODEL *model, const char * file, int frame)
 {
     FILE *f;
     int   i;
     char  s[1024];
-    char *ps;
+    const char *ps;
 
     f = fopen(file,"rt");
+    assert(f);
 
     for(i=0; i<frame; i++)
-       fgets(s, 1023, f);
+       ps = fgets(s, 1023, f);
 
+    /// can frame ever be 0? what if fgets fails?
     ps = s;
     ps = get_next_float(ps, &model->Wo);
     ps = get_next_int(ps, &model->L);
@@ -109,13 +115,30 @@ void load_amp(MODEL *model, char file[], int frame)
     fclose(f);
 }
 
+void load_or_make_amp(MODEL *model, 
+                      const char * filename, int frame,
+                      float f0, float cdB, float mdBHz)
+{
+    struct stat buf;
+    int rc = stat(filename, &buf);
+    if (rc || !S_ISREG(buf.st_mode) || ((buf.st_mode & S_IRUSR) != S_IRUSR))
+    {
+        make_amp(model, f0, cdB, mdBHz);
+    }
+    else
+    {
+        load_amp(model, filename, frame);
+    }
+}
 int main() {
     MODEL  prev, next, interp;
 
-    //make_amp(&prev, 50.0, 60.0, 6E-3);
-    //make_amp(&next, 50.0, 40.0, 6E-3);
-    load_amp(&prev, "../src/hts1a_model.txt", 32);
-    load_amp(&next, "../src/hts1a_model.txt", 34);
+    load_or_make_amp(&prev,
+                     "../src/hts1a_model.txt", 32,
+                     50.0, 60.0, 6E-3);
+    load_or_make_amp(&next,
+                     "../src/hts1a_model.txt", 34,
+                     50.0, 40.0, 6E-3);
 
     interp.voiced = 1;
     interpolate(&interp, &prev, &next);
index 4abf69c4efa3c3a288be41200e982c4a01037d38..d6a873592962f98008d616adf2ad75725be66e77 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #define N 80           /* frame size */
@@ -41,6 +40,7 @@
 #include "dump.h"
 #include "sine.h"
 #include "nlp.h"
+#include "kiss_fft.h"
 
 int   frames;
 
@@ -81,19 +81,22 @@ char *argv[];
     FILE *fin,*fout;
     short buf[N];
     float Sn[M];               /* float input speech samples */
+    kiss_fft_cfg  fft_fwd_cfg;
     COMP  Sw[FFT_ENC];         /* DFT of Sn[] */
     float w[M];                        /* time domain hamming window */
     COMP  W[FFT_ENC];          /* DFT of w[] */
     float pitch;
     int   i; 
-    int   dump;
     float prev_Wo;
     void  *nlp_states;
+#ifdef DUMP
+    int   dump;
+#endif
 
     if (argc < 3) {
        printf("\nusage: tnlp InputRawSpeechFile OutputPitchTextFile "
               "[--dump DumpFile]\n");
-        exit(0);
+        exit(1);
     }
 
     /* Input file */
@@ -110,12 +113,18 @@ char *argv[];
       exit(1);
     }
 
+#ifdef DUMP
     dump = switch_present("--dump",argc,argv);
     if (dump) 
       dump_on(argv[dump+1]);
+#else
+/// TODO
+/// #warning "Compile with -DDUMP if you expect to dump anything."
+#endif
 
     nlp_states = nlp_create();
-    make_analysis_window(w,W);
+    fft_fwd_cfg = kiss_fft_alloc(FFT_ENC, 0, NULL, NULL);
+    make_analysis_window(fft_fwd_cfg, w, W);
 
     frames = 0;
     prev_Wo = 0;
@@ -128,10 +137,12 @@ char *argv[];
         Sn[i] = Sn[i+N];
       for(i=0; i<N; i++)
         Sn[i+M-N] = buf[i];
-      dft_speech(Sw, Sn, w);
+      dft_speech(fft_fwd_cfg, Sw, Sn, w);
+#ifdef DUMP
       dump_Sn(Sn); dump_Sw(Sw); 
+#endif
 
-      nlp(nlp_states,Sn,N,M,PITCH_MIN,PITCH_MAX,&pitch,Sw,&prev_Wo);
+      nlp(nlp_states,Sn,N,M,PITCH_MIN,PITCH_MAX,&pitch,Sw,W, &prev_Wo);
       prev_Wo = TWO_PI/pitch;
 
       fprintf(fout,"%f\n",pitch);
@@ -139,7 +150,9 @@ char *argv[];
 
     fclose(fin);
     fclose(fout);
+#ifdef DUMP
     if (dump) dump_off();
+#endif
     nlp_destroy(nlp_states);
 
     return 0;
index 1ff75641456b1fca008994215bb972558a8fa733..6ad271d8d4c100e3faf15bca1ca6cb891c9fb684 100644 (file)
@@ -22,8 +22,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.  
 */
 
 #include <assert.h>
@@ -123,8 +122,8 @@ int test_lsp(int lsp_number, int levels, float max_error_hz) {
 
     for(i=0; i<levels; i++) {
        indexes_in[lsp_number] = i;
-       decode_lsps(lsp, indexes_in, LPC_ORD);
-       encode_lsps(indexes_out, lsp,LPC_ORD);
+       decode_lsps_scalar(lsp, indexes_in, LPC_ORD);
+       encode_lsps_scalar(indexes_out, lsp,LPC_ORD);
        if (indexes_in[lsp_number] != indexes_out[lsp_number]) {
            printf("freq: %f index_in: %d index_out: %d\n", 
                   lsp[lsp_number]+1, indexes_in[lsp_number],
@@ -136,18 +135,18 @@ int test_lsp(int lsp_number, int levels, float max_error_hz) {
     for(i=0; i<LPC_ORD; i++)
        indexes[i] = 0;
     indexes[lsp_number] = 0;
-    decode_lsps(lsp, indexes, LPC_ORD);
+    decode_lsps_scalar(lsp, indexes, LPC_ORD);
     lowf = lsp[lsp_number];
     indexes[lsp_number] = levels - 1;
-    decode_lsps(lsp, indexes, LPC_ORD);
+    decode_lsps_scalar(lsp, indexes, LPC_ORD);
     highf = lsp[lsp_number];
     sprintf(s,"lsp%d_err.txt", lsp_number+1);
     flsp = fopen(s, "wt");
 
     for(f=lowf; f<highf; f +=(highf-lowf)/1000.0) {
        lsp[lsp_number] = f;
-       encode_lsps(indexes, lsp, LPC_ORD);
-       decode_lsps(lsp, indexes, LPC_ORD);
+       encode_lsps_scalar(indexes, lsp, LPC_ORD);
+       decode_lsps_scalar(lsp, indexes, LPC_ORD);
        error = f - lsp[lsp_number];
        fprintf(flsp, "%f\n", error);
        if (fabs(error) > max_error_rads) {
index b46d4fcf303e3cd5d2de92725e038e22a1a33038..86966d544bc1a24e494fbc1daeb8903f1c7c7dbb 100644 (file)
@@ -23,8 +23,7 @@
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
 /*-----------------------------------------------------------------------*\
@@ -38,6 +37,7 @@
 #include <string.h>
 #include <math.h>
 #include <ctype.h>
+#include <assert.h>
 
 /*-----------------------------------------------------------------------*\
 
@@ -59,7 +59,7 @@ void acc(float v1[], float v2[], int k);
 void norm(float v[], int k, long n);
 long quantise(float cb[], float vec[], int k, int m, float *se);
 
-/*-----------------------------------------------------------------------*\
+/*-----------------------------------------------------------------------* \
 
                                MAIN
 
@@ -79,12 +79,13 @@ int main(int argc, char *argv[]) {
     float  delta;      /* improvement in distortion                    */
     FILE   *ftrain;    /* file containing training set                 */
     FILE   *fvq;       /* file containing vector quantiser             */
+    int     ret;
 
     /* Interpret command line arguments */
 
     if (argc != 5)     {
-       printf("usage: vqtrain TrainFile K M VQFile\n");
-       exit(0);
+       printf("usage: %s TrainFile K(dimension) M(codebook size) VQFile\n", argv[0]);
+       exit(1);
     }
 
     /* Open training file */
@@ -99,7 +100,7 @@ int main(int argc, char *argv[]) {
 
     k = atol(argv[2]);
     m = atol(argv[3]);
-    printf("dimension K=%ld  number of entries M=%ld\n", k,m);
+    printf("dimension K=%ld  number of entries M=%ld\n", k, m);
     vec = (float*)malloc(sizeof(float)*k);
     cb = (float*)malloc(sizeof(float)*k*m);
     cent = (float*)malloc(sizeof(float)*k*m);
@@ -112,14 +113,14 @@ int main(int argc, char *argv[]) {
     /* determine size of training set */
 
     J = 0;
-    while(fread(vec, sizeof(float), k, ftrain) == k)
+    while(fread(vec, sizeof(float), k, ftrain) == (size_t)k)
     J++;
     printf("J=%ld entries in training set\n", J);
 
     /* set up initial codebook state from samples of training set */
 
     rewind(ftrain);
-    fread(cb, sizeof(float), k*m, ftrain);
+    ret = fread(cb, sizeof(float), k*m, ftrain);
 
     /* main loop */
 
@@ -140,7 +141,7 @@ int main(int argc, char *argv[]) {
        se = 0.0;
        rewind(ftrain);
        for(i=0; i<J; i++) {
-           fread(vec, sizeof(float), k, ftrain);
+           ret = fread(vec, sizeof(float), k, ftrain);
            ind = quantise(cb, vec, k, m, &se);
            n[ind]++;
            acc(&cent[ind*k], vec, k);
@@ -151,7 +152,7 @@ int main(int argc, char *argv[]) {
        printf("\r  Iteration %ld, Dn = %f, Delta = %e\n", j, Dn, delta);
        j++;
 
-       /* determine new codebook from centriods */
+       /* determine new codebook from centroids */
 
        if (delta > DELTAQ)
            for(i=0; i<m; i++) {
@@ -171,6 +172,7 @@ int main(int argc, char *argv[]) {
        exit(1);
     }
 
+    fprintf(fvq,"%ld %ld\n",k,m);
     for(j=0; j<m; j++) {
        for(i=0; i<k; i++)
            fprintf(fvq,"%f  ",cb[j*k+i]);
@@ -277,13 +279,16 @@ long quantise(float cb[], float vec[], int k, int m, float *se)
    float   beste;      /* best error so far            */
    long           j;
    int     i;
+   float   diff;
 
    besti = 0;
    beste = 1E32;
    for(j=0; j<m; j++) {
        e = 0.0;
-       for(i=0; i<k; i++)
-           e += pow(cb[j*k+i]-vec[i],2.0);
+       for(i=0; i<k; i++) {
+           diff = cb[j*k+i]-vec[i];
+           e += pow(diff,2.0);
+       }
        if (e < beste) {
            beste = e;
            besti = j;
index fefe80463f3f71d8b09aacd41d9d6c93cdc9649a..6d9d15d78aebdc61475a02b1456d1c455696370b 100644 (file)
@@ -36,6 +36,8 @@
 #define CODEC2_DEBUG
 */
 
+#define CODEC2_SAMPLES_PER_FRAME 160
+
 #ifdef CODEC2_DEBUG
 #define codec2_assert(_x) switch_assert(_x)
 #else
@@ -80,11 +82,11 @@ static switch_status_t switch_codec2_init(switch_codec_t *codec, switch_codec_fl
        }
        
        if (encoding) {
-               context->encoder = codec2_create();             
+               context->encoder = codec2_create(CODEC2_MODE_2400);             
        }
        
        if (decoding) {
-               context->decoder = codec2_create();
+               context->decoder = codec2_create(CODEC2_MODE_2400);
        }
 
        codec->private_info = context;