]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update to snapshot spandsp-20080913.tar.gz
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Oct 2008 03:54:17 +0000 (03:54 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Oct 2008 03:54:17 +0000 (03:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9768 d0543943-73ff-0310-b7d9-9358b9ac24b2

13 files changed:
libs/spandsp/.update
libs/spandsp/config-h.in
libs/spandsp/configure.ac
libs/spandsp/spandsp/tsb85.xml
libs/spandsp/src/spandsp/v27ter_rx.h
libs/spandsp/src/spandsp/v29rx.h
libs/spandsp/src/spandsp/version.h
libs/spandsp/src/v27ter_rx.c
libs/spandsp/src/v29rx.c
libs/spandsp/tests/fax_tester.c
libs/spandsp/tests/fax_tester.h
libs/spandsp/tests/t31_tests.c
libs/spandsp/tests/tsb85_tests.c

index 697eb52e8514eeb72c9c5a314e396c8755930d05..f493a4799aebc5252041ac8a0006a4fc6176066a 100644 (file)
@@ -1 +1 @@
-Tue Sep 30 23:52:21 EDT 2008
+Tue Sep 30 23:53:44 EDT 2008
index 3266538bbbf9c33ae4806c8282039a7db9c654db..0732e147fd1e31456fd231618528f0f45f9a36a2 100644 (file)
 /* Define to 1 if you have the <tiffio.h> header file. */
 #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. */
 #undef HAVE_UNISTD_H
 
index c25f60d33d8b469d457ce35b190c2fda82201683..6665f8a4f08de0bf2c667efa6db1208b8c438512 100644 (file)
@@ -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.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
 
@@ -180,7 +180,6 @@ AC_CHECK_HEADERS([audiofile.h])
 AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
 AC_CHECK_HEADERS([tiffio.h])
 AC_CHECK_HEADERS([pthread.h])
-AC_CHECK_HEADERS([unicall.h])
 if test "${build}" == "${host}"
 then
   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([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
     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([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
     AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
index 77c7cc3665d38325f653e28494e2123a2868f55d..b04f47a6a190bab51a4f4607f4a0f9ee9175a950 100644 (file)
@@ -1,7 +1,10 @@
 <?xml version="1.0"?>
 <!DOCTYPE fax-tests SYSTEM "./fax-tests.dtd">
 <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>
     <!-- TCF = 2700 bytes at 14400, 2250 at 12000, 1800 at 9600, 1350 at 7200, 900 at 4800 or 450 at 2400 -->
     <!-- Bad TCF == 10101010.... -->
         <step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
         <step dir="R" type="SILENCE"/>
 
+        <!-- First page -->
         <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" min_bits="141" 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-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="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 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="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
         <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-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="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="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 type="WAIT" value="75"/>
         <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="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 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="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" block="1"/>
         <step dir="T" type="POSTAMBLE"/>
         <step type="WAIT" value="75"/>
         <step dir="T" type="PREAMBLE" modem="V.21"/>
         <step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
         <step dir="R" type="SILENCE"/>
 
+        <!-- Second page -->
         <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="214"/>
 
         <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 dir="T" type="PREAMBLE" modem="V.21"/>
         <step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
         <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-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"/>
 
         <possible-step>
         <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-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"/>
 
         <possible-step>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
         <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-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"/>
 
         <possible-step>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
         <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-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"/>
 
         <possible-step>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
         <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-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"/>
 
         <possible-step>
             <step dir="T" type="POSTAMBLE"/>
         </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 type="WAIT" value="75"/>
index acd64fd452e9e8721a0e47f287575b570d5585cb..0a516396be4455e4847192d965ce6a2a75a93610 100644 (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: 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 */
@@ -128,10 +128,17 @@ typedef struct
     int32_t carrier_phase_rate;
     /*! \brief The carrier update rate saved for reuse when using short training. */
     int32_t carrier_phase_rate_save;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+    /*! \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;
+#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. */    
     power_meter_t power;
@@ -139,10 +146,6 @@ typedef struct
     int32_t carrier_on_power;
     /*! \brief The power meter level at which carrier off is declared. */
     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
                differential decoding. */
@@ -159,6 +162,11 @@ typedef struct
     int baud_half;
 
 #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. */
     float eq_delta;
     /*! \brief The adaptive equalizer coefficients. */
@@ -168,6 +176,11 @@ typedef struct
     /*! \brief The equalizer signal buffer. */
     complexi16_t eq_buf[V27TER_EQUALIZER_MASK + 1];
 #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. */
     float eq_delta;
     /*! \brief The adaptive equalizer coefficients. */
index ac85d7bebcca95361b5b2a724540469d298d6aeb..ab8bbe420723f922023469570d5c01ebdbf5362b 100644 (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: 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 */
@@ -196,10 +196,17 @@ typedef struct
     int32_t carrier_phase_rate;
     /*! \brief The carrier update rate saved for reuse when using short training. */
     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. */
     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. */    
     power_meter_t power;
@@ -207,10 +214,6 @@ typedef struct
     int32_t carrier_on_power;
     /*! \brief The power meter level at which carrier off is declared. */
     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
                differential decoding. */
@@ -227,6 +230,11 @@ typedef struct
     int baud_half;
 
 #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. */
     int16_t eq_delta;
     /*! \brief The adaptive equalizer coefficients. */
@@ -245,6 +253,11 @@ typedef struct
     /*! Baud phase for symbol sync. */
     int32_t baud_phase;
 #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. */
     float eq_delta;
     /*! \brief The adaptive equalizer coefficients. */
index 12c67f99405fa704a7fc931a6d0d94af0e605a8a..2b7aea9deae09fbc704948136cf92d4edd021d06 100644 (file)
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20080911
-#define SPANDSP_RELEASE_TIME    151652
+#define SPANDSP_RELEASE_DATE    20080913
+#define SPANDSP_RELEASE_TIME    155039
 
 #endif
 /*- End of file ------------------------------------------------------------*/
index 5d6961d58ea47ed84a824e660aef894ce9686741..d196cc5b1e63a9517993f1425c1f71af72fcafdf 100644 (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: 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 */
@@ -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
        positions is proportional to the phase error, for any particular target. However, the
        different amplitudes of the various target positions scale things. */
-#if defined(SPANDSP_USE_FIXED_POINTx)
     error = z->im*target->re - z->re*target->im;
+
+#if defined(SPANDSP_USE_FIXED_POINTx)
     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
-    error = z->im*target->re - z->re*target->im;
-#endif
-    
     s->carrier_phase_rate += (int32_t) (s->carrier_track_i*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));
+#endif
 }
 /*- 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->training_count = 0;
             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_p = 1000000.0f;
+#endif
         }
         break;
     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
 
     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_p = 10000000.0f;
+#endif
     power_meter_init(&(s->power), 4);
 
     s->constellation_state = 0;
index 298546d718e10084ac4f4b52df74553614ad94aa..8abd49c3edf0eb016653b5cd19442824bdea1a27 100644 (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: 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 */
@@ -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)
 #endif
 {
+#if defined(SPANDSP_USE_FIXED_POINT)
+    int32_t error;
+#else
     float error;
+#endif
 
     /* The initial coarse carrier frequency and phase estimation should have
        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,
        as the angular error for the larger amplitude constellation points is probably
        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 /= (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
        parameters are coarser at first, until we get precisely on target. Then,
        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 += (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));
+#endif
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -521,7 +525,7 @@ static __inline__ void symbol_sync(v29_rx_state_t *s)
     s->symbol_sync_dc_filter[0] = v;
     /* A little integration will now filter away much of the noise */
     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)
             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;
     /* A little integration will now filter away much of the noise */
     s->baud_phase -= p;
-    if (fabsf(s->baud_phase) > 50.0f)
+    if (fabsf(s->baud_phase) > 100.0f)
     {
         if (s->baud_phase > 0.0f)
             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->angles[0] =
             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)
                 s->agc_scaling_save = s->agc_scaling;
+#endif
         }
         break;
     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");
                 /* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+                s->agc_scaling_save = 0;
+#else
                 s->agc_scaling_save = 0.0f;
+#endif
                 s->training_stage = TRAINING_STAGE_PARKED;
                 report_status_change(s, SIG_STATUS_TRAINING_FAILED);
                 break;
@@ -700,7 +713,11 @@ static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
                of a real training sequence. */
             span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
             /* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+            s->agc_scaling_save = 0;
+#else
             s->agc_scaling_save = 0.0f;
+#endif
             s->training_stage = TRAINING_STAGE_PARKED;
             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_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_p = 1000000.0f;
+#endif
         }
         break;
     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");
                 /* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+                s->agc_scaling_save = 0;
+#else
                 s->agc_scaling_save = 0.0f;
+#endif
                 s->training_stage = TRAINING_STAGE_PARKED;
                 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 */
                 span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
                 /* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+                s->agc_scaling_save = 0;
+#else
                 s->agc_scaling_save = 0.0f;
+#endif
                 s->training_stage = TRAINING_STAGE_PARKED;
                 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 sample;
     int32_t v;
-    float y;
 #else
     complexf_t z;
     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];
         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];
-        y = v*s->agc_scaling;
-        sample.re = y;
+        sample.re = (v*s->agc_scaling) >> 15;
 #else
         v = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
         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. */
 #if defined(SPANDSP_USE_FIXED_POINT)
-            if (s->agc_scaling_save == 0.0f)
-                s->agc_scaling = (float) FP_FACTOR*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
+            if (s->agc_scaling_save == 0)
+                s->agc_scaling = (float) FP_FACTOR*32768.0f*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
 #else
             if (s->agc_scaling_save == 0.0f)
                 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];
             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];
-            sample.im = v*s->agc_scaling;
+            sample.im = (v*s->agc_scaling) >> 15;
             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.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
     {
         s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
-        s->agc_scaling_save = 0.0f;
 #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
+        s->agc_scaling_save = 0.0f;
         s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
 #endif
         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_p = 8000000.0f;
+#endif
     s->last_sample = 0;
     s->eq_skip = 0;
 
index 4f54f80e54285102730f23eb7b16037ed68afc0e..0bb78f9805ee370afb05316526b1863e55447f62 100644 (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_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 */
@@ -217,10 +217,16 @@ void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf
 }
 /*- 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->image_ptr = 0;
+    s->image_ptr = start;
     s->image_bit_ptr = 8;
     s->image_len = len;
     s->image_buffer = buf;
index ee51e42a3333df34677ad3a492b7cec90cf41744..39bc2d88d503ad6273ddc2547626a14994012e3c 100644 (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_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 */
@@ -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_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.
     \brief Initialise a FAX context.
index e9a49cbe1b12d2fd207a9c85c9ee8432d8977e6a..1a59d71f8555b9b0ef817dd2c17d1da7cdb1e91c 100644 (file)
@@ -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: 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 */
 #include "config.h"
 #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 <stdio.h>
 #include <fcntl.h>
index 29509bb2964d82f7dfa252680985a1af69e64d7b..2ad8ce84b7b2a531550cf2fbda927485443cafdf 100644 (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: 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 */
@@ -84,6 +84,8 @@ uint8_t image[1000000];
 uint8_t awaited[1000];
 int awaited_len = 0;
 
+char image_path[1024];
+
 t30_exchanged_info_t expected_rx_info;
 
 char next_tx_file[1000];
@@ -629,15 +631,18 @@ static int next_step(faxtester_state_t *s)
     xmlChar *timeout;
     xmlChar *min_bits;
     xmlChar *frame_size;
+    xmlChar *block;
     xmlChar *compression;
     uint8_t buf[1000];
     uint8_t mask[1000];
+    char path[1024];
     int i;
     int j;
     int hdlc;
     int short_train;
     int min_row_bits;
     int ecm_frame_size;
+    int ecm_block;
     int compression_type;
     int timer;
     int len;
@@ -678,6 +683,7 @@ static int next_step(faxtester_state_t *s)
     timeout = xmlGetProp(s->cur, (const xmlChar *) "timeout");
     min_bits = xmlGetProp(s->cur, (const xmlChar *) "min_bits");
     frame_size = xmlGetProp(s->cur, (const xmlChar *) "frame_size");
+    block = xmlGetProp(s->cur, (const xmlChar *) "block");
     compression = xmlGetProp(s->cur, (const xmlChar *) "compression");
 
     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)
             {
-                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);
             }
             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. */
             t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
             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;
         }
         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. */
             t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
             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;
         }
         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)
         {
             /* A non-ECM page */
-            if (min_bits)
-                min_row_bits = atoi((const char *) min_bits);
-            else
-                min_row_bits = 0;
-            if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
+            min_row_bits = (min_bits)  ?  atoi((const char *) min_bits)  :  0;
+            sprintf(path, "%s/%s", image_path, (const char *) value);
+            if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
             {
                 span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
                 exit(2);
@@ -1003,22 +1013,12 @@ printf("Push '%s'\n", next_tx_file);
         }
         else if (strcasecmp((const char *) type, "PP") == 0)
         {
-            if (min_bits)
-                min_row_bits = atoi((const char *) min_bits);
-            else
-                min_row_bits = 0;
-            /*endif*/
-            if (frame_size)
-                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)
+            min_row_bits = (min_bits)  ?  atoi((const char *) min_bits)  :  0;
+            ecm_block = (block)  ?  atoi((const char *) block)  :  0;
+            ecm_frame_size = (frame_size)  ?  atoi((const char *) frame_size)  :  64;
+            i = (crc_error)  ?  atoi((const char *) crc_error)  :  -1;
+            sprintf(path, "%s/%s", image_path, (const char *) value);
+            if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
             {
                 span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
                 exit(2);
@@ -1049,7 +1049,7 @@ printf("Push '%s'\n", next_tx_file);
             /*endif*/
             t4_tx_end(&t4_state);
             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
         {
@@ -1149,6 +1149,36 @@ static void exchange(faxtester_state_t *s)
 }
 /*- 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)
 {
     xmlChar *x;
@@ -1225,6 +1255,11 @@ static int get_test_set(faxtester_state_t *s, const char *test_file, const char
     /*endif*/
     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 (parse_test_group(s, doc, ns, cur->xmlChildrenNode, test) == 0)
@@ -1254,6 +1289,7 @@ int main(int argc, char *argv[])
     if (argc > 1)
         test_name = argv[1];
 
+    strcpy(image_path, ".");
     faxtester_init(&state, TRUE);
     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);