]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update to snapshot spandsp-20090226 plus 2 typo fixes
authorMichael Jerris <mike@jerris.com>
Thu, 26 Feb 2009 16:26:25 +0000 (16:26 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 26 Feb 2009 16:26:25 +0000 (16:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12294 d0543943-73ff-0310-b7d9-9358b9ac24b2

12 files changed:
libs/spandsp/src/Makefile.am
libs/spandsp/src/msvc/config.h
libs/spandsp/src/msvc/inttypes.h
libs/spandsp/src/msvc/spandsp.h
libs/spandsp/src/msvc/sys/time.h
libs/spandsp/src/spandsp/bit_operations.h
libs/spandsp/src/spandsp/fast_convert.h
libs/spandsp/src/spandsp/telephony.h
libs/spandsp/src/spandsp/version.h
libs/spandsp/src/t30.c
libs/spandsp/test-data/etsi/fax/Makefile.am
libs/spandsp/test-data/itu/fax/Makefile.am

index 250b21785f3343062d86d0f1a3e66eeaaa113c16..dc3553031bbd9dbc7208f23782469d017875d142 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: Makefile.am,v 1.126 2009/02/21 05:39:08 steveu Exp $
+## $Id: Makefile.am,v 1.127 2009/02/25 15:30:21 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
index ff82b907a7e7bfb9254647b847158cdd06c5dfc7..f1bdab324f92102a633dc5f267b74967208c14ba 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This file is released in the public domain.
  *
- * $Id: config.h,v 1.3 2009/02/10 13:06:47 steveu Exp $
+ * $Id: config.h,v 1.4 2009/02/25 15:30:21 steveu Exp $
  */
 
 #if !defined(_MSVC_CONFIG_H_)
 
 #define SPANDSP_USE_EXPORT_CAPABILITY 1
 
-
 #define PACKAGE "spandsp"
 #define VERSION "0.0.6"
 
-
-
-// Win32/DevStudio compatibility stuff
+/* Win32/DevStudio compatibility stuff */
 
 #ifdef _MSC_VER
 
@@ -83,5 +80,4 @@
 
 #endif
 
-
 #endif
index a39d60948b916ccfff9455961ae7bea3134dca4d..e119f328b6de0356866a826350d4471225c1034c 100644 (file)
@@ -19,7 +19,6 @@
 extern "C" {
 #endif
 
-
 typedef unsigned __int8                uint8_t;
 typedef unsigned __int16       uint16_t;
 typedef unsigned __int32       uint32_t;
@@ -28,6 +27,7 @@ typedef __int8                int8_t;
 typedef __int16                int16_t;
 typedef __int32                int32_t;
 typedef __int64                int64_t;
+
 #define  INT16_MAX   0x7fff 
 #define  INT16_MIN   (-INT16_MAX - 1) 
 
index 8c2a57245cce9d25ab3f83ef985041cc7efa3444..0dddf14ffbbb45fa5549ee13ee825bc161e10091 100644 (file)
 #define __inline__ __inline
 #pragma warning(disable:4200)
 
-
 #undef SPANDSP_USE_FIXED_POINT
 #undef SPANDSP_MISALIGNED_ACCESS_FAILS
 
 #define SPANDSP_USE_EXPORT_CAPABILITY 1
 
 #include <stdlib.h>
-#include <msvc\inttypes.h>
+#include <msvc/inttypes.h>
 #include <string.h>
 #include <limits.h>
 #include <time.h>
index 5312d9f68c873ae49facbfacfe7a6968f506f334..864891bc28eed355644055bf5cc597ae6b4fed01 100644 (file)
  *
  */
 
-struct timeval {\r
-  long tv_sec;\r
-  long tv_usec;\r
-};\r
+struct timeval
+{
+    long int tv_sec;
+    long int tv_usec;
+};
 
 extern void gettimeofday(struct timeval *tv, void *tz);
index 1db4b3b46019dee686f66c9f2758733eb1464b88..44da5ff8713ec121b421c4b881e1f73c5032fa5a 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: bit_operations.h,v 1.24 2009/01/31 08:48:11 steveu Exp $
+ * $Id: bit_operations.h,v 1.25 2009/02/24 14:14:03 steveu Exp $
  */
 
 /*! \file */
@@ -56,13 +56,48 @@ static __inline__ int top_bit(unsigned int bits)
              : [res] "=&r" (res)
              : [bits] "r" (bits));
     return 31 - res;
-#elif defined(_M_IX86) // Visual Studio x86
+#elif defined(_M_IX86)
+    /* Visual Studio i386 */
     __asm
     {
         xor eax, eax
         dec eax
         bsr eax, bits
     }
+#elif defined(_M_X64)
+    /* Visual Studio x86_64 */
+    /* TODO: Need the appropriate x86_64 code */
+    int res;
+
+    if (bits == 0)
+        return -1;
+    res = 0;
+    if (bits & 0xFFFF0000)
+    {
+        bits &= 0xFFFF0000;
+        res += 16;
+    }
+    if (bits & 0xFF00FF00)
+    {
+        bits &= 0xFF00FF00;
+        res += 8;
+    }
+    if (bits & 0xF0F0F0F0)
+    {
+        bits &= 0xF0F0F0F0;
+        res += 4;
+    }
+    if (bits & 0xCCCCCCCC)
+    {
+        bits &= 0xCCCCCCCC;
+        res += 2;
+    }
+    if (bits & 0xAAAAAAAA)
+    {
+        bits &= 0xAAAAAAAA;
+        res += 1;
+    }
+    return res;
 #else
     int res;
 
index 2e794a2701f2b6c835b92da52526868230782a82..4c5f8583b0aa5beec9c043b1176af2e186da5332 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: fast_convert.h,v 1.4 2009/02/21 05:39:09 steveu Exp $
+ * $Id: fast_convert.h,v 1.5 2009/02/24 14:14:03 steveu Exp $
  */
 
 #if !defined(_SPANDSP_FAST_CONVERT_H_)
@@ -231,7 +231,8 @@ extern "C"
     }
 #endif
 
-#elif (defined(WIN32)  ||  defined(_WIN32))  &&  !defined(_WIN64)
+#elif defined(_M_IX86)
+    /* Visual Studio i386 */
     /*
      *    Win32 doesn't seem to have the lrint() and lrintf() functions.
      *    Therefore implement inline versions of these functions here.
@@ -301,28 +302,19 @@ extern "C"
         };
         return i;
     }
-#elif defined(WIN64)  ||  defined(_WIN64)
+#elif defined(_M_X64)
+    /* Visual Studio x86_64 */
     /* x86_64 machines will do best with a simple assignment. */
 #include <intrin.h>
 
     __inline long int lrint(double x)
     {
-#ifdef _M_X64
                return (long int)_mm_cvtsd_si64x( _mm_loadu_pd ((const double*)&x) );
-#else
-#warning "Not Supported: Replacing with a simple C cast."
-       return (long int) (x);
-#endif
     }
 
     __inline long int lrintf(float x)
     {
-#ifdef _M_X64
                return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
-#else
-#warning "Not Supported: Replacing with a simple C cast."
-       return (long int) (x);
-#endif
     }
 
     __inline long int lfastrint(double x)
index 90f23615ec7b5c563b05d03bca5346b34f362045..ca22f62f7c0b65b27bf76215712b4d0c915ebfa7 100644 (file)
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: telephony.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
+ * $Id: telephony.h,v 1.17 2009/02/25 15:30:21 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TELEPHONY_H_)
 #define _SPANDSP_TELEPHONY_H_
 
-#if defined(WIN32)
+#if defined(_M_IX86)  ||  defined(_M_X64)
 #if defined(LIBSPANDSP_EXPORTS)
 #define SPAN_DECLARE(type)              __declspec(dllexport) type __stdcall
 #define SPAN_DECLARE_NONSTD(type)       __declspec(dllexport) type __cdecl
index 002a2964db57c9580ed3c0d2e00255bfe3931693..aa86853b43f1956753be90be80d20a3feec2aceb 100644 (file)
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090221
-#define SPANDSP_RELEASE_TIME    054406
+#define SPANDSP_RELEASE_DATE    20090226
+#define SPANDSP_RELEASE_TIME    121601
 
 #endif
 /*- End of file ------------------------------------------------------------*/
index 65b274ae0b9a9339b0cedeb35c04dde67117218b..9974f26a70938a160c86c39c0a10b908f6207bd0 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: t30.c,v 1.286 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t30.c,v 1.288 2009/02/26 12:11:51 steveu Exp $
  */
 
 /*! \file */
@@ -5353,18 +5353,21 @@ SPAN_DECLARE_NONSTD(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, i
        The 2.55s maximum seems to limit signalling frames to no more than 95 octets,
        including FCS, and flag octets (assuming the use of V.21).
     */
-    if (!ok  &&  s->phase != T30_PHASE_C_ECM_RX)
+    if (!ok)
     {
         span_log(&s->logging, SPAN_LOG_FLOW, "Bad CRC received\n");
-        /* We either force a resend, or we wait until a resend occurs through a timeout. */
-        if ((s->supported_t30_features & T30_SUPPORT_COMMAND_REPEAT))
+        if (s->phase != T30_PHASE_C_ECM_RX)
         {
-            s->step = 0;
-            if (s->phase == T30_PHASE_B_RX)
-                queue_phase(s, T30_PHASE_B_TX);
-            else
-                queue_phase(s, T30_PHASE_D_TX);
-            send_simple_frame(s, T30_CRP);
+            /* We either force a resend, or we wait until a resend occurs through a timeout. */
+            if ((s->supported_t30_features & T30_SUPPORT_COMMAND_REPEAT))
+            {
+                s->step = 0;
+                if (s->phase == T30_PHASE_B_RX)
+                    queue_phase(s, T30_PHASE_B_TX);
+                else
+                    queue_phase(s, T30_PHASE_D_TX);
+                send_simple_frame(s, T30_CRP);
+            }
         }
         return;
     }
index 0242f5590a1f0c6f80646925bc4f4b3cf273f76b..6d2152d8ffcda15bed1e5c3ba3c83081a6df542e 100644 (file)
@@ -16,7 +16,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ##
-## $Id: Makefile.am,v 1.3 2009/02/20 12:34:20 steveu Exp $
+## $Id: Makefile.am,v 1.4 2009/02/25 17:52:51 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 
@@ -37,12 +37,16 @@ ETSI_TEST_PAGES = etsi_300_242_a4_diago1.tif \
 
 EXTRA_DIST = 
 
+MAINTAINERCLEANFILES = Makefile.in
+
+LIBDIR = -L$(top_builddir)/src
+
 nobase_data_DATA = ${ETSI_TEST_PAGES}
                    
 noinst_PROGRAMS = generate_etsi_300_242_pages
 
 generate_etsi_300_242_pages_SOURCES = generate_etsi_300_242_pages.c
-generate_etsi_300_242_pages_LDADD = -lspandsp -ltiff
+generate_etsi_300_242_pages_LDADD = $(LIBDIR) -lspandsp -ltiff
 
 clean:
        rm -f *.tif *.g3
index 2ea7793e084c08b8a79b7e0fed081c76d68c5d5c..25b1ed24a9c442f118a212c72d787531519153e7 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: Makefile.am,v 1.4 2009/02/20 12:34:20 steveu Exp $
+## $Id: Makefile.am,v 1.5 2009/02/25 17:52:52 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -97,6 +97,8 @@ MIXED_SIZE_PAGES = R1200_1200_A4.tif \
 
 EXTRA_DIST = ${ITU_TEST_PAGES_PBM}
 
+MAINTAINERCLEANFILES = Makefile.in
+
 nobase_data_DATA =  itutests.tif \
                     ${ITU_TEST_PAGES} \
                     dithered.tif \