aboutsummaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer2011-04-20 04:48:23 +0200
committerMichael Niedermayer2011-04-20 04:48:23 +0200
commitefb5fa79f5ca34140db357a00c999286097ab53e (patch)
tree16cc9f34b25abc571f7a9915ff98ff2bb787203c /libavcodec
parentf92b0084c0e02b3c816a9eb234c548487acadae8 (diff)
parent31d76ec2883c04d29d1f173ea99e605a6936613a (diff)
Merge remote branch 'qatar/master'
* qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/Makefile3
-rw-r--r--libavcodec/avcodec.h201
-rw-r--r--libavcodec/dsputil.h8
-rw-r--r--libavcodec/flacenc.c11
-rw-r--r--libavcodec/imgconvert.c51
-rw-r--r--libavcodec/libvo-aacenc.c8
-rw-r--r--libavcodec/libvo-amrwbenc.c2
-rw-r--r--libavcodec/opt.c89
-rw-r--r--libavcodec/opt.h55
-rw-r--r--libavcodec/options.c9
-rw-r--r--libavcodec/parser.c37
-rw-r--r--libavcodec/pcm.c2
-rw-r--r--libavcodec/resample.c11
-rw-r--r--libavcodec/utils.c86
-rw-r--r--libavcodec/version.h28
-rw-r--r--libavcodec/xvmc.h21
16 files changed, 21 insertions, 601 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index e1432b3a96..aa7390be19 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -3,7 +3,7 @@ include $(SUBDIR)../config.mak
NAME = avcodec
FFLIBS = avutil
-HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h
+HEADERS = avcodec.h avfft.h dxva2.h vaapi.h vdpau.h version.h xvmc.h
OBJS = allcodecs.o \
audioconvert.o \
@@ -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 33ae03121b..dd1dd6bf3b 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,
@@ -366,18 +357,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
@@ -1112,9 +1091,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.
@@ -1289,9 +1265,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
@@ -1476,9 +1449,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.
@@ -1752,25 +1722,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.
@@ -2562,16 +2513,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.
@@ -3269,14 +3210,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.
*
@@ -3436,23 +3369,6 @@ 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
@@ -3521,14 +3437,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 */
@@ -3579,13 +3487,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.
*
@@ -3730,24 +3631,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
@@ -3781,25 +3666,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
@@ -3843,25 +3709,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
@@ -3906,15 +3753,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.
@@ -4179,15 +4017,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.
*
@@ -4266,7 +4095,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.
@@ -4280,17 +4109,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.
@@ -4319,22 +4138,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 FFmpeg (libavcodec, libavformat, etc.)
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index d2e64b0e97..8240372270 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -120,14 +120,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/flacenc.c b/libavcodec/flacenc.c
index 7c814700b1..051de69c40 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/imgconvert.c b/libavcodec/imgconvert.c
index b37c343b93..59630dfb09 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/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index 3475a5cfe6..0efb79b1c1 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -59,7 +59,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (s->codec_api.SetParam(s->handle, VO_PID_AAC_ENCPARAM, &params)
!= VO_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
- return AVERROR_UNKNOWN;
+ return AVERROR(EINVAL);
}
for (index = 0; index < 16; index++)
@@ -68,7 +68,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (index == 16) {
av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
avctx->sample_rate);
- return AVERROR_NOTSUPP;
+ return AVERROR(ENOSYS);
}
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
avctx->extradata_size = 2;
@@ -110,14 +110,14 @@ static int aac_encode_frame(AVCodecContext *avctx,
if (s->codec_api.GetOutputData(s->handle, &output, &output_info)
!= VO_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
- return AVERROR_UNKNOWN;
+ return AVERROR(EINVAL);
}
return output.Length;
}
AVCodec ff_libvo_aacenc_encoder = {
"libvo_aacenc",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AAC,
sizeof(AACContext),
aac_encode_init,
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index 7b9e66a247..ec23aeb7f8 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -119,7 +119,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
AVCodec ff_libvo_amrwbenc_encoder = {
"libvo_amrwbenc",
- CODEC_TYPE_AUDIO,
+ AVMEDIA_TYPE_AUDIO,
CODEC_ID_AMR_WB,
sizeof(AMRWBContext),
amr_wb_encode_init,
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
deleted file mode 100644
index ffa422ec93..0000000000
--- a/libavcodec/opt.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * AVOptions ABI compatibility wrapper
- * Copyright (c) 2010 Michael Niedermayer <michaelni@gmx.at>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg 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.
- *
- * FFmpeg 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 FFmpeg; 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
-
-#if FF_API_SET_STRING_OLD
-const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){
- const AVOption *o;
- if (av_set_string3(obj, name, val, alloc, &o) < 0)
- return NULL;
- return o;
-}
-
-const AVOption *av_set_string(void *obj, const char *name, const char *val){
- const AVOption *o;
- if (av_set_string3(obj, name, val, 0, &o) < 0)
- return NULL;
- return o;
-}
-#endif
-
-#if FF_API_OPT_SHOW
-int av_opt_show(void *obj, void *av_log_obj){
- return av_opt_show2(obj, av_log_obj,
- AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
-}
-#endif
diff --git a/libavcodec/opt.h b/libavcodec/opt.h
deleted file mode 100644
index 95147595b7..0000000000
--- a/libavcodec/opt.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * AVOptions
- * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg 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.
- *
- * FFmpeg 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 FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVCODEC_OPT_H
-#define AVCODEC_OPT_H
-
-/**
- * @file
- * AVOptions
- */
-
-#include "libavutil/rational.h"
-#include "avcodec.h"
-#include "libavutil/opt.h"
-
-#if FF_API_SET_STRING_OLD
-/**
- * @see av_set_string2()
- */
-attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);
-
-/**
- * @return a pointer to the AVOption corresponding to the field set or
- * NULL if no matching AVOption exists, or if the value val is not
- * valid
- * @see av_set_string3()
- */
-attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
-#endif
-#if FF_API_OPT_SHOW
-/**
- * @deprecated Use av_opt_show2() instead.
- */
-attribute_deprecated int av_opt_show(void *obj, void *av_log_obj);
-#endif
-
-#endif /* AVCODEC_OPT_H */
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c749f437d7..2c395510a8 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},
@@ -164,9 +161,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},
@@ -396,9 +390,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/parser.c b/libavcodec/parser.c
index 34659b7b2f..c1c8ce22ca 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/pcm.c b/libavcodec/pcm.c
index cdc11f80d0..111ce6193f 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -71,7 +71,7 @@ static av_cold int pcm_encode_close(AVCodecContext *avctx)
* @param offset Sample value offset
*/
#define ENCODE(type, endian, src, dst, n, shift, offset) \
- samples_##type = (type*)src; \
+ samples_##type = (const type*) src; \
for(;n>0;n--) { \
register type v = (*samples_##type++ >> shift) + offset; \
bytestream_put_##endian(&dst, v); \
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index ed2b31bd31..d3c12f6354 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 a6fb871ade..47b752a794 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;
@@ -224,12 +217,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;
@@ -482,7 +469,7 @@ static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
{
- int ret= -1;
+ int ret = 0;
/* If there is a user-supplied mutex locking routine, call it. */
if (ff_lockmgr_cb) {
@@ -493,11 +480,14 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
entangled_thread_counter++;
if(entangled_thread_counter != 1){
av_log(avctx, AV_LOG_ERROR, "insufficient thread locking around avcodec_open/close()\n");
+ ret = -1;
goto end;
}
- if(avctx->codec || !codec)
+ if(avctx->codec || !codec) {
+ ret = AVERROR(EINVAL);
goto end;
+ }
if (codec->priv_data_size > 0) {
if(!avctx->priv_data){
@@ -547,6 +537,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
if (avctx->codec_id != codec->id || (avctx->codec_type != codec->type
&& avctx->codec_type != AVMEDIA_TYPE_ATTACHMENT)) {
av_log(avctx, AV_LOG_ERROR, "codec type or id mismatches\n");
+ ret = AVERROR(EINVAL);
goto free_and_end;
}
avctx->frame_number = 0;
@@ -561,6 +552,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
if (avctx->codec->max_lowres < avctx->lowres) {
av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
avctx->codec->max_lowres);
+ ret = AVERROR(EINVAL);
goto free_and_end;
}
if (avctx->codec->sample_fmts && avctx->codec->encode) {
@@ -570,6 +562,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
break;
if (avctx->codec->sample_fmts[i] == AV_SAMPLE_FMT_NONE) {
av_log(avctx, AV_LOG_ERROR, "Specified sample_fmt is not supported.\n");
+ ret = AVERROR(EINVAL);
goto free_and_end;
}
}
@@ -736,20 +729,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)
@@ -779,20 +758,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)
@@ -1225,20 +1190,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; i<size && !(tab[i][0]==a && tab[i][1]==b); i++);
@@ -1344,20 +1295,3 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field)
}
#endif
-
-#if LIBAVCODEC_VERSION_MAJOR < 53
-
-int avcodec_thread_init(AVCodecContext *s, int thread_count)
-{
- s->thread_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/version.h b/libavcodec/version.h
index 4abdd5a070..5e88f10b99 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -20,8 +20,8 @@
#ifndef AVCODEC_VERSION_H
#define AVCODEC_VERSION_H
-#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 120
+#define LIBAVCODEC_VERSION_MAJOR 53
+#define LIBAVCODEC_VERSION_MINOR 0
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -41,30 +41,6 @@
#ifndef FF_API_PALETTE_CONTROL
#define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
-#ifndef FF_API_MM_FLAGS
-#define FF_API_MM_FLAGS (LIBAVCODEC_VERSION_MAJOR < 53)
-#endif
-#ifndef FF_API_OPT_SHOW
-#define FF_API_OPT_SHOW (LIBAVCODEC_VERSION_MAJOR < 53)
-#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
-#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
-#ifndef FF_API_SET_STRING_OLD
-#define FF_API_SET_STRING_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
-#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
diff --git a/libavcodec/xvmc.h b/libavcodec/xvmc.h
index 29c010bff9..93ad8bb9a5 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 */