Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9eab201f
提交
9eab201f
authored
4月 11, 2013
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More steps towards colour FAX
上级
fe4dff7c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
490 行增加
和
363 行删除
+490
-363
t30.h
libs/spandsp/src/spandsp/private/t30.h
+4
-2
t30_dis_dtc_dcs_bits.h
libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h
+10
-2
t4_tx.h
libs/spandsp/src/spandsp/private/t4_tx.h
+4
-0
t4_rx.h
libs/spandsp/src/spandsp/t4_rx.h
+32
-26
t4_tx.h
libs/spandsp/src/spandsp/t4_tx.h
+10
-0
t30.c
libs/spandsp/src/t30.c
+230
-175
t30_api.c
libs/spandsp/src/t30_api.c
+4
-1
t4_rx.c
libs/spandsp/src/t4_rx.c
+97
-55
t4_tx.c
libs/spandsp/src/t4_tx.c
+99
-102
没有找到文件。
libs/spandsp/src/spandsp/private/t30.h
浏览文件 @
9eab201f
...
...
@@ -222,10 +222,12 @@ struct t30_state_s
int
local_interrupt_pending
;
/*! \brief The common ground in compression schemes between the local and far ends. */
int
mutual_compressions
;
/*! \brief The common group supported bi-level image resolutions. */
/*! \brief The common group
of
supported bi-level image resolutions. */
int
mutual_bilevel_resolutions
;
/*! \brief The common group supported colour image resolutions. */
/*! \brief The common group
of
supported colour image resolutions. */
int
mutual_colour_resolutions
;
/*! \brief The common group of supported image sizes. */
int
mutual_image_sizes
;
/*! \brief The image coding being used on the line. */
int
line_encoding
;
/*! \brief The image coding being used for output files. */
...
...
libs/spandsp/src/spandsp/private/t30_dis_dtc_dcs_bits.h
浏览文件 @
9eab201f
...
...
@@ -80,9 +80,17 @@
/* Standard facsimile terminals conforming to ITU-T Rec. T.4 must have the following capability:
Paper length = 297 mm. */
/* Bits 17, 18 - recording width */
#define T30_DIS_BIT_215MM_255MM_WIDTH_CAPABLE 17
#define T30_DCS_BIT_255MM_WIDTH 17
/* Bits 19, 20 - paper length */
#define T30_DIS_BIT_215MM_255MM_303MM_WIDTH_CAPABLE 18
#define T30_DCS_BIT_303MM_WIDTH 18
#define T30_DIS_BIT_A4_B4_LENGTH_CAPABLE 19
#define T30_DCS_BIT_B4_LENGTH 19
#define T30_DIS_BIT_UNLIMITED_LENGTH_CAPABLE 20
#define T30_DCS_BIT_UNLIMITED_LENGTH 20
/* Bits 21, 22, 23 - min scan line time */
...
...
libs/spandsp/src/spandsp/private/t4_tx.h
浏览文件 @
9eab201f
...
...
@@ -82,6 +82,10 @@ typedef struct
int
x_resolution
;
/*! \brief Row-to-row (Y) resolution in pixels per metre on the wire. */
int
y_resolution
;
/*! \brief Code for the combined X and Y resolution of the image in the file. */
int
resolution_code
;
/*! \brief Image type - bi-level, gray, colour, etc. */
int
image_type
;
}
t4_tx_metadata_t
;
/*!
...
...
libs/spandsp/src/spandsp/t4_rx.h
浏览文件 @
9eab201f
...
...
@@ -98,11 +98,11 @@ enum
T30_SUPPORT_COMPRESSION_GRAYSCALE
=
0x1000000
,
/*! Colour support by multi-level codecs */
T30_SUPPORT_COMPRESSION_COLOUR
=
0x2000000
,
/*! 12 bit mode for gray
scale and colour */
/*! 12 bit mode for gray
-
scale and colour */
T30_SUPPORT_COMPRESSION_12BIT
=
0x4000000
,
/*! Convert a colour image to a gray-scale one */
T30_SUPPORT_COMPRESSION_COLOUR_TO_GRAY
=
0x8000000
,
/*! Dither a gray
scale image down a simple bilevel image, with rescaling to fit a FAX page */
/*! Dither a gray
-
scale image down a simple bilevel image, with rescaling to fit a FAX page */
T30_SUPPORT_GRAY_TO_BILEVEL
=
0x10000000
,
/*! Dither a colour image down a simple bilevel image, with rescaling to fit a FAX page */
T30_SUPPORT_COLOUR_TO_BILEVEL
=
0x20000000
,
...
...
@@ -141,7 +141,7 @@ typedef enum
T4_X_RESOLUTION_200
=
7874
,
T4_X_RESOLUTION_R8
=
8031
,
T4_X_RESOLUTION_300
=
11811
,
T4_X_RESOLUTION_400
=
157
84
,
T4_X_RESOLUTION_400
=
157
48
,
T4_X_RESOLUTION_R16
=
16063
,
T4_X_RESOLUTION_600
=
23622
,
T4_X_RESOLUTION_800
=
31496
,
...
...
@@ -176,27 +176,27 @@ enum
/*! Double FAX resolution 408dpi x 391dpi - bi-level only */
T4_RESOLUTION_R16_SUPERFINE
=
4
,
/*! 100dpi x 100
dpi - gray-scale and colour only */
/*! 100dpi x 100dpi - gray-scale and colour only */
T4_RESOLUTION_100_100
=
5
,
/*! 200dpi x 100
dpi - bi-level only */
/*! 200dpi x 100dpi - bi-level only */
T4_RESOLUTION_200_100
=
6
,
/*! 200dpi x 200
dpi */
/*! 200dpi x 200dpi */
T4_RESOLUTION_200_200
=
7
,
/*! 200dpi x 400
dpi - bi-level only */
/*! 200dpi x 400dpi - bi-level only */
T4_RESOLUTION_200_400
=
8
,
/*! 300dpi x 300
dpi */
/*! 300dpi x 300dpi */
T4_RESOLUTION_300_300
=
9
,
/*! 300dpi x 600
dpi - bi-level only */
/*! 300dpi x 600dpi - bi-level only */
T4_RESOLUTION_300_600
=
10
,
/*! 400dpi x 400
dpi */
/*! 400dpi x 400dpi */
T4_RESOLUTION_400_400
=
11
,
/*! 400dpi x 800
dpi - bi-level only */
/*! 400dpi x 800dpi - bi-level only */
T4_RESOLUTION_400_800
=
12
,
/*! 600dpi x 600
dpi */
/*! 600dpi x 600dpi */
T4_RESOLUTION_600_600
=
13
,
/*! 600dpi x 1200
dpi - bi-level only */
/*! 600dpi x 1200dpi - bi-level only */
T4_RESOLUTION_600_1200
=
14
,
/*! 1200dpi x 1200
dpi */
/*! 1200dpi x 1200dpi */
T4_RESOLUTION_1200_1200
=
15
};
...
...
@@ -211,27 +211,27 @@ enum
/*! Support double FAX resolution 408dpi x 391dpi - bi-level only */
T4_SUPPORT_RESOLUTION_R16_SUPERFINE
=
0x8
,
/*! Support 100dpi x 100
dpi - gray
scale and colour only */
/*! Support 100dpi x 100
dpi - gray-
scale and colour only */
T4_SUPPORT_RESOLUTION_100_100
=
0x10
,
/*! Support 200dpi x 100
dpi - bi-level only */
/*! Support 200dpi x 100dpi - bi-level only */
T4_SUPPORT_RESOLUTION_200_100
=
0x20
,
/*! Support 200dpi x 200
dpi */
/*! Support 200dpi x 200dpi */
T4_SUPPORT_RESOLUTION_200_200
=
0x40
,
/*! Support 200dpi x 400
dpi - bi-level only */
/*! Support 200dpi x 400dpi - bi-level only */
T4_SUPPORT_RESOLUTION_200_400
=
0x80
,
/*! Support 300dpi x 300
dpi */
/*! Support 300dpi x 300dpi */
T4_SUPPORT_RESOLUTION_300_300
=
0x100
,
/*! Support 300dpi x 600
dpi - bi-level only */
/*! Support 300dpi x 600dpi - bi-level only */
T4_SUPPORT_RESOLUTION_300_600
=
0x200
,
/*! Support 400dpi x 400
dpi */
/*! Support 400dpi x 400dpi */
T4_SUPPORT_RESOLUTION_400_400
=
0x400
,
/*! Support 400dpi x 800
dpi - bi-level only */
/*! Support 400dpi x 800dpi - bi-level only */
T4_SUPPORT_RESOLUTION_400_800
=
0x800
,
/*! Support 600dpi x 600
dpi */
/*! Support 600dpi x 600dpi */
T4_SUPPORT_RESOLUTION_600_600
=
0x1000
,
/*! Support 600dpi x 1200
dpi - bi-level only */
/*! Support 600dpi x 1200dpi - bi-level only */
T4_SUPPORT_RESOLUTION_600_1200
=
0x2000
,
/*! Support 1200dpi x 1200
dpi */
/*! Support 1200dpi x 1200dpi */
T4_SUPPORT_RESOLUTION_1200_1200
=
0x4000
};
...
...
@@ -542,10 +542,16 @@ SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding);
/*! Get the short text name of an image format.
\brief Get the short text name of an image format.
\param
encoding
The image format.
\param
type
The image format.
\return A pointer to the string. */
SPAN_DECLARE
(
const
char
*
)
t4_image_type_to_str
(
int
type
);
/*! Get the short text name of an image resolution.
\brief Get the short text name of an image resolution.
\param resolution_code The image resolution code.
\return A pointer to the string. */
SPAN_DECLARE
(
const
char
*
)
t4_image_resolution_to_str
(
int
resolution_code
);
/*! 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.
...
...
libs/spandsp/src/spandsp/t4_tx.h
浏览文件 @
9eab201f
...
...
@@ -341,11 +341,21 @@ SPAN_DECLARE(int) t4_tx_get_y_resolution(t4_tx_state_t *s);
\return The resolution, in pixels per metre. */
SPAN_DECLARE
(
int
)
t4_tx_get_x_resolution
(
t4_tx_state_t
*
s
);
/*! \brief Get the X and Y resolution code of the current page.
\param s The T.4 context.
\return The resolution code,. */
SPAN_DECLARE
(
int
)
t4_tx_get_resolution
(
t4_tx_state_t
*
s
);
/*! \brief Get the width of the current page, in pixel columns.
\param s The T.4 context.
\return The number of columns. */
SPAN_DECLARE
(
int
)
t4_tx_get_image_width
(
t4_tx_state_t
*
s
);
/*! \brief Get the type of the current page, in pixel columns.
\param s The T.4 context.
\return The type. */
SPAN_DECLARE
(
int
)
t4_tx_get_image_type
(
t4_tx_state_t
*
s
);
/*! \brief Get the number of pages in the file.
\param s The T.4 context.
\return The number of pages, or -1 if there is an error. */
...
...
libs/spandsp/src/t30.c
浏览文件 @
9eab201f
差异被折叠。
点击展开。
libs/spandsp/src/t30_api.c
浏览文件 @
9eab201f
...
...
@@ -754,7 +754,10 @@ SPAN_DECLARE(int) t30_set_supported_colour_resolutions(t30_state_t *s, int suppo
SPAN_DECLARE
(
int
)
t30_set_supported_image_sizes
(
t30_state_t
*
s
,
int
supported_image_sizes
)
{
s
->
supported_image_sizes
=
supported_image_sizes
;
/* Force the sizes which are always available */
s
->
supported_image_sizes
=
supported_image_sizes
|
T4_SUPPORT_WIDTH_215MM
|
T4_SUPPORT_LENGTH_A4
;
t30_build_dis_or_dtc
(
s
);
return
0
;
}
...
...
libs/spandsp/src/t4_rx.c
浏览文件 @
9eab201f
差异被折叠。
点击展开。
libs/spandsp/src/t4_tx.c
浏览文件 @
9eab201f
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论