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
9bcdb988
Commit
9bcdb988
authored
Aug 10, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/iff: Factorize av_pix_fmt_desc_get() out
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cab39afb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
iff.c
libavcodec/iff.c
+4
-3
No files found.
libavcodec/iff.c
View file @
9bcdb988
...
...
@@ -677,11 +677,15 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf_end
=
buf
+
buf_size
;
int
y
,
plane
,
res
;
GetByteContext
gb
;
const
AVPixFmtDescriptor
*
desc
;
if
((
res
=
extract_header
(
avctx
,
avpkt
))
<
0
)
return
res
;
if
((
res
=
ff_reget_buffer
(
avctx
,
s
->
frame
))
<
0
)
return
res
;
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
if
(
!
s
->
init
&&
avctx
->
bits_per_coded_sample
<=
8
&&
avctx
->
pix_fmt
==
AV_PIX_FMT_PAL8
)
{
if
((
res
=
cmap_read_palette
(
avctx
,
(
uint32_t
*
)
s
->
frame
->
data
[
1
]))
<
0
)
...
...
@@ -721,7 +725,6 @@ static int decode_frame(AVCodecContext *avctx,
}
else
return
unsupported
(
avctx
);
}
else
if
(
avctx
->
codec_tag
==
MKTAG
(
'D'
,
'E'
,
'E'
,
'P'
))
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
int
raw_width
=
avctx
->
width
*
(
av_get_bits_per_pixel
(
desc
)
>>
3
);
int
x
;
for
(
y
=
0
;
y
<
avctx
->
height
&&
buf
<
buf_end
;
y
++
)
{
...
...
@@ -838,7 +841,6 @@ static int decode_frame(AVCodecContext *avctx,
}
else
return
unsupported
(
avctx
);
}
else
if
(
avctx
->
codec_tag
==
MKTAG
(
'D'
,
'E'
,
'E'
,
'P'
))
{
// IFF-DEEP
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
if
(
av_get_bits_per_pixel
(
desc
)
==
32
)
decode_deep_rle32
(
s
->
frame
->
data
[
0
],
buf
,
buf_size
,
avctx
->
width
,
avctx
->
height
,
s
->
frame
->
linesize
[
0
]);
else
...
...
@@ -856,7 +858,6 @@ static int decode_frame(AVCodecContext *avctx,
break
;
case
5
:
if
(
avctx
->
codec_tag
==
MKTAG
(
'D'
,
'E'
,
'E'
,
'P'
))
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
if
(
av_get_bits_per_pixel
(
desc
)
==
32
)
decode_deep_tvdc32
(
s
->
frame
->
data
[
0
],
buf
,
buf_size
,
avctx
->
width
,
avctx
->
height
,
s
->
frame
->
linesize
[
0
],
s
->
tvdc
);
else
...
...
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