From d3dbde63b17bb03ea4a3fdca0fb719e3aa8b691d Mon Sep 17 00:00:00 2001 From: Steve Underwood Date: Thu, 4 Apr 2013 23:40:00 +0800 Subject: [PATCH] More moves towards colour FAX --- libs/spandsp/src/Makefile.am | 54 +- libs/spandsp/src/libspandsp.dsp | 967 ------------------ libs/spandsp/src/spandsp/private/t30.h | 4 +- .../spandsp/private/t30_dis_dtc_dcs_bits.h | 2 +- libs/spandsp/src/spandsp/private/t4_tx.h | 4 - libs/spandsp/src/spandsp/t4_rx.h | 53 +- libs/spandsp/src/spandsp/t4_tx.h | 54 +- libs/spandsp/src/t4_rx.c | 15 +- libs/spandsp/tests/fax_tests.sh | 2 +- libs/spandsp/tests/t4_tests.c | 24 +- 10 files changed, 106 insertions(+), 1073 deletions(-) delete mode 100644 libs/spandsp/src/libspandsp.dsp diff --git a/libs/spandsp/src/Makefile.am b/libs/spandsp/src/Makefile.am index aad3b91dd7..2bab4a9a56 100644 --- a/libs/spandsp/src/Makefile.am +++ b/libs/spandsp/src/Makefile.am @@ -50,11 +50,12 @@ MOSTLYCLEANFILES = ${DISTCLEANFILES} MAINTAINERCLEANFILES = ${DISTCLEANFILES} EXTRA_DIST = floating_fudge.h \ - libspandsp.dsp \ libspandsp.2005.sln \ libspandsp.2008.sln \ libspandsp.2005.vcproj \ libspandsp.2008.vcproj \ + libspandsp.2010.vcproj \ + libspandsp.2012.vcproj \ libtiff.2005.vcproj \ libtiff.2008.vcproj \ filter_tools.c \ @@ -475,37 +476,18 @@ v29tx.lo: ${V29_TX_INCL} v29tx_rrc.h: make_modem_filter$(EXEEXT) ./make_modem_filter$(EXEEXT) -m V.29 -t >v29tx_rrc.h -DSP = libspandsp.dsp VCPROJ8 = libspandsp.2005.vcproj VCPROJ9 = libspandsp.2008.vcproj +VCPROJ10 = libspandsp.2010.vcproj +VCPROJ12 = libspandsp.2012.vcproj WIN32SOURCES = $(libspandsp_la_SOURCES) .\\msvc\\gettimeofday.c WIN32HEADERS = $(nobase_include_HEADERS) spandsp.h -DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP) VCPROJOUT8 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ8) VCPROJOUT9 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ9) - -$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am - echo "creating $(DSP)" - @(cp $(srcdir)/msvc/msvcproj.head $(DSP); \ - echo "# Begin Group \"Source Files\"" $(DSPOUT); \ - for file in $(WIN32SOURCES); do \ - echo "# Begin Source File" $(DSPOUT); \ - echo "" $(DSPOUT); \ - echo "SOURCE=.\\"$$file $(DSPOUT); \ - echo "# End Source File" $(DSPOUT); \ - done; \ - echo "# End Group" $(DSPOUT); \ - echo "# Begin Group \"Header Files\"" $(DSPOUT); \ - for file in $(WIN32HEADERS); do \ - echo "# Begin Source File" $(DSPOUT); \ - echo "" $(DSPOUT); \ - echo "SOURCE=.\\"$$file $(DSPOUT); \ - echo "# End Source File" $(DSPOUT); \ - done; \ - echo "# End Group" $(DSPOUT); \ - cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) ) +VCPROJOUT10 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ10) +VCPROJOUT12 = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ12) $(VCPROJ8): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am echo "creating $(VCPROJ8)" @@ -531,6 +513,30 @@ $(VCPROJ9): msvc/vc9proj.head msvc/vc9proj.foot Makefile.am done; \ cat $(srcdir)/msvc/vc9proj.foot $(VCPROJOUT9) ) +$(VCPROJ10): msvc/vc10proj.head msvc/vc10proj.foot Makefile.am + echo "creating $(VCPROJ10)" + @(cp $(srcdir)/msvc/vc10proj.head $(VCPROJ10); \ + for file in $(WIN32SOURCES); do \ + echo "" $(VCPROJOUT10); \ + done; \ + echo "" $(VCPROJOUT10); \ + for file in $(WIN32HEADERS); do \ + echo "" $(VCPROJOUT10); \ + done; \ + cat $(srcdir)/msvc/vc10proj.foot $(VCPROJOUT10) ) + +$(VCPROJ12): msvc/vc12proj.head msvc/vc12proj.foot Makefile.am + echo "creating $(VCPROJ12)" + @(cp $(srcdir)/msvc/vc12proj.head $(VCPROJ12); \ + for file in $(WIN32SOURCES); do \ + echo "" $(VCPROJOUT12); \ + done; \ + echo "" $(VCPROJOUT12); \ + for file in $(WIN32HEADERS); do \ + echo "" $(VCPROJOUT12); \ + done; \ + cat $(srcdir)/msvc/vc12proj.foot $(VCPROJOUT12) ) + $(srcdir)/msvc/spandsp.h: spandsp.h.in echo "creating $(srcdir)/msvc/spandsp.h" @sed -e "s/#define _SPANDSP_H_/#define _SPANDSP_H_\n\n#define __inline__ __inline\n#pragma warning(disable:4200)/" \ diff --git a/libs/spandsp/src/libspandsp.dsp b/libs/spandsp/src/libspandsp.dsp deleted file mode 100644 index d300d3a3cf..0000000000 --- a/libs/spandsp/src/libspandsp.dsp +++ /dev/null @@ -1,967 +0,0 @@ -# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=spandsp - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "spandsp.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "spandsp - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll" - -!ELSEIF "$(CFG)" == "spandsp - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c -# SUBTRACT CPP /WX /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept -# SUBTRACT LINK32 /nodefaultlib - -!ENDIF - -# Begin Target - -# Name "spandsp - Win32 Release" -# Name "spandsp - Win32 Debug" -# Begin Group "Source Files" -# Begin Source File - -SOURCE=.\adsi.c -# End Source File -# Begin Source File - -SOURCE=.\async.c -# End Source File -# Begin Source File - -SOURCE=.\at_interpreter.c -# End Source File -# Begin Source File - -SOURCE=.\awgn.c -# End Source File -# Begin Source File - -SOURCE=.\bell_r2_mf.c -# End Source File -# Begin Source File - -SOURCE=.\bert.c -# End Source File -# Begin Source File - -SOURCE=.\bit_operations.c -# End Source File -# Begin Source File - -SOURCE=.\bitstream.c -# End Source File -# Begin Source File - -SOURCE=.\complex_filters.c -# End Source File -# Begin Source File - -SOURCE=.\complex_vector_float.c -# End Source File -# Begin Source File - -SOURCE=.\complex_vector_int.c -# End Source File -# Begin Source File - -SOURCE=.\crc.c -# End Source File -# Begin Source File - -SOURCE=.\dds_float.c -# End Source File -# Begin Source File - -SOURCE=.\dds_int.c -# End Source File -# Begin Source File - -SOURCE=.\dtmf.c -# End Source File -# Begin Source File - -SOURCE=.\echo.c -# End Source File -# Begin Source File - -SOURCE=.\fax.c -# End Source File -# Begin Source File - -SOURCE=.\fax_modems.c -# End Source File -# Begin Source File - -SOURCE=.\fsk.c -# End Source File -# Begin Source File - -SOURCE=.\g711.c -# End Source File -# Begin Source File - -SOURCE=.\g722.c -# End Source File -# Begin Source File - -SOURCE=.\g726.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_decode.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_encode.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_long_term.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_lpc.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_preprocess.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_rpe.c -# End Source File -# Begin Source File - -SOURCE=.\gsm0610_short_term.c -# End Source File -# Begin Source File - -SOURCE=.\hdlc.c -# End Source File -# Begin Source File - -SOURCE=.\ima_adpcm.c -# End Source File -# Begin Source File - -SOURCE=.\logging.c -# End Source File -# Begin Source File - -SOURCE=.\lpc10_analyse.c -# End Source File -# Begin Source File - -SOURCE=.\lpc10_decode.c -# End Source File -# Begin Source File - -SOURCE=.\lpc10_encode.c -# End Source File -# Begin Source File - -SOURCE=.\lpc10_placev.c -# End Source File -# Begin Source File - -SOURCE=.\lpc10_voicing.c -# End Source File -# Begin Source File - -SOURCE=.\modem_echo.c -# End Source File -# Begin Source File - -SOURCE=.\modem_connect_tones.c -# End Source File -# Begin Source File - -SOURCE=.\noise.c -# End Source File -# Begin Source File - -SOURCE=.\oki_adpcm.c -# End Source File -# Begin Source File - -SOURCE=.\playout.c -# End Source File -# Begin Source File - -SOURCE=.\plc.c -# End Source File -# Begin Source File - -SOURCE=.\power_meter.c -# End Source File -# Begin Source File - -SOURCE=.\queue.c -# End Source File -# Begin Source File - -SOURCE=.\schedule.c -# End Source File -# Begin Source File - -SOURCE=.\sig_tone.c -# End Source File -# Begin Source File - -SOURCE=.\silence_gen.c -# End Source File -# Begin Source File - -SOURCE=.\super_tone_rx.c -# End Source File -# Begin Source File - -SOURCE=.\super_tone_tx.c -# End Source File -# Begin Source File - -SOURCE=.\swept_tone.c -# End Source File -# Begin Source File - -SOURCE=.\t4_rx.c -# End Source File -# Begin Source File - -SOURCE=.\t4_tx.c -# End Source File -# Begin Source File - -SOURCE=.\t30.c -# End Source File -# Begin Source File - -SOURCE=.\t30_api.c -# End Source File -# Begin Source File - -SOURCE=.\t30_logging.c -# End Source File -# Begin Source File - -SOURCE=.\t31.c -# End Source File -# Begin Source File - -SOURCE=.\t35.c -# End Source File -# Begin Source File - -SOURCE=.\t38_core.c -# End Source File -# Begin Source File - -SOURCE=.\t38_gateway.c -# End Source File -# Begin Source File - -SOURCE=.\t38_non_ecm_buffer.c -# End Source File -# Begin Source File - -SOURCE=.\t38_terminal.c -# End Source File -# Begin Source File - -SOURCE=.\testcpuid.c -# End Source File -# Begin Source File - -SOURCE=.\time_scale.c -# End Source File -# Begin Source File - -SOURCE=.\tone_detect.c -# End Source File -# Begin Source File - -SOURCE=.\tone_generate.c -# End Source File -# Begin Source File - -SOURCE=.\v17rx.c -# End Source File -# Begin Source File - -SOURCE=.\v17tx.c -# End Source File -# Begin Source File - -SOURCE=.\v18.c -# End Source File -# Begin Source File - -SOURCE=.\v22bis_rx.c -# End Source File -# Begin Source File - -SOURCE=.\v22bis_tx.c -# End Source File -# Begin Source File - -SOURCE=.\v27ter_rx.c -# End Source File -# Begin Source File - -SOURCE=.\v27ter_tx.c -# End Source File -# Begin Source File - -SOURCE=.\v29rx.c -# End Source File -# Begin Source File - -SOURCE=.\v29tx.c -# End Source File -# Begin Source File - -SOURCE=.\v42.c -# End Source File -# Begin Source File - -SOURCE=.\v42bis.c -# End Source File -# Begin Source File - -SOURCE=.\v8.c -# End Source File -# Begin Source File - -SOURCE=.\vector_float.c -# End Source File -# Begin Source File - -SOURCE=.\vector_int.c -# End Source File -# Begin Source File - -SOURCE=.\.\msvc\gettimeofday.c -# End Source File -# End Group -# Begin Group "Header Files" -# Begin Source File - -SOURCE=.\spandsp/adsi.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/async.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/arctan2.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/at_interpreter.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/awgn.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/bell_r2_mf.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/bert.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/biquad.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/bit_operations.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/bitstream.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/crc.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/complex.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/complex_filters.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/complex_vector_float.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/complex_vector_int.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/dc_restore.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/dds.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/dtmf.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/echo.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/fast_convert.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/fax.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/fax_modems.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/fir.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/fsk.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/g168models.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/g711.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/g722.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/g726.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/gsm0610.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/hdlc.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/ima_adpcm.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/logging.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/lpc10.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/modem_echo.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/modem_connect_tones.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/noise.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/oki_adpcm.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/playout.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/plc.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/power_meter.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/queue.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/saturated.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/schedule.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/sig_tone.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/silence_gen.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/super_tone_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/super_tone_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/swept_tone.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t4_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t4_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t30.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t30_api.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t30_fcf.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t30_logging.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t31.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t35.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t38_core.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t38_gateway.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t38_non_ecm_buffer.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/t38_terminal.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/telephony.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/time_scale.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/timing.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/tone_detect.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/tone_generate.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v17rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v17tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v18.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v22bis.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v27ter_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v27ter_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v29rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v29tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v42.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v42bis.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/v8.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/vector_float.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/vector_int.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/version.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/adsi.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/async.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/at_interpreter.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/awgn.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/bell_r2_mf.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/bert.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/bitstream.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/dtmf.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/echo.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/fax.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/fax_modems.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/fsk.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/g711.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/g722.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/g726.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/gsm0610.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/hdlc.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/ima_adpcm.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/logging.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/lpc10.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/modem_connect_tones.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/modem_echo.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/noise.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/oki_adpcm.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/queue.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/schedule.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/sig_tone.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/silence_gen.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/super_tone_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/super_tone_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/swept_tone.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t30.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t30_dis_dtc_dcs_bits.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t31.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t38_core.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t38_gateway.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t38_non_ecm_buffer.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t38_terminal.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t4_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/t4_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/time_scale.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/tone_detect.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/tone_generate.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v17rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v17tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v18.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v22bis.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v27ter_rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v27ter_tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v29rx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v29tx.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v42.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v42bis.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/private/v8.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp/expose.h -# End Source File -# Begin Source File - -SOURCE=.\spandsp.h -# End Source File -# End Group - -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/libs/spandsp/src/spandsp/private/t30.h b/libs/spandsp/src/spandsp/private/t30.h index 5965a697e6..b0c32d5515 100644 --- a/libs/spandsp/src/spandsp/private/t30.h +++ b/libs/spandsp/src/spandsp/private/t30.h @@ -226,8 +226,6 @@ struct t30_state_s int mutual_bilevel_resolutions; /*! \brief The common group supported colour image resolutions. */ int mutual_colour_resolutions; - /*! \brief The image coding to be used on the line for non-bilevel images. */ - int multilevel_line_encoding; /*! \brief The image coding being used on the line. */ int line_encoding; /*! \brief The image coding being used for output files. */ @@ -238,6 +236,8 @@ struct t30_state_s int x_resolution; /*! \brief The Y direction resolution of the current image, in pixels per metre. */ int y_resolution; + /*! \brief The resolution code for the current page. */ + int current_page_resolution; /*! \brief The width of the current image, in pixels. */ t4_image_width_t image_width; /*! \brief Current number of retries of the action in progress. */ diff --git a/libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h b/libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h index 8402d09470..5d6cf93adb 100644 --- a/libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h +++ b/libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h @@ -228,7 +228,7 @@ #define T30_DCS_BIT_DUPLEX_CAPABLE 67 #define T30_DIS_BIT_T81_CAPABLE 68 -#define T30_DCS_BIT_FULL_COLOUR_MODEX 68 +#define T30_DCS_BIT_T81_MODE 68 #define T30_DIS_BIT_FULL_COLOUR_CAPABLE 69 #define T30_DCS_BIT_FULL_COLOUR_MODE 69 diff --git a/libs/spandsp/src/spandsp/private/t4_tx.h b/libs/spandsp/src/spandsp/private/t4_tx.h index 6f2fd12349..39a21db48e 100644 --- a/libs/spandsp/src/spandsp/private/t4_tx.h +++ b/libs/spandsp/src/spandsp/private/t4_tx.h @@ -98,10 +98,6 @@ struct t4_tx_state_s /*! \brief The type of compression used between the FAX machines. */ int line_encoding; - int line_encoding_bilevel; - int line_encoding_gray; - int line_encoding_colour; - /*! \brief When superfine and fine resolution images need to be squahed vertically to a lower resolution, this value sets the number of source rows which must be squashed to form each row on the wire. */ diff --git a/libs/spandsp/src/spandsp/t4_rx.h b/libs/spandsp/src/spandsp/t4_rx.h index 5ec633e928..803a928a31 100644 --- a/libs/spandsp/src/spandsp/t4_rx.h +++ b/libs/spandsp/src/spandsp/t4_rx.h @@ -352,19 +352,6 @@ typedef struct extern "C" { #endif -/*! Get the logging context associated with a T.4 receive context. - \brief Get the logging context associated with a T.4 receive context. - \param s The T.4 receive context. - \return A pointer to the logging context */ -SPAN_DECLARE(logging_state_t *) t4_rx_get_logging_state(t4_rx_state_t *s); - -/*! \brief Prepare for reception of a document. - \param s The T.4 context. - \param file The name of the file to be received. - \param output_encoding The output encoding. - \return A pointer to the context, or NULL if there was a problem. */ -SPAN_DECLARE(t4_rx_state_t *) t4_rx_init(t4_rx_state_t *s, const char *file, int output_encoding); - /*! \brief Prepare to receive the next page of the current document. \param s The T.4 context. \return zero for success, -1 for failure. */ @@ -388,20 +375,6 @@ SPAN_DECLARE(int) t4_rx_put(t4_rx_state_t *s, const uint8_t buf[], size_t len); \return 0 for success, otherwise -1. */ SPAN_DECLARE(int) t4_rx_end_page(t4_rx_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 - t4_rx_init. - \param s The T.4 receive context. - \return 0 for success, otherwise -1. */ -SPAN_DECLARE(int) t4_rx_release(t4_rx_state_t *s); - -/*! \brief End reception of a document. Tidy up, close the file and - free the context. This should be used to end T.4 reception - started with t4_rx_init. - \param s The T.4 receive context. - \return 0 for success, otherwise -1. */ -SPAN_DECLARE(int) t4_rx_free(t4_rx_state_t *s); - /*! \brief Set the row write handler for a T.4 receive context. \param s The T.4 receive context. \param handler A pointer to the handler routine. @@ -473,6 +446,32 @@ SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding); \return A pointer to the string. */ SPAN_DECLARE(const char *) t4_image_type_to_str(int type); +/*! Get the logging context associated with a T.4 receive context. + \brief Get the logging context associated with a T.4 receive context. + \param s The T.4 receive context. + \return A pointer to the logging context */ +SPAN_DECLARE(logging_state_t *) t4_rx_get_logging_state(t4_rx_state_t *s); + +/*! \brief Prepare for reception of a document. + \param s The T.4 context. + \param file The name of the file to be received. + \param output_encoding The output encoding. + \return A pointer to the context, or NULL if there was a problem. */ +SPAN_DECLARE(t4_rx_state_t *) t4_rx_init(t4_rx_state_t *s, const char *file, int output_encoding); + +/*! \brief End reception of a document. Tidy up and close the file. + This should be used to end T.4 reception started with t4_rx_init. + \param s The T.4 receive context. + \return 0 for success, otherwise -1. */ +SPAN_DECLARE(int) t4_rx_release(t4_rx_state_t *s); + +/*! \brief End reception of a document. Tidy up, close the file and + free the context. This should be used to end T.4 reception + started with t4_rx_init. + \param s The T.4 receive context. + \return 0 for success, otherwise -1. */ +SPAN_DECLARE(int) t4_rx_free(t4_rx_state_t *s); + #if defined(__cplusplus) } #endif diff --git a/libs/spandsp/src/spandsp/t4_tx.h b/libs/spandsp/src/spandsp/t4_tx.h index 8ee19be591..5b1989498d 100644 --- a/libs/spandsp/src/spandsp/t4_tx.h +++ b/libs/spandsp/src/spandsp/t4_tx.h @@ -221,20 +221,6 @@ extern "C" { SPAN_DECLARE(void) TIFF_FX_init(void); #endif -/*! Get the logging context associated with a T.4 transmit context. - \brief Get the logging context associated with a T.4 transmit context. - \param s The T.4 transmit context. - \return A pointer to the logging context */ -SPAN_DECLARE(logging_state_t *) t4_tx_get_logging_state(t4_tx_state_t *s); - -/*! \brief Prepare for transmission of a document. - \param s The T.4 context. - \param file The name of the file to be sent. - \param start_page The first page to send. -1 for no restriction. - \param stop_page The last page to send. -1 for no restriction. - \return A pointer to the context, or NULL if there was a problem. */ -SPAN_DECLARE(t4_tx_state_t *) t4_tx_init(t4_tx_state_t *s, const char *file, int start_page, int stop_page); - /*! \brief Prepare to send the next page of the current document. \param s The T.4 context. \return zero for success, -1 for failure. */ @@ -281,19 +267,6 @@ SPAN_DECLARE(int) t4_tx_get_bit(t4_tx_state_t *s); indicates that the end of the document has been reached. */ SPAN_DECLARE(int) t4_tx_get(t4_tx_state_t *s, uint8_t buf[], size_t max_len); -/*! \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. - \param s The T.4 context. - \return 0 for success, otherwise -1. */ -SPAN_DECLARE(int) t4_tx_release(t4_tx_state_t *s); - -/*! \brief End the transmission of a document. Tidy up, close the file and - free the context. This should be used to end T.4 transmission - started with t4_tx_init. - \param s The T.4 context. - \return 0 for success, otherwise -1. */ -SPAN_DECLARE(int) t4_tx_free(t4_tx_state_t *s); - /*! \brief Set the encoding for the encoded data. \param s The T.4 context. \param encoding The encoding. @@ -389,6 +362,33 @@ SPAN_DECLARE(int) t4_tx_get_current_page_in_file(t4_tx_state_t *s); \param t A pointer to a statistics structure. */ SPAN_DECLARE(void) t4_tx_get_transfer_statistics(t4_tx_state_t *s, t4_stats_t *t); +/*! Get the logging context associated with a T.4 transmit context. + \brief Get the logging context associated with a T.4 transmit context. + \param s The T.4 transmit context. + \return A pointer to the logging context */ +SPAN_DECLARE(logging_state_t *) t4_tx_get_logging_state(t4_tx_state_t *s); + +/*! \brief Prepare for transmission of a document. + \param s The T.4 context. + \param file The name of the file to be sent. + \param start_page The first page to send. -1 for no restriction. + \param stop_page The last page to send. -1 for no restriction. + \return A pointer to the context, or NULL if there was a problem. */ +SPAN_DECLARE(t4_tx_state_t *) t4_tx_init(t4_tx_state_t *s, const char *file, int start_page, int stop_page); + +/*! \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. + \param s The T.4 context. + \return 0 for success, otherwise -1. */ +SPAN_DECLARE(int) t4_tx_release(t4_tx_state_t *s); + +/*! \brief End the transmission of a document. Tidy up, close the file and + free the context. This should be used to end T.4 transmission + started with t4_tx_init. + \param s The T.4 context. + \return 0 for success, otherwise -1. */ +SPAN_DECLARE(int) t4_tx_free(t4_tx_state_t *s); + #if defined(__cplusplus) } #endif diff --git a/libs/spandsp/src/t4_rx.c b/libs/spandsp/src/t4_rx.c index dec06eb1ed..4e0e37a19b 100644 --- a/libs/spandsp/src/t4_rx.c +++ b/libs/spandsp/src/t4_rx.c @@ -149,7 +149,6 @@ static int set_tiff_directory_info(t4_rx_state_t *s) int bits_per_sample; int samples_per_pixel; int photometric; - int image_length; t = &s->tiff; /* Prepare the directory entry fully before writing the image, or libtiff complains */ @@ -276,7 +275,7 @@ static int set_tiff_directory_info(t4_rx_state_t *s) /* TIFF page numbers start from zero, so the number of pages in the file is always one greater than the highest page number in the file. */ s->tiff.pages_in_file = s->current_page + 1; - image_length = 0; + s->image_length = 0; switch (s->line_encoding) { case T4_COMPRESSION_T4_1D: @@ -297,23 +296,23 @@ static int set_tiff_directory_info(t4_rx_state_t *s) } /* Fall through */ case T4_COMPRESSION_T6: - image_length = t4_t6_decode_get_image_length(&s->decoder.t4_t6); + s->image_length = t4_t6_decode_get_image_length(&s->decoder.t4_t6); break; case T4_COMPRESSION_T42_T81: - image_length = t42_decode_get_image_length(&s->decoder.t42); + s->image_length = t42_decode_get_image_length(&s->decoder.t42); break; #if defined(SPANDSP_SUPPORT_T43) case T4_COMPRESSION_T43: - image_length = t43_decode_get_image_length(&s->decoder.t43); + s->image_length = t43_decode_get_image_length(&s->decoder.t43); break; #endif case T4_COMPRESSION_T85: case T4_COMPRESSION_T85_L0: - image_length = t85_decode_get_image_length(&s->decoder.t85); + s->image_length = t85_decode_get_image_length(&s->decoder.t85); break; } - TIFFSetField(t->tiff_file, TIFFTAG_IMAGELENGTH, image_length); - TIFFSetField(t->tiff_file, TIFFTAG_ROWSPERSTRIP, image_length); + TIFFSetField(t->tiff_file, TIFFTAG_IMAGELENGTH, s->image_length); + TIFFSetField(t->tiff_file, TIFFTAG_ROWSPERSTRIP, s->image_length); #if defined(SPANDSP_SUPPORT_TIFF_FX) TIFFSetField(t->tiff_file, TIFFTAG_PROFILETYPE, PROFILETYPE_G3_FAX); TIFFSetField(t->tiff_file, TIFFTAG_FAXPROFILE, FAXPROFILE_S); diff --git a/libs/spandsp/tests/fax_tests.sh b/libs/spandsp/tests/fax_tests.sh index 564cdaa4ba..4e0c078c62 100755 --- a/libs/spandsp/tests/fax_tests.sh +++ b/libs/spandsp/tests/fax_tests.sh @@ -52,10 +52,10 @@ do FILE="${ITUTESTS_DIR}/striped.tif" run_fax_test - FILE="${ITUTESTS_DIR}/mixed_size_pages.tif" run_fax_test + FILE="${ITUTESTS_DIR}/bilevel_R8_385_A4.tif" run_fax_test diff --git a/libs/spandsp/tests/t4_tests.c b/libs/spandsp/tests/t4_tests.c index 2c867e6d16..d31fc4d631 100644 --- a/libs/spandsp/tests/t4_tests.c +++ b/libs/spandsp/tests/t4_tests.c @@ -285,15 +285,15 @@ int main(int argc, char *argv[]) T4_COMPRESSION_T4_1D, T4_COMPRESSION_T4_2D, T4_COMPRESSION_T6, + T4_COMPRESSION_T85, + T4_COMPRESSION_T85_L0, #if defined(SPANDSP_SUPPORT_T42x) - T4_COMPRESSION_T42, - T4_COMPRESSION_SYCC_T42, + T4_COMPRESSION_T42_T81, + T4_COMPRESSION_SYCC_T81, #endif #if defined(SPANDSP_SUPPORT_T43x) T4_COMPRESSION_T43, #endif - T4_COMPRESSION_T85, - T4_COMPRESSION_T85_L0, //T4_COMPRESSION_T45, -1 }; @@ -366,10 +366,15 @@ int main(int argc, char *argv[]) compression = T4_COMPRESSION_T6; compression_step = -1; } -#if defined(SPANDSP_SUPPORT_T42) - else if (strcmp(optarg, "T42") == 0) + else if (strcmp(optarg, "T85") == 0) { - compression = T4_COMPRESSION_T42; + compression = T4_COMPRESSION_T85; + compression_step = -1; + } +#if defined(SPANDSP_SUPPORT_T42) + else if (strcmp(optarg, "T81") == 0) + { + compression = T4_COMPRESSION_T42_T81; compression_step = -1; } #endif @@ -380,11 +385,6 @@ int main(int argc, char *argv[]) compression_step = -1; } #endif - else if (strcmp(optarg, "T85") == 0) - { - compression = T4_COMPRESSION_T85; - compression_step = -1; - } break; case 'd': decode_file_name = optarg;