X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegvideo.h;h=cd16b16f2a447a8c359c7f0ca82d7319fce3a3af;hb=61f40fbb528d6e25b78ce673826388e3493155c4;hp=8ba13213c3aef2813a700b3ab8875034262f5f9e;hpb=91a697576169a19e01202035f0fb6e0d320edff3;p=ffmpeg diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 8ba13213c3a..cd16b16f2a4 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -33,6 +33,7 @@ #include "error_resilience.h" #include "get_bits.h" #include "h264chroma.h" +#include "h263dsp.h" #include "hpeldsp.h" #include "put_bits.h" #include "ratecontrol.h" @@ -65,6 +66,8 @@ enum OutputFormat { #define MAX_THREADS 32 #define MAX_PICTURE_COUNT 36 +#define MAX_B_FRAMES 16 + #define ME_MAP_SIZE 64 #define ME_MAP_SHIFT 3 #define ME_MAP_MV_BITS 11 @@ -107,6 +110,30 @@ typedef struct Picture{ AVBufferRef *mb_type_buf; uint32_t *mb_type; +#if !FF_API_MB_TYPE +#define MB_TYPE_INTRA4x4 0x0001 +#define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific +#define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific +#define MB_TYPE_16x16 0x0008 +#define MB_TYPE_16x8 0x0010 +#define MB_TYPE_8x16 0x0020 +#define MB_TYPE_8x8 0x0040 +#define MB_TYPE_INTERLACED 0x0080 +#define MB_TYPE_DIRECT2 0x0100 //FIXME +#define MB_TYPE_ACPRED 0x0200 +#define MB_TYPE_GMC 0x0400 +#define MB_TYPE_SKIP 0x0800 +#define MB_TYPE_P0L0 0x1000 +#define MB_TYPE_P1L0 0x2000 +#define MB_TYPE_P0L1 0x4000 +#define MB_TYPE_P1L1 0x8000 +#define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) +#define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) +#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) +#define MB_TYPE_QUANT 0x00010000 +#define MB_TYPE_CBP 0x00020000 +#endif + AVBufferRef *mbskip_table_buf; uint8_t *mbskip_table; @@ -396,6 +423,7 @@ typedef struct MpegEncContext { H264ChromaContext h264chroma; HpelDSPContext hdsp; VideoDSPContext vdsp; + H263DSPContext h263dsp; int f_code; ///< forward MV resolution int b_code; ///< backward MV resolution for B Frames (mpeg4) int16_t (*p_mv_table_base)[2]; @@ -745,6 +773,11 @@ typedef struct MpegEncContext { int context_reinit; ERContext er; + + int error_rate; + + /* temporary frames used by b_frame_strategy = 2 */ + AVFrame *tmp_frames[MAX_B_FRAMES + 2]; } MpegEncContext; #define REBASE_PICTURE(pic, new_ctx, old_ctx) \ @@ -770,7 +803,9 @@ typedef struct MpegEncContext { FF_MPV_OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ { "chroma_elim_threshold", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)",\ FF_MPV_OFFSET(chroma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ -{ "quantizer_noise_shaping", NULL, FF_MPV_OFFSET(quantizer_noise_shaping), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, +{ "quantizer_noise_shaping", NULL, FF_MPV_OFFSET(quantizer_noise_shaping), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS },\ +{ "error_rate", "Simulate errors in the bitstream to test error concealment.", \ + FF_MPV_OFFSET(error_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, extern const AVOption ff_mpv_generic_options[]; @@ -924,7 +959,6 @@ void ff_mpeg1_encode_slice_header(MpegEncContext *s); extern const uint8_t ff_aic_dc_scale_table[32]; extern const uint8_t ff_h263_chroma_qscale_table[32]; -extern const uint8_t ff_h263_loop_filter_strength[32]; /* rv10.c */ void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number);