[FFmpeg-cvslog] mpeg4dec: restore error concealment functionality after merge

Michael Niedermayer git at videolan.org
Tue Dec 13 01:37:08 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 13 01:26:14 2011 +0100| [c9cab022a38272ef878d7e9c397475edae434bd6] | committer: Michael Niedermayer

mpeg4dec: restore error concealment functionality after merge

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9cab022a38272ef878d7e9c397475edae434bd6
---

 libavcodec/mpeg4video.h    |    2 +-
 libavcodec/mpeg4videodec.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index 00eba68..274ded9 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -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_recognition&AV_EF_BITSTREAM){
+        if(s->err_recognition&(AV_EF_BITSTREAM|AV_EF_AGGRESSIVE)){
             if(level<0){
                 av_log(s->avctx, AV_LOG_ERROR, "dc<0 at %dx%d\n", s->mb_x, s->mb_y);
                 return -1;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 1a07888..8492b44 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -516,7 +516,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_recognition&AV_EF_BITSTREAM){
+                if(s->err_recognition&(AV_EF_BITSTREAM|AV_EF_COMPLIANT)){
                     av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n");
                     return -1;
                 }
@@ -1012,7 +1012,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
                     else         level= level * qmul - qadd;
 
                     if((unsigned)(level + 2048) > 4095){
-                        if(s->err_recognition & AV_EF_BITSTREAM){
+                        if(s->err_recognition & (AV_EF_BITSTREAM|AV_EF_AGGRESSIVE)){
                             if(level > 2560 || level<-2560){
                                 av_log(s->avctx, AV_LOG_ERROR, "|level| overflow in 3. esc, qp=%d\n", s->qscale);
                                 return -1;



More information about the ffmpeg-cvslog mailing list