提交 06ef6310 authored 作者: Andrey Volk's avatar Andrey Volk

FS-10489: [build-system] Move libg7221 from tree to download on Windows.

上级 c1b33699
......@@ -249,3 +249,4 @@ libs/PaxHeaders.1693/
libs/lua-*/
libs/g722_1-*/
......@@ -410,6 +410,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "libs\s
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skel", "src\mod\applications\mod_skel\mod_skel.2015.vcxproj", "{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skypopen", "src\mod\endpoints\mod_skypopen\mod_skypopen.2015.vcxproj", "{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Download 32khz music.2015.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 8khz music", "libs\win32\Download 8khz music.2015.vcxproj", "{4F5C9D55-98EF-4256-8311-32D7BD360406}"
......@@ -651,6 +653,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua52", "libs\win32\lua\lua
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download lua", "libs\win32\Download lua.2015.vcxproj", "{45CD36EE-0AF3-4387-8790-4F11E928299D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download g722_1", "libs\win32\Download g722_1.2015.vcxproj", "{36603FE1-253F-4C2C-AAB6-12927A626135}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
......@@ -1847,6 +1851,16 @@ Global
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Debug|x64.ActiveCfg = Debug|x64
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|Win32.ActiveCfg = Release|Win32
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39}.Release|x64.ActiveCfg = Release|x64
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.ActiveCfg = Release|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|Win32.Build.0 = Release|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.All|x64.ActiveCfg = Release|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|Win32.ActiveCfg = Debug|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|x64.ActiveCfg = Debug|x64
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Debug|x64.Build.0 = Debug|x64
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|Win32.ActiveCfg = Release|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|Win32.Build.0 = Release|Win32
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|x64.ActiveCfg = Release|x64
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}.Release|x64.Build.0 = Release|x64
{1F0A8A77-E661-418F-BB92-82172AE43803}.All|Win32.ActiveCfg = Release|Win32
{1F0A8A77-E661-418F-BB92-82172AE43803}.All|x64.ActiveCfg = Release|Win32
{1F0A8A77-E661-418F-BB92-82172AE43803}.Debug|Win32.ActiveCfg = Debug|Win32
......@@ -2923,6 +2937,18 @@ Global
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|Win32.Build.0 = Release|Win32
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|x64.ActiveCfg = Release|Win32
{45CD36EE-0AF3-4387-8790-4F11E928299D}.Release|x64.Build.0 = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.All|Win32.ActiveCfg = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.All|Win32.Build.0 = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.All|x64.ActiveCfg = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.All|x64.Build.0 = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|Win32.ActiveCfg = Debug|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|Win32.Build.0 = Debug|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|x64.ActiveCfg = Debug|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Debug|x64.Build.0 = Debug|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Release|Win32.ActiveCfg = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Release|Win32.Build.0 = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Release|x64.ActiveCfg = Release|Win32
{36603FE1-253F-4C2C-AAB6-12927A626135}.Release|x64.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -3055,6 +3081,7 @@ Global
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{11C9BC3D-45E9-46E3-BE84-B8CEE4685E39} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{1F0A8A77-E661-418F-BB92-82172AE43803} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{4F5C9D55-98EF-4256-8311-32D7BD360406} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{E10571C4-E7F4-4608-B5F2-B22E7EB95400} = {C120A020-773F-4EA3-923F-B67AF28B750D}
......@@ -3155,5 +3182,6 @@ Global
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{4F990563-6DFB-45C3-B083-1938C6D7FFA4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{45CD36EE-0AF3-4387-8790-4F11E928299D} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{36603FE1-253F-4C2C-AAB6-12927A626135} = {C120A020-773F-4EA3-923F-B67AF28B750D}
EndGlobalSection
EndGlobal
Mon Jun 8 12:13:41 EDT 2009
Adapted by Steve Underwood <steveu@coppice.org> from the source code
supplied by Polycom in ITU specification G.722.1.
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.
20.09.14 - 0.0.1 - Steve Underwood <steveu@coppice.org>
- The first version.
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.
##
## 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
No news is good news!
\ No newline at end of file
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>
#!/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
# @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
# 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
# ===========================================================================
# 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
])
])
# 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
# 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
差异被折叠。
差异被折叠。
差异被折叠。
#! /bin/sh
srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
$srcpath/configure "$@" --disable-shared --with-pic
g722_1 (0.0.1) unstable; urgency=low
[ Steve Underwood ]
* Begun
-- Steve Underwood <steveu@coppice.org> Tue, 19 Feb 2008 09:53:06 +0300
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.
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.
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
doc/api/html usr/share/doc/libg722_1-doc/api/
debian/tmp/usr/lib/libg722_1.so.0.*
debian/tmp/usr/lib/libg722_1.so.0
#!/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
# 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
##
## 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
差异被折叠。
差异被折叠。
<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
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}
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
##
## 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 >$@
/*
* 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 ------------------------------------------------------------*/
/*
* 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 ------------------------------------------------------------*/
/*
* 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 ------------------------------------------------------------*/
/*
* 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 ------------------------------------------------------------*/
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
/*
* 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 ------------------------------------------------------------*/
差异被折叠。
/*
* 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 ------------------------------------------------------------*/
/*
* 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 ------------------------------------------------------------*/
差异被折叠。
/*
* 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 ------------------------------------------------------------*/
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
#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;
}
差异被折叠。
差异被折叠。
差异被折叠。
extern void gettimeofday(struct timeval *tv, void *tz);
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论