X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpeg4video.h;h=59358eb5558dd275c3da2670e5756df3f7b0ca7b;hb=0652e024c680420d298cdf3719d0a0c030173fe3;hp=c22fbfd34ddcd0d7d1a25fa72a5102ab7f7a24e8;hpb=dc6ea00cd2b91b591e6726e5bf1d5e03a4a9bdd0;p=ffmpeg diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index c22fbfd34dd..59358eb5558 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -59,6 +59,47 @@ #define VISUAL_OBJ_STARTCODE 0x1B5 #define VOP_STARTCODE 0x1B6 +typedef struct Mpeg4DecContext { + MpegEncContext m; + + ///< number of bits to represent the fractional part of time + int time_increment_bits; + int shape; + int vol_sprite_usage; + int sprite_brightness_change; + int num_sprite_warping_points; + ///< sprite trajectory points + uint16_t sprite_traj[4][2]; + ///< sprite shift [isChroma] + int sprite_shift[2]; + + // reversible vlc + int rvlc; + ///< could this stream contain resync markers + int resync_marker; + ///< time distance of first I -> B, used for interlaced b frames + int t_frame; + + int new_pred; + int enhancement_type; + int scalability; + int use_intra_dc_vlc; + ///< QP above whch the ac VLC should be used for intra dc + int intra_dc_threshold; + + /* bug workarounds */ + int divx_version; + int divx_build; + int xvid_build; + int lavc_build; + ///< flag for having shown the warning about divxs invalid b frames + int showed_packed_warning; + + int cplx_estimation_trash_i; + int cplx_estimation_trash_p; + int cplx_estimation_trash_b; +} Mpeg4DecContext; + /* dc encoding for mpeg4 */ extern const uint8_t ff_mpeg4_DCtab_lum[13][2]; extern const uint8_t ff_mpeg4_DCtab_chrom[13][2]; @@ -94,17 +135,18 @@ void ff_mpeg4_pred_ac(MpegEncContext *s, int16_t *block, int n, void ff_set_mpeg4_time(MpegEncContext *s); void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number); -int ff_mpeg4_decode_picture_header(MpegEncContext *s, GetBitContext *gb); +int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb); void ff_mpeg4_encode_video_packet_header(MpegEncContext *s); void ff_mpeg4_clean_buffers(MpegEncContext *s); void ff_mpeg4_stuffing(PutBitContext *pbc); void ff_mpeg4_init_partitions(MpegEncContext *s); void ff_mpeg4_merge_partitions(MpegEncContext *s); void ff_clean_mpeg4_qscales(MpegEncContext *s); -int ff_mpeg4_decode_partitions(MpegEncContext *s); +int ff_mpeg4_decode_partitions(Mpeg4DecContext *ctx); int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s); -int ff_mpeg4_decode_video_packet_header(MpegEncContext *s); +int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx); void ff_mpeg4_init_direct_mv(MpegEncContext *s); +int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size); /** *