Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
5b22d6e1
Commit
5b22d6e1
authored
Dec 07, 2011
by
Dustin Brody
Committed by
Anton Khirnov
Dec 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: convert error_recognition to err_recognition.
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
f6cf4be8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
13 deletions
+13
-13
libavcodec/error_resilience.c
libavcodec/error_resilience.c
+4
-4
libavcodec/h263dec.c
libavcodec/h263dec.c
+1
-1
libavcodec/h264.c
libavcodec/h264.c
+1
-1
libavcodec/ituh263dec.c
libavcodec/ituh263dec.c
+1
-1
libavcodec/mpeg4video.h
libavcodec/mpeg4video.h
+1
-1
libavcodec/mpeg4videodec.c
libavcodec/mpeg4videodec.c
+2
-2
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+1
-1
libavcodec/mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
libavcodec/msmpeg4.c
libavcodec/msmpeg4.c
+1
-1
No files found.
libavcodec/error_resilience.c
View file @
5b22d6e1
...
...
@@ -703,7 +703,7 @@ static int is_intra_more_likely(MpegEncContext *s){
}
void
ff_er_frame_start
(
MpegEncContext
*
s
){
if
(
!
s
->
err
or
_recognition
)
return
;
if
(
!
s
->
err_recognition
)
return
;
memset
(
s
->
error_status_table
,
MV_ERROR
|
AC_ERROR
|
DC_ERROR
|
VP_START
|
AC_END
|
DC_END
|
MV_END
,
s
->
mb_stride
*
s
->
mb_height
*
sizeof
(
uint8_t
));
s
->
error_count
=
3
*
s
->
mb_num
;
...
...
@@ -731,7 +731,7 @@ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int en
return
;
}
if
(
!
s
->
err
or
_recognition
)
return
;
if
(
!
s
->
err_recognition
)
return
;
mask
&=
~
VP_START
;
if
(
status
&
(
AC_ERROR
|
AC_END
)){
...
...
@@ -787,7 +787,7 @@ void ff_er_frame_end(MpegEncContext *s){
int
size
=
s
->
b8_stride
*
2
*
s
->
mb_height
;
Picture
*
pic
=
s
->
current_picture_ptr
;
if
(
!
s
->
err
or
_recognition
||
s
->
error_count
==
0
||
s
->
avctx
->
lowres
||
if
(
!
s
->
err_recognition
||
s
->
error_count
==
0
||
s
->
avctx
->
lowres
||
s
->
avctx
->
hwaccel
||
s
->
avctx
->
codec
->
capabilities
&
CODEC_CAP_HWACCEL_VDPAU
||
s
->
picture_structure
!=
PICT_FRAME
||
// we do not support ER of field pictures yet, though it should not crash if enabled
...
...
@@ -859,7 +859,7 @@ void ff_er_frame_end(MpegEncContext *s){
}
/* handle missing slices */
if
(
s
->
err
or
_recognition
>=
4
){
if
(
s
->
err_recognition
&
AV_EF_EXPLODE
){
int
end_ok
=
1
;
for
(
i
=
s
->
mb_num
-
2
;
i
>=
s
->
mb_width
+
100
;
i
--
){
//FIXME +100 hack
...
...
libavcodec/h263dec.c
View file @
5b22d6e1
...
...
@@ -310,7 +310,7 @@ static int decode_slice(MpegEncContext *s){
max_extra
+=
17
;
/* buggy padding but the frame should still end approximately at the bitstream end */
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
)
&&
s
->
err
or
_recognition
>=
3
)
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
)
&&
(
s
->
err_recognition
&
AV_EF_BUFFER
)
)
max_extra
+=
48
;
else
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
))
max_extra
+=
256
*
256
*
256
*
64
;
...
...
libavcodec/h264.c
View file @
5b22d6e1
...
...
@@ -3704,7 +3704,7 @@ static int execute_decode_slices(H264Context *h, int context_count){
}
else
{
for
(
i
=
1
;
i
<
context_count
;
i
++
)
{
hx
=
h
->
thread_context
[
i
];
hx
->
s
.
err
or
_recognition
=
avctx
->
err
or
_recognition
;
hx
->
s
.
err_recognition
=
avctx
->
err_recognition
;
hx
->
s
.
error_count
=
0
;
}
...
...
libavcodec/ituh263dec.c
View file @
5b22d6e1
...
...
@@ -484,7 +484,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
level
=
get_bits
(
&
s
->
gb
,
8
);
if
((
level
&
0x7F
)
==
0
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"illegal dc %d at %d %d
\n
"
,
level
,
s
->
mb_x
,
s
->
mb_y
);
if
(
s
->
err
or
_recognition
>=
FF_ER_COMPLIANT
)
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
return
-
1
;
}
if
(
level
==
255
)
...
...
libavcodec/mpeg4video.h
View file @
5b22d6e1
...
...
@@ -174,7 +174,7 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *di
}
else
{
level
+=
pred
;
ret
=
level
;
if
(
s
->
err
or
_recognition
>=
3
){
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
){
if
(
level
<
0
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dc<0 at %dx%d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
-
1
;
...
...
libavcodec/mpeg4videodec.c
View file @
5b22d6e1
...
...
@@ -520,7 +520,7 @@ static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
if
(
code
>
8
){
if
(
get_bits1
(
&
s
->
gb
)
==
0
){
/* marker */
if
(
s
->
err
or
_recognition
>=
2
){
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dc marker bit missing
\n
"
);
return
-
1
;
}
...
...
@@ -994,7 +994,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
else
level
=
level
*
qmul
-
qadd
;
if
((
unsigned
)(
level
+
2048
)
>
4095
){
if
(
s
->
err
or
_recognition
>
FF_ER_COMPLIANT
){
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
){
if
(
level
>
2560
||
level
<-
2560
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"|level| overflow in 3. esc, qp=%d
\n
"
,
s
->
qscale
);
return
-
1
;
...
...
libavcodec/mpegvideo.c
View file @
5b22d6e1
...
...
@@ -1305,7 +1305,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
s
->
err
or
_recognition
=
avctx
->
err
or
_recognition
;
s
->
err_recognition
=
avctx
->
err_recognition
;
/* set dequantizer, we can't do it during init as it might change for mpeg4
and we can't do it in the header decode as init is not called for mpeg4 there yet */
...
...
libavcodec/mpegvideo.h
View file @
5b22d6e1
...
...
@@ -487,7 +487,7 @@ typedef struct MpegEncContext {
GetBitContext
last_resync_gb
;
///< used to search for the next resync marker
int
mb_num_left
;
///< number of MBs left in this video packet (for partitioned Slices only)
int
next_p_frame_damaged
;
///< set if the next p frame is damaged, to avoid showing trashed b frames
int
err
or
_recognition
;
int
err_recognition
;
ParseContext
parse_context
;
...
...
libavcodec/msmpeg4.c
View file @
5b22d6e1
...
...
@@ -1810,7 +1810,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
i
-=
192
;
if
(
i
&
(
~
63
)){
const
int
left
=
get_bits_left
(
&
s
->
gb
);
if
(((
i
+
192
==
64
&&
level
/
qmul
==-
1
)
||
s
->
err
or
_recognition
<=
1
)
&&
left
>=
0
){
if
(((
i
+
192
==
64
&&
level
/
qmul
==-
1
)
||
!
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
)
&&
left
>=
0
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ignoring overflow at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
break
;
}
else
{
...
...
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