]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpeg4video.h
cabac: drop unused STRICT_LIMITS code branch
[ffmpeg] / libavcodec / mpeg4video.h
index a335fa338aabcce56c4dce88ae6b15169d325525..ba67c218fc1bf894afd37a4fd77067b2df83526c 100644 (file)
@@ -3,26 +3,31 @@
  * Copyright (c) 2000,2001 Fabrice Bellard
  * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef AVCODEC_MPEG4VIDEO_H
 #define AVCODEC_MPEG4VIDEO_H
 
+#include <stdint.h>
+#include "get_bits.h"
+#include "mpegvideo.h"
+#include "rl.h"
+
 // shapes
 #define RECT_SHAPE       0
 #define BIN_SHAPE        1
@@ -58,19 +63,10 @@ extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
 extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
 
 extern const uint16_t ff_mpeg4_intra_vlc[103][2];
-extern const int8_t ff_mpeg4_intra_level[102];
-extern const int8_t ff_mpeg4_intra_run[102];
 extern RLTable ff_mpeg4_rl_intra;
 
 /* Note this is identical to the intra rvlc except that it is reordered. */
-extern const uint16_t inter_rvlc[170][2];
-extern const int8_t inter_rvlc_run[169];
-extern const int8_t inter_rvlc_level[169];
 extern RLTable rvlc_rl_inter;
-
-extern const uint16_t intra_rvlc[170][2];
-extern const int8_t intra_rvlc_run[169];
-extern const int8_t intra_rvlc_level[169];
 extern RLTable rvlc_rl_intra;
 
 extern const uint16_t sprite_trajectory_tab[15][2];
@@ -123,7 +119,7 @@ extern uint8_t ff_mpeg4_static_rl_table_store[3][2][2*MAX_RUN + MAX_LEVEL + 3];
 
 
 /**
- * predicts the dc.
+ * Predict the dc.
  * encoding quantized level -> quantized diff
  * decoding quantized diff -> quantized level
  * @param n block index (0-3 are luma, 4-5 are chroma)
@@ -178,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->error_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;
@@ -200,4 +196,4 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *di
 
     return ret;
 }
-#endif
+#endif /* AVCODEC_MPEG4VIDEO_H */