mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-18 12:39:13 +00:00
update to snapshot spandsp-20090226 plus 2 typo fixes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12294 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4858722ed2
commit
71893423d0
@ -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: 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_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||||
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
* This file is released in the public domain.
|
* 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_)
|
#if !defined(_MSVC_CONFIG_H_)
|
||||||
@ -37,13 +37,10 @@
|
|||||||
|
|
||||||
#define SPANDSP_USE_EXPORT_CAPABILITY 1
|
#define SPANDSP_USE_EXPORT_CAPABILITY 1
|
||||||
|
|
||||||
|
|
||||||
#define PACKAGE "spandsp"
|
#define PACKAGE "spandsp"
|
||||||
#define VERSION "0.0.6"
|
#define VERSION "0.0.6"
|
||||||
|
|
||||||
|
/* Win32/DevStudio compatibility stuff */
|
||||||
|
|
||||||
// Win32/DevStudio compatibility stuff
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
@ -83,5 +80,4 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef unsigned __int8 uint8_t;
|
typedef unsigned __int8 uint8_t;
|
||||||
typedef unsigned __int16 uint16_t;
|
typedef unsigned __int16 uint16_t;
|
||||||
typedef unsigned __int32 uint32_t;
|
typedef unsigned __int32 uint32_t;
|
||||||
@ -28,6 +27,7 @@ typedef __int8 int8_t;
|
|||||||
typedef __int16 int16_t;
|
typedef __int16 int16_t;
|
||||||
typedef __int32 int32_t;
|
typedef __int32 int32_t;
|
||||||
typedef __int64 int64_t;
|
typedef __int64 int64_t;
|
||||||
|
|
||||||
#define INT16_MAX 0x7fff
|
#define INT16_MAX 0x7fff
|
||||||
#define INT16_MIN (-INT16_MAX - 1)
|
#define INT16_MIN (-INT16_MAX - 1)
|
||||||
|
|
||||||
|
@ -33,14 +33,13 @@
|
|||||||
#define __inline__ __inline
|
#define __inline__ __inline
|
||||||
#pragma warning(disable:4200)
|
#pragma warning(disable:4200)
|
||||||
|
|
||||||
|
|
||||||
#undef SPANDSP_USE_FIXED_POINT
|
#undef SPANDSP_USE_FIXED_POINT
|
||||||
#undef SPANDSP_MISALIGNED_ACCESS_FAILS
|
#undef SPANDSP_MISALIGNED_ACCESS_FAILS
|
||||||
|
|
||||||
#define SPANDSP_USE_EXPORT_CAPABILITY 1
|
#define SPANDSP_USE_EXPORT_CAPABILITY 1
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <msvc\inttypes.h>
|
#include <msvc/inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -12,9 +12,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct timeval {
|
struct timeval
|
||||||
long tv_sec;
|
{
|
||||||
long tv_usec;
|
long int tv_sec;
|
||||||
};
|
long int tv_usec;
|
||||||
|
};
|
||||||
|
|
||||||
extern void gettimeofday(struct timeval *tv, void *tz);
|
extern void gettimeofday(struct timeval *tv, void *tz);
|
||||||
|
@ -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: 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 */
|
/*! \file */
|
||||||
@ -56,13 +56,48 @@ static __inline__ int top_bit(unsigned int bits)
|
|||||||
: [res] "=&r" (res)
|
: [res] "=&r" (res)
|
||||||
: [bits] "r" (bits));
|
: [bits] "r" (bits));
|
||||||
return 31 - res;
|
return 31 - res;
|
||||||
#elif defined(_M_IX86) // Visual Studio x86
|
#elif defined(_M_IX86)
|
||||||
|
/* Visual Studio i386 */
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
dec eax
|
dec eax
|
||||||
bsr eax, bits
|
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
|
#else
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -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: 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_)
|
#if !defined(_SPANDSP_FAST_CONVERT_H_)
|
||||||
@ -231,7 +231,8 @@ extern "C"
|
|||||||
}
|
}
|
||||||
#endif
|
#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.
|
* Win32 doesn't seem to have the lrint() and lrintf() functions.
|
||||||
* Therefore implement inline versions of these functions here.
|
* Therefore implement inline versions of these functions here.
|
||||||
@ -301,28 +302,19 @@ extern "C"
|
|||||||
};
|
};
|
||||||
return i;
|
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. */
|
/* x86_64 machines will do best with a simple assignment. */
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
__inline long int lrint(double x)
|
__inline long int lrint(double x)
|
||||||
{
|
{
|
||||||
#ifdef _M_X64
|
|
||||||
return (long int)_mm_cvtsd_si64x( _mm_loadu_pd ((const double*)&x) );
|
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)
|
__inline long int lrintf(float x)
|
||||||
{
|
{
|
||||||
#ifdef _M_X64
|
|
||||||
return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
|
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)
|
__inline long int lfastrint(double x)
|
||||||
|
@ -22,13 +22,13 @@
|
|||||||
* 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: 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_)
|
#if !defined(_SPANDSP_TELEPHONY_H_)
|
||||||
#define _SPANDSP_TELEPHONY_H_
|
#define _SPANDSP_TELEPHONY_H_
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(_M_IX86) || defined(_M_X64)
|
||||||
#if defined(LIBSPANDSP_EXPORTS)
|
#if defined(LIBSPANDSP_EXPORTS)
|
||||||
#define SPAN_DECLARE(type) __declspec(dllexport) type __stdcall
|
#define SPAN_DECLARE(type) __declspec(dllexport) type __stdcall
|
||||||
#define SPAN_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
|
#define SPAN_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
|
||||||
|
@ -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 20090221
|
#define SPANDSP_RELEASE_DATE 20090226
|
||||||
#define SPANDSP_RELEASE_TIME 054406
|
#define SPANDSP_RELEASE_TIME 121601
|
||||||
|
|
||||||
#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: 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 */
|
/*! \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,
|
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).
|
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");
|
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->phase != T30_PHASE_C_ECM_RX)
|
||||||
if ((s->supported_t30_features & T30_SUPPORT_COMMAND_REPEAT))
|
|
||||||
{
|
{
|
||||||
s->step = 0;
|
/* We either force a resend, or we wait until a resend occurs through a timeout. */
|
||||||
if (s->phase == T30_PHASE_B_RX)
|
if ((s->supported_t30_features & T30_SUPPORT_COMMAND_REPEAT))
|
||||||
queue_phase(s, T30_PHASE_B_TX);
|
{
|
||||||
else
|
s->step = 0;
|
||||||
queue_phase(s, T30_PHASE_D_TX);
|
if (s->phase == T30_PHASE_B_RX)
|
||||||
send_simple_frame(s, T30_CRP);
|
queue_phase(s, T30_PHASE_B_TX);
|
||||||
|
else
|
||||||
|
queue_phase(s, T30_PHASE_D_TX);
|
||||||
|
send_simple_frame(s, T30_CRP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,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: 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)
|
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||||
|
|
||||||
@ -37,12 +37,16 @@ ETSI_TEST_PAGES = etsi_300_242_a4_diago1.tif \
|
|||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
LIBDIR = -L$(top_builddir)/src
|
||||||
|
|
||||||
nobase_data_DATA = ${ETSI_TEST_PAGES}
|
nobase_data_DATA = ${ETSI_TEST_PAGES}
|
||||||
|
|
||||||
noinst_PROGRAMS = generate_etsi_300_242_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_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:
|
clean:
|
||||||
rm -f *.tif *.g3
|
rm -f *.tif *.g3
|
||||||
|
@ -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: 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_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||||
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
|
||||||
@ -97,6 +97,8 @@ MIXED_SIZE_PAGES = R1200_1200_A4.tif \
|
|||||||
|
|
||||||
EXTRA_DIST = ${ITU_TEST_PAGES_PBM}
|
EXTRA_DIST = ${ITU_TEST_PAGES_PBM}
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
nobase_data_DATA = itutests.tif \
|
nobase_data_DATA = itutests.tif \
|
||||||
${ITU_TEST_PAGES} \
|
${ITU_TEST_PAGES} \
|
||||||
dithered.tif \
|
dithered.tif \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user