Merge commit '9c1db92ad372d4cd69e0490e691c56e4097cb193'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 22 May 2015 18:38:07 +0000 (20:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 22 May 2015 18:38:42 +0000 (20:38 +0200)
* commit '9c1db92ad372d4cd69e0490e691c56e4097cb193':
  mpegvideo: Drop err_recognition

Conflicts:
libavcodec/h263dec.c
libavcodec/ituh263dec.c
libavcodec/mpeg4video.h
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h263dec.c
libavcodec/ituh263dec.c
libavcodec/mpeg4video.h
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/msmpeg4dec.c

@@@ -287,8 -272,6 +287,8 @@@ static int decode_slice(MpegEncContext 
                  ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y,
                                  s->mb_x, s->mb_y, ER_MB_ERROR & part_mask);
  
-                 if (s->err_recognition & AV_EF_IGNORE_ERR)
++                if (s->avctx->err_recognition & AV_EF_IGNORE_ERR)
 +                    continue;
                  return AVERROR_INVALIDDATA;
              }
  
          /* buggy padding but the frame should still end approximately at
           * the bitstream end */
          if ((s->workaround_bugs & FF_BUG_NO_PADDING) &&
-             (s->err_recognition & (AV_EF_BUFFER|AV_EF_AGGRESSIVE)))
 -            (s->avctx->err_recognition & AV_EF_BUFFER))
++            (s->avctx->err_recognition & (AV_EF_BUFFER|AV_EF_AGGRESSIVE)))
              max_extra += 48;
          else if ((s->workaround_bugs & FF_BUG_NO_PADDING))
              max_extra += 256 * 256 * 256 * 64;
@@@ -460,7 -481,7 +460,7 @@@ static int h263_decode_block(MpegEncCon
              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_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT))
 -                if (s->avctx->err_recognition & AV_EF_BITSTREAM)
++                if (s->avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT))
                      return -1;
              }
              if (level == 255)
@@@ -230,7 -223,7 +230,7 @@@ static inline int ff_mpeg4_pred_dc(Mpeg
      } else {
          level += pred;
          ret    = level;
-         if (s->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) {
 -        if (s->avctx->err_recognition & AV_EF_BITSTREAM) {
++        if (s->avctx->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);
@@@ -571,7 -563,7 +571,7 @@@ static inline int mpeg4_decode_dc(MpegE
  
          if (code > 8) {
              if (get_bits1(&s->gb) == 0) { /* marker */
-                 if (s->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)) {
 -                if (s->avctx->err_recognition & AV_EF_BITSTREAM) {
++                if (s->avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)) {
                      av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n");
                      return -1;
                  }
@@@ -1086,8 -1077,7 +1086,8 @@@ static inline int mpeg4_decode_block(Mp
                                  if (SHOW_UBITS(re, &s->gb, 1) == 0) {
                                      av_log(s->avctx, AV_LOG_ERROR,
                                             "1. marker bit missing in 3. esc\n");
-                                     if (!(s->err_recognition & AV_EF_IGNORE_ERR))
 -                                    return -1;
++                                    if (!(s->avctx->err_recognition & AV_EF_IGNORE_ERR))
 +                                        return -1;
                                  }
                                  SKIP_CACHE(re, &s->gb, 1);
  
                                  if (SHOW_UBITS(re, &s->gb, 1) == 0) {
                                      av_log(s->avctx, AV_LOG_ERROR,
                                             "2. marker bit missing in 3. esc\n");
-                                     if (!(s->err_recognition & AV_EF_IGNORE_ERR))
 -                                    return -1;
++                                    if (!(s->avctx->err_recognition & AV_EF_IGNORE_ERR))
 +                                        return -1;
                                  }
  
                                  SKIP_COUNTER(re, &s->gb, 1 + 12 + 1);
                                  level = level * qmul - qadd;
  
                              if ((unsigned)(level + 2048) > 4095) {
-                                 if (s->err_recognition & (AV_EF_BITSTREAM|AV_EF_AGGRESSIVE)) {
 -                                if (s->avctx->err_recognition & AV_EF_BITSTREAM) {
++                                if (s->avctx->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",
Simple merge
Simple merge
@@@ -843,9 -833,10 +843,11 @@@ int ff_msmpeg4_decode_block(MpegEncCont
              i-= 192;
              if(i&(~63)){
                  const int left= get_bits_left(&s->gb);
-                 if(((i+192 == 64 && level/qmul==-1) || !(s->err_recognition&(AV_EF_BITSTREAM|AV_EF_COMPLIANT))) && left>=0){
+                 if (((i + 192 == 64 && level / qmul == -1) ||
 -                     !(s->avctx->err_recognition & AV_EF_BITSTREAM)) &&
++                     !(s->avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT))) &&
+                     left >= 0) {
                      av_log(s->avctx, AV_LOG_ERROR, "ignoring overflow at %d %d\n", s->mb_x, s->mb_y);
 +                    i = 63;
                      break;
                  }else{
                      av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);