mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
update to snapshot spandsp-20090128
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11535 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f2055745eb
commit
314ae8b6f3
@ -1,3 +1,76 @@
|
||||
Building and installing spandsp
|
||||
===============================
|
||||
|
||||
A number of distributions include spandsp, but they usually use older versions
|
||||
of the library, which lack a lot of the features of the current version. Before
|
||||
installing spandsp, make sure there are no older versions already on your
|
||||
machine. Make sure libtiff is installed on your machine. Versions 3.5.7,
|
||||
3.6.0, 3.7.1 and 3.8.2 seem to work OK. There have been several bugs related
|
||||
to FAX document handling in some versions of libtiff. Also, some people have
|
||||
had trouble using spandsp because they had more than one version of libtiff
|
||||
on their machine. Take care with this. If you are using an RPM based system,
|
||||
such as RedHat or Fedora, you will need the libtiff and libtiff-devel RPMs
|
||||
installed to be able to build spandsp.
|
||||
|
||||
You can use the usual:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
process to build the spandsp library. Note that if you use configure in this
|
||||
way, the software will be installed in /usr/local. In this case make sure your
|
||||
/etc/ld.so.conf file has an entry for /usr/local/lib. If you wish the software
|
||||
to be installed in /usr, you should build it with the commands.
|
||||
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
Building the programming documentation
|
||||
======================================
|
||||
|
||||
If you wish to build the programming documentation for spandsp, configure
|
||||
spandsp with:
|
||||
|
||||
./configure --enable-doc
|
||||
|
||||
You need doxygen installed on your machine.
|
||||
|
||||
|
||||
Building the test suite
|
||||
=======================
|
||||
|
||||
Most sections of the spandsp library have an accompanying test program in the
|
||||
test directory. If you wish to build these test programs, configure spandsp
|
||||
with:
|
||||
|
||||
./configure --enable-tests
|
||||
|
||||
To build these tests you will need libaudiofile installed on your machine. To
|
||||
build the modem tests, with the GUI monitoring feature you will need Fltk 1.1.4
|
||||
or later, an audio meter module and a cartesian plotting module. Fltk may be
|
||||
obtained from http://www.fltk.org. The audio meter module may be obtained from
|
||||
http://www.soft-switch.org/downloads/Fl_Audio_Meter.tgz . The cartesian plotting
|
||||
module may be obtained from http://134.226.68.29/fltk. However, there is no
|
||||
suitable makefile supplied with that. You can find a version at
|
||||
http://www.soft-switch.org/downloads/Fl_Cartesian.tgz which will build as a
|
||||
Linux library. The actual code in both these versions is identical.
|
||||
You need to have Fltk 1.1.4 or later installed before building the plotting
|
||||
library.
|
||||
|
||||
|
||||
Applications
|
||||
============
|
||||
|
||||
Applications support for spandsp is built into packages such as Callweaver,
|
||||
FreeSwitch and iaxmodem. Code to add spandsp based FAX support to Asterisk may
|
||||
be found at http://sourceforge.net/projects/agx-ast-addons.
|
||||
|
||||
|
||||
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
## License along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.44 2008/09/28 14:36:25 steveu Exp $
|
||||
## $Id: Makefile.am,v 1.45 2008/11/28 12:41:25 steveu Exp $
|
||||
|
||||
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
||||
@ -28,6 +28,7 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||
EXTRA_DIST = autogen.sh \
|
||||
DueDiligence \
|
||||
README.testdata \
|
||||
spandsp.pc \
|
||||
spandsp.spec \
|
||||
wrapper.xsl \
|
||||
unpack_g722_data.sh \
|
||||
@ -60,6 +61,9 @@ SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS) $(MAYBE_TESTDATA)
|
||||
|
||||
DIST_SUBDIRS = src doc spandsp-sim tests test-data
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = spandsp.pc
|
||||
|
||||
faq: faq.xml
|
||||
cd faq ; xsltproc ../wrapper.xsl ../faq.xml
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
spandsp 0.0.4 - A DSP library for telephony
|
||||
spandsp 0.0.5 - A DSP library for telephony
|
||||
-------------------------------------------
|
||||
|
||||
SpanDSP is a library of DSP functions for telephony, in the 8000 sample per
|
||||
@ -26,8 +26,8 @@ libaudiofile (and libaudiofile-devel) is required to build the test suite
|
||||
fftw (and fftw-devel) is required to build the test suite. Version 2 or 3 of
|
||||
FFTW may be used. Spandsp adapts to the differences between them.
|
||||
|
||||
fltk (and fltk-devel), Fl_Cartesian and Fl_Audio_Meter are required to build the
|
||||
test suite with GUI interfaces for some of the tests. The tests will build
|
||||
fltk (and fltk-devel), Fl_Cartesian and Fl_Audio_Meter are required to build
|
||||
the test suite with GUI interfaces for some of the tests. The tests will build
|
||||
without these packages, but the GUI features will not be available.
|
||||
Fl_Cartesian and Fl_Audio_Meter can be downloaded from
|
||||
http://www.soft-switch.org/downloads.
|
||||
|
@ -16,7 +16,7 @@
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: configure.ac,v 1.59 2008/09/16 15:21:52 steveu Exp $
|
||||
# $Id: configure.ac,v 1.64 2009/01/17 08:16:08 steveu Exp $
|
||||
|
||||
# @start 1
|
||||
|
||||
@ -30,7 +30,7 @@ m4_include(config/ax_c99_features.m4)
|
||||
|
||||
SPANDSP_MAJOR_VERSION=0
|
||||
SPANDSP_MINOR_VERSION=0
|
||||
SPANDSP_MICRO_VERSION=5
|
||||
SPANDSP_MICRO_VERSION=6
|
||||
|
||||
SPANDSP_LT_CURRENT=1
|
||||
SPANDSP_LT_REVISION=0
|
||||
@ -49,7 +49,7 @@ AC_CONFIG_HEADERS([src/config.h:config-h.in])
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_BUILD
|
||||
#AC_CANONICAL_BUILD
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
@ -237,7 +237,11 @@ if test "${build}" == "${host}"
|
||||
then
|
||||
case "${host}" in
|
||||
x86_64-*)
|
||||
# X86_64 Linux machines may have both 64 bit and 32 bit libraries. We need to choose the right set
|
||||
AX_CHECK_REAL_FILE([${prefix}/lib64], libdir='$(exec_prefix)/lib64')
|
||||
AX_CHECK_REAL_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
|
||||
# The very oldest AMD 64 bit chips support SSE2, SSE and MMX
|
||||
enable_sse2="yes"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -258,16 +262,6 @@ AC_SEARCH_LIBS([expf], [m], AC_DEFINE([HAVE_EXPF], [1], [Define to 1 if you have
|
||||
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 "${build}" == "${host}"
|
||||
then
|
||||
case "${host}" in
|
||||
x86_64-*)
|
||||
# X86_64 Linux machines may have both 64 bit and 32 bit libraries. We need to choose the right set
|
||||
AX_CHECK_REAL_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([tiff], [TIFFOpen], , AC_MSG_ERROR("Can't build without libtiff (does your system require a libtiff-devel package?)"), -lm)
|
||||
|
||||
@ -373,57 +367,37 @@ AX_MISALIGNED_ACCESS_FAILS([$host],
|
||||
[AC_DEFINE([SPANDSP_MISALIGNED_ACCESS_FAILS], [1], [Do not expect a misaligned memory access to work correctly])
|
||||
SPANDSP_MISALIGNED_ACCESS_FAILS="#define SPANDSP_MISALIGNED_ACCESS_FAILS 1"],
|
||||
[SPANDSP_MISALIGNED_ACCESS_FAILS="#undef SPANDSP_MISALIGNED_ACCESS_FAILS"])
|
||||
if test "$enable_mmx" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
fi
|
||||
if test "$enable_sse" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
fi
|
||||
if test "$enable_sse2" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
fi
|
||||
if test "$enable_sse3" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
|
||||
fi
|
||||
if test "$enable_sse4_1" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
|
||||
fi
|
||||
if test "$enable_sse4_2" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
|
||||
|
||||
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_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4A], [1], [Use the SSE4A instruction set (i386 and x86_64 only).])
|
||||
enable_sse4_2="yes"
|
||||
fi
|
||||
if test "$enable_sse5" = "yes" ; then
|
||||
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
|
||||
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).])
|
||||
AC_DEFINE([SPANDSP_USE_SSE5], [1], [Use the SSE5 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)
|
||||
@ -451,6 +425,7 @@ AC_CONFIG_FILES([Makefile
|
||||
test-data/itu/fax/Makefile
|
||||
test-data/local/Makefile
|
||||
tests/Makefile
|
||||
spandsp.pc
|
||||
spandsp.spec])
|
||||
|
||||
AC_OUTPUT
|
||||
|
@ -22,7 +22,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g1050.c,v 1.10 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: g1050.c,v 1.11 2009/01/16 15:13:16 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
@ -142,141 +142,176 @@ g1050_constants_t g1050_constants[1] =
|
||||
}
|
||||
};
|
||||
|
||||
g1050_channel_speeds_t g1050_speed_patterns[133] =
|
||||
g1050_channel_speeds_t g1050_speed_patterns[168] =
|
||||
{
|
||||
{ 4000000, 0, 128000, 768000, 0, 4000000, 0, 128000, 768000, 0, 2.2500},
|
||||
{ 4000000, 0, 128000, 768000, 0, 20000000, 0, 128000, 768000, 0, 1.5000},
|
||||
{ 20000000, 0, 128000, 768000, 0, 20000000, 0, 128000, 768000, 0, 0.2500},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 4000000, 0, 384000, 768000, 0, 3.4125},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 20000000, 0, 384000, 768000, 0, 2.6750},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 20000000, 0, 384000, 768000, 0, 0.5125},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 4000000, 0, 384000, 768000, 0, 0.7875},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 20000000, 0, 384000, 768000, 0, 0.6750},
|
||||
{ 20000000, 0, 128000, 3000000, 0, 20000000, 0, 384000, 768000, 0, 0.1375},
|
||||
{ 4000000, 0, 384000, 768000, 0, 4000000, 0, 128000, 1536000, 0, 3.4125},
|
||||
{ 4000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 1536000, 0, 2.6750},
|
||||
{ 20000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 1536000, 0, 0.5125},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 384000, 1536000, 0, 5.1756},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 4.6638},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 1.0506},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 4000000, 0, 384000, 1536000, 0, 1.1944},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 1.1638},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.2819},
|
||||
{ 4000000, 0, 384000, 768000, 0, 4000000, 0, 128000, 3000000, 0, 0.7875},
|
||||
{ 4000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 3000000, 0, 0.6750},
|
||||
{ 20000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 3000000, 0, 0.1375},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 384000, 3000000, 0, 1.1944},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 3000000, 0, 1.1638},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 3000000, 0, 0.2819},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 4000000, 0, 384000, 3000000, 0, 0.2756},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 3000000, 0, 0.2888},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 3000000, 0, 0.0756},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 100000000, 0, 384000, 768000, 0, 1.8000},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 100000000, 0, 384000, 768000, 0, 0.6000},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 100000000, 0, 384000, 768000, 0, 0.6750},
|
||||
{ 20000000, 0, 128000, 3000000, 0, 100000000, 0, 384000, 768000, 0, 0.2250},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 4000000, 0, 768000, 1536000, 0, 0.6000},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 20000000, 0, 768000, 1536000, 0, 0.8000},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 100000000, 0, 768000, 1536000, 0, 1.8000},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 20000000, 0, 768000, 1536000, 0, 0.2000},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 100000000, 0, 768000, 1536000, 0, 0.6000},
|
||||
{ 4000000, 0, 128000, 43000000, 0, 4000000, 0, 768000, 43000000, 0, 0.0750},
|
||||
{ 4000000, 0, 128000, 43000000, 0, 20000000, 0, 768000, 43000000, 0, 0.1000},
|
||||
{ 4000000, 0, 128000, 43000000, 0, 100000000, 0, 768000, 43000000, 0, 0.2250},
|
||||
{ 20000000, 0, 128000, 43000000, 0, 20000000, 0, 768000, 43000000, 0, 0.0250},
|
||||
{ 20000000, 0, 128000, 43000000, 0, 100000000, 0, 768000, 43000000, 0, 0.0750},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 5.4600},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 2.4600},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 1.6538},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.7913},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 1536000, 1536000, 0, 0.9100},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 1.3200},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 3.2100},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.4100},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 1.7100},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 4000000, 0, 1536000, 43000000, 0, 0.1138},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 20000000, 0, 1536000, 43000000, 0, 0.1650},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.4013},
|
||||
{ 20000000, 0, 384000, 43000000, 0, 20000000, 0, 1536000, 43000000, 0, 0.0513},
|
||||
{ 20000000, 0, 384000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.2138},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 1.6538},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 0.7913},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 0.4725},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 0.2475},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 1536000, 3000000, 0, 0.2100},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 3000000, 0, 0.3200},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.8100},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 3000000, 0, 0.1100},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.5100},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 4000000, 0, 3000000, 43000000, 0, 0.0263},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 20000000, 0, 3000000, 43000000, 0, 0.0400},
|
||||
{ 4000000, 0, 384000, 43000000, 0, 100000000, 0, 3000000, 43000000, 0, 0.1013},
|
||||
{ 20000000, 0, 384000, 43000000, 0, 20000000, 0, 3000000, 43000000, 0, 0.0138},
|
||||
{ 20000000, 0, 384000, 43000000, 0, 100000000, 0, 3000000, 43000000, 0, 0.0638},
|
||||
{ 4000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 1536000, 0, 1.8000},
|
||||
{ 20000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 1536000, 0, 0.6000},
|
||||
{ 4000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 3000000, 0, 0.6750},
|
||||
{ 20000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 3000000, 0, 0.2250},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 4000000, 0, 128000, 1536000, 0, 0.6000},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 20000000, 0, 128000, 1536000, 0, 0.8000},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 20000000, 0, 128000, 1536000, 0, 0.2000},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 100000000, 0, 128000, 1536000, 0, 1.8000},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 100000000, 0, 128000, 1536000, 0, 0.6000},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 4000000, 0, 384000, 1536000, 0, 0.9100},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 1.3200},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 0.4100},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 3.2100},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 1.7100},
|
||||
{ 4000000, 0, 1536000, 3000000, 0, 4000000, 0, 384000, 1536000, 0, 0.2100},
|
||||
{ 4000000, 0, 1536000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.3200},
|
||||
{ 20000000, 0, 1536000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.1100},
|
||||
{ 4000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.8100},
|
||||
{ 20000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.5100},
|
||||
{ 4000000, 0, 768000, 43000000, 0, 4000000, 0, 128000, 43000000, 0, 0.0750},
|
||||
{ 4000000, 0, 768000, 43000000, 0, 20000000, 0, 128000, 43000000, 0, 0.1000},
|
||||
{ 20000000, 0, 768000, 43000000, 0, 20000000, 0, 128000, 43000000, 0, 0.0250},
|
||||
{ 4000000, 0, 768000, 43000000, 0, 100000000, 0, 128000, 43000000, 0, 0.2250},
|
||||
{ 20000000, 0, 768000, 43000000, 0, 100000000, 0, 128000, 43000000, 0, 0.0750},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 4000000, 0, 384000, 43000000, 0, 0.1138},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 20000000, 0, 384000, 43000000, 0, 0.1650},
|
||||
{ 20000000, 0, 1536000, 43000000, 0, 20000000, 0, 384000, 43000000, 0, 0.0513},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.4013},
|
||||
{ 20000000, 0, 1536000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.2138},
|
||||
{ 4000000, 0, 3000000, 43000000, 0, 4000000, 0, 384000, 43000000, 0, 0.0263},
|
||||
{ 4000000, 0, 3000000, 43000000, 0, 20000000, 0, 384000, 43000000, 0, 0.0400},
|
||||
{ 20000000, 0, 3000000, 43000000, 0, 20000000, 0, 384000, 43000000, 0, 0.0138},
|
||||
{ 4000000, 0, 3000000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.1013},
|
||||
{ 20000000, 0, 3000000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.0638},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 1.4400},
|
||||
{100000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.5400},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 1.4400},
|
||||
{100000000, 0, 384000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.1800},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 0.5400},
|
||||
{100000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 0.2025},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.5400},
|
||||
{100000000, 0, 384000, 43000000, 0, 100000000, 0, 3000000, 43000000, 0, 0.0675},
|
||||
{100000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 1.4400},
|
||||
{100000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.5400},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 4000000, 0, 1536000, 1536000, 0, 0.1600},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.3200},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.9600},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.1600},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.9600},
|
||||
{100000000, 0, 1536000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 1.4400},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 4000000, 0, 1536000, 43000000, 0, 0.0400},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 20000000, 0, 1536000, 43000000, 0, 0.0800},
|
||||
{ 4000000, 0, 1536000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.2400},
|
||||
{ 20000000, 0, 1536000, 43000000, 0, 20000000, 0, 1536000, 43000000, 0, 0.0400},
|
||||
{ 20000000, 0, 1536000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.2400},
|
||||
{100000000, 0, 1536000, 43000000, 0, 100000000, 0, 1536000, 43000000, 0, 0.3600},
|
||||
{100000000, 0, 1536000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.1800},
|
||||
{100000000, 0, 3000000, 43000000, 0, 100000000, 0, 384000, 43000000, 0, 0.0675},
|
||||
{ 4000000, 0, 43000000, 43000000, 0, 4000000, 0, 43000000, 43000000, 0, 0.0025},
|
||||
{ 4000000, 0, 43000000, 43000000, 0, 20000000, 0, 43000000, 43000000, 0, 0.0050},
|
||||
{ 4000000, 0, 43000000, 43000000, 0, 100000000, 0, 43000000, 43000000, 0, 0.0150},
|
||||
{ 20000000, 0, 43000000, 43000000, 0, 20000000, 0, 43000000, 43000000, 0, 0.0025},
|
||||
{ 20000000, 0, 43000000, 43000000, 0, 100000000, 0, 43000000, 43000000, 0, 0.0150},
|
||||
{100000000, 0, 43000000, 43000000, 0, 100000000, 0, 43000000, 43000000, 0, 0.0225}
|
||||
{ 4000000, 0, 128000, 768000, 0, 4000000, 0, 128000, 768000, 0, 0.360},
|
||||
{ 4000000, 0, 128000, 768000, 0, 20000000, 0, 128000, 768000, 0, 0.720},
|
||||
{ 4000000, 0, 128000, 768000, 0, 100000000, 0, 128000, 768000, 0, 0.360},
|
||||
{ 20000000, 0, 128000, 768000, 0, 20000000, 0, 128000, 768000, 0, 0.360},
|
||||
{ 20000000, 0, 128000, 768000, 0, 100000000, 0, 128000, 768000, 0, 0.360},
|
||||
{100000000, 0, 128000, 768000, 0, 100000000, 0, 128000, 768000, 0, 0.090},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 4000000, 0, 384000, 768000, 0, 0.720},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 20000000, 0, 384000, 768000, 0, 1.470},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 100000000, 0, 384000, 768000, 0, 0.840},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 20000000, 0, 384000, 768000, 0, 0.750},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 100000000, 0, 384000, 768000, 0, 0.855},
|
||||
{100000000, 0, 128000, 1536000, 0, 100000000, 0, 384000, 768000, 0, 0.240},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 4000000, 0, 384000, 768000, 0, 0.120},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 20000000, 0, 384000, 768000, 0, 0.420},
|
||||
{ 4000000, 0, 128000, 3000000, 0, 100000000, 0, 384000, 768000, 0, 0.840},
|
||||
{ 20000000, 0, 128000, 3000000, 0, 20000000, 0, 384000, 768000, 0, 0.300},
|
||||
{ 20000000, 0, 128000, 3000000, 0, 100000000, 0, 384000, 768000, 0, 0.930},
|
||||
{100000000, 0, 128000, 3000000, 0, 100000000, 0, 384000, 768000, 0, 0.390},
|
||||
{ 4000000, 0, 384000, 768000, 0, 4000000, 0, 128000, 1536000, 0, 0.720},
|
||||
{ 4000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 1536000, 0, 1.470},
|
||||
{ 4000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 1536000, 0, 0.840},
|
||||
{ 20000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 1536000, 0, 0.750},
|
||||
{ 20000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 1536000, 0, 0.855},
|
||||
{100000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 1536000, 0, 0.240},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 384000, 1536000, 0, 1.440},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 3.000},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 1.920},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 1.563},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 2.000},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 0.640},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 4000000, 0, 384000, 1536000, 0, 0.240},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.850},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 1.720},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.625},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 2.025},
|
||||
{100000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 1.040},
|
||||
{ 4000000, 0, 384000, 768000, 0, 4000000, 0, 128000, 3000000, 0, 0.120},
|
||||
{ 4000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 3000000, 0, 0.420},
|
||||
{ 4000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 3000000, 0, 0.840},
|
||||
{ 20000000, 0, 384000, 768000, 0, 20000000, 0, 128000, 3000000, 0, 0.300},
|
||||
{ 20000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 3000000, 0, 0.930},
|
||||
{100000000, 0, 384000, 768000, 0, 100000000, 0, 128000, 3000000, 0, 0.390},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 4000000, 0, 384000, 3000000, 0, 0.240},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 3000000, 0, 0.850},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 1.720},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 384000, 3000000, 0, 0.625},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 2.025},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 384000, 3000000, 0, 1.040},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 4000000, 0, 384000, 3000000, 0, 0.040},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 3000000, 0, 0.200},
|
||||
{ 4000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 0.520},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 20000000, 0, 384000, 3000000, 0, 0.250},
|
||||
{ 20000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 1.300},
|
||||
{100000000, 0, 384000, 3000000, 0, 100000000, 0, 384000, 3000000, 0, 1.690},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 20000000, 0, 768000, 1536000, 0, 0.090},
|
||||
{ 4000000, 0, 128000, 1536000, 0, 100000000, 0, 768000, 1536000, 0, 0.360},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 20000000, 0, 768000, 1536000, 0, 0.090},
|
||||
{ 20000000, 0, 128000, 1536000, 0, 100000000, 0, 768000, 1536000, 0, 0.405},
|
||||
{100000000, 0, 128000, 1536000, 0, 100000000, 0, 768000, 1536000, 0, 0.180},
|
||||
{ 4000000, 0, 128000, 7000000, 0, 20000000, 0, 768000, 768000, 0, 0.270},
|
||||
{ 4000000, 0, 128000, 7000000, 0, 100000000, 0, 768000, 768000, 0, 1.080},
|
||||
{ 20000000, 0, 128000, 7000000, 0, 20000000, 0, 768000, 768000, 0, 0.270},
|
||||
{ 20000000, 0, 128000, 7000000, 0, 100000000, 0, 768000, 768000, 0, 1.215},
|
||||
{100000000, 0, 128000, 7000000, 0, 100000000, 0, 768000, 768000, 0, 0.540},
|
||||
{ 4000000, 0, 128000, 13000000, 0, 20000000, 0, 768000, 13000000, 0, 0.030},
|
||||
{ 4000000, 0, 128000, 13000000, 0, 100000000, 0, 768000, 13000000, 0, 0.120},
|
||||
{ 20000000, 0, 128000, 13000000, 0, 20000000, 0, 768000, 13000000, 0, 0.030},
|
||||
{ 20000000, 0, 128000, 13000000, 0, 100000000, 0, 768000, 13000000, 0, 0.135},
|
||||
{100000000, 0, 128000, 13000000, 0, 100000000, 0, 768000, 13000000, 0, 0.060},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.180},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.720},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.188},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.870},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.480},
|
||||
{ 4000000, 0, 384000, 7000000, 0, 20000000, 0, 768000, 1536000, 0, 0.540},
|
||||
{ 4000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 1536000, 0, 2.160},
|
||||
{ 20000000, 0, 384000, 7000000, 0, 20000000, 0, 768000, 1536000, 0, 0.563},
|
||||
{ 20000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 1536000, 0, 2.610},
|
||||
{100000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 1536000, 0, 1.440},
|
||||
{ 4000000, 0, 384000, 13000000, 0, 20000000, 0, 1536000, 13000000, 0, 0.060},
|
||||
{ 4000000, 0, 384000, 13000000, 0, 100000000, 0, 1536000, 13000000, 0, 0.240},
|
||||
{ 20000000, 0, 384000, 13000000, 0, 20000000, 0, 1536000, 13000000, 0, 0.063},
|
||||
{ 20000000, 0, 384000, 13000000, 0, 100000000, 0, 1536000, 13000000, 0, 0.290},
|
||||
{100000000, 0, 384000, 13000000, 0, 100000000, 0, 1536000, 13000000, 0, 0.160},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 3000000, 0, 0.030},
|
||||
{ 4000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.120},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 20000000, 0, 1536000, 3000000, 0, 0.075},
|
||||
{ 20000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.495},
|
||||
{100000000, 0, 384000, 1536000, 0, 100000000, 0, 1536000, 3000000, 0, 0.780},
|
||||
{ 4000000, 0, 384000, 7000000, 0, 20000000, 0, 768000, 3000000, 0, 0.090},
|
||||
{ 4000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 3000000, 0, 0.360},
|
||||
{ 20000000, 0, 384000, 7000000, 0, 20000000, 0, 768000, 3000000, 0, 0.225},
|
||||
{ 20000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 3000000, 0, 1.485},
|
||||
{100000000, 0, 384000, 7000000, 0, 100000000, 0, 768000, 3000000, 0, 2.340},
|
||||
{ 4000000, 0, 384000, 13000000, 0, 20000000, 0, 3000000, 13000000, 0, 0.010},
|
||||
{ 4000000, 0, 384000, 13000000, 0, 100000000, 0, 3000000, 13000000, 0, 0.040},
|
||||
{ 20000000, 0, 384000, 13000000, 0, 20000000, 0, 3000000, 13000000, 0, 0.025},
|
||||
{ 20000000, 0, 384000, 13000000, 0, 100000000, 0, 3000000, 13000000, 0, 0.165},
|
||||
{100000000, 0, 384000, 13000000, 0, 100000000, 0, 3000000, 13000000, 0, 0.260},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 20000000, 0, 128000, 1536000, 0, 0.090},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 20000000, 0, 128000, 1536000, 0, 0.090},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 100000000, 0, 128000, 1536000, 0, 0.405},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 100000000, 0, 128000, 1536000, 0, 0.360},
|
||||
{100000000, 0, 768000, 1536000, 0, 100000000, 0, 128000, 1536000, 0, 0.180},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 0.180},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 20000000, 0, 384000, 1536000, 0, 0.188},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 0.870},
|
||||
{ 4000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 0.720},
|
||||
{100000000, 0, 1536000, 1536000, 0, 100000000, 0, 384000, 1536000, 0, 0.480},
|
||||
{ 4000000, 0, 1536000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.030},
|
||||
{ 20000000, 0, 1536000, 3000000, 0, 20000000, 0, 384000, 1536000, 0, 0.075},
|
||||
{ 20000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.495},
|
||||
{ 4000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.120},
|
||||
{100000000, 0, 1536000, 3000000, 0, 100000000, 0, 384000, 1536000, 0, 0.780},
|
||||
{ 4000000, 0, 768000, 768000, 0, 20000000, 0, 128000, 7000000, 0, 0.270},
|
||||
{ 20000000, 0, 768000, 768000, 0, 20000000, 0, 128000, 7000000, 0, 0.270},
|
||||
{ 20000000, 0, 768000, 768000, 0, 100000000, 0, 128000, 7000000, 0, 1.215},
|
||||
{ 4000000, 0, 768000, 768000, 0, 100000000, 0, 128000, 7000000, 0, 1.080},
|
||||
{100000000, 0, 768000, 768000, 0, 100000000, 0, 128000, 7000000, 0, 0.540},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 20000000, 0, 384000, 7000000, 0, 0.540},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 20000000, 0, 384000, 7000000, 0, 0.563},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 100000000, 0, 384000, 7000000, 0, 2.610},
|
||||
{ 4000000, 0, 768000, 1536000, 0, 100000000, 0, 384000, 7000000, 0, 2.160},
|
||||
{100000000, 0, 768000, 1536000, 0, 100000000, 0, 384000, 7000000, 0, 1.440},
|
||||
{ 4000000, 0, 768000, 3000000, 0, 20000000, 0, 384000, 7000000, 0, 0.090},
|
||||
{ 20000000, 0, 768000, 3000000, 0, 20000000, 0, 384000, 7000000, 0, 0.225},
|
||||
{ 20000000, 0, 768000, 3000000, 0, 100000000, 0, 384000, 7000000, 0, 1.485},
|
||||
{ 4000000, 0, 768000, 3000000, 0, 100000000, 0, 384000, 7000000, 0, 0.360},
|
||||
{100000000, 0, 768000, 3000000, 0, 100000000, 0, 384000, 7000000, 0, 2.340},
|
||||
{ 4000000, 0, 768000, 13000000, 0, 20000000, 0, 128000, 13000000, 0, 0.030},
|
||||
{ 20000000, 0, 768000, 13000000, 0, 20000000, 0, 128000, 13000000, 0, 0.030},
|
||||
{ 20000000, 0, 768000, 13000000, 0, 100000000, 0, 128000, 13000000, 0, 0.135},
|
||||
{ 4000000, 0, 768000, 13000000, 0, 100000000, 0, 128000, 13000000, 0, 0.120},
|
||||
{100000000, 0, 768000, 13000000, 0, 100000000, 0, 128000, 13000000, 0, 0.060},
|
||||
{ 4000000, 0, 1536000, 13000000, 0, 20000000, 0, 384000, 13000000, 0, 0.060},
|
||||
{ 20000000, 0, 1536000, 13000000, 0, 20000000, 0, 384000, 13000000, 0, 0.063},
|
||||
{ 20000000, 0, 1536000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.290},
|
||||
{ 4000000, 0, 1536000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.240},
|
||||
{100000000, 0, 1536000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.160},
|
||||
{ 4000000, 0, 3000000, 13000000, 0, 20000000, 0, 384000, 13000000, 0, 0.010},
|
||||
{ 20000000, 0, 3000000, 13000000, 0, 20000000, 0, 384000, 13000000, 0, 0.025},
|
||||
{ 20000000, 0, 3000000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.165},
|
||||
{ 4000000, 0, 3000000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.040},
|
||||
{100000000, 0, 3000000, 13000000, 0, 100000000, 0, 384000, 13000000, 0, 0.260},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 20000000, 0, 1536000, 1536000, 0, 0.023},
|
||||
{ 20000000, 0, 1536000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.180},
|
||||
{100000000, 0, 1536000, 1536000, 0, 100000000, 0, 1536000, 1536000, 0, 0.360},
|
||||
{ 20000000, 0, 1536000, 7000000, 0, 20000000, 0, 768000, 1536000, 0, 0.068},
|
||||
{ 20000000, 0, 1536000, 7000000, 0, 100000000, 0, 768000, 1536000, 0, 0.540},
|
||||
{100000000, 0, 1536000, 7000000, 0, 100000000, 0, 768000, 1536000, 0, 1.080},
|
||||
{ 20000000, 0, 1536000, 13000000, 0, 20000000, 0, 1536000, 13000000, 0, 0.015},
|
||||
{ 20000000, 0, 1536000, 13000000, 0, 100000000, 0, 1536000, 13000000, 0, 0.120},
|
||||
{100000000, 0, 1536000, 13000000, 0, 100000000, 0, 1536000, 13000000, 0, 0.240},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 20000000, 0, 1536000, 7000000, 0, 0.068},
|
||||
{ 20000000, 0, 768000, 1536000, 0, 100000000, 0, 1536000, 7000000, 0, 0.540},
|
||||
{100000000, 0, 768000, 1536000, 0, 100000000, 0, 1536000, 7000000, 0, 1.080},
|
||||
{ 20000000, 0, 768000, 7000000, 0, 20000000, 0, 768000, 7000000, 0, 0.203},
|
||||
{ 20000000, 0, 768000, 7000000, 0, 100000000, 0, 768000, 7000000, 0, 1.620},
|
||||
{100000000, 0, 768000, 7000000, 0, 100000000, 0, 768000, 7000000, 0, 3.240},
|
||||
{ 20000000, 0, 768000, 13000000, 0, 20000000, 0, 7000000, 13000000, 0, 0.023},
|
||||
{ 20000000, 0, 768000, 13000000, 0, 100000000, 0, 7000000, 13000000, 0, 0.180},
|
||||
{100000000, 0, 768000, 13000000, 0, 100000000, 0, 7000000, 13000000, 0, 0.360},
|
||||
{ 20000000, 0, 7000000, 13000000, 0, 20000000, 0, 768000, 13000000, 0, 0.023},
|
||||
{ 20000000, 0, 7000000, 13000000, 0, 100000000, 0, 768000, 13000000, 0, 0.180},
|
||||
{100000000, 0, 7000000, 13000000, 0, 100000000, 0, 768000, 13000000, 0, 0.360},
|
||||
{ 20000000, 0, 13000000, 13000000, 0, 20000000, 0, 13000000, 13000000, 0, 0.003},
|
||||
{ 20000000, 0, 13000000, 13000000, 0, 100000000, 0, 13000000, 13000000, 0, 0.020},
|
||||
{100000000, 0, 13000000, 13000000, 0, 100000000, 0, 13000000, 13000000, 0, 0.040}
|
||||
};
|
||||
|
||||
g1050_model_t g1050_standard_models[9] =
|
||||
|
@ -22,7 +22,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: line_model.c,v 1.6 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: line_model.c,v 1.7 2008/11/30 10:17:30 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
@ -46,6 +46,7 @@
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
|
||||
#include "spandsp.h"
|
||||
#include "spandsp-sim.h"
|
||||
#include "spandsp/g168models.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g1050.h,v 1.8 2008/09/09 16:13:12 steveu Exp $
|
||||
* $Id: g1050.h,v 1.9 2009/01/16 15:13:16 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -39,7 +39,7 @@ model is based on a path having 5 segments:
|
||||
- a distant LAN (wired or wireless)
|
||||
The impairments typical of these segments at various service levels are modelled.
|
||||
8 standard service level behaviours are defined, covering lightly loaded to heavily
|
||||
congested levels. 133 standard sets of link speeds are defined, covering typical
|
||||
congested levels. 168 standard sets of link speeds are defined, covering typical
|
||||
wired and wireless LAN, broadband access link, and backbone characteristics.
|
||||
|
||||
The G.1050 model is suitable for testing the behaviour of RTP, UDPTL and other streaming
|
||||
@ -261,7 +261,7 @@ typedef struct
|
||||
} g1050_state_t;
|
||||
|
||||
extern g1050_constants_t g1050_constants[1];
|
||||
extern g1050_channel_speeds_t g1050_speed_patterns[133];
|
||||
extern g1050_channel_speeds_t g1050_speed_patterns[168];
|
||||
extern g1050_model_t g1050_standard_models[9];
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: line_model.h,v 1.3 2008/04/17 18:03:23 steveu Exp $
|
||||
* $Id: line_model.h,v 1.4 2009/01/07 13:28:10 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -56,6 +56,9 @@ The path being modelled is:
|
||||
#if !defined(_SPANDSP_LINE_MODEL_H_)
|
||||
#define _SPANDSP_LINE_MODEL_H_
|
||||
|
||||
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
|
||||
#include <spandsp.h>
|
||||
|
||||
#define LINE_FILTER_SIZE 129
|
||||
|
||||
/*!
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: test_utils.h,v 1.5 2008/08/29 09:28:13 steveu Exp $
|
||||
* $Id: test_utils.h,v 1.6 2009/01/07 13:28:10 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -30,6 +30,8 @@
|
||||
#if !defined(_TEST_UTILS_H_)
|
||||
#define _TEST_UTILS_H_
|
||||
|
||||
#include <audiofile.h>
|
||||
|
||||
enum
|
||||
{
|
||||
MUNGE_CODEC_NONE = 0,
|
||||
|
@ -22,7 +22,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: test_utils.c,v 1.8 2008/08/29 09:28:13 steveu Exp $
|
||||
* $Id: test_utils.c,v 1.10 2008/11/30 10:17:30 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -46,6 +46,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
|
||||
#include "spandsp.h"
|
||||
#include "spandsp-sim.h"
|
||||
|
||||
|
11
libs/spandsp/spandsp.pc
Normal file
11
libs/spandsp/spandsp.pc
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=$(exec_prefix)/lib64
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: spandsp
|
||||
Description: A DSP library for telephony.
|
||||
Requires:
|
||||
Version: 0.0.6
|
||||
Libs: -L${libdir} -lspandsp -ltiff -lm
|
||||
Cflags: -I${includedir}
|
11
libs/spandsp/spandsp.pc.in
Normal file
11
libs/spandsp/spandsp.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: spandsp
|
||||
Description: A DSP library for telephony.
|
||||
Requires:
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lspandsp -ltiff -lm
|
||||
Cflags: -I${includedir}
|
@ -1,12 +1,12 @@
|
||||
Summary: A DSP library for telephony.
|
||||
Name: spandsp
|
||||
Version: 0.0.5
|
||||
Version: 0.0.6
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.soft-switch.org/spandsp
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Source: http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.5.tar.gz
|
||||
Source: http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: libtiff-devel
|
||||
@ -62,6 +62,7 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/spandsp.h
|
||||
%{_includedir}/spandsp
|
||||
%{_libdir}/libspandsp.so
|
||||
%{_libdir}/pkgconfig/spandsp.pc
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
@ -72,7 +73,7 @@ rm -rf %{buildroot}
|
||||
- Preparing for 0.0.5pre4 release
|
||||
- License: LGPL
|
||||
|
||||
* Mon 23 Jun 2008 Steve Underwood <steveu@coppice.org> 0.0.5-1
|
||||
* Mon Jun 23 2008 Steve Underwood <steveu@coppice.org> 0.0.5-1
|
||||
- Cleared out the dependency on libxml2
|
||||
|
||||
* Sun Dec 31 2006 Steve Underwood <steveu@coppice.org> 0.0.3-1
|
||||
|
@ -62,6 +62,7 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/spandsp.h
|
||||
%{_includedir}/spandsp
|
||||
%{_libdir}/libspandsp.so
|
||||
%{_libdir}/pkgconfig/spandsp.pc
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
@ -72,7 +73,7 @@ rm -rf %{buildroot}
|
||||
- Preparing for 0.0.5pre4 release
|
||||
- License: LGPL
|
||||
|
||||
* Mon 23 Jun 2008 Steve Underwood <steveu@coppice.org> 0.0.5-1
|
||||
* Mon Jun 23 2008 Steve Underwood <steveu@coppice.org> 0.0.5-1
|
||||
- Cleared out the dependency on libxml2
|
||||
|
||||
* Sun Dec 31 2006 Steve Underwood <steveu@coppice.org> 0.0.3-1
|
||||
|
@ -16,7 +16,7 @@
|
||||
## License along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.105 2008/09/30 18:12:42 steveu Exp $
|
||||
## $Id: Makefile.am,v 1.116 2008/12/12 13:18:21 steveu Exp $
|
||||
|
||||
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
||||
@ -37,7 +37,8 @@ EXTRA_DIST = floating_fudge.h \
|
||||
msvc/msvcproj.head \
|
||||
msvc/msvcproj.foot \
|
||||
msvc/vc8proj.head \
|
||||
msvc/vc8proj.foot
|
||||
msvc/vc8proj.foot \
|
||||
spandsp/private/README
|
||||
|
||||
INCLUDES = -I$(top_builddir)
|
||||
|
||||
@ -120,7 +121,7 @@ libspandsp_la_SOURCES = adsi.c \
|
||||
vector_float.c \
|
||||
vector_int.c
|
||||
|
||||
libspandsp_la_LDFLAGS = -version-info @SPANDSP_LT_CURRENT@:@SPANDSP_LT_REVISION@:@SPANDSP_LT_AGE@
|
||||
libspandsp_la_LDFLAGS = -version-info @SPANDSP_LT_CURRENT@:@SPANDSP_LT_REVISION@:@SPANDSP_LT_AGE@ $(COMP_VENDOR_FLAGS)
|
||||
|
||||
nobase_include_HEADERS = spandsp/adsi.h \
|
||||
spandsp/async.h \
|
||||
@ -196,7 +197,55 @@ nobase_include_HEADERS = spandsp/adsi.h \
|
||||
spandsp/v8.h \
|
||||
spandsp/vector_float.h \
|
||||
spandsp/vector_int.h \
|
||||
spandsp/version.h
|
||||
spandsp/version.h \
|
||||
spandsp/private/adsi.h \
|
||||
spandsp/private/async.h \
|
||||
spandsp/private/at_interpreter.h \
|
||||
spandsp/private/awgn.h \
|
||||
spandsp/private/bell_r2_mf.h \
|
||||
spandsp/private/bert.h \
|
||||
spandsp/private/bitstream.h \
|
||||
spandsp/private/dtmf.h \
|
||||
spandsp/private/fax.h \
|
||||
spandsp/private/fax_modems.h \
|
||||
spandsp/private/fsk.h \
|
||||
spandsp/private/g711.h \
|
||||
spandsp/private/g722.h \
|
||||
spandsp/private/g726.h \
|
||||
spandsp/private/gsm0610.h \
|
||||
spandsp/private/hdlc.h \
|
||||
spandsp/private/ima_adpcm.h \
|
||||
spandsp/private/logging.h \
|
||||
spandsp/private/lpc10.h \
|
||||
spandsp/private/modem_connect_tones.h \
|
||||
spandsp/private/noise.h \
|
||||
spandsp/private/oki_adpcm.h \
|
||||
spandsp/private/queue.h \
|
||||
spandsp/private/schedule.h \
|
||||
spandsp/private/sig_tone.h \
|
||||
spandsp/private/super_tone_rx.h \
|
||||
spandsp/private/super_tone_tx.h \
|
||||
spandsp/private/t30.h \
|
||||
spandsp/private/t31.h \
|
||||
spandsp/private/t38_core.h \
|
||||
spandsp/private/t38_gateway.h \
|
||||
spandsp/private/t38_non_ecm_buffer.h \
|
||||
spandsp/private/t38_terminal.h \
|
||||
spandsp/private/t4.h \
|
||||
spandsp/private/time_scale.h \
|
||||
spandsp/private/tone_detect.h \
|
||||
spandsp/private/tone_generate.h \
|
||||
spandsp/private/v17rx.h \
|
||||
spandsp/private/v17tx.h \
|
||||
spandsp/private/v22bis.h \
|
||||
spandsp/private/v27ter_rx.h \
|
||||
spandsp/private/v27ter_tx.h \
|
||||
spandsp/private/v29rx.h \
|
||||
spandsp/private/v29tx.h \
|
||||
spandsp/private/v42.h \
|
||||
spandsp/private/v42bis.h \
|
||||
spandsp/private/v8.h \
|
||||
spandsp/expose.h
|
||||
|
||||
nodist_include_HEADERS = spandsp.h
|
||||
|
||||
|
@ -23,26 +23,26 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: adsi.c,v 1.60 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: adsi.c,v 1.67 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
@ -60,6 +60,14 @@
|
||||
#include "spandsp/dtmf.h"
|
||||
#include "spandsp/adsi.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#include "spandsp/private/queue.h"
|
||||
#include "spandsp/private/tone_generate.h"
|
||||
#include "spandsp/private/async.h"
|
||||
#include "spandsp/private/fsk.h"
|
||||
#include "spandsp/private/dtmf.h"
|
||||
#include "spandsp/private/adsi.h"
|
||||
|
||||
#define BAUDOT_FIGURE_SHIFT 0x1B
|
||||
#define BAUDOT_LETTER_SHIFT 0x1F
|
||||
|
||||
@ -440,6 +448,13 @@ adsi_rx_state_t *adsi_rx_init(adsi_rx_state_t *s,
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int adsi_rx_free(adsi_rx_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len)
|
||||
{
|
||||
int len;
|
||||
@ -642,6 +657,13 @@ adsi_tx_state_t *adsi_tx_init(adsi_tx_state_t *s, int standard)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int adsi_tx_free(adsi_tx_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static uint16_t adsi_encode_baudot(adsi_tx_state_t *s, uint8_t ch)
|
||||
{
|
||||
static const uint8_t conv[128] =
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: async.c,v 1.13 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: async.c,v 1.15 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
@ -39,6 +39,8 @@
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/async.h"
|
||||
|
||||
#include "spandsp/private/async.h"
|
||||
|
||||
const char *signal_status_to_str(int status)
|
||||
{
|
||||
switch (status)
|
||||
|
@ -25,13 +25,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: at_interpreter.c,v 1.30 2008/07/24 13:55:23 steveu Exp $
|
||||
* $Id: at_interpreter.c,v 1.34 2009/01/16 15:13:16 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
@ -55,6 +55,9 @@
|
||||
|
||||
#include "spandsp/at_interpreter.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#include "spandsp/private/at_interpreter.h"
|
||||
|
||||
#define ms_to_samples(t) (((t)*SAMPLE_RATE)/1000)
|
||||
|
||||
#define MANUFACTURER "www.soft-switch.org"
|
||||
@ -180,6 +183,7 @@ void at_put_response_code(at_state_t *s, int code)
|
||||
{
|
||||
uint8_t buf[20];
|
||||
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Sending AT response code %s\n", at_response_codes[code]);
|
||||
switch (s->p.result_code_format)
|
||||
{
|
||||
case ASCII_RESULT_CODES:
|
||||
@ -239,7 +243,7 @@ void at_call_event(at_state_t *s, int event)
|
||||
}
|
||||
break;
|
||||
case AT_CALL_EVENT_CONNECTED:
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Dial call - connected. fclass=%d\n", s->fclass_mode);
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Dial call - connected. FCLASS=%d\n", s->fclass_mode);
|
||||
at_modem_control(s, AT_MODEM_CONTROL_RNG, (void *) 0);
|
||||
if (s->fclass_mode == 0)
|
||||
{
|
||||
@ -309,8 +313,8 @@ void at_call_event(at_state_t *s, int event)
|
||||
|
||||
void at_reset_call_info(at_state_t *s)
|
||||
{
|
||||
struct at_call_id *call_id;
|
||||
struct at_call_id *next;
|
||||
at_call_id_t *call_id;
|
||||
at_call_id_t *next;
|
||||
|
||||
for (call_id = s->call_id; call_id; call_id = next)
|
||||
{
|
||||
@ -325,11 +329,11 @@ void at_reset_call_info(at_state_t *s)
|
||||
|
||||
void at_set_call_info(at_state_t *s, char const *id, char const *value)
|
||||
{
|
||||
struct at_call_id *new_call_id;
|
||||
struct at_call_id *call_id;
|
||||
at_call_id_t *new_call_id;
|
||||
at_call_id_t *call_id;
|
||||
|
||||
/* TODO: We should really not merely ignore a failure to malloc */
|
||||
if ((new_call_id = (struct at_call_id *) malloc(sizeof(*new_call_id))) == NULL)
|
||||
if ((new_call_id = (at_call_id_t *) malloc(sizeof(*new_call_id))) == NULL)
|
||||
return;
|
||||
call_id = s->call_id;
|
||||
/* If these strdups fail its pretty harmless. We just appear to not
|
||||
@ -354,7 +358,7 @@ void at_set_call_info(at_state_t *s, char const *id, char const *value)
|
||||
void at_display_call_info(at_state_t *s)
|
||||
{
|
||||
char buf[132 + 1];
|
||||
struct at_call_id *call_id = s->call_id;
|
||||
at_call_id_t *call_id = s->call_id;
|
||||
|
||||
while (call_id)
|
||||
{
|
||||
@ -5299,6 +5303,8 @@ at_state_t *at_init(at_state_t *s,
|
||||
return NULL;
|
||||
}
|
||||
memset(s, '\0', sizeof(*s));
|
||||
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
|
||||
span_log_set_protocol(&s->logging, "AT");
|
||||
s->modem_control_handler = modem_control_handler;
|
||||
s->modem_control_user_data = modem_control_user_data;
|
||||
s->at_tx_handler = at_tx_handler;
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: awgn.c,v 1.17 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: awgn.c,v 1.20 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -43,23 +43,25 @@
|
||||
to ever be optimised. */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/saturated.h"
|
||||
#include "spandsp/awgn.h"
|
||||
|
||||
#include "spandsp/private/awgn.h"
|
||||
|
||||
/* Gaussian noise generator constants */
|
||||
#define M1 259200
|
||||
#define IA1 7141
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bell_r2_mf.c,v 1.29 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: bell_r2_mf.c,v 1.33 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -36,13 +36,13 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/queue.h"
|
||||
@ -55,6 +55,10 @@
|
||||
#include "spandsp/dtmf.h"
|
||||
#include "spandsp/bell_r2_mf.h"
|
||||
|
||||
#include "spandsp/private/queue.h"
|
||||
#include "spandsp/private/tone_generate.h"
|
||||
#include "spandsp/private/bell_r2_mf.h"
|
||||
|
||||
#if !defined(M_PI)
|
||||
/* C99 systems may not define M_PI */
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bert.c,v 1.28 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: bert.c,v 1.30 2008/11/30 13:44:35 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
@ -41,6 +41,9 @@
|
||||
#include "spandsp/async.h"
|
||||
#include "spandsp/bert.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#include "spandsp/private/bert.h"
|
||||
|
||||
static const char *qbf = "VoyeZ Le BricK GeanT QuE J'ExaminE PreS Du WharF 123 456 7890 + - * : = $ % ( )"
|
||||
"ThE QuicK BrowN FoX JumpS OveR ThE LazY DoG 123 456 7890 + - * : = $ % ( )";
|
||||
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bitstream.c,v 1.13 2008/05/13 13:17:22 steveu Exp $
|
||||
* $Id: bitstream.c,v 1.16 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
@ -39,7 +39,9 @@
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/bitstream.h"
|
||||
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
|
||||
#include "spandsp/private/bitstream.h"
|
||||
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
|
||||
{
|
||||
value &= ((1 << bits) - 1);
|
||||
if (s->residue + bits <= 32)
|
||||
@ -56,7 +58,7 @@ void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bi
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
|
||||
void bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
|
||||
{
|
||||
value &= ((1 << bits) - 1);
|
||||
if (s->residue + bits <= 32)
|
||||
@ -72,14 +74,13 @@ void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int b
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
{
|
||||
unsigned int x;
|
||||
uint32_t x;
|
||||
|
||||
while (s->residue < (unsigned int) bits)
|
||||
while (s->residue < bits)
|
||||
{
|
||||
x = (unsigned int) *(*c)++;
|
||||
s->bitstream |= (x << s->residue);
|
||||
s->bitstream |= (((uint32_t) *(*c)++) << s->residue);
|
||||
s->residue += 8;
|
||||
}
|
||||
s->residue -= bits;
|
||||
@ -89,14 +90,13 @@ unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
uint32_t bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
{
|
||||
unsigned int x;
|
||||
uint32_t x;
|
||||
|
||||
while (s->residue < (unsigned int) bits)
|
||||
while (s->residue < bits)
|
||||
{
|
||||
x = (unsigned int) *(*c)++;
|
||||
s->bitstream = (s->bitstream << 8) | x;
|
||||
s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
|
||||
s->residue += 8;
|
||||
}
|
||||
s->residue -= bits;
|
||||
|
@ -22,11 +22,11 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: complex_filters.c,v 1.13 2008/05/13 13:17:22 steveu Exp $
|
||||
* $Id: complex_filters.c,v 1.14 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -22,34 +22,132 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: complex_vector_float.c,v 1.10 2008/09/18 13:16:49 steveu Exp $
|
||||
* $Id: complex_vector_float.c,v 1.14 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(SPANDSP_USE_MMX)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE2)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE3)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4_1)
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4_2)
|
||||
#include <nmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4A)
|
||||
#include <ammintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE5)
|
||||
#include <bmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/logging.h"
|
||||
#include "spandsp/complex.h"
|
||||
#include "spandsp/vector_float.h"
|
||||
#include "spandsp/complex_vector_float.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE3)
|
||||
void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
|
||||
{
|
||||
int i;
|
||||
__m128 n0;
|
||||
__m128 n1;
|
||||
__m128 n2;
|
||||
__m128 n3;
|
||||
|
||||
if ((i = n & ~1))
|
||||
{
|
||||
i <<= 1;
|
||||
for (i -= 4; i >= 0; i -= 4)
|
||||
{
|
||||
n3 = _mm_loadu_ps((float *) x + i);
|
||||
n0 = _mm_moveldup_ps(n3);
|
||||
n1 = _mm_loadu_ps((float *) y + i);
|
||||
n0 = _mm_mul_ps(n0, n1);
|
||||
n1 = _mm_shuffle_ps(n1, n1, 0xB1);
|
||||
n2 = _mm_movehdup_ps(n3);
|
||||
n2 = _mm_mul_ps(n2, n1);
|
||||
n0 = _mm_addsub_ps(n0, n2);
|
||||
_mm_storeu_ps((float *) z + i, n0);
|
||||
}
|
||||
}
|
||||
/* Now deal with the last element, which doesn't fill an SSE2 register */
|
||||
switch (n & 1)
|
||||
{
|
||||
case 1:
|
||||
z[n - 1].re = x[n - 1].re*y[n - 1].re - x[n - 1].im*y[n - 1].im;
|
||||
z[n - 1].im = x[n - 1].re*y[n - 1].im + x[n - 1].im*y[n - 1].re;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
z[i].re = x[i].re*y[i].re - x[i].im*y[i].im;
|
||||
z[i].im = x[i].re*y[i].im + x[i].im*y[i].re;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
z[i].re = x[i].re*y[i].re - x[i].im*y[i].im;
|
||||
z[i].im = x[i].re*y[i].im + x[i].im*y[i].re;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(HAVE_LONG_DOUBLE)
|
||||
void cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
z[i].re = x[i].re*y[i].re - x[i].im*y[i].im;
|
||||
z[i].im = x[i].re*y[i].im + x[i].im*y[i].re;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
complexf_t cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n)
|
||||
{
|
||||
int i;
|
||||
@ -109,17 +207,17 @@ complexf_t cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], i
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#define LMS_LEAK_RATE 0.9999f
|
||||
|
||||
void cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
y[i].re += (x[i].im*error->im + x[i].re*error->re);
|
||||
y[i].im += (x[i].re*error->im - x[i].im*error->re);
|
||||
/* Leak a little to tame uncontrolled wandering */
|
||||
y[i].re *= 0.9999f;
|
||||
y[i].im *= 0.9999f;
|
||||
y[i].re = y[i].re*LMS_LEAK_RATE + (x[i].im*error->im + x[i].re*error->re);
|
||||
y[i].im = y[i].im*LMS_LEAK_RATE + (x[i].re*error->im - x[i].im*error->re);
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
@ -22,28 +22,53 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: complex_vector_int.c,v 1.3 2008/09/18 13:54:32 steveu Exp $
|
||||
* $Id: complex_vector_int.c,v 1.6 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(SPANDSP_USE_MMX)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE2)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE3)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4_1)
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4_2)
|
||||
#include <nmmintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE4A)
|
||||
#include <ammintrin.h>
|
||||
#endif
|
||||
#if defined(SPANDSP_USE_SSE5)
|
||||
#include <bmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/logging.h"
|
||||
#include "spandsp/complex.h"
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: crc.c,v 1.4 2008/05/13 13:17:22 steveu Exp $
|
||||
* $Id: crc.c,v 1.5 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
|
@ -22,24 +22,24 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: dds_float.c,v 1.8 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: dds_float.c,v 1.10 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/complex.h"
|
||||
|
@ -22,23 +22,23 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: dds_int.c,v 1.11 2008/09/11 15:13:42 steveu Exp $
|
||||
* $Id: dds_int.c,v 1.13 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/complex.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: dtmf.c,v 1.43 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: dtmf.c,v 1.47 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file dtmf.h */
|
||||
@ -33,13 +33,13 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
@ -54,6 +54,10 @@
|
||||
#include "spandsp/super_tone_rx.h"
|
||||
#include "spandsp/dtmf.h"
|
||||
|
||||
#include "spandsp/private/queue.h"
|
||||
#include "spandsp/private/tone_generate.h"
|
||||
#include "spandsp/private/dtmf.h"
|
||||
|
||||
#define DEFAULT_DTMF_TX_LEVEL -10
|
||||
#define DEFAULT_DTMF_TX_ON_TIME 50
|
||||
#define DEFAULT_DTMF_TX_OFF_TIME 55
|
||||
|
@ -27,7 +27,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: echo.c,v 1.28 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: echo.c,v 1.30 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -79,18 +79,18 @@
|
||||
reasonable way. */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -23,26 +23,26 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: fax.c,v 1.79 2008/08/13 00:11:30 steveu Exp $
|
||||
* $Id: fax.c,v 1.84 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
@ -63,12 +63,12 @@
|
||||
#include "spandsp/hdlc.h"
|
||||
#include "spandsp/silence_gen.h"
|
||||
#include "spandsp/fsk.h"
|
||||
#include "spandsp/v29rx.h"
|
||||
#include "spandsp/v29tx.h"
|
||||
#include "spandsp/v27ter_rx.h"
|
||||
#include "spandsp/v29rx.h"
|
||||
#include "spandsp/v27ter_tx.h"
|
||||
#include "spandsp/v17rx.h"
|
||||
#include "spandsp/v27ter_rx.h"
|
||||
#include "spandsp/v17tx.h"
|
||||
#include "spandsp/v17rx.h"
|
||||
#include "spandsp/super_tone_rx.h"
|
||||
#include "spandsp/modem_connect_tones.h"
|
||||
#include "spandsp/t4.h"
|
||||
@ -82,6 +82,21 @@
|
||||
#include "spandsp/fax_modems.h"
|
||||
#include "spandsp/fax.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#include "spandsp/private/fsk.h"
|
||||
#include "spandsp/private/v17tx.h"
|
||||
#include "spandsp/private/v17rx.h"
|
||||
#include "spandsp/private/v27ter_tx.h"
|
||||
#include "spandsp/private/v27ter_rx.h"
|
||||
#include "spandsp/private/v29tx.h"
|
||||
#include "spandsp/private/v29rx.h"
|
||||
#include "spandsp/private/modem_connect_tones.h"
|
||||
#include "spandsp/private/hdlc.h"
|
||||
#include "spandsp/private/fax_modems.h"
|
||||
#include "spandsp/private/t4.h"
|
||||
#include "spandsp/private/t30.h"
|
||||
#include "spandsp/private/fax.h"
|
||||
|
||||
#define HDLC_FRAMING_OK_THRESHOLD 5
|
||||
|
||||
static void fax_send_hdlc(void *user_data, const uint8_t *msg, int len)
|
||||
@ -517,6 +532,12 @@ t30_state_t *fax_get_t30_state(fax_state_t *s)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
logging_state_t *fax_get_logging_state(fax_state_t *s)
|
||||
{
|
||||
return &s->logging;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
fax_state_t *fax_init(fax_state_t *s, int calling_party)
|
||||
{
|
||||
if (s == NULL)
|
||||
|
@ -25,7 +25,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: filter_tools.c,v 1.8 2008/08/29 09:28:13 steveu Exp $
|
||||
* $Id: filter_tools.c,v 1.9 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
@ -35,13 +35,13 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
@ -22,25 +22,25 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: fsk.c,v 1.46 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: fsk.c,v 1.49 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
@ -50,6 +50,8 @@
|
||||
#include "spandsp/async.h"
|
||||
#include "spandsp/fsk.h"
|
||||
|
||||
#include "spandsp/private/fsk.h"
|
||||
|
||||
const fsk_spec_t preset_fsk_specs[] =
|
||||
{
|
||||
{
|
||||
|
@ -22,30 +22,24 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.c,v 1.11 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: g711.c,v 1.14 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/bit_operations.h"
|
||||
#include "spandsp/g711.h"
|
||||
#include "spandsp/private/g711.h"
|
||||
|
||||
/* Copied from the CCITT G.711 specification */
|
||||
static const uint8_t ulaw_to_alaw_table[256] =
|
||||
|
@ -28,31 +28,33 @@
|
||||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722.c,v 1.2 2008/09/19 16:24:25 steveu Exp $
|
||||
* $Id: g722.c,v 1.5 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/saturated.h"
|
||||
#include "spandsp/vector_int.h"
|
||||
#include "spandsp/g722.h"
|
||||
|
||||
#include "spandsp/private/g722.h"
|
||||
|
||||
static const int16_t qmf_coeffs_fwd[12] =
|
||||
{
|
||||
3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11,
|
||||
|
@ -48,25 +48,25 @@
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*
|
||||
* $Id: g726.c,v 1.22 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: g726.c,v 1.26 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
@ -75,6 +75,9 @@
|
||||
#include "spandsp/g711.h"
|
||||
#include "spandsp/g726.h"
|
||||
|
||||
#include "spandsp/private/bitstream.h"
|
||||
#include "spandsp/private/g726.h"
|
||||
|
||||
/*
|
||||
* Maps G.726_16 code word to reconstructed scale factor normalized log
|
||||
* magnitude values.
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_decode.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_decode.c,v 1.24 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_encode.c,v 1.26 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_encode.c,v 1.28 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_local.h,v 1.10 2008/04/17 14:26:56 steveu Exp $
|
||||
* $Id: gsm0610_local.h,v 1.13 2009/01/16 15:49:59 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_GSM0610_LOCAL_H_)
|
||||
@ -35,16 +35,18 @@
|
||||
|
||||
#define GSM0610_MAGIC 0xD
|
||||
|
||||
#include "spandsp/private/gsm0610.h"
|
||||
|
||||
static __inline__ int16_t gsm_add(int16_t a, int16_t b)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
__asm__ __volatile__(
|
||||
" addw %2,%0;\n"
|
||||
" jno 0f;\n"
|
||||
" movw $0x7fff,%0;\n"
|
||||
" adcw $0,%0;\n"
|
||||
"0:"
|
||||
: "=r" (a)
|
||||
: "=&r" (a)
|
||||
: "0" (a), "ir" (b)
|
||||
: "cc"
|
||||
);
|
||||
@ -60,14 +62,14 @@ static __inline__ int16_t gsm_add(int16_t a, int16_t b)
|
||||
|
||||
static __inline__ int32_t gsm_l_add(int32_t a, int32_t b)
|
||||
{
|
||||
#if defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
__asm__ __volatile__(
|
||||
" addl %2,%0;\n"
|
||||
" jno 0f;\n"
|
||||
" movl $0x7fffffff,%0;\n"
|
||||
" adcl $0,%0;\n"
|
||||
"0:"
|
||||
: "=r" (a)
|
||||
: "=&r" (a)
|
||||
: "0" (a), "ir" (b)
|
||||
: "cc"
|
||||
);
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_long_term.c,v 1.17 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_long_term.c,v 1.20 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
@ -66,12 +66,82 @@ static const int16_t gsm_QLB[4] =
|
||||
|
||||
/* 4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION */
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc_out)
|
||||
{
|
||||
int32_t lmax;
|
||||
int32_t out;
|
||||
|
||||
#if defined(__x86_64__)
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" pushq %%rbx;\n"
|
||||
" movl $0,%%edx;\n" /* Will be maximum inner-product */
|
||||
" movl $40,%%ebx;\n"
|
||||
" movl %%ebx,%%ecx;\n" /* Will be index of max inner-product */
|
||||
" subq $80,%%rsi;\n"
|
||||
" .p2align 2;\n"
|
||||
"1:\n"
|
||||
" movq (%%rdi),%%mm0;\n"
|
||||
" movq (%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%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"
|
||||
" movq 32(%%rdi),%%mm1;\n"
|
||||
" movq 32(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 40(%%rdi),%%mm1;\n"
|
||||
" movq 40(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 48(%%rdi),%%mm1;\n"
|
||||
" movq 48(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 56(%%rdi),%%mm1;\n"
|
||||
" movq 56(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 64(%%rdi),%%mm1;\n"
|
||||
" movq 64(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 72(%%rdi),%%mm1;\n"
|
||||
" movq 72(%%rsi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq %%mm0,%%mm1;\n"
|
||||
" punpckhdq %%mm0,%%mm1;\n" /* mm1 has high int32 of mm0 dup'd */
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movd %%mm0,%%eax;\n" /* eax has result */
|
||||
" cmpl %%edx,%%eax;\n"
|
||||
" jle 2f;\n"
|
||||
" movl %%eax,%%edx;\n"
|
||||
" movl %%ebx,%%ecx;\n"
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" subq $2,%%rsi;\n"
|
||||
" incl %%ebx;\n"
|
||||
" cmpq $120,%%rbx;\n"
|
||||
" jle 1b;\n"
|
||||
" popq %%rbx;\n"
|
||||
" emms;\n"
|
||||
: "=d" (lmax), "=c" (out)
|
||||
: "D" (wt), "S" (dp)
|
||||
: "eax"
|
||||
);
|
||||
#else
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" pushl %%ebx;\n"
|
||||
@ -140,6 +210,7 @@ int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc
|
||||
: "D" (wt), "S" (dp)
|
||||
: "eax"
|
||||
);
|
||||
#endif
|
||||
*Nc_out = out;
|
||||
return lmax;
|
||||
}
|
||||
@ -176,7 +247,7 @@ static int16_t evaluate_ltp_parameters(int16_t d[40],
|
||||
int16_t scale;
|
||||
int16_t temp;
|
||||
int32_t L_temp;
|
||||
#if !(defined(__GNUC__) && defined(__i386__))
|
||||
#if !(defined(__GNUC__) && defined(SPANDSP_USE_MMX))
|
||||
int16_t lambda;
|
||||
#endif
|
||||
|
||||
@ -216,7 +287,7 @@ static int16_t evaluate_ltp_parameters(int16_t d[40],
|
||||
/*endfor*/
|
||||
|
||||
/* Search for the maximum cross-correlation and coding of the LTP lag */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
L_max = gsm0610_max_cross_corr(wt, dp, &Nc);
|
||||
#else
|
||||
L_max = 0;
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_lpc.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_lpc.c,v 1.27 2009/01/28 03:41:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
@ -133,7 +133,7 @@ static int16_t gsm_div(int16_t num, int16_t denom)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
|
||||
{
|
||||
static const int64_t ones = 0x0001000100010001LL;
|
||||
@ -141,6 +141,70 @@ void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
|
||||
if (n == 0)
|
||||
return;
|
||||
/*endif*/
|
||||
#if defined(__x86_64__)
|
||||
__asm__ __volatile__(
|
||||
" leaq -16(%%rsi,%%rax,2),%%rdx;\n" /* edx = top - 16 */
|
||||
" emms;\n"
|
||||
" movd %%ecx,%%mm3;\n"
|
||||
" movq %[ones],%%mm2;\n"
|
||||
" psllw %%mm3,%%mm2;\n"
|
||||
" psrlw $1,%%mm2;\n"
|
||||
" cmpq %%rdx,%%rsi;"
|
||||
" ja 4f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
/* 8 words per iteration */
|
||||
"6:\n"
|
||||
" movq (%%rsi),%%mm0;\n"
|
||||
" movq 8(%%rsi),%%mm1;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm1;\n"
|
||||
" psraw %%mm3,%%mm1;\n"
|
||||
" movq %%mm0,(%%rsi);\n"
|
||||
" movq %%mm1,8(%%rsi);\n"
|
||||
" addq $16,%%rsi;\n"
|
||||
" cmpq %%rdx,%%rsi;\n"
|
||||
" jbe 6b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"4:\n"
|
||||
" addq $12,%%rdx;\n" /* now edx = top-4 */
|
||||
" cmpq %%rdx,%%rsi;\n"
|
||||
" ja 3f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
/* do up to 6 words, two per iteration */
|
||||
"5:\n"
|
||||
" movd (%%rsi),%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" movd %%mm0,(%%rsi);\n"
|
||||
" addq $4,%%rsi;\n"
|
||||
" cmpq %%rdx,%%rsi;\n"
|
||||
" jbe 5b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"3:\n"
|
||||
" addq $2,%%rdx;\n" /* now edx = top-2 */
|
||||
" cmpq %%rdx,%%rsi;\n"
|
||||
" ja 2f;\n"
|
||||
|
||||
" movzwl (%%rsi),%%eax;\n"
|
||||
" movd %%eax,%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" movd %%mm0,%%eax;\n"
|
||||
" movw %%ax,(%%rsi);\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" emms;\n"
|
||||
:
|
||||
: "S" (p), "a" (n), "c" (bits), [ones] "m" (ones)
|
||||
: "edx"
|
||||
);
|
||||
#else
|
||||
__asm__ __volatile__(
|
||||
" leal -16(%%esi,%%eax,2),%%edx;\n" /* edx = top - 16 */
|
||||
" emms;\n"
|
||||
@ -175,7 +239,7 @@ void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
|
||||
" .p2align 2;\n"
|
||||
/* do up to 6 words, two per iteration */
|
||||
"5:\n"
|
||||
" movd (%%esi),%%mm0;\n"
|
||||
" movd (%%esi),%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" movd %%mm0,(%%esi);\n"
|
||||
@ -203,6 +267,7 @@ void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
|
||||
: "S" (p), "a" (n), "c" (bits), [ones] "m" (ones)
|
||||
: "edx"
|
||||
);
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
@ -213,7 +278,7 @@ static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
|
||||
int k;
|
||||
int16_t smax;
|
||||
int16_t scalauto;
|
||||
#if !(defined(__GNUC__) && defined(__i386__))
|
||||
#if !(defined(__GNUC__) && defined(SPANDSP_USE_MMX))
|
||||
int i;
|
||||
int temp;
|
||||
int16_t *sp;
|
||||
@ -225,7 +290,7 @@ static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
|
||||
|
||||
/* Dynamic scaling of the array s[0..159] */
|
||||
/* Search for the maximum. */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
smax = saturate(vec_min_maxi16(amp, GSM0610_FRAME_LEN, NULL));
|
||||
#else
|
||||
for (smax = 0, k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
@ -251,7 +316,7 @@ static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
|
||||
/*endif*/
|
||||
|
||||
/* Scaling of the array s[0...159] */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
if (scalauto > 0)
|
||||
gsm0610_vec_vsraw(amp, GSM0610_FRAME_LEN, scalauto);
|
||||
/*endif*/
|
||||
@ -266,78 +331,78 @@ static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
|
||||
#endif
|
||||
|
||||
/* Compute the L_ACF[..]. */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
|
||||
for (k = 0; k < 9; k++)
|
||||
L_ACF[k] = vec_dot_prodi16(amp, amp + k, GSM0610_FRAME_LEN - k) << 1;
|
||||
/*endfor*/
|
||||
#else
|
||||
sp = amp;
|
||||
sl = *sp;
|
||||
L_ACF[0] = ((int32_t) sl*sp[0]);
|
||||
L_ACF[0] = ((int32_t) sl*(int32_t) sp[0]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] = ((int32_t) sl*sp[-1]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] = ((int32_t) sl*(int32_t) sp[-1]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] = ((int32_t) sl*sp[-2]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] = ((int32_t) sl*(int32_t) sp[-2]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] = ((int32_t) sl*sp[-3]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] = ((int32_t) sl*(int32_t) sp[-3]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] = ((int32_t) sl*sp[-4]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] = ((int32_t) sl*(int32_t) sp[-4]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] = ((int32_t) sl*sp[-5]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*(int32_t) sp[-4]);
|
||||
L_ACF[5] = ((int32_t) sl*(int32_t) sp[-5]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] = ((int32_t) sl*sp[-6]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*(int32_t) sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*(int32_t) sp[-5]);
|
||||
L_ACF[6] = ((int32_t) sl*(int32_t) sp[-6]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] = ((int32_t) sl*sp[-7]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*(int32_t) sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*(int32_t) sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*(int32_t) sp[-6]);
|
||||
L_ACF[7] = ((int32_t) sl*(int32_t) sp[-7]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*sp[-7]);
|
||||
L_ACF[8] = ((int32_t) sl*sp[-8]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*(int32_t) sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*(int32_t) sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*(int32_t) sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*(int32_t) sp[-7]);
|
||||
L_ACF[8] = ((int32_t) sl*(int32_t) sp[-8]);
|
||||
for (i = 9; i < GSM0610_FRAME_LEN; i++)
|
||||
{
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*sp[-7]);
|
||||
L_ACF[8] += ((int32_t) sl*sp[-8]);
|
||||
L_ACF[0] += ((int32_t) sl*(int32_t) sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*(int32_t) sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*(int32_t) sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*(int32_t) sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*(int32_t) sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*(int32_t) sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*(int32_t) sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*(int32_t) sp[-7]);
|
||||
L_ACF[8] += ((int32_t) sl*(int32_t) sp[-8]);
|
||||
}
|
||||
/*endfor*/
|
||||
for (k = 0; k < 9; k++)
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_preprocess.c,v 1.14 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_preprocess.c,v 1.16 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_rpe.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_rpe.c,v 1.24 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
|
@ -25,24 +25,24 @@
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_short_term.c,v 1.16 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: gsm0610_short_term.c,v 1.18 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: hdlc.c,v 1.61 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: hdlc.c,v 1.64 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -41,6 +41,7 @@
|
||||
#include "spandsp/crc.h"
|
||||
#include "spandsp/bit_operations.h"
|
||||
#include "spandsp/hdlc.h"
|
||||
#include "spandsp/private/hdlc.h"
|
||||
|
||||
static void rx_special_condition(hdlc_rx_state_t *s, int condition)
|
||||
{
|
||||
@ -120,7 +121,7 @@ static void rx_flag_or_abort(hdlc_rx_state_t *s)
|
||||
/* If we have not yet seen enough flags, restart the count. If we
|
||||
are beyond that point, just back off one step, so we need to see
|
||||
another flag before proceeding to collect frame octets. */
|
||||
if (s->flags_seen < s->framing_ok_threshold)
|
||||
if (s->flags_seen < s->framing_ok_threshold - 1)
|
||||
s->flags_seen = 0;
|
||||
else
|
||||
s->flags_seen = s->framing_ok_threshold - 1;
|
||||
@ -181,7 +182,16 @@ static void rx_flag_or_abort(hdlc_rx_state_t *s)
|
||||
greatly reduces the chances of false preamble detection, and anything
|
||||
which doesn't send them back-to-back is badly broken. */
|
||||
if (s->num_bits != 7)
|
||||
s->flags_seen = 0;
|
||||
{
|
||||
/* Don't set the flags seen indicator back to zero too aggressively.
|
||||
We want to pick up with the minimum of discarded data when there
|
||||
is a bit error in the stream, and a bit error could emulate a
|
||||
misaligned flag. */
|
||||
if (s->flags_seen < s->framing_ok_threshold - 1)
|
||||
s->flags_seen = 0;
|
||||
else
|
||||
s->flags_seen = s->framing_ok_threshold - 1;
|
||||
}
|
||||
if (++s->flags_seen >= s->framing_ok_threshold && !s->framing_ok_announced)
|
||||
{
|
||||
s->frame_handler(s->user_data, NULL, SIG_STATUS_FRAMING_OK, TRUE);
|
||||
|
@ -23,29 +23,30 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: ima_adpcm.c,v 1.29 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: ima_adpcm.c,v 1.33 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/saturated.h"
|
||||
#include "spandsp/ima_adpcm.h"
|
||||
#include "spandsp/private/ima_adpcm.h"
|
||||
|
||||
/*
|
||||
* Intel/DVI ADPCM coder/decoder.
|
||||
@ -118,15 +119,18 @@
|
||||
/* Intel ADPCM step variation table */
|
||||
static const int step_size[STEP_MAX + 1] =
|
||||
{
|
||||
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
|
||||
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
|
||||
50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
|
||||
130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
|
||||
876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
|
||||
2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
|
||||
5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
|
||||
15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
|
||||
7, 8, 9, 10, 11, 12, 13, 14,
|
||||
16, 17, 19, 21, 23, 25, 28, 31,
|
||||
34, 37, 41, 45, 50, 55, 60, 66,
|
||||
73, 80, 88, 97, 107, 118, 130, 143,
|
||||
157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658,
|
||||
724, 796, 876, 963, 1060, 1166, 1282, 1411,
|
||||
1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024,
|
||||
3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
|
||||
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
|
||||
15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794,
|
||||
32767
|
||||
};
|
||||
|
||||
static const int step_adjustment[8] =
|
||||
|
@ -703,6 +703,198 @@ SOURCE=.\spandsp/version.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/adsi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/async.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/at_interpreter.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/awgn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/bell_r2_mf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/bert.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/bitstream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/dtmf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/fax.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/fax_modems.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/fsk.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/g711.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/g722.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/g726.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/gsm0610.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/hdlc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/ima_adpcm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/logging.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/lpc10.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/modem_connect_tones.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/noise.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/oki_adpcm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/queue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/schedule.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/sig_tone.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/super_tone_rx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/super_tone_tx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t30.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t31.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t38_core.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t38_gateway.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t38_non_ecm_buffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t38_terminal.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/t4.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/time_scale.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/tone_detect.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/tone_generate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v17rx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v17tx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v22bis.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v27ter_rx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v27ter_tx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v29rx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v29tx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v42.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v42bis.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/private/v8.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp/expose.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spandsp.h
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -331,6 +331,54 @@
|
||||
<File RelativePath="spandsp/vector_float.h"></File>
|
||||
<File RelativePath="spandsp/vector_int.h"></File>
|
||||
<File RelativePath="spandsp/version.h"></File>
|
||||
<File RelativePath="spandsp/private/adsi.h"></File>
|
||||
<File RelativePath="spandsp/private/async.h"></File>
|
||||
<File RelativePath="spandsp/private/at_interpreter.h"></File>
|
||||
<File RelativePath="spandsp/private/awgn.h"></File>
|
||||
<File RelativePath="spandsp/private/bell_r2_mf.h"></File>
|
||||
<File RelativePath="spandsp/private/bert.h"></File>
|
||||
<File RelativePath="spandsp/private/bitstream.h"></File>
|
||||
<File RelativePath="spandsp/private/dtmf.h"></File>
|
||||
<File RelativePath="spandsp/private/fax.h"></File>
|
||||
<File RelativePath="spandsp/private/fax_modems.h"></File>
|
||||
<File RelativePath="spandsp/private/fsk.h"></File>
|
||||
<File RelativePath="spandsp/private/g711.h"></File>
|
||||
<File RelativePath="spandsp/private/g722.h"></File>
|
||||
<File RelativePath="spandsp/private/g726.h"></File>
|
||||
<File RelativePath="spandsp/private/gsm0610.h"></File>
|
||||
<File RelativePath="spandsp/private/hdlc.h"></File>
|
||||
<File RelativePath="spandsp/private/ima_adpcm.h"></File>
|
||||
<File RelativePath="spandsp/private/logging.h"></File>
|
||||
<File RelativePath="spandsp/private/lpc10.h"></File>
|
||||
<File RelativePath="spandsp/private/modem_connect_tones.h"></File>
|
||||
<File RelativePath="spandsp/private/noise.h"></File>
|
||||
<File RelativePath="spandsp/private/oki_adpcm.h"></File>
|
||||
<File RelativePath="spandsp/private/queue.h"></File>
|
||||
<File RelativePath="spandsp/private/schedule.h"></File>
|
||||
<File RelativePath="spandsp/private/sig_tone.h"></File>
|
||||
<File RelativePath="spandsp/private/super_tone_rx.h"></File>
|
||||
<File RelativePath="spandsp/private/super_tone_tx.h"></File>
|
||||
<File RelativePath="spandsp/private/t30.h"></File>
|
||||
<File RelativePath="spandsp/private/t31.h"></File>
|
||||
<File RelativePath="spandsp/private/t38_core.h"></File>
|
||||
<File RelativePath="spandsp/private/t38_gateway.h"></File>
|
||||
<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>
|
||||
<File RelativePath="spandsp/private/t38_terminal.h"></File>
|
||||
<File RelativePath="spandsp/private/t4.h"></File>
|
||||
<File RelativePath="spandsp/private/time_scale.h"></File>
|
||||
<File RelativePath="spandsp/private/tone_detect.h"></File>
|
||||
<File RelativePath="spandsp/private/tone_generate.h"></File>
|
||||
<File RelativePath="spandsp/private/v17rx.h"></File>
|
||||
<File RelativePath="spandsp/private/v17tx.h"></File>
|
||||
<File RelativePath="spandsp/private/v22bis.h"></File>
|
||||
<File RelativePath="spandsp/private/v27ter_rx.h"></File>
|
||||
<File RelativePath="spandsp/private/v27ter_tx.h"></File>
|
||||
<File RelativePath="spandsp/private/v29rx.h"></File>
|
||||
<File RelativePath="spandsp/private/v29tx.h"></File>
|
||||
<File RelativePath="spandsp/private/v42.h"></File>
|
||||
<File RelativePath="spandsp/private/v42bis.h"></File>
|
||||
<File RelativePath="spandsp/private/v8.h"></File>
|
||||
<File RelativePath="spandsp/expose.h"></File>
|
||||
<File RelativePath="spandsp.h"></File>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: logging.c,v 1.26 2008/05/13 13:17:22 steveu Exp $
|
||||
* $Id: logging.c,v 1.29 2009/01/20 04:24:45 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
@ -46,9 +46,11 @@
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/logging.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
|
||||
static void default_message_handler(int level, const char *text);
|
||||
|
||||
static message_handler_func_t __span_message = *default_message_handler;
|
||||
static message_handler_func_t __span_message = &default_message_handler;
|
||||
static error_handler_func_t __span_error = NULL;
|
||||
|
||||
/* Note that this list *must* match the enum definition in logging.h */
|
||||
|
@ -26,28 +26,29 @@
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_analyse.c,v 1.19 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: lpc10_analyse.c,v 1.22 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
#include "spandsp/lpc10.h"
|
||||
#include "spandsp/private/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
|
@ -26,28 +26,29 @@
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_decode.c,v 1.22 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: lpc10_decode.c,v 1.25 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <memory.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
#include "spandsp/lpc10.h"
|
||||
#include "spandsp/private/lpc10.h"
|
||||
|
||||
#define LPC10_ORDER 10
|
||||
|
||||
|
@ -26,28 +26,29 @@
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_encode.c,v 1.23 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: lpc10_encode.c,v 1.26 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
#include "spandsp/lpc10.h"
|
||||
#include "spandsp/private/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
|
@ -26,24 +26,24 @@
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_placev.c,v 1.17 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: lpc10_placev.c,v 1.19 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
|
@ -26,28 +26,29 @@
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_voicing.c,v 1.14 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: lpc10_voicing.c,v 1.17 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/dc_restore.h"
|
||||
#include "spandsp/lpc10.h"
|
||||
#include "spandsp/private/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: make_modem_filter.c,v 1.12 2008/09/18 14:59:30 steveu Exp $
|
||||
* $Id: make_modem_filter.c,v 1.13 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
@ -33,13 +33,13 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
@ -23,25 +23,25 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: modem_connect_tones.c,v 1.28 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: modem_connect_tones.c,v 1.31 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
@ -56,6 +56,9 @@
|
||||
#include "spandsp/fsk.h"
|
||||
#include "spandsp/modem_connect_tones.h"
|
||||
|
||||
#include "spandsp/private/fsk.h"
|
||||
#include "spandsp/private/modem_connect_tones.h"
|
||||
|
||||
#define HDLC_FRAMING_OK_THRESHOLD 5
|
||||
|
||||
const char *modem_connect_tone_to_str(int tone)
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: modem_echo.c,v 1.22 2008/07/02 14:48:25 steveu Exp $
|
||||
* $Id: modem_echo.c,v 1.24 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -33,20 +33,20 @@
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/bit_operations.h"
|
||||
|
@ -4,6 +4,7 @@ adsi_rx
|
||||
adsi_tx_init
|
||||
adsi_next_field
|
||||
adsi_add_field
|
||||
alaw_to_ulaw
|
||||
async_tx_init
|
||||
async_rx_init
|
||||
awgn
|
||||
@ -53,6 +54,11 @@ fsk_rx_signal_cutoff
|
||||
fsk_rx_init
|
||||
fsk_rx
|
||||
fsk_rx_set_put_bit
|
||||
g711_init
|
||||
g711_release
|
||||
g711_encode
|
||||
g711_decode
|
||||
g711_transcode
|
||||
g722_encode_init
|
||||
g722_encode_release
|
||||
g722_encode
|
||||
@ -191,6 +197,7 @@ tone_gen_init
|
||||
tone_gen
|
||||
dtmf_tx_init
|
||||
dtmf_tx
|
||||
ulaw_to_alaw
|
||||
v17_rx_init
|
||||
v17_rx_restart
|
||||
v17_rx_set_put_bit
|
||||
|
@ -23,31 +23,33 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: noise.c,v 1.25 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: noise.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/saturated.h"
|
||||
#include "spandsp/noise.h"
|
||||
|
||||
#include "spandsp/private/noise.h"
|
||||
|
||||
int16_t noise(noise_state_t *s)
|
||||
{
|
||||
int32_t val;
|
||||
|
@ -27,13 +27,13 @@
|
||||
* The actual OKI ADPCM encode and decode method is derived from freely
|
||||
* available code, whose exact origins seem uncertain.
|
||||
*
|
||||
* $Id: oki_adpcm.c,v 1.27 2008/05/13 13:17:23 steveu Exp $
|
||||
* $Id: oki_adpcm.c,v 1.30 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -42,19 +42,21 @@
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/oki_adpcm.h"
|
||||
#include "spandsp/private/oki_adpcm.h"
|
||||
|
||||
/* Routines to convert 12 bit linear samples to the Oki ADPCM coding format,
|
||||
widely used in CTI, because Dialogic use it. */
|
||||
|
||||
/* OKI ADPCM step variation table */
|
||||
static const int16_t step_size[49] =
|
||||
{
|
||||
16, 17, 19, 21, 23, 25, 28, 31,
|
||||
34, 37, 41, 45, 50, 55, 60, 66,
|
||||
73, 80, 88, 97, 107, 118, 130, 143,
|
||||
157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658,
|
||||
724, 796, 876, 963, 1060, 1166, 1282, 1408,
|
||||
1552
|
||||
16, 17, 19, 21, 23, 25, 28, 31,
|
||||
34, 37, 41, 45, 50, 55, 60, 66,
|
||||
73, 80, 88, 97, 107, 118, 130, 143,
|
||||
157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658,
|
||||
724, 796, 876, 963, 1060, 1166, 1282, 1411,
|
||||
1552
|
||||
};
|
||||
|
||||
static const int16_t step_adjustment[8] =
|
||||
|
@ -29,11 +29,11 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: playout.c,v 1.14 2008/05/13 13:17:23 steveu Exp $
|
||||
* $Id: playout.c,v 1.15 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -22,26 +22,26 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: plc.c,v 1.23 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: plc.c,v 1.25 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <limits.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: power_meter.c,v 1.24 2008/07/02 14:48:26 steveu Exp $
|
||||
* $Id: power_meter.c,v 1.26 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
@ -37,13 +37,13 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
|
@ -22,13 +22,13 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: queue.c,v 1.23 2008/09/09 16:25:51 steveu Exp $
|
||||
* $Id: queue.c,v 1.25 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -42,6 +42,8 @@
|
||||
#define FULLY_DEFINE_QUEUE_STATE_T
|
||||
#include "spandsp/queue.h"
|
||||
|
||||
#include "spandsp/private/queue.h"
|
||||
|
||||
int queue_empty(queue_state_t *s)
|
||||
{
|
||||
return (s->iptr == s->optr);
|
||||
|
@ -22,11 +22,11 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: schedule.c,v 1.17 2008/05/13 13:17:23 steveu Exp $
|
||||
* $Id: schedule.c,v 1.20 2009/01/05 13:48:31 steveu Exp $
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -38,6 +38,9 @@
|
||||
#include "spandsp/logging.h"
|
||||
#include "spandsp/schedule.h"
|
||||
|
||||
#include "spandsp/private/logging.h"
|
||||
#include "spandsp/private/schedule.h"
|
||||
|
||||
int span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data)
|
||||
{
|
||||
int i;
|
||||
|
@ -23,25 +23,25 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: sig_tone.c,v 1.25 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: sig_tone.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
#include "spandsp/dds.h"
|
||||
#include "spandsp/sig_tone.h"
|
||||
|
||||
#include "spandsp/private/sig_tone.h"
|
||||
|
||||
#define PI 3.14159265358979323
|
||||
|
||||
/* The coefficients for the data notch filter. This filter is also the
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: silence_gen.c,v 1.16 2008/09/07 12:45:16 steveu Exp $
|
||||
* $Id: silence_gen.c,v 1.17 2009/01/28 03:41:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -36,13 +36,13 @@
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include "floating_fudge.h"
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "floating_fudge.h"
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: spandsp.h.in,v 1.11 2008/09/19 14:02:05 steveu Exp $
|
||||
* $Id: spandsp.h.in,v 1.14 2009/01/07 13:31:53 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -115,5 +115,9 @@
|
||||
#include <spandsp/plc.h>
|
||||
#include <spandsp/playout.h>
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(SPANDSP_EXPOSE_INTERNAL_STRUCTURES)
|
||||
#include <spandsp/expose.h>
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: adsi.h,v 1.31 2008/05/05 11:25:01 steveu Exp $
|
||||
* $Id: adsi.h,v 1.33 2008/10/13 14:19:18 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -371,58 +371,13 @@ enum
|
||||
ADSI transmitter descriptor. This contains all the state information for an ADSI
|
||||
(caller ID, CLASS, CLIP, ACLIP) transmit channel.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int standard;
|
||||
|
||||
tone_gen_descriptor_t alert_tone_desc;
|
||||
tone_gen_state_t alert_tone_gen;
|
||||
fsk_tx_state_t fsktx;
|
||||
dtmf_tx_state_t dtmftx;
|
||||
async_tx_state_t asynctx;
|
||||
|
||||
int tx_signal_on;
|
||||
|
||||
int byte_no;
|
||||
int bit_pos;
|
||||
int bit_no;
|
||||
uint8_t msg[256];
|
||||
int msg_len;
|
||||
int preamble_len;
|
||||
int preamble_ones_len;
|
||||
int postamble_ones_len;
|
||||
int stop_bits;
|
||||
int baudot_shift;
|
||||
|
||||
logging_state_t logging;
|
||||
} adsi_tx_state_t;
|
||||
typedef struct adsi_tx_state_s adsi_tx_state_t;
|
||||
|
||||
/*!
|
||||
ADSI receiver descriptor. This contains all the state information for an ADSI
|
||||
(caller ID, CLASS, CLIP, ACLIP, JCLIP) receive channel.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int standard;
|
||||
put_msg_func_t put_msg;
|
||||
void *user_data;
|
||||
|
||||
fsk_rx_state_t fskrx;
|
||||
dtmf_rx_state_t dtmfrx;
|
||||
async_rx_state_t asyncrx;
|
||||
|
||||
int consecutive_ones;
|
||||
int bit_pos;
|
||||
int in_progress;
|
||||
uint8_t msg[256];
|
||||
int msg_len;
|
||||
int baudot_shift;
|
||||
|
||||
/*! A count of the framing errors. */
|
||||
int framing_errors;
|
||||
|
||||
logging_state_t logging;
|
||||
} adsi_rx_state_t;
|
||||
typedef struct adsi_rx_state_s adsi_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
@ -439,6 +394,8 @@ extern "C"
|
||||
*/
|
||||
adsi_rx_state_t *adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
|
||||
|
||||
int adsi_rx_free(adsi_rx_state_t *s);
|
||||
|
||||
/*! \brief Receive a chunk of ADSI audio.
|
||||
\param s The ADSI receive context.
|
||||
\param amp The audio sample buffer.
|
||||
@ -454,6 +411,8 @@ int adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len);
|
||||
*/
|
||||
adsi_tx_state_t *adsi_tx_init(adsi_tx_state_t *s, int standard);
|
||||
|
||||
int adsi_tx_free(adsi_tx_state_t *s);
|
||||
|
||||
/*! \brief Adjust the preamble associated with an ADSI transmit context.
|
||||
\param s The ADSI transmit context.
|
||||
\param preamble_len The number of bits of preamble.
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: async.h,v 1.18 2008/09/07 12:45:17 steveu Exp $
|
||||
* $Id: async.h,v 1.19 2008/11/30 10:17:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -120,59 +120,14 @@ enum
|
||||
working instance of a byte to asynchronous serial converter, for use
|
||||
in FSK modems.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief The number of data bits per character. */
|
||||
int data_bits;
|
||||
/*! \brief The type of parity. */
|
||||
int parity;
|
||||
/*! \brief The number of stop bits per character. */
|
||||
int stop_bits;
|
||||
/*! \brief A pointer to the callback routine used to get characters to be transmitted. */
|
||||
get_byte_func_t get_byte;
|
||||
/*! \brief An opaque pointer passed when calling get_byte. */
|
||||
void *user_data;
|
||||
|
||||
/*! \brief A current, partially transmitted, character. */
|
||||
int byte_in_progress;
|
||||
/*! \brief The current bit position within a partially transmitted character. */
|
||||
int bitpos;
|
||||
/*! \brief Parity bit. */
|
||||
int parity_bit;
|
||||
} async_tx_state_t;
|
||||
typedef struct async_tx_state_s async_tx_state_t;
|
||||
|
||||
/*!
|
||||
Asynchronous data receive descriptor. This defines the state of a single
|
||||
working instance of an asynchronous serial to byte converter, for use
|
||||
in FSK modems.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief The number of data bits per character. */
|
||||
int data_bits;
|
||||
/*! \brief The type of parity. */
|
||||
int parity;
|
||||
/*! \brief The number of stop bits per character. */
|
||||
int stop_bits;
|
||||
/*! \brief TRUE if V.14 rate adaption processing should be performed. */
|
||||
int use_v14;
|
||||
/*! \brief A pointer to the callback routine used to handle received characters. */
|
||||
put_byte_func_t put_byte;
|
||||
/*! \brief An opaque pointer passed when calling put_byte. */
|
||||
void *user_data;
|
||||
|
||||
/*! \brief A current, partially complete, character. */
|
||||
int byte_in_progress;
|
||||
/*! \brief The current bit position within a partially complete character. */
|
||||
int bitpos;
|
||||
/*! \brief Parity bit. */
|
||||
int parity_bit;
|
||||
|
||||
/*! A count of the number of parity errors seen. */
|
||||
int parity_errors;
|
||||
/*! A count of the number of character framing errors seen. */
|
||||
int framing_errors;
|
||||
} async_rx_state_t;
|
||||
typedef struct async_rx_state_s async_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: at_interpreter.h,v 1.19 2008/09/16 12:45:50 steveu Exp $
|
||||
* $Id: at_interpreter.h,v 1.20 2008/11/30 05:43:37 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -112,13 +112,6 @@ enum
|
||||
AT_RESPONSE_CODE_FRH3
|
||||
};
|
||||
|
||||
struct at_call_id
|
||||
{
|
||||
char *id;
|
||||
char *value;
|
||||
struct at_call_id *next;
|
||||
};
|
||||
|
||||
/*!
|
||||
AT profile.
|
||||
*/
|
||||
@ -140,93 +133,6 @@ typedef struct
|
||||
uint8_t s_regs[100];
|
||||
} at_profile_t;
|
||||
|
||||
/*!
|
||||
AT descriptor. This defines the working state for a single instance of
|
||||
the AT interpreter.
|
||||
*/
|
||||
struct at_state_s
|
||||
{
|
||||
at_profile_t p;
|
||||
/*! Value set by +GCI */
|
||||
int country_of_installation;
|
||||
/*! Value set by +FIT */
|
||||
int dte_inactivity_timeout;
|
||||
/*! Value set by +FIT */
|
||||
int dte_inactivity_action;
|
||||
/*! Value set by L */
|
||||
int speaker_volume;
|
||||
/*! Value set by M */
|
||||
int speaker_mode;
|
||||
/*! This is no real DTE rate. This variable is for compatibility this serially
|
||||
connected modems. */
|
||||
/*! Value set by +IPR/+FPR */
|
||||
int dte_rate;
|
||||
/*! Value set by +ICF */
|
||||
int dte_char_format;
|
||||
/*! Value set by +ICF */
|
||||
int dte_parity;
|
||||
/*! Value set by &C */
|
||||
int rlsd_behaviour;
|
||||
/*! Value set by &D */
|
||||
int dtr_behaviour;
|
||||
/*! Value set by +FCL */
|
||||
int carrier_loss_timeout;
|
||||
/*! Value set by X */
|
||||
int result_code_mode;
|
||||
/*! Value set by +IDSR */
|
||||
int dsr_option;
|
||||
/*! Value set by +ILSD */
|
||||
int long_space_disconnect_option;
|
||||
/*! Value set by +ICLOK */
|
||||
int sync_tx_clock_source;
|
||||
/*! Value set by +EWIND */
|
||||
int rx_window;
|
||||
/*! Value set by +EWIND */
|
||||
int tx_window;
|
||||
|
||||
int v8bis_signal;
|
||||
int v8bis_1st_message;
|
||||
int v8bis_2nd_message;
|
||||
int v8bis_sig_en;
|
||||
int v8bis_msg_en;
|
||||
int v8bis_supp_delay;
|
||||
|
||||
uint8_t rx_data[256];
|
||||
int rx_data_bytes;
|
||||
|
||||
int display_call_info;
|
||||
int call_info_displayed;
|
||||
struct at_call_id *call_id;
|
||||
char *local_id;
|
||||
/*! The currently select FAX modem class. 0 = data modem mode. */
|
||||
int fclass_mode;
|
||||
int at_rx_mode;
|
||||
int rings_indicated;
|
||||
int do_hangup;
|
||||
int silent_dial;
|
||||
int command_dial;
|
||||
int ok_is_pending;
|
||||
int dte_is_waiting;
|
||||
/*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */
|
||||
int rx_signal_present;
|
||||
/*! \brief TRUE if a modem has trained, Otherwise FALSE. */
|
||||
int rx_trained;
|
||||
int transmit;
|
||||
|
||||
char line[256];
|
||||
int line_ptr;
|
||||
|
||||
at_modem_control_handler_t *modem_control_handler;
|
||||
void *modem_control_user_data;
|
||||
at_tx_handler_t *at_tx_handler;
|
||||
void *at_tx_user_data;
|
||||
at_class1_handler_t *class1_handler;
|
||||
void *class1_user_data;
|
||||
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: awgn.h,v 1.14 2008/04/17 14:26:59 steveu Exp $
|
||||
* $Id: awgn.h,v 1.15 2008/11/30 12:38:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -71,16 +71,7 @@ optimised.
|
||||
/*!
|
||||
AWGN generator descriptor. This contains all the state information for an AWGN generator.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
double rms;
|
||||
long int ix1;
|
||||
long int ix2;
|
||||
long int ix3;
|
||||
double r[98];
|
||||
double gset;
|
||||
int iset;
|
||||
} awgn_state_t;
|
||||
typedef struct awgn_state_s awgn_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bell_r2_mf.h,v 1.19 2008/05/30 13:51:28 steveu Exp $
|
||||
* $Id: bell_r2_mf.h,v 1.21 2008/10/13 14:19:18 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -108,73 +108,22 @@ Note: Above -3dBm the signal starts to clip. We can detect with a little clippin
|
||||
Bell MF generator state descriptor. This defines the state of a single
|
||||
working instance of a Bell MF generator.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! The tone generator. */
|
||||
tone_gen_state_t tones;
|
||||
int current_sample;
|
||||
union
|
||||
{
|
||||
queue_state_t queue;
|
||||
uint8_t buf[QUEUE_STATE_T_SIZE(MAX_BELL_MF_DIGITS)];
|
||||
} queue;
|
||||
} bell_mf_tx_state_t;
|
||||
typedef struct bell_mf_tx_state_s bell_mf_tx_state_t;
|
||||
|
||||
/*!
|
||||
Bell MF digit detector descriptor.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! Optional callback funcion to deliver received digits. */
|
||||
digits_rx_callback_t digits_callback;
|
||||
/*! An opaque pointer passed to the callback function. */
|
||||
void *digits_callback_data;
|
||||
/*! Tone detector working states */
|
||||
goertzel_state_t out[6];
|
||||
/*! Short term history of results from the tone detection, using in persistence checking */
|
||||
uint8_t hits[5];
|
||||
/*! The current sample number within a processing block. */
|
||||
int current_sample;
|
||||
|
||||
/*! The number of digits which have been lost due to buffer overflows. */
|
||||
int lost_digits;
|
||||
/*! The number of digits currently in the digit buffer. */
|
||||
int current_digits;
|
||||
/*! The received digits buffer. This is a NULL terminated string. */
|
||||
char digits[MAX_BELL_MF_DIGITS + 1];
|
||||
} bell_mf_rx_state_t;
|
||||
typedef struct bell_mf_rx_state_s bell_mf_rx_state_t;
|
||||
|
||||
/*!
|
||||
MFC/R2 tone detector descriptor.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! The tone generator. */
|
||||
tone_gen_state_t tone;
|
||||
/*! TRUE if generating forward tones, otherwise generating reverse tones. */
|
||||
int fwd;
|
||||
/*! The current digit being generated. */
|
||||
int digit;
|
||||
} r2_mf_tx_state_t;
|
||||
typedef struct r2_mf_tx_state_s r2_mf_tx_state_t;
|
||||
|
||||
/*!
|
||||
MFC/R2 tone detector descriptor.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! Optional callback funcion to deliver received digits. */
|
||||
tone_report_func_t callback;
|
||||
/*! An opaque pointer passed to the callback function. */
|
||||
void *callback_data;
|
||||
/*! TRUE is we are detecting forward tones. FALSE if we are detecting backward tones */
|
||||
int fwd;
|
||||
/*! Tone detector working states */
|
||||
goertzel_state_t out[6];
|
||||
/*! The current sample number within a processing block. */
|
||||
int current_sample;
|
||||
/*! The currently detected digit. */
|
||||
int current_digit;
|
||||
} r2_mf_rx_state_t;
|
||||
typedef struct r2_mf_rx_state_s r2_mf_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bert.h,v 1.19 2008/04/17 14:26:59 steveu Exp $
|
||||
* $Id: bert.h,v 1.20 2008/11/30 12:38:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_BERT_H_)
|
||||
@ -106,54 +106,7 @@ typedef void (*bert_report_func_t)(void *user_data, int reason, bert_results_t *
|
||||
Bit error rate tester (BERT) descriptor. This defines the working state for a
|
||||
single instance of the BERT.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int pattern;
|
||||
int pattern_class;
|
||||
bert_report_func_t reporter;
|
||||
void *user_data;
|
||||
int report_frequency;
|
||||
int limit;
|
||||
|
||||
uint32_t tx_reg;
|
||||
int tx_step;
|
||||
int tx_step_bit;
|
||||
int tx_bits;
|
||||
int tx_zeros;
|
||||
|
||||
uint32_t rx_reg;
|
||||
uint32_t ref_reg;
|
||||
uint32_t master_reg;
|
||||
int rx_step;
|
||||
int rx_step_bit;
|
||||
int resync;
|
||||
int rx_bits;
|
||||
int rx_zeros;
|
||||
int resync_len;
|
||||
int resync_percent;
|
||||
int resync_bad_bits;
|
||||
int resync_cnt;
|
||||
|
||||
uint32_t mask;
|
||||
int shift;
|
||||
int shift2;
|
||||
int max_zeros;
|
||||
int invert;
|
||||
int resync_time;
|
||||
|
||||
int decade_ptr[9];
|
||||
int decade_bad[9][10];
|
||||
int step;
|
||||
int error_rate;
|
||||
|
||||
int bit_error_status;
|
||||
int report_countdown;
|
||||
|
||||
bert_results_t results;
|
||||
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
} bert_state_t;
|
||||
typedef struct bert_state_s bert_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bit_operations.h,v 1.22 2008/07/10 13:43:40 steveu Exp $
|
||||
* $Id: bit_operations.h,v 1.23 2008/10/13 23:41:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -40,9 +40,9 @@ extern "C"
|
||||
\return The bit number of the highest set bit, or -1 if the word is zero. */
|
||||
static __inline__ int top_bit(unsigned int bits)
|
||||
{
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
int res;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
__asm__ (" xorl %[res],%[res];\n"
|
||||
" decl %[res];\n"
|
||||
" bsrl %[bits],%[res]\n"
|
||||
@ -50,11 +50,22 @@ static __inline__ int top_bit(unsigned int bits)
|
||||
: [bits] "rm" (bits));
|
||||
return res;
|
||||
#elif defined(__ppc__) || defined(__powerpc__)
|
||||
int res;
|
||||
|
||||
__asm__ ("cntlzw %[res],%[bits];\n"
|
||||
: [res] "=&r" (res)
|
||||
: [bits] "r" (bits));
|
||||
return 31 - res;
|
||||
#elif defined(_M_IX86) // Visual Studio x86
|
||||
__asm
|
||||
{
|
||||
xor eax, eax
|
||||
dec eax
|
||||
bsr eax, bits
|
||||
}
|
||||
#else
|
||||
int res;
|
||||
|
||||
if (bits == 0)
|
||||
return -1;
|
||||
res = 0;
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bitstream.h,v 1.10 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: bitstream.h,v 1.12 2008/11/30 12:45:09 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -37,13 +37,7 @@
|
||||
*/
|
||||
|
||||
/*! Bitstream handler state */
|
||||
typedef struct
|
||||
{
|
||||
/*! The bit stream. */
|
||||
unsigned int bitstream;
|
||||
/*! The residual bits in bitstream. */
|
||||
unsigned int residue;
|
||||
} bitstream_state_t;
|
||||
typedef struct bitstream_state_s bitstream_state_t;
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -55,19 +49,19 @@ extern "C"
|
||||
\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 25 bit is valid. */
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
|
||||
\param bits The number of bits of value to be pushed. 1 to 25 bits is valid. */
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
|
||||
|
||||
void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
|
||||
void bitstream_put2(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 25 bit is valid.
|
||||
\param bits The number of bits of value to be grabbed. 1 to 25 bits is valid.
|
||||
\return The value retrieved from the input buffer. */
|
||||
unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
|
||||
uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
|
||||
|
||||
unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
|
||||
uint32_t bitstream_get2(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.
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: complex_vector_float.h,v 1.10 2008/09/18 13:16:49 steveu Exp $
|
||||
* $Id: complex_vector_float.h,v 1.11 2008/10/09 13:25:19 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_COMPLEX_VECTOR_FLOAT_H_)
|
||||
@ -120,6 +120,14 @@ static __inline__ void cvec_setl(complexl_t z[], complexl_t *x, int n)
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n);
|
||||
|
||||
void cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n);
|
||||
|
||||
#if defined(HAVE_LONG_DOUBLE)
|
||||
void cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n);
|
||||
#endif
|
||||
|
||||
/*! \brief Find the dot product of two complex float vectors.
|
||||
\param x The first vector.
|
||||
\param y The first vector.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* dtmf.h -
|
||||
* dtmf.h - DTMF tone generation and detection.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: dtmf.h,v 1.28 2008/06/13 14:46:52 steveu Exp $
|
||||
* $Id: dtmf.h,v 1.29 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_DTMF_H_)
|
||||
@ -81,80 +81,12 @@ typedef void (*digits_rx_callback_t)(void *user_data, const char *digits, int le
|
||||
DTMF generator state descriptor. This defines the state of a single
|
||||
working instance of a DTMF generator.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
tone_gen_state_t tones;
|
||||
float low_level;
|
||||
float high_level;
|
||||
int on_time;
|
||||
int off_time;
|
||||
union
|
||||
{
|
||||
queue_state_t queue;
|
||||
uint8_t buf[QUEUE_STATE_T_SIZE(MAX_DTMF_DIGITS)];
|
||||
} queue;
|
||||
} dtmf_tx_state_t;
|
||||
typedef struct dtmf_tx_state_s dtmf_tx_state_t;
|
||||
|
||||
/*!
|
||||
DTMF digit detector descriptor.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! Optional callback funcion to deliver received digits. */
|
||||
digits_rx_callback_t digits_callback;
|
||||
/*! An opaque pointer passed to the callback function. */
|
||||
void *digits_callback_data;
|
||||
/*! Optional callback funcion to deliver real time digit state changes. */
|
||||
tone_report_func_t realtime_callback;
|
||||
/*! An opaque pointer passed to the real time callback function. */
|
||||
void *realtime_callback_data;
|
||||
/*! TRUE if dialtone should be filtered before processing */
|
||||
int filter_dialtone;
|
||||
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||
/*! 350Hz filter state for the optional dialtone filter. */
|
||||
float z350[2];
|
||||
/*! 440Hz filter state for the optional dialtone filter. */
|
||||
float z440[2];
|
||||
/*! Maximum acceptable "normal" (lower bigger than higher) twist ratio. */
|
||||
float normal_twist;
|
||||
/*! Maximum acceptable "reverse" (higher bigger than lower) twist ratio. */
|
||||
float reverse_twist;
|
||||
/*! Minimum acceptable tone level for detection. */
|
||||
int32_t threshold;
|
||||
/*! The accumlating total energy on the same period over which the Goertzels work. */
|
||||
int32_t energy;
|
||||
#else
|
||||
/*! 350Hz filter state for the optional dialtone filter. */
|
||||
float z350[2];
|
||||
/*! 440Hz filter state for the optional dialtone filter. */
|
||||
float z440[2];
|
||||
/*! Maximum acceptable "normal" (lower bigger than higher) twist ratio. */
|
||||
float normal_twist;
|
||||
/*! Maximum acceptable "reverse" (higher bigger than lower) twist ratio. */
|
||||
float reverse_twist;
|
||||
/*! Minimum acceptable tone level for detection. */
|
||||
float threshold;
|
||||
/*! The accumlating total energy on the same period over which the Goertzels work. */
|
||||
float energy;
|
||||
#endif
|
||||
/*! Tone detector working states for the row tones. */
|
||||
goertzel_state_t row_out[4];
|
||||
/*! Tone detector working states for the column tones. */
|
||||
goertzel_state_t col_out[4];
|
||||
/*! The result of the last tone analysis. */
|
||||
uint8_t last_hit;
|
||||
/*! The confirmed digit we are currently receiving */
|
||||
uint8_t in_digit;
|
||||
/*! The current sample number within a processing block. */
|
||||
int current_sample;
|
||||
|
||||
/*! The number of digits which have been lost due to buffer overflows. */
|
||||
int lost_digits;
|
||||
/*! The number of digits currently in the digit buffer. */
|
||||
int current_digits;
|
||||
/*! The received digits buffer. This is a NULL terminated string. */
|
||||
char digits[MAX_DTMF_DIGITS + 1];
|
||||
} dtmf_rx_state_t;
|
||||
typedef struct dtmf_rx_state_s dtmf_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
84
libs/spandsp/src/spandsp/expose.h
Normal file
84
libs/spandsp/src/spandsp/expose.h
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* expose.h - Expose the internal structures of spandsp, for users who
|
||||
* really need that.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2008 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.
|
||||
*
|
||||
* $Id: expose.h,v 1.11 2008/11/30 13:44:35 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/* TRY TO ONLY INCLUDE THIS IF YOU REALLY REALLY HAVE TO */
|
||||
|
||||
#if !defined(_SPANDSP_EXPOSE_H_)
|
||||
#define _SPANDSP_EXPOSE_H_
|
||||
|
||||
#include <spandsp/private/logging.h>
|
||||
#include <spandsp/private/schedule.h>
|
||||
#include <spandsp/private/bitstream.h>
|
||||
#include <spandsp/private/queue.h>
|
||||
#include <spandsp/private/awgn.h>
|
||||
#include <spandsp/private/noise.h>
|
||||
#include <spandsp/private/bert.h>
|
||||
#include <spandsp/private/tone_generate.h>
|
||||
#include <spandsp/private/bell_r2_mf.h>
|
||||
#include <spandsp/private/sig_tone.h>
|
||||
#include <spandsp/private/dtmf.h>
|
||||
#include <spandsp/private/g711.h>
|
||||
#include <spandsp/private/g722.h>
|
||||
#include <spandsp/private/g726.h>
|
||||
#include <spandsp/private/lpc10.h>
|
||||
#include <spandsp/private/gsm0610.h>
|
||||
#include <spandsp/private/oki_adpcm.h>
|
||||
#include <spandsp/private/ima_adpcm.h>
|
||||
#include <spandsp/private/hdlc.h>
|
||||
#include <spandsp/private/time_scale.h>
|
||||
#include <spandsp/private/super_tone_tx.h>
|
||||
#include <spandsp/private/super_tone_rx.h>
|
||||
#include <spandsp/private/async.h>
|
||||
#include <spandsp/private/fsk.h>
|
||||
#include <spandsp/private/v29rx.h>
|
||||
#include <spandsp/private/v29tx.h>
|
||||
#include <spandsp/private/v17rx.h>
|
||||
#include <spandsp/private/v17tx.h>
|
||||
#include <spandsp/private/v22bis.h>
|
||||
#include <spandsp/private/v27ter_rx.h>
|
||||
#include <spandsp/private/v27ter_tx.h>
|
||||
#include <spandsp/private/modem_connect_tones.h>
|
||||
#include <spandsp/private/at_interpreter.h>
|
||||
#include <spandsp/private/fax_modems.h>
|
||||
#include <spandsp/private/t4.h>
|
||||
#include <spandsp/private/t30.h>
|
||||
#include <spandsp/private/fax.h>
|
||||
#include <spandsp/private/t38_core.h>
|
||||
#include <spandsp/private/t38_non_ecm_buffer.h>
|
||||
#include <spandsp/private/t38_gateway.h>
|
||||
#include <spandsp/private/t38_terminal.h>
|
||||
#include <spandsp/private/t31.h>
|
||||
#include <spandsp/private/v8.h>
|
||||
#include <spandsp/private/v42.h>
|
||||
#include <spandsp/private/v42bis.h>
|
||||
#include <spandsp/private/adsi.h>
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: fax.h,v 1.35 2008/08/13 00:11:30 steveu Exp $
|
||||
* $Id: fax.h,v 1.36 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -39,22 +39,6 @@
|
||||
|
||||
typedef struct fax_state_s fax_state_t;
|
||||
|
||||
/*!
|
||||
Analogue line T.30 FAX channel descriptor. This defines the state of a single working
|
||||
instance of an analogue line soft-FAX machine.
|
||||
*/
|
||||
struct fax_state_s
|
||||
{
|
||||
/*! \brief The T.30 back-end */
|
||||
t30_state_t t30;
|
||||
|
||||
/*! \brief The analogue modem front-end */
|
||||
fax_modems_state_t modems;
|
||||
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
@ -103,6 +87,13 @@ void fax_set_tep_mode(fax_state_t *s, int use_tep);
|
||||
*/
|
||||
t30_state_t *fax_get_t30_state(fax_state_t *s);
|
||||
|
||||
/*! Get a pointer to the logging context associated with a FAX context.
|
||||
\brief Get a pointer to the logging context associated with a FAX context.
|
||||
\param s The FAX context.
|
||||
\return A pointer to the logging context, or NULL.
|
||||
*/
|
||||
logging_state_t *fax_get_logging_state(fax_state_t *s);
|
||||
|
||||
/*! Initialise a FAX context.
|
||||
\brief Initialise a FAX context.
|
||||
\param s The FAX context.
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: fax_modems.h,v 1.5 2008/08/13 00:11:30 steveu Exp $
|
||||
* $Id: fax_modems.h,v 1.6 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -33,91 +33,7 @@
|
||||
/*!
|
||||
The set of modems needed for FAX, plus the auxilliary stuff, like tone generation.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! TRUE is talker echo protection should be sent for the image modems */
|
||||
int use_tep;
|
||||
|
||||
/*! If TRUE, transmit silence when there is nothing else to transmit. If FALSE return only
|
||||
the actual generated audio. Note that this only affects untimed silences. Timed silences
|
||||
(e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as
|
||||
silent audio. */
|
||||
int transmit_on_idle;
|
||||
|
||||
/*! \brief An HDLC context used when transmitting HDLC messages. */
|
||||
hdlc_tx_state_t hdlc_tx;
|
||||
/*! \brief An HDLC context used when receiving HDLC messages. */
|
||||
hdlc_rx_state_t hdlc_rx;
|
||||
/*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
|
||||
messages. */
|
||||
fsk_tx_state_t v21_tx;
|
||||
/*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
|
||||
messages. */
|
||||
fsk_rx_state_t v21_rx;
|
||||
/*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
|
||||
12000bps or 14400bps */
|
||||
v17_tx_state_t v17_tx;
|
||||
/*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
|
||||
12000bps or 14400bps */
|
||||
v17_rx_state_t v17_rx;
|
||||
/*! \brief A V.29 modem context used when sending FAXes at 7200bps or
|
||||
9600bps */
|
||||
v29_tx_state_t v29_tx;
|
||||
/*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
|
||||
9600bps */
|
||||
v29_rx_state_t v29_rx;
|
||||
/*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
|
||||
4800bps */
|
||||
v27ter_tx_state_t v27ter_tx;
|
||||
/*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
|
||||
4800bps */
|
||||
v27ter_rx_state_t v27ter_rx;
|
||||
/*! \brief Used to insert timed silences. */
|
||||
silence_gen_state_t silence_gen;
|
||||
/*! \brief CED or CNG generator */
|
||||
modem_connect_tones_tx_state_t connect_tx;
|
||||
/*! \brief CED or CNG detector */
|
||||
modem_connect_tones_rx_state_t connect_rx;
|
||||
/*! \brief */
|
||||
dc_restore_state_t dc_restore;
|
||||
|
||||
/*! \brief The currently select receiver type */
|
||||
int current_rx_type;
|
||||
/*! \brief The currently select transmitter type */
|
||||
int current_tx_type;
|
||||
|
||||
/*! \brief TRUE if a carrier is present. Otherwise FALSE. */
|
||||
int rx_signal_present;
|
||||
/*! \brief TRUE if a modem has trained correctly. */
|
||||
int rx_trained;
|
||||
|
||||
/*! The current receive signal handler */
|
||||
span_rx_handler_t *rx_handler;
|
||||
void *rx_user_data;
|
||||
|
||||
/*! The current transmit signal handler */
|
||||
span_tx_handler_t *tx_handler;
|
||||
void *tx_user_data;
|
||||
|
||||
/*! The next transmit signal handler, for two stage transmit operations.
|
||||
E.g. a short silence followed by a modem signal. */
|
||||
span_tx_handler_t *next_tx_handler;
|
||||
void *next_tx_user_data;
|
||||
|
||||
/*! The current bit rate of the transmitter. */
|
||||
int tx_bit_rate;
|
||||
/*! The current bit rate of the receiver. */
|
||||
int rx_bit_rate;
|
||||
|
||||
/*! If TRUE, transmission is in progress */
|
||||
int transmit;
|
||||
/*! \brief Audio logging file handle for received audio. */
|
||||
int audio_rx_log;
|
||||
/*! \brief Audio logging file handle for transmitted audio. */
|
||||
int audio_tx_log;
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
} fax_modems_state_t;
|
||||
typedef struct fax_modems_state_s fax_modems_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: fsk.h,v 1.31 2008/09/04 14:40:05 steveu Exp $
|
||||
* $Id: fsk.h,v 1.32 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -120,27 +120,7 @@ extern const fsk_spec_t preset_fsk_specs[];
|
||||
FSK modem transmit descriptor. This defines the state of a single working
|
||||
instance of an FSK modem transmitter.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int baud_rate;
|
||||
/*! \brief The callback function used to get the next bit to be transmitted. */
|
||||
get_bit_func_t get_bit;
|
||||
/*! \brief A user specified opaque pointer passed to the get_bit function. */
|
||||
void *get_bit_user_data;
|
||||
|
||||
/*! \brief The callback function used to report modem status changes. */
|
||||
modem_tx_status_func_t status_handler;
|
||||
/*! \brief A user specified opaque pointer passed to the status function. */
|
||||
void *status_user_data;
|
||||
|
||||
int32_t phase_rates[2];
|
||||
int scaling;
|
||||
int32_t current_phase_rate;
|
||||
uint32_t phase_acc;
|
||||
int baud_frac;
|
||||
int baud_inc;
|
||||
int shutdown;
|
||||
} fsk_tx_state_t;
|
||||
typedef struct fsk_tx_state_s fsk_tx_state_t;
|
||||
|
||||
/* The longest window will probably be 106 for 75 baud */
|
||||
#define FSK_MAX_WINDOW_LEN 128
|
||||
@ -149,42 +129,7 @@ typedef struct
|
||||
FSK modem receive descriptor. This defines the state of a single working
|
||||
instance of an FSK modem receiver.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int baud_rate;
|
||||
int sync_mode;
|
||||
/*! \brief The callback function used to put each bit received. */
|
||||
put_bit_func_t put_bit;
|
||||
/*! \brief A user specified opaque pointer passed to the put_bit routine. */
|
||||
void *put_bit_user_data;
|
||||
|
||||
/*! \brief The callback function used to report modem status changes. */
|
||||
modem_tx_status_func_t status_handler;
|
||||
/*! \brief A user specified opaque pointer passed to the status function. */
|
||||
void *status_user_data;
|
||||
|
||||
int32_t carrier_on_power;
|
||||
int32_t carrier_off_power;
|
||||
power_meter_t power;
|
||||
/*! \brief The value of the last signal sample, using the a simple HPF for signal power estimation. */
|
||||
int16_t last_sample;
|
||||
/*! \brief >0 if a signal above the minimum is present. It may or may not be a V.29 signal. */
|
||||
int signal_present;
|
||||
|
||||
int32_t phase_rate[2];
|
||||
uint32_t phase_acc[2];
|
||||
|
||||
int correlation_span;
|
||||
|
||||
complexi32_t window[2][FSK_MAX_WINDOW_LEN];
|
||||
complexi32_t dot[2];
|
||||
int buf_ptr;
|
||||
|
||||
int baud_inc;
|
||||
int baud_pll;
|
||||
int lastbit;
|
||||
int scaling_shift;
|
||||
} fsk_rx_state_t;
|
||||
typedef struct fsk_rx_state_s fsk_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.h,v 1.14 2008/05/02 17:57:32 steveu Exp $
|
||||
* $Id: g711.h,v 1.15 2008/11/30 10:17:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -62,11 +62,7 @@ enum
|
||||
G711_ULAW
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*! One of the G.711_xxx options */
|
||||
int mode;
|
||||
} g711_state_t;
|
||||
typedef struct g711_state_s g711_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722.h,v 1.21 2008/09/19 16:24:25 steveu Exp $
|
||||
* $Id: g722.h,v 1.22 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -56,69 +56,9 @@ enum
|
||||
G722_PACKED = 0x0002
|
||||
};
|
||||
|
||||
/*! The per band parameters for both encoding and decoding G.722 */
|
||||
typedef struct
|
||||
{
|
||||
int16_t nb;
|
||||
int16_t det;
|
||||
int16_t s;
|
||||
int16_t sz;
|
||||
int16_t r;
|
||||
int16_t p[2];
|
||||
int16_t a[2];
|
||||
int16_t b[6];
|
||||
int16_t d[7];
|
||||
} g722_band_t;
|
||||
typedef struct g722_encode_state_s g722_encode_state_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*! TRUE if the operating in the special ITU test mode, with the band split filters
|
||||
disabled. */
|
||||
int itu_test_mode;
|
||||
/*! TRUE if the G.722 data is packed */
|
||||
int packed;
|
||||
/*! TRUE if encode from 8k samples/second */
|
||||
int eight_k;
|
||||
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
|
||||
int bits_per_sample;
|
||||
|
||||
/*! Signal history for the QMF */
|
||||
int16_t x[12];
|
||||
int16_t y[12];
|
||||
int ptr;
|
||||
|
||||
g722_band_t band[2];
|
||||
|
||||
uint32_t in_buffer;
|
||||
int in_bits;
|
||||
uint32_t out_buffer;
|
||||
int out_bits;
|
||||
} g722_encode_state_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*! TRUE if the operating in the special ITU test mode, with the band split filters
|
||||
disabled. */
|
||||
int itu_test_mode;
|
||||
/*! TRUE if the G.722 data is packed */
|
||||
int packed;
|
||||
/*! TRUE if decode to 8k samples/second */
|
||||
int eight_k;
|
||||
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
|
||||
int bits_per_sample;
|
||||
|
||||
/*! Signal history for the QMF */
|
||||
int16_t x[12];
|
||||
int16_t y[12];
|
||||
int ptr;
|
||||
|
||||
g722_band_t band[2];
|
||||
|
||||
uint32_t in_buffer;
|
||||
int in_bits;
|
||||
uint32_t out_buffer;
|
||||
int out_bits;
|
||||
} g722_decode_state_t;
|
||||
typedef struct g722_decode_state_s g722_decode_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g726.h,v 1.21 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: g726.h,v 1.22 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -59,66 +59,11 @@ enum
|
||||
G726_PACKING_RIGHT = 2
|
||||
};
|
||||
|
||||
struct g726_state_s;
|
||||
typedef struct g726_state_s g726_state_t;
|
||||
|
||||
typedef int16_t (*g726_decoder_func_t)(struct g726_state_s *s, uint8_t code);
|
||||
typedef int16_t (*g726_decoder_func_t)(g726_state_t *s, uint8_t code);
|
||||
|
||||
typedef uint8_t (*g726_encoder_func_t)(struct g726_state_s *s, int16_t amp);
|
||||
|
||||
/*!
|
||||
* The following is the definition of the state structure
|
||||
* used by the G.726 encoder and decoder to preserve their internal
|
||||
* state between successive calls. The meanings of the majority
|
||||
* of the state structure fields are explained in detail in the
|
||||
* CCITT Recommendation G.721. The field names are essentially indentical
|
||||
* to variable names in the bit level description of the coding algorithm
|
||||
* included in this Recommendation.
|
||||
*/
|
||||
typedef struct g726_state_s
|
||||
{
|
||||
/*! The bit rate */
|
||||
int rate;
|
||||
/*! The external coding, for tandem operation */
|
||||
int ext_coding;
|
||||
/*! The number of bits per sample */
|
||||
unsigned int bits_per_sample;
|
||||
/*! One of the G.726_PACKING_xxx options */
|
||||
int packing;
|
||||
|
||||
/*! Locked or steady state step size multiplier. */
|
||||
int32_t yl;
|
||||
/*! Unlocked or non-steady state step size multiplier. */
|
||||
int16_t yu;
|
||||
/*! int16_t term energy estimate. */
|
||||
int16_t dms;
|
||||
/*! Long term energy estimate. */
|
||||
int16_t dml;
|
||||
/*! Linear weighting coefficient of 'yl' and 'yu'. */
|
||||
int16_t ap;
|
||||
|
||||
/*! Coefficients of pole portion of prediction filter. */
|
||||
int16_t a[2];
|
||||
/*! Coefficients of zero portion of prediction filter. */
|
||||
int16_t b[6];
|
||||
/*! Signs of previous two samples of a partially reconstructed signal. */
|
||||
int16_t pk[2];
|
||||
/*! Previous 6 samples of the quantized difference signal represented in
|
||||
an internal floating point format. */
|
||||
int16_t dq[6];
|
||||
/*! Previous 2 samples of the quantized difference signal represented in an
|
||||
internal floating point format. */
|
||||
int16_t sr[2];
|
||||
/*! Delayed tone detect */
|
||||
int td;
|
||||
|
||||
/*! \brief The bit stream processing context. */
|
||||
bitstream_state_t bs;
|
||||
|
||||
/*! \brief The current encoder function. */
|
||||
g726_encoder_func_t enc_func;
|
||||
/*! \brief The current decoder function. */
|
||||
g726_decoder_func_t dec_func;
|
||||
} g726_state_t;
|
||||
typedef uint8_t (*g726_encoder_func_t)(g726_state_t *s, int16_t amp);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: gsm0610.h,v 1.17 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: gsm0610.h,v 1.18 2008/11/15 14:17:46 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_GSM0610_H_)
|
||||
@ -72,34 +72,7 @@ typedef struct
|
||||
GSM 06.10 FR codec state descriptor. This defines the state of
|
||||
a single working instance of the GSM 06.10 FR encoder or decoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief One of the packing modes */
|
||||
int packing;
|
||||
|
||||
int16_t dp0[280];
|
||||
|
||||
/*! Preprocessing */
|
||||
int16_t z1;
|
||||
int32_t L_z2;
|
||||
/*! Pre-emphasis */
|
||||
int16_t mp;
|
||||
|
||||
/*! Short term delay filter */
|
||||
int16_t u[8];
|
||||
int16_t LARpp[2][8];
|
||||
int16_t j;
|
||||
|
||||
/*! Long term synthesis */
|
||||
int16_t nrp;
|
||||
/*! Short term synthesis */
|
||||
int16_t v[9];
|
||||
/*! Decoder postprocessing */
|
||||
int16_t msr;
|
||||
|
||||
/*! Encoder data */
|
||||
int16_t e[50];
|
||||
} gsm0610_state_t;
|
||||
typedef struct gsm0610_state_s gsm0610_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: hdlc.h,v 1.39 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: hdlc.h,v 1.40 2008/11/30 05:43:37 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -53,56 +53,7 @@ typedef void (*hdlc_underflow_handler_t)(void *user_data);
|
||||
/*!
|
||||
HDLC receive descriptor. This contains all the state information for an HDLC receiver.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! 2 for CRC-16, 4 for CRC-32 */
|
||||
int crc_bytes;
|
||||
/*! \brief Maximum permitted frame length. */
|
||||
size_t max_frame_len;
|
||||
/*! \brief The callback routine called to process each good received frame. */
|
||||
hdlc_frame_handler_t frame_handler;
|
||||
/*! \brief An opaque parameter passed to the callback routine. */
|
||||
void *user_data;
|
||||
/*! \brief TRUE if bad frames are to be reported. */
|
||||
int report_bad_frames;
|
||||
/*! \brief The number of consecutive flags which must be seen before framing is
|
||||
declared OK. */
|
||||
int framing_ok_threshold;
|
||||
/*! \brief TRUE if framing OK has been announced. */
|
||||
int framing_ok_announced;
|
||||
/*! \brief Number of consecutive flags seen so far. */
|
||||
int flags_seen;
|
||||
|
||||
/*! \brief The raw (stuffed) bit stream buffer. */
|
||||
unsigned int raw_bit_stream;
|
||||
/*! \brief The destuffed bit stream buffer. */
|
||||
unsigned int byte_in_progress;
|
||||
/*! \brief The current number of bits in byte_in_progress. */
|
||||
int num_bits;
|
||||
/*! \brief TRUE if in octet counting mode (e.g. for MTP). */
|
||||
int octet_counting_mode;
|
||||
/*! \brief Octet count, to achieve the functionality needed for things
|
||||
like MTP. */
|
||||
int octet_count;
|
||||
/*! \brief The number of octets to be allowed between octet count reports. */
|
||||
int octet_count_report_interval;
|
||||
|
||||
/*! \brief Buffer for a frame in progress. */
|
||||
uint8_t buffer[HDLC_MAXFRAME_LEN + 4];
|
||||
/*! \brief Length of a frame in progress. */
|
||||
size_t len;
|
||||
|
||||
/*! \brief The number of bytes of good frames received (CRC not included). */
|
||||
unsigned long int rx_bytes;
|
||||
/*! \brief The number of good frames received. */
|
||||
unsigned long int rx_frames;
|
||||
/*! \brief The number of frames with CRC errors received. */
|
||||
unsigned long int rx_crc_errors;
|
||||
/*! \brief The number of too short and too long frames received. */
|
||||
unsigned long int rx_length_errors;
|
||||
/*! \brief The number of HDLC aborts received. */
|
||||
unsigned long int rx_aborts;
|
||||
} hdlc_rx_state_t;
|
||||
typedef struct hdlc_rx_state_s hdlc_rx_state_t;
|
||||
|
||||
/*!
|
||||
HDLC received data statistics.
|
||||
@ -125,51 +76,7 @@ typedef struct
|
||||
HDLC transmit descriptor. This contains all the state information for an
|
||||
HDLC transmitter.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! 2 for CRC-16, 4 for CRC-32 */
|
||||
int crc_bytes;
|
||||
/*! \brief The callback routine called to indicate transmit underflow. */
|
||||
hdlc_underflow_handler_t underflow_handler;
|
||||
/*! \brief An opaque parameter passed to the callback routine. */
|
||||
void *user_data;
|
||||
/*! \brief The minimum flag octets to insert between frames. */
|
||||
int inter_frame_flags;
|
||||
/*! \brief TRUE if frame creation works in progressive mode. */
|
||||
int progressive;
|
||||
/*! \brief Maximum permitted frame length. */
|
||||
size_t max_frame_len;
|
||||
|
||||
/*! \brief The stuffed bit stream being created. */
|
||||
uint32_t octets_in_progress;
|
||||
/*! \brief The number of bits currently in octets_in_progress. */
|
||||
int num_bits;
|
||||
/*! \brief The currently rotated state of the flag octet. */
|
||||
int idle_octet;
|
||||
/*! \brief The number of flag octets to send for a timed burst of flags. */
|
||||
int flag_octets;
|
||||
/*! \brief The number of abort octets to send for a timed burst of aborts. */
|
||||
int abort_octets;
|
||||
/*! \brief TRUE if the next underflow of timed flag octets should be reported */
|
||||
int report_flag_underflow;
|
||||
|
||||
/*! \brief The current message being transmitted, with its CRC attached. */
|
||||
uint8_t buffer[HDLC_MAXFRAME_LEN + 4];
|
||||
/*! \brief The length of the message in the buffer. */
|
||||
size_t len;
|
||||
/*! \brief The current send position within the buffer. */
|
||||
int pos;
|
||||
/*! \brief The running CRC, as data fills the frame buffer. */
|
||||
uint32_t crc;
|
||||
|
||||
/*! \brief The current byte being broken into bits for transmission. */
|
||||
int byte;
|
||||
/*! \brief The number of bits remaining in byte. */
|
||||
int bits;
|
||||
|
||||
/*! \brief TRUE if transmission should end on buffer underflow .*/
|
||||
int tx_end;
|
||||
} hdlc_tx_state_t;
|
||||
typedef struct hdlc_tx_state_s hdlc_tx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* imaadpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* IMA/DVI/Intel ADPCM format.
|
||||
* ima_adpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* IMA/DVI/Intel ADPCM format.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
* Based on a bit from here, a bit from there, eye of toad,
|
||||
* ear of bat, etc - plus, of course, my own 2 cents.
|
||||
*
|
||||
* $Id: ima_adpcm.h,v 1.20 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: ima_adpcm.h,v 1.21 2008/11/30 10:17:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -59,19 +59,7 @@ enum
|
||||
a single working instance of the IMA ADPCM converter. This is used for
|
||||
either linear to ADPCM or ADPCM to linear conversion.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int variant;
|
||||
/*! \brief The size of a chunk, in samples. */
|
||||
int chunk_size;
|
||||
/*! \brief The last state of the ADPCM algorithm. */
|
||||
int last;
|
||||
/*! \brief Current index into the step size table. */
|
||||
int step_index;
|
||||
/*! \brief The current IMA code byte in progress. */
|
||||
uint16_t ima_byte;
|
||||
int bits;
|
||||
} ima_adpcm_state_t;
|
||||
typedef struct ima_adpcm_state_s ima_adpcm_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: logging.h,v 1.16 2008/05/05 11:25:01 steveu Exp $
|
||||
* $Id: logging.h,v 1.17 2008/11/30 13:44:35 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -74,17 +74,7 @@ enum
|
||||
Logging descriptor. This defines the working state for a single instance of
|
||||
the logging facility for spandsp.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int level;
|
||||
int samples_per_second;
|
||||
int64_t elapsed_samples;
|
||||
const char *tag;
|
||||
const char *protocol;
|
||||
|
||||
message_handler_func_t span_message;
|
||||
error_handler_func_t span_error;
|
||||
} logging_state_t;
|
||||
typedef struct logging_state_s logging_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -22,7 +22,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: lpc10.h,v 1.17 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: lpc10.h,v 1.18 2008/11/30 05:43:37 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_LPC10_H_)
|
||||
@ -57,115 +57,13 @@ typedef struct
|
||||
LPC10 codec encoder state descriptor. This defines the state of
|
||||
a single working instance of the LPC10 encoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int error_correction;
|
||||
|
||||
/* State used only by function high_pass_100hz */
|
||||
float z11;
|
||||
float z21;
|
||||
float z12;
|
||||
float z22;
|
||||
|
||||
/* State used by function lpc10_analyse */
|
||||
float inbuf[LPC10_SAMPLES_PER_FRAME*3];
|
||||
float pebuf[LPC10_SAMPLES_PER_FRAME*3];
|
||||
float lpbuf[696];
|
||||
float ivbuf[312];
|
||||
float bias;
|
||||
int32_t osbuf[10]; /* No initial value necessary */
|
||||
int32_t osptr; /* Initial value 1 */
|
||||
int32_t obound[3];
|
||||
int32_t vwin[3][2]; /* Initial value vwin[2][0] = 307; vwin[2][1] = 462; */
|
||||
int32_t awin[3][2]; /* Initial value awin[2][0] = 307; awin[2][1] = 462; */
|
||||
int32_t voibuf[4][2];
|
||||
float rmsbuf[3];
|
||||
float rcbuf[3][10];
|
||||
float zpre;
|
||||
|
||||
/* State used by function onset */
|
||||
float n;
|
||||
float d__; /* Initial value 1.0f */
|
||||
float fpc; /* No initial value necessary */
|
||||
float l2buf[16];
|
||||
float l2sum1;
|
||||
int32_t l2ptr1; /* Initial value 1 */
|
||||
int32_t l2ptr2; /* Initial value 9 */
|
||||
int32_t lasti; /* No initial value necessary */
|
||||
int hyst; /* Initial value FALSE */
|
||||
|
||||
/* State used by function lpc10_voicing */
|
||||
float dither; /* Initial value 20.0f */
|
||||
float snr;
|
||||
float maxmin;
|
||||
float voice[3][2]; /* Initial value is probably unnecessary */
|
||||
int32_t lbve;
|
||||
int32_t lbue;
|
||||
int32_t fbve;
|
||||
int32_t fbue;
|
||||
int32_t ofbue;
|
||||
int32_t sfbue;
|
||||
int32_t olbue;
|
||||
int32_t slbue;
|
||||
|
||||
/* State used by function dynamic_pitch_tracking */
|
||||
float s[60];
|
||||
int32_t p[2][60];
|
||||
int32_t ipoint;
|
||||
float alphax;
|
||||
|
||||
/* State used by function lpc10_pack */
|
||||
int32_t isync;
|
||||
} lpc10_encode_state_t;
|
||||
typedef struct lpc10_encode_state_s lpc10_encode_state_t;
|
||||
|
||||
/*!
|
||||
LPC10 codec decoder state descriptor. This defines the state of
|
||||
a single working instance of the LPC10 decoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int error_correction;
|
||||
|
||||
/* State used by function decode */
|
||||
int32_t iptold; /* Initial value 60 */
|
||||
int first; /* Initial value TRUE */
|
||||
int32_t ivp2h;
|
||||
int32_t iovoic;
|
||||
int32_t iavgp; /* Initial value 60 */
|
||||
int32_t erate;
|
||||
int32_t drc[10][3];
|
||||
int32_t dpit[3];
|
||||
int32_t drms[3];
|
||||
|
||||
/* State used by function synths */
|
||||
float buf[LPC10_SAMPLES_PER_FRAME*2];
|
||||
int32_t buflen; /* Initial value LPC10_SAMPLES_PER_FRAME */
|
||||
|
||||
/* State used by function pitsyn */
|
||||
int32_t ivoico; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int32_t ipito; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
float rmso; /* Initial value 1.0f */
|
||||
float rco[10]; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int32_t jsamp; /* Nno initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int first_pitsyn; /* Initial value TRUE */
|
||||
|
||||
/* State used by function bsynz */
|
||||
int32_t ipo;
|
||||
float exc[166];
|
||||
float exc2[166];
|
||||
float lpi[3];
|
||||
float hpi[3];
|
||||
float rmso_bsynz;
|
||||
|
||||
/* State used by function random */
|
||||
int32_t j;
|
||||
int32_t k;
|
||||
int16_t y[5];
|
||||
|
||||
/* State used by function deemp */
|
||||
float dei[2];
|
||||
float deo[3];
|
||||
} lpc10_decode_state_t;
|
||||
typedef struct lpc10_decode_state_s lpc10_decode_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -2,7 +2,8 @@
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* modem_connect_tones.c - Generation and detection of tones
|
||||
* associated with modems calling and answering calls.
|
||||
* associated with modems calling and
|
||||
* answering calls.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
@ -23,7 +24,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: modem_connect_tones.h,v 1.18 2008/08/10 03:42:38 steveu Exp $
|
||||
* $Id: modem_connect_tones.h,v 1.19 2008/10/13 13:14:00 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -87,65 +88,13 @@ enum
|
||||
Modem connect tones generator descriptor. This defines the state
|
||||
of a single working instance of the tone generator.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int tone_type;
|
||||
|
||||
int32_t tone_phase_rate;
|
||||
uint32_t tone_phase;
|
||||
int level;
|
||||
/*! \brief Countdown to the next phase hop */
|
||||
int hop_timer;
|
||||
/*! \brief Maximum duration timer */
|
||||
int duration_timer;
|
||||
uint32_t mod_phase;
|
||||
int32_t mod_phase_rate;
|
||||
int mod_level;
|
||||
} modem_connect_tones_tx_state_t;
|
||||
typedef struct modem_connect_tones_tx_state_s modem_connect_tones_tx_state_t;
|
||||
|
||||
/*!
|
||||
Modem connect tones receiver descriptor. This defines the state
|
||||
of a single working instance of the tone detector.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief The tone type being detected. */
|
||||
int tone_type;
|
||||
/*! \brief Callback routine, using to report detection of the tone. */
|
||||
tone_report_func_t tone_callback;
|
||||
/*! \brief An opaque pointer passed to tone_callback. */
|
||||
void *callback_data;
|
||||
|
||||
/*! \brief The notch filter state. */
|
||||
float z1;
|
||||
float z2;
|
||||
/*! \brief The in notch power estimate */
|
||||
int notch_level;
|
||||
/*! \brief The total channel power estimate */
|
||||
int channel_level;
|
||||
/*! \brief Sample counter for the small chunks of samples, after which a test is conducted. */
|
||||
int chunk_remainder;
|
||||
/*! \brief TRUE is the tone is currently confirmed present in the audio. */
|
||||
int tone_present;
|
||||
/*! \brief */
|
||||
int tone_on;
|
||||
/*! \brief A millisecond counter, to time the duration of tone sections. */
|
||||
int tone_cycle_duration;
|
||||
/*! \brief A count of the number of good cycles of tone reversal seen. */
|
||||
int good_cycles;
|
||||
/*! \brief TRUE if the tone has been seen since the last time the user tested for it */
|
||||
int hit;
|
||||
/*! \brief A V.21 FSK modem context used when searching for FAX preamble. */
|
||||
fsk_rx_state_t v21rx;
|
||||
/*! \brief The raw (stuffed) bit stream buffer. */
|
||||
unsigned int raw_bit_stream;
|
||||
/*! \brief The current number of bits in the octet in progress. */
|
||||
int num_bits;
|
||||
/*! \brief Number of consecutive flags seen so far. */
|
||||
int flags_seen;
|
||||
/*! \brief TRUE if framing OK has been announced. */
|
||||
int framing_ok_announced;
|
||||
} modem_connect_tones_rx_state_t;
|
||||
typedef struct modem_connect_tones_rx_state_s modem_connect_tones_rx_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: noise.h,v 1.13 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: noise.h,v 1.14 2008/11/30 12:38:27 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -91,14 +91,7 @@ enum
|
||||
Noise generator descriptor. This contains all the state information for an instance
|
||||
of the noise generator.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int class_of_noise;
|
||||
int quality;
|
||||
int32_t rms;
|
||||
uint32_t rndnum;
|
||||
int32_t state;
|
||||
} noise_state_t;
|
||||
typedef struct noise_state_s noise_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm.h,v 1.20 2008/04/17 14:27:00 steveu Exp $
|
||||
* $Id: oki_adpcm.h,v 1.21 2008/11/30 10:17:31 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
@ -49,25 +49,7 @@ by Bob Edgar. pg 272-276. */
|
||||
a single working instance of the Oki ADPCM converter. This is used for
|
||||
either linear to ADPCM or ADPCM to linear conversion.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief The bit rate - 24000 or 32000. */
|
||||
int bit_rate;
|
||||
/*! \brief The last state of the ADPCM algorithm. */
|
||||
int16_t last;
|
||||
/*! \brief Current index into the step size table. */
|
||||
int16_t step_index;
|
||||
/*! \brief The compressed data byte in progress. */
|
||||
uint8_t oki_byte;
|
||||
/*! \brief The signal history for the sample rate converter. */
|
||||
int16_t history[32];
|
||||
/*! \brief Pointer into the history buffer. */
|
||||
int ptr;
|
||||
/*! \brief Odd/even sample counter. */
|
||||
int mark;
|
||||
/*! \brief Phase accumulator for the sample rate converter. */
|
||||
int phase;
|
||||
} oki_adpcm_state_t;
|
||||
typedef struct oki_adpcm_state_s oki_adpcm_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
|
3
libs/spandsp/src/spandsp/private/README
Normal file
3
libs/spandsp/src/spandsp/private/README
Normal file
@ -0,0 +1,3 @@
|
||||
The header files in this directory should only be used by code tightly integrating itself with the
|
||||
spandsp library to maximise performance. To maximise compatibility with futures revisions of spandsp,
|
||||
most users should avoid using these headers, or probing into the spandsp data structures in other ways.
|
91
libs/spandsp/src/spandsp/private/adsi.h
Normal file
91
libs/spandsp/src/spandsp/private/adsi.h
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* private/adsi.h - Analogue display services interface and other call ID related handling.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 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.
|
||||
*
|
||||
* $Id: adsi.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_ADSI_H_)
|
||||
#define _SPANDSP_PRIVATE_ADSI_H_
|
||||
|
||||
/*!
|
||||
ADSI transmitter descriptor. This contains all the state information for an ADSI
|
||||
(caller ID, CLASS, CLIP, ACLIP) transmit channel.
|
||||
*/
|
||||
struct adsi_tx_state_s
|
||||
{
|
||||
int standard;
|
||||
|
||||
tone_gen_descriptor_t alert_tone_desc;
|
||||
tone_gen_state_t alert_tone_gen;
|
||||
fsk_tx_state_t fsktx;
|
||||
dtmf_tx_state_t dtmftx;
|
||||
async_tx_state_t asynctx;
|
||||
|
||||
int tx_signal_on;
|
||||
|
||||
int byte_no;
|
||||
int bit_pos;
|
||||
int bit_no;
|
||||
uint8_t msg[256];
|
||||
int msg_len;
|
||||
int preamble_len;
|
||||
int preamble_ones_len;
|
||||
int postamble_ones_len;
|
||||
int stop_bits;
|
||||
int baudot_shift;
|
||||
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
/*!
|
||||
ADSI receiver descriptor. This contains all the state information for an ADSI
|
||||
(caller ID, CLASS, CLIP, ACLIP, JCLIP) receive channel.
|
||||
*/
|
||||
struct adsi_rx_state_s
|
||||
{
|
||||
int standard;
|
||||
put_msg_func_t put_msg;
|
||||
void *user_data;
|
||||
|
||||
fsk_rx_state_t fskrx;
|
||||
dtmf_rx_state_t dtmfrx;
|
||||
async_rx_state_t asyncrx;
|
||||
|
||||
int consecutive_ones;
|
||||
int bit_pos;
|
||||
int in_progress;
|
||||
uint8_t msg[256];
|
||||
int msg_len;
|
||||
int baudot_shift;
|
||||
|
||||
/*! A count of the framing errors. */
|
||||
int framing_errors;
|
||||
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
91
libs/spandsp/src/spandsp/private/async.h
Normal file
91
libs/spandsp/src/spandsp/private/async.h
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* private/async.h - Asynchronous serial bit stream encoding and decoding
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 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.
|
||||
*
|
||||
* $Id: async.h,v 1.1 2008/11/30 10:17:31 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_ASYNC_H_)
|
||||
#define _SPANDSP_PRIVATE_ASYNC_H_
|
||||
|
||||
/*!
|
||||
Asynchronous data transmit descriptor. This defines the state of a single
|
||||
working instance of a byte to asynchronous serial converter, for use
|
||||
in FSK modems.
|
||||
*/
|
||||
struct async_tx_state_s
|
||||
{
|
||||
/*! \brief The number of data bits per character. */
|
||||
int data_bits;
|
||||
/*! \brief The type of parity. */
|
||||
int parity;
|
||||
/*! \brief The number of stop bits per character. */
|
||||
int stop_bits;
|
||||
/*! \brief A pointer to the callback routine used to get characters to be transmitted. */
|
||||
get_byte_func_t get_byte;
|
||||
/*! \brief An opaque pointer passed when calling get_byte. */
|
||||
void *user_data;
|
||||
|
||||
/*! \brief A current, partially transmitted, character. */
|
||||
int byte_in_progress;
|
||||
/*! \brief The current bit position within a partially transmitted character. */
|
||||
int bitpos;
|
||||
/*! \brief Parity bit. */
|
||||
int parity_bit;
|
||||
};
|
||||
|
||||
/*!
|
||||
Asynchronous data receive descriptor. This defines the state of a single
|
||||
working instance of an asynchronous serial to byte converter, for use
|
||||
in FSK modems.
|
||||
*/
|
||||
struct async_rx_state_s
|
||||
{
|
||||
/*! \brief The number of data bits per character. */
|
||||
int data_bits;
|
||||
/*! \brief The type of parity. */
|
||||
int parity;
|
||||
/*! \brief The number of stop bits per character. */
|
||||
int stop_bits;
|
||||
/*! \brief TRUE if V.14 rate adaption processing should be performed. */
|
||||
int use_v14;
|
||||
/*! \brief A pointer to the callback routine used to handle received characters. */
|
||||
put_byte_func_t put_byte;
|
||||
/*! \brief An opaque pointer passed when calling put_byte. */
|
||||
void *user_data;
|
||||
|
||||
/*! \brief A current, partially complete, character. */
|
||||
int byte_in_progress;
|
||||
/*! \brief The current bit position within a partially complete character. */
|
||||
int bitpos;
|
||||
/*! \brief Parity bit. */
|
||||
int parity_bit;
|
||||
|
||||
/*! A count of the number of parity errors seen. */
|
||||
int parity_errors;
|
||||
/*! A count of the number of character framing errors seen. */
|
||||
int framing_errors;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
130
libs/spandsp/src/spandsp/private/at_interpreter.h
Normal file
130
libs/spandsp/src/spandsp/private/at_interpreter.h
Normal file
@ -0,0 +1,130 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* private/at_interpreter.h - AT command interpreter to V.251, V.252, V.253, T.31 and the 3GPP specs.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004, 2005, 2006 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.
|
||||
*
|
||||
* $Id: at_interpreter.h,v 1.1 2008/11/30 05:43:37 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_AT_INTERPRETER_H_)
|
||||
#define _SPANDSP_PRIVATE_AT_INTERPRETER_H_
|
||||
|
||||
typedef struct at_call_id_s at_call_id_t;
|
||||
|
||||
struct at_call_id_s
|
||||
{
|
||||
char *id;
|
||||
char *value;
|
||||
at_call_id_t *next;
|
||||
};
|
||||
|
||||
/*!
|
||||
AT descriptor. This defines the working state for a single instance of
|
||||
the AT interpreter.
|
||||
*/
|
||||
struct at_state_s
|
||||
{
|
||||
at_profile_t p;
|
||||
/*! Value set by +GCI */
|
||||
int country_of_installation;
|
||||
/*! Value set by +FIT */
|
||||
int dte_inactivity_timeout;
|
||||
/*! Value set by +FIT */
|
||||
int dte_inactivity_action;
|
||||
/*! Value set by L */
|
||||
int speaker_volume;
|
||||
/*! Value set by M */
|
||||
int speaker_mode;
|
||||
/*! This is no real DTE rate. This variable is for compatibility this serially
|
||||
connected modems. */
|
||||
/*! Value set by +IPR/+FPR */
|
||||
int dte_rate;
|
||||
/*! Value set by +ICF */
|
||||
int dte_char_format;
|
||||
/*! Value set by +ICF */
|
||||
int dte_parity;
|
||||
/*! Value set by &C */
|
||||
int rlsd_behaviour;
|
||||
/*! Value set by &D */
|
||||
int dtr_behaviour;
|
||||
/*! Value set by +FCL */
|
||||
int carrier_loss_timeout;
|
||||
/*! Value set by X */
|
||||
int result_code_mode;
|
||||
/*! Value set by +IDSR */
|
||||
int dsr_option;
|
||||
/*! Value set by +ILSD */
|
||||
int long_space_disconnect_option;
|
||||
/*! Value set by +ICLOK */
|
||||
int sync_tx_clock_source;
|
||||
/*! Value set by +EWIND */
|
||||
int rx_window;
|
||||
/*! Value set by +EWIND */
|
||||
int tx_window;
|
||||
|
||||
int v8bis_signal;
|
||||
int v8bis_1st_message;
|
||||
int v8bis_2nd_message;
|
||||
int v8bis_sig_en;
|
||||
int v8bis_msg_en;
|
||||
int v8bis_supp_delay;
|
||||
|
||||
uint8_t rx_data[256];
|
||||
int rx_data_bytes;
|
||||
|
||||
int display_call_info;
|
||||
int call_info_displayed;
|
||||
at_call_id_t *call_id;
|
||||
char *local_id;
|
||||
/*! The currently select FAX modem class. 0 = data modem mode. */
|
||||
int fclass_mode;
|
||||
int at_rx_mode;
|
||||
int rings_indicated;
|
||||
int do_hangup;
|
||||
int silent_dial;
|
||||
int command_dial;
|
||||
int ok_is_pending;
|
||||
int dte_is_waiting;
|
||||
/*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */
|
||||
int rx_signal_present;
|
||||
/*! \brief TRUE if a modem has trained, Otherwise FALSE. */
|
||||
int rx_trained;
|
||||
int transmit;
|
||||
|
||||
char line[256];
|
||||
int line_ptr;
|
||||
|
||||
at_modem_control_handler_t *modem_control_handler;
|
||||
void *modem_control_user_data;
|
||||
at_tx_handler_t *at_tx_handler;
|
||||
void *at_tx_user_data;
|
||||
at_class1_handler_t *class1_handler;
|
||||
void *class1_user_data;
|
||||
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
46
libs/spandsp/src/spandsp/private/awgn.h
Normal file
46
libs/spandsp/src/spandsp/private/awgn.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* private/awgn.h - An additive Gaussian white noise generator
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: awgn.h,v 1.1 2008/11/30 12:38:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_AWGN_H_)
|
||||
#define _SPANDSP_PRIVATE_AWGN_H_
|
||||
|
||||
/*!
|
||||
AWGN generator descriptor. This contains all the state information for an AWGN generator.
|
||||
*/
|
||||
struct awgn_state_s
|
||||
{
|
||||
double rms;
|
||||
long int ix1;
|
||||
long int ix2;
|
||||
long int ix3;
|
||||
double r[98];
|
||||
double gset;
|
||||
int iset;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
104
libs/spandsp/src/spandsp/private/bell_r2_mf.h
Normal file
104
libs/spandsp/src/spandsp/private/bell_r2_mf.h
Normal file
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* bell_r2_mf.h - Bell MF and MFC/R2 tone generation and detection.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id: bell_r2_mf.h,v 1.2 2008/10/13 14:19:18 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_BELL_R2_MF_H_)
|
||||
#define _SPANDSP_PRIVATE_BELL_R2_MF_H_
|
||||
|
||||
/*!
|
||||
Bell MF generator state descriptor. This defines the state of a single
|
||||
working instance of a Bell MF generator.
|
||||
*/
|
||||
struct bell_mf_tx_state_s
|
||||
{
|
||||
/*! The tone generator. */
|
||||
tone_gen_state_t tones;
|
||||
int current_sample;
|
||||
union
|
||||
{
|
||||
queue_state_t queue;
|
||||
uint8_t buf[QUEUE_STATE_T_SIZE(MAX_BELL_MF_DIGITS)];
|
||||
} queue;
|
||||
};
|
||||
|
||||
/*!
|
||||
Bell MF digit detector descriptor.
|
||||
*/
|
||||
struct bell_mf_rx_state_s
|
||||
{
|
||||
/*! Optional callback funcion to deliver received digits. */
|
||||
digits_rx_callback_t digits_callback;
|
||||
/*! An opaque pointer passed to the callback function. */
|
||||
void *digits_callback_data;
|
||||
/*! Tone detector working states */
|
||||
goertzel_state_t out[6];
|
||||
/*! Short term history of results from the tone detection, using in persistence checking */
|
||||
uint8_t hits[5];
|
||||
/*! The current sample number within a processing block. */
|
||||
int current_sample;
|
||||
|
||||
/*! The number of digits which have been lost due to buffer overflows. */
|
||||
int lost_digits;
|
||||
/*! The number of digits currently in the digit buffer. */
|
||||
int current_digits;
|
||||
/*! The received digits buffer. This is a NULL terminated string. */
|
||||
char digits[MAX_BELL_MF_DIGITS + 1];
|
||||
};
|
||||
|
||||
/*!
|
||||
MFC/R2 tone detector descriptor.
|
||||
*/
|
||||
struct r2_mf_tx_state_s
|
||||
{
|
||||
/*! The tone generator. */
|
||||
tone_gen_state_t tone;
|
||||
/*! TRUE if generating forward tones, otherwise generating reverse tones. */
|
||||
int fwd;
|
||||
/*! The current digit being generated. */
|
||||
int digit;
|
||||
};
|
||||
|
||||
/*!
|
||||
MFC/R2 tone detector descriptor.
|
||||
*/
|
||||
struct r2_mf_rx_state_s
|
||||
{
|
||||
/*! Optional callback funcion to deliver received digits. */
|
||||
tone_report_func_t callback;
|
||||
/*! An opaque pointer passed to the callback function. */
|
||||
void *callback_data;
|
||||
/*! TRUE is we are detecting forward tones. FALSE if we are detecting backward tones */
|
||||
int fwd;
|
||||
/*! Tone detector working states */
|
||||
goertzel_state_t out[6];
|
||||
/*! The current sample number within a processing block. */
|
||||
int current_sample;
|
||||
/*! The currently detected digit. */
|
||||
int current_digit;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
85
libs/spandsp/src/spandsp/private/bert.h
Normal file
85
libs/spandsp/src/spandsp/private/bert.h
Normal file
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* private/bert.h - Bit error rate tests.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004 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.
|
||||
*
|
||||
* $Id: bert.h,v 1.1 2008/11/30 12:38:27 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_PRIVATE_BERT_H_)
|
||||
#define _SPANDSP_PRIVATE_BERT_H_
|
||||
|
||||
/*!
|
||||
Bit error rate tester (BERT) descriptor. This defines the working state for a
|
||||
single instance of the BERT.
|
||||
*/
|
||||
struct bert_state_s
|
||||
{
|
||||
int pattern;
|
||||
int pattern_class;
|
||||
bert_report_func_t reporter;
|
||||
void *user_data;
|
||||
int report_frequency;
|
||||
int limit;
|
||||
|
||||
uint32_t tx_reg;
|
||||
int tx_step;
|
||||
int tx_step_bit;
|
||||
int tx_bits;
|
||||
int tx_zeros;
|
||||
|
||||
uint32_t rx_reg;
|
||||
uint32_t ref_reg;
|
||||
uint32_t master_reg;
|
||||
int rx_step;
|
||||
int rx_step_bit;
|
||||
int resync;
|
||||
int rx_bits;
|
||||
int rx_zeros;
|
||||
int resync_len;
|
||||
int resync_percent;
|
||||
int resync_bad_bits;
|
||||
int resync_cnt;
|
||||
|
||||
uint32_t mask;
|
||||
int shift;
|
||||
int shift2;
|
||||
int max_zeros;
|
||||
int invert;
|
||||
int resync_time;
|
||||
|
||||
int decade_ptr[9];
|
||||
int decade_bad[9][10];
|
||||
int step;
|
||||
int error_rate;
|
||||
|
||||
int bit_error_status;
|
||||
int report_countdown;
|
||||
|
||||
bert_results_t results;
|
||||
|
||||
/*! \brief Error and flow logging control */
|
||||
logging_state_t logging;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user