* 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
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 RLTable ff_rvlc_rl_inter;
+extern RLTable ff_rvlc_rl_intra;
-extern const uint16_t sprite_trajectory_tab[15][2];
-extern const uint8_t mb_type_b_tab[4][2];
+extern const uint16_t ff_sprite_trajectory_tab[15][2];
+extern const uint8_t ff_mb_type_b_tab[4][2];
/* these matrixes will be permuted for the idct */
extern const int16_t ff_mpeg4_default_intra_matrix[64];
extern const uint8_t ff_mpeg4_c_dc_scale_table[32];
extern const uint16_t ff_mpeg4_resync_prefix[8];
-extern const uint8_t mpeg4_dc_threshold[8];
+extern const uint8_t ff_mpeg4_dc_threshold[8];
-void mpeg4_encode_mb(MpegEncContext *s,
- DCTELEM block[6][64],
- int motion_x, int motion_y);
-void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n,
- int dir);
+void ff_mpeg4_encode_mb(MpegEncContext *s,
+ int16_t block[6][64],
+ int motion_x, int motion_y);
+void ff_mpeg4_pred_ac(MpegEncContext * s, int16_t *block, int n,
+ int dir);
void ff_set_mpeg4_time(MpegEncContext * s);
-void mpeg4_encode_picture_header(MpegEncContext *s, int picture_number);
+void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number);
int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb);
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s);
void ff_clean_mpeg4_qscales(MpegEncContext *s);
int ff_mpeg4_decode_partitions(MpegEncContext *s);
int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s);
-int mpeg4_decode_video_packet_header(MpegEncContext *s);
+int ff_mpeg4_decode_video_packet_header(MpegEncContext *s);
void ff_mpeg4_init_direct_mv(MpegEncContext *s);
/**
/**
- * 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)
}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;
return ret;
}
-#endif
+#endif /* AVCODEC_MPEG4VIDEO_H */