23 #ifndef AVCODEC_MPEG4VIDEO_H
24 #define AVCODEC_MPEG4VIDEO_H
34 #define BIN_ONLY_SHAPE 2
37 #define SIMPLE_VO_TYPE 1
38 #define CORE_VO_TYPE 3
39 #define MAIN_VO_TYPE 4
40 #define NBIT_VO_TYPE 5
41 #define ARTS_VO_TYPE 10
42 #define ACE_VO_TYPE 12
43 #define ADV_SIMPLE_VO_TYPE 17
46 #define EXTENDED_PAR 15
49 #define STATIC_SPRITE 1
52 #define MOTION_MARKER 0x1F001
53 #define DC_MARKER 0x6B001
55 #define VOS_STARTCODE 0x1B0
56 #define USER_DATA_STARTCODE 0x1B2
57 #define GOP_STARTCODE 0x1B3
58 #define VISUAL_OBJ_STARTCODE 0x1B5
59 #define VOP_STARTCODE 0x1B6
87 int motion_x,
int motion_y);
114 #if 0 //3IV1 is quite rare and it slows things down a tiny bit
115 #define IS_3IV1 s->codec_tag == AV_RL32("3IV1")
149 b = dc_val[ - 1 -
wrap];
158 if(n==0 || n==4 || n==5)
162 if (abs(a - b) < abs(b - c)) {
170 pred =
FASTDIV((pred + (scale >> 1)), scale);
182 if(level*scale > 2048 + scale){
int mpeg4_decode_video_packet_header(MpegEncContext *s)
Decode the next video packet.
const uint16_t sprite_trajectory_tab[15][2]
int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s)
const uint16_t ff_mpeg4_resync_prefix[8]
void ff_mpeg4_merge_partitions(MpegEncContext *s)
int ff_mpeg4_decode_partitions(MpegEncContext *s)
Decode the first and second partition.
const int16_t ff_mpeg4_default_non_intra_matrix[64]
uint8_t ff_mpeg4_static_rl_table_store[3][2][2 *MAX_RUN+MAX_LEVEL+3]
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s)
void mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
void mpeg4_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
bitstream reader API header.
static int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level, int *dir_ptr, int encoding)
Predict the dc.
int16_t * dc_val[3]
used for mpeg4 DC prediction, all 3 arrays must be continuous
const uint16_t ff_mpeg4_intra_vlc[103][2]
const uint8_t ff_mpeg4_DCtab_chrom[13][2]
const uint8_t ff_mpeg4_DCtab_lum[13][2]
const uint8_t ff_mpeg4_c_dc_scale_table[32]
void av_log(void *avcl, int level, const char *fmt,...)
void ff_mpeg4_clean_buffers(MpegEncContext *s)
int resync_mb_x
x position of last resync marker
void mpeg4_pred_ac(MpegEncContext *s, DCTELEM *block, int n, int dir)
Predict the ac.
void ff_clean_mpeg4_qscales(MpegEncContext *s)
modify mb_type & qscale so that encoding is acually possible in mpeg4
int block_index[6]
index to current MB in block based arrays with edges
static const float pred[4]
int first_slice_line
used in mpeg4 too to handle resync markers
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const uint8_t mpeg4_dc_threshold[8]
const uint8_t mb_type_b_tab[4][2]
const int16_t ff_mpeg4_default_intra_matrix[64]
void ff_set_mpeg4_time(MpegEncContext *s)
RLTable ff_mpeg4_rl_intra
static const uint16_t scale[4]
struct AVCodecContext * avctx
void ff_mpeg4_init_direct_mv(MpegEncContext *s)
const uint8_t ff_mpeg4_y_dc_scale_table[32]
void ff_mpeg4_stuffing(PutBitContext *pbc)
add mpeg4 stuffing bits (01...1)
void ff_mpeg4_init_partitions(MpegEncContext *s)
int resync_mb_y
y position of last resync marker
int workaround_bugs
workaround bugs in encoders which cannot be detected automatically
int ff_mpeg4_decode_picture_header(MpegEncContext *s, GetBitContext *gb)
Decode mpeg4 headers.
int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my)