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
69db85c3
Commit
69db85c3
authored
Dec 27, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpegdec: Support 16bit DQT
Fixes Ticket2072 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
10a3fa8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mjpegdec.c
libavcodec/mjpegdec.c
+5
-5
No files found.
libavcodec/mjpegdec.c
View file @
69db85c3
...
...
@@ -129,10 +129,10 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
len
=
get_bits
(
&
s
->
gb
,
16
)
-
2
;
while
(
len
>=
65
)
{
/* only 8 bit precision handled */
if
(
get_bits
(
&
s
->
gb
,
4
)
!=
0
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dqt:
16bit
precision
\n
"
);
return
-
1
;
int
pr
=
get_bits
(
&
s
->
gb
,
4
);
if
(
pr
>
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dqt:
invalid
precision
\n
"
);
return
AVERROR_INVALIDDATA
;
}
index
=
get_bits
(
&
s
->
gb
,
4
);
if
(
index
>=
4
)
...
...
@@ -141,7 +141,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
/* read quant table */
for
(
i
=
0
;
i
<
64
;
i
++
)
{
j
=
s
->
scantable
.
permutated
[
i
];
s
->
quant_matrixes
[
index
][
j
]
=
get_bits
(
&
s
->
gb
,
8
);
s
->
quant_matrixes
[
index
][
j
]
=
get_bits
(
&
s
->
gb
,
pr
?
16
:
8
);
}
// XXX FIXME finetune, and perhaps add dc too
...
...
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