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
7445f9cc
Commit
7445f9cc
authored
Jul 09, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix IPCM_decode_error.h264
Originally committed as revision 14135 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8dbee653
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
h264.c
libavcodec/h264.c
+7
-9
No files found.
libavcodec/h264.c
View file @
7445f9cc
...
...
@@ -4352,12 +4352,11 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
level_code
=
(
prefix
<<
suffix_length
)
+
get_bits
(
gb
,
suffix_length
);
//part
else
level_code
=
prefix
+
get_bits
(
gb
,
4
);
//part
}
else
if
(
prefix
==
15
){
level_code
=
(
prefix
<<
suffix_length
)
+
get_bits
(
gb
,
12
);
//part
if
(
suffix_length
==
0
)
level_code
+=
15
;
//FIXME doesn't make (much)sense
}
else
{
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"prefix too large at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
-
1
;
level_code
=
(
15
<<
suffix_length
)
+
get_bits
(
gb
,
prefix
-
3
);
//part
if
(
suffix_length
==
0
)
level_code
+=
15
;
//FIXME doesn't make (much)sense
if
(
prefix
>=
16
)
level_code
+=
(
1
<<
(
prefix
-
3
))
-
4096
;
}
if
(
trailing_ones
<
3
)
level_code
+=
2
;
...
...
@@ -4375,11 +4374,10 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
prefix
=
get_level_prefix
(
gb
);
if
(
prefix
<
15
){
level_code
=
(
prefix
<<
suffix_length
)
+
get_bits
(
gb
,
suffix_length
);
}
else
if
(
prefix
==
15
){
level_code
=
(
prefix
<<
suffix_length
)
+
get_bits
(
gb
,
12
);
}
else
{
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"prefix too large at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
-
1
;
level_code
=
(
15
<<
suffix_length
)
+
get_bits
(
gb
,
prefix
-
3
);
if
(
prefix
>=
16
)
level_code
+=
(
1
<<
(
prefix
-
3
))
-
4096
;
}
mask
=
-
(
level_code
&
1
);
level
[
i
]
=
(((
2
+
level_code
)
>>
1
)
^
mask
)
-
mask
;
...
...
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