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
e100a259
Commit
e100a259
authored
Jul 06, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiffenc: simplify calculation of bpp_tab_size
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5997285d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
tiffenc.c
libavcodec/tiffenc.c
+2
-3
No files found.
libavcodec/tiffenc.c
View file @
e100a259
...
...
@@ -25,6 +25,7 @@
* @author Bartlomiej Wolowiec
*/
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
...
...
@@ -300,7 +301,6 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
s
->
bpp
=
8
+
(
16
>>
(
shift_h
+
shift_v
));
s
->
subsampling
[
0
]
=
1
<<
shift_h
;
s
->
subsampling
[
1
]
=
1
<<
shift_v
;
s
->
bpp_tab_size
=
3
;
is_yuv
=
1
;
break
;
default
:
...
...
@@ -308,9 +308,8 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
"This colors format is not supported
\n
"
);
return
-
1
;
}
if
(
!
is_yuv
)
s
->
bpp_tab_size
=
(
s
->
bpp
>=
48
)
?
((
s
->
bpp
+
7
)
>>
4
)
:
((
s
->
bpp
+
7
)
>>
3
);
s
->
bpp_tab_size
=
av_pix_fmt_descriptors
[
avctx
->
pix_fmt
].
nb_components
;
if
(
s
->
compr
==
TIFF_DEFLATE
||
s
->
compr
==
TIFF_ADOBE_DEFLATE
||
s
->
compr
==
TIFF_LZW
)
//best choose for DEFLATE
s
->
rps
=
s
->
height
;
...
...
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