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
9c1db92a
Commit
9c1db92a
authored
Apr 27, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
parent
848e86f7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
9 deletions
+8
-9
h263dec.c
libavcodec/h263dec.c
+1
-1
ituh263dec.c
libavcodec/ituh263dec.c
+1
-1
mpeg4video.h
libavcodec/mpeg4video.h
+1
-1
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+2
-2
mpegvideo.c
libavcodec/mpegvideo.c
+0
-2
mpegvideo.h
libavcodec/mpegvideo.h
+0
-1
msmpeg4dec.c
libavcodec/msmpeg4dec.c
+3
-1
No files found.
libavcodec/h263dec.c
View file @
9c1db92a
...
@@ -340,7 +340,7 @@ static int decode_slice(MpegEncContext *s)
...
@@ -340,7 +340,7 @@ static int decode_slice(MpegEncContext *s)
/* buggy padding but the frame should still end approximately at
/* buggy padding but the frame should still end approximately at
* the bitstream end */
* the bitstream end */
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
)
&&
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
)
&&
(
s
->
err_recognition
&
AV_EF_BUFFER
))
(
s
->
avctx
->
err_recognition
&
AV_EF_BUFFER
))
max_extra
+=
48
;
max_extra
+=
48
;
else
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
))
else
if
((
s
->
workaround_bugs
&
FF_BUG_NO_PADDING
))
max_extra
+=
256
*
256
*
256
*
64
;
max_extra
+=
256
*
256
*
256
*
64
;
...
...
libavcodec/ituh263dec.c
View file @
9c1db92a
...
@@ -481,7 +481,7 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block,
...
@@ -481,7 +481,7 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block,
level
=
get_bits
(
&
s
->
gb
,
8
);
level
=
get_bits
(
&
s
->
gb
,
8
);
if
((
level
&
0x7F
)
==
0
){
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
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"illegal dc %d at %d %d
\n
"
,
level
,
s
->
mb_x
,
s
->
mb_y
);
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
if
(
s
->
avctx
->
err_recognition
&
AV_EF_BITSTREAM
)
return
-
1
;
return
-
1
;
}
}
if
(
level
==
255
)
if
(
level
==
255
)
...
...
libavcodec/mpeg4video.h
View file @
9c1db92a
...
@@ -223,7 +223,7 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level,
...
@@ -223,7 +223,7 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level,
}
else
{
}
else
{
level
+=
pred
;
level
+=
pred
;
ret
=
level
;
ret
=
level
;
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
{
if
(
s
->
avctx
->
err_recognition
&
AV_EF_BITSTREAM
)
{
if
(
level
<
0
)
{
if
(
level
<
0
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dc<0 at %dx%d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
"dc<0 at %dx%d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
...
...
libavcodec/mpeg4videodec.c
View file @
9c1db92a
...
@@ -563,7 +563,7 @@ static inline int mpeg4_decode_dc(MpegEncContext *s, int n, int *dir_ptr)
...
@@ -563,7 +563,7 @@ static inline int mpeg4_decode_dc(MpegEncContext *s, int n, int *dir_ptr)
if
(
code
>
8
)
{
if
(
code
>
8
)
{
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
{
/* marker */
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
{
/* marker */
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
{
if
(
s
->
avctx
->
err_recognition
&
AV_EF_BITSTREAM
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dc marker bit missing
\n
"
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"dc marker bit missing
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -1099,7 +1099,7 @@ static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block,
...
@@ -1099,7 +1099,7 @@ static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block,
level
=
level
*
qmul
-
qadd
;
level
=
level
*
qmul
-
qadd
;
if
((
unsigned
)(
level
+
2048
)
>
4095
)
{
if
((
unsigned
)(
level
+
2048
)
>
4095
)
{
if
(
s
->
err_recognition
&
AV_EF_BITSTREAM
)
{
if
(
s
->
avctx
->
err_recognition
&
AV_EF_BITSTREAM
)
{
if
(
level
>
2560
||
level
<
-
2560
)
{
if
(
level
>
2560
||
level
<
-
2560
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"|level| overflow in 3. esc, qp=%d
\n
"
,
"|level| overflow in 3. esc, qp=%d
\n
"
,
...
...
libavcodec/mpegvideo.c
View file @
9c1db92a
...
@@ -1858,8 +1858,6 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1858,8 +1858,6 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
}
}
s
->
err_recognition
=
avctx
->
err_recognition
;
/* set dequantizer, we can't do it during init as
/* set dequantizer, we can't do it during init as
* it might change for mpeg4 and we can't do it in the header
* it might change for mpeg4 and we can't do it in the header
* decode as init is not called for mpeg4 there yet */
* decode as init is not called for mpeg4 there yet */
...
...
libavcodec/mpegvideo.h
View file @
9c1db92a
...
@@ -474,7 +474,6 @@ typedef struct MpegEncContext {
...
@@ -474,7 +474,6 @@ typedef struct MpegEncContext {
GetBitContext
last_resync_gb
;
///< used to search for the next resync marker
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
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
next_p_frame_damaged
;
///< set if the next p frame is damaged, to avoid showing trashed b frames
int
err_recognition
;
ParseContext
parse_context
;
ParseContext
parse_context
;
...
...
libavcodec/msmpeg4dec.c
View file @
9c1db92a
...
@@ -833,7 +833,9 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block,
...
@@ -833,7 +833,9 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block,
i
-=
192
;
i
-=
192
;
if
(
i
&
(
~
63
)){
if
(
i
&
(
~
63
)){
const
int
left
=
get_bits_left
(
&
s
->
gb
);
const
int
left
=
get_bits_left
(
&
s
->
gb
);
if
(((
i
+
192
==
64
&&
level
/
qmul
==-
1
)
||
!
(
s
->
err_recognition
&
AV_EF_BITSTREAM
))
&&
left
>=
0
){
if
(((
i
+
192
==
64
&&
level
/
qmul
==
-
1
)
||
!
(
s
->
avctx
->
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
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ignoring overflow at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
break
;
break
;
}
else
{
}
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