00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVCODEC_MSMPEG4_H
00023 #define AVCODEC_MSMPEG4_H
00024
00025 #include <stdint.h>
00026
00027 #include "config.h"
00028 #include "avcodec.h"
00029 #include "dsputil.h"
00030 #include "mpegvideo.h"
00031 #include "msmpeg4data.h"
00032 #include "put_bits.h"
00033
00034 #define INTER_INTRA_VLC_BITS 3
00035 #define MB_NON_INTRA_VLC_BITS 9
00036 #define MB_INTRA_VLC_BITS 9
00037
00038 #define II_BITRATE 128*1024
00039 #define MBAC_BITRATE 50*1024
00040
00041 #define DC_MAX 119
00042
00043 extern VLC ff_mb_non_intra_vlc[4];
00044 extern VLC ff_inter_intra_vlc;
00045
00046 void ff_msmpeg4_code012(PutBitContext *pb, int n);
00047 void ff_msmpeg4_common_init(MpegEncContext *s);
00048 void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
00049 void ff_msmpeg4_handle_slices(MpegEncContext *s);
00050 void ff_msmpeg4_encode_motion(MpegEncContext * s, int mx, int my);
00051 int ff_msmpeg4_coded_block_pred(MpegEncContext * s, int n,
00052 uint8_t **coded_block_ptr);
00053 int ff_msmpeg4_decode_motion(MpegEncContext * s, int *mx_ptr, int *my_ptr);
00054 int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
00055 int n, int coded, const uint8_t *scan_table);
00056 int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
00057 int16_t **dc_val_ptr, int *dir_ptr);
00058 int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
00059
00060 #define CONFIG_MSMPEG4_DECODER (CONFIG_MSMPEG4V1_DECODER || \
00061 CONFIG_MSMPEG4V2_DECODER || \
00062 CONFIG_MSMPEG4V3_DECODER || \
00063 CONFIG_WMV2_DECODER || \
00064 CONFIG_VC1_DECODER)
00065 #define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V2_ENCODER || \
00066 CONFIG_MSMPEG4V3_ENCODER || \
00067 CONFIG_WMV2_ENCODER)
00068
00069 #endif