# HG changeset patch # User michael # Date 1220886197 0 # Node ID 635ed2559262cc853d872876a09637eab42a46e9 # Parent 4525dcd813574bcb46c904bbe4e2acbf412c26ad Remove stuff under #if LIBAVCODEC_VERSION_INT. diff -r 4525dcd81357 -r 635ed2559262 allcodecs.c --- a/allcodecs.c Mon Sep 08 14:24:59 2008 +0000 +++ b/allcodecs.c Mon Sep 08 15:03:17 2008 +0000 @@ -298,9 +298,6 @@ REGISTER_ENCODER (LIBVORBIS, libvorbis); REGISTER_ENCODER (LIBX264, libx264); REGISTER_ENCODER (LIBXVID, libxvid); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - REGISTER_DECODER (MPEG4AAC, mpeg4aac); -#endif /* parsers */ REGISTER_PARSER (AAC, aac); diff -r 4525dcd81357 -r 635ed2559262 avcodec.h --- a/avcodec.h Mon Sep 08 14:24:59 2008 +0000 +++ b/avcodec.h Mon Sep 08 15:03:17 2008 +0000 @@ -263,9 +263,6 @@ CODEC_ID_MP2= 0x15000, CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 CODEC_ID_AAC, -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - CODEC_ID_MPEG4AAC, -#endif CODEC_ID_AC3, CODEC_ID_DTS, CODEC_ID_VORBIS, @@ -325,12 +322,6 @@ * stream (only used by libavformat) */ }; -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -/* CODEC_ID_MP3LAME is obsolete */ -#define CODEC_ID_MP3LAME CODEC_ID_MP3 -#define CODEC_ID_MPEG4AAC CODEC_ID_AAC -#endif - enum CodecType { CODEC_TYPE_UNKNOWN = -1, CODEC_TYPE_VIDEO, @@ -438,15 +429,9 @@ #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT. #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay. #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan. -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -#define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< Use trellis quantization. -#endif #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe. #define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT). /* Fx : Flag for h263+ extra options */ -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -#define CODEC_FLAG_H263P_AIC 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction (remove this) -#endif #define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction #define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector #define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp. @@ -1031,11 +1016,6 @@ void *priv_data; -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - /* unused, FIXME remove*/ - int rtp_mode; -#endif - int rtp_payload_size; /* The size of the RTP payload: the coder will */ /* do its best to deliver a chunk with size */ /* below rtp_payload_size, the chunk will start */ @@ -1348,12 +1328,6 @@ */ float dark_masking; - -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - /* for binary compatibility */ - int unused; -#endif - /** * IDCT algorithm, see FF_IDCT_* below. * - encoding: Set by user. @@ -1430,11 +1404,7 @@ * - encoding: Set by libavcodec. * - decoding: Set by user. */ -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - int bits_per_sample; -#else int bits_per_coded_sample; -#endif /** * prediction method (needed for huffyuv) @@ -2373,43 +2343,6 @@ void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance); void av_resample_close(struct AVResampleContext *c); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -/* YUV420 format is assumed ! */ - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -typedef struct ImgReSampleContext ImgReSampleContext attribute_deprecated; - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated ImgReSampleContext *img_resample_init(int output_width, int output_height, - int input_width, int input_height); - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated ImgReSampleContext *img_resample_full_init(int owidth, int oheight, - int iwidth, int iheight, - int topBand, int bottomBand, - int leftBand, int rightBand, - int padtop, int padbottom, - int padleft, int padright); - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated void img_resample(struct ImgReSampleContext *s, - AVPicture *output, const AVPicture *input); - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated void img_resample_close(struct ImgReSampleContext *s); - -#endif - /** * Allocate memory for a picture. Call avpicture_free to free it. * @@ -2540,16 +2473,6 @@ int img_get_alpha_info(const AVPicture *src, int pix_fmt, int width, int height); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -/** - * convert among pixel formats - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated int img_convert(AVPicture *dst, int dst_pix_fmt, - const AVPicture *src, int pix_fmt, - int width, int height); -#endif - /* deinterlace a picture */ /* deinterlace - if not supported return -1 */ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, @@ -2557,9 +2480,6 @@ /* external high level API */ -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -extern AVCodec *first_avcodec; -#endif AVCodec *av_codec_next(AVCodec *c); /** @@ -2567,11 +2487,6 @@ */ unsigned avcodec_version(void); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -/* returns LIBAVCODEC_BUILD constant */ -attribute_deprecated unsigned avcodec_build(void); -#endif - /** * Initializes libavcodec. * @@ -2923,9 +2838,6 @@ struct AVCodecParser *next; } AVCodecParser; -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -extern AVCodecParser *av_first_parser; -#endif AVCodecParser *av_parser_next(AVCodecParser *c); void av_register_codec_parser(AVCodecParser *parser); @@ -2999,26 +2911,6 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated void img_copy(AVPicture *dst, const AVPicture *src, - int pix_fmt, int width, int height); - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated int img_crop(AVPicture *dst, const AVPicture *src, - int pix_fmt, int top_band, int left_band); - -/** - * @deprecated Use the software scaler (swscale) instead. - */ -attribute_deprecated int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, - int padtop, int padbottom, int padleft, int padright, int *color); -#endif - extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v); /** diff -r 4525dcd81357 -r 635ed2559262 eval.c --- a/eval.c Mon Sep 08 14:24:59 2008 +0000 +++ b/eval.c Mon Sep 08 15:03:17 2008 +0000 @@ -424,20 +424,6 @@ return d; } -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -attribute_deprecated double ff_eval(char *s, double *const_value, const char **const_name, - double (**func1)(void *, double), const char **func1_name, - double (**func2)(void *, double, double), char **func2_name, - void *opaque){ - const char *error=NULL; - double ret; - ret = ff_eval2(s, const_value, const_name, func1, func1_name, func2, func2_name, opaque, &error); - if (error) - av_log(NULL, AV_LOG_ERROR, "Error evaluating \"%s\": %s\n", s, error); - return ret; -} -#endif - #ifdef TEST #undef printf static double const_values[]={ diff -r 4525dcd81357 -r 635ed2559262 imgconvert.c --- a/imgconvert.c Mon Sep 08 14:24:59 2008 +0000 +++ b/imgconvert.c Mon Sep 08 15:03:17 2008 +0000 @@ -2087,27 +2087,6 @@ return 0; } -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -void img_copy(AVPicture *dst, const AVPicture *src, - int pix_fmt, int width, int height) -{ - av_picture_copy(dst, src, pix_fmt, width, height); -} - -int img_crop(AVPicture *dst, const AVPicture *src, - int pix_fmt, int top_band, int left_band) -{ - return av_picture_crop(dst, src, pix_fmt, top_band, left_band); -} - -int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, - int pix_fmt, int padtop, int padbottom, int padleft, int padright, - int *color) -{ - return av_picture_pad(dst, src, height, width, pix_fmt, padtop, padbottom, padleft, padright, color); -} -#endif - #ifndef CONFIG_SWSCALE static uint8_t y_ccir_to_jpeg[256]; static uint8_t y_jpeg_to_ccir[256]; diff -r 4525dcd81357 -r 635ed2559262 libfaad.c --- a/libfaad.c Mon Sep 08 14:24:59 2008 +0000 +++ b/libfaad.c Mon Sep 08 15:03:17 2008 +0000 @@ -332,9 +332,5 @@ // FIXME - raw AAC files - maybe just one entry will be enough AAC_CODEC(CODEC_ID_AAC, libfaad, "libfaad AAC (Advanced Audio Codec)"); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -// If it's mp4 file - usually embeded into Qt Mov -AAC_CODEC(CODEC_ID_MPEG4AAC, mpeg4aac, "libfaad AAC (Advanced Audio Codec)"); -#endif #undef AAC_CODEC diff -r 4525dcd81357 -r 635ed2559262 libxvidff.c --- a/libxvidff.c Mon Sep 08 14:24:59 2008 +0000 +++ b/libxvidff.c Mon Sep 08 15:03:17 2008 +0000 @@ -100,9 +100,6 @@ if( xvid_flags & CODEC_FLAG_4MV ) x->vop_flags |= XVID_VOP_INTER4V; /* Level 3 */ if( avctx->trellis -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - || xvid_flags & CODEC_FLAG_TRELLIS_QUANT -#endif ) x->vop_flags |= XVID_VOP_TRELLISQUANT; /* Level 5 */ if( xvid_flags & CODEC_FLAG_AC_PRED ) diff -r 4525dcd81357 -r 635ed2559262 mpegvideo_enc.c --- a/mpegvideo_enc.c Mon Sep 08 14:24:59 2008 +0000 +++ b/mpegvideo_enc.c Mon Sep 08 15:03:17 2008 +0000 @@ -332,11 +332,6 @@ s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC); s->q_scale_type= !!(s->flags2 & CODEC_FLAG2_NON_LINEAR_QUANT); -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - if (s->flags & CODEC_FLAG_TRELLIS_QUANT) - avctx->trellis = 1; -#endif - if(avctx->rc_max_rate && !avctx->rc_buffer_size){ av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); return -1; diff -r 4525dcd81357 -r 635ed2559262 utils.c --- a/utils.c Mon Sep 08 14:24:59 2008 +0000 +++ b/utils.c Mon Sep 08 15:03:17 2008 +0000 @@ -413,9 +413,6 @@ {"ildct", "use interlaced dct", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_INTERLACED_DCT, INT_MIN, INT_MAX, V|E, "flags"}, {"low_delay", "force low delay", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_LOW_DELAY, INT_MIN, INT_MAX, V|D|E, "flags"}, {"alt", "enable alternate scantable (mpeg2/mpeg4)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_ALT_SCAN, INT_MIN, INT_MAX, V|E, "flags"}, -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -{"trell", "use trellis quantization", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_TRELLIS_QUANT, INT_MIN, INT_MAX, V|E, "flags"}, -#endif {"global_header", "place global headers in extradata instead of every keyframe", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_GLOBAL_HEADER, INT_MIN, INT_MAX, V|A|E, "flags"}, {"bitexact", "use only bitexact stuff (except (i)dct)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_BITEXACT, INT_MIN, INT_MAX, A|V|S|D|E, "flags"}, {"aic", "h263 advanced intra coding / mpeg4 ac prediction", 0, FF_OPT_TYPE_CONST, CODEC_FLAG_AC_PRED, INT_MIN, INT_MAX, V|E, "flags"}, @@ -433,9 +430,6 @@ {"local_header", "place global headers at every keyframe instead of in extradata", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_LOCAL_HEADER, INT_MIN, INT_MAX, V|E, "flags2"}, {"sub_id", NULL, OFFSET(sub_id), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, {"me_method", "set motion estimation method", OFFSET(me_method), FF_OPT_TYPE_INT, ME_EPZS, INT_MIN, INT_MAX, V|E, "me_method"}, -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -{"me", "set motion estimation method (deprecated, use me_method instead)", OFFSET(me_method), FF_OPT_TYPE_INT, ME_EPZS, INT_MIN, INT_MAX, V|E, "me_method"}, -#endif {"zero", "zero motion estimation (fastest)", 0, FF_OPT_TYPE_CONST, ME_ZERO, INT_MIN, INT_MAX, V|E, "me_method" }, {"full", "full motion estimation (slowest)", 0, FF_OPT_TYPE_CONST, ME_FULL, INT_MIN, INT_MAX, V|E, "me_method" }, {"epzs", "EPZS motion estimation (default)", 0, FF_OPT_TYPE_CONST, ME_EPZS, INT_MIN, INT_MAX, V|E, "me_method" }, @@ -469,9 +463,6 @@ {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E}, {"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E}, {"hurry_up", NULL, OFFSET(hurry_up), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|D}, -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -{"rtp_mode", NULL, OFFSET(rtp_mode), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, -#endif {"ps", "rtp payload size in bits", OFFSET(rtp_payload_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E}, {"mv_bits", NULL, OFFSET(mv_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, {"header_bits", NULL, OFFSET(header_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, @@ -567,11 +558,7 @@ {"ec", "set error concealment strategy", OFFSET(error_concealment), FF_OPT_TYPE_FLAGS, 3, INT_MIN, INT_MAX, V|D, "ec"}, {"guess_mvs", "iterative motion vector (MV) search (slow)", 0, FF_OPT_TYPE_CONST, FF_EC_GUESS_MVS, INT_MIN, INT_MAX, V|D, "ec"}, {"deblock", "use strong deblock filter for damaged MBs", 0, FF_OPT_TYPE_CONST, FF_EC_DEBLOCK, INT_MIN, INT_MAX, V|D, "ec"}, -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -{"bits_per_sample", NULL, OFFSET(bits_per_sample), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, -#else {"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, -#endif {"pred", "prediction method", OFFSET(prediction_method), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E, "pred"}, {"left", NULL, 0, FF_OPT_TYPE_CONST, FF_PRED_LEFT, INT_MIN, INT_MAX, V|E, "pred"}, {"plane", NULL, 0, FF_OPT_TYPE_CONST, FF_PRED_PLANE, INT_MIN, INT_MAX, V|E, "pred"}, @@ -961,15 +948,6 @@ return ret; } -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, - int *frame_size_ptr, - const uint8_t *buf, int buf_size){ - *frame_size_ptr= AVCODEC_MAX_AUDIO_FRAME_SIZE; - return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size); -} -#endif - int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const uint8_t *buf, int buf_size) @@ -1237,13 +1215,6 @@ return LIBAVCODEC_VERSION_INT; } -#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) -unsigned avcodec_build( void ) -{ - return LIBAVCODEC_BUILD; -} -#endif - void avcodec_init(void) { static int initialized = 0;