Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9464549e
提交
9464549e
authored
5月 06, 2014
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Corrected data type for TIFF directory offsets
上级
d6fe1097
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
17 行删除
+17
-17
t4_rx.c
libs/spandsp/src/t4_rx.c
+4
-4
t4_tx.c
libs/spandsp/src/t4_tx.c
+1
-1
t43_tests.c
libs/spandsp/tests/t43_tests.c
+12
-12
没有找到文件。
libs/spandsp/src/t4_rx.c
浏览文件 @
9464549e
...
@@ -616,7 +616,7 @@ static int write_tiff_image(t4_rx_state_t *s)
...
@@ -616,7 +616,7 @@ static int write_tiff_image(t4_rx_state_t *s)
{
{
t4_rx_tiff_state_t
*
t
;
t4_rx_tiff_state_t
*
t
;
#if defined(SPANDSP_SUPPORT_TIFF_FX)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
uint64_t
offset
;
toff_t
diroff
;
#endif
#endif
t
=
&
s
->
tiff
;
t
=
&
s
->
tiff
;
...
@@ -686,14 +686,14 @@ static int write_tiff_image(t4_rx_state_t *s)
...
@@ -686,14 +686,14 @@ static int write_tiff_image(t4_rx_state_t *s)
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_MODENUMBER
,
3
);
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_MODENUMBER
,
3
);
offset
=
0
;
diroff
=
0
;
if
(
!
TIFFWriteCustomDirectory
(
t
->
tiff_file
,
&
offset
))
if
(
!
TIFFWriteCustomDirectory
(
t
->
tiff_file
,
&
diroff
))
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to write custom directory.
\n
"
);
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to write custom directory.
\n
"
);
/* Now go back and patch in the pointer to the new IFD */
/* Now go back and patch in the pointer to the new IFD */
if
(
!
TIFFSetDirectory
(
t
->
tiff_file
,
s
->
current_page
))
if
(
!
TIFFSetDirectory
(
t
->
tiff_file
,
s
->
current_page
))
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to set directory.
\n
"
);
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to set directory.
\n
"
);
if
(
!
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_GLOBALPARAMETERSIFD
,
offset
))
if
(
!
TIFFSetField
(
t
->
tiff_file
,
TIFFTAG_GLOBALPARAMETERSIFD
,
diroff
))
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to set field.
\n
"
);
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"Failed to set field.
\n
"
);
if
(
!
TIFFWriteDirectory
(
t
->
tiff_file
))
if
(
!
TIFFWriteDirectory
(
t
->
tiff_file
))
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"%s: Failed to write directory for page %d.
\n
"
,
t
->
file
,
s
->
current_page
);
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"%s: Failed to write directory for page %d.
\n
"
,
t
->
file
,
s
->
current_page
);
...
...
libs/spandsp/src/t4_tx.c
浏览文件 @
9464549e
...
@@ -409,7 +409,7 @@ static int get_tiff_directory_info(t4_tx_state_t *s)
...
@@ -409,7 +409,7 @@ static int get_tiff_directory_info(t4_tx_state_t *s)
char
*
u
;
char
*
u
;
char
uu
[
10
];
char
uu
[
10
];
float
*
fl_parms
;
float
*
fl_parms
;
uint64
_t
diroff
;
toff
_t
diroff
;
float
lmin
;
float
lmin
;
float
lmax
;
float
lmax
;
float
amin
;
float
amin
;
...
...
libs/spandsp/tests/t43_tests.c
浏览文件 @
9464549e
...
@@ -185,7 +185,7 @@ int write_file(meta_t *meta, int page, const uint8_t buf[])
...
@@ -185,7 +185,7 @@ int write_file(meta_t *meta, int page, const uint8_t buf[])
uint8_t
*
out_buf2
;
uint8_t
*
out_buf2
;
packer_t
packer
;
packer_t
packer
;
#if defined(SPANDSP_SUPPORT_TIFF_FX)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
uint64_t
offset
;
toff_t
diroff
;
#endif
#endif
tif
=
meta
->
tif
;
tif
=
meta
->
tif
;
...
@@ -319,13 +319,13 @@ int write_file(meta_t *meta, int page, const uint8_t buf[])
...
@@ -319,13 +319,13 @@ int write_file(meta_t *meta, int page, const uint8_t buf[])
TIFFSetField
(
tif
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
tif
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
tif
,
TIFFTAG_MODENUMBER
,
3
);
TIFFSetField
(
tif
,
TIFFTAG_MODENUMBER
,
3
);
offset
=
0
;
diroff
=
0
;
if
(
!
TIFFWriteCustomDirectory
(
tif
,
&
offset
))
if
(
!
TIFFWriteCustomDirectory
(
tif
,
&
diroff
))
printf
(
"Failed to write custom directory.
\n
"
);
printf
(
"Failed to write custom directory.
\n
"
);
if
(
!
TIFFSetDirectory
(
tif
,
(
tdir_t
)
page
))
if
(
!
TIFFSetDirectory
(
tif
,
(
tdir_t
)
page
))
printf
(
"Failed to set directory.
\n
"
);
printf
(
"Failed to set directory.
\n
"
);
if
(
!
TIFFSetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
offset
))
if
(
!
TIFFSetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
diroff
))
printf
(
"Failed to set global parameters IFD.
\n
"
);
printf
(
"Failed to set global parameters IFD.
\n
"
);
if
(
!
TIFFWriteDirectory
(
tif
))
if
(
!
TIFFWriteDirectory
(
tif
))
printf
(
"Failed to write directory.
\n
"
);
printf
(
"Failed to write directory.
\n
"
);
...
@@ -354,7 +354,7 @@ int read_file(meta_t *meta, int page)
...
@@ -354,7 +354,7 @@ int read_file(meta_t *meta, int page)
float
*
fl_parms
;
float
*
fl_parms
;
char
uu
[
10
];
char
uu
[
10
];
char
*
u
;
char
*
u
;
uint64_t
offset
;
toff_t
diroff
;
#endif
#endif
TIFF
*
tif
;
TIFF
*
tif
;
uint16_t
*
map_L
;
uint16_t
*
map_L
;
...
@@ -434,10 +434,10 @@ int read_file(meta_t *meta, int page)
...
@@ -434,10 +434,10 @@ int read_file(meta_t *meta, int page)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
printf
(
"Trying to get global parameters
\n
"
);
printf
(
"Trying to get global parameters
\n
"
);
if
(
TIFFGetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
&
offset
))
if
(
TIFFGetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
&
diroff
))
{
{
printf
(
"Got global parameters - %"
PRIu64
"
\n
"
,
offset
);
printf
(
"Got global parameters - %"
PRIu64
"
\n
"
,
(
uint64_t
)
diroff
);
if
(
!
TIFFReadCustomDirectory
(
tif
,
offset
,
&
tiff_fx_field_array
))
if
(
!
TIFFReadCustomDirectory
(
tif
,
diroff
,
&
tiff_fx_field_array
))
{
{
printf
(
"Failed to set global parameters IFD.
\n
"
);
printf
(
"Failed to set global parameters IFD.
\n
"
);
}
}
...
@@ -893,7 +893,7 @@ int main(int argc, char *argv[])
...
@@ -893,7 +893,7 @@ int main(int argc, char *argv[])
int
output_compression
;
int
output_compression
;
int
page_no
;
int
page_no
;
#if defined(SPANDSP_SUPPORT_TIFF_FX)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
uint64_t
offset
;
toff_t
diroff
;
#endif
#endif
source_file
=
(
argc
>
1
)
?
argv
[
1
]
:
IN_FILE_NAME
;
source_file
=
(
argc
>
1
)
?
argv
[
1
]
:
IN_FILE_NAME
;
...
@@ -1385,13 +1385,13 @@ int main(int argc, char *argv[])
...
@@ -1385,13 +1385,13 @@ int main(int argc, char *argv[])
TIFFSetField
(
tif
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
tif
,
TIFFTAG_VERSIONYEAR
,
"1998"
);
TIFFSetField
(
tif
,
TIFFTAG_MODENUMBER
,
3
);
TIFFSetField
(
tif
,
TIFFTAG_MODENUMBER
,
3
);
offset
=
0
;
diroff
=
0
;
if
(
!
TIFFWriteCustomDirectory
(
tif
,
&
offset
))
if
(
!
TIFFWriteCustomDirectory
(
tif
,
&
diroff
))
printf
(
"Failed to write custom directory.
\n
"
);
printf
(
"Failed to write custom directory.
\n
"
);
if
(
!
TIFFSetDirectory
(
tif
,
(
tdir_t
)
page_no
))
if
(
!
TIFFSetDirectory
(
tif
,
(
tdir_t
)
page_no
))
printf
(
"Failed to set directory.
\n
"
);
printf
(
"Failed to set directory.
\n
"
);
if
(
!
TIFFSetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
offset
))
if
(
!
TIFFSetField
(
tif
,
TIFFTAG_GLOBALPARAMETERSIFD
,
diroff
))
printf
(
"Failed to set global parameters IFD.
\n
"
);
printf
(
"Failed to set global parameters IFD.
\n
"
);
if
(
!
TIFFWriteDirectory
(
tif
))
if
(
!
TIFFWriteDirectory
(
tif
))
printf
(
"Failed to write directory.
\n
"
);
printf
(
"Failed to write directory.
\n
"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论