Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c714cd3b
Commit
c714cd3b
authored
Jan 14, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support 64bit tiff images.
Fixes a part of ticket #503. Reviewed-by: Paul B Mahol Reviewed-by: Jean First
parent
93af38ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
tiff.c
libavcodec/tiff.c
+7
-2
tiffenc.c
libavcodec/tiffenc.c
+9
-1
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/tiff.c
View file @
c714cd3b
...
...
@@ -302,6 +302,9 @@ static int init_image(TiffContext *s)
case
483
:
s
->
avctx
->
pix_fmt
=
s
->
le
?
PIX_FMT_RGB48LE
:
PIX_FMT_RGB48BE
;
break
;
case
644
:
s
->
avctx
->
pix_fmt
=
s
->
le
?
PIX_FMT_RGBA64LE
:
PIX_FMT_RGBA64BE
;
break
;
default
:
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"This format is not supported (bpp=%d, bppcount=%d)
\n
"
,
...
...
@@ -647,13 +650,15 @@ static int decode_frame(AVCodecContext *avctx,
dst
=
p
->
data
[
0
];
soff
=
s
->
bpp
>>
3
;
ssize
=
s
->
width
*
soff
;
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGB48LE
)
{
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGB48LE
||
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGBA64LE
)
{
for
(
i
=
0
;
i
<
s
->
height
;
i
++
)
{
for
(
j
=
soff
;
j
<
ssize
;
j
+=
2
)
AV_WL16
(
dst
+
j
,
AV_RL16
(
dst
+
j
)
+
AV_RL16
(
dst
+
j
-
soff
));
dst
+=
stride
;
}
}
else
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGB48BE
)
{
}
else
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGB48BE
||
s
->
avctx
->
pix_fmt
==
PIX_FMT_RGBA64BE
)
{
for
(
i
=
0
;
i
<
s
->
height
;
i
++
)
{
for
(
j
=
soff
;
j
<
ssize
;
j
+=
2
)
AV_WB16
(
dst
+
j
,
AV_RB16
(
dst
+
j
)
+
AV_RB16
(
dst
+
j
-
soff
));
...
...
libavcodec/tiffenc.c
View file @
c714cd3b
...
...
@@ -255,6 +255,14 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
s
->
subsampling
[
1
]
=
1
;
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_RGBA64LE
:
s
->
bpp
=
64
;
s
->
photometric_interpretation
=
2
;
bpp_tab
[
0
]
=
16
;
bpp_tab
[
1
]
=
16
;
bpp_tab
[
2
]
=
16
;
bpp_tab
[
3
]
=
16
;
break
;
case
PIX_FMT_RGB48LE
:
s
->
bpp
=
48
;
s
->
photometric_interpretation
=
2
;
...
...
@@ -498,7 +506,7 @@ AVCodec ff_tiff_encoder = {
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_YUV444P
,
PIX_FMT_YUV410P
,
PIX_FMT_YUV411P
,
PIX_FMT_RGB48LE
,
PIX_FMT_RGBA
,
PIX_FMT_NONE
},
PIX_FMT_RGBA
,
PIX_FMT_
RGBA64LE
,
PIX_FMT_
NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"TIFF image"
),
.
priv_class
=
&
tiffenc_class
,
};
libavcodec/version.h
View file @
c714cd3b
...
...
@@ -22,7 +22,7 @@
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 55
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_MICRO 10
2
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment