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
055e56e9
Commit
055e56e9
authored
Sep 11, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mjpegdec: Fix decoding RGBA RCT LJPEG
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
07d33439
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
mjpegdec.c
libavcodec/mjpegdec.c
+8
-1
No files found.
libavcodec/mjpegdec.c
View file @
055e56e9
...
...
@@ -995,7 +995,14 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
skip_bits
(
&
s
->
gb
,
16
);
/* skip RSTn */
}
}
if
(
s
->
nb_components
==
4
)
{
if
(
s
->
rct
&&
s
->
nb_components
==
4
)
{
for
(
mb_x
=
0
;
mb_x
<
s
->
mb_width
;
mb_x
++
)
{
ptr
[
4
*
mb_x
+
2
]
=
buffer
[
mb_x
][
0
]
-
((
buffer
[
mb_x
][
1
]
+
buffer
[
mb_x
][
2
]
-
0x200
)
>>
2
);
ptr
[
4
*
mb_x
+
1
]
=
buffer
[
mb_x
][
1
]
+
ptr
[
4
*
mb_x
+
2
];
ptr
[
4
*
mb_x
+
3
]
=
buffer
[
mb_x
][
2
]
+
ptr
[
4
*
mb_x
+
2
];
ptr
[
4
*
mb_x
+
0
]
=
buffer
[
mb_x
][
3
];
}
}
else
if
(
s
->
nb_components
==
4
)
{
for
(
i
=
0
;
i
<
nb_components
;
i
++
)
{
int
c
=
s
->
comp_index
[
i
];
if
(
s
->
bits
<=
8
)
{
...
...
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