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
fd2bcfc4
Commit
fd2bcfc4
authored
Apr 03, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/jpeglsdec: fix palette parsing code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a0258153
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
jpeglsdec.c
libavcodec/jpeglsdec.c
+5
-3
No files found.
libavcodec/jpeglsdec.c
View file @
fd2bcfc4
...
...
@@ -80,7 +80,9 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
return
AVERROR_PATCHWELCOME
;
}
if
((
5
+
wt
*
(
s
->
maxval
+
1
))
<
65535
)
if
(
!
s
->
maxval
)
maxtab
=
255
;
else
if
((
5
+
wt
*
(
s
->
maxval
+
1
))
<
65535
)
maxtab
=
s
->
maxval
;
else
maxtab
=
65530
/
wt
-
1
;
...
...
@@ -102,10 +104,10 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
uint32_t
*
pal
=
s
->
picture_ptr
->
data
[
1
];
s
->
picture_ptr
->
format
=
s
->
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
for
(
i
=
s
->
palette_index
;
i
<
maxtab
;
i
++
)
{
for
(
i
=
s
->
palette_index
;
i
<
=
maxtab
;
i
++
)
{
pal
[
i
]
=
0
;
for
(
j
=
0
;
j
<
wt
;
j
++
)
{
pal
[
i
]
|=
get_bits
(
&
s
->
gb
,
8
)
<<
(
8
*
wt
);
pal
[
i
]
|=
get_bits
(
&
s
->
gb
,
8
)
<<
(
8
*
(
wt
-
j
-
1
)
);
}
}
s
->
palette_index
=
i
;
...
...
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