*/
#include <errno.h>
+#include "libavcore/samplefmt.h"
#include "libavutil/avutil.h"
#include "libavutil/cpu.h"
#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 91
-#define LIBAVCODEC_VERSION_MICRO 1
+#define LIBAVCODEC_VERSION_MINOR 112
+#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
#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 < 53)
+#endif
+#ifndef FF_API_OLD_AUDIOCONVERT
+#define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 53)
+#endif
-#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
-#define AV_TIME_BASE 1000000
-#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
+#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.
CODEC_ID_A64_MULTI,
CODEC_ID_A64_MULTI5,
CODEC_ID_R10K,
+ CODEC_ID_MXPEG,
+ CODEC_ID_LAGARITH,
+ CODEC_ID_PRORES,
/* various PCM "codecs" */
CODEC_ID_PCM_S16LE= 0x10000,
CODEC_ID_PCM_F64BE,
CODEC_ID_PCM_F64LE,
CODEC_ID_PCM_BLURAY,
+ CODEC_ID_PCM_LXF,
/* various ADPCM codecs */
CODEC_ID_ADPCM_IMA_QT= 0x11000,
CODEC_ID_ATRAC1,
CODEC_ID_BINKAUDIO_RDFT,
CODEC_ID_BINKAUDIO_DCT,
+ CODEC_ID_AAC_LATM,
+ CODEC_ID_QDMC,
/* subtitle codecs */
CODEC_ID_DVD_SUBTITLE= 0x17000,
CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
* stream (only used by libavformat) */
+ CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information.
};
#if LIBAVCODEC_VERSION_MAJOR < 53
#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
#endif
-/**
- * all in native-endian format
- */
-enum SampleFormat {
- SAMPLE_FMT_NONE = -1,
- SAMPLE_FMT_U8, ///< unsigned 8 bits
- SAMPLE_FMT_S16, ///< signed 16 bits
- SAMPLE_FMT_S32, ///< signed 32 bits
- SAMPLE_FMT_FLT, ///< float
- SAMPLE_FMT_DBL, ///< double
- SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec
-};
+#if FF_API_OLD_SAMPLE_FMT
+#define SampleFormat AVSampleFormat
+
+#define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
+#define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
+#define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
+#define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
+#define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
+#define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
+#define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
+#endif
+
+#if FF_API_OLD_AUDIOCONVERT
+#include "libavcore/audioconvert.h"
/* Audio channel masks */
-#define CH_FRONT_LEFT 0x00000001
-#define CH_FRONT_RIGHT 0x00000002
-#define CH_FRONT_CENTER 0x00000004
-#define CH_LOW_FREQUENCY 0x00000008
-#define CH_BACK_LEFT 0x00000010
-#define CH_BACK_RIGHT 0x00000020
-#define CH_FRONT_LEFT_OF_CENTER 0x00000040
-#define CH_FRONT_RIGHT_OF_CENTER 0x00000080
-#define CH_BACK_CENTER 0x00000100
-#define CH_SIDE_LEFT 0x00000200
-#define CH_SIDE_RIGHT 0x00000400
-#define CH_TOP_CENTER 0x00000800
-#define CH_TOP_FRONT_LEFT 0x00001000
-#define CH_TOP_FRONT_CENTER 0x00002000
-#define CH_TOP_FRONT_RIGHT 0x00004000
-#define CH_TOP_BACK_LEFT 0x00008000
-#define CH_TOP_BACK_CENTER 0x00010000
-#define CH_TOP_BACK_RIGHT 0x00020000
-#define CH_STEREO_LEFT 0x20000000 ///< Stereo downmix.
-#define CH_STEREO_RIGHT 0x40000000 ///< See CH_STEREO_LEFT.
+#define CH_FRONT_LEFT AV_CH_FRONT_LEFT
+#define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
+#define CH_FRONT_CENTER AV_CH_FRONT_CENTER
+#define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
+#define CH_BACK_LEFT AV_CH_BACK_LEFT
+#define CH_BACK_RIGHT AV_CH_BACK_RIGHT
+#define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
+#define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
+#define CH_BACK_CENTER AV_CH_BACK_CENTER
+#define CH_SIDE_LEFT AV_CH_SIDE_LEFT
+#define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
+#define CH_TOP_CENTER AV_CH_TOP_CENTER
+#define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
+#define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
+#define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
+#define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
+#define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
+#define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
+#define CH_STEREO_LEFT AV_CH_STEREO_LEFT
+#define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
/** Channel mask value used for AVCodecContext.request_channel_layout
to indicate that the user requests the channel order of the decoder output
to be the native codec channel order. */
-#define CH_LAYOUT_NATIVE 0x8000000000000000LL
+#define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
/* Audio channel convenience macros */
-#define CH_LAYOUT_MONO (CH_FRONT_CENTER)
-#define CH_LAYOUT_STEREO (CH_FRONT_LEFT|CH_FRONT_RIGHT)
-#define CH_LAYOUT_2_1 (CH_LAYOUT_STEREO|CH_BACK_CENTER)
-#define CH_LAYOUT_SURROUND (CH_LAYOUT_STEREO|CH_FRONT_CENTER)
-#define CH_LAYOUT_4POINT0 (CH_LAYOUT_SURROUND|CH_BACK_CENTER)
-#define CH_LAYOUT_2_2 (CH_LAYOUT_STEREO|CH_SIDE_LEFT|CH_SIDE_RIGHT)
-#define CH_LAYOUT_QUAD (CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_5POINT0 (CH_LAYOUT_SURROUND|CH_SIDE_LEFT|CH_SIDE_RIGHT)
-#define CH_LAYOUT_5POINT1 (CH_LAYOUT_5POINT0|CH_LOW_FREQUENCY)
-#define CH_LAYOUT_5POINT0_BACK (CH_LAYOUT_SURROUND|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_5POINT1_BACK (CH_LAYOUT_5POINT0_BACK|CH_LOW_FREQUENCY)
-#define CH_LAYOUT_7POINT0 (CH_LAYOUT_5POINT0|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_7POINT1 (CH_LAYOUT_5POINT1|CH_BACK_LEFT|CH_BACK_RIGHT)
-#define CH_LAYOUT_7POINT1_WIDE (CH_LAYOUT_5POINT1_BACK|\
- CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER)
-#define CH_LAYOUT_STEREO_DOWNMIX (CH_STEREO_LEFT|CH_STEREO_RIGHT)
+#define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
+#define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
+#define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
+#define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
+#define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
+#define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
+#define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
+#define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
+#define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
+#define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
+#define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
+#define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
+#define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
+#define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
+#define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
+#endif
/* in bytes */
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
* encoders
*/
#define CODEC_CAP_EXPERIMENTAL 0x0200
+/**
+ * Codec should fill in channel configuration and samplerate instead of container
+ */
+#define CODEC_CAP_CHANNEL_CONF 0x0400
+/**
+ * Codec is able to deal with negative linesizes
+ */
+#define CODEC_CAP_NEG_LINESIZES 0x0800
+/**
+ * Codec supports frame-level multithreading.
+ */
+#define CODEC_CAP_FRAME_THREADS 0x1000
//The following defines may change, don't expect compatibility if you use them.
#define MB_TYPE_INTRA4x4 0x0001
int8_t *ref_index[2];\
\
/**\
- * reordered opaque 64bit number (generally a PTS) from AVCodecContext.reordered_opaque\
- * output in AVFrame.reordered_opaque\
+ * reordered opaque 64bit (generally an integer or a double precision float\
+ * PTS but can be anything). \
+ * The user sets AVCodecContext.reordered_opaque to represent the input at\
+ * that time,\
+ * the decoder reorders values as needed and sets AVFrame.reordered_opaque\
+ * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque \
+ * @deprecated in favor of pkt_pts\
* - encoding: unused\
* - decoding: Read by user.\
*/\
* - decoding: Set by libavcodec\
*/\
void *hwaccel_picture_private;\
-
+\
+ /**\
+ * reordered pts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_pts;\
+\
+ /**\
+ * dts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_dts;\
+\
+ /**\
+ * the AVCodecContext which ff_thread_get_buffer() was last called on\
+ * - encoding: Set by libavcodec.\
+ * - decoding: Set by libavcodec.\
+ */\
+ struct AVCodecContext *owner;\
+\
+ /**\
+ * used by multithreading to store frame-specific info\
+ * - encoding: Set by libavcodec.\
+ * - decoding: Set by libavcodec.\
+ */\
+ void *thread_opaque;
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
* decoder to draw a horizontal band. It improves cache usage. Not
* all codecs can do that. You must check the codec capabilities
* beforehand.
+ * When multithreading is used, it may be called from multiple threads
+ * at the same time; threads might draw different parts of the same AVFrame,
+ * or multiple AVFrames, and there is no guarantee that slices will be drawn
+ * in order.
* The function is also used by hardware acceleration APIs.
* It is called at least once during frame decoding to pass
* the data needed for hardware render.
* - encoding: Set by user.
* - decoding: Set by libavcodec.
*/
- enum SampleFormat sample_fmt; ///< sample format
+ enum AVSampleFormat sample_fmt; ///< sample format
/* The following data should not be initialized. */
/**
#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 LIBAVCODEC_VERSION_MAJOR < 53
+#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
* if CODEC_CAP_DR1 is not set then get_buffer() must call
* avcodec_default_get_buffer() instead of providing buffers allocated by
* some other means.
+ * If frame multithreading is used and thread_safe_callbacks is set,
+ * it may be called from a different thread, but not from more than one at once.
+ * Does not need to be reentrant.
* - encoding: unused
* - decoding: Set by libavcodec, user can override.
*/
* Called to release buffers which were allocated with get_buffer.
* A released buffer can be reused in get_buffer().
* pic.data[*] must be set to NULL.
+ * May be called from a different thread if frame multithreading is used,
+ * but not by more than one thread at once, so does not need to be reentrant.
* - encoding: unused
* - decoding: Set by libavcodec, user can override.
*/
#define FF_DEBUG_VIS_QP 0x00002000
#define FF_DEBUG_VIS_MB_TYPE 0x00004000
#define FF_DEBUG_BUFFERS 0x00008000
+#define FF_DEBUG_THREADS 0x00010000
/**
* debug
#define FF_PROFILE_AAC_SSR 2
#define FF_PROFILE_AAC_LTP 3
-#define FF_PROFILE_H264_BASELINE 66
-#define FF_PROFILE_H264_MAIN 77
-#define FF_PROFILE_H264_EXTENDED 88
-#define FF_PROFILE_H264_HIGH 100
-#define FF_PROFILE_H264_HIGH_10 110
-#define FF_PROFILE_H264_HIGH_422 122
-#define FF_PROFILE_H264_HIGH_444 244
-#define FF_PROFILE_H264_CAVLC_444 44
+#define FF_PROFILE_DTS 20
+#define FF_PROFILE_DTS_ES 30
+#define FF_PROFILE_DTS_96_24 40
+#define FF_PROFILE_DTS_HD_HRA 50
+#define FF_PROFILE_DTS_HD_MA 60
+
+#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
+#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
+
+#define FF_PROFILE_H264_BASELINE 66
+#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
+#define FF_PROFILE_H264_MAIN 77
+#define FF_PROFILE_H264_EXTENDED 88
+#define FF_PROFILE_H264_HIGH 100
+#define FF_PROFILE_H264_HIGH_10 110
+#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_422 122
+#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_HIGH_444 144
+#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
+#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_CAVLC_444 44
/**
* level
int compression_level;
#define FF_COMPRESSION_DEFAULT -1
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_USE_LPC
/**
* Sets whether to use LPC mode - used by FLAC encoder.
* - encoding: Set by user.
/**
* opaque 64bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
+ * @deprecated in favor of pkt_pts
* - encoding: unused
* - decoding: Set by user.
*/
/**
* Bits per sample/pixel of internal libavcodec pixel/sample format.
- * This field is applicable only when sample_fmt is SAMPLE_FMT_S32.
+ * This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32.
* - encoding: set by user.
* - decoding: set by libavcodec.
*/
* - decoding: unused
*/
int lpc_passes;
+
+ /**
+ * Number of slices.
+ * Indicates number of picture subdivisions. Used for parallelized
+ * decoding.
+ * - encoding: Set by user
+ * - decoding: unused
+ */
+ int slices;
+
+ /**
+ * Header containing style information for text subtitles.
+ * For SUBTITLE_ASS subtitle type, it should contain the whole ASS
+ * [Script Info] and [V4+ Styles] section, plus the [Events] line and
+ * the Format line following. It shouldn't include any Dialogue line.
+ * - encoding: Set/allocated/freed by user (before avcodec_open())
+ * - decoding: Set/allocated/freed by libavcodec (by avcodec_open())
+ */
+ uint8_t *subtitle_header;
+ int subtitle_header_size;
+
+ /**
+ * Current packet as passed into the decoder, to avoid having
+ * to pass the packet into every function. Currently only valid
+ * inside lavc and get/release_buffer callbacks.
+ * - decoding: set by avcodec_decode_*, read by get_buffer() for setting pkt_pts
+ * - encoding: unused
+ */
+ AVPacket *pkt;
+
+ /**
+ * Whether this is a copy of the context which had init() called on it.
+ * This is used by multithreading - shared tables and picture pointers
+ * should be freed from the original context only.
+ * - encoding: Set by libavcodec.
+ * - decoding: Set by libavcodec.
+ */
+ int is_copy;
+
+ /**
+ * Which multithreading methods to use.
+ * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
+ * so clients which cannot provide future frames should not use it.
+ *
+ * - encoding: Set by user, otherwise the default is used.
+ * - decoding: Set by user, otherwise the default is used.
+ */
+ int thread_type;
+#define FF_THREAD_FRAME 1 //< Decode more than one frame at once
+#define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
+
+ /**
+ * Which multithreading methods are in use by the codec.
+ * - encoding: Set by libavcodec.
+ * - decoding: Set by libavcodec.
+ */
+ int active_thread_type;
+
+ /**
+ * Set by the client if its custom get_buffer() callback can be called
+ * from another thread, which allows faster multithreaded decoding.
+ * draw_horiz_band() will be called from other threads regardless of this setting.
+ * Ignored if the default get_buffer() is used.
+ * - encoding: Set by user.
+ * - decoding: Set by user.
+ */
+ int thread_safe_callbacks;
} AVCodecContext;
+/**
+ * AVProfile.
+ */
+typedef struct AVProfile {
+ int profile;
+ const char *name; ///< short name for the profile
+} AVProfile;
+
/**
* AVCodec.
*/
*/
const char *long_name;
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
- const enum SampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
+ const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
AVClass *priv_class; ///< AVClass for the private context
+ const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
+
+ /**
+ * @defgroup framethreading Frame-level threading support functions.
+ * @{
+ */
+ /**
+ * If defined, called on thread contexts when they are created.
+ * If the codec allocates writable tables in init(), re-allocate them here.
+ * priv_data will be set to a copy of the original.
+ */
+ int (*init_thread_copy)(AVCodecContext *);
+ /**
+ * Copy necessary context variables from a previous thread context to the current one.
+ * If not defined, the next thread will start automatically; otherwise, the codec
+ * must call ff_thread_finish_setup().
+ *
+ * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
+ */
+ int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
+ /** @} */
} AVCodec;
/**
*/
void av_shrink_packet(AVPacket *pkt, int size);
+/**
+ * Increase packet size, correctly zeroing padding
+ *
+ * @param pkt packet
+ * @param grow_by number of bytes by which to increase the size of the packet
+ */
+int av_grow_packet(AVPacket *pkt, int grow_by);
+
/**
* @warning This is a hack - the packet memory allocation stuff is broken. The
* packet is allocated if it was not really allocated.
*/
ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
- enum SampleFormat sample_fmt_out,
- enum SampleFormat sample_fmt_in,
+ enum AVSampleFormat sample_fmt_out,
+ enum AVSampleFormat sample_fmt_in,
int filter_length, int log2_phase_count,
int linear, double cutoff);
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
/**
- * Print in buf the string corresponding to the pixel format with
- * number pix_fmt, or an header if pix_fmt is negative.
- *
- * @param[in] buf the buffer where to write the string
- * @param[in] buf_size the size of buf
- * @param[in] pix_fmt the number of the pixel format to print the corresponding info string, or
- * a negative value to print the corresponding header.
- * Meaningful values for obtaining a pixel format info vary from 0 to PIX_FMT_NB -1.
+ * @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 */
AVCodec *avcodec_find_decoder_by_name(const char *name);
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
+/**
+ * Return a name for the specified profile, if available.
+ *
+ * @param codec the codec that is searched for the given profile
+ * @param profile the profile value for which a name is requested
+ * @return A name for the profile if found, NULL otherwise.
+ */
+const char *av_get_profile_name(const AVCodec *codec, int profile);
+
/**
* Set the fields of the given AVCodecContext to default values.
*
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
*/
int av_get_bits_per_sample(enum CodecID codec_id);
+#if FF_API_OLD_SAMPLE_FMT
/**
- * Return sample format bits per sample.
- *
- * @param[in] sample_fmt the sample format
- * @return Number of bits per sample or zero if unknown for the given sample format.
+ * @deprecated Use av_get_bits_per_sample_fmt() instead.
*/
-int av_get_bits_per_sample_format(enum SampleFormat sample_fmt);
+attribute_deprecated
+int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
+#endif
/* frame parsing */
typedef struct AVCodecParserContext {
*
* @see av_realloc
*/
-void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size);
+void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
/**
* Allocate a buffer, reusing the given one if large enough.
* @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, unsigned int min_size);
+void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
#if LIBAVCODEC_VERSION_MAJOR < 53
/**