提交 ba5125a7 authored 作者: Michael Jerris's avatar Michael Jerris

update to snapshot spandsp-20090205

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11654 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4e0d6765
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: async.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
* $Id: async.c,v 1.17 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
......
......@@ -8,37 +8,22 @@
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
......@@ -52,16 +37,7 @@
CompileAs="1"
DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
......@@ -71,29 +47,8 @@
ImportLibrary="./Debug\spandsp.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
......@@ -101,22 +56,7 @@
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
......@@ -126,16 +66,7 @@
DebugInformationFormat="3"
DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
......@@ -147,33 +78,12 @@
ImportLibrary="./Release\spandsp.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
......
......@@ -87,4 +87,4 @@
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
\ No newline at end of file
>
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: silence_gen.c,v 1.18 2009/02/03 16:28:40 steveu Exp $
* $Id: silence_gen.c,v 1.19 2009/02/04 13:18:53 steveu Exp $
*/
/*! \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: async.h,v 1.21 2009/02/03 16:28:40 steveu Exp $
* $Id: async.h,v 1.22 2009/02/04 13:18:53 steveu Exp $
*/
/*! \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: complex_vector_float.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
* $Id: complex_vector_float.h,v 1.13 2009/02/04 13:18:53 steveu Exp $
*/
#if !defined(_SPANDSP_COMPLEX_VECTOR_FLOAT_H_)
......
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: fast_convert.h,v 1.1 2009/02/03 16:28:41 steveu Exp $
* $Id: fast_convert.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
*/
#if !defined(_SPANDSP_FAST_CONVERT_H_)
......@@ -90,7 +90,6 @@ extern "C"
* These replacement functions (pulled from the Public Domain MinGW
* math.h header) replace the native versions.
*/
#if 0
static __inline__ long int lrint(double x)
{
long int retval;
......@@ -119,8 +118,8 @@ extern "C"
);
return retval;
}
#endif
/* The fastest way to convert is the equivalent of lrint() */
static __inline__ long int lfastrint(double x)
{
long int retval;
......@@ -149,7 +148,7 @@ extern "C"
);
return retval;
}
#elif defined(HAVE_LRINT) && defined(HAVE_LRINTF)
#elif defined(__GNUC__)
#if defined(__i386__)
/* These routines are guaranteed fast on an i386 machine. Using the built in
......@@ -235,6 +234,7 @@ extern "C"
* Win32 doesn't seem to have the lrint() and lrintf() functions.
* Therefore implement inline versions of these functions here.
*/
__inline long int lrint(double x)
{
long int i;
......@@ -269,7 +269,7 @@ extern "C"
__inline double rint(double dbl)
{
__asm
_asm
{
fld dbl
frndint
......@@ -300,7 +300,7 @@ extern "C"
return i;
}
#elif defined(WIN64) || defined(_WIN64)
/* Win64 machines will do best with a simple assignment. */
/* x86_64 machines will do best with a simple assignment. */
__inline long int lfastrint(double x)
{
......@@ -377,12 +377,21 @@ extern "C"
the accuracy issues related to changing the rounding scheme are of little concern
to us. */
#if 0
#if !defined(__sgi)
#warning "No usable lrint() and lrintf() functions available."
#warning "Replacing these functions with a simple C cast."
#endif
#endif
static __inline__ long int lrint(double x)
{
return (long int) (x);
}
static __inline__ long int lrintf(float x)
{
return (long int) (x);
}
static __inline__ long int lfastrint(double x)
{
return (long int) (x);
......
......@@ -22,25 +22,29 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: t4.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
* $Id: t4.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_T4_H_)
#define _SPANDSP_PRIVATE_T4_H_
/*!
T.4 FAX compression/decompression descriptor. This defines the working state
for a single instance of a T.4 FAX compression or decompression channel.
TIFF specific state information to go with T.4 compression or decompression handling.
*/
struct t4_state_s
typedef struct
{
/*! \brief The same structure is used for T.4 transmit and receive. This variable
records which mode is in progress. */
int rx;
/* "Background" information about the FAX, which can be stored in a TIFF file. */
/*! \brief The vendor of the machine which produced the TIFF file. */
/*! \brief The libtiff context for the current TIFF file */
TIFF *tiff_file;
/*! \brief The compression type for output to the TIFF file. */
int output_compression;
/*! \brief The TIFF G3 FAX options. */
int output_t4_options;
/* "Background" information about the FAX, which can be stored in the image file. */
/*! \brief The vendor of the machine which produced the file. */
const char *vendor;
/*! \brief The model of machine which produced the TIFF file. */
/*! \brief The model of machine which produced the file. */
const char *model;
/*! \brief The local ident string. */
const char *local_ident;
......@@ -50,9 +54,17 @@ struct t4_state_s
const char *sub_address;
/*! \brief The FAX DCS information, as an ASCII string. */
const char *dcs;
/*! \brief The text which will be used in FAX page header. No text results
in no header line. */
const char *header_info;
} t4_tiff_state_t;
/*!
T.4 FAX compression/decompression descriptor. This defines the working state
for a single instance of a T.4 FAX compression or decompression channel.
*/
struct t4_state_s
{
/*! \brief The same structure is used for T.4 transmit and receive. This variable
records which mode is in progress. */
int rx;
/*! \brief The type of compression used between the FAX machines. */
int line_encoding;
......@@ -60,11 +72,6 @@ struct t4_state_s
for hardware FAX machines. */
int min_bits_per_row;
/*! \brief The compression type for output to the TIFF file. */
int output_compression;
/*! \brief The TIFF G3 FAX options. */
int output_t4_options;
/*! \brief Callback function to read a row of pixels from the image source. */
t4_row_read_handler_t row_read_handler;
/*! \brief Opaque pointer passed to row_read_handler. */
......@@ -88,8 +95,6 @@ struct t4_state_s
/*! \brief A point to the image buffer. */
uint8_t *image_buffer;
/*! \brief The libtiff context for the current TIFF file */
TIFF *tiff_file;
/*! \brief The current file name. */
const char *file;
/*! \brief The first page to transfer. -1 to start at the beginning of the file. */
......@@ -99,7 +104,7 @@ struct t4_state_s
/*! \brief The number of pages transferred to date. */
int pages_transferred;
/*! \brief The number of pages in the current TIFF file. */
/*! \brief The number of pages in the current image file. */
int pages_in_file;
/*! \brief Column-to-column (X) resolution in pixels per metre. */
int x_resolution;
......@@ -193,8 +198,15 @@ struct t4_state_s
/*! \brief The maximum bits in any row of the current page. For monitoring only. */
int max_row_bits;
/*! \brief The text which will be used in FAX page header. No text results
in no header line. */
const char *header_info;
/*! \brief Error and flow logging control */
logging_state_t logging;
/*! \brief All TIFF file specific state information for the T.4 context. */
t4_tiff_state_t tiff;
};
#endif
......
......@@ -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: saturated.h,v 1.3 2009/02/03 17:25:53 steveu Exp $
* $Id: saturated.h,v 1.4 2009/02/05 12:21:36 steveu Exp $
*/
/*! \file */
......@@ -75,7 +75,6 @@ static __inline__ int16_t fsaturatef(float famp)
return INT16_MAX;
if (famp < (float) INT16_MIN)
return INT16_MIN;
//return (int16_t) lfastrintf(famp);
return (int16_t) lrintf(famp);
}
/*- End of function --------------------------------------------------------*/
......@@ -86,11 +85,33 @@ static __inline__ int16_t fsaturate(double damp)
return INT16_MAX;
if (damp < (double) INT16_MIN)
return INT16_MIN;
//return (int16_t) lfastrint(damp);
return (int16_t) lrint(damp);
}
/*- End of function --------------------------------------------------------*/
/* Saturate to a 16 bit integer, using the fastest float to int conversion */
static __inline__ int16_t ffastsaturatef(float famp)
{
if (famp > (float) INT16_MAX)
return INT16_MAX;
if (famp < (float) INT16_MIN)
return INT16_MIN;
return (int16_t) lfastrintf(famp);
}
/*- End of function --------------------------------------------------------*/
/* Saturate to a 16 bit integer, using the fastest double to int conversion */
static __inline__ int16_t ffastsaturate(double damp)
{
if (damp > (double) INT16_MAX)
return INT16_MAX;
if (damp < (double) INT16_MIN)
return INT16_MIN;
return (int16_t) lfastrint(damp);
}
/*- End of function --------------------------------------------------------*/
/* Saturate to a 16 bit integer, using the closest float to int conversion */
static __inline__ float ffsaturatef(float famp)
{
if (famp > (float) INT16_MAX)
......@@ -101,6 +122,7 @@ static __inline__ float ffsaturatef(float famp)
}
/*- End of function --------------------------------------------------------*/
/* Saturate to a 16 bit integer, using the closest double to int conversion */
static __inline__ double ffsaturate(double famp)
{
if (famp > (double) INT16_MAX)
......
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: silence_gen.h,v 1.14 2009/02/03 16:28:41 steveu Exp $
* $Id: silence_gen.h,v 1.15 2009/02/04 13:18:53 steveu Exp $
*/
#if !defined(_SPANDSP_SILENCE_GEN_H_)
......
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: t30.h,v 1.122 2009/02/03 16:28:41 steveu Exp $
* $Id: t30.h,v 1.123 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
......
......@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: t38_non_ecm_buffer.h,v 1.5 2009/02/03 16:28:41 steveu Exp $
* $Id: t38_non_ecm_buffer.h,v 1.6 2009/02/04 13:18:53 steveu Exp $
*/
/*! \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: t4.h,v 1.55 2009/02/03 16:28:41 steveu Exp $
* $Id: t4.h,v 1.56 2009/02/05 12:21:36 steveu Exp $
*/
/*! \file */
......@@ -249,7 +249,7 @@ SPAN_DECLARE(int) t4_rx_end_page(t4_state_t *s);
started with t4_rx_init.
\param s The T.4 receive context.
\return 0 for success, otherwise -1. */
SPAN_DECLARE(int) t4_rx_delete(t4_state_t *s);
SPAN_DECLARE(int) t4_rx_free(t4_state_t *s);
/*! \brief End reception of a document. Tidy up and close the file.
This should be used to end T.4 reception started with
......@@ -379,7 +379,7 @@ SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s);
started with t4_tx_init.
\param s The T.4 context.
\return 0 for success, otherwise -1. */
SPAN_DECLARE(int) t4_tx_delete(t4_state_t *s);
SPAN_DECLARE(int) t4_tx_free(t4_state_t *s);
/*! \brief End the transmission of a document. Tidy up and close the file.
This should be used to end T.4 transmission started with t4_tx_init.
......
......@@ -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: v42.h,v 1.28 2009/02/03 16:28:41 steveu Exp $
* $Id: v42.h,v 1.29 2009/02/04 13:18:53 steveu Exp $
*/
/*! \page v42_page V.42 modem error correction
......
......@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
#define SPANDSP_RELEASE_DATE 20090203
#define SPANDSP_RELEASE_TIME 172817
#define SPANDSP_RELEASE_DATE 20090205
#define SPANDSP_RELEASE_TIME 122416
#endif
/*- End of file ------------------------------------------------------------*/
......@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: t30.c,v 1.283 2009/02/03 16:28:40 steveu Exp $
* $Id: t30.c,v 1.284 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
......
......@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: t38_non_ecm_buffer.c,v 1.6 2009/02/03 16:28:40 steveu Exp $
* $Id: t38_non_ecm_buffer.c,v 1.7 2009/02/04 13:18:53 steveu Exp $
*/
/*! \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: v42.c,v 1.48 2009/02/03 16:28:40 steveu Exp $
* $Id: v42.c,v 1.49 2009/02/04 13:18:53 steveu Exp $
*/
/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论