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
6d50b2e6
Commit
6d50b2e6
authored
May 20, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
Originally committed as revision 1893 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
38597364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
mjpeg.c
libavcodec/mjpeg.c
+3
-14
No files found.
libavcodec/mjpeg.c
View file @
6d50b2e6
...
@@ -903,11 +903,7 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s)
...
@@ -903,11 +903,7 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s)
static
inline
int
mjpeg_decode_dc
(
MJpegDecodeContext
*
s
,
int
dc_index
)
static
inline
int
mjpeg_decode_dc
(
MJpegDecodeContext
*
s
,
int
dc_index
)
{
{
int
code
,
diff
;
int
code
,
diff
;
#if 1
code
=
get_vlc2
(
&
s
->
gb
,
s
->
vlcs
[
0
][
dc_index
].
table
,
9
,
2
);
code
=
get_vlc2
(
&
s
->
gb
,
s
->
vlcs
[
0
][
dc_index
].
table
,
9
,
2
);
#else
code
=
get_vlc
(
&
s
->
gb
,
&
s
->
vlcs
[
0
][
dc_index
]);
#endif
if
(
code
<
0
)
if
(
code
<
0
)
{
{
dprintf
(
"mjpeg_decode_dc: bad vlc: %d:%d (%p)
\n
"
,
0
,
dc_index
,
dprintf
(
"mjpeg_decode_dc: bad vlc: %d:%d (%p)
\n
"
,
0
,
dc_index
,
...
@@ -917,9 +913,7 @@ static inline int mjpeg_decode_dc(MJpegDecodeContext *s, int dc_index)
...
@@ -917,9 +913,7 @@ static inline int mjpeg_decode_dc(MJpegDecodeContext *s, int dc_index)
if
(
code
==
0
)
{
if
(
code
==
0
)
{
diff
=
0
;
diff
=
0
;
}
else
{
}
else
{
diff
=
get_bits
(
&
s
->
gb
,
code
);
diff
=
get_xbits
(
&
s
->
gb
,
code
);
if
((
diff
&
(
1
<<
(
code
-
1
)))
==
0
)
diff
=
(
-
1
<<
code
)
|
(
diff
+
1
);
}
}
return
diff
;
return
diff
;
}
}
...
@@ -947,11 +941,8 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
...
@@ -947,11 +941,8 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
ac_vlc
=
&
s
->
vlcs
[
1
][
ac_index
];
ac_vlc
=
&
s
->
vlcs
[
1
][
ac_index
];
i
=
1
;
i
=
1
;
for
(;;)
{
for
(;;)
{
#if 1
code
=
get_vlc2
(
&
s
->
gb
,
s
->
vlcs
[
1
][
ac_index
].
table
,
9
,
2
);
code
=
get_vlc2
(
&
s
->
gb
,
s
->
vlcs
[
1
][
ac_index
].
table
,
9
,
2
);
#else
code
=
get_vlc
(
&
s
->
gb
,
ac_vlc
);
#endif
if
(
code
<
0
)
{
if
(
code
<
0
)
{
dprintf
(
"error ac
\n
"
);
dprintf
(
"error ac
\n
"
);
return
-
1
;
return
-
1
;
...
@@ -964,9 +955,7 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
...
@@ -964,9 +955,7 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
}
else
{
}
else
{
run
=
code
>>
4
;
run
=
code
>>
4
;
nbits
=
code
&
0xf
;
nbits
=
code
&
0xf
;
level
=
get_bits
(
&
s
->
gb
,
nbits
);
level
=
get_xbits
(
&
s
->
gb
,
nbits
);
if
((
level
&
(
1
<<
(
nbits
-
1
)))
==
0
)
level
=
(
-
1
<<
nbits
)
|
(
level
+
1
);
i
+=
run
;
i
+=
run
;
if
(
i
>=
64
)
{
if
(
i
>=
64
)
{
dprintf
(
"error count: %d
\n
"
,
i
);
dprintf
(
"error count: %d
\n
"
,
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