libs/lua-*/
+libs/g722_1-*/
EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skel", "src\mod\applications\mod_skel\mod_skel.2015.vcxproj", "{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}"\r
EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skypopen", "src\mod\endpoints\mod_skypopen\mod_skypopen.2015.vcxproj", "{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"\r
+EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Download 32khz music.2015.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"\r
EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 8khz music", "libs\win32\Download 8khz music.2015.vcxproj", "{4F5C9D55-98EF-4256-8311-32D7BD360406}"\r
EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download lua", "libs\win32\Download lua.2015.vcxproj", "{45CD36EE-0AF3-4387-8790-4F11E928299D}"\r
EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download g722_1", "libs\win32\Download g722_1.2015.vcxproj", "{36603FE1-253F-4C2C-AAB6-12927A626135}"\r
+EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
All|Win32 = All|Win32\r
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Debug|x64.ActiveCfg = Debug|x64\r
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|Win32.ActiveCfg = Release|Win32\r
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|x64.ActiveCfg = Release|x64\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.ActiveCfg = Release|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.Build.0 = Release|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|x64.ActiveCfg = Release|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|x64.ActiveCfg = Debug|x64\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|x64.Build.0 = Debug|x64\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|Win32.ActiveCfg = Release|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|Win32.Build.0 = Release|Win32\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|x64.ActiveCfg = Release|x64\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|x64.Build.0 = Release|x64\r
{1F0A8A77-E661-418F-BB92-82172AE43803}.All|Win32.ActiveCfg = Release|Win32\r
{1F0A8A77-E661-418F-BB92-82172AE43803}.All|x64.ActiveCfg = Release|Win32\r
{1F0A8A77-E661-418F-BB92-82172AE43803}.Debug|Win32.ActiveCfg = Debug|Win32\r
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|Win32.Build.0 = Release|Win32\r
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|x64.ActiveCfg = Release|Win32\r
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|x64.Build.0 = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.All|Win32.ActiveCfg = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.All|Win32.Build.0 = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.All|x64.ActiveCfg = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.All|x64.Build.0 = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|Win32.Build.0 = Debug|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|x64.ActiveCfg = Debug|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|x64.Build.0 = Debug|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Release|Win32.ActiveCfg = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Release|Win32.Build.0 = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Release|x64.ActiveCfg = Release|Win32\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135}.Release|x64.Build.0 = Release|Win32\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}\r
+ {C6E78A4C-DB1E-47F4-9B63-4DC27D86343F} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}\r
{1F0A8A77-E661-418F-BB92-82172AE43803} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
{4F5C9D55-98EF-4256-8311-32D7BD360406} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
{E10571C4-E7F4-4608-B5F2-B22E7EB95400} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}\r
{4F990563-6DFB-45C3-B083-1938C6D7FFA4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
{45CD36EE-0AF3-4387-8790-4F11E928299D} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
+ {36603FE1-253F-4C2C-AAB6-12927A626135} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
EndGlobalSection\r
EndGlobal\r
+++ /dev/null
-Mon Jun 8 12:13:41 EDT 2009
+++ /dev/null
-Adapted by Steve Underwood <steveu@coppice.org> from the source code
-supplied by Polycom in ITU specification G.722.1.
+++ /dev/null
-The 7kHz and 14kHz bandwidth (16k samples/second and 32k samples/second) codecs defined
-in G.722.1 require the licencing of patents from Polycom, in most countries. However, a royalty
-free licence is available from Polycom if certain fairly basic conditions are met. Please contact
-Polycom for their current licence conditions.
-
-For details of the precise license conditions for the original source code, please consult
-Polycom. Polycom permit licenced users of G.722.1 to base their implementations on the
-reference code, so any valid licencee is permitted to use this library.
-
-No additional license conditions are claimed over this implementation.
+++ /dev/null
-20.09.14 - 0.0.1 - Steve Underwood <steveu@coppice.org>
- - The first version.
-
+++ /dev/null
-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, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
- 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 at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
- The file `configure.ac' 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. You can give `configure'
-initial values for variables by setting them in the environment. Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-
-Or on systems that have the `env' program, you can do it like this:
- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-
-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 supports 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' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' 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' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on. Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
- CPU-COMPANY-SYSTEM
-
-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 host type.
-
- If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-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.
-
-Operation Controls
-==================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
- Use and save the results of the tests in FILE instead of
- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
- debugging `configure'.
-
-`--help'
- Print a summary of the options to `configure', and exit.
-
-`--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.
-
-`--version'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the Lesser GNU 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, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
-AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
-
-noinst_SCRIPTS = g722_1.spec
-
-MAINTAINERCLEANFILES = Makefile.in
-
-EXTRA_DIST = autogen.sh \
- g722_1.pc \
- g722_1.spec \
- unpack_g722_1_data.sh \
- wrapper.xsl \
- doc/libg722_1-doxygen \
- debian/changelog \
- debian/compat \
- debian/control \
- debian/copyright \
- debian/libg722_11.install \
- debian/libg722_1-dev.install \
- debian/libg722_1-doc.install \
- debian/rules \
- debian/watch
-
-if COND_DOC
- MAYBE_DOC=doc
-endif
-if COND_TESTS
- MAYBE_TESTS=tests
-endif
-SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS)
-
-DIST_SUBDIRS = src doc tests test-data
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = g722_1.pc
-
-faq: faq.xml
- cd faq ; xsltproc ../wrapper.xsl ../faq.xml
-
-rpm: rpm-build
-
-rpm-build:
- $(MAKE) -$(MAKEFLAGS) bump.rpm.release
- $(MAKE) -$(MAKEFLAGS) dist
- rm -rf rpm/BUILD/*
- rm -f rpm/RPMS/*/*
- rm -f rpm/SOURCES/*
- rm -f rpm/SPECS/*
- rm -f rpm/SRPMS/*
- rpm -ta --sign @PACKAGE@-@VERSION@.tar.gz
-
-bump.rpm.release: g722_1.spec
- VERSION="x"; \
- test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
- NEXT_RELEASE=0; \
- test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
- RELEASE=`expr $$NEXT_RELEASE + 1`; \
- echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
- echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
- sed 's/^Release: .*/Release: '$$RELEASE'/' \
- <g722_1.spec >g722_1.spec.new; \
- mv g722_1.spec.new g722_1.spec
+++ /dev/null
-No news is good news!
\ No newline at end of file
+++ /dev/null
-libg722_1 0.0.1 - The ITU G.722.1 and G.722.1 Annex codecs, also known
-as Siren 7 and Siren 14.
-----------------------------------------------------------------------
-
-The ITU G.722.1 specification, and its Annexes, define audio codecs targetted
-for wideband speech applications. The variants in G.722.1 support 7kHz and
-14kHz bandwidth (16k samples/second and 32k samples/second) audio. They also
-cover fixed point and floating point realisations of these codecs.
-
-PLEASE NOTE that patented techniques are used in G.722.1, and Polycom is the
-owner of the relevant patents. However, Polycom offers royalty free licences
-to use G.722.1 to anyone who complies with a few simple rules. Just contact them,
-and you should have no problem using G.722.1 without any payment at all (at least
-it was very straightforward for the initial user of this code). You should
-check for any licence conflicts with other code in your application - for example,
-use in a GPL'ed project might be problematic, unless you run the G.722.1 codec as
-a separate process, and your application communicates with it through pipes or
-sockets.
-
-This implementation of G.722.1 is adapted from the reference source code
-provided by Polycom. Polycom has given its consent for this library to be
-distributed as source code, either on its own or as part of a larger package
-which they have licenced under their royalty free licencing scheme.
-
-This library has been modified to provide a cleaner API than the reference code,
-and to permit many instances of the codec to be run in parallel within a single
-process. It uses either fixed point or floating point processing, depending on
-how the package is configured. No serious optimisation has been performed to
-date. This especially affects the fixed point version of the codec, which uses
-some slow and clumsy ways to achieve a bit exact result. Optimisation is planned.
-
-The fixed point version of the codec passes the ITU test vectors. The floating
-point version produces results which vary a little with the compiler and compiler
-optimisation level chosen. This is normal variability for a codec of this type. On
-the development machine disabling the "-O2" and "-ffast-math" optimisations
-for the floating point version results in an exact match with the ITU test vectors.
-
-By default, ./configure will configure the codec to used floating point
-processing for processors with fast floating point hardware, or fixed point
-processing for a selection of well know fixed point DSPs and embedded processors.
-The command line option "--enable-fixed-point" will force ./configure to enable
-fixed point processing.
-
-To test the codec with the ITU test vectors, get the ITU package
-T-REC-G.722.1-200505-I!!SOFT-ZST-E.zip and place it in top level directory
-for this project. Then run unpack_g722_1_data.sh . This should uppack the
-test vectors into test-data/itu/g722_1. Run configure with the "--enable-tests"
-option, and build the software. Then run regression_tests.sh in the tests
-directory.
-
-Steve Underwood <steveu@coppice.org>
+++ /dev/null
-#!/usr/bin/env sh
-#
-# g722_1 - a library for the ITU G.722.1 and Annex C codecs
-#
-# autogen script
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU 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 General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-if [ "x$UNAME" = "xFreeBSD" ]; then
- echo ""
- echo ""
- echo "******************************************"
- echo "*** NOTICE ***"
- echo "******************************************"
- echo " "
- echo "FreeBSD is buggy. Please use this "
- echo "workaround if you want to bootstrap "
- echo "on FreeBSD. "
- echo " "
- echo "cd /usr/local/share/aclocal19 "
- echo "ln -s ../aclocal/libtool15.m4 . "
- echo "ln -s ../aclocal/ltdl15.m4 . "
- echo " "
- echo "******************************************"
- echo ""
-fi
-
-debug ()
-{
- # Outputs debug statments if DEBUG var is set
- if [ ! -z "$DEBUG" ]; then
- echo "DEBUG: $1"
- fi
-}
-
-version_compare()
-{
- # Checks a command is found and the version is high enough
- PROGRAM=$1
- MAJOR=$2
- MINOR=$3
- MICRO=$4
- test -z "$MAJOR" && MAJOR=0
- test -z "$MINOR" && MINOR=0
- test -z "$MICRO" && MICRO=0
-
- debug "Checking $PROGRAM >= $MAJOR.$MINOR.$MICRO"
-
- WHICH_PATH=`whereis which | cut -f2 -d' '`
- COMMAND=`$WHICH_PATH $PROGRAM`
- if [ -z $COMMAND ]; then
- echo "$PROGRAM-$MAJOR.$MINOR.$MICRO is required and was not found."
- return 1
- else
- debug "Found $COMMAND"
- fi
-
- INS_VER=`$COMMAND --version | head -1 | sed 's/[^0-9]*//' | cut -d' ' -f1`
- INS_MAJOR=`echo $INS_VER | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
- INS_MINOR=`echo $INS_VER | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
- INS_MICRO=`echo $INS_VER | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
- test -z "$INS_MAJOR" && INS_MAJOR=0
- test -z "$INS_MINOR" && INS_MINOR=0
- test -z "$INS_MICRO" && INS_MICRO=0
- debug "Installed version: $INS_VER"
-
- if [ "$INS_MAJOR" -gt "$MAJOR" ]; then
- debug "MAJOR: $INS_MAJOR > $MAJOR"
- return 0
- elif [ "$INS_MAJOR" -eq "$MAJOR" ]; then
- debug "MAJOR: $INS_MAJOR = $MAJOR"
- if [ "$INS_MINOR" -gt "$MINOR" ]; then
- debug "MINOR: $INS_MINOR > $MINOR"
- return 0
- elif [ "$INS_MINOR" -eq "$MINOR" ]; then
- if [ "$INS_MICRO" -ge "$MICRO" ]; then
- debug "MICRO: $INS_MICRO >= $MICRO"
- return 0
- else
- debug "MICRO: $INS_MICRO < $MICRO"
- fi
- else
- debug "MINOR: $INS_MINOR < $MINOR"
- fi
- else
- debug "MAJOR: $INS_MAJOR < $MAJOR"
- fi
-
- echo "You have the wrong version of $PROGRAM. The minimum required version is $MAJOR.$MINOR.$MICRO"
- echo " and the version installed is $INS_MAJOR.$INS_MINOR.$INS_MICRO ($COMMAND)."
- return 1
-}
-
-# Check for required version and die if unhappy
-
-if [ "x$UNAME" = "xFreeBSD" ]; then
-version_compare libtoolize 1 5 16 || exit 1
-version_compare automake19 1 9 5 || exit 1
-version_compare autoconf259 2 59 || exit 1
-ACLOCAL=aclocal19
-AUTOHEADER=autoheader259
-AUTOMAKE=automake19
-AUTOCONF=autoconf259
-else
-version_compare libtoolize 1 5 16 || exit 1
-version_compare automake 1 9 5 || exit 1
-version_compare autoconf 2 59 || exit 1
-ACLOCAL=aclocal
-AUTOHEADER=autoheader
-AUTOMAKE=automake
-AUTOCONF=autoconf
-fi
-
-libtoolize --copy --force --ltdl
-#NetBSD seems to need this file writable
-chmod u+w libltdl/configure
-
-$ACLOCAL
-$AUTOHEADER --force
-$AUTOMAKE --copy --add-missing
-$AUTOCONF --force
-
-#chmod ug+x debian/rules
-
-if [ "x$UNAME" = "xNetBSD" ]; then
-echo ""
-echo "Please remember to run gmake instead of make on NetBSD"
-echo ""
-fi
+++ /dev/null
-# @synopsis AX_C99_FLEXIBLE_ARRAY
-#
-# Does the compiler support the 1999 ISO C Standard "struct hack".
-# @version 1.1 Mar 15 2004
-# @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-#
-# Permission to use, copy, modify, distribute, and sell this file for any
-# purpose is hereby granted without fee, provided that the above copyright
-# and this permission notice appear in all copies. No representations are
-# made about the suitability of this software for any purpose. It is
-# provided "as is" without express or implied warranty.
-
-AC_DEFUN([AX_C99_FLEXIBLE_ARRAY],
-[AC_CACHE_CHECK(C99 struct flexible array support,
- ac_cv_c99_flexible_array,
-
-# Initialize to unknown
-ac_cv_c99_flexible_array=no
-
-AC_TRY_LINK([[
- #include <stdlib.h>
-
- typedef struct {
- int k;
- char buffer [] ;
- } MY_STRUCT ;
- ]],
- [ MY_STRUCT *p = calloc (1, sizeof (MY_STRUCT) + 42); ],
- ac_cv_c99_flexible_array=yes,
- ac_cv_c99_flexible_array=no
- ))]
-) # AX_C99_FLEXIBLE_ARRAY
-
-# @synopsis AX_C99_FUNC_LRINT
-#
-# Check whether C99's lrint function is available.
-# @version 1.3 Feb 12 2002
-# @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-#
-# Permission to use, copy, modify, distribute, and sell this file for any
-# purpose is hereby granted without fee, provided that the above copyright
-# and this permission notice appear in all copies. No representations are
-# made about the suitability of this software for any purpose. It is
-# provided "as is" without express or implied warranty.
-#
-AC_DEFUN([AX_C99_FUNC_LRINT],
-[AC_CACHE_CHECK(for lrint,
- ac_cv_c99_lrint,
-[
-lrint_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
-#define __USE_ISOC99 1
-#define __USE_ISOC9X 1
-
-#include <math.h>
-], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
-
-CFLAGS=$lrint_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_lrint" = yes; then
- AC_DEFINE(HAVE_LRINT, 1,
- [Define if you have C99's lrint function.])
-fi
-])# AX_C99_FUNC_LRINT
-
-# @synopsis AX_C99_FUNC_LRINTF
-#
-# Check whether C99's lrintf function is available.
-# @version 1.3 Feb 12 2002
-# @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-#
-# Permission to use, copy, modify, distribute, and sell this file for any
-# purpose is hereby granted without fee, provided that the above copyright
-# and this permission notice appear in all copies. No representations are
-# made about the suitability of this software for any purpose. It is
-# provided "as is" without express or implied warranty.
-#
-AC_DEFUN([AX_C99_FUNC_LRINTF],
-[AC_CACHE_CHECK(for lrintf,
- ac_cv_c99_lrintf,
-[
-lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
-#define __USE_ISOC99 1
-#define __USE_ISOC9X 1
-
-#include <math.h>
-], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
-
-CFLAGS=$lrintf_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_lrintf" = yes; then
- AC_DEFINE(HAVE_LRINTF, 1,
- [Define if you have C99's lrintf function.])
-fi
-])# AX_C99_FUNC_LRINTF
-
-# @synopsis AX_C99_FUNC_LLRINT
-#
-# Check whether C99's llrint function is available.
-# @version 1.1 Sep 30 2002
-# @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-#
-# Permission to use, copy, modify, distribute, and sell this file for any
-# purpose is hereby granted without fee, provided that the above copyright
-# and this permission notice appear in all copies. No representations are
-# made about the suitability of this software for any purpose. It is
-# provided "as is" without express or implied warranty.
-#
-AC_DEFUN([AX_C99_FUNC_LLRINT],
-[AC_CACHE_CHECK(for llrint,
- ac_cv_c99_llrint,
-[
-llrint_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
-#define __USE_ISOC99 1
-#define __USE_ISOC9X 1
-
-#include <math.h>
-], long long int x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
-
-CFLAGS=$llrint_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_llrint" = yes; then
- AC_DEFINE(HAVE_LLRINT, 1,
- [Define if you have C99's llrint function.])
-fi
-])# AX_C99_FUNC_LLRINT
-
-
-# @synopsis AX_C99_FUNC_LLRINTF
-#
-# Check whether C99's llrintf function is available.
-# @version 1.1 Sep 30 2002
-# @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
-#
-# Permission to use, copy, modify, distribute, and sell this file for any
-# purpose is hereby granted without fee, provided that the above copyright
-# and this permission notice appear in all copies. No representations are
-# made about the suitability of this software for any purpose. It is
-# provided "as is" without express or implied warranty.
-#
-AC_DEFUN([AX_C99_FUNC_LLRINTF],
-[AC_CACHE_CHECK(for llrintf,
- ac_cv_c99_llrintf,
-[
-llrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-AC_TRY_LINK([
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
-#define __USE_ISOC99 1
-#define __USE_ISOC9X 1
-
-#include <math.h>
-], long long int x ; x = llrintf(3.14159) ;, ac_cv_c99_llrintf=yes, ac_cv_c99_llrintf=no)
-
-CFLAGS=$llrintf_save_CFLAGS
-
-])
-
-if test "$ac_cv_c99_llrintf" = yes; then
- AC_DEFINE(HAVE_LLRINTF, 1,
- [Define if you have C99's llrintf function.])
-fi
-])# AX_C99_FUNC_LLRINTF
+++ /dev/null
-# AX_CHECK_REAL_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ------------------------------------------------------------------
-#
-# Check for the existence of FILE, and make sure it is a real file or
-# directory, and not a symbolic link.
-#
-AC_DEFUN([AX_CHECK_REAL_FILE],
-[AC_DIAGNOSE([cross],
- [cannot check for file existence when cross compiling])dnl
-AS_VAR_PUSHDEF([ac_RealFile], [ac_cv_real_file_$1])dnl
-AC_CACHE_CHECK([for $1], ac_RealFile,
-[test "$cross_compiling" = yes &&
- AC_MSG_ERROR([cannot check for file existence when cross compiling])
-if test -r "$1"
-then
- if test -h "$1"
- then
- AS_VAR_SET(ac_RealFile, no)
- else
- AS_VAR_SET(ac_RealFile, yes)
- fi
-else
- AS_VAR_SET(ac_RealFile, no)
-fi])
-AS_IF([test AS_VAR_GET(ac_RealFile) = yes], [$2], [$3])[]dnl
-AS_VAR_POPDEF([ac_RealFile])dnl
-])# AX_CHECK_REAL_FILE
+++ /dev/null
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_compiler_vendor.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_COMPILER_VENDOR
-#
-# DESCRIPTION
-#
-# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-# watcom, etc. The vendor is returned in the cache variable
-# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-# Copyright (c) 2008 Matteo Frigo
-#
-# 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.
-#
-# 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/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[
-AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
- # note: don't check for gcc first since some other compilers define __GNUC__
- for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
- vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-#if !($vencpp)
- thisisanerror;
-#endif
-])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
- done
- ])
-])
+++ /dev/null
-# AX_FIXED_POINT_MACHINE(MACHINE, [ACTION-IF-FIXED-POINT], [ACTION-IF-NOT-FIXED-POINT])
-# -------------------------------------------------------------------------------------
-#
-# Check if a specified machine type is a fixed point only machine. That is, if it lacks
-# fast floating point support.
-#
-# This is a simple lookup amongst machines known to the current autotools. So far we deal
-# with the embedded ARM, Blackfin, MIPS, TI DSP and XScale processors as things which lack
-# fast hardware floating point.
-#
-# Other candidates would be the small embedded Power PCs.
-#
-AC_DEFUN([AX_FIXED_POINT_MACHINE],
-[AS_VAR_PUSHDEF([ac_FixedPoint], [ac_cv_fixed_point_machine_$1])dnl
-AC_CACHE_CHECK([if $1 is fixed point only], ac_FixedPoint,
-[case $1 in
- arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] \
- | bfin \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | tic54x | c54x* | tic55x | c55x* | tic6x | c6x* \
- | xscale | xscalee[bl] \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | bfin-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | xscale-* | xscalee[bl]-* )
- AS_VAR_SET(ac_FixedPoint, yes)
- ;;
- *)
- AS_VAR_SET(ac_FixedPoint, no)
- ;;
-esac])
-AS_IF([test AS_VAR_GET(ac_FixedPoint) = yes], [$2], [$3])[]dnl
-AS_VAR_POPDEF([ac_FixedPoint])dnl
-])# AX_FIXED_POINT_MACHINE
+++ /dev/null
-# AX_MISALIGNED_ACCESS_FAILS(MACHINE, [ACTION-IF-MISALIGNED-FAILS], [ACTION-IF-MISALIGNED-OK])
-# -------------------------------------------------------------------------------------
-#
-# Check if a specified machine type cannot handle misaligned data. That is, multi-byte data
-# types which are not properly aligned in memory fail. Many machines are happy to work with
-# misaligned data, but slowing down a bit. Other machines just won't tolerate such data.
-#
-# This is a simple lookup amongst machines known to the current autotools. So far we only deal
-# with the ARM and sparc.
-# A lookup is used, as many of the devices which cannot handled misaligned access are embedded
-# processors, for which the code normally be cross-compiled.
-#
-AC_DEFUN([AX_MISALIGNED_ACCESS_FAILS],
-[AS_VAR_PUSHDEF([ac_MisalignedAccessFails], [ac_cv_misaligned_access_fails_$1])dnl
-AC_CACHE_CHECK([if $1 fails on misaligned memory access], ac_MisalignedAccessFails,
-[case $1 in
- arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] \
- | bfin \
- | sparc \
- | xscale | xscalee[bl] \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | bfin-* \
- | sparc-* \
- | xscale-* | xscalee[bl]-* )
- AS_VAR_SET(ac_MisalignedAccessFails, yes)
- ;;
- *)
- AS_VAR_SET(ac_MisalignedAccessFails, no)
- ;;
-esac])
-AS_IF([test AS_VAR_GET(ac_MisalignedAccessFails) = yes], [$2], [$3])[]dnl
-AS_VAR_POPDEF([ac_MisalignedAccessFails])dnl
-])# MISALIGNED_ACCESS_FAILS
+++ /dev/null
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> $depfile
- echo >> $depfile
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
- if test "$libtool" = yes; then
- "$@" -Wc,-M
- else
- "$@" -M
- fi
- stat=$?
-
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
- fi
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
-
- if test -f "$tmpdepfile"; then
- outname="$stripped.o"
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- "$@" || exit $?
- IFS=" "
- for arg
- do
- case "$arg" in
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
+++ /dev/null
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
-esac
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
- lex|yacc)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case "$firstarg" in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case "$firstarg" in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
+++ /dev/null
-#
-# g722_1 - a library for the G.722_1 codec
-#
-# configure.ac -- Process this file with autoconf to produce configure
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU 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 General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# @start 1
-
-AC_INIT([g722_1], [0.2.0])
-
-m4_include(config/ax_compiler_vendor.m4)
-m4_include(config/ax_check_real_file.m4)
-m4_include(config/ax_fixed_point_machine.m4)
-m4_include(config/ax_misaligned_access_fails.m4)
-m4_include(config/ax_c99_features.m4)
-
-G722_1_MAJOR_VERSION=0
-G722_1_MINOR_VERSION=0
-G722_1_MICRO_VERSION=1
-
-G722_1_LT_CURRENT=0
-G722_1_LT_REVISION=2
-G722_1_LT_AGE=0
-
-VERSION=$G722_1_MAJOR_VERSION.$G722_1_MINOR_VERSION.$G722_1_MICRO_VERSION
-PACKAGE=g722_1
-
-AC_SUBST(G722_1_LT_CURRENT)
-AC_SUBST(G722_1_LT_REVISION)
-AC_SUBST(G722_1_LT_AGE)
-
-AC_CONFIG_SRCDIR([src/encoder.c])
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_HEADERS([src/config.h:config-h.in])
-AM_INIT_AUTOMAKE
-
-AC_CANONICAL_HOST
-#AC_CANONICAL_BUILD
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_GCC_TRADITIONAL
-AC_PROG_LIBTOOL
-AC_LANG([C])
-
-AX_COMPILER_VENDOR
-
-if test "${build}" != "${host}"
-then
- # If we are doing a Canadian Cross, in which the host and build systems
- # are not the same, we set reasonable default values for the tools.
-
- CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
- CPPFLAGS_FOR_BUILD="\$(CPPFLAGS)"
- CC=${CC-${host_alias}-gcc}
- CFLAGS=${CFLAGS-"-g -O2"}
- CXX=${CXX-${host_alias}-c++}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
-else
- # Set reasonable default values for some tools even if not Canadian.
- # Of course, these are different reasonable default values, originally
- # specified directly in the Makefile.
- # We don't export, so that autoconf can do its job.
- # Note that all these settings are above the fragment inclusion point
- # in Makefile.in, so can still be overridden by fragments.
- # This is all going to change when we autoconfiscate...
- CC_FOR_BUILD="\$(CC)"
- CPPFLAGS_FOR_BUILD="\$(CPPFLAGS)"
- AC_PROG_CC
-
- # We must set the default linker to the linker used by gcc for the correct
- # operation of libtool. If LD is not defined and we are using gcc, try to
- # set the LD default to the ld used by gcc.
- if test -z "$LD"
- then
- if test "$GCC" = yes
- then
- case $build in
- *-*-mingw*)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
- *)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
- esac
- case $gcc_prog_ld in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- LD="$gcc_prog_ld" ;;
- esac
- fi
- fi
-
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
-fi
-
-AC_DEFUN([REMOVE_FROM_VAR],[
- new_val=""
- removed=0
- for i in $$1; do
- if test "x$i" != "x$2"; then
- new_val="$new_val $i"
- else
- removed=1
- fi
- done
- if test $removed = "1"; then
- echo " removed \"$2\" from $1"
- $1=$new_val
- fi
-])
-
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-
-AC_CHECK_TYPES(long long)
-AC_CHECK_TYPES(long double)
-
-AC_TYPE_SIGNAL
-
-AC_ARG_ENABLE(doc, [ --enable-doc Build the documentation])
-AC_ARG_ENABLE(tests, [ --enable-tests Build the test programs])
-AC_ARG_ENABLE(mmx, [ --enable-mmx Enable MMX support])
-AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support])
-AC_ARG_ENABLE(sse2, [ --enable-sse2 Enable SSE2 support])
-AC_ARG_ENABLE(sse3, [ --enable-sse3 Enable SSE3 support])
-AC_ARG_ENABLE(sse3, [ --enable-sse3 Enable SSE3 support])
-AC_ARG_ENABLE(sse4_1, [ --enable-sse4-1 Enable SSE4.1 support])
-AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
-AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
-AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
-AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
-
-AC_FUNC_ERROR_AT_LINE
-AC_FUNC_VPRINTF
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_REALLOC
-AC_FUNC_SELECT_ARGTYPES
-
-AX_C99_FUNC_LRINT
-AX_C99_FUNC_LRINTF
-AX_C99_FUNC_LLRINT
-AX_C99_FUNC_LLRINTF
-
-if test "x$ac_cv_c99_lrint" = "xno" ; then
- if test "x$ac_cv_c99_lrintf" = "xno" ; then
- AC_MSG_WARN([[*** Missing C99 standard functions lrint() and lrintf().]])
- AC_MSG_WARN([[*** This may cause benign compiler warnings on some systems (ie Solaris).]])
- fi
-fi
-
-AX_C99_FLEXIBLE_ARRAY
-
-AC_CHECK_FUNCS([memmove])
-AC_CHECK_FUNCS([memset])
-AC_CHECK_FUNCS([select])
-AC_CHECK_FUNCS([strcasecmp])
-AC_CHECK_FUNCS([strchr])
-AC_CHECK_FUNCS([strdup])
-AC_CHECK_FUNCS([strerror])
-AC_CHECK_FUNCS([strstr])
-AC_CHECK_FUNCS([strtol])
-AC_CHECK_FUNCS([gettimeofday])
-
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-
-# Check for header files.
-AC_CHECK_HEADERS([socket.h])
-AC_CHECK_HEADERS([inttypes.h], [INSERT_INTTYPES_HEADER="#include <inttypes.h>"])
-AC_CHECK_HEADERS([stdint.h], [INSERT_STDINT_HEADER="#include <stdint.h>"])
-AC_CHECK_HEADERS([unistd.h])
-AC_CHECK_HEADERS([stdlib.h])
-AC_CHECK_HEADERS([string.h])
-AC_CHECK_HEADERS([strings.h])
-AC_CHECK_HEADERS([malloc.h])
-AC_CHECK_HEADERS([tgmath.h], [INSERT_TGMATH_HEADER="#include <tgmath.h>"])
-AC_CHECK_HEADERS([math.h], [INSERT_MATH_HEADER="#include <math.h>"])
-AC_CHECK_HEADERS([float.h])
-AC_CHECK_HEADERS([fcntl.h])
-AC_CHECK_HEADERS([sys/time.h])
-AC_CHECK_HEADERS([sys/select.h])
-AC_CHECK_HEADERS([sys/ioctl.h])
-AC_CHECK_HEADERS([sys/fcntl.h])
-AC_CHECK_HEADERS([audiofile.h])
-
-AC_LANG([C])
-
-if test "${build}" = "${host}"
-then
- case "${host}" in
- x86_64-*)
- AX_CHECK_REAL_FILE([${prefix}/lib64], libdir='$(exec_prefix)/lib64')
- ;;
- esac
-fi
-
-# Checks for libraries.
-AC_CHECK_LIB([m], [cos])
-# Some platforms still seem to lack the basic single precision trig and power related function.
-AC_SEARCH_LIBS([sinf], [m], AC_DEFINE([HAVE_SINF], [1], [Define to 1 if you have the sinf() function.]))
-AC_SEARCH_LIBS([cosf], [m], AC_DEFINE([HAVE_COSF], [1], [Define to 1 if you have the cosf() function.]))
-AC_SEARCH_LIBS([tanf], [m], AC_DEFINE([HAVE_TANF], [1], [Define to 1 if you have the tanf() function.]))
-AC_SEARCH_LIBS([asinf], [m], AC_DEFINE([HAVE_ASINF], [1], [Define to 1 if you have the asinf() function.]))
-AC_SEARCH_LIBS([acosf], [m], AC_DEFINE([HAVE_ACOSF], [1], [Define to 1 if you have the acosf() function.]))
-AC_SEARCH_LIBS([atanf], [m], AC_DEFINE([HAVE_ATANF], [1], [Define to 1 if you have the atanf() function.]))
-AC_SEARCH_LIBS([atan2f], [m], AC_DEFINE([HAVE_ATAN2F], [1], [Define to 1 if you have the atan2f() function.]))
-AC_SEARCH_LIBS([ceilf], [m], AC_DEFINE([HAVE_CEILF], [1], [Define to 1 if you have the ceilf() function.]))
-AC_SEARCH_LIBS([floorf], [m], AC_DEFINE([HAVE_FLOORF], [1], [Define to 1 if you have the floorf() function.]))
-AC_SEARCH_LIBS([powf], [m], AC_DEFINE([HAVE_POWF], [1], [Define to 1 if you have the powf() function.]))
-AC_SEARCH_LIBS([expf], [m], AC_DEFINE([HAVE_EXPF], [1], [Define to 1 if you have the expf() function.]))
-AC_SEARCH_LIBS([logf], [m], AC_DEFINE([HAVE_LOGF], [1], [Define to 1 if you have the logf() function.]))
-AC_SEARCH_LIBS([log10f], [m], AC_DEFINE([HAVE_LOG10F], [1], [Define to 1 if you have the log10f() function.]))
-if test -n "$enable_tests" ; then
- AC_CHECK_LIB([audiofile], [afOpenFile], TESTLIBS="$TESTLIBS -laudiofile", AC_MSG_ERROR("Can't make tests without libaudiofile (does your system require a libaudiofile-devel package?)"))
-fi
-
-case "${ax_cv_c_compiler_vendor}" in
-gnu)
- COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
- if test "$enable_sse5" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse4a" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse4a $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse4_2" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse42 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse4_1" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse41 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse3" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse3 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse2" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse2 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_mmx" = "yes" ; then
- COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
- fi
- case $host_os in
- mingw* | cygwin*)
- COMP_VENDOR_LDFLAGS="-no-undefined"
- ;;
- *)
- COMP_VENDOR_LDFLAGS=
- ;;
- esac
- ;;
-sun)
- COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara"
- if test "$enable_sse3" = "yes" ; then
- COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse2" = "yes" ; then
- COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse" = "yes" ; then
- COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_mmx" = "yes" ; then
- COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
- fi
- COMP_VENDOR_LDFLAGS=
- REMOVE_FROM_VAR(CFLAGS, -Xc)
- ;;
-*)
- COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
- COMP_VENDOR_LDFLAGS=
- ;;
-esac
-
-COMP_VENDOR_CFLAGS="-DNDEBUG $COMP_VENDOR_CFLAGS"
-
-AM_CONDITIONAL([COND_DOC], [test "$enable_doc" = yes])
-AM_CONDITIONAL([COND_TESTS], [test "$enable_tests" = yes])
-AM_CONDITIONAL([COND_TESTDATA], [test "$enable_test_data" = yes])
-AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
-AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
-AM_CONDITIONAL([COND_SSE2], [test "$enable_sse2" = yes])
-AM_CONDITIONAL([COND_SSE3], [test "$enable_sse3" = yes])
-AM_CONDITIONAL([COND_SSE4_1], [test "$enable_sse4_1" = yes])
-AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
-AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
-AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
-if test "$enable_fixed_point" = "yes" ; then
- AC_DEFINE([G722_1_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
- G722_1_USE_FIXED_POINT="#define G722_1_USE_FIXED_POINT 1"
- G722_1_VECTORS_FOR_TESTS="fixed"
-else
- AX_FIXED_POINT_MACHINE([$host],
- [AC_DEFINE([G722_1_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
- G722_1_USE_FIXED_POINT="#define G722_1_USE_FIXED_POINT 1"],
- [G722_1_USE_FIXED_POINT="#undef G722_1_USE_FIXED_POINT"])
- G722_1_VECTORS_FOR_TESTS="floating"
-fi
-AX_MISALIGNED_ACCESS_FAILS([$host],
- [AC_DEFINE([G722_1_MISALIGNED_ACCESS_FAILS], [1], [Do not expect a misaligned memory access to work correctly])
- G722_1_MISALIGNED_ACCESS_FAILS="#define G722_1_MISALIGNED_ACCESS_FAILS 1"],
- [G722_1_MISALIGNED_ACCESS_FAILS="#undef G722_1_MISALIGNED_ACCESS_FAILS"])
-
-if test "$enable_sse5" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE5], [1], [Use the SSE5 instruction set (i386 and x86_64 only).])
- enable_sse4a="yes"
-fi
-if test "$enable_sse4a" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE4A], [1], [Use the SSE4A instruction set (i386 and x86_64 only).])
- enable_sse4_2="yes"
-fi
-if test "$enable_sse4_2" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
- enable_sse4_1="yes"
-fi
-if test "$enable_sse4_1" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
- enable_sse3="yes"
-fi
-if test "$enable_sse3" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
- enable_sse2="yes"
-fi
-if test "$enable_sse2" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
- enable_sse="yes"
-fi
-if test "$enable_sse" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
- enable_mmx="yes"
-fi
-if test "$enable_mmx" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
-fi
-
-AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(COMP_VENDOR_CFLAGS)
-AC_SUBST(COMP_VENDOR_LDFLAGS)
-AC_SUBST(TESTLIBS)
-AC_SUBST(G722_1_USE_FIXED_POINT)
-AC_SUBST(G722_1_VECTORS_FOR_TESTS)
-AC_SUBST(INSERT_INTTYPES_HEADER)
-AC_SUBST(INSERT_STDINT_HEADER)
-AC_SUBST(INSERT_TGMATH_HEADER)
-AC_SUBST(INSERT_MATH_HEADER)
-
-AC_CONFIG_FILES([Makefile
- doc/Makefile
- test-data/Makefile
- test-data/local/Makefile
- test-data/itu/Makefile
- src/Makefile
- src/g722_1.h
- tests/Makefile
- g722_1.pc
- g722_1.spec])
-
-AC_CONFIG_FILES([tests/regression_tests.sh], [chmod +x tests/regression_tests.sh])
-
-AC_OUTPUT
-
-# @end 1
+++ /dev/null
-#! /bin/sh
-srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --disable-shared --with-pic
-
+++ /dev/null
-g722_1 (0.0.1) unstable; urgency=low
-
- [ Steve Underwood ]
- * Begun
-
- -- Steve Underwood <steveu@coppice.org> Tue, 19 Feb 2008 09:53:06 +0300
+++ /dev/null
-Source: g722_1
-Section: libs
-Priority: optional
-Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
-Uploaders: Jose Carlos Garcia Sogo <jsogo@debian.org>, Kilian Krause <kilian@debian.org>, Santiago Garcia Mantinan <manty@debian.org>, Mark Purcell <msp@debian.org>, Tzafrir Cohen <tzafrir.cohen@xorcom.com>, Santiago Ruano Rincón <santiago@debian.org>
-Build-Depends: debhelper (>= 4.0.0), dpatch, doxygen, autotools-dev
-Standards-Version: 3.7.2
-XS-Vcs-Svn: svn://svn.debian.org/pkg-voip/
-XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/
-
-Package: libg722_1
-Architecture: any
-Depends: ${shlibs:Depends}
-Conflicts: libg722_10, libg722_11, libg722_12
-Description: Telephony signal processing library
- This package contains the g722_1 low bit rate speech codec.
- .
- This package contains the shared library.
-
-Package: libg722_1-dev
-Section: libdevel
-Architecture: any
-Depends: libg722_13 (= ${Source-Version})
-Description: Telephony signal processing library
- This package contains the g722_1 low bit rate speech codec.
- .
- This package contains the static library and development headers.
- .
- Homepage: http://www.soft-switch.org/
-
-Package: libg722_1-doc
-Section: doc
-Architecture: all
-Description: Documentation for the g722_1 signal processing library
- This package contains the g722_1 low bit rate speech codec.
+++ /dev/null
-This package was debianized by Steve Underwood <steveu@coppice.org> on
-Tue, 19 Feb 2008 15:22:58 +0100.
-
-It was downloaded from http://soft-switch.org/downloads/codecs/
-
-Copyright: Various
-
-License:
-
-G.722_1 incorporates patented techniques, but these patents can be licenced
-royalty free from Polycom.
+++ /dev/null
-debian/tmp/usr/include
-debian/tmp/usr/lib/libg722_1.so
-debian/tmp/usr/lib/libg722_1.la
-debian/tmp/usr/lib/libg722_1.a
+++ /dev/null
-doc/api/html usr/share/doc/libg722_1-doc/api/
+++ /dev/null
-debian/tmp/usr/lib/libg722_1.so.0.*
-debian/tmp/usr/lib/libg722_1.so.0
+++ /dev/null
-#!/usr/bin/make -f
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-DEBVERSION:=$(shell head -n 1 debian/changelog \
- | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
-ORIGTARVER:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')# -e 's/.dfsg$$//' -e 's/~//')
-
-UPVERSION:=$(shell echo $(ORIGTARVER) | tr -d '~')
-
-FILENAME := g722_1_$(ORIGTARVER).orig.tar.gz
-FULLNAME := g722_1-$(UPVERSION)
-URL := http://soft-switch.org/downloads/codecs/g722_1-$(UPVERSION).tgz
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-include /usr/share/dpatch/dpatch.make
-
-
-autotools: patch-stamp
- ln -s /usr/share/misc/config.sub config.sub
- ln -s /usr/share/misc/config.guess config.guess
- touch autotools
-
-config.status: autotools configure
- dh_testdir
- CFLAGS="$(CFLAGS)" ./configure \
- --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) \
- --prefix=/usr \
- --mandir=\$${prefix}/share/man \
- --infodir=\$${prefix}/share/info \
- --enable-doc
-
-build: build-stamp
-
-build-stamp: config.status
- dh_testdir
- $(MAKE)
- touch build-stamp
-
-clean: clean-patched unpatch
-clean-patched:
- dh_testdir
- dh_testroot
- rm -f build-stamp autotools
- -$(MAKE) distclean
-
- -$(RM) -f config.sub
- -$(RM) -f config.guess
-
- dh_clean
-
-install: build-stamp
- dh_testdir
- dh_testroot
- dh_clean -k
- $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
-binary-indep: build-stamp install
- dh_testdir -i
- dh_testroot -i
- dh_installchangelogs -i ChangeLog
- dh_installdocs -i DueDiligence
- dh_install -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
-
-binary-arch: build-stamp install
- dh_testdir -a
- dh_testroot -a
- dh_installchangelogs -a ChangeLog
- dh_installdocs -a DueDiligence
- dh_install -a
- dh_strip -a
- dh_compress -a
- dh_fixperms -a
- dh_makeshlibs -a
- dh_installdeb -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
-
-get-orig-source:
- -@@dh_testdir
- @@[ -d ../tarballs/. ]||mkdir -p ../tarballs
- @@echo Downloading $(FILENAME) from $(URL) ...
- @@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install patch unpatch
+++ /dev/null
-# See uscan(1) for format
-
-# Compulsory line, this is a version 3 file
-version=3
-
-# <Webpage URL> <string match>
-http://soft-switch.org/downloads/voipcodecs/ g722_1-(.*)\.tgz debian svn-upgrade
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU 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 General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-MAINTAINERCLEANFILES = Makefile.in
-
-EXTRA_DIST = css.css \
- wrapper.xsl
-
-all: doxydocs
-
-doxydocs:
- doxygen libg722_1-doxygen
+++ /dev/null
-body {
- background-image: url("../images/weave.jpg");
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- color: black;
- margin-right: 20px;
- margin-left: 20px;
-}
-
-h1 {
- text-align: center;
-}
-
-h2 {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- border-color: #c00000;
- color : black;
- margin-top: 0.8em;
- border-style: solid;
- border-width: 0px 0px 3px 0.5em;
- line-height : 130%;
-}
-
-h3 {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- border-color: #f02020;
- color : black;
- border-width: 0px 0px 2px 0.5em;
- border-style: solid;
- margin-right: 20%;
- line-height : 130%;
-}
-caption {
- font-weight: bold
-}
-a.qindex {}
-a.qindexRef {}
-a.el {
- text-decoration: none;
- font-weight: bold
-}
-a.elRef {
- font-weight: bold
-}
-a.code {
- text-decoration: none;
- font-weight: normal;
- color: #4444ee
-}
-a.codeRef {
- font-weight: normal;
- color: #4444ee
-}
-a:hover {
- text-decoration: none;
- background-color: #f2f2ff
-}
-dl.el {
- margin-left: -1cm
-}
-div.fragment {
- width: 100%;
- border: none;
- background-color: #eeeeee
-}
-div.ah {
- background-color: black;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 3px;
- margin-top: 3px
-}
-
-td {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- font-weight: bold;
-}
-
-.navheader {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- background-color: #B2B2ff;
- font-weight: bold;
-}
-
-.navfooter {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- background-color: #B2B2ff;
- font-weight: bold;
-}
-
-table.menu {
- background-color: #000066;
- font-weight: bold;
- text-align: center;
- width: 100%;
-}
-
-tr.menu {
- background-color: #ccffff;
- font-weight: bold;
- text-align: center;
-}
-td.menu {
- background-color: #f2e0d0;
- font-weight: bold;
- text-align: center;
-}
-
-td.md {
- background-color: #f2f2ff;
- font-weight: bold;
-}
-td.mdname1 {
- background-color: #f2f2ff;
- font-weight: bold;
- color: #602020;
-}
-td.mdname {
- background-color: #f2f2ff;
- font-weight: bold;
- color: #602020;
- width: 600px;
-}
-div.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: bold
-}
-div.groupText {
- margin-left: 16px;
- font-style: italic;
- font-size: smaller
-}
-td.indexkey {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- background-color: #eeeeff;
- font-weight: bold;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-td.indexvalue {
- font-family: Verdana, Arial, Helvetica, Sans-serif;
- background-color: #eeeeff;
- font-style: italic;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px
-}
-span.keyword {
- color: #008000
-}
-span.keywordtype {
- color: #604020
-}
-span.keywordflow {
- color: #e08000
-}
-span.comment {
- color: #800000
-}
-span.preprocessor {
- color: #806020
-}
-span.stringliteral {
- color: #002080
-}
-span.charliteral {
- color: #008080
-}
-em {
- color: #990000;
- background-color: transparent;
-}
-h1,h2,h3,h4,h5,h6,p,center,td,th,ul,dl,div {
- font-family: Geneva, Arial, Helvetica, sans-serif;
-}
-body,td {
- font-size: 90%;
-}
-h1 {
- text-align: center;
- font-size: 160%;
-}
-h2 {
- font-size: 120%;
-}
-h3 {
- font-size: 100%;
-}
-caption {
- font-weight: bold
-}
-div.qindex {
- width: 100%;
- background-color: #eeeeff;
- border: 1px solid #b0b0b0;
- text-align: center;
- margin: 2px;
- padding: 2px;
- line-height: 140%;
-}
-div.nav {
- width: 100%;
- background-color: #eeeeff;
- border: 1px solid #b0b0b0;
- text-align: center;
- margin: 2px;
- padding: 2px;
- line-height: 140%;
-}
-div.navtab {
- background-color: #eeeeff;
- border: 1px solid #b0b0b0;
- text-align: center;
- margin: 2px;
- margin-right: 15px;
- padding: 2px;
-}
-td.navtab {
- font-size: 70%;
-}
-a.qindex {
- text-decoration: none;
- font-weight: bold;
- color: #1a419d;
-}
-a.qindex:visited {
- text-decoration: none;
- font-weight: bold;
- color: #1a419d
-}
-a.qindex:hover {
- text-decoration: none;
- background-color: #ddddff;
-}
-a.qindexHL {
- text-decoration: none;
- font-weight: bold;
- background-color: #6666cc;
- color: #ffffff;
- border: 1px double #9295C2;
-}
-a.qindexHL:hover {
- text-decoration: none;
- background-color: #6666cc;
- color: #ffffff;
-}
-a.qindexHL:visited {
- text-decoration: none;
- background-color: #6666cc;
- color: #ffffff
-}
-a.el {
- text-decoration: none;
- font-weight: bold
-}
-a.elRef {
- font-weight: bold
-}
-a.code:link {
- text-decoration: none;
- font-weight: normal;
- color: #0000FF
-}
-a.code:visited {
- text-decoration: none;
- font-weight: normal;
- color: #0000FF
-}
-a.codeRef:link {
- font-weight: normal;
- color: #0000FF
-}
-a.codeRef:visited {
- font-weight: normal;
- color: #0000FF
-}
-a:hover {
- text-decoration: none;
- background-color: #f2f2ff
-}
-dl.el {
- margin-left: -1cm
-}
-.fragment {
- font-family: Fixed, monospace;
- font-size: 95%;
-}
-pre.fragment {
- border: 1px solid #CCCCCC;
- background-color: #f5f5f5;
- margin-top: 4px;
- margin-bottom: 4px;
- margin-left: 2px;
- margin-right: 8px;
- padding-left: 6px;
- padding-right: 6px;
- padding-top: 4px;
- padding-bottom: 4px;
-}
-div.ah {
- background-color: black;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 3px;
- margin-top: 3px
-}
-td.md {
- background-color: #F4F4FB;
- font-weight: bold;
-}
-td.mdPrefix {
- background-color: #F4F4FB;
- color: #606060;
- font-size: 80%;
-}
-td.mdname1 {
- background-color: #F4F4FB;
- font-weight: bold;
- color: #602020;
-}
-td.mdname {
- background-color: #F4F4FB;
- font-weight: bold;
- color: #602020;
- width: 600px;
-}
-div.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: bold;
-}
-div.groupText {
- margin-left: 16px;
- font-style: italic;
- font-size: 90%
-}
-td.indexkey {
- background-color: #eeeeff;
- font-weight: bold;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px;
- border: 1px solid #CCCCCC;
-}
-td.indexvalue {
- background-color: #eeeeff;
- font-style: italic;
- padding-right : 10px;
- padding-top : 2px;
- padding-left : 10px;
- padding-bottom : 2px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 2px;
- margin-bottom : 2px;
- border: 1px solid #CCCCCC;
-}
-tr.memlist {
- background-color: #f0f0f0;
-}
-p.formulaDsp {
- text-align: center;
-}
-img.formulaDsp {
-}
-img.formulaInl {
- vertical-align: middle;
-}
-span.keyword {
- color: #008000
-}
-span.keywordtype {
- color: #604020
-}
-span.keywordflow {
- color: #e08000
-}
-span.comment {
- color: #800000
-}
-span.preprocessor {
- color: #806020
-}
-span.stringliteral {
- color: #002080
-}
-span.charliteral {
- color: #008080
-}
-.mdTable {
- border: 1px solid #868686;
- background-color: #F4F4FB;
-}
-.mdRow {
- padding: 8px 10px;
-}
-.mdescLeft {
- padding: 0px 8px 4px 8px;
- font-size: 80%;
- font-style: italic;
- background-color: #FAFAFA;
- border-top: 1px none #E0E0E0;
- border-right: 1px none #E0E0E0;
- border-bottom: 1px none #E0E0E0;
- border-left: 1px none #E0E0E0;
- margin: 0px;
-}
-.mdescRight {
- padding: 0px 8px 4px 8px;
- font-size: 80%;
- font-style: italic;
- background-color: #FAFAFA;
- border-top: 1px none #E0E0E0;
- border-right: 1px none #E0E0E0;
- border-bottom: 1px none #E0E0E0;
- border-left: 1px none #E0E0E0;
- margin: 0px;
-}
-.memItemLeft {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memItemRight {
- padding: 1px 8px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplItemLeft {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: none;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplItemRight {
- padding: 1px 8px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: none;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.memTemplParams {
- padding: 1px 0px 0px 8px;
- margin: 4px;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-color: #E0E0E0;
- border-right-color: #E0E0E0;
- border-bottom-color: #E0E0E0;
- border-left-color: #E0E0E0;
- border-top-style: solid;
- border-right-style: none;
- border-bottom-style: none;
- border-left-style: none;
- color: #606060;
- background-color: #FAFAFA;
- font-size: 80%;
-}
-.search {
- color: #003399;
- font-weight: bold;
-}
-form.search {
- margin-bottom: 0px;
- margin-top: 0px;
-}
-input.search {
- font-size: 75%;
- color: #000080;
- font-weight: normal;
- background-color: #eeeeff;
-}
-td.tiny {
- font-size: 75%;
-}
-a {
- color: #252e78;
-}
-a:visited {
- color: #3d2185;
-}
-.dirtab {
- padding: 4px;
- border-collapse: collapse;
- border: 1px solid #b0b0b0;
-}
-th.dirtab {
- background: #eeeeff;
- font-weight: bold;
-}
-hr {
- height: 1px;
- border: none;
- border-top: 1px solid black;
-}
+++ /dev/null
-# Doxyfile 1.4.4
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = libg722_1
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.0.1
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = api
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING = YES
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is YES.
-
-SHOW_DIRECTORIES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the progam writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT =
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ..
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-
-FILE_PATTERNS = *.c \
- *.h
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = NO
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 2
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT =
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET = css.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT =
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT =
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT =
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION =
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_WIDTH = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that a graph may be further truncated if the graph's
-# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
-# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
-# the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
+++ /dev/null
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
- <xsl:param name="html.stylesheet">css.css</xsl:param>
-</xsl:stylesheet>
\ No newline at end of file
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: spandsp
-Description: A library for the ITU G.722.1 and G.722.1C audio codecs.
-Requires:
-Version: @VERSION@
-Libs: -L${libdir} -lg722_1 -lm
-Cflags: -I${includedir}
+++ /dev/null
-Summary: libg722_1 is a library for the ITU G.722.1 and Annex C wideband speech codecs.
-Name: @PACKAGE@
-Version: @VERSION@
-Release: 1
-License: Polycom
-Group: System Environment/Libraries
-URL: http://www.soft-switch.org/libg722_1
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Source: http://www.soft-switch.org/downloads/codecs/@PACKAGE@-@VERSION@.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-Docdir: %{_prefix}/doc
-
-BuildRequires: audiofile-devel
-BuildRequires: doxygen
-
-%description
-libg722_1 is a library for the ITU G.722.1 and Annex C wideband speech codecs.
-
-%package devel
-Summary: G.722.1 development files
-Group: Development/Libraries
-Requires: libg722_1 = %{version}
-PreReq: /sbin/install-info
-
-%description devel
-libg722_1 development files.
-
-%prep
-%setup -q
-
-%build
-%configure --enable-doc --disable-static --disable-rpath
-make
-
-%install
-rm -rf %{buildroot}
-make install DESTDIR=%{buildroot}
-rm %{buildroot}%{_libdir}/libg722_1.la
-
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-,root,root,-)
-%doc ChangeLog AUTHORS COPYING NEWS README
-
-%{_libdir}/libg722_1.so.*
-
-%files devel
-%defattr(-,root,root,-)
-%doc doc/api
-%{_includedir}/g722_1.h
-%{_includedir}/g722_1
-%{_libdir}/libg722_1.so
-%{_libdir}/pkgconfig/g722_1.pc
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%changelog
-* Sat Sep 20 2008 Steve Underwood <steveu@coppice.org> 0.0.1
-- First pass
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the Lesser GNU 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, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
-AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
-
-MAINTAINERCLEANFILES = Makefile.in
-
-EXTRA_DIST = make_tables.c \
- g722_1/version.h.in \
- libg722_1.dsp \
- libg722_1.2005.sln \
- libg722_1.2008.sln \
- libg722_1.2005.vcproj \
- libg722_1.2008.vcproj \
- msvc/gettimeofday.c \
- msvc/inttypes.h \
- msvc/tgmath.h \
- msvc/unistd.h \
- msvc/sys/time.h \
- msvc/g722_1.def \
- msvc/msvcproj.head \
- msvc/msvcproj.foot \
- msvc/vc8proj.head \
- msvc/vc8proj.foot \
- msvc/vc9proj.head \
- msvc/vc9proj.foot
-
-AM_CPPFLAGS = -I$(top_builddir)
-
-lib_LTLIBRARIES = libg722_1.la
-
-libg722_1_la_SOURCES = basop32.c \
- bitstream.c \
- coef2sam.c \
- common.c \
- commonf.c \
- dct4.c \
- dct4_a.c \
- dct4_s.c \
- decoder.c \
- decoderf.c \
- encoder.c \
- encoderf.c \
- huff_tab.c \
- sam2coef.c \
- tables.c \
- utilities.c
-
-libg722_1_la_LDFLAGS = -version-info @G722_1_LT_CURRENT@:@G722_1_LT_REVISION@:@G722_1_LT_AGE@ $(COMP_VENDOR_LDFLAGS)
-
-nobase_include_HEADERS = g722_1/g722_1.h \
- g722_1/version.h
-
-nodist_include_HEADERS = g722_1.h
-
-noinst_HEADERS = basop32.h \
- bitstream.h \
- coef2sam.h \
- dct4.h \
- dct4_a.h \
- dct4_s.h \
- defs.h \
- huff_tab.h \
- sam2coef.h \
- tables.h \
- utilities.h
-
-noinst_PROGRAMS = make_dct4_tables
-
-dct4.$(OBJEXT): dct4.h
-
-dct4.lo: dct4.h
-
-dct4.h: make_dct4_tables$(EXEEXT)
- ./make_dct4_tables$(EXEEXT) >dct4.h
-
-make_dct4_tables$(EXEEXT): $(top_srcdir)/src/make_dct4_tables.c
- $(CC_FOR_BUILD) -o make_dct4_tables$(EXEEXT) $(top_srcdir)/src/make_dct4_tables.c -DHAVE_CONFIG_H -I$(top_builddir)/src -lm
-
-#coef2sam.h: make_tables$(EXEEXT)
-# ./make_tables$(EXEEXT) coef2sam >coef2samx.h
-
-#sam2coef.h: make_tables$(EXEEXT)
-# ./make_tables$(EXEEXT) sam2coef >sam2coefx.h
-
-DSP = libg722_1.dsp
-VCPROJ8 = libg722_1.2005.vcproj
-VCPROJ9 = libg722_1.2008.vcproj
-
-WIN32SOURCES = $(libg722_1_la_SOURCES) msvc/gettimeofday.c
-WIN32HEADERS = $(nobase_include_HEADERS) g722_1.h
-
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT8 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ8)
-VCPROJOUT9 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ9)
-
-$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am
- echo "creating $(DSP)"
- @(cp $(srcdir)/msvc/msvcproj.head $(DSP); \
- echo "# Begin Group \"Source Files\"" $(DSPOUT); \
- for file in $(WIN32SOURCES); do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- echo "# Begin Group \"Header Files\"" $(DSPOUT); \
- for file in $(WIN32HEADERS); do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ8): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am
- echo "creating $(VCPROJ8)"
- @(cp $(srcdir)/msvc/vc8proj.head $(VCPROJ8); \
- for file in $(WIN32SOURCES); do \
- myfile=`echo $$file | sed -e 's|/|\\\\|g'`; \
- echo "<File RelativePath=\""$$myfile"\"></File>" $(VCPROJOUT8); \
- done; \
- echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT8); \
- for file in $(WIN32HEADERS); do \
- myfile=`echo $$file | sed -e 's|/|\\\\|g'`; \
- echo "<File RelativePath=\""$$myfile"\"></File>" $(VCPROJOUT8); \
- done; \
- cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT8) )
-
-$(VCPROJ9): msvc/vc9proj.head msvc/vc9proj.foot Makefile.am
- echo "creating $(VCPROJ9)"
- @(cp $(srcdir)/msvc/vc9proj.head $(VCPROJ9); \
- for file in $(WIN32SOURCES); do \
- myfile=`echo $$file | sed -e 's|/|\\\\|g'`; \
- echo "<File RelativePath=\""$$myfile"\"></File>" $(VCPROJOUT9); \
- done; \
- echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT9); \
- for file in $(WIN32HEADERS); do \
- myfile=`echo $$file | sed -e 's|/|\\\\|g'`; \
- echo "<File RelativePath=\""$$myfile"\"></File>" $(VCPROJOUT9); \
- done; \
- cat $(srcdir)/msvc/vc9proj.foot $(VCPROJOUT9) )
-
-dist-hook: g722_1/version.h
-
-g722_1/version.h:
- NOWDATE=`date --utc +"%Y%m%d"` ; \
- NOWTIME=`date --utc +"%H%M%S"` ; \
- sed 's/$$G722_1_RELEASE_DATE/'$$NOWDATE'/;s/$$G722_1_RELEASE_TIME/'$$NOWTIME'/' \
- <$(srcdir)/g722_1/version.h.in >$@
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * basop32.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1
- *
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "basop32.h"
-
-int16_t shl(int16_t var1, int16_t var2)
-{
- int32_t result;
-
- if (var2 < 0)
- {
- if (var2 < -16)
- var2 = -16;
- return shr(var1, (int16_t) -var2);
- }
- result = (int32_t) var1*((int32_t) 1 << var2);
- if ((var2 > 15 && var1 != 0) || (result != (int32_t) ((int16_t) result)))
- return (var1 > 0) ? INT16_MAX : INT16_MIN;
- return (int16_t) result;
-}
-/*- End of function --------------------------------------------------------*/
-
-int16_t shr(int16_t var1, int16_t var2)
-{
- if (var2 < 0)
- {
- if (var2 < -16)
- var2 = -16;
- return shl(var1, (int16_t) -var2);
- }
- if (var2 >= 15)
- return (var1 < 0) ? -1 : 0;
- if (var1 < 0)
- return ~((~var1) >> var2);
- return var1 >> var2;
-}
-/*- End of function --------------------------------------------------------*/
-
-int32_t L_add(int32_t L_var1, int32_t L_var2)
-{
- int32_t L_var_out;
-
- L_var_out = L_var1 + L_var2;
- if (((L_var1 ^ L_var2) & INT32_MIN) == 0)
- {
- if ((L_var_out ^ L_var1) & INT32_MIN)
- return (L_var1 < 0) ? INT32_MIN : INT32_MAX;
- }
- return L_var_out;
-}
-/*- End of function --------------------------------------------------------*/
-
-int32_t L_sub(int32_t L_var1, int32_t L_var2)
-{
- int32_t L_var_out;
-
- L_var_out = L_var1 - L_var2;
- if (((L_var1 ^ L_var2) & INT32_MIN) != 0)
- {
- if ((L_var_out ^ L_var1) & INT32_MIN)
- return (L_var1 < 0L) ? INT32_MIN : INT32_MAX;
- }
- return L_var_out;
-}
-/*- End of function --------------------------------------------------------*/
-
-int32_t L_shl(int32_t L_var1, int16_t var2)
-{
- if (var2 <= 0)
- {
- if (var2 < -32)
- var2 = -32;
- return L_shr(L_var1, -var2);
- }
- for ( ; var2 > 0; var2--)
- {
- if (L_var1 > (int32_t) 0X3fffffffL)
- return INT32_MAX;
- if (L_var1 < (int32_t) 0xc0000000L)
- return INT32_MIN;
- L_var1 *= 2;
- }
- return L_var1;
-}
-/*- End of function --------------------------------------------------------*/
-
-int32_t L_shr(int32_t L_var1, int16_t var2)
-{
- if (var2 < 0)
- {
- if (var2 < -32)
- var2 = -32;
- return L_shl(L_var1, (int16_t) -var2);
- }
- if (var2 >= 31)
- return (L_var1 < 0L) ? -1 : 0;
- if (L_var1 < 0)
- return ~((~L_var1) >> var2);
- return L_var1 >> var2;
-}
-/*- End of function --------------------------------------------------------*/
-
-/*! \brief Find the bit position of the highest set bit in a word
- \param bits The word to be searched
- \return The bit number of the highest set bit, or -1 if the word is zero. */
-static __inline__ int top_bit(unsigned int bits)
-{
- int res;
-
-#if defined(__i386__) || defined(__x86_64__)
- __asm__ (" xorl %[res],%[res];\n"
- " decl %[res];\n"
- " bsrl %[bits],%[res]\n"
- : [res] "=&r" (res)
- : [bits] "rm" (bits));
- return res;
-#elif defined(__ppc__) || defined(__powerpc__)
- __asm__ ("cntlzw %[res],%[bits];\n"
- : [res] "=&r" (res)
- : [bits] "r" (bits));
- return 31 - res;
-#else
- if (bits == 0)
- return -1;
- res = 0;
- if (bits & 0xFFFF0000)
- {
- bits &= 0xFFFF0000;
- res += 16;
- }
- if (bits & 0xFF00FF00)
- {
- bits &= 0xFF00FF00;
- res += 8;
- }
- if (bits & 0xF0F0F0F0)
- {
- bits &= 0xF0F0F0F0;
- res += 4;
- }
- if (bits & 0xCCCCCCCC)
- {
- bits &= 0xCCCCCCCC;
- res += 2;
- }
- if (bits & 0xAAAAAAAA)
- {
- bits &= 0xAAAAAAAA;
- res += 1;
- }
- return res;
-#endif
-}
-/*- End of function --------------------------------------------------------*/
-
-int16_t norm_s(int16_t var1)
-{
- if (var1 == 0)
- return 0;
- if (var1 < 0)
- var1 = ~var1;
- return (14 - top_bit(var1));
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * basops32.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#if !defined(BASOP32_H_DEFINED)
-#define BASOP32_H_DEFINED
-
-int32_t L_add(int32_t L_var1, int32_t L_var2);
-
-static __inline__ int16_t saturate(int32_t amp)
-{
- int16_t amp16;
-
- /* Hopefully this is optimised for the common case - not clipping */
- amp16 = (int16_t) amp;
- if (amp == amp16)
- return amp16;
- if (amp > INT16_MAX)
- return INT16_MAX;
- return INT16_MIN;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t xround(int32_t L_var1)
-{
- return (int16_t) (L_add(L_var1, (int32_t) 0x00008000L) >> 16);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t abs_s(int16_t var1)
-{
- if (var1 == INT16_MIN)
- return INT16_MAX;
- return abs(var1);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t add(int16_t var1, int16_t var2)
-{
- return saturate((int32_t) var1 + var2);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t sub(int16_t var1, int16_t var2)
-{
- return saturate((int32_t) var1 - var2);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t mult(int16_t var1, int16_t var2)
-{
- return saturate(((int32_t) var1*(int32_t) var2) >> 15);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int32_t L_mult0(int16_t var1, int16_t var2)
-{
- return (int32_t) var1*(int32_t) var2;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int32_t L_mac0(int32_t L_var3, int16_t var1, int16_t var2)
-{
- return L_add(L_var3, L_mult0(var1, var2));
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int32_t L_mult(int16_t var1, int16_t var2)
-{
- int32_t L_var_out;
-
- L_var_out = (int32_t) var1*(int32_t) var2;
- if (L_var_out == (int32_t) 0x40000000L)
- return INT32_MAX;
- return L_var_out << 1;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t negate(int16_t var1)
-{
- if (var1 == INT16_MIN)
- return INT16_MAX;
- return -var1;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int32_t L_mac(int32_t L_var3, int16_t var1, int16_t var2)
-{
- return L_add(L_var3, L_mult(var1, var2));
-}
-/*- End of function --------------------------------------------------------*/
-
-int16_t shl(int16_t var1, int16_t var2); /* Short shift left, 1 */
-int16_t shr(int16_t var1, int16_t var2); /* Short shift right, 1 */
-int32_t L_sub(int32_t L_var1, int32_t L_var2); /* Long sub, 2 */
-int32_t L_shl(int32_t L_var1, int16_t var2); /* Long shift left, 2 */
-int32_t L_shr(int32_t L_var1, int16_t var2); /* Long shift right, 2 */
-int16_t norm_s(int16_t var1); /* Short norm, 15 */
-int16_t div_s(int16_t var1, int16_t var2); /* Short division, 18 */
-int16_t norm_l(int32_t L_var1); /* Long norm, 30 */
-
-#endif
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * bitstream.c
- *
- * Copyright (C) 2006 Steve Underwood
- *
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "g722_1/g722_1.h"
-#include "bitstream.h"
-
-void g722_1_bitstream_put(g722_1_bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
-{
- if (bits < 32)
- value &= ((1 << bits) - 1);
- if (bits > 24)
- {
- /* We can't deal with this many bits in one go. Split up the operation */
- bits -= 8;
- s->bitstream = (s->bitstream << bits) | (value >> 8);
- s->residue += bits;
- while (s->residue >= 8)
- {
- s->residue -= 8;
- *(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
- }
- bits = 8;
- value &= 0xFF;
- }
- s->bitstream = (s->bitstream << bits) | value;
- s->residue += bits;
- while (s->residue >= 8)
- {
- s->residue -= 8;
- *(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-uint32_t g722_1_bitstream_get(g722_1_bitstream_state_t *s, const uint8_t **c, int bits)
-{
- uint32_t x;
-
- if (bits > 24)
- {
- /* We can't deal with this many bits in one go. Split up the operation */
- while (s->residue < 24)
- {
- s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
- s->residue += 8;
- }
- s->residue -= 24;
- bits -= 24;
- x = ((s->bitstream >> s->residue) & 0xFFFFFF) << bits;
- while (s->residue < bits)
- {
- s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
- s->residue += 8;
- }
- s->residue -= bits;
- x |= (s->bitstream >> s->residue) & ((1 << bits) - 1);
- }
- else
- {
- while (s->residue < bits)
- {
- s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
- s->residue += 8;
- }
- s->residue -= bits;
- x = (s->bitstream >> s->residue) & ((1 << bits) - 1);
- }
- return x;
-}
-/*- End of function --------------------------------------------------------*/
-
-void g722_1_bitstream_flush(g722_1_bitstream_state_t *s, uint8_t **c)
-{
- if (s->residue > 0)
- {
- *(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
- s->residue = 0;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-g722_1_bitstream_state_t *g722_1_bitstream_init(g722_1_bitstream_state_t *s)
-{
- if (s == NULL)
- return NULL;
- s->bitstream = 0;
- s->residue = 0;
- return s;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * bitstream.h
- *
- * Copyright (C) 2006 Steve Underwood
- *
- * 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.
- */
-
-/*! \file */
-
-#if !defined(_G722_1_BITSTREAM_H_)
-#define _G722_1_BITSTREAM_H_
-
-#if 0
-/*! Bitstream handler state */
-typedef struct
-{
- /*! The bit stream. */
- uint32_t bitstream;
- /*! The residual bits in bitstream. */
- int residue;
-} g722_1_bitstream_state_t;
-#endif
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-/*! \brief Put a chunk of bits into the output buffer.
- \param s A pointer to the bitstream context.
- \param c A pointer to the bitstream output buffer.
- \param value The value to be pushed into the output buffer.
- \param bits The number of bits of value to be pushed. 1 to 32 bits is valid. */
-void g722_1_bitstream_put(g722_1_bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
-
-/*! \brief Get a chunk of bits from the input buffer.
- \param s A pointer to the bitstream context.
- \param c A pointer to the bitstream input buffer.
- \param bits The number of bits of value to be grabbed. 1 to 32 bits is valid.
- \return The value retrieved from the input buffer. */
-uint32_t g722_1_bitstream_get(g722_1_bitstream_state_t *s, const uint8_t **c, int bits);
-
-/*! \brief Flush any residual bit to the output buffer.
- \param s A pointer to the bitstream context.
- \param c A pointer to the bitstream output buffer. */
-void g722_1_bitstream_flush(g722_1_bitstream_state_t *s, uint8_t **c);
-
-/*! \brief Initialise a bitstream context.
- \param s A pointer to the bitstream context.
- \return A pointer to the bitstream context. */
-g722_1_bitstream_state_t *g722_1_bitstream_init(g722_1_bitstream_state_t *s);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * coef2sam.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "coef2sam.h"
-#include "utilities.h"
-
-/* Convert Reversed MLT (Modulated Lapped Transform) Coefficients to Samples
-
- The "Reversed MLT" is an overlapped block transform which uses even symmetry
- on the left, odd symmetry on the right and a Type IV DCT as the block transform.
- It is thus similar to a MLT which uses odd symmetry on the left, even symmetry
- on the right and a Type IV DST as the block transform. In fact, it is equivalent
- to reversing the order of the samples, performing an MLT and then negating all
- the even-numbered coefficients. */
-
-#if defined(G722_1_USE_FIXED_POINT)
-void rmlt_coefs_to_samples(int16_t coefs[],
- int16_t old_samples[],
- int16_t out_samples[],
- int dct_length,
- int16_t mag_shift)
-{
- int i;
- int half_dct_length;
- int last;
- int16_t new_samples[MAX_DCT_LENGTH];
- const int16_t *win;
- int32_t sum;
-
- half_dct_length = dct_length >> 1;
-
- /* Perform a Type IV (inverse) DCT on the coefficients */
- dct_type_iv_s(coefs, new_samples, dct_length);
-
- if (mag_shift > 0)
- {
- for (i = 0; i < dct_length; i++)
- new_samples[i] = shr(new_samples[i], mag_shift);
- }
- else if (mag_shift < 0)
- {
- mag_shift = negate(mag_shift);
- for (i = 0; i < dct_length; i++)
- new_samples[i] = shl(new_samples[i], mag_shift);
- }
-
- win = (dct_length == DCT_LENGTH) ? rmlt_to_samples_window : max_rmlt_to_samples_window;
- last = half_dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- /* Get the first half of the windowed samples */
- sum = L_mult(win[i], new_samples[last - i]);
- sum = L_mac(sum, win[dct_length - i - 1], old_samples[i]);
- out_samples[i] = xround(L_shl(sum, 2));
- /* Get the second half of the windowed samples */
- sum = L_mult(win[half_dct_length + i], new_samples[i]);
- sum = L_mac(sum, negate(win[last - i]), old_samples[last - i]);
- out_samples[half_dct_length + i] = xround(L_shl(sum, 2));
- }
-
- /* Save the second half of the new samples for
- next time, when they will be the old samples. */
- vec_copyi16(old_samples, &new_samples[half_dct_length], half_dct_length);
-}
-/*- End of function --------------------------------------------------------*/
-#else
-void rmlt_coefs_to_samples(float coefs[],
- float old_samples[],
- float out_samples[],
- int dct_length)
-{
- int i;
- int half_dct_length;
- int last;
- float new_samples[MAX_DCT_LENGTH];
- const float *win;
- float sum;
-
- half_dct_length = dct_length >> 1;
-
- /* Perform a Type IV (inverse) DCT on the coefficients */
- dct_type_iv(coefs, new_samples, dct_length);
-
- win = (dct_length == DCT_LENGTH) ? rmlt_to_samples_window : max_rmlt_to_samples_window;
- last = half_dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- /* Get the first half of the windowed samples */
- sum = win[i]*new_samples[last - i];
- sum += win[dct_length - i - 1]*old_samples[i];
- out_samples[i] = sum;
- /* Get the second half of the windowed samples */
- sum = win[half_dct_length + i]*new_samples[i];
- sum -= win[last - i]*old_samples[last - i];
- out_samples[half_dct_length + i] = sum;
- }
-
- /* Save the second half of the new samples for next time, when they will
- be the old samples. */
- vec_copyf(old_samples, &new_samples[half_dct_length], half_dct_length);
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * coef2sam.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t rmlt_to_samples_window[DCT_LENGTH] =
-{
- 44, 133, 222, 310, 399, 488, 577, 666, 754, 843,
- 932, 1020, 1109, 1198, 1286, 1375, 1464, 1552, 1641, 1729,
- 1817, 1906, 1994, 2082, 2171, 2259, 2347, 2435, 2523, 2611,
- 2699, 2786, 2874, 2962, 3049, 3137, 3224, 3312, 3399, 3486,
- 3573, 3660, 3747, 3834, 3921, 4008, 4094, 4181, 4267, 4353,
- 4439, 4526, 4611, 4697, 4783, 4869, 4954, 5040, 5125, 5210,
- 5295, 5380, 5465, 5549, 5634, 5718, 5802, 5886, 5970, 6054,
- 6138, 6221, 6304, 6388, 6471, 6553, 6636, 6719, 6801, 6883,
- 6965, 7047, 7129, 7211, 7292, 7373, 7454, 7535, 7616, 7696,
- 7777, 7857, 7937, 8016, 8096, 8175, 8254, 8333, 8412, 8491,
- 8569, 8647, 8725, 8803, 8880, 8957, 9035, 9111, 9188, 9264,
- 9341, 9417, 9492, 9568, 9643, 9718, 9793, 9868, 9942, 10016,
- 10090, 10163, 10237, 10310, 10383, 10455, 10528, 10600, 10672, 10743,
- 10815, 10886, 10957, 11027, 11098, 11168, 11237, 11307, 11376, 11445,
- 11514, 11582, 11650, 11718, 11785, 11853, 11920, 11986, 12053, 12119,
- 12185, 12250, 12315, 12380, 12445, 12509, 12573, 12637, 12701, 12764,
- 12826, 12889, 12951, 13013, 13075, 13136, 13197, 13257, 13318, 13378,
- 13437, 13497, 13556, 13614, 13673, 13731, 13788, 13846, 13903, 13959,
- 14016, 14072, 14128, 14183, 14238, 14292, 14347, 14401, 14454, 14508,
- 14561, 14613, 14665, 14717, 14769, 14820, 14871, 14921, 14971, 15021,
- 15070, 15119, 15168, 15216, 15264, 15311, 15359, 15405, 15452, 15498,
- 15544, 15589, 15634, 15678, 15722, 15766, 15810, 15853, 15895, 15938,
- 15979, 16021, 16062, 16103, 16143, 16183, 16223, 16262, 16300, 16339,
- 16377, 16414, 16452, 16488, 16525, 16561, 16596, 16632, 16666, 16701,
- 16735, 16768, 16801, 16834, 16867, 16899, 16930, 16961, 16992, 17022,
- 17052, 17082, 17111, 17140, 17168, 17196, 17223, 17250, 17277, 17303,
- 17329, 17354, 17379, 17404, 17428, 17452, 17475, 17498, 17520, 17542,
- 17564, 17585, 17606, 17626, 17646, 17665, 17684, 17703, 17721, 17739,
- 17756, 17773, 17790, 17806, 17821, 17836, 17851, 17865, 17879, 17893,
- 17906, 17918, 17931, 17942, 17954, 17965, 17975, 17985, 17995, 18004,
- 18012, 18021, 18028, 18036, 18043, 18049, 18055, 18061, 18066, 18071,
- 18076, 18079, 18083, 18086, 18089, 18091, 18093, 18094, 18095, 18095,
-};
-
-const int16_t max_rmlt_to_samples_window[MAX_DCT_LENGTH] =
-{
- 0, 43, 88, 131, 176, 219, 265, 310, 353, 398,
- 442, 487, 532, 575, 620, 663, 709, 754, 797, 842,
- 885, 931, 975, 1019, 1064, 1107, 1152, 1197, 1240, 1286,
- 1329, 1373, 1419, 1462, 1507, 1550, 1595, 1640, 1683, 1728,
- 1771, 1816, 1861, 1904, 1949, 1992, 2037, 2081, 2125, 2170,
- 2212, 2258, 2302, 2345, 2390, 2433, 2477, 2522, 2565, 2610,
- 2652, 2697, 2742, 2784, 2829, 2872, 2916, 2961, 3004, 3048,
- 3091, 3136, 3180, 3223, 3267, 3310, 3354, 3399, 3441, 3485,
- 3528, 3572, 3616, 3659, 3703, 3745, 3790, 3834, 3876, 3920,
- 3962, 4006, 4050, 4093, 4136, 4179, 4222, 4266, 4309, 4352,
- 4394, 4438, 4482, 4524, 4568, 4610, 4653, 4697, 4739, 4782,
- 4824, 4867, 4911, 4953, 4996, 5038, 5081, 5124, 5166, 5209,
- 5251, 5294, 5337, 5378, 5421, 5463, 5506, 5548, 5590, 5633,
- 5674, 5717, 5759, 5800, 5843, 5884, 5927, 5970, 6011, 6053,
- 6094, 6136, 6178, 6219, 6262, 6302, 6345, 6387, 6428, 6470,
- 6510, 6552, 6594, 6635, 6677, 6717, 6759, 6801, 6841, 6883,
- 6922, 6964, 7006, 7046, 7087, 7127, 7169, 7210, 7250, 7291,
- 7331, 7372, 7413, 7453, 7494, 7533, 7574, 7615, 7655, 7695,
- 7735, 7776, 7816, 7855, 7896, 7935, 7975, 8016, 8054, 8095,
- 8134, 8174, 8214, 8253, 8293, 8332, 8371, 8412, 8450, 8490,
- 8528, 8568, 8607, 8646, 8685, 8723, 8763, 8802, 8840, 8879,
- 8917, 8956, 8995, 9033, 9072, 9109, 9148, 9187, 9225, 9264,
- 9301, 9340, 9378, 9415, 9454, 9491, 9529, 9567, 9604, 9642,
- 9679, 9717, 9755, 9791, 9829, 9866, 9903, 9941, 9977, 10015,
- 10051, 10089, 10126, 10162, 10199, 10235, 10272, 10309, 10345, 10382,
- 10417, 10454, 10491, 10526, 10563, 10598, 10635, 10672, 10706, 10742,
- 10778, 10814, 10850, 10885, 10921, 10955, 10991, 11027, 11061, 11097,
- 11131, 11166, 11202, 11236, 11271, 11305, 11340, 11376, 11409, 11444,
- 11478, 11513, 11547, 11580, 11615, 11648, 11683, 11717, 11751, 11785,
- 11817, 11852, 11886, 11918, 11952, 11985, 12018, 12053, 12085, 12118,
- 12150, 12184, 12217, 12249, 12282, 12314, 12347, 12380, 12411, 12444,
- 12476, 12508, 12541, 12572, 12604, 12635, 12668, 12700, 12731, 12763,
- 12794, 12826, 12858, 12888, 12920, 12950, 12982, 13013, 13043, 13074,
- 13105, 13135, 13166, 13196, 13227, 13257, 13287, 13317, 13347, 13377,
- 13407, 13437, 13467, 13496, 13525, 13555, 13585, 13614, 13643, 13672,
- 13701, 13730, 13760, 13787, 13817, 13845, 13873, 13903, 13930, 13959,
- 13987, 14015, 14043, 14071, 14099, 14126, 14154, 14183, 14209, 14237,
- 14264, 14292, 14319, 14346, 14373, 14400, 14427, 14454, 14480, 14507,
- 14533, 14560, 14586, 14612, 14639, 14664, 14691, 14717, 14742, 14768,
- 14793, 14819, 14845, 14870, 14896, 14920, 14945, 14971, 14996, 15020,
- 15044, 15070, 15094, 15118, 15143, 15167, 15192, 15216, 15239, 15263,
- 15287, 15311, 15335, 15358, 15382, 15405, 15428, 15452, 15474, 15498,
- 15520, 15543, 15566, 15588, 15611, 15633, 15656, 15678, 15700, 15722,
- 15744, 15766, 15788, 15809, 15831, 15852, 15874, 15895, 15916, 15937,
- 15958, 15979, 16000, 16020, 16041, 16061, 16082, 16103, 16122, 16143,
- 16162, 16183, 16203, 16222, 16242, 16261, 16281, 16300, 16319, 16339,
- 16357, 16377, 16396, 16414, 16433, 16451, 16470, 16488, 16506, 16525,
- 16542, 16561, 16579, 16596, 16614, 16631, 16649, 16667, 16683, 16700,
- 16717, 16735, 16752, 16768, 16785, 16801, 16818, 16834, 16850, 16867,
- 16883, 16899, 16915, 16930, 16945, 16961, 16977, 16992, 17007, 17022,
- 17037, 17052, 17067, 17081, 17096, 17111, 17126, 17140, 17154, 17168,
- 17182, 17196, 17209, 17223, 17237, 17250, 17264, 17277, 17290, 17303,
- 17315, 17329, 17341, 17354, 17367, 17379, 17391, 17404, 17415, 17428,
- 17439, 17451, 17463, 17475, 17486, 17497, 17509, 17520, 17531, 17542,
- 17552, 17563, 17574, 17584, 17595, 17605, 17616, 17626, 17636, 17646,
- 17655, 17665, 17675, 17684, 17694, 17703, 17712, 17721, 17730, 17739,
- 17747, 17756, 17764, 17773, 17781, 17789, 17798, 17806, 17813, 17821,
- 17829, 17836, 17843, 17851, 17858, 17866, 17872, 17879, 17886, 17893,
- 17899, 17906, 17912, 17918, 17924, 17931, 17937, 17942, 17948, 17953,
- 17959, 17964, 17970, 17975, 17980, 17985, 17990, 17995, 17999, 18004,
- 18008, 18012, 18016, 18021, 18025, 18028, 18032, 18036, 18039, 18043,
- 18046, 18049, 18052, 18055, 18058, 18061, 18064, 18067, 18069, 18071,
- 18073, 18075, 18078, 18079, 18081, 18083, 18084, 18086, 18087, 18089,
- 18090, 18090, 18091, 18092, 18093, 18094, 18094, 18095, 18095, 18095
-};
-#else
-const float rmlt_to_samples_window[DCT_LENGTH] =
-{
- 2.45436677e-03f,
- 7.36304140e-03f,
- 1.22715384e-02f,
- 1.71797387e-02f,
- 2.20875274e-02f,
- 2.69947816e-02f,
- 3.19013856e-02f,
- 3.68072242e-02f,
- 4.17121723e-02f,
- 4.66161147e-02f,
- 5.15189357e-02f,
- 5.64205162e-02f,
- 6.13207370e-02f,
- 6.62194788e-02f,
- 7.11166263e-02f,
- 7.60120600e-02f,
- 8.09056610e-02f,
- 8.57973099e-02f,
- 9.06868950e-02f,
- 9.55742970e-02f,
- 1.00459397e-01f,
- 1.05342068e-01f,
- 1.10222206e-01f,
- 1.15099691e-01f,
- 1.19974397e-01f,
- 1.24846213e-01f,
- 1.29715025e-01f,
- 1.34580702e-01f,
- 1.39443144e-01f,
- 1.44302234e-01f,
- 1.49157837e-01f,
- 1.54009849e-01f,
- 1.58858150e-01f,
- 1.63702607e-01f,
- 1.68543145e-01f,
- 1.73379600e-01f,
- 1.78211898e-01f,
- 1.83039889e-01f,
- 1.87863469e-01f,
- 1.92682534e-01f,
- 1.97496936e-01f,
- 2.02306598e-01f,
- 2.07111374e-01f,
- 2.11911172e-01f,
- 2.16705844e-01f,
- 2.21495315e-01f,
- 2.26279438e-01f,
- 2.31058106e-01f,
- 2.35831216e-01f,
- 2.40598634e-01f,
- 2.45360255e-01f,
- 2.50115961e-01f,
- 2.54865646e-01f,
- 2.59609193e-01f,
- 2.64346480e-01f,
- 2.69077420e-01f,
- 2.73801863e-01f,
- 2.78519690e-01f,
- 2.83230811e-01f,
- 2.87935108e-01f,
- 2.92632490e-01f,
- 2.97322810e-01f,
- 3.02005947e-01f,
- 3.06681812e-01f,
- 3.11350316e-01f,
- 3.16011280e-01f,
- 3.20664644e-01f,
- 3.25310290e-01f,
- 3.29948097e-01f,
- 3.34577948e-01f,
- 3.39199722e-01f,
- 3.43813360e-01f,
- 3.48418683e-01f,
- 3.53015602e-01f,
- 3.57604057e-01f,
- 3.62183869e-01f,
- 3.66754949e-01f,
- 3.71317208e-01f,
- 3.75870496e-01f,
- 3.80414754e-01f,
- 3.84949833e-01f,
- 3.89475614e-01f,
- 3.93992037e-01f,
- 3.98498952e-01f,
- 4.02996302e-01f,
- 4.07483906e-01f,
- 4.11961704e-01f,
- 4.16429549e-01f,
- 4.20887381e-01f,
- 4.25335079e-01f,
- 4.29772526e-01f,
- 4.34199601e-01f,
- 4.38616246e-01f,
- 4.43022281e-01f,
- 4.47417676e-01f,
- 4.51802284e-01f,
- 4.56175983e-01f,
- 4.60538715e-01f,
- 4.64890331e-01f,
- 4.69230771e-01f,
- 4.73559886e-01f,
- 4.77877587e-01f,
- 4.82183784e-01f,
- 4.86478359e-01f,
- 4.90761191e-01f,
- 4.95032221e-01f,
- 4.99291331e-01f,
- 5.03538370e-01f,
- 5.07773340e-01f,
- 5.11996031e-01f,
- 5.16206384e-01f,
- 5.20404279e-01f,
- 5.24589658e-01f,
- 5.28762400e-01f,
- 5.32922447e-01f,
- 5.37069619e-01f,
- 5.41203797e-01f,
- 5.45324981e-01f,
- 5.49433053e-01f,
- 5.53527832e-01f,
- 5.57609320e-01f,
- 5.61677337e-01f,
- 5.65731823e-01f,
- 5.69772661e-01f,
- 5.73799789e-01f,
- 5.77813089e-01f,
- 5.81812501e-01f,
- 5.85797846e-01f,
- 5.89769125e-01f,
- 5.93726158e-01f,
- 5.97668886e-01f,
- 6.01597190e-01f,
- 6.05511069e-01f,
- 6.09410286e-01f,
- 6.13294840e-01f,
- 6.17164612e-01f,
- 6.21019542e-01f,
- 6.24859512e-01f,
- 6.28684402e-01f,
- 6.32494152e-01f,
- 6.36288643e-01f,
- 6.40067816e-01f,
- 6.43831551e-01f,
- 6.47579789e-01f,
- 6.51312411e-01f,
- 6.55029356e-01f,
- 6.58730507e-01f,
- 6.62415802e-01f,
- 6.66085124e-01f,
- 6.69738352e-01f,
- 6.73375487e-01f,
- 6.76996410e-01f,
- 6.80601001e-01f,
- 6.84189200e-01f,
- 6.87760890e-01f,
- 6.91316009e-01f,
- 6.94854498e-01f,
- 6.98376238e-01f,
- 7.01881170e-01f,
- 7.05369174e-01f,
- 7.08840132e-01f,
- 7.12294042e-01f,
- 7.15730846e-01f,
- 7.19150364e-01f,
- 7.22552538e-01f,
- 7.25937307e-01f,
- 7.29304552e-01f,
- 7.32654274e-01f,
- 7.35986352e-01f,
- 7.39300668e-01f,
- 7.42597163e-01f,
- 7.45875776e-01f,
- 7.49136388e-01f,
- 7.52379000e-01f,
- 7.55603433e-01f,
- 7.58809686e-01f,
- 7.61997640e-01f,
- 7.65167236e-01f,
- 7.68318415e-01f,
- 7.71451116e-01f,
- 7.74565160e-01f,
- 7.77660549e-01f,
- 7.80737221e-01f,
- 7.83795059e-01f,
- 7.86834061e-01f,
- 7.89854050e-01f,
- 7.92855024e-01f,
- 7.95836926e-01f,
- 7.98799574e-01f,
- 8.01743031e-01f,
- 8.04667175e-01f,
- 8.07571888e-01f,
- 8.10457170e-01f,
- 8.13322961e-01f,
- 8.16169083e-01f,
- 8.18995595e-01f,
- 8.21802378e-01f,
- 8.24589312e-01f,
- 8.27356398e-01f,
- 8.30103517e-01f,
- 8.32830667e-01f,
- 8.35537732e-01f,
- 8.38224709e-01f,
- 8.40891480e-01f,
- 8.43537927e-01f,
- 8.46164107e-01f,
- 8.48769844e-01f,
- 8.51355195e-01f,
- 8.53919983e-01f,
- 8.56464207e-01f,
- 8.58987808e-01f,
- 8.61490726e-01f,
- 8.63972843e-01f,
- 8.66434157e-01f,
- 8.68874609e-01f,
- 8.71294141e-01f,
- 8.73692632e-01f,
- 8.76070082e-01f,
- 8.78426433e-01f,
- 8.80761623e-01f,
- 8.83075595e-01f,
- 8.85368288e-01f,
- 8.87639642e-01f,
- 8.89889598e-01f,
- 8.92118096e-01f,
- 8.94325137e-01f,
- 8.96510601e-01f,
- 8.98674488e-01f,
- 9.00816679e-01f,
- 9.02937174e-01f,
- 9.05035973e-01f,
- 9.07112896e-01f,
- 9.09168005e-01f,
- 9.11201179e-01f,
- 9.13212419e-01f,
- 9.15201604e-01f,
- 9.17168796e-01f,
- 9.19113874e-01f,
- 9.21036780e-01f,
- 9.22937512e-01f,
- 9.24816012e-01f,
- 9.26672220e-01f,
- 9.28506076e-01f,
- 9.30317581e-01f,
- 9.32106674e-01f,
- 9.33873296e-01f,
- 9.35617447e-01f,
- 9.37339008e-01f,
- 9.39037979e-01f,
- 9.40714359e-01f,
- 9.42368090e-01f,
- 9.43999052e-01f,
- 9.45607305e-01f,
- 9.47192788e-01f,
- 9.48755443e-01f,
- 9.50295210e-01f,
- 9.51812088e-01f,
- 9.53306019e-01f,
- 9.54777002e-01f,
- 9.56224978e-01f,
- 9.57649946e-01f,
- 9.59051788e-01f,
- 9.60430503e-01f,
- 9.61786151e-01f,
- 9.63118553e-01f,
- 9.64427769e-01f,
- 9.65713739e-01f,
- 9.66976464e-01f,
- 9.68215883e-01f,
- 9.69431996e-01f,
- 9.70624685e-01f,
- 9.71794009e-01f,
- 9.72939968e-01f,
- 9.74062443e-01f,
- 9.75161433e-01f,
- 9.76236939e-01f,
- 9.77288961e-01f,
- 9.78317380e-01f,
- 9.79322255e-01f,
- 9.80303526e-01f,
- 9.81261134e-01f,
- 9.82195139e-01f,
- 9.83105481e-01f,
- 9.83992159e-01f,
- 9.84855056e-01f,
- 9.85694289e-01f,
- 9.86509740e-01f,
- 9.87301409e-01f,
- 9.88069296e-01f,
- 9.88813400e-01f,
- 9.89533663e-01f,
- 9.90230083e-01f,
- 9.90902662e-01f,
- 9.91551340e-01f,
- 9.92176116e-01f,
- 9.92776990e-01f,
- 9.93353963e-01f,
- 9.93906975e-01f,
- 9.94436026e-01f,
- 9.94941175e-01f,
- 9.95422304e-01f,
- 9.95879471e-01f,
- 9.96312618e-01f,
- 9.96721745e-01f,
- 9.97106910e-01f,
- 9.97467995e-01f,
- 9.97805059e-01f,
- 9.98118103e-01f,
- 9.98407066e-01f,
- 9.98672009e-01f,
- 9.98912871e-01f,
- 9.99129653e-01f,
- 9.99322355e-01f,
- 9.99491036e-01f,
- 9.99635577e-01f,
- 9.99756038e-01f,
- 9.99852419e-01f,
- 9.99924719e-01f,
- 9.99972880e-01f,
- 9.99996960e-01f
-};
-
-const float max_rmlt_to_samples_window[MAX_DCT_LENGTH] =
-{
- 1.22718432e-03f,
- 3.68154561e-03f,
- 6.13588467e-03f,
- 8.59018695e-03f,
- 1.10444371e-02f,
- 1.34986211e-02f,
- 1.59527231e-02f,
- 1.84067301e-02f,
- 2.08606254e-02f,
- 2.33143959e-02f,
- 2.57680248e-02f,
- 2.82214992e-02f,
- 3.06748040e-02f,
- 3.31279226e-02f,
- 3.55808437e-02f,
- 3.80335487e-02f,
- 4.04860228e-02f,
- 4.29382585e-02f,
- 4.53902297e-02f,
- 4.78419326e-02f,
- 5.02933450e-02f,
- 5.27444519e-02f,
- 5.51952459e-02f,
- 5.76457046e-02f,
- 6.00958169e-02f,
- 6.25455678e-02f,
- 6.49949387e-02f,
- 6.74439222e-02f,
- 6.98924959e-02f,
- 7.23406523e-02f,
- 7.47883692e-02f,
- 7.72356316e-02f,
- 7.96824396e-02f,
- 8.21287632e-02f,
- 8.45745876e-02f,
- 8.70199054e-02f,
- 8.94647017e-02f,
- 9.19089541e-02f,
- 9.43526551e-02f,
- 9.67957899e-02f,
- 9.92383435e-02f,
- 1.01680294e-01f,
- 1.04121633e-01f,
- 1.06562346e-01f,
- 1.09002419e-01f,
- 1.11441828e-01f,
- 1.13880575e-01f,
- 1.16318628e-01f,
- 1.18755989e-01f,
- 1.21192627e-01f,
- 1.23628542e-01f,
- 1.26063704e-01f,
- 1.28498107e-01f,
- 1.30931750e-01f,
- 1.33364588e-01f,
- 1.35796621e-01f,
- 1.38227850e-01f,
- 1.40658244e-01f,
- 1.43087775e-01f,
- 1.45516455e-01f,
- 1.47944272e-01f,
- 1.50371179e-01f,
- 1.52797192e-01f,
- 1.55222267e-01f,
- 1.57646418e-01f,
- 1.60069630e-01f,
- 1.62491858e-01f,
- 1.64913118e-01f,
- 1.67333379e-01f,
- 1.69752643e-01f,
- 1.72170877e-01f,
- 1.74588069e-01f,
- 1.77004218e-01f,
- 1.79419294e-01f,
- 1.81833297e-01f,
- 1.84246197e-01f,
- 1.86657995e-01f,
- 1.89068660e-01f,
- 1.91478193e-01f,
- 1.93886578e-01f,
- 1.96293786e-01f,
- 1.98699802e-01f,
- 2.01104641e-01f,
- 2.03508258e-01f,
- 2.05910638e-01f,
- 2.08311796e-01f,
- 2.10711688e-01f,
- 2.13110313e-01f,
- 2.15507656e-01f,
- 2.17903703e-01f,
- 2.20298439e-01f,
- 2.22691849e-01f,
- 2.25083917e-01f,
- 2.27474615e-01f,
- 2.29863957e-01f,
- 2.32251912e-01f,
- 2.34638467e-01f,
- 2.37023607e-01f,
- 2.39407316e-01f,
- 2.41789594e-01f,
- 2.44170398e-01f,
- 2.46549740e-01f,
- 2.48927608e-01f,
- 2.51303971e-01f,
- 2.53678799e-01f,
- 2.56052136e-01f,
- 2.58423895e-01f,
- 2.60794103e-01f,
- 2.63162762e-01f,
- 2.65529811e-01f,
- 2.67895281e-01f,
- 2.70259142e-01f,
- 2.72621363e-01f,
- 2.74981946e-01f,
- 2.77340859e-01f,
- 2.79698104e-01f,
- 2.82053679e-01f,
- 2.84407526e-01f,
- 2.86759704e-01f,
- 2.89110124e-01f,
- 2.91458815e-01f,
- 2.93805718e-01f,
- 2.96150893e-01f,
- 2.98494250e-01f,
- 3.00835848e-01f,
- 3.03175598e-01f,
- 3.05513531e-01f,
- 3.07849646e-01f,
- 3.10183883e-01f,
- 3.12516272e-01f,
- 3.14846754e-01f,
- 3.17175359e-01f,
- 3.19502026e-01f,
- 3.21826786e-01f,
- 3.24149609e-01f,
- 3.26470494e-01f,
- 3.28789383e-01f,
- 3.31106305e-01f,
- 3.33421230e-01f,
- 3.35734159e-01f,
- 3.38045061e-01f,
- 3.40353906e-01f,
- 3.42660725e-01f,
- 3.44965458e-01f,
- 3.47268134e-01f,
- 3.49568695e-01f,
- 3.51867169e-01f,
- 3.54163527e-01f,
- 3.56457740e-01f,
- 3.58749807e-01f,
- 3.61039728e-01f,
- 3.63327444e-01f,
- 3.65612984e-01f,
- 3.67896348e-01f,
- 3.70177478e-01f,
- 3.72456372e-01f,
- 3.74733001e-01f,
- 3.77007425e-01f,
- 3.79279524e-01f,
- 3.81549388e-01f,
- 3.83816928e-01f,
- 3.86082143e-01f,
- 3.88345033e-01f,
- 3.90605599e-01f,
- 3.92863810e-01f,
- 3.95119667e-01f,
- 3.97373140e-01f,
- 3.99624199e-01f,
- 4.01872873e-01f,
- 4.04119104e-01f,
- 4.06362921e-01f,
- 4.08604264e-01f,
- 4.10843164e-01f,
- 4.13079590e-01f,
- 4.15313542e-01f,
- 4.17544961e-01f,
- 4.19773877e-01f,
- 4.22000259e-01f,
- 4.24224108e-01f,
- 4.26445425e-01f,
- 4.28664148e-01f,
- 4.30880278e-01f,
- 4.33093816e-01f,
- 4.35304761e-01f,
- 4.37513083e-01f,
- 4.39718753e-01f,
- 4.41921771e-01f,
- 4.44122136e-01f,
- 4.46319848e-01f,
- 4.48514849e-01f,
- 4.50707138e-01f,
- 4.52896714e-01f,
- 4.55083579e-01f,
- 4.57267702e-01f,
- 4.59449053e-01f,
- 4.61627662e-01f,
- 4.63803470e-01f,
- 4.65976506e-01f,
- 4.68146712e-01f,
- 4.70314115e-01f,
- 4.72478658e-01f,
- 4.74640369e-01f,
- 4.76799220e-01f,
- 4.78955209e-01f,
- 4.81108308e-01f,
- 4.83258516e-01f,
- 4.85405803e-01f,
- 4.87550169e-01f,
- 4.89691585e-01f,
- 4.91830051e-01f,
- 4.93965566e-01f,
- 4.96098131e-01f,
- 4.98227656e-01f,
- 5.00354230e-01f,
- 5.02477765e-01f,
- 5.04598260e-01f,
- 5.06715715e-01f,
- 5.08830130e-01f,
- 5.10941505e-01f,
- 5.13049781e-01f,
- 5.15154958e-01f,
- 5.17257035e-01f,
- 5.19356012e-01f,
- 5.21451831e-01f,
- 5.23544490e-01f,
- 5.25634050e-01f,
- 5.27720451e-01f,
- 5.29803634e-01f,
- 5.31883657e-01f,
- 5.33960402e-01f,
- 5.36033988e-01f,
- 5.38104355e-01f,
- 5.40171444e-01f,
- 5.42235315e-01f,
- 5.44295907e-01f,
- 5.46353221e-01f,
- 5.48407257e-01f,
- 5.50457954e-01f,
- 5.52505374e-01f,
- 5.54549456e-01f,
- 5.56590199e-01f,
- 5.58627546e-01f,
- 5.60661554e-01f,
- 5.62692225e-01f,
- 5.64719439e-01f,
- 5.66743314e-01f,
- 5.68763733e-01f,
- 5.70780754e-01f,
- 5.72794318e-01f,
- 5.74804425e-01f,
- 5.76811075e-01f,
- 5.78814268e-01f,
- 5.80813944e-01f,
- 5.82810163e-01f,
- 5.84802806e-01f,
- 5.86791992e-01f,
- 5.88777602e-01f,
- 5.90759695e-01f,
- 5.92738211e-01f,
- 5.94713151e-01f,
- 5.96684515e-01f,
- 5.98652303e-01f,
- 6.00616455e-01f,
- 6.02577031e-01f,
- 6.04533970e-01f,
- 6.06487215e-01f,
- 6.08436823e-01f,
- 6.10382795e-01f,
- 6.12325072e-01f,
- 6.14263654e-01f,
- 6.16198599e-01f,
- 6.18129730e-01f,
- 6.20057225e-01f,
- 6.21980906e-01f,
- 6.23900890e-01f,
- 6.25817120e-01f,
- 6.27729595e-01f,
- 6.29638255e-01f,
- 6.31543100e-01f,
- 6.33444190e-01f,
- 6.35341406e-01f,
- 6.37234867e-01f,
- 6.39124453e-01f,
- 6.41010165e-01f,
- 6.42892063e-01f,
- 6.44770086e-01f,
- 6.46644175e-01f,
- 6.48514390e-01f,
- 6.50380731e-01f,
- 6.52243137e-01f,
- 6.54101610e-01f,
- 6.55956089e-01f,
- 6.57806695e-01f,
- 6.59653306e-01f,
- 6.61495924e-01f,
- 6.63334608e-01f,
- 6.65169239e-01f,
- 6.66999936e-01f,
- 6.68826580e-01f,
- 6.70649171e-01f,
- 6.72467709e-01f,
- 6.74282253e-01f,
- 6.76092684e-01f,
- 6.77899063e-01f,
- 6.79701388e-01f,
- 6.81499600e-01f,
- 6.83293700e-01f,
- 6.85083687e-01f,
- 6.86869502e-01f,
- 6.88651264e-01f,
- 6.90428793e-01f,
- 6.92202210e-01f,
- 6.93971455e-01f,
- 6.95736527e-01f,
- 6.97497368e-01f,
- 6.99254036e-01f,
- 7.01006532e-01f,
- 7.02754736e-01f,
- 7.04498768e-01f,
- 7.06238508e-01f,
- 7.07974017e-01f,
- 7.09705234e-01f,
- 7.11432219e-01f,
- 7.13154852e-01f,
- 7.14873254e-01f,
- 7.16587305e-01f,
- 7.18297064e-01f,
- 7.20002532e-01f,
- 7.21703589e-01f,
- 7.23400354e-01f,
- 7.25092709e-01f,
- 7.26780772e-01f,
- 7.28464365e-01f,
- 7.30143666e-01f,
- 7.31818497e-01f,
- 7.33488917e-01f,
- 7.35154986e-01f,
- 7.36816585e-01f,
- 7.38473713e-01f,
- 7.40126431e-01f,
- 7.41774678e-01f,
- 7.43418455e-01f,
- 7.45057762e-01f,
- 7.46692598e-01f,
- 7.48322904e-01f,
- 7.49948740e-01f,
- 7.51570046e-01f,
- 7.53186822e-01f,
- 7.54799008e-01f,
- 7.56406724e-01f,
- 7.58009851e-01f,
- 7.59608388e-01f,
- 7.61202395e-01f,
- 7.62791812e-01f,
- 7.64376581e-01f,
- 7.65956819e-01f,
- 7.67532349e-01f,
- 7.69103348e-01f,
- 7.70669639e-01f,
- 7.72231340e-01f,
- 7.73788393e-01f,
- 7.75340736e-01f,
- 7.76888490e-01f,
- 7.78431475e-01f,
- 7.79969811e-01f,
- 7.81503439e-01f,
- 7.83032358e-01f,
- 7.84556568e-01f,
- 7.86076069e-01f,
- 7.87590802e-01f,
- 7.89100826e-01f,
- 7.90606081e-01f,
- 7.92106569e-01f,
- 7.93602288e-01f,
- 7.95093238e-01f,
- 7.96579361e-01f,
- 7.98060715e-01f,
- 7.99537241e-01f,
- 8.01008999e-01f,
- 8.02475870e-01f,
- 8.03937972e-01f,
- 8.05395186e-01f,
- 8.06847572e-01f,
- 8.08295071e-01f,
- 8.09737682e-01f,
- 8.11175466e-01f,
- 8.12608361e-01f,
- 8.14036310e-01f,
- 8.15459430e-01f,
- 8.16877604e-01f,
- 8.18290830e-01f,
- 8.19699109e-01f,
- 8.21102500e-01f,
- 8.22500944e-01f,
- 8.23894441e-01f,
- 8.25282931e-01f,
- 8.26666474e-01f,
- 8.28045070e-01f,
- 8.29418600e-01f,
- 8.30787182e-01f,
- 8.32150757e-01f,
- 8.33509326e-01f,
- 8.34862888e-01f,
- 8.36211383e-01f,
- 8.37554872e-01f,
- 8.38893294e-01f,
- 8.40226650e-01f,
- 8.41554999e-01f,
- 8.42878222e-01f,
- 8.44196379e-01f,
- 8.45509470e-01f,
- 8.46817434e-01f,
- 8.48120332e-01f,
- 8.49418104e-01f,
- 8.50710809e-01f,
- 8.51998329e-01f,
- 8.53280723e-01f,
- 8.54557991e-01f,
- 8.55830133e-01f,
- 8.57097089e-01f,
- 8.58358860e-01f,
- 8.59615505e-01f,
- 8.60866964e-01f,
- 8.62113178e-01f,
- 8.63354266e-01f,
- 8.64590168e-01f,
- 8.65820825e-01f,
- 8.67046237e-01f,
- 8.68266463e-01f,
- 8.69481444e-01f,
- 8.70691240e-01f,
- 8.71895730e-01f,
- 8.73094976e-01f,
- 8.74288976e-01f,
- 8.75477731e-01f,
- 8.76661181e-01f,
- 8.77839327e-01f,
- 8.79012227e-01f,
- 8.80179822e-01f,
- 8.81342113e-01f,
- 8.82499099e-01f,
- 8.83650780e-01f,
- 8.84797096e-01f,
- 8.85938108e-01f,
- 8.87073815e-01f,
- 8.88204098e-01f,
- 8.89329076e-01f,
- 8.90448749e-01f,
- 8.91562998e-01f,
- 8.92671883e-01f,
- 8.93775403e-01f,
- 8.94873500e-01f,
- 8.95966232e-01f,
- 8.97053599e-01f,
- 8.98135543e-01f,
- 8.99212062e-01f,
- 9.00283158e-01f,
- 9.01348829e-01f,
- 9.02409077e-01f,
- 9.03463900e-01f,
- 9.04513299e-01f,
- 9.05557215e-01f,
- 9.06595707e-01f,
- 9.07628715e-01f,
- 9.08656240e-01f,
- 9.09678340e-01f,
- 9.10694897e-01f,
- 9.11706030e-01f,
- 9.12711620e-01f,
- 9.13711786e-01f,
- 9.14706349e-01f,
- 9.15695488e-01f,
- 9.16679084e-01f,
- 9.17657137e-01f,
- 9.18629646e-01f,
- 9.19596672e-01f,
- 9.20558095e-01f,
- 9.21514034e-01f,
- 9.22464430e-01f,
- 9.23409224e-01f,
- 9.24348474e-01f,
- 9.25282121e-01f,
- 9.26210225e-01f,
- 9.27132785e-01f,
- 9.28049684e-01f,
- 9.28961039e-01f,
- 9.29866791e-01f,
- 9.30766940e-01f,
- 9.31661487e-01f,
- 9.32550430e-01f,
- 9.33433771e-01f,
- 9.34311450e-01f,
- 9.35183525e-01f,
- 9.36049938e-01f,
- 9.36910748e-01f,
- 9.37765896e-01f,
- 9.38615382e-01f,
- 9.39459205e-01f,
- 9.40297425e-01f,
- 9.41129923e-01f,
- 9.41956758e-01f,
- 9.42777932e-01f,
- 9.43593442e-01f,
- 9.44403291e-01f,
- 9.45207417e-01f,
- 9.46005821e-01f,
- 9.46798563e-01f,
- 9.47585583e-01f,
- 9.48366940e-01f,
- 9.49142516e-01f,
- 9.49912429e-01f,
- 9.50676560e-01f,
- 9.51435030e-01f,
- 9.52187717e-01f,
- 9.52934682e-01f,
- 9.53675926e-01f,
- 9.54411447e-01f,
- 9.55141187e-01f,
- 9.55865145e-01f,
- 9.56583381e-01f,
- 9.57295835e-01f,
- 9.58002567e-01f,
- 9.58703458e-01f,
- 9.59398627e-01f,
- 9.60088015e-01f,
- 9.60771620e-01f,
- 9.61449385e-01f,
- 9.62121427e-01f,
- 9.62787628e-01f,
- 9.63448048e-01f,
- 9.64102626e-01f,
- 9.64751422e-01f,
- 9.65394437e-01f,
- 9.66031611e-01f,
- 9.66663003e-01f,
- 9.67288494e-01f,
- 9.67908204e-01f,
- 9.68522072e-01f,
- 9.69130158e-01f,
- 9.69732344e-01f,
- 9.70328689e-01f,
- 9.70919251e-01f,
- 9.71503913e-01f,
- 9.72082734e-01f,
- 9.72655654e-01f,
- 9.73222792e-01f,
- 9.73784029e-01f,
- 9.74339366e-01f,
- 9.74888861e-01f,
- 9.75432515e-01f,
- 9.75970268e-01f,
- 9.76502120e-01f,
- 9.77028131e-01f,
- 9.77548242e-01f,
- 9.78062451e-01f,
- 9.78570819e-01f,
- 9.79073226e-01f,
- 9.79569793e-01f,
- 9.80060399e-01f,
- 9.80545104e-01f,
- 9.81023967e-01f,
- 9.81496871e-01f,
- 9.81963873e-01f,
- 9.82424974e-01f,
- 9.82880116e-01f,
- 9.83329356e-01f,
- 9.83772695e-01f,
- 9.84210074e-01f,
- 9.84641552e-01f,
- 9.85067070e-01f,
- 9.85486686e-01f,
- 9.85900342e-01f,
- 9.86308098e-01f,
- 9.86709893e-01f,
- 9.87105727e-01f,
- 9.87495601e-01f,
- 9.87879574e-01f,
- 9.88257587e-01f,
- 9.88629639e-01f,
- 9.88995671e-01f,
- 9.89355803e-01f,
- 9.89709973e-01f,
- 9.90058184e-01f,
- 9.90400434e-01f,
- 9.90736723e-01f,
- 9.91067052e-01f,
- 9.91391361e-01f,
- 9.91709769e-01f,
- 9.92022157e-01f,
- 9.92328584e-01f,
- 9.92628992e-01f,
- 9.92923498e-01f,
- 9.93211925e-01f,
- 9.93494451e-01f,
- 9.93770957e-01f,
- 9.94041502e-01f,
- 9.94306028e-01f,
- 9.94564593e-01f,
- 9.94817138e-01f,
- 9.95063663e-01f,
- 9.95304286e-01f,
- 9.95538831e-01f,
- 9.95767415e-01f,
- 9.95989978e-01f,
- 9.96206582e-01f,
- 9.96417165e-01f,
- 9.96621728e-01f,
- 9.96820271e-01f,
- 9.97012854e-01f,
- 9.97199416e-01f,
- 9.97379959e-01f,
- 9.97554541e-01f,
- 9.97723043e-01f,
- 9.97885585e-01f,
- 9.98042107e-01f,
- 9.98192608e-01f,
- 9.98337090e-01f,
- 9.98475552e-01f,
- 9.98608053e-01f,
- 9.98734474e-01f,
- 9.98854935e-01f,
- 9.98969316e-01f,
- 9.99077737e-01f,
- 9.99180079e-01f,
- 9.99276459e-01f,
- 9.99366820e-01f,
- 9.99451101e-01f,
- 9.99529421e-01f,
- 9.99601722e-01f,
- 9.99667943e-01f,
- 9.99728203e-01f,
- 9.99782383e-01f,
- 9.99830604e-01f,
- 9.99872744e-01f,
- 9.99908864e-01f,
- 9.99939024e-01f,
- 9.99963105e-01f,
- 9.99981165e-01f,
- 9.99993205e-01f,
- 9.99999225e-01f
-};
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * common.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "huff_tab.h"
-#include "tables.h"
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-static void compute_raw_pow_categories(int16_t *power_categories,
- int16_t *rms_index,
- int16_t number_of_regions,
- int16_t offset);
-
-/* Compute a series of categorizations */
-void categorize(int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t *rms_index,
- int16_t *power_categories,
- int16_t *category_balances)
-{
-
- int16_t offset;
- int16_t temp;
- int16_t frame_size;
-
- /* At higher bit rates, there is an increase for most categories in average bit
- consumption per region. We compensate for this by pretending we have fewer
- available bits. */
- frame_size = (number_of_regions == NUMBER_OF_REGIONS) ? DCT_LENGTH : MAX_DCT_LENGTH;
-
- temp = sub(number_of_available_bits, frame_size);
- if (temp > 0)
- {
- number_of_available_bits = sub(number_of_available_bits, frame_size);
- number_of_available_bits = (int16_t) L_mult0(number_of_available_bits, 5);
- number_of_available_bits = shr(number_of_available_bits, 3);
- number_of_available_bits = add(number_of_available_bits, frame_size);
- }
-
- /* calculate the offset using the original category assignments */
- offset = calc_offset(rms_index, number_of_regions, number_of_available_bits);
-
- /* compute the power categories based on the uniform offset */
- compute_raw_pow_categories(power_categories, rms_index, number_of_regions,offset);
-
- /* adjust the category assignments */
- /* compute the new power categories and category balances */
- comp_powercat_and_catbalance(power_categories ,category_balances, rms_index, number_of_available_bits, number_of_regions, num_categorization_control_possibilities, offset);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute the power_categories and the category balances */
-void comp_powercat_and_catbalance(int16_t *power_categories,
- int16_t *category_balances,
- int16_t *rms_index,
- int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t offset)
-{
- int16_t expected_number_of_code_bits;
- int16_t region;
- int16_t max_region;
- int16_t j;
- int16_t max_rate_categories[MAX_NUMBER_OF_REGIONS];
- int16_t min_rate_categories[MAX_NUMBER_OF_REGIONS];
- int16_t temp_category_balances[2*MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES];
- int16_t raw_max;
- int16_t raw_min;
- int16_t raw_max_index;
- int16_t raw_min_index;
- int16_t max_rate_pointer;
- int16_t min_rate_pointer;
- int16_t max;
- int16_t min;
- int16_t itemp0;
- int16_t itemp1;
- int16_t min_plus_max;
- int16_t two_x_number_of_available_bits;
- int16_t temp;
-
- expected_number_of_code_bits = 0;
- raw_max_index = 0;
- raw_min_index = 0;
-
- for (region = 0; region < number_of_regions; region++)
- expected_number_of_code_bits = add(expected_number_of_code_bits, expected_bits_table[power_categories[region]]);
-
- for (region = 0; region < number_of_regions; region++)
- {
- max_rate_categories[region] = power_categories[region];
- min_rate_categories[region] = power_categories[region];
- }
-
- max = expected_number_of_code_bits;
- min = expected_number_of_code_bits;
- max_rate_pointer = num_categorization_control_possibilities;
- min_rate_pointer = num_categorization_control_possibilities;
-
- for (j = 0; j < num_categorization_control_possibilities - 1; j++)
- {
- min_plus_max = add(max, min);
- two_x_number_of_available_bits = shl(number_of_available_bits, 1);
-
- temp = sub(min_plus_max, two_x_number_of_available_bits);
- if (temp <= 0)
- {
- raw_min = 99;
- /* Search from lowest freq regions to highest for best */
- /* region to reassign to a higher bit rate category. */
- for (region = 0; region < number_of_regions; region++)
- {
- if (max_rate_categories[region] > 0)
- {
- itemp0 = shl(max_rate_categories[region], 1);
- itemp1 = sub(offset, rms_index[region]);
- itemp0 = sub(itemp1, itemp0);
-
- temp = sub(itemp0, raw_min);
- if (temp < 0)
- {
- raw_min = itemp0;
- raw_min_index = region;
- }
- }
- }
- max_rate_pointer = sub(max_rate_pointer, 1);
- temp_category_balances[max_rate_pointer] = raw_min_index;
-
- max = sub(max,expected_bits_table[max_rate_categories[raw_min_index]]);
- max_rate_categories[raw_min_index] = sub(max_rate_categories[raw_min_index], 1);
-
- max = add(max,expected_bits_table[max_rate_categories[raw_min_index]]);
- }
- else
- {
- raw_max = -99;
- /* Search from highest freq regions to lowest for best region to reassign to
- a lower bit rate category. */
- max_region = sub(number_of_regions, 1);
- for (region = max_region; region >= 0; region--)
- {
- temp = sub(min_rate_categories[region], (NUM_CATEGORIES - 1));
- if (temp < 0)
- {
- itemp0 = shl(min_rate_categories[region], 1);
- itemp1 = sub(offset, rms_index[region]);
- itemp0 = sub(itemp1, itemp0);
-
- temp = sub(itemp0, raw_max);
- if (temp > 0)
- {
- raw_max = itemp0;
- raw_max_index = region;
- }
- }
- }
- temp_category_balances[min_rate_pointer] = raw_max_index;
- min_rate_pointer = add(min_rate_pointer, 1);
- min = sub(min, expected_bits_table[min_rate_categories[raw_max_index]]);
-
- min_rate_categories[raw_max_index] = add(min_rate_categories[raw_max_index], 1);
- min = add(min, expected_bits_table[min_rate_categories[raw_max_index]]);
- }
- }
-
- for (region = 0; region < number_of_regions; region++)
- power_categories[region] = max_rate_categories[region];
-
- for (j = 0; j < num_categorization_control_possibilities - 1; j++)
- category_balances[j] = temp_category_balances[max_rate_pointer++];
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Calculate the the category offset. This is the shift required
- To get the most out of the number of available bits. A binary
- type search is used to find the offset. */
-int16_t calc_offset(int16_t *rms_index, int16_t number_of_regions, int16_t available_bits)
-{
- int16_t answer;
- int16_t delta;
- int16_t test_offset;
- int16_t region;
- int16_t j;
- int16_t power_cats[MAX_NUMBER_OF_REGIONS];
- int16_t bits;
- int16_t offset;
- int16_t temp;
-
- /* initialize vars */
- answer = -32;
- delta = 32;
-
- do
- {
- test_offset = add(answer, delta);
-
- /* obtain a category for each region */
- /* using the test offset */
- for (region = 0; region < number_of_regions; region++)
- {
- j = sub(test_offset, rms_index[region]);
- j = shr(j, 1);
-
- /* Ensure j is between 0 and NUM_CAT-1 */
- if (j < 0)
- j = 0;
- temp = sub(j, NUM_CATEGORIES - 1);
- if (temp > 0)
- j = sub(NUM_CATEGORIES, 1);
- power_cats[region] = j;
- }
- bits = 0;
-
- /* compute the number of bits that will be used given the cat assignments */
- for (region = 0; region < number_of_regions; region++)
- bits = add(bits, expected_bits_table[power_cats[region]]);
-
- /* If (bits > available_bits - 32) then divide the offset region for the bin search */
- offset = sub(available_bits, 32);
- temp = sub(bits, offset);
- if (temp >= 0)
- answer = test_offset;
- delta = shr(delta, 1);
- }
- while (delta > 0);
-
- return answer;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute the power categories given the offset
- This is kind of redundant since they were already computed
- in calc_offset to determine the offset. */
-static void compute_raw_pow_categories(int16_t *power_categories, int16_t *rms_index, int16_t number_of_regions, int16_t offset)
-{
- int16_t region;
- int16_t j;
- int16_t temp;
-
- for (region = 0; region < number_of_regions; region++)
- {
- j = sub(offset, rms_index[region]);
- j = shr(j, 1);
-
- /* make sure j is between 0 and NUM_CAT-1 */
- if (j < 0)
- j = 0;
- temp = sub(j, (NUM_CATEGORIES - 1));
- if (temp > 0)
- j = sub(NUM_CATEGORIES, 1);
-
- power_categories[region] = j;
- }
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * commonf.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "tables.h"
-#include "huff_tab.h"
-
-#if !defined(G722_1_USE_FIXED_POINT)
-
-/* Compute a series of categorizations */
-void categorize(int number_of_regions,
- int number_of_available_bits,
- int rms_index[MAX_NUMBER_OF_REGIONS],
- int power_categories[MAX_NUMBER_OF_REGIONS],
- int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1])
-{
- int region;
- int i;
- int expected_number_of_code_bits;
- int delta;
- int offset;
- int test_offset;
- int num_categorization_control_possibilities;
- int max_rate_categories[MAX_NUMBER_OF_REGIONS];
- int min_rate_categories[MAX_NUMBER_OF_REGIONS];
- int temp_category_balances[2*MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES];
- int raw_max;
- int raw_min;
- int raw_max_index;
- int raw_min_index;
- int max_rate_pointer;
- int min_rate_pointer;
- int max;
- int min;
- int itemp0;
-
- if (number_of_regions == NUMBER_OF_REGIONS)
- num_categorization_control_possibilities = NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- else
- num_categorization_control_possibilities = MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
-
- /* At higher bit rates, there is an increase for most categories in average bit
- consumption per region. We compensate for this by pretending we have fewer
- available bits.
- */
- if (number_of_regions == NUMBER_OF_REGIONS)
- {
- if (number_of_available_bits > FRAME_SIZE)
- number_of_available_bits = FRAME_SIZE + (((number_of_available_bits - FRAME_SIZE)*5) >> 3);
- }
- else if (number_of_regions == MAX_NUMBER_OF_REGIONS)
- {
- if (number_of_available_bits > MAX_FRAME_SIZE)
- number_of_available_bits = MAX_FRAME_SIZE + (((number_of_available_bits - MAX_FRAME_SIZE)*5) >> 3);
- }
-
- offset = -32;
- delta = 32;
- do
- {
- test_offset = offset + delta;
- for (region = 0; region < number_of_regions; region++)
- {
- i = (test_offset - rms_index[region]) >> 1;
- if (i < 0)
- i = 0;
- else if (i > NUM_CATEGORIES - 1)
- i = NUM_CATEGORIES - 1;
- power_categories[region] = i;
- }
- expected_number_of_code_bits = 0;
- for (region = 0; region < number_of_regions; region++)
- expected_number_of_code_bits += expected_bits_table[power_categories[region]];
-
- if (expected_number_of_code_bits >= number_of_available_bits - 32)
- offset = test_offset;
-
- delta >>= 1;
- }
- while (delta > 0);
-
- for (region = 0; region < number_of_regions; region++)
- {
- i = (offset - rms_index[region]) >> 1;
- if (i < 0)
- i = 0;
- else if (i > NUM_CATEGORIES - 1)
- i = NUM_CATEGORIES - 1;
- power_categories[region] = i;
- }
- expected_number_of_code_bits = 0;
- for (region = 0; region < number_of_regions; region++)
- expected_number_of_code_bits += expected_bits_table[power_categories[region]];
-
- for (region = 0; region < number_of_regions; region++)
- {
- max_rate_categories[region] = power_categories[region];
- min_rate_categories[region] = power_categories[region];
- }
-
- max = expected_number_of_code_bits;
- min = expected_number_of_code_bits;
- max_rate_pointer = num_categorization_control_possibilities;
- min_rate_pointer = num_categorization_control_possibilities;
-
- raw_min_index = 0;
- raw_max_index = 0;
- for (i = 0; i < num_categorization_control_possibilities - 1; i++)
- {
- if (max + min <= 2*number_of_available_bits)
- {
- raw_min = 99;
-
- /* Search from lowest freq regions to highest for best region to reassign to
- a higher bit rate category. */
- for (region = 0; region < number_of_regions; region++)
- {
- if (max_rate_categories[region] > 0)
- {
- itemp0 = offset - rms_index[region] - 2*max_rate_categories[region];
- if (itemp0 < raw_min)
- {
- raw_min = itemp0;
- raw_min_index = region;
- }
- }
- }
- max_rate_pointer--;
- temp_category_balances[max_rate_pointer] = raw_min_index;
-
- max -= expected_bits_table[max_rate_categories[raw_min_index]];
- max_rate_categories[raw_min_index] -= 1;
- max += expected_bits_table[max_rate_categories[raw_min_index]];
- }
- else
- {
- raw_max = -99;
-
- /* Search from highest freq regions to lowest for best region to reassign to
- a lower bit rate category. */
- for (region = number_of_regions - 1; region >= 0; region--)
- {
- if (min_rate_categories[region] < NUM_CATEGORIES - 1)
- {
- itemp0 = offset - rms_index[region] - 2*min_rate_categories[region];
- if (itemp0 > raw_max)
- {
- raw_max = itemp0;
- raw_max_index = region;
- }
- }
- }
- temp_category_balances[min_rate_pointer] = raw_max_index;
- min_rate_pointer++;
-
- min -= expected_bits_table[min_rate_categories[raw_max_index]];
- min_rate_categories[raw_max_index]++;
- min += expected_bits_table[min_rate_categories[raw_max_index]];
- }
- }
-
- for (i = 0; i < number_of_regions; i++)
- power_categories[i] = max_rate_categories[i];
-
- for (i = 0; i < num_categorization_control_possibilities - 1; i++)
- category_balances[i] = temp_category_balances[max_rate_pointer++];
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * dct4.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C)2004 Polycom, Inc.
- * 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.
- */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <memory.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "utilities.h"
-
-#if !defined(G722_1_USE_FIXED_POINT)
-
-typedef struct
-{
- float cosine;
- float minus_sine;
-} cos_msin_t;
-
-#include "dct4.h"
-
-static const cos_msin_t *cos_msin_table[] =
-{
- cos_msin_5,
- cos_msin_10,
- cos_msin_20,
- cos_msin_40,
- cos_msin_80,
- cos_msin_160,
- cos_msin_320,
- cos_msin_640
-};
-
-/* Discrete Cosine Transform, Type IV */
-void dct_type_iv(float input[], float output[], int dct_length)
-{
- float buffer_a[MAX_DCT_LENGTH];
- float buffer_b[MAX_DCT_LENGTH];
- float buffer_c[MAX_DCT_LENGTH];
- float *in_ptr;
- float *in_ptr_low;
- float *in_ptr_high;
- float *next_in_base;
- float *out_ptr;
- float *next_out_base;
- float *out_buffer;
- float *in_buffer;
- float *buffer_swap;
- float *fptr0;
- float in_val_low;
- float in_val_high;
- float cos_even;
- float cos_odd;
- float msin_even;
- float msin_odd;
- const float *fptr2;
- const float *core_a;
- const cos_msin_t **table_ptr_ptr;
- const cos_msin_t *cos_msin_ptr;
- int set_span;
- int set_count;
- int set_count_log;
- int pairs_left;
- int sets_left;
- int i;
- int k;
- int dct_length_log;
-
- if (dct_length == MAX_DCT_LENGTH)
- {
- core_a = max_dct_core_a;
- dct_length_log = MAX_DCT_LENGTH_LOG;
- }
- else
- {
- core_a = dct_core_a;
- dct_length_log = DCT_LENGTH_LOG;
- }
-
- /* Do the sum/difference butterflies, the first part of
- converting one N-point transform into N/2 two-point
- transforms, where N = 1 << dct_length_log. */
- in_buffer = input;
- out_buffer = buffer_a;
- for (set_count_log = 0; set_count_log <= dct_length_log - 2; set_count_log++)
- {
- /* Initialization for the loop over sets at the current size */
- set_span = dct_length >> set_count_log;
-
- set_count = 1 << set_count_log;
- in_ptr = in_buffer;
- next_out_base = out_buffer;
-
- /* Loop over all the sets of this size */
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Set up output pointers for the current set */
- out_ptr = next_out_base;
- next_out_base += set_span;
-
- /* Loop over all the butterflies in the current set */
- for (i = 0; i < (set_span >> 1); i++)
- {
- in_val_low = *in_ptr++;
- in_val_high = *in_ptr++;
- out_ptr[i] = in_val_low + in_val_high;
- out_ptr[set_span - 1 - i] = in_val_low - in_val_high;
- }
- }
-
- /* Decide which buffers to use as input and output next time.
- Except for the first time (when the input buffer is the
- subroutine input) we just alternate the local buffers. */
- in_buffer = out_buffer;
- out_buffer = (out_buffer == buffer_a) ? buffer_b : buffer_a;
- }
-
- /* Do dct_size/10 ten-point transforms */
- fptr0 = in_buffer;
- buffer_swap = buffer_c;
- for (pairs_left = 1 << (dct_length_log - 1); pairs_left > 0; pairs_left--)
- {
- fptr2 = core_a;
- for (k = 0; k < CORE_SIZE; k++)
- {
- buffer_swap[k] = vec_dot_prodf(fptr0, fptr2, CORE_SIZE);
- fptr2 += CORE_SIZE;
- }
- fptr0 += CORE_SIZE;
- buffer_swap += CORE_SIZE;
- }
-
- memcpy(in_buffer, buffer_c, dct_length*sizeof(float));
-
- table_ptr_ptr = cos_msin_table;
-
- /* Perform rotation butterflies */
- for (set_count_log = dct_length_log - 2; set_count_log >= 0; set_count_log--)
- {
- /* Initialization for the loop over sets at the current size */
- set_span = dct_length >> set_count_log;
- set_count = 1 << set_count_log;
- next_in_base = in_buffer;
- next_out_base = (set_count_log == 0) ? output : out_buffer;
- table_ptr_ptr++;
-
- /* Loop over all the sets of this size */
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Set up the pointers for the current set */
- in_ptr_low = next_in_base;
- in_ptr_high = in_ptr_low + (set_span >> 1);
- out_ptr = next_out_base;
- cos_msin_ptr = *table_ptr_ptr;
-
- /* Loop over all the butterfly pairs in the current set */
- for (i = 0; i < (set_span >> 1); i += 2)
- {
- cos_even = cos_msin_ptr[i].cosine;
- msin_even = cos_msin_ptr[i].minus_sine;
- cos_odd = cos_msin_ptr[i + 1].cosine;
- msin_odd = cos_msin_ptr[i + 1].minus_sine;
- out_ptr[i] = cos_even*in_ptr_low[i] - msin_even*in_ptr_high[i];
- out_ptr[set_span - 1 - i] = msin_even*in_ptr_low[i] + cos_even*in_ptr_high[i];
- out_ptr[i + 1] = cos_odd*in_ptr_low[i + 1] + msin_odd*in_ptr_high[i + 1];
- out_ptr[set_span - 2 - i] = msin_odd*in_ptr_low[i + 1] - cos_odd*in_ptr_high[i + 1];
- }
- next_in_base += set_span;
- next_out_base += set_span;
- }
-
- /* Swap input and output buffers for next time */
- buffer_swap = in_buffer;
- in_buffer = out_buffer;
- out_buffer = buffer_swap;
- }
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * dct4_a.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/* Discrete Cosine Transform, Type IV used for MLT
-
- The basis functions are
-
- cos(PI*(t+0.5)*(k+0.5)/block_length)
-
- for time t and basis function number k. Due to the symmetry of the
- expression in t and k, it is clear that the forward and inverse transforms
- are the same. */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-#include "dct4_a.h"
-
-/* Discrete Cosine Transform, Type IV used for MLT */
-void dct_type_iv_a(int16_t input[], int16_t output[], int dct_length)
-{
- int16_t buffer_a[MAX_DCT_LENGTH];
- int16_t buffer_b[MAX_DCT_LENGTH];
- int16_t buffer_c[MAX_DCT_LENGTH];
- int16_t *in_ptr;
- int16_t *out_ptr;
- int16_t *in_buffer;
- int16_t *out_buffer;
- int16_t *buffer_swap;
- int16_t in_val_low;
- int16_t in_val_high;
- int16_t in_low_even;
- int16_t in_low_odd;
- int16_t in_high_even;
- int16_t in_high_odd;
- int16_t *pair_ptr;
- int16_t cos_even;
- int16_t cos_odd;
- int16_t msin_even;
- int16_t msin_odd;
- int32_t sum;
- int16_t set_span;
- int16_t half_span;
- int16_t set_count;
- int16_t set_count_log;
- int16_t pairs_left;
- int16_t sets_left;
- int16_t i;
- int16_t k;
- int16_t index;
- int16_t temp;
- int32_t acca;
- int16_t dct_length_log;
- const cos_msin_t **table_ptr_ptr;
- const cos_msin_t *cos_msin_ptr;
-
- /* Do the sum/difference butterflies, the first part of
- converting one N-point transform into N/2 two-point
- transforms, where N = 1 << DCT_LENGTH_LOG. = 64/128 */
- if (dct_length == DCT_LENGTH)
- {
- dct_length_log = DCT_LENGTH_LOG;
-
- /* Add bias offsets */
- for (i = 0; i < dct_length; i++)
- input[i] = add(input[i], anal_bias[i]);
- }
- else
- {
- dct_length_log = MAX_DCT_LENGTH_LOG;
- }
- index = 0L;
- in_buffer = input;
- out_buffer = buffer_a;
- temp = dct_length_log - 2;
- for (set_count_log = 0; set_count_log <= temp; set_count_log++)
- {
- /* Loop over all the sets at the current size */
- set_span = dct_length >> set_count_log;
- set_count = 1 << set_count_log;
- half_span = set_span >> 1;
- in_ptr = in_buffer;
- out_ptr = out_buffer;
-
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Loop over all the butterflies in the current set */
- for (i = 0; i < half_span; i++)
- {
- in_val_low = *in_ptr++;
- in_val_high = *in_ptr++;
-
- acca = L_add(in_val_low, in_val_high);
- out_ptr[i] = (int16_t) L_shr(acca, 1);
-
- acca = L_sub(in_val_low, in_val_high);
- out_ptr[set_span - 1 - i] = (int16_t) L_shr(acca, 1);
- }
- out_ptr += set_span;
- }
-
- /* Decide which buffers to use as input and output next time.
- Except for the first time (when the input buffer is the
- subroutine input) we just alternate the local buffers. */
- in_buffer = out_buffer;
- out_buffer = (out_buffer == buffer_a) ? buffer_b : buffer_a;
- index = add(index, 1);
- }
-
- /* Do N/2 two-point transforms, where N = 1 << DCT_LENGTH_LOG */
- pair_ptr = in_buffer;
- buffer_swap = buffer_c;
- temp = 1 << (dct_length_log - 1);
- for (pairs_left = temp; pairs_left > 0; pairs_left--)
- {
- for (k = 0; k < CORE_SIZE; k++)
- {
- sum = 0L;
- for (i = 0; i < CORE_SIZE; i++)
- sum = L_mac(sum, pair_ptr[i], dct_core_a[i][k]);
- buffer_swap[k] = xround(sum);
- }
- pair_ptr += CORE_SIZE;
- buffer_swap += CORE_SIZE;
- }
-
- for (i = 0; i < dct_length; i++)
- in_buffer[i] = buffer_c[i];
-
- table_ptr_ptr = a_cos_msin_table;
-
- /* Perform rotation butterflies */
- temp = sub(dct_length_log, 2);
- for (set_count_log = temp; set_count_log >= 0; set_count_log--)
- {
- /* Loop over all the sets at the current size */
- set_span = dct_length >> set_count_log;
- set_count = 1 << set_count_log;
- half_span = set_span >> 1;
- in_ptr = in_buffer;
- out_ptr = (set_count_log == 0) ? output : out_buffer;
- cos_msin_ptr = *table_ptr_ptr++;
-
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Loop over all the butterfly pairs in the current set */
- for (i = 0; i < half_span; i += 2)
- {
- in_low_even = in_ptr[i];
- in_low_odd = in_ptr[i + 1];
- in_high_even = in_ptr[half_span + i];
- in_high_odd = in_ptr[half_span + i + 1];
-
- cos_even = cos_msin_ptr[i].cosine;
- msin_even = cos_msin_ptr[i].minus_sine;
- cos_odd = cos_msin_ptr[i + 1].cosine;
- msin_odd = cos_msin_ptr[i + 1].minus_sine;
-
- sum = L_mult(cos_even, in_low_even);
- sum = L_mac(sum, -msin_even, in_high_even);
- out_ptr[i] = xround(sum);
-
- sum = L_mult(msin_even,in_low_even);
- sum = L_mac(sum, cos_even, in_high_even);
- out_ptr[set_span - 1 - i] = xround(sum);
-
- sum = L_mult(cos_odd, in_low_odd);
- sum = L_mac(sum, msin_odd, in_high_odd);
- out_ptr[i + 1] = xround(sum);
-
- sum = L_mult(msin_odd, in_low_odd);
- sum = L_mac(sum, -cos_odd, in_high_odd);
- out_ptr[set_span - 2 - i] = xround(sum);
- }
- in_ptr += set_span;
- out_ptr += set_span;
- }
-
- /* Swap input and output buffers for next time */
- buffer_swap = in_buffer;
- in_buffer = out_buffer;
- out_buffer = buffer_swap;
- }
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * dct4_a.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-typedef struct
-{
- int16_t cosine;
- int16_t minus_sine;
-} cos_msin_t;
-
-static const cos_msin_t a_cos_msin_2[10] =
-{
- {29805, -1171},
- {29621, -3506},
- {29255, -5819},
- {28708, -8097},
- {27984, -10324},
- {27088, -12488},
- {26025, -14575},
- {24801, -16572},
- {23425, -18466},
- {21903, -20247}
-};
-
-static const cos_msin_t a_cos_msin_4[20] =
-{
- {29822, -586},
- {29776, -1756},
- {29684, -2924},
- {29547, -4087},
- {29364, -5244},
- {29135, -6392},
- {28862, -7531},
- {28544, -8659},
- {28182, -9773},
- {27776, -10871},
- {27328, -11954},
- {26838, -13017},
- {26306, -14061},
- {25734, -15083},
- {25122, -16081},
- {24471, -17055},
- {23783, -18003},
- {23057, -18923},
- {22297, -19813},
- {21502, -20673}
-};
-
-static const cos_msin_t a_cos_msin_8[40] =
-{
- {29827, -293},
- {29815, -878},
- {29792, -1464},
- {29758, -2048},
- {29712, -2632},
- {29654, -3215},
- {29586, -3797},
- {29505, -4377},
- {29414, -4955},
- {29311, -5532},
- {29196, -6106},
- {29071, -6678},
- {28934, -7248},
- {28786, -7814},
- {28627, -8378},
- {28457, -8938},
- {28276, -9495},
- {28084, -10049},
- {27882, -10598},
- {27668, -11144},
- {27444, -11685},
- {27209, -12221},
- {26964, -12753},
- {26709, -13280},
- {26443, -13802},
- {26167, -14318},
- {25881, -14829},
- {25584, -15335},
- {25278, -15834},
- {24963, -16327},
- {24637, -16814},
- {24302, -17295},
- {23958, -17769},
- {23605, -18236},
- {23242, -18695},
- {22871, -19148},
- {22490, -19594},
- {22101, -20031},
- {21704, -20461},
- {21298, -20884}
-};
-
-static const cos_msin_t a_cos_msin_16[80] =
-{
- {29828, -146},
- {29825, -439},
- {29819, -732},
- {29811, -1025},
- {29799, -1317},
- {29785, -1610},
- {29767, -1902},
- {29747, -2194},
- {29724, -2486},
- {29698, -2778},
- {29670, -3069},
- {29638, -3360},
- {29604, -3651},
- {29567, -3942},
- {29526, -4232},
- {29483, -4521},
- {29438, -4811},
- {29389, -5099},
- {29338, -5388},
- {29283, -5676},
- {29226, -5963},
- {29166, -6249},
- {29103, -6535},
- {29038, -6821},
- {28969, -7106},
- {28898, -7390},
- {28824, -7673},
- {28748, -7956},
- {28668, -8237},
- {28586, -8518},
- {28501, -8799},
- {28413, -9078},
- {28323, -9357},
- {28229, -9634},
- {28133, -9911},
- {28035, -10187},
- {27933, -10461},
- {27829, -10735},
- {27723, -11008},
- {27613, -11279},
- {27501, -11550},
- {27387, -11819},
- {27269, -12088},
- {27149, -12355},
- {27027, -12621},
- {26901, -12885},
- {26774, -13149},
- {26643, -13411},
- {26510, -13672},
- {26375, -13932},
- {26237, -14190},
- {26096, -14447},
- {25953, -14702},
- {25807, -14956},
- {25659, -15209},
- {25509, -15460},
- {25356, -15710},
- {25200, -15958},
- {25043, -16205},
- {24882, -16450},
- {24720, -16693},
- {24554, -16935},
- {24387, -17175},
- {24217, -17414},
- {24045, -17651},
- {23871, -17886},
- {23694, -18119},
- {23515, -18351},
- {23334, -18581},
- {23150, -18809},
- {22964, -19036},
- {22776, -19260},
- {22586, -19483},
- {22394, -19704},
- {22199, -19923},
- {22003, -20140},
- {21804, -20355},
- {21603, -20568},
- {21400, -20779},
- {21195, -20988}
-};
-
-static const cos_msin_t a_cos_msin_32[160] =
-{
- {29828, -73},
- {29827, -220},
- {29826, -366},
- {29824, -512},
- {29821, -659},
- {29817, -805},
- {29813, -952},
- {29808, -1098},
- {29802, -1244},
- {29796, -1390},
- {29789, -1537},
- {29781, -1683},
- {29772, -1829},
- {29763, -1975},
- {29753, -2121},
- {29742, -2267},
- {29730, -2413},
- {29718, -2559},
- {29705, -2705},
- {29692, -2851},
- {29677, -2997},
- {29662, -3142},
- {29646, -3288},
- {29630, -3433},
- {29613, -3579},
- {29595, -3724},
- {29576, -3869},
- {29557, -4014},
- {29537, -4159},
- {29516, -4304},
- {29494, -4449},
- {29472, -4594},
- {29449, -4738},
- {29426, -4883},
- {29401, -5027},
- {29376, -5172},
- {29351, -5316},
- {29324, -5460},
- {29297, -5604},
- {29269, -5747},
- {29241, -5891},
- {29211, -6034},
- {29181, -6178},
- {29151, -6321},
- {29119, -6464},
- {29087, -6607},
- {29054, -6749},
- {29021, -6892},
- {28987, -7034},
- {28952, -7177},
- {28916, -7319},
- {28880, -7460},
- {28843, -7602},
- {28805, -7744},
- {28767, -7885},
- {28728, -8026},
- {28688, -8167},
- {28648, -8308},
- {28607, -8448},
- {28565, -8589},
- {28522, -8729},
- {28479, -8869},
- {28435, -9008},
- {28391, -9148},
- {28346, -9287},
- {28300, -9426},
- {28253, -9565},
- {28206, -9703},
- {28158, -9842},
- {28109, -9980},
- {28060, -10118},
- {28010, -10255},
- {27959, -10393},
- {27908, -10530},
- {27856, -10667},
- {27803, -10803},
- {27750, -10940},
- {27696, -11076},
- {27641, -11212},
- {27586, -11347},
- {27529, -11482},
- {27473, -11617},
- {27415, -11752},
- {27357, -11886},
- {27299, -12021},
- {27239, -12154},
- {27179, -12288},
- {27119, -12421},
- {27057, -12554},
- {26996, -12687},
- {26933, -12819},
- {26870, -12951},
- {26806, -13083},
- {26741, -13215},
- {26676, -13346},
- {26610, -13476},
- {26544, -13607},
- {26477, -13737},
- {26409, -13867},
- {26340, -13996},
- {26271, -14125},
- {26202, -14254},
- {26132, -14383},
- {26061, -14511},
- {25989, -14638},
- {25917, -14766},
- {25844, -14893},
- {25771, -15020},
- {25697, -15146},
- {25622, -15272},
- {25547, -15397},
- {25471, -15523},
- {25394, -15648},
- {25317, -15772},
- {25239, -15896},
- {25161, -16020},
- {25082, -16143},
- {25003, -16266},
- {24923, -16389},
- {24842, -16511},
- {24760, -16632},
- {24678, -16754},
- {24596, -16875},
- {24513, -16995},
- {24429, -17115},
- {24345, -17235},
- {24260, -17354},
- {24174, -17473},
- {24088, -17592},
- {24002, -17710},
- {23914, -17827},
- {23827, -17945},
- {23738, -18061},
- {23649, -18178},
- {23560, -18293},
- {23470, -18409},
- {23379, -18524},
- {23288, -18638},
- {23196, -18752},
- {23104, -18866},
- {23011, -18979},
- {22917, -19092},
- {22824, -19204},
- {22729, -19316},
- {22634, -19427},
- {22538, -19538},
- {22442, -19649},
- {22345, -19759},
- {22248, -19868},
- {22150, -19977},
- {22052, -20086},
- {21953, -20194},
- {21854, -20301},
- {21754, -20408},
- {21653, -20515},
- {21552, -20621},
- {21451, -20726},
- {21349, -20831},
- {21246, -20936},
- {21143, -21040}
-};
-
-static const cos_msin_t a_cos_msin_64[320] =
-{
- {29827, -34},
- {29827, -106},
- {29827, -177},
- {29827, -249},
- {29826, -320},
- {29825, -392},
- {29824, -463},
- {29823, -535},
- {29821, -606},
- {29819, -678},
- {29818, -750},
- {29816, -821},
- {29814, -893},
- {29812, -964},
- {29809, -1035},
- {29807, -1106},
- {29804, -1177},
- {29801, -1249},
- {29797, -1320},
- {29795, -1392},
- {29791, -1463},
- {29787, -1535},
- {29784, -1606},
- {29780, -1678},
- {29776, -1749},
- {29771, -1820},
- {29767, -1892},
- {29763, -1963},
- {29758, -2035},
- {29753, -2106},
- {29748, -2177},
- {29742, -2249},
- {29737, -2320},
- {29731, -2391},
- {29726, -2462},
- {29719, -2534},
- {29713, -2605},
- {29707, -2676},
- {29701, -2747},
- {29694, -2819},
- {29686, -2890},
- {29680, -2961},
- {29673, -3032},
- {29665, -3103},
- {29658, -3174},
- {29650, -3245},
- {29643, -3316},
- {29635, -3387},
- {29626, -3459},
- {29618, -3529},
- {29610, -3600},
- {29601, -3671},
- {29592, -3742},
- {29583, -3813},
- {29574, -3884},
- {29564, -3955},
- {29554, -4026},
- {29544, -4097},
- {29535, -4167},
- {29525, -4238},
- {29514, -4309},
- {29504, -4380},
- {29493, -4450},
- {29483, -4521},
- {29472, -4591},
- {29461, -4662},
- {29450, -4733},
- {29439, -4803},
- {29427, -4874},
- {29415, -4944},
- {29403, -5015},
- {29391, -5085},
- {29379, -5155},
- {29366, -5226},
- {29353, -5296},
- {29341, -5367},
- {29328, -5438},
- {29314, -5508},
- {29301, -5578},
- {29289, -5648},
- {29274, -5718},
- {29260, -5788},
- {29247, -5858},
- {29232, -5928},
- {29218, -5998},
- {29204, -6068},
- {29188, -6139},
- {29175, -6209},
- {29159, -6279},
- {29145, -6348},
- {29128, -6418},
- {29114, -6488},
- {29097, -6557},
- {29082, -6627},
- {29066, -6697},
- {29050, -6767},
- {29034, -6837},
- {29017, -6906},
- {29001, -6975},
- {28984, -7045},
- {28966, -7114},
- {28950, -7184},
- {28933, -7254},
- {28915, -7323},
- {28897, -7392},
- {28880, -7461},
- {28862, -7530},
- {28843, -7600},
- {28825, -7669},
- {28807, -7738},
- {28788, -7806},
- {28769, -7875},
- {28751, -7944},
- {28732, -8014},
- {28712, -8082},
- {28692, -8151},
- {28672, -8219},
- {28653, -8289},
- {28633, -8357},
- {28613, -8425},
- {28593, -8494},
- {28572, -8563},
- {28551, -8632},
- {28531, -8700},
- {28510, -8768},
- {28488, -8837},
- {28468, -8905},
- {28447, -8973},
- {28425, -9041},
- {28403, -9109},
- {28381, -9177},
- {28359, -9245},
- {28336, -9313},
- {28315, -9381},
- {28292, -9448},
- {28269, -9517},
- {28246, -9584},
- {28223, -9652},
- {28200, -9720},
- {28176, -9787},
- {28153, -9854},
- {28129, -9922},
- {28105, -9990},
- {28082, -10056},
- {28057, -10124},
- {28032, -10191},
- {28009, -10258},
- {27984, -10326},
- {27959, -10392},
- {27934, -10460},
- {27909, -10526},
- {27883, -10593},
- {27858, -10661},
- {27832, -10727},
- {27807, -10794},
- {27780, -10860},
- {27754, -10927},
- {27728, -10993},
- {27701, -11059},
- {27676, -11126},
- {27648, -11192},
- {27622, -11259},
- {27595, -11324},
- {27567, -11391},
- {27540, -11456},
- {27512, -11523},
- {27484, -11588},
- {27456, -11655},
- {27429, -11720},
- {27401, -11786},
- {27372, -11852},
- {27344, -11917},
- {27315, -11982},
- {27286, -12049},
- {27257, -12114},
- {27229, -12179},
- {27199, -12244},
- {27169, -12309},
- {27140, -12375},
- {27110, -12439},
- {27080, -12505},
- {27050, -12570},
- {27019, -12634},
- {26990, -12699},
- {26958, -12764},
- {26928, -12828},
- {26897, -12892},
- {26866, -12956},
- {26835, -13021},
- {26804, -13086},
- {26773, -13149},
- {26741, -13214},
- {26709, -13278},
- {26677, -13342},
- {26645, -13406},
- {26613, -13470},
- {26581, -13534},
- {26549, -13597},
- {26515, -13661},
- {26483, -13725},
- {26450, -13788},
- {26417, -13851},
- {26384, -13915},
- {26350, -13978},
- {26316, -14041},
- {26283, -14103},
- {26248, -14166},
- {26215, -14229},
- {26180, -14292},
- {26146, -14355},
- {26112, -14417},
- {26077, -14480},
- {26042, -14543},
- {26008, -14605},
- {25972, -14667},
- {25937, -14730},
- {25901, -14792},
- {25866, -14854},
- {25830, -14916},
- {25794, -14977},
- {25759, -15039},
- {25723, -15101},
- {25687, -15162},
- {25650, -15224},
- {25613, -15286},
- {25577, -15347},
- {25540, -15408},
- {25503, -15470},
- {25465, -15531},
- {25428, -15592},
- {25391, -15653},
- {25353, -15714},
- {25315, -15774},
- {25277, -15834},
- {25240, -15895},
- {25201, -15956},
- {25162, -16016},
- {25124, -16076},
- {25086, -16136},
- {25047, -16196},
- {25008, -16256},
- {24969, -16316},
- {24930, -16375},
- {24891, -16436},
- {24851, -16496},
- {24811, -16555},
- {24772, -16615},
- {24732, -16674},
- {24692, -16732},
- {24652, -16791},
- {24612, -16852},
- {24572, -16911},
- {24531, -16969},
- {24490, -17027},
- {24449, -17086},
- {24408, -17145},
- {24367, -17203},
- {24325, -17261},
- {24284, -17320},
- {24242, -17379},
- {24200, -17436},
- {24158, -17494},
- {24116, -17552},
- {24075, -17610},
- {24032, -17668},
- {23990, -17725},
- {23947, -17782},
- {23904, -17840},
- {23862, -17897},
- {23819, -17954},
- {23775, -18011},
- {23732, -18068},
- {23689, -18125},
- {23645, -18181},
- {23602, -18238},
- {23558, -18294},
- {23514, -18351},
- {23470, -18407},
- {23426, -18464},
- {23381, -18520},
- {23337, -18576},
- {23293, -18632},
- {23248, -18688},
- {23202, -18743},
- {23158, -18799},
- {23112, -18854},
- {23068, -18910},
- {23022, -18964},
- {22977, -19020},
- {22931, -19074},
- {22885, -19129},
- {22839, -19185},
- {22793, -19239},
- {22747, -19294},
- {22700, -19348},
- {22655, -19403},
- {22607, -19457},
- {22561, -19511},
- {22514, -19565},
- {22467, -19619},
- {22421, -19673},
- {22373, -19726},
- {22326, -19780},
- {22279, -19834},
- {22230, -19887},
- {22183, -19940},
- {22135, -19993},
- {22087, -20047},
- {22039, -20099},
- {21991, -20152},
- {21942, -20205},
- {21894, -20257},
- {21845, -20309},
- {21797, -20362},
- {21748, -20413},
- {21699, -20466},
- {21650, -20518},
- {21601, -20570},
- {21551, -20621},
- {21502, -20674}
-};
-
-static const cos_msin_t *a_cos_msin_table[] =
-{
- a_cos_msin_2,
- a_cos_msin_4,
- a_cos_msin_8,
- a_cos_msin_16,
- a_cos_msin_32,
- a_cos_msin_64
-};
-
-static const int16_t dct_core_a[10][10] =
-{
-
- { 10453, 10196, 9688, 8941, 7973, 6810, 5479, 4013, 2448, 823 },
- { 10196, 7973, 4013, -823, -5479, -8941, -10453, -9688, -6810, -2448 },
- { 9688 , 4013, -4013, -9688, -9688, -4013, 4013, 9688, 9688, 4013 },
- { 8941 , -823, -9688, -7973, 2448, 10196, 6810, -4013, -10453, -5479 },
- { 7973 , -5479, -9688, 2448, 10453, 823, -10196, -4013, 8941, 6810 },
- { 6810 , -8941, -4013, 10196, 823, -10453, 2448, 9688, -5479, -7973 },
- { 5479 , -10453, 4013, 6810, -10196, 2448, 7973, -9688, 823, 8941 },
- { 4013 , -9688, 9688, -4013, -4013, 9688, -9688, 4013, 4013, -9688 },
- { 2448 , -6810, 9688, -10453, 8941, -5479, 823, 4013, -7973, 10196 },
- { 823 , -2448, 4013, -5479, 6810, -7973, 8941, -9688, 10196, -10453 }
-};
-
-static const int16_t anal_bias[320] =
-{
- 1, 1, 3, 1, 4, 1, 3, -2, 4, 3,
- 4, 1, 3, 0, 2, -3, 0, 0, 2, 2,
- 4, 1, 1, -5, 4, 1, 2, -1, 0, -1,
- 1, -2, 0, 2, 2, 2, 4, 1, 3, 0,
- 5, 3, 2, 0, 3, 0, 1, -4, 1, 1,
- 2, 0, 4, 0, 1, -4, 6, 1, 3, -1,
- 1, 0, 0, -4, 1, 1, 3, 1, 3, 2,
- 4, -2, 4, 3, 5, 1, 3, 0, 1, -3,
- 1, 1, 2, 0, 4, 1, 2, -4, 4, 2,
- 2, -1, 1, -1, 1, -4, 0, 0, 3, 0,
- 5, 2, 3, -1, 6, 2, 5, 0, 4, 0,
- 1, -3, 1, 0, 3, 0, 4, 0, 1, -3,
- 4, 1, 3, -1, 1, -2, 1, -4, 0, 1,
- 2, 1, 3, 2, 2, -2, 4, 3, 3, 0,
- 3, 0, 0, -2, 1, 0, 2, 0, 5, -1,
- 1, -3, 4, 2, 2, 0, 2, -3, 1, -4,
- -1, 1, 2, 2, 4, 1, 3, -1, 5, 2,
- 2, 0, 3, -1, 2, -3, 0, 1, 2, 2,
- 4, 0, 1, -5, 5, 1, 3, 0, 2, -1,
- 0, -2, 1, 2, 2, 2, 4, 1, 0, 0,
- 4, 2, 4, 1, 4, -1, 1, -4, 0, 1,
- 3, 1, 5, 1, 1, -2, 4, 0, 2, 0,
- 2, -1, 0, -2, 0, 1, 1, 1, 4, 2,
- 3, -2, 5, 4, 4, 0, 3, 0, 3, -4,
- 1, 2, 2, 0, 4, 1, 0, -3, 4, 2,
- 3, -1, 1, -1, 1, -4, 0, 2, 3, 1,
- 4, 1, 3, 0, 3, 3, 4, 1, 2, 0,
- 1, -3, 2, 2, 2, 1, 5, 0, 1, -4,
- 4, 1, 3, -2, 3, -1, 0, -2, 0, 2,
- 2, 0, 5, 1, 4, -1, 4, 3, 4, 1,
- 3, 0, 1, -4, 2, 0, 3, 1, 5, 0,
- 1, -5, 5, 2, 2, 0, 0, 0, 0, -4
-};
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * dct4_s.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/* Discrete Cosine Transform, Type IV used for inverse MLT
-
- The basis functions are
-
- cos(PI*(t+0.5)*(k+0.5)/block_length)
-
- for time t and basis function number k. Due to the symmetry of the
- expression in t and k, it is clear that the forward and inverse transforms
- are the same. */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-#include "defs.h"
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-#include "dct4_s.h"
-#include "utilities.h"
-
-/* Discrete Cosine Transform, Type IV used for inverse MLT */
-void dct_type_iv_s(int16_t input[], int16_t output[], int dct_length)
-{
- int16_t buffer_a[MAX_DCT_LENGTH];
- int16_t buffer_b[MAX_DCT_LENGTH];
- int16_t buffer_c[MAX_DCT_LENGTH];
- int16_t *in_ptr;
- int16_t *out_ptr;
- int16_t *in_buffer;
- int16_t *out_buffer;
- int16_t *buffer_swap;
- int16_t in_val_low;
- int16_t in_val_high;
- int16_t in_low_even;
- int16_t in_low_odd;
- int16_t in_high_even;
- int16_t in_high_odd;
- int16_t *pair_ptr;
- int16_t cos_even;
- int16_t cos_odd;
- int16_t msin_even;
- int16_t msin_odd;
- int16_t set_span;
- int16_t half_span;
- int16_t set_count;
- int16_t set_count_log;
- int16_t pairs_left;
- int16_t sets_left;
- int16_t i;
- int16_t j;
- int16_t k;
- int16_t index;
- int16_t dummy;
- int16_t dct_length_log;
- int32_t sum;
- int32_t acca;
- const cos_msin_t **table_ptr_ptr;
- const cos_msin_t *cos_msin_ptr;
- const int16_t *dither_ptr;
-
- /* Do the sum/difference butterflies, the first part of
- converting one N-point transform into 32 - 10 point transforms
- transforms, where N = 1 << DCT_LENGTH_LOG. */
- if (dct_length == DCT_LENGTH)
- {
- dct_length_log = DCT_LENGTH_LOG;
- dither_ptr = dither;
- }
- else
- {
- dct_length_log = MAX_DCT_LENGTH_LOG;
- dither_ptr = max_dither;
- }
-
- in_buffer = input;
- out_buffer = buffer_a;
-
- index = 0;
- i = 0;
- j = 0;
-
- for (set_count_log = 0; set_count_log <= dct_length_log - 2; set_count_log++)
- {
- /* Loop over all the sets at the current size */
- set_span = dct_length >> set_count_log;
- set_count = 1 << set_count_log;
- half_span = set_span >> 1;
- in_ptr = in_buffer;
- out_ptr = out_buffer;
-
- if (index < 1)
- {
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Loop over all the butterflies in the current set */
- for (i = 0; i < half_span; i++)
- {
- in_val_low = *in_ptr++;
- in_val_high = *in_ptr++;
-
- dummy = add(in_val_low, dither_ptr[j++]);
- acca = L_add(dummy, in_val_high);
- out_ptr[i] = (int16_t) L_shr(acca, 1);
-
- dummy = add(in_val_low, dither_ptr[j++]);
- acca = L_sub(dummy, in_val_high);
- out_ptr[set_span - 1 - i] = (int16_t) L_shr(acca, 1);
- }
- out_ptr += set_span;
- }
- }
- else
- {
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Loop over all the butterflies in the current set */
- for (i = 0; i < half_span; i++)
- {
- in_val_low = *in_ptr++;
- in_val_high = *in_ptr++;
-
- out_ptr[i] = add(in_val_low, in_val_high);
- out_ptr[set_span - 1 - i] = sub(in_val_low, in_val_high);
- }
- out_ptr += set_span;
- }
- }
-
- /* Decide which buffers to use as input and output next time.
- Except for the first time (when the input buffer is the
- subroutine input) we just alternate the local buffers. */
- in_buffer = out_buffer;
- out_buffer = (out_buffer == buffer_a) ? buffer_b : buffer_a;
- index++;
- }
-
- /* Do 32 - 10 point transforms */
- pair_ptr = in_buffer;
- buffer_swap = buffer_c;
-
- for (pairs_left = 1 << (dct_length_log - 1); pairs_left > 0; pairs_left--)
- {
- for (k = 0; k < CORE_SIZE; k++)
- {
- sum = 0L;
- for (i = 0; i < CORE_SIZE; i++)
- sum = L_mac(sum, pair_ptr[i], dct_core_s[i][k]);
- buffer_swap[k] = xround(sum);
- }
-
- pair_ptr += CORE_SIZE;
- buffer_swap += CORE_SIZE;
- }
-
- vec_copyi16(in_buffer, buffer_c, dct_length);
-
- table_ptr_ptr = s_cos_msin_table;
-
- /* Perform rotation butterflies */
- index = 0;
- for (set_count_log = dct_length_log - 2; set_count_log >= 0; set_count_log--)
- {
- /* Initialization for the loop over sets at the current size */
- set_span = dct_length >> set_count_log;
- set_count = 1 << set_count_log;
- half_span = set_span >> 1;
- in_ptr = in_buffer;
- out_ptr = (set_count_log == 0) ? output : out_buffer;
- cos_msin_ptr = *table_ptr_ptr++;
-
- /* Loop over all the sets of this size */
- for (sets_left = set_count; sets_left > 0; sets_left--)
- {
- /* Loop over all the butterfly pairs in the current set */
- for (i = 0; i < half_span; i += 2)
- {
- in_low_even = in_ptr[i];
- in_low_odd = in_ptr[i + 1];
- in_high_even = in_ptr[half_span + i];
- in_high_odd = in_ptr[half_span + i + 1];
-
- cos_even = cos_msin_ptr[i].cosine;
- msin_even = cos_msin_ptr[i].minus_sine;
- cos_odd = cos_msin_ptr[i + 1].cosine;
- msin_odd = cos_msin_ptr[i + 1].minus_sine;
-
- sum = L_mult(cos_even, in_low_even);
- sum = L_mac(sum, -msin_even, in_high_even);
- out_ptr[i] = xround(L_shl(sum, 1));
-
- sum = L_mult(msin_even, in_low_even);
- sum = L_mac(sum, cos_even, in_high_even);
- out_ptr[set_span - 1 - i] = xround(L_shl(sum, 1));
-
- sum = L_mult(cos_odd, in_low_odd);
- sum = L_mac(sum, msin_odd, in_high_odd);
- out_ptr[i + 1] = xround(L_shl(sum, 1));
-
- sum = L_mult(msin_odd, in_low_odd);
- sum = L_mac(sum, -cos_odd, in_high_odd);
- out_ptr[set_span - 2 - i] = xround(L_shl(sum, 1));
- }
- in_ptr += set_span;
- out_ptr += set_span;
- }
- /* Swap input and output buffers for next time */
- buffer_swap = in_buffer;
- in_buffer = out_buffer;
- out_buffer = buffer_swap;
- index++;
- }
- /* Add in bias for output */
- if (dct_length == DCT_LENGTH)
- {
- for (i = 0; i < DCT_LENGTH; i++)
- {
- sum = L_add(output[i], syn_bias_7khz[i]);
- output[i] = saturate(sum);
- }
- }
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * dct4_s.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-typedef struct
-{
- int16_t cosine;
- int16_t minus_sine;
-} cos_msin_t;
-
-/***************************************************************************
- The dct_core_s table was generated by the following code
-
- for (i = 0; i < 10; ++i)
- {
- for (k = 0; k < 10; ++k)
- {
- dct_core_s[i][k] = (short) (FTOI(((.9*32768.)*cos(3.1415926*(k+0.5)*(i+0.5)/10.))));
- }
- }
-***************************************************************************/
-static const int16_t dct_core_s[10][10] =
-{
- { 29400, 28676, 27246, 25145, 22425, 19153, 15409, 11286, 6885, 2314},
- { 28676, 22425, 11286, -2314, -15409, -25145, -29400, -27246, -19153, -6885},
- { 27246, 11286, -11286, -27246, -27246, -11286, 11286, 27246, 27246, 11286},
- { 25145, -2314, -27246, -22425, 6885, 28676, 19153, -11286, -29400, -15409},
- { 22425, -15409, -27246, 6885, 29400, 2314, -28676, -11286, 25145, 19153},
- { 19153, -25145, -11286, 28676, 2314, -29400, 6885, 27246, -15409, -22425},
- { 15409, -29400, 11286, 19153, -28676, 6885, 22425, -27246, 2314, 25145},
- { 11286, -27246, 27246, -11286, -11286, 27246, -27246, 11286, 11286, -27246},
- { 6885, -19153, 27246, -29400, 25145, -15409, 2314, 11286, -22425, 28676},
- { 2314, -6885, 11286, -15409, 19153, -22425, 25145, -27246, 28676, -29400}
-};
-
-static const int16_t syn_bias_7khz[DCT_LENGTH] =
-{
- -4, 4, -5, -2, 0, -4, 6, 2, -2, -4,
- -3, 3, 0, 0, -2, 4, 0, 0, 3, -6,
- 8, 5, 4, 5, -8, 0, -2, 0, 0, -3,
- 3, 0, 0, 0, 1, -1, -2, 0, 0, 2,
- -2, -5, -2, 3, 2, -1, -1, -6, 3, 1,
- -7, 4, 4, 0, 1, 4, 1, 0, 1, -5,
- -1, 1, -6, 0, -1, -1, 3, 0, -2, 1,
- 2, -4, 0, 9, 0, -3, 1, 1, 1, 0,
- -3, -2, -1, -4, -2, 0, 5, 2, -3, 5,
- 0, -2, 4, 4, 0, -6, -4, 2, 0, 0,
- 0, -1, -1, -2, 0, 6, 1, 0, 0, -1,
- 0, -4, -1, 0, -4, 1, -1, -5, 0, 1,
- 2, 4, 0, -8, -4, 0, -2, -2, 2, 5,
- -3, -1, 1, -4, 0, 0, 0, -1, -3, 0,
- -5, -4, 0, -2, 0, 7, 1, 0, 5, -2,
- -1, 2, 2, -2, 3, 7, -3, 4, 1, -4,
- 0, 0, 3, -7, -5, 0, 0, 4, 0, -2,
- -1, 0, -5, 0, 2, 0, 11, 5, -1, 0,
- 2, 2, -2, -2, 5, 4, -3, 1, 0, -2,
- 1, 3, 2, 0, 1, 0, 0, 0, 5, 6,
- -2, -1, 0, 2, 3, 2, 0, -3, 4, 5,
- 0, -1, 0, 3, 1, -2, -3, -2, -1, 2,
- -1, -1, -2, -7, 4, 6, -5, -6, -3, -4,
- 0, 2, -5, -2, 3, 0, 0, 0, 2, -2,
- -4, 3, 3, 1, 0, 0, 4, -1, 8, 13,
- 1, 2, 0, 2, 0, -1, 4, -3, 1, 0,
- -1, 3, 0, 0, -5, 0, 6, 2, 4, 5,
- 2, -1, -1, 3, 6, 1, 1, 2, -4, 0,
- -1, -6, -2, -2, 2, 1, 2, 6, 2, 0,
- -2, -2, 0, -1, 2, 0, 0, 3, -2, 1,
- 3, 1, 2, -1, -2, 2, 2, -4, 0, 0,
- -3, 0, -4, -3, 6, 7, 2, 2, 0, -3
-};
-
-static const int16_t dither[DCT_LENGTH] =
-{
- 1, 0, 0, 0, 1, 0, 0, 1, 1, 1,
- 1, 0, 0, 0, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 0, 1, 1, 0, 0, 0,
- 1, 0, 0, 1, 0, 1, 0, 0, 1, 0,
- 1, 0, 0, 0, 1, 0, 1, 0, 0, 0,
- 1, 1, 1, 1, 1, 0, 0, 1, 0, 0,
- 0, 0, 1, 0, 0, 0, 1, 0, 0, 1,
- 1, 1, 1, 1, 1, 0, 1, 0, 0, 1,
- 1, 0, 0, 1, 0, 0, 0, 1, 0, 1,
- 0, 0, 1, 1, 0, 1, 0, 1, 1, 1,
- 1, 0, 0, 0, 0, 1, 1, 1, 1, 1,
- 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
- 1, 1, 0, 0, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 0, 1, 1, 1, 0,
- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 1, 1, 1, 1, 0, 0, 0, 0,
- 1, 1, 0, 1, 0, 0, 1, 0, 0, 1,
- 0, 0, 0, 1, 1, 0, 0, 1, 1, 1,
- 1, 0, 0, 0, 0, 0, 1, 1, 1, 1,
- 1, 0, 0, 1, 1, 0, 1, 1, 0, 0,
- 1, 1, 1, 0, 1, 1, 0, 1, 0, 1,
- 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,
- 0, 1, 1, 1, 1, 0, 1, 1, 1, 0,
- 1, 1, 1, 0, 1, 1, 1, 0, 1, 0,
- 1, 1, 0, 0, 1, 0, 0, 1, 0, 1,
- 0, 1, 1, 0, 1, 0, 1, 0, 1, 1,
- 1, 0, 1, 0, 1, 0, 1, 1, 1, 1,
- 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
- 1, 0, 0, 0, 1, 0, 0, 1, 0, 1,
- 1, 0, 1, 1, 0, 0, 1, 1, 0, 1,
- 1, 0, 1, 1, 1, 1, 1, 1, 0, 1,
- 1, 1, 1, 0, 1, 0, 0, 0, 1, 0
-};
-
-static const int16_t max_dither[MAX_DCT_LENGTH] =
-{
- 1, 0, 1, 0, 1, 1, 0, 1, 0, 1,
- 1, 1, 0, 0, 0, 0, 0, 1, 1, 1,
- 1, 1, 1, 0, 1, 1, 0, 0, 0, 1,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,
- 0, 1, 0, 1, 1, 1, 1, 1, 1, 0,
- 1, 0, 1, 1, 0, 1, 0, 0, 0, 1,
- 0, 1, 1, 1, 1, 1, 0, 1, 1, 0,
- 0, 0, 1, 1, 0, 0, 0, 1, 1, 1,
- 1, 0, 1, 1, 1, 1, 1, 0, 0, 0,
- 1, 0, 1, 0, 1, 0, 0, 0, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 0, 1, 0,
- 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
- 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
- 1, 0, 0, 1, 0, 1, 0, 0, 0, 1,
- 0, 1, 0, 0, 1, 1, 1, 1, 0, 1,
- 1, 0, 0, 0, 1, 1, 0, 1, 0, 1,
- 0, 1, 0, 1, 0, 1, 1, 1, 0, 1,
- 1, 0, 0, 1, 1, 1, 1, 0, 1, 1,
- 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 1, 1, 0,
- 1, 1, 0, 0, 0, 0, 1, 0, 0, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 1, 1, 1, 0, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
- 0, 0, 1, 1, 0, 1, 0, 1, 0, 1,
- 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,
- 0, 1, 1, 1, 0, 1, 0, 1, 0, 0,
- 0, 1, 0, 1, 1, 0, 0, 0, 1, 0,
- 1, 1, 0, 0, 1, 1, 1, 1, 0, 0,
- 0, 0, 1, 1, 1, 1, 0, 0, 1, 1,
- 1, 1, 1, 0, 1, 0, 0, 0, 1, 0,
- 0, 1, 1, 1, 0, 1, 0, 1, 0, 0,
- 1, 1, 0, 1, 0, 1, 1, 0, 0, 0,
- 0, 1, 1, 0, 1, 1, 1, 0, 1, 1,
- 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,
- 1, 1, 0, 0, 0, 1, 1, 1, 1, 0,
- 0, 1, 0, 1, 0, 1, 1, 0, 1, 0,
- 1, 1, 1, 0, 0, 1, 1, 0, 0, 1,
- 0, 1, 0, 0, 0, 1, 1, 0, 0, 1,
- 0, 0, 1, 1, 0, 1, 0, 1, 0, 1,
- 1, 1, 0, 1, 0, 0, 1, 1, 0, 0,
- 1, 0, 1, 0, 1, 0, 0, 1, 0, 0,
- 0, 1, 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 0, 0, 0, 1, 1, 1, 0,
- 1, 1, 1, 0, 1, 1, 1, 0, 0, 0,
- 0, 0, 1, 0, 0, 1, 0, 0, 0, 1,
- 0, 0, 0, 1, 1, 0, 0, 1, 0, 1,
- 1, 1, 1, 1, 0, 0, 1, 0, 1, 0,
- 0, 1, 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 1, 0, 1, 0, 0, 1, 0, 1,
- 1, 0, 1, 0, 1, 1, 0, 0, 1, 1,
- 1, 1, 1, 0, 1, 0, 0, 1, 1, 1,
- 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
- 1, 0, 0, 1, 0, 0, 1, 1, 0, 1,
- 1, 0, 1, 0, 1, 1, 0, 0, 1, 1,
- 0, 0, 0, 1, 0, 1, 1, 1, 0, 0,
- 1, 0, 1, 0, 1, 1, 0, 0, 0, 1,
- 1, 0, 1, 0, 0, 1, 1, 1, 0, 1,
- 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,
- 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,
- 0, 1, 1, 1, 1, 0, 0, 0, 1, 0,
- 0, 1, 0, 1, 0, 1, 0, 0, 0, 0
-};
-
-
-/********************************************************************************
- The s_cos_min tables were generated by the following code:
- double angle, scale;
- int index;
-
- for (index = 0;index < length;index++)
- {
- angle = scale * ((double)index + 0.5);
- table[index].cosine = (int16_t) (FTOI((18427)* cos(angle)));
- table[index].minus_sine = (int16_t) (FTOI((18427)*(-sin(angle))));
- }
-********************************************************************************/
-
-static const cos_msin_t s_cos_msin_2[DCT_LENGTH_DIV_32] =
-{
- {18413, -723},
- {18299, -2166},
- {18073, -3595},
- {17735, -5002},
- {17288, -6378},
- {16734, -7715},
- {16077, -9004},
- {15321, -10237},
- {14471, -11408},
- {13531, -12508}
-};
-
-static const cos_msin_t s_cos_msin_4[DCT_LENGTH_DIV_16] =
-{
- {18423, -362},
- {18395, -1085},
- {18338, -1806},
- {18253, -2525},
- {18140, -3239},
- {17999, -3949},
- {17830, -4653},
- {17634, -5349},
- {17410, -6037},
- {17159, -6716},
- {16883, -7385},
- {16580, -8042},
- {16251, -8686},
- {15898, -9318},
- {15520, -9935},
- {15118, -10536},
- {14692, -11122},
- {14244, -11690},
- {13774, -12240},
- {13283, -12772}
-};
-
-static const cos_msin_t s_cos_msin_8[DCT_LENGTH_DIV_8] =
-{
- {18426, -181},
- {18419, -543},
- {18405, -904},
- {18384, -1265},
- {18355, -1626},
- {18320, -1986},
- {18277, -2345},
- {18228, -2704},
- {18171, -3061},
- {18107, -3417},
- {18037, -3772},
- {17959, -4126},
- {17875, -4477},
- {17783, -4827},
- {17685, -5176},
- {17580, -5522},
- {17468, -5866},
- {17350, -6208},
- {17225, -6547},
- {17093, -6884},
- {16954, -7219},
- {16809, -7550},
- {16658, -7879},
- {16500, -8204},
- {16336, -8526},
- {16165, -8846},
- {15988, -9161},
- {15805, -9473},
- {15616, -9782},
- {15421, -10087},
- {15220, -10387},
- {15013, -10684},
- {14801, -10977},
- {14582, -11265},
- {14358, -11550},
- {14129, -11829},
- {13894, -12104},
- {13654, -12375},
- {13408, -12641},
- {13157, -12901}
-};
-
-static const cos_msin_t s_cos_msin_16[DCT_LENGTH_DIV_4] =
-{
- {18427, -90},
- {18425, -271},
- {18421, -452},
- {18416, -633},
- {18409, -814},
- {18400, -995},
- {18389, -1175},
- {18377, -1356},
- {18363, -1536},
- {18347, -1716},
- {18329, -1896},
- {18310, -2076},
- {18288, -2256},
- {18265, -2435},
- {18241, -2614},
- {18214, -2793},
- {18186, -2972},
- {18156, -3150},
- {18124, -3328},
- {18090, -3506},
- {18055, -3684},
- {18018, -3861},
- {17979, -4037},
- {17939, -4214},
- {17897, -4390},
- {17853, -4565},
- {17807, -4740},
- {17760, -4915},
- {17710, -5089},
- {17660, -5262},
- {17607, -5436},
- {17553, -5608},
- {17497, -5780},
- {17439, -5952},
- {17380, -6123},
- {17319, -6293},
- {17257, -6463},
- {17192, -6632},
- {17126, -6800},
- {17059, -6968},
- {16990, -7135},
- {16919, -7302},
- {16846, -7467},
- {16772, -7632},
- {16696, -7797},
- {16619, -7960},
- {16540, -8123},
- {16459, -8285},
- {16377, -8446},
- {16294, -8607},
- {16208, -8766},
- {16121, -8925},
- {16033, -9083},
- {15943, -9240},
- {15852, -9396},
- {15759, -9551},
- {15664, -9705},
- {15568, -9858},
- {15471, -10011},
- {15372, -10162},
- {15271, -10313},
- {15169, -10462},
- {15066, -10610},
- {14961, -10758},
- {14854, -10904},
- {14747, -11049},
- {14637, -11194},
- {14527, -11337},
- {14415, -11479},
- {14301, -11620},
- {14187, -11760},
- {14071, -11898},
- {13953, -12036},
- {13834, -12172},
- {13714, -12308},
- {13593, -12442},
- {13470, -12575},
- {13346, -12706},
- {13220, -12837},
- {13094, -12966}
-};
-
-static const cos_msin_t s_cos_msin_32[DCT_LENGTH_DIV_2] =
-{
- {18427, -45},
- {18427, -136},
- {18426, -226},
- {18424, -317},
- {18423, -407},
- {18420, -497},
- {18418, -588},
- {18415, -678},
- {18411, -769},
- {18407, -859},
- {18403, -949},
- {18398, -1040},
- {18392, -1130},
- {18387, -1220},
- {18380, -1310},
- {18374, -1401},
- {18367, -1491},
- {18359, -1581},
- {18351, -1671},
- {18343, -1761},
- {18334, -1851},
- {18324, -1941},
- {18315, -2031},
- {18305, -2121},
- {18294, -2211},
- {18283, -2301},
- {18271, -2390},
- {18259, -2480},
- {18247, -2570},
- {18234, -2659},
- {18221, -2749},
- {18207, -2838},
- {18193, -2927},
- {18178, -3017},
- {18163, -3106},
- {18148, -3195},
- {18132, -3284},
- {18116, -3373},
- {18099, -3462},
- {18082, -3551},
- {18064, -3639},
- {18046, -3728},
- {18027, -3816},
- {18009, -3905},
- {17989, -3993},
- {17969, -4081},
- {17949, -4170},
- {17928, -4258},
- {17907, -4346},
- {17886, -4434},
- {17864, -4521},
- {17841, -4609},
- {17818, -4696},
- {17795, -4784},
- {17772, -4871},
- {17747, -4958},
- {17723, -5045},
- {17698, -5132},
- {17672, -5219},
- {17647, -5306},
- {17620, -5392},
- {17594, -5479},
- {17567, -5565},
- {17539, -5651},
- {17511, -5737},
- {17483, -5823},
- {17454, -5909},
- {17425, -5994},
- {17395, -6080},
- {17365, -6165},
- {17335, -6250},
- {17304, -6335},
- {17272, -6420},
- {17241, -6505},
- {17208, -6590},
- {17176, -6674},
- {17143, -6758},
- {17110, -6842},
- {17076, -6926},
- {17042, -7010},
- {17007, -7093},
- {16972, -7177},
- {16937, -7260},
- {16901, -7343},
- {16864, -7426},
- {16828, -7509},
- {16791, -7591},
- {16753, -7674},
- {16715, -7756},
- {16677, -7838},
- {16638, -7919},
- {16599, -8001},
- {16560, -8082},
- {16520, -8164},
- {16480, -8245},
- {16439, -8325},
- {16398, -8406},
- {16357, -8486},
- {16315, -8567},
- {16272, -8647},
- {16230, -8726},
- {16187, -8806},
- {16143, -8885},
- {16100, -8964},
- {16055, -9043},
- {16011, -9122},
- {15966, -9200},
- {15920, -9279},
- {15875, -9357},
- {15829, -9435},
- {15782, -9512},
- {15735, -9589},
- {15688, -9667},
- {15640, -9744},
- {15592, -9820},
- {15544, -9897},
- {15495, -9973},
- {15446, -10049},
- {15396, -10124},
- {15347, -10200},
- {15296, -10275},
- {15246, -10350},
- {15195, -10425},
- {15143, -10499},
- {15092, -10573},
- {15040, -10647},
- {14987, -10721},
- {14934, -10794},
- {14881, -10868},
- {14828, -10941},
- {14774, -11013},
- {14719, -11086},
- {14665, -11158},
- {14610, -11230},
- {14555, -11301},
- {14499, -11372},
- {14443, -11444},
- {14387, -11514},
- {14330, -11585},
- {14273, -11655},
- {14216, -11725},
- {14158, -11795},
- {14100, -11864},
- {14041, -11933},
- {13983, -12002},
- {13924, -12070},
- {13864, -12138},
- {13804, -12206},
- {13744, -12274},
- {13684, -12341},
- {13623, -12408},
- {13562, -12475},
- {13501, -12541},
- {13439, -12608},
- {13377, -12673},
- {13314, -12739},
- {13252, -12804},
- {13189, -12869},
- {13125, -12934},
- {13062, -12998}
-};
-
-static const cos_msin_t s_cos_msin_64[DCT_LENGTH] =
-{
- {18426, -21},
- {18426, -66},
- {18426, -110},
- {18426, -154},
- {18425, -198},
- {18425, -242},
- {18424, -286},
- {18424, -331},
- {18423, -374},
- {18421, -419},
- {18421, -463},
- {18419, -507},
- {18418, -552},
- {18417, -595},
- {18415, -639},
- {18414, -684},
- {18412, -728},
- {18410, -772},
- {18408, -816},
- {18406, -860},
- {18404, -904},
- {18402, -949},
- {18400, -992},
- {18397, -1037},
- {18394, -1081},
- {18392, -1125},
- {18389, -1169},
- {18387, -1213},
- {18384, -1257},
- {18380, -1301},
- {18378, -1345},
- {18374, -1389},
- {18371, -1433},
- {18367, -1477},
- {18364, -1521},
- {18360, -1566},
- {18356, -1609},
- {18352, -1653},
- {18348, -1697},
- {18344, -1742},
- {18339, -1785},
- {18335, -1829},
- {18331, -1873},
- {18326, -1917},
- {18322, -1961},
- {18317, -2005},
- {18312, -2049},
- {18307, -2092},
- {18302, -2137},
- {18297, -2180},
- {18292, -2224},
- {18286, -2268},
- {18281, -2312},
- {18275, -2356},
- {18270, -2399},
- {18264, -2443},
- {18258, -2487},
- {18252, -2531},
- {18246, -2574},
- {18240, -2618},
- {18233, -2662},
- {18227, -2706},
- {18220, -2749},
- {18214, -2793},
- {18207, -2836},
- {18200, -2880},
- {18193, -2924},
- {18186, -2967},
- {18179, -3011},
- {18172, -3055},
- {18164, -3098},
- {18157, -3142},
- {18149, -3185},
- {18141, -3229},
- {18134, -3272},
- {18126, -3316},
- {18118, -3359},
- {18109, -3403},
- {18101, -3446},
- {18094, -3489},
- {18085, -3533},
- {18076, -3576},
- {18068, -3619},
- {18059, -3663},
- {18050, -3706},
- {18041, -3749},
- {18032, -3792},
- {18023, -3836},
- {18014, -3879},
- {18005, -3922},
- {17995, -3965},
- {17986, -4008},
- {17975, -4051},
- {17966, -4094},
- {17956, -4138},
- {17946, -4180},
- {17936, -4224},
- {17926, -4266},
- {17916, -4309},
- {17905, -4353},
- {17895, -4395},
- {17884, -4438},
- {17874, -4481},
- {17863, -4524},
- {17852, -4567},
- {17841, -4609},
- {17830, -4652},
- {17819, -4695},
- {17807, -4738},
- {17796, -4780},
- {17784, -4823},
- {17772, -4865},
- {17761, -4908},
- {17749, -4951},
- {17738, -4993},
- {17725, -5036},
- {17713, -5078},
- {17701, -5121},
- {17689, -5163},
- {17676, -5205},
- {17664, -5248},
- {17651, -5290},
- {17638, -5333},
- {17626, -5375},
- {17613, -5417},
- {17599, -5459},
- {17586, -5501},
- {17573, -5544},
- {17560, -5586},
- {17546, -5627},
- {17533, -5670},
- {17519, -5712},
- {17505, -5753},
- {17492, -5795},
- {17478, -5837},
- {17464, -5879},
- {17450, -5921},
- {17435, -5963},
- {17421, -6005},
- {17406, -6046},
- {17392, -6088},
- {17377, -6130},
- {17363, -6172},
- {17348, -6213},
- {17333, -6254},
- {17318, -6296},
- {17303, -6338},
- {17288, -6379},
- {17272, -6420},
- {17257, -6462},
- {17241, -6503},
- {17225, -6545},
- {17210, -6586},
- {17194, -6627},
- {17178, -6668},
- {17162, -6709},
- {17145, -6750},
- {17130, -6791},
- {17113, -6832},
- {17097, -6874},
- {17080, -6915},
- {17064, -6956},
- {17047, -6996},
- {17030, -7037},
- {17013, -7078},
- {16996, -7119},
- {16979, -7159},
- {16962, -7200},
- {16945, -7241},
- {16927, -7281},
- {16910, -7322},
- {16892, -7362},
- {16874, -7403},
- {16856, -7444},
- {16838, -7484},
- {16821, -7524},
- {16802, -7564},
- {16784, -7605},
- {16766, -7645},
- {16748, -7685},
- {16729, -7725},
- {16711, -7765},
- {16692, -7805},
- {16674, -7845},
- {16654, -7885},
- {16635, -7925},
- {16616, -7964},
- {16597, -8004},
- {16578, -8044},
- {16559, -8084},
- {16539, -8124},
- {16520, -8164},
- {16500, -8203},
- {16480, -8242},
- {16461, -8282},
- {16441, -8322},
- {16421, -8361},
- {16401, -8400},
- {16380, -8440},
- {16360, -8479},
- {16340, -8518},
- {16319, -8557},
- {16299, -8597},
- {16278, -8635},
- {16257, -8674},
- {16237, -8713},
- {16215, -8752},
- {16195, -8791},
- {16173, -8829},
- {16152, -8868},
- {16131, -8907},
- {16110, -8946},
- {16088, -8985},
- {16067, -9023},
- {16045, -9061},
- {16023, -9100},
- {16001, -9138},
- {15979, -9176},
- {15957, -9215},
- {15935, -9253},
- {15913, -9291},
- {15891, -9329},
- {15868, -9367},
- {15846, -9405},
- {15823, -9443},
- {15800, -9481},
- {15778, -9519},
- {15755, -9557},
- {15732, -9595},
- {15709, -9632},
- {15686, -9670},
- {15662, -9708},
- {15639, -9745},
- {15615, -9782},
- {15592, -9820},
- {15569, -9857},
- {15544, -9894},
- {15521, -9932},
- {15497, -9969},
- {15473, -10006},
- {15449, -10043},
- {15425, -10080},
- {15401, -10117},
- {15377, -10154},
- {15352, -10191},
- {15327, -10227},
- {15303, -10264},
- {15278, -10301},
- {15254, -10337},
- {15229, -10374},
- {15204, -10411},
- {15180, -10447},
- {15154, -10483},
- {15129, -10519},
- {15104, -10556},
- {15078, -10592},
- {15053, -10628},
- {15027, -10664},
- {15002, -10700},
- {14976, -10736},
- {14950, -10772},
- {14924, -10808},
- {14898, -10844},
- {14872, -10879},
- {14846, -10915},
- {14820, -10950},
- {14794, -10985},
- {14767, -11021},
- {14741, -11056},
- {14714, -11092},
- {14687, -11127},
- {14661, -11162},
- {14635, -11197},
- {14607, -11232},
- {14581, -11267},
- {14554, -11302},
- {14526, -11337},
- {14499, -11372},
- {14472, -11407},
- {14444, -11441},
- {14417, -11476},
- {14389, -11511},
- {14362, -11545},
- {14334, -11579},
- {14306, -11614},
- {14278, -11648},
- {14251, -11682},
- {14222, -11716},
- {14194, -11750},
- {14166, -11784},
- {14137, -11818},
- {14109, -11852},
- {14081, -11886},
- {14053, -11919},
- {14023, -11953},
- {13995, -11987},
- {13966, -12020},
- {13937, -12054},
- {13909, -12087},
- {13879, -12120},
- {13851, -12153},
- {13821, -12187},
- {13792, -12220},
- {13763, -12253},
- {13733, -12286},
- {13704, -12319},
- {13674, -12351},
- {13645, -12385},
- {13615, -12417},
- {13585, -12450},
- {13555, -12482},
- {13525, -12514},
- {13495, -12546},
- {13465, -12579},
- {13435, -12611},
- {13405, -12644},
- {13374, -12676},
- {13345, -12708},
- {13314, -12739},
- {13283, -12772}
-};
-
-static const cos_msin_t *s_cos_msin_table[] =
-{
- s_cos_msin_2,
- s_cos_msin_4,
- s_cos_msin_8,
- s_cos_msin_16,
- s_cos_msin_32,
- s_cos_msin_64
-};
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * decoder.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C)2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "tables.h"
-#include "huff_tab.h"
-#include "bitstream.h"
-
-int16_t get_rand(g722_1_rand_t *randobj)
-{
- int16_t random_word;
- int32_t acca;
-
- acca = randobj->seed0 + randobj->seed3;
- random_word = (int16_t) acca;
-
- if ((random_word & 32768L) != 0)
- random_word++;
- randobj->seed3 = randobj->seed2;
- randobj->seed2 = randobj->seed1;
- randobj->seed1 = randobj->seed0;
- randobj->seed0 = random_word;
- return random_word;
-}
-/*- End of function --------------------------------------------------------*/
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-static void test_for_frame_errors(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int *frame_error_flag,
- int16_t categorization_control,
- int16_t *absolute_region_power_index);
-
-static void error_handling(int16_t number_of_coefs,
- int16_t number_of_valid_coefs,
- int *frame_error_flag,
- int16_t *decoder_mlt_coefs,
- int16_t *old_decoder_mlt_coefs,
- int16_t *p_mag_shift,
- int16_t *p_old_mag_shift);
-
-static void decode_vector_quantized_mlt_indices(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t *decoder_region_standard_deviation,
- int16_t *dedecoder_power_categories,
- int16_t *dedecoder_mlt_coefs);
-
-static void decode_envelope(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t *decoder_region_standard_deviation,
- int16_t *absolute_region_power_index,
- int16_t *p_mag_shift);
-
-static void rate_adjust_categories(int16_t categorization_control,
- int16_t *decoder_power_categories,
- int16_t *decoder_category_balances);
-
-static int16_t index_to_array(int16_t index, int16_t *array, int16_t category);
-
-static void decoder(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t decoder_mlt_coefs[],
- int16_t *p_mag_shift,
- int16_t *p_old_mag_shift,
- int16_t old_decoder_mlt_coefs[],
- int frame_error_flag);
-
-/* Decodes the out_words into MLT coefs using G.722.1 Annex C */
-void decoder(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t decoder_mlt_coefs[],
- int16_t *p_mag_shift,
- int16_t *p_old_mag_shift,
- int16_t old_decoder_mlt_coefs[],
- int frame_error_flag)
-{
- int16_t decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS];
- int16_t absolute_region_power_index[MAX_NUMBER_OF_REGIONS];
- int16_t decoder_power_categories[MAX_NUMBER_OF_REGIONS];
- int16_t decoder_category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1];
- int16_t num_categorization_control_bits;
- int16_t num_categorization_control_possibilities;
- int16_t number_of_coefs;
- int16_t number_of_valid_coefs;
- uint16_t categorization_control;
-
- number_of_valid_coefs = number_of_regions*REGION_SIZE;
-
- /* Get some parameters based solely on the bitstream style */
- if (number_of_regions == NUMBER_OF_REGIONS)
- {
- number_of_coefs = DCT_LENGTH;
- num_categorization_control_bits = NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
- else
- {
- number_of_coefs = MAX_DCT_LENGTH;
- num_categorization_control_bits = MAX_NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
-
- if (frame_error_flag == 0)
- {
- /* Convert the bits to absolute region power index and decoder_region_standard_deviation */
- decode_envelope(s,
- number_of_regions,
- decoder_region_standard_deviation,
- absolute_region_power_index,
- p_mag_shift);
-
- /* Fill the categorization_control with NUM_CATEGORIZATION_CONTROL_BITS */
- categorization_control = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), num_categorization_control_bits);
- s->number_of_bits_left -= num_categorization_control_bits;
-
- /* Obtain decoder power categories and category balances */
- /* Based on the absolute region power index */
- categorize(s->number_of_bits_left,
- number_of_regions,
- num_categorization_control_possibilities,
- absolute_region_power_index,
- decoder_power_categories,
- decoder_category_balances);
-
- /* Perform adjustmaents to the power categories and category balances based on the cat control */
- rate_adjust_categories(categorization_control,
- decoder_power_categories,
- decoder_category_balances);
-
- /* Decode the quantized bits into mlt coefs */
- decode_vector_quantized_mlt_indices(s,
- number_of_regions,
- decoder_region_standard_deviation,
- decoder_power_categories,
- decoder_mlt_coefs);
-
- test_for_frame_errors(s,
- number_of_regions,
- num_categorization_control_possibilities,
- &frame_error_flag,
- categorization_control,
- absolute_region_power_index);
- }
-
- /* Perform error handling operations */
- error_handling(number_of_coefs,
- number_of_valid_coefs,
- &frame_error_flag,
- decoder_mlt_coefs,
- old_decoder_mlt_coefs,
- p_mag_shift,
- p_old_mag_shift);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Recover differential_region_power_index from code bits */
-static void decode_envelope(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t *decoder_region_standard_deviation,
- int16_t *absolute_region_power_index,
- int16_t *p_mag_shift)
-{
- int16_t region;
- int16_t i;
- int16_t index;
- int16_t differential_region_power_index[MAX_NUMBER_OF_REGIONS];
- int16_t max_index;
- int16_t temp;
- int16_t temp1;
- int16_t temp2;
- int32_t acca;
-
- /* Get 5 bits from the current code word */
- index = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 5);
- s->number_of_bits_left -= 5;
-
- /* ESF_ADJUSTMENT_TO_RMS_INDEX compensates for the current (9/30/96)
- IMLT being scaled to high by the ninth power of sqrt(2). */
- differential_region_power_index[0] = sub(index, ESF_ADJUSTMENT_TO_RMS_INDEX);
-
- /* Obtain differential_region_power_index */
- for (region = 1; region < number_of_regions; region++)
- {
- index = 0;
- do
- {
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- index = differential_region_power_decoder_tree[region][index][0];
- else
- index = differential_region_power_decoder_tree[region][index][1];
- s->number_of_bits_left--;
- }
- while (index > 0);
-
- differential_region_power_index[region] = negate(index);
- }
-
- /* Reconstruct absolute_region_power_index[] from differential_region_power_index[]. */
- absolute_region_power_index[0] = differential_region_power_index[0];
- for (region = 1; region < number_of_regions; region++)
- {
- acca = L_add(absolute_region_power_index[region - 1], differential_region_power_index[region]);
- acca = L_add(acca, DRP_DIFF_MIN);
- absolute_region_power_index[region] = (int16_t) acca;
- }
-
- /* Reconstruct decoder_region_standard_deviation[] from absolute_region_power_index[]. */
- /* DEBUG!!!! - This integer method jointly computes the mag_shift
- and the standard deviations already mag_shift compensated. It
- relies on REGION_POWER_STEPSIZE_DB being exactly 3.010299957 db
- or a square root of 2 change in standard deviation. If
- REGION_POWER_STEPSIZE_DB changes, this software must be reworked. */
-
- temp = 0;
- max_index = 0;
- for (region = 0; region < number_of_regions; region++)
- {
- acca = L_add(absolute_region_power_index[region], REGION_POWER_TABLE_NUM_NEGATIVES);
- i = (int16_t) acca;
-
- temp1 = sub(i, max_index);
- if (temp1 > 0)
- max_index = i;
- temp = add(temp, int_region_standard_deviation_table[i]);
- }
- i = 9;
- temp1 = sub(temp, 8);
- temp2 = sub(max_index, 28);
- while ((i >= 0) && ((temp1 >= 0) || (temp2 > 0)))
- {
- i = sub(i, 1);
- temp >>= 1;
- max_index = sub(max_index, 2);
- temp1 = sub(temp, 8);
- temp2 = sub(max_index, 28);
- }
-
- *p_mag_shift = i;
-
- temp = (int16_t ) (REGION_POWER_TABLE_NUM_NEGATIVES + (*p_mag_shift * 2));
- for (region = 0; region < number_of_regions; region++)
- {
- acca = L_add(absolute_region_power_index[region], temp);
- i = (int16_t) acca;
- decoder_region_standard_deviation[region] = int_region_standard_deviation_table[i];
- }
-
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Adjust the power categories based on the categorization control */
-static void rate_adjust_categories(int16_t categorization_control,
- int16_t *decoder_power_categories,
- int16_t *decoder_category_balances)
-{
- int16_t i;
- int16_t region;
-
- i = 0;
- while (categorization_control > 0)
- {
- region = decoder_category_balances[i++];
- decoder_power_categories[region]++;
- categorization_control = sub(categorization_control, 1);
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Decode MLT coefficients */
-static void decode_vector_quantized_mlt_indices(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t *decoder_region_standard_deviation,
- int16_t *decoder_power_categories,
- int16_t *decoder_mlt_coefs)
-{
- const int16_t noise_fill_factor[3] =
- {
- 5793, 8192, 23170
- };
- int j;
- int16_t standard_deviation;
- int16_t *decoder_mlt_ptr;
- int16_t decoder_mlt_value;
- int16_t noifillpos;
- int16_t noifillneg;
- int16_t region;
- int16_t category;
- int16_t n;
- int16_t k[MAX_VECTOR_DIMENSION];
- int16_t vec_dim;
- int16_t num_vecs;
- int16_t index;
- int16_t signs_index;
- int16_t bit;
- int16_t num_sign_bits;
- int16_t ran_out_of_bits_flag;
- int16_t random_word;
- int16_t temp;
- int32_t acca;
- const int16_t *decoder_table_ptr;
-
- ran_out_of_bits_flag = 0;
- for (region = 0; region < number_of_regions; region++)
- {
- category = (int16_t) decoder_power_categories[region];
- acca = L_mult0(region, REGION_SIZE);
- index = (int16_t) acca;
- decoder_mlt_ptr = &decoder_mlt_coefs[index];
- standard_deviation = decoder_region_standard_deviation[region];
-
- temp = sub(category, 7);
- if (temp < 0)
- {
- /* Get the proper table of decoder tables, vec_dim, and num_vecs for the cat */
- decoder_table_ptr = table_of_decoder_tables[category];
- vec_dim = vector_dimension[category];
- num_vecs = number_of_vectors[category];
-
- for (n = 0; n < num_vecs; n++)
- {
- index = 0;
-
- /* Get index */
- do
- {
- if (s->number_of_bits_left <= 0)
- {
- ran_out_of_bits_flag = 1;
- break;
- }
-
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- {
- temp = shl(index, 1);
- index = decoder_table_ptr[temp];
- }
- else
- {
- temp = shl(index, 1);
- index = decoder_table_ptr[temp + 1];
- }
- s->number_of_bits_left--;
- }
- while (index > 0);
-
- if (ran_out_of_bits_flag != 0)
- break;
-
- index = negate(index);
-
- /* convert index into array used to access the centroid table */
- /* get the number of sign bits in the index */
- num_sign_bits = index_to_array(index, k, category);
-
- if (s->number_of_bits_left >= num_sign_bits)
- {
- signs_index = 0;
- bit = 0;
- if (num_sign_bits != 0)
- {
- signs_index = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), num_sign_bits);
- s->number_of_bits_left -= num_sign_bits;
- bit = 1 << (num_sign_bits - 1);
- }
-
- for (j = 0; j < vec_dim; j++)
- {
- acca = L_mult0(standard_deviation, mlt_quant_centroid[category][k[j]]);
- acca = L_shr(acca, 12);
- decoder_mlt_value = (int16_t) acca;
-
- if (decoder_mlt_value != 0)
- {
- if ((signs_index & bit) == 0)
- decoder_mlt_value = negate(decoder_mlt_value);
- bit >>= 1;
- }
- *decoder_mlt_ptr++ = decoder_mlt_value;
- }
- }
- else
- {
- ran_out_of_bits_flag = 1;
- break;
- }
- }
- /* If ran out of bits during decoding do noise fill for remaining regions. */
- /* DEBUG!! - For now also redo all of last region with all noise fill. */
- if (ran_out_of_bits_flag != 0)
- {
- for (j = region + 1; j < number_of_regions; j++)
- decoder_power_categories[j] = 7;
- category = 7;
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- }
- }
-
- if (category == (NUM_CATEGORIES - 3) || category == (NUM_CATEGORIES - 2))
- {
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- noifillpos = mult(standard_deviation, noise_fill_factor[category - 5]);
- noifillneg = negate(noifillpos);
- random_word = get_rand(&s->randobj);
-
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- *decoder_mlt_ptr = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- random_word >>= 1;
- }
- /* pointer arithmetic */
- decoder_mlt_ptr++;
- }
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- *decoder_mlt_ptr = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- random_word >>= 1;
- }
- /* pointer arithmetic */
- decoder_mlt_ptr++;
- }
- }
-
- if (category == NUM_CATEGORIES - 1)
- {
- index = sub(category, 5);
- noifillpos = mult(standard_deviation, noise_fill_factor[index]);
- noifillneg = negate(noifillpos);
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- *decoder_mlt_ptr++ = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- random_word >>= 1;
- }
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- decoder_mlt_ptr[j] = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- random_word >>= 1;
- }
- }
- }
-
- if (ran_out_of_bits_flag)
- s->number_of_bits_left = -1;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute an array of sign bits with the length of the category vector
- Returns the number of sign bits and the array */
-static int16_t index_to_array(int16_t index, int16_t *array, int16_t category)
-{
- int16_t j;
- int16_t q;
- int16_t p;
- int16_t number_of_non_zero;
- int16_t max_bin_plus_one;
- int16_t inverse_of_max_bin_plus_one;
-
- number_of_non_zero = 0;
- p = index;
- max_bin_plus_one = max_bin[category] + 1;
- inverse_of_max_bin_plus_one = max_bin_plus_one_inverse[category];
-
- for (j = vector_dimension[category] - 1; j >= 0; j--)
- {
- q = (p*inverse_of_max_bin_plus_one) >> 15;
- array[j] = p - q*max_bin_plus_one;
- p = q;
- if (array[j] != 0)
- number_of_non_zero++;
- }
- return number_of_non_zero;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Tests for error conditions and sets the frame_error_flag accordingly */
-static void test_for_frame_errors(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int *frame_error_flag,
- int16_t categorization_control,
- int16_t *absolute_region_power_index)
-{
- int i;
-
- /* Test for bit stream errors. */
- if (s->number_of_bits_left > 0)
- {
- while (s->number_of_bits_left > 0)
- {
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- *frame_error_flag = 1;
- s->number_of_bits_left--;
- }
- }
- else
- {
- if (categorization_control < num_categorization_control_possibilities - 1)
- {
- if (s->number_of_bits_left < 0)
- *frame_error_flag |= 2;
- }
- }
-
- /* Checks to ensure that absolute_region_power_index is within range */
- /* The error flag is set if it is out of range */
- for (i = 0; i < number_of_regions; i++)
- {
- if ((absolute_region_power_index[i] + ESF_ADJUSTMENT_TO_RMS_INDEX > 31)
- ||
- (absolute_region_power_index[i] + ESF_ADJUSTMENT_TO_RMS_INDEX < -8))
- {
- *frame_error_flag |= 4;
- break;
- }
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-static void error_handling(int16_t number_of_coefs,
- int16_t number_of_valid_coefs,
- int *frame_error_flag,
- int16_t *decoder_mlt_coefs,
- int16_t *old_decoder_mlt_coefs,
- int16_t *p_mag_shift,
- int16_t *p_old_mag_shift)
-{
- int i;
-
- /* If both the current and previous frames are errored,
- set the mlt coefficients to 0. If only the current frame
- is errored, repeat the previous frame's MLT coefficients. */
- if (*frame_error_flag)
- {
- for (i = 0; i < number_of_valid_coefs; i++)
- decoder_mlt_coefs[i] = old_decoder_mlt_coefs[i];
- for (i = 0; i < number_of_valid_coefs; i++)
- old_decoder_mlt_coefs[i] = 0;
- *p_mag_shift = *p_old_mag_shift;
- *p_old_mag_shift = 0;
- }
- else
- {
- /* Store in case the next frame has errors. */
- for (i = 0; i < number_of_valid_coefs; i++)
- old_decoder_mlt_coefs[i] = decoder_mlt_coefs[i];
- *p_old_mag_shift = *p_mag_shift;
- }
-
- /* Zero out the upper 1/8 of the spectrum. */
- for (i = number_of_valid_coefs; i < number_of_coefs; i++)
- decoder_mlt_coefs[i] = 0;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_decode(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len)
-{
- int16_t decoder_mlt_coefs[MAX_DCT_LENGTH];
- int16_t mag_shift;
- int i;
- int j;
-
- for (i = 0, j = 0; j < len; i += s->frame_size, j += s->number_of_bits_per_frame/8)
- {
- g722_1_bitstream_init(&s->bitstream);
- s->code_ptr = &g722_1_data[j];
- s->number_of_bits_left = s->number_of_bits_per_frame;
-
- /* Process the out_words into decoder_mlt_coefs */
- decoder(s,
- s->number_of_regions,
- decoder_mlt_coefs,
- &mag_shift,
- &s->old_mag_shift,
- s->old_decoder_mlt_coefs,
- 0);
-
- /* Convert the decoder_mlt_coefs to samples */
- rmlt_coefs_to_samples(decoder_mlt_coefs, s->old_samples, amp + i, s->frame_size, mag_shift);
- }
- return i;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_fillin(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len)
-{
- int16_t decoder_mlt_coefs[MAX_DCT_LENGTH];
- int16_t mag_shift;
- int i;
- int j;
-
- for (i = 0, j = 0; j < len; i += s->frame_size, j += s->number_of_bits_per_frame/8)
- {
- g722_1_bitstream_init(&s->bitstream);
- s->code_ptr = &g722_1_data[j];
- s->number_of_bits_left = s->number_of_bits_per_frame;
-
- /* Process the out_words into decoder MLT coefs */
- decoder(s,
- s->number_of_regions,
- decoder_mlt_coefs,
- &mag_shift,
- &s->old_mag_shift,
- s->old_decoder_mlt_coefs,
- 1);
-
- /* Convert the decoder MLT coefs to samples */
- rmlt_coefs_to_samples(decoder_mlt_coefs, s->old_samples, amp + i, s->frame_size, mag_shift);
- i += s->frame_size;
- break;
- }
- return i;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-
-int g722_1_decode_set_rate(g722_1_decode_state_t *s, int bit_rate)
-{
- if ((bit_rate < 16000) || (bit_rate > 48000) || ((bit_rate%800) != 0))
- return -1;
- s->bit_rate = bit_rate;
- s->number_of_bits_per_frame = (int16_t) ((s->bit_rate)/50);
- s->bytes_per_frame = s->number_of_bits_per_frame/8;
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-
-g722_1_decode_state_t *g722_1_decode_init(g722_1_decode_state_t *s, int bit_rate, int sample_rate)
-{
-#if !defined(G722_1_USE_FIXED_POINT)
- int i;
-#endif
-
- if ((bit_rate < 16000) || (bit_rate > 48000) || ((bit_rate%800) != 0))
- return NULL;
- if (sample_rate != G722_1_SAMPLE_RATE_16000 && sample_rate != G722_1_SAMPLE_RATE_32000)
- return NULL;
-
- if (s == NULL)
- {
- if ((s = (g722_1_decode_state_t *) malloc(sizeof(*s))) == NULL)
- return NULL;
- }
- memset(s, 0, sizeof(*s));
-#if !defined(G722_1_USE_FIXED_POINT)
- /* Initialize the coefs history */
- for (i = 0; i < s->frame_size; i++)
- s->old_decoder_mlt_coefs[i] = 0.0f;
- for (i = 0; i < (s->frame_size >> 1); i++)
- s->old_samples[i] = 0.0f;
-#endif
- s->sample_rate = sample_rate;
- if (sample_rate == G722_1_SAMPLE_RATE_16000)
- {
- s->number_of_regions = NUMBER_OF_REGIONS;
- s->frame_size = MAX_FRAME_SIZE >> 1;
- }
- else
- {
- s->number_of_regions = MAX_NUMBER_OF_REGIONS;
- s->frame_size = MAX_FRAME_SIZE;
- }
- s->bit_rate = bit_rate;
- s->number_of_bits_per_frame = s->bit_rate/50;
- s->bytes_per_frame = s->number_of_bits_per_frame/8;
-
- /* Initialize the random number generator */
- s->randobj.seed0 = 1;
- s->randobj.seed1 = 1;
- s->randobj.seed2 = 1;
- s->randobj.seed3 = 1;
-
- return s;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_decode_release(g722_1_decode_state_t *s)
-{
- free(s);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * decoder.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "huff_tab.h"
-#include "tables.h"
-#include "bitstream.h"
-#include "utilities.h"
-
-#if !defined(G722_1_USE_FIXED_POINT)
-
-static void test_for_frame_errors(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int *frame_error_flag,
- int16_t categorization_control,
- int *absolute_region_power_index);
-
-static void error_handling(int number_of_coefs,
- int number_of_valid_coefs,
- int *frame_error_flag,
- float *decoder_mlt_coefs,
- float *old_decoder_mlt_coefs);
-
-static void decode_vector_quantized_mlt_indices(g722_1_decode_state_t *s,
- int number_of_regions,
- float decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS],
- int decoder_power_categories[MAX_NUMBER_OF_REGIONS],
- float decoder_mlt_coefs[MAX_DCT_LENGTH],
- int rmlt_scale_factor);
-
-static void decode_envelope(g722_1_decode_state_t *s,
- int number_of_regions,
- float decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS]);
-
-static void rate_adjust_categories(int rate_control,
- int decoder_power_categories[MAX_NUMBER_OF_REGIONS],
- int decoder_category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1]);
-
-static int index_to_array(int index,
- int array[MAX_VECTOR_DIMENSION],
- int category);
-
-static void decoder(g722_1_decode_state_t *s,
- float decoder_mlt_coefs[MAX_DCT_LENGTH],
- float old_decoder_mlt_coefs[MAX_DCT_LENGTH],
- int frame_error_flag);
-
-/* Decode the bitstream into MLT coefs using G.722.1 Annex C */
-static void decoder(g722_1_decode_state_t *s,
- float decoder_mlt_coefs[MAX_DCT_LENGTH],
- float old_decoder_mlt_coefs[MAX_DCT_LENGTH],
- int frame_error_flag)
-{
- float decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS];
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS];
- int decoder_power_categories[MAX_NUMBER_OF_REGIONS];
- int decoder_category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1];
- int num_categorization_control_bits;
- int num_categorization_control_possibilities;
- int number_of_coefs;
- int number_of_valid_coefs;
- int rmlt_scale_factor;
- int rate_control;
-
- number_of_valid_coefs = s->number_of_regions*REGION_SIZE;
-
- /* Get some parameters based solely on the bitstream style */
- if (s->number_of_regions == NUMBER_OF_REGIONS)
- {
- number_of_coefs = FRAME_SIZE;
- num_categorization_control_bits = NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- rmlt_scale_factor = (int) INTEROP_RMLT_SCALE_FACTOR_7;
- }
- else
- {
- number_of_coefs = MAX_FRAME_SIZE;
- num_categorization_control_bits = MAX_NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- rmlt_scale_factor = (int) INTEROP_RMLT_SCALE_FACTOR_14;
- }
-
- if (frame_error_flag == 0)
- {
- decode_envelope(s,
- s->number_of_regions,
- decoder_region_standard_deviation,
- absolute_region_power_index);
-
- rate_control = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), num_categorization_control_bits);
- s->number_of_bits_left -= num_categorization_control_bits;
-
- categorize(s->number_of_regions,
- s->number_of_bits_left,
- absolute_region_power_index,
- decoder_power_categories,
- decoder_category_balances);
-
- rate_adjust_categories(rate_control,
- decoder_power_categories,
- decoder_category_balances);
-
- decode_vector_quantized_mlt_indices(s,
- s->number_of_regions,
- decoder_region_standard_deviation,
- decoder_power_categories,
- decoder_mlt_coefs,
- rmlt_scale_factor);
-
- test_for_frame_errors(s,
- s->number_of_regions,
- num_categorization_control_possibilities,
- &frame_error_flag,
- rate_control,
- absolute_region_power_index);
- }
- error_handling(number_of_coefs,
- number_of_valid_coefs,
- &frame_error_flag,
- decoder_mlt_coefs,
- old_decoder_mlt_coefs);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Recover differential_region_power_index from code bits */
-static void decode_envelope(g722_1_decode_state_t *s,
- int number_of_regions,
- float decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS])
-{
- int region;
- int i;
- int index;
- int differential_region_power_index[MAX_NUMBER_OF_REGIONS];
-
- /* Recover differential_region_power_index[] from code_bits[]. */
- index = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 5);
- s->number_of_bits_left -= 5;
-
- /* ESF_ADJUSTMENT_TO_RMS_INDEX compensates for the current (9/30/96)
- IMLT being scaled too high by the ninth power of sqrt(2). */
- differential_region_power_index[0] = index - ESF_ADJUSTMENT_TO_RMS_INDEX;
-
- for (region = 1; region < number_of_regions; region++)
- {
- index = 0;
- do
- {
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- index = differential_region_power_decoder_tree[region][index][0];
- else
- index = differential_region_power_decoder_tree[region][index][1];
- s->number_of_bits_left--;
- }
- while (index > 0);
- differential_region_power_index[region] = -index;
- }
-
- /* Reconstruct absolute_region_power_index[] from differential_region_power_index[]. */
- absolute_region_power_index[0] = differential_region_power_index[0];
-
- for (region = 1; region < number_of_regions; region++)
- {
- absolute_region_power_index[region] = absolute_region_power_index[region - 1]
- + differential_region_power_index[region]
- + DRP_DIFF_MIN;
- }
-
- /* Reconstruct decoder_region_standard_deviation[] from absolute_region_power_index[]. */
- for (region = 0; region < number_of_regions; region++)
- {
- i = absolute_region_power_index[region] + REGION_POWER_TABLE_NUM_NEGATIVES;
- decoder_region_standard_deviation[region] = region_standard_deviation_table[i];
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Adjust the power categories based on the categorization control */
-static void rate_adjust_categories(int rate_control,
- int decoder_power_categories[MAX_NUMBER_OF_REGIONS],
- int decoder_category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1])
-{
- int i;
- int region;
-
- i = 0;
- while (rate_control > 0)
- {
- region = decoder_category_balances[i++];
- decoder_power_categories[region]++;
- rate_control--;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Decode MLT coefficients */
-static void decode_vector_quantized_mlt_indices(g722_1_decode_state_t *s,
- int number_of_regions,
- float decoder_region_standard_deviation[MAX_NUMBER_OF_REGIONS],
- int decoder_power_categories[MAX_NUMBER_OF_REGIONS],
- float decoder_mlt_coefs[MAX_DCT_LENGTH],
- int rmlt_scale_factor)
-{
- static const float noise_fill_factor_cat5[20] =
- {
- 0.70711f, 0.6179f, 0.5005f, 0.3220f,
- 0.17678f, 0.17678f, 0.17678f, 0.17678f,
- 0.17678f, 0.17678f, 0.17678f, 0.17678f,
- 0.17678f, 0.17678f, 0.17678f, 0.17678f,
- 0.17678f, 0.17678f, 0.17678f, 0.17678f
- };
- static const float noise_fill_factor_cat6[20] =
- {
- 0.70711f, 0.5686f, 0.3563f, 0.25f,
- 0.25f, 0.25f, 0.25f, 0.25f,
- 0.25f, 0.25f, 0.25f, 0.25f,
- 0.25f, 0.25f, 0.25f, 0.25f,
- 0.25f, 0.25f, 0.25f, 0.25f
- };
-
- float standard_deviation;
- float *decoder_mlt_ptr;
- float decoder_mlt_value;
- float temp1;
- float noifillpos;
- float noifillneg;
- int region;
- int category;
- int j;
- int n;
- int k[MAX_VECTOR_DIMENSION];
- int vec_dim;
- int num_vecs;
- int index;
- int signs_index;
- int bit;
- int num_sign_bits;
- int ran_out_of_bits_flag;
- int random_word;
- const int16_t *decoder_table_ptr;
-
- ran_out_of_bits_flag = 0;
- for (region = 0; region < number_of_regions; region++)
- {
- category = decoder_power_categories[region];
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- standard_deviation = decoder_region_standard_deviation[region];
- if (category < NUM_CATEGORIES - 1)
- {
- decoder_table_ptr = table_of_decoder_tables[category];
- vec_dim = vector_dimension[category];
- num_vecs = number_of_vectors[category];
-
- for (n = 0; n < num_vecs; n++)
- {
- index = 0;
- do
- {
- if (s->number_of_bits_left <= 0)
- {
- ran_out_of_bits_flag = 1;
- break;
- }
-
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- index = *(decoder_table_ptr + 2*index);
- else
- index = *(decoder_table_ptr + 2*index + 1);
- s->number_of_bits_left--;
- }
- while (index > 0);
-
- if (ran_out_of_bits_flag == 1)
- break;
- index = -index;
- num_sign_bits = index_to_array(index, k, category);
-
- if (s->number_of_bits_left >= num_sign_bits)
- {
- signs_index = 0;
- bit = 0;
- if (num_sign_bits != 0)
- {
- signs_index = g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), num_sign_bits);
- s->number_of_bits_left -= num_sign_bits;
- bit = 1 << (num_sign_bits - 1);
- }
- for (j = 0; j < vec_dim; j++)
- {
- /* This was changed to for fixed point interop
- A scale factor is used to adjust the decoded mlt value. */
- decoder_mlt_value = standard_deviation
- * mlt_quant_centroid[category][k[j]]
- * (float) rmlt_scale_factor;
-
- if (decoder_mlt_value != 0)
- {
- if ((signs_index & bit) == 0)
- decoder_mlt_value *= -1;
- bit >>= 1;
- }
-
- *decoder_mlt_ptr++ = decoder_mlt_value;
- }
- }
- else
- {
- ran_out_of_bits_flag = 1;
- break;
- }
- }
-
- /* If ran out of bits during decoding do noise fill for remaining regions. */
- if (ran_out_of_bits_flag == 1)
- {
- for (j = region + 1; j < number_of_regions; j++)
- decoder_power_categories[j] = NUM_CATEGORIES - 1;
- category = NUM_CATEGORIES - 1;
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- }
- }
-
- if (category == NUM_CATEGORIES - 3)
- {
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- n = 0;
- for (j = 0; j < REGION_SIZE; j++)
- {
- if (*decoder_mlt_ptr != 0)
- {
- n++;
- if (fabs(*decoder_mlt_ptr) > (2.0*(float) rmlt_scale_factor*standard_deviation))
- n += 3;
- }
- decoder_mlt_ptr++;
- }
- if (n > 19)
- n = 19;
- temp1 = noise_fill_factor_cat5[n];
-
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
-
- /* noifillpos = standard_deviation * 0.17678; */
- noifillpos = standard_deviation*temp1;
- noifillneg = -noifillpos;
-
- /* This assumes region_size = 20 */
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- temp1 = noifillpos;
- if ((random_word & 1) == 0)
- temp1 = noifillneg;
- *decoder_mlt_ptr = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- decoder_mlt_ptr++;
- }
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- temp1 = noifillpos;
- if ((random_word & 1) == 0)
- temp1 = noifillneg;
- *decoder_mlt_ptr = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- decoder_mlt_ptr++;
- }
- }
-
- if (category == NUM_CATEGORIES - 2)
- {
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
- n = 0;
- for (j = 0; j < REGION_SIZE; j++)
- {
- if (*decoder_mlt_ptr++ != 0)
- n++;
- }
- temp1 = noise_fill_factor_cat6[n];
-
- decoder_mlt_ptr = &decoder_mlt_coefs[region*REGION_SIZE];
-
- noifillpos = standard_deviation*temp1;
- noifillneg = -noifillpos;
-
- /* This assumes region_size = 20 */
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- temp1 = noifillpos;
- if ((random_word & 1) == 0)
- temp1 = noifillneg;
- *decoder_mlt_ptr = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- decoder_mlt_ptr++;
- }
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- if (*decoder_mlt_ptr == 0)
- {
- temp1 = noifillpos;
- if ((random_word & 1) == 0)
- temp1 = noifillneg;
- *decoder_mlt_ptr = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- decoder_mlt_ptr++;
- }
- }
-
- if (category == NUM_CATEGORIES - 1)
- {
- noifillpos = standard_deviation*0.70711f;
- noifillneg = -noifillpos;
-
- /* This assumes region_size = 20 */
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- temp1 = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- *decoder_mlt_ptr++ = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- random_word = get_rand(&s->randobj);
- for (j = 0; j < 10; j++)
- {
- temp1 = ((random_word & 1) == 0) ? noifillneg : noifillpos;
- decoder_mlt_ptr[j] = temp1*(float) rmlt_scale_factor;
- random_word >>= 1;
- }
- }
- }
-
- if (ran_out_of_bits_flag)
- s->number_of_bits_left = -1;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute an array of sign bits with the length of the category vector
- Returns the number of sign bits and the array */
-static int index_to_array(int index, int array[MAX_VECTOR_DIMENSION], int category)
-{
- int j;
- int q;
- int p;
- int number_of_non_zero;
- int max_bin_plus_one;
- int inverse_of_max_bin_plus_one;
-
- number_of_non_zero = 0;
- p = index;
- max_bin_plus_one = max_bin[category] + 1;
- inverse_of_max_bin_plus_one = max_bin_plus_one_inverse[category];
-
- for (j = vector_dimension[category] - 1; j >= 0; j--)
- {
- q = (p*inverse_of_max_bin_plus_one) >> 15;
- array[j] = p - q*max_bin_plus_one;
- p = q;
- if (array[j] != 0)
- number_of_non_zero++;
- }
- return number_of_non_zero;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Tests for error conditions and sets the frame_error_flag accordingly */
-static void test_for_frame_errors(g722_1_decode_state_t *s,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int *frame_error_flag,
- int16_t categorization_control,
- int *absolute_region_power_index)
-{
- int i;
-
- /* Test for bit stream errors. */
- if (s->number_of_bits_left > 0)
- {
- while (s->number_of_bits_left > 0)
- {
- if (g722_1_bitstream_get(&s->bitstream, &(s->code_ptr), 1) == 0)
- *frame_error_flag = 1;
- s->number_of_bits_left--;
- }
- }
- else
- {
- if (categorization_control < num_categorization_control_possibilities - 1)
- {
- if (s->number_of_bits_left < 0)
- *frame_error_flag |= 2;
- }
- }
-
- /* Checks to ensure that absolute_region_power_index is within range */
- /* The error flag is set if it is out of range */
- for (i = 0; i < number_of_regions; i++)
- {
- if ((absolute_region_power_index[i] + ESF_ADJUSTMENT_TO_RMS_INDEX > 31)
- ||
- (absolute_region_power_index[i] + ESF_ADJUSTMENT_TO_RMS_INDEX < -8))
- {
- *frame_error_flag |= 4;
- break;
- }
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-static void error_handling(int number_of_coefs,
- int number_of_valid_coefs,
- int *frame_error_flag,
- float *decoder_mlt_coefs,
- float *old_decoder_mlt_coefs)
-{
- /* If both the current and previous frames are errored,
- set the mlt coefficients to 0. If only the current frame
- is errored, repeat the previous frame's MLT coefficients. */
- if (*frame_error_flag)
- {
- vec_copyf(decoder_mlt_coefs, old_decoder_mlt_coefs, number_of_valid_coefs);
- vec_zerof(old_decoder_mlt_coefs, number_of_valid_coefs);
- }
- else
- {
- /* Store in case the next frame has errors. */
- vec_copyf(old_decoder_mlt_coefs, decoder_mlt_coefs, number_of_valid_coefs);
- }
- /* Zero out the upper 1/8 of the spectrum. */
- vec_zerof(&decoder_mlt_coefs[number_of_valid_coefs], number_of_coefs - number_of_valid_coefs);
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_decode(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len)
-{
- float decoder_mlt_coefs[MAX_DCT_LENGTH];
- float famp[MAX_FRAME_SIZE];
- float ftemp;
- int i;
- int j;
- int k;
-
- for (i = 0, j = 0; j < len; i += s->frame_size, j += s->number_of_bits_per_frame/8)
- {
- g722_1_bitstream_init(&s->bitstream);
- s->code_ptr = &g722_1_data[j];
- s->number_of_bits_left = s->number_of_bits_per_frame;
- /* Process the out_words into decoder_mlt_coefs */
- decoder(s,
- decoder_mlt_coefs,
- s->old_decoder_mlt_coefs,
- 0);
-
- /* Convert the decoder_mlt_coefs to samples */
- rmlt_coefs_to_samples(decoder_mlt_coefs, s->old_samples, famp, s->frame_size);
- for (k = 0; k < s->frame_size; k++)
- {
- ftemp = famp[k];
- if (ftemp >= 0.0)
- amp[k + i] = (ftemp < 32767.0) ? (int) (ftemp + 0.5) : 32767;
- else
- amp[k + i] = (ftemp > -32768.0) ? (int) (ftemp - 0.5) : -32768;
- }
- }
- return i;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_fillin(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len)
-{
- float decoder_mlt_coefs[MAX_DCT_LENGTH];
- float famp[MAX_FRAME_SIZE];
- float ftemp;
- int i;
- int j;
- int k;
-
- for (i = 0, j = 0; j < len; i += s->frame_size, j += s->number_of_bits_per_frame/8)
- {
- g722_1_bitstream_init(&s->bitstream);
- s->code_ptr = &g722_1_data[j];
- s->number_of_bits_left = s->number_of_bits_per_frame;
-
- /* Process the out_words into decoder MLT_coefs */
- decoder(s,
- decoder_mlt_coefs,
- s->old_decoder_mlt_coefs,
- 1);
-
- /* Convert the decoder MLT coefs to samples */
- rmlt_coefs_to_samples(decoder_mlt_coefs, s->old_samples, famp, s->frame_size);
- for (k = 0; k < s->frame_size; k++)
- {
- ftemp = famp[k];
- if (ftemp >= 0.0)
- amp[k + i] = (ftemp < 32767.0) ? (int) (ftemp + 0.5) : 32767;
- else
- amp[k + i] = (ftemp > -32768.0) ? (int) (ftemp - 0.5) : -32768;
- }
- }
- return i;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * defs.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#define MAX(a,b) (a > b ? a : b)
-#define MIN(a,b) (a < b ? a : b)
-
-#define FRAME_SIZE (MAX_FRAME_SIZE >> 1)
-
-#define DCT_LENGTH (MAX_DCT_LENGTH >> 1)
-
-#define NUM_CATEGORIES 8
-
-#define REGION_POWER_TABLE_SIZE 64
-#define REGION_POWER_TABLE_NUM_NEGATIVES 24
-
-#define NUM_CATEGORIZATION_CONTROL_BITS 4
-#define NUM_CATEGORIZATION_CONTROL_POSSIBILITIES 16
-
-#define MAX_NUM_CATEGORIZATION_CONTROL_BITS 5
-#define MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES 32
-
-/* region_size = (BLOCK_SIZE * 0.875)/NUMBER_OF_REGIONS; */
-#define REGION_SIZE 20
-
-#define NUMBER_OF_REGIONS 14
-#define MAX_NUMBER_OF_REGIONS 28
-
-/* This value has been changed for fixed point interop */
-#define ESF_ADJUSTMENT_TO_RMS_INDEX (9-2)
-
-#define MAX_DCT_LENGTH_LOG 7
-#define DCT_LENGTH_LOG 6
-
-#define CORE_SIZE 10
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-#include "basop32.h"
-
-#define DCT_LENGTH_DIV_2 160
-#define DCT_LENGTH_DIV_4 80
-#define DCT_LENGTH_DIV_8 40
-#define DCT_LENGTH_DIV_16 20
-#define DCT_LENGTH_DIV_32 10
-#define DCT_LENGTH_DIV_64 5
-
-void adjust_abs_region_power_index(int16_t *absolute_region_power_index, int16_t *mlt_coefs, int16_t number_of_regions);
-
-int16_t samples_to_rmlt_coefs(const int16_t new_samples[],
- int16_t history[],
- int16_t coefs[],
- int dct_length);
-
-void rmlt_coefs_to_samples(int16_t *coefs,
- int16_t *old_samples,
- int16_t *out_samples,
- int dct_length,
- int16_t mag_shift);
-
-void rmlt_coefs_to_samples(int16_t *coefs,
- int16_t *old_samples,
- int16_t *out_samples,
- int dct_length,
- int16_t mag_shift);
-
-void categorize(int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t *rms_index,
- int16_t *power_categories,
- int16_t *category_balances);
-
-int16_t calc_offset(int16_t *rms_index, int16_t number_of_regions, int16_t available_bits);
-
-void comp_powercat_and_catbalance(int16_t *power_categories,
- int16_t *category_balances,
- int16_t *rms_index,
- int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t offset);
-
-void dct_type_iv_a(int16_t input[], int16_t output[], int dct_length);
-
-void dct_type_iv_s(int16_t input[], int16_t output[], int dct_length);
-
-#else
-
-#define PI 3.141592653589793238462
-
-#define ENCODER_SCALE_FACTOR 18318.0f
-
-#define REGION_SIZE_INVERSE (1.0f/20.0f)
-
-/* The MLT output is incorrectly scaled by the factor
- product of ENCODER_SCALE_FACTOR and sqrt(160.)
- This is now (9/30/96) 1.0/2^(4.5) or 1/22.627.
- In the current implementation this product
- must be an integer power of sqrt(2). The
- integer power is ESF_ADJUSTMENT_TO_RMS_INDEX.
- The -2 is to conform with the range defined in the spec. */
-
-/* Scale factor used to match fixed point model results. */
-#define INTEROP_RMLT_SCALE_FACTOR_7 22.0f
-#define INTEROP_RMLT_SCALE_FACTOR_14 33.0f
-
-void categorize(int number_of_regions,
- int number_of_available_bits,
- int rms_index[MAX_NUMBER_OF_REGIONS],
- int power_categories[MAX_NUMBER_OF_REGIONS],
- int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1]);
-
-void samples_to_rmlt_coefs(const float new_samples[],
- float old_samples[],
- float coefs[],
- int dct_length);
-
-void rmlt_coefs_to_samples(float coefs[],
- float old_samples[],
- float out_samples[],
- int dct_length);
-
-void dct_type_iv(float input[], float output[], int dct_length);
-
-#endif
-
-int16_t get_rand(g722_1_rand_t *randobj);
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * encoder.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "huff_tab.h"
-#include "tables.h"
-#include "bitstream.h"
-#include "utilities.h"
-
-#if defined(G722_1_USE_FIXED_POINT)
-
-static int16_t compute_region_powers(int16_t *mlt_coefs,
- int16_t mag_shift,
- int16_t *drp_num_bits,
- uint16_t *drp_code_bits,
- int16_t *absolute_region_power_index,
- int16_t number_of_regions);
-
-static void vector_quantize_mlts(int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t *mlt_coefs,
- int16_t *absolute_region_power_index,
- int16_t *power_categories,
- int16_t *category_balances,
- int16_t *p_categorization_control,
- int16_t *region_mlt_bit_counts,
- uint32_t *region_mlt_bits);
-
-static int16_t vector_huffman(int16_t category,
- int16_t power_index,
- int16_t *raw_mlt_ptr,
- uint32_t *word_ptr);
-
-static void bits_to_words(g722_1_encode_state_t *s,
- uint32_t *region_mlt_bits,
- int16_t *region_mlt_bit_counts,
- int16_t *drp_num_bits,
- uint16_t *drp_code_bits,
- uint8_t *out_code,
- int16_t categorization_control,
- int16_t number_of_regions,
- int16_t num_categorization_control_bits,
- int16_t number_of_bits_per_frame);
-
-static void encoder(g722_1_encode_state_t *s,
- int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t *mlt_coefs,
- int16_t mag_shift,
- uint8_t *g722_1_data);
-
-/* Stuff the bits into words for output */
-static void bits_to_words(g722_1_encode_state_t *s,
- uint32_t *region_mlt_bits,
- int16_t *region_mlt_bit_counts,
- int16_t *drp_num_bits,
- uint16_t *drp_code_bits,
- uint8_t *out_code,
- int16_t categorization_control,
- int16_t number_of_regions,
- int16_t num_categorization_control_bits,
- int16_t number_of_bits_per_frame)
-{
- int16_t region;
- int16_t region_bit_count;
- uint32_t *in_word_ptr;
- uint32_t current_code;
- int16_t current_bits;
- int16_t bit_count;
-
- /* First set up the categorization control bits to look like one more set of region power bits. */
- drp_num_bits[number_of_regions] = num_categorization_control_bits;
- drp_code_bits[number_of_regions] = categorization_control;
-
- /* These code bits are right justified. */
- for (bit_count = 0, region = 0; region <= number_of_regions; region++)
- {
- g722_1_bitstream_put(&s->bitstream, &out_code, drp_code_bits[region], drp_num_bits[region]);
- bit_count += drp_num_bits[region];
- }
-
- /* These code bits are left justified. */
- for (region = 0; (region < number_of_regions) && (bit_count < number_of_bits_per_frame); region++)
- {
- in_word_ptr = ®ion_mlt_bits[4*region];
- region_bit_count = region_mlt_bit_counts[region];
- while ((region_bit_count > 0) && (bit_count < number_of_bits_per_frame))
- {
- current_bits = MIN(32, region_bit_count);
- current_code = *in_word_ptr++;
- current_code >>= (32 - current_bits);
- g722_1_bitstream_put(&s->bitstream, &out_code, current_code, current_bits);
- bit_count += current_bits;
- region_bit_count -= current_bits;
- }
- }
-
- /* Fill out with 1's. */
- while (bit_count < number_of_bits_per_frame)
- {
- current_bits = MIN(32, number_of_bits_per_frame - bit_count);
- g722_1_bitstream_put(&s->bitstream, &out_code, 0xFFFFFFFF, current_bits);
- bit_count += current_bits;
- }
- g722_1_bitstream_flush(&s->bitstream, &out_code);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Encode the MLT coefs into out_words using G.722.1 Annex C */
-static void encoder(g722_1_encode_state_t *s,
- int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t *mlt_coefs,
- int16_t mag_shift,
- uint8_t *g722_1_data)
-{
- int16_t num_categorization_control_bits;
- int16_t num_categorization_control_possibilities;
- int16_t number_of_bits_per_frame;
- int16_t number_of_envelope_bits;
- int16_t categorization_control;
- int16_t region;
- int16_t absolute_region_power_index[MAX_NUMBER_OF_REGIONS];
- int16_t power_categories[MAX_NUMBER_OF_REGIONS];
- int16_t category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1];
- int16_t drp_num_bits[MAX_NUMBER_OF_REGIONS + 1];
- uint16_t drp_code_bits[MAX_NUMBER_OF_REGIONS + 1];
- int16_t region_mlt_bit_counts[MAX_NUMBER_OF_REGIONS];
- uint32_t region_mlt_bits[4*MAX_NUMBER_OF_REGIONS];
- int16_t mag_shift_offset;
- int16_t temp;
-
- /* Initialize variables */
- if (number_of_regions == NUMBER_OF_REGIONS)
- {
- num_categorization_control_bits = NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
- else
- {
- num_categorization_control_bits = MAX_NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
-
- number_of_bits_per_frame = number_of_available_bits;
-
- for (region = 0; region < number_of_regions; region++)
- region_mlt_bit_counts[region] = 0;
-
- /* Estimate power envelope. */
- number_of_envelope_bits = compute_region_powers(mlt_coefs,
- mag_shift,
- drp_num_bits,
- drp_code_bits,
- absolute_region_power_index,
- number_of_regions);
-
- /* Adjust number of available bits based on power envelope estimate */
- temp = sub(number_of_available_bits, number_of_envelope_bits);
- number_of_available_bits = sub(temp, num_categorization_control_bits);
-
- /* Get categorizations */
- categorize(number_of_available_bits,
- number_of_regions,
- num_categorization_control_possibilities,
- absolute_region_power_index,
- power_categories,
- category_balances);
-
- /* Adjust absolute_region_category_index[] for mag_shift.
- This assumes that REGION_POWER_STEPSIZE_DB is defined
- to be exactly 3.010299957 or 20.0 times log base 10
- of square root of 2. */
- mag_shift_offset = (mag_shift << 1) + REGION_POWER_TABLE_NUM_NEGATIVES;
-
- for (region = 0; region < number_of_regions; region++)
- absolute_region_power_index[region] += mag_shift_offset;
-
- /* Adjust the absolute power region index based on the mlt coefs */
- adjust_abs_region_power_index(absolute_region_power_index, mlt_coefs, number_of_regions);
-
- /* Quantize and code the mlt coefficients based on categorizations */
- vector_quantize_mlts(number_of_available_bits,
- number_of_regions,
- num_categorization_control_possibilities,
- mlt_coefs,
- absolute_region_power_index,
- power_categories,
- category_balances,
- &categorization_control,
- region_mlt_bit_counts,
- region_mlt_bits);
-
- /* Stuff bits into words */
- bits_to_words(s,
- region_mlt_bits,
- region_mlt_bit_counts,
- drp_num_bits,
- drp_code_bits,
- g722_1_data,
- categorization_control,
- number_of_regions,
- num_categorization_control_bits,
- number_of_bits_per_frame);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Adjust the absolute power index */
-void adjust_abs_region_power_index(int16_t *absolute_region_power_index,
- int16_t *mlt_coefs,
- int16_t number_of_regions)
-{
- int16_t n;
- int16_t i;
- int16_t region;
- int16_t *raw_mlt_ptr;
- int32_t acca;
- int16_t temp;
-
- for (region = 0; region < number_of_regions; region++)
- {
- n = sub(absolute_region_power_index[region], 39) >> 1;
- if (n > 0)
- {
- temp = (int16_t) L_mult0(region, REGION_SIZE);
- raw_mlt_ptr = &mlt_coefs[temp];
- for (i = 0; i < REGION_SIZE; i++)
- {
- acca = L_shl(*raw_mlt_ptr, 16);
- acca = L_add(acca, 32768L);
- acca = L_shr(acca, n);
- acca = L_shr(acca, 16);
- *raw_mlt_ptr++ = (int16_t) acca;
- }
-
- absolute_region_power_index[region] = sub(absolute_region_power_index[region], shl(n, 1));
- }
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute the power for each of the regions */
-static int16_t compute_region_powers(int16_t *mlt_coefs,
- int16_t mag_shift,
- int16_t *drp_num_bits,
- uint16_t *drp_code_bits,
- int16_t *absolute_region_power_index,
- int16_t number_of_regions)
-{
- int16_t *input_ptr;
- int32_t long_accumulator;
- int16_t power_shift;
- int16_t region;
- int16_t j;
- int16_t differential_region_power_index[MAX_NUMBER_OF_REGIONS];
- int16_t number_of_bits;
- int32_t acca;
- int16_t temp;
- int16_t temp1;
- int16_t temp2;
-
- input_ptr = mlt_coefs;
- for (region = 0; region < number_of_regions; region++)
- {
- long_accumulator = vec_dot_prodi16(input_ptr, input_ptr, REGION_SIZE);
- input_ptr += REGION_SIZE;
-
- power_shift = 0;
- acca = long_accumulator & 0x7FFF0000L;
- while (acca > 0)
- {
- long_accumulator = L_shr(long_accumulator, 1);
- acca = long_accumulator & 0x7FFF0000L;
- power_shift = add(power_shift, 1);
- }
-
- acca = L_sub(long_accumulator, 32767);
- temp = add(power_shift, 15);
- while (acca <= 0 && temp >= 0)
- {
- long_accumulator = L_shl(long_accumulator, 1);
- acca = L_sub(long_accumulator, 32767);
- power_shift--;
- temp = add(power_shift, 15);
- }
- long_accumulator = L_shr(long_accumulator, 1);
- /* 28963 corresponds to square root of 2 times REGION_SIZE(20). */
- acca = L_sub(long_accumulator, 28963);
-
- if (acca >= 0)
- power_shift = add(power_shift, 1);
-
- acca = mag_shift;
- acca = L_shl(acca, 1);
- acca = L_sub(power_shift, acca);
- acca = L_add(35, acca);
- acca = L_sub(acca, REGION_POWER_TABLE_NUM_NEGATIVES);
- absolute_region_power_index[region] = (int16_t) acca;
- }
-
- /* Before we differentially encode the quantized region powers, adjust upward the
- valleys to make sure all the peaks can be accurately represented. */
- temp = sub(number_of_regions, 2);
-
- for (region = temp; region >= 0; region--)
- {
- temp1 = sub(absolute_region_power_index[region + 1], DRP_DIFF_MAX);
- temp2 = sub(absolute_region_power_index[region], temp1);
- if (temp2 < 0)
- absolute_region_power_index[region] = temp1;
- }
-
- /* The MLT is currently scaled too low by the factor
- ENCODER_SCALE_FACTOR(=18318)/32768 * (1.0/sqrt(160).
- This is the ninth power of 1 over the square root of 2.
- So later we will add ESF_ADJUSTMENT_TO_RMS_INDEX (now 9)
- to drp_code_bits[0]. */
-
- /* drp_code_bits[0] can range from 1 to 31. 0 is used only as an escape sequence. */
- temp1 = sub(1, ESF_ADJUSTMENT_TO_RMS_INDEX);
- temp2 = sub(absolute_region_power_index[0], temp1);
- if (temp2 < 0)
- absolute_region_power_index[0] = temp1;
-
- temp1 = sub(31, ESF_ADJUSTMENT_TO_RMS_INDEX);
- temp2 = sub(absolute_region_power_index[0], temp1);
- if (temp2 > 0)
- absolute_region_power_index[0] = temp1;
- differential_region_power_index[0] = absolute_region_power_index[0];
-
- number_of_bits = 5;
- drp_num_bits[0] = 5;
- drp_code_bits[0] = (uint16_t) add(absolute_region_power_index[0], ESF_ADJUSTMENT_TO_RMS_INDEX);
-
- /* Lower limit the absolute region power indices to -8 and upper limit them to 31. Such extremes
- may be mathematically impossible anyway. */
- for (region = 1; region < number_of_regions; region++)
- {
- temp1 = -8 - ESF_ADJUSTMENT_TO_RMS_INDEX;
- if (absolute_region_power_index[region] < temp1)
- absolute_region_power_index[region] = temp1;
-
- temp1 = 31 - ESF_ADJUSTMENT_TO_RMS_INDEX;
- if (absolute_region_power_index[region] > temp1)
- absolute_region_power_index[region] = temp1;
- }
-
- for (region = 1; region < number_of_regions; region++)
- {
- j = sub(absolute_region_power_index[region], absolute_region_power_index[region - 1]);
- if (j < DRP_DIFF_MIN)
- j = DRP_DIFF_MIN;
- j -= DRP_DIFF_MIN;
- differential_region_power_index[region] = j;
-
- temp = absolute_region_power_index[region - 1] + differential_region_power_index[region];
- temp += DRP_DIFF_MIN;
- absolute_region_power_index[region] = temp;
-
- number_of_bits += differential_region_power_bits[region][j];
- drp_num_bits[region] = differential_region_power_bits[region][j];
- drp_code_bits[region] = differential_region_power_codes[region][j];
- }
-
- return number_of_bits;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Scalar quantized vector Huffman coding (SQVH) */
-static void vector_quantize_mlts(int16_t number_of_available_bits,
- int16_t number_of_regions,
- int16_t num_categorization_control_possibilities,
- int16_t *mlt_coefs,
- int16_t *absolute_region_power_index,
- int16_t *power_categories,
- int16_t *category_balances,
- int16_t *p_categorization_control,
- int16_t *region_mlt_bit_counts,
- uint32_t *region_mlt_bits)
-{
- int16_t *raw_mlt_ptr;
- int16_t region;
- int16_t category;
- int16_t total_mlt_bits;
- int16_t temp;
-
- total_mlt_bits = 0;
- /* Start in the middle of the categorization control range. */
- temp = (num_categorization_control_possibilities >> 1) - 1;
- for (*p_categorization_control = 0; *p_categorization_control < temp; (*p_categorization_control)++)
- {
- region = category_balances[*p_categorization_control];
- power_categories[region]++;
- }
-
- for (region = 0; region < number_of_regions; region++)
- {
- category = power_categories[region];
- temp = (int16_t) L_mult0(region, REGION_SIZE);
- raw_mlt_ptr = &mlt_coefs[temp];
- if (category < (NUM_CATEGORIES - 1))
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[shl(region, 2)]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- }
-
- /* If too few bits... */
- while (total_mlt_bits < number_of_available_bits
- &&
- *p_categorization_control > 0)
- {
- (*p_categorization_control)--;
- region = category_balances[*p_categorization_control];
- power_categories[region]--;
- total_mlt_bits -= region_mlt_bit_counts[region];
- category = power_categories[region];
- raw_mlt_ptr = &mlt_coefs[region*REGION_SIZE];
-
- if (category < (NUM_CATEGORIES - 1))
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[shl(region, 2)]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- }
-
- /* If too many bits... */
- /* Set up for while loop test */
- while (total_mlt_bits > number_of_available_bits
- &&
- *p_categorization_control < (num_categorization_control_possibilities - 1))
- {
- region = category_balances[*p_categorization_control];
- power_categories[region]++;
- total_mlt_bits -= region_mlt_bit_counts[region];
- category = power_categories[region];
- temp = (int16_t) L_mult0(region, REGION_SIZE);
- raw_mlt_ptr = &mlt_coefs[temp];
- if (category < (NUM_CATEGORIES - 1))
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[shl(region, 2)]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- (*p_categorization_control)++;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Huffman encoding for each region based on category and power_index */
-static int16_t vector_huffman(int16_t category,
- int16_t power_index,
- int16_t *raw_mlt_ptr,
- uint32_t *word_ptr)
-{
- int16_t inv_of_step_size_times_std_dev;
- int16_t j;
- int16_t n;
- int16_t k;
- int16_t number_of_region_bits;
- int16_t number_of_non_zero;
- int16_t vec_dim;
- int16_t num_vecs;
- int16_t kmax;
- int16_t kmax_plus_one;
- int16_t index;
- int16_t signs_index;
- const int16_t *bitcount_table_ptr;
- const uint16_t *code_table_ptr;
- int32_t code_bits;
- int16_t number_of_code_bits;
- uint32_t current_word;
- int16_t current_word_bits_free;
- int32_t acca;
- int32_t accb;
- int16_t temp;
- int16_t mytemp;
- int16_t myacca;
-
- /* Initialize variables */
- vec_dim = vector_dimension[category];
- num_vecs = number_of_vectors[category];
- kmax = max_bin[category];
- kmax_plus_one = add(kmax, 1);
- current_word = 0L;
- current_word_bits_free = 32;
- number_of_region_bits = 0;
- /* Set up table pointers */
- bitcount_table_ptr = table_of_bitcount_tables[category];
- code_table_ptr = table_of_code_tables[category];
-
- /* Compute inverse of step size * standard deviation */
- acca = L_mult(step_size_inverse_table[category], standard_deviation_inverse_table[power_index]);
- acca = L_shr(acca, 1);
- acca = L_add(acca, 4096);
- acca = L_shr(acca, 13);
-
- mytemp = acca & 0x3;
- acca = L_shr(acca, 2);
-
- inv_of_step_size_times_std_dev = (int16_t) acca;
-
- for (n = 0; n < num_vecs; n++)
- {
- index = 0;
- signs_index = 0;
- number_of_non_zero = 0;
- for (j = 0; j < vec_dim; j++)
- {
- k = abs_s(*raw_mlt_ptr);
- acca = L_mult(k, inv_of_step_size_times_std_dev);
- acca = L_shr(acca, 1);
-
- myacca = (int16_t) L_mult(k, mytemp);
- myacca = (int16_t) L_shr(myacca, 1);
- myacca = (int16_t) L_add(myacca, int_dead_zone_low_bits[category]);
- myacca = (int16_t) L_shr(myacca, 2);
-
- acca = L_add(acca, int_dead_zone[category]);
- acca = L_add(acca, myacca);
- acca = L_shr(acca, 13);
- k = (int16_t) acca;
- if (k != 0)
- {
- number_of_non_zero = add(number_of_non_zero, 1);
- signs_index = shl(signs_index, 1);
- if (*raw_mlt_ptr > 0)
- signs_index = add(signs_index, 1);
- temp = sub(k, kmax);
- if (temp > 0)
- k = kmax;
- }
- acca = L_shr(L_mult(index, (kmax_plus_one)), 1);
- index = (int16_t) acca;
- index = add(index, k);
- raw_mlt_ptr++;
- }
-
- code_bits = *(code_table_ptr + index);
- number_of_code_bits = add((*(bitcount_table_ptr + index)), number_of_non_zero);
- number_of_region_bits = add(number_of_region_bits, number_of_code_bits);
-
- acca = code_bits << number_of_non_zero;
- accb = signs_index;
- acca = L_add(acca, accb);
- code_bits = acca;
-
- /* MSB of codebits is transmitted first. */
- j = current_word_bits_free - number_of_code_bits;
- if (j >= 0)
- {
- acca = code_bits << j;
- current_word = L_add(current_word, acca);
- current_word_bits_free = j;
- }
- else
- {
- j = negate(j);
- acca = L_shr(code_bits, j);
- current_word = L_add(current_word, acca);
-
- *word_ptr++ = current_word;
- current_word_bits_free = 32 - j;
- current_word = code_bits << current_word_bits_free;
- }
- }
-
- *word_ptr++ = current_word;
- return number_of_region_bits;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_encode(g722_1_encode_state_t *s, uint8_t g722_1_data[], const int16_t amp[], int len)
-{
- int16_t mlt_coefs[MAX_FRAME_SIZE];
- int16_t mag_shift;
- int i;
- int j;
-
- for (i = 0, j = 0; i < len; i += s->frame_size, j += s->bytes_per_frame)
- {
- mag_shift = samples_to_rmlt_coefs(amp + i, s->history, mlt_coefs, s->frame_size);
- encoder(s,
- s->number_of_bits_per_frame,
- s->number_of_regions,
- mlt_coefs,
- (uint16_t) mag_shift,
- &g722_1_data[j]);
- }
- return j;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-
-int g722_1_encode_set_rate(g722_1_encode_state_t *s, int bit_rate)
-{
- if ((bit_rate < 16000) || (bit_rate > 48000) || ((bit_rate%800) != 0))
- return -1;
- s->bit_rate = bit_rate;
- s->number_of_bits_per_frame = s->bit_rate/50;
- s->bytes_per_frame = s->number_of_bits_per_frame/8;
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-
-g722_1_encode_state_t *g722_1_encode_init(g722_1_encode_state_t *s, int bit_rate, int sample_rate)
-{
-#if !defined(G722_1_USE_FIXED_POINT)
- int i;
-#endif
-
- if ((bit_rate < 16000) || (bit_rate > 48000) || ((bit_rate%800) != 0))
- return NULL;
- if (sample_rate != G722_1_SAMPLE_RATE_16000 && sample_rate != G722_1_SAMPLE_RATE_32000)
- return NULL;
-
- if (s == NULL)
- {
- if ((s = (g722_1_encode_state_t *) malloc(sizeof(*s))) == NULL)
- return NULL;
- }
- memset(s, 0, sizeof(*s));
-#if !defined(G722_1_USE_FIXED_POINT)
- for (i = 0; i < MAX_FRAME_SIZE; i++)
- s->history[i] = 0.0f;
- /* Scaling factor for fixed point interop */
- if (sample_rate == G722_1_SAMPLE_RATE_16000)
- s->scale_factor = 1.0f/INTEROP_RMLT_SCALE_FACTOR_7;
- else
- s->scale_factor = 1.0f/INTEROP_RMLT_SCALE_FACTOR_14;
-#endif
- s->sample_rate = sample_rate;
- if (sample_rate == G722_1_SAMPLE_RATE_16000)
- {
- s->number_of_regions = NUMBER_OF_REGIONS;
- s->frame_size = MAX_FRAME_SIZE >> 1;
- }
- else
- {
- s->number_of_regions = MAX_NUMBER_OF_REGIONS;
- s->frame_size = MAX_FRAME_SIZE;
- }
- s->bit_rate = bit_rate;
- s->number_of_bits_per_frame = (int16_t) ((s->bit_rate)/50);
- s->bytes_per_frame = s->number_of_bits_per_frame/8;
- return s;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_encode_release(g722_1_encode_state_t *s)
-{
- free(s);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * encoder.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "huff_tab.h"
-#include "tables.h"
-#include "bitstream.h"
-#include "utilities.h"
-
-#if !defined(G722_1_USE_FIXED_POINT)
-
-static int compute_region_powers(int number_of_regions,
- float mlt_coefs[MAX_DCT_LENGTH],
- int drp_num_bits[MAX_NUMBER_OF_REGIONS],
- int drp_code_bits[MAX_NUMBER_OF_REGIONS],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS]);
-
-static int vector_huffman(int category,
- int power_index,
- float *raw_mlt_ptr,
- int32_t *word_ptr);
-
-static void vector_quantize_mlts(int number_of_regions,
- int num_categorization_control_possibilities,
- int number_of_available_bits,
- float mlt_coefs[MAX_DCT_LENGTH],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS],
- int power_categories[MAX_NUMBER_OF_REGIONS],
- int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1],
- int *p_rate_control,
- int region_mlt_bit_counts[MAX_NUMBER_OF_REGIONS],
- int32_t region_mlt_bits[4*MAX_NUMBER_OF_REGIONS]);
-
-static void encoder(g722_1_encode_state_t *s,
- int number_of_available_bits,
- int number_of_regions,
- float mlt_coefs[MAX_DCT_LENGTH],
- uint8_t g722_1_data[MAX_BITS_PER_FRAME/8]);
-
-/* Stuff the bits into words for output */
-static void bits_to_words(g722_1_encode_state_t *s,
- int32_t *region_mlt_bits,
- int *region_mlt_bit_counts,
- int *drp_num_bits,
- int *drp_code_bits,
- uint8_t *out_code,
- int categorization_control,
- int number_of_regions,
- int num_categorization_control_bits,
- int number_of_bits_per_frame)
-{
- int region;
- int region_bit_count;
- int32_t *in_word_ptr;
- uint32_t current_code;
- int current_bits;
- int bit_count;
-
- /* First set up the categorization control bits to look like one more set of region power bits. */
- drp_num_bits[number_of_regions] = num_categorization_control_bits;
- drp_code_bits[number_of_regions] = categorization_control;
-
- bit_count = 0;
- /* These code bits are right justified. */
- for (region = 0; region <= number_of_regions; region++)
- {
- g722_1_bitstream_put(&s->bitstream, &out_code, drp_code_bits[region], drp_num_bits[region]);
- bit_count += drp_num_bits[region];
- }
-
- /* These code bits are left justified. */
- for (region = 0; (region < number_of_regions) && (bit_count < number_of_bits_per_frame); region++)
- {
- in_word_ptr = ®ion_mlt_bits[4*region];
- region_bit_count = region_mlt_bit_counts[region];
- while ((region_bit_count > 0) && (bit_count < number_of_bits_per_frame))
- {
- current_bits = MIN(32, region_bit_count);
- current_code = *in_word_ptr++;
- current_code >>= (32 - current_bits);
- g722_1_bitstream_put(&s->bitstream, &out_code, current_code, current_bits);
- bit_count += current_bits;
- region_bit_count -= current_bits;
- }
- }
-
- /* Fill out with 1's. */
- while (bit_count < number_of_bits_per_frame)
- {
- current_bits = MIN(32, number_of_bits_per_frame - bit_count);
- g722_1_bitstream_put(&s->bitstream, &out_code, 0xFFFFFFFF, current_bits);
- bit_count += current_bits;
- }
- g722_1_bitstream_flush(&s->bitstream, &out_code);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Encode the MLT coefs into out_words using G.722.1 Annex C */
-static void encoder(g722_1_encode_state_t *s,
- int number_of_available_bits,
- int number_of_regions,
- float mlt_coefs[MAX_DCT_LENGTH],
- uint8_t g722_1_data[MAX_BITS_PER_FRAME/8])
-{
- int num_categorization_control_bits;
- int num_categorization_control_possibilities;
- int number_of_bits_per_frame;
- int number_of_envelope_bits;
- int rate_control;
- int region;
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS];
- int power_categories[MAX_NUMBER_OF_REGIONS];
- int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1];
- int drp_num_bits[MAX_NUMBER_OF_REGIONS + 1];
- int drp_code_bits[MAX_NUMBER_OF_REGIONS + 1];
- int region_mlt_bit_counts[MAX_NUMBER_OF_REGIONS];
- int32_t region_mlt_bits[4*MAX_NUMBER_OF_REGIONS];
-
- /* Initialize variables. */
- if (number_of_regions == NUMBER_OF_REGIONS)
- {
- num_categorization_control_bits = NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
- else
- {
- num_categorization_control_bits = MAX_NUM_CATEGORIZATION_CONTROL_BITS;
- num_categorization_control_possibilities = MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES;
- }
-
- number_of_bits_per_frame = number_of_available_bits;
-
- /* Estimate power envelope. */
- number_of_envelope_bits = compute_region_powers(number_of_regions,
- mlt_coefs,
- drp_num_bits,
- drp_code_bits,
- absolute_region_power_index);
-
- number_of_available_bits -= number_of_envelope_bits;
- number_of_available_bits -= num_categorization_control_bits;
-
- categorize(number_of_regions,
- number_of_available_bits,
- absolute_region_power_index,
- power_categories,
- category_balances);
-
- /* Adjust absolute_region_category_index[] for mag_shift.
- This assumes that REGION_POWER_STEPSIZE_DB is defined
- to be exactly 3.010299957 or 20.0 times log base 10
- of square root of 2. */
- for (region = 0; region < number_of_regions; region++)
- {
- absolute_region_power_index[region] += REGION_POWER_TABLE_NUM_NEGATIVES;
- region_mlt_bit_counts[region] = 0;
- }
-
- vector_quantize_mlts(number_of_regions,
- num_categorization_control_possibilities,
- number_of_available_bits,
- mlt_coefs,
- absolute_region_power_index,
- power_categories,
- category_balances,
- &rate_control,
- region_mlt_bit_counts,
- region_mlt_bits);
-
- /* Stuff bits into words */
- bits_to_words(s,
- region_mlt_bits,
- region_mlt_bit_counts,
- drp_num_bits,
- drp_code_bits,
- g722_1_data,
- rate_control,
- number_of_regions,
- num_categorization_control_bits,
- number_of_bits_per_frame);
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Compute the power for each of the regions */
-static int compute_region_powers(int number_of_regions,
- float mlt_coefs[MAX_DCT_LENGTH],
- int drp_num_bits[MAX_NUMBER_OF_REGIONS],
- int drp_code_bits[MAX_NUMBER_OF_REGIONS],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS])
-{
- float *input_ptr;
- int iterations;
- float ftemp0;
- int index;
- int index_min;
- int index_max;
- int region;
- int j;
- int differential_region_power_index[MAX_NUMBER_OF_REGIONS];
- int number_of_bits;
-
- input_ptr = mlt_coefs;
- for (region = 0; region < number_of_regions; region++)
- {
- ftemp0 = vec_dot_prodf(input_ptr, input_ptr, REGION_SIZE);
- ftemp0 *= REGION_SIZE_INVERSE;
- input_ptr += REGION_SIZE;
-
- index_min = 0;
- index_max = REGION_POWER_TABLE_SIZE;
- for (iterations = 0; iterations < 6; iterations++)
- {
- index = (index_min + index_max) >> 1;
- if (ftemp0 < region_power_table_boundary[index - 1])
- index_max = index;
- else
- index_min = index;
- }
- absolute_region_power_index[region] = index_min - REGION_POWER_TABLE_NUM_NEGATIVES;
- }
-
- /* Before we differentially encode the quantized region powers, adjust upward the
- valleys to make sure all the peaks can be accurately represented. */
- for (region = number_of_regions - 2; region >= 0; region--)
- {
- if (absolute_region_power_index[region] < absolute_region_power_index[region+1] - DRP_DIFF_MAX)
- absolute_region_power_index[region] = absolute_region_power_index[region+1] - DRP_DIFF_MAX;
- }
-
- /* The MLT is currently scaled too low by the factor
- ENCODER_SCALE_FACTOR(=18318)/32768 * (1.0/sqrt(160).
- This is the ninth power of 1 over the square root of 2.
- So later we will add ESF_ADJUSTMENT_TO_RMS_INDEX (now 9)
- to drp_code_bits[0]. */
-
- /* drp_code_bits[0] can range from 1 to 31. 0 will be used only as an escape sequence. */
- if (absolute_region_power_index[0] < 1 - ESF_ADJUSTMENT_TO_RMS_INDEX)
- absolute_region_power_index[0] = 1 - ESF_ADJUSTMENT_TO_RMS_INDEX;
- if (absolute_region_power_index[0] > 31 - ESF_ADJUSTMENT_TO_RMS_INDEX)
- absolute_region_power_index[0] = 31 - ESF_ADJUSTMENT_TO_RMS_INDEX;
-
- differential_region_power_index[0] = absolute_region_power_index[0];
- number_of_bits = 5;
- drp_num_bits[0] = 5;
- drp_code_bits[0] = absolute_region_power_index[0] + ESF_ADJUSTMENT_TO_RMS_INDEX;
-
- /* Lower limit the absolute region power indices to -8 and upper limit them to 31. Such extremes
- may be mathematically impossible anyway.*/
- for (region = 1; region < number_of_regions; region++)
- {
- if (absolute_region_power_index[region] < -8 - ESF_ADJUSTMENT_TO_RMS_INDEX)
- absolute_region_power_index[region] = -8 - ESF_ADJUSTMENT_TO_RMS_INDEX;
- if (absolute_region_power_index[region] > 31 - ESF_ADJUSTMENT_TO_RMS_INDEX)
- absolute_region_power_index[region] = 31 - ESF_ADJUSTMENT_TO_RMS_INDEX;
- }
-
- for (region = 1; region < number_of_regions; region++)
- {
- j = absolute_region_power_index[region] - absolute_region_power_index[region - 1];
- if (j < DRP_DIFF_MIN)
- j = DRP_DIFF_MIN;
- j -= DRP_DIFF_MIN;
- differential_region_power_index[region] = j;
- absolute_region_power_index[region] = absolute_region_power_index[region - 1]
- + differential_region_power_index[region]
- + DRP_DIFF_MIN;
-
- number_of_bits += differential_region_power_bits[region][j];
- drp_num_bits[region] = differential_region_power_bits[region][j];
- drp_code_bits[region] = differential_region_power_codes[region][j];
- }
-
- return number_of_bits;
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Scalar quantized vector Huffman coding (SQVH) */
-static void vector_quantize_mlts(int number_of_regions,
- int num_categorization_control_possibilities,
- int number_of_available_bits,
- float mlt_coefs[MAX_DCT_LENGTH],
- int absolute_region_power_index[MAX_NUMBER_OF_REGIONS],
- int power_categories[MAX_NUMBER_OF_REGIONS],
- int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1],
- int *p_rate_control,
- int region_mlt_bit_counts[MAX_NUMBER_OF_REGIONS],
- int32_t region_mlt_bits[4*MAX_NUMBER_OF_REGIONS])
-{
- float *raw_mlt_ptr;
- int region;
- int category;
- int total_mlt_bits;
-
- total_mlt_bits = 0;
-
- /* Start in the middle of the rate control range. */
- for (*p_rate_control = 0; *p_rate_control < ((num_categorization_control_possibilities >> 1) - 1); (*p_rate_control)++)
- {
- region = category_balances[*p_rate_control];
- power_categories[region]++;
- }
-
- for (region = 0; region < number_of_regions; region++)
- {
- category = power_categories[region];
- raw_mlt_ptr = &mlt_coefs[region*REGION_SIZE];
- if (category < NUM_CATEGORIES - 1)
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[4*region]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- }
-
- /* If too few bits... */
- while ((total_mlt_bits < number_of_available_bits) && (*p_rate_control > 0))
- {
- (*p_rate_control)--;
- region = category_balances[*p_rate_control];
- power_categories[region]--;
- total_mlt_bits -= region_mlt_bit_counts[region];
-
- category = power_categories[region];
- raw_mlt_ptr = &mlt_coefs[region*REGION_SIZE];
- if (category < NUM_CATEGORIES - 1)
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[4*region]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- }
-
- /* If too many bits... */
- while ((total_mlt_bits > number_of_available_bits) && (*p_rate_control < num_categorization_control_possibilities - 1))
- {
- region = category_balances[*p_rate_control];
- power_categories[region]++;
- total_mlt_bits -= region_mlt_bit_counts[region];
-
- category = power_categories[region];
- raw_mlt_ptr = &mlt_coefs[region*REGION_SIZE];
- if (category < NUM_CATEGORIES - 1)
- {
- region_mlt_bit_counts[region] = vector_huffman(category,
- absolute_region_power_index[region],
- raw_mlt_ptr,
- ®ion_mlt_bits[4*region]);
- }
- else
- {
- region_mlt_bit_counts[region] = 0;
- }
- total_mlt_bits += region_mlt_bit_counts[region];
- (*p_rate_control)++;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-/* Huffman encoding for each region based on category and power_index */
-static int vector_huffman(int category,
- int power_index,
- float *raw_mlt_ptr,
- int32_t *word_ptr)
-{
- float inv_of_step_size_times_std_dev;
- int j;
- int n;
- int k;
- int number_of_region_bits;
- int number_of_non_zero;
- int vec_dim;
- int num_vecs;
- int kmax;
- int kmax_plus_one;
- int index;
- int signs_index;
- const int16_t *bitcount_table_ptr;
- const uint16_t *code_table_ptr;
- int code_bits;
- int number_of_code_bits;
- int current_word;
- int current_word_bits_free;
-
- vec_dim = vector_dimension[category];
- num_vecs = number_of_vectors[category];
- kmax = max_bin[category];
- kmax_plus_one = kmax + 1;
-
- current_word = 0;
- current_word_bits_free = 32;
-
- number_of_region_bits = 0;
-
- bitcount_table_ptr = table_of_bitcount_tables[category];
- code_table_ptr = table_of_code_tables[category];
-
- inv_of_step_size_times_std_dev = step_size_inverse_table[category]
- * standard_deviation_inverse_table[power_index];
-
- for (n = 0; n < num_vecs; n++)
- {
- index = 0;
- signs_index = 0;
- number_of_non_zero = 0;
- for (j = 0; j < vec_dim; j++)
- {
- k = (int) (fabs(*raw_mlt_ptr)*inv_of_step_size_times_std_dev + dead_zone[category]);
- if (k != 0)
- {
- number_of_non_zero++;
- signs_index <<= 1;
- if (*raw_mlt_ptr > 0)
- signs_index++;
- if (k > kmax)
- k = kmax;
- }
- index = index*kmax_plus_one + k;
- raw_mlt_ptr++;
- }
-
- code_bits = code_table_ptr[index];
- number_of_code_bits = bitcount_table_ptr[index] + number_of_non_zero;
- number_of_region_bits += number_of_code_bits;
-
- code_bits = (code_bits << number_of_non_zero) + signs_index;
-
- /* MSB of codebits is transmitted first. */
- j = current_word_bits_free - number_of_code_bits;
- if (j >= 0)
- {
- current_word += code_bits << j;
- current_word_bits_free = j;
- }
- else
- {
- j = -j;
- current_word += code_bits >> j;
- *word_ptr++ = current_word;
- current_word_bits_free = 32 - j;
- current_word = code_bits << current_word_bits_free;
- }
- }
-
- *word_ptr++ = current_word;
-
- return number_of_region_bits;
-}
-/*- End of function --------------------------------------------------------*/
-
-int g722_1_encode(g722_1_encode_state_t *s, uint8_t g722_1_data[], const int16_t amp[], int len)
-{
- float mlt_coefs[MAX_FRAME_SIZE];
- float famp[MAX_FRAME_SIZE];
- int i;
- int j;
- int k;
-
- for (i = 0, j = 0; i < len; i += s->frame_size, j += s->bytes_per_frame)
- {
- for (k = 0; k < s->frame_size; k++)
- famp[k] = amp[k + i];
- samples_to_rmlt_coefs(famp, s->history, mlt_coefs, s->frame_size);
- /* This is for fixed point interop */
- for (k = 0; k < s->frame_size; k++)
- mlt_coefs[k] *= s->scale_factor;
- encoder(s,
- s->number_of_bits_per_frame,
- s->number_of_regions,
- mlt_coefs,
- &g722_1_data[j]);
- }
- return j;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 codec
- *
- * g722_1.h - The head guy amongst the headers
- *
- * 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.
- */
-
-/*! \file */
-
-#if !defined(_G722_1_H_)
-#define _G722_1_H_
-
-@G722_1_USE_FIXED_POINT@
-
-#include <stdlib.h>
-@INSERT_INTTYPES_HEADER@
-#include <string.h>
-#include <limits.h>
-#include <time.h>
-@INSERT_MATH_HEADER@
-
-#include <g722_1/g722_1.h>
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * g722_1.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#if !defined(_G722_1_G722_1_H_)
-#define _G722_1_G722_1_H_
-
-typedef enum
-{
- /*! \brief Basic G.722.1 sampling rate */
- G722_1_SAMPLE_RATE_16000 = 16000,
- /*! \brief G.722.1 Annex C sampling rate */
- G722_1_SAMPLE_RATE_32000 = 32000
-} g722_1_sample_rates_t;
-
-typedef enum
-{
- /*! \brief Bit rate usable at either sampling rate. */
- G722_1_BIT_RATE_24000 = 24000,
- /*! \brief Bit rate usable at either sampling rate. */
- G722_1_BIT_RATE_32000 = 32000,
- /*! \brief Bit rate usable at 32000 samples per second. */
- G722_1_BIT_RATE_48000 = 48000
-} g722_1_bit_rates_t;
-
-#define MAX_SAMPLE_RATE 32000
-/* Frames are 20ms */
-#define MAX_FRAME_SIZE (MAX_SAMPLE_RATE/50)
-#define MAX_DCT_LENGTH 640
-
-/* Max bit rate is 48000 bits/sec. */
-#define MAX_BITS_PER_FRAME 960
-
-#define NUMBER_OF_REGIONS 14
-#define MAX_NUMBER_OF_REGIONS 28
-
-/*! Bitstream handler state */
-typedef struct
-{
- /*! The bit stream. */
- uint32_t bitstream;
- /*! The residual bits in bitstream. */
- int residue;
-} g722_1_bitstream_state_t;
-
-typedef struct
-{
- int16_t code_bit_count; /* bit count of the current word */
- int16_t current_word; /* current word in the bitstream being processed */
- uint16_t *code_word_ptr; /* pointer to the bitstream */
-} g722_1_bitstream_t;
-
-typedef struct
-{
- int16_t seed0;
- int16_t seed1;
- int16_t seed2;
- int16_t seed3;
-} g722_1_rand_t;
-
-typedef struct
-{
- int bit_rate;
- int sample_rate;
- int frame_size;
- int number_of_regions;
- int number_of_bits_per_frame;
- int bytes_per_frame;
- int number_of_16bit_words_per_frame;
-#if defined(G722_1_USE_FIXED_POINT)
- int16_t history[MAX_FRAME_SIZE];
-#else
- float history[MAX_FRAME_SIZE];
- float scale_factor;
-#endif
- g722_1_bitstream_state_t bitstream;
-} g722_1_encode_state_t;
-
-typedef struct
-{
- int bit_rate;
- int sample_rate;
- int frame_size;
- int number_of_regions;
- int number_of_bits_per_frame;
- int bytes_per_frame;
- int number_of_16bit_words_per_frame;
- int16_t words;
- int16_t old_mag_shift;
-#if defined(G722_1_USE_FIXED_POINT)
- int16_t old_decoder_mlt_coefs[MAX_DCT_LENGTH];
- int16_t old_samples[MAX_DCT_LENGTH >> 1];
-#else
- float old_decoder_mlt_coefs[MAX_DCT_LENGTH];
- float old_samples[MAX_DCT_LENGTH >> 1];
-#endif
- g722_1_bitstream_t bitobj;
- g722_1_bitstream_state_t bitstream;
- const uint8_t *code_ptr;
- int16_t number_of_bits_left;
- g722_1_rand_t randobj;
-} g722_1_decode_state_t;
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-/*! Initialise a G.722.1 encode context.
- \param s The G.722.1 encode context.
- \param bit_rate The required bit rate for the G.722.1 data.
- The valid rates are 48000, 32000 and 24000.
- \param sample_rate The required sampling rate.
- The valid rates are 16000 and 32000.
- \return A pointer to the G.722.1 encode context, or NULL for error. */
-g722_1_encode_state_t *g722_1_encode_init(g722_1_encode_state_t *s, int bit_rate, int sample_rate);
-
-/*! Release a G.722.1 encode context.
- \param s The G.722.1 encode context.
- \return 0. */
-int g722_1_encode_release(g722_1_encode_state_t *s);
-
-/*! Encode a buffer of linear PCM data to G.722.1
- \param s The G.722.1 encode context.
- \param g722_1_data The G.722.1 data produced.
- \param amp The audio sample buffer.
- \param len The number of samples in the buffer.
- \return The number of bytes of G.722.1 data produced. */
-int g722_1_encode(g722_1_encode_state_t *s, uint8_t g722_1_data[], const int16_t amp[], int len);
-
-/*! Change the bit rate for an G.722.1 decode context.
- \param s The G.722.1 decode context.
- \param bit_rate The required bit rate for the G.722.1 data.
- The valid rates are 48000, 32000 and 24000.
- \return 0 for OK, or -1 for a bad parameter. */
-int g722_1_encode_set_rate(g722_1_encode_state_t *s, int bit_rate);
-
-/*! Initialise a G.722.1 decode context.
- \param s The G.722.1 decode context.
- \param bit_rate The required bit rate for the G.722.1 data.
- The valid rates are 48000, 32000 and 24000.
- \param sample_rate The required sampling rate.
- The valid rates are 16000 and 32000.
- \return A pointer to the G.722.1 decode context, or NULL for error. */
-g722_1_decode_state_t *g722_1_decode_init(g722_1_decode_state_t *s, int bit_rate, int sample_rate);
-
-/*! Release a G.722.1 decode context.
- \param s The G.722.1 decode context.
- \return 0. */
-int g722_1_decode_release(g722_1_decode_state_t *s);
-
-/*! Decode a buffer of G.722.1 data to linear PCM.
- \param s The G.722.1 decode context.
- \param amp The audio sample buffer.
- \param g722_1_data
- \param len
- \return The number of samples returned. */
-int g722_1_decode(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len);
-
-/*! Produce linear PCM data to fill in where received G.722.1 data is missing.
- \param s The G.722.1 decode context.
- \param amp The audio sample buffer.
- \param g722_1_data
- \param len
- \return The number of samples returned. */
-int g722_1_fillin(g722_1_decode_state_t *s, int16_t amp[], const uint8_t g722_1_data[], int len);
-
-/*! Change the bit rate for an G.722.1 decode context.
- \param s The G.722.1 decode context.
- \param bit_rate The required bit rate for the G.722.1 data.
- The valid rates are 48000, 32000 and 24000.
- \return 0 for OK, or -1 for a bad parameter. */
-int g722_1_decode_set_rate(g722_1_decode_state_t *s, int bit_rate);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * version.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1
- *
- * 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.
- *
- * $Id: version.h.in,v 1.2 2008/09/20 16:52:51 steveu Exp $
- */
-
-#if !defined(_G722_1_VERSION_H_)
-#define _G722_1_VERSION_H_
-
-/* The date and time of the version are in UTC form. */
-
-#define G722_1_RELEASE_DATE 20081121
-#define G722_1_RELEASE_TIME 153216
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * version.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1
- *
- * 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.
- */
-
-#if !defined(_G722_1_VERSION_H_)
-#define _G722_1_VERSION_H_
-
-/* The date and time of the version are in UTC form. */
-
-#define G722_1_RELEASE_DATE $G722_1_RELEASE_DATE
-#define G722_1_RELEASE_TIME $G722_1_RELEASE_TIME
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-static const float max_dct_core_a[] =
-{
- 5.572937315437795e-02f,
- 5.435713103213160e-02f,
- 5.164643594289910e-02f,
- 4.766403419605858e-02f,
- 4.250798573945089e-02f,
- 3.630524959802148e-02f,
- 2.920855772127337e-02f,
- 2.139265421578210e-02f,
- 1.304999256534943e-02f,
- 4.385996787515619e-03f,
- 5.435713103213160e-02f,
- 4.250798573945089e-02f,
- 2.139265421578210e-02f,
- -4.385996787515612e-03f,
- -2.920855772127336e-02f,
- -4.766403419605858e-02f,
- -5.572937315437795e-02f,
- -5.164643594289911e-02f,
- -3.630524959802151e-02f,
- -1.304999256534941e-02f,
- 5.164643594289910e-02f,
- 2.139265421578210e-02f,
- -2.139265421578209e-02f,
- -5.164643594289910e-02f,
- -5.164643594289911e-02f,
- -2.139265421578213e-02f,
- 2.139265421578211e-02f,
- 5.164643594289909e-02f,
- 5.164643594289910e-02f,
- 2.139265421578213e-02f,
- 4.766403419605858e-02f,
- -4.385996787515612e-03f,
- -5.164643594289910e-02f,
- -4.250798573945090e-02f,
- 1.304999256534939e-02f,
- 5.435713103213161e-02f,
- 3.630524959802152e-02f,
- -2.139265421578210e-02f,
- -5.572937315437795e-02f,
- -2.920855772127336e-02f,
- 4.250798573945089e-02f,
- -2.920855772127336e-02f,
- -5.164643594289911e-02f,
- 1.304999256534939e-02f,
- 5.572937315437795e-02f,
- 4.385996787515657e-03f,
- -5.435713103213161e-02f,
- -2.139265421578214e-02f,
- 4.766403419605858e-02f,
- 3.630524959802153e-02f,
- 3.630524959802148e-02f,
- -4.766403419605858e-02f,
- -2.139265421578213e-02f,
- 5.435713103213161e-02f,
- 4.385996787515657e-03f,
- -5.572937315437795e-02f,
- 1.304999256534937e-02f,
- 5.164643594289910e-02f,
- -2.920855772127332e-02f,
- -4.250798573945090e-02f,
- 2.920855772127337e-02f,
- -5.572937315437795e-02f,
- 2.139265421578211e-02f,
- 3.630524959802152e-02f,
- -5.435713103213161e-02f,
- 1.304999256534937e-02f,
- 4.250798573945089e-02f,
- -5.164643594289908e-02f,
- 4.385996787515504e-03f,
- 4.766403419605861e-02f,
- 2.139265421578210e-02f,
- -5.164643594289911e-02f,
- 5.164643594289909e-02f,
- -2.139265421578210e-02f,
- -2.139265421578214e-02f,
- 5.164643594289910e-02f,
- -5.164643594289908e-02f,
- 2.139265421578208e-02f,
- 2.139265421578216e-02f,
- -5.164643594289915e-02f,
- 1.304999256534943e-02f,
- -3.630524959802151e-02f,
- 5.164643594289910e-02f,
- -5.572937315437795e-02f,
- 4.766403419605858e-02f,
- -2.920855772127332e-02f,
- 4.385996787515504e-03f,
- 2.139265421578216e-02f,
- -4.250798573945092e-02f,
- 5.435713103213160e-02f,
- 4.385996787515619e-03f,
- -1.304999256534941e-02f,
- 2.139265421578213e-02f,
- -2.920855772127336e-02f,
- 3.630524959802153e-02f,
- -4.250798573945090e-02f,
- 4.766403419605861e-02f,
- -5.164643594289915e-02f,
- 5.435713103213160e-02f,
- -5.572937315437796e-02f
-};
-
-static const float dct_core_a[] =
-{
- 7.881323533747238e-02f,
- 7.687259191733195e-02f,
- 7.303909015868119e-02f,
- 6.740712359748102e-02f,
- 6.011536994189358e-02f,
- 5.134337636686234e-02f,
- 4.130713846678219e-02f,
- 3.025378172711701e-02f,
- 1.845547647478522e-02f,
- 6.202736141429415e-03f,
- 7.687259191733195e-02f,
- 6.011536994189358e-02f,
- 3.025378172711701e-02f,
- -6.202736141429404e-03f,
- -4.130713846678218e-02f,
- -6.740712359748102e-02f,
- -7.881323533747238e-02f,
- -7.303909015868121e-02f,
- -5.134337636686238e-02f,
- -1.845547647478519e-02f,
- 7.303909015868119e-02f,
- 3.025378172711701e-02f,
- -3.025378172711701e-02f,
- -7.303909015868119e-02f,
- -7.303909015868121e-02f,
- -3.025378172711705e-02f,
- 3.025378172711703e-02f,
- 7.303909015868118e-02f,
- 7.303909015868119e-02f,
- 3.025378172711706e-02f,
- 6.740712359748102e-02f,
- -6.202736141429404e-03f,
- -7.303909015868119e-02f,
- -6.011536994189359e-02f,
- 1.845547647478516e-02f,
- 7.687259191733196e-02f,
- 5.134337636686239e-02f,
- -3.025378172711702e-02f,
- -7.881323533747238e-02f,
- -4.130713846678218e-02f,
- 6.011536994189358e-02f,
- -4.130713846678218e-02f,
- -7.303909015868121e-02f,
- 1.845547647478516e-02f,
- 7.881323533747238e-02f,
- 6.202736141429469e-03f,
- -7.687259191733196e-02f,
- -3.025378172711707e-02f,
- 6.740712359748102e-02f,
- 5.134337636686240e-02f,
- 5.134337636686234e-02f,
- -6.740712359748102e-02f,
- -3.025378172711705e-02f,
- 7.687259191733196e-02f,
- 6.202736141429469e-03f,
- -7.881323533747238e-02f,
- 1.845547647478515e-02f,
- 7.303909015868119e-02f,
- -4.130713846678212e-02f,
- -6.011536994189359e-02f,
- 4.130713846678219e-02f,
- -7.881323533747238e-02f,
- 3.025378172711703e-02f,
- 5.134337636686239e-02f,
- -7.687259191733196e-02f,
- 1.845547647478515e-02f,
- 6.011536994189358e-02f,
- -7.303909015868118e-02f,
- 6.202736141429252e-03f,
- 6.740712359748108e-02f,
- 3.025378172711701e-02f,
- -7.303909015868121e-02f,
- 7.303909015868118e-02f,
- -3.025378172711702e-02f,
- -3.025378172711707e-02f,
- 7.303909015868119e-02f,
- -7.303909015868118e-02f,
- 3.025378172711699e-02f,
- 3.025378172711710e-02f,
- -7.303909015868128e-02f,
- 1.845547647478522e-02f,
- -5.134337636686238e-02f,
- 7.303909015868119e-02f,
- -7.881323533747238e-02f,
- 6.740712359748102e-02f,
- -4.130713846678212e-02f,
- 6.202736141429252e-03f,
- 3.025378172711710e-02f,
- -6.011536994189360e-02f,
- 7.687259191733195e-02f,
- 6.202736141429415e-03f,
- -1.845547647478519e-02f,
- 3.025378172711706e-02f,
- -4.130713846678218e-02f,
- 5.134337636686240e-02f,
- -6.011536994189359e-02f,
- 6.740712359748108e-02f,
- -7.303909015868128e-02f,
- 7.687259191733195e-02f,
- -7.881323533747239e-02f
-};
-
-static const cos_msin_t cos_msin_5[5] =
-{
- {9.969173337331280e-01f, -7.845909572784494e-02f},
- {9.723699203976766e-01f, -2.334453638559054e-01f},
- {9.238795325112867e-01f, -3.826834323650898e-01f},
- {8.526401643540922e-01f, -5.224985647159488e-01f},
- {7.604059656000309e-01f, -6.494480483301837e-01f}
-};
-
-static const cos_msin_t cos_msin_10[10] =
-{
- {9.992290362407229e-01f, -3.925981575906861e-02f},
- {9.930684569549263e-01f, -1.175373974578376e-01f},
- {9.807852804032304e-01f, -1.950903220161282e-01f},
- {9.624552364536473e-01f, -2.714404498650743e-01f},
- {9.381913359224842e-01f, -3.461170570774930e-01f},
- {9.081431738250813e-01f, -4.186597375374281e-01f},
- {8.724960070727972e-01f, -4.886212414969549e-01f},
- {8.314696123025452e-01f, -5.555702330196022e-01f},
- {7.853169308807449e-01f, -6.190939493098340e-01f},
- {7.343225094356856e-01f, -6.788007455329417e-01f}
-};
-
-static const cos_msin_t cos_msin_20[20] =
-{
- {9.998072404820648e-01f, -1.963369246062830e-02f},
- {9.982656101847159e-01f, -5.887080365118903e-02f},
- {9.951847266721969e-01f, -9.801714032956060e-02f},
- {9.905693404435773e-01f, -1.370123416819680e-01f},
- {9.844265680898916e-01f, -1.757962799343545e-01f},
- {9.767658813208724e-01f, -2.143091530650507e-01f},
- {9.675990923602598e-01f, -2.524915770151580e-01f},
- {9.569403357322088e-01f, -2.902846772544623e-01f},
- {9.448060464668780e-01f, -3.276301795616935e-01f},
- {9.312149347588036e-01f, -3.644704998791496e-01f},
- {9.161879571171360e-01f, -4.007488331031410e-01f},
- {8.997482840522215e-01f, -4.364092406733421e-01f},
- {8.819212643483550e-01f, -4.713967368259976e-01f},
- {8.627343859777918e-01f, -5.056573733779846e-01f},
- {8.422172337162865e-01f, -5.391383229110002e-01f},
- {8.204014435255136e-01f, -5.717879602276122e-01f},
- {7.973206537727071e-01f, -6.035559419535714e-01f},
- {7.730104533627370e-01f, -6.343932841636455e-01f},
- {7.475083268625968e-01f, -6.642524379112817e-01f},
- {7.208535967029188e-01f, -6.930873625456359e-01f}
-};
-
-static const cos_msin_t cos_msin_40[40] =
-{
- {9.999518089593280e-01f, -9.817319337149617e-03f},
- {9.995663085020212e-01f, -2.944817324796316e-02f},
- {9.987954562051724e-01f, -4.906767432741801e-02f},
- {9.976395492470157e-01f, -6.866825888437376e-02f},
- {9.960990332516871e-01f, -8.824237052036951e-02f},
- {9.941745021174282e-01f, -1.077824630427593e-01f},
- {9.918666977876260e-01f, -1.272810033739132e-01f},
- {9.891765099647810e-01f, -1.467304744553617e-01f},
- {9.861049757675088e-01f, -1.661233781457655e-01f},
- {9.826532793307118e-01f, -1.854522381115909e-01f},
- {9.788227513490724e-01f, -2.047096027093796e-01f},
- {9.746148685640450e-01f, -2.238880478584984e-01f},
- {9.700312531945440e-01f, -2.429801799032639e-01f},
- {9.650736723115474e-01f, -2.619786384633375e-01f},
- {9.597440371568574e-01f, -2.808760992712921e-01f},
- {9.540444024062804e-01f, -2.996652769962566e-01f},
- {9.479769653775104e-01f, -3.183389280525497e-01f},
- {9.415440651830208e-01f, -3.368898533922201e-01f},
- {9.347481818282924e-01f, -3.553109012804161e-01f},
- {9.275919352557240e-01f, -3.735949700525164e-01f},
- {9.200780843345949e-01f, -3.917350108519559e-01f},
- {9.122095257974677e-01f, -4.097240303476953e-01f},
- {9.039892931234433e-01f, -4.275550934302821e-01f},
- {8.954205553686970e-01f, -4.452213258854682e-01f},
- {8.865066159447464e-01f, -4.627159170443501e-01f},
- {8.772509113449243e-01f, -4.800321224090111e-01f},
- {8.676570098195440e-01f, -4.971632662526544e-01f},
- {8.577286100002721e-01f, -5.141027441932217e-01f},
- {8.474695394742344e-01f, -5.308440257395095e-01f},
- {8.368837533084094e-01f, -5.473806568087964e-01f},
- {8.259753325248732e-01f, -5.637062622150167e-01f},
- {8.147484825274894e-01f, -5.798145481265136e-01f},
- {8.032075314806449e-01f, -5.956993044924334e-01f},
- {7.913569286406602e-01f, -6.113544074368165e-01f},
- {7.792012426405167e-01f, -6.267738216194696e-01f},
- {7.667451597285615e-01f, -6.419516025627030e-01f},
- {7.539934819618694e-01f, -6.568818989430414e-01f},
- {7.409511253549591e-01f, -6.715589548470183e-01f},
- {7.276231179845748e-01f, -6.859771119901928e-01f},
- {7.140145980512683e-01f, -7.001308118985236e-01f}
-};
-
-static const cos_msin_t cos_msin_80[80] =
-{
- {9.999879521672569e-01f, -4.908718807997990e-03f},
- {9.998915712471080e-01f, -1.472568331145852e-02f},
- {9.996988186962042e-01f, -2.454122852291229e-02f},
- {9.994097130924373e-01f, -3.435440839968228e-02f},
- {9.990242823004072e-01f, -4.416427712706736e-02f},
- {9.985425634687357e-01f, -5.396988920950188e-02f},
- {9.979646030264866e-01f, -6.377029956168449e-02f},
- {9.972904566786902e-01f, -7.356456359966743e-02f},
- {9.965201894009746e-01f, -8.335173733189745e-02f},
- {9.956538754333033e-01f, -9.313087745019979e-02f},
- {9.946915982728195e-01f, -1.029010414206961e-01f},
- {9.936334506657989e-01f, -1.126612875746478e-01f},
- {9.924795345987100e-01f, -1.224106751992162e-01f},
- {9.912299612883853e-01f, -1.321482646281301e-01f},
- {9.898848511713010e-01f, -1.418731173322532e-01f},
- {9.884443338919700e-01f, -1.515842960100411e-01f},
- {9.869085482904458e-01f, -1.612808646778805e-01f},
- {9.852776423889412e-01f, -1.709618887603012e-01f},
- {9.835517733775615e-01f, -1.806264351800528e-01f},
- {9.817311075991542e-01f, -1.902735724480359e-01f},
- {9.798158205332763e-01f, -1.999023707530817e-01f},
- {9.778060967792817e-01f, -2.095119020515688e-01f},
- {9.757021300385286e-01f, -2.191012401568698e-01f},
- {9.735041230957107e-01f, -2.286694608286194e-01f},
- {9.712122877993118e-01f, -2.382156418617946e-01f},
- {9.688268450411880e-01f, -2.477388631755984e-01f},
- {9.663480247352773e-01f, -2.572382069021397e-01f},
- {9.637760657954398e-01f, -2.667127574748984e-01f},
- {9.611112161124317e-01f, -2.761616017169707e-01f},
- {9.583537325300114e-01f, -2.855838289290823e-01f},
- {9.555038808201862e-01f, -2.949785309773635e-01f},
- {9.525619356575953e-01f, -3.043448023808773e-01f},
- {9.495281805930367e-01f, -3.136817403988915e-01f},
- {9.464029080261377e-01f, -3.229884451178863e-01f},
- {9.431864191771733e-01f, -3.322640195382908e-01f},
- {9.398790240580331e-01f, -3.415075696609363e-01f},
- {9.364810414423427e-01f, -3.507182045732232e-01f},
- {9.329927988347390e-01f, -3.598950365349881e-01f},
- {9.294146324393044e-01f, -3.690371810640665e-01f},
- {9.257468871271640e-01f, -3.781437570215405e-01f},
- {9.219899164032445e-01f, -3.872138866966656e-01f},
- {9.181440823722039e-01f, -3.962466958914656e-01f},
- {9.142097557035307e-01f, -4.052413140049899e-01f},
- {9.101873155958178e-01f, -4.141968741172237e-01f},
- {9.060771497402148e-01f, -4.231125130726441e-01f},
- {9.018796542830616e-01f, -4.319873715634118e-01f},
- {8.975952337877069e-01f, -4.408205942121939e-01f},
- {8.932243011955153e-01f, -4.496113296546065e-01f},
- {8.887672777860675e-01f, -4.583587306212713e-01f},
- {8.842245931365562e-01f, -4.670619540194765e-01f},
- {8.795966850803829e-01f, -4.757201610144369e-01f},
- {8.748839996649583e-01f, -4.843325171101412e-01f},
- {8.700869911087115e-01f, -4.928981922297840e-01f},
- {8.652061217573113e-01f, -5.014163607957690e-01f},
- {8.602418620391045e-01f, -5.098862018092806e-01f},
- {8.551946904197751e-01f, -5.183068989294132e-01f},
- {8.500650933562288e-01f, -5.266776405518521e-01f},
- {8.448535652497071e-01f, -5.349976198870972e-01f},
- {8.395606083981356e-01f, -5.432660350382236e-01f},
- {8.341867329477124e-01f, -5.514820890781694e-01f},
- {8.287324568437381e-01f, -5.596449901265460e-01f},
- {8.231983057806959e-01f, -5.677539514259605e-01f},
- {8.175848131515837e-01f, -5.758081914178453e-01f},
- {8.118925199965048e-01f, -5.838069338177863e-01f},
- {8.061219749505210e-01f, -5.917494076903429e-01f},
- {8.002737341907743e-01f, -5.996348475233523e-01f},
- {7.943483613828813e-01f, -6.074624933017110e-01f},
- {7.883464276266063e-01f, -6.152315905806268e-01f},
- {7.822685114008164e-01f, -6.229413905583340e-01f},
- {7.761151985077279e-01f, -6.305911501482637e-01f},
- {7.698870820164444e-01f, -6.381801320506653e-01f},
- {7.635847622057965e-01f, -6.457076048236672e-01f},
- {7.572088465064846e-01f, -6.531728429537768e-01f},
- {7.507599494425343e-01f, -6.605751269258050e-01f},
- {7.442386925720670e-01f, -6.679137432922161e-01f},
- {7.376457044273930e-01f, -6.751879847418903e-01f},
- {7.309816204544317e-01f, -6.823971501682968e-01f},
- {7.242470829514670e-01f, -6.895405447370668e-01f},
- {7.174427410072399e-01f, -6.966174799529642e-01f},
- {7.105692504383896e-01f, -7.036272737262429e-01f}
-};
-
-static const cos_msin_t cos_msin_160[160] =
-{
- {9.999969880372782e-01f, -2.454366796460292e-03f},
- {9.999728924443673e-01f, -7.363041249779567e-03f},
- {9.999247018391445e-01f, -1.227153828571993e-02f},
- {9.998524173827948e-01f, -1.717973963077875e-02f},
- {9.997560408170603e-01f, -2.208752701857829e-02f},
- {9.996355744641984e-01f, -2.699478219271537e-02f},
- {9.994910212269259e-01f, -3.190138690961086e-02f},
- {9.993223845883495e-01f, -3.680722294135883e-02f},
- {9.991296686118811e-01f, -4.171217207857533e-02f},
- {9.989128779411404e-01f, -4.661611613324671e-02f},
- {9.986720177998429e-01f, -5.151893694157748e-02f},
- {9.984070939916740e-01f, -5.642051636683749e-02f},
- {9.981181129001492e-01f, -6.132073630220858e-02f},
- {9.978050814884601e-01f, -6.621947867363034e-02f},
- {9.974680072993071e-01f, -7.111662544264533e-02f},
- {9.971068984547168e-01f, -7.601205860924312e-02f},
- {9.967217636558474e-01f, -8.090566021470375e-02f},
- {9.963126121827780e-01f, -8.579731234443989e-02f},
- {9.958794538942858e-01f, -9.068689713083816e-02f},
- {9.954222992276077e-01f, -9.557429675609919e-02f},
- {9.949411591981900e-01f, -1.004593934550765e-01f},
- {9.944360453994218e-01f, -1.053420695181141e-01f},
- {9.939069700023561e-01f, -1.102222072938831e-01f},
- {9.933539457554167e-01f, -1.150996891922159e-01f},
- {9.927769859840909e-01f, -1.199743976869403e-01f},
- {9.921761045906085e-01f, -1.248462153187112e-01f},
- {9.915513160536062e-01f, -1.297150246978405e-01f},
- {9.909026354277800e-01f, -1.345807085071262e-01f},
- {9.902300783435211e-01f, -1.394431495046788e-01f},
- {9.895336610065398e-01f, -1.443022305267465e-01f},
- {9.888134001974757e-01f, -1.491578344905386e-01f},
- {9.880693132714919e-01f, -1.540098443970461e-01f},
- {9.873014181578584e-01f, -1.588581433338614e-01f},
- {9.865097333595187e-01f, -1.637026144779952e-01f},
- {9.856942779526452e-01f, -1.685431410986913e-01f},
- {9.848550715861784e-01f, -1.733796065602395e-01f},
- {9.839921344813541e-01f, -1.782118943247859e-01f},
- {9.831054874312163e-01f, -1.830398879551410e-01f},
- {9.821951518001156e-01f, -1.878634711175852e-01f},
- {9.812611495231950e-01f, -1.926825275846723e-01f},
- {9.803035031058607e-01f, -1.974969412380297e-01f},
- {9.793222356232406e-01f, -2.023065960711564e-01f},
- {9.783173707196277e-01f, -2.071113761922186e-01f},
- {9.772889326079104e-01f, -2.119111658268416e-01f},
- {9.762369460689896e-01f, -2.167058493209000e-01f},
- {9.751614364511810e-01f, -2.214953111433043e-01f},
- {9.740624296696047e-01f, -2.262794358887845e-01f},
- {9.729399522055602e-01f, -2.310581082806711e-01f},
- {9.717940311058891e-01f, -2.358312131736727e-01f},
- {9.706246939823230e-01f, -2.405986355566504e-01f},
- {9.694319690108180e-01f, -2.453602605553894e-01f},
- {9.682158849308760e-01f, -2.501159734353663e-01f},
- {9.669764710448521e-01f, -2.548656596045146e-01f},
- {9.657137572172489e-01f, -2.596092046159851e-01f},
- {9.644277738739964e-01f, -2.643464941709040e-01f},
- {9.631185520017188e-01f, -2.690774141211269e-01f},
- {9.617861231469886e-01f, -2.738018504719892e-01f},
- {9.604305194155658e-01f, -2.785196893850531e-01f},
- {9.590517734716243e-01f, -2.832308171808502e-01f},
- {9.576499185369652e-01f, -2.879351203416211e-01f},
- {9.562249883902162e-01f, -2.926324855140505e-01f},
- {9.547770173660172e-01f, -2.973227995119985e-01f},
- {9.533060403541939e-01f, -3.020059493192281e-01f},
- {9.518120927989161e-01f, -3.066818220921279e-01f},
- {9.502952106978444e-01f, -3.113503051624320e-01f},
- {9.487554306012626e-01f, -3.160112860399338e-01f},
- {9.471927896111967e-01f, -3.206646524151973e-01f},
- {9.456073253805213e-01f, -3.253102921622629e-01f},
- {9.439990761120522e-01f, -3.299480933413494e-01f},
- {9.423680805576258e-01f, -3.345779442015508e-01f},
- {9.407143780171653e-01f, -3.391997331835298e-01f},
- {9.390380083377340e-01f, -3.438133489222048e-01f},
- {9.373390119125750e-01f, -3.484186802494346e-01f},
- {9.356174296801376e-01f, -3.530156161966958e-01f},
- {9.338733031230915e-01f, -3.576040459977578e-01f},
- {9.321066742673269e-01f, -3.621838590913509e-01f},
- {9.303175856809415e-01f, -3.667549451238308e-01f},
- {9.285060804732156e-01f, -3.713171939518375e-01f},
- {9.266722022935726e-01f, -3.758704956449495e-01f},
- {9.248159953305278e-01f, -3.804147404883323e-01f},
- {9.229375043106232e-01f, -3.849498189853822e-01f},
- {9.210367744973499e-01f, -3.894756218603648e-01f},
- {9.191138516900578e-01f, -3.939920400610481e-01f},
- {9.171687822228516e-01f, -3.984989647613298e-01f},
- {9.152016129634744e-01f, -4.029962873638600e-01f},
- {9.132123913121788e-01f, -4.074838995026576e-01f},
- {9.112011652005843e-01f, -4.119616930457218e-01f},
- {9.091679830905224e-01f, -4.164295600976372e-01f},
- {9.071128939728691e-01f, -4.208873930021739e-01f},
- {9.050359473663644e-01f, -4.253350843448814e-01f},
- {9.029371933164189e-01f, -4.297725269556770e-01f},
- {9.008166823939081e-01f, -4.341996139114278e-01f},
- {8.986744656939538e-01f, -4.386162385385277e-01f},
- {8.965105948346932e-01f, -4.430222944154668e-01f},
- {8.943251219560346e-01f, -4.474176753753967e-01f},
- {8.921180997184014e-01f, -4.518022755086881e-01f},
- {8.898895813014630e-01f, -4.561759891654830e-01f},
- {8.876396204028539e-01f, -4.605387109582400e-01f},
- {8.853682712368793e-01f, -4.648903357642744e-01f},
- {8.830755885332088e-01f, -4.692307587282903e-01f},
- {8.807616275355579e-01f, -4.735598752649081e-01f},
- {8.784264440003567e-01f, -4.778775810611837e-01f},
- {8.760700941954066e-01f, -4.821837720791227e-01f},
- {8.736926348985243e-01f, -4.864783445581868e-01f},
- {8.712941233961736e-01f, -4.907611950177941e-01f},
- {8.688746174820854e-01f, -4.950322202598127e-01f},
- {8.664341754558650e-01f, -4.992913173710469e-01f},
- {8.639728561215868e-01f, -5.035383837257176e-01f},
- {8.614907187863783e-01f, -5.077733169879345e-01f},
- {8.589878232589904e-01f, -5.119960151141624e-01f},
- {8.564642298483565e-01f, -5.162063763556797e-01f},
- {8.539199993621391e-01f, -5.204042992610306e-01f},
- {8.513551931052652e-01f, -5.245896826784689e-01f},
- {8.487698728784481e-01f, -5.287624257583958e-01f},
- {8.461641009766995e-01f, -5.329224279557898e-01f},
- {8.435379401878270e-01f, -5.370695890326298e-01f},
- {8.408914537909229e-01f, -5.412038090603096e-01f},
- {8.382247055548381e-01f, -5.453249884220465e-01f},
- {8.355377597366458e-01f, -5.494330278152808e-01f},
- {8.328306810800937e-01f, -5.535278282540700e-01f},
- {8.301035348140438e-01f, -5.576092910714722e-01f},
- {8.273563866508998e-01f, -5.616773179219247e-01f},
- {8.245893027850253e-01f, -5.657318107836131e-01f},
- {8.218023498911473e-01f, -5.697726719608341e-01f},
- {8.189955951227504e-01f, -5.737998040863485e-01f},
- {8.161691061104588e-01f, -5.778131101237274e-01f},
- {8.133229509604062e-01f, -5.818124933696910e-01f},
- {8.104571982525948e-01f, -5.857978574564389e-01f},
- {8.075719170392435e-01f, -5.897691063539708e-01f},
- {8.046671768431229e-01f, -5.937261443724019e-01f},
- {8.017430476558816e-01f, -5.976688761642677e-01f},
- {7.987995999363579e-01f, -6.015972067268220e-01f},
- {7.958369046088836e-01f, -6.055110414043255e-01f},
- {7.928550330615741e-01f, -6.094102858903271e-01f},
- {7.898540571446090e-01f, -6.132948462299359e-01f},
- {7.868340491684999e-01f, -6.171646288220856e-01f},
- {7.837950819023488e-01f, -6.210195404217892e-01f},
- {7.807372285720945e-01f, -6.248594881423863e-01f},
- {7.776605628587479e-01f, -6.286843794577813e-01f},
- {7.745651588966166e-01f, -6.324941222046724e-01f},
- {7.714510912715192e-01f, -6.362886245847729e-01f},
- {7.683184350189877e-01f, -6.400677951670226e-01f},
- {7.651672656224590e-01f, -6.438315428897914e-01f},
- {7.619976590114568e-01f, -6.475797770630733e-01f},
- {7.588096915597616e-01f, -6.513124073706714e-01f},
- {7.556034400835709e-01f, -6.550293438723744e-01f},
- {7.523789818396478e-01f, -6.587304970061237e-01f},
- {7.491363945234594e-01f, -6.624157775901718e-01f},
- {7.458757562673048e-01f, -6.660850968252301e-01f},
- {7.425971456384329e-01f, -6.697383662966099e-01f},
- {7.393006416371488e-01f, -6.733754979763520e-01f},
- {7.359863236949099e-01f, -6.769964042253483e-01f},
- {7.326542716724128e-01f, -6.806009977954530e-01f},
- {7.293045658576685e-01f, -6.841891918315852e-01f},
- {7.259372869640676e-01f, -6.877608998738217e-01f},
- {7.225525161284360e-01f, -6.913160358594803e-01f},
- {7.191503349090794e-01f, -6.948545141251936e-01f},
- {7.157308252838186e-01f, -6.983762494089729e-01f},
- {7.122940696480137e-01f, -7.018811568522627e-01f},
- {7.088401508125785e-01f, -7.053691520019861e-01f}
-};
-
-static const cos_msin_t cos_msin_320[320] =
-{
- {9.999992470090361e-01f, -1.227184322288852e-03f},
- {9.999932230881285e-01f, -3.681545574399692e-03f},
- {9.999811752826011e-01f, -6.135884649154475e-03f},
- {9.999631036650289e-01f, -8.590186761797602e-03f},
- {9.999390083442741e-01f, -1.104443712779613e-02f},
- {9.999088894654848e-01f, -1.349862096292883e-02f},
- {9.998727472100952e-01f, -1.595272348337527e-02f},
- {9.998305817958234e-01f, -1.840672990580482e-02f},
- {9.997823934766707e-01f, -2.086062544746576e-02f},
- {9.997281825429201e-01f, -2.331439532627430e-02f},
- {9.996679493211340e-01f, -2.576802476090363e-02f},
- {9.996016941741530e-01f, -2.822149897087298e-02f},
- {9.995294175010931e-01f, -3.067480317663663e-02f},
- {9.994511197373437e-01f, -3.312792259967294e-02f},
- {9.993668013545645e-01f, -3.558084246257342e-02f},
- {9.992764628606833e-01f, -3.803354798913168e-02f},
- {9.991801047998923e-01f, -4.048602440443251e-02f},
- {9.990777277526454e-01f, -4.293825693494082e-02f},
- {9.989693323356542e-01f, -4.539023080859068e-02f},
- {9.988549192018848e-01f, -4.784193125487429e-02f},
- {9.987344890405533e-01f, -5.029334350493095e-02f},
- {9.986080425771219e-01f, -5.274445279163603e-02f},
- {9.984755805732948e-01f, -5.519524434968993e-02f},
- {9.983371038270131e-01f, -5.764570341570704e-02f},
- {9.981926131724506e-01f, -6.009581522830464e-02f},
- {9.980421094800079e-01f, -6.254556502819182e-02f},
- {9.978855936563085e-01f, -6.499493805825848e-02f},
- {9.977230666441916e-01f, -6.744391956366405e-02f},
- {9.975545294227081e-01f, -6.989249479192657e-02f},
- {9.973799830071135e-01f, -7.234064899301137e-02f},
- {9.971994284488623e-01f, -7.478836741942015e-02f},
- {9.970128668356021e-01f, -7.723563532627951e-02f},
- {9.968202992911657e-01f, -7.968243797143013e-02f},
- {9.966217269755658e-01f, -8.212876061551522e-02f},
- {9.964171510849874e-01f, -8.457458852206962e-02f},
- {9.962065728517802e-01f, -8.701990695760831e-02f},
- {9.959899935444517e-01f, -8.946470119171543e-02f},
- {9.957674144676598e-01f, -9.190895649713272e-02f},
- {9.955388369622040e-01f, -9.435265814984850e-02f},
- {9.953042624050182e-01f, -9.679579142918618e-02f},
- {9.950636922091622e-01f, -9.923834161789306e-02f},
- {9.948171278238128e-01f, -1.016802940022289e-01f},
- {9.945645707342554e-01f, -1.041216338720546e-01f},
- {9.943060224618753e-01f, -1.065623465209208e-01f},
- {9.940414845641478e-01f, -1.090024172461564e-01f},
- {9.937709586346295e-01f, -1.114418313489574e-01f},
- {9.934944463029486e-01f, -1.138805741344751e-01f},
- {9.932119492347945e-01f, -1.163186309119048e-01f},
- {9.929234691319088e-01f, -1.187559869945741e-01f},
- {9.926290077320739e-01f, -1.211926277000318e-01f},
- {9.923285668091033e-01f, -1.236285383501360e-01f},
- {9.920221481728309e-01f, -1.260637042711424e-01f},
- {9.917097536690995e-01f, -1.284981107937932e-01f},
- {9.913913851797506e-01f, -1.309317432534049e-01f},
- {9.910670446226119e-01f, -1.333645869899571e-01f},
- {9.907367339514870e-01f, -1.357966273481804e-01f},
- {9.904004551561425e-01f, -1.382278496776452e-01f},
- {9.900582102622971e-01f, -1.406582393328492e-01f},
- {9.897100013316084e-01f, -1.430877816733065e-01f},
- {9.893558304616609e-01f, -1.455164620636352e-01f},
- {9.889956997859536e-01f, -1.479442658736455e-01f},
- {9.886296114738869e-01f, -1.503711784784285e-01f},
- {9.882575677307495e-01f, -1.527971852584434e-01f},
- {9.878795707977051e-01f, -1.552222715996064e-01f},
- {9.874956229517791e-01f, -1.576464228933781e-01f},
- {9.871057265058446e-01f, -1.600696245368518e-01f},
- {9.867098838086088e-01f, -1.624918619328416e-01f},
- {9.863080972445987e-01f, -1.649131204899699e-01f},
- {9.859003692341464e-01f, -1.673333856227558e-01f},
- {9.854867022333751e-01f, -1.697526427517024e-01f},
- {9.850670987341841e-01f, -1.721708773033852e-01f},
- {9.846415612642334e-01f, -1.745880747105397e-01f},
- {9.842100923869290e-01f, -1.770042204121487e-01f},
- {9.837726947014075e-01f, -1.794192998535309e-01f},
- {9.833293708425197e-01f, -1.818332984864276e-01f},
- {9.828801234808157e-01f, -1.842462017690910e-01f},
- {9.824249553225278e-01f, -1.866579951663718e-01f},
- {9.819638691095552e-01f, -1.890686641498062e-01f},
- {9.814968676194470e-01f, -1.914781941977041e-01f},
- {9.810239536653852e-01f, -1.938865707952361e-01f},
- {9.805451300961683e-01f, -1.962937794345212e-01f},
- {9.800603997961936e-01f, -1.986998056147138e-01f},
- {9.795697656854405e-01f, -2.011046348420919e-01f},
- {9.790732307194523e-01f, -2.035082526301433e-01f},
- {9.785707978893183e-01f, -2.059106444996538e-01f},
- {9.780624702216568e-01f, -2.083117959787937e-01f},
- {9.775482507785956e-01f, -2.107116926032057e-01f},
- {9.770281426577544e-01f, -2.131103199160914e-01f},
- {9.765021489922255e-01f, -2.155076634682986e-01f},
- {9.759702729505557e-01f, -2.179037088184086e-01f},
- {9.754325177367266e-01f, -2.202984415328229e-01f},
- {9.748888865901355e-01f, -2.226918471858500e-01f},
- {9.743393827855759e-01f, -2.250839113597928e-01f},
- {9.737840096332177e-01f, -2.274746196450351e-01f},
- {9.732227704785874e-01f, -2.298639576401283e-01f},
- {9.726556687025479e-01f, -2.322519109518786e-01f},
- {9.720827077212779e-01f, -2.346384651954331e-01f},
- {9.715038909862518e-01f, -2.370236059943672e-01f},
- {9.709192219842182e-01f, -2.394073189807704e-01f},
- {9.703287042371799e-01f, -2.417895897953334e-01f},
- {9.697323413023714e-01f, -2.441704040874346e-01f},
- {9.691301367722388e-01f, -2.465497475152259e-01f},
- {9.685220942744174e-01f, -2.489276057457201e-01f},
- {9.679082174717095e-01f, -2.513039644548766e-01f},
- {9.672885100620635e-01f, -2.536788093276874e-01f},
- {9.666629757785506e-01f, -2.560521260582643e-01f},
- {9.660316183893426e-01f, -2.584239003499241e-01f},
- {9.653944416976894e-01f, -2.607941179152755e-01f},
- {9.647514495418958e-01f, -2.631627644763044e-01f},
- {9.641026457952987e-01f, -2.655298257644607e-01f},
- {9.634480343662435e-01f, -2.678952875207434e-01f},
- {9.627876191980606e-01f, -2.702591354957875e-01f},
- {9.621214042690416e-01f, -2.726213554499490e-01f},
- {9.614493935924158e-01f, -2.749819331533909e-01f},
- {9.607715912163253e-01f, -2.773408543861692e-01f},
- {9.600880012238011e-01f, -2.796981049383182e-01f},
- {9.593986277327383e-01f, -2.820536706099365e-01f},
- {9.587034748958716e-01f, -2.844075372112719e-01f},
- {9.580025469007496e-01f, -2.867596905628075e-01f},
- {9.572958479697103e-01f, -2.891101164953470e-01f},
- {9.565833823598556e-01f, -2.914588008500998e-01f},
- {9.558651543630251e-01f, -2.938057294787664e-01f},
- {9.551411683057708e-01f, -2.961508882436238e-01f},
- {9.544114285493304e-01f, -2.984942630176104e-01f},
- {9.536759394896021e-01f, -3.008358396844112e-01f},
- {9.529347055571170e-01f, -3.031756041385431e-01f},
- {9.521877312170133e-01f, -3.055135422854393e-01f},
- {9.514350209690083e-01f, -3.078496400415349e-01f},
- {9.506765793473728e-01f, -3.101838833343510e-01f},
- {9.499124109209025e-01f, -3.125162581025802e-01f},
- {9.491425202928909e-01f, -3.148467502961706e-01f},
- {9.483669121011018e-01f, -3.171753458764112e-01f},
- {9.475855910177411e-01f, -3.195020308160157e-01f},
- {9.467985617494289e-01f, -3.218267910992075e-01f},
- {9.460058290371707e-01f, -3.241496127218040e-01f},
- {9.452073976563291e-01f, -3.264704816913009e-01f},
- {9.444032724165956e-01f, -3.287893840269567e-01f},
- {9.435934581619604e-01f, -3.311063057598764e-01f},
- {9.427779597706842e-01f, -3.334212329330963e-01f},
- {9.419567821552687e-01f, -3.357341516016679e-01f},
- {9.411299302624264e-01f, -3.380450478327413e-01f},
- {9.402974090730516e-01f, -3.403539077056500e-01f},
- {9.394592236021899e-01f, -3.426607173119944e-01f},
- {9.386153788990080e-01f, -3.449654627557252e-01f},
- {9.377658800467635e-01f, -3.472681301532278e-01f},
- {9.369107321627741e-01f, -3.495687056334055e-01f},
- {9.360499403983871e-01f, -3.518671753377630e-01f},
- {9.351835099389476e-01f, -3.541635254204903e-01f},
- {9.343114460037683e-01f, -3.564577420485457e-01f},
- {9.334337538460973e-01f, -3.587498114017393e-01f},
- {9.325504387530866e-01f, -3.610397196728160e-01f},
- {9.316615060457607e-01f, -3.633274530675394e-01f},
- {9.307669610789837e-01f, -3.656129978047739e-01f},
- {9.298668092414279e-01f, -3.678963401165684e-01f},
- {9.289610559555410e-01f, -3.701774662482391e-01f},
- {9.280497066775131e-01f, -3.724563624584523e-01f},
- {9.271327668972442e-01f, -3.747330150193071e-01f},
- {9.262102421383114e-01f, -3.770074102164183e-01f},
- {9.252821379579349e-01f, -3.792795343489985e-01f},
- {9.243484599469451e-01f, -3.815493737299417e-01f},
- {9.234092137297489e-01f, -3.838169146859046e-01f},
- {9.224644049642953e-01f, -3.860821435573893e-01f},
- {9.215140393420420e-01f, -3.883450466988262e-01f},
- {9.205581225879205e-01f, -3.906056104786556e-01f},
- {9.195966604603021e-01f, -3.928638212794095e-01f},
- {9.186296587509630e-01f, -3.951196654977946e-01f},
- {9.176571232850496e-01f, -3.973731295447735e-01f},
- {9.166790599210427e-01f, -3.996241998456468e-01f},
- {9.156954745507232e-01f, -4.018728628401348e-01f},
- {9.147063730991362e-01f, -4.041191049824593e-01f},
- {9.137117615245548e-01f, -4.063629127414251e-01f},
- {9.127116458184452e-01f, -4.086042726005015e-01f},
- {9.117060320054299e-01f, -4.108431710579039e-01f},
- {9.106949261432513e-01f, -4.130795946266749e-01f},
- {9.096783343227359e-01f, -4.153135298347656e-01f},
- {9.086562626677570e-01f, -4.175449632251170e-01f},
- {9.076287173351980e-01f, -4.197738813557405e-01f},
- {9.065957045149153e-01f, -4.220002707997997e-01f},
- {9.055572304297014e-01f, -4.242241181456904e-01f},
- {9.045133013352465e-01f, -4.264454099971220e-01f},
- {9.034639235201017e-01f, -4.286641329731982e-01f},
- {9.024091033056408e-01f, -4.308802737084970e-01f},
- {9.013488470460220e-01f, -4.330938188531520e-01f},
- {9.002831611281501e-01f, -4.353047550729321e-01f},
- {8.992120519716374e-01f, -4.375130690493225e-01f},
- {8.981355260287659e-01f, -4.397187474796043e-01f},
- {8.970535897844474e-01f, -4.419217770769352e-01f},
- {8.959662497561852e-01f, -4.441221445704292e-01f},
- {8.948735124940346e-01f, -4.463198367052365e-01f},
- {8.937753845805634e-01f, -4.485148402426236e-01f},
- {8.926718726308122e-01f, -4.507071419600526e-01f},
- {8.915629832922548e-01f, -4.528967286512617e-01f},
- {8.904487232447579e-01f, -4.550835871263438e-01f},
- {8.893290992005409e-01f, -4.572677042118265e-01f},
- {8.882041179041357e-01f, -4.594490667507513e-01f},
- {8.870737861323454e-01f, -4.616276616027529e-01f},
- {8.859381106942048e-01f, -4.638034756441384e-01f},
- {8.847970984309378e-01f, -4.659764957679662e-01f},
- {8.836507562159172e-01f, -4.681467088841250e-01f},
- {8.824990909546231e-01f, -4.703141019194129e-01f},
- {8.813421095846011e-01f, -4.724786618176158e-01f},
- {8.801798190754208e-01f, -4.746403755395864e-01f},
- {8.790122264286335e-01f, -4.767992300633221e-01f},
- {8.778393386777302e-01f, -4.789552123840445e-01f},
- {8.766611628880995e-01f, -4.811083095142767e-01f},
- {8.754777061569843e-01f, -4.832585084839222e-01f},
- {8.742889756134398e-01f, -4.854057963403425e-01f},
- {8.730949784182901e-01f, -4.875501601484360e-01f},
- {8.718957217640854e-01f, -4.896915869907146e-01f},
- {8.706912128750582e-01f, -4.918300639673830e-01f},
- {8.694814590070804e-01f, -4.939655781964152e-01f},
- {8.682664674476190e-01f, -4.960981168136327e-01f},
- {8.670462455156926e-01f, -4.982276669727819e-01f},
- {8.658208005618273e-01f, -5.003542158456112e-01f},
- {8.645901399680118e-01f, -5.024777506219491e-01f},
- {8.633542711476541e-01f, -5.045982585097801e-01f},
- {8.621132015455357e-01f, -5.067157267353229e-01f},
- {8.608669386377673e-01f, -5.088301425431070e-01f},
- {8.596154899317437e-01f, -5.109414931960489e-01f},
- {8.583588629660989e-01f, -5.130497659755299e-01f},
- {8.570970653106597e-01f, -5.151549481814718e-01f},
- {8.558301045664012e-01f, -5.172570271324139e-01f},
- {8.545579883654005e-01f, -5.193559901655896e-01f},
- {8.532807243707908e-01f, -5.214518246370019e-01f},
- {8.519983202767152e-01f, -5.235445179215000e-01f},
- {8.507107838082801e-01f, -5.256340574128560e-01f},
- {8.494181227215095e-01f, -5.277204305238395e-01f},
- {8.481203448032972e-01f, -5.298036246862946e-01f},
- {8.468174578713608e-01f, -5.318836273512150e-01f},
- {8.455094697741939e-01f, -5.339604259888194e-01f},
- {8.441963883910193e-01f, -5.360340080886280e-01f},
- {8.428782216317413e-01f, -5.381043611595366e-01f},
- {8.415549774368984e-01f, -5.401714727298929e-01f},
- {8.402266637776148e-01f, -5.422353303475707e-01f},
- {8.388932886555529e-01f, -5.442959215800456e-01f},
- {8.375548601028652e-01f, -5.463532340144698e-01f},
- {8.362113861821453e-01f, -5.484072552577465e-01f},
- {8.348628749863800e-01f, -5.504579729366048e-01f},
- {8.335093346389004e-01f, -5.525053746976744e-01f},
- {8.321507732933324e-01f, -5.545494482075597e-01f},
- {8.307871991335484e-01f, -5.565901811529141e-01f},
- {8.294186203736174e-01f, -5.586275612405148e-01f},
- {8.280450452577558e-01f, -5.606615761973360e-01f},
- {8.266664820602777e-01f, -5.626922137706231e-01f},
- {8.252829390855451e-01f, -5.647194617279668e-01f},
- {8.238944246679176e-01f, -5.667433078573766e-01f},
- {8.225009471717026e-01f, -5.687637399673542e-01f},
- {8.211025149911046e-01f, -5.707807458869673e-01f},
- {8.196991365501750e-01f, -5.727943134659226e-01f},
- {8.182908203027607e-01f, -5.748044305746390e-01f},
- {8.168775747324537e-01f, -5.768110851043212e-01f},
- {8.154594083525400e-01f, -5.788142649670318e-01f},
- {8.140363297059484e-01f, -5.808139580957645e-01f},
- {8.126083473651983e-01f, -5.828101524445172e-01f},
- {8.111754699323488e-01f, -5.848028359883638e-01f},
- {8.097377060389469e-01f, -5.867919967235272e-01f},
- {8.082950643459751e-01f, -5.887776226674516e-01f},
- {8.068475535437993e-01f, -5.907597018588742e-01f},
- {8.053951823521167e-01f, -5.927382223578977e-01f},
- {8.039379595199031e-01f, -5.947131722460625e-01f},
- {8.024758938253601e-01f, -5.966845396264172e-01f},
- {8.010089940758625e-01f, -5.986523126235920e-01f},
- {7.995372691079050e-01f, -6.006164793838690e-01f},
- {7.980607277870492e-01f, -6.025770280752539e-01f},
- {7.965793790078698e-01f, -6.045339468875478e-01f},
- {7.950932316939014e-01f, -6.064872240324176e-01f},
- {7.936022947975847e-01f, -6.084368477434675e-01f},
- {7.921065773002124e-01f, -6.103828062763095e-01f},
- {7.906060882118751e-01f, -6.123250879086344e-01f},
- {7.891008365714072e-01f, -6.142636809402826e-01f},
- {7.875908314463325e-01f, -6.161985736933142e-01f},
- {7.860760819328091e-01f, -6.181297545120795e-01f},
- {7.845565971555752e-01f, -6.200572117632891e-01f},
- {7.830323862678940e-01f, -6.219809338360844e-01f},
- {7.815034584514979e-01f, -6.239009091421072e-01f},
- {7.799698229165344e-01f, -6.258171261155689e-01f},
- {7.784314889015095e-01f, -6.277295732133219e-01f},
- {7.768884656732324e-01f, -6.296382389149270e-01f},
- {7.753407625267603e-01f, -6.315431117227246e-01f},
- {7.737883887853415e-01f, -6.334441801619028e-01f},
- {7.722313538003597e-01f, -6.353414327805670e-01f},
- {7.706696669512773e-01f, -6.372348581498091e-01f},
- {7.691033376455797e-01f, -6.391244448637757e-01f},
- {7.675323753187178e-01f, -6.410101815397373e-01f},
- {7.659567894340514e-01f, -6.428920568181569e-01f},
- {7.643765894827926e-01f, -6.447700593627579e-01f},
- {7.627917849839481e-01f, -6.466441778605931e-01f},
- {7.612023854842618e-01f, -6.485144010221124e-01f},
- {7.596084005581580e-01f, -6.503807175812309e-01f},
- {7.580098398076831e-01f, -6.522431162953969e-01f},
- {7.564067128624476e-01f, -6.541015859456593e-01f},
- {7.547990293795690e-01f, -6.559561153367355e-01f},
- {7.531867990436125e-01f, -6.578066932970786e-01f},
- {7.515700315665336e-01f, -6.596533086789452e-01f},
- {7.499487366876190e-01f, -6.614959503584616e-01f},
- {7.483229241734281e-01f, -6.633346072356920e-01f},
- {7.466926038177344e-01f, -6.651692682347043e-01f},
- {7.450577854414661e-01f, -6.669999223036375e-01f},
- {7.434184788926470e-01f, -6.688265584147679e-01f},
- {7.417746940463380e-01f, -6.706491655645758e-01f},
- {7.401264408045760e-01f, -6.724677327738116e-01f},
- {7.384737290963160e-01f, -6.742822490875620e-01f},
- {7.368165688773699e-01f, -6.760927035753159e-01f},
- {7.351549701303474e-01f, -6.778990853310308e-01f},
- {7.334889428645953e-01f, -6.797013834731973e-01f},
- {7.318184971161379e-01f, -6.814995871449060e-01f},
- {7.301436429476156e-01f, -6.832936855139119e-01f},
- {7.284643904482252e-01f, -6.850836677727004e-01f},
- {7.267807497336585e-01f, -6.868695231385515e-01f},
- {7.250927309460417e-01f, -6.886512408536060e-01f},
- {7.234003442538740e-01f, -6.904288101849290e-01f},
- {7.217035998519666e-01f, -6.922022204245754e-01f},
- {7.200025079613817e-01f, -6.939714608896540e-01f},
- {7.182970788293696e-01f, -6.957365209223924e-01f},
- {7.165873227293083e-01f, -6.974973898902004e-01f},
- {7.148732499606411e-01f, -6.992540571857347e-01f},
- {7.131548708488146e-01f, -7.010065122269625e-01f},
- {7.114321957452164e-01f, -7.027547444572253e-01f},
- {7.097052350271130e-01f, -7.044987433453024e-01f},
- {7.079739990975870e-01f, -7.062384983854745e-01f}
-};
-
-static const cos_msin_t cos_msin_640[640] =
-{
- {9.999998117522413e-01f, -6.135922766517967e-04f},
- {9.999983057705969e-01f, -1.840775905896510e-03f},
- {9.999952938095762e-01f, -3.067956762965976e-03f},
- {9.999907758737150e-01f, -4.295132999748002e-03f},
- {9.999847519698173e-01f, -5.522302768137352e-03f},
- {9.999772221069551e-01f, -6.749464220038533e-03f},
- {9.999681862964679e-01f, -7.976615507368575e-03f},
- {9.999576445519639e-01f, -9.203754782059819e-03f},
- {9.999455968893185e-01f, -1.043088019606269e-02f},
- {9.999320433266753e-01f, -1.165798990134850e-02f},
- {9.999169838844458e-01f, -1.288508204991220e-02f},
- {9.999004185853092e-01f, -1.411215479377519e-02f},
- {9.998823474542126e-01f, -1.533920628498810e-02f},
- {9.998627705183706e-01f, -1.656623467563356e-02f},
- {9.998416878072659e-01f, -1.779323811782898e-02f},
- {9.998190993526487e-01f, -1.902021476372936e-02f},
- {9.997950051885367e-01f, -2.024716276553004e-02f},
- {9.997694053512153e-01f, -2.147408027546951e-02f},
- {9.997422998792375e-01f, -2.270096544583216e-02f},
- {9.997136888134235e-01f, -2.392781642895110e-02f},
- {9.996835721968610e-01f, -2.515463137721094e-02f},
- {9.996519500749053e-01f, -2.638140844305051e-02f},
- {9.996188224951786e-01f, -2.760814577896574e-02f},
- {9.995841895075704e-01f, -2.883484153751236e-02f},
- {9.995480511642375e-01f, -3.006149387130874e-02f},
- {9.995104075196035e-01f, -3.128810093303862e-02f},
- {9.994712586303591e-01f, -3.251466087545394e-02f},
- {9.994306045554617e-01f, -3.374117185137758e-02f},
- {9.993884453561358e-01f, -3.496763201370620e-02f},
- {9.993447810958722e-01f, -3.619403951541294e-02f},
- {9.992996118404286e-01f, -3.742039250955028e-02f},
- {9.992529376578290e-01f, -3.864668914925275e-02f},
- {9.992047586183639e-01f, -3.987292758773981e-02f},
- {9.991550747945901e-01f, -4.109910597831850e-02f},
- {9.991038862613305e-01f, -4.232522247438635e-02f},
- {9.990511930956741e-01f, -4.355127522943403e-02f},
- {9.989969953769761e-01f, -4.477726239704831e-02f},
- {9.989412931868569e-01f, -4.600318213091462e-02f},
- {9.988840866092031e-01f, -4.722903258482004e-02f},
- {9.988253757301669e-01f, -4.845481191265589e-02f},
- {9.987651606381658e-01f, -4.968051826842070e-02f},
- {9.987034414238826e-01f, -5.090614980622282e-02f},
- {9.986402181802653e-01f, -5.213170468028332e-02f},
- {9.985754910025268e-01f, -5.335718104493870e-02f},
- {9.985092599881454e-01f, -5.458257705464371e-02f},
- {9.984415252368637e-01f, -5.580789086397409e-02f},
- {9.983722868506889e-01f, -5.703312062762941e-02f},
- {9.983015449338929e-01f, -5.825826450043575e-02f},
- {9.982292995930115e-01f, -5.948332063734863e-02f},
- {9.981555509368452e-01f, -6.070828719345561e-02f},
- {9.980802990764579e-01f, -6.193316232397920e-02f},
- {9.980035441251777e-01f, -6.315794418427960e-02f},
- {9.979252861985960e-01f, -6.438263092985747e-02f},
- {9.978455254145679e-01f, -6.560722071635666e-02f},
- {9.977642618932119e-01f, -6.683171169956714e-02f},
- {9.976814957569091e-01f, -6.805610203542757e-02f},
- {9.975972271303040e-01f, -6.928038988002828e-02f},
- {9.975114561403035e-01f, -7.050457338961386e-02f},
- {9.974241829160772e-01f, -7.172865072058610e-02f},
- {9.973354075890570e-01f, -7.295262002950662e-02f},
- {9.972451302929369e-01f, -7.417647947309980e-02f},
- {9.971533511636731e-01f, -7.540022720825540e-02f},
- {9.970600703394830e-01f, -7.662386139203149e-02f},
- {9.969652879608459e-01f, -7.784738018165707e-02f},
- {9.968690041705026e-01f, -7.907078173453497e-02f},
- {9.967712191134545e-01f, -8.029406420824454e-02f},
- {9.966719329369642e-01f, -8.151722576054453e-02f},
- {9.965711457905548e-01f, -8.274026454937569e-02f},
- {9.964688578260101e-01f, -8.396317873286374e-02f},
- {9.963650691973739e-01f, -8.518596646932200e-02f},
- {9.962597800609497e-01f, -8.640862591725426e-02f},
- {9.961529905753015e-01f, -8.763115523535747e-02f},
- {9.960447009012520e-01f, -8.885355258252460e-02f},
- {9.959349112018836e-01f, -9.007581611784729e-02f},
- {9.958236216425376e-01f, -9.129794400061877e-02f},
- {9.957108323908140e-01f, -9.251993439033654e-02f},
- {9.955965436165716e-01f, -9.374178544670515e-02f},
- {9.954807554919269e-01f, -9.496349532963899e-02f},
- {9.953634681912550e-01f, -9.618506219926506e-02f},
- {9.952446818911883e-01f, -9.740648421592572e-02f},
- {9.951243967706169e-01f, -9.862775954018151e-02f},
- {9.950026130106879e-01f, -9.984888633281383e-02f},
- {9.948793307948056e-01f, -1.010698627548278e-01f},
- {9.947545503086307e-01f, -1.022906869674551e-01f},
- {9.946282717400804e-01f, -1.035113571321563e-01f},
- {9.945004952793278e-01f, -1.047318714106244e-01f},
- {9.943712211188022e-01f, -1.059522279647869e-01f},
- {9.942404494531879e-01f, -1.071724249568088e-01f},
- {9.941081804794248e-01f, -1.083924605490956e-01f},
- {9.939744143967076e-01f, -1.096123329042957e-01f},
- {9.938391514064855e-01f, -1.108320401853034e-01f},
- {9.937023917124622e-01f, -1.120515805552615e-01f},
- {9.935641355205953e-01f, -1.132709521775643e-01f},
- {9.934243830390962e-01f, -1.144901532158602e-01f},
- {9.932831344784294e-01f, -1.157091818340545e-01f},
- {9.931403900513129e-01f, -1.169280361963119e-01f},
- {9.929961499727171e-01f, -1.181467144670601e-01f},
- {9.928504144598651e-01f, -1.193652148109914e-01f},
- {9.927031837322318e-01f, -1.205835353930663e-01f},
- {9.925544580115441e-01f, -1.218016743785162e-01f},
- {9.924042375217801e-01f, -1.230196299328457e-01f},
- {9.922525224891693e-01f, -1.242374002218357e-01f},
- {9.920993131421918e-01f, -1.254549834115462e-01f},
- {9.919446097115779e-01f, -1.266723776683190e-01f},
- {9.917884124303086e-01f, -1.278895811587802e-01f},
- {9.916307215336136e-01f, -1.291065920498434e-01f},
- {9.914715372589731e-01f, -1.303234085087122e-01f},
- {9.913108598461154e-01f, -1.315400287028831e-01f},
- {9.911486895370180e-01f, -1.327564508001479e-01f},
- {9.909850265759061e-01f, -1.339726729685971e-01f},
- {9.908198712092535e-01f, -1.351886933766218e-01f},
- {9.906532236857811e-01f, -1.364045101929175e-01f},
- {9.904850842564571e-01f, -1.376201215864860e-01f},
- {9.903154531744962e-01f, -1.388355257266385e-01f},
- {9.901443306953601e-01f, -1.400507207829983e-01f},
- {9.899717170767560e-01f, -1.412657049255036e-01f},
- {9.897976125786367e-01f, -1.424804763244102e-01f},
- {9.896220174632009e-01f, -1.436950331502945e-01f},
- {9.894449319948911e-01f, -1.449093735740556e-01f},
- {9.892663564403953e-01f, -1.461234957669190e-01f},
- {9.890862910686448e-01f, -1.473373979004386e-01f},
- {9.889047361508148e-01f, -1.485510781464996e-01f},
- {9.887216919603238e-01f, -1.497645346773215e-01f},
- {9.885371587728330e-01f, -1.509777656654608e-01f},
- {9.883511368662461e-01f, -1.521907692838135e-01f},
- {9.881636265207087e-01f, -1.534035437056180e-01f},
- {9.879746280186079e-01f, -1.546160871044581e-01f},
- {9.877841416445722e-01f, -1.558283976542652e-01f},
- {9.875921676854704e-01f, -1.570404735293217e-01f},
- {9.873987064304122e-01f, -1.582523129042630e-01f},
- {9.872037581707463e-01f, -1.594639139540810e-01f},
- {9.870073232000616e-01f, -1.606752748541265e-01f},
- {9.868094018141855e-01f, -1.618863937801118e-01f},
- {9.866099943111839e-01f, -1.630972689081137e-01f},
- {9.864091009913611e-01f, -1.643078984145762e-01f},
- {9.862067221572588e-01f, -1.655182804763130e-01f},
- {9.860028581136556e-01f, -1.667284132705107e-01f},
- {9.857975091675675e-01f, -1.679382949747312e-01f},
- {9.855906756282459e-01f, -1.691479237669144e-01f},
- {9.853823578071785e-01f, -1.703572978253813e-01f},
- {9.851725560180883e-01f, -1.715664153288364e-01f},
- {9.849612705769328e-01f, -1.727752744563706e-01f},
- {9.847485018019042e-01f, -1.739838733874638e-01f},
- {9.845342500134284e-01f, -1.751922103019880e-01f},
- {9.843185155341647e-01f, -1.764002833802096e-01f},
- {9.841012986890054e-01f, -1.776080908027924e-01f},
- {9.838825998050751e-01f, -1.788156307508001e-01f},
- {9.836624192117303e-01f, -1.800229014056995e-01f},
- {9.834407572405590e-01f, -1.812299009493628e-01f},
- {9.832176142253802e-01f, -1.824366275640705e-01f},
- {9.829929905022433e-01f, -1.836430794325141e-01f},
- {9.827668864094273e-01f, -1.848492547377989e-01f},
- {9.825393022874412e-01f, -1.860551516634466e-01f},
- {9.823102384790224e-01f, -1.872607683933984e-01f},
- {9.820796953291370e-01f, -1.884661031120172e-01f},
- {9.818476731849786e-01f, -1.896711540040907e-01f},
- {9.816141723959685e-01f, -1.908759192548340e-01f},
- {9.813791933137546e-01f, -1.920803970498924e-01f},
- {9.811427362922112e-01f, -1.932845855753442e-01f},
- {9.809048016874382e-01f, -1.944884830177032e-01f},
- {9.806653898577611e-01f, -1.956920875639216e-01f},
- {9.804245011637294e-01f, -1.968953974013927e-01f},
- {9.801821359681174e-01f, -1.980984107179536e-01f},
- {9.799382946359226e-01f, -1.993011257018880e-01f},
- {9.796929775343657e-01f, -2.005035405419289e-01f},
- {9.794461850328897e-01f, -2.017056534272613e-01f},
- {9.791979175031598e-01f, -2.029074625475249e-01f},
- {9.789481753190622e-01f, -2.041089660928169e-01f},
- {9.786969588567044e-01f, -2.053101622536946e-01f},
- {9.784442684944136e-01f, -2.065110492211783e-01f},
- {9.781901046127370e-01f, -2.077116251867540e-01f},
- {9.779344675944409e-01f, -2.089118883423760e-01f},
- {9.776773578245099e-01f, -2.101118368804696e-01f},
- {9.774187756901469e-01f, -2.113114689939341e-01f},
- {9.771587215807717e-01f, -2.125107828761450e-01f},
- {9.768971958880210e-01f, -2.137097767209575e-01f},
- {9.766341990057480e-01f, -2.149084487227085e-01f},
- {9.763697313300211e-01f, -2.161067970762195e-01f},
- {9.761037932591240e-01f, -2.173048199767996e-01f},
- {9.758363851935545e-01f, -2.185025156202481e-01f},
- {9.755675075360243e-01f, -2.196998822028567e-01f},
- {9.752971606914583e-01f, -2.208969179214133e-01f},
- {9.750253450669941e-01f, -2.220936209732035e-01f},
- {9.747520610719810e-01f, -2.232899895560143e-01f},
- {9.744773091179798e-01f, -2.244860218681361e-01f},
- {9.742010896187618e-01f, -2.256817161083659e-01f},
- {9.739234029903089e-01f, -2.268770704760098e-01f},
- {9.736442496508120e-01f, -2.280720831708857e-01f},
- {9.733636300206708e-01f, -2.292667523933261e-01f},
- {9.730815445224936e-01f, -2.304610763441808e-01f},
- {9.727979935810960e-01f, -2.316550532248194e-01f},
- {9.725129776235006e-01f, -2.328486812371343e-01f},
- {9.722264970789363e-01f, -2.340419585835434e-01f},
- {9.719385523788376e-01f, -2.352348834669925e-01f},
- {9.716491439568440e-01f, -2.364274540909583e-01f},
- {9.713582722487994e-01f, -2.376196686594509e-01f},
- {9.710659376927513e-01f, -2.388115253770169e-01f},
- {9.707721407289504e-01f, -2.400030224487415e-01f},
- {9.704768817998493e-01f, -2.411941580802516e-01f},
- {9.701801613501028e-01f, -2.423849304777186e-01f},
- {9.698819798265667e-01f, -2.435753378478606e-01f},
- {9.695823376782966e-01f, -2.447653783979458e-01f},
- {9.692812353565485e-01f, -2.459550503357946e-01f},
- {9.689786733147769e-01f, -2.471443518697825e-01f},
- {9.686746520086348e-01f, -2.483332812088429e-01f},
- {9.683691718959728e-01f, -2.495218365624697e-01f},
- {9.680622334368384e-01f, -2.507100161407201e-01f},
- {9.677538370934755e-01f, -2.518978181542170e-01f},
- {9.674439833303232e-01f, -2.530852408141520e-01f},
- {9.671326726140158e-01f, -2.542722823322882e-01f},
- {9.668199054133816e-01f, -2.554589409209625e-01f},
- {9.665056821994423e-01f, -2.566452147930884e-01f},
- {9.661900034454125e-01f, -2.578311021621590e-01f},
- {9.658728696266987e-01f, -2.590166012422493e-01f},
- {9.655542812208985e-01f, -2.602017102480191e-01f},
- {9.652342387078005e-01f, -2.613864273947156e-01f},
- {9.649127425693828e-01f, -2.625707508981763e-01f},
- {9.645897932898128e-01f, -2.637546789748313e-01f},
- {9.642653913554462e-01f, -2.649382098417065e-01f},
- {9.639395372548267e-01f, -2.661213417164257e-01f},
- {9.636122314786845e-01f, -2.673040728172135e-01f},
- {9.632834745199362e-01f, -2.684864013628985e-01f},
- {9.629532668736839e-01f, -2.696683255729151e-01f},
- {9.626216090372143e-01f, -2.708498436673069e-01f},
- {9.622885015099981e-01f, -2.720309538667289e-01f},
- {9.619539447936892e-01f, -2.732116543924507e-01f},
- {9.616179393921240e-01f, -2.743919434663584e-01f},
- {9.612804858113206e-01f, -2.755718193109581e-01f},
- {9.609415845594780e-01f, -2.767512801493782e-01f},
- {9.606012361469752e-01f, -2.779303242053718e-01f},
- {9.602594410863711e-01f, -2.791089497033199e-01f},
- {9.599161998924024e-01f, -2.802871548682339e-01f},
- {9.595715130819845e-01f, -2.814649379257579e-01f},
- {9.592253811742094e-01f, -2.826422971021723e-01f},
- {9.588778046903456e-01f, -2.838192306243950e-01f},
- {9.585287841538368e-01f, -2.849957367199857e-01f},
- {9.581783200903017e-01f, -2.861718136171474e-01f},
- {9.578264130275329e-01f, -2.873474595447295e-01f},
- {9.574730634954960e-01f, -2.885226727322305e-01f},
- {9.571182720263292e-01f, -2.896974514098006e-01f},
- {9.567620391543418e-01f, -2.908717938082443e-01f},
- {9.564043654160141e-01f, -2.920456981590233e-01f},
- {9.560452513499964e-01f, -2.932191626942586e-01f},
- {9.556846974971080e-01f, -2.943921856467341e-01f},
- {9.553227044003364e-01f, -2.955647652498983e-01f},
- {9.549592726048367e-01f, -2.967368997378675e-01f},
- {9.545944026579306e-01f, -2.979085873454284e-01f},
- {9.542280951091057e-01f, -2.990798263080405e-01f},
- {9.538603505100144e-01f, -3.002506148618392e-01f},
- {9.534911694144735e-01f, -3.014209512436381e-01f},
- {9.531205523784633e-01f, -3.025908336909318e-01f},
- {9.527484999601259e-01f, -3.037602604418984e-01f},
- {9.523750127197659e-01f, -3.049292297354024e-01f},
- {9.520000912198481e-01f, -3.060977398109971e-01f},
- {9.516237360249976e-01f, -3.072657889089275e-01f},
- {9.512459477019986e-01f, -3.084333752701328e-01f},
- {9.508667268197933e-01f, -3.096004971362489e-01f},
- {9.504860739494817e-01f, -3.107671527496115e-01f},
- {9.501039896643201e-01f, -3.119333403532583e-01f},
- {9.497204745397203e-01f, -3.130990581909318e-01f},
- {9.493355291532494e-01f, -3.142643045070820e-01f},
- {9.489491540846281e-01f, -3.154290775468691e-01f},
- {9.485613499157303e-01f, -3.165933755561658e-01f},
- {9.481721172305820e-01f, -3.177571967815606e-01f},
- {9.477814566153607e-01f, -3.189205394703594e-01f},
- {9.473893686583942e-01f, -3.200834018705895e-01f},
- {9.469958539501598e-01f, -3.212457822310009e-01f},
- {9.466009130832835e-01f, -3.224076788010699e-01f},
- {9.462045466525394e-01f, -3.235690898310011e-01f},
- {9.458067552548478e-01f, -3.247300135717307e-01f},
- {9.454075394892756e-01f, -3.258904482749284e-01f},
- {9.450068999570345e-01f, -3.270503921930005e-01f},
- {9.446048372614803e-01f, -3.282098435790925e-01f},
- {9.442013520081122e-01f, -3.293688006870915e-01f},
- {9.437964448045717e-01f, -3.305272617716291e-01f},
- {9.433901162606417e-01f, -3.316852250880838e-01f},
- {9.429823669882458e-01f, -3.328426888925837e-01f},
- {9.425731976014469e-01f, -3.339996514420094e-01f},
- {9.421626087164466e-01f, -3.351561109939961e-01f},
- {9.417506009515846e-01f, -3.363120658069366e-01f},
- {9.413371749273369e-01f, -3.374675141399838e-01f},
- {9.409223312663159e-01f, -3.386224542530535e-01f},
- {9.405060705932683e-01f, -3.397768844068269e-01f},
- {9.400883935350755e-01f, -3.409308028627527e-01f},
- {9.396693007207513e-01f, -3.420842078830508e-01f},
- {9.392487927814420e-01f, -3.432370977307140e-01f},
- {9.388268703504251e-01f, -3.443894706695110e-01f},
- {9.384035340631081e-01f, -3.455413249639891e-01f},
- {9.379787845570278e-01f, -3.466926588794764e-01f},
- {9.375526224718491e-01f, -3.478434706820849e-01f},
- {9.371250484493645e-01f, -3.489937586387129e-01f},
- {9.366960631334929e-01f, -3.501435210170474e-01f},
- {9.362656671702783e-01f, -3.512927560855671e-01f},
- {9.358338612078891e-01f, -3.524414621135448e-01f},
- {9.354006458966176e-01f, -3.535896373710499e-01f},
- {9.349660218888781e-01f, -3.547372801289512e-01f},
- {9.345299898392064e-01f, -3.558843886589194e-01f},
- {9.340925504042590e-01f, -3.570309612334300e-01f},
- {9.336537042428116e-01f, -3.581769961257653e-01f},
- {9.332134520157588e-01f, -3.593224916100174e-01f},
- {9.327717943861125e-01f, -3.604674459610909e-01f},
- {9.323287320190009e-01f, -3.616118574547051e-01f},
- {9.318842655816681e-01f, -3.627557243673972e-01f},
- {9.314383957434725e-01f, -3.638990449765241e-01f},
- {9.309911231758859e-01f, -3.650418175602657e-01f},
- {9.305424485524929e-01f, -3.661840403976272e-01f},
- {9.300923725489892e-01f, -3.673257117684415e-01f},
- {9.296408958431813e-01f, -3.684668299533723e-01f},
- {9.291880191149847e-01f, -3.696073932339162e-01f},
- {9.287337430464239e-01f, -3.707473998924054e-01f},
- {9.282780683216301e-01f, -3.718868482120106e-01f},
- {9.278209956268415e-01f, -3.730257364767432e-01f},
- {9.273625256504011e-01f, -3.741640629714579e-01f},
- {9.269026590827565e-01f, -3.753018259818559e-01f},
- {9.264413966164585e-01f, -3.764390237944864e-01f},
- {9.259787389461599e-01f, -3.775756546967501e-01f},
- {9.255146867686148e-01f, -3.787117169769015e-01f},
- {9.250492407826776e-01f, -3.798472089240512e-01f},
- {9.245824016893013e-01f, -3.809821288281689e-01f},
- {9.241141701915373e-01f, -3.821164749800858e-01f},
- {9.236445469945337e-01f, -3.832502456714969e-01f},
- {9.231735328055345e-01f, -3.843834391949643e-01f},
- {9.227011283338786e-01f, -3.855160538439188e-01f},
- {9.222273342909986e-01f, -3.866480879126634e-01f},
- {9.217521513904198e-01f, -3.877795396963752e-01f},
- {9.212755803477590e-01f, -3.889104074911081e-01f},
- {9.207976218807237e-01f, -3.900406895937958e-01f},
- {9.203182767091106e-01f, -3.911703843022539e-01f},
- {9.198375455548048e-01f, -3.922994899151824e-01f},
- {9.193554291417789e-01f, -3.934280047321689e-01f},
- {9.188719281960914e-01f, -3.945559270536903e-01f},
- {9.183870434458861e-01f, -3.956832551811160e-01f},
- {9.179007756213905e-01f, -3.968099874167103e-01f},
- {9.174131254549152e-01f, -3.979361220636348e-01f},
- {9.169240936808526e-01f, -3.990616574259509e-01f},
- {9.164336810356757e-01f, -4.001865918086229e-01f},
- {9.159418882579371e-01f, -4.013109235175197e-01f},
- {9.154487160882678e-01f, -4.024346508594184e-01f},
- {9.149541652693762e-01f, -4.035577721420057e-01f},
- {9.144582365460469e-01f, -4.046802856738814e-01f},
- {9.139609306651395e-01f, -4.058021897645602e-01f},
- {9.134622483755878e-01f, -4.069234827244749e-01f},
- {9.129621904283982e-01f, -4.080441628649787e-01f},
- {9.124607575766490e-01f, -4.091642284983474e-01f},
- {9.119579505754890e-01f, -4.102836779377824e-01f},
- {9.114537701821365e-01f, -4.114025094974132e-01f},
- {9.109482171558779e-01f, -4.125207214922996e-01f},
- {9.104412922580672e-01f, -4.136383122384345e-01f},
- {9.099329962521239e-01f, -4.147552800527466e-01f},
- {9.094233299035327e-01f, -4.158716232531024e-01f},
- {9.089122939798419e-01f, -4.169873401583093e-01f},
- {9.083998892506623e-01f, -4.181024290881177e-01f},
- {9.078861164876663e-01f, -4.192168883632239e-01f},
- {9.073709764645862e-01f, -4.203307163052724e-01f},
- {9.068544699572136e-01f, -4.214439112368585e-01f},
- {9.063365977433983e-01f, -4.225564714815306e-01f},
- {9.058173606030460e-01f, -4.236683953637931e-01f},
- {9.052967593181188e-01f, -4.247796812091088e-01f},
- {9.047747946726327e-01f, -4.258903273439013e-01f},
- {9.042514674526569e-01f, -4.270003320955576e-01f},
- {9.037267784463131e-01f, -4.281096937924305e-01f},
- {9.032007284437731e-01f, -4.292184107638414e-01f},
- {9.026733182372588e-01f, -4.303264813400826e-01f},
- {9.021445486210405e-01f, -4.314339038524199e-01f},
- {9.016144203914357e-01f, -4.325406766330948e-01f},
- {9.010829343468079e-01f, -4.336467980153277e-01f},
- {9.005500912875654e-01f, -4.347522663333197e-01f},
- {9.000158920161603e-01f, -4.358570799222555e-01f},
- {8.994803373370870e-01f, -4.369612371183058e-01f},
- {8.989434280568812e-01f, -4.380647362586298e-01f},
- {8.984051649841186e-01f, -4.391675756813778e-01f},
- {8.978655489294136e-01f, -4.402697537256935e-01f},
- {8.973245807054183e-01f, -4.413712687317167e-01f},
- {8.967822611268210e-01f, -4.424721190405857e-01f},
- {8.962385910103452e-01f, -4.435723029944398e-01f},
- {8.956935711747483e-01f, -4.446718189364220e-01f},
- {8.951472024408204e-01f, -4.457706652106809e-01f},
- {8.945994856313827e-01f, -4.468688401623742e-01f},
- {8.940504215712870e-01f, -4.479663421376699e-01f},
- {8.935000110874138e-01f, -4.490631694837502e-01f},
- {8.929482550086714e-01f, -4.501593205488127e-01f},
- {8.923951541659944e-01f, -4.512547936820739e-01f},
- {8.918407093923427e-01f, -4.523495872337709e-01f},
- {8.912849215227001e-01f, -4.534436995551644e-01f},
- {8.907277913940732e-01f, -4.545371289985410e-01f},
- {8.901693198454897e-01f, -4.556298739172159e-01f},
- {8.896095077179980e-01f, -4.567219326655349e-01f},
- {8.890483558546646e-01f, -4.578133035988772e-01f},
- {8.884858651005743e-01f, -4.589039850736579e-01f},
- {8.879220363028281e-01f, -4.599939754473306e-01f},
- {8.873568703105417e-01f, -4.610832730783892e-01f},
- {8.867903679748451e-01f, -4.621718763263714e-01f},
- {8.862225301488806e-01f, -4.632597835518601e-01f},
- {8.856533576878016e-01f, -4.643469931164871e-01f},
- {8.850828514487716e-01f, -4.654335033829341e-01f},
- {8.845110122909626e-01f, -4.665193127149364e-01f},
- {8.839378410755541e-01f, -4.676044194772847e-01f},
- {8.833633386657316e-01f, -4.686888220358279e-01f},
- {8.827875059266853e-01f, -4.697725187574754e-01f},
- {8.822103437256089e-01f, -4.708555080101994e-01f},
- {8.816318529316984e-01f, -4.719377881630376e-01f},
- {8.810520344161502e-01f, -4.730193575860958e-01f},
- {8.804708890521608e-01f, -4.741002146505500e-01f},
- {8.798884177149244e-01f, -4.751803577286489e-01f},
- {8.793046212816323e-01f, -4.762597851937166e-01f},
- {8.787195006314716e-01f, -4.773384954201548e-01f},
- {8.781330566456232e-01f, -4.784164867834454e-01f},
- {8.775452902072614e-01f, -4.794937576601530e-01f},
- {8.769562022015515e-01f, -4.805703064279270e-01f},
- {8.763657935156495e-01f, -4.816461314655044e-01f},
- {8.757740650387004e-01f, -4.827212311527123e-01f},
- {8.751810176618363e-01f, -4.837956038704698e-01f},
- {8.745866522781761e-01f, -4.848692480007911e-01f},
- {8.739909697828232e-01f, -4.859421619267875e-01f},
- {8.733939710728648e-01f, -4.870143440326701e-01f},
- {8.727956570473698e-01f, -4.880857927037520e-01f},
- {8.721960286073888e-01f, -4.891565063264507e-01f},
- {8.715950866559510e-01f, -4.902264832882912e-01f},
- {8.709928320980644e-01f, -4.912957219779071e-01f},
- {8.703892658407133e-01f, -4.923642207850446e-01f},
- {8.697843887928577e-01f, -4.934319781005636e-01f},
- {8.691782018654314e-01f, -4.944989923164409e-01f},
- {8.685707059713409e-01f, -4.955652618257725e-01f},
- {8.679619020254642e-01f, -4.966307850227757e-01f},
- {8.673517909446490e-01f, -4.976955603027919e-01f},
- {8.667403736477115e-01f, -4.987595860622885e-01f},
- {8.661276510554351e-01f, -4.998228606988624e-01f},
- {8.655136240905691e-01f, -5.008853826112407e-01f},
- {8.648982936778269e-01f, -5.019471501992850e-01f},
- {8.642816607438848e-01f, -5.030081618639924e-01f},
- {8.636637262173812e-01f, -5.040684160074983e-01f},
- {8.630444910289141e-01f, -5.051279110330795e-01f},
- {8.624239561110406e-01f, -5.061866453451552e-01f},
- {8.618021223982749e-01f, -5.072446173492910e-01f},
- {8.611789908270876e-01f, -5.083018254522002e-01f},
- {8.605545623359034e-01f, -5.093582680617462e-01f},
- {8.599288378651004e-01f, -5.104139435869457e-01f},
- {8.593018183570085e-01f, -5.114688504379703e-01f},
- {8.586735047559073e-01f, -5.125229870261497e-01f},
- {8.580438980080262e-01f, -5.135763517639729e-01f},
- {8.574129990615412e-01f, -5.146289430650919e-01f},
- {8.567808088665750e-01f, -5.156807593443229e-01f},
- {8.561473283751945e-01f, -5.167317990176499e-01f},
- {8.555125585414098e-01f, -5.177820605022260e-01f},
- {8.548765003211730e-01f, -5.188315422163763e-01f},
- {8.542391546723761e-01f, -5.198802425796005e-01f},
- {8.536005225548502e-01f, -5.209281600125748e-01f},
- {8.529606049303636e-01f, -5.219752929371544e-01f},
- {8.523194027626210e-01f, -5.230216397763758e-01f},
- {8.516769170172609e-01f, -5.240671989544601e-01f},
- {8.510331486618554e-01f, -5.251119688968137e-01f},
- {8.503880986659081e-01f, -5.261559480300321e-01f},
- {8.497417680008525e-01f, -5.271991347819013e-01f},
- {8.490941576400509e-01f, -5.282415275814013e-01f},
- {8.484452685587929e-01f, -5.292831248587072e-01f},
- {8.477951017342936e-01f, -5.303239250451923e-01f},
- {8.471436581456926e-01f, -5.313639265734305e-01f},
- {8.464909387740521e-01f, -5.324031278771979e-01f},
- {8.458369446023557e-01f, -5.334415273914767e-01f},
- {8.451816766155068e-01f, -5.344791235524554e-01f},
- {8.445251358003272e-01f, -5.355159147975332e-01f},
- {8.438673231455553e-01f, -5.365518995653215e-01f},
- {8.432082396418454e-01f, -5.375870762956454e-01f},
- {8.425478862817651e-01f, -5.386214434295480e-01f},
- {8.418862640597948e-01f, -5.396549994092906e-01f},
- {8.412233739723254e-01f, -5.406877426783570e-01f},
- {8.405592170176576e-01f, -5.417196716814542e-01f},
- {8.398937941959995e-01f, -5.427507848645159e-01f},
- {8.392271065094661e-01f, -5.437810806747042e-01f},
- {8.385591549620770e-01f, -5.448105575604123e-01f},
- {8.378899405597550e-01f, -5.458392139712668e-01f},
- {8.372194643103249e-01f, -5.468670483581293e-01f},
- {8.365477272235120e-01f, -5.478940591731002e-01f},
- {8.358747303109401e-01f, -5.489202448695194e-01f},
- {8.352004745861303e-01f, -5.499456039019702e-01f},
- {8.345249610644997e-01f, -5.509701347262801e-01f},
- {8.338481907633595e-01f, -5.519938357995242e-01f},
- {8.331701647019132e-01f, -5.530167055800275e-01f},
- {8.324908839012561e-01f, -5.540387425273663e-01f},
- {8.318103493843727e-01f, -5.550599451023716e-01f},
- {8.311285621761358e-01f, -5.560803117671306e-01f},
- {8.304455233033046e-01f, -5.570998409849897e-01f},
- {8.297612337945230e-01f, -5.581185312205561e-01f},
- {8.290756946803191e-01f, -5.591363809397010e-01f},
- {8.283889069931020e-01f, -5.601533886095610e-01f},
- {8.277008717671618e-01f, -5.611695526985409e-01f},
- {8.270115900386670e-01f, -5.621848716763159e-01f},
- {8.263210628456635e-01f, -5.631993440138341e-01f},
- {8.256292912280727e-01f, -5.642129681833185e-01f},
- {8.249362762276903e-01f, -5.652257426582692e-01f},
- {8.242420188881840e-01f, -5.662376659134664e-01f},
- {8.235465202550933e-01f, -5.672487364249718e-01f},
- {8.228497813758264e-01f, -5.682589526701315e-01f},
- {8.221518032996592e-01f, -5.692683131275782e-01f},
- {8.214525870777344e-01f, -5.702768162772331e-01f},
- {8.207521337630588e-01f, -5.712844606003090e-01f},
- {8.200504444105025e-01f, -5.722912445793115e-01f},
- {8.193475200767969e-01f, -5.732971666980422e-01f},
- {8.186433618205335e-01f, -5.743022254416005e-01f},
- {8.179379707021619e-01f, -5.753064192963863e-01f},
- {8.172313477839882e-01f, -5.763097467501014e-01f},
- {8.165234941301740e-01f, -5.773122062917532e-01f},
- {8.158144108067338e-01f, -5.783137964116556e-01f},
- {8.151040988815345e-01f, -5.793145156014319e-01f},
- {8.143925594242929e-01f, -5.803143623540171e-01f},
- {8.136797935065747e-01f, -5.813133351636602e-01f},
- {8.129658022017924e-01f, -5.823114325259262e-01f},
- {8.122505865852039e-01f, -5.833086529376983e-01f},
- {8.115341477339112e-01f, -5.843049948971807e-01f},
- {8.108164867268581e-01f, -5.853004569039005e-01f},
- {8.100976046448293e-01f, -5.862950374587097e-01f},
- {8.093775025704479e-01f, -5.872887350637883e-01f},
- {8.086561815881750e-01f, -5.882815482226452e-01f},
- {8.079336427843067e-01f, -5.892734754401222e-01f},
- {8.072098872469734e-01f, -5.902645152223945e-01f},
- {8.064849160661379e-01f, -5.912546660769743e-01f},
- {8.057587303335938e-01f, -5.922439265127122e-01f},
- {8.050313311429637e-01f, -5.932322950397998e-01f},
- {8.043027195896973e-01f, -5.942197701697721e-01f},
- {8.035728967710708e-01f, -5.952063504155093e-01f},
- {8.028418637861839e-01f, -5.961920342912395e-01f},
- {8.021096217359593e-01f, -5.971768203125404e-01f},
- {8.013761717231402e-01f, -5.981607069963423e-01f},
- {8.006415148522891e-01f, -5.991436928609294e-01f},
- {7.999056522297859e-01f, -6.001257764259429e-01f},
- {7.991685849638264e-01f, -6.011069562123827e-01f},
- {7.984303141644207e-01f, -6.020872307426096e-01f},
- {7.976908409433912e-01f, -6.030665985403482e-01f},
- {7.969501664143711e-01f, -6.040450581306880e-01f},
- {7.962082916928030e-01f, -6.050226080400867e-01f},
- {7.954652178959369e-01f, -6.059992467963715e-01f},
- {7.947209461428283e-01f, -6.069749729287426e-01f},
- {7.939754775543372e-01f, -6.079497849677736e-01f},
- {7.932288132531257e-01f, -6.089236814454155e-01f},
- {7.924809543636567e-01f, -6.098966608949977e-01f},
- {7.917319020121923e-01f, -6.108687218512306e-01f},
- {7.909816573267918e-01f, -6.118398628502083e-01f},
- {7.902302214373100e-01f, -6.128100824294097e-01f},
- {7.894775954753960e-01f, -6.137793791277018e-01f},
- {7.887237805744907e-01f, -6.147477514853411e-01f},
- {7.879687778698258e-01f, -6.157151980439765e-01f},
- {7.872125884984216e-01f, -6.166817173466510e-01f},
- {7.864552135990858e-01f, -6.176473079378039e-01f},
- {7.856966543124112e-01f, -6.186119683632733e-01f},
- {7.849369117807745e-01f, -6.195756971702979e-01f},
- {7.841759871483340e-01f, -6.205384929075197e-01f},
- {7.834138815610288e-01f, -6.215003541249855e-01f},
- {7.826505961665757e-01f, -6.224612793741500e-01f},
- {7.818861321144691e-01f, -6.234212672078768e-01f},
- {7.811204905559779e-01f, -6.243803161804418e-01f},
- {7.803536726441443e-01f, -6.253384248475345e-01f},
- {7.795856795337824e-01f, -6.262955917662607e-01f},
- {7.788165123814760e-01f, -6.272518154951441e-01f},
- {7.780461723455767e-01f, -6.282070945941292e-01f},
- {7.772746605862029e-01f, -6.291614276245828e-01f},
- {7.765019782652373e-01f, -6.301148131492967e-01f},
- {7.757281265463254e-01f, -6.310672497324895e-01f},
- {7.749531065948739e-01f, -6.320187359398091e-01f},
- {7.741769195780490e-01f, -6.329692703383341e-01f},
- {7.733995666647743e-01f, -6.339188514965771e-01f},
- {7.726210490257291e-01f, -6.348674779844861e-01f},
- {7.718413678333470e-01f, -6.358151483734467e-01f},
- {7.710605242618138e-01f, -6.367618612362842e-01f},
- {7.702785194870657e-01f, -6.377076151472665e-01f},
- {7.694953546867879e-01f, -6.386524086821050e-01f},
- {7.687110310404124e-01f, -6.395962404179578e-01f},
- {7.679255497291163e-01f, -6.405391089334316e-01f},
- {7.671389119358204e-01f, -6.414810128085832e-01f},
- {7.663511188451869e-01f, -6.424219506249224e-01f},
- {7.655621716436182e-01f, -6.433619209654138e-01f},
- {7.647720715192542e-01f, -6.443009224144792e-01f},
- {7.639808196619715e-01f, -6.452389535579994e-01f},
- {7.631884172633813e-01f, -6.461760129833163e-01f},
- {7.623948655168271e-01f, -6.471120992792355e-01f},
- {7.616001656173835e-01f, -6.480472110360278e-01f},
- {7.608043187618542e-01f, -6.489813468454321e-01f},
- {7.600073261487703e-01f, -6.499145053006563e-01f},
- {7.592091889783881e-01f, -6.508466849963809e-01f},
- {7.584099084526877e-01f, -6.517778845287601e-01f},
- {7.576094857753715e-01f, -6.527081024954242e-01f},
- {7.568079221518612e-01f, -6.536373374954818e-01f},
- {7.560052187892974e-01f, -6.545655881295217e-01f},
- {7.552013768965365e-01f, -6.554928529996153e-01f},
- {7.543963976841503e-01f, -6.564191307093185e-01f},
- {7.535902823644226e-01f, -6.573444198636738e-01f},
- {7.527830321513488e-01f, -6.582687190692122e-01f},
- {7.519746482606328e-01f, -6.591920269339562e-01f},
- {7.511651319096865e-01f, -6.601143420674205e-01f},
- {7.503544843176265e-01f, -6.610356630806152e-01f},
- {7.495427067052737e-01f, -6.619559885860479e-01f},
- {7.487298002951505e-01f, -6.628753171977246e-01f},
- {7.479157663114792e-01f, -6.637936475311532e-01f},
- {7.471006059801801e-01f, -6.647109782033448e-01f},
- {7.462843205288703e-01f, -6.656273078328160e-01f},
- {7.454669111868606e-01f, -6.665426350395909e-01f},
- {7.446483791851549e-01f, -6.674569584452033e-01f},
- {7.438287257564475e-01f, -6.683702766726985e-01f},
- {7.430079521351217e-01f, -6.692825883466360e-01f},
- {7.421860595572477e-01f, -6.701938920930909e-01f},
- {7.413630492605809e-01f, -6.711041865396560e-01f},
- {7.405389224845600e-01f, -6.720134703154446e-01f},
- {7.397136804703048e-01f, -6.729217420510915e-01f},
- {7.388873244606151e-01f, -6.738290003787560e-01f},
- {7.380598556999681e-01f, -6.747352439321236e-01f},
- {7.372312754345167e-01f, -6.756404713464076e-01f},
- {7.364015849120877e-01f, -6.765446812583521e-01f},
- {7.355707853821803e-01f, -6.774478723062332e-01f},
- {7.347388780959635e-01f, -6.783500431298615e-01f},
- {7.339058643062745e-01f, -6.792511923705841e-01f},
- {7.330717452676171e-01f, -6.801513186712865e-01f},
- {7.322365222361595e-01f, -6.810504206763948e-01f},
- {7.314001964697324e-01f, -6.819484970318775e-01f},
- {7.305627692278276e-01f, -6.828455463852481e-01f},
- {7.297242417715950e-01f, -6.837415673855661e-01f},
- {7.288846153638420e-01f, -6.846365586834405e-01f},
- {7.280438912690308e-01f, -6.855305189310302e-01f},
- {7.272020707532766e-01f, -6.864234467820476e-01f},
- {7.263591550843460e-01f, -6.873153408917591e-01f},
- {7.255151455316546e-01f, -6.882061999169885e-01f},
- {7.246700433662657e-01f, -6.890960225161182e-01f},
- {7.238238498608879e-01f, -6.899848073490914e-01f},
- {7.229765662898732e-01f, -6.908725530774144e-01f},
- {7.221281939292153e-01f, -6.917592583641577e-01f},
- {7.212787340565479e-01f, -6.926449218739597e-01f},
- {7.204281879511419e-01f, -6.935295422730269e-01f},
- {7.195765568939045e-01f, -6.944131182291369e-01f},
- {7.187238421673769e-01f, -6.952956484116404e-01f},
- {7.178700450557317e-01f, -6.961771314914630e-01f},
- {7.170151668447722e-01f, -6.970575661411068e-01f},
- {7.161592088219294e-01f, -6.979369510346534e-01f},
- {7.153021722762606e-01f, -6.988152848477649e-01f},
- {7.144440584984474e-01f, -6.996925662576865e-01f},
- {7.135848687807936e-01f, -7.005687939432483e-01f},
- {7.127246044172235e-01f, -7.014439665848672e-01f},
- {7.118632667032795e-01f, -7.023180828645491e-01f},
- {7.110008569361208e-01f, -7.031911414658905e-01f},
- {7.101373764145209e-01f, -7.040631410740809e-01f},
- {7.092728264388657e-01f, -7.049340803759049e-01f},
- {7.084072083111520e-01f, -7.058039580597435e-01f},
- {7.075405233349850e-01f, -7.066727728155766e-01f}
-};
-
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 codec
- *
- * g722_1.h - The head guy amongst the headers
- *
- * 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.
- *
- * $Id: g722_1.h.in,v 1.1.1.1 2008/09/20 09:47:17 steveu Exp $
- */
-
-/*! \file */
-
-#if !defined(_G722_1_H_)
-#define _G722_1_H_
-
-#undef G722_1_USE_FIXED_POINT
-
-#include <stdlib.h>
-#include <inttypes.h>
-#include <string.h>
-#include <limits.h>
-#include <time.h>
-#include <math.h>
-
-#include <g722_1/g722_1.h>
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * huff_tab.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-#include "defs.h"
-#include "huff_tab.h"
-
-const int16_t differential_region_power_bits[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS] =
-{
- {99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99},
- { 4, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, 7, 8, 9, 11, 11, 12, 12, 12, 12},
- {10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 7, 9, 11, 12, 13, 15, 15, 15, 16, 16},
- {12, 10, 8, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 5, 5, 7, 9, 11, 13, 14, 14},
- {13, 10, 9, 9, 7, 7, 5, 5, 4, 3, 3, 3, 3, 3, 4, 4, 4, 5, 7, 9, 11, 13, 13, 13},
- {12, 13, 10, 8, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 5, 5, 6, 7, 9, 11, 14, 14},
- {12, 11, 9, 8, 8, 7, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5, 7, 8, 10, 13, 14, 14},
- {15, 16, 15, 12, 10, 8, 6, 5, 4, 3, 3, 3, 2, 3, 4, 5, 5, 7, 9, 11, 13, 16, 16, 16},
- {14, 14, 11, 10, 9, 7, 7, 5, 5, 4, 3, 3, 2, 3, 3, 4, 5, 7, 9, 9, 12, 14, 15, 15},
- { 9, 9, 9, 8, 7, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 13},
- {14, 12, 10, 8, 6, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 8, 8, 9, 11, 14, 14, 14},
- {13, 10, 9, 8, 6, 6, 5, 4, 4, 4, 3, 3, 2, 3, 4, 5, 6, 8, 9, 9, 11, 12, 14, 14},
- {16, 13, 12, 11, 9, 6, 5, 5, 4, 4, 4, 3, 2, 3, 3, 4, 5, 7, 8, 10, 14, 16, 16, 16},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14},
- {13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14}
-};
-
-const uint16_t differential_region_power_codes[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS] =
-{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 8, 38, 18, 10, 7, 6, 3, 2, 0, 1, 7, 6, 5, 4, 11, 78, 158, 318, 1278, 1279, 2552, 2553, 2554, 2555},
- { 36, 8, 3, 5, 0, 1, 7, 6, 4, 3, 2, 5, 3, 4, 5, 19, 74, 150, 302, 1213, 1214, 1215, 2424, 2425},
- { 2582, 644, 160, 41, 5, 11, 7, 5, 4, 1, 0, 6, 4, 7, 3, 6, 4, 21, 81, 323, 1290, 5167, 10332, 10333},
- { 2940, 366, 181, 180, 47, 46, 27, 10, 8, 5, 1, 0, 3, 7, 4, 9, 12, 26, 44, 182, 734, 2941, 2942, 2943},
- { 3982, 7967, 994, 249, 63, 26, 19, 18, 14, 8, 6, 1, 0, 2, 5, 7, 12, 30, 27, 125, 496, 1990, 15932, 15933},
- { 3254, 1626, 407, 206, 202, 100, 30, 14, 3, 5, 3, 0, 2, 4, 2, 13, 24, 31, 102, 207, 812, 6511, 13020, 13021},
- { 1110, 2216, 1111, 139, 35, 9, 3, 20, 11, 4, 2, 1, 3, 3, 1, 0, 21, 5, 16, 68, 276, 2217, 2218, 2219},
- { 1013, 1014, 127, 62, 29, 6, 4, 16, 0, 1, 3, 2, 3, 1, 5, 9, 17, 5, 28, 30, 252, 1015, 2024, 2025},
- { 381, 380, 372, 191, 94, 44, 16, 10, 7, 3, 1, 0, 2, 6, 9, 17, 45, 92, 187, 746, 1494, 2991, 5980, 5981},
- { 3036, 758, 188, 45, 43, 10, 4, 3, 6, 4, 2, 0, 3, 7, 11, 20, 42, 44, 46, 95, 378, 3037, 3038, 3039},
- { 751, 92, 45, 20, 26, 4, 12, 7, 4, 0, 4, 1, 3, 5, 5, 3, 27, 21, 44, 47, 186, 374, 1500, 1501},
- {45572U, 5697, 2849, 1425, 357, 45, 23, 6, 10, 7, 2, 2, 3, 0, 4, 6, 7, 88, 179, 713, 11392, 45573U, 45574U, 45575U},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021},
- { 2511, 5016, 5018, 5017, 312, 79, 38, 36, 30, 14, 6, 0, 2, 1, 3, 5, 8, 31, 37, 157, 626, 5019, 5020, 5021}
-};
-
-const int16_t differential_region_power_decoder_tree[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS - 1][2] =
-{
- {{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, { 7, 8}, { 9, 10}, { 11,-12}, {-11,-10}, { -8, -9}, { -7, -6}, {-13, 12}, { -5, -4}, { 0, 13}, { -3,-14}, { -2, 14}, { -1, 15}, {-15, 16}, {-16, 17}, {-17, 18}, { 19, 20}, { 21, 22}, {-18,-19}, {-20,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, { 7, 8}, {-10, -9}, { -8,-11}, { -7, -6}, { 9, -5}, { 10,-12}, { -4, 11}, {-13, -3}, { 12, -2}, { 13,-14}, { -1, 14}, { 15,-15}, { 0, 16}, {-16, 17}, {-17, 18}, {-18, 19}, { 20, 21}, { 22,-19}, {-20,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, { 7, 8}, { 9, 10}, {-12, 11}, {-11,-13}, {-10, -9}, { 12,-14}, { -8, -7}, {-15, -6}, { 13, -5}, {-16, -4}, { 14,-17}, { 15, -3}, { 16,-18}, { -2, 17}, { 18,-19}, { -1, 19}, {-20, 20}, { 0, 21}, { 22,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, {-11,-10}, { 7,-12}, { 8, -9}, { 9,-13}, {-14, 10}, { -8,-15}, {-16, 11}, { -7, 12}, {-17, -6}, { 13, 14}, {-18, 15}, { -5, -4}, { 16, 17}, { -3, -2}, {-19, 18}, { -1, 19}, {-20, 20}, { 21, 22}, { 0,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, {-12,-11}, {-13, 7}, { 8,-14}, {-10, 9}, { 10,-15}, { -9, 11}, { -8, 12}, {-16, 13}, { -7, -6}, {-17, 14}, { -5,-18}, { 15, -4}, { 16,-19}, { 17, -3}, {-20, 18}, { -2, 19}, {-21, 20}, { 0, 21}, { 22, -1}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, {-11, 7}, {-12,-10}, {-13, -9}, { 8, 9}, {-14, -8}, { 10,-15}, { -7, 11}, {-16, 12}, { -6,-17}, { 13, 14}, { -5, 15}, {-18, 16}, { -4, 17}, { -3,-19}, { 18, -2}, {-20, 19}, { -1, 20}, { 0, 21}, { 22,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5,-12}, { 6,-11}, {-10,-13}, { -9, 7}, { 8,-14}, { 9, -8}, {-15, 10}, { -7,-16}, { 11, -6}, { 12,-17}, { 13, -5}, {-18, 14}, { 15, -4}, {-19, 16}, { 17, -3}, {-20, 18}, { 19, 20}, { 21, 22}, { 0, -2}, { -1,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5,-12}, { 6,-13}, {-11,-10}, { 7,-14}, { 8, -9}, { 9,-15}, { -8, 10}, { -7,-16}, { 11, 12}, { -6,-17}, { -5, 13}, { 14, 15}, {-18, -4}, {-19, 16}, { -3, 17}, { 18, -2}, {-20, 19}, { 20, 21}, { 22, 0}, { -1,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, {-11,-10}, {-12, -9}, { 7, 8}, {-13, -8}, { 9,-14}, { -7, 10}, { -6,-15}, { 11, 12}, { -5,-16}, { 13, 14}, {-17, 15}, { -4, 16}, { 17,-18}, { 18, -3}, { -2, 19}, { -1, 0}, {-19, 20}, {-20, 21}, { 22,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5, 6}, {-11, 7}, {-10,-12}, { -9, 8}, { -8,-13}, { 9, -7}, { 10,-14}, { -6, 11}, {-15, 12}, { -5, 13}, {-16, -4}, { 14, 15}, {-17, -3}, {-18, 16}, { 17,-19}, { -2, 18}, {-20, 19}, { -1, 20}, { 21, 22}, { 0,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5,-12}, { 6,-11}, { 7, 8}, {-10,-13}, { -9, 9}, { -8,-14}, { 10, -7}, { 11,-15}, { -6, 12}, { -5, 13}, { -4,-16}, { 14, 15}, { -3,-17}, { 16, 17}, {-18, -2}, { 18,-19}, { -1, 19}, {-20, 20}, {-21, 21}, { 22, 0}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, { 5,-12}, {-13, 6}, {-11, 7}, {-14, 8}, {-10, 9}, {-15, -9}, { -8, 10}, { -7,-16}, { 11, -6}, { 12, -5}, {-17, 13}, { 14,-18}, { 15, -4}, { 16,-19}, { 17, -3}, { 18, -2}, { 19, -1}, {-20, 20}, { 21, 22}, { 0,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}},
- {{ 1, 2}, { 3, 4}, {-12, 5}, {-11,-13}, { 6,-14}, {-10, 7}, { 8,-15}, { -9, 9}, {-16, 10}, { -8,-17}, { 11, 12}, { -7,-18}, { -6, 13}, { 14, -5}, { 15,-19}, { -4, 16}, {-20, 17}, { 18, 19}, { 20, 21}, { 22, 0}, { -1, -3}, { -2,-21}, {-22,-23}}
-};
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t mlt_quant_centroid[NUM_CATEGORIES][MAX_NUM_BINS] =
-{
- { 0, 1606, 3119, 4586, 6049, 7502, 8941, 10406, 11851, 13292, 14736, 16146, 17566, 19351, 0, 0},
- { 0, 2229, 4341, 6401, 8471, 10531, 12583, 14588, 16673, 18924, 0, 0, 0, 0, 0, 0},
- { 0, 3055, 5998, 8929, 11806, 14680, 17680, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 4121, 8192, 12259, 16322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 5413, 11071, 16315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 6785, 14300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 8044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 8019, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
-};
-#else
-const float mlt_quant_centroid[NUM_CATEGORIES - 1][MAX_NUM_BINS] =
-{
- { 0.0f, 0.392f, 0.761f, 1.120f, 1.477f, 1.832f, 2.183f, 2.541f, 2.893f, 3.245f, 3.598f, 3.942f, 4.288f, 4.724f, 0.0f, 0.0f},
- { 0.0f, 0.544f, 1.060f, 1.563f, 2.068f, 2.571f, 3.072f, 3.562f, 4.070f, 4.620f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
- { 0.0f, 0.746f, 1.464f, 2.180f, 2.882f, 3.584f, 4.316f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
- { 0.0f, 1.006f, 2.000f, 2.993f, 3.985f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
- { 0.0f, 1.321f, 2.703f, 3.983f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
- { 0.0f, 1.657f, 3.491f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
- { 0.0f, 1.964f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
-};
-#endif
-
-const int16_t expected_bits_table[NUM_CATEGORIES] =
-{
- 52, 47, 43, 37, 29, 22, 16, 0
-};
-
-const int16_t mlt_sqvh_bitcount_category_0[196] =
-{
- 1, 4, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 11, 11, 4, 5,
- 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 11, 11, 5, 6, 7, 8,
- 8, 9, 9, 9, 9, 10, 10, 10, 11, 12, 6, 7, 8, 9, 9, 9,
- 9, 10, 10, 10, 10, 11, 12, 13, 7, 7, 8, 9, 9, 9, 10, 10,
- 10, 10, 11, 11, 12, 13, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11,
- 11, 12, 13, 14, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13,
- 13, 15, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13, 14, 15,
- 9, 9, 9, 10, 10, 10, 11, 11, 12, 13, 12, 14, 15, 16, 9, 9,
- 10, 10, 10, 10, 11, 12, 12, 14, 14, 16, 16, 16, 9, 9, 10, 10,
- 11, 11, 12, 13, 13, 14, 14, 15, 15, 16, 10, 10, 10, 11, 11, 12,
- 12, 13, 15, 15, 16, 14, 15, 15, 11, 11, 11, 12, 13, 13, 13, 15,
- 16, 16, 16, 16, 14, 15, 11, 11, 12, 13, 13, 14, 15, 16, 16, 16,
- 16, 16, 16, 14
-};
-
-const uint16_t mlt_sqvh_code_category_0[196] =
-{
- 1, 2, 1, 24, 14, 51, 9, 68, 110, 26, 218, 54, 154, 761, 3, 10,
- 22, 8, 58, 22, 71, 16, 30, 50, 213, 75, 94, 632, 15, 18, 52, 23,
- 107, 5, 54, 63, 239, 46, 276, 271, 851, 252, 28, 10, 12, 1, 22, 133,
- 191, 55, 105, 278, 317, 554, 310, 276, 32, 50, 94, 20, 187, 219, 13, 268,
- 473, 445, 145, 849, 1277, 623, 1, 14, 0, 55, 238, 121, 120, 269, 318, 530,
- 639, 1117, 509, 556, 24, 78, 51, 153, 62, 308, 16, 25, 68, 1058, 428, 277,
- 2233, 1114, 92, 108, 141, 223, 270, 381, 24, 212, 760, 35, 1063, 279, 1717, 3439,
- 7, 21, 152, 73, 309, 310, 95, 944, 1890, 2232, 1891, 5107, 10213, 4981, 61, 62,
- 9, 79, 474, 475, 848, 1059, 1056, 1716, 139, 4978, 4983, 4983, 140, 186, 76, 444,
- 144, 633, 1057, 838, 2237, 4472, 4473, 10212, 10212, 4983, 74, 78, 311, 213, 850, 1062,
- 1119, 508, 276, 277, 4982, 4473, 10212, 10212, 208, 70, 555, 418, 68, 510, 2552, 1115,
- 4980, 4979, 4982, 4982, 4473, 10212, 215, 71, 253, 511, 839, 1718, 2488, 6876, 6877, 4979,
- 4979, 4982, 4982, 4473
-};
-
-const int16_t mlt_sqvh_bitcount_category_1[100] =
-{
- 1, 4, 5, 6, 7, 8, 8, 9, 10, 10, 4, 5, 6, 7, 7, 8,
- 8, 9, 9, 11, 5, 5, 6, 7, 8, 8, 9, 9, 10, 11, 6, 6,
- 7, 8, 8, 9, 9, 10, 11, 12, 7, 7, 8, 8, 9, 9, 10, 11,
- 11, 13, 8, 8, 8, 9, 9, 10, 10, 11, 12, 14, 8, 8, 8, 9,
- 10, 11, 11, 12, 13, 15, 9, 9, 9, 10, 11, 12, 12, 14, 14, 14,
- 9, 9, 9, 10, 11, 12, 14, 16, 14, 14, 10, 10, 11, 12, 13, 14,
- 16, 16, 16, 14
-};
-
-const uint16_t mlt_sqvh_code_category_1[100] =
-{
- 1, 2, 11, 27, 31, 9, 120, 31, 275, 310, 1, 0, 12, 5, 33, 54,
- 102, 111, 246, 448, 10, 14, 31, 39, 59, 100, 114, 202, 485, 969, 24, 26,
- 36, 52, 103, 30, 120, 242, 69, 1244, 35, 32, 14, 61, 113, 117, 233, 486,
- 487, 2491, 13, 12, 69, 110, 149, 35, 495, 449, 1978, 7751, 76, 75, 122, 136,
- 213, 68, 623, 930, 3959, 9961, 115, 16, 107, 225, 424, 850, 1936, 7916, 4981, 4981,
- 148, 154, 243, 407, 988, 851, 7750,19920, 7916, 4981, 406, 274, 464, 931, 3874, 7917,
- 19921,19920,19920, 7916
-};
-
-const int16_t mlt_sqvh_bitcount_category_2[49] =
-{
- 1, 4, 5, 7, 8, 9, 10, 3, 4, 5, 7, 8, 9, 10, 5, 5,
- 6, 7, 8, 10, 10, 7, 6, 7, 8, 9, 10, 12, 8, 8, 8, 9,
- 10, 12, 14, 8, 9, 9, 10, 11, 15, 16, 9, 10, 11, 12, 13, 16,
- 15
-};
-
-const uint16_t mlt_sqvh_code_category_2[49] =
-{
- 1, 0, 10, 11, 28, 62, 363, 3, 2, 9, 8, 24, 53, 352, 7, 8,
- 13, 25, 89, 74, 355, 10, 23, 24, 29, 55, 354, 1449, 25, 19, 30, 52,
- 108, 438, 5793, 91, 36, 63, 353, 725, 11584, 23170, 180, 75, 218, 439, 2897, 23171,
- 11584
-};
-
-const int16_t mlt_sqvh_bitcount_category_3[625] =
-{
- 2, 4, 6, 8, 10, 5, 5, 6, 8, 10, 7, 8, 8, 10, 12, 9,
- 9, 10, 12, 15, 10, 11, 13, 16, 16, 5, 6, 8, 10, 11, 5, 6,
- 8, 10, 12, 7, 7, 8, 10, 13, 9, 9, 10, 12, 15, 12, 11, 13,
- 16, 16, 7, 9, 10, 12, 15, 7, 8, 10, 12, 13, 9, 9, 11, 13,
- 16, 11, 11, 12, 14, 16, 12, 12, 14, 16, 14, 9, 11, 12, 16, 16,
- 9, 10, 13, 15, 16, 10, 11, 12, 16, 16, 13, 13, 16, 16, 16, 16,
- 16, 15, 16, 16, 11, 13, 16, 16, 15, 11, 13, 15, 16, 16, 13, 13,
- 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 4, 6, 8,
- 10, 13, 6, 6, 8, 10, 13, 9, 8, 10, 12, 16, 10, 10, 11, 15,
- 16, 13, 12, 14, 16, 16, 5, 6, 8, 11, 13, 6, 6, 8, 10, 13,
- 8, 8, 9, 11, 14, 10, 10, 12, 12, 16, 13, 12, 13, 15, 16, 7,
- 8, 9, 12, 16, 7, 8, 10, 12, 14, 9, 9, 10, 13, 16, 11, 10,
- 12, 15, 16, 13, 13, 16, 16, 15, 9, 11, 13, 16, 16, 9, 10, 12,
- 15, 16, 10, 11, 13, 16, 16, 13, 12, 16, 16, 16, 16, 16, 16, 16,
- 16, 11, 13, 16, 16, 16, 11, 13, 16, 16, 16, 12, 13, 15, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 6, 8, 11, 13, 16, 8,
- 8, 10, 12, 16, 11, 10, 11, 13, 16, 12, 13, 13, 15, 16, 16, 16,
- 14, 16, 15, 6, 8, 10, 13, 16, 8, 8, 10, 12, 16, 10, 10, 11,
- 13, 16, 13, 12, 13, 16, 16, 14, 14, 14, 16, 16, 8, 9, 11, 13,
- 16, 8, 9, 11, 16, 14, 10, 10, 12, 15, 16, 12, 12, 13, 16, 16,
- 15, 16, 16, 16, 16, 10, 12, 15, 16, 16, 10, 12, 12, 14, 16, 12,
- 12, 13, 16, 16, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 12, 15,
- 15, 16, 16, 13, 13, 16, 16, 14, 14, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 14, 15, 16, 16, 16, 8, 10, 13, 15, 16, 10, 11, 13, 16,
- 16, 13, 13, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 8, 10, 11, 15, 16, 9, 10, 12, 16, 16, 12, 12, 15, 16, 16, 16,
- 14, 16, 16, 16, 16, 16, 16, 16, 16, 9, 11, 14, 16, 16, 10, 11,
- 13, 16, 16, 14, 13, 14, 16, 16, 16, 15, 15, 16, 16, 16, 16, 16,
- 16, 16, 11, 13, 16, 16, 16, 11, 13, 15, 16, 16, 13, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16,
- 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 9, 13, 16, 16, 16, 11, 13, 16, 16, 16, 14, 15,
- 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 9, 13, 15,
- 15, 16, 12, 13, 14, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 11, 13, 15, 16, 16, 12, 14, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15,
- 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16
-};
-
-const uint16_t mlt_sqvh_code_category_3[625] =
-{
- 3, 8, 46, 145, 228, 4, 8, 47, 28, 455, 89, 2, 180, 5, 1335, 250,
- 12, 644, 1311, 139, 729, 251, 870, 2172, 2211, 5, 23, 112, 334, 1469, 21, 3,
- 5, 111, 2014, 88, 79, 152, 124, 2685, 297, 48, 110, 1310, 149, 501, 1231, 153,
- 2267, 2569, 57, 13, 653, 2587, 143, 75, 124, 118, 2611, 5242, 61, 50, 253, 3633,
- 2216, 476, 39, 57, 1926, 2236, 2586, 1329, 1920, 2566, 1926, 296, 233, 2590, 2240, 2217,
- 253, 613, 867, 144, 318, 614, 252, 2589, 2242, 2218, 872, 866, 2187, 2296, 2155, 2568,
- 2227, 150, 2567, 2296, 199, 2686, 2160, 2290,19145, 232, 2680, 128, 2192, 2212, 2684, 793,
- 2281, 2223, 2242, 1934, 2165, 2146, 2291, 2296, 2222, 2189, 2187, 2296, 2296, 6, 4, 82,
- 725, 3632, 15, 21, 56, 599, 148, 3, 162, 42, 411, 2301, 735, 654, 930, 137,
- 2586, 869, 1334, 1931, 2300, 2213, 9, 22, 146, 1290, 5240, 5, 12, 53, 630, 875,
- 80, 9, 8, 86, 2002, 210, 117, 56, 2019, 2162, 146, 397, 868, 131, 2151, 77,
- 160, 365, 2610, 2252, 59, 54, 41, 2591, 1928, 226, 14, 121, 5792, 2295, 1197, 728,
- 408, 130, 2157, 3635, 155, 2573, 2587, 130, 314, 64, 144, 2173, 2176, 115, 30, 409,
- 153, 2590, 631, 26, 4787, 2221, 2174, 2683, 1863, 2572, 319, 2150, 2177, 2194, 2571, 2257,
- 319, 65, 145, 2251, 2156, 2161, 909, 864, 2193, 2197, 2246, 2588, 5797, 156, 2258, 2221,
- 2158, 2199, 2214, 2152, 319, 2188, 2264, 2572, 319, 319, 30, 117, 219, 865, 2263, 147,
- 127, 239, 410, 2247, 27, 324, 1468, 2681, 2180, 1328, 5241, 147, 142, 2237, 2241, 2245,
- 1921, 2262, 142, 41, 11, 505, 2682, 2591, 0, 26, 229, 2015, 2577, 464, 98, 87,
- 5243, 2166, 149, 2016, 5244, 2190, 2198, 9573,11598,11599, 2235, 2190, 144, 298, 1004, 5245,
- 2277, 156, 104, 254, 2560, 1922, 612, 325, 2017, 129, 2588, 2608, 1330, 871, 2144, 2145,
- 132, 2147, 2148, 2149, 2144, 119, 1331, 133, 2153, 2154, 211, 58, 2609, 1923, 2159, 510,
- 163, 5246, 2163, 2164, 1924, 134, 2167, 2168, 2168, 2169, 2170, 2171, 2168, 2168, 1332, 135,
- 136, 2175, 2153, 150, 873, 2178, 2179, 1923, 1925, 2181, 2182, 2183, 2163, 2184, 2185, 2186,
- 2168, 2168, 1924, 134, 2167, 2168, 2168, 58, 326, 2687, 138, 2191, 31, 66, 874, 2195,
- 2196, 151, 152, 1927, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2205,
- 55, 103, 1230, 140, 2215, 118, 15, 1333, 2219, 2220, 2018, 511, 141, 2224, 2225, 2226,
- 1929, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2229, 366, 1005, 1930, 2238, 2239, 12, 1006,
- 5247, 2243, 2244, 1932, 3634, 1933, 2248, 2249, 2250, 145, 146, 2253, 2253, 2254, 2255, 2256,
- 2253, 2253, 1291, 5793, 2259, 2260, 2261, 477, 5794, 147, 2265, 2266, 5795, 2268, 2269, 2270,
- 2270, 2271, 2272, 2273, 2274, 2274, 2275, 2276, 2273, 2274, 2274, 148, 2278, 2279, 2280, 2260,
- 1935, 2282, 2283, 2284, 2265, 2285, 2286, 2287, 2270, 2270, 2288, 2289, 2273, 2274, 2274, 2271,
- 2272, 2273, 2274, 2274, 233, 5796, 2292, 2293, 2294, 1292, 3724, 2297, 2298, 2299, 2000, 151,
- 2302, 2303, 2200, 152, 2561, 2562, 2563, 2205, 2564, 2565, 2204, 2205, 2205, 363, 154, 154,
- 155, 2570, 59, 3725, 2001, 2574, 2575, 2576, 157, 2578, 2579, 2224, 2580, 2581, 2582, 2583,
- 2229, 2584, 2585, 2228, 2229, 2229, 654, 5798, 158, 2589, 2238, 2392, 2003, 2592, 2593, 2243,
- 2594, 2595, 2596, 2597, 2248, 2598, 2599, 2600, 2253, 2253, 2250, 145, 146, 2253, 2253, 2601,
- 2602, 2603, 2604, 2260, 2605, 2606, 2607, 6336, 2265, 6337, 6338, 6339, 2270, 2270, 6340, 6341,
- 2273, 2274, 2274, 2271, 2272, 2273, 2274, 2274, 6342, 6343, 2259, 2260, 2260,38288U,38289U, 147,
- 2265, 2265, 5795, 2268, 2269, 2270, 2270, 2271, 2272, 2273, 2274, 2274, 2271, 2272, 2273, 2274,
- 2274
-};
-
-const int16_t mlt_sqvh_bitcount_category_4[256] =
-{
- 2, 4, 7, 10, 4, 5, 7, 10, 7, 8, 10, 14, 11, 11, 15, 15,
- 4, 5, 9, 12, 5, 5, 8, 12, 8, 7, 10, 15, 11, 11, 15, 15,
- 7, 9, 12, 15, 8, 8, 12, 15, 10, 10, 13, 15, 14, 14, 15, 13,
- 11, 13, 15, 15, 11, 13, 15, 15, 14, 15, 15, 13, 15, 15, 13, 13,
- 4, 5, 9, 13, 5, 6, 9, 13, 9, 9, 11, 15, 14, 13, 15, 15,
- 4, 6, 9, 12, 5, 6, 9, 13, 9, 8, 11, 15, 13, 12, 15, 15,
- 7, 9, 12, 15, 7, 8, 11, 15, 10, 10, 14, 15, 14, 15, 15, 14,
- 10, 12, 15, 15, 11, 13, 15, 15, 15, 15, 15, 14, 15, 15, 14, 14,
- 6, 9, 13, 14, 8, 9, 12, 15, 12, 12, 15, 15, 15, 15, 15, 15,
- 7, 9, 13, 15, 8, 9, 12, 15, 11, 12, 15, 15, 15, 15, 15, 15,
- 9, 11, 15, 15, 9, 11, 15, 15, 14, 14, 15, 15, 15, 15, 15, 15,
- 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 15, 14, 14, 15, 15,
- 9, 12, 15, 15, 12, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 10, 12, 15, 15, 12, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 15, 15, 14, 14, 15, 15
-};
-
-const uint16_t mlt_sqvh_code_category_4[256] =
-{
- 1, 2, 4, 572, 10, 0, 69, 712, 91, 10, 46, 9182, 1426, 1430, 30172, 30194,
- 9, 28, 22, 2258, 16, 25, 142, 2179, 15, 111, 719, 1521, 1131, 1437, 1520, 30196,
- 88, 283, 3803, 30193, 13, 236, 2856, 30166, 545, 951, 5709, 1522, 3241, 9180, 30179, 5709,
- 1088, 4356, 30410, 30175, 1146, 377, 30162, 30163, 8715, 30176, 30165, 5709, 30197, 30184, 5709, 5709,
- 1, 23, 28, 5710, 26, 14, 29, 7538, 102, 103, 1429, 1524, 3237, 7060, 30401, 30201,
- 15, 13, 470, 3768, 24, 15, 281, 5747, 24, 181, 1128, 30206, 5711, 3531, 30156, 30158,
- 116, 100, 2260, 30187, 119, 234, 1764, 30171, 716, 883, 9183, 30164, 3236, 1528, 30180, 9183,
- 885, 2870, 1532, 30160, 1431, 5708, 30192, 30205, 30402, 30168, 30173, 9183, 30157, 30161, 9183, 9183,
- 54, 25, 1621, 15211, 180, 287, 2261, 30198, 808, 811, 30411, 30413, 30414, 22986, 22987, 30411,
- 24, 273, 376, 30159, 137, 280, 2871, 1523, 1768, 2259, 1525, 30167, 1526, 30169, 30170, 1525,
- 443, 1434, 1527, 30174, 474, 1769, 30177, 30178, 3238, 3239, 30181, 30181, 30182, 30183, 30181, 30181,
- 3240, 30185, 30186, 1527, 9181, 30188, 30189, 30177, 30190, 30191, 30181, 30181, 3238, 3239, 30181, 30181,
- 440, 2857, 1529, 30195, 2294, 7061, 1530, 30199, 30200, 1531, 30202, 30411, 30203, 30204, 30411, 30411,
- 203, 2872, 30207, 30400, 189, 11492, 30403, 30404, 30405, 30406, 30407, 1525, 30408, 30409, 1525, 1525,
- 8714, 1533, 30412, 1527, 1534, 1535, 30415, 30177, 30416, 30417, 30181, 30181, 3238, 3239, 30181, 30181,
- 30418, 30419, 1527, 1527, 30420, 30421, 30177, 30177, 3238, 3239, 30181, 30181, 3238, 3239, 30181, 30181
-};
-
-const int16_t mlt_sqvh_bitcount_category_5[243] =
-{
- 2, 4, 8, 4, 5, 9, 9, 10, 14, 4, 6, 11, 5, 6, 12, 10,
- 11, 15, 9, 11, 15, 10, 13, 15, 14, 15, 6, 4, 6, 12, 6, 7,
- 12, 12, 12, 15, 5, 7, 13, 6, 7, 13, 12, 13, 15, 10, 12, 15,
- 11, 13, 15, 15, 15, 7, 8, 13, 15, 11, 12, 15, 15, 15, 7, 10,
- 13, 15, 12, 15, 15, 15, 15, 7, 15, 15, 7, 15, 15, 7, 6, 7,
- 7, 4, 5, 11, 5, 7, 12, 11, 12, 15, 6, 7, 13, 7, 8, 14,
- 12, 14, 15, 11, 13, 15, 12, 13, 15, 15, 15, 8, 5, 6, 13, 7,
- 8, 15, 12, 14, 15, 6, 8, 14, 7, 8, 15, 14, 15, 15, 12, 12,
- 15, 12, 13, 15, 15, 15, 8, 9, 13, 15, 12, 13, 15, 15, 15, 8,
- 11, 13, 15, 13, 13, 15, 15, 15, 8, 14, 15, 8, 15, 15, 8, 7,
- 8, 8, 8, 10, 15, 11, 12, 15, 15, 15, 7, 10, 12, 15, 12, 13,
- 15, 15, 15, 8, 14, 15, 7, 15, 15, 8, 7, 8, 8, 8, 12, 15,
- 12, 13, 15, 15, 15, 8, 11, 13, 15, 13, 15, 15, 15, 15, 8, 15,
- 15, 8, 15, 15, 8, 7, 8, 8, 14, 15, 6, 15, 15, 8, 7, 8,
- 8, 15, 15, 8, 15, 15, 8, 7, 8, 8, 6, 8, 8, 7, 8, 8,
- 7, 8, 8
-};
-
-const uint16_t mlt_sqvh_code_category_5[243] =
-{
- 0, 5, 220, 10, 16, 443, 390, 391, 14333, 11, 26, 1566, 26, 54, 3135, 508,
- 1558, 28581, 255, 1782, 28599, 885, 6208, 28578, 14335, 28579, 54, 9, 35, 3129, 27, 68,
- 3537, 1562, 3568, 28610, 25, 62, 4078, 58, 118, 7763, 3107, 7758, 28563, 778, 3131, 28598,
- 780, 7123, 28630, 28593, 28586, 118, 243, 6210, 28614, 1018, 3567, 28601, 28611, 28570, 68, 388,
- 6256, 28619, 1559, 28562, 28606, 28565, 28591, 118, 28594, 28571, 62, 28618, 28590, 118, 58, 118,
- 118, 4, 28, 1781, 31, 60, 3134, 1938, 3882, 28574, 25, 96, 7757, 49, 126, 14244,
- 3883, 14334, 28613, 1769, 4077, 28602, 3106, 7756, 28582, 28621, 28566, 126, 14, 61, 4079, 61,
- 138, 28491, 3536, 8153, 28573, 49, 96, 12442, 119, 240, 28490, 12443, 28560, 28561, 3111, 3580,
- 28564, 3130, 7759, 28567, 28568, 28569, 240, 444, 6209, 28572, 3569, 6211, 28575, 28576, 28577, 138,
- 778, 7760, 28580, 7761, 7762, 28583, 28584, 28585, 240, 14319, 28587, 96, 28588, 28589, 240, 119,
- 240, 240, 139, 968, 28592, 1554, 3581, 28595, 28596, 28597, 60, 971, 3560, 28600, 3582, 7132,
- 28603, 28604, 28605, 126, 14332, 28607, 96, 28608, 28609, 126, 49, 126, 126, 241, 1558, 28612,
- 1563, 6257, 28615, 28616, 28617, 138, 1559, 7133, 28620, 6220, 28622, 28623, 28624, 28625, 240, 28626,
- 28627, 96, 28628, 28629, 240, 119, 240, 240, 8152, 28631, 61, 28632, 28633, 138, 61, 138,
- 138, 28634, 28635, 96, 28636, 28637, 240, 119, 240, 240, 49, 96, 96, 119, 240, 240,
- 119, 240, 240
-};
-
-const int16_t mlt_sqvh_bitcount_category_6[32] =
-{
- 1, 4, 4, 6, 4, 6, 6, 8, 4, 6, 6, 8, 6, 9, 8, 10,
- 4, 6, 7, 8, 6, 9, 8, 11, 6, 9, 8, 10, 8, 10, 9, 11
-};
-
-const uint16_t mlt_sqvh_code_category_6[32] =
-{
- 1, 2, 4, 2, 5, 29, 24, 101, 3, 31, 28, 105, 3, 5, 102, 424,
- 1, 30, 0, 107, 27, 200, 103, 806, 1, 4, 104, 402, 3, 425, 213, 807
-};
-
-const int16_t *table_of_bitcount_tables[NUM_CATEGORIES - 1] =
-{
- mlt_sqvh_bitcount_category_0,
- mlt_sqvh_bitcount_category_1,
- mlt_sqvh_bitcount_category_2,
- mlt_sqvh_bitcount_category_3,
- mlt_sqvh_bitcount_category_4,
- mlt_sqvh_bitcount_category_5,
- mlt_sqvh_bitcount_category_6
-};
-
-const uint16_t *table_of_code_tables[NUM_CATEGORIES - 1] =
-{
- mlt_sqvh_code_category_0,
- mlt_sqvh_code_category_1,
- mlt_sqvh_code_category_2,
- mlt_sqvh_code_category_3,
- mlt_sqvh_code_category_4,
- mlt_sqvh_code_category_5,
- mlt_sqvh_code_category_6
-};
-
-const int16_t mlt_decoder_tree_category_0[180][2] =
-{
- { 1, 0}, { 2, 3}, { 4, 5}, { 6, 7}, { 8, 9}, { -1, -14}, { 10, 11}, { 12, 13},
- { 14, 15}, { 16, 17}, { 18, 19}, { -15, 20}, { 21, 22}, { 23, -28}, { 24, -2}, { 25, 26},
- { 27, 28}, { 29, 30}, { 31, 32}, { -29, 33}, { -16, 34}, { -3, 35}, { 36, 37}, { -42, 38},
- { 39, 40}, { 41, 42}, { 43, 44}, { -17, 45}, { -43, 46}, { 47, 48}, { -4, 49}, { -56, 50},
- { 51, 52}, { 53, 54}, { 55, 56}, { -57, -5}, { -30, 57}, { 58, 59}, { -18, 60}, { 61, -70},
- { 62, 63}, { 64, -6}, { 65, 66}, { -44, 67}, { -71, 68}, { 69, 70}, { -19, -31}, { -84, 71},
- { 72, 73}, { 74, 75}, { 76, 77}, { -7, 78}, { 79, -20}, { 80, 81}, { -85, 82}, { -98, 83},
- { -58, 84}, { 85, -32}, { -99, 86}, { -8, 87}, { 88, 89}, { -72, -45}, { 90, -33}, { 91,-112},
- { -21, 92}, { -59,-113}, { -46, 93}, { -9, 94}, { -22, 95}, { 96, 97}, { 98, 99}, { -23, -86},
- { 100, 101}, { -34, -73}, { 102,-126}, {-127, -35}, { 103, -47}, { 104, 105}, { 106, 107}, {-140,-100},
- {-114, -87}, { 108, 109}, { 110, 111}, {-141, -60}, { 112, -48}, { 113, -24}, { -10, -61}, { 114,-101},
- { 115, 116}, { -74, -36}, { 117,-128}, { 118, -62}, { 119, 120}, { -37, 121}, { -11, -49}, { -88, 122},
- { 123,-115}, {-154, -25}, {-142, 124}, {-155,-129}, { 125, -50}, { 126, 127}, { -76, -75}, { 128, 129},
- { -63, -77}, {-102, -39}, { -38, 130}, { -51, 131}, { -89,-116}, {-117,-156}, { 132, -52}, { -78, 133},
- { 134,-103}, { 135, 136}, {-143, -65}, { 137, -64}, {-130,-131}, { -90, 138}, {-104, -91}, { -92, 139},
- {-169,-183}, { -26,-118}, { 140, 141}, {-144, -66}, { -12, 142}, {-168, 143}, {-105,-157}, { 144,-182},
- { 145, 146}, { -79, 147}, { -53,-170}, { 148, 149}, { -27,-145}, { 150, -80}, {-106, -13}, {-132, -67},
- {-158, -40}, {-119, 151}, { 152,-107}, { 153, 154}, { -41,-184}, { 155, 156}, { -54, 157}, {-171, 158},
- { -94, 159}, {-134,-146}, { -93,-133}, {-159,-108}, { 160, -81}, { 161,-160}, { 162, -68}, {-120,-122},
- {-172, 163}, { -55, -95}, { 164,-109}, {-161, -82}, {-173,-185}, { 165, -69}, {-147,-186}, { 166, 167},
- {-121, -96}, { 168,-148}, {-174, 169}, { 170,-136}, { -83, 171}, { 172, 173}, {-135,-110}, {-187, 174},
- {-149,-150}, { 175,-123}, {-162,-163}, { -97,-175}, {-188, 176}, { 177, 178}, { 179,-111}, {-151,-124},
- {-137,-177}, {-176,-125}, {-164,-138}, {-189,-190},
-};
-
-const int16_t mlt_decoder_tree_category_1[93][2] =
-{
- { 1, 0}, { 2, 3}, { 4, 5}, { 6, 7}, { 8, -10}, { -1, 9}, { 10, 11}, { 12, 13},
- { -11, 14}, { 15, 16}, { 17, 18}, { -20, -2}, { 19, 20}, { -21, 21}, { 22, 23}, { -12, 24},
- { 25, 26}, { 27, 28}, { 29, 30}, { -30, 31}, { -31, -3}, { 32, -22}, { 33, -13}, { 34, 35},
- { 36, 37}, { 38, 39}, { 40, -4}, { -41, -14}, { 41, -40}, { -32, 42}, { 43, -23}, { 44, 45},
- { 46, 47}, { 48, -5}, { -51, -50}, { -42, 49}, { -33, 50}, { -15, 51}, { 52, 53}, { 54, -24},
- { 55, -43}, { 56, -52}, { 57, -61}, { -60, 58}, { -25, 59}, { -16, -34}, { -6, 60}, { -62, 61},
- { -71, 62}, { -35, -7}, { 63, -72}, { -53, -17}, { 64, -44}, { -26, -70}, { 65, -45}, { -36, 66},
- { -63, 67}, { -80, -54}, { -81, 68}, { -27, 69}, { 70, -82}, { -18, 71}, { 72, -55}, { 73, -64},
- { 74, -73}, { 75, -46}, { -37, 76}, { -91, -8}, { -9, 77}, { -90, -83}, { 78, -28}, { 79, -56},
- { -65, -38}, { -74, 80}, { -19, -57}, { -92, 81}, { -47, -48}, { 82, -66}, { 83, -29}, { -84, 84},
- { -75, -85}, { -67, -93}, { -39, 85}, { -76, 86}, { -58, 87}, { 88, -49}, { -94, 89}, { 90, -68},
- { 91, -78}, { -86, -59}, { -77, -95}, { 92, -69}, { -87, -96},
-};
-
-const int16_t mlt_decoder_tree_category_2[47][2] =
-{
- { 1, 0}, { 2, 3}, { 4, 5}, { 6, -7}, { -1, 7}, { -8, 8}, { 9, 10}, { 11, 12},
- { 13, -14}, { -15, -9}, { -2, 14}, { 15, 16}, { 17, 18}, { 19, -16}, { 20, -22}, { -10, 21},
- { -21, -3}, { 22, 23}, { 24, 25}, { -23, -17}, { 26, 27}, { 28, -29}, { -11, -28}, { 29, 30},
- { -4, -24}, { -30, 31}, { 32, -18}, { 33, -35}, { -36, 34}, { -31, -12}, { 35, -25}, { -5, -37},
- { 36, 37}, { -42, 38}, { -19, -43}, { -32, 39}, { -13, -38}, { -26, -20}, { 40, -6}, { -44, 41},
- { 42, -39}, { -33, -45}, { 43, -27}, { 44, -46}, { 45, -34}, { -40, 46}, { -41, -47},
-};
-
-const int16_t mlt_decoder_tree_category_3[519][2] =
-{
- { 1, 2}, { 3, 4}, { 5, 0}, { 6, 7}, { 8, 9}, { 10, 11}, { 12, 13}, { 14, 15},
- { 16, 17}, {-125, 18}, { -1, 19}, { 20, 21}, { 22, 23}, { 24, 25}, { -5, -25}, { 26, 27},
- { -6,-150}, { 28, 29}, { 30, 31}, { 32, 33}, { 34, -30}, { 35, 36}, { 37, 38}, { 39, -31},
- {-126,-155}, { 40, 41}, {-156, 42}, { 43,-130}, { 44,-131}, {-151, -26}, { 45, 46}, {-250, 47},
- { 48, 49}, { 50, 51}, { 52,-275}, { 53, 54}, { -2, -7}, { 55, 56}, { 57, 58}, { 59, 60},
- { 61, 62}, { 63, 64}, { 65, 66}, { 67, 68}, { 69, 70}, { 71, -50}, { 72,-180}, { 73, 74},
- { 75, 76}, { 77, -55}, { 78,-175}, { 79, -36}, { 80, 81}, { -35, -10}, { 82, 83}, {-280, 84},
- { -11, 85}, { 86, -32}, { 87, 88}, { 89,-161}, { 90,-276}, { 91, 92}, {-281, 93}, { -8, 94},
- { 95, 96}, { 97,-157}, {-181,-400}, {-132, 98}, {-375, 99}, {-160, 100}, {-127, 101}, { -27, 102},
- { 103,-251}, { -56, 104}, { 105,-256}, {-300, -3}, {-152,-255}, { 106, 107}, { -37, 108}, {-305, 109},
- {-176, 110}, {-136, 111}, { -12, 112}, { 113, 114}, { 115,-135}, { 116, 117}, {-162, 118}, { -16, -51},
- {-186, 119}, { 120, 121}, { 122, 123}, { -41, 124}, { -61, 125}, { 126, 127}, { 128, 129}, { 130, -60},
- { 131, 132}, {-306, 133}, { 134,-205}, {-405, 135}, { 136, 137}, { 138, 139}, {-185, 140}, { 141,-500},
- { -15, 142}, { 143, -80}, { -75, -40}, {-301, 144}, { 145, 146}, {-200, 147}, { 148, 149}, { 150, 151},
- { 152,-525}, { 153,-177}, {-425, 154}, { 155, -13}, {-430, 156}, { 157,-406}, { 158, 159}, {-206,-380},
- { 160, 161}, { 162, 163}, { 164,-182}, {-137, 165}, {-286, 166}, { 167,-401}, { 168, 169}, { -42, -33},
- { 170,-166}, { -57,-325}, { 171,-187}, { -38, 172}, { 173, 174}, {-165,-330}, { -4,-282}, { 175,-257},
- {-261,-311}, {-376, 176}, { 177, 178}, { -28, 179}, { 180, -9}, {-285, 181}, { 182, 183}, { 184,-277},
- { 185,-133}, {-310, -81}, { -85, 186}, {-158,-210}, { -17, 187}, { 188, 189}, { 190, -52}, {-141, 191},
- { 192,-128}, {-191, -20}, { 193,-140}, { 194, 195}, {-211,-260}, { 196, 197}, { 198, 199}, { 200, -66},
- {-201,-225}, {-381, 201}, { 202, 203}, { 204, 205}, { 206, 207}, {-163,-287}, { 208,-100}, { 209, 210},
- { 211, 212}, { 213,-252}, {-105, -76}, { 214, 215}, { 216, -21}, { -86, -62}, {-307, 217}, { -65,-455},
- {-550, 218}, { 219, 220}, { 221, 222}, { 223, 224}, { 225,-230}, {-142, 226}, {-302,-426}, {-431, 227},
- { 228, 229}, { 230,-190}, {-402, -46}, {-153,-450}, {-505, 231}, { 232, 233}, { 234, 235}, { 236, 237},
- { 238, 239}, {-262, -29}, { 240, 241}, { 242, 243}, {-167, -67}, {-331,-530}, { 244, 245}, { 246, 247},
- { 248, 249}, { 250, 251}, { 252, 253}, { 254, 255}, { 256, 257}, { 258, 259}, { 260, 261}, { 262,-336},
- { 263,-171}, {-192,-207}, {-258,-138}, { 264, 265}, { 266, 267}, { 268, 269}, { 270, 271}, { 272, 273},
- { 274, -45}, {-335,-411}, { -43, -18}, {-265, -71}, {-316,-326}, {-350,-407}, {-146, -14}, { 275, 276},
- { 277, 278}, { 279, 280}, { 281,-216}, { -34,-283}, {-291,-312}, {-410,-168}, {-555, 282}, { -70, -53},
- {-235, -87}, { -77,-183}, {-315,-332}, {-178, -58}, { 283, 284}, { 285, 286}, { 287, 288}, { 289, 290},
- { 291, 292}, { 293, 294}, { 295, 296}, { 297, 298}, {-202,-226}, {-170,-267}, {-134,-290}, {-355,-385},
- {-386, -47}, {-526,-196}, { 299, 300}, { 301, 302}, { 303, 304}, { 305, 306}, { 307, 308}, { 309, 310},
- { 311, 312}, { 313, 314}, { 315, 316}, { 317, 318}, { 319, 320}, { 321, 322}, { 323, 324}, { 325,-111},
- {-231,-253}, { -91, -82}, {-172,-145}, { -22,-317}, { -90,-356}, {-382,-159}, { 326, 327}, { 328, 329},
- { 330, 331}, { 332, 333}, { 334, 335}, {-106,-263}, {-278,-215}, {-110, -39}, {-101,-377}, {-129, -63},
- {-436,-195}, {-506,-531}, { 336,-212}, {-154,-266}, { -59,-288}, {-292,-303}, {-337,-432}, {-188,-451},
- {-456,-460}, {-501,-236}, {-551, 337}, { 338, 339}, { 340, 341}, { 342, 343}, { 344, 345}, { 346, 347},
- { 348, 349}, { 350, 351}, { 352, 353}, { 354, 355}, { 356, 357}, { 358, 359}, { 360, 361}, { 362, 363},
- { 364, 365}, { 366, 367}, { 368, 369}, { 370, 371}, { 372, 373}, { 374, 375}, { 376, 377}, { 378, 379},
- { 380, 381}, { 382, 383}, { 384, 385}, { 386, 387}, { 388, 389}, { 390, 391}, { 392, 393}, { 394, 395},
- { 396, 397}, { 398, 399}, { 400, 401}, { 402, 403}, { 404, 405}, { 406, 407}, { -72,-272}, {-309,-333},
- {-340,-360}, { -68,-387}, {-184,-416}, {-427,-147}, {-435,-437}, {-115,-480}, {-510,-532}, {-164,-556},
- { 408,-295}, {-296,-297}, {-107,-313}, {-193,-173}, {-320,-327}, {-341,-351}, {-352,-143}, {-378, -19},
- {-403,-412}, {-268, -54}, { -83,-441}, {-442,-457}, {-475, -44}, { -97,-511}, {-515,-208}, {-527,-528},
- {-237,-536}, {-552, 409}, { 410, 411}, { 412, 413}, { 414, 415}, { 416, 417}, { 418, 419}, { 420, 421},
- { 422, 423}, { 424, 425}, { 426, 427}, { 428, 429}, { 430, 431}, { 432, 433}, { 434, 435}, { 436, 437},
- { 438, 439}, { 440, 441}, { 442, 443}, { 444, 445}, { 446, 447}, { 448, 449}, { 450, 451}, { 452, 453},
- { 454, 455}, { 456, 457}, { 458, 459}, { 460, 461}, { 462, 463}, { 464, 465}, { 466, 467}, { 468, 469},
- { 470, 471}, { 472, 473}, { 474, 475}, { 476, 477}, { 478, 479}, { 480, 481}, { 482, 483}, { 484, 485},
- { 486, 487}, { 488, 489}, { 490, 491}, { 492, 493}, { 494, 495}, { 496, 497}, { 498, 499}, { 500, 501},
- { 502, 503}, { 504, 505}, { 506, 507}, { 508, 509}, { 510, 511}, { 512, 513}, { 514, 515}, { 516, 517},
- { 518,-104}, { -84,-218}, {-318,-319}, {-117,-321}, {-322,-323}, {-219,-174}, {-243,-328}, {-329, -94},
- {-228,-194}, {-240,-334}, {-102,-229}, {-169,-338}, {-339,-116}, {-289,-342}, {-343,-345}, {-346,-347},
- { -23,-203}, {-214,-353}, {-204,-220}, {-357,-358}, {-264,-361}, {-362,-363}, {-365,-366}, {-367, -92},
- {-245,-121}, {-293,-379}, {-108,-232}, {-221,-383}, {-384,-233}, {-294,-241}, {-388,-389}, {-390,-391},
- {-392,-393}, {-394,-395}, {-396,-397}, {-398, -24}, {-109,-149}, {-242,-404}, { -64, -79}, { -89,-408},
- {-409,-213}, {-120,-113}, {-413,-414}, {-415, -96}, {-417,-418}, {-419,-420}, {-421,-422}, {-423,-298},
- { -69,-269}, {-428,-429}, { -78,-270}, { -88,-433}, {-434,-271}, {-234,-259}, {-438,-439}, {-440,-227},
- {-179,-443}, {-445,-446}, {-447,-223}, {-238,-452}, {-453,-454}, {-273,-254}, {-246,-458}, {-459, -48},
- {-461,-462}, {-463,-465}, {-466,-467}, {-468,-470}, {-471,-304}, {-476,-477}, {-478,-112}, {-481,-482},
- {-483,-485}, {-486,-487}, {-490,-491}, {-103,-118}, {-502,-503}, {-504,-189}, { -93,-507}, {-508,-509},
- {-148,-139}, {-512,-513}, {-308,-516}, {-517,-518}, {-520,-521}, { -73, -98}, { -95, -49}, {-529,-222},
- {-217,-197}, {-533,-534}, {-535,-284}, {-537,-538}, {-540,-541}, {-542,-543}, {-545,-546}, {-144,-198},
- {-314,-553}, {-209,-279}, {-557,-558}, {-560,-561}, {-562,-563}, {-565,-566}, {-567,-575}, {-576,-577},
- {-578,-580}, {-581,-582}, {-583,-585}, {-586,-587}, {-590,-591}, {-600,-601}, {-605,-606},
-};
-
-const int16_t mlt_decoder_tree_category_4[208][2] =
-{
- { 1, 2}, { 3, 0}, { 4, 5}, { 6, 7}, { 8, 9}, { 10, 11}, { 12, -64}, { -1, 13},
- { 14, -16}, { -4, 15}, { 16, 17}, { 18, -80}, { -5, 19}, { 20, 21}, { -20, 22}, { 23, -65},
- { -84, -21}, { -68, 24}, { -17, 25}, { 26, 27}, { 28, -81}, { -69, -85}, { 29, 30}, { 31, 32},
- {-128, 33}, { 34, 35}, { -2, 36}, { 37, 38}, {-144, 39}, { 40, -6}, { 41, 42}, { -32, 43},
- { 44, -8}, { 45, -25}, { -96, 46}, { 47,-100}, { -9, 48}, { 49, -36}, { 50, -24}, { 51, 52},
- { 53,-148}, { 54, 55}, { -22, 56}, { 57, 58}, {-132, -89}, { 59, 60}, {-101, 61}, { -37, 62},
- { -18, 63}, { -88,-129}, { -66, -70}, { -97, 64}, { -72, -73}, { 65,-145}, {-149, -86}, { 66, -33},
- { 67,-133}, { 68, 69}, { 70, 71}, {-192, 72}, { 73,-160}, { -82, 74}, {-164, 75}, { -10, 76},
- { 77,-208}, { 78, -40}, { 79, 80}, { -3, 81}, { -7, 82}, { 83, 84}, {-104, 85}, { 86, -26},
- { 87,-105}, { 88,-112}, { 89, 90}, { 91, -41}, { 92, 93}, { 94, 95}, { -48, 96}, { -90, 97},
- { 98, -28}, { -52, 99}, { -12, 100}, { 101, -74}, { -13,-116}, {-161, 102}, { 103, -29}, {-102, 104},
- {-152,-165}, { 105, 106}, { 107, 108}, { 109, 110}, { 111,-212}, { 112, 113}, {-136, 114}, { 115,-137},
- { 116, -23}, { -19,-153}, { -98,-134}, {-196, 117}, { 118, 119}, { -38,-193}, {-113,-150}, {-209, 120},
- { 121, -93}, { -83, 122}, { 123, 124}, { 125, 126}, { 127, 128}, { 129, 130}, { 131, -34}, {-146, -53},
- { 132, 133}, { 134, 135}, { 136, 137}, { 138,-130}, { -49, 139}, { 140, 141}, {-117, -42}, { -67, -92},
- { 142, -87}, { -77,-197}, { -71, 143}, { 144, 145}, { 146, 147}, { 148, 149}, { 150, 151}, { 152, 153},
- { 154, 155}, { 156, 157}, { 158, 159}, { 160, 161}, { 162, 163}, { 164, 165}, { 166, 167}, { 168, 169},
- {-108, -76}, {-168,-169}, {-176, -44}, {-224, -56}, { -45,-180}, { -11,-106}, {-213, 170}, { 171, 172},
- { 173, 174}, { 175, 176}, { 177, 178}, { 179, 180}, { 181, 182}, { 183, 184}, { 185, 186}, { 187, 188},
- { 189, 190}, { 191, 192}, { 193, 194}, { 195, 196}, { 197, 198}, { 199, 200}, { 201, 202}, { 203, 204},
- { 205, 206}, { 207,-131}, { -30, -27}, { -43,-151}, { -75,-154}, {-156,-162}, {-109,-194}, {-198,-201},
- {-114,-225}, {-228,-229}, {-141,-142}, { -94,-124}, { -95,-147}, {-115,-125}, { -54, -55}, {-107, -58},
- { -39,-155}, {-121,-157}, {-158,-103}, { -14,-122}, {-163, -51}, { -57,-166}, {-167, -46}, {-110,-170},
- {-172,-173}, { -61,-177}, {-178, -99}, {-181,-182}, {-184,-185}, {-118, -35}, { -15,-195}, { -31, -60},
- {-135,-199}, {-200, -79}, {-202,-204}, {-205,-119}, { -91,-210}, {-211, -78}, {-120,-214}, {-215,-216},
- {-217,-218}, {-220,-221}, { -50,-138}, {-226,-139}, {-140,-230}, {-232,-233}, {-240,-241}, {-244,-245},
-};
-
-const int16_t mlt_decoder_tree_category_5[191][2] =
-{
- { 1, 2}, { 0, 3}, { 4, 5}, { 6, 7}, { 8, 9}, { 10, 11}, { -81, -1}, { 12, 13},
- { 14, -27}, { -3, -9}, { 15, 16}, { 17, 18}, { 19, 20}, {-108, 21}, { -4, 22}, { 23, -36},
- { -12, 24}, { -82, 25}, { 26, -84}, { 27, -90}, { -10, -30}, { 28, 29}, { 30, -28}, { 31,-117},
- { -13, 32}, { -39, 33}, { 34,-109}, { 35, -93}, { -85,-111}, { -37, 36}, { -31, 37}, { -91, 38},
- { 39, 40}, { -40,-120}, { 41, 42}, {-118, 43}, { -94, 44}, {-112,-162}, { 45, 46}, { -2, 47},
- { 48, 49}, {-121,-189}, { 50, -54}, { 51, 52}, { 53, -18}, { 54, 55}, { -6, 56}, { 57, -5},
- {-135, 58}, { 59, 60}, { 61, 62}, { -63, 63}, { 64, -7}, { -15, 65}, { 66, 67}, { -45, 68},
- { 69, 70}, { 71, -21}, { 72, 73}, { 74, 75}, { 76, 77}, {-163, 78}, { 79,-171}, {-144, 80},
- { -48, 81}, { -57, 82}, { 83, 84}, {-165, 85}, { -16,-198}, { 86, 87}, { -11, 88}, { 89, -99},
- { 90, -83}, { -19, 91}, { 92, 93}, { 94, 95}, { 96, 97}, { 98, 99}, { -87, 100}, { 101, 102},
- {-190, -66}, { -33,-192}, { 103, 104}, { 105, 106}, {-102, -42}, { 107,-126}, { 108, -29}, {-129, -46},
- { -86, -14}, {-114, -32}, {-172, 109}, { 110, -58}, { -34,-138}, { 111, 112}, { 113, 114}, { 115, 116},
- { 117, 118}, { 119, 120}, {-127,-166}, {-174, 121}, { 122, 123}, { 124, 125}, { -88, -96}, { 126,-100},
- { -38,-110}, { -22,-136}, { -55,-139}, {-201, 127}, { -64,-193}, { 128, -49}, {-175,-199}, { 129, 130},
- { 131, 132}, { 133, 134}, { 135, 136}, { 137, 138}, { 139, 140}, { 141, 142}, { 143, 144}, { 145, 146},
- { 147, 148}, { 149, 150}, {-103, -92}, { -43,-130}, {-145,-147}, {-148, -41}, {-216,-115}, {-119,-123},
- { -95, 151}, { 152, 153}, { 154, 155}, { 156, 157}, { 158, 159}, { 160, 161}, { 162, 163}, { 164, 165},
- { 166, 167}, { 168, 169}, { 170, 171}, { 172, 173}, { 174, 175}, { 176, 177}, { 178, 179}, { 180, 181},
- { 182, 183}, { 184, 185}, { 186, 187}, { 188, 189}, { 190,-153}, {-180, -8}, { -97, -24}, {-122,-113},
- {-124,-125}, { -67, -44}, {-128, -69}, {-106,-131}, {-132,-133}, { -61, -73}, {-137,-116}, { -89,-140},
- {-141,-142}, { -23, -25}, {-146, -17}, {-104,-149}, {-150,-151}, { -52,-154}, {-156,-157}, { -76, -70},
- {-164, -51}, { -72,-167}, {-168,-169}, { -47, -20}, {-173, -59}, {-101,-176}, {-177,-178}, { -68,-181},
- {-183,-184}, { -35, -60}, {-191, -98}, { -56,-194}, {-195,-196}, { -75, -65}, {-200,-105}, {-202,-203},
- {-204,-205}, {-207,-208}, {-210,-211}, { -50,-217}, {-219,-220}, {-225,-226}, {-228,-229},
-};
-
-const int16_t mlt_decoder_tree_category_6[31][2] =
-{
- { 1, 0}, { 2, 3}, { 4, 5}, { 6, 7}, { 8, -16}, { -1, -8}, { -2, -4}, { 9, 10},
- { 11, 12}, { 13, 14}, { 15, 16}, { 17, -24}, { -3, -12}, { -6, 18}, { 19, -20}, { -10, -5},
- { -17, -9}, { -18, 20}, { 21, 22}, { 23, 24}, { 25, -28}, { 26, -7}, { -14, -22}, { -26, -11},
- { 27, -19}, { -25, -13}, { -21, 28}, { 29, -30}, { -27, 30}, { -15, -29}, { -23, -31},
-};
-
-const int16_t *table_of_decoder_tables[NUM_CATEGORIES - 1] =
-{
- (const int16_t *) mlt_decoder_tree_category_0,
- (const int16_t *) mlt_decoder_tree_category_1,
- (const int16_t *) mlt_decoder_tree_category_2,
- (const int16_t *) mlt_decoder_tree_category_3,
- (const int16_t *) mlt_decoder_tree_category_4,
- (const int16_t *) mlt_decoder_tree_category_5,
- (const int16_t *) mlt_decoder_tree_category_6
-};
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * huff_tab.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#define REGION_POWER_STEPSIZE_DB 3.010299957
-#define ABS_REGION_POWER_LEVELS 32
-#define DIFF_REGION_POWER_LEVELS 24
-
-#define DRP_DIFF_MIN -12
-#define DRP_DIFF_MAX 11
-
-#define MAX_NUM_BINS 16
-#define MAX_VECTOR_INDICES 625
-#define MAX_VECTOR_DIMENSION 5
-
-extern const int16_t differential_region_power_bits[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS];
-extern const uint16_t differential_region_power_codes[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS];
-extern const int16_t differential_region_power_decoder_tree[MAX_NUMBER_OF_REGIONS][DIFF_REGION_POWER_LEVELS - 1][2];
-#if defined(G722_1_USE_FIXED_POINT)
-extern const int16_t mlt_quant_centroid[NUM_CATEGORIES][MAX_NUM_BINS];
-#else
-extern const float mlt_quant_centroid[NUM_CATEGORIES - 1][MAX_NUM_BINS];
-#endif
-extern const int16_t expected_bits_table[NUM_CATEGORIES];
-
-extern const int16_t *table_of_bitcount_tables[NUM_CATEGORIES - 1];
-extern const uint16_t *table_of_code_tables[NUM_CATEGORIES - 1];
-
-extern const int16_t *table_of_decoder_tables[NUM_CATEGORIES - 1];
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="g722_1" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=g722_1 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "g722_1.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "g722_1.mak" CFG="g722_1 - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "g722_1 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "g722_1 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "g722_1 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libg722_1.dll"
-
-!ELSEIF "$(CFG)" == "g722_1 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
-# SUBTRACT CPP /WX /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libg722_1.dll" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "g722_1 - Win32 Release"
-# Name "g722_1 - Win32 Debug"
-# Begin Group "Source Files"\r
-# Begin Source File\r
-\r
-SOURCE=.\basop32.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\bitstream.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\coef2sam.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\common.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\commonf.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\dct4.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\dct4_a.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\dct4_s.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\decoder.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\decoderf.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\encoder.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\encoderf.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\huff_tab.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sam2coef.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tables.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\msvc/gettimeofday.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-# Begin Source File\r
-\r
-SOURCE=.\g722_1/g722_1.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\g722_1/version.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\g722_1.h\r
-# End Source File\r
-# End Group\r
-\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# End Group\r
-# End Target\r
-# End Project\r
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg722_1", "libg722_1.vcproj", "{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
- ProjectSection(ProjectDependencies) = postProject
- {1CED5987-A529-46DC-B30F-870D85FF9C94} = {1CED5987-A529-46DC-B30F-870D85FF9C94}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "at_dictionary_gen", "src\msvc\at_dictionary_gen.vcproj", "{1CED5987-A529-46DC-B30F-870D85FF9C94}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.ActiveCfg = Debug|Win32
- {CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.Build.0 = Debug|Win32
- {CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.ActiveCfg = Release|Win32
- {CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.Build.0 = Release|Win32
- {1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
- {1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
- {1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
- {1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C"
- Version="9.00"
- Name="libg722_1"
- ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
- RootNamespace="libg722_1"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="src; src\g722_1; src\msvc"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- ModuleDefinitionFile="src/msvc/g722_1.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="src; src\g722_1; src\msvc"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- ModuleDefinitionFile="src/msvc/g722_1.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
-<File RelativePath="basop32.c"></File>\r
-<File RelativePath="bitstream.c"></File>\r
-<File RelativePath="coef2sam.c"></File>\r
-<File RelativePath="common.c"></File>\r
-<File RelativePath="commonf.c"></File>\r
-<File RelativePath="dct4.c"></File>\r
-<File RelativePath="dct4_a.c"></File>\r
-<File RelativePath="dct4_s.c"></File>\r
-<File RelativePath="decoder.c"></File>\r
-<File RelativePath="decoderf.c"></File>\r
-<File RelativePath="encoder.c"></File>\r
-<File RelativePath="encoderf.c"></File>\r
-<File RelativePath="huff_tab.c"></File>\r
-<File RelativePath="sam2coef.c"></File>\r
-<File RelativePath="tables.c"></File>\r
-<File RelativePath="msvc/gettimeofday.c"></File>\r
-</Filter><Filter Name="Header Files">\r
-<File RelativePath="g722_1/g722_1.h"></File>\r
-<File RelativePath="g722_1/version.h"></File>\r
-<File RelativePath="g722_1.h"></File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * make_dct4_tables.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <math.h>
-#include <stdio.h>
-
-#include "g722_1/g722_1.h"
-
-#if defined(PI)
-#undef PI
-#endif
-#define PI 3.141592653589793238462
-
-#include "defs.h"
-
-static void set_up_one_table(int length)
-{
- int index;
- double angle;
- double scale;
-
- scale = PI/(double) (4*length);
- printf("static const cos_msin_t cos_msin_%d[%d] =\n", length, length);
- printf("{\n");
- for (index = 0; index < length - 1; index++)
- {
- angle = scale*((double) index + 0.5);
- printf(" {%.15ef, %.15ef},\n", cos(angle), -sin(angle));
- }
- angle = scale*((double) index + 0.5);
- printf(" {%.15ef, %.15ef}\n", cos(angle), -sin(angle));
- printf("};\n\n");
-}
-/*- End of function --------------------------------------------------------*/
-
-int main(int argc, char *argv[])
-{
- int length_log;
- int i;
- int k;
- int dct_size;
- double scale;
-
- dct_size = MAX_DCT_LENGTH;
-
- length_log = 0;
- while ((dct_size & 1) == 0)
- {
- length_log++;
- dct_size >>= 1;
- }
-
- scale = sqrt(2.0/MAX_DCT_LENGTH);
- printf("static const float max_dct_core_a[] =\n");
- printf("{\n");
- for (k = 0; k < 10; ++k)
- {
- for (i = 0; i < 10; ++i)
- {
- printf(" %22.15ef%s\n",
- cos(PI*(k + 0.5) * (i + 0.5)/10.0)*scale,
- (k == 9 && i == 9) ? "" : ",");
- }
- }
- printf("};\n\n");
-
- scale = sqrt(2.0/DCT_LENGTH);
- printf("static const float dct_core_a[] =\n");
- printf("{\n");
- for (k = 0; k < 10; ++k)
- {
- for (i = 0; i < 10; ++i)
- {
- printf(" %22.15ef%s\n",
- cos(PI*(k + 0.5) * (i + 0.5)/10.0)*scale,
- (k == 9 && i == 9) ? "" : ",");
- }
- }
- printf("};\n\n");
-
- for (i = 0; i <= length_log; i++)
- set_up_one_table(dct_size << i);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * make_tables.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <stdio.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "huff_tab.h"
-
-#if defined(PI)
-#undef PI
-#endif
-#define PI 3.141592653589793238462
-
-/* These may have been defined in the main header for the codec, so we clear out
- any pre-existing definitions here. */
-#if defined(ENCODER_SCALE_FACTOR)
-#undef ENCODER_SCALE_FACTOR
-#endif
-#if defined(DECODER_SCALE_FACTOR)
-#undef DECODER_SCALE_FACTOR
-#endif
-#define ENCODER_SCALE_FACTOR 18318.0
-#define DECODER_SCALE_FACTOR 18096.0
-
-#define REGION_POWER_TABLE_SIZE 64
-#define NUM_CATEGORIES 8
-#define MAX_DCT_LENGTH 640
-
-#if defined(G722_1_USE_FIXED_POINT)
-int16_t int_region_standard_deviation_table[REGION_POWER_TABLE_SIZE];
-int16_t standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE];
-#else
-float region_standard_deviation_table[REGION_POWER_TABLE_SIZE];
-float standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE];
-#endif
-
-int16_t vector_dimension[NUM_CATEGORIES];
-
-int16_t number_of_vectors[NUM_CATEGORIES];
-/* The last category isn't really coded with scalar quantization. */
-int16_t max_bin_plus_one_inverse[NUM_CATEGORIES];
-
-const int16_t max_bin[NUM_CATEGORIES] =
-{
- 13, 9, 6, 4, 3, 2, 1, 1
-};
-
-const float step_size[NUM_CATEGORIES] =
-{
- 0.3536f,
- 0.5f,
- 0.7071f,
- 1.0f,
- 1.4142f,
- 2.0f,
- 2.8284f,
- 2.8284f
-};
-
-static void generate_sam2coef_tables(void)
-{
- int i;
- double angle;
-
- printf("#if defined(G722_1_USE_FIXED_POINT)\n");
-
- printf("const int16_t samples_to_rmlt_window[DCT_LENGTH] =\n{\n");
- for (i = 0; i < DCT_LENGTH; i++)
- {
- if (i%10 == 0)
- printf(" ");
- angle = (PI/2.0)*((double) i + 0.5)/(double) DCT_LENGTH;
- printf("%5d,", (int) (ENCODER_SCALE_FACTOR*sin(angle)));
- if (i%10 == 9)
- printf("\n");
- else
- printf(" ");
- }
- printf("};\n\n");
-
- printf("const int16_t max_samples_to_rmlt_window[MAX_DCT_LENGTH] =\n{\n");
- for (i = 0; i < MAX_DCT_LENGTH; i++)
- {
- if (i%10 == 0)
- printf(" ");
- angle = (PI/2.0)*((double) i + 0.5)/(double) MAX_DCT_LENGTH;
- printf("%5d,", (int) (ENCODER_SCALE_FACTOR*sin(angle)));
- if (i%10 == 9)
- printf("\n");
- else
- printf(" ");
- }
- printf("};\n\n");
-
- printf("#else\n");
-
- printf("const float samples_to_rmlt_window[DCT_LENGTH] =\n{\n");
- for (i = 0; i < DCT_LENGTH; i++)
- {
- angle = (PI/2.0)*((double) i + 0.5)/(double) DCT_LENGTH;
- printf(" %.15ef,\n", sin(angle));
- }
- printf("};\n\n");
-
- printf("const float max_samples_to_rmlt_window[MAX_DCT_LENGTH] =\n{\n");
- for (i = 0; i < MAX_DCT_LENGTH; i++)
- {
- angle = (PI/2.0)*((double) i + 0.5)/(double) MAX_DCT_LENGTH;
- printf(" %.15ef,\n", sin(angle));
- }
- printf("};\n\n");
-
- printf("#endif\n");
-}
-
-static void generate_coef2sam_tables(void)
-{
- int i;
- double angle;
-
- printf("#if defined(G722_1_USE_FIXED_POINT)\n");
-
- printf("const int16_t rmlt_to_samples_window[DCT_LENGTH] =\n{\n");
- for (i = 0; i < DCT_LENGTH; i++)
- {
- if (i%10 == 0)
- printf(" ");
- angle = (PI/2.0)*((double) i + 0.5)/(double) DCT_LENGTH;
- printf("%5d,", (int) (DECODER_SCALE_FACTOR*sin(angle)));
- if (i%10 == 9)
- printf("\n");
- else
- printf(" ");
- }
- printf("};\n\n");
-
- printf("const int16_t max_rmlt_to_samples_window[MAX_DCT_LENGTH] =\n{\n");
- for (i = 0; i < MAX_DCT_LENGTH; i++)
- {
- if (i%10 == 0)
- printf(" ");
- angle = (PI/2.0)*((double) i + 0.5)/(double) MAX_DCT_LENGTH;
- printf("%5d,", (int) (DECODER_SCALE_FACTOR*sin(angle)));
- if (i%10 == 9)
- printf("\n");
- else
- printf(" ");
- }
- printf("};\n\n");
-
- printf("#else\n");
-
- printf("const float rmlt_to_samples_window[DCT_LENGTH] =\n{\n");
- for (i = 0; i < DCT_LENGTH; i++)
- {
- angle = (PI/2.0)*((double) i + 0.5)/(double) DCT_LENGTH;
- printf(" %.15ef,\n", sin(angle));
- }
- printf("};\n\n");
-
- printf("const float max_rmlt_to_samples_window[MAX_DCT_LENGTH] =\n{\n");
- for (i = 0; i < MAX_DCT_LENGTH; i++)
- {
- angle = (PI/2.0)*((double) i + 0.5)/(double) MAX_DCT_LENGTH;
- printf(" %.15ef,\n", sin(angle));
- }
- printf("};\n\n");
-
- printf("#endif\n");
-}
-
-int main(int argc, char *argv[])
-{
- int i;
- int j;
- int number_of_indices;
- double value;
-
- if (strcmp(argv[1], "sam2coef") == 0)
- {
- generate_sam2coef_tables();
- return 0;
- }
-
- if (strcmp(argv[1], "coef2sam") == 0)
- {
- generate_coef2sam_tables();
- return 0;
- }
-
- printf("const float region_standard_deviation_table[REGION_POWER_TABLE_SIZE] =\n{\n");
- for (i = 0; i < REGION_POWER_TABLE_SIZE; i++)
- {
- value = pow(10.0, 0.10*REGION_POWER_STEPSIZE_DB*(i - REGION_POWER_TABLE_NUM_NEGATIVES));
- printf(" %.15ef,\n", sqrt(value));
- }
- printf("};\n\n");
-
- printf("const float standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE] =\n{\n");
- for (i = 0; i < REGION_POWER_TABLE_SIZE; i++)
- {
- value = pow(10.0, 0.10*REGION_POWER_STEPSIZE_DB*(i - REGION_POWER_TABLE_NUM_NEGATIVES));
- printf(" %.15ef,\n", 1.0/sqrt(value));
- }
- printf("};\n\n");
-
- printf("const int16_t max_bin_plus_one_inverse[NUM_CATEGORIES] =\n{\n");
- for (i = 0; i < NUM_CATEGORIES; i++)
- {
- printf(" %5d,\n", max_bin[i]);
- }
- printf("};\n\n");
-
- printf("const int16_t max_bin_plus_one_inverse[NUM_CATEGORIES] =\n{\n");
- for (i = 0; i < NUM_CATEGORIES; i++)
- {
- /* Rounding up by 1.0 instead of 0.5 allows us to avoid rounding every time this is used. */
- max_bin_plus_one_inverse[i] = (int) ((32768.0/(max_bin[i] + 1.0)) + 1.0);
- printf(" %5d,\n", max_bin_plus_one_inverse[i]);
-
- /* Test division for all indices. */
- number_of_indices = 1;
- for (j = 0; j < vector_dimension[i]; j++)
- number_of_indices *= (max_bin[i] + 1);
- for (j = 0; j < number_of_indices; j++)
- {
- if (j/(max_bin[i] + 1) != ((j*max_bin_plus_one_inverse[i]) >> 15))
- printf("max_bin_plus_one_inverse ERROR!! %1d: %5d %3d\n", i, max_bin_plus_one_inverse[i], j);
- }
- }
- printf("};\n\n");
-
- printf("const float step_size[NUM_CATEGORIES] =\n{\n");
- for (i = 0; i < NUM_CATEGORIES; i++)
- {
- printf(" %.15ef,\n", step_size[i]);
- }
- printf("};\n\n");
-
- printf("const float step_size_inverse_table[NUM_CATEGORIES] =\n{\n");
- for (i = 0; i < NUM_CATEGORIES; i++)
- {
- printf(" %.15ef,\n", 1.0/step_size[i]);
- }
- printf("};\n\n");
-
- printf("const float region_power_table[REGION_POWER_TABLE_SIZE] =\n{\n");
- /* region_size = (BLOCK_SIZE * 0.875)/NUMBER_OF_REGIONS; */
- for (i = 0; i < REGION_POWER_TABLE_SIZE; i++)
- {
- value = pow(10.0, 0.10*REGION_POWER_STEPSIZE_DB*(i - REGION_POWER_TABLE_NUM_NEGATIVES));
- printf(" %.15ef,\n", value);
- }
- printf("};\n\n");
-
- printf("const float region_power_table_boundary[REGION_POWER_TABLE_SIZE - 1] =\n{\n");
- for (i = 0; i < REGION_POWER_TABLE_SIZE - 1; i++)
- {
- value = (float) pow(10.0, 0.10*REGION_POWER_STEPSIZE_DB*(0.5 + (i - REGION_POWER_TABLE_NUM_NEGATIVES)));
- printf(" %.15ef,\n", value);
- }
- printf("};\n\n");
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-EXPORTS
-adsi_rx_init
-adsi_rx
-adsi_tx_init
-adsi_send_alert_tone
-adsi_put_message
-adsi_next_field
-adsi_add_field
-async_tx_init
-async_rx_init
-awgn
-bert_init
-bert_get_bit
-bert_put_bit
-bert_set_report
-bert_result
-filter_create
-filter_delete
-filter_step
-cfilter_create
-cfilter_delete
-cfilter_step
-dds_phase_rate
-dds_frequency
-dds_scaling_dbm0
-dds_scaling_dbov
-dds_lookup
-dds_offset
-dds
-dds_mod
-dds_complex
-dds_complex_mod
-dds_phase_ratef
-dds_frequencyf
-dds_scaling_dbm0f
-dds_scaling_dbovf
-ddsf
-dds_modf
-dds_complexf
-dds_complex_modf
-echo_can_create
-echo_can_free
-echo_can_flush
-echo_can_adaption_mode
-echo_can_update
-fax_rx
-fax_tx
-fax_set_flush_handler
-fax_init
-fax_release
-fsk_tx_init
-fsk_tx_power
-fsk_tx_set_get_bit
-fsk_tx
-fsk_rx_signal_power
-fsk_rx_signal_cutoff
-fsk_rx_init
-fsk_rx
-fsk_rx_set_put_bit
-g722_encode_init
-g722_encode_release
-g722_encode
-g722_decode_init
-g722_decode_release
-g722_decode
-g726_init
-g726_release
-crc_itu32_calc
-crc_itu32_append
-crc_itu32_check
-crc_itu16_calc
-crc_itu16_append
-crc_itu16_check
-hdlc_rx_init
-hdlc_rx_get_stats
-hdlc_tx_init
-hdlc_tx_frame
-hdlc_tx_preamble
-ima_adpcm_init
-ima_adpcm_release
-span_log_test
-span_log
-span_log_buf
-span_log_init
-span_log_set_protocol
-span_set_message_handler
-span_set_error_handler
-modem_echo_can_create
-modem_echo_can_free
-modem_echo_can_flush
-modem_echo_can_adaption_mode
-modem_echo_can_update
-noise
-oki_adpcm_init
-oki_adpcm_release
-playout_put
-playout_get
-playout_get_unconditional
-playout_current_length
-playout_next_due
-playout_new
-playout_free
-playout_restart
-plc_rx
-plc_fillin
-plc_init
-plc_release
-power_meter_init
-power_meter_damping
-power_meter_update
-power_meter_dbm0
-power_meter_dbov
-power_meter_level_dbm0
-power_meter_level_dbov
-queue_empty
-queue_free_space
-queue_contents
-queue_flush
-queue_view
-queue_read
-queue_write
-queue_test_msg
-queue_read_msg
-queue_write_msg
-queue_create
-queue_delete
-sig_tone_init
-sig_tone_rx
-sig_tone_tx
-super_tone_rx_make_descriptor
-super_tone_rx_add_tone
-super_tone_rx_add_element
-super_tone_rx_init
-super_tone_rx_free
-super_tone_rx_segment_callback
-super_tone_rx
-super_tone_tx_make_step
-super_tone_tx_free
-super_tone_tx_init
-super_tone_tx
-t30_init
-t30_release
-t30_restart
-t30_create
-t30_free
-t30_frametype
-t30_decode_dis_dtc_dcs
-t30_completion_code_to_str
-t30_set_header_info
-t30_set_local_ident
-t30_get_sub_address
-t30_get_header_info
-t30_get_local_ident
-t30_get_far_ident
-t30_get_transfer_statistics
-t30_set_phase_b_handler
-t30_set_phase_d_handler
-t30_set_phase_e_handler
-t30_set_document_handler
-t30_set_rx_file
-t30_set_tx_file
-t30_local_interrupt_request
-t30_send_complete
-t30_hdlc_accept
-t30_timer_update
-t31_call_event
-t31_at_rx
-t31_rx
-t31_tx
-t31_init
-t31_release
-t35_decode
-t38_indicator
-t38_data_type
-t38_field_type
-t38_terminal_init
-t38_gateway_init
-t4_rx_create
-t4_rx_init
-t4_rx_start_page
-t4_rx_end_page
-t4_rx_delete
-t4_rx_end
-t4_rx_set_rx_encoding
-t4_rx_set_sub_address
-t4_rx_set_far_ident
-t4_rx_set_vendor
-t4_rx_set_model
-t4_tx_create
-t4_tx_init
-t4_tx_start_page
-t4_tx_restart_page
-t4_tx_end_page
-t4_tx_delete
-t4_tx_end
-t4_tx_set_tx_encoding
-t4_tx_set_min_row_bits
-t4_tx_set_local_ident
-t4_tx_set_header_info
-t4_get_transfer_statistics
-t4_encoding_to_str
-time_scale_init
-time_scale_rate
-time_scale
-make_goertzel_descriptor
-goertzel_init
-goertzel_update
-goertzel_result
-dtmf_rx_init
-dtmf_rx_set_realtime_callback
-dtmf_rx_parms
-dtmf_rx
-make_tone_descriptor
-make_tone_gen_descriptor
-tone_gen_init
-tone_gen
-dtmf_tx_init
-dtmf_tx
-v17_rx_init
-v17_rx_restart
-v17_rx_release
-v17_rx_set_put_bit
-v17_rx
-v17_rx_equalizer_state
-v17_rx_carrier_frequency
-v17_rx_symbol_timing_correction
-v17_rx_signal_power
-v17_rx_signal_cutoff
-v17_rx_set_qam_report_handler
-v17_tx_power
-v17_tx_init
-v17_tx_restart
-v17_tx_release
-v17_tx_set_get_bit
-v17_tx
-v22bis_rx_restart
-v22bis_rx
-v22bis_rx_equalizer_state
-v22bis_rx_carrier_frequency
-v22bis_rx_symbol_timing_correction
-v22bis_rx_signal_power
-v22bis_rx_set_qam_report_handler
-v22bis_tx
-v22bis_tx_power
-v22bis_restart
-v22bis_init
-v22bis_set_get_bit
-v22bis_set_put_bit
-v27ter_rx_init
-v27ter_rx_restart
-v27ter_rx_release
-v27ter_rx_set_put_bit
-v27ter_rx
-v27ter_rx_equalizer_state
-v27ter_rx_carrier_frequency
-v27ter_rx_symbol_timing_correction
-v27ter_rx_signal_power
-v27ter_rx_signal_cutoff
-v27ter_rx_set_qam_report_handler
-v27ter_tx_power
-v27ter_tx_init
-v27ter_tx_restart
-v27ter_tx_release
-v27ter_tx_set_get_bit
-v27ter_tx
-v29_rx_init
-v29_rx_restart
-v29_rx_release
-v29_rx_set_put_bit
-v29_rx
-v29_rx_equalizer_state
-v29_rx_carrier_frequency
-v29_rx_symbol_timing_correction
-v29_rx_signal_power
-v29_rx_signal_cutoff
-v29_rx_set_qam_report_handler
-v29_tx_power
-v29_tx_init
-v29_tx_restart
-v29_tx_release
-v29_tx_set_get_bit
-v29_tx
-lapm_dump
-lapm_receive
-lapm_tx
-lapm_tx_iframe
-v42_set_status_callback
-v42_rx_bit
-v42_tx_bit
-v42_init
-v42_restart
-v42_release
-v42bis_compress
-v42bis_compress_flush
-v42bis_decompress
-v42bis_decompress_flush
-v42bis_init
-v42bis_release
-v8_init
-v8_release
-v8_tx
-v8_rx
-v8_log_supported_modulations
-
+++ /dev/null
-#ifdef _MSC_VER
-#pragma warning(disable:4100)
-#endif
-
-#include "windows.h"
-
-void gettimeofday(struct timeval *tv, void *tz)
-{
- long int l = GetTickCount();
-
- tv->tv_sec = l / 1000;
- tv->tv_usec = (l % 1000) * 1000;
- return;
-}
+++ /dev/null
-/*
- * SpanDSP - a series of DSP components for telephony
- *
- * inttypes.h - a fudge for MSVC, which lacks this header
- *
- * Written by Steve Underwood <steveu@coppice.org>
- *
- * Copyright (C) 2006 Michael Jerris
- *
- *
- * This file is released in the public domain.
- *
- */
-
-#if !defined(_INTTYPES_H_)
-#define _INTTYPES_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef _MSC_VER
-#if (_MSC_VER >= 1400) // VC8+
-#ifndef _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_DEPRECATE
-#endif
-#ifndef _CRT_NONSTDC_NO_DEPRECATE
-#define _CRT_NONSTDC_NO_DEPRECATE
-#endif
-#endif // VC8+
-#include <windows.h>
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-#define inline __inline
-#define __inline__ __inline
-#define INT16_MAX 0x7fff
-#define INT16_MIN (-INT16_MAX - 1)
-#define _MMX_H_
-
-/* disable the following warnings
- * C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
- * C4200: Non standard extension C zero sized array
- * C4706: assignment within conditional expression
- * C4244: conversion from 'type1' to 'type2', possible loss of data
- * C4295: array is too small to include a terminating null character
- * C4125: decimal digit terminates octal escape sequence
- */
-#pragma warning(disable:4100 4200 4706 4295 4125)
-
-#pragma comment(lib, "ws2_32.lib")
-
-#define strncasecmp _strnicmp
-#define strcasecmp _stricmp
-#if _MSC_VER < 1900
-#define snprintf _snprintf
-#else
-#include <math.h>
-#endif
-
-#if !defined(INFINITY)
-#define INFINITY 0x7fffffff
-#endif
-#endif
-
-#define PACKAGE "ilbc"
-#define VERSION "0.0.1andabit"
-
-#define INT32_MAX (2147483647)
-#define INT32_MIN (-2147483647 - 1)
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "ld"
-#define PRId64 "lld"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "lu"
-#define PRIu64 "llu"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="g722_1" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=g722_1 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "g722_1.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "g722_1.mak" CFG="g722_1 - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "g722_1 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "g722_1 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "g722_1 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libg722_1.dll"
-
-!ELSEIF "$(CFG)" == "g722_1 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
-# SUBTRACT CPP /WX /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libg722_1.dll" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "g722_1 - Win32 Release"
-# Name "g722_1 - Win32 Debug"
+++ /dev/null
-extern void gettimeofday(struct timeval *tv, void *tz);
+++ /dev/null
-/*
- * SpanDSP - a series of DSP components for telephony
- *
- * tgmath.h - a fudge for MSVC, which lacks this header
- *
- * Written by Steve Underwood <steveu@coppice.org>
- *
- * Copyright (C) 2006 Michael Jerris
- *
- *
- * This file is released in the public domain.
- *
- */
-
-#if !defined(_TGMATH_H_)
-#define _TGMATH_H_
-
-#include <math.h>
-
-#if !defined(M_PI)
-/* C99 systems may not define M_PI */
-#define M_PI 3.14159265358979323846264338327
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* A kindofa rint() for VC++ (only kindofa, because rint should be type generic,
- and this one is purely float to int */
-static inline long int lrintf(float a)
-{
- long int i;
-
- __asm
- {
- fld a
- fistp i
- }
- return i;
-}
-
-static inline long int lrint(double a)
-{
- long int i;
-
- __asm
- {
- fld a
- fistp i
- }
- return i;
-}
-
-static inline int rintf(float a)
-{
- int i;
-
- __asm
- {
- fld a
- fistp i
- }
- return i;
-}
-
-static inline int rint(double a)
-{
- int i;
-
- __asm
- {
- fld a
- fistp i
- }
- return i;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * SpanDSP - a series of DSP components for telephony
- *
- * inttypes.h - a fudge for MSVC, which lacks this header
- *
- * Written by Steve Underwood <steveu@coppice.org>
- *
- * Copyright (C) 2006 Michael Jerris
- *
- *
- * This file is released in the public domain.
- *
- */
-
-#if !defined(_INTTYPES_H_)
-#define _INTTYPES_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define open _open
-#define write _write
-
-extern int gethostname (char *name, size_t len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C"
- Version="9.00"
- Name="libg722_1"
- ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
- RootNamespace="libg722_1"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="src; src\g722_1; src\msvc"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- ModuleDefinitionFile="src/msvc/g722_1.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="src; src\g722_1; src\msvc"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- ModuleDefinitionFile="src/msvc/g722_1.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * sam2coef.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "sam2coef.h"
-#include "utilities.h"
-
-/* Convert Samples to Reversed MLT (Modulated Lapped Transform) Coefficients
-
- The "Reversed MLT" is an overlapped block transform which uses even symmetry
- on the left, odd symmetry on the right and a Type IV DCT as the block transform.
- It is thus similar to a MLT which uses odd symmetry on the left, even symmetry
- on the right and a Type IV DST as the block transform. In fact, it is equivalent
- to reversing the order of the samples, performing an MLT and then negating all
- the even-numbered coefficients. */
-
-#if defined(G722_1_USE_FIXED_POINT)
-int16_t samples_to_rmlt_coefs(const int16_t new_samples[],
- int16_t old_samples[],
- int16_t coefs[],
- int dct_length)
-{
- int i;
- int half_dct_length;
- int last;
- int16_t mag_shift;
- int16_t n;
- int16_t windowed_data[MAX_DCT_LENGTH];
- const int16_t *win;
- int32_t acca;
- int32_t accb;
- int16_t temp;
- int16_t temp1;
- int16_t temp2;
-
- half_dct_length = dct_length >> 1;
-
- win = (dct_length == DCT_LENGTH) ? samples_to_rmlt_window : max_samples_to_rmlt_window;
- /* Get the first half of the windowed samples */
- last = half_dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- acca = L_mult(win[last - i], old_samples[last - i]);
- acca = L_mac(acca, win[half_dct_length + i], old_samples[half_dct_length + i]);
- windowed_data[i] = xround(acca);
- }
- /* Get the second half of the windowed samples */
- last = dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- acca = L_mult(win[last - i], new_samples[i]);
- acca = L_mac(acca, negate(win[i]), new_samples[last - i]);
- windowed_data[half_dct_length + i] = xround(acca);
- }
-
- /* Save the new samples for next time, when they will be the old samples. */
- vec_copyi16(old_samples, new_samples, dct_length);
-
- /* Calculate how many bits to shift up the input to the DCT. */
- temp1 = 0;
- for (i = 0; i < dct_length; i++)
- {
- temp2 = abs_s(windowed_data[i]);
- temp = sub(temp2, temp1);
- if (temp > 0)
- temp1 = temp2;
- }
-
- mag_shift = 0;
- temp = sub(temp1, 14000);
- if (temp < 0)
- {
- temp = sub(temp1, 438);
- temp = (temp < 0) ? add(temp1, 1) : temp1;
- accb = L_mult(temp, 9587);
- acca = L_shr(accb, 20);
- temp = norm_s((int16_t) acca);
- mag_shift = (temp == 0) ? 9 : sub(temp, 6);
- }
-
- acca = 0;
- for (i = 0; i < dct_length; i++)
- {
- temp = abs_s(windowed_data[i]);
- acca = L_add(acca, temp);
- }
-
- acca = L_shr(acca, 7);
- if (temp1 < acca)
- mag_shift = sub(mag_shift, 1);
- if (mag_shift > 0)
- {
- for (i = 0; i < dct_length; i++)
- windowed_data[i] = shl(windowed_data[i], mag_shift);
- }
- else if (mag_shift < 0)
- {
- n = negate(mag_shift);
- for (i = 0; i < dct_length; i++)
- windowed_data[i] = shr(windowed_data[i], n);
- }
-
- /* Perform a Type IV DCT on the windowed data to get the coefficients */
- dct_type_iv_a(windowed_data, coefs, dct_length);
-
- return mag_shift;
-}
-/*- End of function --------------------------------------------------------*/
-#else
-void samples_to_rmlt_coefs(const float new_samples[],
- float old_samples[],
- float coefs[],
- int dct_length)
-{
- int i;
- int half_dct_length;
- int last;
- float sum;
- float windowed_data[MAX_DCT_LENGTH];
- const float *win;
-
- half_dct_length = dct_length >> 1;
-
- win = (dct_length == DCT_LENGTH) ? samples_to_rmlt_window : max_samples_to_rmlt_window;
- /* Get the first half of the windowed samples. */
- last = half_dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- sum = win[last - i]*old_samples[last - i];
- sum += win[half_dct_length + i]*old_samples[half_dct_length + i];
- windowed_data[i] = sum;
- }
- /* Get the second half of the windowed samples. */
- last = dct_length - 1;
- for (i = 0; i < half_dct_length; i++)
- {
- sum = win[last - i]*new_samples[i];
- sum -= win[i]*new_samples[last - i];
- windowed_data[half_dct_length + i] = sum;
- }
- /* Save the new samples for next time, when they will be the old samples. */
- vec_copyf(old_samples, new_samples, dct_length);
-
- /* Perform a Type IV DCT on the windowed data to get the coefficients. */
- dct_type_iv(windowed_data, coefs, dct_length);
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * sam2coef.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t samples_to_rmlt_window[DCT_LENGTH] =
-{
- 44, 134, 224, 314, 404, 494, 584, 674, 764, 853,
- 943, 1033, 1123, 1213, 1302, 1392, 1482, 1571, 1661, 1750,
- 1840, 1929, 2019, 2108, 2197, 2286, 2376, 2465, 2554, 2643,
- 2732, 2821, 2909, 2998, 3087, 3175, 3264, 3352, 3441, 3529,
- 3617, 3705, 3793, 3881, 3969, 4057, 4144, 4232, 4319, 4407,
- 4494, 4581, 4668, 4755, 4842, 4928, 5015, 5101, 5188, 5274,
- 5360, 5446, 5532, 5617, 5703, 5788, 5873, 5959, 6043, 6128,
- 6213, 6297, 6382, 6466, 6550, 6634, 6718, 6801, 6885, 6968,
- 7051, 7134, 7217, 7299, 7382, 7464, 7546, 7628, 7709, 7791,
- 7872, 7953, 8034, 8115, 8195, 8276, 8356, 8436, 8515, 8595,
- 8674, 8753, 8832, 8911, 8989, 9068, 9146, 9223, 9301, 9378,
- 9455, 9532, 9609, 9685, 9762, 9838, 9913, 9989, 10064, 10139,
- 10214, 10288, 10363, 10437, 10510, 10584, 10657, 10730, 10803, 10875,
- 10948, 11020, 11091, 11163, 11234, 11305, 11375, 11446, 11516, 11586,
- 11655, 11724, 11793, 11862, 11930, 11998, 12066, 12134, 12201, 12268,
- 12334, 12401, 12467, 12532, 12598, 12663, 12728, 12792, 12857, 12920,
- 12984, 13047, 13110, 13173, 13235, 13297, 13359, 13420, 13481, 13542,
- 13602, 13662, 13722, 13782, 13841, 13899, 13958, 14016, 14074, 14131,
- 14188, 14245, 14301, 14357, 14413, 14468, 14523, 14578, 14632, 14686,
- 14739, 14793, 14845, 14898, 14950, 15002, 15053, 15104, 15155, 15205,
- 15255, 15305, 15354, 15403, 15451, 15500, 15547, 15595, 15642, 15688,
- 15734, 15780, 15826, 15871, 15916, 15960, 16004, 16047, 16091, 16133,
- 16176, 16218, 16259, 16300, 16341, 16382, 16422, 16461, 16501, 16540,
- 16578, 16616, 16654, 16691, 16728, 16764, 16800, 16836, 16871, 16906,
- 16940, 16974, 17008, 17041, 17074, 17106, 17138, 17170, 17201, 17232,
- 17262, 17292, 17321, 17350, 17379, 17407, 17435, 17462, 17489, 17516,
- 17542, 17567, 17593, 17617, 17642, 17666, 17689, 17713, 17735, 17758,
- 17779, 17801, 17822, 17842, 17863, 17882, 17901, 17920, 17939, 17957,
- 17974, 17991, 18008, 18024, 18040, 18055, 18070, 18085, 18099, 18113,
- 18126, 18139, 18151, 18163, 18174, 18185, 18196, 18206, 18216, 18225,
- 18234, 18242, 18250, 18257, 18265, 18271, 18277, 18283, 18288, 18293,
- 18298, 18302, 18305, 18308, 18311, 18313, 18315, 18316, 18317, 18317,
-};
-
-const int16_t max_samples_to_rmlt_window[MAX_DCT_LENGTH] =
-{
- 0, 43, 89, 133, 178, 222, 268, 314, 357, 403,
- 447, 493, 538, 582, 628, 671, 717, 763, 807, 853,
- 896, 942, 987, 1031, 1077, 1121, 1166, 1212, 1256, 1301,
- 1345, 1390, 1436, 1480, 1526, 1569, 1615, 1660, 1704, 1749,
- 1793, 1838, 1884, 1928, 1973, 2016, 2062, 2107, 2151, 2196,
- 2239, 2285, 2331, 2374, 2419, 2463, 2508, 2553, 2597, 2642,
- 2685, 2730, 2776, 2819, 2864, 2908, 2952, 2998, 3041, 3086,
- 3129, 3174, 3219, 3263, 3307, 3350, 3396, 3440, 3483, 3528,
- 3571, 3616, 3661, 3704, 3748, 3791, 3836, 3881, 3923, 3968,
- 4011, 4055, 4100, 4143, 4187, 4230, 4274, 4318, 4362, 4406,
- 4448, 4493, 4537, 4580, 4624, 4666, 4710, 4755, 4797, 4841,
- 4883, 4927, 4971, 5013, 5057, 5099, 5144, 5187, 5229, 5273,
- 5315, 5359, 5402, 5444, 5488, 5530, 5573, 5617, 5658, 5702,
- 5743, 5787, 5830, 5871, 5915, 5956, 6000, 6043, 6084, 6127,
- 6169, 6211, 6254, 6296, 6339, 6380, 6423, 6465, 6507, 6549,
- 6590, 6633, 6675, 6716, 6759, 6799, 6842, 6884, 6925, 6967,
- 7007, 7050, 7092, 7132, 7175, 7215, 7257, 7299, 7339, 7381,
- 7421, 7462, 7504, 7544, 7586, 7626, 7667, 7709, 7749, 7790,
- 7830, 7871, 7912, 7952, 7993, 8032, 8073, 8114, 8153, 8194,
- 8234, 8275, 8315, 8355, 8395, 8434, 8474, 8515, 8554, 8594,
- 8632, 8673, 8713, 8752, 8792, 8830, 8871, 8910, 8949, 8989,
- 9027, 9066, 9106, 9144, 9184, 9221, 9261, 9300, 9338, 9378,
- 9415, 9454, 9493, 9531, 9570, 9607, 9646, 9685, 9722, 9761,
- 9798, 9836, 9875, 9912, 9950, 9987, 10025, 10064, 10100, 10138,
- 10175, 10213, 10250, 10287, 10325, 10361, 10398, 10436, 10472, 10510,
- 10545, 10583, 10620, 10656, 10692, 10728, 10766, 10803, 10838, 10874,
- 10910, 10947, 10983, 11018, 11055, 11089, 11126, 11162, 11197, 11233,
- 11268, 11303, 11340, 11374, 11410, 11444, 11480, 11515, 11549, 11585,
- 11619, 11654, 11689, 11723, 11758, 11791, 11826, 11861, 11895, 11930,
- 11963, 11997, 12032, 12065, 12099, 12132, 12166, 12201, 12233, 12267,
- 12300, 12333, 12367, 12400, 12433, 12465, 12499, 12532, 12563, 12597,
- 12629, 12662, 12695, 12727, 12759, 12790, 12823, 12856, 12887, 12920,
- 12951, 12983, 13016, 13046, 13078, 13109, 13141, 13173, 13203, 13235,
- 13266, 13296, 13328, 13358, 13389, 13419, 13450, 13481, 13510, 13541,
- 13571, 13602, 13632, 13661, 13692, 13721, 13751, 13781, 13810, 13840,
- 13869, 13898, 13929, 13957, 13986, 14015, 14044, 14073, 14101, 14130,
- 14158, 14187, 14216, 14244, 14272, 14300, 14328, 14357, 14384, 14412,
- 14439, 14468, 14495, 14522, 14550, 14577, 14604, 14632, 14658, 14686,
- 14711, 14739, 14765, 14792, 14819, 14844, 14871, 14897, 14923, 14949,
- 14975, 15001, 15027, 15053, 15079, 15103, 15129, 15155, 15180, 15205,
- 15229, 15255, 15280, 15304, 15329, 15353, 15378, 15403, 15426, 15451,
- 15475, 15499, 15523, 15546, 15570, 15594, 15618, 15641, 15664, 15688,
- 15711, 15734, 15757, 15780, 15802, 15825, 15848, 15871, 15892, 15915,
- 15937, 15960, 15982, 16003, 16026, 16047, 16069, 16090, 16112, 16133,
- 16154, 16175, 16197, 16217, 16239, 16259, 16279, 16301, 16320, 16341,
- 16361, 16382, 16402, 16421, 16441, 16461, 16481, 16501, 16520, 16539,
- 16558, 16578, 16597, 16615, 16635, 16653, 16672, 16691, 16709, 16728,
- 16746, 16764, 16782, 16800, 16818, 16835, 16853, 16871, 16888, 16905,
- 16923, 16940, 16957, 16974, 16991, 17008, 17024, 17041, 17057, 17074,
- 17090, 17106, 17122, 17138, 17154, 17169, 17185, 17201, 17216, 17231,
- 17246, 17262, 17277, 17291, 17306, 17321, 17336, 17350, 17364, 17379,
- 17393, 17407, 17421, 17435, 17449, 17462, 17476, 17490, 17502, 17515,
- 17528, 17542, 17554, 17567, 17580, 17592, 17605, 17618, 17629, 17642,
- 17653, 17666, 17678, 17689, 17701, 17712, 17724, 17736, 17746, 17757,
- 17768, 17779, 17790, 17800, 17811, 17822, 17832, 17842, 17852, 17862,
- 17872, 17882, 17892, 17902, 17911, 17920, 17930, 17938, 17947, 17956,
- 17965, 17974, 17983, 17991, 17999, 18008, 18016, 18025, 18032, 18040,
- 18047, 18055, 18063, 18070, 18078, 18085, 18092, 18099, 18106, 18112,
- 18119, 18126, 18132, 18138, 18144, 18151, 18157, 18163, 18168, 18174,
- 18179, 18185, 18191, 18196, 18201, 18206, 18211, 18216, 18220, 18225,
- 18229, 18234, 18238, 18242, 18246, 18250, 18254, 18257, 18260, 18264,
- 18268, 18271, 18274, 18277, 18280, 18283, 18286, 18288, 18291, 18293,
- 18295, 18297, 18300, 18301, 18303, 18305, 18306, 18308, 18309, 18311,
- 18312, 18312, 18314, 18315, 18315, 18316, 18316, 18317, 18317, 18317
-};
-
-#else
-const float samples_to_rmlt_window[DCT_LENGTH] =
-{
- 2.45436677e-03f,
- 7.36304140e-03f,
- 1.22715384e-02f,
- 1.71797387e-02f,
- 2.20875274e-02f,
- 2.69947816e-02f,
- 3.19013856e-02f,
- 3.68072242e-02f,
- 4.17121723e-02f,
- 4.66161147e-02f,
- 5.15189357e-02f,
- 5.64205162e-02f,
- 6.13207370e-02f,
- 6.62194788e-02f,
- 7.11166263e-02f,
- 7.60120600e-02f,
- 8.09056610e-02f,
- 8.57973099e-02f,
- 9.06868950e-02f,
- 9.55742970e-02f,
- 1.00459397e-01f,
- 1.05342068e-01f,
- 1.10222206e-01f,
- 1.15099691e-01f,
- 1.19974397e-01f,
- 1.24846213e-01f,
- 1.29715025e-01f,
- 1.34580702e-01f,
- 1.39443144e-01f,
- 1.44302234e-01f,
- 1.49157837e-01f,
- 1.54009849e-01f,
- 1.58858150e-01f,
- 1.63702607e-01f,
- 1.68543145e-01f,
- 1.73379600e-01f,
- 1.78211898e-01f,
- 1.83039889e-01f,
- 1.87863469e-01f,
- 1.92682534e-01f,
- 1.97496936e-01f,
- 2.02306598e-01f,
- 2.07111374e-01f,
- 2.11911172e-01f,
- 2.16705844e-01f,
- 2.21495315e-01f,
- 2.26279438e-01f,
- 2.31058106e-01f,
- 2.35831216e-01f,
- 2.40598634e-01f,
- 2.45360255e-01f,
- 2.50115961e-01f,
- 2.54865646e-01f,
- 2.59609193e-01f,
- 2.64346480e-01f,
- 2.69077420e-01f,
- 2.73801863e-01f,
- 2.78519690e-01f,
- 2.83230811e-01f,
- 2.87935108e-01f,
- 2.92632490e-01f,
- 2.97322810e-01f,
- 3.02005947e-01f,
- 3.06681812e-01f,
- 3.11350316e-01f,
- 3.16011280e-01f,
- 3.20664644e-01f,
- 3.25310290e-01f,
- 3.29948097e-01f,
- 3.34577948e-01f,
- 3.39199722e-01f,
- 3.43813360e-01f,
- 3.48418683e-01f,
- 3.53015602e-01f,
- 3.57604057e-01f,
- 3.62183869e-01f,
- 3.66754949e-01f,
- 3.71317208e-01f,
- 3.75870496e-01f,
- 3.80414754e-01f,
- 3.84949833e-01f,
- 3.89475614e-01f,
- 3.93992037e-01f,
- 3.98498952e-01f,
- 4.02996302e-01f,
- 4.07483906e-01f,
- 4.11961704e-01f,
- 4.16429549e-01f,
- 4.20887381e-01f,
- 4.25335079e-01f,
- 4.29772526e-01f,
- 4.34199601e-01f,
- 4.38616246e-01f,
- 4.43022281e-01f,
- 4.47417676e-01f,
- 4.51802284e-01f,
- 4.56175983e-01f,
- 4.60538715e-01f,
- 4.64890331e-01f,
- 4.69230771e-01f,
- 4.73559886e-01f,
- 4.77877587e-01f,
- 4.82183784e-01f,
- 4.86478359e-01f,
- 4.90761191e-01f,
- 4.95032221e-01f,
- 4.99291331e-01f,
- 5.03538370e-01f,
- 5.07773340e-01f,
- 5.11996031e-01f,
- 5.16206384e-01f,
- 5.20404279e-01f,
- 5.24589658e-01f,
- 5.28762400e-01f,
- 5.32922447e-01f,
- 5.37069619e-01f,
- 5.41203797e-01f,
- 5.45324981e-01f,
- 5.49433053e-01f,
- 5.53527832e-01f,
- 5.57609320e-01f,
- 5.61677337e-01f,
- 5.65731823e-01f,
- 5.69772661e-01f,
- 5.73799789e-01f,
- 5.77813089e-01f,
- 5.81812501e-01f,
- 5.85797846e-01f,
- 5.89769125e-01f,
- 5.93726158e-01f,
- 5.97668886e-01f,
- 6.01597190e-01f,
- 6.05511069e-01f,
- 6.09410286e-01f,
- 6.13294840e-01f,
- 6.17164612e-01f,
- 6.21019542e-01f,
- 6.24859512e-01f,
- 6.28684402e-01f,
- 6.32494152e-01f,
- 6.36288643e-01f,
- 6.40067816e-01f,
- 6.43831551e-01f,
- 6.47579789e-01f,
- 6.51312411e-01f,
- 6.55029356e-01f,
- 6.58730507e-01f,
- 6.62415802e-01f,
- 6.66085124e-01f,
- 6.69738352e-01f,
- 6.73375487e-01f,
- 6.76996410e-01f,
- 6.80601001e-01f,
- 6.84189200e-01f,
- 6.87760890e-01f,
- 6.91316009e-01f,
- 6.94854498e-01f,
- 6.98376238e-01f,
- 7.01881170e-01f,
- 7.05369174e-01f,
- 7.08840132e-01f,
- 7.12294042e-01f,
- 7.15730846e-01f,
- 7.19150364e-01f,
- 7.22552538e-01f,
- 7.25937307e-01f,
- 7.29304552e-01f,
- 7.32654274e-01f,
- 7.35986352e-01f,
- 7.39300668e-01f,
- 7.42597163e-01f,
- 7.45875776e-01f,
- 7.49136388e-01f,
- 7.52379000e-01f,
- 7.55603433e-01f,
- 7.58809686e-01f,
- 7.61997640e-01f,
- 7.65167236e-01f,
- 7.68318415e-01f,
- 7.71451116e-01f,
- 7.74565160e-01f,
- 7.77660549e-01f,
- 7.80737221e-01f,
- 7.83795059e-01f,
- 7.86834061e-01f,
- 7.89854050e-01f,
- 7.92855024e-01f,
- 7.95836926e-01f,
- 7.98799574e-01f,
- 8.01743031e-01f,
- 8.04667175e-01f,
- 8.07571888e-01f,
- 8.10457170e-01f,
- 8.13322961e-01f,
- 8.16169083e-01f,
- 8.18995595e-01f,
- 8.21802378e-01f,
- 8.24589312e-01f,
- 8.27356398e-01f,
- 8.30103517e-01f,
- 8.32830667e-01f,
- 8.35537732e-01f,
- 8.38224709e-01f,
- 8.40891480e-01f,
- 8.43537927e-01f,
- 8.46164107e-01f,
- 8.48769844e-01f,
- 8.51355195e-01f,
- 8.53919983e-01f,
- 8.56464207e-01f,
- 8.58987808e-01f,
- 8.61490726e-01f,
- 8.63972843e-01f,
- 8.66434157e-01f,
- 8.68874609e-01f,
- 8.71294141e-01f,
- 8.73692632e-01f,
- 8.76070082e-01f,
- 8.78426433e-01f,
- 8.80761623e-01f,
- 8.83075595e-01f,
- 8.85368288e-01f,
- 8.87639642e-01f,
- 8.89889598e-01f,
- 8.92118096e-01f,
- 8.94325137e-01f,
- 8.96510601e-01f,
- 8.98674488e-01f,
- 9.00816679e-01f,
- 9.02937174e-01f,
- 9.05035973e-01f,
- 9.07112896e-01f,
- 9.09168005e-01f,
- 9.11201179e-01f,
- 9.13212419e-01f,
- 9.15201604e-01f,
- 9.17168796e-01f,
- 9.19113874e-01f,
- 9.21036780e-01f,
- 9.22937512e-01f,
- 9.24816012e-01f,
- 9.26672220e-01f,
- 9.28506076e-01f,
- 9.30317581e-01f,
- 9.32106674e-01f,
- 9.33873296e-01f,
- 9.35617447e-01f,
- 9.37339008e-01f,
- 9.39037979e-01f,
- 9.40714359e-01f,
- 9.42368090e-01f,
- 9.43999052e-01f,
- 9.45607305e-01f,
- 9.47192788e-01f,
- 9.48755443e-01f,
- 9.50295210e-01f,
- 9.51812088e-01f,
- 9.53306019e-01f,
- 9.54777002e-01f,
- 9.56224978e-01f,
- 9.57649946e-01f,
- 9.59051788e-01f,
- 9.60430503e-01f,
- 9.61786151e-01f,
- 9.63118553e-01f,
- 9.64427769e-01f,
- 9.65713739e-01f,
- 9.66976464e-01f,
- 9.68215883e-01f,
- 9.69431996e-01f,
- 9.70624685e-01f,
- 9.71794009e-01f,
- 9.72939968e-01f,
- 9.74062443e-01f,
- 9.75161433e-01f,
- 9.76236939e-01f,
- 9.77288961e-01f,
- 9.78317380e-01f,
- 9.79322255e-01f,
- 9.80303526e-01f,
- 9.81261134e-01f,
- 9.82195139e-01f,
- 9.83105481e-01f,
- 9.83992159e-01f,
- 9.84855056e-01f,
- 9.85694289e-01f,
- 9.86509740e-01f,
- 9.87301409e-01f,
- 9.88069296e-01f,
- 9.88813400e-01f,
- 9.89533663e-01f,
- 9.90230083e-01f,
- 9.90902662e-01f,
- 9.91551340e-01f,
- 9.92176116e-01f,
- 9.92776990e-01f,
- 9.93353963e-01f,
- 9.93906975e-01f,
- 9.94436026e-01f,
- 9.94941175e-01f,
- 9.95422304e-01f,
- 9.95879471e-01f,
- 9.96312618e-01f,
- 9.96721745e-01f,
- 9.97106910e-01f,
- 9.97467995e-01f,
- 9.97805059e-01f,
- 9.98118103e-01f,
- 9.98407066e-01f,
- 9.98672009e-01f,
- 9.98912871e-01f,
- 9.99129653e-01f,
- 9.99322355e-01f,
- 9.99491036e-01f,
- 9.99635577e-01f,
- 9.99756038e-01f,
- 9.99852419e-01f,
- 9.99924719e-01f,
- 9.99972880e-01f,
- 9.99996960e-01f
-};
-
-const float max_samples_to_rmlt_window[MAX_DCT_LENGTH] =
-{
- 1.22718432e-03f,
- 3.68154561e-03f,
- 6.13588467e-03f,
- 8.59018695e-03f,
- 1.10444371e-02f,
- 1.34986211e-02f,
- 1.59527231e-02f,
- 1.84067301e-02f,
- 2.08606254e-02f,
- 2.33143959e-02f,
- 2.57680248e-02f,
- 2.82214992e-02f,
- 3.06748040e-02f,
- 3.31279226e-02f,
- 3.55808437e-02f,
- 3.80335487e-02f,
- 4.04860228e-02f,
- 4.29382585e-02f,
- 4.53902297e-02f,
- 4.78419326e-02f,
- 5.02933450e-02f,
- 5.27444519e-02f,
- 5.51952459e-02f,
- 5.76457046e-02f,
- 6.00958169e-02f,
- 6.25455678e-02f,
- 6.49949387e-02f,
- 6.74439222e-02f,
- 6.98924959e-02f,
- 7.23406523e-02f,
- 7.47883692e-02f,
- 7.72356316e-02f,
- 7.96824396e-02f,
- 8.21287632e-02f,
- 8.45745876e-02f,
- 8.70199054e-02f,
- 8.94647017e-02f,
- 9.19089541e-02f,
- 9.43526551e-02f,
- 9.67957899e-02f,
- 9.92383435e-02f,
- 1.01680294e-01f,
- 1.04121633e-01f,
- 1.06562346e-01f,
- 1.09002419e-01f,
- 1.11441828e-01f,
- 1.13880575e-01f,
- 1.16318628e-01f,
- 1.18755989e-01f,
- 1.21192627e-01f,
- 1.23628542e-01f,
- 1.26063704e-01f,
- 1.28498107e-01f,
- 1.30931750e-01f,
- 1.33364588e-01f,
- 1.35796621e-01f,
- 1.38227850e-01f,
- 1.40658244e-01f,
- 1.43087775e-01f,
- 1.45516455e-01f,
- 1.47944272e-01f,
- 1.50371179e-01f,
- 1.52797192e-01f,
- 1.55222267e-01f,
- 1.57646418e-01f,
- 1.60069630e-01f,
- 1.62491858e-01f,
- 1.64913118e-01f,
- 1.67333379e-01f,
- 1.69752643e-01f,
- 1.72170877e-01f,
- 1.74588069e-01f,
- 1.77004218e-01f,
- 1.79419294e-01f,
- 1.81833297e-01f,
- 1.84246197e-01f,
- 1.86657995e-01f,
- 1.89068660e-01f,
- 1.91478193e-01f,
- 1.93886578e-01f,
- 1.96293786e-01f,
- 1.98699802e-01f,
- 2.01104641e-01f,
- 2.03508258e-01f,
- 2.05910638e-01f,
- 2.08311796e-01f,
- 2.10711688e-01f,
- 2.13110313e-01f,
- 2.15507656e-01f,
- 2.17903703e-01f,
- 2.20298439e-01f,
- 2.22691849e-01f,
- 2.25083917e-01f,
- 2.27474615e-01f,
- 2.29863957e-01f,
- 2.32251912e-01f,
- 2.34638467e-01f,
- 2.37023607e-01f,
- 2.39407316e-01f,
- 2.41789594e-01f,
- 2.44170398e-01f,
- 2.46549740e-01f,
- 2.48927608e-01f,
- 2.51303971e-01f,
- 2.53678799e-01f,
- 2.56052136e-01f,
- 2.58423895e-01f,
- 2.60794103e-01f,
- 2.63162762e-01f,
- 2.65529811e-01f,
- 2.67895281e-01f,
- 2.70259142e-01f,
- 2.72621363e-01f,
- 2.74981946e-01f,
- 2.77340859e-01f,
- 2.79698104e-01f,
- 2.82053679e-01f,
- 2.84407526e-01f,
- 2.86759704e-01f,
- 2.89110124e-01f,
- 2.91458815e-01f,
- 2.93805718e-01f,
- 2.96150893e-01f,
- 2.98494250e-01f,
- 3.00835848e-01f,
- 3.03175598e-01f,
- 3.05513531e-01f,
- 3.07849646e-01f,
- 3.10183883e-01f,
- 3.12516272e-01f,
- 3.14846754e-01f,
- 3.17175359e-01f,
- 3.19502026e-01f,
- 3.21826786e-01f,
- 3.24149609e-01f,
- 3.26470494e-01f,
- 3.28789383e-01f,
- 3.31106305e-01f,
- 3.33421230e-01f,
- 3.35734159e-01f,
- 3.38045061e-01f,
- 3.40353906e-01f,
- 3.42660725e-01f,
- 3.44965458e-01f,
- 3.47268134e-01f,
- 3.49568695e-01f,
- 3.51867169e-01f,
- 3.54163527e-01f,
- 3.56457740e-01f,
- 3.58749807e-01f,
- 3.61039728e-01f,
- 3.63327444e-01f,
- 3.65612984e-01f,
- 3.67896348e-01f,
- 3.70177478e-01f,
- 3.72456372e-01f,
- 3.74733001e-01f,
- 3.77007425e-01f,
- 3.79279524e-01f,
- 3.81549388e-01f,
- 3.83816928e-01f,
- 3.86082143e-01f,
- 3.88345033e-01f,
- 3.90605599e-01f,
- 3.92863810e-01f,
- 3.95119667e-01f,
- 3.97373140e-01f,
- 3.99624199e-01f,
- 4.01872873e-01f,
- 4.04119104e-01f,
- 4.06362921e-01f,
- 4.08604264e-01f,
- 4.10843164e-01f,
- 4.13079590e-01f,
- 4.15313542e-01f,
- 4.17544961e-01f,
- 4.19773877e-01f,
- 4.22000259e-01f,
- 4.24224108e-01f,
- 4.26445425e-01f,
- 4.28664148e-01f,
- 4.30880278e-01f,
- 4.33093816e-01f,
- 4.35304761e-01f,
- 4.37513083e-01f,
- 4.39718753e-01f,
- 4.41921771e-01f,
- 4.44122136e-01f,
- 4.46319848e-01f,
- 4.48514849e-01f,
- 4.50707138e-01f,
- 4.52896714e-01f,
- 4.55083579e-01f,
- 4.57267702e-01f,
- 4.59449053e-01f,
- 4.61627662e-01f,
- 4.63803470e-01f,
- 4.65976506e-01f,
- 4.68146712e-01f,
- 4.70314115e-01f,
- 4.72478658e-01f,
- 4.74640369e-01f,
- 4.76799220e-01f,
- 4.78955209e-01f,
- 4.81108308e-01f,
- 4.83258516e-01f,
- 4.85405803e-01f,
- 4.87550169e-01f,
- 4.89691585e-01f,
- 4.91830051e-01f,
- 4.93965566e-01f,
- 4.96098131e-01f,
- 4.98227656e-01f,
- 5.00354230e-01f,
- 5.02477765e-01f,
- 5.04598260e-01f,
- 5.06715715e-01f,
- 5.08830130e-01f,
- 5.10941505e-01f,
- 5.13049781e-01f,
- 5.15154958e-01f,
- 5.17257035e-01f,
- 5.19356012e-01f,
- 5.21451831e-01f,
- 5.23544490e-01f,
- 5.25634050e-01f,
- 5.27720451e-01f,
- 5.29803634e-01f,
- 5.31883657e-01f,
- 5.33960402e-01f,
- 5.36033988e-01f,
- 5.38104355e-01f,
- 5.40171444e-01f,
- 5.42235315e-01f,
- 5.44295907e-01f,
- 5.46353221e-01f,
- 5.48407257e-01f,
- 5.50457954e-01f,
- 5.52505374e-01f,
- 5.54549456e-01f,
- 5.56590199e-01f,
- 5.58627546e-01f,
- 5.60661554e-01f,
- 5.62692225e-01f,
- 5.64719439e-01f,
- 5.66743314e-01f,
- 5.68763733e-01f,
- 5.70780754e-01f,
- 5.72794318e-01f,
- 5.74804425e-01f,
- 5.76811075e-01f,
- 5.78814268e-01f,
- 5.80813944e-01f,
- 5.82810163e-01f,
- 5.84802806e-01f,
- 5.86791992e-01f,
- 5.88777602e-01f,
- 5.90759695e-01f,
- 5.92738211e-01f,
- 5.94713151e-01f,
- 5.96684515e-01f,
- 5.98652303e-01f,
- 6.00616455e-01f,
- 6.02577031e-01f,
- 6.04533970e-01f,
- 6.06487215e-01f,
- 6.08436823e-01f,
- 6.10382795e-01f,
- 6.12325072e-01f,
- 6.14263654e-01f,
- 6.16198599e-01f,
- 6.18129730e-01f,
- 6.20057225e-01f,
- 6.21980906e-01f,
- 6.23900890e-01f,
- 6.25817120e-01f,
- 6.27729595e-01f,
- 6.29638255e-01f,
- 6.31543100e-01f,
- 6.33444190e-01f,
- 6.35341406e-01f,
- 6.37234867e-01f,
- 6.39124453e-01f,
- 6.41010165e-01f,
- 6.42892063e-01f,
- 6.44770086e-01f,
- 6.46644175e-01f,
- 6.48514390e-01f,
- 6.50380731e-01f,
- 6.52243137e-01f,
- 6.54101610e-01f,
- 6.55956089e-01f,
- 6.57806695e-01f,
- 6.59653306e-01f,
- 6.61495924e-01f,
- 6.63334608e-01f,
- 6.65169239e-01f,
- 6.66999936e-01f,
- 6.68826580e-01f,
- 6.70649171e-01f,
- 6.72467709e-01f,
- 6.74282253e-01f,
- 6.76092684e-01f,
- 6.77899063e-01f,
- 6.79701388e-01f,
- 6.81499600e-01f,
- 6.83293700e-01f,
- 6.85083687e-01f,
- 6.86869502e-01f,
- 6.88651264e-01f,
- 6.90428793e-01f,
- 6.92202210e-01f,
- 6.93971455e-01f,
- 6.95736527e-01f,
- 6.97497368e-01f,
- 6.99254036e-01f,
- 7.01006532e-01f,
- 7.02754736e-01f,
- 7.04498768e-01f,
- 7.06238508e-01f,
- 7.07974017e-01f,
- 7.09705234e-01f,
- 7.11432219e-01f,
- 7.13154852e-01f,
- 7.14873254e-01f,
- 7.16587305e-01f,
- 7.18297064e-01f,
- 7.20002532e-01f,
- 7.21703589e-01f,
- 7.23400354e-01f,
- 7.25092709e-01f,
- 7.26780772e-01f,
- 7.28464365e-01f,
- 7.30143666e-01f,
- 7.31818497e-01f,
- 7.33488917e-01f,
- 7.35154986e-01f,
- 7.36816585e-01f,
- 7.38473713e-01f,
- 7.40126431e-01f,
- 7.41774678e-01f,
- 7.43418455e-01f,
- 7.45057762e-01f,
- 7.46692598e-01f,
- 7.48322904e-01f,
- 7.49948740e-01f,
- 7.51570046e-01f,
- 7.53186822e-01f,
- 7.54799008e-01f,
- 7.56406724e-01f,
- 7.58009851e-01f,
- 7.59608388e-01f,
- 7.61202395e-01f,
- 7.62791812e-01f,
- 7.64376581e-01f,
- 7.65956819e-01f,
- 7.67532349e-01f,
- 7.69103348e-01f,
- 7.70669639e-01f,
- 7.72231340e-01f,
- 7.73788393e-01f,
- 7.75340736e-01f,
- 7.76888490e-01f,
- 7.78431475e-01f,
- 7.79969811e-01f,
- 7.81503439e-01f,
- 7.83032358e-01f,
- 7.84556568e-01f,
- 7.86076069e-01f,
- 7.87590802e-01f,
- 7.89100826e-01f,
- 7.90606081e-01f,
- 7.92106569e-01f,
- 7.93602288e-01f,
- 7.95093238e-01f,
- 7.96579361e-01f,
- 7.98060715e-01f,
- 7.99537241e-01f,
- 8.01008999e-01f,
- 8.02475870e-01f,
- 8.03937972e-01f,
- 8.05395186e-01f,
- 8.06847572e-01f,
- 8.08295071e-01f,
- 8.09737682e-01f,
- 8.11175466e-01f,
- 8.12608361e-01f,
- 8.14036310e-01f,
- 8.15459430e-01f,
- 8.16877604e-01f,
- 8.18290830e-01f,
- 8.19699109e-01f,
- 8.21102500e-01f,
- 8.22500944e-01f,
- 8.23894441e-01f,
- 8.25282931e-01f,
- 8.26666474e-01f,
- 8.28045070e-01f,
- 8.29418600e-01f,
- 8.30787182e-01f,
- 8.32150757e-01f,
- 8.33509326e-01f,
- 8.34862888e-01f,
- 8.36211383e-01f,
- 8.37554872e-01f,
- 8.38893294e-01f,
- 8.40226650e-01f,
- 8.41554999e-01f,
- 8.42878222e-01f,
- 8.44196379e-01f,
- 8.45509470e-01f,
- 8.46817434e-01f,
- 8.48120332e-01f,
- 8.49418104e-01f,
- 8.50710809e-01f,
- 8.51998329e-01f,
- 8.53280723e-01f,
- 8.54557991e-01f,
- 8.55830133e-01f,
- 8.57097089e-01f,
- 8.58358860e-01f,
- 8.59615505e-01f,
- 8.60866964e-01f,
- 8.62113178e-01f,
- 8.63354266e-01f,
- 8.64590168e-01f,
- 8.65820825e-01f,
- 8.67046237e-01f,
- 8.68266463e-01f,
- 8.69481444e-01f,
- 8.70691240e-01f,
- 8.71895730e-01f,
- 8.73094976e-01f,
- 8.74288976e-01f,
- 8.75477731e-01f,
- 8.76661181e-01f,
- 8.77839327e-01f,
- 8.79012227e-01f,
- 8.80179822e-01f,
- 8.81342113e-01f,
- 8.82499099e-01f,
- 8.83650780e-01f,
- 8.84797096e-01f,
- 8.85938108e-01f,
- 8.87073815e-01f,
- 8.88204098e-01f,
- 8.89329076e-01f,
- 8.90448749e-01f,
- 8.91562998e-01f,
- 8.92671883e-01f,
- 8.93775403e-01f,
- 8.94873500e-01f,
- 8.95966232e-01f,
- 8.97053599e-01f,
- 8.98135543e-01f,
- 8.99212062e-01f,
- 9.00283158e-01f,
- 9.01348829e-01f,
- 9.02409077e-01f,
- 9.03463900e-01f,
- 9.04513299e-01f,
- 9.05557215e-01f,
- 9.06595707e-01f,
- 9.07628715e-01f,
- 9.08656240e-01f,
- 9.09678340e-01f,
- 9.10694897e-01f,
- 9.11706030e-01f,
- 9.12711620e-01f,
- 9.13711786e-01f,
- 9.14706349e-01f,
- 9.15695488e-01f,
- 9.16679084e-01f,
- 9.17657137e-01f,
- 9.18629646e-01f,
- 9.19596672e-01f,
- 9.20558095e-01f,
- 9.21514034e-01f,
- 9.22464430e-01f,
- 9.23409224e-01f,
- 9.24348474e-01f,
- 9.25282121e-01f,
- 9.26210225e-01f,
- 9.27132785e-01f,
- 9.28049684e-01f,
- 9.28961039e-01f,
- 9.29866791e-01f,
- 9.30766940e-01f,
- 9.31661487e-01f,
- 9.32550430e-01f,
- 9.33433771e-01f,
- 9.34311450e-01f,
- 9.35183525e-01f,
- 9.36049938e-01f,
- 9.36910748e-01f,
- 9.37765896e-01f,
- 9.38615382e-01f,
- 9.39459205e-01f,
- 9.40297425e-01f,
- 9.41129923e-01f,
- 9.41956758e-01f,
- 9.42777932e-01f,
- 9.43593442e-01f,
- 9.44403291e-01f,
- 9.45207417e-01f,
- 9.46005821e-01f,
- 9.46798563e-01f,
- 9.47585583e-01f,
- 9.48366940e-01f,
- 9.49142516e-01f,
- 9.49912429e-01f,
- 9.50676560e-01f,
- 9.51435030e-01f,
- 9.52187717e-01f,
- 9.52934682e-01f,
- 9.53675926e-01f,
- 9.54411447e-01f,
- 9.55141187e-01f,
- 9.55865145e-01f,
- 9.56583381e-01f,
- 9.57295835e-01f,
- 9.58002567e-01f,
- 9.58703458e-01f,
- 9.59398627e-01f,
- 9.60088015e-01f,
- 9.60771620e-01f,
- 9.61449385e-01f,
- 9.62121427e-01f,
- 9.62787628e-01f,
- 9.63448048e-01f,
- 9.64102626e-01f,
- 9.64751422e-01f,
- 9.65394437e-01f,
- 9.66031611e-01f,
- 9.66663003e-01f,
- 9.67288494e-01f,
- 9.67908204e-01f,
- 9.68522072e-01f,
- 9.69130158e-01f,
- 9.69732344e-01f,
- 9.70328689e-01f,
- 9.70919251e-01f,
- 9.71503913e-01f,
- 9.72082734e-01f,
- 9.72655654e-01f,
- 9.73222792e-01f,
- 9.73784029e-01f,
- 9.74339366e-01f,
- 9.74888861e-01f,
- 9.75432515e-01f,
- 9.75970268e-01f,
- 9.76502120e-01f,
- 9.77028131e-01f,
- 9.77548242e-01f,
- 9.78062451e-01f,
- 9.78570819e-01f,
- 9.79073226e-01f,
- 9.79569793e-01f,
- 9.80060399e-01f,
- 9.80545104e-01f,
- 9.81023967e-01f,
- 9.81496871e-01f,
- 9.81963873e-01f,
- 9.82424974e-01f,
- 9.82880116e-01f,
- 9.83329356e-01f,
- 9.83772695e-01f,
- 9.84210074e-01f,
- 9.84641552e-01f,
- 9.85067070e-01f,
- 9.85486686e-01f,
- 9.85900342e-01f,
- 9.86308098e-01f,
- 9.86709893e-01f,
- 9.87105727e-01f,
- 9.87495601e-01f,
- 9.87879574e-01f,
- 9.88257587e-01f,
- 9.88629639e-01f,
- 9.88995671e-01f,
- 9.89355803e-01f,
- 9.89709973e-01f,
- 9.90058184e-01f,
- 9.90400434e-01f,
- 9.90736723e-01f,
- 9.91067052e-01f,
- 9.91391361e-01f,
- 9.91709769e-01f,
- 9.92022157e-01f,
- 9.92328584e-01f,
- 9.92628992e-01f,
- 9.92923498e-01f,
- 9.93211925e-01f,
- 9.93494451e-01f,
- 9.93770957e-01f,
- 9.94041502e-01f,
- 9.94306028e-01f,
- 9.94564593e-01f,
- 9.94817138e-01f,
- 9.95063663e-01f,
- 9.95304286e-01f,
- 9.95538831e-01f,
- 9.95767415e-01f,
- 9.95989978e-01f,
- 9.96206582e-01f,
- 9.96417165e-01f,
- 9.96621728e-01f,
- 9.96820271e-01f,
- 9.97012854e-01f,
- 9.97199416e-01f,
- 9.97379959e-01f,
- 9.97554541e-01f,
- 9.97723043e-01f,
- 9.97885585e-01f,
- 9.98042107e-01f,
- 9.98192608e-01f,
- 9.98337090e-01f,
- 9.98475552e-01f,
- 9.98608053e-01f,
- 9.98734474e-01f,
- 9.98854935e-01f,
- 9.98969316e-01f,
- 9.99077737e-01f,
- 9.99180079e-01f,
- 9.99276459e-01f,
- 9.99366820e-01f,
- 9.99451101e-01f,
- 9.99529421e-01f,
- 9.99601722e-01f,
- 9.99667943e-01f,
- 9.99728203e-01f,
- 9.99782383e-01f,
- 9.99830604e-01f,
- 9.99872744e-01f,
- 9.99908864e-01f,
- 9.99939024e-01f,
- 9.99963105e-01f,
- 9.99981165e-01f,
- 9.99993205e-01f,
- 9.99999225e-01f
-};
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * table.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "g722_1/g722_1.h"
-
-#include "defs.h"
-#include "tables.h"
-
-const int16_t vector_dimension[NUM_CATEGORIES] =
-{
- 2, 2, 2, 4, 4, 5, 5, 1
-};
-
-const int16_t number_of_vectors[NUM_CATEGORIES] =
-{
- 10, 10, 10, 5, 5, 4, 4, 20
-};
-/* The last category isn't really coded with scalar quantization. */
-
-const int16_t max_bin[NUM_CATEGORIES] =
-{
- 13, 9, 6, 4, 3, 2, 1, 1
-};
-
-const int16_t max_bin_plus_one_inverse[NUM_CATEGORIES] =
-{
- 2341, 3277, 4682, 6554, 8193, 10923, 16385, 16385
-};
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t int_region_standard_deviation_table[REGION_POWER_TABLE_SIZE] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 1, 1, 1, 2, 3, 4, 6,
- 8, 11, 16, 23, 32, 45, 64, 91, 128, 181,
- 256, 362, 512, 724, 1024, 1448, 2048, 2896, 4096, 5793,
- 8192, 11585, 16384, 23170, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
-#else
-const float region_standard_deviation_table[REGION_POWER_TABLE_SIZE] =
-{
- 2.441406247570224e-04f,
- 3.452669826719395e-04f,
- 4.882812495545411e-04f,
- 6.905339654011486e-04f,
- 9.765624991900746e-04f,
- 1.381067930916839e-03f,
- 1.953124998542134e-03f,
- 2.762135862062757e-03f,
- 3.906249997408239e-03f,
- 5.524271724583683e-03f,
- 7.812499995464418e-03f,
- 1.104854345008369e-02f,
- 1.562499999222472e-02f,
- 2.209708690200003e-02f,
- 3.124999998704119e-02f,
- 4.419417380766535e-02f,
- 6.249999997926591e-02f,
- 8.838834762266132e-02f,
- 1.249999999688989e-01f,
- 1.767766952599839e-01f,
- 2.499999999585318e-01f,
- 3.535533905492901e-01f,
- 4.999999999585318e-01f,
- 7.071067811572251e-01f,
- 1.000000000000000e+00f,
- 1.414213562431740e+00f,
- 2.000000000165873e+00f,
- 2.828427125098059e+00f,
- 4.000000000663491e+00f,
- 5.656854250665278e+00f,
- 8.000000001990472e+00f,
- 1.131370850226887e+01f,
- 1.600000000530792e+01f,
- 2.262741700641438e+01f,
- 3.200000001326981e+01f,
- 4.525483401658204e+01f,
- 6.400000003184756e+01f,
- 9.050966804067060e+01f,
- 1.280000000743110e+02f,
- 1.810193360963542e+02f,
- 2.560000001698536e+02f,
- 3.620386722227349e+02f,
- 5.120000003821707e+02f,
- 7.240773445055215e+02f,
- 1.024000000849268e+03f,
- 1.448154689131149e+03f,
- 2.048000001868390e+03f,
- 2.896309378502505e+03f,
- 4.096000004076487e+03f,
- 5.792618757485434e+03f,
- 8.192000008832390e+03f,
- 1.158523751593169e+04f,
- 1.638400001902361e+04f,
- 2.317047503378509e+04f,
- 3.276800004076484e+04f,
- 4.634095007141347e+04f,
- 6.553600008696507e+04f,
- 9.268190015051374e+04f,
- 1.310720001848009e+05f,
- 1.853638003164007e+05f,
- 2.621440003913428e+05f,
- 3.707276006635486e+05f,
- 5.242880008261676e+05f,
- 7.414552013885899e+05f
-};
-#endif
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE] =
-{
- 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
- 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
- 32767, 32767, 32767, 32767, 32767, 23170, 16384, 11585, 8192, 5793,
- 4096, 2896, 2048, 1448, 1024, 724, 512, 362, 256, 181,
- 128, 91, 64, 45, 32, 23, 16, 11, 8, 6,
- 4, 3, 2, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 0
-};
-#else
-const float standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE] =
-{
- 4.096000004076488e+03f,
- 2.896309378502504e+03f,
- 2.048000001868390e+03f,
- 1.448154689131149e+03f,
- 1.024000000849268e+03f,
- 7.240773445055215e+02f,
- 5.120000003821708e+02f,
- 3.620386722227349e+02f,
- 2.560000001698537e+02f,
- 1.810193360963542e+02f,
- 1.280000000743110e+02f,
- 9.050966804067060e+01f,
- 6.400000003184756e+01f,
- 4.525483401658203e+01f,
- 3.200000001326982e+01f,
- 2.262741700641438e+01f,
- 1.600000000530793e+01f,
- 1.131370850226887e+01f,
- 8.000000001990474e+00f,
- 5.656854250665277e+00f,
- 4.000000000663491e+00f,
- 2.828427125098059e+00f,
- 2.000000000165873e+00f,
- 1.414213562431740e+00f,
- 1.000000000000000e+00f,
- 7.071067811572251e-01f,
- 4.999999999585318e-01f,
- 3.535533905492901e-01f,
- 2.499999999585318e-01f,
- 1.767766952599838e-01f,
- 1.249999999688989e-01f,
- 8.838834762266132e-02f,
- 6.249999997926592e-02f,
- 4.419417380766535e-02f,
- 3.124999998704120e-02f,
- 2.209708690200002e-02f,
- 1.562499999222472e-02f,
- 1.104854345008369e-02f,
- 7.812499995464418e-03f,
- 5.524271724583683e-03f,
- 3.906249997408239e-03f,
- 2.762135862062757e-03f,
- 1.953124998542134e-03f,
- 1.381067930916839e-03f,
- 9.765624991900747e-04f,
- 6.905339654011486e-04f,
- 4.882812495545411e-04f,
- 3.452669826719394e-04f,
- 2.441406247570224e-04f,
- 1.726334913216520e-04f,
- 1.220703123683871e-04f,
- 8.631674565366727e-05f,
- 6.103515617913153e-05f,
- 4.315837282325419e-05f,
- 3.051757808703478e-05f,
- 2.157918640983742e-05f,
- 1.525878904225187e-05f,
- 1.078959320402385e-05f,
- 7.629394520493171e-06f,
- 5.394796601564505e-06f,
- 3.814697259930213e-06f,
- 2.697398300558537e-06f,
- 1.907348629806920e-06f,
- 1.348699150167414e-06f
-};
-#endif
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t step_size_inverse_table[NUM_CATEGORIES] =
-{
- 23167,
- 16384,
- 11585,
- 8192,
- 5793,
- 4096,
- 2896,
- 2896
-};
-#else
-/* The last category isn't really coded with scalar quantization. */
-const float step_size[NUM_CATEGORIES] =
-{
- 0.3536f,
- 0.5f,
- 0.7071f,
- 1.0f,
- 1.4142f,
- 2.0f,
- 2.8284f,
- 2.8284f
-};
-
-const float step_size_inverse_table[NUM_CATEGORIES] =
-{
- 2.82805443e+00f,
- 2.00000000e+00f,
- 1.41422713e+00f,
- 1.00000000e+00f,
- 7.07113564e-01f,
- 5.00000000e-01f,
- 3.53556782e-01f,
- 3.53556782e-01f
-};
-#endif
-
-#if defined(G722_1_USE_FIXED_POINT)
-const int16_t int_dead_zone[NUM_CATEGORIES] =
-{
- 2457, 2703, 2949, 3195 , 3440, 3686, 4096, 4096
-};
-
-const int16_t int_dead_zone_low_bits[NUM_CATEGORIES] =
-{
- 2, 1, 0, 0, 3, 2, 0, 0
-};
-#else
-const float dead_zone[NUM_CATEGORIES] =
-{
- 0.3f,
- 0.33f,
- 0.36f,
- 0.39f,
- 0.42f,
- 0.45f,
- 0.5f,
- 0.5f
-};
-#endif
-
-#if !defined(G722_1_USE_FIXED_POINT)
-const float region_power_table[REGION_POWER_TABLE_SIZE] =
-{
- 5.96046448e-08f,
- 1.19209290e-07f,
- 2.38418579e-07f,
- 4.76837158e-07f,
- 9.53674316e-07f,
- 1.90734863e-06f,
- 3.81469727e-06f,
- 7.62939453e-06f,
- 1.52587891e-05f,
- 3.05175781e-05f,
- 6.10351562e-05f,
- 1.22070312e-04f,
- 2.44140625e-04f,
- 4.88281250e-04f,
- 9.76562500e-04f,
- 1.95312500e-03f,
- 3.90625000e-03f,
- 7.81250000e-03f,
- 1.56250000e-02f,
- 3.12500000e-02f,
- 6.25000000e-02f,
- 1.25000000e-01f,
- 2.50000000e-01f,
- 5.00000000e-01f,
- 1.00000000e+00f,
- 2.00000000e+00f,
- 4.00000000e+00f,
- 8.00000000e+00f,
- 1.60000000e+01f,
- 3.20000000e+01f,
- 6.40000000e+01f,
- 1.28000000e+02f,
- 2.56000000e+02f,
- 5.12000000e+02f,
- 1.02400000e+03f,
- 2.04800000e+03f,
- 4.09600000e+03f,
- 8.19200000e+03f,
- 1.63840000e+04f,
- 3.27680000e+04f,
- 6.55360000e+04f,
- 1.31072000e+05f,
- 2.62144000e+05f,
- 5.24288000e+05f,
- 1.04857600e+06f,
- 2.09715200e+06f,
- 4.19430400e+06f,
- 8.38860800e+06f,
- 1.67772160e+07f,
- 3.35544320e+07f,
- 6.71088640e+07f,
- 1.34217728e+08f,
- 2.68435456e+08f,
- 5.36870912e+08f,
- 1.07374182e+09f,
- 2.14748365e+09f,
- 4.29496730e+09f,
- 8.58993459e+09f,
- 1.71798692e+10f,
- 3.43597384e+10f,
- 6.87194767e+10f,
- 1.37438953e+11f,
- 2.74877907e+11f,
- 5.49755814e+11f
-};
-
-const float region_power_table_boundary[REGION_POWER_TABLE_SIZE - 1] =
-{
- 8.42936956e-08f,
- 1.68587391e-07f,
- 3.37174782e-07f,
- 6.74349565e-07f,
- 1.34869913e-06f,
- 2.69739826e-06f,
- 5.39479652e-06f,
- 1.07895930e-05f,
- 2.15791861e-05f,
- 4.31583721e-05f,
- 8.63167443e-05f,
- 1.72633489e-04f,
- 3.45266977e-04f,
- 6.90533954e-04f,
- 1.38106791e-03f,
- 2.76213582e-03f,
- 5.52427163e-03f,
- 1.10485433e-02f,
- 2.20970865e-02f,
- 4.41941731e-02f,
- 8.83883461e-02f,
- 1.76776692e-01f,
- 3.53553385e-01f,
- 7.07106769e-01f,
- 1.41421354e+00f,
- 2.82842708e+00f,
- 5.65685415e+00f,
- 1.13137083e+01f,
- 2.26274166e+01f,
- 4.52548332e+01f,
- 9.05096664e+01f,
- 1.81019333e+02f,
- 3.62038666e+02f,
- 7.24077332e+02f,
- 1.44815466e+03f,
- 2.89630933e+03f,
- 5.79261865e+03f,
- 1.15852373e+04f,
- 2.31704746e+04f,
- 4.63409492e+04f,
- 9.26818984e+04f,
- 1.85363797e+05f,
- 3.70727594e+05f,
- 7.41455188e+05f,
- 1.48291038e+06f,
- 2.96582075e+06f,
- 5.93164150e+06f,
- 1.18632830e+07f,
- 2.37265660e+07f,
- 4.74531320e+07f,
- 9.49062640e+07f,
- 1.89812528e+08f,
- 3.79625056e+08f,
- 7.59250112e+08f,
- 1.51850022e+09f,
- 3.03700045e+09f,
- 6.07400090e+09f,
- 1.21480018e+10f,
- 2.42960036e+10f,
- 4.85920072e+10f,
- 9.71840143e+10f,
- 1.94368029e+11f,
- 3.88736057e+11f
-};
-#endif
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * tables.h
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-#define REGION_POWER_TABLE_SIZE 64
-#define NUM_CATEGORIES 8
-
-extern const int16_t vector_dimension[NUM_CATEGORIES];
-extern const int16_t number_of_vectors[NUM_CATEGORIES];
-/* The last category isn't really coded with scalar quantization. */
-extern const int16_t max_bin[NUM_CATEGORIES];
-extern const int16_t max_bin_plus_one_inverse[NUM_CATEGORIES];
-
-#if defined(G722_1_USE_FIXED_POINT)
-extern const int16_t int_region_standard_deviation_table[REGION_POWER_TABLE_SIZE];
-extern const int16_t standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE];
-extern const int16_t step_size_inverse_table[NUM_CATEGORIES];
-extern const int16_t int_dead_zone[NUM_CATEGORIES];
-extern const int16_t int_dead_zone_low_bits[NUM_CATEGORIES];
-extern const int16_t samples_to_rmlt_window[DCT_LENGTH];
-extern const int16_t max_samples_to_rmlt_window[MAX_DCT_LENGTH];
-extern const int16_t rmlt_to_samples_window[DCT_LENGTH];
-extern const int16_t max_rmlt_to_samples_window[MAX_DCT_LENGTH];
-#else
-extern const float region_standard_deviation_table[REGION_POWER_TABLE_SIZE];
-extern const float standard_deviation_inverse_table[REGION_POWER_TABLE_SIZE];
-extern const float step_size_inverse_table[NUM_CATEGORIES];
-extern const float dead_zone[NUM_CATEGORIES];
-extern const float samples_to_rmlt_window[DCT_LENGTH];
-extern const float max_samples_to_rmlt_window[MAX_DCT_LENGTH];
-extern const float rmlt_to_samples_window[DCT_LENGTH];
-extern const float max_rmlt_to_samples_window[MAX_DCT_LENGTH];
-
-extern const float step_size[NUM_CATEGORIES];
-extern const float region_power_table[REGION_POWER_TABLE_SIZE];
-extern const float region_power_table_boundary[REGION_POWER_TABLE_SIZE - 1];
-#endif
-
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * utilities.c
- *
- * Copyright (C) 2006 Steve Underwood
- *
- * 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.
- */
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#include <inttypes.h>
-
-#if defined(G722_1_USE_MMX)
-#include <mmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE)
-#include <xmmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE2)
-#include <emmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE3)
-#include <pmmintrin.h>
-#include <tmmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE4_1)
-#include <smmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE4_2)
-#include <nmmintrin.h>
-#endif
-#if defined(G722_1_USE_SSE4A)
-#include <ammintrin.h>
-#endif
-#if defined(G722_1_USE_SSE5)
-#include <bmmintrin.h>
-#endif
-
-#include "utilities.h"
-
-#if defined(G722_1_USE_FIXED_POINT)
-void vec_copyi16(int16_t z[], const int16_t x[], int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i];
-}
-/*- End of function --------------------------------------------------------*/
-
-int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n)
-{
- int32_t z;
-
-#if defined(__GNUC__) && defined(G722_1_USE_MMX)
-#if defined(__x86_64__)
- __asm__ __volatile__(
- " emms;\n"
- " pxor %%mm0,%%mm0;\n"
- " leal -32(%%rsi,%%eax,2),%%edx;\n" /* edx = top - 32 */
-
- " cmpl %%rdx,%%rsi;\n"
- " ja 1f;\n"
-
- /* Work in blocks of 16 int16_t's until we are near the end */
- " .p2align 2;\n"
- "2:\n"
- " movq (%%rdi),%%mm1;\n"
- " movq (%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 8(%%rdi),%%mm1;\n"
- " movq 8(%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 16(%%rdi),%%mm1;\n"
- " movq 16(%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 24(%%rdi),%%mm1;\n"
- " movq 24(%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $32,%%rsi;\n"
- " addl $32,%%rdi;\n"
- " cmpl %%rdx,%%rsi;\n"
- " jbe 2b;\n"
-
- " .p2align 2;\n"
- "1:\n"
- " addl $24,%%rdx;\n" /* Now edx = top - 8 */
- " cmpl %%rdx,%%rsi;\n"
- " ja 3f;\n"
-
- /* Work in blocks of 4 int16_t's until we are near the end */
- " .p2align 2;\n"
- "4:\n"
- " movq (%%rdi),%%mm1;\n"
- " movq (%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $8,%%rsi;\n"
- " addl $8,%%rdi;\n"
- " cmpl %%rdx,%%rsi;"
- " jbe 4b;\n"
-
- " .p2align 2;\n"
- "3:\n"
- " addl $4,%%rdx;\n" /* Now edx = top - 4 */
- " cmpl %%rdx,%%rsi;\n"
- " ja 5f;\n"
-
- /* Work in a block of 2 int16_t's */
- " movd (%%rdi),%%mm1;\n"
- " movd (%%rsi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $4,%%rsi;\n"
- " addl $4,%%rdi;\n"
-
- " .p2align 2;\n"
- "5:\n"
- " addl $2,%%rdx;\n" /* Now edx = top - 2 */
- " cmpl %%rdx,%%rsi;\n"
- " ja 6f;\n"
-
- /* Deal with the very last int16_t, when n is odd */
- " movswl (%%rdi),%%eax;\n"
- " andl $65535,%%eax;\n"
- " movd %%eax,%%mm1;\n"
- " movswl (%%rsi),%%eax;\n"
- " andl $65535,%%eax;\n"
- " movd %%eax,%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " .p2align 2;\n"
- "6:\n"
- /* Merge the pieces of the answer */
- " movq %%mm0,%%mm1;\n"
- " punpckhdq %%mm0,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- /* Et voila, eax has the final result */
- " movd %%mm0,%%eax;\n"
-
- " emms;\n"
- : "=a" (z)
- : "S" (x), "D" (y), "a" (n)
- : "cc"
- );
-#else
- __asm__ __volatile__(
- " emms;\n"
- " pxor %%mm0,%%mm0;\n"
- " leal -32(%%esi,%%eax,2),%%edx;\n" /* edx = top - 32 */
-
- " cmpl %%edx,%%esi;\n"
- " ja 1f;\n"
-
- /* Work in blocks of 16 int16_t's until we are near the end */
- " .p2align 2;\n"
- "2:\n"
- " movq (%%edi),%%mm1;\n"
- " movq (%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 8(%%edi),%%mm1;\n"
- " movq 8(%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 16(%%edi),%%mm1;\n"
- " movq 16(%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- " movq 24(%%edi),%%mm1;\n"
- " movq 24(%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $32,%%esi;\n"
- " addl $32,%%edi;\n"
- " cmpl %%edx,%%esi;\n"
- " jbe 2b;\n"
-
- " .p2align 2;\n"
- "1:\n"
- " addl $24,%%edx;\n" /* Now edx = top - 8 */
- " cmpl %%edx,%%esi;\n"
- " ja 3f;\n"
-
- /* Work in blocks of 4 int16_t's until we are near the end */
- " .p2align 2;\n"
- "4:\n"
- " movq (%%edi),%%mm1;\n"
- " movq (%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $8,%%esi;\n"
- " addl $8,%%edi;\n"
- " cmpl %%edx,%%esi;"
- " jbe 4b;\n"
-
- " .p2align 2;\n"
- "3:\n"
- " addl $4,%%edx;\n" /* Now edx = top - 4 */
- " cmpl %%edx,%%esi;\n"
- " ja 5f;\n"
-
- /* Work in a block of 2 int16_t's */
- " movd (%%edi),%%mm1;\n"
- " movd (%%esi),%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " addl $4,%%esi;\n"
- " addl $4,%%edi;\n"
-
- " .p2align 2;\n"
- "5:\n"
- " addl $2,%%edx;\n" /* Now edx = top - 2 */
- " cmpl %%edx,%%esi;\n"
- " ja 6f;\n"
-
- /* Deal with the very last int16_t, when n is odd */
- " movswl (%%edi),%%eax;\n"
- " andl $65535,%%eax;\n"
- " movd %%eax,%%mm1;\n"
- " movswl (%%esi),%%eax;\n"
- " andl $65535,%%eax;\n"
- " movd %%eax,%%mm2;\n"
- " pmaddwd %%mm2,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
-
- " .p2align 2;\n"
- "6:\n"
- /* Merge the pieces of the answer */
- " movq %%mm0,%%mm1;\n"
- " punpckhdq %%mm0,%%mm1;\n"
- " paddd %%mm1,%%mm0;\n"
- /* Et voila, eax has the final result */
- " movd %%mm0,%%eax;\n"
-
- " emms;\n"
- : "=a" (z)
- : "S" (x), "D" (y), "a" (n)
- : "cc"
- );
-#endif
-#else
- int i;
-
- z = 0;
- for (i = 0; i < n; i++)
- z += (int32_t) x[i]*(int32_t) y[i];
-#endif
- return z;
-}
-/*- End of function --------------------------------------------------------*/
-#else
-#if defined(__GNUC__) && defined(G722_1_USE_SSE2)
-void vec_copyf(float z[], const float x[], int n)
-{
- int i;
- __m128 n1;
-
- if ((i = n & ~3))
- {
- for (i -= 4; i >= 0; i -= 4)
- {
- n1 = _mm_loadu_ps(x + i);
- _mm_storeu_ps(z + i, n1);
- }
- }
- /* Now deal with the last 1 to 3 elements, which don't fill an SSE2 register */
- switch (n & 3)
- {
- case 3:
- z[n - 3] = x[n - 3];
- case 2:
- z[n - 2] = x[n - 2];
- case 1:
- z[n - 1] = x[n - 1];
- }
-}
-#else
-void vec_copyf(float z[], const float x[], int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i];
-}
-#endif
-/*- End of function --------------------------------------------------------*/
-
-#if defined(__GNUC__) && defined(G722_1_USE_SSE2)
-void vec_zerof(float z[], int n)
-{
- int i;
- __m128 n1;
-
- if ((i = n & ~3))
- {
- n1 = _mm_setzero_ps();
- for (i -= 4; i >= 0; i -= 4)
- _mm_storeu_ps(z + i, n1);
- }
- /* Now deal with the last 1 to 3 elements, which don't fill an SSE2 register */
- switch (n & 3)
- {
- case 3:
- z[n - 3] = 0;
- case 2:
- z[n - 2] = 0;
- case 1:
- z[n - 1] = 0;
- }
-}
-#else
-void vec_zerof(float z[], int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = 0.0f;
-}
-#endif
-/*- End of function --------------------------------------------------------*/
-
-void vec_subf(float z[], const float x[], const float y[], int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i] - y[i];
-}
-/*- End of function --------------------------------------------------------*/
-
-#if defined(__GNUC__) && defined(G722_1_USE_SSE2)
-void vec_mulf(float z[], const float x[], const float y[], int n)
-{
- int i;
- __m128 n1;
- __m128 n2;
- __m128 n3;
-
- if ((i = n & ~3))
- {
- for (i -= 4; i >= 0; i -= 4)
- {
- n1 = _mm_loadu_ps(x + i);
- n2 = _mm_loadu_ps(y + i);
- n3 = _mm_mul_ps(n1, n2);
- _mm_storeu_ps(z + i, n3);
- }
- }
- /* Now deal with the last 1 to 3 elements, which don't fill an SSE2 register */
- switch (n & 3)
- {
- case 3:
- z[n - 3] = x[n - 3]*y[n - 3];
- case 2:
- z[n - 2] = x[n - 2]*y[n - 2];
- case 1:
- z[n - 1] = x[n - 1]*y[n - 1];
- }
-}
-#else
-void vec_mulf(float z[], const float x[], const float y[], int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i]*y[i];
-}
-#endif
-/*- End of function --------------------------------------------------------*/
-
-#if defined(__GNUC__) && defined(G722_1_USE_SSE2)
-float vec_dot_prodf(const float x[], const float y[], int n)
-{
- int i;
- float z;
- __m128 n1;
- __m128 n2;
- __m128 n3;
- __m128 n4;
-
- z = 0.0f;
- if ((i = n & ~3))
- {
- n4 = _mm_setzero_ps(); //sets sum to zero
- for (i -= 4; i >= 0; i -= 4)
- {
- n1 = _mm_loadu_ps(x + i);
- n2 = _mm_loadu_ps(y + i);
- n3 = _mm_mul_ps(n1, n2);
- n4 = _mm_add_ps(n4, n3);
- }
- n4 = _mm_add_ps(_mm_movehl_ps(n4, n4), n4);
- n4 = _mm_add_ss(_mm_shuffle_ps(n4, n4, 1), n4);
- _mm_store_ss(&z, n4);
- }
- /* Now deal with the last 1 to 3 elements, which don't fill an SSE2 register */
- switch (n & 3)
- {
- case 3:
- z += x[n - 3]*y[n - 3];
- case 2:
- z += x[n - 2]*y[n - 2];
- case 1:
- z += x[n - 1]*y[n - 1];
- }
- return z;
-}
-#else
-float vec_dot_prodf(const float x[], const float y[], int n)
-{
- int i;
- float z;
-
- z = 0.0f;
- for (i = 0; i < n; i++)
- z += x[i]*y[i];
- return z;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-
-void vec_scalar_mulf(float z[], const float x[], float y, int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i]*y;
-}
-/*- End of function --------------------------------------------------------*/
-
-void vec_scaled_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i]*x_scale + y[i]*y_scale;
-}
-/*- End of function --------------------------------------------------------*/
-
-void vec_scaled_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- z[i] = x[i]*x_scale - y[i]*y_scale;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * utilities.h
- *
- * Copyright (C) 2006 Steve Underwood
- *
- * 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.
- */
-
-#if !defined(__UTILITIES_H__)
-#define __UTILITIES_H__
-
-/* Prototypes for some general purpose signal and vector functions */
-#if defined(G722_1_USE_FIXED_POINT)
-void vec_copyi16(int16_t z[], const int16_t x[], int n);
-int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
-#else
-void vec_copyf(float z[], const float x[], int n);
-void vec_zerof(float z[], int n);
-void vec_subf(float z[], const float x[], const float y[], int n);
-void vec_scalar_mulf(float z[], const float x[], float y, int n);
-void vec_mulf(float z[], const float x[], const float y[], int n);
-float vec_dot_prodf(const float x[], const float y[], int n);
-void vec_scaled_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
-void vec_scaled_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
-#endif
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU 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 General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-SUBDIRS = itu local
-
-DIST_SUBDIRS = itu local
-
-EXTRA_DIST =
-
-all:
-
-clean:
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU 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 General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-SUBDIRS =
-
-DIST_SUBDIRS =
-
-EXTRA_DIST =
-
-all:
-
-clean:
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU 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 General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-SUBDIRS =
-
-DIST_SUBDIRS =
-
-EXTRA_DIST = short_wb_voice.wav
-
-all:
-
-clean:
+++ /dev/null
-##
-## g722_1 - a library for the ITU G.722.1 and Annex C codecs
-##
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU 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 General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
-AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
-
-LIBS += $(TESTLIBS)
-
-EXTRA_DIST = regression_tests.sh
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -I$(top_builddir)/src -DDATADIR="\"$(pkgdatadir)\""
-
-LIBDIR = -L$(top_builddir)/src
-
-noinst_PROGRAMS = g722_1_tests
-
-noinst_HEADERS = g192_bit_stream.h \
- timing.h
-
-g722_1_tests_SOURCES = g722_1_tests.c g192_bit_stream.c
-g722_1_tests_LDADD = $(LIBDIR) -lg722_1
+++ /dev/null
-/*
- * broadvoice - a library for the BroadVoice 16 and 32 codecs
- *
- * g192_bit_stream.c
- *
- * Copyright 2008-2009 Steve Underwood <steveu@coppice.org>
- *
- * 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 Lesser 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, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*! \file */
-
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
-
-#include <inttypes.h>
-#include <stdio.h>
-#include <string.h>
-#include <audiofile.h>
-
-#include "g192_bit_stream.h"
-
-#if !defined(FALSE)
-#define FALSE 0
-#endif
-#if !defined(TRUE)
-#define TRUE (!FALSE)
-#endif
-
-enum
-{
- G192_FRAME_ERASURE = 0x6B20,
- G192_FRAME_SYNC_1 = 0x6B21,
- G192_FRAME_SYNC_2 = 0x6B22,
- G192_FRAME_SYNC_3 = 0x6B23,
- G192_FRAME_SYNC_4 = 0x6B24,
- G192_FRAME_SYNC_5 = 0x6B25,
- G192_FRAME_SYNC_6 = 0x6B26,
- G192_FRAME_SYNC_7 = 0x6B27,
- G192_FRAME_SYNC_8 = 0x6B28,
- G192_FRAME_SYNC_9 = 0x6B29,
- G192_FRAME_SYNC_10 = 0x6B2A,
- G192_FRAME_SYNC_11 = 0x6B2B,
- G192_FRAME_SYNC_12 = 0x6B2C,
- G192_FRAME_SYNC_13 = 0x6B2D,
- G192_FRAME_SYNC_14 = 0x6B2E,
- G192_FRAME_SYNC_15 = 0x6B2F,
- G192_HARD_ZERO = 0x7F,
- G192_INDETERMINATE = 0x00,
- G192_HARD_ONE = 0x81
-};
-
-int itu_codec_bitstream_write(const uint8_t out_data[],
- int number_of_bits,
- int mode,
- FILE *fp_bitstream)
-{
- int i;
- int j;
- int bit_count;
- int number_of_bytes;
- uint8_t packed_word;
- int16_t out_array[2 + number_of_bits + 7];
-
- number_of_bytes = (number_of_bits + 7)/8;
- if (mode == ITU_CODEC_BITSTREAM_PACKED)
- {
- return fwrite(out_data, 1, number_of_bytes, fp_bitstream);
- }
- j = 0;
- out_array[j++] = G192_FRAME_SYNC_1;
- out_array[j++] = number_of_bits;
- for (i = 0; i < number_of_bytes; i++)
- {
- packed_word = out_data[i];
- for (bit_count = 7; bit_count >= 0; bit_count--)
- out_array[j++] = ((packed_word >> bit_count) & 1) ? G192_HARD_ONE : G192_HARD_ZERO;
- }
-
- return fwrite(out_array, sizeof(int16_t), number_of_bits + 2, fp_bitstream);
-}
-/*- End of function --------------------------------------------------------*/
-
-int itu_codec_bitstream_read(uint8_t in_data[],
- int16_t *erasure,
- int number_of_bits,
- int mode,
- FILE *fp_bitstream)
-{
- int i;
- int j;
- int bit_pos;
- int nsamp;
- int limit;
- int rem;
- int len;
- int erased_frame;
- int16_t packed_word;
- int16_t bit;
- int16_t in_array[2 + number_of_bits];
-
- *erasure = FALSE;
- if (mode == ITU_CODEC_BITSTREAM_PACKED)
- {
- nsamp = fread(in_data, 1, number_of_bits/8, fp_bitstream);
- if (nsamp <= 0)
- return -1;
- return nsamp*8;
- }
-
- nsamp = fread(in_array, sizeof(int16_t), 2, fp_bitstream);
- if (nsamp < 2)
- return -1;
- if (in_array[0] < G192_FRAME_ERASURE || in_array[0] > G192_FRAME_SYNC_15)
- {
- *erasure = TRUE;
- return 0;
- }
- erased_frame = (in_array[0] == G192_FRAME_ERASURE);
- len = in_array[1];
- if (len > number_of_bits)
- {
- *erasure = TRUE;
- return 0;
- }
- nsamp = fread(in_array, sizeof(int16_t), len, fp_bitstream);
- if (nsamp != len)
- {
- *erasure = TRUE;
- return nsamp;
- }
-
- limit = (nsamp + 7)/8;
- for (i = 0, j = 0; i < limit; i++)
- {
- packed_word = 0;
- rem = (i == (limit - 1)) ? (limit*8 - nsamp) : 0;
- for (bit_pos = 7; bit_pos >= rem; bit_pos--)
- {
- bit = in_array[j++];
- if (bit >= 0x0001 && bit <= G192_HARD_ZERO)
- {
- /* Its a zero */
- }
- else if (bit >= G192_HARD_ONE && bit <= 0x00FF)
- {
- /* Its a one */
- packed_word |= (1 << bit_pos);
- }
- else
- {
- /* Bad bit */
- *erasure = 1;
- }
- }
- in_data[i] = packed_word;
- }
- if (erased_frame)
- *erasure = TRUE;
- return nsamp;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * broadvoice - a library for the BroadVoice 16 and 32 codecs
- *
- * g192_bit_stream.h
- *
- * Copyright 2008-2009 Steve Underwood <steveu@coppice.org>
- *
- * 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 Lesser 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, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*! \file */
-
-#if !defined(_G192_BIT_STREAM_H_)
-#define _G192_BIT_STREAM_H_
-
-/*! \page g192_bit_stream_page ITU G.192 codec bit stream handling
-\section g192_bit_stream_page_sec_1 What does it do?
-
-\section g192_bit_stream_page_sec_2 How does it work?
-*/
-
-enum
-{
- ITU_CODEC_BITSTREAM_PACKED = 0,
- ITU_CODEC_BITSTREAM_G192 = 1
-};
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-/*! \brief Write a frame of data to an output file.
- \param out_data The buffer for the data to be written.
- \param number_of_bits The number of bits to be written.
- \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
- \param fp_bitstream The file context to be written to.
- \return The number of words written. */
-int itu_codec_bitstream_write(const uint8_t out_data[],
- int number_of_bits,
- int mode,
- FILE *fp_bitstream);
-
-/*! \brief Read a frame of data from an input file.
- \param in_data The buffer for the data to be read.
- \param p_erasure Set to TRUE if there is a frame erasure, else set to FALSE.
- \param number_of_bits The number of bits to be read.
- \param mode 0 = continuous, 1 = ITU G.192 codec bitstream format.
- \param fp_bitstream The file context to be read from.
- \return The number of words read. */
-int itu_codec_bitstream_read(uint8_t in_data[],
- int16_t *p_erasure,
- int number_of_bits,
- int mode,
- FILE *fp_bitstream);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * g722_1_tests.c
- *
- * Adapted by Steve Underwood <steveu@coppice.org> from the reference
- * code supplied with ITU G.722.1, which is:
- *
- * (C) 2004 Polycom, Inc.
- * 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.
- */
-
-/*! \file */
-
-/*! \page g722_1_tests_page G.722.1 codec tests
-\section g722_1_tests_page_sec_1 What does it do?
-
-\section g722_1_tests_page_sec_2 How is it used?
-*/
-
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
-
-#include <inttypes.h>
-#include <stdio.h>
-#include <string.h>
-#include <audiofile.h>
-
-#include <g722_1.h>
-
-#include "timing.h"
-#include "g192_bit_stream.h"
-
-typedef struct
-{
- int encode;
- int encoded_format;
- int bit_rate;
- int sample_rate;
- int number_of_bits_per_frame;
- int frame_size;
- char *source_file;
- char *dest_file;
- FILE *fp;
- FILE *fp_bitstream;
-} coder_control_t;
-
-static int encode_test(coder_control_t *control, int frames)
-{
- g722_1_encode_state_t encode_state;
- g722_1_encode_state_t *s;
- int16_t amp[frames*MAX_FRAME_SIZE];
- uint8_t g722_1_code[frames*MAX_BITS_PER_FRAME/8];
- int samples;
- int frame_cnt;
- int bytes;
- int actual_frames;
- int i;
- int64_t start;
- int64_t end;
- int64_t total;
-
- if ((control->fp = fopen(control->source_file, "rb")) == NULL)
- {
- printf("Error opening %s.\n", control->source_file);
- exit(1);
- }
- if ((control->fp_bitstream = fopen(control->dest_file, "wb")) == NULL)
- {
- printf("Error opening %s.\n", control->dest_file);
- exit(1);
- }
-
- if ((s = g722_1_encode_init(&encode_state, control->bit_rate, control->sample_rate)) == NULL)
- {
- printf("Failed to initialise the encoder.\n");
- exit(2);
- }
-
- frame_cnt = 0;
- total = 0;
- for (;;)
- {
- samples = fread(amp, sizeof(int16_t), frames*control->frame_size, control->fp);
- if (samples < control->frame_size)
- break;
- actual_frames = samples/control->frame_size;
- start = rdtscll();
- bytes = g722_1_encode(s, g722_1_code, amp, samples);
- end = rdtscll();
- frame_cnt += actual_frames;
- /* Write output bitstream to the output file */
- for (i = 0; i < actual_frames; i++)
- itu_codec_bitstream_write(&g722_1_code[i*bytes/actual_frames], 8*bytes/actual_frames, control->encoded_format, control->fp_bitstream);
- total += (end - start);
- }
- fclose(control->fp);
- fclose(control->fp_bitstream);
- printf("%d frames encoded\n", frame_cnt);
- if (frame_cnt == 0)
- frame_cnt = 1;
- printf("%" PRId64 " cycles. %" PRId64 " per frame\n", total, total/frame_cnt);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-
-static int decode_test(coder_control_t *control, int frames)
-{
- g722_1_decode_state_t decode_state;
- g722_1_decode_state_t *s;
- int16_t amp[frames*MAX_DCT_LENGTH];
- uint8_t g722_1_code[frames*MAX_BITS_PER_FRAME/8];
- int bytes;
- int samples;
- int frame_cnt;
- int number_of_bytes_per_frame;
- int actual_frames;
- int i;
- int j;
- int k;
- int n;
- int16_t frame_error_flag;
- int64_t start;
- int64_t end;
- int64_t total;
-
- if ((control->fp_bitstream = fopen(control->source_file, "rb")) == NULL)
- {
- printf("Error opening %s.\n", control->source_file);
- exit(1);
- }
- if ((control->fp = fopen(control->dest_file, "wb")) == NULL)
- {
- printf("Error opening %s.\n", control->dest_file);
- exit(1);
- }
-
- number_of_bytes_per_frame = control->number_of_bits_per_frame/8;
-
- if ((s = g722_1_decode_init(&decode_state, control->bit_rate, control->sample_rate)) == NULL)
- {
- printf("Failed to initialise the decoder.\n");
- exit(2);
- }
-
- frame_cnt = 0;
- total = 0;
- frame_error_flag = 0;
- n = 0;
- for (;;)
- {
- for (actual_frames = 0, bytes = 0, i = 0; i < frames; i++)
- {
- n = itu_codec_bitstream_read(&g722_1_code[i*number_of_bytes_per_frame],
- &frame_error_flag,
- number_of_bytes_per_frame*8,
- control->encoded_format,
- control->fp_bitstream)/8;
- bytes += n;
- if (n == number_of_bytes_per_frame)
- actual_frames++;
- if (frame_error_flag || n != number_of_bytes_per_frame)
- break;
- }
- if (frame_error_flag || bytes >= number_of_bytes_per_frame)
- {
- if (frame_error_flag)
- {
- samples = 0;
- if (actual_frames > 0)
- {
- start = rdtscll();
- samples = g722_1_decode(s, amp, g722_1_code, bytes - number_of_bytes_per_frame);
- end = rdtscll();
- total += (end - start);
- }
- j = bytes - number_of_bytes_per_frame;
- if (j < 0)
- j = 0;
- k = (actual_frames - 1)*control->frame_size;
- if (k < 0)
- k = 0;
- samples += g722_1_fillin(s, &[k], &g722_1_code[j], number_of_bytes_per_frame);
- }
- else
- {
- start = rdtscll();
- samples = g722_1_decode(s, amp, g722_1_code, bytes);
- end = rdtscll();
- total += (end - start);
- }
- frame_cnt += actual_frames;
- /* For ITU testing, chop off the 2 LSBs. */
- for (i = 0; i < samples; i++)
- amp[i] &= 0xFFFC;
- /* Write frame of output samples */
- fwrite(amp, sizeof(int16_t), samples, control->fp);
- }
- if (!frame_error_flag && n != number_of_bytes_per_frame)
- break;
- }
- fclose(control->fp);
- fclose(control->fp_bitstream);
- printf("%d frames decoded\n", frame_cnt);
- if (frame_cnt == 0)
- frame_cnt = 1;
- printf("%" PRId64 " cycles. %" PRId64 " per frame\n", total, total/frame_cnt);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-
-static void parse_command_line(char *argv[], coder_control_t *control)
-{
- control->encode = (strcasecmp(*++argv, "e") == 0);
-
- if (strcasecmp(*++argv, "p") == 0)
- {
- control->encoded_format = ITU_CODEC_BITSTREAM_PACKED;
- printf("Encoding format = packed bitstream\n");
- }
- else if (strcasecmp(*argv, "i") == 0)
- {
- control->encoded_format = ITU_CODEC_BITSTREAM_G192;
- printf("Encoding format = ITU-format bitstream\n");
- }
- else
- {
- printf("Error. Encoded format must be P for packed, or I for ITU format\n");
- exit(1);
- }
- control->bit_rate = (int32_t) atoi(*++argv);
- control->number_of_bits_per_frame = (int16_t) ((control->bit_rate)/50);
-
- control->sample_rate = (int16_t) atoi(*++argv);
- if (control->sample_rate == 16000)
- {
- control->frame_size = MAX_FRAME_SIZE >> 1;
-
- printf("Sample rate = 16000 (G.722.1, 7kHz bandwidth)\n");
- }
- else if (control->sample_rate == 32000)
- {
- control->frame_size = MAX_FRAME_SIZE;
-
- printf("Sample rate = 32000 (G.722.1 Annex C, 14kHz bandwidth)\n");
- }
- else
- {
- printf("Error. Sample rate must be 16000 or 32000\n");
- exit(1);
- }
- control->source_file = *++argv;
- control->dest_file = *++argv;
-
- printf("Bit rate = %d\n", control->bit_rate);
- printf("Framesize = %d samples\n", control->frame_size);
- printf("Number of bits per frame = %d bits\n", control->number_of_bits_per_frame);
- printf("\n");
- printf("\n");
-}
-/*- End of function --------------------------------------------------------*/
-
-int main(int argc, char *argv[])
-{
- coder_control_t control;
-
- /* Check usage */
- if (argc < 7)
- {
- printf("Usage: %s <E/D> <P(packed)/I(ITU)> <bit-rate> <sample rate> <input-file> <output-file>\n\n", argv[0]);
- printf("Valid Rates: 24kbps = 24000\n");
- printf(" 32kbps = 32000\n");
- printf(" 48kbps = 48000\n");
- printf("\n");
- printf("Sample rate: 7kHz = 16000\n");
- printf(" 14kHz = 32000\n");
- printf("\n");
- exit(1);
- }
-
- parse_command_line(argv, &control);
- if (control.encode)
- encode_test(&control, 2);
- else
- decode_test(&control, 2);
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-#!/bin/sh
-#
-# g722_1 - a library for the G.722.1 codec
-#
-# regression_tests.sh
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU 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 General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-STDOUT_DEST=xyzzy
-STDERR_DEST=xyzzy2
-VECTOR_CLASS=@G722_1_VECTORS_FOR_TESTS@
-TMP_FILE=tmp
-
-echo Performing basic G.722_1 regression tests
-echo
-
-./g722_1_tests E I 32000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_in.pcm $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_out_32000.itu
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests encode failed!
- exit $RETVAL
-fi
-./g722_1_tests E I 24000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_in.pcm $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_out_24000.itu
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests encode failed!
- exit $RETVAL
-fi
-echo g722_1_tests encode completed OK
-
-./g722_1_tests D I 24000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_out_24000.itu $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_out_24000.pcm
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests decode failed!
- exit $RETVAL
-fi
-./g722_1_tests D I 32000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_enc_out_32000.itu $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_out_32000.pcm
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests decode failed!
- exit $RETVAL
-fi
-
-./g722_1_tests D I 24000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_in_24000_fe.itu $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_out_24000_fe.pcm
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests decode failed!
- exit $RETVAL
-fi
-./g722_1_tests D I 32000 16000 ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_in_32000_fe.itu $TMP_FILE
-diff $TMP_FILE ../test-data/itu/g722_1/$VECTOR_CLASS/g722_1_dec_out_32000_fe.pcm
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests decode failed!
- exit $RETVAL
-fi
-echo g722_1_tests decode completed OK
-
-./g722_1_tests E I 32000 16000 ../test-data/local/short_wb_voice.wav $TMP_FILE
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests encode failed!
- exit $RETVAL
-fi
-echo g722_1_tests encode completed OK
-
-./g722_1_tests D I 32000 16000 $TMP_FILE test.au
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo g722_1_tests decode failed!
- exit $RETVAL
-fi
-echo g722_1_tests decode completed OK
-
-echo
-echo All regression tests successfully completed
+++ /dev/null
-/*
- * g722_1 - a library for the G.722.1 and Annex C codecs
- *
- * timing.h - Provide access to the Pentium/Athlon TSC timer register
- *
- * Written by Steve Underwood <steveu@coppice.org>
- *
- * Copyright (C) 2001 Steve Underwood
- *
- * 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 Lesser 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, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#if !defined(_TIMING_H_)
-#define _TIMING_H_
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-#if defined(__MSVC__)
-__declspec(naked) unsigned __int64 __cdecl rdtscll(void)
-{
- __asm
- {
- rdtsc
- ret ; return value at EDX:EAX
- }
-}
-/*- End of function --------------------------------------------------------*/
-#elif defined(__GNUC__)
-#if defined(__i386__)
-static __inline__ uint64_t rdtscll(void)
-{
- uint64_t now;
-
- __asm__ __volatile__(" rdtsc\n" : "=A" (now));
- return now;
-}
-/*- End of function --------------------------------------------------------*/
-#elif defined(__x86_64__)
-static __inline__ uint64_t rdtscll(void)
-{
- unsigned int a;
- unsigned int d;
-
- /* For x86_64 we need to merge the result in 2 32 bit registers
- into one clean 64 bit result. */
- __asm__ __volatile__(" rdtsc\n" : "=a" (a), "=d" (d));
- return ((uint64_t) a) | (((uint64_t) d) << 32);
-}
-/*- End of function --------------------------------------------------------*/
-#else
-static __inline__ uint64_t rdtscll(void)
-{
- /* This architecture doesn't have a suitable timer */
- return 0llu;
-}
-/*- End of function --------------------------------------------------------*/
-#endif
-#endif
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
-/*- End of file ------------------------------------------------------------*/
+++ /dev/null
-#!/bin/sh
-#
-# g722_1 - a library for the G.722.1 and Annex C codecs
-#
-# unpack_g722_1_data.sh
-#
-# 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, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-ITUDATA="../../../T-REC-G.722.1-200505-I!!SOFT-ZST-E.zip"
-
-cd test-data/itu
-if [ -d g722_1 ]
-then
- cd g722_1
-else
- mkdir g722_1
- RETVAL=$?
- if [ $RETVAL != 0 ]
- then
- echo Cannot create test-data/itu/g722_1!
- exit $RETVAL
- fi
- cd g722_1
-fi
-
-if [ -d fixed ]
-then
- cd fixed
- rm -rf *
- cd ..
-else
- mkdir fixed
- RETVAL=$?
- if [ $RETVAL != 0 ]
- then
- echo Cannot create test-data/itu/g722_1/fixed!
- exit $RETVAL
- fi
-fi
-if [ -d floating ]
-then
- cd floating
- rm -rf *
- cd ..
-else
- mkdir floating
- RETVAL=$?
- if [ $RETVAL != 0 ]
- then
- echo Cannot create test-data/itu/g722_1/floating!
- exit $RETVAL
- fi
-fi
-
-rm -rf T*
-rm -rf Software
-rm -rf G722-1E-200505+Cor1.pdf
-rm -rf G722-1E-200505+Cor1.DOC
-rm -rf Software
-unzip ${ITUDATA} >/dev/null
-RETVAL=$?
-if [ $RETVAL != 0 ]
-then
- echo Cannot unpack the ITU test vectors for G.722.1!
- exit $RETVAL
-fi
-#rm ${ITUDATA}
-mv ./Software/Fixed-200505-Rel.2.1/vectors/* ./fixed
-mv ./Software/Floating-200806-Rel.2.1/vectors/* ./floating
-rm -rf Software
-rm -rf G722-1E-200505+Cor1.pdf
-rm -rf G722-1E-200505+Cor1.DOC
-echo The ITU test vectors for G.722.1 should now be in the g722_1 directory
-
+++ /dev/null
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
- <xsl:param name="html.stylesheet">css.css</xsl:param>
-</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Download g722_1</ProjectName>
+ <RootNamespace>Download g722_1</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{36603FE1-253F-4C2C-AAB6-12927A626135}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <Import Project="$(SolutionDir)\w32\extdll.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\w32\g722_1.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\w32\g722_1.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\g722_1\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\g722_1\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog $(ProjectName).htm</Path>
+ </BuildLog>
+ <PreBuildEvent>
+ <Command>
+ </Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog $(ProjectName).htm</Path>
+ </BuildLog>
+ <PreBuildEvent>
+ <Command>
+ </Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <CustomBuild Include="cleancount">
+ <FileType>Document</FileType>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Downloading g722_1.</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(g722_1LibDir)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/g722_1-$(g722_1_Version).tar.gz "$(ProjectDir).."
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(g722_1LibDir);%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Downloading g722_1.</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(g722_1LibDir)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/g722_1-$(g722_1_Version).tar.gz "$(ProjectDir).."
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(g722_1LibDir);%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
<PlatformToolset>v140</PlatformToolset>\r
</PropertyGroup>\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <Import Project="$(SolutionDir)w32\g722_1.props" />\r
<ImportGroup Label="ExtensionSettings">\r
</ImportGroup>\r
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
<ClCompile>\r
<Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\libg722_1\src\msvc\;%(RootDir)%(Directory)..\..\libg722_1\src\generated\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<MinimalRebuild>true</MinimalRebuild>\r
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
<ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\libg722_1\src\msvc\;%(RootDir)%(Directory)..\..\libg722_1\src\generated\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
</Midl>\r
<ClCompile>\r
<Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\libg722_1\src\msvc\;%(RootDir)%(Directory)..\..\libg722_1\src\generated\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<MinimalRebuild>true</MinimalRebuild>\r
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
<ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\libg722_1\src\msvc\;%(RootDir)%(Directory)..\..\libg722_1\src\generated\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBG722_1_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
</ClCompile>\r
</ItemDefinitionGroup>\r
<ItemGroup>\r
- <ClCompile Include="..\..\libg722_1\src\basop32.c" />\r
- <ClCompile Include="..\..\libg722_1\src\bitstream.c" />\r
- <ClCompile Include="..\..\libg722_1\src\coef2sam.c" />\r
- <ClCompile Include="..\..\libg722_1\src\common.c" />\r
- <ClCompile Include="..\..\libg722_1\src\commonf.c" />\r
- <ClCompile Include="..\..\libg722_1\src\dct4.c" />\r
- <ClCompile Include="..\..\libg722_1\src\dct4_a.c" />\r
- <ClCompile Include="..\..\libg722_1\src\dct4_s.c" />\r
- <ClCompile Include="..\..\libg722_1\src\decoder.c" />\r
- <ClCompile Include="..\..\libg722_1\src\decoderf.c" />\r
- <ClCompile Include="..\..\libg722_1\src\encoder.c" />\r
- <ClCompile Include="..\..\libg722_1\src\encoderf.c" />\r
- <ClCompile Include="..\..\libg722_1\src\huff_tab.c" />\r
- <ClCompile Include="..\..\libg722_1\src\sam2coef.c" />\r
- <ClCompile Include="..\..\libg722_1\src\tables.c" />\r
- <ClCompile Include="..\..\libg722_1\src\utilities.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\basop32.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\bitstream.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\coef2sam.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\common.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\commonf.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4_a.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4_s.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\decoder.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\decoderf.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\encoder.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\encoderf.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\huff_tab.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\sam2coef.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\tables.c" />\r
+ <ClCompile Include="$(SolutionDir)libs\g722_1-0.2.0\src\utilities.c" />\r
</ItemGroup>\r
<ItemGroup>\r
- <ClInclude Include="..\..\libg722_1\src\basop32.h" />\r
- <ClInclude Include="..\..\libg722_1\src\bitstream.h" />\r
- <ClInclude Include="..\..\libg722_1\src\coef2sam.h" />\r
- <ClInclude Include="..\..\libg722_1\src\dct4.h" />\r
- <ClInclude Include="..\..\libg722_1\src\dct4_a.h" />\r
- <ClInclude Include="..\..\libg722_1\src\dct4_s.h" />\r
- <ClInclude Include="..\..\libg722_1\src\defs.h" />\r
- <ClInclude Include="..\..\libg722_1\src\huff_tab.h" />\r
- <ClInclude Include="..\..\libg722_1\src\sam2coef.h" />\r
- <ClInclude Include="..\..\libg722_1\src\tables.h" />\r
- <ClInclude Include="..\..\libg722_1\src\utilities.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\basop32.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\bitstream.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\coef2sam.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4_a.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\dct4_s.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\defs.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\huff_tab.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\sam2coef.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\tables.h" />\r
+ <ClInclude Include="$(SolutionDir)libs\g722_1-0.2.0\src\utilities.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Download g722_1.2015.vcxproj">\r
+ <Project>{36603fe1-253f-4c2c-aab6-12927a626135}</Project>\r
+ </ProjectReference>\r
</ItemGroup>\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
<ImportGroup Label="ExtensionTargets">\r
<PlatformToolset>v140</PlatformToolset>\r
</PropertyGroup>\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <Import Project="$(SolutionDir)w32\g722_1.props" />\r
<ImportGroup Label="ExtensionSettings">\r
</ImportGroup>\r
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
</PropertyGroup>\r
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
<ClCompile>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\g722_1;%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
</ClCompile>\r
<TargetEnvironment>X64</TargetEnvironment>\r
</Midl>\r
<ClCompile>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\g722_1;%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
</ClCompile>\r
</ItemDefinitionGroup>\r
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
<ClCompile>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\g722_1;%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
</ClCompile>\r
<TargetEnvironment>X64</TargetEnvironment>\r
</Midl>\r
<ClCompile>\r
- <AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\g722_1;%(RootDir)%(Directory)..\..\..\..\libs\libg722_1\src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<PrecompiledHeader>\r
</PrecompiledHeader>\r
</ClCompile>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros">
+ <G722_1_Version>0.2.0</G722_1_Version>
+ </PropertyGroup>
+ <PropertyGroup>
+ <G722_1_VersionImported>true</G722_1_VersionImported>
+ </PropertyGroup>
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup>
+ <BuildMacro Include="G722_1_Version">
+ <Value>$(G722_1_Version)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="g722_1-version.props" Condition=" '$(G722_1_VersionImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <g722_1LibDir>$(SolutionDir)libs\g722_1-$(G722_1_Version)</g722_1LibDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(g722_1LibDir)\src\msvc\;$(g722_1LibDir)\src\g722_1;$(g722_1LibDir)\src\generated\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file