diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/avcodec.h')
-rw-r--r-- | src/libffmpeg/libavcodec/avcodec.h | 136 |
1 files changed, 60 insertions, 76 deletions
diff --git a/src/libffmpeg/libavcodec/avcodec.h b/src/libffmpeg/libavcodec/avcodec.h index 9f80071aa..8e2fc3d58 100644 --- a/src/libffmpeg/libavcodec/avcodec.h +++ b/src/libffmpeg/libavcodec/avcodec.h @@ -5,8 +5,8 @@ #define LIBAVCODEC_VERSION_INT 0x000406 #define LIBAVCODEC_VERSION "0.4.6" -#define LIBAVCODEC_BUILD 4632 -#define LIBAVCODEC_BUILD_STR "4632" +#define LIBAVCODEC_BUILD 4638 +#define LIBAVCODEC_BUILD_STR "4638" enum CodecID { CODEC_ID_NONE, @@ -32,6 +32,8 @@ enum CodecID { CODEC_ID_DVAUDIO, CODEC_ID_WMAV1, CODEC_ID_WMAV2, + CODEC_ID_MACE3, + CODEC_ID_MACE6, /* various pcm "codecs" */ CODEC_ID_PCM_S16LE, @@ -48,7 +50,6 @@ enum CodecID { CODEC_ID_ADPCM_IMA_WAV, CODEC_ID_ADPCM_MS, }; -#define CODEC_ID_MSMPEG4 CODEC_ID_MSMPEG4V3 enum CodecType { CODEC_TYPE_UNKNOWN = -1, @@ -78,6 +79,12 @@ enum SampleFormat { /* in bytes */ #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 +/** + * Required number of zero bytes at the end of the input bitstream for decoding. + * to avoid overreading (and possibly segfaulting) + */ +#define FF_INPUT_BUFFER_PADDING_SIZE 8 + /* motion estimation type, EPZS by default */ enum Motion_Est_ID { ME_ZERO = 1, @@ -115,7 +122,6 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG, #define CODEC_FLAG_4MV 0x0004 /* 4 MV per MB allowed */ #define CODEC_FLAG_QPEL 0x0010 /* use qpel MC */ #define CODEC_FLAG_GMC 0x0020 /* use GMC */ -#define CODEC_FLAG_TYPE 0x0040 /* fixed I/P frame type, from avctx->key_frame */ #define CODEC_FLAG_PART 0x0080 /* use data partitioning */ /* parent program gurantees that the input for b-frame containing streams is not written to for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */ @@ -126,10 +132,11 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG, #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */ #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */ #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */ -#define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode - allows the last part of a frame to be decoded earlier */ +#define CODEC_FLAG_TRUNCATED 0x00010000 /* input bitstream might be truncated at a random location instead + of only at frame boundaries */ #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */ #define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */ +#define CODEC_FLAG_LOW_DELAY 0x00080000 /* force low delay / will fail on b frames */ /* codec capabilities */ @@ -138,6 +145,7 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG, /* if 'parse_only' field is true, then avcodec_parse_frame() can be used */ #define CODEC_CAP_PARSE_ONLY 0x0004 +#define CODEC_CAP_TRUNCATED 0x0008 #define FRAME_RATE_BASE 10000 @@ -348,7 +356,7 @@ typedef struct AVCodecContext { /** * encoding: unused - * decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too + * decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header */ int hurry_up; @@ -400,7 +408,7 @@ typedef struct AVCodecContext { /** * number of bits used for the previously encoded frame * encoding: set by lavc - * decoding: unused + * decoding: - for audio - bits_per_sample */ int frame_bits; @@ -467,15 +475,17 @@ typedef struct AVCodecContext { */ int error_resilience; -#ifndef MBC -#define MBC 128 -#define MBR 96 -#endif -#define QP_TYPE int //FIXME note xxx this might be changed to int8_t - - QP_TYPE *quant_store; /* field for communicating with external postprocessing */ + /** + * obsolete, just here to keep ABI compatible (should be removed perhaps, dunno) + */ + int *quant_store; - unsigned qstride; + /** + * QP store stride + * encoding: unused + * decoding: set by lavc + */ + int qstride; /** * buffer, where the next picture should be decoded into @@ -646,6 +656,7 @@ typedef struct AVCodecContext { #define FF_DCT_INT 2 #define FF_DCT_MMX 3 #define FF_DCT_MLIB 4 +#define FF_DCT_ALTIVEC 5 /** * presentation timestamp in micro seconds (time when frame should be shown to user) @@ -712,6 +723,7 @@ typedef struct AVCodecContext { #define FF_IDCT_PS2 5 #define FF_IDCT_MLIB 6 #define FF_IDCT_ARM 7 +#define FF_IDCT_ALTIVEC 8 /** * slice count @@ -735,40 +747,29 @@ typedef struct AVCodecContext { #define FF_EC_GUESS_MVS 1 #define FF_EC_DEBLOCK 2 - //FIXME this should be reordered after kabis API is finished ... - //TODO kill kabi - /* - Note: Below are located reserved fields for further usage - It requires for ABI !!! - If you'll perform some changes then borrow new space from these fields - (void * can be safety replaced with struct * ;) - P L E A S E ! ! ! - Note: use avcodec_alloc_context instead of malloc to allocate this, - otherwise the ABI compatibility will be broken between versions - IMPORTANT: Never change order of already declared fields!!! - */ - //TODO: remove mess below - unsigned long long int - ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5, - ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11; - float - flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5, - flt_res6,flt_res7,flt_res8,flt_res9,flt_res10,flt_res11,flt_res12; - void - *ptr_res0,*ptr_res1,*ptr_res2,*ptr_res3,*ptr_res4,*ptr_res5, - *ptr_res6,*ptr_res7,*ptr_res8,*ptr_res9,*ptr_res10,*ptr_res11,*ptr_res12; - unsigned long int - ul_res0,ul_res1,ul_res2,ul_res3,ul_res4,ul_res5, - ul_res6,ul_res7,ul_res8,ul_res9,ul_res10,ul_res11,ul_res12; - unsigned short int - us_res0,us_res1,us_res2,us_res3,us_res4,us_res5, - us_res6,us_res7,us_res8,us_res9,us_res10,us_res11,us_res12; - unsigned char - uc_res0,uc_res1,uc_res2,uc_res3,uc_res4,uc_res5, - uc_res6,uc_res7,uc_res8,uc_res9,uc_res10,uc_res11,uc_res12; - unsigned int - ui_res0,ui_res1,ui_res2,ui_res3,ui_res4,ui_res5,ui_res6,ui_res7,ui_res8,ui_res9, - ui_res10,ui_res11,ui_res12,ui_res13,ui_res14,ui_res15,ui_res16; + /** + * QP table of the currently decoded frame + * encoding; unused + * decoding: set by lavc + */ + int8_t *current_qscale_table; + /** + * QP table of the currently displayed frame + * encoding; unused + * decoding: set by lavc + */ + int8_t *display_qscale_table; + /** + * force specific pict_type. + * encoding; set by user (I/P/B_TYPE) + * decoding: unused + */ + int force_type; + /** + * dsp_mask could be used to disable unwanted + * CPU features (i.e. MMX, SSE. ...) + */ + unsigned dsp_mask; } AVCodecContext; typedef struct AVCodec { @@ -783,29 +784,15 @@ typedef struct AVCodec { UINT8 *buf, int buf_size); int capabilities; struct AVCodec *next; - /* - Note: Below are located reserved fields for further usage - It requires for ABI !!! - If you'll perform some changes then borrow new space from these fields - (void * can be safety replaced with struct * ;) - P L E A S E ! ! ! - IMPORTANT: Never change order of already declared fields!!! - */ - unsigned long long int - ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5, - ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11,ull_res12; - float - flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5, - flt_res6,flt_res7,flt_res8,flt_res9,flt_res10,flt_res11,flt_res12; - void - *ptr_res0,*ptr_res1,*ptr_res2,*ptr_res3,*ptr_res4,*ptr_res5, - *ptr_res6,*ptr_res7,*ptr_res8,*ptr_res9,*ptr_res10,*ptr_res11,*ptr_res12; } AVCodec; -/* three components are given, that's all */ +/** + * four components are given, that's all. + * the last component is alpha + */ typedef struct AVPicture { - UINT8 *data[3]; - int linesize[3]; + UINT8 *data[4]; + int linesize[4]; } AVPicture; extern AVCodec ac3_encoder; @@ -842,11 +829,13 @@ extern AVCodec wmav2_decoder; extern AVCodec mjpeg_decoder; extern AVCodec mp2_decoder; extern AVCodec mp3_decoder; +extern AVCodec mace3_decoder; +extern AVCodec mace6_decoder; /* pcm codecs */ #define PCM_CODEC(id, name) \ extern AVCodec name ## _decoder; \ -extern AVCodec name ## _encoder; +extern AVCodec name ## _encoder PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be); @@ -955,11 +944,6 @@ void avcodec_register_all(void); void avcodec_flush_buffers(AVCodecContext *avctx); -#ifdef FF_POSTPROCESS -extern int quant_store[MBR+1][MBC+1]; // [Review] -#endif - - /** * Interface for 0.5.0 version * |