Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d3dbde63
提交
d3dbde63
authored
4月 04, 2013
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More moves towards colour FAX
上级
931c633e
全部展开
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
105 行增加
和
1072 行删除
+105
-1072
Makefile.am
libs/spandsp/src/Makefile.am
+30
-24
libspandsp.dsp
libs/spandsp/src/libspandsp.dsp
+0
-967
t30.h
libs/spandsp/src/spandsp/private/t30.h
+2
-2
t30_dis_dtc_dcs_bits.h
libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h
+1
-1
t4_tx.h
libs/spandsp/src/spandsp/private/t4_tx.h
+0
-4
t4_rx.h
libs/spandsp/src/spandsp/t4_rx.h
+26
-27
t4_tx.h
libs/spandsp/src/spandsp/t4_tx.h
+27
-27
t4_rx.c
libs/spandsp/src/t4_rx.c
+7
-8
fax_tests.sh
libs/spandsp/tests/fax_tests.sh
+1
-1
t4_tests.c
libs/spandsp/tests/t4_tests.c
+11
-11
没有找到文件。
libs/spandsp/src/Makefile.am
浏览文件 @
d3dbde63
...
...
@@ -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
"<File RelativePath=
\"
"
$$
file
"
\"
></File>"
$(VCPROJOUT10)
;
\
done
;
\
echo
"</Filter><Filter Name=
\"
Header Files
\"
>"
$(VCPROJOUT10)
;
\
for
file
in
$(WIN32HEADERS)
;
do
\
echo
"<File RelativePath=
\"
"
$$
file
"
\"
></File>"
$(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
"<File RelativePath=
\"
"
$$
file
"
\"
></File>"
$(VCPROJOUT12)
;
\
done
;
\
echo
"</Filter><Filter Name=
\"
Header Files
\"
>"
$(VCPROJOUT12)
;
\
for
file
in
$(WIN32HEADERS)
;
do
\
echo
"<File RelativePath=
\"
"
$$
file
"
\"
></File>"
$(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)/"
\
...
...
libs/spandsp/src/libspandsp.dsp
deleted
100644 → 0
浏览文件 @
931c633e
差异被折叠。
点击展开。
libs/spandsp/src/spandsp/private/t30.h
浏览文件 @
d3dbde63
...
...
@@ -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. */
...
...
libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h
浏览文件 @
d3dbde63
...
...
@@ -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
...
...
libs/spandsp/src/spandsp/private/t4_tx.h
浏览文件 @
d3dbde63
...
...
@@ -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. */
...
...
libs/spandsp/src/spandsp/t4_rx.h
浏览文件 @
d3dbde63
...
...
@@ -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
...
...
libs/spandsp/src/spandsp/t4_tx.h
浏览文件 @
d3dbde63
...
...
@@ -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
...
...
libs/spandsp/src/t4_rx.c
浏览文件 @
d3dbde63
...
...
@@ -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
);
...
...
libs/spandsp/tests/fax_tests.sh
浏览文件 @
d3dbde63
...
...
@@ -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
...
...
libs/spandsp/tests/t4_tests.c
浏览文件 @
d3dbde63
...
...
@@ -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_T
42
,
T4_COMPRESSION_T42
_T81
,
T4_COMPRESSION_SYCC_T
81
,
#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
;
}
else
if
(
strcmp
(
optarg
,
"T85"
)
==
0
)
{
compression
=
T4_COMPRESSION_T85
;
compression_step
=
-
1
;
}
#if defined(SPANDSP_SUPPORT_T42)
else
if
(
strcmp
(
optarg
,
"T
42
"
)
==
0
)
else
if
(
strcmp
(
optarg
,
"T
81
"
)
==
0
)
{
compression
=
T4_COMPRESSION_T42
;
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
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论