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
201a511b
Commit
201a511b
authored
Aug 19, 2014
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/tiff: add support for YUV deflate
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
b4231b4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
tiff.c
libavcodec/tiff.c
+9
-8
No files found.
libavcodec/tiff.c
View file @
201a511b
...
...
@@ -333,9 +333,9 @@ static int tiff_uncompress(uint8_t *dst, unsigned long *len, const uint8_t *src,
return
zret
==
Z_STREAM_END
?
Z_OK
:
zret
;
}
static
int
tiff_unpack_zlib
(
TiffContext
*
s
,
uint8_t
*
dst
,
int
stride
,
const
uint8_t
*
src
,
int
size
,
int
width
,
int
lines
)
static
int
tiff_unpack_zlib
(
TiffContext
*
s
,
AVFrame
*
p
,
uint8_t
*
dst
,
int
stride
,
const
uint8_t
*
src
,
int
size
,
int
width
,
int
lines
,
int
strip_start
,
int
is_yuv
)
{
uint8_t
*
zbuf
;
unsigned
long
outlen
;
...
...
@@ -366,6 +366,10 @@ static int tiff_unpack_zlib(TiffContext *s, uint8_t *dst, int stride,
}
else
{
memcpy
(
dst
,
src
,
width
);
}
if
(
is_yuv
)
{
unpack_yuv
(
s
,
p
,
dst
,
strip_start
+
line
);
line
+=
s
->
subsampling
[
1
]
-
1
;
}
dst
+=
stride
;
src
+=
width
;
}
...
...
@@ -443,12 +447,9 @@ static int tiff_unpack_strip(TiffContext *s, AVFrame *p, uint8_t *dst, int strid
}
if
(
s
->
compr
==
TIFF_DEFLATE
||
s
->
compr
==
TIFF_ADOBE_DEFLATE
)
{
if
(
is_yuv
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"YUV deflate is unsupported"
);
return
AVERROR_PATCHWELCOME
;
}
#if CONFIG_ZLIB
return
tiff_unpack_zlib
(
s
,
dst
,
stride
,
src
,
size
,
width
,
lines
);
return
tiff_unpack_zlib
(
s
,
p
,
dst
,
stride
,
src
,
size
,
width
,
lines
,
strip_start
,
is_yuv
);
#else
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"zlib support not enabled, "
...
...
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