Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
348e9ba1
提交
348e9ba1
authored
10月 15, 2013
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Eliminate a few more warnings in Windows builds
上级
15ca745c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
20 行增加
和
26 行删除
+20
-26
make_cielab_luts.c
libs/spandsp/src/make_cielab_luts.c
+1
-1
make_math_fixed_tables.c
libs/spandsp/src/make_math_fixed_tables.c
+5
-5
t38_gateway.c
libs/spandsp/src/t38_gateway.c
+11
-15
t43.c
libs/spandsp/src/t43.c
+1
-0
t4_rx.c
libs/spandsp/src/t4_rx.c
+1
-0
t4_tx.c
libs/spandsp/src/t4_tx.c
+1
-5
没有找到文件。
libs/spandsp/src/make_cielab_luts.c
浏览文件 @
348e9ba1
...
...
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
r
=
floorf
(
r
*
256
.
0
f
);
srgb
=
(
r
<
0
)
?
0
:
(
r
<=
255
)
?
r
:
255
;
srgb
=
(
uint8_t
)
((
r
<
0
)
?
0
:
(
r
<=
255
)
?
r
:
255
)
;
printf
((
i
<
4095
)
?
" %d,
\n
"
:
" %d
\n
"
,
srgb
);
}
...
...
libs/spandsp/src/make_math_fixed_tables.c
浏览文件 @
348e9ba1
...
...
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
for
(
i
=
0
;
i
<
129
;
i
++
)
{
val
=
32768
.
0
*
128
.
0
/
(
128
+
i
)
+
0
.
5
;
ival
=
val
;
ival
=
(
int
)
val
;
if
(
i
<
128
)
printf
(
" %6d,
\n
"
,
ival
);
else
...
...
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
printf
(
"{
\n
"
);
for
(
i
=
64
;
i
<=
256
;
i
++
)
{
ival
=
sqrt
(
i
/
256
.
0
)
*
65536
.
0
+
0
.
5
;
ival
=
(
int
)
(
sqrt
(
i
/
256
.
0
)
*
65536
.
0
+
0
.
5
)
;
if
(
ival
>
65535
)
ival
=
65535
;
if
(
i
<
256
)
...
...
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
printf
(
"{
\n
"
);
for
(
i
=
128
;
i
<=
256
;
i
++
)
{
ival
=
log10
(
i
/
256
.
0
)
*
32768
.
0
-
0
.
5
;
ival
=
(
int
)
(
log10
(
i
/
256
.
0
)
*
32768
.
0
-
0
.
5
)
;
if
(
i
<=
255
)
printf
(
" %6d,
\n
"
,
ival
);
else
...
...
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
for
(
i
=
0
;
i
<=
256
;
i
++
)
{
val
=
sin
(
i
*
3
.
1415926535
/
512
.
0
)
*
32768
.
0
;
ival
=
val
+
0
.
5
;
ival
=
(
int
)
(
val
+
0
.
5
)
;
if
(
ival
>
32767
)
ival
=
32767
;
if
(
i
<=
255
)
...
...
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
for
(
i
=
0
;
i
<=
256
;
i
++
)
{
val
=
atan
(
i
/
256
.
0
)
*
65536
.
0
/
(
2
.
0
*
3
.
1415926535
);
ival
=
val
+
0
.
5
;
ival
=
(
int
)
(
val
+
0
.
5
)
;
/* Nudge the result away from zero, so things sit consistently on
the correct side of the axes. */
if
(
ival
==
0
)
...
...
libs/spandsp/src/t38_gateway.c
浏览文件 @
348e9ba1
...
...
@@ -258,7 +258,6 @@ static int set_next_tx_type(t38_gateway_state_t *s)
int
indicator
;
fax_modems_state_t
*
t
;
t38_gateway_hdlc_state_t
*
u
;
int
bit_rate
;
int
short_train
;
int
use_hdlc
;
...
...
@@ -348,20 +347,18 @@ static int set_next_tx_type(t38_gateway_state_t *s)
break
;
case
T38_IND_V27TER_2400_TRAINING
:
case
T38_IND_V27TER_4800_TRAINING
:
bit_rate
=
t
->
tx_bit_rate
=
(
indicator
==
T38_IND_V27TER_4800_TRAINING
)
?
4800
:
2400
;
silence_gen_alter
(
&
t
->
silence_gen
,
ms_to_samples
(
75
));
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V27TER_TX
,
bit_rate
,
s
->
core
.
short_train
,
use_hdlc
);
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V27TER_TX
,
t
->
tx_
bit_rate
,
s
->
core
.
short_train
,
use_hdlc
);
fax_modems_set_tx_handler
(
t
,
(
span_tx_handler_t
)
&
silence_gen
,
&
t
->
silence_gen
);
fax_modems_set_next_tx_handler
(
t
,
(
span_tx_handler_t
)
&
v27ter_tx
,
&
t
->
fast_modems
.
v27ter_tx
);
fax_modems_set_rx_active
(
t
,
true
);
break
;
case
T38_IND_V29_7200_TRAINING
:
case
T38_IND_V29_9600_TRAINING
:
bit_rate
=
t
->
tx_bit_rate
=
(
indicator
==
T38_IND_V29_9600_TRAINING
)
?
9600
:
7200
;
silence_gen_alter
(
&
t
->
silence_gen
,
ms_to_samples
(
75
));
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V29_TX
,
bit_rate
,
s
->
core
.
short_train
,
use_hdlc
);
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V29_TX
,
t
->
tx_
bit_rate
,
s
->
core
.
short_train
,
use_hdlc
);
fax_modems_set_tx_handler
(
t
,
(
span_tx_handler_t
)
&
silence_gen
,
&
t
->
silence_gen
);
fax_modems_set_next_tx_handler
(
t
,
(
span_tx_handler_t
)
&
v29_tx
,
&
t
->
fast_modems
.
v29_tx
);
fax_modems_set_rx_active
(
t
,
true
);
...
...
@@ -379,37 +376,36 @@ static int set_next_tx_type(t38_gateway_state_t *s)
{
case
T38_IND_V17_7200_SHORT_TRAINING
:
short_train
=
true
;
bit_rate
=
7200
;
t
->
tx_
bit_rate
=
7200
;
break
;
case
T38_IND_V17_7200_LONG_TRAINING
:
bit_rate
=
7200
;
t
->
tx_
bit_rate
=
7200
;
break
;
case
T38_IND_V17_9600_SHORT_TRAINING
:
short_train
=
true
;
bit_rate
=
9600
;
t
->
tx_
bit_rate
=
9600
;
break
;
case
T38_IND_V17_9600_LONG_TRAINING
:
bit_rate
=
9600
;
t
->
tx_
bit_rate
=
9600
;
break
;
case
T38_IND_V17_12000_SHORT_TRAINING
:
short_train
=
true
;
bit_rate
=
12000
;
t
->
tx_
bit_rate
=
12000
;
break
;
case
T38_IND_V17_12000_LONG_TRAINING
:
bit_rate
=
12000
;
t
->
tx_
bit_rate
=
12000
;
break
;
case
T38_IND_V17_14400_SHORT_TRAINING
:
short_train
=
true
;
bit_rate
=
14400
;
t
->
tx_
bit_rate
=
14400
;
break
;
case
T38_IND_V17_14400_LONG_TRAINING
:
bit_rate
=
14400
;
t
->
tx_
bit_rate
=
14400
;
break
;
}
/*endswitch*/
t
->
tx_bit_rate
=
bit_rate
;
silence_gen_alter
(
&
t
->
silence_gen
,
ms_to_samples
(
75
));
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V17_TX
,
bit_rate
,
short_train
,
use_hdlc
);
fax_modems_start_fast_modem
(
t
,
FAX_MODEM_V17_TX
,
t
->
tx_
bit_rate
,
short_train
,
use_hdlc
);
fax_modems_set_tx_handler
(
t
,
(
span_tx_handler_t
)
&
silence_gen
,
&
t
->
silence_gen
);
fax_modems_set_next_tx_handler
(
t
,
(
span_tx_handler_t
)
&
v17_tx
,
&
t
->
fast_modems
.
v17_tx
);
fax_modems_set_rx_active
(
t
,
true
);
...
...
libs/spandsp/src/t43.c
浏览文件 @
348e9ba1
...
...
@@ -763,6 +763,7 @@ SPAN_DECLARE(int) t43_decode_put(t43_decode_state_t *s, const uint8_t data[], si
/* Now deal the bit-planes, one after another. */
total_len
=
0
;
result
=
0
;
while
(
s
->
current_bit_plane
<
s
->
t85
.
bit_planes
)
{
j
=
s
->
current_bit_plane
;
...
...
libs/spandsp/src/t4_rx.c
浏览文件 @
348e9ba1
...
...
@@ -219,6 +219,7 @@ static int set_tiff_directory_info(t4_rx_state_t *s)
bits_per_sample
=
1
;
samples_per_pixel
=
1
;
photometric
=
PHOTOMETRIC_MINISWHITE
;
output_t4_options
=
0
;
switch
(
t
->
compression
)
{
case
T4_COMPRESSION_T4_1D
:
...
...
libs/spandsp/src/t4_tx.c
浏览文件 @
348e9ba1
...
...
@@ -762,10 +762,7 @@ static int tiff_row_read_handler(void *user_data, uint8_t buf[], size_t len)
if
(
s
->
tiff
.
row
>=
s
->
tiff
.
image_length
)
return
0
;
if
(
s
->
tiff
.
image_buffer
==
NULL
)
{
exit
(
2
);
return
0
;
}
memcpy
(
buf
,
&
s
->
tiff
.
image_buffer
[
s
->
tiff
.
row
*
len
],
len
);
s
->
tiff
.
row
++
;
...
...
@@ -1158,7 +1155,6 @@ static int read_tiff_image(t4_tx_state_t *s)
{
int
total_len
;
int
i
;
int
len
;
int
alter_image
;
uint8_t
*
t
;
...
...
@@ -1204,7 +1200,7 @@ static int read_tiff_image(t4_tx_state_t *s)
{
if
(
alter_image
)
{
if
(
(
len
=
read_tiff_t43_image
(
s
)
)
<
0
)
if
(
read_tiff_t43_image
(
s
)
<
0
)
return
-
1
;
s
->
pack_buf
=
s
->
tiff
.
image_buffer
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论