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
1a0770f3
Commit
1a0770f3
authored
Sep 25, 2011
by
Jean First
Committed by
Michael Niedermayer
Sep 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiffenc: Enable RGB48LE (16-bit) encoding support
parent
72381b2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
tiffenc.c
libavcodec/tiffenc.c
+10
-2
No files found.
libavcodec/tiffenc.c
View file @
1a0770f3
...
...
@@ -247,6 +247,14 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
s
->
subsampling
[
1
]
=
1
;
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_RGB48LE
:
s
->
bpp
=
48
;
s
->
photometric_interpretation
=
2
;
bpp_tab
[
0
]
=
16
;
bpp_tab
[
1
]
=
16
;
bpp_tab
[
2
]
=
16
;
bpp_tab
[
3
]
=
16
;
break
;
case
PIX_FMT_RGB24
:
s
->
bpp
=
24
;
s
->
photometric_interpretation
=
2
;
...
...
@@ -285,7 +293,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
return
-
1
;
}
if
(
!
is_yuv
)
s
->
bpp_tab_size
=
((
s
->
bpp
+
7
)
>>
3
);
s
->
bpp_tab_size
=
(
s
->
bpp
>=
48
)
?
((
s
->
bpp
+
7
)
>>
4
)
:
(
(
s
->
bpp
+
7
)
>>
3
);
if
(
s
->
compr
==
TIFF_DEFLATE
||
s
->
compr
==
TIFF_ADOBE_DEFLATE
||
s
->
compr
==
TIFF_LZW
)
//best choose for DEFLATE
...
...
@@ -462,7 +470,7 @@ AVCodec ff_tiff_encoder = {
PIX_FMT_MONOBLACK
,
PIX_FMT_MONOWHITE
,
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_YUV444P
,
PIX_FMT_YUV410P
,
PIX_FMT_YUV411P
,
PIX_FMT_YUV411P
,
PIX_FMT_RGB48LE
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"TIFF image"
),
.
priv_class
=
&
class
,
...
...
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