mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-03 20:01:57 +00:00
update to snapshot spandsp-20080913.tar.gz
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9768 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1d99b900fd
commit
e503aa41d7
@ -1 +1 @@
|
|||||||
Tue Sep 30 23:52:21 EDT 2008
|
Tue Sep 30 23:53:44 EDT 2008
|
||||||
|
@ -212,9 +212,6 @@
|
|||||||
/* Define to 1 if you have the <tiffio.h> header file. */
|
/* Define to 1 if you have the <tiffio.h> header file. */
|
||||||
#undef HAVE_TIFFIO_H
|
#undef HAVE_TIFFIO_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <unicall.h> header file. */
|
|
||||||
#undef HAVE_UNICALL_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#
|
#
|
||||||
# $Id: configure.ac,v 1.56 2008/07/10 12:44:54 steveu Exp $
|
# $Id: configure.ac,v 1.57 2008/09/12 14:41:55 steveu Exp $
|
||||||
|
|
||||||
# @start 1
|
# @start 1
|
||||||
|
|
||||||
@ -180,7 +180,6 @@ AC_CHECK_HEADERS([audiofile.h])
|
|||||||
AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
|
AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
|
||||||
AC_CHECK_HEADERS([tiffio.h])
|
AC_CHECK_HEADERS([tiffio.h])
|
||||||
AC_CHECK_HEADERS([pthread.h])
|
AC_CHECK_HEADERS([pthread.h])
|
||||||
AC_CHECK_HEADERS([unicall.h])
|
|
||||||
if test "${build}" == "${host}"
|
if test "${build}" == "${host}"
|
||||||
then
|
then
|
||||||
AC_CHECK_HEADERS([X11/X.h])
|
AC_CHECK_HEADERS([X11/X.h])
|
||||||
@ -273,7 +272,6 @@ if test -n "$enable_tests" ; then
|
|||||||
AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], TESTLIBS="$TESTLIBS -lfftw3", [AC_CHECK_LIB([fftw], [fftw_create_plan], TESTLIBS="$TESTLIBS -lfftw")])
|
AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], TESTLIBS="$TESTLIBS -lfftw3", [AC_CHECK_LIB([fftw], [fftw_create_plan], TESTLIBS="$TESTLIBS -lfftw")])
|
||||||
AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
|
AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
|
||||||
AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
|
AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
|
||||||
AC_CHECK_LIB([unicall], [uc_start], TESTLIBS="$TESTLIBS -lunicall",, -ltiff -ldl)
|
|
||||||
AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
|
AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
|
||||||
AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
|
AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
|
||||||
AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
|
AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE fax-tests SYSTEM "./fax-tests.dtd">
|
<!DOCTYPE fax-tests SYSTEM "./fax-tests.dtd">
|
||||||
<fax-tests>
|
<fax-tests>
|
||||||
<!-- $Id: tsb85.xml,v 1.20 2008/09/11 15:13:42 steveu Exp $ -->
|
<!-- $Id: tsb85.xml,v 1.21 2008/09/12 14:41:55 steveu Exp $ -->
|
||||||
|
<config>
|
||||||
|
<path type="IMAGE" value="../test-data/etsi/fax"/>
|
||||||
|
</config>
|
||||||
<messages>
|
<messages>
|
||||||
<!-- TCF = 2700 bytes at 14400, 2250 at 12000, 1800 at 9600, 1350 at 7200, 900 at 4800 or 450 at 2400 -->
|
<!-- TCF = 2700 bytes at 14400, 2250 at 12000, 1800 at 9600, 1350 at 7200, 900 at 4800 or 450 at 2400 -->
|
||||||
<!-- Bad TCF == 10101010.... -->
|
<!-- Bad TCF == 10101010.... -->
|
||||||
@ -1330,25 +1333,26 @@
|
|||||||
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
|
<!-- First page -->
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
|
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
|
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
||||||
@ -1356,19 +1360,19 @@
|
|||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="100"/>
|
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" block="1" crc_error="356"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 80 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 80 3B"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 FF FF FF FF"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
|
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" block="1"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
@ -1378,6 +1382,7 @@
|
|||||||
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
|
<!-- Second page -->
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="214"/>
|
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="214"/>
|
||||||
@ -1411,39 +1416,6 @@
|
|||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
|
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
|
||||||
<step type="WAIT" value="75"/>
|
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
|
||||||
<step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 40 00 6B"/>
|
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
|
||||||
<step dir="R" type="SILENCE"/>
|
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
|
||||||
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
|
|
||||||
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
|
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
|
||||||
<step type="WAIT" value="75"/>
|
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
|
||||||
<step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 40 00 6B"/>
|
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
|
||||||
|
|
||||||
<possible-step>
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="RNR" value="FF C8 37"/>
|
|
||||||
<step dir="R" type="SILENCE"/>
|
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
|
||||||
<step dir="T" type="HDLC" tag="RR" value="FF C8 76"/>
|
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
|
||||||
</possible-step>
|
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
|
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
|
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
|
||||||
@ -1629,7 +1601,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1651,7 +1623,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1673,7 +1645,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1695,7 +1667,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1759,7 +1731,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<possible-step>
|
<possible-step>
|
||||||
@ -1781,7 +1753,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<possible-step>
|
<possible-step>
|
||||||
@ -1794,7 +1766,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1803,7 +1775,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<possible-step>
|
<possible-step>
|
||||||
@ -1816,7 +1788,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1825,7 +1797,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<possible-step>
|
<possible-step>
|
||||||
@ -1838,7 +1810,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
@ -1847,7 +1819,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
<step dir="T" type="PREAMBLE" modem="V.21"/>
|
||||||
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
|
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
|
||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
|
|
||||||
<possible-step>
|
<possible-step>
|
||||||
@ -1860,7 +1832,7 @@
|
|||||||
<step dir="T" type="POSTAMBLE"/>
|
<step dir="T" type="POSTAMBLE"/>
|
||||||
</possible-step>
|
</possible-step>
|
||||||
|
|
||||||
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
|
<step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
|
||||||
<step dir="R" type="SILENCE"/>
|
<step dir="R" type="SILENCE"/>
|
||||||
|
|
||||||
<step type="WAIT" value="75"/>
|
<step type="WAIT" value="75"/>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: v27ter_rx.h,v 1.48 2008/09/08 12:54:32 steveu Exp $
|
* $Id: v27ter_rx.h,v 1.49 2008/09/13 14:59:31 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -128,10 +128,17 @@ typedef struct
|
|||||||
int32_t carrier_phase_rate;
|
int32_t carrier_phase_rate;
|
||||||
/*! \brief The carrier update rate saved for reuse when using short training. */
|
/*! \brief The carrier update rate saved for reuse when using short training. */
|
||||||
int32_t carrier_phase_rate_save;
|
int32_t carrier_phase_rate_save;
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||||
/*! \brief The proportional part of the carrier tracking filter. */
|
/*! \brief The proportional part of the carrier tracking filter. */
|
||||||
float carrier_track_p;
|
float carrier_track_p;
|
||||||
/*! \brief The integral part of the carrier tracking filter. */
|
/*! \brief The integral part of the carrier tracking filter. */
|
||||||
float carrier_track_i;
|
float carrier_track_i;
|
||||||
|
#else
|
||||||
|
/*! \brief The proportional part of the carrier tracking filter. */
|
||||||
|
float carrier_track_p;
|
||||||
|
/*! \brief The integral part of the carrier tracking filter. */
|
||||||
|
float carrier_track_i;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
|
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
|
||||||
power_meter_t power;
|
power_meter_t power;
|
||||||
@ -139,10 +146,6 @@ typedef struct
|
|||||||
int32_t carrier_on_power;
|
int32_t carrier_on_power;
|
||||||
/*! \brief The power meter level at which carrier off is declared. */
|
/*! \brief The power meter level at which carrier off is declared. */
|
||||||
int32_t carrier_off_power;
|
int32_t carrier_off_power;
|
||||||
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
|
||||||
float agc_scaling;
|
|
||||||
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
|
||||||
float agc_scaling_save;
|
|
||||||
|
|
||||||
/*! \brief The position of the current symbol in the constellation, used for
|
/*! \brief The position of the current symbol in the constellation, used for
|
||||||
differential decoding. */
|
differential decoding. */
|
||||||
@ -159,6 +162,11 @@ typedef struct
|
|||||||
int baud_half;
|
int baud_half;
|
||||||
|
|
||||||
#if defined(SPANDSP_USE_FIXED_POINTx)
|
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||||
|
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
||||||
|
float agc_scaling;
|
||||||
|
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
||||||
|
float agc_scaling_save;
|
||||||
|
|
||||||
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
||||||
float eq_delta;
|
float eq_delta;
|
||||||
/*! \brief The adaptive equalizer coefficients. */
|
/*! \brief The adaptive equalizer coefficients. */
|
||||||
@ -168,6 +176,11 @@ typedef struct
|
|||||||
/*! \brief The equalizer signal buffer. */
|
/*! \brief The equalizer signal buffer. */
|
||||||
complexi16_t eq_buf[V27TER_EQUALIZER_MASK + 1];
|
complexi16_t eq_buf[V27TER_EQUALIZER_MASK + 1];
|
||||||
#else
|
#else
|
||||||
|
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
||||||
|
float agc_scaling;
|
||||||
|
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
||||||
|
float agc_scaling_save;
|
||||||
|
|
||||||
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
||||||
float eq_delta;
|
float eq_delta;
|
||||||
/*! \brief The adaptive equalizer coefficients. */
|
/*! \brief The adaptive equalizer coefficients. */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: v29rx.h,v 1.59 2008/09/08 12:45:02 steveu Exp $
|
* $Id: v29rx.h,v 1.60 2008/09/13 14:10:31 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -196,10 +196,17 @@ typedef struct
|
|||||||
int32_t carrier_phase_rate;
|
int32_t carrier_phase_rate;
|
||||||
/*! \brief The carrier update rate saved for reuse when using short training. */
|
/*! \brief The carrier update rate saved for reuse when using short training. */
|
||||||
int32_t carrier_phase_rate_save;
|
int32_t carrier_phase_rate_save;
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
/*! \brief The proportional part of the carrier tracking filter. */
|
||||||
|
int32_t carrier_track_p;
|
||||||
|
/*! \brief The integral part of the carrier tracking filter. */
|
||||||
|
int32_t carrier_track_i;
|
||||||
|
#else
|
||||||
/*! \brief The proportional part of the carrier tracking filter. */
|
/*! \brief The proportional part of the carrier tracking filter. */
|
||||||
float carrier_track_p;
|
float carrier_track_p;
|
||||||
/*! \brief The integral part of the carrier tracking filter. */
|
/*! \brief The integral part of the carrier tracking filter. */
|
||||||
float carrier_track_i;
|
float carrier_track_i;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
|
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
|
||||||
power_meter_t power;
|
power_meter_t power;
|
||||||
@ -207,10 +214,6 @@ typedef struct
|
|||||||
int32_t carrier_on_power;
|
int32_t carrier_on_power;
|
||||||
/*! \brief The power meter level at which carrier off is declared. */
|
/*! \brief The power meter level at which carrier off is declared. */
|
||||||
int32_t carrier_off_power;
|
int32_t carrier_off_power;
|
||||||
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
|
||||||
float agc_scaling;
|
|
||||||
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
|
||||||
float agc_scaling_save;
|
|
||||||
|
|
||||||
/*! \brief The position of the current symbol in the constellation, used for
|
/*! \brief The position of the current symbol in the constellation, used for
|
||||||
differential decoding. */
|
differential decoding. */
|
||||||
@ -227,6 +230,11 @@ typedef struct
|
|||||||
int baud_half;
|
int baud_half;
|
||||||
|
|
||||||
#if defined(SPANDSP_USE_FIXED_POINT)
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
||||||
|
int32_t agc_scaling;
|
||||||
|
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
||||||
|
int32_t agc_scaling_save;
|
||||||
|
|
||||||
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
||||||
int16_t eq_delta;
|
int16_t eq_delta;
|
||||||
/*! \brief The adaptive equalizer coefficients. */
|
/*! \brief The adaptive equalizer coefficients. */
|
||||||
@ -245,6 +253,11 @@ typedef struct
|
|||||||
/*! Baud phase for symbol sync. */
|
/*! Baud phase for symbol sync. */
|
||||||
int32_t baud_phase;
|
int32_t baud_phase;
|
||||||
#else
|
#else
|
||||||
|
/*! \brief The scaling factor accessed by the AGC algorithm. */
|
||||||
|
float agc_scaling;
|
||||||
|
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
|
||||||
|
float agc_scaling_save;
|
||||||
|
|
||||||
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
/*! \brief The current delta factor for updating the equalizer coefficients. */
|
||||||
float eq_delta;
|
float eq_delta;
|
||||||
/*! \brief The adaptive equalizer coefficients. */
|
/*! \brief The adaptive equalizer coefficients. */
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
/* The date and time of the version are in UTC form. */
|
/* The date and time of the version are in UTC form. */
|
||||||
|
|
||||||
#define SPANDSP_RELEASE_DATE 20080911
|
#define SPANDSP_RELEASE_DATE 20080913
|
||||||
#define SPANDSP_RELEASE_TIME 151652
|
#define SPANDSP_RELEASE_TIME 155039
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*- End of file ------------------------------------------------------------*/
|
/*- End of file ------------------------------------------------------------*/
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: v27ter_rx.c,v 1.101 2008/09/08 13:13:29 steveu Exp $
|
* $Id: v27ter_rx.c,v 1.102 2008/09/13 14:59:30 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -323,16 +323,17 @@ static __inline__ void track_carrier(v27ter_rx_state_t *s, const complexf_t *z,
|
|||||||
/* For small errors the imaginary part of the difference between the actual and the target
|
/* For small errors the imaginary part of the difference between the actual and the target
|
||||||
positions is proportional to the phase error, for any particular target. However, the
|
positions is proportional to the phase error, for any particular target. However, the
|
||||||
different amplitudes of the various target positions scale things. */
|
different amplitudes of the various target positions scale things. */
|
||||||
|
error = z->im*target->re - z->re*target->im;
|
||||||
|
|
||||||
#if defined(SPANDSP_USE_FIXED_POINTx)
|
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||||
error = z->im*target->re - z->re*target->im;
|
|
||||||
error /= (float) FP_FACTOR;
|
error /= (float) FP_FACTOR;
|
||||||
|
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
|
||||||
|
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
|
||||||
#else
|
#else
|
||||||
error = z->im*target->re - z->re*target->im;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
|
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
|
||||||
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
|
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
|
||||||
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
|
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
@ -676,8 +677,13 @@ static __inline__ void process_half_baud(v27ter_rx_state_t *s, const complexf_t
|
|||||||
s->constellation_state = (s->bit_rate == 4800) ? 4 : 2;
|
s->constellation_state = (s->bit_rate == 4800) ? 4 : 2;
|
||||||
s->training_count = 0;
|
s->training_count = 0;
|
||||||
s->training_stage = TRAINING_STAGE_TEST_ONES;
|
s->training_stage = TRAINING_STAGE_TEST_ONES;
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||||
|
s->carrier_track_i = 400;
|
||||||
|
s->carrier_track_p = 1000000;
|
||||||
|
#else
|
||||||
s->carrier_track_i = 400.0f;
|
s->carrier_track_i = 400.0f;
|
||||||
s->carrier_track_p = 1000000.0f;
|
s->carrier_track_p = 1000000.0f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TRAINING_STAGE_TEST_ONES:
|
case TRAINING_STAGE_TEST_ONES:
|
||||||
@ -1076,8 +1082,13 @@ int v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
s->carrier_phase = 0;
|
s->carrier_phase = 0;
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||||
|
s->carrier_track_i = 200000;
|
||||||
|
s->carrier_track_p = 10000000;
|
||||||
|
#else
|
||||||
s->carrier_track_i = 200000.0f;
|
s->carrier_track_i = 200000.0f;
|
||||||
s->carrier_track_p = 10000000.0f;
|
s->carrier_track_p = 10000000.0f;
|
||||||
|
#endif
|
||||||
power_meter_init(&(s->power), 4);
|
power_meter_init(&(s->power), 4);
|
||||||
|
|
||||||
s->constellation_state = 0;
|
s->constellation_state = 0;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: v29rx.c,v 1.135 2008/09/09 16:13:12 steveu Exp $
|
* $Id: v29rx.c,v 1.138 2008/09/13 15:48:04 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -362,7 +362,11 @@ static __inline__ void track_carrier(v29_rx_state_t *s, const complexi16_t *z, c
|
|||||||
static __inline__ void track_carrier(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
|
static __inline__ void track_carrier(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
int32_t error;
|
||||||
|
#else
|
||||||
float error;
|
float error;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The initial coarse carrier frequency and phase estimation should have
|
/* The initial coarse carrier frequency and phase estimation should have
|
||||||
got us in the right ballpark. Now we need to fine tune fairly quickly,
|
got us in the right ballpark. Now we need to fine tune fairly quickly,
|
||||||
@ -377,19 +381,19 @@ static __inline__ void track_carrier(v29_rx_state_t *s, const complexf_t *z, con
|
|||||||
different amplitudes of the various target positions scale things. This isn't all bad,
|
different amplitudes of the various target positions scale things. This isn't all bad,
|
||||||
as the angular error for the larger amplitude constellation points is probably
|
as the angular error for the larger amplitude constellation points is probably
|
||||||
a more reliable indicator, and we are weighting it as such. */
|
a more reliable indicator, and we are weighting it as such. */
|
||||||
#if defined(SPANDSP_USE_FIXED_POINT)
|
|
||||||
error = z->im*target->re - z->re*target->im;
|
error = z->im*target->re - z->re*target->im;
|
||||||
error /= (float) FP_FACTOR;
|
|
||||||
#else
|
|
||||||
error = z->im*target->re - z->re*target->im;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Use a proportional-integral approach to tracking the carrier. The PI
|
/* Use a proportional-integral approach to tracking the carrier. The PI
|
||||||
parameters are coarser at first, until we get precisely on target. Then,
|
parameters are coarser at first, until we get precisely on target. Then,
|
||||||
the filter will be damped more to keep us on target. */
|
the filter will be damped more to keep us on target. */
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->carrier_phase_rate += ((s->carrier_track_i*error) >> FP_SHIFT_FACTOR);
|
||||||
|
s->carrier_phase += ((s->carrier_track_p*error) >> FP_SHIFT_FACTOR);
|
||||||
|
#else
|
||||||
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
|
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
|
||||||
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
|
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
|
||||||
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
|
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
@ -521,7 +525,7 @@ static __inline__ void symbol_sync(v29_rx_state_t *s)
|
|||||||
s->symbol_sync_dc_filter[0] = v;
|
s->symbol_sync_dc_filter[0] = v;
|
||||||
/* A little integration will now filter away much of the noise */
|
/* A little integration will now filter away much of the noise */
|
||||||
s->baud_phase -= p;
|
s->baud_phase -= p;
|
||||||
if (abs(s->baud_phase) > 50*FP_FACTOR)
|
if (abs(s->baud_phase) > 100*FP_FACTOR)
|
||||||
{
|
{
|
||||||
if (s->baud_phase > 0)
|
if (s->baud_phase > 0)
|
||||||
i = (s->baud_phase > 1000*FP_FACTOR) ? 5 : 1;
|
i = (s->baud_phase > 1000*FP_FACTOR) ? 5 : 1;
|
||||||
@ -543,7 +547,7 @@ static __inline__ void symbol_sync(v29_rx_state_t *s)
|
|||||||
s->symbol_sync_dc_filter[0] = v;
|
s->symbol_sync_dc_filter[0] = v;
|
||||||
/* A little integration will now filter away much of the noise */
|
/* A little integration will now filter away much of the noise */
|
||||||
s->baud_phase -= p;
|
s->baud_phase -= p;
|
||||||
if (fabsf(s->baud_phase) > 50.0f)
|
if (fabsf(s->baud_phase) > 100.0f)
|
||||||
{
|
{
|
||||||
if (s->baud_phase > 0.0f)
|
if (s->baud_phase > 0.0f)
|
||||||
i = (s->baud_phase > 1000.0f) ? 5 : 1;
|
i = (s->baud_phase > 1000.0f) ? 5 : 1;
|
||||||
@ -620,8 +624,13 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
s->training_stage = TRAINING_STAGE_LOG_PHASE;
|
s->training_stage = TRAINING_STAGE_LOG_PHASE;
|
||||||
s->angles[0] =
|
s->angles[0] =
|
||||||
s->start_angles[0] = arctan2(z.im, z.re);
|
s->start_angles[0] = arctan2(z.im, z.re);
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
if (s->agc_scaling_save == 0)
|
||||||
|
s->agc_scaling_save = s->agc_scaling;
|
||||||
|
#else
|
||||||
if (s->agc_scaling_save == 0.0f)
|
if (s->agc_scaling_save == 0.0f)
|
||||||
s->agc_scaling_save = s->agc_scaling;
|
s->agc_scaling_save = s->agc_scaling;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TRAINING_STAGE_LOG_PHASE:
|
case TRAINING_STAGE_LOG_PHASE:
|
||||||
@ -664,7 +673,11 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
{
|
{
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
|
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
|
||||||
/* Park this modem */
|
/* Park this modem */
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->agc_scaling_save = 0;
|
||||||
|
#else
|
||||||
s->agc_scaling_save = 0.0f;
|
s->agc_scaling_save = 0.0f;
|
||||||
|
#endif
|
||||||
s->training_stage = TRAINING_STAGE_PARKED;
|
s->training_stage = TRAINING_STAGE_PARKED;
|
||||||
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
||||||
break;
|
break;
|
||||||
@ -700,7 +713,11 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
of a real training sequence. */
|
of a real training sequence. */
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
|
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
|
||||||
/* Park this modem */
|
/* Park this modem */
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->agc_scaling_save = 0;
|
||||||
|
#else
|
||||||
s->agc_scaling_save = 0.0f;
|
s->agc_scaling_save = 0.0f;
|
||||||
|
#endif
|
||||||
s->training_stage = TRAINING_STAGE_PARKED;
|
s->training_stage = TRAINING_STAGE_PARKED;
|
||||||
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
||||||
}
|
}
|
||||||
@ -717,8 +734,13 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
{
|
{
|
||||||
s->training_stage = TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST;
|
s->training_stage = TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST;
|
||||||
s->training_error = 0.0f;
|
s->training_error = 0.0f;
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->carrier_track_i = 200;
|
||||||
|
s->carrier_track_p = 1000000;
|
||||||
|
#else
|
||||||
s->carrier_track_i = 200.0f;
|
s->carrier_track_i = 200.0f;
|
||||||
s->carrier_track_p = 1000000.0f;
|
s->carrier_track_p = 1000000.0f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST:
|
case TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST:
|
||||||
@ -755,7 +777,11 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
{
|
{
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (convergence failed)\n");
|
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (convergence failed)\n");
|
||||||
/* Park this modem */
|
/* Park this modem */
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->agc_scaling_save = 0;
|
||||||
|
#else
|
||||||
s->agc_scaling_save = 0.0f;
|
s->agc_scaling_save = 0.0f;
|
||||||
|
#endif
|
||||||
s->training_stage = TRAINING_STAGE_PARKED;
|
s->training_stage = TRAINING_STAGE_PARKED;
|
||||||
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
||||||
}
|
}
|
||||||
@ -799,7 +825,11 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
|
|||||||
/* Training has failed */
|
/* Training has failed */
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
|
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
|
||||||
/* Park this modem */
|
/* Park this modem */
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->agc_scaling_save = 0;
|
||||||
|
#else
|
||||||
s->agc_scaling_save = 0.0f;
|
s->agc_scaling_save = 0.0f;
|
||||||
|
#endif
|
||||||
s->training_stage = TRAINING_STAGE_PARKED;
|
s->training_stage = TRAINING_STAGE_PARKED;
|
||||||
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
|
||||||
}
|
}
|
||||||
@ -839,7 +869,6 @@ int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
|
|||||||
complexi16_t zz;
|
complexi16_t zz;
|
||||||
complexi16_t sample;
|
complexi16_t sample;
|
||||||
int32_t v;
|
int32_t v;
|
||||||
float y;
|
|
||||||
#else
|
#else
|
||||||
complexf_t z;
|
complexf_t z;
|
||||||
complexf_t zz;
|
complexf_t zz;
|
||||||
@ -930,8 +959,7 @@ int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
|
|||||||
v = (int32_t) rx_pulseshaper[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
|
v = (int32_t) rx_pulseshaper[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
|
||||||
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
||||||
v += (int32_t) rx_pulseshaper[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
|
v += (int32_t) rx_pulseshaper[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
|
||||||
y = v*s->agc_scaling;
|
sample.re = (v*s->agc_scaling) >> 15;
|
||||||
sample.re = y;
|
|
||||||
#else
|
#else
|
||||||
v = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
|
v = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
|
||||||
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
||||||
@ -965,8 +993,8 @@ int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
|
|||||||
{
|
{
|
||||||
/* Only AGC until we have locked down the setting. */
|
/* Only AGC until we have locked down the setting. */
|
||||||
#if defined(SPANDSP_USE_FIXED_POINT)
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
if (s->agc_scaling_save == 0.0f)
|
if (s->agc_scaling_save == 0)
|
||||||
s->agc_scaling = (float) FP_FACTOR*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
|
s->agc_scaling = (float) FP_FACTOR*32768.0f*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
|
||||||
#else
|
#else
|
||||||
if (s->agc_scaling_save == 0.0f)
|
if (s->agc_scaling_save == 0.0f)
|
||||||
s->agc_scaling = (1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
|
s->agc_scaling = (1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
|
||||||
@ -983,7 +1011,7 @@ int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
|
|||||||
v = (int32_t) rx_pulseshaper[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
|
v = (int32_t) rx_pulseshaper[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
|
||||||
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
|
||||||
v += (int32_t) rx_pulseshaper[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
|
v += (int32_t) rx_pulseshaper[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
|
||||||
sample.im = v*s->agc_scaling;
|
sample.im = (v*s->agc_scaling) >> 15;
|
||||||
z = dds_lookup_complexi16(s->carrier_phase);
|
z = dds_lookup_complexi16(s->carrier_phase);
|
||||||
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
|
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
|
||||||
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
|
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
|
||||||
@ -1070,16 +1098,22 @@ int v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
|
s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
|
||||||
s->agc_scaling_save = 0.0f;
|
|
||||||
#if defined(SPANDSP_USE_FIXED_POINT)
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
s->agc_scaling = (float) FP_FACTOR*0.0017f/RX_PULSESHAPER_GAIN;
|
s->agc_scaling_save = 0;
|
||||||
|
s->agc_scaling = (float) FP_FACTOR*32768.0f*0.0017f/RX_PULSESHAPER_GAIN;
|
||||||
#else
|
#else
|
||||||
|
s->agc_scaling_save = 0.0f;
|
||||||
s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
|
s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
|
||||||
#endif
|
#endif
|
||||||
equalizer_reset(s);
|
equalizer_reset(s);
|
||||||
}
|
}
|
||||||
|
#if defined(SPANDSP_USE_FIXED_POINT)
|
||||||
|
s->carrier_track_i = 8000;
|
||||||
|
s->carrier_track_p = 8000000;
|
||||||
|
#else
|
||||||
s->carrier_track_i = 8000.0f;
|
s->carrier_track_i = 8000.0f;
|
||||||
s->carrier_track_p = 8000000.0f;
|
s->carrier_track_p = 8000000.0f;
|
||||||
|
#endif
|
||||||
s->last_sample = 0;
|
s->last_sample = 0;
|
||||||
s->eq_skip = 0;
|
s->eq_skip = 0;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: fax_tester.c,v 1.16 2008/09/09 14:05:55 steveu Exp $
|
* $Id: fax_tester.c,v 1.17 2008/09/12 14:41:55 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -217,10 +217,16 @@ void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf
|
|||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int frame_size, int crc_hit)
|
void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int block, int frame_size, int crc_hit)
|
||||||
{
|
{
|
||||||
|
int start;
|
||||||
|
|
||||||
|
start = 256*frame_size*block;
|
||||||
|
if (len > start + 256*frame_size)
|
||||||
|
len = start + 256*frame_size;
|
||||||
|
|
||||||
s->ecm_frame_size = frame_size;
|
s->ecm_frame_size = frame_size;
|
||||||
s->image_ptr = 0;
|
s->image_ptr = start;
|
||||||
s->image_bit_ptr = 8;
|
s->image_bit_ptr = 8;
|
||||||
s->image_len = len;
|
s->image_len = len;
|
||||||
s->image_buffer = buf;
|
s->image_buffer = buf;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: fax_tester.h,v 1.8 2008/08/13 00:11:30 steveu Exp $
|
* $Id: fax_tester.h,v 1.9 2008/09/12 14:41:55 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -179,7 +179,7 @@ void faxtester_set_timeout(faxtester_state_t *s, int timeout);
|
|||||||
|
|
||||||
void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len);
|
void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len);
|
||||||
|
|
||||||
void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int frame_size, int crc_hit);
|
void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int block, int frame_size, int crc_hit);
|
||||||
|
|
||||||
/*! Initialise a FAX context.
|
/*! Initialise a FAX context.
|
||||||
\brief Initialise a FAX context.
|
\brief Initialise a FAX context.
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: t31_tests.c,v 1.62 2008/08/29 09:28:13 steveu Exp $
|
* $Id: t31_tests.c,v 1.63 2008/09/13 14:32:53 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -35,6 +35,10 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_FL_FL_H) && defined(HAVE_FL_FL_CARTESIAN_H) && defined(HAVE_FL_FL_AUDIO_METER_H)
|
||||||
|
#define ENABLE_GUI
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: tsb85_tests.c,v 1.23 2008/09/10 16:55:15 steveu Exp $
|
* $Id: tsb85_tests.c,v 1.24 2008/09/12 14:41:55 steveu Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
@ -84,6 +84,8 @@ uint8_t image[1000000];
|
|||||||
uint8_t awaited[1000];
|
uint8_t awaited[1000];
|
||||||
int awaited_len = 0;
|
int awaited_len = 0;
|
||||||
|
|
||||||
|
char image_path[1024];
|
||||||
|
|
||||||
t30_exchanged_info_t expected_rx_info;
|
t30_exchanged_info_t expected_rx_info;
|
||||||
|
|
||||||
char next_tx_file[1000];
|
char next_tx_file[1000];
|
||||||
@ -629,15 +631,18 @@ static int next_step(faxtester_state_t *s)
|
|||||||
xmlChar *timeout;
|
xmlChar *timeout;
|
||||||
xmlChar *min_bits;
|
xmlChar *min_bits;
|
||||||
xmlChar *frame_size;
|
xmlChar *frame_size;
|
||||||
|
xmlChar *block;
|
||||||
xmlChar *compression;
|
xmlChar *compression;
|
||||||
uint8_t buf[1000];
|
uint8_t buf[1000];
|
||||||
uint8_t mask[1000];
|
uint8_t mask[1000];
|
||||||
|
char path[1024];
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
int hdlc;
|
int hdlc;
|
||||||
int short_train;
|
int short_train;
|
||||||
int min_row_bits;
|
int min_row_bits;
|
||||||
int ecm_frame_size;
|
int ecm_frame_size;
|
||||||
|
int ecm_block;
|
||||||
int compression_type;
|
int compression_type;
|
||||||
int timer;
|
int timer;
|
||||||
int len;
|
int len;
|
||||||
@ -678,6 +683,7 @@ static int next_step(faxtester_state_t *s)
|
|||||||
timeout = xmlGetProp(s->cur, (const xmlChar *) "timeout");
|
timeout = xmlGetProp(s->cur, (const xmlChar *) "timeout");
|
||||||
min_bits = xmlGetProp(s->cur, (const xmlChar *) "min_bits");
|
min_bits = xmlGetProp(s->cur, (const xmlChar *) "min_bits");
|
||||||
frame_size = xmlGetProp(s->cur, (const xmlChar *) "frame_size");
|
frame_size = xmlGetProp(s->cur, (const xmlChar *) "frame_size");
|
||||||
|
block = xmlGetProp(s->cur, (const xmlChar *) "block");
|
||||||
compression = xmlGetProp(s->cur, (const xmlChar *) "compression");
|
compression = xmlGetProp(s->cur, (const xmlChar *) "compression");
|
||||||
|
|
||||||
s->cur = s->cur->next;
|
s->cur = s->cur->next;
|
||||||
@ -878,7 +884,7 @@ static int next_step(faxtester_state_t *s)
|
|||||||
}
|
}
|
||||||
else if (strcasecmp((const char *) tag, "TXFILE") == 0)
|
else if (strcasecmp((const char *) tag, "TXFILE") == 0)
|
||||||
{
|
{
|
||||||
strcpy(next_tx_file, (const char *) value);
|
sprintf(next_tx_file, "%s/%s", image_path, (const char *) value);
|
||||||
printf("Push '%s'\n", next_tx_file);
|
printf("Push '%s'\n", next_tx_file);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -893,7 +899,10 @@ printf("Push '%s'\n", next_tx_file);
|
|||||||
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
|
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
|
||||||
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
|
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
|
||||||
if (value)
|
if (value)
|
||||||
t30_set_tx_file(t30, (const char *) value, -1, -1);
|
{
|
||||||
|
sprintf(path, "%s/%s", image_path, (const char *) value);
|
||||||
|
t30_set_tx_file(t30, path, -1, -1);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (strcasecmp((const char *) type, "ANSWER") == 0)
|
else if (strcasecmp((const char *) type, "ANSWER") == 0)
|
||||||
@ -905,7 +914,10 @@ printf("Push '%s'\n", next_tx_file);
|
|||||||
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
|
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
|
||||||
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
|
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
|
||||||
if (value)
|
if (value)
|
||||||
t30_set_tx_file(t30, (const char *) value, -1, -1);
|
{
|
||||||
|
sprintf(path, "%s/%s", image_path, (const char *) value);
|
||||||
|
t30_set_tx_file(t30, path, -1, -1);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (strcasecmp((const char *) type, "CNG") == 0)
|
else if (strcasecmp((const char *) type, "CNG") == 0)
|
||||||
@ -966,11 +978,9 @@ printf("Push '%s'\n", next_tx_file);
|
|||||||
else if (strcasecmp((const char *) type, "MSG") == 0)
|
else if (strcasecmp((const char *) type, "MSG") == 0)
|
||||||
{
|
{
|
||||||
/* A non-ECM page */
|
/* A non-ECM page */
|
||||||
if (min_bits)
|
min_row_bits = (min_bits) ? atoi((const char *) min_bits) : 0;
|
||||||
min_row_bits = atoi((const char *) min_bits);
|
sprintf(path, "%s/%s", image_path, (const char *) value);
|
||||||
else
|
if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
|
||||||
min_row_bits = 0;
|
|
||||||
if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
|
|
||||||
{
|
{
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
|
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
|
||||||
exit(2);
|
exit(2);
|
||||||
@ -1003,22 +1013,12 @@ printf("Push '%s'\n", next_tx_file);
|
|||||||
}
|
}
|
||||||
else if (strcasecmp((const char *) type, "PP") == 0)
|
else if (strcasecmp((const char *) type, "PP") == 0)
|
||||||
{
|
{
|
||||||
if (min_bits)
|
min_row_bits = (min_bits) ? atoi((const char *) min_bits) : 0;
|
||||||
min_row_bits = atoi((const char *) min_bits);
|
ecm_block = (block) ? atoi((const char *) block) : 0;
|
||||||
else
|
ecm_frame_size = (frame_size) ? atoi((const char *) frame_size) : 64;
|
||||||
min_row_bits = 0;
|
i = (crc_error) ? atoi((const char *) crc_error) : -1;
|
||||||
/*endif*/
|
sprintf(path, "%s/%s", image_path, (const char *) value);
|
||||||
if (frame_size)
|
if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
|
||||||
ecm_frame_size = atoi((const char *) frame_size);
|
|
||||||
else
|
|
||||||
ecm_frame_size = 64;
|
|
||||||
/*endif*/
|
|
||||||
if (crc_error)
|
|
||||||
i = atoi((const char *) crc_error);
|
|
||||||
else
|
|
||||||
i = -1;
|
|
||||||
/*endif*/
|
|
||||||
if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
|
|
||||||
{
|
{
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
|
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
|
||||||
exit(2);
|
exit(2);
|
||||||
@ -1049,7 +1049,7 @@ printf("Push '%s'\n", next_tx_file);
|
|||||||
/*endif*/
|
/*endif*/
|
||||||
t4_tx_end(&t4_state);
|
t4_tx_end(&t4_state);
|
||||||
span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
|
span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
|
||||||
faxtester_set_ecm_image_buffer(s, image, len, ecm_frame_size, i);
|
faxtester_set_ecm_image_buffer(s, image, len, ecm_block, ecm_frame_size, i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1149,6 +1149,36 @@ static void exchange(faxtester_state_t *s)
|
|||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
|
static int parse_config(faxtester_state_t *s, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
|
||||||
|
{
|
||||||
|
xmlChar *x;
|
||||||
|
xmlChar *y;
|
||||||
|
|
||||||
|
while (cur)
|
||||||
|
{
|
||||||
|
if (xmlStrcmp(cur->name, (const xmlChar *) "path") == 0)
|
||||||
|
{
|
||||||
|
if ((x = xmlGetProp(cur, (const xmlChar *) "type"))
|
||||||
|
&&
|
||||||
|
(y = xmlGetProp(cur, (const xmlChar *) "value")))
|
||||||
|
{
|
||||||
|
if (strcasecmp((const char *) x, "IMAGE") == 0)
|
||||||
|
{
|
||||||
|
span_log(&s->logging, SPAN_LOG_FLOW, "Found '%s' '%s'\n", (char *) x, (char *) y);
|
||||||
|
strcpy(image_path, (const char *) y);
|
||||||
|
}
|
||||||
|
/*endif*/
|
||||||
|
}
|
||||||
|
/*endif*/
|
||||||
|
}
|
||||||
|
/*endif*/
|
||||||
|
cur = cur->next;
|
||||||
|
}
|
||||||
|
/*endwhile*/
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
static int parse_test_group(faxtester_state_t *s, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *test)
|
static int parse_test_group(faxtester_state_t *s, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *test)
|
||||||
{
|
{
|
||||||
xmlChar *x;
|
xmlChar *x;
|
||||||
@ -1225,6 +1255,11 @@ static int get_test_set(faxtester_state_t *s, const char *test_file, const char
|
|||||||
/*endif*/
|
/*endif*/
|
||||||
while (cur)
|
while (cur)
|
||||||
{
|
{
|
||||||
|
if (xmlStrcmp(cur->name, (const xmlChar *) "config") == 0)
|
||||||
|
{
|
||||||
|
parse_config(s, doc, ns, cur->xmlChildrenNode);
|
||||||
|
}
|
||||||
|
/*endif*/
|
||||||
if (xmlStrcmp(cur->name, (const xmlChar *) "test-group") == 0)
|
if (xmlStrcmp(cur->name, (const xmlChar *) "test-group") == 0)
|
||||||
{
|
{
|
||||||
if (parse_test_group(s, doc, ns, cur->xmlChildrenNode, test) == 0)
|
if (parse_test_group(s, doc, ns, cur->xmlChildrenNode, test) == 0)
|
||||||
@ -1254,6 +1289,7 @@ int main(int argc, char *argv[])
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
test_name = argv[1];
|
test_name = argv[1];
|
||||||
|
|
||||||
|
strcpy(image_path, ".");
|
||||||
faxtester_init(&state, TRUE);
|
faxtester_init(&state, TRUE);
|
||||||
memset(&expected_rx_info, 0, sizeof(expected_rx_info));
|
memset(&expected_rx_info, 0, sizeof(expected_rx_info));
|
||||||
span_log_set_level(&state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
|
span_log_set_level(&state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user