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
40297a8b
Commit
40297a8b
authored
Jan 22, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support solid gray frames when decoding Lagarith.
Fixes bug 431.
parent
e65d8509
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lagarith.c
libavcodec/lagarith.c
+15
-0
No files found.
libavcodec/lagarith.c
View file @
40297a8b
...
...
@@ -535,6 +535,14 @@ static int lag_decode_frame(AVCodecContext *avctx,
switch
(
frametype
)
{
case
FRAME_SOLID_RGBA
:
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
case
FRAME_SOLID_GRAY
:
if
(
frametype
==
FRAME_SOLID_GRAY
)
if
(
avctx
->
bits_per_coded_sample
==
24
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
}
else
{
avctx
->
pix_fmt
=
AV_PIX_FMT_0RGB32
;
planes
=
4
;
}
if
(
ff_thread_get_buffer
(
avctx
,
p
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
...
...
@@ -542,11 +550,18 @@ static int lag_decode_frame(AVCodecContext *avctx,
}
dst
=
p
->
data
[
0
];
if
(
frametype
==
FRAME_SOLID_RGBA
)
{
for
(
j
=
0
;
j
<
avctx
->
height
;
j
++
)
{
for
(
i
=
0
;
i
<
avctx
->
width
;
i
++
)
AV_WN32
(
dst
+
i
*
4
,
offset_gu
);
dst
+=
p
->
linesize
[
0
];
}
}
else
{
for
(
j
=
0
;
j
<
avctx
->
height
;
j
++
)
{
memset
(
dst
,
buf
[
1
],
avctx
->
width
*
planes
);
dst
+=
p
->
linesize
[
0
];
}
}
break
;
case
FRAME_ARITH_RGBA
:
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
...
...
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