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
884182b3
Commit
884182b3
authored
Jan 23, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more detailed error messages
Originally committed as revision 3871 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
9b21f056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
svq3.c
libavcodec/svq3.c
+28
-9
No files found.
libavcodec/svq3.c
View file @
884182b3
...
...
@@ -370,6 +370,7 @@ static inline int svq3_mc_dir (H264Context *h, int size, int mode, int dir, int
dx
=
svq3_get_se_golomb
(
&
s
->
gb
);
if
(
dx
==
INVALID_VLC
||
dy
==
INVALID_VLC
)
{
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"invalid MV vlc
\n
"
);
return
-
1
;
}
}
...
...
@@ -564,8 +565,10 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
for
(
i
=
0
;
i
<
16
;
i
+=
2
)
{
vlc
=
svq3_get_ue_golomb
(
&
s
->
gb
);
if
(
vlc
>=
25
)
if
(
vlc
>=
25
){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"luma prediction:%d
\n
"
,
vlc
);
return
-
1
;
}
left
=
&
h
->
intra4x4_pred_mode_cache
[
scan8
[
i
]
-
1
];
top
=
&
h
->
intra4x4_pred_mode_cache
[
scan8
[
i
]
-
8
];
...
...
@@ -573,8 +576,10 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
left
[
1
]
=
svq3_pred_1
[
top
[
0
]
+
1
][
left
[
0
]
+
1
][
svq3_pred_0
[
vlc
][
0
]];
left
[
2
]
=
svq3_pred_1
[
top
[
1
]
+
1
][
left
[
1
]
+
1
][
svq3_pred_0
[
vlc
][
1
]];
if
(
left
[
1
]
==
-
1
||
left
[
2
]
==
-
1
)
if
(
left
[
1
]
==
-
1
||
left
[
2
]
==
-
1
){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"weird prediction
\n
"
);
return
-
1
;
}
}
}
else
{
/* mb_type == 33, DC_128_PRED block type */
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
@@ -603,8 +608,10 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
dir
=
i_mb_type_info
[
mb_type
-
8
].
pred_mode
;
dir
=
(
dir
>>
1
)
^
3
*
(
dir
&
1
)
^
1
;
if
((
h
->
intra16x16_pred_mode
=
check_intra_pred_mode
(
h
,
dir
))
==
-
1
)
if
((
h
->
intra16x16_pred_mode
=
check_intra_pred_mode
(
h
,
dir
))
==
-
1
){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"check_intra_pred_mode = -1
\n
"
);
return
-
1
;
}
cbp
=
i_mb_type_info
[
mb_type
-
8
].
cbp
;
mb_type
=
MB_TYPE_INTRA16x16
;
...
...
@@ -629,20 +636,26 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
}
if
(
!
IS_INTRA16x16
(
mb_type
)
&&
(
!
IS_SKIP
(
mb_type
)
||
s
->
pict_type
==
B_TYPE
))
{
if
((
vlc
=
svq3_get_ue_golomb
(
&
s
->
gb
))
>=
48
)
if
((
vlc
=
svq3_get_ue_golomb
(
&
s
->
gb
))
>=
48
){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"cbp_vlc=%d
\n
"
,
vlc
);
return
-
1
;
}
cbp
=
IS_INTRA
(
mb_type
)
?
golomb_to_intra4x4_cbp
[
vlc
]
:
golomb_to_inter_cbp
[
vlc
];
}
if
(
IS_INTRA16x16
(
mb_type
)
||
(
s
->
pict_type
!=
I_TYPE
&&
s
->
adaptive_quant
&&
cbp
))
{
s
->
qscale
+=
svq3_get_se_golomb
(
&
s
->
gb
);
if
(
s
->
qscale
>
31
)
if
(
s
->
qscale
>
31
){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"qscale:%d
\n
"
,
s
->
qscale
);
return
-
1
;
}
}
if
(
IS_INTRA16x16
(
mb_type
))
{
if
(
svq3_decode_block
(
&
s
->
gb
,
h
->
mb
,
0
,
0
))
if
(
svq3_decode_block
(
&
s
->
gb
,
h
->
mb
,
0
,
0
)){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"error while decoding intra luma dc
\n
"
);
return
-
1
;
}
}
if
(
cbp
)
{
...
...
@@ -655,24 +668,30 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
k
=
index
?
((
j
&
1
)
+
2
*
(
i
&
1
)
+
2
*
(
j
&
2
)
+
4
*
(
i
&
2
))
:
(
4
*
i
+
j
);
h
->
non_zero_count_cache
[
scan8
[
k
]
]
=
1
;
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
k
],
index
,
type
))
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
k
],
index
,
type
)){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"error while decoding block
\n
"
);
return
-
1
;
}
}
}
}
if
((
cbp
&
0x30
))
{
for
(
i
=
0
;
i
<
2
;
++
i
)
{
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
(
16
+
4
*
i
)],
0
,
3
))
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
(
16
+
4
*
i
)],
0
,
3
)){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"error while decoding chroma dc block
\n
"
);
return
-
1
;
}
}
if
((
cbp
&
0x20
))
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
h
->
non_zero_count_cache
[
scan8
[
16
+
i
]
]
=
1
;
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
(
16
+
i
)],
1
,
1
))
if
(
svq3_decode_block
(
&
s
->
gb
,
&
h
->
mb
[
16
*
(
16
+
i
)],
1
,
1
)){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"error while decoding chroma ac block
\n
"
);
return
-
1
;
}
}
}
}
...
...
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