From 42420e7b946272bc1e4b2aa2a95512c86db02831 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 14:43:53 +0100 Subject: lavc: remove the FF_API_MM_FLAGS cruft. --- libavcodec/avcodec.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index df4e61798e..5d85b4122f 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1740,25 +1740,6 @@ typedef struct AVCodecContext { */ unsigned dsp_mask; -#if FF_API_MM_FLAGS -#define FF_MM_FORCE AV_CPU_FLAG_FORCE -#define FF_MM_MMX AV_CPU_FLAG_MMX -#define FF_MM_3DNOW AV_CPU_FLAG_3DNOW -#define FF_MM_MMXEXT AV_CPU_FLAG_MMX2 -#define FF_MM_MMX2 AV_CPU_FLAG_MMX2 -#define FF_MM_SSE AV_CPU_FLAG_SSE -#define FF_MM_SSE2 AV_CPU_FLAG_SSE2 -#define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW -#define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT -#define FF_MM_SSE3 AV_CPU_FLAG_SSE3 -#define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW -#define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3 -#define FF_MM_SSE4 AV_CPU_FLAG_SSE4 -#define FF_MM_SSE42 AV_CPU_FLAG_SSE42 -#define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT -#define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC -#endif - /** * bits per sample/pixel from the demuxer (needed for huffyuv). * - encoding: Set by libavcodec. -- cgit v1.2.3 From 9b4f1cdb6a7e838c0261109e8a6262e78657ee7b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 14:48:00 +0100 Subject: lavc: remove the FF_API_AUDIO_OLD cruft. --- libavcodec/avcodec.h | 27 --------------------------- libavcodec/resample.c | 11 ----------- libavcodec/utils.c | 14 -------------- libavcodec/version.h | 3 --- 4 files changed, 55 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5d85b4122f..cf3664a973 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3227,14 +3227,6 @@ struct AVResampleContext; typedef struct ReSampleContext ReSampleContext; -#if FF_API_AUDIO_OLD -/** - * @deprecated Use av_audio_resample_init() instead. - */ -attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels, - int output_rate, int input_rate); -#endif - /** * Initialize audio resampling context. * @@ -3706,25 +3698,6 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, */ int avcodec_open(AVCodecContext *avctx, AVCodec *codec); -#if FF_API_AUDIO_OLD -/** - * Decode an audio frame from buf into samples. - * Wrapper function which calls avcodec_decode_audio3. - * - * @deprecated Use avcodec_decode_audio3 instead. - * @param avctx the codec context - * @param[out] samples the output buffer - * @param[in,out] frame_size_ptr the output buffer size in bytes - * @param[in] buf the input buffer - * @param[in] buf_size the input buffer size in bytes - * @return On error a negative value is returned, otherwise the number of bytes - * used or zero if no frame could be decompressed. - */ -attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, - int *frame_size_ptr, - const uint8_t *buf, int buf_size); -#endif - /** * Decode the audio frame of size avpkt->size from avpkt->data into samples. * Some decoders may support multiple frames in a single AVPacket, such diff --git a/libavcodec/resample.c b/libavcodec/resample.c index 8e666894ac..2185a11ad7 100644 --- a/libavcodec/resample.c +++ b/libavcodec/resample.c @@ -218,17 +218,6 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels, return s; } -#if FF_API_AUDIO_OLD -ReSampleContext *audio_resample_init(int output_channels, int input_channels, - int output_rate, int input_rate) -{ - return av_audio_resample_init(output_channels, input_channels, - output_rate, input_rate, - AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16, - TAPS, 10, 0, 0.8); -} -#endif - /* resample audio. 'nb_samples' is the number of input samples */ /* XXX: optimize it ! */ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6d31254afb..e90be4614d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -679,20 +679,6 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi return ret; } -#if FF_API_AUDIO_OLD -int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, - int *frame_size_ptr, - const uint8_t *buf, int buf_size) -{ - AVPacket avpkt; - av_init_packet(&avpkt); - avpkt.data = buf; - avpkt.size = buf_size; - - return avcodec_decode_audio3(avctx, samples, frame_size_ptr, &avpkt); -} -#endif - int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) diff --git a/libavcodec/version.h b/libavcodec/version.h index 08574f784b..8c891e248e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,6 @@ #ifndef FF_API_PALETTE_CONTROL #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) #endif -#ifndef FF_API_AUDIO_OLD -#define FF_API_AUDIO_OLD (LIBAVCODEC_VERSION_MAJOR < 53) -#endif #ifndef FF_API_VIDEO_OLD #define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From e89e5afdd04a0f081ecc38b528c1147f204027d7 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 14:48:39 +0100 Subject: lavc: remove the FF_API_VIDEO_OLD cruft. --- libavcodec/avcodec.h | 19 ------------------- libavcodec/utils.c | 16 ---------------- libavcodec/version.h | 3 --- 3 files changed, 38 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index cf3664a973..78dd20822a 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3741,25 +3741,6 @@ int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt); -#if FF_API_VIDEO_OLD -/** - * Decode a video frame from buf into picture. - * Wrapper function which calls avcodec_decode_video2. - * - * @deprecated Use avcodec_decode_video2 instead. - * @param avctx the codec context - * @param[out] picture The AVFrame in which the decoded video frame will be stored. - * @param[in] buf the input buffer - * @param[in] buf_size the size of the input buffer in bytes - * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. - * @return On error a negative value is returned, otherwise the number of bytes - * used or zero if no frame could be decompressed. - */ -attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, - int *got_picture_ptr, - const uint8_t *buf, int buf_size); -#endif - /** * Decode the video frame of size avpkt->size from avpkt->data into picture. * Some decoders may support multiple frames in a single AVPacket, such diff --git a/libavcodec/utils.c b/libavcodec/utils.c index e90be4614d..89bd4a1f55 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -631,22 +631,6 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, return ret; } -#if FF_API_VIDEO_OLD -int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, - int *got_picture_ptr, - const uint8_t *buf, int buf_size) -{ - AVPacket avpkt; - av_init_packet(&avpkt); - avpkt.data = buf; - avpkt.size = buf_size; - // HACK for CorePNG to decode as normal PNG by default - avpkt.flags = AV_PKT_FLAG_KEY; - - return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt); -} -#endif - int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt) diff --git a/libavcodec/version.h b/libavcodec/version.h index 8c891e248e..2d460b9744 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,6 @@ #ifndef FF_API_PALETTE_CONTROL #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) #endif -#ifndef FF_API_VIDEO_OLD -#define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53) -#endif #ifndef FF_API_SUBTITLE_OLD #define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From db4d3a7421ec70de0d5ccd8a9f99b46b5c780d23 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 14:50:06 +0100 Subject: lavc: remove the FF_API_SUBTITLE_OLD cruft. --- libavcodec/avcodec.h | 9 --------- libavcodec/utils.c | 14 -------------- libavcodec/version.h | 3 --- 3 files changed, 26 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 78dd20822a..c47b0065e7 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3785,15 +3785,6 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt); -#if FF_API_SUBTITLE_OLD -/* Decode a subtitle message. Return -1 if error, otherwise return the - * number of bytes used. If no subtitle could be decompressed, - * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */ -attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, - int *got_sub_ptr, - const uint8_t *buf, int buf_size); -#endif - /** * Decode a subtitle message. * Return a negative value on error, otherwise return the number of bytes used. diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 89bd4a1f55..aa2e55693c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -692,20 +692,6 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa return ret; } -#if FF_API_SUBTITLE_OLD -int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, - int *got_sub_ptr, - const uint8_t *buf, int buf_size) -{ - AVPacket avpkt; - av_init_packet(&avpkt); - avpkt.data = buf; - avpkt.size = buf_size; - - return avcodec_decode_subtitle2(avctx, sub, got_sub_ptr, &avpkt); -} -#endif - int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) diff --git a/libavcodec/version.h b/libavcodec/version.h index 2d460b9744..d3dd04f169 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,6 @@ #ifndef FF_API_PALETTE_CONTROL #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) #endif -#ifndef FF_API_SUBTITLE_OLD -#define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53) -#endif #ifndef FF_API_USE_LPC #define FF_API_USE_LPC (LIBAVCODEC_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From 01a4259b8db344586b371528973439109f3e2ace Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 14:51:50 +0100 Subject: lavc: remove the FF_API_USE_LPC cruft. --- libavcodec/avcodec.h | 10 ---------- libavcodec/flacenc.c | 11 ----------- libavcodec/options.c | 3 --- libavcodec/version.h | 3 --- 4 files changed, 27 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c47b0065e7..3eac5672b1 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2531,16 +2531,6 @@ typedef struct AVCodecContext { int compression_level; #define FF_COMPRESSION_DEFAULT -1 -#if FF_API_USE_LPC - /** - * Sets whether to use LPC mode - used by FLAC encoder. - * - encoding: Set by user. - * - decoding: unused - * @deprecated Deprecated in favor of lpc_type and lpc_passes. - */ - int use_lpc; -#endif - /** * LPC coefficient precision - used by FLAC encoder * - encoding: Set by user. diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index d93bfb5be4..f13d5801e2 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -285,17 +285,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level]; /* set compression option overrides from AVCodecContext */ -#if FF_API_USE_LPC - /* for compatibility with deprecated AVCodecContext.use_lpc */ - if (avctx->use_lpc == 0) { - s->options.lpc_type = AV_LPC_TYPE_FIXED; - } else if (avctx->use_lpc == 1) { - s->options.lpc_type = AV_LPC_TYPE_LEVINSON; - } else if (avctx->use_lpc > 1) { - s->options.lpc_type = AV_LPC_TYPE_CHOLESKY; - s->options.lpc_passes = avctx->use_lpc - 1; - } -#endif if (avctx->lpc_type > AV_LPC_TYPE_DEFAULT) { if (avctx->lpc_type > AV_LPC_TYPE_CHOLESKY) { av_log(avctx, AV_LOG_ERROR, "unknown lpc type: %d\n", avctx->lpc_type); diff --git a/libavcodec/options.c b/libavcodec/options.c index 5856f96754..2f9d7d93c7 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -396,9 +396,6 @@ static const AVOption options[]={ {"ivlc", "intra vlc table", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_INTRA_VLC, INT_MIN, INT_MAX, V|E, "flags2"}, {"b_sensitivity", "adjusts sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), FF_OPT_TYPE_INT, 40, 1, INT_MAX, V|E}, {"compression_level", NULL, OFFSET(compression_level), FF_OPT_TYPE_INT, FF_COMPRESSION_DEFAULT, INT_MIN, INT_MAX, V|A|E}, -#if FF_API_USE_LPC -{"use_lpc", "sets whether to use LPC mode (FLAC)", OFFSET(use_lpc), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, A|E}, -#endif {"lpc_coeff_precision", "LPC coefficient precision (FLAC)", OFFSET(lpc_coeff_precision), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, A|E}, {"min_prediction_order", NULL, OFFSET(min_prediction_order), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, A|E}, {"max_prediction_order", NULL, OFFSET(max_prediction_order), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, A|E}, diff --git a/libavcodec/version.h b/libavcodec/version.h index d3dd04f169..5c81e3a671 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,6 @@ #ifndef FF_API_PALETTE_CONTROL #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) #endif -#ifndef FF_API_USE_LPC -#define FF_API_USE_LPC (LIBAVCODEC_VERSION_MAJOR < 53) -#endif #ifndef FF_API_SET_STRING_OLD #define FF_API_SET_STRING_OLD (LIBAVCODEC_VERSION_MAJOR < 53) #endif -- cgit v1.2.3 From 251cf997cff7f3869bca043d20ba771e0588cae3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 15:00:50 +0100 Subject: lavc: remove the FF_API_INOFFICIAL cruft. --- libavcodec/avcodec.h | 3 --- libavcodec/options.c | 3 --- libavcodec/version.h | 3 --- 3 files changed, 9 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3eac5672b1..f90aa81ab7 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1464,9 +1464,6 @@ typedef struct AVCodecContext { #define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software. #define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences. #define FF_COMPLIANCE_NORMAL 0 -#if FF_API_INOFFICIAL -#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions (deprecated - use FF_COMPLIANCE_UNOFFICIAL instead). -#endif #define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things. diff --git a/libavcodec/options.c b/libavcodec/options.c index 2f9d7d93c7..3b92497770 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -164,9 +164,6 @@ static const AVOption options[]={ {"very", "strictly conform to a older more strict version of the spec or reference software", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_VERY_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"}, {"strict", "strictly conform to all the things in the spec no matter what consequences", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"}, {"normal", NULL, 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_NORMAL, INT_MIN, INT_MAX, V|D|E, "strict"}, -#if FF_API_INOFFICIAL -{"inofficial", "allow unofficial extensions (deprecated - use unofficial)", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"}, -#endif {"unofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_UNOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"}, {"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_EXPERIMENTAL, INT_MIN, INT_MAX, V|D|E, "strict"}, {"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 679a38e7e5..3146f765ee 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,6 @@ #ifndef FF_API_PALETTE_CONTROL #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) #endif -#ifndef FF_API_INOFFICIAL -#define FF_API_INOFFICIAL (LIBAVCODEC_VERSION_MAJOR < 53) -#endif #ifndef FF_API_OLD_SAMPLE_FMT #define FF_API_OLD_SAMPLE_FMT (LIBAVCODEC_VERSION_MAJOR < 54) #endif -- cgit v1.2.3 From 3453a231a6cebe5989c213be0f9fd6c71ec5ea23 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Apr 2011 20:46:49 +0200 Subject: lavc: remove misc disabled cruft. --- libavcodec/Makefile | 1 - libavcodec/avcodec.h | 114 +----------------------------------------------- libavcodec/dsputil.h | 8 ---- libavcodec/imgconvert.c | 51 ---------------------- libavcodec/opt.c | 66 ---------------------------- libavcodec/options.c | 3 -- libavcodec/parser.c | 37 ---------------- libavcodec/utils.c | 48 +------------------- libavcodec/xvmc.h | 21 --------- 9 files changed, 4 insertions(+), 345 deletions(-) delete mode 100644 libavcodec/opt.c (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 1cdae2c669..784226f7af 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -15,7 +15,6 @@ OBJS = allcodecs.o \ fmtconvert.o \ imgconvert.o \ jrevdct.o \ - opt.o \ options.o \ parser.o \ raw.o \ diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index f90aa81ab7..40d3b2245b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -33,12 +33,6 @@ #include "libavcodec/version.h" -#if LIBAVCODEC_VERSION_MAJOR < 53 -# define FF_INTERNALC_MEM_TYPE unsigned int -#else -# define FF_INTERNALC_MEM_TYPE size_t -#endif - /** * Identify the syntax and semantics of the bitstream. * The principle is roughly: @@ -117,9 +111,6 @@ enum CodecID { CODEC_ID_QDRAW, CODEC_ID_VIXL, CODEC_ID_QPEG, -#if LIBAVCODEC_VERSION_MAJOR < 53 - CODEC_ID_XVID, -#endif CODEC_ID_PNG, CODEC_ID_PPM, CODEC_ID_PBM, @@ -364,18 +355,6 @@ enum CodecID { CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information. }; -#if LIBAVCODEC_VERSION_MAJOR < 53 -#define CodecType AVMediaType - -#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN -#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO -#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO -#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA -#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE -#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT -#define CODEC_TYPE_NB AVMEDIA_TYPE_NB -#endif - #if FF_API_OLD_SAMPLE_FMT #define SampleFormat AVSampleFormat @@ -1100,9 +1079,6 @@ typedef struct AVPacket { int64_t convergence_duration; } AVPacket; #define AV_PKT_FLAG_KEY 0x0001 -#if LIBAVCODEC_VERSION_MAJOR < 53 -#define PKT_FLAG_KEY AV_PKT_FLAG_KEY -#endif /** * Audio Video Frame. @@ -1277,9 +1253,6 @@ typedef struct AVCodecContext { */ int frame_size; int frame_number; ///< audio or video frame number -#if LIBAVCODEC_VERSION_MAJOR < 53 - int real_pict_num; ///< Returns the real picture number of previous encoded frame. -#endif /** * Number of frames the decoded output will be delayed relative to @@ -3343,23 +3316,6 @@ void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int * const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt); void avcodec_set_dimensions(AVCodecContext *s, int width, int height); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * Return the pixel format corresponding to the name name. - * - * If there is no pixel format with name name, then look for a - * pixel format with the name corresponding to the native endian - * format of name. - * For example in a little-endian system, first look for "gray16", - * then for "gray16le". - * - * Finally if no pixel format has been found, return PIX_FMT_NONE. - * - * @deprecated Deprecated in favor of av_get_pix_fmt(). - */ -attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name); -#endif - /** * Return a value representing the fourCC code associated to the * pixel format pix_fmt, or 0 if no associated fourCC code can be @@ -3428,14 +3384,6 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Use av_get_pix_fmt_string() instead. - */ -attribute_deprecated -void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt); -#endif - #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */ #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */ @@ -3483,13 +3431,6 @@ const char *avcodec_license(void); */ void avcodec_init(void); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Deprecated in favor of avcodec_register(). - */ -attribute_deprecated void register_avcodec(AVCodec *codec); -#endif - /** * Register the codec codec and initialize libavcodec. * @@ -3634,24 +3575,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height); void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[4]); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Deprecated in favor of av_check_image_size(). - */ -attribute_deprecated -int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h); -#endif - enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Set s->thread_count before calling avcodec_open() instead of calling this. - */ -attribute_deprecated -int avcodec_thread_init(AVCodecContext *s, int thread_count); -void avcodec_thread_free(AVCodecContext *s); -#endif int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size); int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); //FIXME func typedef @@ -4036,15 +3961,6 @@ AVCodecParser *av_parser_next(AVCodecParser *c); void av_register_codec_parser(AVCodecParser *parser); AVCodecParserContext *av_parser_init(int codec_id); -#if LIBAVCODEC_VERSION_MAJOR < 53 -attribute_deprecated -int av_parser_parse(AVCodecParserContext *s, - AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, - int64_t pts, int64_t dts); -#endif - /** * Parse a packet. * @@ -4123,7 +4039,7 @@ AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f); * * @see av_realloc */ -void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size); +void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size); /** * Allocate a buffer, reusing the given one if large enough. @@ -4137,17 +4053,7 @@ void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_s * @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and * *size 0 if an error occurred. */ -void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size); - -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Deprecated in favor of av_image_copy(). - */ -attribute_deprecated -void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], - uint8_t *src_data[4], int src_linesize[4], - enum PixelFormat pix_fmt, int width, int height); -#endif +void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size); /** * Copy image src to dst. Wraps av_picture_data_copy() above. @@ -4176,22 +4082,6 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, */ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * Parse str and put in width_ptr and height_ptr the detected values. - * - * @deprecated Deprecated in favor of av_parse_video_size(). - */ -attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str); - -/** - * Parse str and store the detected values in *frame_rate. - * - * @deprecated Deprecated in favor of av_parse_video_rate(). - */ -attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str); -#endif - /** * Logs a generic warning message about a missing feature. This function is * intended to be used internally by Libav (libavcodec, libavformat, etc.) diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index 99b32831ec..8d8bc29dd5 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -104,14 +104,6 @@ void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); /* 1/2^n downscaling functions from imgconvert.c */ -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * @deprecated Use av_image_copy_plane() instead. - */ -attribute_deprecated -void ff_img_copy_plane(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); -#endif - void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); void ff_shrink88(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 09ccdbc906..23e4318c71 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -425,40 +425,11 @@ const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt) return av_pix_fmt_descriptors[pix_fmt].name; } -#if LIBAVCODEC_VERSION_MAJOR < 53 -enum PixelFormat avcodec_get_pix_fmt(const char *name) -{ - return av_get_pix_fmt(name); -} - -void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt) -{ - av_get_pix_fmt_string(buf, buf_size, pix_fmt); -} -#endif - int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt) { return av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL; } -#if LIBAVCODEC_VERSION_MAJOR < 53 -int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){ - return ff_set_systematic_pal2(pal, pix_fmt); -} - -int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width) -{ - return av_image_fill_linesizes(picture->linesize, pix_fmt, width); -} - -int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, - int height) -{ - return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize); -} -#endif - int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, int width, int height) { @@ -693,28 +664,6 @@ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelForma return dst_pix_fmt; } -#if LIBAVCODEC_VERSION_MAJOR < 53 -void ff_img_copy_plane(uint8_t *dst, int dst_wrap, - const uint8_t *src, int src_wrap, - int width, int height) -{ - av_image_copy_plane(dst, dst_wrap, src, src_wrap, width, height); -} - -int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane) -{ - return av_image_get_linesize(pix_fmt, width, plane); -} - -void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], - uint8_t *src_data[4], int src_linesize[4], - enum PixelFormat pix_fmt, int width, int height) -{ - av_image_copy(dst_data, dst_linesize, src_data, src_linesize, - pix_fmt, width, height); -} -#endif - void av_picture_copy(AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int width, int height) { diff --git a/libavcodec/opt.c b/libavcodec/opt.c deleted file mode 100644 index f2bff96380..0000000000 --- a/libavcodec/opt.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * AVOptions ABI compatibility wrapper - * Copyright (c) 2010 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "avcodec.h" -#include "opt.h" - -#if LIBAVCODEC_VERSION_MAJOR < 53 && CONFIG_SHARED && HAVE_SYMVER - -FF_SYMVER(const AVOption *, av_find_opt, (void *obj, const char *name, const char *unit, int mask, int flags), "LIBAVCODEC_52"){ - return av_find_opt(obj, name, unit, mask, flags); -} -FF_SYMVER(int, av_set_string3, (void *obj, const char *name, const char *val, int alloc, const AVOption **o_out), "LIBAVCODEC_52"){ - return av_set_string3(obj, name, val, alloc, o_out); -} -FF_SYMVER(const AVOption *, av_set_double, (void *obj, const char *name, double n), "LIBAVCODEC_52"){ - return av_set_double(obj, name, n); -} -FF_SYMVER(const AVOption *, av_set_q, (void *obj, const char *name, AVRational n), "LIBAVCODEC_52"){ - return av_set_q(obj, name, n); -} -FF_SYMVER(const AVOption *, av_set_int, (void *obj, const char *name, int64_t n), "LIBAVCODEC_52"){ - return av_set_int(obj, name, n); -} -FF_SYMVER(double, av_get_double, (void *obj, const char *name, const AVOption **o_out), "LIBAVCODEC_52"){ - return av_get_double(obj, name, o_out); -} -FF_SYMVER(AVRational, av_get_q, (void *obj, const char *name, const AVOption **o_out), "LIBAVCODEC_52"){ - return av_get_q(obj, name, o_out); -} -FF_SYMVER(int64_t, av_get_int, (void *obj, const char *name, const AVOption **o_out), "LIBAVCODEC_52"){ - return av_get_int(obj, name, o_out); -} -FF_SYMVER(const char *, av_get_string, (void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len), "LIBAVCODEC_52"){ - return av_get_string(obj, name, o_out, buf, buf_len); -} -FF_SYMVER(const AVOption *, av_next_option, (void *obj, const AVOption *last), "LIBAVCODEC_52"){ - return av_next_option(obj, last); -} -FF_SYMVER(int, av_opt_show2, (void *obj, void *av_log_obj, int req_flags, int rej_flags), "LIBAVCODEC_52"){ - return av_opt_show2(obj, av_log_obj, req_flags, rej_flags); -} -FF_SYMVER(void, av_opt_set_defaults, (void *s), "LIBAVCODEC_52"){ - return av_opt_set_defaults(s); -} -FF_SYMVER(void, av_opt_set_defaults2, (void *s, int mask, int flags), "LIBAVCODEC_52"){ - return av_opt_set_defaults2(s, mask, flags); -} -#endif diff --git a/libavcodec/options.c b/libavcodec/options.c index 3b92497770..9a9ed7bf34 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -113,9 +113,6 @@ static const AVOption options[]={ {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, A|E}, {"frame_size", NULL, OFFSET(frame_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, A|E}, {"frame_number", NULL, OFFSET(frame_number), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, -#if LIBAVCODEC_VERSION_MAJOR < 53 -{"real_pict_num", NULL, OFFSET(real_pict_num), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, -#endif {"delay", NULL, OFFSET(delay), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, {"qcomp", "video quantizer scale compression (VBR)", OFFSET(qcompress), FF_OPT_TYPE_FLOAT, 0.5, -FLT_MAX, FLT_MAX, V|E}, {"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), FF_OPT_TYPE_FLOAT, 0.5, 0, FLT_MAX, V|E}, diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 3ba3e9c4c7..d5b85c3e4e 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -105,43 +105,6 @@ void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ } } -#if LIBAVCODEC_VERSION_MAJOR < 53 -/** - * - * @param buf input - * @param buf_size input length, to signal EOF, this should be 0 (so that the last frame can be output) - * @param pts input presentation timestamp - * @param dts input decoding timestamp - * @param poutbuf will contain a pointer to the first byte of the output frame - * @param poutbuf_size will contain the length of the output frame - * @return the number of bytes of the input bitstream used - * - * Example: - * @code - * while(in_len){ - * len = av_parser_parse(myparser, AVCodecContext, &data, &size, - * in_data, in_len, - * pts, dts); - * in_data += len; - * in_len -= len; - * - * if(size) - * decode_frame(data, size); - * } - * @endcode - * - * @deprecated Use av_parser_parse2() instead. - */ -int av_parser_parse(AVCodecParserContext *s, - AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, - int64_t pts, int64_t dts) -{ - return av_parser_parse2(s, avctx, poutbuf, poutbuf_size, buf, buf_size, pts, dts, AV_NOPTS_VALUE); -} -#endif - int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, diff --git a/libavcodec/utils.c b/libavcodec/utils.c index aa2e55693c..a46dda7e9c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -48,7 +48,7 @@ static int volatile entangled_thread_counter=0; static int (*ff_lockmgr_cb)(void **mutex, enum AVLockOp op); static void *codec_mutex; -void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size) +void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size) { if(min_size < *size) return ptr; @@ -64,7 +64,7 @@ void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_s return ptr; } -void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size) +void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size) { void **p = ptr; if (min_size < *size) @@ -94,13 +94,6 @@ void avcodec_register(AVCodec *codec) codec->next = NULL; } -#if LIBAVCODEC_VERSION_MAJOR < 53 -void register_avcodec(AVCodec *codec) -{ - avcodec_register(codec); -} -#endif - unsigned avcodec_get_edge_width(void) { return EDGE_WIDTH; @@ -220,12 +213,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ *width=FFALIGN(*width, align); } -#if LIBAVCODEC_VERSION_MAJOR < 53 -int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){ - return av_image_check_size(w, h, 0, av_log_ctx); -} -#endif - int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ int i; int w= s->width; @@ -1123,20 +1110,6 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v) return n; } -#if LIBAVCODEC_VERSION_MAJOR < 53 -#include "libavutil/parseutils.h" - -int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str) -{ - return av_parse_video_size(width_ptr, height_ptr, str); -} - -int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg) -{ - return av_parse_video_rate(frame_rate, arg); -} -#endif - int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b){ int i; for(i=0; ithread_count = thread_count; - return ff_thread_init(s); -} - -void avcodec_thread_free(AVCodecContext *s) -{ -#if HAVE_THREADS - ff_thread_free(s); -#endif -} - -#endif diff --git a/libavcodec/xvmc.h b/libavcodec/xvmc.h index 6e18a88a16..1239015fcd 100644 --- a/libavcodec/xvmc.h +++ b/libavcodec/xvmc.h @@ -25,11 +25,6 @@ #include "avcodec.h" -#if LIBAVCODEC_VERSION_MAJOR < 53 -#define AV_XVMC_STATE_DISPLAY_PENDING 1 /** the surface should be shown, the video driver manipulates this */ -#define AV_XVMC_STATE_PREDICTION 2 /** the surface is needed for prediction, the codec manipulates this */ -#define AV_XVMC_STATE_OSD_SOURCE 4 /** the surface is needed for subpicture rendering */ -#endif #define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct the number is 1337 speak for the letters IDCT MCo (motion compensation) */ @@ -151,22 +146,6 @@ struct xvmc_pix_fmt { of coded blocks it contains. */ int next_free_data_block_num; - -/** extensions may be placed here */ -#if LIBAVCODEC_VERSION_MAJOR < 53 -//@{ - /** State flags used to work around limitations in the MPlayer video system. - 0 - Surface is not used. - 1 - Surface is still held in application to be displayed or is - still visible. - 2 - Surface is still held in libavcodec buffer for prediction. - */ - int state; - - /** pointer to the surface where the subpicture is rendered */ - void* p_osd_target_surface_render; -//}@ -#endif }; #endif /* AVCODEC_XVMC_H */ -- cgit v1.2.3